/* Med Services design system. One file, no build step, strict-CSP safe (no inline styles anywhere).
   Tokens -> base -> layout -> components -> moments (timer, score, share) -> utilities.
   Light and dark via prefers-color-scheme (or a forced <html data-theme>, P2); data-light mode via body.lite (system fonts, no shadows/motion). */

@font-face { font-family: "Inter"; src: url("../fonts/inter-v1.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
/* QA perf (CLS): the text shown before Inter arrives uses a local Arial (or its metric twin Liberation Sans / Arimo)
   scaled to Inter's metrics, so the swap does not move the page. Values measured from inter-v1.woff2 (default wght
   400: unitsPerEm 2048, typo ascender 1984, descender -494, no line gap) against Arial's average advance. */
@font-face { font-family: "Inter Fallback"; src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Arimo"), local("Helvetica");
  size-adjust: 107.58%; ascent-override: 90.05%; descent-override: 22.42%; line-gap-override: 0%; }
/* F-1: Fraunces is the opsz variable file (opsz 9-144 + wght; font-optical-sizing:auto does the rest, D20).
   Italic and the Inter currency glyphs (naira, peso, cedi, rupee) load only when a page uses them: no preload.
   QA perf (CLS): upright Fraunces is preloaded and display: optional, so a slow first load keeps the serif fallback
   for that page instead of swapping headings under the reader; the next page uses the cached font. The italic (pull
   quotes, below the fold) keeps swap. */
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-v2.woff2") format("woff2"); font-weight: 100 900; font-display: optional; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-italic-v1.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-currency-v1.woff2") format("woff2"); font-weight: 100 900; unicode-range: U+20A6, U+20B1, U+20B5, U+20B9; font-display: swap; }

/* ---------- tokens (spec 1.1; contrast evidence in tools/contrast_check.py) ---------- */
:root {
  --navy-900: #0B1530; --navy-800: #0E1A33; --navy-700: #16264A; --navy-600: #24345C; --navy-500: #3A4C7A;
  --paper: #F7F3EA; --paper-2: #EFE9DC; --white: #FFFFFF;
  --ink: #0E1A33; --ink-2: #3B4660; --ink-3: #596277;
  --line: #E2DBCB; --line-2: #D3CAB5;            /* decorative only */
  --field-border: #8F8470;                       /* any control boundary (WCAG 1.4.11) */
  --ok: #1F7A4D; --ok-bg: #E4F3EA; --warn: #9A5B00; --warn-bg: #FCF0D9; --err: #B42318; --err-bg: #FDECEA; --on-err: #FFFFFF;
  --accent: #D47F00; --accent-ink: #0E1A33; --accent-soft: #FBEBD0; --accent-text: #8A4F00; --accent-bright: #FFC56E;
  --focus: var(--accent-text);
  --bg: var(--paper); --surface: var(--white); --surface-2: var(--paper-2); --text: var(--ink); --text-2: var(--ink-2);
  --text-3: var(--ink-3); --border: var(--line); --primary: var(--navy-800); --on-primary: var(--paper);
  --font-ui: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --fs-2xs: .75rem; --fs-xs: .8125rem; --fs-sm: .9375rem; --fs-md: 1.0625rem; --fs-lg: 1.25rem; --fs-xl: 1.625rem;
  --fs-2xl: clamp(1.75rem, 1.35rem + 1.9vw, 2.625rem); --fs-3xl: clamp(2.25rem, 1.5rem + 3.6vw, 4rem);
  --lh: 1.55;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --r-sm: 10px; --r-md: 14px; --r-lg: 22px; --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(14,26,51,.06), 0 1px 1px rgba(14,26,51,.04);
  --sh-2: 0 8px 24px -8px rgba(14,26,51,.18), 0 2px 6px rgba(14,26,51,.06);
  --sh-3: 0 24px 60px -20px rgba(14,26,51,.35);
  --ease-out: cubic-bezier(.16,1,.3,1); --ease-in-out: cubic-bezier(.65,0,.35,1); --ease: var(--ease-out);
  --t-xs: 100ms; --t-fast: 140ms; --t-med: 260ms; --t-slow: 600ms;
  --tap: 48px; --maxw: 1120px;
  --safe-top: env(safe-area-inset-top, 0px); --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px); --safe-left: env(safe-area-inset-left, 0px);
  --topbar-h: 60px; --tabbar-h: 61px;
  color-scheme: light dark;
}
/* --focus is re-declared with the palette so it resolves against the skin's own accent-text (custom properties
   resolve where they are declared, so a :root-only declaration would stay gold for teal and light for dark). */
/* Mockseat (.accent-gold): the brand kit's door amber (docs/brand/mockseat: #D47F00 on light, #FFC56E on dark), with a
   darker amber for text on light surfaces (launch check: the pre-brand gold #B8862B clashed with the approved logo). */
.accent-gold { --accent: #D47F00; --accent-ink: #0E1A33; --accent-soft: #FBEBD0; --accent-text: #8A4F00; --accent-bright: #FFC56E; --focus: var(--accent-text); }
/* Wardcoach (.accent-teal, the class name kept for the contrast check): the rose kit only (docs/brand/wardcoach: ward
   green #14853F on light, #30D15F on dark, green tint #EAF6EE, ink #0C1A12; launch check: the pre-brand teal sat beside
   the green rose). Green fills carry white text (4.71:1). Small accent text on light is the kit's ink: ward
   green is 4.26:1 on the cream paper and 3.90:1 on paper-2, and the kit allows no third, darker green. */
.accent-teal { --accent: #14853F; --accent-ink: #FFFFFF; --accent-soft: #EAF6EE; --accent-text: #0C1A12; --accent-bright: #30D15F; --focus: var(--accent-text); }

/* Theme (P2): System follows the OS; Account › Appearance can force light or dark through <html data-theme>.
   The forced-dark block below must stay identical to this one (tools/contrast_check.py asserts it). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --bg: #0A1328; --surface: #111D39; --surface-2: #16264A; --text: #F2EEE4; --text-2: #C9CFDD; --text-3: #8F99B2;
    --border: #22325A; --field-border: #6A7DAD; --primary: #F2EEE4; --on-primary: #0E1A33;
    --ok: #5FD39A; --ok-bg: #12321F; --warn: #F2B863; --warn-bg: #3A2A0E; --err: #FF8A80; --err-bg: #3D1512; --on-err: #2A0A07;   /* dark text on the pale red (QA a11y: white was 2.28:1) */
    --sh-1: none; --sh-2: 0 8px 30px -10px rgba(0,0,0,.6); --sh-3: 0 30px 70px -20px rgba(0,0,0,.7);
  }
  :root:not([data-theme=light]) .accent-gold { --accent: #FFC56E; --accent-ink: #0E1A33; --accent-soft: #2E2310; --accent-text: #FFC56E; }
  :root:not([data-theme=light]) .accent-teal { --accent: #30D15F; --accent-ink: #06240F; --accent-soft: #0F2E1A; --accent-text: #30D15F; }
}
:root[data-theme=dark] {
  --bg: #0A1328; --surface: #111D39; --surface-2: #16264A; --text: #F2EEE4; --text-2: #C9CFDD; --text-3: #8F99B2;
  --border: #22325A; --field-border: #6A7DAD; --primary: #F2EEE4; --on-primary: #0E1A33;
  --ok: #5FD39A; --ok-bg: #12321F; --warn: #F2B863; --warn-bg: #3A2A0E; --err: #FF8A80; --err-bg: #3D1512; --on-err: #2A0A07;   /* dark text on the pale red (QA a11y: white was 2.28:1) */
  --sh-1: none; --sh-2: 0 8px 30px -10px rgba(0,0,0,.6); --sh-3: 0 30px 70px -20px rgba(0,0,0,.7);
  color-scheme: dark;
}
:root[data-theme=dark] .accent-gold { --accent: #FFC56E; --accent-ink: #0E1A33; --accent-soft: #2E2310; --accent-text: #FFC56E; }
:root[data-theme=dark] .accent-teal { --accent: #30D15F; --accent-ink: #06240F; --accent-soft: #0F2E1A; --accent-text: #30D15F; }
:root[data-theme=light] { color-scheme: light; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--fs-md)/var(--lh) var(--font-ui);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; min-height: 100vh; display: flex; flex-direction: column; }
body.lite { --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --font-display: Georgia, "Times New Roman", serif;
  --sh-1: none; --sh-2: none; --sh-3: none; }
html { scroll-padding-top: calc(var(--safe-top) + var(--topbar-h) + 16px); scroll-padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 90px); }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0 0 var(--s4); }
h1 { font-size: var(--fs-3xl); font-weight: 600; line-height: 1.04; letter-spacing: -.02em; }
h2 { font-size: var(--fs-2xl); font-weight: 600; line-height: 1.1; letter-spacing: -.015em; }
h3, .h3 { font: 650 1.1875rem/1.3 var(--font-ui); letter-spacing: -.01em; }   /* .h3: an h2 that looks like a card title (QA a11y: no h1->h3 skips) */
.h-sm { font: 600 var(--fs-xl)/1.2 var(--font-display); letter-spacing: -.01em; }
p { margin: 0 0 var(--s4); }
p, li { text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent-text); }
img, svg { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--s6) 0; }

/* ---------- layout ---------- */
:where(.list, .ticks, .order-list, .choices) { margin-top: 0; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-left: max(var(--s4), var(--safe-left)); padding-right: max(var(--s4), var(--safe-right)); }
@media (min-width: 720px) { .wrap { padding-left: max(var(--s6), var(--safe-left)); padding-right: max(var(--s6), var(--safe-right)); } }
main { flex: 1; padding: var(--s5) 0 var(--s8); }
.narrow { max-width: 560px; margin-inline: auto; }
.mid { max-width: 760px; margin-inline: auto; }
.stack > * + * { margin-top: var(--s4); }
.stack-lg > * + * { margin-top: var(--s6); }
.row { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: var(--s3); align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grid { display: grid; gap: var(--s4); }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.section { padding: var(--s7) 0; }
.section-tight { padding: var(--s5) 0; }

/* ---------- header / nav / footer ---------- */
.topbar { position: sticky; top: 0; z-index: 20; padding-top: var(--safe-top); background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--border); }
body.lite .topbar { backdrop-filter: none; background: var(--bg); }
.topbar .wrap { display: flex; align-items: center; gap: var(--s4); min-height: var(--topbar-h); }
/* S-8 brand: path-only marks (no <text>), the same artwork as the favicons */
.brand { display: inline-flex; gap: 10px; align-items: center; text-decoration: none; min-width: 0; }
.brand-mark { width: 30px; height: 30px; flex: none; display: block; }
.brand-name { font: 600 1.3rem/1 var(--font-display); letter-spacing: -.012em; white-space: nowrap; }
/* Wardcoach top bar (skins/wardcoach/templates/brand.html): the approved kit lockup (docs/brand/wardcoach), the rose and
   the lower-case name, as two outlined SVGs in one 172.8-unit box. Rose #14853F and name #0C1A12 on light; rose #30D15F
   and name #FFFFFF on dark. The kit's 81-unit rose-to-name gap is the 11px flex gap at 28px. */
.brand-wc { gap: 11px; }
.brand-wc .wc-mark { width: auto; height: 28px; }
.brand-wc .wc-name { display: block; width: auto; height: 28px; flex: none; overflow: visible; }
.wc-rose { fill: #14853F; } .wc-ink { fill: #0C1A12; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) .wc-rose { fill: #30D15F; } :root:not([data-theme=light]) .wc-ink { fill: #FFFFFF; }
}
:root[data-theme=dark] .wc-rose { fill: #30D15F; } :root[data-theme=dark] .wc-ink { fill: #FFFFFF; }
.is-app .topbar .brand-wc .wc-name, .is-app .topbar .brand-wc .wc-mark { height: 24px; }
.is-app .topbar .brand-wc { gap: 9px; }
/* Mockseat top bar (skins/mockseat/templates/brand.html): the approved kit lockup, door + lower-case name, as two outlined
   SVGs in one 185.83-unit box. Door #D47F00 and name #0A0A0B on light; door #FFC56E and name #F5F5F7 on dark. */
.brand-ms { gap: 6px; }
.brand-ms .ms-mark { width: auto; height: 28px; }
.brand-ms .ms-name { display: block; width: auto; height: 28px; flex: none; overflow: visible; }
.ms-door { fill: #D47F00; } .ms-ink { fill: #0A0A0B; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) .ms-door { fill: #FFC56E; } :root:not([data-theme=light]) .ms-ink { fill: #F5F5F7; }
  :root:not([data-theme=light]) .brand-ms .ms-mark { border-radius: 0; box-shadow: none; }
}
:root[data-theme=dark] .ms-door { fill: #FFC56E; } :root[data-theme=dark] .ms-ink { fill: #F5F5F7; }
:root[data-theme=dark] .brand-ms .ms-mark { border-radius: 0; box-shadow: none; }
.is-app .topbar .brand-ms .ms-name, .is-app .topbar .brand-ms .ms-mark { height: 24px; }
.nav { display: none; gap: var(--s1); margin-left: auto; }
.nav a { padding: 8px 12px; border-radius: var(--r-pill); text-decoration: none; color: var(--text-2); font-size: var(--fs-sm); font-weight: 520; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface-2); color: var(--text); }
@media (min-width: 860px) { .nav { display: flex; } }
.topbar .actions { margin-left: auto; display: flex; gap: var(--s2); align-items: center; }
@media (min-width: 860px) { .topbar .actions { margin-left: var(--s2); } }

.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  border-top: 1px solid var(--border); min-height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding: 0 var(--safe-right) var(--safe-bottom) var(--safe-left);
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px); }
body.lite .tabbar, body.lite .hud { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--surface); }
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px 8px; min-height: 56px; font-size: var(--fs-2xs); white-space: nowrap;
  color: var(--text-3); text-decoration: none; font-weight: 560; -webkit-touch-callout: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.tabbar svg { width: 22px; height: 22px; }
.tabbar a .ic { position: relative; z-index: 1; transition: transform var(--t-fast) var(--ease); }
/* active tab: pill + weight, not colour alone */
.tabbar a::before { content: ""; position: absolute; top: 6px; left: 50%; width: 56px; height: 30px; border-radius: var(--r-pill);
  background: var(--accent-soft); transform: translateX(-50%) scaleX(.4); opacity: 0; transition: transform var(--t-med) var(--ease), opacity var(--t-fast); }
.tabbar a[aria-current="page"]::before { opacity: 1; transform: translateX(-50%) scaleX(1); }
.tabbar a[aria-current="page"] { color: var(--text); font-weight: 700; }
.tabbar a[aria-current="page"] .ic { color: var(--accent-text); }
.tabbar a:active .ic { transform: scale(.9); }
@media (min-width: 860px) { .tabbar { display: none; } }
@media (max-width: 859px) { body.has-tabbar .topbar .actions { display: none; } }
body.has-tabbar main { padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + var(--s6)); }
@media (min-width: 860px) { body.has-tabbar main { padding-bottom: var(--s8); } }

.footer { border-top: 1px solid var(--border); padding: var(--s6) 0 var(--s7); color: var(--text-3); font-size: var(--fs-xs); }
body.has-tabbar .footer { padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + var(--s5)); }
@media (min-width: 860px) { body.has-tabbar .footer { padding-bottom: var(--s7); } }
.footer .disclaimer { color: var(--text-2); font-weight: 520; margin-bottom: var(--s3); }
.footer nav { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin: var(--s3) 0; }
.footer a { color: var(--text-3); }

/* ---------- buttons ---------- */
.btn { --b-bg: var(--surface); --b-fg: var(--text); --b-bd: var(--border);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 10px 22px; border-radius: var(--r-pill);
  border: 1px solid var(--b-bd); background: var(--b-bg); color: var(--b-fg); font: 600 var(--fs-md)/1.2 var(--font-ui); text-decoration: none; cursor: pointer;
  text-align: center; text-wrap: balance; user-select: none;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast), box-shadow var(--t-fast); -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(.97); transition-duration: 60ms; }
@media (hover: hover) {
  .btn:hover { box-shadow: var(--sh-1); }
  .btn-primary:hover { --b-bg: color-mix(in srgb, var(--primary) 86%, var(--accent)); }
  .btn-accent:hover { --b-bg: color-mix(in srgb, var(--accent) 90%, #000); }
  .btn-quiet:hover, .btn-ghost:hover { --b-bg: color-mix(in srgb, var(--surface-2) 70%, var(--border)); }
  .card-link:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
}
.btn[aria-busy="true"] { color: transparent !important; position: relative; pointer-events: none; }
.btn[aria-busy="true"]::after { content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--b-fg); border-right-color: transparent; animation: spin-b 700ms linear infinite; }
@keyframes spin-b { to { transform: rotate(360deg); } }
.btn[disabled], .btn[aria-disabled="true"]:not([aria-busy]) { opacity: .45; cursor: not-allowed; }
.btn-primary { --b-bg: var(--primary); --b-fg: var(--on-primary); --b-bd: var(--primary); }
/* Launch gate: a disabled primary keeps a lighter brand fill instead of fading to a flat grey slab. */
.btn-primary[disabled], .btn-primary[aria-disabled="true"]:not([aria-busy]) { opacity: 1;
  --b-bg: color-mix(in srgb, var(--primary) 65%, var(--surface)); --b-bd: transparent; }
.btn-accent { --b-bg: var(--accent); --b-fg: var(--accent-ink); --b-bd: var(--accent); }
.btn-ghost { --b-bg: transparent; --b-bd: transparent; }
.btn-quiet { --b-bg: var(--surface-2); --b-bd: transparent; }
.btn-danger { --b-bg: var(--err); --b-fg: var(--on-err); --b-bd: var(--err); }
.btn-sm { min-height: 38px; padding: 6px 14px; font-size: var(--fs-sm); }
@media (pointer: coarse) { .btn-sm { min-height: 44px; } }
.btn-lg { min-height: 56px; padding: 12px 28px; font-size: var(--fs-lg); }
.btn-block { width: 100%; }
.btn svg { width: 20px; height: 20px; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; }
.field label, .label { font-weight: 600; font-size: var(--fs-sm); }
.hint { color: var(--text-3); font-size: var(--fs-xs); }
.input, select.input, textarea.input { width: 100%; min-height: var(--tap); padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--field-border);
  background: var(--surface); color: var(--text); font: 400 var(--fs-md)/1.4 var(--font-ui); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
textarea.input { min-height: 140px; resize: vertical; }
.code-input { font: 600 1.8rem/1 var(--font-ui); text-align: center; font-variant-numeric: tabular-nums;
  max-width: 15ch; margin-inline: auto; display: block; letter-spacing: .4em; padding-left: .4em; }
.hp { position: absolute; left: -9999px; }
.choice { display: flex; gap: var(--s3); align-items: flex-start; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface);
  cursor: pointer; min-height: var(--tap); transition: border-color var(--t-fast), background var(--t-fast); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
/* S-2: drawn radio/checkbox so they read in dark mode and keep the user's tick when disabled after submit */
.choice input, .matrix input { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 1px 0 0;
  border: 1.5px solid var(--field-border); border-radius: 50%; background: var(--surface); display: inline-grid; place-items: center;
  cursor: pointer; transition: background var(--t-fast), border-color var(--t-fast); }
.choice input[type=checkbox], .matrix input[type=checkbox] { border-radius: 6px; }
.choice input::after, .matrix input::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-ink);
  transform: scale(0); transition: transform 180ms var(--ease-out); }
