/* ═══════════════════════════════════════════════════════
   21VOX GUIDES: "The Field Guide"
   Loaded after styles.css by the 12 evergreen guides.
   Markup: scripts/build-guides.py (template) and each guide's <div class="guide-body">.
   ═══════════════════════════════════════════════════════ */

:root {
    --gd-text: var(--white-warm);
    --gd-body: var(--text-warm);
    --gd-soft: #cfc9bf;
    --gd-muted: var(--text-muted-warm);
    --gd-dim: #8a8378;
    --gd-card: var(--panel-bg);
    --gd-line: #262420;
    --gd-outline: #3a3732;
    --gd-field: #34312c;
    --gd-input: #0b0a09;
    --gd-tint: #120d07;
    --gd-tint-line: #3a2a14;
    --gd-gold: #e3c35a;
}

/* Georgia sized to DM Serif Display's width, so headings barely reflow when the web font arrives */
@font-face { font-family: 'DM Serif Fallback'; src: local('Georgia'); size-adjust: 97%; }
.guide { --serif: 'DM Serif Display', 'DM Serif Fallback', Georgia, serif; }

/* The rail and the progress bar are sticky, which needs a body that clips instead of scrolling.
   The site header scrolls away, as on the other redesigned pages. */
body { overflow-x: clip; }
site-header > header { position: relative; }
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

.guide { color: var(--gd-text); font-family: var(--sans); font-size: 18px; line-height: 1.6; }
.guide-article { max-width: 1280px; margin: 0 auto; padding: 36px 32px 0; }
.guide-vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.guide-sep { margin: 0 0.5em; }
.guide a:focus-visible, .guide button:focus-visible, .guide input:focus-visible, .guide summary:focus-visible, .guide [tabindex]:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
.guide h2[id] { scroll-margin-top: 24px; }
/* styles.css styles every <header> as the sticky site bar and every nav link as a small uppercase
   header link; these are the guide's own */
.guide-head { position: static; z-index: auto; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 0; transform: none; transition: none; }
.guide nav a { font-family: inherit; font-size: inherit; font-weight: inherit; letter-spacing: normal; text-transform: none; white-space: normal; }

/* ── Reading progress ── */
.guide-progress { position: sticky; top: 0; z-index: 20; height: 3px; background: #1c1b19; }
.guide-progress-bar { display: block; width: 100%; height: 100%; background: var(--orange); transform: scaleX(var(--guide-progress, 0)); transform-origin: left center; }

/* ── Head ── */
.guide-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0 9px; font-size: 13px; color: var(--gd-dim); }
.guide-crumb a { display: inline-flex; align-items: center; min-height: 32px; color: var(--gd-muted); text-decoration: none; }
.guide-crumb a:hover { color: var(--orange); }
.guide-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 34px 0 18px; }
.guide-tag { padding: 5px 10px; background: var(--gd-tint); border: 1px solid var(--gd-tint-line); border-radius: 999px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange); }
.guide-tag--series { background: transparent; border-color: var(--gd-outline); color: var(--gd-soft); }
.guide-head h1 { max-width: 900px; font-family: var(--serif); font-weight: 400; font-size: 80px; line-height: 0.98; color: var(--gd-text); overflow-wrap: break-word; }
.guide-deck { max-width: 46ch; margin-top: 22px; font-size: 22px; line-height: 1.5; color: var(--gd-soft); }
.guide-meta { margin-top: 20px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gd-dim); }

