/* Chatbot Compass — design system v3 ("chart")
   Idea: a nautical chart for choosing AI. Chart-white paper, shallow-water blue for grouped areas,
   deep-navy ink, bearing blue for every action, and chart magenta — the colour real charts use for
   lights and buoys, the things you steer by — reserved for the needle and the top pick.
   Type: the platform's own UI font (SF Pro / Segoe UI). Light/dark follow the system unless the header switch is used.

   Token          Light     Dark      Role                         Contrast on --bg (light / dark)
   --bg           #F6F8F7   #0B1620   chart paper / night chart
   --bg-2         #E4EFF4   #0F1E2B   shallow water: grouped areas
   --card         #FFFFFF   #132331   raised content
   --label        #0F2233   #E6EEF2   deep navy ink                15.2 / 15.6
   --label-2      #45576A   #9FB3C2   secondary text                7.0 /  8.4
   --accent       #0A5A86   #7CC4EE   bearing blue: links, buttons  7.0 /  9.6
   --needle       #A3166F   #F28AC8   chart magenta: needle, top pick 6.8 / 8.0
   --ok           #11683A   #7AD9A2   verified / available
*/

:root {
  --bg: #F6F8F7; --bg-2: #E4EFF4; --card: #FFFFFF;
  --sep: #D7E2E8; --sep-strong: #B3C4CE;
  --label: #0F2233; --label-2: #45576A;
  --accent: #0A5A86; --accent-ink: #FFFFFF; --accent-soft: #E4EFF4; --accent-hover: #08466A;
  --needle: #A3166F;
  --ok: #11683A; --ok-soft: #E1F1E7;
  --warn: #8A4300; --warn-soft: #FBEEDD;
  --focus: #0A5A86;
  --band: #0F2233; --band-ink: #F6F8F7; --band-ink-2: #B9CCDA;
  --grid: rgba(10, 90, 134, .10);
  --header-bg: rgba(246, 248, 247, .84);
  --shadow-1: 0 1px 2px rgba(15, 34, 51, .06);
  --shadow-2: 0 1px 2px rgba(15, 34, 51, .05), 0 10px 28px -12px rgba(15, 34, 51, .18);
  --shadow-3: 0 2px 6px rgba(15, 34, 51, .06), 0 28px 56px -24px rgba(15, 34, 51, .32);

  --font: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px; --r-pill: 999px;
  --wrap: 1180px; --measure: 42rem;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1620; --bg-2: #0F1E2B; --card: #132331;
    --sep: #1F3344; --sep-strong: #2F4A5E;
    --label: #E6EEF2; --label-2: #9FB3C2;
    --accent: #7CC4EE; --accent-ink: #06121C; --accent-soft: #10283A; --accent-hover: #A6D7F5;
    --needle: #F28AC8;
    --ok: #7AD9A2; --ok-soft: #10301F;
    --warn: #F5B26B; --warn-soft: #3A2812;
    --focus: #7CC4EE;
    --band: #050D14; --band-ink: #E6EEF2; --band-ink-2: #9FB3C2;
    --grid: rgba(124, 196, 238, .08);
    --header-bg: rgba(11, 22, 32, .8);
    --shadow-1: 0 1px 0 rgba(255, 255, 255, .03);
    --shadow-2: 0 1px 0 rgba(255, 255, 255, .04), 0 10px 30px -12px rgba(0, 0, 0, .6);
    --shadow-3: 0 1px 0 rgba(255, 255, 255, .05), 0 28px 56px -20px rgba(0, 0, 0, .75);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1620; --bg-2: #0F1E2B; --card: #132331;
  --sep: #1F3344; --sep-strong: #2F4A5E;
  --label: #E6EEF2; --label-2: #9FB3C2;
  --accent: #7CC4EE; --accent-ink: #06121C; --accent-soft: #10283A; --accent-hover: #A6D7F5;
  --needle: #F28AC8;
  --ok: #7AD9A2; --ok-soft: #10301F;
  --warn: #F5B26B; --warn-soft: #3A2812;
  --focus: #7CC4EE;
  --band: #050D14; --band-ink: #E6EEF2; --band-ink-2: #9FB3C2;
  --grid: rgba(124, 196, 238, .08);
  --header-bg: rgba(11, 22, 32, .8);
  --shadow-1: 0 1px 0 rgba(255, 255, 255, .03);
  --shadow-2: 0 1px 0 rgba(255, 255, 255, .04), 0 10px 30px -12px rgba(0, 0, 0, .6);
  --shadow-3: 0 1px 0 rgba(255, 255, 255, .05), 0 28px 56px -20px rgba(0, 0, 0, .75);
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

/* Increased contrast (HIG color.md: supply an increased-contrast variant) */
@media (prefers-contrast: more) {
  :root { --label-2: #2A3A4A; --sep: #8FA3AF; --sep-strong: #5F7482; --accent: #07466A; --needle: #861059; }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --label-2: #CCDAE3; --sep: #4F6A7D; --sep-strong: #7F99AB; --accent: #A6D7F5; --needle: #F7B0DA; }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5.5rem; }
body {
  margin: 0; background: var(--bg); color: var(--label);
  font: 400 1.0625rem/1.6 var(--font); /* 17px — HIG mobile default body size */
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility; overflow-wrap: break-word;
  -webkit-tap-highlight-color: transparent;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); transition: text-decoration-color .15s; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--label); margin: 0 0 .5em; text-wrap: balance; font-weight: 700; }
h1 { font-size: clamp(2rem, 1.35rem + 2.6vw, 3.25rem); line-height: 1.08; letter-spacing: -.028em; }
h2 { font-size: clamp(1.45rem, 1.2rem + .9vw, 1.875rem); line-height: 1.18; letter-spacing: -.02em; }
h3 { font-size: 1.1875rem; line-height: 1.3; letter-spacing: -.01em; font-weight: 650; }
p, ul, ol { margin: 0 0 1.15em; }
p { text-wrap: pretty; }
strong { font-weight: 650; }
code, kbd, pre { font-family: var(--mono); font-size: .88em; }
code { background: var(--bg-2); border: 1px solid var(--sep); padding: .08em .38em; border-radius: 6px; }
hr { border: 0; border-top: 1px solid var(--sep); margin: 2.5rem 0; }

table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: .9375rem; }
th, td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--sep); vertical-align: top; }
thead th { font-size: .8125rem; font-weight: 600; color: var(--label-2); background: var(--bg-2); border-bottom-color: var(--sep-strong); white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { font-weight: 600; }
.table-scroll { overflow-x: auto; margin: 0 0 1.75rem; border: 1px solid var(--sep); border-radius: var(--r-md); background: var(--card); box-shadow: var(--shadow-1); overscroll-behavior-x: contain; }
.table-scroll table { min-width: 560px; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left)) 0 max(16px, env(safe-area-inset-right)); }
@media (min-width: 768px) { .wrap { padding-left: 32px; padding-right: 32px; } }
.fine { font-size: .875rem; line-height: 1.5; color: var(--label-2); }
main:focus { outline: none; }