.choice input[type=checkbox]::after, .matrix input[type=checkbox]::after { width: 11px; height: 6px; border-radius: 0; background: none;
  border-left: 2.25px solid var(--accent-ink); border-bottom: 2.25px solid var(--accent-ink); transform: translateY(-1px) rotate(-45deg) scale(0); }
.choice input:checked, .matrix input:checked { background: var(--accent); border-color: var(--accent); }
.choice input:checked::after, .matrix input:checked::after { transform: scale(1); }
.choice input[type=checkbox]:checked::after, .matrix input[type=checkbox]:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
.choice input:disabled, .matrix input:disabled { opacity: 1; cursor: default; }
.choice:has(input:disabled) { cursor: default; }
.choice:has(input:checked) { box-shadow: inset 0 0 0 1px var(--accent); }
.choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice input:focus-visible { outline: none; }
@media (hover: hover) { .choice:hover { border-color: var(--field-border); } }
.choice:active { transform: scale(.99); }
.choices { border: 0; padding: 0; margin-inline: 0; margin-bottom: 0; display: grid; gap: var(--s2); min-width: 0; }
.choices > legend { padding: 0; margin-bottom: var(--s2); }
@media (min-width: 520px) { .choices { grid-template-columns: repeat(3, 1fr); } }
.choice.correct { border-color: var(--ok); background: var(--ok-bg); }
.choice.wrong { border-color: var(--err); background: var(--err-bg); }
.seg { display: inline-flex; padding: 4px; background: var(--surface-2); border-radius: var(--r-pill); gap: 4px; }
.seg button, .seg a { border: 0; background: transparent; padding: 8px 14px; border-radius: var(--r-pill); font: 600 var(--fs-sm)/1 var(--font-ui); color: var(--text-2); cursor: pointer; text-decoration: none; min-height: 36px; }
.seg [aria-pressed="true"], .seg [aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: var(--sh-1); }

/* ---------- cards, lists, badges ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s5); box-shadow: var(--sh-1); }
.card-lg { padding: var(--s6); }
.card-link { display: block; text-decoration: none; transition: transform var(--t-med) var(--ease), box-shadow var(--t-med); }
/* S-4: dark cards re-scope the text tokens so every child (buttons included) stays legible */
.card-dark { background: var(--navy-800); border-color: var(--navy-700); --text: var(--paper); --text-2: #C9CFDD; --text-3: #B9C2D8; color: var(--text); }
.card-dark .btn-ghost { --b-fg: var(--paper); --b-bd: rgba(247,243,234,.28); }
.card-dark .btn-quiet { --b-bg: rgba(247,243,234,.10); --b-fg: var(--paper); }
/* A primary button on the always-navy card is cream, in light and dark alike (navy on navy could not be seen). */
.card-dark .btn-primary { --b-bg: var(--paper); --b-fg: var(--navy-800); --b-bd: var(--paper); }
@media (hover: hover) { .card-dark .btn-primary:hover { --b-bg: color-mix(in srgb, var(--paper) 88%, var(--accent-bright)); } }
.card-dark .eyebrow { color: var(--accent-bright); }
/* Launch check (both brands): ticks, links and other accent text inside a dark card use the bright accent (the light
   surface text accent was 2.63:1 on navy, under 3:1). */
.card-dark { --accent-text: var(--accent-bright); }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .card-dark { background: linear-gradient(180deg, #16264A, #111D39); border-color: #2A3B66; } }
:root[data-theme=dark] .card-dark { background: linear-gradient(180deg, #16264A, #111D39); border-color: #2A3B66; }
.card-accent { border: 1.5px solid var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent), var(--sh-2); }
.list { list-style: none; margin-inline: 0; margin-bottom: 0; padding: 0; }
.list > li { padding: 14px 0; border-bottom: 1px solid var(--border); display: flex; gap: var(--s3); align-items: center; justify-content: space-between; }
.list > li:last-child { border-bottom: 0; }
.list > li > *:first-child { min-width: 0; overflow-wrap: anywhere; }
.list > li .btn { flex: none; }
/* Label / value rows (school facts): labels wrap only between words; values sit right. */
.list-kv > li > span:first-child { overflow-wrap: normal; flex: 0 1 auto; }
.list-kv > li > strong { text-align: right; min-width: 0; overflow-wrap: anywhere; }
.ticks { list-style: none; padding: 0; margin-inline: 0; margin-bottom: 0; display: grid; gap: 10px; }
.ticks li { padding-left: 28px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 14px; height: 8px; border-left: 2px solid var(--accent-text); border-bottom: 2px solid var(--accent-text); transform: rotate(-45deg); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-2);
  font-size: var(--fs-xs); font-weight: 650; letter-spacing: .01em; white-space: nowrap; }
.badge-accent { background: var(--accent); color: var(--accent-ink); }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-warn-solid { background: var(--warn); color: var(--warn-bg); }   /* the warn/warn-bg AA pair, inverted */
.badge-quiet { background: transparent; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border); }
.eyebrow { font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); margin-bottom: var(--s3); }
.muted { color: var(--text-3); }
.lead { font-size: 1.1875rem; line-height: 1.5; color: var(--text-2); max-width: 40ch; text-wrap: pretty; }
.kpi { font: 600 var(--fs-2xl)/1 var(--font-display); }
.kpi-label { font-size: var(--fs-xs); color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; font-weight: 650; margin-top: 6px; }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
/* Grades fix: a 3-column legal table is unreadable in 328px. Under 600px each row is a stacked block: the item in
   bold, then labelled "Why:" and "Lawful basis:" lines (the labels come from data-label). */
@media (max-width: 599px) {
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; }
  .table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-stack tr { padding: var(--s3) 0; border-bottom: 1px solid var(--border); }
  .table-stack td { padding: 0; border: 0; }
  .table-stack td + td { margin-top: var(--s1); color: var(--text-2); }
  .table-stack td:first-child { font-weight: 600; color: var(--text); }
  .table-stack td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--text); }
}
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- tabs, sheets, toasts, states ---------- */
.tabs { display: flex; gap: var(--s1); border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { padding: 12px 14px; border: 0; background: none; font: 600 var(--fs-sm)/1 var(--font-ui); color: var(--text-3); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; cursor: pointer; min-height: var(--tap); }
.tabs [aria-selected="true"], .tabs [aria-current="page"] { color: var(--text); border-bottom-color: var(--accent-text); }
dialog.sheet { border: 0; padding: 0; background: var(--surface); color: var(--text); border-radius: var(--r-lg) var(--r-lg) 0 0; width: 100%; max-width: 560px;
  margin: auto auto 0; box-shadow: var(--sh-3); }
@media (min-width: 720px) { dialog.sheet { border-radius: var(--r-lg); margin: auto; } }
dialog.sheet::backdrop { background: rgba(8,14,30,.62); }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) dialog.sheet::backdrop { background: rgba(0,0,0,.7); } }
:root[data-theme="dark"] dialog.sheet::backdrop { background: rgba(0,0,0,.7); }
.sheet-body { padding: var(--s5); }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--border); margin: 10px auto 0; }
@media (min-width: 720px) { .sheet-grip { display: none; } }
dialog.sheet { padding-bottom: var(--safe-bottom); }
dialog.sheet[open] { animation: sheet-up 280ms var(--ease-out); }
dialog.sheet[open]::backdrop { animation: fade 200ms ease; }
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(80px + var(--safe-bottom)); z-index: 50; display: flex; flex-direction: column; width: min(92vw, 480px); pointer-events: none; }
.toast-list { display: grid; gap: 8px; }
.toast-list:not(:empty) + .toast-list:not(:empty) { margin-top: 8px; }
.toast { pointer-events: auto; }
.toast-text { flex: 1 1 auto; min-width: 0; }
.toast-x { flex: none; min-width: 44px; min-height: 44px; margin: -12px -10px -12px 0; border: 0; border-radius: var(--r-md); background: transparent; color: inherit; font: 400 1.5rem/1 var(--font-ui); cursor: pointer; }
.toast-x:focus-visible { outline: 3px solid currentColor; outline-offset: -6px; }
/* Grades fix: every toast sits in one place, bottom-anchored above the safe area (and above the tab bar or a session's
   bottom bar), never over the page heading. */
@media (min-width: 860px) { .toasts { bottom: 24px; } }
.toast { background: var(--navy-800); color: var(--paper); padding: 14px 16px; border-radius: var(--r-md); box-shadow: var(--sh-3); font-size: var(--fs-sm); display: flex; gap: 10px; align-items: center;
  animation: toast-in var(--t-med) var(--ease); }
.toast-error { background: var(--err); color: var(--on-err); }
.toast-ok::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.netbar { position: fixed; top: calc(var(--safe-top) + var(--topbar-h)); left: 0; right: 0; z-index: 19; background: var(--warn-bg); color: var(--warn);
  text-align: center; font: 650 var(--fs-xs)/1.3 var(--font-ui); padding: 6px 12px; }
.notice { padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); font-size: var(--fs-sm); color: var(--text-2); }
.notice-warn { background: var(--warn-bg); color: var(--warn); }
.notice-err { background: var(--err-bg); color: var(--err); }
.state { text-align: center; padding: var(--s7) var(--s4); }
.state-icon { width: 64px; height: 64px; border-radius: 20px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; margin: 0 auto var(--s4); font-size: 28px; }
.state h3, .state .state-h { font: 560 var(--fs-xl)/1.2 var(--font-display); }
.state .row { justify-content: center; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--border), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; border-radius: 8px; min-height: 1em; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- progress, score bar ---------- */
.progress { height: 8px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width var(--t-slow) var(--ease); }
.scorebar { display: grid; gap: 8px; }
.scorebar-head { display: flex; justify-content: space-between; gap: var(--s3); font-weight: 600; }
.scorebar-track { height: 12px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; position: relative; }
.scorebar-track > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 70%, var(--primary)), var(--accent));
  transform-origin: left; animation: grow var(--t-slow) var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.ticks-5 { display: flex; justify-content: space-between; font-size: .7rem; color: var(--text-3); }

/* ---------- moments: timer ---------- */
.timer { position: relative; width: 168px; height: 168px; margin-inline: auto; }
.timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer .track { fill: none; stroke: var(--surface-2); stroke-width: 10; }
.timer .arc { fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke var(--t-med); }
.timer.warn .arc { stroke: var(--warn); }
.timer-label { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.timer-time { font: 600 2.4rem/1 var(--font-ui); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.timer-phase { font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); font-weight: 700; margin-top: 4px; }

/* ---------- moments: voice station ---------- */
.station { display: grid; gap: var(--s5); }
.station-prompt { font: 400 var(--fs-lg)/1.5 var(--font-display); }
.transcript { display: grid; gap: var(--s3); max-height: 46vh; overflow-y: auto; padding: 2px; scroll-behavior: smooth; }
.bubble { padding: 12px 16px; border-radius: 18px; max-width: 88%; font-size: var(--fs-md); line-height: 1.45; }
.bubble-ai { background: var(--surface-2); border-bottom-left-radius: 6px; }
.bubble-me { background: var(--primary); color: var(--on-primary); margin-left: auto; border-bottom-right-radius: 6px; }
.bubble-interim { opacity: .6; font-style: italic; }
.composer { display: flex; gap: var(--s2); align-items: flex-end; }
.composer textarea { min-height: 52px; max-height: 160px; resize: none; }   /* grades fix: no grip; station.js grows it */
.mic { width: 72px; height: 72px; border-radius: 50%; border: 0; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; cursor: pointer; margin-inline: auto; box-shadow: var(--sh-2); }
.mic svg { width: 30px; height: 30px; }
.mic[aria-pressed="true"] { background: var(--err); color: var(--on-err); }

/* ---------- moments: results ---------- */
.result-hero { display: grid; gap: var(--s5); align-items: center; }
@media (min-width: 720px) { .result-hero { grid-template-columns: 220px 1fr; } }
.ring { width: 200px; height: 200px; position: relative; margin-inline: auto; }
.ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.ring .track { fill: none; stroke: var(--surface-2); stroke-width: 14; }
.ring { --c: 565.5; }   /* r=90 in a 200 viewBox, at every ring size (R-1) */
.ring .arc { fill: none; stroke: var(--accent); stroke-width: 14; stroke-linecap: round; animation: draw 1.2s var(--ease) both; }
@keyframes draw { from { stroke-dashoffset: var(--c, 565.5); } }
.ring-label { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring-num { font: 600 3.4rem/1 var(--font-display); }
.quote { border-left: 3px solid var(--accent); padding: 4px 0 4px 14px; font-family: var(--font-display); font-style: italic; color: var(--text-2); margin: var(--s2) 0; }
.fix { display: flex; gap: 10px; align-items: flex-start; background: var(--accent-soft); padding: 12px 14px; border-radius: var(--r-md); font-size: var(--fs-sm); }
.fix strong { white-space: nowrap; }
details.disclose { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
details.disclose > summary { cursor: pointer; padding: 14px 16px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: var(--tap); }
details.disclose > summary::-webkit-details-marker { display: none; }
details.disclose > summary::after { content: "+"; font-size: 1.3rem; color: var(--text-3); }
details.disclose[open] > summary::after { content: "–"; }
details.disclose > div { padding: 0 16px 16px; }

/* ---------- moments: share card ---------- */
.sharecard { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-3); max-width: 320px; margin-inline: auto; aspect-ratio: 4 / 5; background: var(--navy-800); }
.share-row { display: grid; gap: var(--s5); grid-template-columns: 160px 1fr; align-items: start; }
.share-row > .stack { min-width: 0; }
.share-row .row .btn { flex: 1 1 auto; }
/* The preview is 160 x 200 (a 96 x 120 one was an unreadable dark rectangle), with a 1px keyline so the navy card has an
   edge on a dark page too. */
.share-thumb { border-radius: 14px; box-shadow: var(--sh-2); display: block; width: 160px; height: 200px; background: var(--navy-800);
  border: 1px solid color-mix(in srgb, var(--paper) 22%, var(--navy-800)); }
.sharecard img { display: block; width: 100%; height: 100%; }

/* ---------- landing ---------- */
.hero { padding: var(--s7) 0 var(--s6); }
@media (min-width: 720px) { .hero { padding: var(--s8) 0 var(--s7); } }
.hero h1 { max-width: 16ch; }
.hero-grid { display: grid; gap: var(--s6); align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr .9fr; } }
.device { border-radius: 32px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sh-3); padding: var(--s5); max-width: 380px; margin-inline: auto; }
.trust { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); color: var(--text-3); font-size: var(--fs-sm); margin-top: var(--s5); }
.trust span { color: var(--text-2); }
.trust span::before { content: ""; display: inline-block; width: 10px; height: 6px; margin: 0 8px 3px 0;
  border-left: 2px solid var(--accent-text); border-bottom: 2px solid var(--accent-text); transform: rotate(-45deg); }
.price { font: 600 clamp(2.4rem, 2rem + 1.5vw, 3rem)/1 var(--font-display); letter-spacing: -.02em; }
.price-block { display: grid; gap: 4px; padding-bottom: var(--s4); border-bottom: 1px solid var(--border); margin-bottom: var(--s2); }
.price-local { font: 600 var(--fs-lg)/1.2 var(--font-ui); color: var(--text); }
.price small { font: 500 var(--fs-sm) var(--font-ui); color: var(--text-3); }
.strike { text-decoration: line-through; color: var(--text-3); }
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: var(--s4); }
.steps li { counter-increment: s; padding-left: 52px; position: relative; min-height: 40px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-weight: 700; }

/* ---------- question engine ---------- */
.item-stem { font-size: var(--fs-lg); line-height: 1.5; }
.exhibit { background: var(--surface-2); border-radius: var(--r-md); padding: var(--s4); font-size: var(--fs-sm); }
.exhibit table { width: 100%; border-collapse: collapse; }
.exhibit th, .exhibit td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: left; }
.matrix { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.matrix th, .matrix td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: center; }
.matrix th:first-child, .matrix td:first-child { text-align: left; }
.cloze select { min-height: 40px; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--field-border); background: var(--surface); color: var(--text); font: inherit; margin: 2px 0; }
/* Grades fix: no side padding, so the one space between sentences reads as one space (the pressed state widens with
   a side shadow instead). */
