/* Scoreleap. The leap arc (start score → goal) is the only motif. */
:root {
  /* "Sheet and biro": white answer sheet, graphite ink, one biro-blue for actions and progress. */
  --bg: #ffffff;
  --surface: #f3f3f1;
  --surface-2: #e7e7e4;
  --paper: #f3f3f1;
  --ink: #121212;
  --muted: #595957;
  --accent: #1743d0;
  --accent-hover: #1234a8;
  --accent-soft: #e8eefd;
  --accent-ink: #ffffff;
  --green: #17683f;
  --green-soft: #def1e4;
  --red: #b3261e;
  --red-soft: #fbe4e1;
  --amber: #8a5300;
  --amber-soft: #fdf0cf;
  --float: 0 24px 60px rgba(18, 18, 18, .16);
  --radius: 18px;
  --content: 1280px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-math: Georgia, "Times New Roman", serif;
  /* Five type steps. */
  --t-small: 14px;
  --t-body: 16px;
  --t-lead: clamp(18px, 1.1rem + .4vw, 21px);
  --t-head: clamp(24px, 1.1rem + 1vw, 32px);
  --t-display: clamp(40px, 1.4rem + 4vw, 72px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100svh; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--t-body); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--bg); }
[hidden] { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-weight: 650; letter-spacing: -.03em; }
h2 { font-size: var(--t-head); line-height: 1.1; }
textarea { width: 100%; margin: 8px 0; padding: 12px; border: 2px solid transparent; border-radius: 12px; background: var(--paper); resize: vertical; }
summary { cursor: pointer; font-weight: 650; padding: 6px 0; }
a { color: var(--ink); }

.skip-link { position: fixed; top: -80px; left: 16px; z-index: 200; padding: 11px 16px; border-radius: 99px; background: var(--ink); color: var(--bg); }
.skip-link:focus { top: 16px; }

/* Bar: wordmark, four plain links, the learner. */
.topbar { position: sticky; top: 0; z-index: 40; height: 76px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 22px; padding: calc(env(safe-area-inset-top) + 8px) max(24px, calc((100vw - var(--content)) / 2)) 8px; background: var(--bg); }
.brand { display: flex; align-items: center; gap: 10px; width: max-content; padding: 0; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.brand strong { font-size: var(--t-lead); font-weight: 700; letter-spacing: -.035em; }
.brand-mark { width: 34px; height: 34px; flex: 0 0 auto; color: var(--ink); }
.brand:hover .brand-mark circle { transform: translateY(-2px); }
.brand-mark circle { transition: transform .2s ease; }

.desktop-nav { display: flex; gap: 28px; }
.nav-button, .mobile-nav-button { border: 0; background: transparent; cursor: pointer; }
.nav-button { position: relative; padding: 10px 0; color: var(--muted); font-size: var(--t-body); font-weight: 550; }
.nav-button:hover { color: var(--ink); }
.nav-button.active { color: var(--ink); font-weight: 650; }
.nav-button.active::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: var(--ink); }
.profile-button { justify-self: end; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--accent); color: var(--bg); font-size: var(--t-lead); font-weight: 700; cursor: pointer; transition: transform .15s ease; }
.profile-button:hover { transform: scale(1.05); }

