/* =====================================================================
   fiatisfake.org design-system layer (IA + consistency overhaul, 2026-09)
   Loaded after styles.css on every page. It owns the shared page chrome
   (header, nav, breadcrumbs, footer), the page-template components and
   the tokens they use. Rules here win over older one-off styles.
   Reference: docs/style-guide.md. No new hex colors: every color below
   is an existing token from styles.css, so light mode flips with it.
   ===================================================================== */

:root {
  --sys-measure: 72ch;             /* longest comfortable prose line */
  --sys-narrow: 760px;             /* reading column for prose-first pages */
  --sys-radius: 10px;
  --sys-radius-sm: 6px;
  --sys-label: var(--font-mono);
  --sys-gap: 16px;
  --sys-section: 56px;             /* vertical rhythm between page-end blocks */
  --sys-tap: 44px;                 /* minimum target size */
}
/* Color aliases live on body, not :root: a var() resolves where the property is declared, and the
   light theme redefines --bg-*, --border* and --orange-fg on body.light-mode, so :root would pin them dark. */
body {
  --sys-line: var(--border);
  --sys-line-strong: var(--border-hi);
  --sys-surface: var(--bg-2);
  --sys-surface-2: var(--bg-3);
  --sys-accent: var(--orange);
  --sys-accent-fg: var(--orange-fg);
}

/* ---------- Base accessibility ---------------------------------------- */
:where(a, button, summary, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--orange-fg);
  outline-offset: 2px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--orange-fg);
  outline-offset: 1px;
}
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
}
/* Long words, URLs and code never force page-level horizontal scroll */
/* break-word, not anywhere: anywhere lowers min-content width, so auto tables split words and numbers mid-token */
main :where(p, li, dd, td, th, figcaption, .source-list) { overflow-wrap: break-word; }
main :where(p, li) a { overflow-wrap: break-word; }

/* styles.css styles every bare <nav> as the fixed top bar. The system uses
   <nav> for breadcrumbs, the footer, the drawer and "on this page", so
   release those from the top-bar rule. */
nav.page-breadcrumb, footer nav, .mobile-nav-overlay nav, main nav:not(#nav) {
  position: static;
  top: auto; left: auto; right: auto;
  z-index: auto;
  border-bottom: 0;
  background: transparent;
  transition: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Shared eyebrow label (mono, uppercase) used by several components */
.sys-label {
  font-family: var(--sys-label);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ======================================================================
   HEADER + PRIMARY NAV
   Six destinations + Search. Desktop dropdowns open on hover or keyboard
   focus (main.js), close on Escape; every top item is also a real link to
   its hub, so touch users never depend on hover.
   ====================================================================== */
nav#nav .nav-inner { gap: 10px; }
nav#nav .nav-links {
  display: none;
  align-items: center;
  gap: 2px;
  margin: 0 auto 0 12px;
  padding: 0;
  list-style: none;
}
nav#nav .nav-links > .nav-item > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  padding: 8px 11px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  color: var(--text-2);
  border-radius: var(--sys-radius-sm);
  text-decoration: none;
}
nav#nav .nav-links > .nav-item > a:hover,
nav#nav .nav-links > .nav-item.nav-open > a { color: var(--text); background: var(--bg-3); }
nav#nav .nav-links > .nav-item > a[aria-current="true"],
nav#nav .nav-links > .nav-item > a.active { color: var(--orange-fg) !important; }
nav#nav .nav-chevron { font-size: 10px; opacity: 0.7; }
.nav-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
nav#nav .nav-links + .nav-tools { margin-left: 0; }

