/* ==========================================================================
   Thai Recovery Guide: site.css (design system v2, see ../../../../DESIGN.md)
   Tokens + base + shared components. Page-specific styles go in
   /assets/css/pages/<page>.css (front matter: pageCss).
   Direction: independent-recommendation publishing (Wirecutter / Which?).
   Trust comes from structure, evidence and type, not decoration:
   white page, ink text, one brand blue, a highlighter for key numbers,
   red only for crisis and warnings. No shadows, no pills, no eyebrows.
   Mobile-first. Breakpoints: 640 / 960 / 1280.
   ========================================================================== */

/* ---------- Font (self-hosted, no CDN) ----------
   Google Sans Flex, variable weight axis only (latin + latin-ext). OFL-1.1. */
@font-face {
  font-family: "Google Sans Flex";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("/assets/fonts/google-sans-flex-latin-wght-normal.woff2") format("woff2-variations"),
       url("/assets/fonts/google-sans-flex-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Google Sans Flex";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("/assets/fonts/google-sans-flex-latin-ext-wght-normal.woff2") format("woff2-variations"),
       url("/assets/fonts/google-sans-flex-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Design tokens ----------
   Token names are kept from v1 so page CSS keeps working; legacy warm/sand/chip/taupe
   names are re-pointed to the neutrals below. */
:root {
  /* Brand */
  --color-primary: oklch(0.44 0.16 263);        /* ink-blue: links, primary buttons, wordmark mark, active states */
  --color-primary-2: oklch(0.36 0.14 263);      /* hover / pressed */
  --color-primary-soft: oklch(0.95 0.03 263);   /* tip callout, selected rows */
  --color-highlight: oklch(0.93 0.14 100);      /* <mark> behind key numbers / verdicts (max 1–2 per screen) */
  --color-highlight-soft: oklch(0.975 0.05 100);/* "The short answer" box */
  --color-highlight-border: oklch(0.88 0.08 100);
  --color-accent: oklch(0.52 0.19 27);          /* crisis and warnings only, never decoration */
  --color-accent-ink: oklch(0.52 0.19 27);
  --color-accent-soft: oklch(0.97 0.02 27);     /* crisis / important backgrounds */
  --color-accent-border: oklch(0.52 0.19 27);

  /* Neutrals / surfaces (tinted 0.006–0.01 toward the brand hue, never warm) */
  --color-bg: oklch(1 0 0);
  --color-bg-alt: oklch(0.972 0.006 262);       /* one alternate band per page, footer, TOC panel */
  --color-surface: oklch(0.955 0.01 262);       /* table header, subtle fills */
  --color-white: oklch(1 0 0);
  --color-sand: var(--color-bg-alt);            /* legacy name */
  --color-sand-2: var(--color-surface);         /* legacy name */
  --color-chip: var(--color-surface);           /* legacy name */

  /* Text */
  --color-text: oklch(0.21 0.025 262);          /* headings and body ink */
  --color-text-soft: oklch(0.32 0.02 262);      /* long prose, ledes */
  --color-text-muted: oklch(0.46 0.015 262);    /* metadata, captions (7:1 on white) */
  --color-text-subtle: var(--color-text-muted); /* placeholders keep 4.5:1 */
  --color-taupe: var(--color-text-muted);       /* legacy name */
  --color-taupe-2: var(--color-text-muted);     /* legacy name */

  /* Lines */
  --color-border: oklch(0.89 0.008 262);        /* hairlines */
  --color-border-soft: var(--color-border);
  --color-border-strong: oklch(0.76 0.012 262); /* table rules */
  --color-border-input: oklch(0.58 0.014 262);  /* form controls (3:1 non-text contrast) */
  --color-focus: oklch(0.44 0.16 263);

  /* Typography: one family, hierarchy through weight + size (ratio ~1.25–1.333) */
  --font-sans: "Google Sans Flex", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Thai", sans-serif;
  --font-body: var(--font-sans);
  --font-serif: var(--font-sans);               /* legacy name; there is no serif any more */

  --fs-display: clamp(2.25rem, 1.6rem + 2.8vw, 3.75rem);     /* 36 → 60, H1 */
  --lh-display: 1.08;
  --fs-h1: clamp(2.25rem, 1.6rem + 2.8vw, 3.75rem);
  --fs-h2: clamp(1.625rem, 1.35rem + 1.2vw, 2.25rem);        /* 26 → 36 */
  --lh-h2: 1.15;
  --fs-h3-lg: clamp(1.375rem, 1.3rem + 0.3vw, 1.5rem);       /* 22 → 24 */
  --fs-h3: 1.375rem;                                          /* 22 */
  --fs-lead-lg: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem);  /* 19 → 22, dek */
  --fs-lead: 1.125rem;                                        /* 18, prose */
  --fs-body: 1.125rem;                                        /* 18 */
  --fs-label: 1rem;                                           /* 16, buttons, nav */
  --fs-sm: 0.9375rem;                                         /* 15, meta */
  --fs-chip: 0.9375rem;                                       /* legacy name, 15 */
  --fs-xs: 0.875rem;                                          /* 14, absolute minimum */
  --fs-2xs: 0.875rem;                                         /* legacy name, 14 */

  --ls-tight: -0.02em;
  --ls-snug: -0.012em;
  --ls-eyebrow: 0;        /* legacy: no tracked uppercase labels */
  --ls-label: 0;
  --ls-chip: 0;
  --ls-btn: 0;

  /* Spacing */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-7: 28px; --space-8: 32px;
  --space-10: 40px; --space-12: 48px; --space-14: 56px; --space-16: 64px;
  --space-20: 80px; --space-24: 96px;
  --section-pad: clamp(56px, 6vw, 112px);
  --gutter: 16px;

  /* Layout */
  --container: 1280px;      /* outer frame incl. gutters → 1184px content at desktop */
  --content: 1184px;
  --reading: 768px;         /* main column in the 2-col article */
  --reading-narrow: 720px;  /* single reading column */
  --measure: 68ch;          /* body line length */
  --header-h: 64px;

  /* Shape & depth: radius 4px for controls, 8px max for boxes; no shadows */
  --radius-sm: 4px;
  --radius: 4px;
  --radius-md: 8px;
  --radius-lg: 8px;
  --radius-pill: 9999px;   /* only for true circles (dots); never for labels or buttons */
  --shadow-none: 0 0 0 0 transparent;
  --shadow-xs: var(--shadow-none);
  --shadow-header: var(--shadow-none);
  --shadow-md: var(--shadow-none);
  --shadow-lg: var(--shadow-none);
  --shadow-hover: var(--shadow-none);

  --transition: 150ms ease;
}
@media (min-width: 640px) { :root { --gutter: 32px; } }
@media (min-width: 960px) { :root { --header-h: 72px; } }
@media (min-width: 1280px) { :root { --gutter: 48px; } }

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
/* One anchor offset only (sticky header + gap). Set per target, so a page that repeats it doesn't double it. */
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.62;
  font-kerning: normal;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
img.icon, .icon { display: inline-block; flex: none; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; line-height: 1.2; color: var(--color-text); text-wrap: balance; }
p, ul, ol, dl, figure, blockquote { margin: 0; }
p, li, dd { text-wrap: pretty; }
:where(ul[class], ol[class]) { list-style: none; padding: 0; }
a {
  color: var(--color-primary);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--transition), text-decoration-thickness var(--transition);
}
a:hover { color: var(--color-primary-2); text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
table { border-collapse: collapse; }
hr { border: 0; border-top: 1px solid var(--color-border); margin: var(--space-8) 0; }
strong, b { font-weight: 700; }
em, i, cite { font-style: normal; }
em { font-weight: 600; }
::selection { background: var(--color-highlight); color: var(--color-text); }

/* Highlighter: key numbers and verdicts only, one or two per screen */
mark {
  background: var(--color-highlight);
  color: var(--color-text);
  padding: 0.04em 0.18em;
  border-radius: 2px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}
.on-dark :focus-visible { outline-color: #fff; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- Utilities ---------- */
.visually-hidden, .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;
}
.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 100;
  background: var(--color-primary); color: #fff; padding: 12px 18px; border-radius: var(--radius);
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: var(--space-3); color: #fff; }
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(896px + 2 * var(--gutter)); }
.container--reading { max-width: calc(var(--reading) + 2 * var(--gutter)); }
.stack > * + * { margin-top: var(--space-4); }
.stack-lg > * + * { margin-top: var(--space-8); }
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.nowrap { white-space: nowrap; }
.tabular { font-variant-numeric: tabular-nums; }
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: var(--space-8) !important; }
.max-reading { max-width: var(--reading); }