.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--label); color: var(--bg); padding: .7rem 1rem; border-radius: var(--r-sm); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* ---------- header (functional layer: the only translucent surface) ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid color-mix(in srgb, var(--sep) 80%, transparent); }
@media (prefers-reduced-transparency: reduce) { .site-header { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; } }
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 60px; }
.logo { display: inline-flex; align-items: center; gap: .55rem; color: var(--label); text-decoration: none; font: 700 1.0625rem/1 var(--font-display); letter-spacing: -.015em; }
.logo-mark { color: var(--label); flex: none; }
.nav-toggle { margin-left: auto; display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--label); cursor: pointer; touch-action: manipulation; }
.nav-toggle:hover { background: var(--bg-2); }
.site-nav { display: none; }
.site-nav.open { display: block; position: absolute; left: 0; right: 0; top: 60px; background: var(--bg); border-bottom: 1px solid var(--sep); padding: .5rem 16px 1rem; box-shadow: var(--shadow-2); }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav li a { display: flex; align-items: center; min-height: 48px; padding: 0 .5rem; color: var(--label); text-decoration: none; font-weight: 500; font-size: 1.0625rem; border-bottom: 1px solid var(--sep); }
.site-nav li:last-child a { border-bottom: 0; }
.site-nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.nav-actions { display: flex; gap: .5rem; padding-top: .75rem; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-pill); border: 0; background: transparent; color: var(--label); cursor: pointer; transition: background-color .15s; }
.icon-btn:hover { background: var(--bg-2); }
@media (min-width: 900px) {
  .header-inner { min-height: 64px; }
  .nav-toggle { display: none; }
  .site-nav, .site-nav.open { display: flex; position: static; align-items: center; gap: .25rem; margin-left: auto; padding: 0; border: 0; background: none; box-shadow: none; }
  .site-nav ul { display: flex; gap: .125rem; }
  .site-nav li a { min-height: 40px; border: 0; padding: 0 .85rem; border-radius: var(--r-pill); font-size: .9375rem; color: var(--label-2); transition: background-color .15s, color .15s; }
  .site-nav li a:hover { background: var(--bg-2); color: var(--label); }
  .site-nav a[aria-current="page"] { color: var(--label); background: var(--bg-2); }
  .nav-actions { padding: 0; margin-left: .25rem; }
}

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .65rem 1.35rem; border-radius: var(--r-pill); border: 1px solid transparent; background: var(--accent); color: var(--accent-ink); font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s, transform .1s; touch-action: manipulation; }
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(.98); }
.btn-ghost { background: var(--card); color: var(--label); border-color: var(--sep-strong); }
.btn-ghost:hover { background: var(--bg-2); color: var(--label); }
.btn-small { min-height: 40px; padding: .4rem 1rem; font-size: .9375rem; }
label, .label { display: block; font-weight: 600; font-size: .9375rem; margin: 0 0 .4rem; }
.hint { display: block; font-weight: 400; font-size: .875rem; color: var(--label-2); margin-top: .1rem; }
input[type="text"], input[type="search"], input[type="email"], input[type="number"], select, textarea {
  width: 100%; min-height: 48px; padding: .7rem .9rem; border: 1px solid var(--sep-strong); border-radius: var(--r-md);
  background: var(--card); color: var(--label); font: inherit; font-size: 1rem; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--label-2) 80%, transparent); }