.hl-token { cursor: pointer; border-radius: 4px; padding: 1px 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hl-token[aria-pressed="true"] { background: var(--accent-soft); box-shadow: inset 0 -2px 0 var(--accent), -2px 0 0 var(--accent-soft), 2px 0 0 var(--accent-soft); }
.order-list { list-style: none; padding: 0; margin-inline: 0; margin-bottom: 0; display: grid; gap: 8px; }
.order-list li { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.order-list .handle { display: flex; flex-direction: column; gap: 2px; margin-left: auto; }
.order-list .handle button { width: 40px; height: 32px; border: 1px solid var(--field-border); background: var(--surface-2); border-radius: 8px; cursor: pointer; color: var(--text); }
.bowtie { display: grid; gap: var(--s4); }
@media (min-width: 900px) { .bowtie { grid-template-columns: 1fr 1fr 1fr; align-items: start; } }
/* Wide screens (launch check, Wardcoach run at 1280): the three columns break out of the 760px reading column, so a
   column title ("Parameters to monitor · 0 of 2") stays on one line and the options are not tall, thin stacks. */
@media (min-width: 1100px) {
  .mid .bowtie { --bt-w: min(1080px, calc(100vw - 2 * var(--s6))); width: var(--bt-w); margin-inline: calc((100% - var(--bt-w)) / 2); }
  /* Launch check 2: while a bow-tie is on screen the sticky run header (counter, clock, AI label) and the sticky dock
     (End session, Submit) take the same 1080px track, so the panels never scroll out past either end of them. */
  .mid:has(.q-stage .bowtie) { --bt-w: min(1080px, calc(100vw - 2 * var(--s6))); }
  .mid:has(.q-stage .bowtie) .q-run > .q-head, .mid:has(.q-stage .bowtie) .q-run > .qnav {
    width: var(--bt-w); max-width: none; margin-inline: calc((100% - var(--bt-w)) / 2); box-sizing: border-box; }
  /* Launch check r3 (Wardcoach /practice at 1280): the whole question shares that track, so the progress bar, the
     chip, the stem and "Report a problem" start at the same left edge as the header, the three columns and the dock
     (the stem began 160px right of the diagram it introduces). The bow-tie's own breakout is then zero, and the
     stem keeps a readable measure from that edge. */
  .mid:has(.q-stage .bowtie) .q-run > .q-progress, .mid:has(.q-stage .bowtie) .q-run > .q-stage, .mid:has(.q-stage .bowtie) .q-run > .q-stop {
    width: var(--bt-w); max-width: none; margin-inline: calc((100% - var(--bt-w)) / 2); box-sizing: border-box; }
  .mid .q-stage:has(.bowtie) > p { max-width: 760px; }
}
.bowtie fieldset { border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s3); margin: 0; display: grid; gap: 8px; }
.bowtie legend { font-weight: 700; font-size: var(--fs-sm); padding: 0 6px; }
.rationale { border-top: 1px solid var(--border); padding-top: var(--s4); }
.rationale, .q-form { scroll-margin-bottom: 150px; }
.layer { background: var(--accent-soft); border-radius: var(--r-md); padding: 12px 14px; font-size: var(--fs-sm); }
.layer-tucked > summary { font-size: var(--fs-sm); }
.qnav { position: sticky; bottom: 0; background: var(--bg); padding: var(--s3) 0 calc(var(--s3) + var(--safe-bottom)); border-top: 1px solid var(--border); }
body.has-tabbar .qnav { bottom: calc(var(--tabbar-h) + var(--safe-bottom)); padding-bottom: var(--s3); }
@media (min-width: 860px) { body.has-tabbar .qnav { bottom: 0; padding-bottom: calc(var(--s3) + var(--safe-bottom)); } }
.beta { font-size: var(--fs-xs); color: var(--warn); background: var(--warn-bg); border-radius: var(--r-pill); padding: 3px 10px; font-weight: 650; display: inline-block; }
/* Legal positioning 2.7: the persistent AI label. 13px, warn on warn-bg (an AA pair in tools/contrast_check.py), never
   dismissible; the short wording below 360px. It is a link (to the sheet with JS, to the page without). */
.ai-label { display: inline-flex; align-items: center; min-height: 32px; font-size: var(--fs-xs); line-height: 1.3; font-weight: 650;
  color: var(--warn); background: var(--warn-bg); border-radius: var(--r-pill); padding: 4px 12px; text-decoration: none; }
.ai-label:hover { text-decoration: underline; }
/* Launch check r3: the parts wrap as whole flex items, each with its "·" in a 1em gutter before it. The box clips its
   left gutter (overflow: hidden, the parts pulled left by the gutter's width), so the dot of a part that starts a line
   is never seen: one line reads verbatim, and a wrapped label never starts or ends a line with "·". The underline of
   a link style is carried down explicitly (an inline-block does not take its parent's text decoration). */
.ai-label-long, .ai-label-short { max-width: 100%; overflow: hidden; vertical-align: middle; text-decoration: inherit; }
.ai-label-long { display: inline-block; }
.ai-label-parts { display: inline-flex; flex-wrap: wrap; margin-left: -1em; text-decoration: inherit; }
.ai-label-part { position: relative; padding-left: 1em; text-decoration: inherit; }
.ai-label-sep { position: absolute; left: 0; top: 0; width: 1em; text-align: center; text-decoration: none; }
.ai-label-short { display: none; }
.ai-label-part { white-space: nowrap; }
@media (max-width: 359.98px) { .ai-label-long { display: none; } .ai-label-short { display: inline; } }
@media (max-width: 359.98px) { .ai-label-short { display: inline-block; } }
.qnav { row-gap: var(--s2); }
.hero-disclosure { font-size: var(--fs-sm); color: var(--text); max-width: 38rem; }
.hero .row + .hero-disclosure { margin: var(--s4) 0 0; }
.score-block { font-size: var(--fs-sm); color: var(--text); }
/* Grades fix: the practice-score explainer is several lines long, so it reads left-aligned in its own tinted block,
   even inside the centred readiness card; the "answer n more in…" lines are a short left-aligned list. */
.readiness .score-block { text-align: left; background: var(--surface-2); border-radius: var(--r-md); padding: var(--s3) var(--s4); }
.need-list { margin: 2px 0 var(--s1); padding-left: 1.25em; display: grid; gap: 2px; list-style: disc; }
.howto .need-list li { counter-increment: none; padding-left: 0; position: static; }
.howto .need-list li::before { content: none; }
.readiness .more-needed { color: var(--text-2); }

/* ---------- utilities ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: var(--s2); } .mt-4 { margin-top: var(--s4); } .mt-6 { margin-top: var(--s6); }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: var(--s2); } .mb-4 { margin-bottom: var(--s4); }
.hide { display: none !important; }
.nowrap { white-space: nowrap; }
.keep-together { display: inline-block; }   /* a phrase that breaks only as a whole (two-part headings); wraps inside if wider than the line */
.tnum, .kpi, .ring-num, .price, .timer-time { font-variant-numeric: lining-nums tabular-nums; }
.break { overflow-wrap: anywhere; min-width: 0; }
.fineprint { font-size: var(--fs-xs); color: var(--text-3); text-align: center; margin-top: var(--s4); }
.app-only { display: none; } body.is-app .app-only { display: revert; }
.small { font-size: var(--fs-sm); } .xsmall { font-size: var(--fs-xs); }
.serif { font-family: var(--font-display); }
.w-full { width: 100%; }
@media (max-width: 719px) { .hide-sm { display: none !important; } }
@media (min-width: 720px) { .only-sm { display: none !important; } }
.p-0{width:0%}.p-5{width:5%}.p-10{width:10%}.p-15{width:15%}.p-20{width:20%}.p-25{width:25%}.p-30{width:30%}.p-35{width:35%}.p-40{width:40%}.p-45{width:45%}.p-50{width:50%}.p-55{width:55%}.p-60{width:60%}.p-65{width:65%}.p-70{width:70%}.p-75{width:75%}.p-80{width:80%}.p-85{width:85%}.p-90{width:90%}.p-95{width:95%}.p-100{width:100%}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
body.lite *, body.lite *::before { animation: none !important; transition: none !important; }
@media print {
  .topbar, .tabbar, .footer nav, .btn, .toasts, .netbar, dialog { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border-color: #ccc; break-inside: avoid; }
}
.matrix td.correct { background: var(--ok-bg); }
.cloze select.correct { border-color: var(--ok); background: var(--ok-bg); }
.cloze select.wrong { border-color: var(--err); background: var(--err-bg); }
.order-list li.correct { border-color: var(--ok); }

/* ---------- design review fixes (see HANDOVER.md §Design review) ---------- */
@media (max-width: 719px) { .hero .row .btn { width: 100%; } }

.ic { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex: none; }
.card-link > .ic, .card > .ic { width: 28px; height: 28px; color: var(--accent-text); }
.card-dark > .ic { color: var(--accent-bright); }
.state-icon .ic { width: 28px; height: 28px; }
.choice.correct, .choice.correct:has(input:checked) { border-color: var(--ok); background: var(--ok-bg); }
.choice.wrong, .choice.wrong:has(input:checked) { border-color: var(--err); background: var(--err-bg); }
.hl-token.correct { box-shadow: inset 0 -2px 0 var(--ok); background: var(--ok-bg); }
.hl-token.wrong { box-shadow: inset 0 -2px 0 var(--err); background: var(--err-bg); }
#station[data-phase="speaking"] > .row-between { display: none; }
/* QA a11y: the station title stays the page's h1 while speaking, visually hidden (not display:none). */
#station[data-phase="speaking"] > h1 { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
@media (max-width: 719px) { .grid > .card-accent { order: -1; } }
/* S-17 reflow at 360px */
@media (max-width: 479px) { .composer { flex-direction: column; align-items: stretch; } }

/* ---------- Mockseat P0 (spec A-1 to A-11) ---------- */
.narrow-2 { max-width: 760px; margin-inline: auto; }
.trust-center { justify-content: center; }
/* A-2 mic check */
.level { height: 8px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.level > span { display: block; height: 100%; background: var(--ok); transform-origin: left; transform: scaleX(var(--lvl,0)); transition: transform 80ms linear; }
/* A-4 voice component (replaces the orb) */
.voice { position: relative; width: 112px; height: 112px; margin-inline: auto; display: grid; place-items: center; }
.voice::before { content: ""; position: absolute; inset: 18px; border-radius: 50%; background: var(--primary); box-shadow: var(--sh-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .voice::before { background: var(--surface-2); } }
:root[data-theme=dark] .voice::before { background: var(--surface-2); }
.voice-ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--accent); opacity: 0; }
.voice-bars { position: relative; display: flex; gap: 4px; align-items: center; height: 32px; }
.voice-bars i { display: block; width: 4px; height: calc(6px + var(--lv,0) * 22px); border-radius: 2px; background: var(--accent); transition: height 80ms linear; }
.voice[data-state=speaking] .voice-bars i { animation: vbar .9s var(--ease-in-out) infinite alternate; }
.voice-bars i:nth-child(2) { animation-delay: -.3s; } .voice-bars i:nth-child(3) { animation-delay: -.6s; }
.voice-bars i:nth-child(4) { animation-delay: -.15s; } .voice-bars i:nth-child(5) { animation-delay: -.45s; }
@keyframes vbar { from { height: 6px; } to { height: 28px; } }
.voice[data-state=listening] .voice-ring { animation: vring 1.6s ease-out infinite; }
.voice[data-state=listening] .voice-ring + .voice-ring { animation-delay: .8s; }
@keyframes vring { from { transform: scale(.72); opacity: .9; } to { transform: scale(1.3); opacity: 0; } }
.voice[data-state=thinking] .voice-bars i { animation: vbar 1.4s var(--ease-in-out) infinite alternate; opacity: .6; }
.voice-sm { width: 40px; height: 40px; flex: none; margin: 0; }
.voice-sm::before { inset: 4px; } .voice-sm .voice-bars { transform: scale(.55); }
@media (prefers-reduced-motion: reduce) {
  .voice[data-state=listening]::before { box-shadow: 0 0 0 3px var(--err); }
  .voice[data-state=speaking]::before { box-shadow: 0 0 0 3px var(--accent); }
  .voice .voice-bars i { animation: none !important; }
}
/* A-4 HUD, dock, immersive phone layout and desktop columns */
.hud { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; gap: var(--s2); padding: 10px 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.hud-who { display: flex; gap: 10px; align-items: center; min-width: 0; flex: 1; }
.hud-text { min-width: 0; }
.hud-name { font: 650 var(--fs-sm)/1.2 var(--font-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-state { font-size: var(--fs-xs); color: var(--text-3); }
.hud-ai { font-size: var(--fs-xs); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-time { display: flex; align-items: center; gap: 6px; font: 600 var(--fs-md)/1 var(--font-ui); padding: 6px 12px 6px 6px; flex: none;
  border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.hud-time svg { width: 28px; height: 28px; transform: rotate(-90deg); }
.hud-time .track { fill: none; stroke: var(--surface-2); stroke-width: 4; }
.hud-time .arc { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 94.25; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear; }
.hud-time.warn { color: var(--warn); border-color: var(--warn); } .hud-time.warn .arc { stroke: var(--warn); }
.hud-time.final { color: var(--err); border-color: var(--err); } .hud-time.final .arc { stroke: var(--err); }
.hud .btn-sm { flex: none; }
.hud #end { --b-bd: var(--field-border); }      /* launch gate: End reads as a control (outlined), not bare text */
.icon-btn { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.icon-btn .ic { width: 20px; height: 20px; }
#station[data-phase="speaking"] > .timer { display: none; }
#station[data-phase="speaking"] .transcript { max-height: none; overflow: visible; }
.transcript { padding-top: var(--s4); }
.bubble-retry { display: flex; margin-top: var(--s2); }
.dock { position: sticky; bottom: 0; z-index: 4; display: grid; gap: var(--s2); justify-items: center;
  padding: var(--s4) 0 calc(var(--s3) + var(--safe-bottom)); background: linear-gradient(to top, var(--bg) 75%, transparent); }
.dock .composer { width: 100%; }
.dock .voice-only .small { margin-top: var(--s2); }
.station-side { display: none; }
body.in-session .nav, body.in-session .topbar, body.in-session .footer, body.in-session .tabbar { display: none; }
@media (max-width: 979px) {
  #station[data-phase="speaking"] { position: fixed; inset: 0; z-index: 30; background: var(--bg); display: flex; flex-direction: column; height: 100dvh; gap: 0;
    padding: var(--safe-top) max(16px, var(--safe-right)) 0 max(16px, var(--safe-left)); }
  #station[data-phase="speaking"] .phase-speaking, #station[data-phase="speaking"] .station-main { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
  #station[data-phase="speaking"] .transcript { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; align-content: start; }
  #station[data-phase="speaking"] .dock { flex: none; }
  /* Phones: the status line gets its own full-width row under the controls, so it never squeezes to one word a line. */
  .hud { display: grid; grid-template-columns: 40px minmax(0,1fr) auto auto auto; grid-template-areas: "v n t d e" "v a a a a" "s s s s s";
    column-gap: var(--s2); row-gap: 2px; align-items: center; }
  .hud-who, .hud-text { display: contents; }
  .hud .voice { grid-area: v; }
  .hud-name { grid-area: n; align-self: end; } .hud-ai { grid-area: a; align-self: start; } .hud-state { grid-area: s; margin-top: 4px; }
  .hud-time { grid-area: t; } .hud [data-open] { grid-area: d; } .hud #end { grid-area: e; }
}
@media (max-width: 379px) { .hud-time svg { display: none; } .hud-time { padding: 6px 10px; } }
@media (min-width: 980px) {
  #station[data-phase="speaking"] { max-width: 1040px; }
  #station[data-phase="speaking"] .phase-speaking { display: grid; grid-template-columns: 300px 1fr; column-gap: var(--s6); align-items: start; }
  #station[data-phase="speaking"] .station-side { display: block; position: sticky; top: var(--s5); align-self: start; }
  /* Launch gate: the conversation column fills the viewport height, with the composer docked at its bottom. */
  #station[data-phase="speaking"] .station-main { min-width: 0; display: flex; flex-direction: column; position: sticky; top: var(--s4);
    height: calc(100dvh - 2 * var(--s4)); }
  #station[data-phase="speaking"] .station-main .transcript { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; align-content: start; }
  #station[data-phase="speaking"] .station-main .dock { flex: none; }
  #station[data-phase="speaking"] .hud-time, #station[data-phase="speaking"] [data-open="prompt-sheet"] { display: none; }
}
/* A-5 first-time how-to */
.howto { counter-reset: h; list-style: none; margin-inline: 0; margin-bottom: 0; padding: 0; display: grid; gap: 10px; font-size: var(--fs-sm); }
.howto li { counter-increment: h; padding-left: 34px; position: relative; }
.howto li::before { content: counter(h); position: absolute; left: 0; top: -1px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface-2); display: grid; place-items: center; font-weight: 700; font-size: .75rem; }
/* A-6 landing demo */
.voice-btn { display: block; margin-inline: auto; border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; color: inherit; }
.voice-btn:focus-visible { outline-offset: 6px; }
.device .transcript { max-height: none; overflow: visible; padding-top: 0; }
.accent-gold .device { border-radius: 999px 999px 32px 32px; padding-top: 88px; }
.link-arrow { display: inline-flex; gap: 6px; align-items: center; min-height: 48px; font-weight: 600; text-decoration: none; }
.link-arrow .ic { transition: transform var(--t-fast) var(--ease-out); }
@media (hover: hover) { .link-arrow:hover .ic { transform: translateX(3px); } }
/* A-7 results */
header.result-hero { display: block; }
.ring-sm { width: 120px; height: 120px; flex: none; margin: 0; } .ring-sm .ring-num { font-size: 2rem; } .ring-sm .ring-num.is-word { font-size: 1.05rem; line-height: 1.15; }
.ring-sm .kpi-label { font-size: .625rem; margin-top: 4px; max-width: 84px; margin-inline: auto; }
.result-hero .row { flex-wrap: nowrap; align-items: center; gap: var(--s5); }
@media (max-width: 419px) { .result-hero .row { flex-wrap: wrap; } }
.result-hero .row > .stack { min-width: 0; flex: 1 1 200px; }
.card-priority { border: 0; background: linear-gradient(160deg, var(--accent-soft), var(--surface) 70%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent), var(--sh-2); }
.card-priority .btn { justify-self: start; }
.scorebar-track.is-empty { background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, transparent 6px 12px); border: 1px dashed var(--field-border); }
.fix { border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border-radius: 0 var(--r-md) var(--r-md) 0; flex-direction: column; gap: 4px; }
.badges { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; margin: 0; padding: 0; }
.badges .badge { font-size: var(--fs-sm); padding: 6px 12px; }
/* A-11 parent report */
.h-report { font-size: var(--fs-2xl); }
.dots { list-style: none; padding: 0; margin: 0; } .dots li { padding-left: 16px; position: relative; }
.dots li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.dots li + li { margin-top: var(--s2); }
.scorebar-head > span:last-child { white-space: nowrap; flex: none; }
/* ---------- Wardcoach P0 (spec Part P) ---------- */
.h-page { font-size: var(--fs-2xl); }
/* A two-part heading ("Emerging. One change is the quickest win."): each part wraps as a whole, so a line break falls
   between the sentences, never inside the first (launch check). */
.h-part { display: inline-block; text-wrap: balance; }
.left { text-align: left; }
.stack-sm > * + * { margin-top: var(--s2); }
.row-ic { display: inline-flex; align-items: center; gap: var(--s2); }
.row-ic .ic { width: 20px; height: 20px; flex: none; }
/* P-1 pricing: the recommended pass comes first on phones */
@media (max-width: 719px) { .reco-first .price-reco { order: -1; } }
/* P-2 option feedback: a tag on its own line, never colour alone (D15) */
.choice { flex-wrap: wrap; position: relative; }
.choice > span:not(.opt-tag) { flex: 1 1 0; min-width: 0; }
.opt-tag { flex-basis: 100%; margin-left: 34px; display: inline-flex; gap: 6px; align-items: center; font: 650 var(--fs-xs)/1.2 var(--font-ui); animation: pop-in 220ms var(--ease-out) both; }
.opt-tag svg, .opt-tag .ic { width: 14px; height: 14px; flex: none; }
.opt-tag-ok, .opt-tag-miss { color: var(--ok); } .opt-tag-bad { color: var(--err); }
.choice.correct.picked { border: 1.5px solid var(--ok); background: var(--ok-bg); box-shadow: none; }
.choice.correct.missed { border: 2px dashed var(--ok); background: var(--surface); box-shadow: none; }
.choice.wrong { border: 1.5px solid var(--err); background: var(--err-bg); box-shadow: none; animation: nudge 260ms var(--ease-out); }
@keyframes pop-in { from { opacity: 0; transform: scale(.85); } }
@keyframes nudge { 30% { transform: translateX(-3px); } 60% { transform: translateX(2px); } }
.hl-token.correct { background: var(--ok-bg); outline: 2px solid var(--ok); box-shadow: none; }
.hl-token.missed { outline: 2px dashed var(--ok); box-shadow: none; }
.hl-token.wrong { background: var(--err-bg); text-decoration: line-through; box-shadow: none; }
.matrix td.correct { background: var(--ok-bg); box-shadow: inset 0 0 0 1.5px var(--ok); }
.matrix td.missed { box-shadow: inset 0 0 0 1.5px var(--ok); outline: 1.5px dashed var(--ok); outline-offset: -5px; }
.matrix td.wrong { background: var(--err-bg); box-shadow: inset 0 0 0 1.5px var(--err); }
.cloze select { appearance: none; -webkit-appearance: none; min-height: 44px; padding: 6px 34px 6px 12px; border: 1px solid var(--field-border); border-radius: 10px; max-width: 100%;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23596277' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center/16px; color: var(--text); font: inherit; }
.cloze select:disabled { opacity: 1; color: var(--text); }
.cloze select.correct { border-color: var(--ok); background-color: var(--ok-bg); }
.cloze select.wrong { border-color: var(--err); background-color: var(--err-bg); text-decoration: line-through; text-decoration-color: var(--err); }
.cloze-answer { display: inline-flex; gap: 4px; align-items: center; margin: 2px 4px; padding: 3px 10px; border-radius: var(--r-pill); background: var(--ok-bg); color: var(--ok); font: 600 var(--fs-sm)/1.3 var(--font-ui); }
.cloze-answer .ic { width: 14px; height: 14px; }
.ord-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); font: 650 var(--fs-xs)/1 var(--font-ui); }
.ord-text { flex: 1 1 0; min-width: 0; }
.order-list li { flex-wrap: wrap; }
.order-list li.correct { border-color: var(--ok); } .order-list li.wrong { border-color: var(--err); }
.order-list li.correct .ord-n { background: var(--ok); color: #fff; } .order-list li.wrong .ord-n { background: var(--err); color: var(--on-err); }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .order-list li.correct .ord-n, :root:not([data-theme=light]) .order-list li.wrong .ord-n { color: var(--navy-900); } }
:root[data-theme=dark] .order-list li.correct .ord-n, :root[data-theme=dark] .order-list li.wrong .ord-n { color: var(--navy-900); }
.ord-should { margin-left: auto; font-size: var(--fs-xs); color: var(--err); font-weight: 650; }
/* P-3 verdict and rationale */
.rationale { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); padding: var(--s5); scroll-margin-top: 76px; scroll-margin-bottom: 160px; }
.rationale p { max-width: 68ch; line-height: 1.65; }
.verdict { display: flex; gap: 12px; align-items: center; }
.verdict h3:focus, .verdict h2:focus { outline: none; }
.verdict h3:focus-visible, .verdict h2:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.verdict-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; flex: none; font-size: 1.15rem; }
.verdict-icon .ic { width: 20px; height: 20px; }
.verdict-ok .verdict-icon { background: var(--ok-bg); color: var(--ok); }
.verdict-part .verdict-icon { background: var(--warn-bg); color: var(--warn); }
.verdict-miss .verdict-icon { background: var(--surface-2); color: var(--text-2); }
.takeaway { border-left: 3px solid var(--accent); padding-left: 12px; font-weight: 550; }
.layer .stack-sm > * + *, .layer > p { margin-top: var(--s1); }
/* P-4 session summary */
.session-done .list { text-align: left; }
.session-done .list li { gap: var(--s3); }
.session-done .list .small { min-width: 0; flex: 1 1 auto; }
.session-done .badge { flex: none; }
.session-done h2:focus, .readiness h2:focus { outline: none; }
/* P-6/P-13 question run header, focus mode */
.q-head { display: grid; gap: 2px; }
/* Grades fix (P-13): the run header sticks to the top with the one-line AI label, so the label stays in view and the
   dock holds only the actions. */
.q-run .q-head { position: sticky; top: var(--safe-top); z-index: 4; background: var(--bg); padding-bottom: 6px;
  box-shadow: 0 calc(-1 * var(--safe-top)) 0 0 var(--bg); }
.q-head-label { display: flex; min-width: 0; }
/* Gate 3 (P0-2, spec 2.7): the full label on every phone from 360px, wrapping onto a second line when it needs to
   (never cut off with an ellipsis); the short form only below 360px (the .ai-label rule above). */
.ai-label.ai-label-line { min-height: 24px; padding: 2px 10px; max-width: 100%; border-radius: 12px; white-space: normal; overflow-wrap: anywhere; display: inline-block; line-height: 1.35; text-wrap: balance; }
.q-head-row { display: flex; align-items: center; gap: var(--s3); min-height: 44px; }
.q-head-main { flex: 1 1 auto; min-width: 0; }
.q-head .badge .ic { width: 14px; height: 14px; }
body.in-session { overscroll-behavior-y: contain; }
body.in-session main { padding-top: calc(var(--safe-top) + 16px); }
body.in-session .qnav, body.in-session.has-tabbar .qnav { bottom: 0; padding-bottom: calc(var(--s3) + var(--safe-bottom)); }
body.in-session .netbar { position: sticky; top: 0; }
/* P-7 readiness card and ring marker (R-P2) */
.readiness .ring { width: 168px; height: 168px; }
.readiness .ring-num { font-size: 2.8rem; }
.readiness .ring .kpi-label { max-width: 132px; margin-inline: auto; line-height: 1.2; }
/* Grades fix: "STARTING POINT" stays on one line in the 168px ring (smaller, tighter tracking). */
.readiness .ring .kpi-label { font-size: .6875rem; letter-spacing: .05em; white-space: nowrap; }
/* Closing grades: at 360 "STARTING POINT" touched the arc; tighter tracking and a smaller size, wrapping if needed. */
@media (max-width: 379px) { .ring .kpi-label { letter-spacing: .06em; font-size: .6875rem; } }
.ring-mark { fill: var(--surface); stroke: var(--text); stroke-width: 2.5; }
.ring-cap { display: inline-flex; gap: 6px; align-items: center; }
.ring-cap .ic { width: 14px; height: 14px; flex: none; }
.readiness .ring-cap { justify-content: center; }
/* P-8 planner */
.seg-radio { border: 0; margin-inline: 0; margin-bottom: 0; padding: 0; min-width: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.seg-radio.seg-2 { grid-template-columns: 1fr 1fr; }
.seg-radio.seg-7 { grid-template-columns: repeat(7, 1fr); }
.seg-radio legend { grid-column: 1 / -1; float: left; width: 100%; margin-bottom: 8px; padding: 0; }
.cpr-name { display: block; font: 650 var(--fs-sm)/1.3 var(--font-ui); }
.cpr-official { display: block; font-size: var(--fs-xs); color: var(--text-3); }
.seg-radio label { position: relative; display: grid; place-items: center; min-height: 48px; padding: 6px; border-radius: 12px; background: var(--surface-2);
  font: 600 var(--fs-sm)/1.2 var(--font-ui); color: var(--text-2); text-align: center; cursor: pointer; min-width: 0; }
.seg-radio input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.seg-radio label:has(input:checked) { background: var(--surface); color: var(--text); box-shadow: var(--sh-1), inset 0 0 0 2px var(--accent); }
.seg-radio .r-below:has(input:checked) { box-shadow: var(--sh-1), inset 0 0 0 2px var(--warn); }
.seg-radio .r-above:has(input:checked) { box-shadow: var(--sh-1), inset 0 0 0 2px var(--ok); }
.seg-radio label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.card .seg-radio label { background: var(--surface-2); }
.seg-radio.seg-7 label { padding: 6px 2px; }
/* the legend stays floated so it is a grid item (a rendered legend sits outside the grid) */
@media (min-width: 720px) { .cpr-row { grid-template-columns: 1fr repeat(3, 112px); align-items: center; } .cpr-row legend { grid-column: 1; width: auto; margin: 0; padding-right: var(--s3); } }
.planner-form .label { display: block; font: 650 var(--fs-sm)/1.3 var(--font-ui); color: var(--text); }
.plan-submit { position: sticky; bottom: 0; z-index: 3; padding: var(--s3) 0 calc(var(--s3) + var(--safe-bottom)); background: linear-gradient(to top, var(--bg) 80%, transparent); }
body.has-tabbar .plan-submit { bottom: calc(var(--tabbar-h) + var(--safe-bottom)); padding-bottom: var(--s3); }
@media (min-width: 860px) { body.has-tabbar .plan-submit { bottom: 0; } }
/* P-9 segmented links (landing track, Home time choice) */
.seg-links { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--surface-2); }
.seg-links.seg-3 { grid-template-columns: repeat(3, 1fr); display: grid; }
.seg-links a { min-height: 44px; padding: 0 18px; display: grid; place-items: center; border-radius: var(--r-pill); text-decoration: none; font: 600 var(--fs-sm)/1 var(--font-ui); color: var(--text-2); white-space: nowrap; }
.seg-links.seg-3 a { padding: 0 8px; }
.seg-links a[aria-current] { background: var(--surface); color: var(--text); box-shadow: var(--sh-1); }
.card-dark .seg-links { background: rgba(247,243,234,.10); }
.card-dark .seg-links a { color: var(--paper); }
@media (hover: hover) { .card-dark .seg-links a:hover { background: rgba(247,243,234,.14); } .seg-links a:hover { color: var(--text); } }
.hero .seg-links { margin-top: var(--s2); }
.fmt-card { display: flex; gap: var(--s3); align-items: center; }
.fmt-card .ic { width: 22px; height: 22px; flex: none; color: var(--accent-text); }
/* P-10 Home */
.home-head h1 { min-width: 0; }
.done-check .ic { color: var(--accent-bright); animation: pop-in 420ms var(--ease-out) both; width: 1em; height: 1em; vertical-align: -0.12em; }
.card-dark .progress { background: rgba(247,243,234,.16); }
.card-dark .progress > span { background: var(--accent-bright); }
.today-left { color: var(--text-3); }
.week-dots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.week-dots li { aspect-ratio: 1; max-height: 44px; border-radius: 12px; display: grid; place-items: center; font: 600 var(--fs-xs)/1 var(--font-ui); background: var(--surface-2); color: var(--text-3); }
.week-dots .wd-done { background: var(--accent); color: var(--accent-ink); }
.week-dots .wd-today { box-shadow: inset 0 0 0 2px var(--accent-text); color: var(--text); }
.week-dots .wd-off { background: transparent; border: 1px dashed var(--field-border); }
.week-dots .is-new { animation: pop-in 420ms var(--ease-out) both; }
/* P-11 results */
.focus-badge { margin-top: calc(-1 * var(--s2)); }
/* P-12 locked */
.locked { padding: var(--s3) 0 0; }
.locked .ticks { max-width: 34ch; margin-inline: auto; }
.locked .state-icon { margin-bottom: 0; }
.pass-summary { font-weight: 600; font-variant-numeric: tabular-nums; }
.pass-summary-line { display: block; font-weight: 400; color: var(--text-2); overflow-wrap: anywhere; }
/* P-14 locale bar, data saver switch */
.locale-bar { background: var(--accent-soft); border-bottom: 1px solid var(--border); padding: var(--s2) 0; }
body.in-session .locale-bar { display: none; }
.locale-bar .row { flex-wrap: nowrap; }
.locale-bar p { min-width: 0; flex: 1 1 220px; }
.footer-prefs { margin-top: var(--s3); }
/* Grades fix: Off is a neutral light track with an outline and a small dark knob (a dark filled track read as On in
   light mode); On is the accent track with a white knob on the right. */
.switch { position: relative; width: 52px; height: 32px; flex: none; border-radius: 999px; border: 0; background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--field-border); cursor: pointer; }
.switch::after { content: ""; position: absolute; top: 8px; left: 8px; width: 16px; height: 16px; border-radius: 50%; background: var(--field-border); transition: transform var(--t-fast) var(--ease), width var(--t-fast), height var(--t-fast), top var(--t-fast), left var(--t-fast); }
.switch[aria-checked="true"] { background: var(--accent); box-shadow: none; } .switch[aria-checked="true"]::after { top: 4px; left: 4px; width: 24px; height: 24px; background: #fff; transform: translateX(20px); }
.switch:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.footer-prefs .input { width: auto; max-width: 100%; }
.readiness .ring-cap { display: flex; justify-content: center; align-items: flex-start; text-align: left; max-width: 32ch; margin-inline: auto; }
.ring-cap .ic { margin-top: 2px; }
.session-done .list li { flex-direction: column; align-items: flex-start; gap: var(--s1); }

/* Part N: native app shell (S-N1 to S-N8b). body.is-app is set server-side from the app's user agent. */
.topbar-back { display: inline-flex; align-items: center; gap: 2px; flex: none; min-width: 44px; min-height: 44px; margin-left: -10px;
  padding: 0 8px; color: var(--accent-text); text-decoration: none; font-weight: 560; }
.topbar-back .ic { width: 22px; height: 22px; }
@media (min-width: 860px) { body:not(.is-app) .topbar-back { display: none; } }
.is-app .topbar .brand-name { font-size: 1.0625rem; }
.is-app .topbar-back + .brand .brand-mark { display: none; }
@media (max-width: 479px) { .topbar-back + .brand .brand-mark { display: none; } }   /* room for Sign in at 360px */
.topbar .actions .btn { white-space: nowrap; }
.is-app { -webkit-touch-callout: none; }
.bubble-ai { position: relative; }
/* Launch gate: reporting an AI reply is a small flag outside the bubble (the inline "⋯" read as "still typing"). */
.bubble-row { display: flex; align-items: flex-end; gap: 2px; min-width: 0; }
.bubble-row .bubble { max-width: calc(88% - 34px); }
.bubble-more { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 32px; min-height: 32px;
  padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text-3); cursor: pointer; opacity: .75; }
.bubble-more .ic { width: 16px; height: 16px; }
.report-reasons { border: 0; margin: 0; padding: 0; min-width: 0; }
.bubble-more:hover { background: var(--surface); color: var(--text); }
.list-links > li { padding: 0; }
/* 12px above and below every row, so a two-line question keeps the same air round it as a one-line one (with padding 0
   and only a 48px minimum, two-line rows touched their dividers). The chevron sits on the first line. */
.list-links > li > a { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); width: 100%; min-height: 48px;
  padding-block: 12px; text-decoration: none; color: var(--text); }
