/* ═══════════════════════════════════════════════════════
   21VOX GLOSSARY WORD PAGES: "Answer First"
   Loaded after styles.css by every glossary/<word>.html.
   Markup: scripts/build-glossary-pages.py (template) and each page's <div class="term-body">.
   ═══════════════════════════════════════════════════════ */

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

/* 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%; }
.term { --serif: 'DM Serif Display', 'DM Serif Fallback', Georgia, serif; }

/* The rail is sticky, which needs a body that clips instead of scrolling.
   The site header scrolls away with the page, 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; }
}

.term { color: var(--gw-text); font-family: var(--sans); font-size: 18px; line-height: 1.6; }
.term-article { max-width: 1280px; margin: 0 auto; padding: 36px 32px 0; }
.term-vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.term-sep { margin: 0 0.5em; }
.term a:focus-visible, .term button:focus-visible, .term input:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
.term 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 page's own */
.term-head { position: static; z-index: auto; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 0; transform: none; transition: none; }
.term nav a { font-family: inherit; font-size: inherit; font-weight: inherit; letter-spacing: normal; text-transform: none; white-space: normal; }

/* ── Head ── */
.term-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0 9px; font-size: 13px; color: var(--gw-dim); }
.term-crumb a { display: inline-flex; align-items: center; min-height: 32px; color: var(--gw-muted); text-decoration: none; }
.term-crumb a:hover { color: var(--orange); }
.term-top { margin-top: 34px; }
.term-top--tool { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 56px; align-items: end; }
.term-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.term-tag { padding: 5px 10px; background: var(--gw-tint); border: 1px solid var(--gw-tint-line); border-radius: 999px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange); }
.term-tag--start { background: transparent; border-color: var(--gw-outline); color: var(--gw-soft); }
.term-head h1 { font-family: var(--serif); font-weight: 400; font-size: 88px; line-height: 0.95; color: var(--gw-text); overflow-wrap: break-word; hyphens: auto; }
.term-sentence { margin-top: 26px; padding: 22px 24px; background: var(--gw-tint); border: 1px solid var(--gw-tint-line); border-radius: 16px; }
.term-sentence-k { margin-bottom: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange); }
.term-sentence-v { font-family: var(--serif); font-size: 28px; line-height: 1.3; color: var(--gw-text); }
.term-read { margin-top: 16px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gw-dim); }

/* ── Tool card: the whole card is the link ── */
.term-tool { display: flex; flex-direction: column; gap: 8px; padding: 22px; background: var(--gw-card); border: 1px solid var(--gw-line); border-top: 2px solid var(--orange); border-radius: 14px; color: var(--gw-text); text-decoration: none; }
.term-tool:hover { border-color: var(--gw-outline); border-top-color: var(--orange); }
.term-tool-k { display: inline-flex; align-items: center; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gw-muted); }
.term-tool--legacy .term-tool-k { color: var(--orange); }
.term-dot { width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--green); flex: none; }
.term-shield { width: 11px; height: 11px; margin-right: 8px; fill: var(--orange); flex: none; }
/* The live number keeps its height while it loads, and if it fails it is hidden in place */
.term-tool-num { display: block; min-height: 36px; font-family: var(--serif); font-size: 36px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--gw-text); }
.term-tool-num.is-off { visibility: hidden; }
.term-tool-u { font-family: var(--sans); font-size: 15px; color: var(--gw-muted); }
.term-tool-line { font-size: 14px; line-height: 1.5; color: var(--gw-muted); }
.term-tool-go { font-size: 15px; font-weight: 600; color: var(--orange); }
.term-tool:hover .term-tool-go { color: #ffb257; }

/* ── Body and rail ── */
.term-grid { display: grid; grid-template-columns: minmax(0, 720px) minmax(0, 280px); column-gap: 64px; padding: 12px 0 56px; }
.term-main { min-width: 0; }
.term-body h2 { margin: 40px 0 16px; font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.15; color: var(--gw-text); }
.term-body h3 { margin: 0 0 8px; font-family: var(--sans); font-size: 18px; font-weight: 700; line-height: 1.4; color: var(--gw-text); }
.term-body p { margin: 0 0 20px; font-size: 18px; line-height: 1.72; color: var(--gw-body); }
.term-body strong { font-weight: 600; color: var(--gw-text); }
.term-body a { color: var(--orange); text-decoration: underline; text-decoration-color: rgba(247, 147, 26, 0.45); text-underline-offset: 3px; }
.term-body a:hover { color: #ffb257; text-decoration-color: currentColor; }
.term-body a[href^="/glossary/"] { color: var(--gw-text); text-decoration-style: dotted; text-decoration-color: var(--orange); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.term-body a[href^="/glossary/"]:hover { color: var(--orange); }
/* Lists: the ruled style of the Halving history */
.term-body ul { list-style: none; margin: 6px 0 24px; padding: 0; border-bottom: 1px solid var(--gw-line); }
.term-body li { padding: 11px 0; border-top: 1px solid var(--gw-line); font-size: 16px; line-height: 1.6; color: var(--gw-soft); }
.term-body ol { margin: 6px 0 24px; padding-left: 1.4em; font-size: 18px; line-height: 1.72; color: var(--gw-body); }
/* The seed phrase FAQ: questions in ruled rows */
.term-body > div { margin: 6px 0 24px; border-bottom: 1px solid var(--gw-line); }
.term-body > div > div { padding: 16px 0; border-top: 1px solid var(--gw-line); }
.term-body > div > div > p { margin: 0; font-size: 17px; }

.term-rail {
    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: 26px; margin: 0 -4px; padding: 40px 4px 8px;
}
.term-rail-k { margin-bottom: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gw-muted); }
.term-toc ol { list-style: none; margin: 0; padding: 0; }
.term-toc a { display: block; padding: 9px 0; border-top: 1px solid var(--gw-line); font-size: 15px; line-height: 1.4; color: var(--gw-muted); text-decoration: none; }
.term-toc a:hover, .term-toc a[aria-current="true"] { color: var(--gw-text); }
.term-toc a[aria-current="true"] { box-shadow: inset 2px 0 0 var(--orange); padding-left: 10px; }
.term-deeper ul { list-style: none; margin: 0; padding: 0; }
.term-deeper a { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; padding: 6px 2px; border-top: 1px solid var(--gw-line); font-size: 16px; line-height: 1.35; color: var(--gw-text); text-decoration: none; }
.term-deeper a:hover { color: var(--orange); }
.term-deeper-kind { flex: none; font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gw-muted); }
.term-deeper--inline { display: none; }
.term-browse { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--gw-line); border-radius: 12px; color: var(--gw-text); text-decoration: none; }
.term-browse:hover { border-color: var(--gw-outline); }
.term-browse .term-rail-k { margin: 0; font-size: 10px; }
.term-browse-t { font-weight: 700; }
@media (pointer: coarse) {
    .term-toc a { display: flex; align-items: center; min-height: 44px; }
    .term-crumb a { min-height: 44px; }
}