.nav-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--sys-tap);
  padding: 0 12px;
  background: var(--bg-2);
  border: 1px solid var(--border-hi);
  border-radius: var(--sys-radius-sm);
  color: var(--text-2);
  font-family: var(--font-display);
  font-size: 14px;
  cursor: pointer;
}
.nav-search-btn:hover { color: var(--text); border-color: var(--orange-fg); }
.nav-search-btn svg { flex: none; }
.nav-search-btn kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 6px;
  border: 1px solid var(--border-hi);
  border-radius: 4px;
  color: var(--text-3);
}
nav#nav .nav-theme-btn {
  min-height: var(--sys-tap);
  min-width: var(--sys-tap);
  padding: 0 10px;
}
nav#nav .btc-ticker { display: none; }
/* Search stays visible at every width (styles.css hid it under 480px) */
nav#nav #searchToggle { display: inline-flex !important; }
nav#nav .nav-menu-btn { display: inline-flex; }

@media (min-width: 1120px) {
  nav#nav .nav-links { display: flex; }
  nav#nav .nav-menu-btn { display: none; }
}
@media (min-width: 1480px) {
  nav#nav .btc-ticker { display: inline-flex; }
}
@media (max-width: 1119px) {
  .nav-search-btn .nav-search-label { display: inline; }
}
@media (max-width: 520px) {
  .nav-search-btn { padding: 0 10px; }
  .nav-search-btn .nav-search-label, .nav-search-btn kbd { display: none; }
  nav#nav .nav-theme-btn { display: none !important; } /* theme lives in the drawer on phones */
  .nav-search-btn { min-width: var(--sys-tap); justify-content: center; }
}
@media (max-width: 1280px) and (min-width: 1120px) {
  nav#nav .nav-links > .nav-item > a { padding: 8px 8px; font-size: 13.5px; }
  .nav-search-btn kbd { display: none; }
}

/* Curated dropdown panel: three columns + a footer row, centred on the nav (legacy .mega-menu positioning) */
nav#nav .nav-dropdown.mega-menu {
  width: min(840px, calc(100vw - 32px));
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: row;
  gap: 6px 28px;
  padding: 22px 24px 16px;
}
nav#nav .mega-menu-col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
nav#nav .mega-menu-col-header {
  font-family: var(--sys-label);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
  padding: 0 8px 6px;
  margin: 0 0 6px;
}
nav#nav .nav-dropdown.mega-menu .mega-menu-col a {
  padding: 7px 8px !important;
  font-size: 14px !important;
  font-weight: 500;
  line-height: 1.35 !important;
  color: var(--text) !important;
}
nav#nav .nav-dropdown.mega-menu .mega-menu-col a:hover,
nav#nav .nav-dropdown.mega-menu .mega-menu-col a:focus-visible { background: var(--bg-3) !important; color: var(--orange-fg) !important; }
nav#nav .nav-dropdown.mega-menu a .link-desc { font-size: 12.5px !important; color: var(--text-3); margin-top: 2px; }
nav#nav .nav-dropdown.mega-menu .mega-menu-foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  padding-top: 10px;
  margin-top: 6px;
  border-top: 1px solid var(--border);
}
nav#nav .nav-dropdown.mega-menu .mega-menu-foot a {
  display: inline-flex !important;
  flex-direction: row !important;
  padding: 6px 8px !important;
  font-family: var(--sys-label);
  font-size: 12px !important;
  letter-spacing: 0.04em;
  color: var(--orange-fg) !important;
}

/* Mobile drawer */
.mobile-nav-overlay .drawer-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  margin-bottom: 10px;
  background: var(--bg-3);
  border: 1px solid var(--border-hi);
  border-radius: var(--sys-radius-sm);
  color: var(--text-2);
  font-size: 15px;
  cursor: pointer;
  text-align: left;
}
.mobile-nav-overlay .mobile-nav-urgent {
  display: block;
  margin-top: 8px;
  padding: 10px 14px;
  border: 1px solid var(--border-hi);
  border-left: 3px solid var(--red);
  border-radius: var(--sys-radius-sm);
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
}
.mobile-nav-group { border-top: 1px solid var(--border); }
.mobile-nav-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 0 4px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.mobile-nav-group > summary::-webkit-details-marker { display: none; }
.mobile-nav-group > summary::after { content: '+'; font-family: var(--sys-label); color: var(--text-3); }
.mobile-nav-group[open] > summary::after { content: '\2212'; }
.mobile-nav-group .mobile-nav-sublabel { display: block; margin: 8px 4px 2px; }
.mobile-nav-group a {
  display: block;
  padding: 9px 4px;
  color: var(--text-2);
  font-size: 15px;
  text-decoration: none;
}
.mobile-nav-group a:hover { color: var(--orange-fg); }
.mobile-nav-group a.mobile-nav-hub { color: var(--orange-fg); font-weight: 600; }
.mobile-nav-group > div { padding: 0 0 12px; }