.list-links > li > a::after { content: ""; flex: none; width: 8px; height: 8px; margin: calc(.775em - 5px) 4px 0 0; border-right: 2px solid var(--text-3);
  border-top: 2px solid var(--text-3); transform: rotate(45deg); }
.iap-wait { position: fixed; inset: 0; z-index: 60; display: grid; place-content: center; justify-items: center; gap: var(--s4); padding: var(--s6);
  background: color-mix(in srgb, var(--bg) 92%, transparent); text-align: center; font-weight: 600; }
.iap-wait.hide { display: none; }
.iap-spin { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--accent); border-right-color: transparent;
  animation: spin-b 800ms linear infinite; }
@media (prefers-reduced-motion: reduce) { .iap-spin { animation-duration: 2.4s; } }
.btn[data-iap] > span { text-wrap: balance; }

/* ---------- Shared P1 (spec F-1 to R-13) ---------- */
/* R-2/R-3 pricing */
.price-grid { max-width: 1040px; margin-inline: auto; width: 100%; }
@media (min-width: 720px) and (max-width: 979px) { .price-grid { grid-template-columns: repeat(2, 1fr); } .price-grid .card-free { grid-column: 1 / -1; } }
@media (min-width: 980px) { .price-grid { grid-template-columns: repeat(3, 1fr); } }
.card-free { order: 1; background: transparent; box-shadow: none; }
.card-free .price { color: var(--text-2); }
.pay-tip { display: grid; gap: var(--s2); }
.pay-tip .row-ic { align-items: flex-start; }
.pay-tip .row-ic .ic { margin-top: 2px; }
/* R-1 results reveal: count-up (app.js), staggered bars, rising cards */
.scorebar-track > span { animation: grow 700ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms + 300ms); }
.d1 { --i: 1; } .d2 { --i: 2; } .d3 { --i: 3; } .d4 { --i: 4; } .d5 { --i: 5; } .d6 { --i: 6; } .d7 { --i: 7; } .d8 { --i: 8; }
.reveal { animation: rise 500ms var(--ease-out) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; background: var(--surface-2); } .scorebar-track > span, .reveal, .ring .arc { animation: none; } }
body.lite .skeleton { background: var(--surface-2); }
/* R-4 landing grids on phones */
@media (max-width: 719px) { .grid-types { grid-template-columns: repeat(2, 1fr); gap: var(--s3); } .grid-types > .card:last-child:nth-child(odd) { grid-column: 1 / -1; } .grid-types > .card { padding: var(--s4); } .grid-types h3, .grid-types .h3 { font-size: var(--fs-md); } }
@media (max-width: 399px) { .grid-types p:not(.xsmall) { display: none; } }
.fmt-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.fmt { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); font: 600 var(--fs-sm)/1.25 var(--font-ui); min-width: 0; }
.fmt .ic { color: var(--accent-text); flex: none; width: 20px; height: 20px; }
/* R-5 brand motifs: the Mockseat arch, the Wardcoach plan grid */
.accent-gold .state-icon { border-radius: 999px 999px 14px 14px; height: 72px; }
.hero-art { position: relative; max-width: 380px; margin-inline: auto; width: 100%; }
.hero-art::before { content: ""; position: absolute; right: -24px; top: -28px; width: 196px; height: 168px; border-radius: 20px; opacity: .22;
  background-image: radial-gradient(circle at 10px 10px, var(--accent) 0 7px, transparent 7.5px); background-size: 28px 28px; }
.hero-art .device { position: relative; }
@media (max-width: 479px) { .hero-art::before { right: -8px; } }
/* R-12 touch targets */
@media (pointer: coarse) { .seg-links a { min-height: 44px; } .order-list .handle button { width: 44px; height: 44px; } }
.hero { overflow-x: clip; }
/* R-6 footer and app shell */
.footer form.row select.input { width: auto; min-width: 220px; min-height: 40px; padding: 6px 12px; font-size: var(--fs-sm); }
body.is-app .footer { display: none; }
.list-nav > li { padding: 0; }
.list-nav > li > a, .list-nav > li > button { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); width: 100%; min-height: 52px;
  text-decoration: none; color: var(--text); background: none; border: 0; padding: 0; font: inherit; text-align: left; cursor: pointer; }