/* ── Words that go with it ── */
.term-related { padding-top: 28px; }
.term-related h2 { margin-bottom: 16px; font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.2; color: var(--gw-text); }
.term-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.term-card { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px 18px; border: 1px solid var(--gw-line); border-radius: 12px; color: var(--gw-text); text-decoration: none; }
.term-card:hover { border-color: var(--gw-outline); }
.term-card-t { display: flex; justify-content: space-between; gap: 10px; font-family: var(--serif); font-size: 20px; line-height: 1.25; }
.term-card-arrow { font-family: var(--sans); color: var(--orange); }
.term-card-d { font-size: 14px; line-height: 1.5; color: var(--gw-muted); }

/* ── Previous and next in the topic ── */
.term-pn { margin-top: 36px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); align-items: stretch; gap: 12px; }
.term-pn-card { display: flex; flex-direction: column; gap: 4px; padding: 18px; border: 1px solid var(--gw-line); border-radius: 12px; color: var(--gw-text); text-decoration: none; }
.term-pn-card:hover { border-color: var(--gw-outline); }
.term-pn-card--next { text-align: right; }
.term-pn-k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gw-muted); }
.term-pn-t { font-family: var(--serif); font-size: 21px; line-height: 1.25; }

/* ── Signup band (Substack; subscribe-bar.js handles the submit) ── */
.term-band { background: var(--gw-tint); border-top: 1px solid var(--gw-tint-line); border-bottom: 1px solid var(--gw-tint-line); }
.term-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; }
.term-band-h { flex: 1 1 420px; font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.15; color: var(--gw-text); }
.term-band-h em { color: var(--orange); }
.term-form.bw-subscribe-form { flex: 1 1 420px; display: flex; gap: 10px; width: auto; }
.term-input { flex: 1 1 auto; min-width: 0; height: 52px; padding: 0 16px; background: var(--gw-input); color: var(--gw-text); border: 1px solid var(--gw-field); border-radius: 10px; font-family: var(--sans); font-size: 16px; }
.term-input::placeholder { color: #8f897f; opacity: 1; }
.term-input:focus { border-color: var(--orange); }
.term-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; }
.term-btn.bw-subscribe-btn:hover { background: #ffa53d; transform: none; box-shadow: none; }

/* ── One column below 1100px; Go deeper moves under the related words ── */
@media (max-width: 1099px) {
    .term-grid { grid-template-columns: minmax(0, 1fr); max-width: 720px; }
    .term-rail { display: none; }
    .term-deeper--inline { display: block; margin-top: 22px; }
}
@media (max-width: 900px) {
    .term-top--tool { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

/* ── Phones ── */
@media (max-width: 640px) {
    .term { font-size: 17px; }
    .term-article { padding: 20px 16px 0; }
    .term-wide { display: none; }
    .term-top { margin-top: 22px; }
    .term-tags { gap: 6px; margin-bottom: 12px; }
    .term-tag { padding: 4px 9px; font-size: 10px; letter-spacing: 0.1em; }
    .term-head h1 { font-size: clamp(40px, 14vw, 58px); }
    .term-sentence { margin-top: 18px; padding: 18px; border-radius: 14px; }
    .term-sentence-k { margin-bottom: 6px; font-size: 10px; }
    .term-sentence-v { font-size: 22px; }
    .term-read { margin-top: 12px; font-size: 11px; }
    .term-tool { padding: 18px; }
    .term-tool-num { min-height: 30px; font-size: 30px; }
    .term-grid { padding-bottom: 30px; }
    .term-body h2 { font-size: 26px; }
    .term-body p, .term-body ol { font-size: 17px; }
    .term-body li { font-size: 15px; }
    .term-related h2 { margin-bottom: 12px; font-size: 24px; }
    .term-pn { margin-top: 24px; }
    .term-band-in { padding: 26px 16px; gap: 10px; }
    .term-band-h { flex-basis: 100%; font-size: 22px; line-height: 1.2; }
    .term-form.bw-subscribe-form { flex-basis: 100%; }
    .term-input, .term-btn.bw-subscribe-btn { height: 50px; }
}