/* ── Body and rail ── */
.guide-grid { display: grid; grid-template-columns: minmax(0, 720px) minmax(0, 280px); column-gap: 64px; padding: 28px 0 56px; }
.guide-main { grid-column: 1; grid-row: 1; min-width: 0; }
.guide-body > :first-child { margin-top: 0; }
.guide-body h2 { margin: 52px 0 18px; font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.12; color: var(--gd-text); }
.guide-body h3 { margin: 30px 0 10px; font-family: var(--sans); font-size: 21px; font-weight: 700; line-height: 1.3; color: var(--gd-text); }
.guide-body p { margin: 0 0 20px; font-size: 18px; line-height: 1.72; color: var(--gd-body); }
.guide-body strong { font-weight: 700; color: var(--gd-text); }
.guide-body a { color: var(--orange); text-decoration: underline; text-decoration-color: rgba(247, 147, 26, 0.45); text-underline-offset: 3px; }
.guide-body a:hover { color: #ffb257; text-decoration-color: currentColor; }
.guide-body a[href^="/glossary"] { color: var(--gd-text); text-decoration-style: dotted; text-decoration-color: var(--orange); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.guide-body a[href^="/glossary"]:hover { color: var(--orange); }
.guide-body ul, .guide-body ol { margin: 0 0 22px; padding-left: 1.4em; font-size: 18px; line-height: 1.72; color: var(--gd-body); }
.guide-body li { margin-bottom: 8px; }
.guide-body li::marker { color: var(--orange); }
.guide-body .guide-dotted { text-decoration: underline dotted; text-decoration-color: var(--orange); text-underline-offset: 4px; }
.guide-body .guide-closing { margin-top: 28px; font-size: 15px; line-height: 1.6; color: var(--gd-muted); }
/* The old dot dividers become a quiet rule; their characters stay in the page */
.guide-body .article-divider { height: 1px; margin: 44px 0; overflow: hidden; background: var(--gd-line); font-size: 0; color: transparent; }

/* Bold-lead lists: the term on the left, its description on the right */
.guide-body ul.guide-defs { list-style: none; margin: 0 0 22px; padding: 0; border-bottom: 1px solid var(--gd-line); }
.guide-defs > li { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr); gap: 16px; margin: 0; padding: 11px 0; border-top: 1px solid var(--gd-line); font-size: 17px; line-height: 1.5; }
.guide-defs > li > strong { color: var(--gd-text); }
.guide-def { display: block; color: var(--gd-soft); }

/* Pull quotes */
.guide-body .pull-quote { position: relative; margin: 34px 0; padding: 0 0 0 44px; }
.guide-body .pull-quote::before { content: "\201C"; content: "\201C" / ""; position: absolute; left: 0; top: -14px; font-family: var(--serif); font-size: 72px; line-height: 1; color: var(--orange); }
.guide-body .pull-quote p { margin: 0; font-family: var(--serif); font-size: 28px; line-height: 1.3; color: var(--gd-text); }
.guide-body .pull-quote p::after { content: "\201D"; content: "\201D" / ""; color: var(--orange); }

/* Data boxes */
.guide-box { margin: 28px 0; padding: 18px 0 6px; background: var(--gd-card); border: 1px solid var(--gd-line); border-radius: 14px; overflow: hidden; }
.guide-box figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; padding: 0 18px 12px; }
.guide-box-t { font-size: 17px; font-weight: 700; color: var(--gd-text); }
.guide-box-asof { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gd-dim); }
.guide-box-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.guide-box-grid > div { padding: 14px 18px; border-top: 1px solid var(--gd-line); }
.guide-box-grid dt { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gd-muted); }
.guide-box-grid dd { margin: 4px 0 0; font-size: 18px; font-weight: 600; line-height: 1.35; font-variant-numeric: tabular-nums; color: var(--gd-text); }
.guide-box-note { margin: 0; padding: 12px 18px 10px; border-top: 1px solid var(--gd-line); font-size: 14px; line-height: 1.55; color: var(--gd-muted); }
.guide-box-text { padding: 12px 18px 14px; border-top: 1px solid var(--gd-line); font-size: 16px; line-height: 1.7; color: var(--gd-body); }
.guide-box-text p { margin: 0 0 12px; font-size: 16px; }
.guide-box-text .guide-box-sub { display: block; margin: 12px 0 2px; color: var(--gd-text); }
.guide-box-text .guide-box-sub:first-child { margin-top: 0; }
.guide-box--table { padding-bottom: 0; }