.list-nav > li > a::after, .list-nav > li > button::after { content: ""; flex: none; width: 8px; height: 8px; margin-right: 4px;
  border-right: 2px solid var(--text-3); border-top: 2px solid var(--text-3); transform: rotate(45deg); }
.list-nav-val { margin-left: auto; color: var(--text-3); font-size: var(--fs-sm); white-space: nowrap; }
.list-nav > li > .list-nav-err { color: var(--err); }
/* R-7 market switcher */
.market-btn { white-space: nowrap; padding-inline: 12px; }
@media (max-width: 379px) { .market-btn .ic { display: none; } }
.market-choices { grid-template-columns: 1fr !important; }
.market-choice { min-height: 56px; align-items: center; }
/* R-10 haptics: no grey tap flash on the controls that already give feedback */
a, button, label.choice, summary { -webkit-tap-highlight-color: transparent; }
/* R-11 share card size toggle (buttons styled like the segmented links) */
.seg-links button { min-height: 44px; padding: 0 18px; border: 0; background: transparent; border-radius: var(--r-pill); font: 600 var(--fs-sm)/1 var(--font-ui);
  color: var(--text-2); cursor: pointer; white-space: nowrap; }
.seg-links button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--sh-1); }
.share-thumb.is-story { height: 284px; }
/* R-13 reminder sheet */
.remind-pick .row { flex-wrap: nowrap; }
.remind-time { max-width: 160px; }
.pref-row { flex-wrap: nowrap; } .pref-row > div { min-width: 0; }
@media (max-width: 719px) { .hero-art::before { display: none; } }

/* ---------------------------------------------------------------- Mockseat P1 (R-A1 to R-A10) */
/* R-A1 rewrite in your own words */
.rewrite { display: grid; gap: var(--s3); }
.rewrite .quote { margin-top: 4px; }
@media (min-width: 720px) { .rewrite { grid-template-columns: 1fr 1fr; } }
.quote-better { border-left-color: var(--ok); color: var(--text); }
/* R-A2 next step: sticky above the tab bar on phones */
.result-actions { display: grid; grid-template-columns: 2fr 1fr; gap: var(--s2); align-items: start; }
.result-actions.is-single { grid-template-columns: 1fr; }
.result-actions .btn { width: 100%; }
.stack-lg > .result-why { margin-top: var(--s2); }
@media (max-width: 859px) {
  body.has-tabbar .result-actions { position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-bottom)); z-index: 5; background: var(--bg);
    padding: var(--s3) 0; box-shadow: 0 -1px 0 var(--border); }
  /* Grades fix: Mockseat results drops the tab bar, so the dock sits on the bottom edge (one bar, not two). */
  body.has-dock .result-actions { position: sticky; bottom: 0; z-index: 5; background: var(--bg);
    padding: var(--s3) 0 calc(var(--s3) + var(--safe-bottom)); box-shadow: 0 -1px 0 var(--border); }
  .result-actions .btn-lg { min-height: 52px; padding-inline: 12px; font-size: var(--fs-sm); }
}
/* R-A3 marking steps (the station clock has no meaning once marking starts) */
#station[data-phase="marking"] > .timer { display: none; }
.steps-live { list-style: none; margin: var(--s4) auto 0; padding: 0; display: grid; gap: 10px; text-align: left; max-width: 22rem; }
.steps-live li { position: relative; padding-left: 28px; color: var(--text-3); }
.steps-live li.is-active { color: var(--text); font-weight: 600; }
.steps-live li.is-done { color: var(--text-2); }
.steps-live li::before { content: ""; position: absolute; left: 0; top: .2em; width: 14px; height: 14px; box-sizing: border-box; }
.steps-live li.is-active::before { border-radius: 50%; border: 2px solid var(--accent); border-right-color: transparent; animation: spin-b 800ms linear infinite; }
.steps-live li.is-done::before { width: 12px; height: 7px; top: .35em; left: 1px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
@media (prefers-reduced-motion: reduce) { .steps-live li.is-active::before { animation: none; border-right-color: var(--accent); } }
/* R-A4 count-in */
.countin { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; text-align: center; cursor: pointer;
  background: color-mix(in srgb, var(--bg) 92%, transparent); padding: var(--safe-top) var(--s4) var(--safe-bottom); }
.countin-n { font: 600 6rem/1 var(--font-display); font-variant-numeric: lining-nums tabular-nums; color: var(--text); animation: countin 800ms var(--ease-out) both; }
.countin p { margin: var(--s4) 0 0; color: var(--text-2); }
@keyframes countin { from { opacity: 0; transform: scale(1.35); } 60% { opacity: 1; } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .countin-n { animation: none; } }
/* R-A5 live voice level */
.voice-bars i:nth-child(1) { --k: .55; } .voice-bars i:nth-child(2) { --k: .85; } .voice-bars i:nth-child(3) { --k: 1; }
.voice-bars i:nth-child(4) { --k: .75; } .voice-bars i:nth-child(5) { --k: .5; }
.voice.is-live .voice-bars i { animation: none; height: calc(6px + var(--lv, 0) * var(--k, 1) * 22px); }
/* R-A6 stations: compact rows on phones, cards from 720px; filter chips */
.slist { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.slist .ic { flex: none; color: var(--text-3); }
.srow { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 16px; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--border); }
.srow:last-child { border-bottom: 0; }
.srow:active { background: var(--surface-2); }
.srow-main { display: grid; flex: 1; min-width: 0; }
.srow-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow-meta { font-size: var(--fs-xs); color: var(--text-3); }
.srow-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }
.srow-done { color: var(--ok); display: inline-flex; }
.slist .srow-done .ic { color: var(--ok); }
@media (min-width: 720px) { .slist { display: none; } }
@media (max-width: 719px) { .scards { display: none; } }
.chips { position: sticky; top: calc(var(--safe-top) + var(--topbar-h)); z-index: 10; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 10px 0; background: var(--bg); mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
  scroll-snap-type: x proximity; margin: 0; }
.chips::-webkit-scrollbar { display: none; }
.chips a { flex: none; scroll-snap-align: start; min-height: 44px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: var(--r-pill);
  border: 1px solid var(--border); background: var(--surface); text-decoration: none; font: 600 var(--fs-sm)/1 var(--font-ui); color: var(--text-2); }
.chips a:last-child { margin-right: 48px; }
.chips a[aria-current="page"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
/* R-A7 home: values ghost, weekly rhythm */
.scorebar-track.is-ghost { background: repeating-linear-gradient(90deg, var(--surface-2) 0 8px, transparent 8px 12px); }
.week { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; align-items: center; }
.week li { width: 14px; height: 14px; border-radius: 50%; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--field-border); }
.week li.on { background: var(--accent); box-shadow: none; }
/* R-A8 role-play persona */
.persona { display: flex; gap: 12px; align-items: center; }
.persona > div { display: grid; min-width: 0; }
.persona-arch { width: 44px; height: 52px; flex: none; border-radius: 999px 999px 10px 10px; background: var(--accent-soft); color: var(--text);
  display: grid; place-items: center; font: 600 1.1rem var(--font-display); }
/* R-A9 landing: price strip, mini parent report */
.price-strip { text-align: center; font-weight: 600; color: var(--text-2); margin: var(--s5) 0 0; }
.mini-report { background: rgba(247,243,234,.07); border: 1px solid rgba(247,243,234,.16); border-radius: var(--r-md); padding: var(--s4); display: grid; gap: var(--s3); align-self: start; }
.mini-report .scorebar-track { background: rgba(247,243,234,.16); }
.mini-report .focus-line { font-size: var(--fs-sm); color: var(--text-2); margin: var(--s2) 0 0; }
.mini-report .focus-line strong { color: var(--text); }
/* R-A10 inline mic failure inside the dock */
.dock-alert { width: 100%; display: grid; gap: var(--s2); justify-items: center; }
.dock-alert .notice { width: 100%; margin: 0; }

/* ---------------------------------------------------------------- Wardcoach P1 */
/* R-P1 plan view: dated week dots ("Mon 9"), today's row, actions */
.week-dots-dated li { aspect-ratio: auto; max-height: none; min-height: 52px; padding: 6px 0; line-height: 1.15; text-align: center; }
.week-dots-dated li > span[aria-hidden] { display: grid; gap: 2px; }
.week-dots-dated .wd-name { font-size: var(--fs-2xs); font-weight: 600; }
.week-dots-dated .wd-day { font-size: var(--fs-sm); font-weight: 650; }
.plan-days > li .badge { flex: none; }
.plan-days > li.is-today strong { color: var(--text); }
.plan-past-h { color: var(--text-2); margin-top: var(--s3); }
.plan-actions .btn { width: 100%; }
/* R-P2 readiness ring with the 50 marker; Home shows it inline beside its caption on phones */
.ring-inline { display: grid; justify-items: center; gap: var(--s4); text-align: center; }
.ring-inline .ring-cap { justify-content: center; }
@media (max-width: 719px) {
  .ring-inline { grid-template-columns: 112px 1fr; justify-items: stretch; align-items: center; text-align: left; }
  .ring-inline .ring { width: 112px; height: 112px; margin: 0; }
  .ring-inline .ring-num { font-size: 2rem; }
  .ring-inline .kpi-label { font-size: .625rem; margin-top: 2px; }
  .ring-inline .ring-cap { justify-content: flex-start; align-items: flex-start; }
}
/* R-P3 tutor panel: quick chips, replies left, the reply bubble */
.tutor-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { min-height: 44px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--field-border); background: var(--surface);
  color: var(--text); font: 600 var(--fs-sm)/1.2 var(--font-ui); cursor: pointer; }
.chip-btn:hover { background: var(--surface-2); }
.chip-btn[aria-busy="true"] { opacity: .6; cursor: progress; }
.tutor-foot { display: flex; justify-content: flex-end; }
/* Tutor (closing grades): closed by default, a summary row with the quick questions; the text box opens on request. */
.tutor-box { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); padding: 14px 16px; }
.tutor-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px var(--s3); }
.tutor-title { font-weight: 600; }
.tutor-more > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  color: var(--text-2); font-size: var(--fs-sm); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.tutor-more > summary::-webkit-details-marker { display: none; }
.tutor-more > summary::before { content: "+"; font-size: 1.1rem; text-decoration: none; display: inline-block; width: 1ch; }
.tutor-more[open] > summary::before { content: "–"; }
.tutor-reply { border-radius: var(--r-md) var(--r-md) var(--r-md) 4px; background: var(--surface-2); padding: 12px 14px; line-height: 1.6; max-width: 68ch; }
.tutor-reply:empty { padding: 0; background: none; }
.tutor-reply.is-pending { color: var(--text-3); }
/* R-P4 missed chip count */
.chips .ic { width: 16px; height: 16px; margin-right: 6px; }
.chip-n { margin-left: 6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-2);
  display: inline-grid; place-items: center; font-size: var(--fs-2xs); }
.chips a[aria-current="page"] .chip-n { background: var(--on-primary); color: var(--primary); }
/* R-P5 ordering: number, grip, 44px chevrons, drag with pointer capture, FLIP (JS) */
.order-list li { position: relative; min-height: 56px; gap: 12px; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.order-list li.is-dragging { box-shadow: var(--sh-3); transform: scale(1.02); z-index: 2; cursor: grabbing; border-color: var(--field-border); }
.ord-n { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font: 650 var(--fs-sm)/1 var(--font-ui); flex: none; }
.grip { flex: none; display: grid; place-items: center; width: 16px; color: var(--text-3); }
.grip .ic { width: 18px; height: 18px; }
.order-list .handle { flex-direction: row; gap: 4px; }
.order-list .handle button, .order-list .handle button.ord-btn { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border-radius: 10px; }
.ord-btn .ic { width: 20px; height: 20px; }
.order-list .handle button:disabled { opacity: .45; cursor: default; }
.order-list[data-locked] li { cursor: default; touch-action: auto; }
.order-list[data-locked] .handle, .order-list[data-locked] .grip { display: none; }
@media (max-width: 419px) { .order-list li { gap: 8px; padding: 10px; } .grip { width: 12px; } }
/* R-P6 bow-tie map (phones and small tablets; the 3-column layout shows the shape from 900px) */
.bt-map { display: grid; grid-template-columns: 1fr 1.1fr 1fr; gap: 10px; align-items: center; padding: 12px; border-radius: var(--r-md); background: var(--surface-2);
  position: sticky; top: calc(var(--safe-top) + var(--topbar-h) + 4px); z-index: 3; margin-bottom: var(--s4); box-shadow: var(--sh-1); }
/* Gate 3 (a11y): in a run the map sticks under the sticky run header, not behind it. exam.js sets --q-head-h to the
   header's real height (the AI label wraps on small phones); 76px is its height with a one-line label. */
body.in-session .bt-map { top: calc(var(--safe-top) + var(--q-head-h, 76px) + 4px); }
.bt-col { display: grid; gap: 10px; }
.bt-slot { min-height: 34px; border: 1.5px dashed var(--field-border); border-radius: 8px; font-size: .75rem; padding: 6px; background: transparent; color: var(--text);
  font-family: var(--font-ui); line-height: 1.25; text-align: center; cursor: pointer; overflow-wrap: anywhere; }
.bt-slot.is-filled { border-style: solid; border-color: var(--accent); background: var(--surface); }
.bt-core { min-height: 52px; font-weight: 650; }
.bt-slot:disabled { cursor: default; }
.bowtie fieldset { scroll-margin-top: calc(var(--safe-top) + var(--topbar-h) + 150px); }
/* A list that is jumped to, or a box that takes focus, lands below the header and the map, whatever their heights
   (--bt-map-h: the map grows as its slots fill). The page's scroll-padding-top already gives safe-top + topbar-h +
   16px, so only the rest is added here. */
body.in-session .q-form input { scroll-margin-top: calc(var(--q-head-h, 76px) - var(--topbar-h) + 20px); }
body.in-session .bowtie fieldset { scroll-margin-top: calc(var(--q-head-h, 76px) + var(--bt-map-h, 102px) - var(--topbar-h) - 4px); }
@media (max-width: 899px) { body.in-session .bowtie input { scroll-margin-top: calc(var(--q-head-h, 76px) + var(--bt-map-h, 102px) - var(--topbar-h) + 20px); } }
@media (min-width: 900px) { .bt-map { display: none; } .bowtie fieldset, body.in-session .bowtie fieldset { scroll-margin-top: calc(var(--topbar-h) + 16px); } }
/* R-P7 highlight */
.hl-wrap { line-height: 1.7; }
.hl-token { padding: 3px 4px; border-radius: 6px; text-decoration: underline dotted var(--field-border); text-decoration-thickness: 1.5px; text-underline-offset: 5px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hl-token[aria-pressed="true"]:not(.correct):not(.wrong) { text-decoration: none; background: color-mix(in srgb, var(--accent) 22%, transparent); box-shadow: inset 0 -2px 0 var(--accent); }
.hl-token.correct, .hl-token.missed { text-decoration: none; }
/* R-P8 matrix cells: the whole cell is the target */
.matrix td { padding: 0; }
.matrix .cell { display: grid; place-items: center; min-height: 52px; cursor: pointer; }
.matrix .cell input { margin: 0; }
.matrix tbody tr:has(input:checked) { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.matrix thead th { font-size: var(--fs-xs); min-width: 72px; vertical-align: bottom; }
/* R-P9 run chrome */
.q-progress { height: 6px; }
.q-progress > span { transition: width 400ms var(--ease-out); }
.q-clock.is-low { color: var(--warn); font-weight: 650; }
.q-clock.is-critical { color: var(--err); font-weight: 650; }
.q-skel { gap: var(--s3); }
.q-skel .sk-line { height: 18px; }
.q-skel .w-30 { width: 30%; } .q-skel .w-100 { width: 100%; } .q-skel .w-80 { width: 80%; }
.q-skel .sk-opt { height: 52px; border-radius: var(--r-md); }
@media (max-width: 719px) {
  .qnav > .row { flex: 1; justify-content: flex-end; }
  .qnav > span:empty { display: none; }
  #q-submit, #q-next { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .q-progress > span { transition: none; } }
.hl-token[aria-disabled="true"] { cursor: default; }
@media (max-width: 419px) { .chip-btn { padding: 0 12px; } }

/* ================= P2 ================= */
/* Spacing on phones; Home keeps a 12 / 32 rhythm (grid gap s3 inside a group, .stack-lg between groups). */
@media (max-width: 479px) {
  .card-lg { padding: var(--s5) 20px; }
  main { padding-top: var(--s4); }
  .home-rhythm .grid { gap: var(--s3); }
}
/* View transitions: a quiet fade and rise between pages, and the reading ring flying into the HUD pill. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: 160ms var(--ease-in-out) both vt-out; }
  ::view-transition-new(root) { animation: 220ms var(--ease-out) both vt-rise; }
  .topbar { view-transition-name: topbar; }
  .tabbar { view-transition-name: tabbar; }
  #station[data-phase="reading"] > .timer { view-transition-name: station-timer; }
  ::view-transition-group(station-timer) { animation-duration: 320ms; animation-timing-function: var(--ease-out); }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 979px) {
  #station[data-phase="speaking"] .hud-time { view-transition-name: station-timer; }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 980px) {
  #station[data-phase="speaking"] .station-side .timer { view-transition-name: station-timer; }
}
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-rise { from { opacity: 0; transform: translateY(8px); } }
:root:has(body.lite)::view-transition-old(root), :root:has(body.lite)::view-transition-new(root),
:root:has(body.lite)::view-transition-group(*) { animation: none; }
/* Theme control (Account › Appearance) */
.seg-theme { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; max-width: 360px; }
.seg-theme button { min-height: 40px; }
/* Onboarding /welcome */
.seg-radio.seg-4 { grid-template-columns: 1fr 1fr; }
@media (min-width: 560px) { .seg-radio.seg-4 { grid-template-columns: repeat(4, 1fr); } }
.seg-radio.seg-3x2 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 400px) { .seg-radio.seg-3x2 { grid-template-columns: repeat(3, 1fr); } }
.welcome .seg-radio label { text-align: center; line-height: 1.2; }
a.card.soon-card { display: flex; gap: var(--s3); align-items: flex-start; text-decoration: none; }
.soon-card > .ic { color: var(--accent-text); flex: none; width: 22px; height: 22px; margin-top: 2px; }
.soon-text { display: grid; gap: 2px; min-width: 0; }
/* Countries index (Wardcoach) */
.country-featured { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.country-card { display: grid; gap: 4px; height: 100%; }
.country-name { font: 600 var(--fs-xl)/1.15 var(--font-display); letter-spacing: -.01em; }
@media (max-width: 379px) { .country-name { font-size: var(--fs-lg); } .country-featured .card { padding: var(--s4); } }
.country-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--s4); }
@media (min-width: 720px) { .country-list { grid-template-columns: repeat(4, 1fr); } }
.country-list a { display: flex; align-items: center; min-height: 48px; border-bottom: 1px solid var(--border); text-decoration: none; font-weight: 520; }
.country-list a:hover { text-decoration: underline; }
/* Country facts */
.facts { margin: 0; display: grid; gap: var(--s3); }
.facts > div { display: grid; gap: 2px; }
.facts dt { font: 650 var(--fs-sm)/1.3 var(--font-ui); color: var(--text-2); }
.facts dd { margin: 0; }
.sources { margin: 0; padding-left: 1.2em; font-size: var(--fs-sm); }
.sources a { overflow-wrap: anywhere; }
.welcome.stack-lg > * + * { margin-top: var(--s5); }
.welcome.stack-lg > .welcome-note { margin-top: var(--s2); }
/* Checked segment: the ring alone. "var(--sh-1), inset ..." became invalid in dark mode, where --sh-1 is none. */
.seg-radio label:has(input:checked) { box-shadow: inset 0 0 0 2px var(--accent); }
.stack-lg > .country-featured { margin-top: var(--s5); }
.stack-sm > .country-list { margin-top: var(--s2); }
/* Safeguarding stop in a practice station: helplines as tappable numbers beside their labels. */
.safeguard-list { list-style: none; padding: 0; margin: 0; text-align: left; }
.safeguard-list > li { display: flex; align-items: center; gap: var(--s3); }
.safeguard-list .btn { flex: none; min-width: 7.5em; }

/* ---------- QA accessibility fixes ---------- */
/* Primary navigation under 860px (signed out, or pages without the tab bar): a Menu button opens a sheet. */
.menu-btn { flex: none; }
@media (min-width: 860px) { .menu-btn { display: none; } }
@media (max-width: 479px) {
  .menu-btn { min-width: 44px; padding-inline: 10px; }
  .menu-btn > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .topbar .market-btn { display: none; }            /* the market switch is in the menu sheet and the footer */
}
.menu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.menu-list a { display: flex; align-items: center; min-height: 52px; padding: 0 var(--s4); border-radius: var(--r-md); background: var(--surface-2);
  color: var(--text); font-weight: 600; text-decoration: none; }
.menu-list a[aria-current="page"] { box-shadow: inset 0 0 0 2px var(--field-border); }
/* Form errors: inline, kept on screen, and not colour alone (an icon-like bar and the words). */
.field-error { display: flex; gap: 6px; align-items: baseline; margin: 0; color: var(--err); font-size: var(--fs-sm); font-weight: 600; }
.field-error::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 1.2em; height: 1.2em; border-radius: 50%;
  background: var(--err); color: var(--on-err); font-size: .8em; font-weight: 800; }
.input[aria-invalid="true"] { border-color: var(--err); border-width: 2px; }
.error-summary { border-left: 4px solid var(--err); }
.error-summary ul { margin: 6px 0 0; padding-left: 1.2em; }
.error-summary a { color: inherit; font-weight: 600; }
.flash-error { margin-top: var(--s4); border-left: 4px solid var(--err); }
.notice[tabindex="-1"]:focus { outline: none; }
.notice[tabindex="-1"]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
/* Answer feedback marks drawn in the matrix cells and cloze blanks (shape and words, never colour alone). */
.cell-tag { display: inline-flex; margin-left: 4px; vertical-align: middle; }
.cell-tag .ic { width: 24px; height: 24px; stroke-width: 2.5; }   /* the drawn mark is about 14px */
td.correct .cell-tag, td.missed .cell-tag, .cloze-ok { color: var(--ok); } td.wrong .cell-tag { color: var(--err); }
.matrix .cell { grid-auto-flow: column; gap: 4px; }
.cloze-ok { display: inline-flex; vertical-align: middle; margin: 0 4px; } .cloze-ok .ic { width: 16px; height: 16px; }
.hl-token .ic { width: .9em; height: .9em; margin-left: 3px; vertical-align: -0.1em; }
.order-list li .ord-ok { display: inline-flex; color: var(--ok); margin-left: auto; } .order-list li .ord-ok .ic { width: 18px; height: 18px; }
/* Case-study exhibit tabs (APG tabs pattern): the panel is focusable so its text can be scrolled and read. */
.exhibit[role="tabpanel"]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.item-stem[tabindex="-1"]:focus { outline: none; }
.item-stem[tabindex="-1"]:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
/* Station transcript: a keyboard-focusable log, so earlier turns can be scrolled back to. */
.transcript[tabindex="0"]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--r-md); }
.station-focus:focus { outline: none; }
.station-focus:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
/* QA: a heading focused by script on page load (results h1) is for screen readers; no ring for anyone. */
.station-focus[data-focus-on-load]:focus-visible { outline: none; }
/* Looping motion: loading animations stop within 5 s (WCAG 2.2.2) and the steps text carries on alone. */
.phase-marking .voice[data-state=thinking] .voice-bars i { animation-iteration-count: 3; }
.steps-live li.is-active::before { animation-iteration-count: 6; }
.skeleton { animation-iteration-count: 3; }
/* Targets: 24px controls, and 44px rows for links and small buttons where there is room. */
.choice input, .matrix input { width: 24px; height: 24px; }
.footer nav { gap: 0 var(--s3); }
.footer nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
@media (pointer: coarse) {
  .seg button, .seg a { min-height: 44px; }
  .bubble-more { min-width: 44px; min-height: 44px; }
  .btn-sm { min-height: 44px; }
}
.seg-radio .field-error { grid-column: 1 / -1; margin-bottom: 4px; }
/* Room for the Menu button beside the brand and Sign in on small phones (320-479px). */
.brand { min-height: 44px; }
.brand-name { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 479px) { .topbar .wrap { gap: var(--s2); } .topbar .brand-name { font-size: 1.15rem; } }
@media (max-width: 359px) {
  .topbar .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .topbar-back + .brand .brand-mark { display: block; }
}
@media (max-width: 399px) { .topbar .brand-name { font-size: 1.06rem; } }