/* Floating things are the only ones with shadows. */
.profile-panel { position: fixed; z-index: 60; top: 74px; right: max(24px, calc((100vw - var(--content)) / 2)); width: min(360px, calc(100vw - 30px)); max-height: calc(100vh - 90px); overflow: auto; padding: 24px; border-radius: var(--radius); background: var(--paper); box-shadow: var(--float); } /* taste-skill-ignore: floating panel */
.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel-heading h2 { margin: 0; font-size: var(--t-head); }
.close-button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--surface); font-size: var(--t-lead); cursor: pointer; }
.close-button:hover { background: var(--surface-2); }
.profile-panel > label, .practice-controls > label { display: block; margin: 14px 0 6px; color: var(--muted); font-size: var(--t-small); font-weight: 600; }
input, select { width: 100%; padding: 12px 14px; border: 2px solid transparent; border-radius: 12px; background: var(--bg); color: var(--ink); }
input:focus, select:focus { border-color: var(--accent); outline: none; }
.profile-panel input, .profile-panel select { background: var(--surface); }
.setting-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.setting-grid label { color: var(--muted); font-size: var(--t-small); font-weight: 600; }
.setting-grid input { margin-top: 6px; }
.danger-link { margin: 16px auto 0; display: block; border: 0; background: transparent; color: var(--red); font-size: var(--t-small); text-decoration: underline; cursor: pointer; }
.account-status { margin: 6px 0 0; color: var(--muted); font-size: var(--t-small); line-height: 1.45; text-align: center; }
.account-status:empty { display: none; }
#account-dialog { width: min(460px, calc(100vw - 28px)); padding: clamp(22px, 5vw, 36px); }
#account-dialog form { padding: 0; }
.account-dialog .account-status { text-align: left; margin-top: 0; }
#pass-dialog { width: min(500px, calc(100vw - 28px)); padding: clamp(24px, 5vw, 40px); }
#pass-dialog > p, #pass-dialog div > p { line-height: 1.5; }
.pass-reason { margin: 0 0 18px; padding: 14px 16px; border-radius: 14px; background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.pass-reason[hidden] { display: none; }
.pass-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 18px; color: var(--muted); font-size: var(--t-body); }
.pass-price strong { color: var(--ink); font-size: var(--t-head); font-weight: 700; letter-spacing: -.05em; line-height: 1; }
.pass-features { display: grid; gap: 10px; margin: 0 0 18px; padding: 0; list-style: none; line-height: 1.45; }
.pass-features li { position: relative; padding-left: 32px; }
.pass-features li::before { content: ""; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); }
.pass-features li::after { content: ""; position: absolute; left: 7px; top: 6px; width: 6px; height: 10px; border: solid var(--accent); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.pass-note { padding: 12px 14px; border-radius: 12px; background: var(--surface); color: var(--muted); font-size: var(--t-small); }
#pass-dialog .account-status { margin-top: 12px; text-align: left; }
#pass-signin-note { padding: 12px 14px; border-radius: 12px; background: var(--amber-soft); color: #4f3000; font-weight: 600; }
.practice-locked { display: grid; justify-items: start; align-content: center; min-height: 420px; }
.practice-locked .question-prompt { margin: 0 0 12px; font-family: var(--font); font-size: var(--t-head); font-weight: 700; letter-spacing: -.04em; line-height: 1.05; }
.practice-locked p { max-width: 44ch; color: var(--ink); font-size: var(--t-lead); line-height: 1.5; }
.privacy-note { margin: 18px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--surface); color: var(--muted); font-size: var(--t-small); line-height: 1.5; }