/* Search overlay polish (markup unchanged; main.js drives it) */
#searchOverlay .search-overlay-input::placeholder { color: var(--text-3); }
#searchOverlay .search-overlay-hint {
  margin: 10px 2px 0;
  font-family: var(--sys-label);
  font-size: 11px;
  color: var(--text-3);
}

/* ======================================================================
   BREADCRUMBS
   <nav class="page-breadcrumb" aria-label="Breadcrumb"><ol>…</ol></nav>
   ====================================================================== */
nav.page-breadcrumb { margin: 0 0 var(--space-md); }
nav.page-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-3);
}
nav.page-breadcrumb li { display: inline-flex; align-items: center; }
nav.page-breadcrumb li + li::before { content: '\203A'; margin: 0 9px; color: var(--text-3); }
/* !important: legacy content-link rules (orange + underline) are more specific */
nav.page-breadcrumb a { color: var(--text-3) !important; text-decoration: none !important; }
nav.page-breadcrumb a:hover { color: var(--orange-fg) !important; text-decoration: underline !important; }
/* styles.css forces every "nav a" to a 44px inline-flex box on small screens; that is right
   for the top bar, wrong for inline breadcrumb and footer links */
nav.page-breadcrumb a, footer nav a { min-height: 0; min-width: 0; padding: 0; display: inline; }
footer nav.footer-links-grid a { display: block; padding: 6px 0; }
nav.page-breadcrumb [aria-current="page"] { color: var(--text-2); }

/* ======================================================================
   PAGE HEADER: eyebrow, H1, metadata band, scope note
   ====================================================================== */
.section-header .page-eyebrow { margin-bottom: 18px; }
.page-eyebrow .role-chip {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border: 1px solid var(--orange-border, var(--border-hi));
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--orange-fg);
}
.review-band .review-band-row { row-gap: 6px; }
.review-band .review-band-item a { color: inherit; text-decoration: underline; text-decoration-color: var(--border-hi); text-underline-offset: 3px; }
.review-band .review-band-item a:hover { color: var(--orange-fg); }
.scope-note {
  margin: 0 0 var(--space-md);
  padding: 12px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--sys-radius-sm);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
}
.scope-note p { margin: 0; font-size: 14px; color: var(--text-2); max-width: none; }
.scope-note p + p { margin-top: 6px; }
.perspective-note {
  margin: 0 0 var(--space-md);
  padding: 12px 16px;
  border: 1px dashed var(--border-hi);
  border-radius: var(--sys-radius-sm);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
}
.perspective-note strong { color: var(--text); }
.perspective-note a { color: var(--orange-fg); }

/* ======================================================================
   SHORT ANSWER + DO NOW
   ====================================================================== */
.short-answer {
  margin: 0 0 var(--space-md);
  padding: 22px 24px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--orange);
  border-radius: 0 var(--sys-radius) var(--sys-radius) 0;
}
.short-answer .short-answer-label {
  font-family: var(--sys-label);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange-fg);
  margin-bottom: 8px;
}
.short-answer p { margin: 0; max-width: var(--sys-measure); color: var(--text); font-size: 16.5px; line-height: 1.7; }
.short-answer p + p, .short-answer ul, .short-answer ol { margin-top: 10px; }
.short-answer ul, .short-answer ol { padding-left: 20px; color: var(--text); max-width: var(--sys-measure); }

