@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700&display=swap');

/* Refined with Impeccable's polish, typeset, layout and Operate guidance.
   The existing paper / terracotta / olive identity remains authoritative. */
:root {
  font-family: 'DM Sans', system-ui, sans-serif;
  color: #302e27;
  background: #f6f4ef;
  font-synthesis: none;
  --paper: #f6f4ef;
  --surface: #fffefa;
  --chrome: #eeeee6;
  --ink: #302e27;
  --muted: #666458;
  --line: #dadacf;
  --control-line: #939486;
  --accent: #a7442c;
  --accent-hover: #8d3623;
  --accent-light: #f6e9df;
  --green: #3b6249;
  --green-light: #eaf1e6;
  --red: #963e32;
  --red-light: #faece7;
  --focus: #486d52;
  --radius: 12px;
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --type-meta: .75rem;
  --type-label: .875rem;
  --type-body: 1rem;
  --type-title: 2.125rem;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a, input, select { touch-action: manipulation; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button, a, input, select, summary { -webkit-tap-highlight-color: #d9dfce; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}
::selection { background: #d9e2cb; color: #293c25; }
input, select { caret-color: var(--accent); }
button svg { flex-shrink: 0; }
svg.icon { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: 'Manrope', system-ui, sans-serif; font-weight: 600; text-wrap: balance; }
h1 { font-size: var(--type-title); letter-spacing: -.03em; line-height: 1.2; max-width: 26ch; }
h2 { font-size: 1.5rem; letter-spacing: -.025em; line-height: 1.35; }
h3 { font-size: 1.125rem; letter-spacing: -.015em; line-height: 1.45; }
p { line-height: 1.65; }
small { font-size: var(--type-meta); line-height: 1.5; }
.muted { color: var(--muted); }
.eyebrow { font-size: var(--type-meta); font-weight: 600; letter-spacing: .08em; }
.mono { font-variant-numeric: tabular-nums; }
.skip-link { position: fixed; top: -90px; left: 20px; z-index: 20; padding: 12px 16px; background: var(--surface); }
.skip-link:focus { top: 12px; }
.loading { display: grid; place-content: center; min-height: 100vh; text-align: center; gap: 24px; padding: 24px; }
.loading .brand-mark { justify-self: center; }
.brand-mark { display: inline-grid; place-content: center; background: var(--accent); color: #fffefa; width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; }
.brand-logo { width: 27px; height: 27px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; fill: none; }

/* Persistent navigation has its own quiet surface. */
.topbar { height: 76px; border-bottom: 1px solid var(--line); background: var(--surface); display: flex; justify-content: space-between; align-items: center; padding: 0 32px; position: relative; z-index: 2; }
.brand { display: flex; align-items: center; gap: 12px; background: none; border: 0; padding: 0; text-align: left; min-height: 44px; }
.brand-name { font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 1rem; letter-spacing: -.02em; }
.brand-name small { display: block; font-family: 'DM Sans', sans-serif; font-weight: 400; font-size: .625rem; letter-spacing: .13em; color: var(--muted); margin-top: 4px; }
.top-right { display: flex; align-items: center; gap: 16px; font-size: var(--type-meta); color: var(--muted); }
.private-badge { display: flex; align-items: center; gap: 7px; }
.private-badge svg { width: 15px; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; background: var(--chrome); border: 1px solid var(--line); border-radius: 50%; font-size: .75rem; font-weight: 600; }
.shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: calc(100vh - 76px); }
.sidebar { border-right: 1px solid var(--line); padding: 32px 16px 24px; display: flex; flex-direction: column; gap: 4px; background: var(--chrome); }
.sidebar .eyebrow { padding: 0 12px; color: var(--muted); margin-bottom: 16px; font-size: .6875rem; letter-spacing: .06em; }
.nav-button { width: 100%; background: none; border: 0; display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px; font-size: var(--type-label); border-radius: 7px; color: #5b5b50; min-height: 44px; transition: background-color 180ms var(--ease), color 180ms var(--ease); }
.nav-button.active { background: #dde3d2; color: #344b2e; font-weight: 600; }
.nav-button:hover { background: #e2e4d9; color: #344b2e; }
.nav-button:active { background: #d6ddc9; }
.nav-divider { height: 1px; background: var(--line); margin: 16px 12px; }
.sidebar-tip { padding: 16px 12px; margin: 24px 0 0; border-top: 1px solid var(--line); }
.sidebar-tip p { font-size: var(--type-meta); color: #55644b; margin-top: 8px; line-height: 1.65; }
.sidebar-tip svg { color: #526b43; }
.sidebar-footer { margin-top: auto; padding: 40px 12px 0; font-size: .6875rem; color: var(--muted); line-height: 1.75; }
.main { padding: 40px 40px 32px; max-width: 1320px; width: 100%; min-width: 0; margin: 0 auto; align-self: start; }
.breadcrumb { color: var(--muted); font-size: var(--type-meta); margin-bottom: 28px; display: flex; align-items: center; gap: 9px; }
.breadcrumb svg { width: 13px; height: 13px; }
.heading-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 32px; }
.intro { margin-top: 16px; max-width: 65ch; color: var(--muted); font-size: var(--type-body); line-height: 1.65; }
.guide-link { display: inline-flex; gap: 8px; align-items: center; font-size: var(--type-label); white-space: nowrap; min-height: 44px; }
.guide-link svg { width: 15px; height: 15px; }
.main[data-page='home'] .heading-row h1 { font-size: 2.625rem; max-width: 22ch; }

/* Context is an open editorial band, while session choices are actionable cards. */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 32px; padding: 4px 0 28px; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.hero .badge { display: none; }
.hero h2 { font-size: 1.375rem; margin-bottom: 12px; max-width: 36ch; }
.hero p { font-size: .9375rem; color: var(--muted); max-width: 60ch; }
.hero-stats { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding-left: 24px; border-left: 1px solid var(--line); }
.hero-stats > div { display: flex; align-items: baseline; gap: 12px; }
.hero-stats strong { font-size: 1.125rem; font-weight: 600; min-width: 32px; font-variant-numeric: tabular-nums; }
.hero-stats small { color: var(--muted); font-size: .8125rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 20px; }
.section-head small { color: var(--muted); }
.mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mode-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; min-width: 0; transition: border-color 180ms var(--ease); }
.mode-card:hover { border-color: #9b9d8c; }
.mode-card.featured { border-color: #cca58f; background: #fcf3ec; }
.mode-top { display: flex; align-items: center; margin-bottom: 16px; }
.mode-symbol { width: 28px; height: 28px; display: grid; place-items: center; color: #536746; }
.mode-symbol svg { width: 25px; height: 25px; }
.featured .mode-symbol { color: var(--accent); }
.mode-number { display: none; }
.mode-card h3 { font-size: 1.25rem; }
.mode-card p { font-size: .9375rem; color: var(--muted); margin-top: 12px; line-height: 1.6; }
.mode-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; margin: 20px 0 24px; font-size: var(--type-meta); color: #625f51; }
.mode-meta span { display: flex; align-items: center; gap: 6px; }
.mode-meta svg { width: 14px; height: 14px; }

/* A shared control vocabulary: explicit focus, pressed and disabled states. */
.btn { border: 1px solid var(--control-line); border-radius: 7px; padding: 11px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; background: var(--surface); font-size: var(--type-label); font-weight: 600; line-height: 1.4; text-decoration: none; color: var(--ink); min-height: 44px; transition: background-color 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease); }
.btn:hover:not(:disabled) { border-color: #6c705f; background: #eceee3; text-decoration: none; }
.btn:active:not(:disabled) { background: #dde2d1; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fffefa; }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.primary:active:not(:disabled) { background: #773020; }
.btn.dark { background: #384b30; border-color: #384b30; color: #fffefa; }
.btn.dark:hover:not(:disabled) { background: #293c24; border-color: #293c24; }
.btn:disabled { background: #efefe8; border-color: #deded3; color: #77766a; }
.btn.small { min-height: 40px; padding: 8px 12px; font-size: .8125rem; }
.btn.full { width: 100%; margin-top: auto; }
.btn svg { width: 16px; height: 16px; }
.text-btn { border: 0; background: none; color: var(--muted); font-size: var(--type-label); padding: 8px; min-height: 44px; display: inline-flex; gap: 7px; align-items: center; border-radius: 5px; }
.text-btn:hover { color: var(--accent); background: #eee9df; }
.text-btn:active, .text-btn[aria-pressed='true'] { color: var(--accent); background: var(--accent-light); }

.below-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 32px; margin-top: 40px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 24px; min-width: 0; }
.panel h3 { font-size: 1rem; }
.below-grid > .panel { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; padding: 24px 0 0; }
.below-grid h3 { font-size: 1.125rem; }
.domain-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; padding: 16px 0; min-height: 44px; }
.domain-row:first-of-type { margin-top: 20px; }
.domain-index { font-size: var(--type-meta); color: #5c6552; font-variant-numeric: tabular-nums; }
.domain-name { font-size: var(--type-label); line-height: 1.5; }
.domain-name small { display: block; color: var(--muted); margin-top: 4px; }
.domain-weight { font-size: .8125rem; color: #526348; font-variant-numeric: tabular-nums; white-space: nowrap; }
.domain-weight svg { width: 16px; height: 16px; margin-left: 4px; }
button.domain-row:hover { background: #eeeee5; }
button.domain-row:active { background: #e3e6d9; }
.resource-art { display: flex; align-items: center; gap: 12px; margin: 24px 0 16px; }
.resource-art .mode-symbol { color: var(--accent); }
.resource-art .eyebrow { font-size: var(--type-label); letter-spacing: 0; }
.resource-panel p { font-size: .9375rem; color: var(--muted); }
.resource-panel .guide-link { margin-top: 16px; }
.footnote { display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); margin-top: 40px; padding-top: 20px; font-size: var(--type-meta); color: var(--muted); line-height: 1.65; }
.footnote > span { max-width: 78ch; }
.footnote button { font-size: var(--type-meta); padding: 0 4px; min-height: 32px; align-self: start; white-space: nowrap; }
.notice { padding: 16px 20px; background: #f7efdc; color: #715624; border: 1px solid #d4bd83; border-radius: var(--radius); margin-bottom: 24px; font-size: var(--type-label); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.resume-banner { background: #eaf0e1; border-color: #c1cfaf; color: #4d6240; }
.resume-banner strong { display: block; font-size: var(--type-body); margin-bottom: 4px; color: #3b5131; }
.resume-banner .actions { display: flex; gap: 8px; flex-shrink: 0; }

/* Configuration and a single prominent start action. */
.config-layout { display: grid; grid-template-columns: minmax(0, 1fr) 284px; gap: 24px; }
.config-card { padding: 28px; }
.form-field { display: flex; flex-direction: column; gap: 10px; margin: 24px 0; }
.form-field label, .field-label { font-size: var(--type-label); font-weight: 600; }
.form-field select { background: var(--surface); border: 1px solid var(--control-line); border-radius: 7px; padding: 12px; color: var(--ink); width: 100%; min-height: 48px; }
.form-field select:hover { border-color: #53684c; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.config-card .intro { font-size: .9375rem; }
.domain-picker { border: 0; padding: 0; margin: 24px 0; }
.domain-picker legend { font-size: var(--type-label); font-weight: 600; margin-bottom: 12px; }
.domain-choice { position: relative; display: flex; gap: 12px; align-items: center; cursor: pointer; border: 1px solid var(--line); padding: 16px; border-radius: 8px; margin: 8px 0; min-height: 56px; }
.domain-choice:hover { border-color: #7f8c70; }
.domain-choice:has(input:checked) { border-color: #647b52; background: #ebf0e3; }
.domain-choice input { accent-color: var(--green); margin: 0; width: 17px; height: 17px; flex-shrink: 0; }
.domain-choice strong { font-size: var(--type-label); font-weight: 500; display: block; line-height: 1.5; }
.domain-choice small { display: block; margin-top: 4px; color: #58664d; }
.config-summary { background: #edf0e5; color: #3d4e32; align-self: start; }
.config-summary > .eyebrow { letter-spacing: 0; font-size: var(--type-label); color: #536349; }
.config-summary .big-number { font-size: 3rem; line-height: 1.2; font-weight: 600; letter-spacing: -.03em; margin: 16px 0 4px; font-variant-numeric: tabular-nums; }
.config-summary p { font-size: var(--type-label); color: #55654b; }
.config-facts { list-style: none; padding: 0; margin: 24px 0; }
.config-facts li { display: flex; gap: 10px; align-items: flex-start; font-size: .8125rem; padding: 12px 0; border-top: 1px solid #d2dcc3; line-height: 1.6; }
.config-facts svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; color: #4a643c; }
.config-summary .btn { margin-top: 8px; width: 100%; }
.subtle-box { font-size: var(--type-label); background: transparent; border-top: 1px solid var(--line); padding: 20px 0 0; line-height: 1.7; color: var(--muted); margin-top: 24px; }

/* Reading surfaces: bounded measure and generous option hit areas. */
.exam-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; gap: 16px; }
.exam-title { min-width: 0; }
.exam-title h1 { font-size: 1.625rem; letter-spacing: -.025em; }
.exam-title p { font-size: var(--type-label); color: var(--muted); margin-top: 8px; line-height: 1.5; }
.timer { display: flex; align-items: center; gap: 9px; font-size: 1.25rem; font-weight: 600; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-variant-numeric: tabular-nums; white-space: nowrap; }
.timer.urgent { color: var(--red); border-color: #d4aaa0; background: var(--red-light); }
.exam-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 24px; align-items: start; }
.question-card { padding: 28px; }
.question-top { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 24px; }
.question-top .eyebrow { color: var(--muted); font-size: var(--type-label); letter-spacing: 0; font-weight: 500; }
.chip { font-size: var(--type-meta); background: #edf0e5; border-radius: 5px; padding: 6px 8px; color: #506147; }
.question-stem { font-size: 1.25rem; font-family: 'DM Sans', system-ui, sans-serif; line-height: 1.6; letter-spacing: -.012em; font-weight: 500; white-space: pre-wrap; margin-top: 24px; max-width: 65ch; overflow-wrap: anywhere; text-wrap: pretty; }
.scenario { border: 1px solid #d5ddc8; border-radius: 8px; background: #f0f3e9; margin: 12px 0; }
.scenario summary { font-size: var(--type-label); padding: 14px 16px; cursor: pointer; line-height: 1.6; color: #465c36; min-height: 44px; }
.scenario summary:hover { background: #e9eedf; border-radius: 8px; }
.scenario p { font-size: .9375rem; padding: 0 16px 18px; color: #526448; line-height: 1.75; max-width: 72ch; white-space: pre-wrap; overflow-wrap: anywhere; }
.scenario .source-tag { font-size: var(--type-meta); color: #5d6d50; margin-left: 8px; }
.select-hint { font-size: var(--type-label); color: var(--muted); margin: 16px 0 20px; }
.answer-fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
.answer-fieldset legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.option { display: flex; align-items: flex-start; gap: 12px; border: 1px solid #c9ccbe; border-radius: 8px; background: var(--surface); padding: 18px 16px; margin: 12px 0; cursor: pointer; line-height: 1.65; font-size: var(--type-body); transition: background-color 180ms var(--ease), border-color 180ms var(--ease); }
.option:hover:not(:has(input:disabled)) { border-color: #7d906b; background: #f0f3e8; }
.option:has(input:checked) { border-color: #66814f; background: #edf2e4; color: #344a29; }
.option:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
.option input { margin: 5px 0 0; accent-color: var(--green); width: 17px; height: 17px; flex-shrink: 0; }
.option-letter { height: 26px; width: 26px; display: inline-grid; place-content: center; font-size: var(--type-label); font-weight: 600; color: #656650; flex-shrink: 0; line-height: 1; }
.option-content { flex: 1; min-width: 0; white-space: pre-wrap; max-width: 72ch; overflow-wrap: anywhere; }
.option.correct { background: #edf4e9; border-color: #92b084; color: #35522c; }
.option.wrong { background: var(--red-light); border-color: #cfa293; color: #703c2f; }
.option:has(input:disabled) { cursor: default; }
.answer-verdict { font-size: .8125rem; font-weight: 600; display: block; margin-top: 10px; color: #3c6330; }
.wrong .answer-verdict { color: #953d2b; }
.option-explanation { display: block; font-size: .9375rem; line-height: 1.75; color: #526448; border-top: 1px solid #d4dfc9; margin-top: 14px; padding-top: 14px; white-space: pre-wrap; }
.wrong .option-explanation { color: #795042; border-color: #e4c7bb; }
.option:not(.correct):not(.wrong) .option-explanation { color: var(--muted); border-color: var(--line); }
.question-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid var(--line); padding-top: 24px; margin-top: 28px; flex-wrap: wrap; }
.question-actions .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.navigator { padding: 20px 16px; background: #f0f1e9; }
.navigator h3 { font-size: var(--type-label); }
.navigator p { font-size: var(--type-meta); color: #58644c; margin-top: 10px; line-height: 1.65; }
.progress-track { height: 4px; background: #dce1d0; border-radius: 4px; margin: 16px 0 24px; overflow: hidden; }
.progress-fill { height: 100%; background: #627e4e; border-radius: 4px; transition: width 220ms var(--ease); }
.question-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.qnum { min-height: 36px; border: 1px solid #b2baa2; border-radius: 5px; font-size: var(--type-meta); background: var(--surface); font-variant-numeric: tabular-nums; position: relative; }
.qnum:hover { border-color: #526940; background: #e6ecd9; }
.qnum:active { background: #d5e0c5; }
.qnum.answered { background: #dfe8d1; border-color: #9fb389; color: #3c592c; }
.qnum.current { outline: 2px solid #596d46; outline-offset: 1px; font-weight: 700; }
.qnum:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.qnum.flagged:after { content: ''; position: absolute; right: 3px; top: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.qnum.incorrect { color: #913c2d; background: #f7e7df; border-color: #d1aa98; }
.qnum.correct { color: #3b5f2e; background: #e3edd8; border-color: #a6bd92; }
.navigator-legend { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0; color: #58644c; font-size: var(--type-meta); }
.legend-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; background: #637c4f; }
.legend-dot.flag { background: var(--accent); }
.navigator .btn { margin-top: 16px; width: 100%; }

.feedback { margin-top: 32px; }
.feedback-banner { padding: 16px 18px; border-radius: 8px; background: #e8f0e2; border: 1px solid #bfd0ad; font-size: var(--type-body); font-weight: 600; color: #3d6331; display: flex; align-items: center; gap: 12px; line-height: 1.5; }
.feedback-banner svg { flex-shrink: 0; }
.feedback-banner.incorrect { background: #f9e9df; border-color: #dcb59e; color: #944329; }
.feedback-body { padding-top: 24px; }
.feedback-body h3 { font-size: var(--type-body); margin: 28px 0 10px; }
.feedback-body > h3:first-child { margin-top: 0; }
.feedback-body p { font-size: var(--type-body); color: var(--muted); line-height: 1.8; white-space: pre-wrap; margin-bottom: 20px; max-width: 72ch; overflow-wrap: anywhere; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9em; overflow-wrap: anywhere; }
.feedback-body code, .question-stem code, .option-content code, .scenario code { background: #e5e8dc; padding: 2px 4px; border-radius: 3px; }
.study-links { background: #f0f3e7; border: 1px solid #d2ddbf; border-radius: 8px; padding: 20px; margin: 28px 0; }
.study-links h3 { display: flex; gap: 10px; align-items: center; color: #3e5d2b; font-size: var(--type-body); margin: 0 0 12px; }
.study-links h3 svg { flex-shrink: 0; }
.study-links > p { font-size: var(--type-label); line-height: 1.65; margin: 0 0 16px; color: #556849; }
.study-link { display: block; border-top: 1px solid #ced9be; padding: 16px 0; text-decoration: none; font-size: .9375rem; color: #3d5c2d; }
.study-link:hover strong { text-decoration: underline; text-underline-offset: .2em; }
.study-link strong { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; align-items: center; line-height: 1.6; }
.study-link svg { width: 15px; height: 15px; flex-shrink: 0; }
.study-link small { display: block; color: #586c4c; margin-top: 8px; font-size: .8125rem; line-height: 1.75; }
.study-link:last-child { padding-bottom: 0; }
.learner-note { border: 1px solid #d8c79e; background: #faf2df; padding: 20px; border-radius: 8px; margin: 24px 0; }
.learner-note h3 { margin: 0; color: #765c27; }
.learner-note p { font-size: .9375rem; color: #745e35; margin: 12px 0 0; }
.provenance { font-size: var(--type-meta); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 28px; color: var(--muted); }
.provenance summary { cursor: pointer; padding: 12px 0; min-height: 44px; line-height: 1.6; }
.provenance p { font-size: var(--type-meta); line-height: 1.75; margin: 12px 0; overflow-wrap: anywhere; }

/* Real score content, without a decorative progress ring. */
.results-hero { display: grid; grid-template-columns: 164px minmax(0, 1fr); gap: 32px; align-items: center; padding: 32px; }
.score-summary { display: flex; flex-direction: column; justify-content: center; gap: 8px; min-height: 148px; text-align: center; color: #3b5431; }
.score-summary strong { font-size: 3.5rem; line-height: 1; letter-spacing: -.04em; font-weight: 600; font-variant-numeric: tabular-nums; }
.score-summary span { font-size: var(--type-meta); color: var(--muted); }
.results-hero .eyebrow { display: none; }
.results-hero h2 { margin-bottom: 12px; }
.results-hero p { font-size: .9375rem; color: var(--muted); max-width: 65ch; }
.result-metrics { display: flex; flex-wrap: wrap; gap: 16px 28px; margin-top: 24px; }
.result-metrics strong { font-size: 1.25rem; display: block; font-weight: 500; font-variant-numeric: tabular-nums; }
.result-metrics small { color: var(--muted); margin-top: 4px; display: block; }
.results-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 32px; }
.domain-bars { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; margin: 24px 0 0; }
.domain-bar p { font-size: .8125rem; color: var(--muted); min-height: 60px; line-height: 1.6; }
.domain-bar strong { font-size: 1.25rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.domain-bar .progress-track { margin: 12px 0; }
.result-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 24px 0; }
.result-tabs button { border: 1px solid var(--control-line); border-radius: 6px; padding: 10px 12px; font-size: .8125rem; background: var(--surface); min-height: 40px; }
.result-tabs button:hover { background: #e8ecdd; }
.result-tabs button.active { background: #3c4e32; color: var(--surface); border-color: #3c4e32; }
.result-item { display: flex; gap: 16px; align-items: center; text-align: left; width: 100%; border: 0; border-top: 1px solid var(--line); padding: 20px 4px; background: none; }
.result-item:hover { background: #f0f2e8; }
.result-item:active { background: #e5ebda; }
.result-item .result-icon { height: 28px; width: 28px; background: #e5eddb; color: #466535; display: grid; place-content: center; border-radius: 50%; flex-shrink: 0; }
.result-icon .icon { width: 16px; height: 16px; }
.result-item .result-icon.bad { background: #f6e6dd; color: var(--red); }
.result-item .result-icon.blank { background: #eeeee7; color: #636457; }
.result-item > span:nth-child(2) { min-width: 0; flex: 1; }
.result-item p { font-size: .9375rem; line-height: 1.7; }
.result-item small { color: var(--muted); display: block; margin-top: 8px; }
.result-item > .icon { margin-left: auto; flex-shrink: 0; }
.empty { padding: 40px 16px; text-align: center; font-size: var(--type-body); color: var(--muted); line-height: 1.75; }
.history-item { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); padding: 24px 0; }
.history-item strong { font-size: var(--type-body); display: block; }
.history-item small { color: var(--muted); margin-top: 8px; display: block; }
.history-score { font-size: 1.5rem; color: #496535; font-variant-numeric: tabular-nums; white-space: nowrap; }
.credit-block { padding: 24px 0 0; border-top: 1px solid var(--line); margin-top: 28px; }
.credit-block p { font-size: .9375rem; margin: 12px 0; color: var(--muted); line-height: 1.75; max-width: 75ch; overflow-wrap: anywhere; }
.credit-block h3 { font-size: var(--type-body); }
.dialog { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; max-width: 480px; width: calc(100% - 32px); color: var(--ink); background: var(--surface); box-shadow: 0 18px 60px #242e2429; }
.dialog::backdrop { background: #252b2480; }
.dialog h2 { font-size: 1.375rem; }
.dialog p { font-size: var(--type-body); color: var(--muted); margin: 16px 0 24px; line-height: 1.7; }
.dialog .actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
.storage-note { font-size: var(--type-meta); color: var(--muted); line-height: 1.7; margin-top: 16px; }

@media (min-width: 1500px) {
  .main { padding: 48px 56px 40px; }
  .shell { grid-template-columns: 232px minmax(0, 1fr); }
}
@media (max-width: 1180px) {
  .shell { grid-template-columns: 188px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .main { padding: 32px 28px; }
  .heading-row { flex-wrap: wrap; gap: 12px; }
  .mode-card { padding: 20px; }
  .config-layout { grid-template-columns: minmax(0, 1fr) 248px; }
  .exam-layout { grid-template-columns: minmax(0, 1fr) 212px; }
  .question-card { padding: 24px; }
  .navigator { padding: 20px 12px; }
  .domain-bars { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .shell { grid-template-columns: 176px minmax(0, 1fr); }
  .main { padding: 32px 24px; }
  .nav-button { font-size: .8125rem; padding: 12px 10px; gap: 10px; }
  .sidebar .eyebrow { font-size: .625rem; }
  .hero { grid-template-columns: 1fr; gap: 20px; }
  .hero-stats { border-left: 0; padding-left: 0; flex-direction: row; justify-content: flex-start; gap: 12px 24px; flex-wrap: wrap; }
  .hero-stats > div { gap: 6px; }
  .hero-stats strong { min-width: 0; }
  .mode-grid { grid-template-columns: 1fr; }
  .mode-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; padding: 24px; }
  .mode-top { display: none; }
  .mode-card h3, .mode-card p, .mode-card .mode-meta { grid-column: 1; }
  .mode-card .mode-meta { margin-bottom: 0; }
  .mode-card .btn { grid-column: 2; grid-row: 1 / 4; width: auto; margin-top: 0; align-self: center; max-width: 190px; }
  .below-grid, .config-layout, .exam-layout { grid-template-columns: 1fr; }
  .config-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
  .config-summary > .eyebrow, .config-summary .big-number, .config-summary > p:first-of-type { grid-column: 1; }
  .config-facts { grid-column: 2; grid-row: 1 / 5; margin: 0; }
  .config-summary .btn { grid-column: 1; align-self: end; margin-top: 24px; }
  .config-summary .storage-note { grid-column: 1 / -1; }
  .navigator { order: 2; padding: 24px; }
  .question-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; }
  .qnum { min-height: 40px; }
  .navigator .btn { max-width: 240px; }
}
@media (max-width: 720px) {
  .topbar { height: 68px; padding: 0 20px; }
  .brand-name { font-size: .875rem; }
  .brand-mark { width: 32px; height: 32px; border-radius: 8px; }
  .brand-logo { width: 24px; height: 24px; }
  .brand-name small { font-size: .5625rem; }
  .top-right { gap: 8px; }
  .private-badge { display: none; }
  .avatar { width: 30px; height: 30px; font-size: .6875rem; }
  .shell { display: block; min-height: calc(100vh - 68px); }
  .sidebar { padding: 8px 12px; background: var(--chrome); display: flex; flex-direction: row; gap: 4px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; scroll-padding-inline: 12px; }
  .sidebar .eyebrow, .sidebar-tip, .sidebar-footer, .nav-divider { display: none; }
  .nav-button { width: auto; white-space: nowrap; font-size: var(--type-meta); padding: 12px; gap: 7px; flex-shrink: 0; }
  .nav-button svg { width: 17px; height: 17px; }
  .main { padding: 28px 20px; }
  .breadcrumb { margin-bottom: 24px; }
  h1, .main[data-page='home'] .heading-row h1 { font-size: 2rem; letter-spacing: -.03em; }
  .heading-row { margin-bottom: 28px; }
  .heading-row .guide-link { display: none; }
  .intro { font-size: .9375rem; margin-top: 14px; }
  .desktop-break { display: none; }
  .hero { padding-bottom: 24px; margin-bottom: 28px; }
  .hero h2 { font-size: 1.25rem; }
  .hero-stats { flex-direction: column; gap: 8px; }
  .hero-stats > div { gap: 12px; }
  .hero-stats strong { min-width: 32px; }
  .section-head { display: block; margin-bottom: 20px; }
  .section-head h2 { font-size: 1.375rem; }
  .section-head small { display: block; margin-top: 8px; }
  .mode-card { display: flex; padding: 24px; }
  .mode-card h3 { font-size: 1.25rem; }
  .mode-card p { font-size: .9375rem; }
  .mode-card .mode-meta { margin: 20px 0 24px; }
  .mode-card .btn { width: 100%; max-width: none; }
  .below-grid { margin-top: 32px; gap: 32px; }
  .domain-row { gap: 8px; }
  .domain-weight svg { display: none; }
  .panel, .config-card { padding: 24px 20px; }
  .config-summary { display: block; }
  .config-facts { margin: 24px 0; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .form-row .form-field + .form-field { margin-top: 0; }
  .domain-choice { padding: 14px; }
  .notice { padding: 16px; }
  .resume-banner { display: block; }
  .resume-banner .actions { margin-top: 16px; }
  .footnote { display: block; margin-top: 32px; }
  .footnote button { margin-top: 12px; min-height: 44px; }
  .exam-header { flex-wrap: wrap; align-items: flex-start; gap: 16px 12px; }
  .exam-title { width: 100%; }
  .exam-title h1 { font-size: 1.5rem; }
  .exam-header .timer { font-size: 1.125rem; min-height: 44px; }
  .exam-header > .btn { margin-left: auto; min-height: 44px; }
  .question-card { padding: 20px 16px; }
  .question-top { gap: 8px; align-items: center; margin-bottom: 20px; }
  .question-top .eyebrow { font-size: .8125rem; }
  .question-top .text-btn { font-size: .8125rem; padding-inline: 4px; }
  .question-top .text-btn .icon { width: 16px; }
  .question-stem { font-size: 1.125rem; line-height: 1.7; }
  .scenario summary { font-size: .8125rem; padding: 12px; }
  .scenario p { padding: 0 12px 16px; }
  .option { padding: 16px 12px; gap: 8px; }
  .option-letter { width: 22px; }
  .option input { width: 16px; height: 16px; }
  .question-actions { gap: 12px; }
  .question-actions > .btn { align-self: flex-start; }
  .question-actions .actions { width: 100%; }
  .question-actions .actions .btn { flex: 1; }
  .navigator { padding: 24px 16px; }
  .question-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
  .qnum { min-height: 44px; }
  .feedback-banner { padding: 16px; font-size: .9375rem; }
  .study-links, .learner-note { padding: 16px; }
  .results-hero { grid-template-columns: 1fr; gap: 24px; padding: 24px; }
  .score-summary { min-height: auto; text-align: left; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
  .result-metrics { gap: 16px 24px; }
  .domain-bars { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .domain-bar p { min-height: 62px; }
  .result-tabs button { min-height: 44px; }
  .result-item { gap: 12px; }
  .result-item > .icon { width: 16px; }
  .history-item { flex-wrap: wrap; gap: 16px; }
  .history-item > div { flex: 1; min-width: 0; }
  .dialog { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
