/* Driving Practice Theory. Design system v3, "On the road".
   Ground: cool grey, white cards, navy ink. Accents come from road signs:
   blue #1A5FA0 = actions (circles give orders), red #C8102E = warnings (triangles),
   yellow #FFD21F = highlights, green #0B7A55 = done. Headings are set in Overpass,
   a typeface drawn for road signage. Every colour is a token; dark mode only swaps tokens. */

@font-face {
  font-family: 'Inter';
  src: url('/static/v-16706ad9a4/fonts/inter-latin-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Overpass';
  src: url('/static/v-16706ad9a4/fonts/overpass-latin-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #0B1F33;
  --emerald: #0B7A55;
  --bg: #F1F4F7;
  --surface: #FFFFFF;
  --surface-2: #E4ECF4;
  --text: #0B1F33;
  --muted: #45566A;
  --line: #DCE2E8;
  --line-strong: #C9D2DC;
  --cta: #0B1F33;
  --cta-hover: #16324F;
  --on-cta: #FFFFFF;
  --cta-accent: #FFD21F;
  --action: #1A5FA0;
  --action-soft: #E4ECF4;
  --sun: #FFD21F;
  --on-sun: #0B1F33;
  --tarmac: #2B3440;
  --primary: #1A5FA0;
  --accent: #0B7A55;
  --accent-strong: #0B7A55;
  --accent-soft: #E3F3EC;
  --accent-ink: #0A5C41;
  --hero-card: #0B1F33;
  --hero-card-2: #16324F;
  --on-hero-card: #FFFFFF;
  --hero-muted: #C6D2DE;
  --lesson-top: #E4ECF4;
  --scene-sky: #E4ECF4; --scene-sun: #FFD21F; --scene-cloud: #FFFFFF; --scene-1: #CFE3D8; --scene-2: #9CCDB6; --scene-3: #4FA886; --scene-4: #0B7A55; --scene-tree: #0A5C41; --scene-road: #2B3440;
  --warn: #7A4B00;
  --warn-soft: #FFF3BF;
  --danger: #A30D25;
  --danger-icon: #C8102E;
  --danger-soft: #FBE9EC;
  --focus: #0B1F33;
  --card-border: transparent;
  --shadow: 0 4px 14px rgba(11, 31, 51, .08);
  --shadow-lg: 0 14px 34px rgba(11, 31, 51, .16);
  --radius: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --gutter: 20px;
  --nav-h: 66px;
  --display: 'Overpass', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #08131F; --surface: #10202F; --surface-2: #172B3D; --text: #EEF3F8; --muted: #A9B6C4;
    --line: #22384E; --line-strong: #35506B; --cta: #F1F4F7; --cta-hover: #FFFFFF; --on-cta: #0B1F33; --cta-accent: #FFD21F;
    --action: #1A5FA0; --action-soft: #152F49; --tarmac: #1C2733;
    --primary: #8CC0EE; --accent: #3CCB98; --accent-strong: #3CCB98; --accent-soft: #0F3B2C; --accent-ink: #A7F3D0;
    --hero-card: #172B3D; --hero-card-2: #22384E; --on-hero-card: #FFFFFF; --hero-muted: #C6D2DE;
    --lesson-top: #152F49; --scene-sky: #10202F; --scene-sun: #FFD21F; --scene-cloud: #22384E; --scene-1: #0F3B2C; --scene-2: #11553F; --scene-3: #0E7A58; --scene-4: #3CCB98; --scene-tree: #063B2B; --scene-road: #04121F; --warn: #FFD98A; --warn-soft: #3A2B07; --danger: #FFA8B4; --danger-icon: #FF6B81; --danger-soft: #3B141B;
    --focus: #FFD21F; --card-border: #22384E; --shadow: none; --shadow-lg: 0 14px 34px rgba(0, 0, 0, .4); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #08131F; --surface: #10202F; --surface-2: #172B3D; --text: #EEF3F8; --muted: #A9B6C4;
    --line: #22384E; --line-strong: #35506B; --cta: #F1F4F7; --cta-hover: #FFFFFF; --on-cta: #0B1F33; --cta-accent: #FFD21F;
    --action: #1A5FA0; --action-soft: #152F49; --tarmac: #1C2733;
    --primary: #8CC0EE; --accent: #3CCB98; --accent-strong: #3CCB98; --accent-soft: #0F3B2C; --accent-ink: #A7F3D0;
    --hero-card: #172B3D; --hero-card-2: #22384E; --on-hero-card: #FFFFFF; --hero-muted: #C6D2DE;
    --lesson-top: #152F49; --scene-sky: #10202F; --scene-sun: #FFD21F; --scene-cloud: #22384E; --scene-1: #0F3B2C; --scene-2: #11553F; --scene-3: #0E7A58; --scene-4: #3CCB98; --scene-tree: #063B2B; --scene-road: #04121F; --warn: #FFD98A; --warn-soft: #3A2B07; --danger: #FFA8B4; --danger-icon: #FF6B81; --danger-soft: #3B141B;
    --focus: #FFD21F; --card-border: #22384E; --shadow: none; --shadow-lg: 0 14px 34px rgba(0, 0, 0, .4); color-scheme: dark;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; scroll-padding-bottom: 140px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: 'cv11', 'ss01'; -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
[tabindex="-1"]:focus { outline: none; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0; font-family: var(--display); }
h1 { font-size: 1.875rem; font-weight: 800; }
h2 { font-size: 1.1875rem; font-weight: 800; letter-spacing: -0.01em; }
h3 { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.eyebrow { font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.icon { width: 22px; height: 22px; flex-shrink: 0; }
.icon.sm { width: 18px; height: 18px; }
.icon.lg { width: 28px; height: 28px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; letter-spacing: -0.01em; }
.brand .logo { width: 34px; height: 34px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; white-space: nowrap; }
@media (max-width: 400px) { .site-header .brand { font-size: .95rem; } .site-header .brand .logo { width: 30px; height: 30px; } }
.brand-text small { display: none; }
.brand.compact .logo { width: 30px; height: 30px; }
.brand.compact { font-size: .95rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 99px; border: 1.5px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; white-space: nowrap;
}
.btn.block, .sticky-footer .btn { white-space: normal; text-align: center; }
.btn.primary { background: var(--cta); color: var(--on-cta); }
.btn.primary:hover { background: var(--cta-hover); }
.btn.primary .icon { color: var(--cta-accent); }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn.secondary:hover { border-color: var(--text); }
.btn.ghost { background: transparent; color: var(--primary); padding: 0 8px; }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn.block { width: 100%; }
.btn.lg { min-height: 58px; font-size: 1.08rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn .badge { background: var(--cta-accent); color: #062A1E; font-size: .75rem; font-weight: 800; padding: 3px 9px; border-radius: 99px; }
:root[data-theme="dark"] .btn .badge { background: #04261A; color: #A7F3D0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn .badge { background: #04261A; color: #A7F3D0; } }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--text); cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.float { background: var(--surface); box-shadow: var(--shadow); }

/* ---------- app frame ---------- */
.app-bar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); }
.app-bar-inner { max-width: 640px; margin: 0 auto; height: 60px; padding: 0 8px; display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; }
.app-bar-inner .brand { justify-self: center; }
.app-bar.tabs .app-bar-inner { grid-template-columns: 1fr auto; padding: 0 12px 0 var(--gutter); }
.app-bar.tabs .brand { justify-self: start; }
.stepper { max-width: 640px; margin: 0 auto; padding: 0 var(--gutter) 10px; display: flex; align-items: center; gap: 12px; }
.stepper .bar { flex: 1; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.stepper .bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.stepper .count { font-size: .8rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.page { max-width: 640px; margin: 0 auto; padding: 12px var(--gutter) 32px; }
.page.has-footer { padding-bottom: 130px; }
.page.has-nav { padding-bottom: calc(var(--nav-h) + 32px + env(safe-area-inset-bottom)); }
.page-head { margin-bottom: 18px; }
.page-head p { margin-top: 6px; color: var(--muted); }
.sticky-footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: linear-gradient(to top, var(--bg) 78%, transparent); padding: 22px var(--gutter) calc(18px + env(safe-area-inset-bottom)); }
.sticky-footer .inner { max-width: 640px; margin: 0 auto; display: grid; gap: 6px; }

.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav ul { list-style: none; margin: 0 auto; padding: 0; max-width: 640px; display: grid; grid-template-columns: repeat(5, 1fr); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: var(--nav-h); font-size: .72rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.bottom-nav a .icon { width: 24px; height: 24px; }
.bottom-nav a[aria-current="page"] { color: var(--primary); font-weight: 800; }
.bottom-nav a[aria-current="page"] .icon { fill: color-mix(in srgb, var(--primary) 18%, transparent); stroke-width: 2.3; }
@media (min-width: 960px) {
  body.with-rail .bottom-nav { top: 60px; bottom: 0; right: auto; width: 220px; border-top: 0; border-right: 1px solid var(--line); background: var(--bg); padding-top: 16px; }
  body.with-rail .bottom-nav ul { display: flex; flex-direction: column; gap: 4px; padding: 0 12px; }
  body.with-rail .bottom-nav a { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: 14px; font-size: .95rem; }
  body.with-rail .bottom-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); }
  body.with-rail .page.has-nav { padding-bottom: 40px; padding-left: calc(220px + var(--gutter)); max-width: calc(640px + 220px); }
  body.with-rail .app-bar.tabs .app-bar-inner { max-width: none; }
}

/* ---------- cards & lists ---------- */
.card { background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card + .card, .card + .section, .section + .card, .section + .section, .banner + .card, .card + .banner, .hero-card + .tiles, .tiles + .section, .weekstrip + .hero-card, .weekstrip + .card, .hero-card + .section { margin-top: 16px; }
.card.soft { background: var(--accent-soft); border-color: transparent; box-shadow: none; }
.card.navy { background: #0B1F33; color: #FFFFFF; border-color: transparent; }
.card.navy .muted { color: #C6D2DE; }
.section { margin-top: 26px; }
.section > h2, .section > .row { margin-bottom: 12px; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li + li { border-top: 1px solid var(--line); }
.list-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; min-height: 60px; color: var(--text); text-decoration: none; }
a.list-row:hover .title { color: var(--primary); }
.list-row .title { font-weight: 700; }
.list-row .sub { font-size: .85rem; color: var(--muted); }
.list-row .chev { color: var(--muted); }
.icon-tile { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); flex-shrink: 0; }
.icon-tile.warn { background: var(--warn-soft); color: var(--warn); }
.icon-tile.muted { background: var(--surface-2); color: var(--muted); }
.icon-tile.white { background: var(--surface); }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 99px; font-size: .75rem; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--muted); flex-shrink: 0; }
.pill.ok, .pill.UNDERSTOOD, .pill.tag { background: var(--accent-soft); color: var(--accent-ink); }
.pill.RETAINED { background: var(--accent-strong); color: #FFFFFF; }
:root[data-theme="dark"] .pill.RETAINED { color: #04261A; }
.pill.warn, .pill.NEEDS_ATTENTION { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--danger-soft); color: var(--danger); }
.pill.brand { background: var(--accent); color: #04261A; }
.pill.plain { background: var(--surface); color: var(--muted); }

.banner { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius-md); background: var(--surface); }
.banner .icon { margin-top: 1px; }
.banner.info { background: var(--surface-2); }
.banner.ok { background: var(--accent-soft); }
.banner.ok .icon { color: var(--accent-ink); }
.banner.warning { background: var(--warn-soft); }
.banner.warning .icon { color: var(--warn); }
.banner.urgent, .banner.bad { background: var(--danger-soft); }
.banner.urgent .icon, .banner.bad .icon { color: var(--danger-icon); }
.banner a { font-weight: 700; }
.banner + .banner { margin-top: 10px; }

/* ---------- home ---------- */
.weekstrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.weekstrip .wd { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 9px 0; border-radius: 14px; background: var(--surface); border: 1px solid var(--card-border); }
.weekstrip .wd small { font-size: .7rem; font-weight: 600; color: var(--muted); }
.weekstrip .wd b { font-size: 1rem; font-weight: 800; }
.weekstrip .wd i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.weekstrip .wd.rest i { background: var(--line-strong); }
.weekstrip .wd.rest b { color: var(--muted); }
.weekstrip .wd.today { background: #0B1F33; border-color: #0B1F33; color: #FFFFFF; }
.weekstrip .wd.today small { color: #C6D2DE; }
.weekstrip .wd.today i { background: #FFD21F; }
:root[data-theme="dark"] .weekstrip .wd.today { background: #FFD21F; border-color: #FFD21F; color: #04261A; }
:root[data-theme="dark"] .weekstrip .wd.today small { color: #04261A; }
:root[data-theme="dark"] .weekstrip .wd.today i { background: #04261A; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .weekstrip .wd.today { background: #FFD21F; border-color: #FFD21F; color: #04261A; }
  :root:not([data-theme="light"]) .weekstrip .wd.today small { color: #04261A; }
  :root:not([data-theme="light"]) .weekstrip .wd.today i { background: #04261A; }
}
.hero-card { position: relative; overflow: hidden; background: var(--hero-card); color: var(--on-hero-card); border-radius: 26px; padding: 20px; min-height: 190px; }
.hero-card::after { content: ''; position: absolute; right: -34px; bottom: -44px; width: 170px; height: 170px; border-radius: 50%; background: var(--hero-card-2); }
.hero-card .thumb { position: absolute; right: 14px; bottom: 14px; width: 92px; height: 92px; z-index: 1; }
.hero-card .body { position: relative; z-index: 1; max-width: calc(100% - 110px); }
.hero-card .eyebrow { color: inherit; }
.hero-card h2 { font-size: 1.5rem; line-height: 1.12; margin-top: 6px; letter-spacing: -0.02em; }
.hero-card p { font-size: .9rem; font-weight: 600; margin-top: 4px; }
.hero-card .btn { margin-top: 16px; background: #FFFFFF; color: #0B1F33; padding: 0 24px; }
.hero-card .btn .icon { color: #1A5FA0; fill: #1A5FA0; }
.tiles, .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile, .stat { background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--radius-md); padding: 12px 14px; box-shadow: var(--shadow); }
.tile strong, .stat strong { display: block; font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.tile strong.good { color: var(--primary); }
.tile span, .stat span { font-size: .75rem; font-weight: 600; color: var(--muted); }

/* learning path */
.path { list-style: none; margin: 0; padding: 0; }
.path li { position: relative; display: flex; gap: 14px; align-items: center; padding: 8px 0; }
.path li::before { content: ''; position: absolute; left: 20.5px; top: 0; bottom: 0; width: 3px; background: var(--line); }
.path li:first-child::before { top: 50%; }
.path li:last-child::before { bottom: 50%; }
.path li.done::before { background: var(--accent); }
.path .node { position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2.5px solid var(--line-strong); color: var(--muted); flex-shrink: 0; }
.path .node.done { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.path .node.now { background: #0B1F33; border-color: #0B1F33; color: #FFD21F; box-shadow: 0 0 0 5px var(--accent-soft); }
.path .node.now .icon { fill: #FFD21F; }
.path .node.attn { border-color: var(--warn); color: var(--warn); background: var(--warn-soft); }
.path a.list-row { padding: 6px 0; min-height: 0; flex: 1; }
.path li.now a.list-row { background: var(--accent-soft); border-radius: 20px; padding: 12px 14px; }
.path li.now .up { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .04em; color: var(--primary); }
.path .mini { width: 46px; height: 46px; flex-shrink: 0; }

/* ---------- choice controls ---------- */
.choices { display: grid; gap: 10px; }
.choice { position: relative; display: flex; align-items: center; gap: 14px; min-height: 62px; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-md); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.choice:hover { border-color: var(--line-strong); }
.choice input, .chip input, .segmented input, .product input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.choice .mark { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); flex-shrink: 0; display: grid; place-items: center; margin-left: auto; }
.choice:has(input:checked) { border-color: var(--accent); border-width: 2px; background: var(--accent-soft); }
.choice:has(input:checked) .mark { border-color: var(--accent); background: var(--accent); }
.choice:has(input:checked) .mark::after { content: ''; width: 10px; height: 6px; border: solid #FFFFFF; border-width: 0 0 2.5px 2.5px; transform: translate(0, -1px) rotate(-45deg); }
.choice:has(input:focus-visible), .product:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice .label { font-weight: 700; }
.choice .hint { font-size: .82rem; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; font-size: .92rem; }
.chip input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.chip input:focus-visible + span, .segmented input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.segmented { display: inline-grid; grid-auto-flow: column; gap: 4px; padding: 4px; border-radius: 99px; background: var(--surface-2); }
.segmented label { position: relative; }
.segmented span { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 99px; font-weight: 700; font-size: .9rem; color: var(--muted); }
.segmented input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.form { display: grid; gap: 22px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend, .field-label { display: block; font-weight: 700; margin-bottom: 10px; padding: 0; }
.field { display: grid; gap: 8px; }
.field small, .help { color: var(--muted); font-size: .85rem; }
input[type=email], input[type=password], input[type=text], input[type=date], select {
  font: inherit; width: 100%; min-height: 54px; padding: 0 16px; border-radius: 16px; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--text);
}
input:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--primary); }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon input, .input-icon select { padding-left: 48px; }
.window-grid { display: grid; gap: 14px; }
.window-card { border: 1px solid var(--card-border); border-radius: var(--radius); padding: 18px; background: var(--surface); box-shadow: var(--shadow); }
.window-card h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day { display: grid; gap: 4px; text-align: center; font-size: .78rem; font-weight: 700; color: var(--muted); }
.day select { min-height: 44px; padding: 0 2px; text-align: center; font-size: .78rem; border-radius: 12px; }
details.disclosure { border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--card-border); box-shadow: var(--shadow); }
details.disclosure summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 0 16px; font-weight: 700; }
details.disclosure summary::-webkit-details-marker { display: none; }
details.disclosure[open] summary .chev { transform: rotate(90deg); }
details.disclosure > div { padding: 0 16px 16px; }
.card details.disclosure { box-shadow: none; background: var(--surface-2); border: 0; }
.error { color: var(--danger); font-weight: 600; }

/* ---------- questions ---------- */
.question-card { border-radius: 28px; box-shadow: var(--shadow-lg); }
.question-card .q-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.question-card .q-top .eyebrow { color: var(--primary); text-transform: none; letter-spacing: 0; font-size: .82rem; }
.segs { display: flex; gap: 4px; }
.segs i { width: 22px; height: 5px; border-radius: 99px; background: var(--line); }
.segs i.on { background: var(--accent); }
.question-card .stem { font-size: 1.2rem; font-weight: 800; line-height: 1.3; letter-spacing: -0.01em; margin: 10px 0 14px; }
.options { display: grid; gap: 8px; }
.option {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 10px 14px; text-align: left;
  border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
}
.option .radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); flex-shrink: 0; display: grid; place-items: center; color: #FFFFFF; }
.option:hover:not(:disabled) { border-color: var(--line-strong); background: var(--surface-2); }
.option:disabled { cursor: default; }
.option.correct { border: 2px solid var(--accent); background: var(--accent-soft); font-weight: 700; }
.option.correct .radio { border-color: var(--accent); background: var(--accent); }
.option.wrong { border: 2px solid var(--danger-icon); background: var(--danger-soft); }
.option.wrong .radio { border-color: var(--danger-icon); background: var(--danger-icon); }
.option .radio .icon { width: 13px; height: 13px; stroke-width: 3.5; }
.feedback { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: .92rem; }
.feedback.ok { background: var(--accent-soft); }
.feedback.bad { background: var(--danger-soft); }
.feedback .head { display: flex; align-items: center; gap: 8px; font-weight: 800; margin-bottom: 4px; }
.feedback.ok .head .icon { color: var(--primary); }
.feedback.bad .head .icon { color: var(--danger-icon); }
.repair dl { margin: 10px 0 0; display: grid; gap: 10px; }
.repair dt { font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.repair dd { margin: 2px 0 0; }
.content-note { font-size: .75rem; color: var(--muted); margin-top: 14px; }

/* ---------- mock exam ---------- */
.exam-bar .app-bar-inner { grid-template-columns: 48px 1fr 48px; }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.05rem; padding: 6px 12px; border-radius: 99px; background: var(--surface); box-shadow: var(--shadow); }
.timer.low { background: var(--danger-soft); color: var(--danger); }
.icon.flagged { color: #F59E0B; fill: #F59E0B; }
.option.selected { border: 2px solid var(--text); background: var(--surface-2); font-weight: 700; }
.option.selected .radio { border-color: var(--text); background: var(--text); color: var(--bg); }
.exam-nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; }
.exam-nav .btn { min-height: 54px; }
.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.qgrid button { position: relative; min-height: 48px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.qgrid button.done { background: var(--accent); border-color: var(--accent); color: #04261A; }
.qgrid button.flag::after { content: ''; position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: #F59E0B; }
.result-card.pass { background: var(--accent-soft); }
.result-card.fail { background: var(--surface); }
.topic-score { padding: 12px 0; }
.topic-score .bar { height: 8px; border-radius: 99px; background: var(--line); margin-top: 8px; overflow: hidden; }
.topic-score .bar i { display: block; height: 100%; border-radius: 99px; }
.review-item { padding: 12px 0; border-top: 1px solid var(--line); }
.review-item:first-child { border-top: 0; }
.list-row .mini { width: 40px; height: 40px; flex-shrink: 0; }

/* ---------- hazard perception ---------- */
.hp-stage { position: relative; border-radius: 22px; overflow: hidden; background: #0E2136; box-shadow: var(--shadow-lg); touch-action: manipulation; user-select: none; -webkit-user-select: none; cursor: crosshair; }
.hp-stage canvas { display: block; width: 100%; aspect-ratio: 16 / 9; }
.hp-overlay { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 16px; text-align: center; background: rgba(8, 31, 56, .55); color: #FFFFFF; }
.hp-overlay[hidden] { display: none; }
.hp-overlay p { max-width: 28em; font-size: .9rem; font-weight: 600; }
.hp-overlay .btn.primary { background: #FFD21F; color: #04261A; }
.hp-under { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; min-height: 48px; }
.hp-flags { display: flex; flex-wrap: wrap; gap: 4px; color: var(--danger-icon); }
.hp-flag .icon { fill: currentColor; }
.hp-progress { height: 4px; border-radius: 99px; background: var(--line); margin-top: 8px; overflow: hidden; }
.hp-progress i { display: block; height: 100%; width: 0; background: var(--accent); }
.hp-timeline { margin-top: 16px; color: var(--text); }
.timeline { display: block; overflow: visible; }

/* ---------- lesson ---------- */
.lesson-top { position: relative; background: var(--lesson-top); color: var(--text); margin: -12px calc(var(--gutter) * -1) 0; padding: 64px 18px 48px; }
.lesson-top svg { display: block; width: 100%; max-width: 440px; margin: 0 auto; height: auto; }
.lesson-badge { width: 150px; height: 150px; filter: drop-shadow(0 10px 22px rgba(8,31,56,.18)); }
.lesson-top .float { position: absolute; top: 12px; left: 14px; }
.lesson-top .float.right { left: auto; right: 14px; }
.sheet { position: relative; background: var(--bg); border-radius: 32px 32px 0 0; margin: -32px calc(var(--gutter) * -1) 0; padding: 22px var(--gutter) 0; }
.sheet h1 { font-size: 1.75rem; margin-top: 10px; }
.sheet .lead { margin-top: 8px; color: var(--muted); font-size: .98rem; }
.keyrows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: k; }
.keyrows li { counter-increment: k; display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--card-border); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); font-size: .95rem; line-height: 1.4; }
.keyrows li::before { content: counter(k); min-width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; font-size: .85rem; display: grid; place-items: center; }
.callout { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: var(--radius-md); background: var(--accent-soft); }
.callout .icon-tile { background: var(--surface); }
.callout .eyebrow { color: var(--accent-ink); text-transform: none; letter-spacing: 0; font-size: .78rem; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist .icon { color: var(--accent); margin-top: 1px; }
.card.navy .checklist .icon { color: #FFD21F; }

/* ---------- data ---------- */
.ring { position: relative; width: 104px; height: 104px; flex-shrink: 0; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: var(--accent-soft); }
.ring .value { stroke: var(--accent); stroke-linecap: round; }
.ring .center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .center strong { font-size: 1.5rem; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.ring .center span { font-size: .7rem; font-weight: 600; color: var(--muted); margin-top: 4px; }
.ring.sm { width: 84px; height: 84px; }
.ring.sm .center strong { font-size: 1.15rem; }
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: end; gap: 6px; padding-top: 6px; overflow-x: auto; }
.bars .b { display: grid; gap: 6px; justify-items: center; align-content: end; }
.bars .b i { display: block; width: 100%; max-width: 36px; border-radius: 8px 8px 4px 4px; background: var(--accent); min-height: 4px; }
.bars .b span { font-size: .7rem; color: var(--muted); white-space: nowrap; }
.bars .b .val { font-weight: 700; color: var(--text); }
.stackbar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--line); }
.stackbar i { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: .8rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.days-list { list-style: none; margin: 0; padding: 0; }
.days-list li { display: grid; grid-template-columns: 84px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.days-list li:first-child { border-top: 0; }
.days-list .d { font-weight: 700; font-size: .88rem; }
.block { display: inline-flex; align-items: center; margin: 2px 4px 2px 0; padding: 3px 9px; border-radius: 99px; font-size: .75rem; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.block.focus { background: var(--accent-soft); color: var(--accent-ink); }
.pace { display: grid; gap: 10px; }
.pace .opt { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius-md); border: 1.5px solid var(--card-border); background: var(--surface); box-shadow: var(--shadow); }
.pace .opt.rec { border: 2px solid var(--accent); background: var(--accent-soft); box-shadow: none; }
.pace .opt .right { margin-left: auto; text-align: right; white-space: nowrap; font-weight: 700; }
.ok-text { color: var(--accent-ink); font-size: .8rem; font-weight: 700; }
.bad-text { color: var(--danger); font-size: .8rem; font-weight: 700; }
.products { display: grid; gap: 10px; }
.product { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 20px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; position: relative; }
.product:has(input:checked) { border: 2px solid var(--accent); background: var(--accent-soft); }
.product .mark { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); flex-shrink: 0; }
.product:has(input:checked) .mark { border: 7px solid var(--accent); }
.product .price { margin-left: auto; font-size: 1.25rem; font-weight: 800; }
.copy { display: flex; gap: 8px; } .copy input { flex: 1; min-width: 0; font-size: .85rem; min-height: 48px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #0B1F33; color: #FFFFFF; font-weight: 800; text-decoration: none; }
:root[data-theme="dark"] .avatar { background: var(--surface-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar { background: var(--surface-2); } }
.empty { text-align: center; padding: 22px 16px; }
.empty .icon-tile { margin: 0 auto 12px; width: 60px; height: 60px; border-radius: 50%; }
.boot { display: grid; place-items: center; min-height: 60vh; color: var(--muted); }

/* ---------- public site ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); }
.site-header .inner { max-width: 1120px; margin: 0 auto; height: 68px; padding: 0 var(--gutter); display: flex; align-items: center; gap: 16px; }
.site-header nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.site-header nav a.link { white-space: nowrap; padding: 10px 12px; border-radius: 99px; color: var(--text); text-decoration: none; font-weight: 650; font-size: .92rem; }
.site-header nav a.link.wide { display: none; }
.site-header nav a.link:hover { background: var(--surface-2); }
@media (min-width: 720px) { .site-header nav a.link.wide { display: inline-block; } }
.site-main { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.hero { display: grid; gap: 0; padding: 18px 0 0; text-align: center; justify-items: center; }
.hero h1 { font-size: clamp(2.2rem, 7vw, 3.6rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; margin-top: 14px; max-width: 13em; }
.hero .lead { font-size: 1.05rem; color: var(--muted); margin-top: 12px; max-width: 30em; }
.hero .cta { margin-top: 22px; display: grid; gap: 10px; width: 100%; max-width: 420px; }
.hero .meta { font-size: .85rem; font-weight: 600; color: var(--muted); }
.stage { position: relative; width: calc(100% + var(--gutter) * 2); margin: 26px calc(var(--gutter) * -1) 0; padding: 150px 34px 0; overflow: hidden; }
.stage .scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.s-sun { fill: var(--scene-sun); } .s-cloud { fill: var(--scene-cloud); } .s-1 { fill: var(--scene-1); } .s-2 { fill: var(--scene-2); } .s-3 { fill: var(--scene-3); } .s-4 { fill: var(--scene-4); }
.s-tree { fill: var(--scene-tree); } .s-road { fill: var(--scene-road); } .s-line { stroke: #FFFFFF; }
.flow-art { position: relative; height: 132px; margin: 0 0 18px; border-radius: var(--radius); overflow: hidden; background: var(--scene-sky); }
.flow-art .scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.flow-art .badge-icon { position: absolute; left: 16px; top: 16px; width: 48px; height: 48px; border-radius: 16px; background: var(--surface); color: var(--primary); display: grid; place-items: center; box-shadow: var(--shadow); }
.device { position: relative; z-index: 1; max-width: 330px; margin: 0 auto; background: var(--surface); color: var(--text); border: 6px solid #0B1F33; border-bottom: 0; border-radius: 30px 30px 0 0; padding: 18px 16px 34px; text-align: left; box-shadow: 0 12px 30px rgba(8, 31, 56, .25); display: grid; gap: 12px; }
.device .ring { width: 78px; height: 78px; }
.device .ring .center strong { font-size: 1.15rem; }
.device .date { font-size: 1.25rem; font-weight: 800; color: var(--primary); letter-spacing: -0.02em; }
.device .item { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); border-radius: 14px; padding: 9px 10px; font-size: .82rem; font-weight: 700; }
.device .item.on { background: var(--accent-soft); border-color: var(--accent); }
.device .item small { display: block; font-weight: 500; color: var(--muted); font-size: .7rem; }
.device .play { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--text); display: grid; place-items: center; flex-shrink: 0; }
.device .item.on .play { background: var(--accent-strong); border-color: var(--accent-strong); color: #FFFFFF; }
.device .play .icon { width: 12px; height: 12px; fill: currentColor; }
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.05fr .95fr; text-align: left; justify-items: start; align-items: center; column-gap: 56px; padding: 56px 0 0; }
  .hero .copy-col { display: grid; justify-items: start; padding-bottom: 56px; }
  .stage { width: 100%; margin: 0; border-radius: 40px 40px 0 0; align-self: end; padding-top: 70px; }
}
.band { padding: 44px 0; }
.band > h2 { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.025em; margin-bottom: 8px; }
.band > .lead { color: var(--muted); margin-bottom: 22px; max-width: 40em; }
.grid-3 { display: grid; gap: 14px; }
@media (min-width: 760px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.feature .icon-tile { margin-bottom: 14px; width: 46px; height: 46px; border-radius: 14px; }
.feature h3 { margin-bottom: 6px; font-size: 1.05rem; }
.feature p { color: var(--muted); font-size: .95rem; }
.sample { max-width: 560px; }
.sample .sign { width: 84px; height: auto; flex-shrink: 0; object-fit: contain; }
.price-grid { display: grid; gap: 14px; }
@media (min-width: 760px) { .price-grid { grid-template-columns: repeat(3, 1fr); } }
.price-card .amount { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em; margin: 6px 0 2px; }
.price-card .checklist { margin: 14px 0 18px; font-size: .92rem; }
.price-card.featured { background: #0B1F33; color: #FFFFFF; }
.price-card.featured .muted { color: #C6D2DE; }
.price-card.featured .checklist .icon { color: #FFD21F; }
.price-card.featured .btn.primary { background: #FFD21F; color: #04261A; }
.prose { max-width: 680px; padding: 32px 0; }
.prose h1 { font-size: 2.1rem; margin-bottom: 14px; }
.prose h2 { margin: 26px 0 8px; font-size: 1.25rem; }
.prose p + p { margin-top: 10px; }
.site-footer { margin-top: 32px; border-top: 1px solid var(--line); }
.site-footer .inner { max-width: 1120px; margin: 0 auto; padding: 28px var(--gutter) 40px; display: grid; gap: 14px; color: var(--muted); font-size: .85rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { color: var(--muted); }

/* languages */
.term { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-decoration: underline dotted var(--primary) 2px; text-underline-offset: 4px; cursor: help; }
.term:hover { color: var(--primary); }
.term-sheet { position: fixed; inset: 0; z-index: 70; background: rgba(6, 18, 31, .45); display: grid; align-items: end; justify-items: center; padding: 12px; }
.term-card { width: 100%; max-width: 520px; background: var(--surface); border-radius: 24px; padding: 18px 18px 22px; box-shadow: var(--shadow-lg); display: grid; gap: 10px; }
@media (min-width: 700px) { .term-sheet { align-items: center; } }
.tr { margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); }
.tr-card { margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-md); background: var(--accent-soft); display: grid; gap: 6px; }
.tr-card .eyebrow { color: var(--accent-ink); text-transform: none; letter-spacing: 0; font-size: .8rem; }
.tr-card [dir="rtl"], .tr [dir="rtl"], [dir="rtl"].tr-inline, .tr-details [dir="rtl"], .tr[dir="rtl"] { text-align: right; font-size: 1.08rem; line-height: 1.9; }
.tr-inline { margin-top: 8px; font-weight: 600; color: var(--accent-ink); }
.tr-details { margin-top: 12px; }
.tr-details summary { cursor: pointer; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.btn.small { min-height: 36px; font-size: .85rem; padding: 0 10px; }
.chip-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; color: var(--text); text-decoration: none; }
.chip-link.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.glossary { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.glossary-link { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); }

/* support */
textarea { font: inherit; width: 100%; padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); resize: vertical; }
textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.faq-item summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 56px; cursor: pointer; font-weight: 700; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item[open] summary .chev { transform: rotate(90deg); }
.faq-item p { padding: 0 0 14px; color: var(--muted); font-size: .95rem; }
.upload { position: relative; display: inline-flex; }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload span { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 99px; border: 1.5px dashed var(--line-strong); font-weight: 700; }
.upload:has(input:focus-visible) span { outline: 3px solid var(--focus); outline-offset: 2px; }
.shot-preview { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.shot-preview img, .msg .att { max-width: 160px; max-height: 200px; border-radius: 12px; border: 1px solid var(--line); display: block; }
.msg .att { margin-top: 10px; }
.thread { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.msg { display: grid; gap: 4px; max-width: 88%; }
.msg.learner { justify-self: end; text-align: right; }
.msg .who { font-size: .75rem; font-weight: 700; color: var(--muted); }
.msg .when { font-size: .7rem; color: var(--muted); }
.msg .bubble { padding: 12px 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); text-align: left; }
.msg.learner .bubble { background: #0B1F33; color: #FFFFFF; border-bottom-right-radius: 6px; }
.msg.staff .bubble, .msg.assistant .bubble { background: var(--accent-soft); border-bottom-left-radius: 6px; }
.msg.system .bubble { background: var(--surface-2); font-size: .9rem; }
:root[data-theme="dark"] .msg.learner .bubble { background: #FFD21F; color: #04261A; }

/* consent */
.consent { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 60; }
body:has(.bottom-nav) .consent { bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom)); }
body:has(.sticky-footer) .consent { bottom: calc(110px + env(safe-area-inset-bottom)); }
.consent-inner { max-width: 640px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 16px; box-shadow: var(--shadow-lg); display: grid; gap: 12px; font-size: .9rem; }
.consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.consent-actions .btn { min-height: 46px; padding: 0 12px; }
.switch { appearance: none; width: 52px; height: 32px; border-radius: 99px; background: var(--line-strong); position: relative; cursor: pointer; flex-shrink: 0; transition: background .15s; margin: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #FFFFFF; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch:checked { background: var(--accent-strong); }
.switch:checked::after { transform: translateX(20px); }

/* admin */
body.admin .page { max-width: 1100px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
td, th { text-align: left; padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: top; }
code { font-size: .78rem; word-break: break-all; }

/* Question illustrations */
.q-figure { margin: 4px 0 14px; }
.q-figure svg { display: block; width: 100%; max-width: 320px; height: auto; margin: 0 auto; border-radius: 14px; }

/* Test-day tick list */
.ticklist { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.ticklist label { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; min-height: 44px; cursor: pointer; }
.ticklist input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--accent-strong); flex-shrink: 0; }
.ticklist input:checked + span { color: var(--muted); text-decoration: line-through; }

.q-figure.signs .sign-panel { display: flex; justify-content: center; align-items: center; gap: 28px; padding: 18px; max-width: 320px; margin: 0 auto; border-radius: 14px; background: #EEF2F6; }
.q-figure.signs img { width: 112px; height: auto; display: block; }
.q-figure figcaption { text-align: center; font-size: .7rem; color: var(--muted); margin-top: 6px; }

/* Official sign artwork in lessons and lists */
.lesson-signs { display: flex; justify-content: center; align-items: flex-end; gap: 22px; flex-wrap: wrap; max-width: 520px; margin: 0 auto; }
.lesson-signs figure { margin: 0; display: grid; justify-items: center; gap: 8px; max-width: 150px; }
.lesson-signs img { height: 132px; width: auto; max-width: 100%; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(8,31,56,.14)); }
.lesson-signs.many { gap: 14px 12px; }
.lesson-signs.many img { height: 74px; }
.lesson-signs figcaption { font-size: .8rem; font-weight: 600; text-align: center; color: var(--text); line-height: 1.25; }
.sign-credit { text-align: center; font-size: .68rem; color: var(--muted); margin-top: 12px; }
.lesson-icon { width: 120px; height: 120px; margin: 0 auto; border-radius: 32px; background: var(--surface); display: grid; place-items: center; box-shadow: 0 10px 26px rgba(8,31,56,.10); color: var(--accent-strong); }
.lesson-icon .icon { width: 56px; height: 56px; }
.sign-thumb, .icon-thumb { display: inline-grid; place-items: center; border-radius: 14px; background: var(--surface); flex-shrink: 0; }
.sign-thumb img { width: 82%; height: 82%; object-fit: contain; }
.icon-thumb { color: var(--accent-strong); background: var(--accent-soft); }
.icon-thumb .icon { width: 50%; height: 50%; }
.hero-card .sign-thumb, .hero-card .icon-thumb { border-radius: 22px; background: #FFFFFF; }
.q-figure.signs.wide .sign-panel { padding: 10px; }
.q-figure.signs.wide img { width: 100%; max-width: 300px; }

/* 3D street clips */
.hp-world { width: 100%; aspect-ratio: 16 / 9; background: #0E2136; }
.hp-world canvas { display: block; }
.hp-credit { position: absolute; right: 6px; bottom: 5px; margin: 0; padding: 1px 6px; border-radius: 99px; font-size: .5rem; font-weight: 600; line-height: 1.5; white-space: nowrap; color: #FFFFFF; background: rgba(8, 31, 56, .5); pointer-events: none; }
.hp-place { margin-top: 6px; }
.hp-overlay .btn[disabled] { opacity: .55; }
.hp-stage canvas[hidden], .hp-world[hidden] { display: none; }

/* Plan screen: one verdict, today, this week */
.verdict { align-items: flex-start; padding: 18px; }
.verdict strong { font-size: 1.25rem; line-height: 1.25; display: block; }
.verdict p { margin-top: 4px; font-size: 1.02rem; }
.verdict-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.verdict-actions .btn { flex: 1 1 140px; }
.plan-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; color: var(--muted); }
.plan-note .icon { margin-top: 2px; }
.today-card .big { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.week-list { list-style: none; margin: 0; padding: 0; }
.week-list li { display: grid; grid-template-columns: 6.2em 1fr auto; gap: 10px; align-items: baseline; padding: 13px 0; border-bottom: 1px solid var(--line); }
.week-list li:last-child { border-bottom: 0; }
.week-list .d { font-weight: 700; }
.week-list .what { color: var(--muted); font-size: .92rem; }
.week-list li.today .d { color: var(--accent-strong); }
.plan-more { margin-top: 22px; }

/* Share tab */
.share-card { display: grid; gap: 8px; justify-items: start; }
.share-card h2 { font-size: 1.5rem; margin-top: 6px; }
.share-card .btn.block, .share-card .copy { width: 100%; }
.invite-dots { display: flex; align-items: center; gap: 8px; margin: 12px 0 14px; font-size: .9rem; font-weight: 600; color: var(--muted); }
.invite-dots i { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface-2); }
.invite-dots i.on { background: var(--accent); border-color: var(--accent); }
.invite-dots span { margin-left: 4px; }
.stars { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; margin-top: 8px; }
.stars label { position: relative; cursor: pointer; font-size: 2.3rem; line-height: 1; color: var(--line); }
.stars input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.stars label:has(input:checked), .stars label:has(input:checked) ~ label, .stars label:hover, .stars label:hover ~ label { color: #F5A524; }
.stars label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
a.link-card { display: block; text-decoration: none; color: inherit; }

/* Learn tools and flashcards */
.learn-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.learn-tools .tool { margin: 0; align-content: start; display: grid; gap: 6px; text-decoration: none; color: inherit; padding: 16px; }
.flashcard { width: 100%; min-height: 340px; display: grid; align-content: center; justify-items: center; gap: 12px; padding: 26px 22px; border: 0; border-radius: 26px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); font: inherit; text-align: center; cursor: pointer; }
.flashcard.back { cursor: default; text-align: left; justify-items: stretch; background: var(--surface); }
.flashcard .fc-sign { height: 150px; width: auto; max-width: 80%; object-fit: contain; }
.flashcard .fc-q { font-size: 1.45rem; font-weight: 800; line-height: 1.25; letter-spacing: -0.01em; }
.flashcard .fc-a { font-size: 1.3rem; font-weight: 800; }
.flashcard .fc-topic { font-size: .8rem; font-weight: 700; color: var(--accent-ink); }
.flashcard .fc-mn { display: flex; gap: 8px; align-items: flex-start; font-weight: 700; margin-top: 4px; }
.flashcard .fc-hint { font-size: .8rem; color: var(--muted); }
.flashcard .tr-card { text-align: left; }

/* Full-screen clips */
body.no-scroll { overflow: hidden; }
.hp-wrap.theatre { position: fixed; inset: 0; z-index: 1000; background: #000; display: grid; grid-template-rows: 1fr auto auto; align-items: center; justify-items: center; padding: max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)); }
.hp-wrap.theatre .hp-stage { width: min(100%, calc((100dvh - 64px) * 16 / 9)); border-radius: 10px; box-shadow: none; }
.hp-wrap.theatre .hp-under { width: min(100%, calc((100dvh - 64px) * 16 / 9)); margin-top: 6px; min-height: 40px; }
.hp-wrap.theatre .hp-under .btn { min-height: 38px; background: rgba(255,255,255,.12); color: #fff; border-color: transparent; }
.hp-wrap.theatre .hp-progress { width: min(100%, calc((100dvh - 64px) * 16 / 9)); margin-top: 4px; background: rgba(255,255,255,.18); }
.hp-wrap.theatre .hp-place { display: none; }
.hp-turn { display: none; }
@media (orientation: portrait) and (pointer: coarse) {
  .hp-wrap.theatre .hp-turn { display: flex; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); gap: 6px; align-items: center; margin: 0; padding: 6px 12px; border-radius: 99px; background: rgba(8,31,56,.75); color: #fff; font-size: .75rem; font-weight: 600; white-space: nowrap; pointer-events: none; animation: hpTurn 4s ease forwards; }
}
@keyframes hpTurn { 0%, 75% { opacity: 1; } 100% { opacity: 0; } }
@media (orientation: landscape) and (max-height: 520px) {
  .hp-wrap.theatre { grid-template-rows: 1fr auto; padding-top: 4px; }
  .hp-wrap.theatre .hp-stage { width: min(100%, calc((100dvh - 52px) * 16 / 9)); }
  .hp-wrap.theatre .hp-under, .hp-wrap.theatre .hp-progress { width: min(100%, calc((100dvh - 52px) * 16 / 9)); }
}

/* ================= v3 "On the road" components ================= */
.eyebrow { letter-spacing: .08em; }
.card { box-shadow: var(--shadow); }
:root[data-theme="dark"] .card.navy, :root[data-theme="dark"] .price-card.featured { background: var(--hero-card); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card.navy, :root:not([data-theme="light"]) .price-card.featured { background: var(--hero-card); } }

/* Main action: a navy pill ending in a blue circle with an arrow ("circles give orders"). */
.btn.go { justify-content: space-between; padding: 0 8px 0 24px; text-align: left; min-height: 56px; border-radius: 28px; font-size: 1.06rem; font-weight: 700; }
.btn.go::after { content: ''; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; margin-left: 12px; border: 2px solid #FFFFFF;
  background: var(--action) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E") center / 20px no-repeat; }
.btn.go.up::after { transform: rotate(-90deg); }
.btn.go.light { background: #FFFFFF; color: #0B1F33; }
.btn.go.light::after { border-color: transparent; }
.btn.go > .icon { display: none; }
.btn.go:disabled::after { background-color: var(--muted); }

/* Header: app icon, explanation language, account. */
.app-bar.tabs .app-bar-inner { height: 64px; }
.app-icon { display: block; width: 36px; height: 36px; border-radius: 10px; }
.lang-pill { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; border-radius: 22px; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--text); font-size: .875rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.lang-pill .icon { color: var(--primary); width: 18px; height: 18px; }
.bottom-nav a[aria-current="page"] { color: var(--text); }
.bottom-nav a[aria-current="page"] .icon { fill: color-mix(in srgb, currentColor 16%, transparent); stroke-width: 2.5; }

/* Home */
.home-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.home-head h1 { margin-top: 2px; }
.streak { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px; background: var(--sun); color: var(--on-sun); font-size: .8125rem; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.today-card { border-radius: 24px; background: var(--surface); border: 1px solid var(--card-border); overflow: hidden; box-shadow: var(--shadow-lg); }
.today-card .shot { display: block; width: 100%; height: 132px; object-fit: cover; object-position: 50% 62%; background: var(--surface-2); }
.today-card .body { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 18px; }
.today-card .eyebrow { color: var(--primary); }
.today-card h2 { font-size: 1.5rem; line-height: 1.15; }
.today-card .btn { margin-top: 4px; }
.weekstrip { margin: 14px 0 0; }
.weekstrip .wd i { width: 8px; height: 8px; background: transparent; border: 2px solid var(--line-strong); }
.weekstrip .wd.completed i { background: var(--accent); border-color: var(--accent); }
.weekstrip .wd.missed i { background: transparent; border-color: var(--danger-icon); border-radius: 0; transform: rotate(45deg); }
.weekstrip .wd.upcoming i { background: transparent; border-color: var(--line-strong); }
.weekstrip .wd.rest i { border-color: transparent; background: transparent; }
.weekstrip .wd.today i { border-color: #FFD21F; background: transparent; }
.weekstrip .wd.today.completed i { background: #FFD21F; }
.week-key { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: .75rem; color: var(--muted); }
.week-key span { display: inline-flex; align-items: center; gap: 6px; }
.week-key i { width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--line-strong); }
.week-key i.completed { background: var(--accent); border-color: var(--accent); }
.week-key i.missed { border-color: var(--danger-icon); border-radius: 0; transform: rotate(45deg); }

/* A warning is a red triangle, as on the road. On track is a green tick. */
.signal { display: flex; gap: 14px; align-items: flex-start; margin-top: 14px; padding: 14px 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--card-border); box-shadow: var(--shadow); }
.signal .tri { flex: 0 0 44px; width: 44px; height: 40px; }
.signal .tri path:first-child { fill: var(--surface); stroke: var(--danger-icon); }
.signal .tri .ink { stroke: var(--text); fill: var(--text); }
.signal .ok-dot { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #FFFFFF; display: grid; place-items: center; }
.signal p { font-size: .9375rem; font-weight: 600; line-height: 1.35; }
.signal a { display: inline-block; margin-top: 4px; font-size: .875rem; font-weight: 600; }
.signal.gap { border-color: color-mix(in srgb, var(--danger-icon) 35%, transparent); }
.signal.on-track { border-color: color-mix(in srgb, var(--accent) 35%, transparent); }

/* Your road to test day */
.road { position: relative; margin: 0; padding: 0; list-style: none; }
.road::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 44px; border-radius: 14px; background: var(--tarmac); }
.road::after { content: ''; position: absolute; left: 21px; top: 10px; bottom: 10px; border-left: 2px dashed rgba(255, 255, 255, .55); }
.road li { position: relative; z-index: 1; }
.road a, .road .stop { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 4px 0; color: inherit; text-decoration: none; }
.road .node { flex: 0 0 30px; width: 30px; height: 30px; margin-left: 7px; border-radius: 50%; border: 2px solid #FFFFFF; background: var(--tarmac); display: grid; place-items: center; color: #FFFFFF; }
.road .node .icon { width: 14px; height: 14px; stroke-width: 3.5; }
.road .node.done { background: var(--accent); }
.road .node.now { background: var(--action); }
.road .node.attn { background: var(--sun); color: #0B1F33; }
.road .node.flag { border-radius: 6px; background: #FFFFFF; overflow: hidden; }
.road .t { display: block; font-size: .9375rem; font-weight: 600; line-height: 1.3; }
.road .now .t { font-weight: 700; }
.road .s { display: block; font-size: .8125rem; color: var(--muted); }
.road .now .s { color: var(--primary); font-weight: 600; }

.tiles.two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 14px; }
.tile strong { font-family: var(--display); }
.access-card { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
.access-card .btn { align-self: flex-start; }
@media (min-width: 560px) { .access-card { flex-direction: row; align-items: center; justify-content: space-between; } .access-card .btn { align-self: center; flex-shrink: 0; } }

/* Hazard perception */
.clip-card { position: relative; display: block; border-radius: 24px; background: var(--surface); border: 1px solid var(--card-border); overflow: hidden; box-shadow: var(--shadow-lg); color: inherit; text-decoration: none; }
.clip-card .shot { position: relative; aspect-ratio: 350 / 176; background: var(--tarmac); }
.clip-card .shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.clip-card .play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; border: 3px solid #FFFFFF; background: var(--action); display: grid; place-items: center; box-shadow: 0 4px 14px rgba(11, 31, 51, .35); }
.clip-card .play .icon { width: 24px; height: 24px; color: #FFFFFF; fill: #FFFFFF; }
.clip-card .len { position: absolute; left: 12px; bottom: 12px; height: 26px; padding: 0 10px; border-radius: 13px; background: #0B1F33; color: #FFFFFF; font-size: .75rem; font-weight: 700; line-height: 26px; }
.clip-card .body { padding: 12px 18px 14px; }
.clip-card .body strong { display: block; font-family: var(--display); font-weight: 800; font-size: 1.25rem; }
.clip-card .body span { font-size: .875rem; color: var(--muted); }
.test-card { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; padding: 18px 18px 16px; border-radius: 24px; background: var(--hero-card); color: #FFFFFF; border: 1px solid var(--card-border); }
.test-card .eyebrow { color: #FFD21F; }
.test-card h2 { font-size: 1.625rem; line-height: 1.1; }
.test-card .meta { font-size: .875rem; color: var(--hero-muted); }
.test-card .allow { font-size: .8125rem; color: var(--hero-muted); text-align: center; }
.scorebar { position: relative; height: 10px; border-radius: 5px; background: rgba(255, 255, 255, .16); }
.scorebar .fill { position: absolute; left: 0; top: 0; height: 10px; border-radius: 5px; background: #FFD21F; }
.scorebar .fill.pass { background: #3CCB98; }
.scorebar .mark { position: absolute; top: -4px; width: 3px; height: 18px; border-radius: 2px; background: #FFFFFF; }
.scorebar-labels { display: flex; justify-content: space-between; font-size: .8125rem; margin-top: 6px; }
.scorebar-labels span:last-child { color: var(--hero-muted); }
.scorebar.on-light { background: var(--surface-2); }
.scorebar.on-light .mark { background: var(--text); }
.clip-row { display: flex; gap: 10px; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 6px; scroll-snap-type: x proximity; scroll-padding-left: var(--gutter); scrollbar-width: none; }
.clip-row::-webkit-scrollbar { display: none; }
.clip-thumb { flex: 0 0 148px; scroll-snap-align: start; color: inherit; text-decoration: none; }
.clip-thumb .shot { display: block; position: relative; width: 148px; height: 84px; border-radius: 14px; overflow: hidden; background: var(--tarmac); }
.clip-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.clip-thumb .t { display: block; margin-top: 6px; font-size: .8125rem; font-weight: 600; line-height: 1.25; }
.clip-thumb .s { display: block; font-size: .75rem; color: var(--muted); }
.lock { position: absolute; right: 6px; top: 6px; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 12px; background: #0B1F33; color: #FFFFFF; font-size: .6875rem; font-weight: 700; }
.lock .icon { width: 11px; height: 11px; stroke-width: 3; }
.lock.inline { position: static; }

/* Result and paywall */
.verdict-card { border-radius: 24px; padding: 20px; background: var(--hero-card); color: #FFFFFF; border: 1px solid var(--card-border); }
.verdict-card h1 { font-size: 1.75rem; }
.verdict-card p { color: var(--hero-muted); margin-top: 6px; }
.verdict-card .scorebar { margin-top: 16px; }
.offer { margin-top: 14px; border-radius: 24px; overflow: hidden; background: var(--surface); border: 1px solid var(--card-border); box-shadow: var(--shadow-lg); }
.offer .strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--tarmac); }
.offer .strip img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.offer .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.offer .price { font-family: var(--display); font-weight: 800; font-size: 2rem; line-height: 1; }
.offer .price small { font-family: 'Inter', sans-serif; font-size: .875rem; font-weight: 600; color: var(--muted); margin-left: 6px; }
.locked-plan { position: relative; margin-top: 14px; border-radius: 24px; overflow: hidden; background: var(--surface); border: 1px solid var(--card-border); }
.locked-plan .ghost { padding: 6px 18px; filter: blur(5px); opacity: .55; pointer-events: none; user-select: none; }
.locked-plan .cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 18px; text-align: center; }
.locked-plan .cover .btn { width: 100%; max-width: 320px; }
.check-row { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.check-row:last-child { border-bottom: 0; }
.check-row .dot { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.check-row .dot.ok { background: var(--accent); color: #FFFFFF; }
.capbar { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.capbar i { display: block; height: 100%; border-radius: 5px; background: var(--accent); }

/* ---------- Lesson as a card deck (one idea per card) ---------- */
.lesson-bar { display: flex; align-items: center; gap: 12px; padding: 2px 0 12px; }
.icon-btn.ring-btn { flex-shrink: 0; border: 1.5px solid var(--line-strong); background: var(--surface); }
.icon-btn.ring-btn.lg { width: 56px; height: 56px; }
.icon-btn.ring-btn:disabled { opacity: .4; cursor: default; }
.lsegs { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.lsegs i { height: 6px; border-radius: 3px; background: var(--line-strong); transition: background .25s; }
.lsegs i.on { background: var(--accent); }
.lesson-bar .count { flex-shrink: 0; font-size: .875rem; font-weight: 600; color: var(--muted); }
.lesson-cards { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 18px; scroll-padding: 0 var(--gutter); scrollbar-width: none; overscroll-behavior-x: contain; }
.lesson-cards::-webkit-scrollbar { display: none; }
.lesson-cards:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; border-radius: 28px; }
.lcard { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; background: var(--surface); border-radius: 28px; overflow: hidden; box-shadow: 0 6px 18px rgba(11, 31, 51, .10); }
.lcard-art { background: var(--lesson-top); padding: 22px 18px 16px; }
.lcard-art svg { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto; }
.lcard-num { background: var(--lesson-top); padding: 18px 22px; }
.lcard-num span { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--surface); border: 5px solid var(--action); font-family: var(--display); font-weight: 800; font-size: 1.5rem; color: var(--text); }
.lcard-body { padding: 20px 22px 24px; }
.lcard-body > .eyebrow { color: var(--primary); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.lcard-body h1 { font-size: 1.85rem; line-height: 1.1; }
.lcard-body .lead { margin-top: 10px; font-size: 1.0625rem; line-height: 1.5; color: var(--text); }
.lcard-body .point { font-size: 1.2rem; line-height: 1.45; font-weight: 500; }
.lcard-body .callout.mnemonic { background: #FFF3BF; color: #0B1F33; align-items: flex-start; }
.lcard-body .callout.mnemonic .eyebrow, .lcard-body .callout.mnemonic .muted { color: #45566A; }
.lang-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; font-size: .9375rem; font-weight: 600; }
.shape-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.shape-strip span { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 16px; border: 2px solid var(--line); color: var(--muted); font-size: .8125rem; font-weight: 600; }
.shape-strip span.on { border-color: var(--action); color: var(--text); font-weight: 700; }
.lesson-nav { display: flex; align-items: center; gap: 12px; }
.lesson-nav .btn.go { flex: 1; margin: 0; }

/* ---------- Learn: the road map ---------- */
.learn-progress { display: grid; gap: 10px; }
.topic-head h2 { font-size: 1.05rem; }
.topic .road { margin-top: 8px; }

/* ---------- Streak ---------- */
.streak-chip { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; min-height: 36px; padding: 0 12px 0 10px; border-radius: 18px; background: var(--surface); border: 1.5px solid var(--line-strong); font-size: .8125rem; font-weight: 600; white-space: nowrap; color: var(--text); }
.streak-chip .flame, .streak .flame { color: var(--muted); flex-shrink: 0; }
.streak-chip.done { border-color: transparent; background: #FFF3BF; color: #0B1F33; }
.streak-chip.done .flame, .streak.done .flame { color: #D9480F; }
.streak { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 8px 14px; border-radius: 20px; background: #FFF3BF; color: #0B1F33; font-size: .9375rem; }

/* ---------- Motion and reward (switched off by the reduced-motion rule above) ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes draw { from { stroke-dashoffset: 30; } to { stroke-dashoffset: 0; } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@keyframes ring-fill { from { stroke-dasharray: 0 264; } }
@keyframes ray { 0% { transform: rotate(var(--a)) translateY(-18px) scaleY(.2); opacity: 0; } 40% { opacity: 1; } 100% { transform: rotate(var(--a)) translateY(-58px) scaleY(1); opacity: 0; } }
.feedback { animation: rise .28s ease-out both; }
.option.correct .radio .icon path, .option.wrong .radio .icon path { stroke-dasharray: 30; animation: draw .35s .05s ease-out both; }
.ring .value { animation: ring-fill .9s ease-out both; }
.celebrate .burst { position: relative; width: 96px; height: 96px; margin: 26px auto 18px; }
.celebrate .burst .tick { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; animation: pop .5s ease-out both; }
.celebrate .burst .tick .icon { width: 44px; height: 44px; stroke-width: 3; }
.celebrate .burst .tick .icon path { stroke-dasharray: 30; animation: draw .4s .3s ease-out both; }
.celebrate .burst i { position: absolute; left: calc(50% - 3px); top: calc(50% - 8px); width: 6px; height: 16px; border-radius: 3px; background: var(--action); transform-origin: 50% 50%; opacity: 0; animation: ray .8s .25s ease-out both; }
.celebrate .burst i:nth-child(1) { --a: 0deg; } .celebrate .burst i:nth-child(2) { --a: 45deg; background: var(--sun); }
.celebrate .burst i:nth-child(3) { --a: 90deg; background: var(--danger-icon); } .celebrate .burst i:nth-child(4) { --a: 135deg; }
.celebrate .burst i:nth-child(5) { --a: 180deg; background: var(--sun); } .celebrate .burst i:nth-child(6) { --a: 225deg; background: var(--accent); }
.celebrate .burst i:nth-child(7) { --a: 270deg; background: var(--danger-icon); } .celebrate .burst i:nth-child(8) { --a: 315deg; background: var(--sun); }

/* ---------- Landing hero: a real street from our clips, and the app's Home ---------- */
.brand .logo { border-radius: 9px; }
.stage { padding-top: 120px; background: var(--tarmac); }
.stage img.scene { object-fit: cover; object-position: 50% 30%; }
.stage::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 70px; z-index: 1; background: linear-gradient(to bottom, var(--bg), transparent); }
.hero .cta .btn.go { text-align: left; }
.device .date { font-family: var(--display); color: var(--text); font-size: 1.35rem; }
.device .item.on { background: var(--action-soft); border-color: var(--action); }
.device .item.on .play { background: var(--action); border-color: var(--action); }
.device .tick { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #FFFFFF; display: grid; place-items: center; flex-shrink: 0; }
.device .tick .icon { width: 16px; height: 16px; stroke-width: 3; }
@media (min-width: 900px) { .stage::before { display: none; } }

/* ---------- Progress ---------- */
.progress-hero { display: flex; align-items: center; gap: 18px; }
.progress-hero .title-sm { font-family: var(--display); font-weight: 800; font-size: 1.2rem; line-height: 1.2; }
.progress-hero .streak { margin-top: 4px; align-self: flex-start; }
.score-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.score-cards > .score-card { margin: 0; align-content: start; }
.score-card { display: grid; gap: 4px; padding: 16px; text-decoration: none; color: inherit; }
.score-card .eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.score-card strong { font-family: var(--display); font-weight: 800; font-size: 1.4rem; line-height: 1.15; }
.score-card strong.ok { color: var(--accent); }
.score-card strong.warn { color: var(--danger-icon); }
.score-card strong.none { font-size: 1.05rem; color: var(--text); }

/* ---------- Desktop: centre the content in the space beside the side rail, a little wider ---------- */
@media (min-width: 960px) {
  body.with-rail .page.has-nav { max-width: none; margin: 0 0 0 220px; padding-left: max(var(--gutter), calc((100vw - 220px - 720px) / 2)); padding-right: max(var(--gutter), calc((100vw - 220px - 720px) / 2)); }
  body.with-rail .bottom-nav { width: 220px; }
}