/* Tables: header row in mono, ruled rows with bold labels; the wrapper scrolls on narrow screens */
.guide-table { overflow-x: auto; border-top: 1px solid var(--gd-line); }
.guide-table table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.guide-table th, .guide-table td { padding: 12px 14px 12px 0; text-align: left; vertical-align: top; }
.guide-table th:first-child, .guide-table td:first-child { padding-left: 18px; }
.guide-table th:last-child, .guide-table td:last-child { padding-right: 18px; }
.guide-table thead th { font-family: var(--mono); font-size: 10px; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gd-muted); }
.guide-table thead th.is-btc { color: var(--orange); }
.guide-table tbody th, .guide-table tbody td { border-top: 1px solid var(--gd-line); }
.guide-table tbody th { font-weight: 700; color: var(--gd-text); }
.guide-table tbody td { font-variant-numeric: tabular-nums; color: var(--gd-soft); }
.guide-chip { display: inline-block; padding: 3px 7px; border-radius: 4px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.guide-chip--bitcoin { background: var(--orange); color: #140c02; }
.guide-chip--gold { border: 1px solid #c9a227; color: var(--gd-gold); }

/* FAQ */
.guide-faq { border-top: 1px solid var(--gd-line); }
.guide-faq:last-of-type { border-bottom: 1px solid var(--gd-line); }
.guide-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 8px 0; cursor: pointer; list-style: none; }
.guide-faq summary::-webkit-details-marker { display: none; }
.guide-faq summary h3 { margin: 0; font-family: var(--sans); font-size: 18px; font-weight: 700; line-height: 1.4; color: var(--gd-text); }
.guide-faq-mark::before { content: "+"; font-size: 20px; color: var(--orange); }
.guide-faq[open] .guide-faq-mark::before { content: "\2212"; }
.guide-faq-a p { font-size: 17px; line-height: 1.7; }
.guide-faq-a { padding-bottom: 6px; }

/* Lightning's channel diagram scales with the column */
.guide-body .channel-diagram { margin: 32px 0; padding: 24px; text-align: center; background: var(--gd-card); border: 1px solid var(--gd-line); border-radius: 14px; }
.guide-body .channel-diagram svg { max-width: 100%; height: auto; }

/* ── Rail: In this guide, and the tool card ── */
.guide-rail { grid-column: 2; grid-row: 1; align-self: start; position: sticky; top: 24px; max-height: calc(100vh - 24px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; display: flex; flex-direction: column; gap: 24px; margin: 0 -4px; padding: 20px 4px 8px; }
.guide-toc summary { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; list-style: none; cursor: default; }
.guide-toc summary::-webkit-details-marker { display: none; }
.guide-rail-k, .guide-toc-now { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gd-muted); }
.guide-toc-count, .guide-toc-mark { display: none; }
.guide-toc ol { list-style: none; margin: 0; padding: 0; }
.guide-toc a { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 6px; padding: 8px 0; border-top: 1px solid var(--gd-line); font-size: 14px; line-height: 1.4; color: var(--gd-muted); text-decoration: none; }
.guide-toc a:hover, .guide-toc a[aria-current="true"] { color: var(--gd-text); }
.guide-toc-n { padding-top: 2px; font-family: var(--mono); font-size: 11px; color: var(--gd-dim); }
.guide-toc a[aria-current="true"] .guide-toc-n { color: var(--orange); }
@media (pointer: coarse) {
    .guide-toc a { min-height: 44px; padding: 11px 0; }
    .guide-crumb a { min-height: 44px; }
}

/* Tool card: the whole card is the link */
.guide-tool { display: flex; flex-direction: column; gap: 8px; padding: 18px; background: var(--gd-card); border: 1px solid var(--gd-line); border-top: 2px solid var(--orange); border-radius: 14px; color: var(--gd-text); text-decoration: none; }
.guide-tool:hover { border-color: var(--gd-outline); border-top-color: var(--orange); }
.guide-tool-k { display: inline-flex; align-items: center; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gd-muted); }
.guide-dot { width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--green); flex: none; }
.guide-tool-t { font-size: 18px; font-weight: 700; line-height: 1.3; }
.guide-tool-d { font-size: 14px; line-height: 1.5; color: var(--gd-muted); }
.guide-tool-go { font-size: 15px; font-weight: 600; color: var(--orange); }
.guide-tool:hover .guide-tool-go { color: #ffb257; }

/* ── End of the guide ── */
.guide-end { padding-top: 44px; }
.guide-end h2 { margin-bottom: 14px; font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.2; color: var(--gd-text); }
.guide-end .guide-tool { padding: 22px; }
.guide-pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.guide-pill { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--gd-outline); border-radius: 999px; font-size: 15px; color: #e6e0d6; text-decoration: none; }
.guide-pill:hover { border-color: var(--orange); color: var(--gd-text); }
.guide-next { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.guide-next-card { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 20px; border: 1px solid var(--gd-line); border-radius: 14px; color: var(--gd-text); text-decoration: none; }
.guide-next-card:hover { border-color: var(--gd-outline); }
.guide-next-k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gd-muted); }
.guide-next-t { font-family: var(--serif); font-size: 24px; line-height: 1.15; }
.guide-next-go { font-size: 15px; font-weight: 600; color: var(--orange); }