textarea { min-height: 8rem; resize: vertical; line-height: 1.55; }
input:hover, select:hover, textarea:hover { border-color: var(--label-2); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--warn); }
select { appearance: none; padding-right: 2.5rem; background-image: linear-gradient(45deg, transparent 50%, var(--label-2) 50%), linear-gradient(135deg, var(--label-2) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field { margin-bottom: 1.25rem; }
.field-row { display: grid; gap: 0 1rem; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; min-width: 0; }
legend { font-weight: 600; font-size: .9375rem; padding: 0; margin-bottom: .6rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { position: relative; display: inline-flex; margin: 0; font-weight: 400; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: .45rem 1rem; border: 1px solid var(--sep-strong); border-radius: var(--r-pill); background: var(--card); font-weight: 500; font-size: .9375rem; color: var(--label); transition: border-color .15s; }
.chip input:hover + span { border-color: var(--label-2); }
.chip input:checked + span { background: var(--label); color: var(--bg); border-color: var(--label); }
.chip span::before { content: "+"; display: inline-block; width: 1ch; text-align: center; font-weight: 600; color: var(--label-2); }
.chip input:checked + span::before { content: "✓"; color: inherit; }
.chip input[type="radio"] + span::before { content: "○"; width: 1.1em; }
.chip input[type="radio"]:checked + span::before { content: "●"; }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.status { min-height: 1.5em; font-size: .9375rem; color: var(--label-2); font-weight: 500; }

/* ---------- home: hero + compass (signature) ---------- */
.hero { padding: 2.5rem 0 3.5rem; background: var(--bg); border-bottom: 1px solid var(--sep); }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 960px) { .hero { padding: 4.5rem 0 5rem; } .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 4rem; } }
.hero h1 { font-size: clamp(2.35rem, 1.5rem + 3.6vw, 4rem); line-height: 1.03; letter-spacing: -.035em; }
.hero .lede { font-size: clamp(1.125rem, 1.05rem + .35vw, 1.3125rem); line-height: 1.5; color: var(--label-2); max-width: 34rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.trust-row { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; margin: 1.75rem 0 0; padding: 0; list-style: none; font-size: .875rem; color: var(--label-2); }
.trust-row li { display: inline-flex; align-items: center; gap: .4rem; }
.trust-row li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }

.compass { background: var(--card); border: 1px solid var(--sep); border-radius: var(--r-xl); box-shadow: var(--shadow-3); padding: 1.5rem; }
@media (min-width: 640px) { .compass { padding: 1.75rem; } }
.compass-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.compass-dial { width: 64px; height: 64px; flex: none; color: var(--label); }
.compass-dial .ticks { stroke: var(--sep-strong); }
.compass-dial .needle { transform-box: view-box; transform-origin: 50% 50%; transition: transform .7s var(--ease); }
.compass h2 { font-size: 1.25rem; margin: 0 0 .15rem; letter-spacing: -.015em; }
.compass p.small { margin: 0; font-size: .9375rem; color: var(--label-2); }
.compass-fieldset { margin: 0; }
.compass-results { margin-top: 1.25rem; border-top: 1px solid var(--sep); padding-top: 1rem; min-height: 12.5rem; }
.pick { display: grid; grid-template-columns: 2.25rem 1fr; gap: .1rem .75rem; padding: .7rem 0; border-bottom: 1px solid var(--sep); }
.pick:last-of-type { border-bottom: 0; }
.pick-rank { grid-row: span 2; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--bg-2); font: 700 .9375rem/1 var(--font); color: var(--label-2); }
.pick:first-of-type .pick-rank { background: var(--needle); color: var(--bg); }
.pick-name { font-weight: 650; }
.pick-why { font-size: .875rem; line-height: 1.45; color: var(--label-2); }
.empty-state { color: var(--label-2); font-size: .9375rem; }