main { width: min(var(--content), calc(100% - 48px)); margin: 0 auto; padding: 48px 0 120px; }
.view { display: none; }
.view.active { display: block; }
.view.active > * { animation: rise .45s cubic-bezier(.2, .7, .2, 1) both; }
.view.active > *:nth-child(2) { animation-delay: .07s; }
.view.active > *:nth-child(3) { animation-delay: .14s; }
.view.active > *:nth-child(4) { animation-delay: .21s; }
.view.active > *:nth-child(n+5) { animation-delay: .28s; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.welcome-row, .page-heading, .section-heading, .card-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.page-heading { margin-bottom: 36px; }
h1 { max-width: 16ch; margin-bottom: 14px; font-size: var(--t-display); line-height: 1; letter-spacing: -.045em; }
.page-heading h1, #home-title { max-width: 18ch; }
.page-lede { max-width: 640px; margin-bottom: 0; color: var(--ink); font-size: var(--t-lead); line-height: 1.5; }
/* Remaining labels rendered by the app carry real information, so they read as plain sentence-case text. */
.eyebrow { display: block; margin-bottom: 8px; color: var(--muted); font-size: var(--t-small); font-weight: 600; } /* taste-skill-ignore: app-rendered labels carry real information (domain name, test state) */
.eyebrow.light { color: var(--accent-ink); }

/* Start → goal, set as the leap itself. */
.goal-chip { position: relative; display: flex; align-items: baseline; gap: 14px; padding: 0 0 6px; font-variant-numeric: tabular-nums; }
.goal-chip span { color: var(--muted); font-size: var(--t-head); font-weight: 600; letter-spacing: -.03em; }
.goal-chip i { color: var(--muted); font-style: normal; font-size: var(--t-head); }
.goal-chip strong { color: var(--ink); font-size: var(--t-head); font-weight: 700; letter-spacing: -.05em; line-height: .9; }

.dashboard-grid { display: grid; grid-template-columns: 1.35fr .85fr; gap: 20px; margin-top: 36px; }
.mission-card, .score-card, .progress-panel, .question-card, .practice-controls { border-radius: var(--radius); }

/* The cobalt stage: one enormous arc rises out of its lower-left corner and lands top-right. */
.mission-card { position: relative; min-height: 380px; display: flex; flex-direction: column; overflow: hidden; padding: clamp(30px, 4vw, 48px); background: var(--accent); color: var(--accent-ink); }
.mission-arc { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; }
.mission-arc path { fill: none; stroke: #3b67ee; stroke-width: 34; stroke-linecap: round; }
.mission-arc circle { fill: var(--bg); transform-box: fill-box; transform-origin: center; animation: land .5s .3s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes land { from { opacity: 0; transform: translateY(-22px) scale(.5); } to { opacity: 1; transform: none; } }
.mission-card h2 { position: relative; z-index: 1; max-width: 14ch; margin: auto 0 14px; padding-top: 48px; font-size: var(--t-head); line-height: 1; letter-spacing: -.045em; }
.mission-card p { position: relative; z-index: 1; max-width: 44ch; color: var(--accent-ink); font-size: var(--t-body); line-height: 1.55; }

.white-button, .primary-button, .secondary-button { border: 0; border-radius: 99px; cursor: pointer; font-weight: 650; transition: transform .15s ease, background-color .15s ease; }
.white-button:active, .primary-button:active, .secondary-button:active { transform: scale(.97); }
.white-button { position: relative; z-index: 1; align-self: flex-start; margin-top: 10px; padding: 15px 24px; background: var(--bg); color: var(--ink); font-size: var(--t-body); }
.white-button:hover { background: var(--accent-soft); }
.primary-button { padding: 15px 24px; background: var(--accent); color: var(--accent-ink); font-size: var(--t-body); }
.primary-button:hover { background: var(--accent-hover); }
.primary-button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.primary-button.full { width: 100%; margin-top: 18px; }
.secondary-button { padding: 14px 22px; background: var(--surface); color: var(--ink); font-size: var(--t-body); }
.secondary-button:hover { background: var(--surface-2); }
.text-button { min-height: 44px; padding: 8px 6px; border: 0; background: transparent; color: var(--ink); font-size: var(--t-body); font-weight: 650; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; cursor: pointer; }
.text-button:hover { text-decoration-thickness: 3px; }

.score-card { display: flex; flex-direction: column; padding: 30px; background: var(--surface); }
.score-card h2 { margin: 0; font-size: var(--t-head); }
.trend-badge { padding: 7px 12px; border-radius: 99px; background: var(--bg); color: var(--ink); font-size: var(--t-small); font-weight: 650; }
.score-visual { display: flex; align-items: center; gap: 22px; margin: 30px 0; }
/* A chart, so the conic fill stays: it is the score, not decoration. */
.score-ring { --score-angle: 35deg; position: relative; width: 136px; height: 136px; display: grid; place-content: center; flex: 0 0 auto; border-radius: 50%; background: conic-gradient(var(--accent) var(--score-angle), var(--bg) 0); text-align: center; } /* taste-skill-ignore: score chart, not decoration */
.score-ring::after { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: var(--surface); }
.score-ring span, .score-ring small { position: relative; z-index: 2; }
.score-ring span { font-size: var(--t-head); font-weight: 700; letter-spacing: -.05em; font-variant-numeric: tabular-nums; line-height: 1; }
.score-ring small { color: var(--muted); font-size: var(--t-small); }
.score-copy strong { display: block; margin-bottom: 8px; font-size: var(--t-lead); }
.score-copy p { margin: 0; color: var(--ink); font-size: var(--t-body); line-height: 1.55; }
.score-track { position: relative; height: 10px; margin-top: auto; border-radius: 99px; background: var(--bg); }
.score-track i { position: relative; display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .8s cubic-bezier(.2, .7, .2, 1); }
.score-track i::after { content: ""; position: absolute; right: -7px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: var(--accent); }
.track-labels { display: flex; justify-content: space-between; margin-top: 10px; color: var(--muted); font-size: var(--t-small); font-weight: 600; font-variant-numeric: tabular-nums; }

.section-block { margin-top: 64px; }
.section-heading { margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: var(--t-head); }

/* The four domains are a menu, not icon cards. */
.focus-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.focus-card { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 16px; min-height: 104px; padding: 22px 26px; border: 0; border-radius: 16px; background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; transition: background-color .15s ease, transform .15s ease; }
.focus-card::after { content: "→"; grid-column: 2; grid-row: 1 / span 3; font-size: var(--t-lead); transition: transform .2s ease; }
.focus-card:hover { background: var(--surface-2); }
.focus-card:hover::after { transform: translateX(4px); }
.focus-card:active { transform: scale(.99); }
.focus-card.recommended { background: var(--accent); color: var(--accent-ink); }
.focus-card.recommended:hover { background: var(--accent-hover); }
.focus-card .recommend-label { grid-column: 1; order: -1; margin-bottom: 4px; color: inherit; font-size: var(--t-small); font-weight: 600; opacity: .85; }
.domain-symbol { display: none; }
.focus-card strong { grid-column: 1; display: block; margin-bottom: 4px; font-size: var(--t-lead); letter-spacing: -.02em; }
.focus-card small { grid-column: 1; color: inherit; font-size: var(--t-body); line-height: 1.4; }

.streak-strip { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 64px; padding: 28px 30px; border-radius: var(--radius); background: var(--paper); }
.streak-strip > div:first-child { display: flex; align-items: center; gap: 12px; }
.streak-strip p { margin: 0; }
.streak-strip strong, .streak-strip small { display: block; }
.streak-strip > div:first-child strong { font-size: var(--t-head); letter-spacing: -.03em; }
.streak-strip small { margin-top: 4px; color: var(--muted); font-size: var(--t-small); }
.streak-icon { display: none; }
.week-dots { display: flex; gap: 10px; }
.day-dot { display: grid; gap: 6px; justify-items: center; color: var(--muted); font-size: var(--t-small); font-weight: 600; }
.day-dot i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--bg); color: var(--accent-ink); font-style: normal; font-size: var(--t-small); }
.day-dot.done i { background: var(--accent); }
.weekly-stat { text-align: right; }
.weekly-stat strong { font-size: var(--t-head); font-variant-numeric: tabular-nums; }

.practice-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); align-items: start; gap: 20px; }
.practice-controls { padding: 24px; background: var(--surface); }
.practice-controls h2 { margin-bottom: 18px; font-size: var(--t-head); }
fieldset { margin: 0; padding: 0; border: 0; }
legend, .practice-controls > label { margin-bottom: 8px; color: var(--muted); font-size: var(--t-small); font-weight: 600; }
.radio-card { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; padding: 12px 14px; border-radius: 14px; background: var(--bg); cursor: pointer; transition: background-color .15s ease; }
.radio-card:hover { background: var(--paper); }
.radio-card:has(input:checked) { background: var(--accent); color: var(--accent-ink); }
.radio-card input { width: auto; accent-color: var(--bg); }
.radio-card strong, .radio-card small, .timer-toggle strong, .timer-toggle small { display: block; }
.radio-card strong { font-size: var(--t-body); }
.radio-card small, .timer-toggle small { margin-top: 2px; color: inherit; font-size: var(--t-small); opacity: .85; }
.practice-controls select { background: var(--bg); }
.timer-toggle { display: flex !important; align-items: center; gap: 12px; margin-top: 18px !important; padding: 12px 14px; border-radius: 14px; background: var(--bg); color: var(--ink) !important; cursor: pointer; }
.timer-toggle input { width: 18px; height: 18px; accent-color: var(--ink); }