/* ---------- launch gate: a11y and design blockers ---------- */
/* Text hidden visually under 720px but kept as the accessible name (topbar Account link). */
@media (max-width: 719px) { .vh-sm { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
/* Landing pull quote stays upright so first paint never needs the italic face. */
.quote-upright { font-style: normal; }
/* Script focus: targets with tabindex=-1 (headings, stems, verdicts) are never reached with Tab, so focusing them by
   script never draws a ring, whatever the browser's :focus-visible heuristic decides on page load. */
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }
/* Keyboard-scrollable regions (tables and exhibits wider than the screen). */
.scroll-x[tabindex="0"]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--r-sm); }
/* WCAG 2.4.11: the sticky "Build my plan" bar (about 140px) sits above the tab bar; focused ratings scroll clear of both. */
html:has(.plan-submit) { scroll-padding-bottom: calc(var(--safe-bottom) + 180px); }
html:has(body.has-tabbar .plan-submit) { scroll-padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 180px); }
@media (min-width: 860px) { html:has(body.has-tabbar .plan-submit) { scroll-padding-bottom: calc(var(--safe-bottom) + 180px); } }
/* Windows contrast themes (forced colours): selection must not rely on backgrounds or shadows, which are overridden. */
@media (forced-colors: active) {
  .choice input, .matrix input { forced-color-adjust: none; background: Canvas; border-color: CanvasText; }
  .choice input::after, .matrix input::after { background: CanvasText; }
  .choice input:checked, .matrix input:checked { background: Highlight; border-color: Highlight; }
  .choice input:checked::after, .matrix input:checked::after { background: HighlightText; }
  .choice input[type=checkbox]::after, .matrix input[type=checkbox]::after,
  .choice input[type=checkbox]:checked::after, .matrix input[type=checkbox]:checked::after { background: none; border-color: HighlightText; }
  .choice:has(input:checked), .seg-radio label:has(input:checked), .hl-token[aria-pressed="true"],
  .seg [aria-pressed="true"], .seg-links button[aria-pressed="true"], .seg-links a[aria-current], .chips a[aria-current="page"] {
    outline: 3px solid Highlight; outline-offset: -3px; }
  .hl-token[aria-pressed="true"] { text-decoration: underline 2px; }
  .switch[aria-checked="true"] { outline: 2px solid Highlight; }
  .tabs [aria-selected="true"] { border-bottom-color: Highlight; }
  .scorebar-track { border: 1px solid CanvasText; }
  .scorebar-track > span { forced-color-adjust: none; background: Highlight; }
  .ring .arc { forced-color-adjust: none; stroke: Highlight; }
  .week-dots .wd-done { forced-color-adjust: none; background: Highlight; color: HighlightText; }
}
/* Results (launch gate): one 760px column on phones and tablets; two columns from 1080px so desktop is not half empty. */
.result-page { max-width: 760px; margin-inline: auto; }
/* Functional QA: the named Next button ("Next: <station title>") wraps onto two lines. With nowrap, a long title made
   the button 387px wide and the whole results page scrolled sideways on phones. */
.result-actions .btn { white-space: normal; min-width: 0; overflow-wrap: anywhere; }
.result-actions { min-width: 0; }
@media (min-width: 1080px) {
  .result-page { max-width: none; }
  .result-cols { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--s6); align-items: start; }
  .result-cols > * + * { margin-top: 0; }
  .result-page > :not(.result-cols) { max-width: 760px; }
  /* The share card spans both columns, so nothing sits in a half-width strip under a column that has ended. */
  .result-page > .share-row { max-width: none; }
}
.model-answer > p + p { margin-top: var(--s3); }
/* Stations list (launch gate): titles wrap to two lines; done rows show the last score; groups by type. */
.srow-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
.srow-done { align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
.sgroup-n { font-weight: 500; font-size: var(--fs-sm); }
.card.srow-start { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); text-decoration: none; flex-wrap: nowrap; }
.srow-start .eyebrow { margin: 0; }
.srow-start > span:first-child { display: grid; gap: 4px; min-width: 0; }
.srow-start .ic { flex: none; }
/* Practice rhythm (launch gate): labelled weekday tiles, the same look as .week-dots, instead of 7 bare 14px dots. */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 44px)); gap: 6px; }
.week li { width: auto; height: auto; aspect-ratio: 1; max-height: 44px; border-radius: 12px; display: grid; place-items: center;
  font: 600 var(--fs-xs)/1 var(--font-ui); color: var(--text-3); }
.week li.on { color: var(--accent-ink); }
@media (forced-colors: active) { .week li.on { forced-color-adjust: none; background: Highlight; color: HighlightText; } }
/* Schools (launch gate): search row, stacked long values, the night-before card link. */
.school-find { flex-wrap: nowrap; }
.school-find .input { flex: 1 1 auto; min-width: 0; }
.list-kv > li.kv-stack { display: grid; gap: 2px; }
.list-kv > li.kv-stack > strong { text-align: left; }
.crash-link { text-decoration: none; gap: var(--s3); }
.crash-link .row { flex-wrap: nowrap; gap: var(--s2); }
/* Question run on phones (launch gate). Matrix under 520px: each row is a card, the statement full width and the
   column choices as a segmented row beneath (each cell shows its column name; the inputs keep "row: column" names). */
.matrix .cell-t { display: none; }
@media (max-width: 519px) {
  .matrix, .matrix tbody, .matrix tr, .matrix th, .matrix td { display: block; }
  .matrix thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .matrix tbody { display: grid; gap: var(--s2); }
  .matrix tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 12px; border: 1px solid var(--border);
    border-radius: var(--r-md); background: var(--surface); }
  .matrix.m-cols-3 tbody tr { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .matrix.m-cols-4 tbody tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .matrix tbody th[scope=row] { grid-column: 1 / -1; padding: 0 0 4px; border: 0; font-weight: 600; text-align: left; }
  .matrix tbody td { border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); text-align: center; }
  .matrix tbody td:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--surface); }
  .matrix .cell { grid-auto-flow: column; justify-content: center; gap: 8px; min-height: 48px; padding: 4px 8px; }
  .matrix .cell-t { display: inline; font-size: var(--fs-sm); font-weight: 600; line-height: 1.2; text-align: left; }
  .scroll-x:has(> .matrix) { overflow: visible; }
  /* Feedback (closing grades): the desktop P-2 states on the phone cells, winning over the teal "selected" look. */
  .matrix tbody tr > td.wrong { border: 1.5px solid var(--err); background: var(--err-bg); box-shadow: none; }
  .matrix tbody tr > td.correct { border: 1.5px solid var(--ok); background: var(--ok-bg); box-shadow: none; }
  .matrix tbody tr > td.missed { border: 1.5px dashed var(--ok); background: var(--surface); box-shadow: none; outline: 0; }
}
.matrix td.wrong input:checked { background: var(--err); border-color: var(--err); }
.matrix td.correct input:checked { background: var(--ok); border-color: var(--ok); }
/* Ordering on phones: no grip, and the two arrows stack, so the item text keeps the width. */
@media (max-width: 519px), (pointer: coarse) { .order-list .grip { display: none; } }
@media (max-width: 519px) { .order-list .handle { flex-direction: column; gap: 4px; } }
/* Boards index (launch gate): letter jump and a compact A-Z list, two columns from 560px. */
.az-jump { display: flex; flex-wrap: wrap; gap: 4px; }
.az-jump a { min-width: 44px; min-height: 44px; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--surface-2);
  text-decoration: none; font-weight: 600; }