.do-now {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 0 0 var(--space-lg);
  padding: 14px 18px;
  background: var(--bg-3);
  border: 1px solid var(--border-hi);
  border-radius: var(--sys-radius);
}
.do-now .do-now-label { flex: none; }
.do-now .do-now-text { flex: 1 1 280px; min-width: 0; color: var(--text); font-size: 15px; line-height: 1.5; }
.do-now .do-now-text span { color: var(--text-2); }
.do-now a.do-now-link {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: var(--sys-tap);
  padding: 0 16px;
  background: var(--orange);
  color: #000;
  border-radius: var(--sys-radius-sm);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}
.do-now a.do-now-link:hover { filter: brightness(1.08); }

/* ======================================================================
   ON THIS PAGE
   ====================================================================== */
.toc {
  margin: 0 0 var(--space-lg);
  border: 1px solid var(--border);
  border-radius: var(--sys-radius);
  background: var(--bg-2);
}
.toc > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 18px;
  cursor: pointer;
  list-style: none;
  font-family: var(--sys-label);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
}
.toc > summary::-webkit-details-marker { display: none; }
.toc > summary::after { content: '+'; color: var(--text-3); }
.toc[open] > summary::after { content: '\2212'; }
.toc ol {
  columns: 2 280px;
  column-gap: 32px;
  margin: 0;
  padding: 0 18px 16px 38px;
}
.toc li { break-inside: avoid; padding: 3px 0; font-size: 14.5px; line-height: 1.45; color: var(--text-3); }
.toc a { color: var(--text-2) !important; text-decoration: none !important; }
.toc a:hover { color: var(--orange-fg) !important; text-decoration: underline !important; }

/* ======================================================================
   PAGE END: next steps, sources, page stamp
   Order on every guide: content → next steps → sources → stamp → share.
   ====================================================================== */
.page-end { margin: var(--sys-section) 0 0; }
main .page-end > h2, main section.sources > h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 18px;
  color: var(--text);
}
.next-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sys-gap);
}
@media (max-width: 860px) { .next-steps { grid-template-columns: 1fr; } }
.next-step {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--sys-radius);
  min-width: 0;
}
.next-step--do { border-left: 4px solid var(--orange); }
.next-step .sys-label { color: var(--orange-fg); }
.next-step .next-step-title { font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 1.35; margin: 0; }
.next-step .next-step-title a { color: var(--text); text-decoration: none; }
.next-step .next-step-title a:hover { color: var(--orange-fg); text-decoration: underline; }
.next-step p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-2); }
.next-step ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.next-step li { font-size: 14px; line-height: 1.45; }
.next-step li a { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-hi); text-underline-offset: 3px; }
.next-step li a:hover { color: var(--orange-fg); }
.next-step li > span { display: block; color: var(--text-3); font-size: 13px; } /* child only: glossary terms inside the description stay inline */