.question-card { min-height: 560px; padding: clamp(26px, 4vw, 48px); background: var(--paper); }
.empty-practice { min-height: 470px; display: grid; place-content: center; justify-items: start; }
.empty-practice h2 { margin-bottom: 10px; font-size: var(--t-head); line-height: 1; letter-spacing: -.045em; }
.empty-practice p { max-width: 36ch; color: var(--ink); font-size: var(--t-lead); line-height: 1.5; }
.empty-icon { width: 72px; height: 72px; display: grid; place-items: center; margin-bottom: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 26px; font-weight: 700; }
.question-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: var(--t-small); font-weight: 600; }
.difficulty { padding: 6px 12px; border-radius: 99px; background: var(--bg); color: var(--ink); }
.question-timer { color: var(--ink); font-variant-numeric: tabular-nums; }
.question-prompt { margin: 32px 0 26px; font-family: var(--font-math); font-size: clamp(22px, 1.1rem + 1vw, 30px); font-weight: 400; line-height: 1.45; letter-spacing: -.01em; }
.question-figure { margin: 0 0 24px; padding: 18px; border-radius: 16px; background: var(--bg); text-align: center; font-family: var(--font-math); font-size: var(--t-lead); line-height: 1.7; }
.options { display: grid; gap: 8px; }
.option { display: grid; grid-template-columns: 36px 1fr; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 2px solid transparent; border-radius: 16px; background: var(--bg); color: var(--ink); text-align: left; font-size: var(--t-lead); cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
.option:hover { background: var(--surface); }
.option.selected { border-color: var(--accent); background: var(--surface); }
.option.selected .option-letter { background: var(--accent); color: var(--accent-ink); }
.option.correct { border-color: var(--green); background: var(--green-soft); }
.option.correct .option-letter { background: var(--green); color: #fff; }
.option.incorrect { border-color: var(--red); background: var(--red-soft); }
.option.incorrect .option-letter { background: var(--red); color: #fff; }
.option-letter { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); font-size: var(--t-body); font-weight: 700; }
.student-response { display: flex; gap: 10px; }
.student-response input { max-width: 260px; font-size: var(--t-lead); }
.question-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; }
.hint-button { border: 0; background: transparent; color: var(--ink); font-size: var(--t-body); font-weight: 650; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; cursor: pointer; }
.hint-box, .feedback-box { margin-top: 18px; padding: 16px 18px; border-radius: 16px; font-size: var(--t-body); line-height: 1.6; }
.hint-box { background: var(--amber-soft); color: #4f3000; }
.feedback-box.correct { background: var(--green-soft); color: #123f28; }
.feedback-box.incorrect { background: var(--red-soft); color: #5e1510; }
.feedback-box strong { display: block; margin-bottom: 4px; }

.review-summary, .metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 24px; }
.summary-card, .metric-card { padding: 22px 24px; border-radius: 16px; background: var(--surface); }
.summary-card:first-child, .metric-card:first-child { background: var(--accent); color: var(--accent-ink); }
.summary-card strong, .metric-card strong { display: block; font-size: var(--t-head); letter-spacing: -.05em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.summary-card small, .metric-card small { color: inherit; font-size: var(--t-small); font-weight: 600; }
.mistake-list { display: grid; gap: 6px; }
.mistake-item { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; padding: 22px 24px; border-radius: 16px; background: var(--surface); }
.mistake-item h3 { margin: 4px 0 6px; font-size: var(--t-lead); }
.mistake-item p { margin: 0; color: var(--ink); font-size: var(--t-body); line-height: 1.5; }
.mistake-domain { color: var(--muted); font-size: var(--t-small); font-weight: 600; }
.empty-state { padding: 64px 32px; border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.empty-state h2 { color: var(--ink); font-size: var(--t-head); }
.empty-state .empty-icon { margin-bottom: 18px; }

.progress-panel { margin-top: 20px; padding: 30px; background: var(--surface); }
.domain-progress-list { display: grid; gap: 20px; }
.domain-progress-row { display: grid; grid-template-columns: 240px 1fr 110px; align-items: center; gap: 16px; }
.domain-progress-row strong { font-size: var(--t-body); }
.progress-bar { position: relative; height: 10px; border-radius: 99px; background: var(--bg); }
.progress-bar i { position: relative; display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.progress-bar i::after { content: ""; position: absolute; right: -6px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: var(--accent); }
.domain-progress-row span { color: var(--ink); font-size: var(--t-small); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.history-list { display: grid; gap: 4px; }
.history-row { display: grid; grid-template-columns: 130px 1fr auto; gap: 16px; align-items: center; padding: 14px 16px; border-radius: 12px; background: var(--bg); }
.history-row time, .history-row small { color: var(--muted); font-size: var(--t-small); }
.history-row strong { font-size: var(--t-body); }
.history-result { font-size: var(--t-small); font-weight: 700; }
.history-result.good { color: var(--green); }
.checkpoint-card { display: flex; justify-content: space-between; align-items: center; gap: 30px; margin-top: 20px; padding: 36px 40px; border-radius: var(--radius); background: var(--ink); color: var(--accent-ink); }
.checkpoint-card h2 { margin-bottom: 8px; font-size: var(--t-head); }
.checkpoint-card p { max-width: 62ch; margin: 0; color: var(--accent-ink); font-size: var(--t-body); line-height: 1.55; }
.checkpoint-card a { flex: 0 0 auto; padding: 15px 24px; border-radius: 99px; background: var(--bg); color: var(--ink); font-size: var(--t-body); font-weight: 650; text-decoration: none; transition: transform .15s ease; }
.checkpoint-card a:hover { transform: translateY(-2px); }

.mobile-nav { display: none; }
.toast { position: fixed; z-index: 150; left: 50%; bottom: 28px; transform: translate(-50%, 20px); max-width: calc(100vw - 30px); padding: 13px 20px; border-radius: 99px; background: var(--ink); color: var(--accent-ink); font-size: var(--t-body); opacity: 0; pointer-events: none; box-shadow: var(--float); transition: .25s ease; } /* taste-skill-ignore: floating toast */
.toast.show { opacity: 1; transform: translate(-50%, 0); }

dialog { border: 0; padding: 0; color: var(--ink); }
dialog::backdrop { background: rgba(18, 18, 18, .62); }
dialog[open] { animation: enter .3s cubic-bezier(.2, .7, .2, 1) both; }
.onboarding { width: min(620px, calc(100vw - 28px)); border-radius: 24px; background: var(--bg); box-shadow: var(--float); } /* taste-skill-ignore: dialog */
.onboarding form { padding: clamp(26px, 6vw, 48px); }
.onboarding-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 40px; color: var(--ink); }
.onboarding-brand strong { font-size: var(--t-lead); letter-spacing: -.035em; }
.onboarding-step { display: none; }
.onboarding-step.active { display: block; animation: enter .3s ease; }
.onboarding h1 { max-width: 13ch; font-size: clamp(38px, 1.4rem + 3.4vw, 56px); }
.onboarding p { color: var(--ink); font-size: var(--t-lead); line-height: 1.5; }
.onboarding label { display: block; margin: 24px 0 8px; color: var(--muted); font-size: var(--t-small); font-weight: 600; }
.onboarding label small { font-size: var(--t-small); font-weight: 500; }
.onboarding input { padding: 15px 16px; background: var(--paper); font-size: var(--t-lead); }
.score-inputs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 12px; }
.score-inputs input { font-size: 28px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.score-inputs > span { padding-bottom: 16px; color: var(--ink); font-size: 26px; }
.onboarding-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; }

.diagnostic-dialog { width: min(760px, calc(100vw - 28px)); max-height: min(820px, calc(100vh - 28px)); border-radius: 24px; background: var(--paper); box-shadow: var(--float); } /* taste-skill-ignore: dialog */
.diagnostic-shell { padding: clamp(24px, 5vw, 44px); }
.diagnostic-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 28px; }
.diagnostic-progress { flex: 1; height: 10px; border-radius: 99px; background: var(--surface); }
.diagnostic-progress i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .4s ease; }
.diagnostic-count { color: var(--muted); font-size: var(--t-small); font-weight: 600; font-variant-numeric: tabular-nums; }
.diagnostic-shell .question-prompt { margin-top: 20px; }
.diagnostic-intro { padding: 20px 0; }
.diagnostic-intro .empty-icon { margin: 0 0 22px; }
.diagnostic-intro p { max-width: 52ch; margin: 0 0 24px; color: var(--ink); font-size: var(--t-lead); line-height: 1.5; }
.diagnostic-intro h1 { font-size: clamp(36px, 1.4rem + 2.6vw, 52px); }
.diagnostic-results h1 { font-size: clamp(36px, 1.4rem + 2.6vw, 52px); }
.diagnostic-score { width: 140px; height: 140px; display: grid; place-content: center; margin: 22px 0; border-radius: 50%; background: var(--accent); color: var(--accent-ink); text-align: center; }
.diagnostic-score strong { font-size: var(--t-head); letter-spacing: -.05em; line-height: 1; }
.diagnostic-score small { font-size: var(--t-small); }
.result-domains { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 24px 0; text-align: left; }
.result-domain { padding: 14px 16px; border-radius: 14px; background: var(--bg); }
.result-domain strong { display: block; font-size: var(--t-body); }
.result-domain small { color: var(--muted); font-size: var(--t-small); }

@media (max-width: 920px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .practice-layout { grid-template-columns: 1fr; }
  .question-card { order: -1; }
  .practice-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
  .practice-controls h2, .practice-controls fieldset { grid-column: 1 / -1; }
  .practice-controls .full { margin-top: 18px; align-self: end; }
  .review-summary, .metrics-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  :root { --t-display: 36px; --t-head: 24px; --t-lead: 18px; }
  .topbar { height: calc(66px + env(safe-area-inset-top)); grid-template-columns: 1fr auto; padding-left: 18px; padding-right: 18px; }
  .desktop-nav { display: none; }
  main { width: min(100% - 32px, var(--content)); padding-top: 22px; padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .welcome-row, .page-heading { display: block; }
  .page-heading .secondary-button { margin-top: 20px; }
  .goal-chip { margin-top: 18px; }
  .dashboard-grid { margin-top: 26px; gap: 12px; }
  .mission-card { min-height: 380px; padding: 26px 24px; }
  .mission-card h2 { font-size: var(--t-head); }
  .white-button { width: 100%; text-align: center; }
  .score-card { padding: 24px; }
  .score-ring { width: 116px; height: 116px; }
  .score-ring span { font-size: var(--t-head); }
  .section-block { margin-top: 48px; }
  .focus-grid { grid-template-columns: 1fr; }
  .focus-card { min-height: 0; padding: 20px; }
  .streak-strip { align-items: flex-start; flex-wrap: wrap; margin-top: 48px; padding: 24px; }
  .week-dots { order: 3; width: 100%; justify-content: space-between; }
  .practice-controls { display: block; }
  .question-card { min-height: 480px; padding: 24px 18px; }
  .question-actions { align-items: stretch; flex-direction: column-reverse; }
  .question-actions .primary-button { width: 100%; }
  .mistake-item { grid-template-columns: 1fr; }
  .mistake-item button { width: 100%; }
  .domain-progress-row { grid-template-columns: 1fr auto; gap: 8px; }
  .domain-progress-row .progress-bar { grid-column: 1 / -1; grid-row: 2; }
  .history-row { grid-template-columns: 1fr auto; gap: 4px 10px; }
  .history-row time { grid-column: 1 / -1; }
  .progress-panel { padding: 24px 20px; }
  .checkpoint-card { display: block; padding: 28px 24px; }
  .checkpoint-card a { display: block; margin-top: 22px; text-align: center; }
  .mobile-nav { position: fixed; z-index: 45; inset: auto 0 0; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 8px calc(env(safe-area-inset-bottom) + 6px); background: var(--ink); }
  .mobile-nav-button { position: relative; min-height: 54px; padding: 8px 4px 14px; border-radius: 12px; color: var(--accent-ink); font-size: var(--t-body); font-weight: 550; opacity: .8; }
  .mobile-nav-button.active { opacity: 1; font-weight: 700; }
  .mobile-nav-button.active::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: var(--accent-ink); }
  .profile-panel { right: 15px; top: calc(60px + env(safe-area-inset-top)); }
  .score-inputs { gap: 8px; }
  .result-domains { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
  .summary-card strong, .metric-card strong { font-size: var(--t-head); }
  .score-visual { gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}

@media print {
  .topbar, .mobile-nav, .profile-panel, .page-heading button { display: none !important; }
  body { background: white; }
  main { width: 100%; padding: 0; }
  .view { display: none !important; }
  #view-progress { display: block !important; }
  .view.active > * { animation: none; }
  .progress-panel, .metric-card, .checkpoint-card { break-inside: avoid; }
}

#login-dialog { padding: clamp(26px, 6vw, 48px); }
#login-dialog form { padding: 0; }
.learner-list { display: grid; gap: 6px; margin-top: 20px; }
.learner-card { width: 100%; padding: 16px 18px; border: 0; border-radius: 14px; background: var(--surface); color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.learner-card:hover { background: var(--surface-2); }
.learner-card strong { display: block; font-size: var(--t-lead); }
.learner-card small { font-size: var(--t-small); color: var(--muted); }
.text-button.full { width: 100%; margin-top: 8px; }
.resource-links { margin: 6px 0 0; padding: 0; list-style: none; }
.resource-links li { margin-bottom: 10px; }
.resource-links a { color: var(--ink); font-size: var(--t-body); font-weight: 650; }
.resource-links small { display: block; color: var(--muted); font-size: var(--t-small); line-height: 1.4; }
.resource-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 16px; }
.resource-group h3 { margin: 0 0 6px; font-size: var(--t-lead); }
.secondary-button.full { width: 100%; margin-top: 10px; }
.question-figure svg { display: block; width: 100%; max-width: 340px; height: auto; margin: 0 auto; }
.question-figure figcaption { margin-top: 4px; color: var(--muted); font-size: var(--t-small); text-align: center; }
.fig-shape { fill: rgba(26, 75, 224, .08); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.fig-line { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.fig-dash { stroke-dasharray: 5 4; }
.fig-faint { fill: rgba(26, 75, 224, .05); stroke: #9a9a96; stroke-width: 1.5; }
.fig-arc { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.fig-dot { fill: var(--ink); }
.fig-text { fill: var(--ink); font: 700 14px system-ui, sans-serif; }
.fig-unknown { fill: var(--red); font-weight: 900; }
.mistake-note { padding: 10px 14px; border-left: 4px solid var(--red); border-radius: 8px; background: var(--red-soft); color: var(--ink) !important; }
.test-bar { position: sticky; top: 84px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; padding: 14px 20px; border-radius: 99px; background: var(--ink); color: var(--accent-ink); font-size: var(--t-body); }
.test-timer { font-variant-numeric: tabular-nums; font-size: 20px; font-weight: 700; color: var(--accent-ink); }
.test-timer.low { color: #ffb3a8; }
.test-bar .text-button, .test-bar .secondary-button { color: var(--accent-ink); }
.test-bar .secondary-button { background: #2c2c2c; }
.test-card { min-height: 0; }
.test-card .question-prompt { margin-top: 0; }
.test-grid { display: grid; grid-template-columns: repeat(11, minmax(0, 52px)); gap: 8px; margin-top: 18px; }
.test-dot { aspect-ratio: 1; border: 0; border-radius: 50%; background: var(--surface); color: var(--ink); font-size: var(--t-small); font-weight: 700; cursor: pointer; transition: transform .15s ease; }
.test-dot:hover { transform: scale(1.08); }
.test-dot.answered { background: var(--accent); color: var(--accent-ink); }
.test-dot.flagged { background: var(--amber-soft); color: var(--amber); }
.test-dot.current { outline: 3px solid var(--ink); outline-offset: 2px; }
.test-intro-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.test-intro-grid .progress-panel { margin-top: 0; }
.test-rules { margin: 12px 0 20px; padding-left: 20px; font-size: var(--t-body); line-height: 1.6; }
.test-rules a { color: var(--ink); font-weight: 650; }
.test-review-item { margin-top: 10px; padding: 18px 20px; border-left: 6px solid var(--green); border-radius: 14px; background: var(--bg); }
.test-review-item.miss { border-left-color: var(--red); }
.test-review-item h3 { margin: 4px 0 8px; font-size: var(--t-lead); }
.test-review-item p { margin: 6px 0 0; font-size: var(--t-body); line-height: 1.55; }
@media (max-width: 700px) { .test-grid { grid-template-columns: repeat(6, 1fr); } .test-bar { top: calc(74px + env(safe-area-inset-top)); flex-wrap: wrap; border-radius: 20px; } }
.spr-box { margin-bottom: 8px; }
.spr-box label { display: block; margin-bottom: 8px; font-size: var(--t-body); font-weight: 650; }
.spr-box label small { margin-left: 6px; color: var(--muted); font-size: var(--t-small); }
.spr-input { width: min(100%, 220px); padding: 14px 16px; border: 2px solid transparent; border-radius: 14px; background: var(--bg); font: 700 24px/1 var(--font); letter-spacing: .02em; }
.spr-input:focus { border-color: var(--accent); outline: none; }
.spr-input.correct { border-color: var(--green); background: var(--green-soft); }
.spr-input.incorrect { border-color: var(--red); background: var(--red-soft); }
.spr-preview { min-height: 18px; margin: 8px 0 0; font-size: var(--t-small); color: var(--ink); }
.spr-rules { margin: 4px 0 0; color: var(--muted); font-size: var(--t-small); line-height: 1.5; }
.fig-grid { stroke: #e4e4e0; stroke-width: 1; }
.fig-axis { stroke: var(--ink); stroke-width: 1.5; }
.fig-tick { fill: var(--muted); font: 600 11px system-ui, sans-serif; }
.fig-axis-title { fill: var(--muted); font: 700 12px system-ui, sans-serif; }
.fig-curve { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.fig-point { fill: var(--ink); }
.fig-fit { stroke: var(--red); stroke-width: 2.5; }
.fig-table { margin: 0 auto; border-collapse: collapse; font: 14px system-ui, sans-serif; }
.fig-table th, .fig-table td { padding: 8px 12px; border: 1px solid #d4d4cf; text-align: center; }
.fig-table thead th, .fig-table tbody th { background: var(--surface); font-weight: 700; }
.fig-table tr:last-child td, .fig-table td:last-child { font-weight: 700; }
.review-due-chip { display: inline-flex; gap: 8px; align-items: center; margin: 4px 0 18px; padding: 11px 18px; border: 0; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: var(--t-body); font-weight: 650; cursor: pointer; }
.review-due-chip[hidden] { display: none; }
.review-due-panel:not(:empty) { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin: 20px 0; padding: 24px 26px; border-radius: var(--radius); background: var(--paper); }
.review-due-panel h2 { margin: 0 0 6px; font-size: var(--t-head); }
.review-due-panel p { margin: 0; color: var(--ink); font-size: var(--t-body); line-height: 1.5; }
.test-start-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 700px) { .review-due-panel:not(:empty) { flex-direction: column; align-items: stretch; } }
.practice-controls .secondary-button, .score-card .secondary-button, .progress-panel .secondary-button { background: var(--bg); }
.practice-controls .secondary-button:hover, .progress-panel .secondary-button:hover { background: var(--paper); }
/* Keep the buy button in reach while the offer scrolls on a phone. */
#pass-buy, #pass-extend { position: sticky; bottom: 0; z-index: 1; outline: 14px solid var(--bg); }
#pass-buy:focus-visible, #pass-extend:focus-visible { outline: 3px solid var(--ink); }
@media (max-width: 700px) {
  .pass-reason { font-weight: 500; }
  .pass-price strong { font-size: var(--t-head); }
  .pass-features { gap: 8px; }
}
/* Tap targets: 44px or more. */
.brand, .hint-button, summary { min-height: 44px; }
summary { display: flex; align-items: center; }
.close-button { width: 44px; height: 44px; }