/* ---------- Typography helpers ---------- */
/* .eyebrow / .section-eyebrow / .label are retired as tracked-uppercase kickers.
   Any markup still using them renders as a plain bold line in sentence case. */
.eyebrow, .section-eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--fs-sm); line-height: 1.4; font-weight: 700;
  letter-spacing: 0; text-transform: none;
  color: var(--color-text);
}
.eyebrow img, .section-eyebrow img { display: none; }
.eyebrow--taupe { color: var(--color-text-muted); }
.eyebrow--rule::before { content: none; }
.label {
  font-size: var(--fs-sm); line-height: 1.4; font-weight: 700;
  letter-spacing: 0; text-transform: none; color: var(--color-text);
}
.display {
  font-size: var(--fs-display); line-height: var(--lh-display); font-weight: 700;
  letter-spacing: var(--ls-tight); color: var(--color-text);
}
.lead { font-size: var(--fs-lead-lg); line-height: 1.5; color: var(--color-text-soft); max-width: 60ch; }
.lead--lg { font-size: var(--fs-lead-lg); line-height: 1.5; color: var(--color-text-soft); }
.small { font-size: var(--fs-sm); line-height: 1.5; }
.meta { font-size: var(--fs-sm); line-height: 1.5; color: var(--color-text-muted); }

/* ---------- Sections ---------- */
.section { padding-block: var(--section-pad); background: var(--color-bg); }
.section--alt { background: var(--color-bg-alt); }
.section--sand { background: var(--color-bg-alt); }
.section--accent { background: var(--color-accent-soft); }
.section--tight { padding-block: var(--space-14); }
.section--rule { border-top: 1px solid var(--color-border); }