.sources {
  margin: var(--sys-section) 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.sources .sources-intro { margin: -6px 0 16px; max-width: var(--sys-measure); font-size: 14px; line-height: 1.6; color: var(--text-3); }
main section.sources h3 {
  font-family: var(--sys-label);
  line-height: 1.4;
  font-size: 11px !important; /* styles.css forces section h3 to 18-22px on phones */
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 22px 0 10px;
}
.source-list { margin: 0; padding-left: 28px; color: var(--text-2); font-size: 14px; line-height: 1.6; }
.source-list > li { padding: 4px 0 4px 2px; max-width: 110ch; }
.source-list > li::marker { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.source-list a { color: var(--orange-fg); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.source-list .src-pub { color: var(--text); }
.source-list .src-date { color: var(--text-3); }
.source-list .src-note { display: block; color: var(--text-3); font-size: 13px; }
.source-list .src-back {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-decoration: none;
  color: var(--text-3);
}
.source-list .src-back:hover { color: var(--orange-fg); }
.source-list--further { list-style: disc; }
.source-list > li:target { background: var(--orange-bg, var(--bg-3)); outline: 1px solid var(--orange-border, var(--border-hi)); border-radius: 4px; }
.source-list .legacy-anchor { scroll-margin-top: 90px; }
.cite-ref { font-size: 0.75em; line-height: 0; vertical-align: super; }
.cite-ref a { color: var(--orange-fg); text-decoration: none; font-family: var(--font-mono); padding: 0 1px; }
.cite-ref a:hover { text-decoration: underline; }
.verify-panel .verify-ref { display: inline-block; margin-top: 4px; font-family: var(--font-mono); font-size: 11px; color: var(--orange-fg); }

.page-stamp {
  margin: 28px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--text-3);
  text-align: left;
}
.page-stamp a { color: var(--text-3); text-decoration: underline; text-underline-offset: 3px; }
.page-stamp a:hover { color: var(--orange-fg); }

/* ======================================================================
   TOPIC HUB TEMPLATE
   ====================================================================== */
.hub-block { margin: 0 0 var(--space-xl); }
section.hub-block { padding: 0; } /* a nested section must not take the global section padding (styles.css `section`) */
.hub-block > h2 { font-family: var(--font-display); font-size: 26px; font-weight: 800; margin: 0 0 6px; }
.hub-block > .hub-lede { margin: 0 0 20px; color: var(--text-2); max-width: var(--sys-measure); font-size: 16px; }
.hub-start {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sys-gap);
}
.hub-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--sys-radius);
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}
a.hub-card:hover { border-color: var(--orange-fg); }
.hub-card .hub-card-title { font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 1.35; }
.hub-card .hub-card-desc { font-size: 14px; line-height: 1.55; color: var(--text-2); }
.hub-card .sys-label { color: var(--orange-fg); }
.hub-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 28px 32px;
}
.hub-group h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 90px;
}
.hub-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.hub-group li { font-size: 14.5px; line-height: 1.4; }
.hub-group li a { color: var(--text); text-decoration: none; }
.hub-group li a:hover { color: var(--orange-fg); text-decoration: underline; }
.hub-group li .hub-role { margin-left: 6px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; color: var(--text-3); text-transform: uppercase; }
.hub-group li .hub-desc { display: block; margin-top: 1px; font-size: 13px; color: var(--text-3); }
.hub-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 var(--space-lg); padding: 0; list-style: none; }
.hub-jump a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px;
  border: 1px solid var(--border-hi); border-radius: 999px;
  color: var(--text-2); font-size: 13.5px; text-decoration: none;
}
.hub-jump a:hover { color: var(--orange-fg); border-color: var(--orange-fg); }
.hub-divider { margin: var(--space-xl) 0 var(--space-lg); border: 0; border-top: 1px solid var(--border); }
.hub-divider-label { margin: 0 0 var(--space-md); }

/* ======================================================================
   ONBOARDING (Start Here) + URGENT HELP
   ====================================================================== */
.path-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sys-gap);
  margin: 0 0 var(--space-md);
}
@media (max-width: 900px) { .path-choices { grid-template-columns: 1fr; } }
.path-choice {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  background: var(--bg-2);
  border: 1px solid var(--border-hi);
  border-radius: var(--sys-radius);
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}
.path-choice:hover { border-color: var(--orange-fg); }
.path-choice .path-choice-num { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--orange-fg); }
.path-choice .path-choice-title { font-family: var(--font-display); font-weight: 800; font-size: 20px; line-height: 1.25; }
.path-choice .path-choice-desc { font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
.path-choice .path-choice-cta { margin-top: auto; padding-top: 6px; font-family: var(--font-mono); font-size: 12px; color: var(--orange-fg); }
.path-choice--primary { border-color: var(--orange); }
.urgent-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 0 0 var(--space-lg);
  padding: 14px 18px;
  background: var(--bg-2);
  border: 1px solid var(--border-hi);
  border-left: 4px solid var(--red);
  border-radius: var(--sys-radius);
}
.urgent-banner p { margin: 0; flex: 1 1 260px; color: var(--text); font-size: 15px; line-height: 1.5; max-width: none; }
.urgent-banner a.urgent-link {
  flex: none;
  display: inline-flex; align-items: center; min-height: var(--sys-tap); padding: 0 16px;
  border: 1px solid var(--text-2); border-radius: var(--sys-radius-sm);
  color: var(--text); font-weight: 700; font-size: 14px; text-decoration: none;
}
.urgent-banner a.urgent-link:hover { border-color: var(--orange-fg); color: var(--orange-fg); }
.situation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}
.situation-grid a {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 16px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--sys-radius);
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; line-height: 1.35;
}
.situation-grid a span { font-weight: 400; font-size: 13.5px; color: var(--text-2); }
.situation-grid a:hover { border-color: var(--orange-fg); }

