:root{color-scheme:light;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}body{margin:0;font:14px system-ui,-apple-system,sans-serif;background:#F2F5F3}img{max-width:100%}[hidden]{display:none!important}


/* Layout: one app shell, top nav, single centred column (max 960px); views swap in place. Amber = "for hire" signal, deep green = licensed, trusted. */
:root {
  --bg: #F2F5F3;
  --surface: #FFFFFF;
  --sunk: #E7ECE9;
  --ink: #10201D;
  --muted: #56665F;
  --line: #D6DFDA;
  --deep: #0E2B26;
  --deep-ink: #EAF3EF;
  --deep-muted: #A9C2BA;
  --accent: #E9A200;
  --accent-ink: #1C1400;
  --accent-soft: #FFF2D1;
  --good: #1D7F4F;
  --good-soft: #E1F3E9;
  --bad: #B83A26;
  --bad-soft: #FBE6E1;
  --focus: #2F6FEB;
  --f-display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --r: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A1412; --surface: #111F1C; --sunk: #0D1917; --ink: #E6EEEA; --muted: #93A59E; --line: #22342F;
    --deep: #0F2E28; --deep-ink: #EAF3EF; --deep-muted: #9DB8AF;
    --accent: #F3B324; --accent-ink: #1C1400; --accent-soft: #3A2D0A;
    --good: #4CC487; --good-soft: #10291E; --bad: #F07A63; --bad-soft: #33150F; --focus: #7FA7FF;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A1412; --surface: #111F1C; --sunk: #0D1917; --ink: #E6EEEA; --muted: #93A59E; --line: #22342F;
  --deep: #0F2E28; --deep-ink: #EAF3EF; --deep-muted: #9DB8AF;
  --accent: #F3B324; --accent-ink: #1C1400; --accent-soft: #3A2D0A;
  --good: #4CC487; --good-soft: #10291E; --bad: #F07A63; --bad-soft: #33150F; --focus: #7FA7FF;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.55; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.1; text-wrap: balance; margin: 0; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: 960px; margin: 0 auto; padding-inline: 16px; }

/* Top bar */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; padding-block: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); background: none; border: 0; padding: 0; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: 15px; letter-spacing: .02em; }
.brand-name { font-family: var(--f-display); font-weight: 800; font-size: 19px; letter-spacing: -.01em; }
.brand-name span { color: var(--muted); font-weight: 600; }
.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav button { background: none; border: 0; padding: 8px 12px; border-radius: 999px; color: var(--muted); font-weight: 700; font-size: 14.5px; white-space: nowrap; }
.nav button[aria-current="page"] { background: var(--ink); color: var(--bg); }
.nav button:hover:not([aria-current="page"]) { color: var(--ink); background: var(--sunk); }
@media (max-width: 560px) { .nav { margin-left: 0; width: 100%; } }