/* ── Signup band (Substack; subscribe-bar.js handles the submit) ── */
.guide-band { background: var(--gd-tint); border-top: 1px solid var(--gd-tint-line); border-bottom: 1px solid var(--gd-tint-line); }
.guide-band-in { max-width: 1280px; margin: 0 auto; padding: 44px 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 48px; }
.guide-band-h { flex: 1 1 420px; font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.15; color: var(--gd-text); }
.guide-band-h em { color: var(--orange); }
.guide-form.bw-subscribe-form { flex: 1 1 420px; display: flex; gap: 10px; width: auto; }
.guide-input { flex: 1 1 auto; min-width: 0; height: 52px; padding: 0 16px; background: var(--gd-input); color: var(--gd-text); border: 1px solid var(--gd-field); border-radius: 10px; font-family: var(--sans); font-size: 16px; }
.guide-input::placeholder { color: #8f897f; opacity: 1; }
.guide-input:focus { border-color: var(--orange); }
.guide-btn.bw-subscribe-btn { height: 52px; padding: 0 22px; background: var(--orange); color: #140c02; border: 0; border-radius: 10px; box-shadow: none; font-family: var(--sans); font-size: 16px; font-weight: 700; }
.guide-btn.bw-subscribe-btn:hover { background: #ffa53d; transform: none; box-shadow: none; }

/* ── Body pieces from the custom guides (What is Bitcoin, Concerns, the inheritance guide) ── */
/* Warm stat figure: one key number and what it means */
.guide-body .guide-stat { display: flex; align-items: center; gap: 22px; margin: 28px 0; padding: 20px 22px; background: var(--gd-tint); border: 1px solid var(--gd-tint-line); border-radius: 14px; }
.guide-body .guide-stat-n { flex: none; margin: 0; font-family: var(--serif); font-size: 56px; line-height: 1; color: var(--orange); }
.guide-body .guide-stat-t { margin: 0; font-size: 16px; line-height: 1.6; color: var(--gd-soft); }
/* Callouts (the old highlight and TL;DR boxes) */
.guide-body .guide-callout { margin: 28px 0; padding: 18px 22px; background: var(--gd-card); border: 1px solid var(--gd-line); border-left: 3px solid var(--orange); border-radius: 12px; }
.guide-body .guide-callout p, .guide-body .guide-callout ul { font-size: 17px; }
.guide-body .guide-callout > :last-child { margin-bottom: 0; }
.guide-body .guide-callout-k { margin: 0 0 6px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange); }
/* Numbered step cards */
.guide-body ol.guide-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 24px; padding: 0; }
.guide-steps > li { margin: 0; padding: 18px; background: var(--gd-card); border: 1px solid var(--gd-line); border-radius: 12px; font-size: 15px; line-height: 1.55; }
.guide-step-n { display: block; margin-bottom: 10px; font-family: var(--serif); font-size: 30px; line-height: 1; color: var(--orange); }
.guide-body .guide-steps strong { display: block; font-size: 16px; line-height: 1.4; }
.guide-step-d { display: block; margin-top: 4px; color: var(--gd-muted); }
/* Concerns: a mono label and orange quotation marks on each concern heading */
.guide-body h2 .guide-h-k { display: block; margin-bottom: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange); }
.guide-body .guide-q { color: var(--orange); }
/* The inheritance guide's numbered plan */
.guide-body ol.guide-plan { list-style: none; margin: 0 0 24px; padding: 0; }
.guide-plan > li { margin: 0; padding: 2px 0 0 44px; border-top: 1px solid var(--gd-line); }
.guide-plan > li > h3 { position: relative; margin-top: 22px; }
.guide-plan-n { position: absolute; left: -44px; top: -4px; font-family: var(--serif); font-size: 28px; font-weight: 400; line-height: 1.2; color: var(--orange); }
/* Cards without a live dot: their kicker wraps as text (a long tool name would split into columns as a flex row) */
.guide-tool--calculator .guide-tool-k, .guide-tool--interactive .guide-tool-k, .guide-tool--waitlist .guide-tool-k { display: block; }
/* Number columns in data tables (Concerns' drops) */
.guide-table .guide-num { text-align: right; font-family: var(--mono); font-weight: 700; color: var(--orange); white-space: nowrap; }
.guide-table thead .guide-num { font-weight: 400; color: var(--gd-muted); }
@media (max-width: 640px) {
    .guide-body .guide-stat { flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px 18px; }
    .guide-body .guide-stat-n { font-size: 44px; }
    .guide-body ol.guide-steps { grid-template-columns: minmax(0, 1fr); }
    .guide-plan > li { padding-left: 36px; }
    .guide-plan-n { left: -36px; font-size: 24px; }
}