/* ======================================================================
   TOOLS HUB: finder, filters, cards
   ====================================================================== */
.tool-finder {
  position: static; /* sticky only where it leaves room to read (see the min-width rule below) */
  top: 0;
  z-index: 5;
  margin: 0 0 var(--space-md);
  padding: 14px 0 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.tool-finder-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tool-finder label.sys-label { display: block; margin-bottom: 6px; }
.tool-search {
  flex: 1 1 320px;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  background: var(--bg-2);
  border: 1px solid var(--border-hi);
  border-radius: var(--sys-radius-sm);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
}
.tool-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; border: 0; }
.tool-filters legend { float: left; margin: 0 8px 0 0; padding: 0; line-height: 36px; }
.tool-filter {
  min-height: 36px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid var(--border-hi);
  border-radius: 999px;
  color: var(--text-2);
  font-size: 13.5px;
  cursor: pointer;
}
.tool-filter:hover { color: var(--text); border-color: var(--text-3); }
.tool-filter[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); color: #000; font-weight: 700; }
.tool-count { margin: 10px 0 0; font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.tool-reset {
  min-height: 36px; padding: 0 12px; background: transparent; border: 1px solid var(--border-hi);
  border-radius: var(--sys-radius-sm); color: var(--text-2); font-size: 13px; cursor: pointer;
}
.tool-reset:hover { color: var(--orange-fg); border-color: var(--orange-fg); }
.tool-empty {
  padding: 28px;
  border: 1px dashed var(--border-hi);
  border-radius: var(--sys-radius);
  color: var(--text-2);
  text-align: center;
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}
.tool-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--sys-radius);
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}
.tool-card:hover, .tool-card:focus-visible { border-color: var(--orange-fg); }
.tool-card .tool-card-q { font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 1.35; color: var(--text); }
.tool-card .tool-card-name { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.04em; color: var(--orange-fg); }
.tool-card .tool-card-desc { font-size: 14px; line-height: 1.55; color: var(--text-2); }
.tool-card .tool-card-meta { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.tool-card .tool-tag {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 7px; border: 1px solid var(--border-hi); border-radius: 999px; color: var(--text-3);
}
.tool-section { margin: 0 0 var(--space-xl); scroll-margin-top: 170px; }
.tool-section > h2 { font-family: var(--font-display); font-size: 22px; font-weight: 800; margin: 0 0 4px; }
.tool-section > p { margin: 0 0 16px; color: var(--text-2); font-size: 15px; }
.tool-section[hidden] { display: none; }
.tool-card[hidden] { display: none; }
.tool-compare {
  margin: 0 0 var(--space-xl);
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--sys-radius);
  background: var(--bg-2);
}
.tool-compare h2 { font-size: 20px; margin: 0 0 10px; }
.tool-compare dl { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.tool-compare dt { font-weight: 700; color: var(--text); font-size: 15px; }
.tool-compare dd { margin: 2px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.55; }
.tool-compare dd a { color: var(--orange-fg); }

/* ======================================================================
   TOOL PAGE ADDITIONS: the question, scope line, projection labelling
   ====================================================================== */
.tool-question {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.45;
  color: var(--text);
  max-width: var(--sys-measure);
}
.tool-question .sys-label { display: block; margin-bottom: 4px; color: var(--orange-fg); }
.tool-scope {
  margin: 0 0 var(--space-md);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-3);
  max-width: var(--sys-measure);
}
.tool-scope strong { color: var(--text-2); font-weight: 600; }
.projection-note {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-left: 3px solid var(--border-hi);
  background: var(--bg-2);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-2);
}
.projection-note strong { color: var(--text); }
.tool-differs {
  margin: 0 0 var(--space-md);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
  max-width: var(--sys-measure);
}
.tool-differs a { color: var(--orange-fg); }
.data-status {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-3);
}
.data-status[data-state="stale"], .data-status[data-state="unavailable"] { color: var(--text-2); }