.section-head { display: grid; gap: var(--space-3); margin-bottom: var(--space-8); max-width: 760px; }
.section-title {
  font-size: var(--fs-h2); line-height: var(--lh-h2); letter-spacing: var(--ls-snug);
  color: var(--color-text);
}
.section-lede { font-size: var(--fs-body); line-height: 1.55; color: var(--color-text-soft); max-width: 60ch; }
.section-head--center { margin-inline: auto; text-align: center; justify-items: center; }
@media (min-width: 960px) {
  .section-head { margin-bottom: var(--space-10); }
  .section-head--split {
    max-width: none; grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
    align-items: end; column-gap: var(--space-12);
  }
  .section-head--split > :first-child { display: grid; gap: var(--space-3); }
}
.section-head__action { justify-self: start; }
@media (min-width: 960px) { .section-head--split .section-head__action { justify-self: end; } }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 44px; padding: 10px 20px;
  border: 1px solid transparent; border-radius: var(--radius);
  font-size: var(--fs-label); line-height: 1.25; font-weight: 600; letter-spacing: 0;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition), color var(--transition);
}
.btn:hover { text-decoration: none; }
.btn img { display: none; }
.btn--primary { background: var(--color-primary); color: #fff; }
.btn--primary:hover { background: var(--color-primary-2); color: #fff; }
.btn--secondary { background: transparent; color: var(--color-text); border-color: var(--color-text); }
.btn--secondary:hover { background: var(--color-bg-alt); color: var(--color-text); }
/* Solid red: crisis actions only */
.btn--accent { background: var(--color-accent); color: #fff; }
.btn--accent:hover { background: oklch(0.45 0.18 27); color: #fff; }
/* "Need help now?": text button, 1px red border, red text */
.btn--crisis {
  background: var(--color-bg); color: var(--color-accent-ink);
  border-color: var(--color-accent-border); font-weight: 600; white-space: nowrap;
}
@media (min-width: 960px) and (max-width: 1119.98px) { .site-header__actions .btn--crisis { padding-inline: 14px; } }
.btn--crisis:hover, .btn--crisis[aria-current="page"] { background: var(--color-accent-soft); color: var(--color-accent-ink); }
.btn--block { width: 100%; }

/* Underlined text link with an arrow. Any icon <img> inside is hidden; the arrow is text. */
.link-arrow {
  display: inline; font-size: var(--fs-label); line-height: 1.5; font-weight: 600;
  color: var(--color-primary);
  text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.link-arrow::after { content: "\00a0\2192"; display: inline-block; text-decoration: none; transition: transform var(--transition); }
.link-arrow:hover { text-decoration-thickness: 2px; }
.link-arrow:hover::after { transform: translateX(2px); }
.link-arrow img, .link-arrow svg { display: none; }
.link-arrow--sm { font-size: var(--fs-sm); }
.link-arrow--accent { color: var(--color-accent-ink); }
.link-arrow--accent:hover { color: var(--color-accent-ink); }

/* ---------- Retired: tags, chips, badges, pills ----------
   Kept only so old markup degrades to plain small text. Don't use in new templates. */
.chip, .tag, .badge-soon, .pill-meta, .trust-stamp {
  display: inline; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
  font-size: var(--fs-sm); line-height: 1.5; font-weight: 600; letter-spacing: 0; text-transform: none;
  color: var(--color-text-muted); white-space: normal;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
a.chip { color: var(--color-primary); text-decoration: underline; text-underline-offset: 3px; }
.chip img, .tag img, .badge-soon img, .pill-meta img, .trust-stamp img { display: none; }
.dot-sep { color: var(--color-border-strong); }

/* ---------- Site header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  height: var(--header-h);
}
/* Wordmark: the logo icon (assets/brand) beside the site name */
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  color: var(--color-text); text-decoration: none;
}
.brand:hover { color: var(--color-text); }
.brand__mark { flex: none; display: block; width: 32px; height: 32px; }
.brand__name {
  font-size: clamp(1.0625rem, 0.98rem + 0.4vw, 1.1875rem); line-height: 1.2;
  font-weight: 750; letter-spacing: -0.015em; white-space: nowrap;
}
.brand__logo { display: none; }

.site-nav { display: none; }
.site-nav__list { display: flex; align-items: center; gap: 16px; }
@media (min-width: 1120px) { .site-nav__list { gap: 28px; } }
.site-nav__link {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: var(--fs-label); line-height: 1.25; font-weight: 500;
  color: var(--color-text); text-decoration: none; white-space: nowrap;
  border-bottom: 2px solid transparent; padding-top: 2px;
}
.site-nav__link:hover { color: var(--color-text); border-bottom-color: var(--color-border-strong); }
.site-nav__link[aria-current="page"], .site-nav__link.is-active { border-bottom-color: var(--color-primary); font-weight: 600; }
.site-header__actions { display: flex; align-items: center; gap: var(--space-3); }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; margin-right: -6px;
  border: 0; border-radius: var(--radius); background: transparent; color: var(--color-text);
}
.nav-toggle:hover { background: var(--color-bg-alt); }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 20px; height: 2px; background: currentColor;
  transition: transform var(--transition), background-color var(--transition);
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Mobile nav panel */
.mobile-nav { border-top: 1px solid var(--color-border); background: var(--color-bg); }
.mobile-nav[hidden] { display: none; }
.mobile-nav__list { padding-block: var(--space-1); }
.mobile-nav__link {
  display: flex; align-items: center; justify-content: space-between; min-height: 52px;
  padding-inline: var(--gutter); border-bottom: 1px solid var(--color-border);
  font-size: var(--fs-body); font-weight: 600; color: var(--color-text); text-decoration: none;
}
.mobile-nav__link img { display: none; }
.mobile-nav__link::after { content: "\203A"; font-size: 1.375rem; line-height: 1; color: var(--color-text-muted); }
.mobile-nav__link:hover { color: var(--color-text); background: var(--color-bg-alt); }
.mobile-nav__link[aria-current="page"] { color: var(--color-primary); }
.mobile-nav__footer { padding: var(--space-4) var(--gutter) var(--space-6); display: grid; gap: var(--space-3); }

/* No-JS: nav-toggle hidden, desktop nav wraps */
.no-js .nav-toggle { display: none; }
.no-js .site-nav { display: block; width: 100%; overflow-x: auto; }

@media (max-width: 959.98px) {
  .site-header__actions .btn--crisis { display: none; }
}
@media (min-width: 960px) {
  .site-nav { display: block; }
  .nav-toggle, .mobile-nav { display: none !important; }
}

/* ---------- Site footer ---------- */
.site-footer { background: var(--color-bg-alt); color: var(--color-text-soft); border-top: 1px solid var(--color-border); }
.footer-crisis { background: var(--color-accent-soft); border-bottom: 1px solid var(--color-border); padding-block: var(--space-4); }
.footer-crisis__inner { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-6); }
.footer-crisis__title {
  font-size: var(--fs-label); line-height: 1.4; font-weight: 700; letter-spacing: 0; text-transform: none;
  color: var(--color-accent-ink);
}
.footer-crisis__title img { display: none; }
.footer-crisis__list { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 20px; }
.footer-crisis__item { font-size: var(--fs-label); line-height: 1.5; color: var(--color-text); }
.footer-crisis__item strong { color: var(--color-text); font-weight: 600; }
.footer-crisis__item a { color: inherit; font-weight: 700; font-variant-numeric: tabular-nums; text-decoration: underline; text-decoration-color: var(--color-border-strong); display: inline-block; padding-block: 6px; }
.footer-crisis__item a:hover { text-decoration-color: currentColor; }
.footer-crisis__item a.footer-crisis__more { font-weight: 600; color: var(--color-accent-ink); text-decoration-color: currentColor; }
.footer-crisis__item.dot-sep { display: none; }

.footer-main { padding-block: var(--space-12) var(--space-10); display: grid; gap: var(--space-10); }
.footer-cols { display: grid; gap: var(--space-8); grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .footer-cols { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--space-10); } }
.footer-brand { display: grid; gap: var(--space-3); align-content: start; }
.footer-brand .brand { justify-self: start; }
.footer-brand__logo { display: none; }
.footer-brand__text { font-size: var(--fs-sm); line-height: 1.55; color: var(--color-text-soft); max-width: 34ch; }
.footer-brand__badge { font-size: var(--fs-sm); line-height: 1.55; font-weight: 600; color: var(--color-text); background: none; padding: 0; }
.footer-col__title {
  margin-bottom: var(--space-2);
  font-size: var(--fs-label); line-height: 1.4; font-weight: 700; letter-spacing: 0; text-transform: none;
  color: var(--color-text);
}
.footer-col__list { display: grid; gap: 0; }
.footer-col__list a {
  display: inline-block; padding-block: 7px; font-size: var(--fs-sm); line-height: 1.4;
  color: var(--color-text-soft); text-decoration: none;
}
.footer-col__list a:hover { color: var(--color-primary); text-decoration: underline; }
.footer-legal { border-top: 1px solid var(--color-border); padding-top: var(--space-6); display: grid; gap: var(--space-4); }
.footer-trust { font-size: var(--fs-sm); line-height: 1.55; color: var(--color-text); }
.footer-trust strong { font-weight: 700; }
.footer-trust__text img, .footer-trust__pill { display: none; }
.footer-disclaimer { font-size: var(--fs-sm); line-height: 1.55; color: var(--color-text-soft); max-width: 90ch; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-6); font-size: var(--fs-sm); line-height: 1.5; color: var(--color-text-muted); }
.footer-bottom__links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.footer-bottom__links a { color: var(--color-text-muted); text-decoration: none; display: inline-block; padding-block: 6px; }
.footer-bottom__links a:hover { color: var(--color-primary); text-decoration: underline; }

/* ---------- Mobile sticky bottom bar ---------- */
.mobile-bar {
  position: fixed; inset: auto 0 0 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  min-height: 60px; padding: 8px var(--gutter) calc(8px + env(safe-area-inset-bottom));
  background: var(--color-bg); border-top: 1px solid var(--color-border);
}
.mobile-bar__text { min-width: 0; font-size: var(--fs-xs); line-height: 1.35; color: var(--color-text-muted); }
.mobile-bar__text strong { display: block; color: var(--color-text); font-size: var(--fs-sm); }
.mobile-bar .btn { flex: none; min-height: 44px; padding: 8px 16px; white-space: nowrap; }
@media (max-width: 959.98px) { body.has-mobile-bar { padding-bottom: 72px; } }
@media (min-width: 960px) { .mobile-bar { display: none; } }

/* ---------- Cards (only for genuinely comparable sets) ---------- */
.card-grid { display: grid; gap: var(--space-5); grid-template-columns: 1fr; }
@media (min-width: 640px) { .card-grid--2, .card-grid--3, .card-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) {
  .card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.card {
  position: relative; display: flex; flex-direction: column;
  padding: var(--space-6); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-bg); color: var(--color-text);
}
.card--white, .card--cream { background: var(--color-bg); }
.card--alt, .card--surface { background: var(--color-bg-alt); }
.card--flush { padding: 0; overflow: hidden; }
.card__icon, .card__icon--lg, .card__icon--round, .card__icon--dark { display: none; }
.card__title { font-size: var(--fs-h3); line-height: 1.25; font-weight: 650; color: var(--color-text); }
.card__title a { color: inherit; text-decoration: none; }
.card__text { margin-top: var(--space-2); font-size: var(--fs-label); line-height: 1.55; color: var(--color-text-soft); }
.card__footer { margin-top: auto; padding-top: var(--space-5); display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }

/* Whole-card link (stretched): put .card-link on the <a> inside the title */
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.card-link:focus-visible { outline: none; }
.card:has(.card-link:focus-visible), .guide-card:has(.card-link:focus-visible), .related-card:has(.card-link:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.card--interactive { transition: border-color var(--transition); }
.card--interactive:hover { border-color: var(--color-primary); }
.card--interactive:hover .card__title, .card--interactive:hover .guide-card__title { text-decoration: underline; text-underline-offset: 3px; }
/* Non-link card: don't use for unwritten guides (one plain line instead) */
.card--soon { background: var(--color-bg-alt); }

/* Guide card (legacy) */
.guide-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg);
}
.guide-card__media img { width: 100%; height: auto; aspect-ratio: 373 / 192; object-fit: cover; }
.guide-card__body { display: grid; gap: var(--space-2); align-content: start; padding: var(--space-6); flex: 1; }
.guide-card__top, .guide-card__meta { font-size: var(--fs-sm); color: var(--color-text-muted); }
.guide-card__title { font-size: var(--fs-h3); line-height: 1.25; font-weight: 650; color: var(--color-text); }
.guide-card__title a { color: inherit; text-decoration: none; }
.guide-card__text { font-size: var(--fs-label); line-height: 1.55; color: var(--color-text-soft); }
.guide-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) var(--space-6); border-top: 1px solid var(--color-border); font-size: var(--fs-sm); color: var(--color-text-muted); }
.guide-card__foot > img, .guide-card__avatar { display: none; }
.guide-card__by > span:last-child { display: grid; }
.guide-card__by strong { color: var(--color-text); }
.guide-card.card--soon { background: var(--color-bg-alt); }

