@font-face {
  font-family: 'Sofia Sans'; src: url('./fonts/SofiaSans-var.woff2') format('woff2');
  font-style: normal; font-weight: 1 1000; font-display: swap;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next'; src: url('./fonts/AtkinsonHyperlegibleNext-var.woff2') format('woff2');
  font-style: normal; font-weight: 200 800; font-display: swap;
}
@font-face {
  font-family: 'Noto Sans Arabic'; src: url('./fonts/NotoSansArabic-var.woff2') format('woff2');
  font-style: normal; font-weight: 400 700; font-display: swap;
  unicode-range: U+0600-06FF, U+200C-200F;
}
:root {
  color-scheme: light;
  --type-scale: 1;
  --type-scale-capped: min(var(--type-scale, 1), 2);
  --safe-top: env(safe-area-inset-top); --safe-bottom: env(safe-area-inset-bottom);
  --safe-left: env(safe-area-inset-left); --safe-right: env(safe-area-inset-right);
  --font-display: 'Sofia Sans', 'Noto Sans Arabic', system-ui, sans-serif;
  --font-text: 'Atkinson Hyperlegible Next', 'Noto Sans Arabic', system-ui, sans-serif;
  --shadow-raised: 0 12px 40px #0000002e;
  --figure-paper: #fff; --figure-caption: #40515b;
  --modal-backdrop: #0000004d; --depth-veil: #0000001a;
  --gutter: 16px; --gap: 12px; --row-h: 56px; --tabbar-base: 49px; --tabbar-h: calc(var(--tabbar-base) + var(--safe-bottom));
  --navbar-h: 44px; --hairline: .5px; --surface-grouped: var(--bg);
  --dur-depth: 240ms; --ease-depth: cubic-bezier(.32,.72,0,1);
  --dur-1: 90ms; --dur-2: 160ms; --dur-3: 240ms; --dur-4: 600ms;
  --inline-sign: 1;
  --ease-out: cubic-bezier(.2, .8, .2, 1); --ease-inout: cubic-bezier(.4, 0, .2, 1);
  --hero-border: color-mix(in srgb, var(--foam) 24%, var(--navy));
  --hero-muted: var(--foam); --hero-accent: var(--foam); --hero-ring: color-mix(in srgb, var(--foam) 32%, transparent);
  --navy: #0d2137; --foam: #bce8da; --sand: #eee7d9;
  --bg: #f6f7f4; --surface: #fff; --surface-soft: #edf2ee;
  --ink: #142c3c; --muted: #536770; --line: #d9e2dd;
  --accent: #20614f; --accent-soft: #e4f1ea; --on-accent: #fff;
  --good: #226344; --good-bg: #e9f5ed; --bad: #a63635; --bad-bg: #fff0ec;
  --focus: #246ca4; --shadow: none;
  --radius: 12px; --radius-sm: 8px; --radius-xs: 3px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
  --text-xs: calc(13px * var(--type-scale-capped)); --text-sm: calc(15px * var(--type-scale-capped)); --text-base: calc(17px * var(--type-scale-capped)); --text-lg: calc(22px * var(--type-scale-capped)); --text-xl: calc(28px * var(--type-scale-capped));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0c1924; --surface: #142634; --surface-soft: #1b303c;
    --ink: #eaf1ed; --muted: #afc0c6; --line: #354a57;
    --accent: #a9e2ce; --accent-soft: #234538; --on-accent: #102b24;
    --good: #a3e6ba; --good-bg: #1c3b2e; --bad: #ffb1a4; --bad-bg: #482b2b;
    --focus: #a8d8ff; --sand: #332f29; --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c1924; --surface: #142634; --surface-soft: #1b303c;
  --ink: #eaf1ed; --muted: #afc0c6; --line: #354a57;
  --accent: #a9e2ce; --accent-soft: #234538; --on-accent: #102b24;
  --good: #a3e6ba; --good-bg: #1c3b2e; --bad: #ffb1a4; --bad-bg: #482b2b;
  --focus: #a8d8ff; --sand: #332f29; --shadow: none;
}
/* The router sets each Pass's brand tokens inline. Only scenery-derived roles
   take precedence here, so the action and diagram signal keep their brand colors. */