/* ── One column below 1100px: the rail becomes a collapsed list above the body ── */
@media (max-width: 1099px) {
    .guide-grid { grid-template-columns: minmax(0, 1fr); max-width: 720px; padding-top: 22px; }
    .guide-rail, .guide-main { grid-column: 1; grid-row: auto; }
    .guide-rail { position: static; max-height: none; overflow: visible; margin: 0 0 28px; padding: 0; }
    .guide-rail > .guide-tool { display: none; }
    .guide-toc { background: #0f0e0d; border: 1px solid var(--gd-line); border-radius: 12px; }
    .guide-toc summary { min-height: 48px; margin: 0; padding: 0 16px; cursor: pointer; }
    .guide-toc-count, .guide-toc-mark { display: inline; }
    .guide-toc-now { display: none; }
    .guide-toc-mark { color: var(--orange); font-size: 18px; line-height: 1; }
    .guide-toc-mark::before { content: "+"; }
    .guide-toc[open] .guide-toc-mark::before { content: "\2212"; }
    .guide-toc ol { padding: 0 16px 6px; }
}

/* ── Phones ── */
@media (max-width: 640px) {
    .guide { font-size: 17px; }
    .guide-article { padding: 20px 16px 0; }
    .guide-tags { gap: 6px; margin: 22px 0 12px; }
    .guide-tag { padding: 4px 9px; font-size: 10px; letter-spacing: 0.1em; }
    .guide-head h1 { font-size: clamp(36px, 12vw, 48px); line-height: 1.02; }
    .guide-deck { margin-top: 16px; font-size: 18px; }
    .guide-meta { margin-top: 14px; font-size: 11px; }
    .guide-body h2 { margin-top: 40px; font-size: 26px; }
    .guide-body h3 { font-size: 19px; }
    .guide-body p, .guide-body ul, .guide-body ol { font-size: 17px; }
    .guide-defs > li { grid-template-columns: minmax(0, 1fr); gap: 2px; font-size: 16px; }
    .guide-body .pull-quote p { font-size: 23px; }
    .guide-box-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .guide-box-grid dd { font-size: 16px; }
    .guide-table table { min-width: 560px; }
    .guide-body .channel-diagram { padding: 14px 10px; }
    .guide-end { padding-top: 36px; }
    .guide-end h2 { font-size: 24px; }
    .guide-band-in { padding: 26px 16px; gap: 10px; }
    .guide-band-h { flex-basis: 100%; font-size: 22px; line-height: 1.2; }
    .guide-form.bw-subscribe-form { flex-basis: 100%; }
    .guide-input, .guide-btn.bw-subscribe-btn { height: 50px; }
}