/* ---------- Article: breadcrumb ---------- */
.breadcrumb { font-size: var(--fs-sm); line-height: 1.4; }
.breadcrumb__list { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; }
.breadcrumb__item { display: inline-flex; align-items: center; gap: 8px; color: var(--color-text-muted); }
.breadcrumb__item + .breadcrumb__item::before { content: "/"; color: var(--color-border-strong); }
.breadcrumb a { color: var(--color-text-muted); text-decoration: underline; text-decoration-color: var(--color-border-strong); display: inline-block; padding-block: 8px; }
.breadcrumb a:hover { color: var(--color-primary); text-decoration-color: currentColor; }
.breadcrumb [aria-current="page"] { color: var(--color-text); }

/* ---------- Article: hero ---------- */
.article-hero { background: var(--color-bg); padding-block: var(--space-4) var(--space-8); border-bottom: 1px solid var(--color-border); }
.article-hero__inner { display: grid; gap: var(--space-4); }
.article-hero__title {
  font-size: var(--fs-h1); line-height: 1.08; letter-spacing: var(--ls-tight); color: var(--color-text); max-width: 22em;
}
.article-hero__subtitle { font-size: var(--fs-lead-lg); line-height: 1.5; color: var(--color-text-soft); max-width: 62ch; }
.article-hero__media { margin-top: var(--space-4); border-radius: var(--radius-md); overflow: hidden; background: var(--color-surface); }
.article-hero__media img { width: 100%; height: auto; aspect-ratio: 1184 / 507; object-fit: cover; }
/* Retired dark/photo hero: renders like the standard hero (the layout no longer outputs it) */
.article-hero--dark { background: var(--color-bg); color: var(--color-text); }
.article-hero--dark::before, .article-hero--dark .article-hero__bg { display: none; }
.article-hero--dark .article-hero__title { color: var(--color-text); }
.article-hero--dark .article-hero__subtitle { color: var(--color-text-soft); }
.article-byline-wrap { padding-top: var(--space-4); }

/* ---------- Byline: one plain line ---------- */
.byline {
  display: block; margin: 0; padding: 0; border: 0; background: none;
  font-size: var(--fs-sm); line-height: 1.55; color: var(--color-text-muted);
}
.byline__sep { padding-inline: 0.35em; color: var(--color-border-strong); }
.byline a { color: var(--color-text-muted); text-decoration-color: var(--color-border-strong); }
.byline a:hover { color: var(--color-primary); text-decoration-color: currentColor; }
.byline strong { color: var(--color-text); font-weight: 600; }
/* Legacy byline parts (old markup) */
.byline__people, .byline__author, .byline__meta { display: inline; }
.byline__avatar, .byline__divider, .byline__meta-item img { display: none; }
.review-badge { display: inline; padding: 0; border: 0; background: none; color: inherit; }
.review-badge__icon { display: none; }
.review-badge--compact { padding: 0; }

/* ---------- Article layouts (2-col / 3-col) ---------- */
.article-body { padding-block: var(--space-8) var(--space-24); }
.article-layout { display: grid; gap: var(--space-8); grid-template-columns: minmax(0, 1fr); }
.article-main { min-width: 0; }
.article-main > * + * { margin-top: var(--space-12); }
.article-aside { display: grid; gap: var(--space-6); align-content: start; min-width: 0; }
.article-toc-col { min-width: 0; }
@media (min-width: 960px) {
  .article-body { padding-top: var(--space-10); }
  /* 2-col: content + right sidebar; the sidebar TOC sticks for the rest of the article */
  .article-layout--2col { grid-template-columns: minmax(0, 768fr) minmax(280px, 352fr); gap: var(--space-16); }
  .article-layout--2col .article-toc-col { display: none; }
  .article-layout--2col .article-aside { display: flex; flex-direction: column; gap: var(--space-6); }
  .article-layout--2col .article-aside .toc { display: block; order: 99; position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; }
  /* 3-col: sticky TOC left, content, facts right */
  .article-layout--3col { grid-template-columns: minmax(0, 250fr) minmax(0, 600fr) minmax(0, 270fr); gap: var(--space-10); }
  .article-layout--3col .article-toc-col { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; }
}
@media (min-width: 960px) and (max-width: 1179.98px) {
  .article-layout--3col { grid-template-columns: minmax(0, 230px) minmax(0, 1fr); }
  .article-layout--3col .article-aside { grid-column: 2; position: static; }
}
.article-aside .toc { display: none; }

/* ---------- Prose (long-form content) ---------- */
.prose { color: var(--color-text-soft); font-size: var(--fs-body); line-height: 1.62; }
.prose > * + * { margin-top: var(--space-5); }
.prose > p, .prose > ul:not([class]), .prose > ol:not([class]) { max-width: var(--measure); }
.prose h2 {
  margin-top: var(--space-16); font-size: var(--fs-h2); line-height: var(--lh-h2); letter-spacing: var(--ls-snug);
  color: var(--color-text);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: var(--space-10); font-size: var(--fs-h3); line-height: 1.25; font-weight: 650; color: var(--color-text); }