main { padding-block: 28px 64px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 13px 20px; font-weight: 700; font-size: 16px; min-height: 48px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--muted); }
.btn-on-deep { background: transparent; color: var(--deep-ink); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--deep-ink) 35%, transparent); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* Hero */
.hero { background: var(--deep); color: var(--deep-ink); border-radius: 22px; padding: 32px 28px; display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px; align-items: center; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; padding: 24px 20px; gap: 24px; } }
.council-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--deep-muted); }
.council-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; }
.hero h1 { font-size: clamp(32px, 5.4vw, 50px); font-weight: 800; letter-spacing: -.02em; margin-top: 14px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lede { margin-top: 14px; color: var(--deep-muted); font-size: 17px; max-width: 46ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

.demo { background: var(--surface); color: var(--ink); border-radius: 16px; padding: 18px; box-shadow: 0 18px 40px -18px rgba(0,0,0,.45); }
.demo-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.demo-q { font-weight: 700; margin-top: 8px; font-size: 16.5px; line-height: 1.4; }
.demo .opts { margin-top: 12px; }

/* Facts strip */
.facts { margin-top: 18px; display: grid; grid-template-columns: repeat(6, 1fr); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.fact { padding: 14px 14px 12px; border-right: 1px solid var(--line); min-width: 0; }
.fact:last-child { border-right: 0; }
.fact b { display: block; font-family: var(--f-display); font-size: 26px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.fact span { font-size: 13px; color: var(--muted); }
@media (max-width: 760px) { .facts { grid-template-columns: repeat(3, 1fr); } .fact:nth-child(3) { border-right: 0; } .fact:nth-child(-n+3) { border-bottom: 1px solid var(--line); } }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-top: 40px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.section-head p { color: var(--muted); font-size: 15px; }

/* Topic grid */
.topics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 760px) { .topics { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px) { .topics { grid-template-columns: 1fr; } }
.topic { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; transition: border-color .15s, transform .15s; }
.topic:hover { border-color: var(--muted); transform: translateY(-1px); }
.topic-top { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.topic h3 { font-size: 17px; font-weight: 600; font-family: var(--f-body); font-weight: 700; }
.topic p { font-size: 14px; color: var(--muted); }
.meter { height: 6px; background: var(--sunk); border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--good); border-radius: 99px; }
.topic-foot { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.chip-key { background: var(--accent-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent); }
.chip-soon { background: var(--sunk); color: var(--muted); }

/* Councils */
.councils { display: flex; gap: 8px; flex-wrap: wrap; }
.council { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 14.5px; }
.council.active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.council.soon { color: var(--muted); }

/* Quiz */
.quiz-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.quiz-head h2 { font-size: 22px; font-weight: 800; }
.quiz-head .spacer { flex: 1; }
.timer { font-family: var(--f-mono); font-size: 18px; font-weight: 500; padding: 6px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.timer.low { color: var(--bad); border-color: var(--bad); }
.progress { height: 6px; background: var(--sunk); border-radius: 99px; overflow: hidden; margin-bottom: 18px; }
.progress i { display: block; height: 100%; background: var(--accent); transition: width .25s; }

.qcard { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
@media (max-width: 560px) { .qcard { padding: 18px; } }
.qmeta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); font-weight: 700; }
.qmeta .num { font-family: var(--f-mono); font-weight: 500; }
.qtext { font-size: 20px; font-weight: 700; line-height: 1.4; margin-top: 12px; max-width: 60ch; }
@media (max-width: 560px) { .qtext { font-size: 18px; } }
.opts { display: grid; gap: 10px; margin-top: 18px; }
.opt { display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; padding: 14px 16px; border-radius: 12px; background: var(--bg); border: 1.5px solid var(--line); font-size: 16px; line-height: 1.4; }
.opt:hover:not([disabled]) { border-color: var(--muted); }
.opt .letter { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-family: var(--f-mono); font-size: 14px; background: var(--surface); border: 1px solid var(--line); }
.opt.picked { border-color: var(--ink); background: var(--surface); }
.opt.picked .letter { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.opt.right { border-color: var(--good); background: var(--good-soft); }
.opt.right .letter { background: var(--good); color: var(--surface); border-color: var(--good); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.opt.wrong .letter { background: var(--bad); color: var(--surface); border-color: var(--bad); }
.opt[disabled] { cursor: default; }
.opt span { min-width: 0; }

.explain { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--sunk); font-size: 15px; }
.explain b.ok { color: var(--good); }
.explain b.no { color: var(--bad); }
.explain .src { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }

.qnav { display: flex; gap: 10px; justify-content: space-between; margin-top: 18px; flex-wrap: wrap; }
.qnav .right { display: flex; gap: 10px; margin-left: auto; }

.grid-nav { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; margin-top: 18px; }
@media (max-width: 640px) { .grid-nav { grid-template-columns: repeat(7, 1fr); } }
.grid-nav button { aspect-ratio: 1; max-width: 100%; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-family: var(--f-mono); font-size: 12.5px; padding: 0; }
.grid-nav button.done { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.grid-nav button.cur { box-shadow: 0 0 0 2px var(--accent); }

.confirm { margin-top: 14px; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--accent); background: var(--accent-soft); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.confirm p { flex: 1 1 220px; font-weight: 700; }

/* Results */
.result-hero { border-radius: 20px; padding: 28px; display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; background: var(--deep); color: var(--deep-ink); }
@media (max-width: 560px) { .result-hero { grid-template-columns: 1fr; padding: 22px; } }
.score-ring { width: 132px; height: 132px; position: relative; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring .lbl { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.score-ring b { font-family: var(--f-display); font-size: 34px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.score-ring small { display: block; font-size: 13px; color: var(--deep-muted); }
.verdict { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.verdict.pass { color: #7EE2AE; }
.verdict.fail { color: #FFA18E; }
.result-hero h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; margin-top: 6px; }
.result-hero p { color: var(--deep-muted); margin-top: 8px; }
.result-stats { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 14px; }
.result-stats div b { display: block; font-family: var(--f-display); font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.result-stats div span { font-size: 13px; color: var(--deep-muted); }

.review { display: grid; gap: 10px; }
.rev { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.rev .mark { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; color: var(--surface); }
.rev .mark.ok { background: var(--good); }
.rev .mark.no { background: var(--bad); }
.rev .q { font-weight: 700; }
.rev .a { font-size: 14.5px; color: var(--muted); margin-top: 4px; }
.rev .a strong { color: var(--ink); }
.rev > div { min-width: 0; }

/* Key facts */
.facts-sheet { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .facts-sheet { grid-template-columns: 1fr; } }
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; min-width: 0; }
.sheet h3 { font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.sheet table { width: 100%; border-collapse: collapse; font-size: 15px; }
.sheet td { padding: 9px 0; border-top: 1px solid var(--line); vertical-align: top; }
.sheet tr:first-child td { border-top: 0; }
.sheet td.t { font-family: var(--f-mono); font-size: 14px; white-space: nowrap; padding-right: 14px; font-weight: 500; color: var(--ink); }
.sheet ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 15px; }

.note { margin-top: 28px; font-size: 13.5px; color: var(--muted); max-width: 72ch; }
.note a { color: var(--ink); }

.practice-pick { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }

footer { border-top: 1px solid var(--line); padding-block: 22px 40px; font-size: 13px; color: var(--muted); }
footer .wrap { display: grid; gap: 6px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }


/* ---- v2 additions ---- */
.dash { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 12px; margin-top: 18px; }
@media (max-width: 760px) { .dash { grid-template-columns: 1fr 1fr; } .dash .ready { grid-column: 1 / -1; } }
@media (max-width: 420px) { .dash { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.panel-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.big { font-family: var(--f-display); font-weight: 800; font-size: 34px; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.big small { font-size: 16px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.panel p { font-size: 14.5px; color: var(--muted); }
.panel .btn { align-self: flex-start; min-height: 42px; padding: 9px 16px; font-size: 15px; }
.ready-bar { position: relative; height: 10px; background: var(--sunk); border-radius: 99px; overflow: hidden; }
.ready-bar i { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 99px; }
.ready-bar b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); left: 75%; }
.ready-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--sunk); color: var(--ink); text-transform: none; letter-spacing: 0; }
.status.go { background: var(--good-soft); color: var(--good); }
.status.warn { background: var(--accent-soft); color: var(--ink); }
.week { display: flex; gap: 5px; }
.week span { flex: 1; height: 26px; border-radius: 6px; background: var(--sunk); display: grid; place-items: center; font-size: 11px; color: var(--muted); font-weight: 700; }
.week span.on { background: var(--good); color: var(--surface); }
.week span.today { box-shadow: inset 0 0 0 2px var(--ink); }
.done-tag { color: var(--good); font-weight: 700; font-size: 14.5px; }

.weak-flag { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--bad); }

.tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.tool { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.tool:hover { color: var(--ink); border-color: var(--muted); }
.tool[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tool svg { width: 15px; height: 15px; flex: none; }

.words { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 10px; }
.words summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--muted); }
.words dl { margin: 10px 0 0; display: grid; gap: 8px; }
.words dt { font-weight: 700; font-size: 14.5px; }
.words dd { margin: 0; font-size: 14.5px; color: var(--muted); }

.report { margin-top: 14px; padding: 14px; border-radius: 12px; background: var(--sunk); display: grid; gap: 10px; }
.report label { font-size: 13.5px; font-weight: 700; display: grid; gap: 6px; }
.report select, .report textarea { font: inherit; font-size: 15px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; }
.report textarea { min-height: 72px; resize: vertical; }
.report .row { display: flex; gap: 10px; flex-wrap: wrap; }
.report .msg { font-size: 14px; font-weight: 700; }
.report .msg.ok { color: var(--good); }
.report .msg.no { color: var(--bad); }

.coach { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .coach { grid-template-columns: 1fr; } }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 4px 10px; align-items: center; font-size: 14px; }
.bar-row .track { grid-column: 1 / -1; height: 8px; background: var(--sunk); border-radius: 99px; overflow: hidden; }
.bar-row .track i { display: block; height: 100%; border-radius: 99px; }
.bar-row .pct { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--f-mono); font-size: 13px; }
.callout { border-radius: var(--r); padding: 16px; display: grid; gap: 8px; align-content: start; }
.callout.weak { background: var(--bad-soft); }
.callout.strong { background: var(--good-soft); }
.callout h3 { font-size: 18px; font-weight: 800; }
.callout p { font-size: 14.5px; }
.callout .btn { justify-self: start; min-height: 42px; padding: 9px 16px; font-size: 15px; }

.notes-head { display: grid; gap: 8px; }
.notes-head h1 { font-size: clamp(28px, 4.5vw, 40px); font-weight: 800; letter-spacing: -.02em; }
.crumbs { font-size: 13.5px; color: var(--muted); }
.crumbs button { background: none; border: 0; padding: 0; color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.meta-line { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13.5px; color: var(--muted); }
.notes { margin-top: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; }
.notes ul { margin: 0; padding-left: 20px; display: grid; gap: 10px; max-width: 68ch; }
.notes li { font-size: 16px; }
.study-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
@media (max-width: 560px) { .study-list { grid-template-columns: 1fr; } }
.study-link { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.study-link:hover { border-color: var(--muted); }
.study-link b { font-size: 16px; }
.study-link span { font-size: 13px; color: var(--muted); white-space: nowrap; }

.gloss-search { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.gloss { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
@media (max-width: 640px) { .gloss { grid-template-columns: 1fr; } }
.gterm { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.gterm b { font-size: 16px; display: block; }
.gterm p { font-size: 14.5px; color: var(--muted); margin-top: 4px; }

.legal { max-width: 70ch; display: grid; gap: 14px; }
.legal h1 { font-size: clamp(28px, 4.5vw, 38px); font-weight: 800; }
.legal h2 { font-size: 20px; font-weight: 800; margin-top: 8px; }
.legal p, .legal li { font-size: 16px; }
.legal ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
/* ---- v3: neutral home + council hub ---- */
.subnav { border-top: 1px solid var(--line); }
.subnav .wrap { display: flex; align-items: center; gap: 12px; padding-block: 8px; flex-wrap: wrap; }
.sub-council { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sub-council b { font-family: var(--f-display); font-weight: 800; font-size: 17px; white-space: nowrap; }
.sub-council button { background: none; border: 0; padding: 0; font-size: 13px; font-weight: 700; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.subtabs { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.subtabs button { background: none; border: 0; padding: 7px 12px; border-radius: 8px; font-weight: 700; font-size: 14.5px; color: var(--muted); white-space: nowrap; }
.subtabs button[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.subtabs button:hover:not([aria-current="page"]) { color: var(--ink); background: var(--sunk); }
@media (max-width: 560px) { .subtabs { margin-left: 0; width: 100%; } }

.landing-hero { padding-block: 12px 8px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
@media (max-width: 760px) { .landing-hero { grid-template-columns: 1fr; gap: 22px; } }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; }
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; }
.landing-hero h1 { font-size: clamp(34px, 6vw, 58px); font-weight: 800; letter-spacing: -.025em; margin-top: 12px; }
.landing-hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, var(--accent) 62%); padding: 0 .08em; }
.landing-hero .lede { margin-top: 16px; color: var(--muted); font-size: 18px; max-width: 48ch; }
.landing-hero .demo { box-shadow: 0 18px 40px -22px rgba(16,32,29,.35); border: 1px solid var(--line); }

.continue { margin-top: 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--deep); color: var(--deep-ink); border-radius: var(--r); padding: 14px 16px; }
.continue p { flex: 1 1 220px; }
.continue p b { font-family: var(--f-display); font-size: 18px; }
.continue p span { display: block; font-size: 14px; color: var(--deep-muted); }

.council-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 760px) { .council-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px) { .council-grid { grid-template-columns: 1fr; } }
.ccard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ccard.live { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.ccard-top { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.ccard h3 { font-size: 20px; font-weight: 800; }
.ccard .region { font-size: 13px; color: var(--muted); }
.ccard p { font-size: 14.5px; color: var(--muted); }
.ccard .btn { align-self: flex-start; min-height: 42px; padding: 9px 16px; font-size: 15px; margin-top: auto; }
.chip-live { background: var(--good-soft); color: var(--good); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
@media (max-width: 760px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px) { .features { grid-template-columns: 1fr; } }
.feature { background: var(--surface); padding: 18px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.feature svg { width: 26px; height: 26px; color: var(--ink); }
.feature h3 { font-size: 17px; font-weight: 700; font-family: var(--f-body); }
.feature p { font-size: 14.5px; color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; counter-reset: step; }
@media (max-width: 700px) { .steps { grid-template-columns: 1fr; } }
.step { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.step::before { counter-increment: step; content: counter(step); width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: 18px; }
.step h3 { font-size: 17px; font-weight: 700; font-family: var(--f-body); }
.step p { font-size: 14.5px; color: var(--muted); margin-top: 2px; }

.faq { display: grid; gap: 8px; max-width: 760px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin-top: 8px; color: var(--muted); font-size: 15px; }

/* ---- v4: council info page ---- */
.sub-council button[aria-current="page"] { color: var(--ink); }
.glance { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
@media (max-width: 640px) { .glance { grid-template-columns: repeat(2, 1fr); } }
.gl { background: var(--surface); padding: 16px; display: grid; gap: 4px; align-content: start; min-width: 0; }
.gl-l { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.gl b { font-family: var(--f-display); font-weight: 800; font-size: 28px; line-height: 1.1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.gl b.np { font-family: var(--f-body); font-size: 17px; color: var(--muted); font-weight: 700; padding-block: 6px 2px; }
.gl-n { font-size: 13.5px; color: var(--muted); }
.key-note { margin-top: 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 15px; font-weight: 700; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
@media (max-width: 700px) { .about-grid { grid-template-columns: 1fr; } }
.ph { font-size: 18px; font-weight: 800; }
.steps-list { margin: 0; padding-left: 22px; display: grid; gap: 10px; font-size: 15.5px; }
.steps-list li::marker { font-family: var(--f-display); font-weight: 800; color: var(--ink); }
.req-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 15.5px; }
.req-list li { padding-left: 24px; position: relative; }
.req-list li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.req-list.ok li::before { content: "✓"; background: none; color: var(--good); font-weight: 700; top: 0; left: 2px; width: auto; height: auto; }
.req-list.no li::before { content: "–"; background: none; color: var(--muted); font-weight: 700; top: 0; left: 4px; width: auto; height: auto; }
.src-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 15px; }
.src-list a { color: var(--ink); text-underline-offset: 3px; }

.back-btn { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 8px 10px 8px 4px; margin: -6px 0 10px -4px; font-weight: 700; font-size: 15px; color: var(--ink); border-radius: 10px; min-height: 44px; }
.back-btn:hover { background: var(--sunk); }
.back-btn svg { width: 20px; height: 20px; }

/* ---- v5: revision system, pictures, forms ---- */
.dash { grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) { .dash { grid-template-columns: 1fr 1fr; } .dash .ready { grid-column: auto; } }
@media (max-width: 560px) { .dash { grid-template-columns: 1fr; } }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.row-btns .btn { min-height: 42px; padding: 9px 16px; font-size: 15px; }
.linkish { background: none; border: 0; padding: 0; font-size: 13px; font-weight: 700; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-transform: none; letter-spacing: 0; justify-self: start; align-self: flex-start; }
.date-row { display: flex; gap: 8px; flex-wrap: wrap; }
.date-row input { font: inherit; font-size: 16px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); min-width: 0; flex: 1 1 160px; }
.date-row .btn { min-height: 42px; padding: 9px 16px; font-size: 15px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.qimg { margin: 16px 0 0; padding: 14px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; display: grid; place-items: center; }
.qimg svg { width: 100%; max-width: 280px; height: auto; }
.req-list.check li::before { content: "☐"; background: none; color: var(--ink); top: 0; left: 0; width: auto; height: auto; font-size: 16px; line-height: 1.4; }
.check-row { display: flex !important; gap: 8px; align-items: flex-start; font-weight: 400 !important; font-size: 14.5px !important; }
.check-row input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.passform { display: grid; gap: 12px; max-width: 560px; }
.passform label { font-size: 14px; font-weight: 700; display: grid; gap: 6px; }
.passform select, .passform textarea, .signup input[type=email] { font: inherit; font-size: 15px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; }
.passform textarea { min-height: 80px; }
.msg { font-size: 14px; font-weight: 700; }
.msg.ok { color: var(--good); }
.msg.no { color: var(--bad); }
.notify summary { cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.signup { display: grid; gap: 8px; margin-top: 10px; }
.signup .btn { justify-self: start; min-height: 40px; padding: 8px 14px; font-size: 14.5px; }
.transfer { margin-top: 16px; }
.codebox { width: 100%; min-height: 84px; font-family: var(--f-mono); font-size: 12px; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--sunk); color: var(--ink); word-break: break-all; }

.sizes { display: flex; gap: 6px; flex-wrap: wrap; }
.size { min-width: 48px; min-height: 44px; padding: 6px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); font-family: var(--f-mono); font-size: 15px; font-weight: 500; color: var(--ink); display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.size small { font-family: var(--f-body); font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.size.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.size.on small { color: var(--bg); opacity: .8; }

/* ---- v6: setup, flags, share, text size ---- */
#app, footer { zoom: var(--zoom, 1); }
.textsize { display: inline-flex; align-items: baseline; gap: 1px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; min-width: 44px; min-height: 40px; padding: 0 10px; font-family: var(--f-display); font-weight: 800; color: var(--ink); justify-content: center; }
.textsize span:first-child { font-size: 13px; }
.textsize span:last-child { font-size: 19px; }
.textsize[data-level="1"], .textsize[data-level="2"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
@media (max-width: 560px) { .top .wrap { position: relative; } .textsize { position: absolute; right: 16px; top: 12px; } }
.grid-nav button.flagged { box-shadow: inset 0 -4px 0 var(--accent); }
.grid-nav button.flagged.cur { box-shadow: 0 0 0 2px var(--accent), inset 0 -4px 0 var(--accent); }
.flagtool[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.share { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.share .btn { min-height: 42px; padding: 9px 16px; font-size: 15px; text-decoration: none; }
.share .btn svg { width: 17px; height: 17px; }
.setup { display: grid; gap: 14px; margin-top: 18px; max-width: 760px; }
.setup fieldset { margin: 0; min-width: 0; }
.setup legend { display: flex; align-items: center; gap: 10px; padding: 0; margin-bottom: 10px; }
.stepnum { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); display: inline-grid; place-items: center; font-size: 15px; flex: none; }
.opt-tag { font-family: var(--f-body); font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.council-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 640px) { .council-pick { grid-template-columns: repeat(2, 1fr); } }
.cp { position: relative; display: grid; gap: 2px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); cursor: pointer; min-width: 0; }
.cp input { position: absolute; opacity: 0; pointer-events: none; }
.cp b { font-size: 16px; }
.cp span { font-size: 13px; color: var(--muted); }
.cp.on { border-color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--ink); }
.cp:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }

.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links button { background: none; border: 0; padding: 0; color: var(--ink); font-weight: 700; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; }

.seo{padding:8px 0 40px;line-height:1.55}
.seo h1{font-size:clamp(26px,5vw,38px);line-height:1.15;margin:12px 0}
.seo h2{margin:28px 0 8px;font-size:20px}
.seo .facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px;padding:0;list-style:none}
.seo .facts li{border:1px solid #d7dfdb;border-radius:12px;padding:10px 12px;background:#fff}
.seo .facts b{display:block;font-size:20px}
.seo .cta{display:inline-block;margin:14px 0;padding:12px 18px;border-radius:10px;background:#0E2B26;color:#fff;text-decoration:none;font-weight:700}
.seo a{color:#0E2B26}