.az-groups { display: grid; gap: var(--s4); }
@media (min-width: 560px) { .az-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s6); } }
@media (min-width: 980px) { .az-groups { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.az-group h2 { scroll-margin-top: calc(var(--topbar-h) + var(--safe-top) + 16px); }
.blist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.blist a { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); min-height: 44px; padding: 8px 4px;
  border-bottom: 1px solid var(--border); text-decoration: none; }
/* Six header links for a signed-in student (Progress added): keep one row from 860px. Between 860 and 1079px the
   links tighten and Account shows its icon only (the word stays as its accessible name). */
.nav a { white-space: nowrap; }
@media (min-width: 860px) and (max-width: 1079px) {
  .topbar .wrap { gap: var(--s3); }
  .nav { gap: 0; }
  .nav a { padding: 8px 9px; }
  .actions .vh-sm { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* ---------- closing launch gate ---------- */
/* Mockseat Home: one placeholder line before the first station; "See all" stays right-aligned in its heading row. */
.values-ghost { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1px dashed var(--field-border); border-radius: var(--r-md); }
.values-ghost .ic { flex: none; width: 20px; height: 20px; color: var(--text-3); }
.row-between.head-link { flex-wrap: nowrap; }
.row-between.head-link > h2, .row-between.head-link > h3 { min-width: 0; }
.row-between.head-link > .btn { margin-left: auto; margin-right: -12px; white-space: nowrap; }
/* Sign-in: the resend countdown reads as a (disabled) button, not muted text. */
.btn-ghost[data-cooldown] { --b-bd: var(--field-border); }
.btn-ghost[data-cooldown][disabled] { opacity: .7; }
/* Share row: secondary actions (turn the link off) in a small overflow menu. */
.more-menu { position: relative; align-self: flex-start; }
.more-menu > summary { list-style: none; --b-bd: var(--field-border); }
.more-menu > summary::-webkit-details-marker { display: none; }
.more-menu > summary::after { content: ""; width: 7px; height: 7px; margin-left: 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.more-menu[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.more-menu-body { margin-top: var(--s2); padding: var(--s2); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--sh-2); min-width: 200px; }
/* Toasts on phones with a tab bar sit just above it, never over the page title row (and its pass badge). */
@media (max-width: 859px) { body.has-tabbar:not(.in-session) .toasts { top: auto; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px); } }
/* Functional QA: during a running station the bottom of the screen is the one control the student needs ("Start
   speaking", the answer box and Send), so toasts sit at the top, under the status bar, on phones and tablets. */
@media (max-width: 979px) { body.toasts-top .toasts { top: calc(var(--safe-top) + 72px); bottom: auto; } }
.btn[hidden] { display: none; }
/* Trust-row links get a 24px+ target without moving the line (WCAG 2.2 target size). */
.trust a { display: inline-block; padding-block: 4px; margin-block: -4px; }
/* Wardcoach practice intro: today's plan focus as a card link. */
.plan-focus { display: flex; gap: 12px; align-items: center; }
.plan-focus > .ic { flex: none; width: 22px; height: 22px; color: var(--accent-text); }
.plan-focus > span { display: grid; gap: 2px; }
/* Wardcoach session summary: the score as a stat line beside the limit message; missed rows marked with a cross. */
.kpi-line { font: 650 var(--fs-lg)/1.3 var(--font-ui); }
.missed-row { justify-content: flex-start; text-align: left; }
.missed-row > .small { flex: 1; min-width: 0; }
.missed-x { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: var(--err); background: var(--err-bg, color-mix(in srgb, var(--err) 12%, transparent)); }
.missed-x .ic { width: 14px; height: 14px; }
/* Planner: the sticky "n of 8 rated / Build my plan" bar is solid (surface + blur + top rule), so cards never show through. */
.plan-submit { background: color-mix(in srgb, var(--surface) 94%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--border); margin-inline: -16px; padding-inline: 16px; border-radius: var(--r-md) var(--r-md) 0 0; }
body.lite .plan-submit { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; }

/* ---------- closing design review (screens graded under A-) ---------- */
/* Stacks: hidden inputs and the honeypot never add rhythm; the first visible child sits flush (no 48px gap). */
.stack > input[type=hidden], .stack > .hp, .stack-sm > input[type=hidden], .stack-lg > input[type=hidden] { margin: 0; }
:is(.stack, .stack-sm, .stack-lg) > :not(input[type=hidden], .hp, :not(input[type=hidden], .hp) ~ *) { margin-top: 0; }
/* Footer prefs: Data saver on its own line, then the market select and Change on one inline row. */
.footer-prefs { display: grid; gap: var(--s2); justify-items: start; }
.footer-prefs .footer-loc { flex-wrap: nowrap; gap: var(--s2); max-width: 100%; }
.footer form.footer-loc select.input { flex: 0 1 auto; min-width: 0; width: auto; }
.footer-loc .btn { flex: none; }
/* Price and locked cards: tick lists use the card's width (no ch cap); the CTA sits at the bottom of equal-height cards. */
.card .ticks { font-size: var(--fs-sm); gap: 8px; }
.card .ticks li { max-width: none; padding-left: 26px; text-wrap: wrap; }
.card .ticks li::before { top: .4em; }
.locked .ticks { max-width: none; width: 100%; }
.price-card { display: flex; flex-direction: column; }
.price-card > .ticks { flex: 1 0 auto; align-content: start; }
/* .badge-top (Wardcoach pricing): where the cards sit side by side, the recommended card's badge rides on its top edge,
   so it takes no row of its own and every card's price starts at the same height (it pushed one price 40px lower). */
@media (min-width: 720px) {
  .price-grid.badge-top .price-reco { position: relative; }
  .price-grid.badge-top .price-reco > .row-between > .badge { position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%); white-space: nowrap; }
}
/* Stations list: free note, "Show all n" fold on phones (the summary moves below the rows it reveals). */
.free-note .badge { vertical-align: 1px; margin-right: 4px; }
.srow-more { display: flex; flex-direction: column; }
.srow-more > summary { list-style: none; cursor: pointer; order: 2; border-bottom: 0; color: var(--accent-text); font-weight: 600; }
.srow-more > summary::-webkit-details-marker { display: none; }
.srow-more > summary .ic { transition: transform var(--t-fast) var(--ease); }
.srow-more[open] > summary .ic { transform: rotate(180deg); }
.srow-more[open] > summary { border-top: 1px solid var(--border); }
.srow-more .when-open, .srow-more[open] .when-closed { display: none; }
.srow-more[open] .when-open { display: inline; }
.slist > .srow:has(+ .srow-more) { border-bottom: 1px solid var(--border); }
.srow-more > .srow:last-of-type { border-bottom: 0; }
/* Horizontal chip scrollers: a right-edge fade says there is more to scroll. */
   The fade is a sticky overlay painted in the page colour (a mask would also fade the scroller's own background
   and let the rows scrolling under the sticky row show through). */
.chips { -webkit-mask-image: none; mask-image: none; }
.chips::after { content: ""; position: sticky; right: 0; flex: none; width: 56px; margin-left: -56px; align-self: stretch;
  background: linear-gradient(90deg, color-mix(in srgb, var(--bg) 0%, transparent), var(--bg) 85%); pointer-events: none; }
.chips a:last-child { margin-right: 56px; }
/* Schools index: compact 56px rows (name, then city · style · stations · months), two columns from 720px. */
.school-rows { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
@media (min-width: 720px) { .school-rows { display: grid; grid-template-columns: 1fr 1fr; column-gap: 0; } .school-rows > li:nth-child(odd) { border-right: 1px solid var(--border); } }
@media (min-width: 1080px) { .school-rows { grid-template-columns: repeat(3, 1fr); } .school-rows > li { border-right: 1px solid var(--border); } .school-rows > li:nth-child(3n) { border-right: 0; } }
.school-rows > li { border-bottom: 1px solid var(--border); margin-bottom: -1px; min-width: 0; }
.school-row { display: flex; align-items: center; gap: var(--s3); min-height: 56px; padding: 8px 16px; text-decoration: none; color: var(--text); }
.school-row:hover { background: var(--surface-2); }
.school-row-main { display: grid; min-width: 0; flex: 1; }
.school-row-name { font-weight: 600; line-height: 1.3; }
.school-row-meta { font-size: var(--fs-xs); color: var(--text-3); line-height: 1.35; }
.school-row > .ic { flex: none; width: 18px; height: 18px; color: var(--text-3); }
/* School detail: the night-before link is one row (icon, text, arrow pushed right); "When" as a regular-weight list. */
.crash-link { display: flex; align-items: center; gap: var(--s3); }
.crash-link > .ic:first-child { flex: none; width: 24px; height: 24px; color: var(--accent-text); }
.crash-link > strong { flex: 1 1 auto; min-width: 0; }
.crash-link > .ic:last-child { flex: none; margin-left: auto; width: 20px; height: 20px; }
.kv-when .kv-when-head { font-weight: 600; }
.kv-when .dots { margin-top: var(--s1); color: var(--text-2); font-weight: 400; }
.free-card .row-between > .ic { width: 20px; height: 20px; color: var(--text-3); flex: none; }
.tracker-add { justify-self: start; align-self: flex-start; }
/* UCAT checker: label and range hint, then the input at full width with Compare below it on phones and beside it
   (aligned to the input box, not the label) from 480px. */
.conv-form { display: grid; gap: var(--s4); }
.conv-row { display: grid; gap: var(--s3); margin-top: 4px; }
@media (min-width: 480px) { .conv-row { grid-template-columns: minmax(0, 1fr) auto; align-items: end; } }
.conv-row .input, .conv-row .btn-lg { min-height: var(--tap); height: var(--tap); }
.conv-row .btn-lg { padding-block: 0; }
/* Gate 3 (a11y): no opacity on the worked example's rows. At 92% the "Above the last threshold" badge fell to 3.99:1
   (opacity is invisible to the token contrast gate); the "Example" eyebrow already marks the block. */
.conv-ex-name { font-weight: 600; }
.conv-how h2 { color: var(--text); }
/* Segmented radios (welcome, planner): one selected style everywhere, a filled navy segment with a tick, kept apart
   from :focus-visible (which stays the outline ring). */
.seg-radio label:has(input:checked), .card .seg-radio label:has(input:checked),
.seg-radio .r-below:has(input:checked), .seg-radio .r-above:has(input:checked) {
  background: var(--primary); color: var(--on-primary); box-shadow: none; }
.seg-radio label > span { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; }
.seg-radio label:has(input:checked) > span::before { content: ""; flex: none; width: 10px; height: 6px; margin-top: -3px;
  border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.seg-radio label:has(input:checked) .cpr-official { color: inherit; opacity: .85; }
@media (forced-colors: active) { .seg-radio label:has(input:checked) { forced-color-adjust: none; background: Highlight; color: HighlightText; } }
/* Mockseat Home: the core values as ghost bars before the first station (replaces the dashed box). */
ul.values-ghost { list-style: none; margin: 0; padding: 0; border: 0; display: grid; gap: var(--s3); }
.values-ghost li { display: grid; gap: 6px; }
.vg-name { font-weight: 600; font-size: var(--fs-sm); color: var(--text-2); }
.vg-track { display: block; height: 12px; border-radius: var(--r-pill); background: repeating-linear-gradient(90deg, var(--surface-2) 0 10px, transparent 10px 14px);
  box-shadow: inset 0 0 0 1px var(--border); }
/* Station results: the "picked to practise" caption sits in the dock under Next; the share card stacks on phones. */
.result-actions > .result-why { grid-column: 1 / -1; margin: 0; text-align: center; }
@media (max-width: 479px) {
  .share-row { grid-template-columns: 1fr; }
  .share-thumb { margin-inline: auto; }
  .share-row .row .btn { flex: 1 1 100%; }
  .share-row .seg-links { width: 100%; display: grid; }
}
/* Account: the parent switch as a card row, the invite code in a copy field, sign-out grouped in a card. */
.card-row-form { padding-block: var(--s2); }
.list-nav-2 { display: grid; gap: 2px; text-align: left; min-width: 0; }
.list-nav > li > button:has(.list-nav-2) { min-height: 64px; }
.copy-field { display: flex; gap: var(--s2); align-items: stretch; flex-wrap: wrap; }
.copy-field .code-field { flex: 1 1 9ch; min-width: 0; width: auto; font: 600 1.375rem/1.2 ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-variant-numeric: tabular-nums; letter-spacing: .12em; text-align: center; background: var(--surface-2); }
.copy-field .btn { flex: 1 1 auto; }
.signout-actions { gap: var(--s2); }
/* Parent report: KPI tiles 2-up at every width. */
.kpi-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.kpi-pair .card { padding: var(--s4); }
/* Wardcoach landing: the trust-row link reads like its siblings; hero buttons stay one line on small phones. */
.trust a.trust-link { color: inherit; text-decoration: none; }
.trust a.trust-link:hover { text-decoration: underline; }
@media (max-width: 479px) { .hero .btn-lg { font-size: var(--fs-md); padding-inline: 16px; } }
/* Wardcoach Home: Today as one secondary row before the first score; the readiness ring stacks over its legend on phones. */
.today-compact { display: flex; align-items: center; gap: var(--s3); }
.today-compact-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.today-compact > .ic { flex: none; width: 20px; height: 20px; color: var(--text-3); }
@media (max-width: 479px) {
  .ring-inline { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .ring-inline .ring-cap { justify-content: center; }
  .readiness .btn-lg { font-size: var(--fs-md); padding-inline: 16px; }
}
@media (max-width: 479px) { .conv-list > li { flex-direction: column; align-items: flex-start; gap: var(--s2); } }
/* Question run: a disabled Submit is a quiet outline (aria-disabled still explains itself when tapped). */
#q-submit[aria-disabled="true"]:not([aria-busy]) { --b-bg: transparent; --b-fg: var(--text-3); --b-bd: var(--field-border); opacity: 1; box-shadow: none; }
/* Drop-down cloze: blanks sit inline in the sentence, sized to the chosen option where supported. */
.cloze select { display: inline-block; width: auto; max-width: 100%; field-sizing: content; min-width: 7.5em; vertical-align: baseline; text-overflow: ellipsis; }
.cloze-bind { white-space: nowrap; }
.cloze { line-height: 2.1; }
/* Functional QA: a native select cannot wrap, so on phones the chosen option was cut off with an ellipsis ("prolonged
   sedation an…"), before and after submitting. Each blank now shows its choice in a wrapping box (.cloze-face); the
   real select lies invisibly over it, so the picker, the keyboard and the accessible name are the native ones. */
.cloze-pick { position: relative; display: inline-block; max-width: 100%; vertical-align: middle; margin: 2px 0; }
.cloze-face { display: block; min-height: 44px; min-width: 7.5em; padding: 10px 34px 10px 12px; border: 1px solid var(--field-border); border-radius: 10px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23596277' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center/16px;
  color: var(--text); line-height: 1.35; white-space: normal; overflow-wrap: anywhere; text-align: left; }
.cloze-face.is-empty { color: var(--text-3); }
.cloze-pick select { position: absolute; inset: 0; width: 100%; height: 100%; min-width: 0; min-height: 0; margin: 0; opacity: 0; cursor: pointer; }
.cloze-pick select:disabled { opacity: 0; cursor: default; }
.cloze-pick:focus-within .cloze-face { outline: 3px solid var(--focus); outline-offset: 2px; }
.cloze-pick.correct .cloze-face { border-color: var(--ok); background-color: var(--ok-bg); background-image: none; padding-right: 12px; }
.cloze-pick.wrong .cloze-face { border-color: var(--err); background-color: var(--err-bg); background-image: none; padding-right: 12px; text-decoration: line-through; text-decoration-color: var(--err); }
@media (forced-colors: active) { .cloze-pick:focus-within .cloze-face { outline-color: Highlight; } }
/* Matrix on phones: long column labels get a single column instead of squeezing into two. */
@media (max-width: 519px) { .matrix.m-long tbody tr { grid-template-columns: 1fr; } .matrix .cell-t { overflow-wrap: anywhere; }
  /* One column: left-aligned, so the radio circles line up down the card (closing grades). */
  .matrix.m-long .cell { justify-content: flex-start; padding-left: 16px; } }
/* Planner: each rating group is its own block (label above its control, a divider between groups); the rhythm fields
   keep the stack rhythm (.seg-radio no longer zeroes the stack's margin-top). */
.planner-form .cpr-row + .cpr-row { margin-top: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--border); }
.planner-form .cpr-row { grid-template-columns: repeat(3, 1fr); }
@media (min-width: 720px) { .planner-form .cpr-row { grid-template-columns: repeat(3, minmax(0, 160px)); }
  .planner-form .cpr-row legend { grid-column: 1 / -1; width: 100%; margin: 0 0 8px; padding: 0; } }
.planner-form section.stack-lg > .seg-radio, .planner-form section.stack-lg > .choice, .planner-form section.stack-lg > .stack-sm { margin-top: var(--s5); }
.planner-form section.stack-lg > :first-child { margin-top: 0; }
/* Plan view: the day label stays on one line; under 480px the topic badge moves under it. */
.plan-days > li strong { white-space: nowrap; }
@media (max-width: 479px) { .plan-days > li { flex-direction: column; align-items: flex-start; gap: var(--s2); } .plan-days > li .badge { white-space: normal; } }
/* Practice summary: missed questions get a neutral marker (review, not a verdict). */
.missed-x { color: var(--text-2); background: var(--surface-2); }
.session-done .missed-more summary { font-size: var(--fs-sm); }
/* Accordions: the +/– always sits at the right edge, whatever wraps. */
details.disclose > summary::after { flex: none; margin-left: auto; padding-left: var(--s3); }
/* Case exhibits (closing grades): the tabs are one row that scrolls sideways, with a fade on the side that has more. */
.ex-tabs { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; }
.ex-tabs [role="tab"] { padding-inline: 12px; flex: none; }
.ex-tabs-box { position: relative; }
.ex-tabs-box::before, .ex-tabs-box::after { content: ""; position: absolute; top: 0; bottom: 1px; width: 32px; pointer-events: none;
  opacity: 0; transition: opacity var(--t-fast); z-index: 1; }
.ex-tabs-box::before { left: 0; background: linear-gradient(to right, var(--surface), transparent); }
.ex-tabs-box::after { right: 0; background: linear-gradient(to left, var(--surface), transparent); }
.ex-tabs-box.fade-l::before, .ex-tabs-box.fade-r::after { opacity: 1; }
.ex-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); }
.ex-toggle { flex: none; display: none; }
.ex-text { white-space: pre-line; line-height: 1.6; }
.ex-more { justify-self: start; align-self: flex-start; min-height: 44px; font-weight: 600; }
@media (max-width: 599px) {
  /* Grades fix, phones: the case title gets the full width, then one full-width disclosure row ("Show case · Nurse's
     notes, Vital signs, …" and a chevron, 44px). Collapsed, the tab strip is hidden (no dead-looking tabs); open, the
     tabs stay one row that scrolls sideways with the edge fades and the selected underline. Spacing on the --s2/--s3
     rhythm. */
  .ex-head { flex-direction: column; align-items: stretch; gap: var(--s3); }
  .case-card.stack > * + * { margin-top: var(--s2); }
  .case-card.stack > .ex-body { margin-top: var(--s3); }
  .ex-toggle { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); width: 100%; min-height: 44px;
    padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); color: var(--text);
    font: 600 var(--fs-sm)/1.35 var(--font-ui); text-align: left; cursor: pointer; }
  .ex-toggle::after { content: ""; flex: none; width: 8px; height: 8px; margin: 0 4px 3px 0; border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor; transform: rotate(225deg); transform-origin: 60% 60%; transition: transform var(--t-fast); }
  .ex-toggle:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
  .ex-toggle-text { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ex-toggle-tabs { display: none; font-weight: 500; color: var(--text-2); }
  .case-card.is-collapsed .ex-toggle::after { transform: rotate(45deg); margin-bottom: 4px; }
  .case-card.is-collapsed .ex-toggle-tabs { display: inline; }
  .case-card.is-collapsed .ex-tabs-box, .case-card.is-collapsed .ex-body { display: none; }
  /* Notes grow with the page; long ones are clamped to about 8 lines behind "Show all notes". */
  #exh-panel.is-clamped .ex-text { max-height: calc(1.6em * 8); overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent); mask-image: linear-gradient(to bottom, #000 70%, transparent); }
}
@media (min-width: 600px) { .ex-more { display: none; } }
/* Item exhibits (vital signs and other tables): edge fades and a hint when wider than the screen; under 480px each
   row is a stacked card, every value beside its column name. */
.ex-scroll { position: relative; }
.ex-scroll.fade-r { box-shadow: inset -18px 0 14px -14px color-mix(in srgb, var(--text) 35%, transparent); }
.ex-scroll.fade-l { box-shadow: inset 18px 0 14px -14px color-mix(in srgb, var(--text) 35%, transparent); }
.ex-scroll.fade-l.fade-r { box-shadow: inset -18px 0 14px -14px color-mix(in srgb, var(--text) 35%, transparent), inset 18px 0 14px -14px color-mix(in srgb, var(--text) 35%, transparent); }
.scroll-hint { text-align: right; }
@media (max-width: 479px) {
  .ex-table, .ex-table tbody, .ex-table tr, .ex-table td { display: block; }
  .ex-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ex-table tbody { display: grid; gap: var(--s2); }
  .ex-table tr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 6px 12px; }
  .exhibit .ex-table td { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); gap: var(--s2); padding: 6px 0; }
  .exhibit .ex-table tr > td:last-child { border-bottom: 0; }
  .ex-table td::before { content: attr(data-label); color: var(--text-3); font-weight: 600; }
  .ex-table tr > td:first-child { font-weight: 600; }
}
/* Highlight items: read as prose, with a tint on hover and selection; each token keeps a 24px+ target through its padding.
   Grades fix: unselected tokens keep a resting dotted underline in --field-border (3:1 non-text contrast), so the bounds of
   each phrase show on touch screens before the first tap. Once marked (or locked after checking), the underline goes. */
.hl-token { text-decoration: underline dotted var(--field-border); text-decoration-thickness: 2px; text-underline-offset: 5px; text-decoration-skip-ink: none;
  padding: 3px 0; min-height: 24px; border-radius: 4px; transition: background var(--t-fast); }
.hl-token[aria-disabled="true"]:not(.wrong) { text-decoration: none; }
/* Fragments ("Not relieved by an antacid") go one per line, never run together as one unpunctuated sentence. */
.hl-wrap.hl-lines { display: grid; justify-items: start; gap: 6px; line-height: 1.5; }
.hl-wrap.hl-lines .hl-token { padding: 3px 4px; margin-left: -4px; }
@media (hover: hover) { .hl-token:not([aria-disabled="true"]):not(:disabled):hover { background: color-mix(in srgb, var(--accent) 12%, transparent); } }
.hl-token[aria-pressed="true"]:not(.correct):not(.wrong) { background: color-mix(in srgb, var(--accent) 24%, transparent); box-shadow: inset 0 -2px 0 var(--accent); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hl-token:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
/* Board facts: label above value under 480px. Country facts: room under the heading. */
@media (max-width: 479px) { .list-kv.kv-stack-sm > li { display: grid; gap: 2px; justify-content: stretch; } .list-kv.kv-stack-sm > li > strong { text-align: left; } }
.card > h2 + .facts { margin-top: var(--s3); }
.facts-full dd { color: var(--text-2); }
/* Large buttons on small phones: one line for labels like "Take the free readiness test". */
@media (max-width: 479px) { .btn-lg { font-size: var(--fs-md); padding-inline: 18px; } }
.session-done .list li.missed-row { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: var(--s3); row-gap: var(--s1); align-items: start; }
.session-done .missed-row .badge { grid-column: 2; justify-self: start; }
.footer-prefs .footer-loc { width: 100%; max-width: 420px; }
.footer form.footer-loc select.input { flex: 1 1 auto; width: 0; min-width: 0; }
/* Legal positioning 4.1: checkout summary and the two unticked, required boxes (one per line, 44px targets). */
.checkout-consent { border-top: 1px solid var(--border); padding-top: var(--s3); }
.consent-summary { color: var(--text); }
/* The whole label row is the target: 44px at least, with a 24px box. */
.consent-check { display: flex; gap: var(--s3); align-items: flex-start; min-height: 44px; padding-block: 8px; font-size: var(--fs-sm); line-height: 1.45; cursor: pointer; }
.consent-check input { flex: none; width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--primary); }
/* A Pay button that is waiting for the boxes keeps its filled colour at 55% (a pale outline pill looked broken), and
   the line under it says what is missing. */