.prose h4 { margin-top: var(--space-8); font-size: var(--fs-body); line-height: 1.4; color: var(--color-text); }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: var(--space-4); }
.prose ul:not([class]), .prose ol:not([class]) { padding-left: 1.3em; }
.prose ul:not([class]) > li + li, .prose ol:not([class]) > li + li { margin-top: var(--space-2); }
.prose ul:not([class]) > li::marker { color: var(--color-text-muted); }
.prose ol:not([class]) > li::marker { color: var(--color-text); font-weight: 700; font-variant-numeric: tabular-nums; }
.prose a:not(.btn) { color: var(--color-primary); }
.prose strong { color: var(--color-text); }
.prose blockquote:not([class]) {
  padding: var(--space-4) var(--space-5); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-bg-alt); color: var(--color-text);
}
.prose figure img { border-radius: var(--radius-md); }
.prose figcaption { margin-top: var(--space-2); font-size: var(--fs-sm); color: var(--color-text-muted); }
.prose .section-eyebrow { display: none; }
.prose--compact { font-size: var(--fs-label); }

/* Verdict / key-number line: one bold sentence that opens a section, <mark> on the key number only.
   <p class="verdict">Centers publish prices of <mark>US$4,300–25,700</mark> per 28–30 days.</p> */
.verdict { font-size: var(--fs-lead-lg); line-height: 1.45; font-weight: 650; color: var(--color-text); max-width: var(--measure); text-wrap: pretty; }
.verdict .cite, .verdict .cg-cite { font-weight: 700; }

/* ---------- Photos (licensed photography only; macro in partials/photo.njk) ----------
   Natural aspect ratio from the width/height attributes (never cropped), 8px radius,
   no shadows, overlays, gradients or text on top. Caption 15px muted, credit on its own line.
   Phones: the photo runs edge to edge across the reading column's gutters; the caption keeps the gutter. */
.photo { margin: 0; min-width: 0; }
.photo picture { display: block; }
.photo__img { display: block; width: 100%; height: auto; border-radius: var(--radius-md); background: var(--color-surface); outline: 1px solid var(--color-border); outline-offset: -1px; }
.photo__caption { display: grid; gap: 2px; margin-top: var(--space-2); max-width: var(--measure); font-size: var(--fs-sm); line-height: 1.5; color: var(--color-text-muted); }
.photo__credit { font-size: var(--fs-xs); line-height: 1.4; color: var(--color-text-muted); }
.prose > .photo { margin-block: var(--space-10); }
.prose > .photo:first-child { margin-top: 0; }
/* Guide heroes: as wide as the reading column (768px) and aligned with the H1/dek, so "The short answer"
   stays near the fold. Delete max-width to run hero photos across the full 1184px container. */
.article-hero .photo--hero { margin-top: var(--space-4); max-width: var(--reading); }
@media (max-width: 639.98px) {
  .photo { margin-inline: calc(-1 * var(--gutter)); }
  .photo .photo__img { border-radius: 0; }
  .photo__caption { padding-inline: var(--gutter); }
}

/* ---------- "The short answer" box ---------- */
.quick-answer {
  display: grid; gap: var(--space-3);
  padding: var(--space-6);
  border: 1px solid var(--color-highlight-border); border-radius: var(--radius-md);
  background: var(--color-highlight-soft);
}
.quick-answer::before { content: none; }
.quick-answer__label { font-size: var(--fs-body); line-height: 1.3; font-weight: 700; color: var(--color-text); letter-spacing: 0; text-transform: none; }
.quick-answer__label img { display: none; }
.quick-answer__text { font-size: var(--fs-body); line-height: 1.6; color: var(--color-text); max-width: var(--measure); }
.quick-answer__text + .quick-answer__text { color: var(--color-text-soft); }
.quick-answer__points { display: grid; gap: 0; padding-top: var(--space-1); }
.quick-answer__points li {
  padding-block: 8px; border-top: 1px solid var(--color-highlight-border);
  font-size: var(--fs-label); line-height: 1.45; font-weight: 600; color: var(--color-text); font-variant-numeric: tabular-nums;
}
.quick-answer--lg { padding: var(--space-8); }
.quick-answer--lg .quick-answer__text:first-of-type { font-size: var(--fs-lead-lg); line-height: 1.5; }
@media (min-width: 640px) {
  .quick-answer__points { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); column-gap: var(--space-6); }
}
@media (max-width: 639.98px) { .quick-answer, .quick-answer--lg { padding: var(--space-5); } }

/* ---------- Key facts ---------- */
.key-facts { display: grid; gap: var(--space-3); padding: var(--space-5) var(--space-6) var(--space-6); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg); }
.key-facts__title { font-size: var(--fs-body); line-height: 1.3; font-weight: 700; color: var(--color-text); letter-spacing: 0; text-transform: none; }
.key-facts__title img { display: none; }
.key-facts__list { display: grid; }
.key-facts__row { display: grid; gap: 2px; padding-block: 10px; border-top: 1px solid var(--color-border); }
.key-facts__row dt { font-size: var(--fs-sm); line-height: 1.4; color: var(--color-text-muted); }
.key-facts__row dd { margin: 0; font-size: var(--fs-label); line-height: 1.45; font-weight: 600; color: var(--color-text); font-variant-numeric: tabular-nums; }
.key-facts__row dd.is-highlight { font-weight: 700; }
.key-facts__note { font-size: var(--fs-sm); line-height: 1.5; color: var(--color-text-muted); }

/* ---------- Callouts (full 1px border + tint; no side stripes, no icons) ---------- */
.callout { display: grid; gap: var(--space-1); padding: var(--space-5); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg-alt); color: var(--color-text); }
.callout__title { font-size: var(--fs-body); line-height: 1.35; font-weight: 700; letter-spacing: 0; color: var(--color-text); }
.callout__title img { display: none; }
.callout__body { font-size: var(--fs-body); line-height: 1.6; color: var(--color-text); }
.callout__body > * + * { margin-top: var(--space-2); }
.callout--tip { background: var(--color-primary-soft); border-color: oklch(0.85 0.06 263); }
.callout--important { background: var(--color-accent-soft); border-color: var(--color-accent-border); }
.callout--important .callout__title { color: var(--color-accent-ink); }
.callout--note { background: var(--color-bg-alt); border-color: var(--color-border); }

/* ---------- Pull quote ---------- */
.pull-quote { display: grid; gap: var(--space-3); padding: var(--space-5) 0; border-block: 1px solid var(--color-border); }
.pull-quote::before { content: none; }
.pull-quote blockquote, .pull-quote p { font-size: var(--fs-lead-lg); line-height: 1.45; font-weight: 500; font-style: normal; color: var(--color-text); }
.pull-quote figcaption, .pull-quote cite { font-style: normal; font-size: var(--fs-sm); line-height: 1.4; color: var(--color-text-muted); }

/* ---------- Lists ---------- */
.checklist { display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 28px; font-size: var(--fs-label); line-height: 1.5; color: var(--color-text); }
.checklist li::before {
  content: ""; position: absolute; left: 4px; top: 0.3em;
  width: 7px; height: 12px; border: solid var(--color-primary); border-width: 0 2.5px 2.5px 0;
  transform: rotate(40deg);
}
.checklist--lg li { font-size: var(--fs-body); }
.numbered-list { counter-reset: n; display: grid; gap: var(--space-4); }
.numbered-list > li { counter-increment: n; display: grid; grid-template-columns: 2rem 1fr; gap: var(--space-3); align-items: baseline; }
.numbered-list > li::before {
  content: counter(n) "."; font-weight: 700; font-size: var(--fs-body); color: var(--color-text); font-variant-numeric: tabular-nums;
}