.section { padding: 3.5rem 0; }
.section + .section { border-top: 1px solid var(--sep); }
.section-alt { background: var(--bg-2); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .5rem 1.5rem; margin-bottom: 1.75rem; }
.section-head h2 { margin: 0; }
.section-head > a { font-weight: 600; text-decoration: none; white-space: nowrap; }
.section-head > a:hover { text-decoration: underline; }
.num { display: block; font-size: .875rem; font-weight: 600; color: var(--label-2); margin-bottom: .35rem; letter-spacing: 0; }

/* ---------- cards ---------- */
.card-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.card { min-width: 0; }
.card-link { display: flex; flex-direction: column; gap: .4rem; height: 100%; padding: 1.2rem 1.25rem 1.3rem; background: var(--card); border: 1px solid var(--sep); border-radius: var(--r-md); color: var(--label); text-decoration: none; transition: border-color .15s; }
.card-link:hover { border-color: var(--accent); }
.card-link:hover .card-title { color: var(--accent); }
.card-kicker { font-size: .8125rem; font-weight: 600; color: var(--accent); }
.card-title { font: 650 1.125rem/1.3 var(--font-display); letter-spacing: -.012em; }
.card-desc { font-size: .9375rem; line-height: 1.5; color: var(--label-2); }

/* ---------- page + article ---------- */
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; padding: 0; margin: 1.5rem 0 0; font-size: .875rem; color: var(--label-2); }
.breadcrumbs li + li::before { content: "›"; margin-right: .35rem; color: var(--sep-strong); }
.breadcrumbs a { color: var(--label-2); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }
.page-head { padding: 1.25rem 0 2rem; margin-bottom: 2.25rem; border-bottom: 1px solid var(--sep); max-width: 50rem; }
.kicker { font-size: .875rem; font-weight: 600; color: var(--accent); margin: 0 0 .65rem; }
.lede { font-size: clamp(1.125rem, 1.06rem + .3vw, 1.25rem); line-height: 1.5; color: var(--label-2); max-width: 44rem; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1.1rem; font-size: .875rem; color: var(--label-2); margin: 0; }
.byline a { color: var(--label); font-weight: 600; text-decoration: none; }
.byline a:hover { text-decoration: underline; }
.checked { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .65rem; border-radius: var(--r-pill); background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.checked::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.article-layout { display: grid; gap: 2.5rem; }
@media (min-width: 1024px) { .article-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 4rem; } }
.prose { max-width: var(--measure); min-width: 0; font-size: 1.0625rem; line-height: 1.7; }
.prose h2 { margin-top: 2.75rem; scroll-margin-top: 5.5rem; }
.prose h3 { margin-top: 1.9rem; }
.prose li { margin-bottom: .4rem; }
.prose li::marker { color: var(--label-2); }
.prose blockquote { margin: 1.5rem 0; padding: 1rem 1.25rem; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--sep); font-size: 1rem; }
.prose blockquote p { margin: 0; }
.article-aside { min-width: 0; }
.toc { position: sticky; top: 6rem; font-size: .9375rem; }
.toc-h { font-size: .8125rem; font-weight: 600; color: var(--label-2); margin-bottom: .75rem; letter-spacing: 0; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--sep); }
.toc li { margin: 0; }
.toc a { display: block; padding: .35rem 0 .35rem .9rem; margin-left: -1px; border-left: 2px solid transparent; color: var(--label-2); text-decoration: none; line-height: 1.4; }
.toc a:hover { color: var(--label); }
.toc a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
@media (max-width: 1023px) { .toc { position: static; border: 1px solid var(--sep); border-radius: var(--r-lg); padding: 1rem 1.25rem; background: var(--card); } }