/* ======================================================================
   HOMEPAGE
   ====================================================================== */
.home-routes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sys-gap);
  margin: 28px 0 16px;
}
@media (max-width: 900px) { .home-routes { grid-template-columns: 1fr; } }
.home-route {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  background: var(--bg-2);
  border: 1px solid var(--border-hi);
  border-radius: var(--sys-radius);
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}
.home-route:hover { border-color: var(--orange-fg); }
.home-route .home-route-title { font-family: var(--font-display); font-weight: 800; font-size: 21px; line-height: 1.25; }
.home-route .home-route-desc { font-size: 15px; line-height: 1.55; color: var(--text-2); }
.home-route ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--text-2); }
.home-route .home-route-cta { margin-top: auto; padding-top: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--orange-fg); }
.home-trust-line { margin: 18px 0 0; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; color: var(--text-3); }

/* ======================================================================
   FOOTER
   ====================================================================== */
footer .footer-links-grid.footer-links-grid-4col {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 32px;
}
@media (max-width: 900px) { footer .footer-links-grid.footer-links-grid-4col { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { footer .footer-links-grid.footer-links-grid-4col { grid-template-columns: 1fr; } }
footer .footer-col a { display: block; padding: 5px 0; }

/* ======================================================================
   PRINT: keep sources, drop interactive chrome
   ====================================================================== */
@media print {
  .toc, .do-now, .page-end, .nav-tools, .tool-finder { display: none !important; }
  .sources { break-before: auto; }
  .source-list a[href^="http"]::after { content: " (" attr(href) ")"; }
}

/* Card grids built on <nav> (home routes, start-here choices, situation grid, drawer groups):
   styles.css turns every "nav a" into a centred 44px flex box on small screens. Undo that here. */
nav.home-routes a.home-route, nav.path-choices a.path-choice, nav.situation-grid a {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  text-align: left;
  min-height: 0;
  min-width: 0;
}
nav.home-routes a.home-route, nav.path-choices a.path-choice { padding: 22px !important; }
nav.situation-grid a { padding: 14px 16px !important; }
.mobile-nav-overlay nav .mobile-nav-group a { display: block !important; justify-content: flex-start; text-align: left; min-height: 40px; padding: 9px 4px !important; }

/* Tool tables wider than a phone scroll inside their panel instead of being clipped */
.tool-chart:has(> table) { overflow-x: auto; }

/* Site index (/sitemap/): column heads and entries are navigation, not headings or prose links */
.sm-col .sm-head { font-family: var(--font-mono) !important; font-size: 12px !important; line-height: 1.4 !important; letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 12px !important; font-weight: 600 !important; }
.sm-col .sm-head a { color: var(--orange-fg) !important; text-decoration: none !important; }
.sm-col .sm-sub { font-size: 11px !important; line-height: 1.4 !important; margin: 16px 0 8px !important; }
.sm-col ul a { color: var(--text-2) !important; text-decoration: none !important; background: none !important; }
.sm-col ul a:hover, .sm-col ul a:focus-visible { color: var(--orange-fg) !important; text-decoration: underline !important; }

/* Disclaimer on a linked resource that earns from affiliate links (docs/evergreen-policy.md) */
.resource-disclaimer { margin: 10px 0 0 !important; padding: 10px 12px; border: 1px solid var(--sys-line-strong); border-radius: var(--sys-radius-sm); background: var(--sys-surface-2); font-size: 13px !important; line-height: 1.6 !important; color: var(--text-2) !important; }
.resource-disclaimer strong { color: var(--text); }

/* Light theme: accent colors used as small text (category pills, marks) were the dark-theme brights (#3b82f6,
   #10b981, #ef4444, #f59e0b, #a78bfa: 1.7 to 3.1:1 on light surfaces). Darker values from the site's existing
   palette, all >= 4.5:1 on the tinted pill backgrounds. --color-info is re-pointed here because on :root it
   resolved to the dark --accent-pf. */
body.light-mode {
  --accent-pf: #1864ab;
  --accent-tax: var(--green);
  --accent-urgent: var(--red);
  --color-warning: #845700;
  --color-info: var(--accent-pf);
}
body.light-mode .mark-warn { color: var(--color-warning); }
body.light-mode [style*="color:#a78bfa"], body.light-mode [style*="color: #a78bfa"] { color: #a8327f !important; }
body.light-mode [style*="color:#f59e0b"], body.light-mode [style*="color: #f59e0b"] { color: var(--orange-fg) !important; }
body.light-mode .mark-no { color: var(--red); }
body.light-mode .mark-yes { color: var(--green); background: var(--bg); border-radius: 3px; padding: 0 3px; }
body.light-mode [style*="color:var(--accent-tax)"] { background: transparent !important; }
/* --orange is the fill color; as light-theme text it is 1.9:1. Only inline text color, never background-color. */
body.light-mode [style^="color:var(--orange)"], body.light-mode [style*=";color:var(--orange)"], body.light-mode [style*="; color:var(--orange)"],
body.light-mode [style^="color: var(--orange)"], body.light-mode [style*="; color: var(--orange)"] { color: var(--orange-fg) !important; }

/* ---- Precedence fixes (release review 2026-09-27). Legacy styles.css rules outrank the components above:
   'section > .container > p' (0,1,2) forces 17px/1.75 on stamp and tool lines, the content-link rule (0,5,3) paints
   component links orange, and 'section h2' (with !important on phones) resizes component headings. */
.page-stamp { font-size: 11.5px !important; line-height: 1.7 !important; text-align: left !important; }
.tool-question { font-size: 18px !important; line-height: 1.45 !important; }
.tool-scope { font-size: 13.5px !important; line-height: 1.6 !important; }
.projection-note { font-size: 13.5px !important; line-height: 1.55 !important; }
.tool-differs { font-size: 14px !important; line-height: 1.6 !important; }
.home-trust-line { font-size: 11.5px !important; }
.page-stamp a { color: var(--text-3) !important; text-decoration: underline !important; text-underline-offset: 3px; }
.page-stamp a:hover { color: var(--orange-fg) !important; }
.next-step .next-step-title a, .hub-group li a { color: var(--text) !important; text-decoration: none !important; }
.next-step .next-step-title a:hover, .hub-group li a:hover { color: var(--orange-fg) !important; text-decoration: underline !important; }
.next-step li a { color: var(--text) !important; text-decoration: underline !important; text-decoration-color: var(--border-hi) !important; }
.next-step li a:hover { color: var(--orange-fg) !important; }
.source-list .src-back, .cite-ref a { text-decoration: none !important; }
.cite-ref a:hover { text-decoration: underline !important; }
.hub-block > h2 { font-size: 26px !important; }
section.tool-section > h2 { font-size: 22px !important; font-weight: 800 !important; }
@media (max-width: 768px) {
  .hub-block > h2 { font-size: 22px !important; }
  section.tool-section > h2 { font-size: 20px !important; }
}
/* the tool finder pins only on wide screens (on a phone it covered half the screen), under a non-sticky header */
@media (min-width: 769px) {
  .tool-finder { position: sticky; top: 0; }
  section.tool-section { scroll-margin-top: 240px; } /* /tools/ category sections land below the pinned finder */
}
/* programmatic focus after an in-page jump (skip link, contents, citations) needs no ring on the target itself */
[data-jump-target]:focus { outline: none; }
/* the skip link parks well above the viewport until focused: at top:-48px (-40px in the inlined critical CSS
   before styles.css loads) part of the orange link showed at the top left of every page */
.skip-link:not(:focus) { top: -200px; }