/* ---------- Stat card ---------- */
.stat-grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 640px) { .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stat-card { display: grid; gap: var(--space-1); align-content: start; padding: var(--space-4) 0; border-top: 2px solid var(--color-text); }
.stat-card__value { font-size: var(--fs-h3-lg); line-height: 1.2; font-weight: 700; color: var(--color-text); font-variant-numeric: tabular-nums; }
.stat-card__label { font-size: var(--fs-label); line-height: 1.4; font-weight: 600; color: var(--color-text); }
.stat-card__text { font-size: var(--fs-sm); line-height: 1.5; color: var(--color-text-soft); }

/* ---------- TOC: plain list in a light panel; current item bold with a blue dot ---------- */
.toc { padding: var(--space-5); border-radius: var(--radius-md); background: var(--color-bg-alt); }
.toc__head { padding-bottom: var(--space-3); }
.toc__title { font-size: var(--fs-label); line-height: 1.3; font-weight: 700; color: var(--color-text); letter-spacing: 0; text-transform: none; }
.toc__title img, .toc__toggle img { display: none; }
.toc__toggle {
  display: none; align-items: center; justify-content: space-between; gap: var(--space-2); width: 100%; min-height: 48px;
  margin: 0; padding: 0; border: 0; background: none; text-align: left;
  font-size: var(--fs-label); font-weight: 700; color: var(--color-text);
}
.toc__chev {
  flex: none; width: 9px; height: 9px; margin-right: 4px;
  border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg);
  transition: transform var(--transition);
}
.toc__toggle[aria-expanded="true"] .toc__chev { transform: translateY(2px) rotate(-135deg); }
.toc__list { display: grid; gap: 0; counter-reset: toc; }
.toc__link {
  position: relative; display: block; padding: 6px 0 6px 16px;
  font-size: var(--fs-sm); line-height: 1.4; color: var(--color-text-soft); text-decoration: none;
}
.toc__link:hover { color: var(--color-primary); text-decoration: underline; }
.toc__link.is-active, .toc__link[aria-current="true"] { color: var(--color-text); font-weight: 700; }
.toc__link.is-active::before, .toc__link[aria-current="true"]::before {
  content: ""; position: absolute; left: 2px; top: calc(6px + 0.7em - 3px);
  width: 6px; height: 6px; border-radius: 50%; background: var(--color-primary);
}
.toc--numbered .toc__list > li { counter-increment: toc; }
.toc--numbered .toc__link::after { content: none; }
.toc--numbered .toc__link { padding-left: 16px; }
@media (max-width: 959.98px) {
  .toc { padding: var(--space-1) var(--space-5); }
  .toc--collapsible .toc__head { display: none; }
  .toc--collapsible .toc__toggle { display: flex; }
  .toc--collapsible .toc__list { padding: var(--space-2) 0 var(--space-4); border-top: 1px solid var(--color-border); }
  .toc--collapsible.is-collapsed .toc__list { display: none; }
  .toc .toc__link { padding-block: 10px; }
  .no-js .toc { padding-block: var(--space-5); }
}

/* ---------- FAQ (<details> with hairline rules and +/−) ---------- */
.faq__title { margin-bottom: var(--space-4); color: var(--color-text); }
.faq__list { display: grid; border-bottom: 1px solid var(--color-border); }
.faq__item { border-top: 1px solid var(--color-border); background: none; }
.faq__q {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  min-height: 56px; padding: var(--space-4) 0; cursor: pointer; list-style: none;
  font-size: var(--fs-body); line-height: 1.4; font-weight: 600; color: var(--color-text);
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::marker { content: ""; }
.faq__q::after {
  content: "+"; flex: none; width: 1.25em; text-align: center;
  font-size: 1.5rem; line-height: 1; font-weight: 400; color: var(--color-primary);
}
.faq__item[open] > .faq__q::after { content: "\2212"; }
.faq__q:hover { color: var(--color-primary); }
.faq__a { padding: 0 2.5rem var(--space-5) 0; font-size: var(--fs-body); line-height: 1.62; color: var(--color-text-soft); max-width: calc(var(--measure) + 2.5rem); }
.faq__a > * + * { margin-top: var(--space-3); }
.faq--lg .faq__q { font-size: 1.25rem; padding-block: var(--space-5); }

/* ---------- Sources ---------- */
.sources { display: grid; gap: var(--space-3); padding-top: var(--space-6); border-top: 1px solid var(--color-border); }
.sources__title { font-size: var(--fs-h3); line-height: 1.25; font-weight: 700; color: var(--color-text); letter-spacing: 0; text-transform: none; }
.sources__list { display: grid; gap: var(--space-2); padding-left: 1.6em; list-style: decimal; font-size: var(--fs-sm); line-height: 1.55; color: var(--color-text-soft); }
.sources__list li::marker { font-weight: 700; color: var(--color-text); font-variant-numeric: tabular-nums; }
.sources__list a { color: var(--color-primary); overflow-wrap: anywhere; }
.sources__list cite { font-style: normal; }
.sources__note { font-size: var(--fs-sm); line-height: 1.55; color: var(--color-text-soft); max-width: var(--measure); }

/* ---------- Related guides: a list with hairline rules ---------- */
.related { display: grid; gap: var(--space-3); }
.related__title { font-size: var(--fs-h3); line-height: 1.25; font-weight: 700; color: var(--color-text); }
.related__grid { display: grid; border-top: 1px solid var(--color-border); }
.related-card { position: relative; display: grid; gap: 2px; padding: var(--space-4) 0; border-bottom: 1px solid var(--color-border); background: none; }
.related-card__icon { display: none; }
.related-card__title { font-size: var(--fs-body); line-height: 1.4; font-weight: 600; color: var(--color-text); }
.related-card__title a { color: var(--color-primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.related-card__title a:hover { text-decoration-thickness: 2px; }
.related-card__text { font-size: var(--fs-label); line-height: 1.5; color: var(--color-text-soft); }
.related-card--thumb { grid-template-columns: 96px minmax(0, 1fr); column-gap: var(--space-4); align-items: start; }
.related-card--thumb > * { grid-column: 2; }
.related-card--thumb > .related-card__thumb { grid-column: 1; grid-row: 1 / span 2; }
.related-card__thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); outline: 1px solid var(--color-border); outline-offset: -1px; }
@media (min-width: 640px) { .related-card--thumb { grid-template-columns: 144px minmax(0, 1fr); column-gap: var(--space-5); } }
.related__next { font-size: var(--fs-label); line-height: 1.5; color: var(--color-text-muted); }

/* ---------- Crisis box: white, 1px red border, big tappable numbers ---------- */
.crisis-box {
  display: grid; gap: var(--space-4); padding: var(--space-8);
  border: 1px solid var(--color-accent-border); border-radius: var(--radius-md); background: var(--color-bg);
}
@media (max-width: 639.98px) { .crisis-box { padding: var(--space-6) var(--space-5); } }
.crisis-box__title { font-size: var(--fs-h3); line-height: 1.25; font-weight: 700; color: var(--color-accent-ink); }
.crisis-box__title img { display: none; }
.crisis-box__text { font-size: var(--fs-body); line-height: 1.6; color: var(--color-text); max-width: var(--measure); }
.crisis-box__text strong { color: var(--color-text); }
.crisis-box__group-title { margin-top: var(--space-2); font-size: var(--fs-label); line-height: 1.4; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--color-text); }
.crisis-box__numbers { display: grid; gap: var(--space-2); grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.crisis-number {
  display: grid; gap: 0; min-height: 44px; padding: 10px 14px 12px; border: 1px solid var(--color-border); border-radius: var(--radius);
  background: var(--color-bg); text-decoration: none; color: var(--color-text);
  transition: border-color var(--transition), background-color var(--transition);
}
a.crisis-number:hover { border-color: var(--color-accent-border); background: var(--color-accent-soft); color: var(--color-text); text-decoration: none; }
.crisis-number__label { font-size: var(--fs-sm); line-height: 1.4; font-weight: 600; color: var(--color-text-soft); }
.crisis-number__value { font-size: 1.75rem; line-height: 1.2; font-weight: 700; color: var(--color-text); font-variant-numeric: tabular-nums; }
.crisis-number__note { font-size: var(--fs-sm); line-height: 1.4; color: var(--color-text-muted); }
.crisis-box__footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); padding-top: var(--space-2); font-size: var(--fs-label); color: var(--color-text-soft); }