.callout { background: var(--accent-soft); border-radius: var(--r-md); padding: 1rem 1.25rem; margin: 1.5rem 0; }
.callout > :last-child { margin-bottom: 0; }
.callout.warn { background: var(--warn-soft); color: var(--label); }
.callout .kicker { color: var(--accent); }
.editor-note { border: 1.5px dashed var(--warn); background: var(--warn-soft); padding: 1rem 1.25rem; border-radius: var(--r-md); margin: 1.75rem 0; font-size: .9375rem; line-height: 1.55; }
.key-points { border: 1px solid var(--sep); border-radius: var(--r-lg); padding: 1.25rem 1.5rem; background: var(--card); box-shadow: var(--shadow-1); margin: 0 0 2.25rem; }
.key-points h2 { margin: 0 0 .6rem; font-size: 1.0625rem; letter-spacing: -.01em; }
.key-points ul { margin: 0; padding-left: 1.15rem; }
.key-points li { margin-bottom: .45rem; }

.faq details { border: 1px solid var(--sep); border-radius: var(--r-md); background: var(--card); margin-bottom: .6rem; transition: border-color .15s; }
.faq details[open] { border-color: var(--sep-strong); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer; padding: 1rem 1.15rem; min-height: 52px; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 1.25rem; font-weight: 400; color: var(--label-2); transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--accent); }
.faq-a { padding: 0 1.15rem .4rem; color: var(--label-2); }
.sources ol { font-size: .9375rem; padding-left: 1.25rem; }
.sources li { margin-bottom: .35rem; }
.related { margin: 3.5rem 0 1rem; padding-top: 2.5rem; border-top: 1px solid var(--sep); }
.hub { padding-bottom: 2rem; }
.hub > p, .hub > h2, .hub > ol, .hub > ul:not(.card-grid) { max-width: var(--measure); }
.hub > h2 { margin-top: 2.75rem; }
.legal { padding-bottom: 3rem; }