.checkout-consent [data-consent-submit][disabled] { opacity: .55; cursor: not-allowed; box-shadow: none; }
.checkout-consent .btn-primary[data-consent-submit][disabled] { --b-bg: var(--primary); --b-bd: var(--primary); }
.consent-help[hidden] { display: none; }
/* The terms the boxes refer to: never under 13px, at any width. */
.consent-terms p { font-size: max(13px, var(--fs-sm)); line-height: 1.5; }
/* The review step: the order (pass and price) above the boxes; no rule above the card's first row. */
.checkout-review { border-top: 1px solid var(--border); padding-top: var(--s5); }
.review-order { align-items: flex-start; padding-bottom: var(--s4); border-bottom: 1px solid var(--border); flex-wrap: nowrap; }
.review-order .price { white-space: nowrap; }
/* Grades fix: the pass's legal summary sits in one disclosure under the boxes. */
.consent-terms > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 44px;
  cursor: pointer; list-style: none; font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
.consent-terms > summary::-webkit-details-marker { display: none; }
.consent-terms > summary::after { content: "+"; flex: none; font-size: 1.2rem; color: var(--text-3); }
.consent-terms[open] > summary::after { content: "–"; }
.consent-terms > div { padding-bottom: var(--s2); }
.tutor-ai-tag { margin-top: calc(-1 * var(--s1)); }
.persona-ai { font-weight: 500; color: var(--text-2); font-size: .9em; }
/* Grades fix: parent home child card (pass status, latest station) */
.kv-list { margin: 0; display: grid; gap: var(--s2); }
.kv-list > div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: var(--s2); padding-top: var(--s2); border-top: 1px solid var(--border); }
.kv-list dt { font: 600 var(--fs-sm)/1.4 var(--font-ui); color: var(--text-2); }
.kv-list dd { margin: 0; font-size: var(--fs-sm); line-height: 1.4; overflow-wrap: anywhere; }
.kv-list > div:first-child { padding-top: 0; border-top: 0; }
.stack > .kv-list { margin-top: var(--s4); }
.kv-list .kv-title { display: block; }
.kv-list .kv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); margin-top: var(--s1); }
@media (max-width: 419px) { .kv-list > div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
/* Grades fix: practice summary, one primary action and a text link for "Done for today" */
.session-acts .done-link { display: inline-block; min-height: 44px; line-height: 44px; font-weight: 600; }

/* ---------- final design review: must-fix items ---------- */
/* Out of stations (Home and the station page): two neutral 48px buttons side by side from 480px, stacked below it;
   the next station as a tappable row with a lock; a lock chip beside the station type. */
.btn-pair { display: grid; gap: var(--s2); }
.btn-pair .btn { min-height: 48px; }
@media (min-width: 480px) { .btn-pair { grid-template-columns: 1fr 1fr; } }
@media (min-width: 480px) { .btn-pair.btn-pair-stack { grid-template-columns: 1fr; } }   /* in a half-width card: one per row */
.locked-next { display: flex; align-items: center; gap: var(--s3); min-height: 56px; padding: 10px 14px; border-radius: var(--r-md);
  background: rgba(247,243,234,.08); box-shadow: inset 0 0 0 1px rgba(247,243,234,.16); color: var(--text); text-decoration: none; }
.locked-next > .ic { flex: none; color: var(--accent-bright); }
.locked-next > .ic:last-child { color: var(--text-3); }
.locked-next-main { display: grid; flex: 1; min-width: 0; gap: 1px; }
.locked-next-main > .xsmall, .locked-next-main > .small { color: var(--text-3); }
@media (hover: hover) { .locked-next:hover { background: rgba(247,243,234,.13); } }
.badge-lock { background: var(--warn-bg); color: var(--warn); }
.chip-row { gap: var(--s2); }

/* Stations from 720px: six cards per type, the rest behind "Show all n" (the button sits under the cards it opens). */
.scards-more { display: flex; flex-direction: column; gap: var(--s4); }
.scards-more > summary { order: 2; align-self: center; list-style: none; cursor: pointer; min-width: 220px; }
.scards-more > summary::-webkit-details-marker { display: none; }
.scards-more > summary .ic { transition: transform var(--t-fast) var(--ease); }
.scards-more[open] > summary .ic { transform: rotate(180deg); }
.scards-more .when-open, .scards-more[open] .when-closed { display: none; }
.scards-more[open] .when-open { display: inline; }
@media (max-width: 719px) { .scards-more { display: none; } }
.scards .card.is-done { border-color: color-mix(in srgb, var(--ok) 35%, var(--border)); }

/* For parents: every section on one 720px column; numbered steps at body size; a plain list with lock icons; the
   example report as a light card at a readable size. */
.parents-page { max-width: 720px; margin-inline: auto; }
.howto.steps { font-size: var(--fs-md); gap: var(--s4); }
.howto.steps li { display: grid; gap: 2px; padding-left: 44px; }
.howto.steps li::before { top: 0; width: 30px; height: 30px; background: var(--primary); color: var(--on-primary); font-size: var(--fs-xs); }
.howto.steps li > span { color: var(--text-2); font-size: var(--fs-sm); }
.list-plain { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.stack > * + .list-plain, .stack > * + .bullets { margin-top: var(--s4); }   /* their margin: 0 must not undo the stack gap under a heading */
.stack-sm > * + .list-plain, .stack-sm > * + .bullets { margin-top: var(--s2); }
.parents-page .list-plain { font-size: var(--fs-sm); }   /* the same size as the ticks in the card beside it */
.list.list-plain > li { display: flex; gap: var(--s3); align-items: flex-start; justify-content: flex-start; padding: 0; border: 0; }
.list-plain > li > .ic { flex: none; width: 20px; height: 20px; margin-top: 3px; color: var(--text-3); }
.report-example .focus-line { font-size: var(--fs-sm); color: var(--text-2); }
.report-example .focus-line strong { color: var(--text); }

/* Help centre: an inline search field with an icon button (56px), the most-asked answers as chips, and the topic
   sections in two columns from 1024px. */
.help-search { display: flex; gap: var(--s2); align-items: stretch; }
.help-search .input { flex: 1 1 auto; min-width: 0; min-height: 56px; border-radius: var(--r-pill); padding-inline: 20px; }
.help-search-btn { flex: none; width: 56px; min-height: 56px; padding: 0; }
.help-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); font: 600 var(--fs-sm)/1.2 var(--font-ui); text-decoration: none; }
@media (hover: hover) { .chip-link:hover { color: var(--text); border-color: var(--field-border); } }
.help-groups { display: grid; gap: var(--s6); }
@media (min-width: 1024px) {
  .help-page { max-width: 1040px; }
  .help-groups { display: block; columns: 2; column-gap: var(--s7); }
  .help-groups > section { break-inside: avoid; margin: 0 0 var(--s6); }
  .help-page > :not(.help-groups) { max-width: 760px; }
}

/* Delete your account: what goes and what stays as two bulleted lists at 15px (never a wall of small text). */
.bullets { margin: 0; padding-left: 1.25em; display: grid; gap: 8px; font-size: var(--fs-sm); line-height: 1.5; }
.bullets > li { padding-left: 2px; }
.bullets-md { font-size: var(--fs-md); gap: var(--s3); }
.kept-lists > * + * { margin-top: var(--s5); }

/* Legal pages: "On this page" (a closed disclosure on phones, a sticky side column from 1024px), "Back to top" at the
   end of each section, and headings that land clear of the top bar. */
.legal h2 { scroll-margin-top: calc(var(--safe-top) + var(--topbar-h) + 16px); }
/* An email address is one unbreakable word: hello+wardcoach@medservicesuk.com is about 320px and ran 14px past a
   360px screen on the acceptable use policy (launch gate round 5). Let mailto links in legal prose break. */
.legal a[href^="mailto:"] { overflow-wrap: anywhere; }
.toc-list { margin: 0; padding-left: 1.4em; display: grid; gap: 2px; font-size: var(--fs-sm); }
.toc-list a { display: inline-block; padding: 6px 0; text-decoration: none; color: var(--text-2); }
.toc-list a:hover { color: var(--text); text-decoration: underline; }
.to-top { margin: var(--s4) 0 0; font-size: var(--fs-xs); text-align: right; }
.to-top a { display: inline-block; padding: 8px 0; color: var(--text-3); }
.legal-toc-side { display: none; }
@media (min-width: 1024px) {
  .legal-layout.has-toc { display: grid; grid-template-columns: minmax(0, 760px) 260px; gap: var(--s7); justify-content: center; align-items: start; }
  .legal-layout.has-toc > .mid { margin-inline: 0; }
  .legal-layout.has-toc .legal-toc { display: none; }
  .legal-toc-side { display: block; align-self: stretch; }
  .legal-toc-side nav { position: sticky; top: calc(var(--safe-top) + var(--topbar-h) + 24px); max-height: calc(100vh - var(--topbar-h) - 48px);
    overflow-y: auto; padding: var(--s4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
  .legal-toc-side .toc-list { font-size: var(--fs-xs); }
  .legal-toc-side .toc-list a { padding: 4px 0; }
  .legal-toc-side .to-top { text-align: left; }
}

/* Highlight feedback (case studies): two treatments only. Right picks: a solid underline and a tick. Missed parts: a
   dashed outline and a "missed" tag. Picks that were not in the answer are listed under the passage, never struck
   through in the clinical text. A legend explains the marks, and the count stays pinned above the passage. */
.hl-wrap .hl-token.correct { background: none; outline: 0; box-shadow: none; text-decoration: underline solid var(--accent); text-decoration-thickness: 3px;
  text-underline-offset: 4px; text-decoration-skip-ink: none; }
.hl-wrap .hl-token.correct .ic { color: var(--accent-text); }
.hl-wrap .hl-token.missed { background: none; box-shadow: none; text-decoration: none; outline: 2px dashed var(--accent-text); outline-offset: 1px; }
.hl-missed-tag { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: var(--r-pill); background: var(--warn-bg); color: var(--warn);
  font: 700 var(--fs-2xs)/1.6 var(--font-ui); letter-spacing: .04em; text-transform: uppercase; vertical-align: 1px; }
.hl-legend { display: flex; flex-wrap: wrap; gap: 4px var(--s4); color: var(--text-2); }
.hl-key { display: inline-flex; align-items: center; gap: 8px; }
.hl-swatch { display: inline-block; width: 26px; height: 14px; border-radius: 3px; flex: none; }
.hl-swatch.correct { height: 0; border-radius: 0; border-bottom: 3px solid var(--accent); align-self: flex-end; margin-bottom: 4px; }
.hl-swatch.missed { outline: 2px dashed var(--accent-text); outline-offset: -2px; }
.hl-verdict { position: sticky; top: calc(var(--safe-top) + var(--topbar-h) + 4px); z-index: 3; margin: calc(-1 * var(--s2)) calc(-1 * var(--s2)) 0;
  padding: 8px 12px; border-radius: var(--r-sm); background: var(--surface-2); font-weight: 650; box-shadow: 0 1px 0 var(--border); }
body.in-session .hl-verdict { top: calc(var(--safe-top) + var(--q-head-h, 76px) + 4px); }
.hl-wrong { border-top: 1px solid var(--border); padding-top: var(--s3); }
.hl-wrong-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: var(--fs-sm); }
.hl-wrong-list li { display: flex; gap: 8px; align-items: flex-start; }
.hl-wrong-list .ic { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--err); }

/* ================= Gate 3 (a11y): short viewports =================
   400% zoom of a 1280x1024 window is 320x256 CSS px (the WCAG 1.4.10 test size); a phone on its side is 320 to 420
   high. There the sticky and fixed bars filled the window: the planner form sat wholly under "Build my plan", focus
   went behind the sticky chips, the bow-tie map and run header left no room for the lists, and the station's
   conversation was squeezed to nothing between the HUD and the dock. Up to 420px high the bars scroll with the page,
   so no content is covered and focus is never behind a bar (WCAG 2.4.11). The one bar that still sticks is the
   question run header: it carries the AI label, which stays in view on every question (legal positioning 2.7), and
   the page's scroll padding keeps focus below it. */
@media (max-height: 599px) {
  /* The bow-tie map is up to 170px tall once filled: it stays above its lists instead of sticking. */
  .bt-map, body.in-session .bt-map { position: static; }
  .hl-verdict, body.in-session .hl-verdict { position: static; }
  body.in-session .bowtie fieldset { scroll-margin-top: calc(var(--q-head-h, 76px) - var(--topbar-h)); }
  body.in-session .bowtie input { scroll-margin-top: calc(var(--q-head-h, 76px) - var(--topbar-h) + 20px); }
}
@media (max-height: 420px) {
  html, html:has(.plan-submit), html:has(body.has-tabbar .plan-submit) { scroll-padding-top: 8px; scroll-padding-bottom: 48px; }
  html:has(body.in-session .q-run) { scroll-padding-top: calc(var(--safe-top) + var(--q-head-h, 76px) + 8px); }
  .topbar, .chips, .plan-submit, .qnav,
  body.has-tabbar .result-actions, body.has-dock .result-actions, .legal-toc-side nav { position: static; }
  .netbar, body.in-session .netbar { position: sticky; top: 0; }
  /* The tab bar ends the page (before the footer); the header's Menu and Account buttons come back, so every page is
     still one tap away from the top. */
  .tabbar { position: static; }
  body.has-tabbar main { padding-bottom: var(--s6); }
  body.has-tabbar .footer { padding-bottom: var(--s7); }
  body.has-tabbar .plan-submit { padding-bottom: var(--s3); }
  .rationale, .q-form, .bowtie fieldset, body.in-session .bowtie fieldset { scroll-margin-top: 0; scroll-margin-bottom: 0; }
  body.in-session .q-form input, body.in-session .bowtie input { scroll-margin-top: 20px; }
}
@media (max-height: 420px) and (max-width: 859px) { body.has-tabbar .topbar .actions { display: flex; } }
/* Mockseat station, phone layout (under 980px wide, where the station fills the screen): the whole station scrolls
   (station.js follows the newest line), the conversation keeps its own height (96px at least), the dock is part of
   the page and the composer is one row with Send beside it. */
@media (max-height: 420px) and (max-width: 979px) {
  #station[data-phase="speaking"] { overflow-y: auto; scroll-padding-top: 120px; scroll-padding-bottom: 8px; }
  #station[data-phase="speaking"] .phase-speaking, #station[data-phase="speaking"] .station-main { flex: 1 0 auto; min-height: auto; }
  #station[data-phase="speaking"] .transcript { flex: 1 0 auto; min-height: 96px; overflow: visible; }
  .dock { position: static; padding-top: var(--s2); }
  .dock .composer { flex-direction: row; align-items: flex-end; }
  .dock .composer textarea { max-height: 96px; }
}
/* At 400% zoom the station HUD scrolls away too (it is 111px of a 256px window); from 321px it stays in view. */
@media (max-height: 320px) and (max-width: 979px) {
  .hud { position: static; }
  #station[data-phase="speaking"] { scroll-padding-top: 8px; }
}

/* Launch check (legacy layout, the flags-off default, both apps): every control in the header, the footer and the
   landing trust line is at least 44 x 44 CSS px with any pointer, not only a coarse one (Menu, Sign in, Account,
   the market and Data saver buttons, the language select and Change, the top nav links, short footer links). */
.btn-sm { min-height: 44px; }
.menu-btn { min-width: 44px; min-height: 44px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; }
.footer nav a { min-width: 44px; justify-content: center; }
.footer form.row select.input { min-height: 44px; }
.trust a.trust-link { display: inline-flex; align-items: center; min-height: 44px; }

/* The /learn guides (LEARN_PAGES, off by default; engine/learn.py). The "About this article" note is body size and
   full contrast (docs/marketing/seo-articles-wardcoach.md, rule 11): never smaller or fainter than the article. */
.learn-note { padding: 12px 14px; border-left: 3px solid var(--accent); border-radius: var(--r-sm); background: var(--surface-2); color: var(--text); }
.learn-note > p { margin: 0; }
.learn-note > p + p { margin-top: var(--s2); }
.learn-item { display: flex; flex-direction: column; gap: 4px; }
.learn-cta { margin-top: var(--s6); }

/* ---------- footer (Tom, 17 Nov 2026): tidy columns on a wide screen, a clean stack on a phone ---------- */
.footer { padding: var(--s5) 0 var(--s5); }
.footer nav.footer-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); margin: 0 0 var(--s4); }
.footer-h { margin: 0 0 2px; font-size: var(--fs-xs); font-weight: 650; letter-spacing: 0; color: var(--text-2); }
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s4); }
.footer nav.footer-cols a { display: flex; align-items: center; justify-content: flex-start; min-height: 40px; min-width: 0; padding: 0; text-decoration: none; overflow-wrap: anywhere; }
.footer nav.footer-cols a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
@media (pointer: coarse) { .footer nav.footer-cols a { min-height: 44px; } }
@media (min-width: 760px) {
  .footer nav.footer-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: var(--s5); }
  .footer-col:first-child ul { grid-template-columns: minmax(0, 1fr); }
  .footer-col-2 ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.footer .disclaimer { margin: 0; max-width: 120ch; font-size: 13px; line-height: 1.55; font-weight: 400; color: var(--text-2); }
.footer .footer-aff { margin: 4px 0 0; max-width: 120ch; font-size: 13px; line-height: 1.55; color: var(--text-3); }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4); margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--border); }
.footer .footer-co { margin: 0; font-size: 13px; color: var(--text-3); }
.footer-bottom .footer-loc { flex-wrap: nowrap; gap: var(--s1); }
.footer-bottom form.footer-loc select.input { width: auto; min-width: 0; max-width: 60vw; flex: 0 1 auto; }