/* ---------- Lead magnet: plain block (homepage) + sidebar card ---------- */
.lead-magnet { display: grid; gap: var(--space-8); align-items: start; }
@media (min-width: 960px) { .lead-magnet { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(48px, 6vw, 96px); } }
.lead-magnet__intro { display: grid; gap: var(--space-4); }
.lead-magnet__badge { display: none; }
.lead-magnet__title { font-size: var(--fs-h2); line-height: var(--lh-h2); letter-spacing: var(--ls-snug); color: var(--color-text); }
.lead-magnet__text { font-size: var(--fs-body); line-height: 1.6; color: var(--color-text-soft); max-width: 52ch; }
.lead-magnet__list { padding-top: var(--space-1); }
.lead-form { display: grid; gap: var(--space-2); padding: var(--space-6); border-radius: var(--radius-md); background: var(--color-bg-alt); }
.lead-form__title { font-size: var(--fs-h3); line-height: 1.25; color: var(--color-text); }
.lead-form__text { font-size: var(--fs-label); line-height: 1.5; color: var(--color-text-soft); }
.lead-form__fields { display: grid; gap: var(--space-4); padding-top: var(--space-3); }
.field { display: grid; gap: 6px; }
.field__label { font-size: var(--fs-label); line-height: 1.4; font-weight: 600; color: var(--color-text); }
.field__input {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--color-border-input); border-radius: var(--radius);
  background: var(--color-bg); font-size: var(--fs-body); line-height: 1.4; color: var(--color-text);
}
.field__input::placeholder { color: var(--color-text-muted); opacity: 1; }
.field__input:hover { border-color: var(--color-text-soft); }
.field__input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-color: var(--color-focus); }
.consent { display: flex; align-items: flex-start; gap: 10px; font-size: var(--fs-sm); line-height: 1.5; color: var(--color-text-soft); }
.consent input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--color-primary); }
.honeypot { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lead-form__fineprint { font-size: var(--fs-xs); line-height: 1.5; color: var(--color-text-muted); }
.lead-card { display: grid; gap: var(--space-3); padding: var(--space-5) var(--space-6) var(--space-6); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg); }
.lead-card__icon { display: none; }
.lead-card__title { font-size: var(--fs-body); line-height: 1.35; font-weight: 700; color: var(--color-text); }
.lead-card__text { margin-top: var(--space-1); font-size: var(--fs-sm); line-height: 1.55; color: var(--color-text-soft); }
.lead-card .lead-form__fields { padding-top: 0; gap: var(--space-3); }

/* ---------- Data table ---------- */
.table-scroll {
  position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-bg);
}
.table-scroll:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.table-scroll--white { background: var(--color-bg); }
.data-table { width: 100%; min-width: 640px; text-align: left; font-size: var(--fs-label); line-height: 1.5; color: var(--color-text); font-variant-numeric: tabular-nums; }
.data-table caption { caption-side: top; padding: var(--space-3) var(--space-4) 0; text-align: left; font-size: var(--fs-sm); color: var(--color-text-muted); }
.data-table thead th {
  padding: var(--space-3) var(--space-4); background: var(--color-surface); border-bottom: 1px solid var(--color-border-strong);
  font-size: var(--fs-sm); line-height: 1.35; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--color-text);
  vertical-align: bottom;
}
.data-table tbody th, .data-table td { padding: var(--space-3) var(--space-4); vertical-align: top; border-top: 1px solid var(--color-border); }
.data-table tbody tr:first-child th, .data-table tbody tr:first-child td { border-top: 0; }
.data-table tbody th, .data-table tbody td:first-child { font-weight: 700; color: var(--color-text); }
.data-table .is-highlight { background: var(--color-primary-soft); }
.data-table .is-strong { font-weight: 700; color: var(--color-text); }
.data-table .cell-sub { display: block; margin-top: 2px; font-size: var(--fs-sm); line-height: 1.4; font-weight: 400; color: var(--color-text-muted); }
.table-note { margin-top: var(--space-3); font-size: var(--fs-sm); line-height: 1.55; color: var(--color-text-muted); max-width: var(--measure); }
.table-scroll-hint { display: none; margin-top: var(--space-2); font-size: var(--fs-sm); color: var(--color-text-muted); }
@media (max-width: 639.98px) { .table-scroll-hint { display: block; } }

/* ---------- Tabs (underline style) ---------- */
.tabs__list { display: flex; flex-wrap: wrap; gap: 0 var(--space-2); margin-bottom: var(--space-6); border-bottom: 1px solid var(--color-border); }
.tabs__tab {
  min-height: 44px; padding: 10px 14px; margin-bottom: -1px; border: 0; border-bottom: 3px solid transparent; border-radius: 0;
  background: none; color: var(--color-text-soft);
  font-size: var(--fs-label); line-height: 1.25; font-weight: 600;
}
.tabs__tab:hover { color: var(--color-text); border-bottom-color: var(--color-border-strong); }
.tabs__tab[aria-selected="true"] { color: var(--color-text); border-bottom-color: var(--color-primary); background: none; }
.tabs__panel[hidden] { display: none; }
.no-js .tabs__list { display: none; }
.no-js .tabs__panel { display: block !important; }
.no-js .tabs__panel + .tabs__panel { margin-top: var(--space-8); }