/* ---------- tools ---------- */
.tool { background: var(--card); border: 1px solid var(--sep); border-radius: var(--r-xl); padding: 1.25rem; margin: 0 0 2.75rem; box-shadow: var(--shadow-2); }
@media (min-width: 768px) { .tool { padding: 2rem; } }
.tool h2 { margin-top: 0; }
.tool-output { margin-top: 1.25rem; }
.output-box { position: relative; background: var(--bg-2); border: 1px solid var(--sep); border-radius: var(--r-md); padding: 1rem 1.1rem; white-space: pre-wrap; font: .9375rem/1.6 var(--mono); min-height: 6rem; max-height: 28rem; overflow: auto; }
.output-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; align-items: center; }
.stats { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin: 1.25rem 0; }
.stat { background: var(--bg-2); border-radius: var(--r-md); padding: .9rem 1rem; }
.stat-v { display: block; font: 700 1.625rem/1.1 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-l { font-size: .8125rem; color: var(--label-2); }
.meter { height: 8px; background: var(--bg-2); border-radius: var(--r-pill); overflow: hidden; margin: .5rem 0 1rem; }
.meter > span { display: block; height: 100%; background: var(--accent); width: 0; border-radius: inherit; transition: width .35s var(--ease); }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.check-list li { display: flex; gap: .65rem; padding: .7rem .9rem; border-radius: var(--r-md); background: var(--bg-2); font-size: .9375rem; line-height: 1.45; }
.check-list li.ok::before, .check-list li.flag::before { flex: none; display: grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; font-size: .75rem; font-weight: 800; }
.check-list li.ok::before { content: "✓"; background: var(--ok-soft); color: var(--ok); }
.check-list li.flag::before { content: "!"; background: var(--warn-soft); color: var(--warn); }
.prompt-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); list-style: none; padding: 0; margin: 1rem 0 0; }
.prompt-card { background: var(--bg); border: 1px solid var(--sep); border-radius: var(--r-lg); padding: 1.1rem; display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.prompt-card h3 { font-size: 1.0625rem; margin: 0; }
.prompt-meta { display: flex; gap: .4rem; flex-wrap: wrap; font-size: .8125rem; font-weight: 600; color: var(--accent); }
.prompt-text { white-space: pre-wrap; font: .8125rem/1.55 var(--mono); max-height: 9rem; overflow: auto; background: var(--card); border: 1px solid var(--sep); padding: .7rem .8rem; border-radius: var(--r-sm); color: var(--label-2); }
.badge { display: inline-block; padding: .2rem .6rem; border-radius: var(--r-pill); font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.b-yes { background: var(--ok-soft); color: var(--ok); }
.b-limited { background: var(--warn-soft); color: var(--warn); }
.b-paid, .b-no, .b-unverified { background: var(--bg-2); color: var(--label-2); }
.quiz-q { margin-bottom: 1.75rem; }
.quiz-q legend { font-size: 1.0625rem; }
#quiz-result .callout h3 { margin: .2rem 0 .5rem; font-size: 1.5rem; }

/* ---------- ad slots (rendered only when adsEnabled is true) ---------- */
.ad-slot { display: block; margin: 2rem auto; text-align: center; contain: layout; }
.ad-label { display: block; font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; color: var(--label-2); margin-bottom: .3rem; }
.ad-header { min-height: 100px; max-width: 728px; }
@media (min-width: 768px) { .ad-header { min-height: 90px; } }
.ad-incontent { min-height: 280px; max-width: 336px; }
@media (min-width: 768px) { .ad-incontent { max-width: 728px; min-height: 250px; } }
.ad-sidebar { min-height: 600px; width: 260px; position: sticky; top: 22rem; }
.ad-footer { min-height: 250px; max-width: 970px; }

/* ---------- footer (quiet: branding defers to content) ---------- */
.site-footer { margin-top: 4rem; background: var(--bg-2); color: var(--label-2); border-top: 1px solid var(--sep); padding: 3rem 0 2rem; font-size: .9375rem; }
.site-footer a { color: var(--label-2); text-decoration: none; }
.site-footer a:hover { color: var(--label); text-decoration: underline; }
.site-footer .logo { color: var(--label); }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; max-width: 26rem; }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1.3fr 1fr; } .footer-brand { grid-column: auto; } }
.footer-brand p { margin: .75rem 0 0; }
.footer-h { font-size: .8125rem; font-weight: 600; color: var(--label); margin-bottom: .6rem; letter-spacing: 0; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 32px; }
.site-footer .fine { font-size: .8125rem; }
.footer-bottom { border-top: 1px solid var(--sep); margin-top: 2.5rem; padding-top: 1.25rem; font-size: .8125rem; }
.footer-bottom p { margin: 0; }

/* ---------- motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (pointer: fine) and (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media print { .site-header, .site-footer, .article-aside, .ad-slot, .related, .nav-toggle, .tool { display: none !important; } body { background: #fff; color: #000; } a { color: #000; } }

/* ---------- theme switch: moon in light, sun in dark ---------- */
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
}

/* ======================================================================
   Landing page v3 — chart theme
   ====================================================================== */
.section-title { font-size: clamp(1.6rem, 1.25rem + 1.3vw, 2.25rem); line-height: 1.12; letter-spacing: -.025em; max-width: 24ch; margin: 0 0 1.75rem; }
.section-head .section-title { margin: 0; }

/* hero */
.hero { padding: 2.75rem 0 3.5rem; }
@media (min-width: 960px) { .hero { padding: 5rem 0 5.5rem; } }
.hero h1 { max-width: 15ch; }
.hero-stamp { margin: 0 0 1.25rem; font-size: .875rem; }
.hero-visual { position: relative; }
/* chart graticule behind the instrument: lines of latitude/longitude, fading out */
.hero-visual::before {
  content: ""; position: absolute; inset: -32px -16px; z-index: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 36px 36px; background-position: center;
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent 100%); mask-image: radial-gradient(closest-side, #000 55%, transparent 100%);
}
.hero-visual .compass { position: relative; z-index: 1; }
.compass h2 { font-size: 1.1875rem; }