:root[data-ambiance] {
  --bg: var(--amb-soft) !important;
  --surface: var(--amb-soft) !important;
  --surface-soft: var(--amb-soft) !important;
  --ink: var(--amb-deep) !important;
  --muted: var(--amb-mid) !important;
  --line: var(--amb-mid) !important;
  --pressed-row: var(--surface-soft);
  --figure-paper: var(--amb-soft);
  --figure-caption: var(--amb-mid);
  --sand: var(--surface-soft) !important;
  --accent-soft: var(--surface-soft) !important;
  --good-bg: var(--surface) !important;
  --bad-bg: var(--surface) !important;
  --navy: var(--amb-deep) !important;
  --photo-surface: var(--amb-deep) !important;
}
:root[data-ambiance][data-theme="dark"] {
  --bg: var(--amb-deep) !important;
  --page-bg: linear-gradient(to bottom, var(--bg), var(--amb-mid) 112%) fixed;
  --surface: var(--amb-deep) !important;
  --surface-soft: var(--amb-deep) !important;
  --ink: var(--amb-soft) !important;
  --muted: var(--amb-soft) !important;
  --line: var(--amb-soft) !important;
}
/* Older native WebViews use the solid palette roles above. */
@supports (color: color-mix(in srgb, red, white)) {
  :root[data-ambiance] {
    --bg: color-mix(in srgb, var(--amb-soft) 74%, white) !important;
    --surface: color-mix(in srgb, var(--amb-soft) 45%, white) !important;
    --line: color-mix(in srgb, var(--amb-mid) 68%, var(--amb-soft)) !important;
    --good-bg: color-mix(in srgb, var(--good) 4%, var(--surface)) !important;
    --bad-bg: color-mix(in srgb, var(--bad) 4%, var(--surface)) !important;
  }
  :root[data-ambiance][data-theme="dark"] {
    --surface: color-mix(in srgb, var(--amb-mid) 46%, var(--amb-deep)) !important;
    --surface-soft: color-mix(in srgb, var(--amb-mid) 72%, var(--amb-deep)) !important;
    --muted: color-mix(in srgb, var(--amb-soft) 80%, var(--amb-mid)) !important;
    --line: color-mix(in srgb, var(--amb-soft) 48%, var(--amb-mid)) !important;
  }
}
* { box-sizing: border-box; }
html { font-family: var(--font-display); background: var(--page-bg, var(--bg)); -webkit-text-size-adjust: 100%; scroll-padding-top: 100px; }
body { margin: 0; background: var(--page-bg, var(--bg)); color: var(--ink); font-size: var(--text-base); line-height: 1.55; }
button, a, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { color: inherit; font: inherit; cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
button, a { transition: background var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out); }
button:disabled { cursor: not-allowed; opacity: .55; }
[data-ambiance] button:disabled { opacity: 1; color: var(--muted); background: var(--surface-soft); border-color: var(--line); }
button:not(:disabled):not(.group-row):not(.answer[aria-disabled="true"]):active, a.button:active, .action-row:active { transform: scale(.985); transition-duration: var(--dur-1); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
h1:focus, h2:focus, main:focus, .feedback:focus { outline: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.2; }
h1 { font-size: clamp(calc(36px * var(--type-scale-capped)), 9vw, calc(48px * var(--type-scale-capped))); letter-spacing: -.015em; font-weight: 760; line-height: 1.02; }
h2 { font-size: var(--text-lg); letter-spacing: -.025em; }
svg { flex: 0 0 auto; vertical-align: middle; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: -100px; inset-inline-start: 16px; z-index: 100; background: var(--surface); padding: 12px 24px; border: 2px solid var(--focus); }
.skip-link:focus-visible { top: 12px; }
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner { max-width: 1184px; margin: auto; min-height: 88px; padding: 12px 32px; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); min-height: 44px; }
.brand strong { font-size: calc(29.6px * var(--type-scale-capped)); letter-spacing: -.065em; }
.brand > span { font-size: var(--text-sm); letter-spacing: 0; line-height: 1.7; max-width: 100px; padding-inline-start: 8px; }
.main-nav { position: relative; display: flex; margin-inline-start: auto; gap: 6px; }
.main-nav a { font-family: var(--font-display); display: flex; align-items: center; gap: 8px; padding: 12px; min-height: 46px; color: var(--muted); font-size: var(--text-sm); font-weight: 600; border-radius: var(--radius-sm); }
.main-nav a[aria-current] { color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .main-nav a:hover { color: var(--ink); } }
main { max-width: 1120px; margin: auto; padding: 40px 0 48px; min-height: calc(100vh - 170px); }
.page-heading { margin-bottom: 28px; }
.eyebrow { font-size: var(--text-sm); font-weight: 600; letter-spacing: 0; color: var(--muted); }
.page-heading .eyebrow { margin-bottom: 12px; }
.lede { color: var(--muted); margin-top: 12px; max-width: 650px; font-size: calc(15.36px * var(--type-scale-capped)); }
.row { display: flex; align-items: center; gap: 12px; }
.spread { justify-content: space-between; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.button { border: 1px solid transparent; border-radius: var(--radius-sm); min-height: 48px; padding: 12px 20px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 650; font-size: var(--text-sm); text-decoration: none; }
.primary { color: var(--on-accent); background: var(--accent); }
@media (hover: hover) and (pointer: fine) { .primary:hover:not(:disabled) { filter: brightness(1.07); } }
.secondary { color: var(--ink); background: var(--surface); border-color: var(--line); }
@media (hover: hover) and (pointer: fine) { .secondary:hover:not(:disabled) { background: var(--surface-soft); } }
.icon-button { padding: 10px; min-width: 44px; min-height: 44px; background: transparent; color: var(--ink); border-color: var(--line); }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-size: calc(17px * var(--type-scale-capped)); font-weight: 700; text-decoration: none; }
.fine-print { font-size: var(--text-sm); color: var(--muted); line-height: 1.6; }
.block { display: block; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent); font-size: var(--text-sm); font-weight: 650; }
.home-links { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; margin-bottom: 1rem; }
.home-links:empty { display: none; }
.readiness { position: relative; isolation: isolate; overflow: hidden; background: var(--navy); border: 1px solid var(--hero-border); color: var(--foam); border-radius: var(--radius); padding: 28px 32px; min-height: 290px; }
.readiness .eyebrow { color: var(--hero-muted); letter-spacing: 0; }
.readiness h2 { font-size: calc(16px * var(--type-scale-capped)); font-weight: 550; margin-top: 4px; }
.section-head { margin-bottom: 24px; }
.section-head h2 { margin-top: 6px; }
.mastery-grid { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 48px; row-gap: 22px; }
.topic-row { display: block; }
.topic-row .row { font-size: var(--text-sm); margin-bottom: 9px; align-items: flex-start; }
.topic-row strong { color: var(--accent); }
.meter { position: relative; height: 16px; margin-block: 6px; color: var(--accent); border-bottom: 1px solid color-mix(in srgb, var(--ink) 24%, transparent); }
/* physical: graduated scales stay left to right in every language. shared.js, audio.js and results.js position their marks with inline left:%. */
.meter-fill { position: absolute; bottom: -1px; left: 0; height: 3px; background: currentColor; } /* physical */
.meter-tick { position: absolute; bottom: -1px; width: 1px; height: 6px; background: color-mix(in srgb, var(--ink) 24%, transparent); transform: translateX(-50%); }
.meter-tick.major { height: 10px; }
.meter-cursor { position: absolute; bottom: -1px; width: 1.5px; height: 14px; background: currentColor; transform: translateX(-50%); }
.readiness .meter { color: var(--hero-accent); --ink: var(--hero-muted); margin-block: 12px; }
.mastery-panel > .fine-print { margin-top: 24px; }
.site-footer { padding: 0 24px 28px; font-size: var(--text-sm); letter-spacing: 0; text-align: start; color: var(--muted); }
.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.topic-card { color: var(--ink); display: flex; flex-direction: column; align-items: stretch; text-align: start; min-height: 230px; padding: 24px; background: var(--surface); border-color: var(--line); border-radius: var(--radius); }
@media (hover: hover) and (pointer: fine) { .topic-card:hover { border-color: var(--accent); } }
.module-description { display: block; color: var(--muted); font-size: var(--text-base); font-weight: 400; line-height: 1.55; }
.topic-card .module-description { margin-top: var(--space-3); }
.topic-card .topic-title { display: block; line-height: 1.2; letter-spacing: -.025em; font-weight: 700; font-size: calc(18.4px * var(--type-scale-capped)); margin: 14px 0 18px; }
.topic-number { color: var(--accent); font-size: var(--text-sm); font-weight: 500; }
.topic-meta { font-size: var(--text-sm); color: var(--muted); margin-top: auto; padding-bottom: 8px; }
.topic-meta strong { color: var(--accent); }
.topic-cta { display: flex; justify-content: space-between; color: var(--accent); margin-top: 16px; font-size: var(--text-sm); }
.vela-card { background: var(--sand); }
.vela-card .topic-title { margin-bottom: 5px; }
.topic-grid + .fine-print { margin-top: 22px; }
.question-screen { max-width: 820px; margin: auto; }
.question-top { margin-bottom: 16px; }
.question-panel { margin-top: 24px; }
.question-meta { color: var(--muted); font-size: var(--text-sm); margin-top: 12px; }
.question-title { font-family: var(--font-text); font-size: var(--text-lg); line-height: 1.45; letter-spacing: 0; margin: 16px 0 24px; font-weight: 500; }
.answers { display: grid; gap: 12px; }
.answer { width: 100%; display: flex; align-items: center; gap: 16px; min-height: 60px; border-radius: var(--radius-sm); border: 2px solid var(--line); background: var(--surface); color: var(--ink); padding: 16px; text-align: start; font-family: var(--font-text); font-size: var(--text-base); font-weight: 400; line-height: 1.4; }
@media (hover: hover) and (pointer: fine) { button.answer:not([aria-disabled="true"]):not(.selected):not(.correct):not(.wrong):hover { border-color: var(--accent); background: var(--surface-soft); } }
.answer-number { font-family: var(--font-display); width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius-xs); font-size: var(--text-sm); color: var(--muted); }
.answer.selected { background: var(--accent-soft); border: 2px solid var(--accent); }
.answer.selected .answer-number { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.answer.correct, .feedback.correct { background: var(--good-bg); border-color: var(--good); color: var(--good); }
.answer.wrong, .feedback.wrong { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.answer.correct .answer-number, .answer.wrong .answer-number { border-color: currentColor; color: inherit; }
.answer-status { display: block; margin-top: 4px; font-size: var(--text-sm); font-weight: 700; }
.question-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; }
.keyboard-hint { max-width: 270px; font-size: var(--text-sm); }
.feedback { padding: 16px; border-radius: var(--radius-sm); margin-top: 20px; border: 1px solid; }
.feedback strong { font-size: var(--text-sm); }
.feedback p { font-size: var(--text-base); margin-top: 4px; }
.question-note { margin-top: 20px; font-size: var(--text-base); color: var(--ink); }
.figure { display: flex; flex-direction: column; margin: 0 auto 24px; max-width: 100%; border: 1px solid var(--line); background: var(--figure-paper); padding: 12px; }
.figure img, .figure video { max-height: 210px; max-width: 100%; width: auto; object-fit: contain; }
.zoom-label { color: var(--figure-caption); font-size: var(--text-sm); display: flex; align-items: center; gap: 6px; padding-top: 6px; }
.modal { color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; width: min(680px, calc(100% - 32px)); max-height: calc(100dvh - 32px); box-shadow: none; }
.modal::backdrop { background: var(--modal-backdrop); }
.modal h2 { font-size: calc(19.2px * var(--type-scale-capped)); }
.modal > .row { margin-bottom: 20px; }
.modal p { color: var(--muted); }
.dialog-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }
.zoomed-image { display: block; max-width: 100%; max-height: 70dvh; margin: auto; background: var(--figure-paper); object-fit: contain; }
.exam-options { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.exam-option { padding: 32px; }
.exam-option h2 { font-size: calc(26.4px * var(--type-scale-capped)); margin-top: 12px; }
.base-option { border-color: var(--accent); }
.exam-rules { max-width: 740px; font-size: var(--text-sm); color: var(--muted); margin: 24px 0 12px; }
.exam-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: start; }
.exam-header { margin-bottom: 24px; }
.exam-heading { font-size: calc(24px * var(--type-scale-capped)); margin-top: 8px; }
.exam-layout .question-panel { margin-top: 0; }
.timer-wrap { text-align: end; flex: 0 0 auto; }
.timer-wrap .fine-print { display: flex; align-items: center; gap: 6px; }
.timer { display: block; font-family: var(--font-display); min-width: 6ch; font-variant-numeric: tabular-nums; font-size: calc(32px * var(--type-scale-capped)); font-weight: 650; line-height: 1.4; }
.timer { transition: color 300ms var(--ease-out); }
.timer.urgent { color: var(--bad); }
.exam-sidebar { padding: 24px; }
.exam-sidebar > .fine-print { margin-top: 10px; }
.question-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 20px; }
.grid-cell { min-width: 44px; min-height: 44px; padding: 8px; border-radius: var(--radius-sm); background: var(--surface-soft); color: var(--muted); border: 1px solid var(--line); font-weight: 500; }
.grid-cell.answered { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.grid-cell.current { outline: 2px solid var(--ink); outline-offset: 2px; }
.grid-cell.current:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.grid-help { margin: 16px 0 22px; }
.exam-sidebar > .button { width: 100%; }
.exam-layout .keyboard-hint { margin-top: 20px; max-width: none; }
.result-hero { text-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }

.result-hero .page-heading { margin-bottom: 16px; }

/* auto, not 1fr: equal thirds broke "Tempo impiegato" over two lines on a 360 px phone; free space is still shared. */
.result-stats { max-width: 500px; margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, auto); gap: 16px; }
.result-stats > div { display: flex; flex-direction: column; gap: 4px; }
.result-stats strong { font-size: calc(32px * var(--type-scale-capped)); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.result-stats span { font-size: var(--text-sm); color: var(--muted); }
.result-actions { display: flex; gap: 12px; justify-content: flex-start; margin: 24px 0 32px; }
.result-topics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 40px; margin-top: 18px; }
.result-topic { font-size: var(--text-sm); padding: 8px 0; border-bottom: 1px solid var(--line); }
.result-topic .badge { flex: 0 0 auto; }
.error-badge { color: var(--bad); background: var(--bad-bg); }
.success-badge { color: var(--good); background: var(--good-bg); }
.review-section { margin-top: 32px; }
.review-section > .lede { margin-bottom: 20px; }
.review-card { padding: 0; margin-top: 12px; box-shadow: none; }
.review-card summary, .review-correct > summary { list-style: none; cursor: pointer; padding: 20px; display: flex; align-items: center; gap: 16px; font-size: calc(14.4px * var(--type-scale-capped)); min-height: 64px; }
.review-card summary::-webkit-details-marker, .review-correct > summary::-webkit-details-marker { display: none; }
.review-card summary::after, .review-correct > summary::after { content: '+'; margin-inline-start: auto; font-size: calc(24px * var(--type-scale-capped)); color: var(--muted); }
.review-card[open] summary::after, .review-correct[open] > summary::after { content: '−'; }
.review-correct { margin-top: 12px; }
.review-status { display: grid; place-items: center; border-radius: var(--radius-xs); width: 32px; height: 32px; flex: 0 0 32px; }
.review-status.correct { color: var(--good); background: var(--good-bg); }
.review-status.wrong { color: var(--bad); background: var(--bad-bg); }
.review-body { padding: 0 24px 24px; }
.errors-layout { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }
.error-intro { background: var(--sand); }
.big-count { font-size: calc(72px * var(--type-scale-capped)); line-height: 1.1; letter-spacing: -.06em; }
.error-intro h2 { color: var(--muted); font-size: calc(16px * var(--type-scale-capped)); margin: 10px 0 24px; }
.empty-state { text-align: center; padding: 64px 24px; max-width: 800px; margin: 20px auto; }
.empty-state > svg { color: var(--accent); margin-bottom: 24px; }
.empty-state p { color: var(--muted); max-width: 530px; margin: 16px auto 24px; }
.empty-state .text-link { display: flex; justify-content: center; margin-top: 16px; }
.empty-state .page-heading { margin-bottom: 0; }
.empty-state h1 { font-size: calc(32px * var(--type-scale-capped)); }
.session-score { font-size: calc(19.2px * var(--type-scale-capped)); font-weight: 650; }
.loading { text-align: center; padding: 100px 24px; }
.storage-notice, .resume-banner { padding: 12px 24px; background: var(--sand); text-align: center; font-size: var(--text-sm); }
.resume-banner { display: flex; align-items: center; justify-content: center; gap: 16px; }
@media (max-width: 1190px) { main { padding-inline: 32px; } .brand > span { display: none; } }
@media (max-width: 900px) {
  .header-inner { gap: 16px; }
  .main-nav a { padding: 10px; }
  .brand strong { font-size: calc(25.6px * var(--type-scale-capped)); }
  .main-nav svg { display: none; }
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .exam-layout { grid-template-columns: minmax(0, 1fr) 240px; gap: 16px; }
  .exam-sidebar { padding: 16px; }
  .question-grid { gap: 8px; }
  .result-topics { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  :root { --text-lg: calc(19px * var(--type-scale-capped)); }
  html { scroll-padding-top: 20px; }

  .header-inner { min-height: 72px; padding: calc(13px + var(--safe-top)) max(20px, var(--safe-right)) 12px max(20px, var(--safe-left)); justify-content: space-between; } /* physical */
  .brand > span { display: none; }
  .brand strong { font-size: calc(27.2px * var(--type-scale-capped)); }
  .main-nav { position: fixed; bottom: 0; inset-inline: 0; z-index: 10; margin: 0; padding: 8px max(8px, var(--safe-right)) calc(8px + var(--safe-bottom)) max(8px, var(--safe-left)); border-top: 1px solid var(--line); background: var(--surface); gap: 4px; } /* physical */
  .main-nav a { flex: 1; flex-direction: column; gap: 5px; font-size: var(--text-sm); padding: 8px 2px; min-height: 58px; border-radius: var(--radius); white-space: nowrap; }
  .main-nav svg { display: block; }
  main { padding: 28px max(20px, var(--safe-right)) 32px max(20px, var(--safe-left)); min-height: calc(100dvh - 190px); } /* physical */
  .page-heading { margin-bottom: 24px; }
  .page-heading .eyebrow { font-size: var(--text-sm); letter-spacing: 0; margin-bottom: 10px; }
  .lede { font-size: calc(13.6px * var(--type-scale-capped)); margin-top: 10px; line-height: 1.65; }
  .readiness { padding: 22px 24px; min-height: 272px; }
  .readiness .eyebrow { font-size: var(--text-sm); }
  .panel { padding: 20px; border-radius: var(--radius); }
  .mastery-grid { grid-template-columns: 1fr; gap: 22px; }
  .section-head { align-items: flex-start; gap: 8px; }
  .section-head .eyebrow { font-size: var(--text-sm); }
  .section-head h2 { font-size: calc(17.6px * var(--type-scale-capped)); }
  .section-head .text-link { font-size: var(--text-sm); white-space: nowrap; }
  .topic-grid { grid-template-columns: 1fr; gap: 12px; }
  .topic-card { min-height: 204px; padding: 22px; }
  .topic-card .topic-title { margin-top: 10px; margin-bottom: 18px; }
  .topic-meta { font-size: var(--text-sm); }
  .question-top { gap: 8px; }
  .question-top .text-link { font-size: var(--text-sm); }
  .question-top .badge { font-size: var(--text-sm); }
  .question-panel { margin-top: 20px; padding: 20px 16px; }
  .question-title { margin: 14px 0 20px; }
  .question-meta { font-size: var(--text-sm); }
  .answer { gap: 12px; padding: 14px 12px; min-height: 60px; }
  .answer-number { font-family: var(--font-display); width: 26px; height: 26px; flex-basis: 26px; }
  .question-actions { flex-wrap: wrap; margin-top: 20px; }
  .question-screen .question-actions .button { width: 100%; }
  .keyboard-hint { display: none; }
  .figure img, .figure video { max-height: 175px; }
  .exam-options { grid-template-columns: 1fr; gap: 18px; }
  .exam-option { padding: 28px; }
  .exam-option .button { width: 100%; }
  .exam-layout { grid-template-columns: 1fr; gap: 18px; }
  .exam-header { gap: 12px; margin-bottom: 20px; }
  .exam-header .eyebrow { font-size: var(--text-sm); }
  .exam-heading { font-size: calc(20px * var(--type-scale-capped)); }
  .timer-wrap .fine-print { font-size: var(--text-sm); }
  .exam-layout .question-panel > .row { align-items: flex-start; gap: 8px; }
  .exam-layout .question-panel > .row .eyebrow { font-size: var(--text-sm); }
  .exam-layout .question-panel > .row .fine-print { font-size: var(--text-sm); }
  .exam-layout .question-actions { gap: 8px; }
  .exam-layout .question-actions .button { font-size: var(--text-sm); padding: 12px; flex: 1; }
  .question-grid { grid-template-columns: repeat(5, 1fr); gap: 12px; }
  .exam-sidebar { padding: 22px; }
  .result-hero { padding: 28px 20px; }
  .result-hero h1 { font-size: calc(30.4px * var(--type-scale-capped)); }
  .result-stats { gap: 8px; }
  .result-stats strong { font-size: calc(26.4px * var(--type-scale-capped)); }
  .result-stats span { font-size: var(--text-sm); }
  .result-actions { flex-direction: column; gap: 10px; }
  .result-topic { font-size: var(--text-sm); gap: 10px; }
  .result-topic .badge { font-size: var(--text-sm); padding: 6px 8px; }
  .review-card { padding: 0; }
  .review-card summary, .review-correct > summary { padding: 16px; gap: 10px; font-size: var(--text-sm); }
  .review-card summary .fine-print { font-size: var(--text-sm); margin-bottom: 4px; }
  .review-body { padding: 0 14px 14px; }
  .errors-layout { grid-template-columns: 1fr; gap: 18px; }
  .error-intro .button { width: 100%; }
  .empty-state { padding: 36px 20px; }
  .empty-state h1 { font-size: calc(27.2px * var(--type-scale-capped)); }
  .dialog-actions { flex-direction: column-reverse; }
  .modal { padding: 20px; }
  .resume-banner { flex-direction: column; gap: 0; font-size: var(--text-sm); }
  .site-footer { font-size: var(--text-sm); letter-spacing: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, *::backdrop { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (max-width: 360px) {
  .question-grid { grid-template-columns: repeat(4, 1fr); }
  .brand > span { display: none; }
}

.exam-sidebar > [data-abandon-exam] { margin-top: 16px; }

.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px 20px; margin-top: 12px; font-size: var(--text-sm); letter-spacing: normal; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
.parameter-form { display: grid; gap: 24px; }
.parameter-form label { display: block; margin-bottom: 8px; }
.parameter-form select { width: 100%; font: inherit; color: var(--ink); background: var(--surface); padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
@media (min-width: 681px) { .header-inner { flex-wrap: wrap; gap: 16px; } }

/* Image choices share selection/correction states with text answers. */
.answers-images { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.answers-images .answer { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-content: start; gap: 8px; padding: 12px; }
.answer-image { grid-column: 1 / -1; width: 100%; height: 150px; object-fit: contain; background: var(--figure-paper); border-radius: var(--radius-sm); }
.answers-images .answer-content { align-self: center; overflow-wrap: anywhere; }
@media (max-width: 680px) {
  .answers-images .answer { padding: 8px; grid-template-columns: 26px minmax(0, 1fr); }
  .answer-image { height: 110px; }
}

/* Carteggio: persistent chart session and touch-friendly answer controls. */
.carteggio-filter { display:flex; align-items:center; gap:12px; min-height:44px; margin-bottom:24px; }
.carteggio-filter input { width:24px; height:24px; }
.carteggio-list { list-style:none; padding:0; display:grid; gap:10px; }
.carteggio-item { display:grid; grid-template-columns:110px 1fr auto; gap:18px; align-items:center; padding:18px; min-height:44px; border:1px solid var(--line); border-radius: var(--radius); color:inherit; text-decoration:none; background:var(--surface); }
@media (hover: hover) and (pointer: fine) { .carteggio-item:hover { border-color:var(--accent); } }
.carteggio-score { font-weight:700; white-space:nowrap; }
.carteggio-statement { white-space:pre-wrap; line-height:1.8; }
.carteggio-map-panel { margin:24px 0; padding:16px; }
.carteggio-toolbar { display:flex; flex-wrap:wrap; gap:8px; }
.carteggio-toolbar button { min-width:44px; min-height:44px; }
.carteggio-toolbar [aria-pressed="true"] { background:var(--accent); color:var(--on-accent); outline:2px solid var(--accent); }
.carteggio-chart { width:100%; aspect-ratio:1156/838; min-height:260px; }
.chart-legal { font-size:var(--text-xs); line-height:1.5; }
.carteggio-readings p { margin:6px 0; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.carteggio-answers { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin:24px 0; }
.carteggio-answer { min-width:0; padding:18px; border:1px solid var(--line); border-radius: var(--radius); }
.carteggio-answer legend { font-weight:700; }
.carteggio-answer input, .carteggio-answer select { min-height:44px; max-width:100%; width:100%; border:1px solid var(--line); border-radius: var(--radius-sm); padding:10px; font:inherit; color:var(--ink); background:var(--surface); }
.scalar-answer { display:flex; align-items:center; gap:12px; }
.scalar-answer input { max-width:220px; }
.coordinate-axis { display:grid; grid-template-columns:1fr 1fr 70px; gap:8px; align-items:end; margin:12px 0; }
.coordinate-axis > span { grid-column:1/-1; }
.coordinate-axis label { display:grid; gap:6px; }
.carteggio-result { margin-top:24px; overflow-wrap:anywhere; }
.answer-correct { border-inline-start:4px solid var(--good); padding-inline-start:12px; }
.answer-wrong { border-inline-start:4px solid var(--bad); padding-inline-start:12px; }
@media (max-width:650px) {
  .carteggio-item { grid-template-columns:1fr auto; gap:8px; }
  .carteggio-item > span:nth-child(2) { grid-row:2; grid-column:1/-1; }
  .carteggio-answers { grid-template-columns:1fr; }
  .carteggio-map-panel { padding:8px; }
  .main-nav { overflow-x:auto; }
}

/* Module purchase screen: photo header, ledger of real counts, free/full table, promise, buy bar. */
.store-screen { max-width: 42rem; margin-inline: auto; }
.store-hero { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: clamp(240px, 36dvh, 340px); margin-bottom: 8px; padding: 56px 20px 24px; border-radius: var(--radius);
  background: var(--photo-surface); color: var(--hero-muted); }
.store-hero > .image-plate, .store-hero > .pass-photo { position: absolute; inset: 0; z-index: -2; margin: 0; max-width: none; }
.store-hero .plate { height: 100%; border-radius: 0; background: var(--photo-surface); }
.store-hero .plate img, .store-hero .pass-photo img { width: 100%; height: 100%; object-fit: cover; }
.store-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to top, var(--photo-surface) 0%, color-mix(in srgb, var(--photo-surface) 78%, transparent) 38%, color-mix(in srgb, var(--photo-surface) 0%, transparent) 72%); }
.store-hero .image-plate figcaption { position: absolute; inset-block-start: 10px; inset-inline-end: 12px; max-width: calc(100% - 24px); margin: 0; padding: 2px 6px; border-radius: var(--radius-xs);
  background: color-mix(in srgb, var(--photo-surface) 70%, transparent); color: var(--hero-muted); font-size: var(--text-xs); line-height: 1.3; text-align: end; }
.store-hero-text { display: grid; gap: 8px; }
/* The module title keeps its own direction but sits on the interface's start side. */
.store-hero-module { justify-self: start; }
.store-hero-module { margin: 0; color: var(--hero-accent); font-family: var(--font-display); font-size: var(--text-sm); font-weight: 800; letter-spacing: .01em; }
.store-hero h1 { margin: 0; color: var(--hero-muted); font-size: calc(38px * var(--type-scale-capped)); line-height: 1.04; font-weight: 900; letter-spacing: -.01em; white-space: pre-line; overflow-wrap: anywhere; }
.store-card { display: flex; flex-direction: column; gap: 28px; padding: 0 4px 24px; }
.store-card h2, .store-card p { margin: 0; }
.store-ledger { list-style: none; margin: 0; padding: 0; }
.store-ledger-row { display: grid; grid-template-columns: calc(112px * var(--type-scale-capped)) minmax(0, 1fr); gap: 4px 12px; align-items: start; padding-block: 16px; border-bottom: var(--hairline) solid var(--line); }
.store-ledger-value { font-family: var(--font-display); font-size: calc(38px * var(--type-scale-capped)); line-height: 1; font-weight: 900; color: var(--accent); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.store-ledger-value.word { font-size: calc(22px * var(--type-scale-capped)); line-height: 1.2; padding-top: 4px; }
.store-ledger-text { display: grid; gap: 2px; padding-top: 6px; min-width: 0; }
.store-ledger-label { font-size: var(--text-base); line-height: 1.3; color: var(--ink); }
.store-ledger-text small { font-size: var(--text-sm); line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.store-compare { display: grid; gap: 12px; }
.store-compare h2 { font-size: var(--text-lg); line-height: 1.2; font-weight: 800; }
.store-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border-radius: var(--radius); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.store-table th, .store-table td { padding: 12px 10px; border-bottom: var(--hairline) solid var(--line); text-align: center; vertical-align: middle; line-height: 1.3; }
.store-table tbody tr:last-child > * { border-bottom: 0; }
.store-table tbody th { text-align: start; font-weight: 400; color: var(--ink); padding-inline-start: 14px; }
.store-table thead th { font-family: var(--font-display); font-size: var(--text-xs); font-weight: 800; letter-spacing: .01em; color: var(--muted); }
.store-table thead th.full { color: var(--accent); }
.store-table td { color: var(--muted); }
.store-table td.full { color: var(--ink); font-weight: 800; background: var(--accent-soft); }
.store-table thead th.full { background: var(--accent-soft); border-start-end-radius: var(--radius); }
.store-table tbody tr:last-child td.full { border-end-end-radius: var(--radius); }
.store-promise { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.store-promise li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; }
.store-promise-mark { display: grid; place-items: center; width: 24px; height: 24px; margin-top: 1px; border: 1.5px solid var(--accent); border-radius: var(--radius); /* 24px square, 12px radius: a circle */ color: var(--accent); font-family: var(--font-display); font-size: var(--text-sm); font-weight: 800; line-height: 1; }
.store-promise li > span:last-child { display: grid; gap: 2px; }
.store-promise strong { font-size: var(--text-base); font-weight: 600; line-height: 1.3; }
.store-promise small { font-size: var(--text-sm); line-height: 1.4; color: var(--muted); }
.store-notes:empty { display: none; }
.store-notes { display: grid; gap: 8px; }
.store-buybar { position: sticky; bottom: 0; z-index: 4; display: grid; gap: 4px; justify-items: stretch;
  margin-inline: -16px; padding: 12px 16px calc(8px + var(--safe-bottom)); background: var(--bg); border-top: var(--hairline) solid var(--line); }
.store-buybar .purchase-button.primary { width: 100%; min-height: 52px; font-size: var(--text-base); }
.store-buybar .text-link { justify-content: center; min-height: 44px; padding: 0 12px; border: 0; background: transparent; color: var(--accent); font-size: var(--text-base); }
.store-message { font-size: var(--text-sm); line-height: 1.4; text-align: center; }
.store-message:empty { display: none; }
.store-price { font-weight: 800; }
.store-unlocked { display: flex; align-items: center; justify-content: center; gap: .6rem; min-height: 52px; color: var(--accent); font-size: var(--text-base); font-weight: 800; }
.store-consent { display: flex; align-items: center; gap: .6rem; min-height: 44px; line-height: 1.5; font-size: var(--text-sm); }
.store-consent input { flex: none; width: 1.25rem; height: 1.25rem; }
/* The purchase is a pushed sheet in the compact shell: the buy bar replaces the tab bar. */
[data-shell="native"]:has(main[data-screen="purchase"]) .main-nav { display: none; }
[data-shell="native"] .store-hero { margin-inline: calc(-1 * var(--gutter)); margin-top: -16px; border-radius: 0; }
[data-shell="native"] .store-buybar { margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
[data-shell="native"] main[data-screen="purchase"] { padding-bottom: 0; }

/* Legal copy stays readable alongside the footer links. */
.site-footer .app-disclaimer { max-width: 640px; margin: 16px 0 0; font-size: var(--text-sm); line-height: 1.6; letter-spacing: normal; }

.translation-help { margin-block: 1rem; }
.translation-text { font-size: calc(18.4px * var(--type-scale-capped)); line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; text-align: start; }
.translation-help > div:not(.translation-languages):not(:empty) { margin-block-start: .75rem; padding-block: .75rem; border-block-start: 1px solid var(--line); }
.translation-languages { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Course reading uses the same panels and controls as study. */
.lesson { max-width: 68ch; margin-inline: auto; }
.lesson-body { max-width: 68ch; line-height: 1.7; overflow-wrap: anywhere; }
.lesson-body p + p { margin-top: .75em; }
.lesson-body + .button { margin-top: 1.5em; }
.lesson-body h3 { margin-top: 1.8em; }
.lesson-table { overflow-x: auto; margin-block: 1.5em; }
.lesson-table table { border-collapse: collapse; width: 100%; }
.lesson-table th, .lesson-table td { padding: .65em; border: 1px solid currentColor; text-align: start; }
.lesson nav { margin-top: 1.5em; flex-wrap: wrap; gap: 1em; }
.question-explanation { line-height: 1.6; }
.lesson-link { display: inline-block; margin-block: .5em; }
.below-threshold { border-inline-start: 3px solid currentColor; padding-inline-start: .75em; font-weight: 600; }
.readback-exercise { display: grid; gap: 1rem; }
.readback-exercise textarea { box-sizing: border-box; width: 100%; resize: vertical; min-height: 8rem; padding: 1rem; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.readback-exercise textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.readback-message { font-size: calc(18.4px * var(--type-scale-capped)); line-height: 1.6; }
.readback-feedback li { padding-block: .3rem; }

/* Reading faces are separate from the interface's labels and controls. */
.answer-copy, .feedback p, .question-note, .question-explanation, .lesson-body,
.translation-text, .carteggio-statement, .review-card summary, .readback-message,
.readback-exercise textarea, .readback-feedback { font-family: var(--font-text); }
h1, h2, h3, .button, .eyebrow, .answer-status { font-family: var(--font-display); }
.question-title, .answer { font-family: var(--font-text); }
.topic-row strong, .hero-statistics, .session-score, .grid-cell, .lesson-table,
.exam-facts, .big-count, .carteggio-score { font-variant-numeric: tabular-nums; }
.exam-note { font-size: var(--text-sm); color: var(--muted); margin-top: 8px; }
/* Arabic text one step larger, once per Arabic block: an em size on every :lang(ar) element compounded down the tree. */
:lang(ar):not(:lang(ar) > *) { font-size: 1.06em; }
:lang(ar) { line-height: 1.8; letter-spacing: 0; }

/* Threshold images retain their prepared crop; captions remain outside the plate. */
.image-plate { margin: 0 0 24px; max-width: 42rem; }
.plate { position: relative; isolation: isolate; overflow: hidden; background: var(--foam); border-radius: var(--radius); }
.plate img { display: block; width: 100%; height: auto; filter: grayscale(1) contrast(1.08); mix-blend-mode: multiply; }
.plate::after { content: ''; position: absolute; inset: 0; background: var(--navy); mix-blend-mode: lighten; pointer-events: none; }
.image-purchase .plate img { filter: none; mix-blend-mode: normal; }
.image-purchase .plate::after { content: none; }
.image-plate figcaption, .land-figure figcaption { margin-top: 8px; color: var(--muted); font-size: var(--text-sm); line-height: 1.4; }
.footer-links button { padding: 0; border: 0; background: transparent; color: var(--accent); }
.module-facts { display: grid; gap: 8px; padding: 0; list-style: none; font-size: var(--text-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
.topic-card .module-facts { margin-top: 16px; }
.module-screen .topic-card { min-height: 0; }
.module-screen .topic-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.store-card .image-plate { margin-bottom: 0; }
.hero-statistics { font-size: var(--text-sm); margin: 14px 0 18px; color: var(--hero-muted); }
.signature { position: absolute; z-index: -1; inset-inline-end: -50px; bottom: -85px; width: 320px; height: 320px; fill: none; stroke: var(--hero-ring); stroke-width: 1; pointer-events: none; }
.signature text { font-family: var(--font-display); font-size: var(--text-sm); fill: var(--hero-ring); stroke: none; }
.signature-laender { width: 240px; height: 323px; inset-inline-end: -35px; bottom: -70px; }
.signature path, .signature circle, .signature rect { vector-effect: non-scaling-stroke; }
.signature-laender .selected, .signature .runway { fill: var(--hero-accent); fill-opacity: .35; }
.signature .runway-marks { stroke: var(--navy); }
.signature .hot { stroke: var(--hero-accent); }
.action-list { display: block; padding: 0; margin: 20px 0 32px; overflow: hidden; }
.action-row { display: flex; align-items: center; gap: 16px; padding: 20px 24px; color: var(--ink); }
.action-row + .action-row { border-top: 1px solid var(--line); }
@media (hover: hover) and (pointer: fine) { .action-row:hover { background: var(--surface-soft); } }
.action-row h2 { font-size: var(--text-base); }
.action-row p { color: var(--muted); font-size: var(--text-sm); margin-top: 4px; }
.action-row > svg { margin-inline-start: auto; flex-shrink: 0; }
.action-icon { color: var(--accent); display: inline-flex; }
.result-score { font-family: var(--font-display); font-size: clamp(calc(48px * var(--type-scale-capped)), 15vw, calc(96px * var(--type-scale-capped))); white-space: nowrap; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.result-score > span:not([data-count]) { font-size: .35em; color: var(--muted); white-space: nowrap; }
.result-scale { margin: 16px 0 48px; }
/* physical: scale marks stay on the left, see .meter-fill. */
.meter-threshold { position: absolute; bottom: -7px; height: 28px; border-left: 2px solid var(--ink); } /* physical */
/* physical: the mark is 0 px wide. Without max-content, the label would shrink to one character per line ("2" over "7"). */
.meter-threshold > span { position: absolute; right: 5px; top: 28px; width: max-content; max-width: min(12rem, 60vw); overflow-wrap: anywhere; font-size: var(--text-sm); color: var(--ink); } /* physical */
.result-verdict { display: flex; align-items: center; gap: 8px; margin: 24px 0; font-size: var(--text-sm); }
.result-verdict svg { flex-shrink: 0; }
.result-hero.pass .result-verdict { color: var(--good); }
.result-hero.fail .result-verdict { color: var(--bad); }
.result-hero .image-plate { margin-bottom: 0; }
.land-figure { margin: 0; }
.land-map { display: block; width: 100%; max-width: 300px; height: auto; margin-inline: auto; fill: var(--surface-soft); stroke: var(--ink); stroke-width: 1; }
.land-map path { cursor: pointer; vector-effect: non-scaling-stroke; outline: none; }
.land-map path.selected { fill: var(--accent); }
.land-map path:focus-visible { outline: none; stroke: var(--focus); stroke-width: 3; }
@media (hover: hover) {
  .land-map path:not(.selected):hover { fill: var(--accent-soft); }
}
.land-confirm { margin: 20px 0; }
.land-confirm .button { width: 100%; }
.land-selection { margin: 0 0 12px; font-weight: 650; }
.land-list { border-top: 1px solid var(--line); }
.land-option { display: flex; width: 100%; justify-content: flex-start; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); padding-inline: 0; }
.land-option.selected { color: var(--accent); font-weight: 760; }
.land-option.selected::after { content: '—'; margin-inline-start: auto; }
@media (min-width: 760px) {
  .land-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 32px; align-items: start; }
  .land-figure { grid-row: 1 / 3; }
  .land-confirm { margin: 0; }
}

/* Lot 4: compact navigation, translation margin and subject score table. */
.translation-languages .button { min-width: 44px; min-height: 44px; border-radius: var(--radius-xs); }
.translation-languages .button[aria-pressed="true"], .translation-languages .button[aria-pressed="true"]:hover { color: var(--surface); background: var(--ink); border-color: var(--ink); }
.translation-row { display: grid; grid-template-columns: minmax(3.5rem, 5rem) minmax(0, 1fr); gap: 12px; align-items: baseline; }
.translation-label { color: var(--muted); font-size: var(--text-sm); }
.translation-text { margin: 0; }
[data-app="stradipass"] .figure { border-radius: var(--radius-xs); }
.section-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: var(--text-sm); }
.section-table caption { text-align: start; font-size: var(--text-lg); font-weight: 700; margin-bottom: 16px; }
.section-table th, .section-table td { text-align: start; padding: 16px 8px; border-bottom: 1px solid var(--line); overflow-wrap: normal; hyphens: auto; }
.section-table tbody th { font-weight: 400; }
.section-table thead th { font-size: var(--text-sm); font-weight: 600; color: var(--muted); }
.section-table th:first-child { width: 30%; padding-inline-start: 0; }
.section-table th:nth-child(2) { width: 15%; }
.section-table th:nth-child(3) { width: 30%; }
.section-table th:last-child, .section-table td:last-child { padding-inline-end: 0; }
.result-topic-score { font-variant-numeric: tabular-nums; white-space: nowrap; }
.section-count, .section-percent { font-variant-numeric: tabular-nums; white-space: nowrap; }
.section-scale .meter { margin-block: 8px 12px; }
.section-percent { display: block; text-align: end; }
.section-verdict { font-size: var(--text-sm); }
.section-below-threshold .section-verdict { color: var(--bad); }
@media (max-width: 650px) {
  .main-nav a { flex-basis: 0; min-width: 0; }
  [data-app="volapass"] .exam-heading { font-size: var(--text-base); }
  .result-sections { padding: 16px 12px; }
  .section-table th, .section-table td { padding-inline: 5px; }
  .section-table th:first-child { width: 50%; padding-inline-start: 0; }
  .section-table th:nth-child(2) { width: 20%; }
  .section-table th:nth-child(3) { width: 30%; }
  /* Same clipping as .sr-only, without reserving a fourth column on mobile. */
  .section-table .section-verdict { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .section-below-threshold .section-percent { color: var(--bad); }
}

/* Motion of the printed scales and page surfaces. */
.main-nav a { border-radius: 0; }
main { position: relative; overflow-x: clip; }
main[data-nav="push"] > :not(.screen-outgoing), main[data-nav="pop"] > :not(.screen-outgoing) { position: relative; z-index: 1; background: var(--page-bg, var(--bg)); }
main[data-nav="push"] > :not(.screen-outgoing) { animation: page-push var(--dur-depth) var(--ease-depth); }
main[data-nav="pop"] > :not(.screen-outgoing) { animation: page-pop var(--dur-depth) var(--ease-depth); }
main > .screen-outgoing { position: absolute; top: 0; inset-inline: 0; pointer-events: none; }
main[data-nav="pop"] > .screen-outgoing { z-index: 2; background: var(--page-bg, var(--bg)); animation: page-push var(--dur-depth) var(--ease-depth) reverse both; }
main[data-nav="push"] > .screen-outgoing { z-index: 0; animation: page-pop var(--dur-depth) var(--ease-depth) reverse both; }
main[data-nav="push"] > .screen-outgoing::after { content: ""; position: absolute; inset: 0; background: var(--depth-veil); animation: page-fade var(--dur-depth) var(--ease-depth); }
@keyframes page-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes page-push { from { transform: translateX(100%); transform: translateX(calc(var(--inline-sign) * 100%)); } to { transform: translateX(0); } }
@keyframes page-pop { from { opacity: 1; transform: translateX(-30%); transform: translateX(calc(var(--inline-sign) * -30%)); } to { opacity: 1; transform: translateX(0); } }
.question-zone { min-width: 0; }
.question-leaving { animation: question-out 120ms var(--ease-inout) both; pointer-events: none; }
.question-arriving { animation: question-in var(--dur-3) var(--ease-out) both; }
@keyframes question-out { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(-12px); transform: translateX(calc(var(--inline-sign) * -12px)); } }
@keyframes question-in { from { opacity: 0; transform: translateX(12px); transform: translateX(calc(var(--inline-sign) * 12px)); } to { opacity: 1; transform: translateX(0); } }
::view-transition-group(root), ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-group(pass-question) { animation-duration: var(--dur-3); }
::view-transition-old(pass-question) { animation: question-out 120ms var(--ease-inout) both; }
::view-transition-new(pass-question) { animation: question-in var(--dur-3) var(--ease-out) 120ms both; }
.session-scale { display: flex; align-items: end; gap: 3px; height: 16px; margin-block: 6px; }
.session-mark { flex: 1; min-width: 0; height: 6px; background: var(--line); transition: background var(--dur-2) var(--ease-out); }
.session-mark.current { height: 12px; }
.session-mark.correct { background: var(--good); }
.session-mark.wrong { background: var(--bad); }
.session-mark.answered { background: var(--ink); }
.answer-number { position: relative; transition: color var(--dur-2) var(--ease-out), background var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out); }
.answer-number svg { display: none; position: absolute; }
.answer.correct .answer-check, .answer.wrong .answer-cross { display: block; }
.answer.correct .answer-letter, .answer.wrong .answer-letter { visibility: hidden; }
.answer-status { visibility: hidden; min-height: 1.4em; }
.answer.selected .answer-status, .answer.correct .answer-status, .answer.wrong .answer-status { visibility: visible; }
.answer[aria-disabled="true"] { cursor: default; }
.correction-sequence .reveal-later, .correction-sequence .reveal-later .answer-number { transition-delay: 120ms; }
.correction-sequence .reveal-later .answer-status { animation: page-fade var(--dur-2) var(--ease-out) 120ms both; }
.correction-sequence .answer.correct svg path, .correction-sequence .answer.wrong svg path,
.store-unlocked svg path { stroke-dasharray: 40; animation: correction-stroke var(--dur-3) var(--ease-out) 160ms backwards; }
.store-unlocked svg path { animation-delay: 0ms; }
@keyframes correction-stroke { from { stroke-dashoffset: 40; } to { stroke-dashoffset: 0; } }
.feedback-arriving { animation: explanation-in var(--dur-3) var(--ease-out) 200ms backwards; }
@keyframes explanation-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.modal[open] { animation: page-fade 200ms var(--ease-out); }
.modal[open]::backdrop { animation: page-fade 200ms var(--ease-out); }
.zoomed-image { transform-origin: center; animation: figure-grow var(--dur-3) var(--ease-out); }
@keyframes figure-grow { from { transform: scale(var(--figure-scale, .5)); } to { transform: scale(1); } }
.purchase-button { position: relative; }
.purchase-wait { display: none; position: absolute; inset: 0; padding-inline: 8px; align-items: center; justify-content: center; overflow: hidden; }
.purchase-button.waiting .purchase-label { visibility: hidden; }
.purchase-button.waiting .purchase-wait { display: flex; }
@media (max-width: 700px) {
  main > .screen-outgoing { top: 24px; inset-inline: 20px; }
  .modal { margin: auto 0 0; width: 100%; max-height: calc(100dvh - 16px); border-radius: var(--radius); border-end-start-radius: 0; border-end-end-radius: 0; padding-bottom: max(20px, var(--safe-bottom)); }
  .modal[open] { animation: sheet-up var(--dur-depth) var(--ease-depth); }
  .modal.figure-modal { animation: page-fade 200ms var(--ease-out); }
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

.answer { transition: background var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out); }

.answer-content { min-width: 0; flex: 1; }

/* Preparation is an observed record, with no predictive percentage. */
.readiness .readiness-state { font: 700 clamp(calc(28px * var(--type-scale-capped)), 7vw, calc(40px * var(--type-scale-capped)))/1.08 var(--font-display); margin: 18px 0 24px; max-width: 25ch; }
.readiness > :not(.signature) { position: relative; z-index: 1; }
.readiness-measures { display: grid; gap: 12px; max-width: 36rem; font-size: var(--text-sm); }
.readiness-measures .row { gap: 12px; align-items: baseline; }
.readiness-measures strong { text-align: end; font-variant-numeric: tabular-nums; }
.readiness-measures .meter { height: 16px; margin: 6px 0 0; }
.measure-period { color: var(--hero-muted); margin: 0; }
.readiness-exams { max-width: 36rem; margin-top: 24px; font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.exam-marks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: relative; margin-block: 12px 0; margin-inline: 0 24px; }
.exam-mark { display: grid; grid-template-rows: 16px 80px auto; justify-items: center; min-width: 0; gap: 4px; font-size: var(--text-sm); }
.exam-mark.empty .exam-mark-track { grid-row: 2; }
.exam-mark-track { display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 80px; }
.exam-mark-track > span { width: 2px; background: var(--hero-accent); animation: mark-appear var(--dur-2) var(--ease-out); }
.exam-mark.failed .exam-mark-track > span { background: none; border-inline-start: 2px dashed var(--hero-accent); }
.exam-reference { position: absolute; inset-inline: 0; z-index: 1; height: 0; border-top: 1px dashed var(--hero-muted); opacity: 1; pointer-events: none; }
.exam-reference > span { position: absolute; inset-inline-start: calc(100% + 8px); top: 0; transform: translateY(-50%); color: var(--hero-muted); font-size: var(--text-sm); }
.exam-text-list { margin: 0; padding: 0; }
.readiness .next-action { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; min-height: 44px; margin-top: 12px; color: var(--hero-accent); font: 650 var(--text-base)/1.4 var(--font-display); }
.readiness .next-action a { color: var(--hero-accent); }
.readiness .readiness-secondary { display: inline-flex; align-items: center; min-height: 44px; padding: 0; color: var(--hero-muted); background: none; border: 0; font-size: var(--text-sm); text-align: start; text-decoration: underline; }
.progress-link { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; padding: 16px 0; min-height: 44px; border-bottom: 1px solid var(--line); color: var(--ink); }
.progress-settings { padding-inline: 0; border-block: 1px solid var(--line); }
.practice-streak { margin-top: 24px; color: var(--muted); font-size: var(--text-sm); }
.plan-form { display: grid; gap: 8px; max-width: 36rem; }
.plan-form input { width: 100%; min-width: 0; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; }
.plan-form input[aria-invalid] { border-color: var(--bad); }
.field-error { color: var(--bad); font-size: var(--text-sm); margin: 0 0 12px; }
.plan-timeline { margin-block: 32px; }
.plan-axis { position: relative; height: 12px; margin-inline: 1px; border-bottom: 1px solid var(--line); }
/* physical: the plan timeline stays left to right like a date axis. plan.js positions it with inline left and text-align. */
.plan-week, .plan-marker { position: absolute; bottom: 0; height: 6px; border-left: 1px solid var(--muted); } /* physical */
.plan-marker { height: 10px; border-color: var(--ink); }
.plan-labels { display: grid; margin-top: 12px; font-size: var(--text-sm); }
.plan-label { grid-area: 1 / 1; position: relative; width: max-content; max-width: 45%; }
.plan-label-1 { text-align: center; }
.plan-label-2 { text-align: right; } /* physical */
.plan-review-above { padding-top: var(--review-height, 5rem); }
.plan-review-above .plan-label-1 { transform: translateY(calc(-100% - 24px)); }
.plan-labels time { display: block; font-variant-numeric: tabular-nums; }
.plan-heavy { border-inline-start: 2px solid var(--ink); padding-inline-start: 16px; }
.settings-row { display: flex; align-items: center; min-height: 44px; gap: 16px; padding-block: 16px; cursor: pointer; }
.settings-row input { width: 24px; height: 24px; flex-shrink: 0; accent-color: var(--ink); }
.settings-row[hidden] { display: none; }
@keyframes mark-appear { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 600px) {
  .readiness { padding: 22px 20px; }
  .readiness .signature { width: 200px; height: 200px; inset-inline-end: -90px; bottom: -105px; }
  .readiness-measures .row { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .exam-mark-track > span { animation: none; }
}
.readiness :focus-visible { outline-color: var(--hero-accent); }
.readiness-measures .meter { border-color: var(--hero-muted); }
.readiness-measures .meter-tick { background: var(--hero-muted); }
.exam-mark.empty .exam-mark-track::after { content: ''; width: 12px; border-bottom: 1px solid var(--hero-muted); }
.plan-form input { border-color: var(--muted); }
.plan-form input[aria-invalid] { border-color: var(--bad); }
.study-plan .fine-print, .study-plan .field-error, .plan-heavy, .exam-summary p { font-family: var(--font-text); }
.next-action:active, .progress-link:active, .exam-history-row:active { transform: scale(.985); transition-duration: var(--dur-1); }
.exam-mark-track > span[data-unchanged] { animation: none; }
.exam-mark > span:first-child { line-height: calc(16px * var(--type-scale-capped)); }

/* Optional confidence shares the correction live region and keeps native radio keys. */
.confidence-control { margin: 20px 0 0; padding: 12px 0 0; border: 0; border-top: 1px solid var(--line); min-width: 0; }
.confidence-control legend { padding-block: 0; padding-inline: 0 8px; font-size: var(--text-sm); }
.confidence-options { display: flex; flex-wrap: wrap; gap: 8px; }
.confidence-options label { display: flex; align-items: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 8px 12px; border: 2px solid var(--line); border-radius: var(--radius-xs); background: var(--surface); color: var(--ink); cursor: pointer; transition: transform var(--dur-2) var(--ease-out); }
.confidence-options label:has(:checked) { border-color: var(--ink); font-weight: 700; }
.confidence-options label:has(:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
.confidence-options input { accent-color: var(--ink); }
.confidence-options label:has([aria-disabled="true"]) { cursor: default; }
.confidence-feedback { border-top: 1px solid currentColor; padding-top: 12px; }
.study-mixed:disabled { opacity: 1; color: var(--muted); cursor: default; }
.study-mixed-feedback:empty { display: none; }
.lesson nav { flex-wrap: wrap; }
.confidence-options label:active { transform: scale(.985); transition: transform var(--dur-1) var(--ease-out); }
@media (prefers-reduced-motion: reduce) {
  .confidence-options label:active { transform: none; transition: none; }
}

/* Local reminders use the collection's native form controls and ruled rows. */
.reminder-days { border: 0; padding: 16px 0; margin: 0; }
.reminder-days legend { font-family: var(--font-display); font-weight: 600; }
.reminder-days label { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.reminder-days input { width: 24px; height: 24px; accent-color: var(--ink); }
.reminder-settings input[type="time"] { display: block; min-height: 44px; max-width: 100%; margin-top: 8px; padding: 8px 12px; border: 1px solid var(--muted); border-radius: var(--radius-sm); color: var(--ink); background: var(--surface); font: inherit; font-variant-numeric: tabular-nums; }
.reminder-settings input[aria-invalid] { border-color: var(--bad); }
.reminder-summary { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 24px; }
.reminder-summary ul { padding-inline-start: 1.25em; font-variant-numeric: tabular-nums; }
.reminder-summary .fine-print { margin-top: 12px; }

/* Guided chart work: ruled controls, ordered legends and geographic SVG ink. */
.chart-modes { display: grid; margin-bottom: 24px; border-block: 1px solid var(--line); }
.chart-modes .button { justify-content: flex-start; text-align: start; border: 0; border-radius: 0; min-height: 48px; background: var(--surface); color: var(--ink); }
.chart-modes .button + .button { border-top: 1px solid var(--line); }
.chart-modes [aria-pressed="true"] { border-inline-start: 3px solid var(--ink); font-weight: 700; }
.chart-modes .button:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; }
.chart-steps { padding-inline-start: 28px; font-variant-numeric: tabular-nums; }
.chart-step { padding-block: 16px; border-bottom: 1px solid var(--line); animation: page-fade var(--dur-3) var(--ease-out); }
.chart-step h3 { margin-top: 0; font-family: var(--font-display); }
.chart-step-legend { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; }
.chart-step-legend dt { font: 600 var(--text-sm) var(--font-display); }
.chart-step-legend dd { margin: 0; overflow-wrap: anywhere; }
.chart-step .button { margin-block: 12px 0; margin-inline: 0 8px; }
.chart-hint { border-inline-start: 1px solid var(--ink); padding-inline-start: 16px; }
.chart-step-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-block: 24px; }
.chart-annotation { stroke: var(--figure-caption); }
.chart-annotation rect { fill: var(--figure-paper); }
.chart-annotation text { fill: var(--figure-caption); font: 700 calc(13px * var(--type-scale-capped)) var(--font-display); }
.carteggio-exercise [hidden] { display: none; }
.chart-practice input:focus-visible, .chart-practice select:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Native checkbox semantics, with a 48px switch target and explicit states. */
.reminder-settings input[role="switch"] { appearance: none; position: relative; width: 48px; height: 44px; margin: 0; border: 0; border-radius: var(--radius-sm); background: transparent; cursor: pointer; }
.reminder-settings input[role="switch"]::before { content: ''; position: absolute; inset: 8px 0; border: 2px solid var(--ink); border-radius: var(--radius-sm); background: var(--surface); }
.reminder-settings input[role="switch"]::after { content: ''; position: absolute; top: 13px; inset-inline-start: 5px; width: 18px; height: 18px; border-radius: var(--radius-xs); background: var(--ink); transition: transform var(--dur-2) var(--ease-out); }
.reminder-settings input[role="switch"]:checked::before { background: var(--ink); }
.reminder-settings input[role="switch"]:checked::after { transform: translateX(20px); transform: translateX(calc(var(--inline-sign) * 20px)); background: var(--surface); }
.reminder-settings input[role="switch"]:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.reminder-settings input[role="switch"]:disabled { cursor: not-allowed; }
.reminder-settings input[role="switch"]:disabled::before { border-style: dashed; }
.reminder-week { display: grid; grid-template-columns: repeat(7, minmax(44px, 1fr)); gap: 0; margin-top: 8px; }
.reminder-week label { position: relative; display: grid; place-items: center; min-width: 44px; min-height: 44px; cursor: pointer; }
.reminder-week input { appearance: none; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; border: 1px solid var(--ink); border-radius: var(--radius-xs); background: var(--surface); }
.reminder-week span { position: relative; pointer-events: none; font: 600 var(--text-sm) var(--font-display); color: var(--ink); }
.reminder-week input:checked { background: var(--ink); }
.reminder-week input:checked + span { color: var(--surface); text-decoration: underline; text-underline-offset: 3px; }
.reminder-week input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; z-index: 1; }
.reminder-week input:disabled { border-style: dashed; cursor: not-allowed; }
.reminder-summary ul { list-style: none; padding: 0; font-variant-numeric: tabular-nums; }
.reminder-summary li { padding-block: 12px; border-bottom: 1px solid var(--line); }
.reminder-status { min-height: 1.5em; margin-top: 16px; font: 400 var(--text-sm)/1.5 var(--font-text); color: var(--muted); }
.reminder-entry { color: var(--ink); text-decoration: none; }
.reminder-entry .settings-summary { margin-inline-start: auto; text-align: end; font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.reminder-entry svg { flex-shrink: 0; }
@media (max-width: 380px) {
  .reminder-form { padding-inline: 0; }
}
@media (forced-colors: active) {
  .reminder-week input, .reminder-settings input[role="switch"] { appearance: auto; position: static; width: 24px; height: 24px; }
  .reminder-settings input[role="switch"]::before, .reminder-settings input[role="switch"]::after { display: none; }
  .reminder-week label { display: flex; flex-direction: column; }
}

/* Shared native shell; the public desktop keeps its collection header. */
:root[data-platform="android"] { --safe-top: 0px; --safe-bottom: 0px; --safe-left: 0px; --safe-right: 0px; --tabbar-base: 64px; }
@media (resolution: 1dppx) { :root { --hairline: 1px; } }
button, .button, .main-nav, .compact-bar, .group-row, .measure-tile, .round-command {
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation;
}
[data-shell="native"] .site-header, [data-shell="native"] .header-inner { display: contents; }
[data-shell="native"] .brand, [data-shell="native"] .site-footer { display: none; }
[data-shell="native"] .storage-notice { position: sticky; top: calc(var(--safe-top) + var(--navbar-h)); margin-top: calc(var(--safe-top) + var(--navbar-h)); z-index: 22; }
[data-shell="native"] body { padding-bottom: 0; }
[data-shell="native"][data-tabbar="true"] body { padding-bottom: var(--tabbar-h); }
[data-shell="native"] main {
  padding: calc(13px + var(--safe-top)) max(var(--gutter), var(--safe-right)) 24px max(var(--gutter), var(--safe-left)); /* physical */
  min-height: calc(100dvh - var(--tabbar-h));
}
[data-shell="native"][data-detail="true"] main { padding-top: calc(var(--navbar-h) + var(--safe-top) + 16px); }
[data-shell="native"] .large-title { position: relative; padding-inline: 4px 52px; margin-bottom: 24px; }
[data-shell="native"] .large-title h1 { font-size: calc(34px * var(--type-scale-capped)); line-height: calc(41px * var(--type-scale-capped)); font-weight: 800; letter-spacing: 0; }
[data-shell="native"] .large-title .eyebrow { font-size: var(--text-sm); margin-bottom: 0; font-weight: 400; }
.title-trailing { position: absolute; inset-inline-end: 0; bottom: 0; }
.round-command { display: grid; place-items: center; position: relative; width: 44px; height: 44px; color: var(--accent); }
.round-command::before { content: ''; position: absolute; inset: 4px; border: var(--hairline) solid var(--line); border-radius: 50%; }
[data-shell="native"] .main-nav {
  position: fixed; z-index: 20; bottom: 0; inset-inline: 0; margin: 0; gap: 0;
  height: auto; min-height: calc(var(--tabbar-base) + var(--safe-bottom)); padding: 0 max(4px, var(--safe-right)) var(--safe-bottom) max(4px, var(--safe-left)); /* physical */
  border-top: var(--hairline) solid var(--line); background: var(--surface);
}
[data-shell="native"] .main-nav a { position: relative; flex: 1; min-width: 0; min-height: 44px; padding: 3px 0; gap: 0; flex-direction: column; justify-content: center; border-radius: 0; font-size: var(--text-sm); line-height: 1.15; color: var(--muted); }
[data-shell="native"] .main-nav svg { display: block; width: 26px; height: 26px; }
[data-shell="native"] .main-nav a[aria-current] { color: var(--accent); }
[data-shell="native"] .main-nav a[aria-current] svg { stroke-width: 2px; }
[data-shell="native"] .main-nav a[aria-current] span { font-weight: 800; }
[data-platform="android"] .main-nav a::before { content: ''; position: absolute; top: 4px; inset-inline-start: calc(50% - 32px); width: 64px; height: 32px; border-radius: var(--radius); pointer-events: none; }
[data-platform="android"] .main-nav a[aria-current]::before { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.compact-bar { display: none; }
[data-shell="web"][data-detail="true"] .compact-bar { display: flex; position: relative; min-height: 44px; max-width: 1120px; margin: auto; }
[data-shell="native"] .compact-bar {
  display: flex; position: fixed; z-index: 21; top: 0; inset-inline: 0; align-items: center; justify-content: center;
  min-height: calc(44px + var(--safe-top)); padding-top: var(--safe-top);
  background: var(--surface); border-bottom: var(--hairline) solid transparent; opacity: 0; pointer-events: none;
  transition: opacity var(--dur-2) var(--ease-out);
}
[data-shell="native"] .compact-bar.visible { opacity: 1; pointer-events: auto; }
.compact-bar.scrolled { border-bottom-color: var(--line); }
.compact-title { opacity: 0; transition: opacity var(--dur-2) var(--ease-out); font: 700 calc(17px * var(--type-scale-capped))/1.2 var(--font-display); text-align: center; max-width: max(0px, calc(100% - 2 * var(--compact-side, 16px))); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-back { position: absolute; inset-inline-start: max(4px, var(--safe-left)); bottom: 0; display: flex; gap: 4px; align-items: center; max-width: calc(50% - 24px); height: 44px; min-width: 44px; padding: 0 4px; border: 0; background: transparent; color: var(--accent); font-size: calc(17px * var(--type-scale-capped)); }
.nav-back svg { transform: rotate(180deg); }
.back-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-platform="android"] .back-label { display: none; }
[data-shell="native"] .text-link { text-decoration: none; }
[data-shell="native"] .lesson-body a { text-decoration: underline; }
.group { margin-block: 24px; }
.group > h2 { letter-spacing: 0; margin: 0 16px 8px; font-size: calc(15px * var(--type-scale-capped)); color: var(--muted); font-weight: 500; }
.group-rows { border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.group-row { display: flex; align-items: center; gap: 12px; min-height: var(--row-h); width: 100%; padding: 8px 16px; border: 0; background: transparent; color: var(--ink); text-align: start; font: 400 calc(17px * var(--type-scale-capped))/1.3 var(--font-display); transition: background 200ms var(--ease-out); }
.group-row { position: relative; }
.group-row + .group-row { border-top: 0; }
.group-row + .group-row::before { content: ""; position: absolute; inset-inline: 16px 0; top: 0; height: var(--hairline); background: var(--line); }
.group-row:has(> svg) + .group-row::before { inset-inline-start: 50px; }
.group-rows :focus-visible { outline-offset: -3px; }
.group-row > svg { color: var(--accent); }
.row-copy { flex: 1; min-width: 0; }
.row-detail, .row-value { display: block; font-size: calc(15px * var(--type-scale-capped)); color: var(--muted); }
.row-chevron { display: flex; flex: 0 0 14px; color: var(--muted); }
a.group-row[href]:active, button.group-row:not(:disabled):active, label.group-row:has(input:not(:disabled)):active, .review-card summary:active, .review-correct > summary:active { background: var(--pressed-row, color-mix(in srgb, var(--line) 50%, transparent)); transform: none; opacity: 1; transition-duration: 0ms; }
.appearance-options { border: 0; margin: 0; padding: 0; min-width: 0; }
.group-row input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); }
.measure-tile { display: flex; flex-direction: column; gap: 4px; min-height: 92px; padding: 12px; background: var(--surface); color: var(--ink); border-radius: var(--radius); }
.tile-label, .tile-caption { font-size: calc(15px * var(--type-scale-capped)); color: var(--muted); }
.tile-value { font-size: calc(22px * var(--type-scale-capped)); font-weight: 800; font-variant-numeric: tabular-nums; }
.measure-tile:active { transform: scale(.985); }
.primary-action { display: flex; justify-content: space-between; width: 100%; min-height: 52px; font-size: calc(17px * var(--type-scale-capped)); }
.primary-action .row-detail { color: inherit; }
[data-platform="android"] button:active, [data-platform="android"] a:active { transform: none; }
.sheet { overscroll-behavior-y: none; overflow: auto; }
.sheet-heading { display: flex; justify-content: center; align-items: flex-start; position: relative; min-height: 44px; margin-bottom: 16px; padding-inline: 44px; }
.sheet-heading h2 { font-size: calc(17px * var(--type-scale-capped)); flex: 1; min-width: 0; width: 100%; text-align: center; white-space: normal; overflow: visible; text-overflow: unset; overflow-wrap: anywhere; line-height: 1.3; padding-block: 10px; }
.sheet-heading .icon-button { position: absolute; inset-inline-end: 0; top: 0; min-width: 44px; min-height: 44px; }
dialog[data-school-sheet] .sheet-heading { padding-inline-end: 44px; }
dialog[data-school-sheet] .sheet-heading h2 { padding-inline: 0; hyphens: auto; }
.sheet-handle { display: none; }
[data-shell="native"] .sheet { position: fixed; inset: auto 0 0; margin: 0; width: 100%; max-width: none; max-height: 92dvh; padding: 0 20px max(20px, var(--safe-bottom)); border-radius: var(--radius); border-end-start-radius: 0; border-end-end-radius: 0; border: 0; }
[data-shell="native"] .sheet[open] { animation: sheet-up var(--dur-depth) var(--ease-depth); }
[data-shell="native"] .sheet-handle { display: grid; place-items: center; height: 24px; touch-action: none; }
.sheet-handle span { display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--muted); }
.legal-content { overflow-wrap: anywhere; }
.legal-content section { margin-block: 24px; }
.legal-content h2 { margin-bottom: 12px; }
.legal-content a { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) {
  main[data-nav] > *, [data-shell="native"] .sheet[open] { animation: none; }
  .compact-bar, .group-row, .measure-tile { transition: none; }
}

[data-shell="web"] .main-nav { margin-inline-start: auto; justify-content: flex-end; }
[data-shell="web"] .large-title { position: relative; padding-inline-end: 52px; }

html[data-launching], html[data-launching] body { background: var(--launch-bg, var(--navy)); }

html:has(dialog[open]) { overflow: hidden; }

/* Home plancia: natural height, including at enlarged text sizes. */
.home-dashboard { display: grid; gap: 0; max-width: 720px; margin-inline: auto; }
.home-dashboard .large-title { position: relative; margin: 0; padding-block: 0; padding-inline: 4px 0; }
.home-dashboard .large-title h1 { padding-inline-end: 52px; font-size: calc(34px * var(--type-scale-capped)); line-height: calc(41px * var(--type-scale-capped)); font-weight: 800; letter-spacing: 0; }
.home-dashboard .large-title .eyebrow { display: flex; margin: 0; font-size: var(--text-sm); line-height: calc(20px * var(--type-scale-capped)); font-weight: 400; }
.home-context { display: flex; align-items: center; width: fit-content; min-width: 44px; min-height: 44px; margin-block: -12px; color: var(--muted); font-size: var(--text-sm); }
.home-dashboard a { text-decoration: none; }
.home-dashboard .readiness { display: grid; gap: 0; min-height: 0; margin-top: 12px; padding: 16px; border: 0; }
.home-preparation-heading { display: flex; align-items: center; justify-content: space-between; min-height: 20px; color: var(--hero-muted); font-size: var(--text-sm); line-height: calc(20px * var(--type-scale-capped)); }
.home-info { flex: 0 0 44px; margin-block: -12px; margin-inline-end: -8px; padding: 0; border: 0; background: transparent; color: var(--hero-muted); font-size: calc(17px * var(--type-scale-capped)); }
.home-info.round-command::before { inset: 8px; border-color: var(--hero-muted); }
.home-dashboard .readiness-state { margin: 8px 0 12px; min-width: 0; max-width: none; font-size: calc(28px * var(--type-scale-capped)); line-height: calc(28px * var(--type-scale-capped)); font-weight: 800; letter-spacing: 0; }
.home-dashboard .readiness-state.state-compact { font-size: calc(22px * var(--type-scale-capped)); line-height: calc(26px * var(--type-scale-capped)); }
.home-dashboard .readiness-measures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: none; }
.home-measure { display: grid; align-content: start; }
.home-measure .measure-label { font-size: var(--text-sm); line-height: calc(16px * var(--type-scale-capped)); color: var(--hero-muted); }
.home-measure strong { font-size: calc(34px * var(--type-scale-capped)); line-height: 1; font-weight: 800; text-align: start; }
.home-measure .measure-counts { margin-top: 6px; font-size: calc(15px * var(--type-scale-capped)); line-height: calc(14px * var(--type-scale-capped)); font-variant-numeric: tabular-nums; color: var(--hero-muted); }
.home-dashboard .readiness-measures .meter { height: 16px; margin: 10px 0 0; }
.home-dashboard .readiness .primary-action { flex-direction: row; justify-content: space-between; align-items: center; min-height: 52px; margin: 14px 0 0; padding: 6px 12px; background: var(--hero-accent); color: var(--navy); font-size: calc(17px * var(--type-scale-capped)); line-height: calc(20px * var(--type-scale-capped)); font-weight: 700; }
.home-dashboard .primary-action .row-detail { font-size: var(--text-sm); line-height: calc(16px * var(--type-scale-capped)); font-weight: 400; }
.home-dashboard .readiness .signature { width: 160px; height: 160px; inset-inline-end: -85px; top: -40px; bottom: auto; }
/* The DIN sheet stays clipped on the inline-end edge. These margins keep its ink off the card's text and the info control. */
.home-dashboard .readiness:has(.signature-din) > :is(.home-preparation-heading, .readiness-state, .readiness-measures) { margin-inline-end: 48px; }
.home-dashboard .readiness:has(.signature-din) .home-preparation-heading > span { min-width: 0; overflow-wrap: anywhere; }
.home-dashboard .readiness:has(.signature-din) .home-info { margin-inline-end: 0; }
.home-dashboard .readiness:has(.signature-din) .measure-label,
.home-dashboard .readiness:has(.signature-din) .measure-counts { overflow-wrap: anywhere; }
.home-dashboard .readiness .signature-distanza { inset-inline-end: -40px; top: 6px; }
.home-dashboard .primary-action > svg { flex: 0 0 14px; width: 14px; height: 14px; }
.home-tiles { margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: minmax(19px, auto) 18px minmax(26px, auto) minmax(33px, auto); column-gap: var(--gap); row-gap: 0; }
.home-tiles .measure-tile { position: relative; display: grid; grid-row: 1 / span 4; grid-template-rows: subgrid; min-width: 0; min-height: 96px; padding: 5px 8px; gap: 0; }
.home-tiles .tile-label, .home-tiles .tile-caption { font-size: calc(15px * var(--type-scale-capped)); line-height: calc(14px * var(--type-scale-capped)); overflow-wrap: anywhere; }
.home-tiles .tile-label { grid-row: 1; }
.home-tiles .tile-value { grid-row: 3; font-size: calc(22px * var(--type-scale-capped)); line-height: calc(26px * var(--type-scale-capped)); margin: 0; }
.home-tiles .tile-caption { grid-row: 4; min-height: 28px; }
.home-tiles .compact-exams { grid-row: 2; align-self: center; width: 100%; height: 18px; padding-block: 3px; margin: 0; }
.compact-exams .exam-marks { position: relative; display: flex; justify-content: space-between; gap: 0; height: 12px; margin: 0; }
.compact-exams .exam-mark { display: block; width: 2px; min-width: 0; }
.compact-exams .exam-mark-track { height: 12px; }
.compact-exams .exam-mark-track > span { color: var(--accent); background: var(--accent); }
.compact-exams .exam-mark.failed .exam-mark-track > span { background: none; border-color: var(--muted); }
.compact-exams .exam-mark.empty .exam-mark-track::after { width: 2px; border-color: var(--muted); }
.compact-exams .exam-reference { inset-inline: 0; border-color: var(--muted); }
.home-dashboard .group { margin: 16px 0 0; }
.home-dashboard .group > h2 { letter-spacing: 0; margin: 0 16px 2px; font-size: calc(15px * var(--type-scale-capped)); line-height: calc(16px * var(--type-scale-capped)); letter-spacing: 0; }
.home-dashboard .group-row { min-height: 52px; padding-block: 6px; }
.home-dashboard .row-copy { min-width: 0; }
/* DTZ dashboard: the four exam parts as tiles of equal rank; measured solid, declared dashed. */
.home-parts { margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.home-parts .measure-tile { display: grid; grid-template-columns: auto 1fr; align-items: baseline; align-content: center; gap: 0 6px; min-width: 0; min-height: 56px; padding: 4px 10px; }
.home-parts .tile-label { grid-column: 1 / -1; }
.home-tiles .measure-tile:only-child { grid-column: 1 / -1; }
.home-parts .tile-label { font-size: var(--text-sm); line-height: calc(16px * var(--type-scale-capped)); color: var(--ink); font-weight: 650; }
.home-parts .tile-value { justify-self: start; font-size: var(--text-base); line-height: 1.25; padding-bottom: 1px; border-bottom: 1px solid transparent; }
.home-parts [data-part-state="measured"] .tile-value { border-bottom: 2px solid var(--accent); }
.home-parts [data-part-state="declared"] .tile-value { border-bottom: 1.5px dashed var(--muted); }
.home-parts .tile-caption { font-size: calc(15px * var(--type-scale-capped)); line-height: calc(14px * var(--type-scale-capped)); overflow-wrap: anywhere; }
.home-dashboard .home-parts + .group { margin-top: 12px; }

/* Secondary screens share the inset list and its instantaneous pressed state. */
.large-title { position: relative; }
.large-title h1 { font-size: calc(34px * var(--type-scale-capped)); line-height: calc(41px * var(--type-scale-capped)); font-weight: 800; letter-spacing: 0; }
.large-title .eyebrow { font-size: var(--text-sm); font-weight: 400; }
[data-shell="native"] .large-title:not(:has(.title-trailing)) { padding-inline-end: 4px; }
.compact-bar.title-visible .compact-title { opacity: 1; }
.nav-back { font-family: var(--font-display); }
.group-note { margin: 8px 16px 0; font-size: var(--text-sm); color: var(--muted); }
.backup-status { margin: 8px 16px 0; font-size: var(--text-sm); color: var(--ink); overflow-wrap: anywhere; }
.backup-status:empty { display: none; }
.group-row { text-decoration: none; }
.row-title { display: block; }
.measured-row { min-height: 64px; padding-block: 6px; }
.measured-row .row-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.measured-row .meter { height: 12px; margin: 0; border-color: var(--muted); }
.measured-row .meter-tick { background: var(--muted); }
.group-row .topic-number { flex: 0 0 20px; color: var(--muted); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.group-row .row-detail, .group-row .row-value { font-variant-numeric: tabular-nums; }
.group-action { color: var(--accent); text-align: center; font-size: calc(17px * var(--type-scale-capped)); font-weight: 700; }
.exam-facts { font-size: calc(15px * var(--type-scale-capped)); font-variant-numeric: tabular-nums; }
.exam-history-row { font-variant-numeric: tabular-nums; }
.group-row.lesson-link { display: flex; margin-block: 0; }
.plan-form, .reminder-form { padding: 16px; }
@media (max-width: 380px) { .reminder-form { padding-inline: 0; } }
.plan-summary { font-variant-numeric: tabular-nums; }
.practice-streak { font-size: var(--text-sm); }
.question-actions .button, .exam-layout .question-actions .button, .result-actions .button, .lesson > .button, .plan-form .button, .errors-index > .button { font-size: calc(17px * var(--type-scale-capped)); font-weight: 700; }
.question-actions .button, .result-actions .button { min-width: 44px; min-height: 44px; }
@media (prefers-reduced-motion: reduce) {
  .compact-title { transition: none; }
}

.review-card summary, .review-correct > summary { transition: background 200ms var(--ease-out); }
.question-top .text-link { font-size: calc(17px * var(--type-scale-capped)); }
.legal-content h2, .lesson-body h3, .reminder-summary h2 { font-size: calc(22px * var(--type-scale-capped)); }
[data-platform="android"] .confidence-options label:active { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .review-card summary, .review-correct > summary { transition: none; }
}

/* Dynamic Type reflows tab labels with the rest of the interface. */
[data-shell="native"] .main-nav a { white-space: normal; }
/* The standalone radiotelephony module keeps its original one-tab shell. */
[data-shell="native"] .main-nav a[data-route="readback"] { font-size: var(--text-sm); line-height: 1.25; }
[data-shell="native"] .main-nav a span { max-width: 100%; overflow-wrap: anywhere; text-align: center; }
.large-title, .home-measure, .primary-action > span, .group-row > span { min-width: 0; }
.large-title h1, .home-context, .readiness-state, .row-copy, .row-value, .group-note, .question-source, .primary-action { overflow-wrap: anywhere; }
.row-title, .row-detail { min-width: 0; }
.round-command { flex-shrink: 0; }
.compact-title { line-height: calc(22px * var(--type-scale-capped)); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; white-space: normal; overflow: hidden; overflow-wrap: anywhere; margin-block: 8px; }
.nav-back { height: auto; min-height: 44px; top: var(--safe-top); }
.measured-row .row-title { white-space: normal; overflow: visible; }
[data-large-type="true"] .home-tiles,
[data-large-type="true"] .home-parts,
[data-large-type="true"] .home-dashboard .readiness-measures { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; row-gap: var(--gap); }
[data-large-type="true"] .home-tiles .measure-tile { grid-row: auto; grid-template-rows: auto 18px auto auto; padding: 12px; }
[data-large-type="true"] .home-dashboard .readiness-state { font-size: calc(28px * var(--type-scale-capped)); line-height: 1.15; }
[data-large-type="true"] .home-context, [data-large-type="true"] .home-info { margin-block: 0; }
[data-large-type="true"] .group-row:has(.row-value) { flex-wrap: wrap; }
[data-large-type="true"] .group-row .row-value { flex-basis: 100%; text-align: start; }
[data-large-type="true"] .question-actions, [data-large-type="true"] .result-actions, [data-large-type="true"] .row.spread { flex-wrap: wrap; }
[data-large-type="true"] .answer-number { width: auto; min-width: 26px; height: auto; min-height: 26px; flex-basis: auto; }

/* Notion card after answer confirmation: rule first, details behind one 44px tap. */
.notion-card { display: grid; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid currentColor; }
.notion-block { display: grid; gap: 2px; }
.feedback .notion-label { margin: 0; font-family: var(--font-display); font-size: var(--text-sm); font-weight: 700; color: inherit; }
.notion-card .lesson-body { font-size: var(--text-base); line-height: 1.5; }
.notion-card .lesson-body p { margin-top: 0; font-size: var(--text-base); }
.notion-details { border-top: var(--hairline) solid currentColor; }
.notion-more { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 8px 0; font-family: var(--font-display); font-size: var(--text-sm); font-weight: 650; }
.notion-more::-webkit-details-marker { display: none; }
.notion-more::after { content: '+'; font-size: var(--text-lg); line-height: 1; }
.notion-details[open] .notion-more::after { content: '−'; }
.notion-details-body { display: grid; gap: 10px; padding-bottom: 4px; }
.feedback .notion-unreviewed { margin-top: 0; font-size: var(--text-sm); color: inherit; }
.transfer-button { margin-top: 12px; }

/* Competency map: graduated scales in the shared meter() language. */
.competency-map { margin-block: 20px; }
.competency-map-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin: 0 16px 8px; }
.competency-map-head h2 { font-size: calc(15px * var(--type-scale-capped)); color: var(--muted); font-weight: 500; letter-spacing: 0; }
.competency-totals { font-size: var(--text-sm); color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.competency-empty { margin: 0 16px 12px; font-size: calc(15px * var(--type-scale-capped)); color: var(--muted); }
.competency-row { min-height: 64px; padding-block: 6px; }
.competency-row .row-title { white-space: normal; overflow: visible; }
.competency-row .meter { height: 12px; margin: 4px 0 0; border-color: var(--muted); }
.competency-row .meter-tick { background: var(--muted); }
.competency-meter.status-confirmed { color: var(--accent); }
.competency-meter.status-fragile { color: var(--ink); }
.competency-meter.status-fragile .meter-fill { background: none; border-bottom: 2px dashed var(--ink); height: 2px; }
.competency-meter.status-unseen { color: var(--muted); border-bottom-style: dashed; }
.competency-status-label { flex-shrink: 0; font-weight: 600; }
.competency-row.status-confirmed .competency-status-label { color: var(--accent); }
.competency-row.status-fragile .competency-status-label { color: var(--ink); }
.competency-folded { border-top: var(--hairline) solid var(--line); }
.competency-folded:first-child { border-top: 0; }
.competency-fold-summary { list-style: none; cursor: pointer; color: var(--muted); font-size: calc(15px * var(--type-scale-capped)); }
.competency-fold-summary::-webkit-details-marker { display: none; }
.competency-folded[open] > .competency-fold-summary .row-chevron svg { transform: rotate(90deg); }
.competency-folded-rows { border-top: var(--hairline) solid var(--line); }
.competency-detail { display: grid; gap: 16px; }
.competency-detail-status { padding: 0 4px; }
.competency-status-heading { display: block; font-size: calc(15px * var(--type-scale-capped)); margin-bottom: 4px; }
.competency-detail .competency-practice { width: 100%; }

/* Visual theory: schema view, interactive angle control, active recall, heuristic and mnemo. */
.schema-view { display: grid; gap: 10px; width: 100%; }
.schema-view .sch { width: 100%; max-width: 640px; cursor: zoom-in; }
.schema-view[data-recall-state="masked"] .sch { cursor: default; }
.schema-view .sch [data-sch-target] { cursor: pointer; }
.sch-zoomed { width: 100%; max-width: 640px; margin: auto; }
.schema-angle { display: grid; gap: 6px; padding: 8px 0; font-family: var(--font-display); font-size: var(--text-sm); color: inherit; }
.schema-angle-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.schema-angle-value { font-weight: 700; }
.schema-angle input[type="range"] { width: 100%; min-height: 44px; margin: 0; accent-color: var(--ink); cursor: pointer; }
.schema-recall-button { width: 100%; min-height: 44px; justify-content: center; }
.schema-recall-priority { border-width: 2px; border-color: var(--ink); font-weight: 700; }
.schema-recall { display: grid; gap: 10px; padding-top: 8px; border-top: var(--hairline) solid currentColor; }
.schema-recall-prompt { font-family: var(--font-text); font-size: var(--text-base); font-weight: 600; color: inherit; }
.schema-recall-choices { display: grid; gap: 8px; }
.schema-recall-choice { width: 100%; min-height: 44px; justify-content: flex-start; text-align: start; font-family: var(--font-text); color: var(--ink); background: var(--surface); border-color: var(--line); }
.schema-recall-choice.correct { color: var(--good); background: var(--good-bg); border-color: var(--good); font-weight: 700; }
.schema-recall-choice.wrong { color: var(--bad); background: var(--bad-bg); border-color: var(--bad); }
.schema-recall-verdict { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid currentColor; border-radius: var(--radius-xs); font-family: var(--font-display); font-size: var(--text-sm); font-weight: 700; }
.schema-recall-verdict.correct { color: var(--good); background: var(--good-bg); border-color: var(--good); }
.schema-recall-verdict.wrong { color: var(--bad); background: var(--bad-bg); border-color: var(--bad); }
.schema-recall-back { width: 100%; min-height: 44px; }
.notion-heuristic-body { display: grid; gap: 10px; padding-bottom: 8px; }
.notion-heuristic-q, .notion-heuristic-conclusion { font-family: var(--font-text); font-size: var(--text-base); color: inherit; }
.notion-heuristic-conclusion { font-weight: 600; }
.notion-heuristic-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.notion-heuristic-actions .button, .notion-heuristic-reset { min-width: 88px; min-height: 44px; }
.notion-mnemo { border-top: var(--hairline) solid currentColor; padding-top: 8px; }
.notion-mnemo-text { font-family: var(--font-text); font-size: var(--text-base); font-weight: 600; color: inherit; }
.feedback .notion-mnemo-source { margin-top: 2px; font-size: var(--text-sm); color: inherit; }
.notion-mnemo-source a { color: inherit; text-decoration: underline; }
.lesson-schemas { display: grid; gap: 24px; margin-block: 24px; }
.lesson-schema { margin: 0; display: grid; gap: 10px; }
.lesson-schema-caption { font-family: var(--font-text); font-size: var(--text-sm); color: var(--ink); line-height: 1.55; }
.lesson-schema-caption .lesson-body { font-size: var(--text-sm); line-height: 1.55; }

/* Course option lessonLayout "essentiel": notion cards as rungs on one ink rule, full text folded. */
.lesson[data-layout="essentiel"] .lesson-essentiel { margin-block: 24px 0; }
.lesson[data-layout="essentiel"] .lesson-essentiel-title { margin: 0 0 16px; font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700; line-height: 1.2; }
.lesson[data-layout="essentiel"] .lesson-essentiel-list { list-style: none; margin: 0; padding: 0; display: grid; }
.lesson[data-layout="essentiel"] .lesson-essentiel-item { display: grid; grid-template-columns: minmax(2ch, auto) minmax(0, 1fr); column-gap: 14px; align-items: start; }
.lesson[data-layout="essentiel"] .lesson-essentiel-number { min-width: 2ch; padding-top: 2px; text-align: end; font-family: var(--font-display); font-size: calc(var(--text-base) * 1.875); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums lining-nums; color: var(--ink); }
.lesson[data-layout="essentiel"] .lesson-essentiel-item > .notion-card { margin: 0; padding: 4px 0 28px; padding-inline-start: 16px; border-top: 0; border-inline-start: 2px solid var(--ink); gap: 12px; transition: border-color var(--dur-2) var(--ease-out); }
.lesson[data-layout="essentiel"] .lesson-essentiel-item:last-child > .notion-card { padding-bottom: 8px; }
.lesson[data-layout="essentiel"] .lesson-essentiel-item:has(.notion-details[open]) > .notion-card { border-inline-start-color: var(--sch-signal); }
.lesson[data-layout="essentiel"] .notion-card .schema-view .sch { max-width: 100%; }
.lesson[data-layout="essentiel"] .notion-label { margin: 0; font-family: var(--font-display); font-size: var(--text-sm); font-weight: 700; color: var(--muted); }
.lesson[data-layout="essentiel"] .notion-rule > .notion-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.lesson[data-layout="essentiel"] .notion-rule .lesson-body,
.lesson[data-layout="essentiel"] .notion-rule .lesson-body p { margin: 0; font-size: var(--text-base); line-height: 1.5; }
.lesson[data-layout="essentiel"] .lesson-essentiel > .notion-unreviewed { margin: 12px 0 0; }
.lesson[data-layout="essentiel"] .lesson-essentiel + .button { margin-top: 24px; }
.lesson[data-layout="essentiel"] .lesson-full { margin-top: 32px; border-top: 2px solid var(--ink); border-bottom: var(--hairline) solid var(--line); }
.lesson[data-layout="essentiel"] .lesson-full-summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 10px 0; font-family: var(--font-display); font-size: var(--text-base); font-weight: 650; font-variant-numeric: tabular-nums; }
.lesson[data-layout="essentiel"] .lesson-full-summary::-webkit-details-marker { display: none; }
.lesson[data-layout="essentiel"] .lesson-full-summary::after { content: '+'; font-size: var(--text-lg); line-height: 1; }
.lesson[data-layout="essentiel"] .lesson-full[open] > .lesson-full-summary::after { content: '−'; }
.lesson[data-layout="essentiel"] .lesson-full > .lesson-body { padding-bottom: 24px; }
.lesson[data-layout="essentiel"] .lesson-full > .lesson-body > :first-child { margin-top: .5em; }
.lesson[data-layout="essentiel"] .lesson-table th,
.lesson[data-layout="essentiel"] .lesson-table td { min-width: 7em; overflow-wrap: normal; word-break: normal; -webkit-hyphens: auto; hyphens: auto; }
@media (prefers-reduced-motion: reduce) {
  .lesson[data-layout="essentiel"] .lesson-essentiel-item > .notion-card { transition: none; }
}

/* First-occurrence acronym glossary in lessons, notion cards and explanations. */
.glossary-abbr { text-decoration: underline dotted var(--muted); text-underline-offset: 3px; }
.glossary-tap { position: relative; display: inline; padding-block: 12px; cursor: pointer; border-radius: var(--radius-xs); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.glossary-tap:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.glossary-expansion { color: var(--muted); font-weight: 400; }
.glossary-foreign, .glossary-expansion [lang], .glossary-tooltip [lang] { font-style: italic; }
.glossary-tooltip { display: block; margin-top: 6px; padding: 8px 12px; max-width: min(36ch, 100%); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-raised); font-family: var(--font-text); font-size: var(--text-sm); font-style: normal; font-weight: 400; line-height: 1.45; overflow-wrap: anywhere; animation: page-fade var(--dur-2) var(--ease-out); }
[data-large-type="true"] .glossary-tooltip { max-width: 100%; font-size: var(--text-base); }
@media (prefers-reduced-motion: reduce) {
  .glossary-tooltip { animation: none; transition: none; }
}
/* Daily goal on home and in plan, and reminder activation offer card. */
.home-today { display: grid; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: var(--hairline) solid var(--hero-border); font-variant-numeric: tabular-nums; }
.home-today-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; font-size: var(--text-sm); color: var(--hero-muted); }
.home-today-head .practice-streak { margin: 0; color: white; }
.home-today-count { font-size: var(--text-base); font-weight: 700; color: var(--foam); }
.home-today .meter { height: 12px; margin: 2px 0; }
.home-today-meta { font-size: var(--text-sm); color: var(--hero-muted); }
.plan-goal { margin: 0 0 8px; padding: 0; border: 0; min-width: 0; }
.plan-goal legend { margin-bottom: 8px; font-size: var(--text-base); font-weight: 600; }
.plan-goal-custom { display: grid; gap: 8px; margin-top: 8px; }
.reminder-offer-card, .milestone-card { display: grid; gap: 12px; padding: 16px; }
.reminder-offer-actions, .milestone-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.reminder-offer-actions .button, .milestone-actions .button, .milestone-sheet .result-actions .button { min-width: 44px; min-height: 44px; }
/* Real exam outcome: home card and congratulations sheet. */
.milestone-date { color: var(--muted); font-size: var(--text-sm); }
.milestone-sheet .result-verdict { align-items: flex-start; margin: 0 0 16px; color: var(--ink); }
.milestone-sheet .result-verdict svg { color: var(--good); }
.milestone-sheet .result-actions { flex-wrap: wrap; margin: 16px 0 0; }
.milestone-status:empty { display: none; }

/* E7 */
.carte-screen { display: grid; gap: 10px; max-width: 720px; margin-inline: auto; }
.carte-screen .large-title { margin: 0; }
.carte-hero.readiness { min-height: 0; padding: 12px 14px; border-radius: var(--radius); display: block; }
.carte-hero-body { display: grid; gap: 6px; padding-inline-end: 76px; }
.carte-hero-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.carte-hero-sentence { font-family: var(--font-text); font-size: var(--text-sm); line-height: 1.3; color: var(--foam); margin: 0; }
.carte-hero-fraction { font-family: var(--font-display); font-size: calc(16px * var(--type-scale-capped)); line-height: 1.15; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--foam); }
.carte-hero .meter { height: 11px; margin: 2px 0; }
.carte-hero-counts { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: var(--text-sm); line-height: 1.3; color: var(--hero-muted); font-variant-numeric: tabular-nums; }
.carte-hero .signature { width: 140px; height: 140px; inset-inline-end: -76px; top: -52px; bottom: auto; }
.carte-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.carte-tile.measure-tile { display: grid; grid-template-rows: minmax(28px, auto) 12px auto; align-items: center; min-height: 82px; width: 100%; padding: 8px 10px; gap: 4px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-align: start; }
@media (hover: hover) and (pointer: fine) { .carte-tile.measure-tile:hover { border-color: var(--accent); } }
.carte-tile.is-empty { background: var(--surface-soft); }
.carte-tile-head { display: grid; gap: 1px; align-self: start; min-width: 0; }
.carte-tile-title { font-family: var(--font-display); font-size: var(--text-sm); line-height: 1.15; font-weight: 700; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.carte-tile-sub { font-family: var(--font-text); font-size: var(--text-sm); line-height: 1.2; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carte-tile .meter { height: 10px; margin: 0; }
.carte-tile-empty-axis { display: block; height: 10px; border-bottom: 1px dashed var(--line); }
.carte-tile-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; font-variant-numeric: tabular-nums; min-width: 0; }
.carte-tile-ratio { font-family: var(--font-display); font-size: var(--text-sm); line-height: 1.15; font-weight: 800; color: var(--accent); white-space: nowrap; }
.carte-tile.is-empty .carte-tile-ratio { color: var(--muted); font-weight: 600; font-size: var(--text-sm); }
.carte-tile-meta { font-size: var(--text-sm); line-height: 1.2; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.felder-sheet .sheet-body { display: grid; gap: 12px; padding-bottom: 12px; }
.sheet-translated-label { font-family: var(--font-text); font-size: var(--text-sm); color: var(--muted); margin: 0; }
.sheet-overview { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); display: grid; gap: 6px; }
.sheet-overview-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 8px; font-size: var(--text-sm); line-height: 1.25; font-variant-numeric: tabular-nums; }
.sheet-overview-row strong { font-size: calc(14px * var(--type-scale-capped)); color: var(--accent); }
.sheet-overview-row span { flex: 1 1 12em; min-width: 0; text-align: end; white-space: normal; overflow-wrap: anywhere; }
.sheet-overview .meter { height: 11px; margin: 2px 0 0; }
.sheet-parts-counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.sheet-part-count { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-xs); background: var(--surface); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.sheet-part-count strong { font-size: var(--text-sm); color: var(--ink); text-align: end; }
.felder-practice { width: 100%; min-height: 44px; }
.sheet-part { display: grid; gap: 4px; }
.sheet-part-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 4px; font-size: var(--text-sm); line-height: 1.25; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.sheet-lz-list { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.sheet-lz-item { padding: 8px 10px; display: grid; gap: 3px; }
.sheet-lz-item + .sheet-lz-item { border-top: var(--hairline) solid var(--line); }
.sheet-lz-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: var(--text-sm); line-height: 1.2; font-variant-numeric: tabular-nums; }
.lz-aufgabe { color: var(--muted); font-weight: 600; }
.lz-text { font-family: var(--font-text); font-size: var(--text-sm); line-height: 1.4; color: var(--ink); margin: 0; }
[data-large-type="true"] .carte-grid, [data-large-type="true"] .sheet-parts-counts { grid-template-columns: minmax(0, 1fr); }
/* E3 : examen DTZ en parties (exam.js) et résultat par niveaux (results.js). */
.exam-parts-stepper { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.exam-part-pill { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-family: var(--font-display); font-size: var(--text-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
.exam-part-pill[data-part-status="current"] { border-color: var(--ink); color: var(--ink); font-weight: 750; background: var(--surface-soft); }
.exam-part-pill[data-part-status="done"] { border-color: var(--accent); color: var(--accent); font-weight: 650; }
.exam-part-pill-meta { font-size: var(--text-sm); color: var(--muted); font-weight: 500; }
.dtz-stimulus-card, .dtz-task-card, .dtz-grid-card { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 10px; }
.dtz-instructions { margin: 0; font-size: var(--text-sm); color: var(--muted); line-height: 1.45; }
.dtz-prompt { margin: 0; font-size: var(--text-base); color: var(--ink); line-height: 1.5; white-space: pre-line; }
.dtz-leitpunkte { margin: 4px 0 0; padding-inline-start: 20px; display: grid; gap: 4px; font-size: var(--text-sm); color: var(--ink); }
.dtz-task-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.dtz-task-tab { min-height: 44px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius-xs); background: var(--surface); color: var(--ink); font-family: var(--font-display); font-size: var(--text-sm); font-weight: 650; }
.dtz-task-tab[aria-pressed="true"] { border-color: var(--ink); background: var(--surface-soft); font-weight: 800; }
.dtz-draft-input { width: 100%; min-height: 96px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); color: var(--ink); font-family: var(--font-text); font-size: var(--text-sm); line-height: 1.45; resize: vertical; }
.dtz-criteria-list { display: grid; gap: 10px; }
.dtz-criterion-row { display: grid; gap: 6px; padding-top: 8px; border-top: var(--hairline) solid var(--line); }
.dtz-criterion-row:first-child { border-top: 0; padding-top: 0; }
.dtz-criterion-label { font-size: var(--text-sm); font-weight: 600; color: var(--ink); }
.dtz-level-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.dtz-level-btn { min-height: 44px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius-xs); background: var(--surface); color: var(--ink); font-family: var(--font-display); font-size: var(--text-sm); font-weight: 700; text-align: center; }
.dtz-level-btn[aria-pressed="true"] { border: 2px solid var(--ink); background: var(--surface-soft); color: var(--accent); font-weight: 800; }
.dtz-models-details summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-family: var(--font-display); font-size: var(--text-sm); font-weight: 650; color: var(--accent); }
.dtz-model-block { padding: 10px 12px; margin-top: 8px; border-radius: var(--radius-xs); background: var(--surface-soft); display: grid; gap: 6px; }
.dtz-model-text { margin: 0; font-size: var(--text-sm); line-height: 1.5; white-space: pre-line; }
.dtz-declare-status { margin: 0 0 8px; font-size: var(--text-sm); color: var(--muted); line-height: 1.4; }
.dtz-draft-input[readonly] { color: var(--muted); }
.dtz-main { display: flex; flex-direction: column; gap: 10px; }
.dtz-hero.readiness { position: relative; overflow: hidden; min-height: 0; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--hero-border); display: block; background: var(--navy); color: var(--foam); }
.dtz-hero-copy { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 4px; max-width: calc(100% - 76px); padding-inline-end: 4px; }
.dtz-hero-eyebrow { margin: 0; font-size: var(--text-sm); line-height: 1.25; color: var(--hero-muted); font-weight: 600; }
.dtz-hero-verdict { margin: 0; font-family: var(--font-display); font-weight: 800; letter-spacing: -.015em; color: var(--foam); }
.dtz-hero-verdict[data-b1="true"] { font-size: calc(68px * var(--type-scale-capped)); line-height: 0.96; letter-spacing: -.02em; margin-block: 2px; }
.dtz-hero-verdict[data-b1="false"] { font-size: calc(26px * var(--type-scale-capped)); line-height: 1.08; }
.dtz-hero-note { margin: 0; font-family: var(--font-text); font-size: var(--text-sm); line-height: 1.32; color: var(--hero-muted); }
.dtz-hero .signature-din { position: absolute; z-index: 0; inset-inline-end: -16px; bottom: -36px; width: 84px; height: 119px; fill: none; stroke: var(--hero-ring); stroke-width: 1; pointer-events: none; }
.dtz-hero .signature-din .din-subject { stroke-width: 1.5; }
.dtz-group { margin: 0; }
.dtz-group > h2 { margin: 0 12px 4px; font-size: var(--text-sm); line-height: 1.3; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.dtz-group .group-rows { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.skill-row { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 10px 14px; position: relative; }
.skill-row + .skill-row::before { content: ""; position: absolute; inset-inline: 14px 0; top: 0; height: var(--hairline); background: var(--line); }
.skill-row.is-measured { padding-bottom: 24px; }
.skill-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.skill-title-wrap { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 8px; min-width: 0; }
.skill-name { font-family: var(--font-display); font-size: var(--text-base); font-weight: 750; color: var(--ink); line-height: 1.2; }
.skill-mode { font-family: var(--font-text); font-size: var(--text-sm); color: var(--muted); line-height: 1.2; font-variant-numeric: tabular-nums; }
.skill-score { font-family: var(--font-display); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.skill-level { font-family: var(--font-display); font-size: calc(24px * var(--type-scale-capped)); font-weight: 800; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; flex-shrink: 0; }
.skill-level[data-level="B1"] { color: var(--accent); }
.skill-level[data-level="unter A2"] { font-size: calc(18px * var(--type-scale-capped)); color: var(--bad); }
.declared-scale { position: relative; height: 10px; display: flex; align-items: center; }
/* physical: result scales (results.js inline left:%) stay left to right, see .meter-fill. */
.declared-track { position: absolute; left: 0; right: 0; bottom: 2px; border-bottom: 1px dashed var(--line); } /* physical */
.declared-fill { position: absolute; left: 0; bottom: 2px; border-bottom: 2.5px dashed var(--muted); } /* physical */
.skill-row[data-level="B1"] .declared-fill { border-bottom-color: var(--accent); }
.skill-row[data-level="unter A2"] .declared-fill { border-bottom-color: var(--bad); }
.declared-cursor { position: absolute; bottom: -2px; width: 0; height: 10px; border-left: 2px dashed var(--ink); transform: translateX(-50%); } /* physical */
.measured-scale-wrap { position: relative; padding-top: 2px; }
.measured-scale-wrap .meter { height: 14px; margin-block: 2px 0; }
.measured-scale-wrap .meter-threshold { bottom: -5px; height: 19px; border-left: 1.5px solid var(--ink); } /* physical */
.measured-scale-wrap .meter-threshold > span { top: 19px; right: auto; left: 0; transform: translateX(-50%); white-space: nowrap; font-family: var(--font-display); font-size: var(--text-sm); font-weight: 650; font-variant-numeric: tabular-nums; color: var(--muted); } /* physical */
.scale-bounds { display: flex; justify-content: space-between; font-family: var(--font-display); font-size: var(--text-sm); font-variant-numeric: tabular-nums; color: var(--muted); line-height: 1; margin-top: 4px; }
.for-b1-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 10px 14px; min-height: 46px; }
.for-b1-label { font-family: var(--font-display); font-size: var(--text-sm); font-weight: 700; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.for-b1-value { font-family: var(--font-display); font-size: var(--text-sm); font-weight: 700; color: var(--ink); text-align: end; font-variant-numeric: tabular-nums; line-height: 1.25; }
.for-b1-row[data-missing="true"] .for-b1-value { color: var(--bad); }
.for-b1-row[data-missing="false"] .for-b1-value { color: var(--good); }
.rule-trigger.group-row { min-height: 50px; padding: 8px 14px; gap: 10px; position: relative; }
.rule-trigger.group-row::before { content: ""; position: absolute; inset-inline: 14px 0; top: 0; height: var(--hairline); background: var(--line); }
.rule-trigger .row-title { font-size: var(--text-sm); font-weight: 650; color: var(--ink); }
.rule-trigger .row-detail { font-size: var(--text-sm); color: var(--muted); line-height: 1.3; }
.rule-sheet-body { display: grid; gap: 12px; padding-bottom: 8px; }
.rule-sheet-meta { margin: 0; font-family: var(--font-display); font-size: var(--text-sm); font-weight: 650; color: var(--muted); font-variant-numeric: tabular-nums; }
.rule-quote { margin: 0; padding: 12px 14px; border-inline-start: 3px solid var(--accent); background: var(--surface-soft); border-radius: var(--radius-xs); font-family: var(--font-text); font-size: var(--text-sm); line-height: 1.5; color: var(--ink); }
.rule-sheet-scale { margin: 0; font-family: var(--font-display); font-size: var(--text-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
/* E2 */
.audio-player { margin: 16px 0 20px; padding: 14px 16px; background: var(--surface-soft); border: 1px solid var(--line); border-inline-start: 3px solid var(--accent); border-radius: var(--radius-sm); display: grid; gap: 10px; }
.audio-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; font-size: var(--text-sm); color: var(--muted); }
.audio-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.audio-situation { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border: 1px solid var(--line); border-radius: var(--radius-xs); background: var(--surface); color: var(--ink); font-family: var(--font-display); font-size: var(--text-sm); font-weight: 650; }
.audio-title { font-family: var(--font-text); font-size: var(--text-sm); color: var(--muted); }
.audio-plays { font-family: var(--font-display); font-size: var(--text-sm); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.audio-reading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-xs); background: var(--surface); font-family: var(--font-display); font-size: var(--text-sm); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.audio-controls { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.audio-play { min-width: 44px; min-height: 44px; padding: 8px 14px; }
.audio-progress { min-height: 44px; display: flex; align-items: center; cursor: pointer; border-radius: var(--radius-xs); }
.audio-progress[aria-disabled="true"] { cursor: not-allowed; opacity: .6; }
.audio-progress .meter { width: 100%; margin: 0; }
.audio-time { font-family: var(--font-display); font-size: var(--text-sm); font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.audio-status { font-size: var(--text-sm); color: var(--muted); }
.audio-status.audio-error { padding: 8px 10px; border: 1px solid var(--bad); border-radius: var(--radius-xs); background: var(--bad-bg); color: var(--bad); }
.audio-transcript { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-inline-start: 2px solid var(--muted); border-radius: var(--radius-xs); background: var(--surface); color: var(--ink); font-family: var(--font-text); font-size: var(--text-sm); line-height: 1.5; }
.audio-transcript-title { font-family: var(--font-display); font-size: var(--text-sm); font-weight: 650; color: var(--muted); margin-bottom: 6px; }
.audio-transcript-line + .audio-transcript-line { margin-top: 6px; }
/* /E2 */
/* E7 : lecture vocale (audio.js, option d'app « speech »). */
.speech-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.question-title + .speech-controls { margin: -12px 0 20px; }
.speech-explanation { margin-top: 12px; }
.speech-play, .speech-rate { min-width: 44px; min-height: 44px; padding: 8px 14px; }
.speech-play[aria-pressed="true"] { border-color: var(--accent); }
.speech-rate { font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.speech-missing { flex-basis: 100%; margin: 0; }
/* /E7 */
/* E4 : Schreiben (schreiben.js), feuille de saisie, contrôles mécaniques, modèles commentés. */
.e4-screen { display: flex; flex-direction: column; gap: 10px; }
.e4-body, .e4-review { display: grid; gap: 10px; }
.e4-sheet { position: relative; padding-left: 24px; } /* physical: DIN fold marks stay in the left margin */
/* physical: fold marks sit in the left margin of a DIN 5008 sheet, a German document in every language. */
.e4-sheet::before, .e4-sheet::after { content: ""; position: absolute; left: 8px; width: 8px; border-top: 1px solid var(--muted); } /* physical */
.e4-sheet::before { top: 35.35%; }
.e4-sheet::after { top: 70.7%; }
.e4-leitpunkte { list-style: decimal; }
.e4-input { min-height: 220px; font-size: var(--text-base); line-height: 1.5; background: var(--surface); }
.e4-count { margin: 0; font-family: var(--font-display); font-size: var(--text-sm); font-variant-numeric: tabular-nums; color: var(--muted); }
.e4-checks, .e4-models { display: grid; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.e4-heading { margin: 0; font-family: var(--font-display); font-size: var(--text-sm); font-weight: 700; color: var(--muted); }
.e4-check-list { margin: 0 0 4px; padding: 0; list-style: none; display: grid; }
.e4-check { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; align-items: start; padding: 8px 0; border-top: var(--hairline) solid var(--line); }
.e4-check:first-child { border-top: 0; }
.e4-mark { display: flex; align-items: center; justify-content: center; min-height: 20px; color: var(--accent); }
.e4-mark svg { stroke: currentColor; fill: none; stroke-width: 2; }
.e4-check[data-status="missing"] .e4-mark::before { content: ""; width: 12px; border-top: 1.5px solid var(--ink); }
.e4-check[data-status="warning"] .e4-mark::before { content: ""; width: 12px; border-top: 1.5px dashed var(--muted); }
.e4-check-copy { display: grid; gap: 2px; }
.e4-check-label { font-size: var(--text-sm); color: var(--ink); line-height: 1.35; }
.e4-check-detail { font-size: var(--text-sm); color: var(--muted); line-height: 1.35; }
.e4-check[data-status="missing"] .e4-check-detail { color: var(--ink); font-weight: 600; }
.e4-model { display: grid; gap: 6px; padding-top: 10px; border-top: var(--hairline) solid var(--line); }
.e4-model-level { margin: 0; font-family: var(--font-display); font-size: var(--text-lg); font-weight: 800; line-height: 1; color: var(--ink); }
.e4-model-text { margin: 0; font-size: var(--text-sm); line-height: 1.6; white-space: pre-line; color: var(--ink); }
.e4-note { background: var(--accent-soft); color: var(--ink); border-bottom: 1.5px solid var(--accent); cursor: pointer; }
.e4-note[aria-expanded="true"] { background: var(--accent); color: var(--on-accent); }
.e4-note:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.e4-comment { margin: 0; padding: 8px 10px; border-inline-start: 2px solid var(--accent); font-size: var(--text-sm); line-height: 1.45; color: var(--muted); }
/* E5 : Sprechen (sprechen.js) */
.sprechen-screen { display: grid; gap: 10px; max-width: 720px; margin-inline: auto; }
.sprechen-screen .large-title { margin: 0; }
.sprechen-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin-bottom: 0; }
.sprechen-tabs .dtz-task-tab { padding: 6px 4px; font-variant-numeric: tabular-nums; }
.sprechen-task { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.dtz-task-card > .sprechen-task { padding: 0; border: 0; background: none; }
.sprechen-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sprechen-teil { font-family: var(--font-display); font-size: var(--text-sm); font-weight: 750; color: var(--ink); }
.sprechen-meta { font-size: var(--text-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
.sprechen-sheet { position: relative; padding: 0 12px 0 18px; border: 1px solid var(--line); border-radius: var(--radius-xs); background: var(--surface); } /* physical: extra inset stays on the left for the DIN fold marks */
/* physical: same DIN sheet margin marks, on the left, as on paper. */
.sprechen-sheet::before, .sprechen-sheet::after { content: ''; position: absolute; left: 0; width: 7px; border-top: 1px solid var(--muted); } /* physical */
.sprechen-sheet::before { top: 33.3%; }
.sprechen-sheet::after { top: 50%; width: 4px; }
.sprechen-sheet summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-family: var(--font-display); font-size: var(--text-sm); font-weight: 650; color: var(--accent); }
.sprechen-sheet-text { margin: 0 0 12px; font-size: var(--text-sm); line-height: 1.5; white-space: pre-line; color: var(--ink); }
.sprechen-photo { margin: 0; display: grid; gap: 4px; }
.sprechen-photo img { display: block; width: 100%; height: auto; border-radius: var(--radius-xs); }
.sprechen-photo figcaption { font-size: var(--text-sm); color: var(--muted); }
.sprechen-pending { margin: 0; padding: 8px 10px; border: 1px dashed var(--line); border-radius: var(--radius-xs); font-size: var(--text-sm); color: var(--muted); }
.sprechen-clock { display: grid; gap: 6px; padding-top: 10px; border-top: var(--hairline) solid var(--line); }
.sprechen-clock-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: var(--text-sm); color: var(--muted); }
.sprechen-clock-label { font-family: var(--font-display); font-weight: 650; }
.sprechen-clock-value { font-family: var(--font-display); font-size: calc(44px * var(--type-scale-capped)); line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }
.sprechen-rec { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 650; color: var(--muted); }
.sprechen-rec-mark { width: 8px; height: 8px; border-radius: 0; background: var(--muted); }
.sprechen-rec[data-recording="true"] { color: var(--bad); }
.sprechen-rec[data-recording="true"] .sprechen-rec-mark { background: var(--bad); }
.sprechen-mic { margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-xs); font-size: var(--text-sm); line-height: 1.4; color: var(--ink); }
.sprechen-actions, .sprechen-take-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sprechen-actions .button { flex: 1 1 auto; }
.sprechen-take.audio-player { margin: 0; }
.sprechen-take .audio-status { margin: 0; }
.sprechen-take-actions .button { min-height: 44px; padding: 8px 12px; font-size: var(--text-sm); }
.sprechen-followup { display: grid; gap: 4px; }
.sprechen-followup-title, .sprechen-models-title { margin: 0; font-family: var(--font-display); font-size: var(--text-sm); font-weight: 700; color: var(--muted); }
.sprechen-models { display: grid; gap: 8px; }
.sprechen-model.dtz-model-block { margin-top: 0; }
.sprechen-model-level { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 800; line-height: 1; color: var(--accent); }
mark.sprechen-span { background: none; color: inherit; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sprechen-notes { margin: 0; padding-inline-start: 18px; display: grid; gap: 6px; font-size: var(--text-sm); line-height: 1.4; }
.sprechen-note-span { display: block; color: var(--ink); }
.sprechen-note-comment { display: block; color: var(--muted); }
.sprechen-footer:empty { display: none; }
/* /E5 */

/* Right-to-left interface for every RTL_LOCALES language. html[dir] is set by the router.
   Exam and bank text carry their own dir (embedLang in shared.js). --inline-sign flips slide motion.
   Directional icons opt in with data-mirror; checks, crosses, gears and playback stay unflipped. */
:root[dir="rtl"] { --inline-sign: -1; }
:root[dir="rtl"] [dir="ltr"],
:root[dir="rtl"] [dir="rtl"] { unicode-bidi: isolate; }
:root[dir="rtl"] :is(.timer, [role="timer"], .result-score, .audio-time, .measure-counts, .skill-score, .home-measure strong, .readiness-measures strong, .meter, .scale-bounds, .for-b1-value, .section-percent, .sheet-part-count strong, .question-count, .section-count, .sprechen-clock-value, .plan-labels time, .result-topic-score) {
  direction: ltr; unicode-bidi: isolate; font-feature-settings: "locl" 0;
}
:root[dir="rtl"] [data-mirror] { scale: -1 1; }
/* physical: the back control moves to the other device edge, so the notch inset follows that edge. */
:root[dir="rtl"] .nav-back { inset-inline-start: max(4px, var(--safe-right)); }
/* physical: the DIN mark is drawn in the left half of its box and is mirrored so it stays in the corner. */
:root[dir="rtl"] .signature-din { transform: scaleX(-1); }
/* Stradipass E3: reading the Italian statement (touchable words, trap phrases, help language). */
.translation-bubble { display: block; }
.translation-choice { overflow-wrap: anywhere; }
.translation-bubble:empty, .translation-correction:empty { display: none; }
.question-title .question-term { text-decoration: underline dotted var(--muted); text-underline-offset: 3px; }
.question-title .question-trap { text-decoration: underline solid var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.translation-help .term-tooltip { max-width: 100%; }
.term-tooltip [lang], .trap-sheet [lang], .trap-keywords [lang] { font-style: normal; }
.term-tooltip :is(.term-it, .term-note, .trap-example) { display: block; }
.term-tooltip .term-note { margin-top: 4px; }
.trap-example { display: block; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.trap-example > :is(span, strong) { display: block; }
.trap-example-label { color: var(--muted); font-size: var(--text-sm); }
.trap-sheet { display: grid; gap: 16px; }
.trap-item { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.trap-item:last-child { padding-bottom: 0; border-bottom: 0; }
.trap-item h3 { margin: 0 0 4px; font-size: var(--text-base); }
.trap-item p { margin: 0 0 4px; }
.trap-item .term-translation { color: var(--muted); }
.trap-keywords { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.trap-keywords-title { margin: 0 0 6px; }
.trap-keywords ul { margin: 0; padding-inline-start: 1.25rem; display: grid; gap: 6px; }
.trap-keywords .term-note { display: block; color: var(--muted); }
.translation-correction .translation-explanation { margin-top: 12px; }
.translation-explanation-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; text-align: start; }
.help-language-sheet .group-action { text-align: start; }
:is(.help-language-sheet, .country-screen) .group-row[aria-pressed="true"] { border-inline-start: 3px solid var(--accent); background: var(--accent-soft); }
/* An open word bubble keeps 8 px from the row of commands below it. */
.translation-bubble .term-tooltip { margin-block-end: 8px; }
/* No command and no text for this question: the empty help takes no room. */
.translation-help.translation-help-empty { margin-block: 0; }

/* Fluidity: action always in reach, compact answers, exam intro and header. */
/* Session action bar stays at the bottom of the screen; in flow, so the content above never ends under it. */
[data-shell="native"] :is(.question-screen, .exam-screen) .question-actions {
  position: sticky; bottom: 0; z-index: 3;
  padding-block: 12px calc(13px + var(--safe-bottom));
  background: var(--surface); border-top: var(--hairline) solid var(--line);
}
[data-shell="native"][data-tabbar="true"] :is(.question-screen, .exam-screen) .question-actions { bottom: var(--tabbar-h); padding-bottom: 12px; }
[data-shell="native"] .exam-layout .question-actions + .keyboard-hint { margin-top: 12px; }
/* Keyboard focus moved into the content is never hidden by the bar. */
[data-shell="native"]:has(.exam-screen .question-actions) { scroll-padding-bottom: calc(96px + var(--safe-bottom)); }
/* Answer cards: 52 px target, letter on the first line of text, status shown only when it says something. */
.answer { align-items: start; min-height: 52px; padding-block: 10px; }
.answer-number { margin-block-start: max(0px, calc((var(--text-base) * 1.4 - 28px) / 2)); }
.answer-status { display: none; }
.answer.correct .answer-status, .answer.wrong .answer-status { display: block; }
/* Selection already shows as the filled letter and the ink border, and aria-pressed/aria-checked carries it; the label stays in the DOM, visually hidden. */
.answer.selected .answer-status { display: block; position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.answers-images .answer-number { margin-block-start: 0; }
[data-large-type="true"] .answer-number { margin-block-start: max(0px, calc((var(--text-base) - var(--text-xs)) * .7)); }
/* Exam intro: filled start button under the facts, profile details folded in one row. */
.exam-profile-sheet .exam-start.group-action { display: flex; width: 100%; min-height: 52px; margin: 16px 0 0; color: var(--on-accent); text-align: center; }
.exam-profile .exam-start.group-action { display: flex; width: calc(100% - 32px); min-height: 52px; margin: 4px 16px 12px; color: var(--on-accent); text-align: center; }
.exam-details { border-top: var(--hairline) solid var(--line); }
.exam-details-summary { color: var(--ink); font-size: calc(17px * var(--type-scale-capped)); }
.exam-details-rows .exam-info .row-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; font-size: calc(15px * var(--type-scale-capped)); }
/* Running exam header: title (two lines at most) beside the timer, topic on one line; full text in the title attribute. */
.exam-title { min-width: 0; flex: 1; }
.exam-screen .exam-heading { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.exam-screen .exam-topic { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-shell="native"] .exam-screen .exam-header { align-items: center; margin-bottom: 12px; }
[data-shell="native"] .exam-screen .exam-heading { margin-top: 0; }
[data-shell="native"] .exam-screen .timer-wrap { display: flex; align-items: center; gap: 6px; }
[data-shell="native"] .exam-screen .timer { line-height: 1.2; }
[data-shell="native"] .timer-label-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[data-large-type="true"] .exam-screen .exam-heading, [data-large-type="true"] .exam-screen .exam-topic { white-space: normal; overflow-wrap: anywhere; }
[data-large-type="true"] .exam-screen .exam-heading { display: block; -webkit-line-clamp: none; line-clamp: none; overflow: visible; }
.exam-details-rows > .exam-preface + .exam-info { border-top: var(--hairline) solid var(--line); }

/* Fluidity B: one-line session header (exit · gauge · n/N), question without a nested card, discreet meta line, short pairs side by side. */
.question-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.question-top .session-scale { flex: 1; min-width: 0; margin-block: 0; }
.question-exit { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin-inline-start: -10px; color: var(--ink); border-radius: var(--radius-sm); }
.question-count { flex: 0 0 auto; font-family: var(--font-display); font-size: var(--text-sm); font-weight: 650; color: var(--muted); font-variant-numeric: tabular-nums; }
.question-screen .question-panel { margin-top: 0; padding: 0; background: none; border: 0; border-radius: 0; }
.question-screen .question-meta { font-size: var(--text-sm); margin-top: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.question-screen .question-panel > .eyebrow + .question-meta { margin-top: 4px; }
.question-screen .question-title { margin-top: 8px; }
[data-large-type="true"] .question-screen .question-meta { white-space: normal; overflow-wrap: anywhere; }
[data-shell="native"] .question-screen .question-actions { background: var(--bg); }
.answers-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.answers-pair .answer { justify-content: center; text-align: center; }
.answers-pair .answer-content { min-width: 0; overflow-wrap: anywhere; }

/* Longer lists share the header between the source and session scale. */
.question-list .question-top {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "exit meta count" "exit scale count"; gap: 0 8px;
}
.question-list .question-top:has(.photo-ready) {
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  grid-template-areas: "photo exit meta count" "photo exit scale count";
}
.question-passage {
  display: block; margin-block-start: 4px;
  font: inherit; font-weight: 500;
  -webkit-hyphens: auto; hyphens: auto;
}
.question-list .photo-question { grid-area: photo; }
.question-list .question-exit { grid-area: exit; }
.question-list .question-count { grid-area: count; }
.question-list .question-meta { grid-area: meta; align-self: end; }
.question-list .session-scale { grid-area: scale; align-self: start; }
.question-screen.question-list .question-actions:has(> .fine-print:not(.keyboard-hint)) {
  display: flex; flex-wrap: wrap; gap: 4px 8px;
}
.question-list .question-actions > .fine-print:not(.keyboard-hint) { flex: 1 1 12ch; }
.question-list .question-actions:has(> .fine-print:not(.keyboard-hint)) .button { width: auto; flex: 1 1 10ch; }
@media (max-width: 899px) {
  .question-list .answers { display: flex; flex-wrap: wrap; gap: 2px 6px; }
  .question-list .answers .answer {
    flex: 1 1 max-content; width: auto; max-width: 100%;
    display: block; min-height: 44px; padding: 1px 6px;
    text-align: start; -webkit-hyphens: auto; hyphens: auto;
  }
  .question-list .answer-number {
    display: inline-grid; width: 1.3em; height: 1.3em; margin-inline-end: 5px;
    line-height: 1; vertical-align: baseline;
  }
  [data-shell="native"] .question-list .question-actions { margin-top: 4px; padding-block: 2px max(2px, var(--safe-bottom)); }
}
/* Wide web shell (desktop PWA): the question, index, module choice and
   purchase screens sit in the same centred column as the home dashboard, and
   the footer aligns with main instead of the viewport's left edge. The web
   shell only exists at 900 px and wider (see router.js), so phone, tablet and
   native shells keep their current layout; the column widths are the
   existing ones. */
@media (min-width: 900px) {
  [data-shell="web"] .question-screen { max-width: 820px; margin-inline: auto; }
  [data-shell="web"] .study-index, [data-shell="web"] .exam-index { max-width: 720px; margin-inline: auto; }
  [data-shell="web"] .module-screen { max-width: 720px; margin-inline: auto; }
  [data-shell="web"] .store-screen { max-width: 42rem; margin-inline: auto; }
  [data-shell="web"] .site-footer { max-width: 1120px; margin-inline: auto; clear: both; }
}

/* Clarity: three tabs, topic tiles, exam tiles, module pill and segmented controls. */
/* Home overline: the exam above the Pass name, plain text with one exam, a bare button with a chevron with several. */
.module-pill { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: start; }
.module-pill svg { transform: rotate(90deg); flex: 0 0 auto; }
.home-context.exam-overline { color: var(--accent); font: 750 var(--text-sm)/1.25 var(--font-display); }
.home-dashboard .home-context.exam-overline { color: var(--amb-highlight, var(--photo-accent)); }
.module-sheet { display: grid; gap: 16px; }
/* « Changer d'examen »: the country's exams as cards, real figures, a check on the current one. */
.exam-sheet { background: var(--bg); }
.exam-sheet .sheet-heading { justify-content: space-between; align-items: center; gap: 12px; padding-inline: 0; margin-bottom: 12px; }
.exam-sheet .sheet-heading h2 { text-align: start; padding-block: 6px; font: 800 var(--text-lg)/1.2 var(--font-display); }
.exam-sheet .sheet-done { flex: none; min-width: 44px; min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--accent); font: 750 var(--text-base)/1 var(--font-display); }
.exam-cards { display: grid; gap: 10px; }
.exam-card { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; text-align: start; }
.exam-card[aria-current="true"] { border: 2px solid var(--accent); padding: 13px 15px; }
.exam-card-copy { flex: 1; min-width: 0; display: grid; gap: 8px; }
.exam-card-title { font: 800 var(--text-base)/1.25 var(--font-display); overflow-wrap: anywhere; }
.exam-card-facts { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.exam-fact { display: grid; align-content: start; }
.exam-fact strong { font: 800 var(--text-lg)/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.exam-fact span { color: var(--muted); font-size: var(--text-sm); }
.exam-card-mark { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid var(--line); border-radius: var(--radius-sm); }
.exam-card[aria-current="true"] .exam-card-mark { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.exam-sheet .module-sheet-parameters { border-radius: var(--radius); background: var(--surface); }
.exam-sheet .exam-sheet-note { margin: 0; font-size: var(--text-sm); }
.ui-language-label { min-height: 0; padding-block-end: 0; }
.ui-language-label .row-title { color: var(--muted); font-size: var(--text-sm); }
.topics-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
@media (min-width: 700px) { .topics-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
[data-large-type="true"] .topics-list { grid-template-columns: minmax(0, 1fr); }
.topic-tile { display: flex; flex-direction: column; min-height: 56px; overflow: hidden; background: var(--surface); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.topic-tile-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; font-size: calc(17px * var(--type-scale-capped)); font-weight: 700; line-height: 1.3; }
.topic-tile-detail { display: block; font-size: calc(15px * var(--type-scale-capped)); color: var(--muted); font-variant-numeric: tabular-nums; }
/* Topic photo in two tones, as the plates: grey photograph, shadows in the Pass navy; no photo, plain navy. */
.topic-tile-photo { position: relative; display: block; flex: none; aspect-ratio: 16 / 9; overflow: hidden; isolation: isolate; background: var(--navy); }
.topic-tile-photo .pass-photo { position: absolute; inset: 0; }
.topic-tile-photo img { filter: grayscale(1) contrast(1.08); }
.topic-tile-photo:has(.photo-ready)::after { content: ''; position: absolute; inset: 0; background: var(--navy); mix-blend-mode: lighten; }
[data-theme="dark"] .topic-tile-photo img { filter: grayscale(1) contrast(1.08) brightness(.82); }
.topic-tile-body { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; padding: 10px 12px 12px; }
.topic-tile-body .topic-tile-title { flex: none; min-height: calc(2 * var(--action-leading, 23px) * var(--type-scale-capped)); margin-bottom: 4px; }
.topic-tile-body .meter { margin-block: auto 4px; }
.topic-tile-state { font: 700 var(--text-sm)/1.3 var(--font-text); color: var(--accent); font-variant-numeric: tabular-nums; }
.topic-tile[data-status="new"] .topic-tile-state { color: var(--muted); }
.topic-tile[data-status="solid"] .topic-tile-state, .topic-tile[data-status="solid"] .meter { color: var(--good); }
.topic-tile-errors { font: 650 var(--text-sm)/1.3 var(--font-text); color: var(--bad); }
.topics-summary { margin: 4px 0 0; color: var(--muted); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.topics-resume { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 200px; margin-top: 16px; overflow: hidden; isolation: isolate; border-radius: var(--radius); background: var(--photo-surface); color: white; text-decoration: none; }
.topics-resume-photo { position: absolute; inset: 0; z-index: -1; }
.topics-resume-photo .pass-photo { position: absolute; inset: 0; }
.topics-resume-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, var(--photo-surface) 18%, color-mix(in srgb, var(--photo-surface) 20%, transparent) 78%); }
.topics-resume-copy { display: grid; gap: 2px; padding: 56px 16px 14px; }
.topics-resume-eyebrow { font: 800 var(--text-sm)/1.2 var(--font-display); color: var(--photo-accent); }
.topics-resume-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; font: 800 calc(26px * var(--type-scale-capped))/1.15 var(--font-display); overflow-wrap: anywhere; }
:is(.topic-tile-detail, .topics-resume-facts) .fact { white-space: nowrap; }
/* A Latin bank title in an RTL interface keeps the alignment of the screen. */
:root[dir="rtl"] :is(.topic-tile-title, .topics-resume-title)[dir="ltr"] { text-align: end; }
.topics-resume .meter { --muted: white; color: var(--photo-accent); margin-block: 8px 4px; }
.topics-resume-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.topics-resume-facts { flex: 1 1 10em; font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.topics-resume-go { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: var(--radius-sm); background: var(--photo-accent); color: var(--photo-surface); font: 800 var(--text-sm)/1 var(--font-display); }
.topics-shortcuts { margin-top: 12px; }
.topics-shortcuts .group-row { min-height: 48px; padding-block: 6px; }
.segmented { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.segmented .segment { min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font-size: calc(15px * var(--type-scale-capped)); font-weight: 600; }
.segmented .segment[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.segmented.section-segmented { flex-wrap: nowrap; }
.segmented.section-segmented .segment { flex: 1 1 0; min-width: 0; }
.segmented.section-pills { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.segmented.section-pills::-webkit-scrollbar { display: none; }
.segmented.section-pills .segment { flex: 0 0 auto; white-space: nowrap; }
.segmented-control { display: flex; flex-wrap: nowrap; gap: 2px; margin: 8px; padding: 2px; background: var(--surface-soft); border-radius: var(--radius-sm); }
.segmented-control .segment-option { position: relative; flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 4px; border: 0; border-radius: var(--radius-xs); background: transparent; color: var(--muted); font-size: calc(15px * var(--type-scale-capped)); font-weight: 600; text-align: center; cursor: pointer; }
.segmented-control .segment-option:has(:checked) { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.segmented-control .segment-option:has(:focus-visible) { outline: 3px solid var(--focus); outline-offset: -3px; }
.segmented-control .segment-label { min-width: 0; overflow-wrap: anywhere; }
.group-row:has(> .row-value) .row-copy { flex: 1 1 0; }
.study-settings .group-row:has(> .row-value) .row-copy { flex: 0 0 auto; }
.study-settings .group-row:has(> .row-value) .row-title { white-space: nowrap; }
.group-row > .row-value { flex: 0 1 auto; max-width: 60%; min-width: 0; margin-inline-start: auto; text-align: end; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; font-size: calc(15px * var(--type-scale-capped)); color: var(--muted); }
[data-large-type="true"] .group-row > .row-value { white-space: normal; text-align: start; }
[data-large-type="true"] .study-settings .group-row:has(> .row-value) .row-copy { flex: 0 1 auto; }
[data-large-type="true"] .study-settings .group-row:has(> .row-value) .row-title { white-space: normal; }
.topic-actions { display: grid; gap: 8px; margin-block: 16px 24px; }
.topic-actions .button { width: 100%; min-height: 52px; font-size: calc(17px * var(--type-scale-capped)); }
.topic-lesson { min-height: 56px; }
.topic-stats { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 12px 0 0; }
.topic-stat { display: grid; }
.topic-stat strong { font: 900 calc(26px * var(--type-scale-capped))/1.1 var(--font-display); font-variant-numeric: tabular-nums; color: var(--photo-accent); }
.topic-stat span { font-size: var(--text-sm); }
:root[dir="rtl"] .topic-stat strong { direction: ltr; unicode-bidi: isolate; text-align: end; }
/* The body covers the photo from the opening down, edge to edge. */
.topic-page .topic-body { padding-block: 16px 8px; border-image: linear-gradient(var(--bg), var(--bg)) fill 0 / / 0 100vmax 100vmax; }
.topic-chapters { position: relative; display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.topic-chapters::before { content: ''; position: absolute; inset-inline-start: 15px; inset-block: 28px; border-inline-start: 2px dashed var(--line); }
.topic-chapters .topic-lesson { position: relative; display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; }
.topic-lesson-dot { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--muted); font: 800 var(--text-sm)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.topic-lesson[data-state="read"] .topic-lesson-dot { border-color: var(--good); background: var(--good); color: var(--surface); }
.topic-lesson[data-state="now"] .topic-lesson-dot { border-color: var(--accent); background: var(--surface); color: var(--accent); }
.topic-lesson-copy { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; padding: 12px 14px; border: 2px solid transparent; border-radius: var(--radius); background: var(--surface); }
.topic-lesson[data-state="now"] .topic-lesson-copy { border-color: var(--accent); }
.topic-lesson-title { font: 700 var(--text-base)/1.3 var(--font-text); overflow-wrap: anywhere; }
.topic-lesson-detail { font-size: var(--text-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
.topic-lesson[data-state="locked"] .topic-lesson-title { color: var(--muted); }
/* The practice action stays in reach above the tab bar until its place in the page. */
.topic-page .topic-actions { position: sticky; bottom: 0; z-index: 2; margin-block: 8px 16px; padding-block: 8px; background: var(--bg); }
[data-shell="native"][data-tabbar="true"] .topic-page .topic-actions { bottom: var(--tabbar-h); }
[data-large-type="true"] .topic-page .topic-actions { position: static; }
.exam-profiles { display: grid; gap: 8px; margin-top: 12px; }
.exam-profile-tile { display: block; width: 100%; min-height: 56px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-align: start; }
.exam-profile-name { display: block; font-size: calc(17px * var(--type-scale-capped)); font-weight: 700; line-height: 1.3; }
.exam-profile-detail, .exam-profile-last { display: block; font-size: calc(15px * var(--type-scale-capped)); color: var(--muted); font-variant-numeric: tabular-nums; }
.exam-profile-sheet { display: grid; gap: 12px; }
.exam-profile-sheet .button { width: 100%; min-height: 52px; }
.lesson-body, .question-title, .question-explanation { line-height: 1.4; }

/* First launch: eight full screens, one question each, a graduated bar of steps, one action. */
.welcome-flow { display: flex; flex-direction: column; min-height: calc(100dvh - 13px - var(--safe-top)); }
main[data-screen="welcome"]:has(> .welcome-flow) { padding-bottom: 0; }
.welcome-bar { display: flex; align-items: center; gap: 12px; min-height: 44px; margin-bottom: 18px; }
.welcome-back, .welcome-back-space { display: grid; place-items: center; flex: none; width: 44px; height: 44px; margin-inline-start: -12px; margin-inline-end: -8px; padding: 0; border: 0; background: transparent; color: var(--accent); }
.welcome-back svg { transform: rotate(180deg); }
.welcome-back-space { visibility: hidden; }
.welcome-steps { display: flex; flex: 1; gap: 6px; min-width: 0; }
.welcome-tick { flex: 1; height: 4px; background: var(--line); transition: background-color var(--dur-2) var(--ease-out); }
.welcome-tick:is(.done, .current) { background: var(--accent); }
.welcome-skip { flex: none; min-width: 44px; min-height: 44px; padding: 0 2px; border: 0; background: transparent; color: var(--accent); font: 700 var(--text-sm) var(--font-display); }
.welcome-body { display: flex; flex-direction: column; gap: 16px; padding-bottom: 20px; }
.welcome-flow h1 { margin: 0; font: 800 calc(34px * var(--type-scale-capped))/1.08 var(--font-display); text-wrap: balance; overflow-wrap: anywhere; hyphens: auto; }
.welcome-eyebrow { margin: 0 0 -8px; font: 800 var(--text-sm)/1.3 var(--font-display); color: var(--muted); }
.welcome-lede { margin: -6px 0 0; color: var(--muted); font-size: var(--text-base); line-height: 1.4; }
.welcome-label { margin: 6px 0 -8px; font: 700 var(--text-sm) var(--font-display); }
.welcome-footer { position: sticky; bottom: 0; z-index: 2; display: grid; gap: 2px; margin-top: auto; padding: 10px 0 calc(var(--safe-bottom) + 12px); background: var(--page-bg, var(--bg)); }
.welcome-footer .button.primary { width: 100%; min-height: 56px; font-size: var(--text-base); }
.welcome-later { min-height: 44px; border: 0; background: transparent; color: var(--accent); font: 700 var(--text-base) var(--font-display); }
.welcome-exam > .welcome-mark { margin-inline-end: 16px; }
.welcome-mark { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); color: transparent; }
[aria-checked="true"] > .welcome-mark { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.welcome-exams { display: grid; gap: 12px; }
.welcome-exam { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 12px; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-align: start; font: inherit; cursor: pointer; }
.welcome-exam[aria-checked="true"] { border-color: var(--accent); outline: 1px solid var(--accent); outline-offset: -2px; }
.welcome-exam .photo-welcome { display: block; grid-column: 1 / -1; grid-row: 1; height: 112px; background: var(--surface-soft); }
.welcome-exams:not(:has(> :nth-child(2))) .photo-welcome { height: 180px; }
.photo-welcome img { filter: grayscale(1) contrast(1.06); }
.welcome-exam-copy { display: grid; gap: 8px; min-width: 0; padding-block: 14px 16px; padding-inline-start: 16px; }
.welcome-exam-title { font: 800 var(--text-lg)/1.15 var(--font-display); overflow-wrap: anywhere; }
.welcome-facts { display: grid; grid-auto-flow: column; justify-content: start; gap: 4px 18px; }
.welcome-fact { display: grid; align-content: start; line-height: 1.2; }
.welcome-fact strong { font: 800 var(--text-lg)/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.welcome-fact span { color: var(--muted); font-size: var(--text-sm); }
.welcome-exams.compact .welcome-exam-title { font-size: var(--text-base); }
.welcome-exams.compact .welcome-fact strong { font-size: var(--text-base); }
.welcome-date { display: grid; gap: 2px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.welcome-date > span { color: var(--muted); font-size: var(--text-xs); font-weight: 650; }
.welcome-date input { width: 100%; min-height: 48px; margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink); font: 800 var(--text-xl) var(--font-display); }
.welcome-date:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.welcome-date input:focus-visible { outline: none; }
.welcome-choice { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding-block: 8px; padding-inline: 16px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-align: start; font: 650 var(--text-base) var(--font-text); }
.welcome-outcome { display: grid; gap: 6px; padding: 16px 18px 18px; border-radius: var(--radius); background: var(--navy); color: var(--foam); }
.welcome-outcome p { margin: 0; }
.welcome-outcome-eyebrow { font: 800 var(--text-sm)/1.3 var(--font-display); color: var(--hero-accent); }
.welcome-outcome .welcome-outcome-eyebrow { color: var(--hero-accent); }
.welcome-outcome-title { font: 800 calc(26px * var(--type-scale-capped))/1.12 var(--font-display); }
.welcome-outcome-detail { color: color-mix(in srgb, var(--foam) 84%, var(--navy)); font-size: var(--text-sm); line-height: 1.4; }
.welcome-outcome .meter { color: var(--hero-accent); --ink: var(--hero-muted); margin-block: 10px 2px; }
.welcome-minutes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.welcome-minute { display: grid; gap: 2px; align-content: center; min-height: 84px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-align: start; font: inherit; }
.welcome-minute[aria-checked="true"] { border-color: var(--accent); outline: 1px solid var(--accent); outline-offset: -2px; }
.welcome-minute-value { display: flex; align-items: baseline; gap: 4px; font: 800 var(--text-base) var(--font-display); }
.welcome-minute-value strong { font: 900 calc(32px * var(--type-scale-capped))/1 var(--font-display); font-variant-numeric: tabular-nums; }
.welcome-minute-detail { color: var(--muted); font-size: var(--text-sm); }
.welcome-days { margin: 0; }
.welcome-days .segment-option { color: var(--ink); font: 800 var(--text-base) var(--font-display); }
.welcome-days .segment-option[aria-checked="true"] { background: var(--accent); color: var(--on-accent); }
.welcome-switches { display: grid; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.welcome-switch { display: flex; align-items: center; gap: 12px; min-height: 64px; padding-block: 10px; padding-inline: 16px 12px; cursor: pointer; }
.welcome-switch + .welcome-switch { border-top: var(--hairline) solid var(--line); }
.welcome-switch-copy { display: grid; flex: 1; gap: 2px; min-width: 0; }
.welcome-switch-title { font: 650 var(--text-base)/1.3 var(--font-text); }
.welcome-switch-detail { color: var(--muted); font-size: var(--text-sm); line-height: 1.35; }
.welcome-switch input[role="switch"] { appearance: none; position: relative; flex: none; width: 48px; height: 44px; margin: 0; border: 0; border-radius: var(--radius-sm); background: transparent; cursor: pointer; }
.welcome-switch input[role="switch"]::before { content: ''; position: absolute; inset: 8px 0; border: 2px solid var(--ink); border-radius: var(--radius-sm); background: var(--surface); }
.welcome-switch input[role="switch"]::after { content: ''; position: absolute; top: 13px; inset-inline-start: 5px; width: 18px; height: 18px; border-radius: var(--radius-xs); background: var(--ink); transition: transform var(--dur-2) var(--ease-out); }
.welcome-switch input[role="switch"]:checked::before { border-color: var(--accent); background: var(--accent); }
.welcome-switch input[role="switch"]:checked::after { transform: translateX(calc(var(--inline-sign) * 20px)); background: var(--on-accent); }
.welcome-switch input[role="switch"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.welcome-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.welcome-chip { min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: 700 var(--text-sm) var(--font-display); }
.welcome-chip[aria-checked="true"] { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.welcome-recap { display: grid; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.welcome-recap-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 6px 16px; }
.welcome-recap-row + .welcome-recap-row { border-top: var(--hairline) solid var(--line); }
.welcome-recap dt { color: var(--muted); font-size: var(--text-sm); }
.welcome-recap dd { margin: 0; font: 800 var(--text-base) var(--font-display); text-align: end; }
.welcome-recap-row.accent dd { color: var(--accent); }
.welcome-first { display: grid; gap: 4px; padding: 16px 18px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.welcome-first p { margin: 0; }
.welcome-first .welcome-outcome-eyebrow { color: var(--muted); }
.welcome-first-title { font: 800 calc(28px * var(--type-scale-capped))/1.12 var(--font-display); }
.welcome-first-detail { color: var(--muted); font-size: var(--text-sm); }
/* The tour: three dark screens, each with a miniature of the real interface. */
.welcome-dark { isolation: isolate; color: var(--foam); }
.welcome-dark::before { content: ''; position: fixed; inset: 0; z-index: -1; background: var(--navy); }
.welcome-dark .welcome-footer { background: var(--navy); }
.welcome-dark :is(.welcome-back, .welcome-skip, .welcome-eyebrow) { color: var(--hero-accent); }
.welcome-dark .welcome-tick { background: color-mix(in srgb, var(--hero-accent) 24%, var(--navy)); }
.welcome-dark .welcome-tick:is(.done, .current) { background: var(--hero-accent); }
.welcome-dark .welcome-lede { color: color-mix(in srgb, var(--foam) 84%, var(--navy)); }
.welcome-dark .welcome-next { border-color: transparent; background: var(--hero-accent); color: var(--navy); }
.welcome-dark .welcome-eyebrow { margin-top: 8px; }
.welcome-demo { display: grid; align-content: start; gap: 10px; min-height: min(46dvh, 400px); margin-bottom: 8px; padding: 18px 16px; border-radius: var(--radius); background: color-mix(in srgb, var(--foam) 9%, var(--navy)); pointer-events: none; }
.welcome-demo p { margin: 0; }
.welcome-demo-card { display: grid; gap: 10px; padding: 14px; border-radius: var(--radius); background: var(--bg); color: var(--ink); }
.welcome-demo-question { font: 700 var(--text-sm)/1.35 var(--font-text); }
.welcome-demo-text { font: 650 var(--text-sm)/1.35 var(--font-text); }
.welcome-demo-label { font: 800 var(--text-xs)/1.3 var(--font-display); color: var(--accent); }
.welcome-demo-answers { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.welcome-demo-answer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-size: var(--text-sm); line-height: 1.3; }
.welcome-demo-answer.right { border: 2px solid var(--good); }
.welcome-demo-answer strong { flex: none; color: var(--good); font: 800 var(--text-xs) var(--font-display); }
.welcome-demo-rule { display: grid; gap: 4px; padding-inline-start: 12px; border-inline-start: 3px solid var(--accent); font-size: var(--text-sm); line-height: 1.35; }
.welcome-demo-counts { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.welcome-demo-counts p { display: grid; gap: 2px; min-width: 0; padding: 10px; border-radius: var(--radius-sm); background: var(--surface); }
.welcome-demo-counts strong { font: 800 var(--text-xl)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.welcome-demo-counts p:first-child strong { color: var(--good); }
.welcome-demo-counts p:nth-child(2):not(:last-child) strong { color: var(--bad); }
.welcome-demo-counts span { color: var(--muted); font-size: var(--text-xs); overflow-wrap: anywhere; }
.welcome-timeline { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); margin: 4px 0 0; padding: 0; list-style: none; }
.welcome-timeline::before { content: ''; position: absolute; top: 7px; inset-inline: 0; border-top: 2px dashed var(--muted); }
.welcome-timeline li { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; color: var(--muted); font-size: var(--text-xs); line-height: 1.25; }
.welcome-timeline li::before { content: ''; width: 16px; height: 16px; border-radius: var(--radius-xs); background: var(--accent); }
.welcome-demo-readiness { justify-items: center; padding-bottom: 36px; text-align: center; }
.welcome-demo-readiness .meter { justify-self: stretch; margin-top: 8px; }
.welcome-demo-big { font: 900 calc(56px * var(--type-scale-capped))/1 var(--font-display); }
.welcome-demo-mock { grid-template-columns: 1fr auto; align-items: center; }
.welcome-demo-mock p { display: grid; gap: 2px; }
.welcome-demo-mock p > span { color: var(--muted); font-size: var(--text-xs); }
.welcome-demo-pass { justify-items: end; text-align: end; }
.welcome-demo-pass strong { color: var(--good); font: 800 var(--text-lg) var(--font-display); }
[data-shell="web"] .welcome-flow { max-width: 560px; min-height: 0; margin-inline: auto; }
[data-shell="web"] .welcome-dark::before { display: none; }
[data-shell="web"] .welcome-dark { padding: 20px; border-radius: var(--radius); background: var(--navy); }
@media (max-height: 720px) {
  .welcome-bar { margin-bottom: 8px; }
  .welcome-body { gap: 12px; }
  .welcome-exam .photo-welcome { height: 64px; }
  .welcome-exams:not(:has(> :nth-child(2))) .photo-welcome { height: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  .welcome-tick, .welcome-switch input[role="switch"]::after { transition: none; }
}
.school-line { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-size: var(--text-sm); color: var(--muted); }
.school-call { font-size: var(--text-sm); min-height: 44px; }
.school-sheet { display: grid; gap: 8px; }
.school-sheet .button { font-size: var(--text-base); width: 100%; }
.school-sheet .school-later { justify-content: center; font-size: var(--text-sm); }
.school-notice { margin: 0; padding: 8px 20px 0; font-size: var(--text-sm); color: var(--muted); }

/* The sticky footer is in normal flow. Its own box reserves its full height,
   including wrapped text and the bottom safe area. */
[data-shell="native"][data-question-fullscreen="true"] main { padding-block: calc(var(--safe-top) + 4px) max(8px, var(--safe-bottom)); }
.question-screen .feedback { scroll-margin-top: calc(var(--safe-top) + 8px); }
[data-shell="native"] .question-screen :focus { scroll-margin-bottom: var(--question-actions-height, 0px); }

@media (max-width: 899px) {
  .country-screen .image-plate .plate img { height: clamp(100px, 21dvh, 190px); object-fit: cover; }
  .home-parts { gap: 6px; }
}

@media (max-width: 899px) and (max-height: 740px) {
  [data-shell="native"] main:is([data-screen="home"], [data-screen="welcome"]) { padding-block: calc(var(--safe-top) + 4px) 6px; }
  [data-shell="native"] .home-dashboard .large-title { margin-bottom: 0; }
  [data-shell="native"] .home-dashboard .large-title h1 { font-size: var(--text-xl); line-height: 1.1; }
  .home-dashboard .readiness { margin-top: 6px; padding: 10px 12px; }
  .home-dashboard .readiness-state { margin-block: 2px 6px; }
  .home-measure strong { font-size: var(--text-xl); }
  .home-measure .measure-counts { margin-top: 2px; }
  .home-dashboard .readiness-measures .meter { margin-top: 2px; }
  .home-today { grid-template-columns: auto 1fr; align-items: baseline; gap: 2px 8px; margin-top: 6px; padding-top: 4px; }
  .home-today .meter { grid-column: 1 / -1; margin: 0; }
  :root:not([data-large-type="true"]) .home-today-meta { display: none; }
  .home-dashboard .readiness .primary-action { margin-top: 4px; min-height: 44px; }
  .home-dashboard .progress-link { min-height: 44px; padding-block: 4px; }
  :root:not([data-large-type="true"]) .home-parts-counts { grid-template-columns: repeat(auto-fit, minmax(5em, 1fr)); gap: 4px; font-size: var(--text-sm); }
  .home-parts-counts .measure-tile { grid-template-columns: 1fr; padding-inline: 4px; }
  .home-parts-counts .tile-caption { grid-column: 1 / -1; }
  .home-tiles, .home-parts, .home-dashboard .home-parts + .group { margin-top: 4px; }
  .home-tiles { grid-template-rows: auto auto auto auto; }
  .home-tiles .measure-tile { min-height: 56px; }
  .home-tiles .tile-caption { min-height: 0; line-height: 1.1; }
  .home-dashboard .group-row { min-height: 56px; padding-block: 4px; }
  .welcome-start { min-height: 48px; }
  .question-screen .question-top { margin-bottom: 2px; }
  .question-screen .question-title { margin-block: 4px 8px; font-size: var(--text-base); }
  .question-screen .answers { gap: 6px; }
  .question-screen .answer { min-height: 44px; padding: 6px 8px; gap: 8px; }
  .question-screen .figure { padding: 6px; margin-bottom: 8px; }
  .question-screen .figure :is(img, video) { max-height: 17dvh; }
  .question-screen .question-actions { margin-top: 8px; }
}

/* Type roles use the same size multiplier as the native accessibility setting. */
:root {
  --title-size: 40px; --title-leading: 44px;
  --medium-title-size: 28px; --medium-title-leading: 32px;
  --small-title-size: 22px; --small-title-leading: 27px;
  --score-size: 52px; --score-leading: 55px;
  --number-size: 40px; --number-leading: 42px;
  --heading-size: 24px; --heading-leading: 28px;
  --action-size: 19px; --action-leading: 23px;
  --reading-size: 19px; --reading-leading: 27px;
  --body-size: 18px; --body-leading: 26px;
  --detail-size: 16px; --detail-leading: 21px;
  --text-sm: calc(var(--detail-size) * var(--type-scale-capped));
  --text-base: calc(var(--body-size) * var(--type-scale-capped));
  --primary-height: 52px; --photo-opening: 88px; --result-band: 160px;
  --photo-veil: linear-gradient(to bottom, rgb(0 0 0 / 78%) 0%, rgb(0 0 0 / 70%) 38%, rgb(0 0 0 / 32%) 60%, rgb(0 0 0 / 18%) 76%, rgb(0 0 0 / 72%) 100%);
}
:root[data-theme="dark"] {
  --photo-veil: linear-gradient(to bottom, rgb(0 0 0 / 84%) 0%, rgb(0 0 0 / 77%) 38%, rgb(0 0 0 / 49%) 60%, rgb(0 0 0 / 36%) 76%, rgb(0 0 0 / 80%) 100%);
}
@media (max-height: 740px) {
  :root {
    --title-size: 34px; --title-leading: 38px;
    --medium-title-size: 24px; --medium-title-leading: 28px;
    --small-title-size: 20px; --small-title-leading: 25px;
    --score-size: 44px; --score-leading: 48px;
    --number-size: 34px; --number-leading: 36px;
    --heading-size: 22px; --heading-leading: 26px;
    --action-size: 18px; --action-leading: 22px;
    --reading-size: 18px; --reading-leading: 26px;
    --body-size: 17px; --body-leading: 24px;
    --detail-size: 15px; --detail-leading: 20px;
    --primary-height: 48px; --photo-opening: 56px; --result-band: 112px;
  }
}
h1[data-title-fit="medium"] {
  --title-size: var(--medium-title-size); --title-leading: var(--medium-title-leading);
}
h1[data-title-fit="small"] {
  --title-size: var(--small-title-size); --title-leading: var(--small-title-leading);
}
body, .group-row, .answer, .study-settings .group-row {
  font: 500 var(--text-base)/calc(var(--body-leading) * var(--type-scale-capped)) var(--font-text);
}
.large-title h1, .topic-page .large-title h1,
[data-shell] .large-title h1, [data-shell] .home-dashboard .large-title h1 {
  font: 800 calc(var(--title-size) * var(--type-scale-capped))/calc(var(--title-leading) * var(--type-scale-capped)) var(--font-display);
  overflow-wrap: anywhere;
}
.home-dashboard .readiness-state, .home-dashboard .readiness-state.state-compact, h2 {
  font: 700 calc(var(--heading-size) * var(--type-scale-capped))/calc(var(--heading-leading) * var(--type-scale-capped)) var(--font-display);
}
.home-dashboard .home-measure strong {
  color: var(--photo-accent);
  font: 800 calc(var(--number-size) * var(--type-scale-capped))/calc(var(--number-leading) * var(--type-scale-capped)) var(--font-display);
  font-variant-numeric: tabular-nums;
}
.result-hero .result-score, .dtz-hero .dtz-hero-verdict, .session-score {
  font: 800 calc(var(--score-size) * var(--type-scale-capped))/calc(var(--score-leading) * var(--type-scale-capped)) var(--font-display);
  font-variant-numeric: tabular-nums;
}
.button.primary, .topic-actions .button, .home-dashboard .readiness .primary-action,
.topic-tile-title, .exam-profile-name, .home-tiles .tile-value {
  font: 700 calc(var(--action-size) * var(--type-scale-capped))/calc(var(--action-leading) * var(--type-scale-capped)) var(--font-display);
}
.button.primary, .topic-actions .button.primary, .home-dashboard .readiness .primary-action {
  min-height: var(--primary-height); border-radius: var(--radius-sm);
}
.question-screen .question-title, .exam-screen .question-title, .feedback p, .lesson-body, .question-explanation {
  font: 500 calc(var(--reading-size) * var(--type-scale-capped))/calc(var(--reading-leading) * var(--type-scale-capped)) var(--font-text);
}
.question-screen .question-title, .exam-screen .question-title { font-weight: 650; }
.home-dashboard :is(.measure-counts, .measure-label, .home-today-streak, .practice-streak, .tile-label, .tile-caption),
.practice-streak, .topic-tile-detail, .exam-profile-detail, [data-shell="native"] .main-nav a, .answer-status {
  font: 550 var(--text-sm)/calc(var(--detail-leading) * var(--type-scale-capped)) var(--font-text);
}
.pass-photo figcaption, .image-plate figcaption, .image-credits .row-detail {
  font: 450 var(--text-xs)/calc(18px * var(--type-scale-capped)) var(--font-text);
}
.pass-photo { display: none; position: relative; margin: 0; pointer-events: none; }
.pass-photo img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 50% 50%; }
.pass-photo.photo-ready { display: block; }
.photo-viewport { position: fixed; inset: 0; z-index: -1; display: block; background: var(--photo-surface); }
.photo-viewport img { position: absolute; inset: 0; visibility: hidden; }
.photo-viewport.photo-ready img { visibility: visible; }
.photo-viewport .signature { width: min(78vw, 380px); height: 46%; inset-inline-end: 6%; bottom: 5%; z-index: 0; }
/* Keep the open photograph bright. The stronger gradient follows the heading
   so a wrapped subtitle is protected even on a short viewport. */
:root[data-ambiance] {
  --photo-veil: linear-gradient(to bottom,
    rgb(var(--amb-deep-rgb) / 8%) 0%,
    rgb(var(--amb-deep-rgb) / 0%) 25%,
    rgb(var(--amb-deep-rgb) / 0%) 100%);
  --photo-title-veil: linear-gradient(to top,
    rgb(var(--amb-deep-rgb) / 0%) 0px,
    rgb(var(--amb-deep-rgb) / 64%) 24px,
    rgb(var(--amb-deep-rgb) / 70%) 100%);
  --photo-settings-veil: linear-gradient(to bottom,
    rgb(var(--amb-deep-rgb) / 70%) 0%,
    rgb(var(--amb-deep-rgb) / 64%) 38%,
    rgb(var(--amb-deep-rgb) / 0%) 50%);
}
[data-ambiance] .home-dashboard .home-measure strong { color: var(--amb-highlight, var(--photo-accent)); }
[data-ambiance] .home-dashboard .readiness .primary-action {
  background: var(--accent); color: var(--on-accent); border: 1px solid var(--amb-soft);
  --action-pressed: color-mix(in srgb, var(--accent) 90%, var(--ink));
}
.photo-viewport.photo-ready::after, .photo-result::after, .photo-settings::after {
  content: ''; position: absolute; inset: 0; background: var(--photo-veil);
}
[data-ambiance] :is(.photo-result, .photo-settings)::after { content: none; }
[data-ambiance] :is(.home-dashboard > .large-title, .topic-page > .large-title) {
  isolation: isolate;
}
[data-ambiance]:not([data-large-type="true"]) :is(.home-dashboard, .topic-page):has(> .photo-ready) > .large-title:not(.title-on-surface)::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  inset-inline: calc(50% - 50vw);
  inset-block: calc(0px - var(--safe-top) - var(--navbar-h) - 16px) -24px;
  background: var(--photo-title-veil);
}
:where(.home-dashboard, .topic-page):has(.photo-viewport) { isolation: isolate; }
main[data-nav] > :is(.home-dashboard, .topic-page):has(.photo-viewport) { background: transparent; }
.photo-viewport ~ .large-title { color: white; background: transparent; padding-inline-start: 0; }
.photo-viewport ~ .title-on-surface, [data-large-type="true"] .photo-viewport ~ .large-title { background: var(--photo-surface); }
.photo-viewport ~ .large-title .round-command { color: white; background: var(--photo-surface); border-radius: var(--radius-sm); }
.home-dashboard .large-title { padding-inline: 0; }
.home-dashboard .readiness { background: var(--photo-surface); color: white; margin-bottom: var(--photo-opening); }
.home-dashboard .readiness .primary-action { background: var(--photo-accent); color: #101820; text-align: start; }
.home-dashboard .primary-action .row-detail { color: inherit; opacity: 1; }
.home-dashboard .progress-link, .home-access, .home-dashboard .school-line,
.home-dashboard .group > h2, .topic-page .group > h2 { background: var(--surface); color: var(--ink); }
.home-dashboard .progress-link { min-height: 56px; border-radius: var(--radius-sm); padding-inline: 12px; }
.home-access {
  margin-block: 6px 0;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: max(15px, var(--text-sm));
  line-height: max(20px, calc(var(--detail-leading) * var(--type-scale-capped)));
}
.home-tiles { gap: 8px; grid-template-rows: auto; }
.home-tiles .measure-tile { isolation: isolate; grid-row: auto; grid-template-rows: auto; gap: 0; min-height: 64px; }
.home-tiles .measure-tile > :is(.tile-value, .tile-caption) { grid-row: auto; min-height: 0; }
.topic-page .topic-body { margin-top: var(--photo-opening); }
.topic-page .group { background: var(--surface); border-radius: var(--radius-sm); padding-block-start: 8px; }
.topic-tile, .exam-profile-tile, .measure-tile { border-radius: var(--radius-sm); }
.topic-tile, .exam-profile-tile, .home-tiles .measure-tile {
  --action-size: 17px; --text-sm: calc(15px * var(--type-scale-capped));
}
.photo-question { width: 48px; height: 48px; flex: none; }
:is(.photo-question, .photo-explanation) img { border-radius: var(--radius-sm); }
.question-top { min-height: 48px; }
.photo-explanation img { aspect-ratio: 16 / 9; height: auto; }
.photo-explanation, .explanation-figure { margin-block: 8px; }
.explanation-figure { display: block; width: 100%; max-height: 32dvh; object-fit: contain; }
.photo-result { height: var(--result-band); }
.photo-sheet { height: 96px; }
.photo-settings { height: 128px; }
.settings-heading { position: relative; }
.settings-heading:has(.photo-ready) .page-heading { position: absolute; inset-block-start: 0; margin: 0; padding: 0 16px; color: white; background: var(--photo-surface); }
.settings-heading:not(.title-on-surface):has(.photo-ready) .page-heading:not(:has(.eyebrow)) { background: transparent; }
[data-ambiance]:not([data-large-type="true"]) .settings-heading:not(.title-on-surface):not(:has(.eyebrow)) .photo-settings::after {
  content: ''; background: var(--photo-settings-veil);
}
[data-large-type="true"] .settings-heading:has(.photo-ready) .page-heading { position: static; background: var(--surface); color: var(--ink); }
.meter { border-color: var(--muted); }
.meter-tick { background: var(--muted); }
.readiness .meter, .readiness .meter-tick { --muted: white; }
[data-app="nautipass"] .home-today[data-resuming="true"] .meter-cursor {
  width: 8px; height: 10px; clip-path: polygon(50% 100%, 0 0, 50% 30%, 100% 0);
}
[data-app="dronipass"] .home-today .meter { border-inline-end: 2px solid currentColor; }
[data-app="dronipass"] .home-today .meter-cursor { width: 2px; }
[data-app="stradipass"] .session-mark { background: none; border: 1px solid var(--muted); }
[data-app="stradipass"] .session-mark:is(.answered, .correct, .wrong) { background: var(--accent); border-color: var(--accent); }
[data-app="stradipass"] .session-mark.current { background: transparent; border: 0; border-block: 2px solid var(--accent); }
[data-app="volapass"] .result-section .meter-threshold { width: 5px; background: none; border-inline: 2px solid currentColor; }
.home-parts [data-part-state="declared"] .tile-value, .is-declared .skill-level { border-bottom: 2px dotted var(--accent); }
.is-measured .skill-level { border-bottom: 2px solid var(--accent); }
.sector-outline { margin-inline-end: 6px; }
.milestone-mark { position: relative; background: var(--photo-surface); height: 96px; border-radius: var(--radius-sm); }
.milestone-mark .signature { z-index: 0; inset: 0; width: 100%; height: 100%; animation: milestone-ink 420ms var(--ease-out); }
@keyframes milestone-ink { from { stroke: var(--photo-accent); } to { stroke: var(--hero-ring); } }
.correction-sequence .reveal-later, .correction-sequence .reveal-later .answer-number { transition-delay: 0ms; }
.feedback-arriving, .correction-sequence .reveal-later .answer-status { animation: none; }
.correction-sequence .answer:is(.wrong, .correct) svg path { animation-duration: 160ms; animation-delay: 0ms; }
:where(a, button):is(.topic-tile, .measure-tile, .exam-profile-tile, .group-row, .button):active {
  transform: scale(.985); transition: transform 90ms var(--ease-out), background-color 90ms var(--ease-out);
}
.home-dashboard > .large-title { color: white; }
.home-dashboard > .large-title .round-command { color: white; background: var(--photo-surface); border-radius: var(--radius-sm); }
.home-dashboard > .large-title.title-on-surface, [data-large-type="true"] .home-dashboard > .large-title { background: var(--photo-surface); }
.home-parts .part-mode { font-size: var(--text-sm); grid-column: 1 / -1; color: var(--muted); }
.result-score > span:not([data-count]) { font-size: max(var(--text-base), .42em); }
.home-measure .meter-tick, .home-today .meter-tick { background: white; }
.home-dashboard .home-tiles { grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); }
.home-today .meter { margin-block: 2px; }
.photo-explanation > figcaption { color: var(--muted); }
:focus-visible { outline-color: var(--accent); }
.photo-viewport ~ :focus-visible, .home-dashboard .large-title :focus-visible { outline-color: var(--photo-accent); }
@media (max-width: 899px) {
  /* Main owns both insets. Its flexible child puts spare height in the
     photographic opening without reserving the tab bar a second time. */
  [data-shell="native"] main[data-screen="home"] {
    display: flex; flex-direction: column;
    padding-block: calc(var(--safe-top) + 4px) 6px;
  }
  .home-dashboard {
    width: 100%; flex: 1; display: flex; flex-direction: column;
    --photo-opening: clamp(56px, calc(32dvh - 182px), 88px);
  }
  [data-shell="native"] .home-dashboard > .large-title { padding-inline: 0; margin-bottom: 0; }
  .home-dashboard .readiness { margin-top: 4px; padding: 8px 12px; }
  .home-dashboard .readiness .signature { width: 54px; height: 54px; top: 4px; inset-inline-end: 44px; pointer-events: none; }
  .home-dashboard .readiness:has(.signature-din) > :is(.home-preparation-heading, .readiness-state, .readiness-measures) { margin-inline-end: 0; }
  .home-dashboard .readiness-state { margin-block: 0 4px; }
  .home-dashboard .readiness-measures { column-gap: 10px; }
  .home-measure {
    display: flex; flex-wrap: wrap; align-items: center; column-gap: 4px;
  }
  .home-measure > :is(.measure-label, .meter) { width: 100%; }
  .home-measure .measure-counts { margin-top: 0; max-width: 100%; overflow-wrap: anywhere; }
  .home-dashboard .readiness-measures .meter { height: 10px; margin-top: 2px; }
  .home-dashboard .home-today { display: grid; grid-template-columns: 1fr; gap: 2px; padding-top: 4px; margin-top: 6px; }
  .home-today-head { display: block; line-height: calc(var(--detail-leading) * var(--type-scale-capped)); }
  .home-today-head > :not(:last-child) { margin-inline-end: 4px; }
  .home-today-meta { line-height: calc(var(--detail-leading) * var(--type-scale-capped)); }
  .home-dashboard .readiness .primary-action { margin-top: 6px; }
  .home-dashboard .readiness + :is(.progress-link, .home-parts, .home-tiles) { margin-top: auto; }
  .home-dashboard .progress-link { min-height: 56px; padding-block: 4px; }
  .home-dashboard .home-tiles, .home-dashboard .home-parts + .group { margin-top: 8px; }
  /* Keep label and value on one line when they fit, leaving a row for the free quota. */
  .progress-link + .home-tiles:has(+ .home-access) { margin-top: 4px; }
  .home-tiles:has(+ .home-access) .measure-tile {
    display: flex;
    flex-flow: row wrap;
    align-items: baseline;
    align-content: center;
    column-gap: 4px;
    min-height: 44px;
    padding-block: 2px;
  }
  .home-tiles:has(+ .home-access) .tile-caption { flex-basis: 100%; }
  :root:not([data-large-type="true"]) .home-parts + .group .group-rows {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
  }
  .home-parts + .group .group-row {
    display: flex; flex-direction: column; align-items: start; justify-content: center;
    gap: 0; padding: 4px 8px; background: var(--surface); border-radius: var(--radius-sm);
  }
  .home-parts + .group .group-rows { background: transparent; }
  .home-parts + .group .group-row > :is(svg, .row-chevron) { display: none; }
  .home-parts + .group .row-value { margin-inline: 0; max-width: 100%; white-space: normal; text-align: start; }
  :root:not([data-large-type="true"]) .home-parts-counts {
    grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
  }
  .home-parts-counts .measure-tile { grid-template-columns: 1fr; padding-inline: 4px; }
}
@media (max-width: 899px) and (max-height: 740px) {
  /* Size each measure to its percentage and count so 100 % can share their line. */
  :root:not([data-large-type="true"]) .home-dashboard:has(> .home-access) .readiness-measures {
    grid-template-columns: auto auto;
  }
  :root:not([data-large-type="true"]) .home-dashboard:has(> .home-access) .home-measure {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }
  .home-dashboard:has(> .home-access) .home-measure > :is(.measure-label, .meter) { grid-column: 1 / -1; }
}
.settings-heading.title-on-surface:has(.photo-ready) .page-heading { position: static; background: var(--surface); color: var(--ink); }
[dir="rtl"] .home-today .meter { direction: ltr; }
.meter { border-bottom-color: var(--muted); }
.question-arriving, .question-leaving,
::view-transition-old(pass-question), ::view-transition-new(pass-question),
::view-transition-group(pass-question) { animation: none; }
@supports (transition-behavior: allow-discrete) {
  dialog.sheet {
    translate: 0 100%;
    transition: translate 180ms var(--ease-depth), display 180ms allow-discrete, overlay 180ms allow-discrete;
  }
  dialog.sheet[open], [data-shell="native"] dialog.sheet[open] {
    translate: 0 0; transition-duration: 240ms; animation: none;
  }
  @starting-style { dialog.sheet[open], [data-shell="native"] dialog.sheet[open] { translate: 0 100%; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, *::backdrop {
    animation-duration: 0ms !important; animation-delay: 0ms !important;
    transition-duration: 0ms !important; transition-delay: 0ms !important;
  }
}
.lesson .sch {
  --sch-paper: var(--surface); --sch-ink: var(--ink); --sch-muted: var(--muted);
  --sch-land: var(--surface-soft); --sch-surface: var(--surface-soft); --sch-water: var(--accent-soft);
}
:is(.topic-tile, .exam-profile-tile, .measure-tile, .button, .group-row) {
  transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
:is(a.topic-tile, button.exam-profile-tile, a.measure-tile):active {
  background-color: var(--surface-soft); border-color: var(--accent); transition-duration: 90ms;
}
button.primary:not(:disabled):active, a.primary:active {
  background-color: color-mix(in srgb, var(--accent) 90%, var(--ink));
}
.home-dashboard .readiness .primary-action:active { background-color: var(--action-pressed, color-mix(in srgb, var(--photo-accent) 88%, white)); }
.answer:not(.correct, .wrong) { border-color: var(--muted); }
.answer.selected:not(.correct, .wrong) { border-color: var(--accent); }
.compact-bar.visible { transition-duration: 0ms; }

/* Compensate for the pressed paint scale at the edge of the original hit box. */
:is(.topic-tile, .measure-tile, .exam-profile-tile, .topic-practice, .welcome-start, .primary-action) { position: relative; }
:is(.topic-tile, .measure-tile, .exam-profile-tile, .topic-practice, .welcome-start, .primary-action):active::after {
  content: ''; position: absolute; inset: -0.77%; border-radius: inherit;
}

/* Two-line topic meta above the question and short photo credit caption. */
.question-screen .question-meta, .exam-screen .exam-topic {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  white-space: normal; overflow: hidden; overflow-wrap: anywhere;
}
.pass-photo > figcaption { margin-top: 4px; color: var(--muted); pointer-events: auto; }
.pass-photo > figcaption a { color: inherit; text-decoration: underline; }