/* ---------- Search ---------- */
.search { display: grid; gap: var(--space-2); width: 100%; max-width: 640px; }
.search__label { font-size: var(--fs-label); line-height: 1.4; font-weight: 600; color: var(--color-text); }
.search__box {
  display: flex; align-items: stretch; gap: 0;
  border: 1px solid var(--color-border-input); border-radius: var(--radius); background: var(--color-bg);
}
.search__box:focus-within { outline: 2px solid var(--color-focus); outline-offset: 2px; border-color: var(--color-focus); }
.search__icon { display: none; }
.search__input {
  flex: 1; min-width: 0; min-height: 52px; padding: 10px 14px; border: 0; border-radius: var(--radius) 0 0 var(--radius); background: transparent;
  font-size: var(--fs-body); color: var(--color-text);
}
.search__input::placeholder { color: var(--color-text-muted); opacity: 1; }
.search__input:focus-visible { outline: none; }
.search__input::-webkit-search-cancel-button { cursor: pointer; }
.search__btn { flex: none; min-height: 0; margin: 4px; padding-inline: 20px; }
.search__tags { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; font-size: var(--fs-sm); }
.search__tags-label { font-weight: 600; color: var(--color-text-muted); text-transform: none; letter-spacing: 0; }
.search__status { min-height: 0; font-size: var(--fs-label); line-height: 1.5; color: var(--color-text); }
.search__status:not(:empty) { margin-top: var(--space-1); padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-bg-alt); }
.search__status a { font-weight: 600; }

/* ---------- Range chart: price ranges on one shared axis ----------
   <figure class="range-chart range-chart--avg" style="--avg: 40%">   (--avg + modifier: optional average line)
     <figcaption class="range-chart__caption">…</figcaption>
     <ol class="range-chart__rows">
       <li class="range-chart__row" style="--from: 14.33%; --to: 26.67%">
         <span class="range-chart__name">Budget</span><span class="range-chart__value">US$4,300–8,000</span>
         <span class="range-chart__track" aria-hidden="true"><span class="range-chart__bar"></span></span></li>
     </ol>
     <div class="range-chart__axis" aria-hidden="true"><span style="--at: 0%">US$0</span>…</div>
   </figure>
   --from / --to / --at / --avg are percentages of the axis maximum. Values are in the text,
   bars are decorative (aria-hidden). */
.range-chart { margin: 0; }
.range-chart__caption { margin-bottom: var(--space-4); font-size: var(--fs-sm); line-height: 1.5; color: var(--color-text-muted); }
.range-chart__rows { display: grid; gap: var(--space-5); }
.range-chart__row { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 6px var(--space-4); }
.range-chart__name { font-size: var(--fs-body); line-height: 1.3; font-weight: 700; color: var(--color-text); }
.range-chart__value { font-size: var(--fs-label); line-height: 1.3; font-weight: 600; color: var(--color-text); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.range-chart__track {
  grid-column: 1 / -1; position: relative; height: 20px;
  background:
    linear-gradient(to right, var(--color-border-strong) 1px, transparent 1px) 0 0 / calc(100% / 3) 100% repeat-x,
    var(--color-bg-alt);
  border-right: 1px solid var(--color-border-strong);
}
.range-chart__bar {
  position: absolute; top: 0; bottom: 0; left: var(--from); width: calc(var(--to) - var(--from));
  background: var(--color-primary); border-radius: 2px;
}
.range-chart--avg .range-chart__track::after {
  content: ""; position: absolute; top: -5px; bottom: -5px; left: var(--avg); width: 2px; margin-left: -1px;
  background: var(--color-text);
}
.range-chart__axis { position: relative; height: 1.6em; margin-top: var(--space-2); font-size: var(--fs-xs); line-height: 1.6; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.range-chart__axis > span { position: absolute; left: var(--at); transform: translateX(-50%); white-space: nowrap; }
.range-chart__axis > span:first-child { transform: none; }
.range-chart__axis > span:last-child { transform: translateX(-100%); }
.range-chart__legend { display: flex; align-items: center; gap: 10px; margin-top: var(--space-3); font-size: var(--fs-sm); line-height: 1.4; color: var(--color-text-soft); }
.range-chart__legend::before { content: ""; flex: none; width: 2px; height: 18px; background: var(--color-text); }
@media (min-width: 640px) {
  /* Name over value in a fixed label column; the bar takes the rest of the row */
  .range-chart__row { grid-template-columns: 10.5rem 1fr; grid-template-rows: auto auto; column-gap: var(--space-5); row-gap: 0; align-items: center; }
  .range-chart__name { grid-column: 1; grid-row: 1; }
  .range-chart__value { grid-column: 1; grid-row: 2; text-align: left; font-weight: 500; color: var(--color-text-soft); }
  .range-chart__track { grid-column: 2; grid-row: 1 / span 2; }
  .range-chart__axis { margin-left: calc(10.5rem + var(--space-5)); }
}

/* ---------- Simple page (trust pages) ---------- */
.page-hero { padding-block: var(--space-6) var(--space-8); background: var(--color-bg); border-bottom: 1px solid var(--color-border); }
.page-hero__inner { display: grid; gap: var(--space-4); max-width: var(--reading); }
.page-hero__title { font-size: var(--fs-h1); line-height: 1.08; letter-spacing: var(--ls-tight); color: var(--color-text); }
.page-hero__meta { font-size: var(--fs-sm); color: var(--color-text-muted); }
.page-body { padding-block: var(--space-10) var(--space-24); }
.page-body .prose { max-width: var(--reading-narrow); }
.page-body .prose h2 { font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem); margin-top: var(--space-12); }
.page-body .prose h2:first-child { margin-top: 0; }

/* Plain link list with hairline rules (404, simple indexes) */
.link-list { display: grid; border-top: 1px solid var(--color-border); max-width: var(--reading-narrow); }
.link-list li { border-bottom: 1px solid var(--color-border); }
.link-list a { display: block; padding: var(--space-4) 0; font-size: var(--fs-body); font-weight: 600; line-height: 1.4; }
.link-list span { display: block; margin-top: -10px; padding-bottom: var(--space-4); font-size: var(--fs-label); color: var(--color-text-soft); }

/* ---------- Print ---------- */
@media print {
  .site-header, .mobile-bar, .footer-crisis, .toc, .lead-card, .lead-magnet, .search, .nav-toggle { display: none !important; }
  body { background: #fff; padding: 0 !important; }
  a { color: inherit; }
  mark { background: none; font-weight: 700; }
  .photo { margin-inline: 0; break-inside: avoid; }
}

/* ---------- Inline citation markers (shared by all guides) ---------- */
.cite { font-size: 0.68em; line-height: 0; vertical-align: super; white-space: nowrap; }
.cite a { padding-inline: 1px; font-weight: 700; text-decoration: none; color: var(--color-primary); }
.cite a:hover { text-decoration: underline; }

/* ---------- Hub pages (/guides/, /treatment/) ---------- */
.hub-list { display: grid; margin: var(--space-6) 0 var(--space-10); border-top: 1px solid var(--color-border); }
.hub-list li { padding: var(--space-5) 0; border-bottom: 1px solid var(--color-border); }
.hub-list a { font-size: var(--fs-h3); font-weight: 650; line-height: 1.3; }
.hub-list p { margin-top: var(--space-2); font-size: var(--fs-body); color: var(--color-text-soft); }

.hub-item { display: grid; gap: var(--space-4); }
.hub-item--thumb { grid-template-columns: 112px minmax(0, 1fr); align-items: start; }
.hub-item__thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); outline: 1px solid var(--color-border); outline-offset: -1px; }
@media (min-width: 640px) { .hub-item--thumb { grid-template-columns: 200px minmax(0, 1fr); gap: var(--space-6); } }