/* route: a real three-step sequence, drawn as a plotted course */
.route { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.75rem; counter-reset: leg; }
.route-step { position: relative; counter-increment: leg; padding-left: 3.5rem; }
.route-step::before {
  content: counter(leg); position: absolute; left: 0; top: 0; display: grid; place-items: center;
  width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 2px solid var(--label); background: var(--bg);
  font-weight: 700; font-size: 1rem; color: var(--label); z-index: 1;
}
.route-step:not(:last-child)::after { content: ""; position: absolute; left: calc(1.25rem - 1px); top: 2.75rem; bottom: -1.5rem; border-left: 2px dashed var(--accent); opacity: .55; }
.route-step h3 { margin: .35rem 0 .4rem; font-size: 1.1875rem; }
.route-step p { color: var(--label-2); margin-bottom: .6rem; }
.route-step a { font-weight: 600; }
@media (min-width: 860px) {
  .route { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
  .route-step { padding-left: 0; padding-top: 3.75rem; }
  .route-step:not(:last-child)::after { left: 3rem; right: -2rem; top: calc(1.25rem - 1px); bottom: auto; border-left: 0; border-top: 2px dashed var(--accent); }
}

/* price ledger */
.ledger-grid { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 960px) { .ledger-grid { grid-template-columns: .9fr 1.1fr; gap: 4rem; } }
.ledger-copy p { color: var(--label-2); max-width: 34rem; }
.ledger-table { margin: 0; box-shadow: var(--shadow-2); }
.ledger-table table { min-width: 0; font-size: 1rem; }
.ledger-table caption { caption-side: bottom; text-align: left; padding: .75rem .9rem; font-size: .8125rem; color: var(--label-2); border-top: 1px solid var(--sep); }
.ledger-table thead th { background: var(--card); }
.ledger-table td { font-weight: 600; text-align: right; white-space: nowrap; }
.ledger-table thead th:not(:first-child) { text-align: right; }
.ledger-maker { display: block; font-weight: 400; font-size: .8125rem; }
.ledger-maker a { color: var(--label-2); }

/* tools */
.tools-layout { display: grid; gap: 1rem; }
@media (min-width: 900px) { .tools-layout { grid-template-columns: 1fr 1fr 1.25fr; align-items: stretch; } .feature-tile { min-height: 15rem; } }
.feature-tile { display: flex; flex-direction: column; justify-content: flex-end; gap: .5rem; min-height: 9rem; padding: 1.5rem; border-radius: var(--r-lg); background: var(--bg-2); color: var(--label); text-decoration: none; border: 1px solid transparent; transition: border-color .15s; position: relative; overflow: hidden; }
.feature-tile:hover { border-color: var(--accent); }
.feature-tile:hover .tile-title { color: var(--accent); }
.tile-title { font: 700 1.375rem/1.2 var(--font-display); letter-spacing: -.02em; max-width: 16ch; }
.tile-desc { color: var(--label-2); font-size: .9375rem; line-height: 1.5; }

/* row lists (tools + reading) */
.row-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--sep); }
.row-list li { border-bottom: 1px solid var(--sep); }
.row-list a { display: grid; gap: .15rem; padding: .9rem .25rem; color: var(--label); text-decoration: none; }
.row-list a:hover .row-title { color: var(--accent); text-decoration: underline; text-underline-offset: .2em; }
.row-title { font-weight: 650; }
.row-desc { font-size: .9375rem; color: var(--label-2); }
.tools-layout .row-list { border-top: 0; }
@media (min-width: 900px) { .tools-layout .row-list a { padding: .7rem .25rem; } }
.read-grid { display: grid; gap: 2.5rem; }
@media (min-width: 860px) { .read-grid { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.col-title { font-size: 1rem; margin: 0 0 .5rem; }
.col-title a { color: var(--label-2); text-decoration: none; }
.col-title a:hover { color: var(--accent); }

/* independence band */
.band { background: var(--band); color: var(--band-ink); padding: 3.5rem 0; }
.band h2 { color: var(--band-ink); font-size: clamp(1.6rem, 1.25rem + 1.3vw, 2.25rem); letter-spacing: -.025em; max-width: 20ch; }
.band p { color: var(--band-ink-2); max-width: 38rem; margin: 0; }
.band a { color: var(--band-ink); }
.band :focus-visible { outline-color: var(--band-ink); }
.band-grid { display: grid; gap: 2rem; align-items: end; }
@media (min-width: 860px) { .band-grid { grid-template-columns: 1.4fr 1fr; } .band-cta { justify-self: end; } }
.band-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }
.band .btn-on-band { background: var(--band-ink); color: var(--band); text-decoration: none; }
.band .btn-on-band:hover { background: var(--band-ink-2); color: var(--band); }
.band-link { font-weight: 600; }
.band + .site-footer { margin-top: 0; }
.section-alt + .band, .section + .band { border-top: 0; }
