:root {
  --fg: #1c1f26; --bg: #f4f5f7; --muted: #6b7280; --border: #e2e4e9;
  --surface: #ffffff; --surface-hover: #f8f9fb;
  --correct: #16803c; --incorrect: #c0362c; --partial: #a8720c; --accent: #2f5fd6; --accent-hover: #244cb0;
  --radius: 10px; --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: -apple-system, "Segoe UI", system-ui, sans-serif; color: var(--fg); background: var(--bg);
  font-size: 16px; line-height: 1.55;
}
main { max-width: 860px; margin: 0 auto; padding: 1.25rem 1rem 2rem; }
h1 { font-size: 1.4rem; }
h2 { font-size: 1.1rem; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.75rem 1.25rem; background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
  flex-wrap: wrap; gap: 0.25rem 1rem;  /* the German labels are longer than a phone is wide */
}
.topbar nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; align-items: center; }
.topbar nav a { text-decoration: none; font-weight: 500; }
.brand { font-weight: 700; text-decoration: none; color: var(--fg); font-size: 1.05rem; }
.model-badge { font-size: 0.8rem; padding: 0.2rem 0.6rem; border-radius: 1rem; background: #fdf2e5; color: var(--partial); }

.footer { max-width: 860px; margin: 0 auto; padding: 0.5rem 1rem 1.5rem; text-align: center; }
.footer a { font-size: 0.8rem; color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--accent); text-decoration: underline; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; box-shadow: var(--shadow); }

fieldset { border: none; padding: 0; margin: 0 0 1.25rem; }
legend, .field-label { font-weight: 600; margin-bottom: 0.4rem; }
.field-label { margin-top: 0; }
.pool-hint { text-align: left; margin: 0.3rem 0 0.6rem; }
.review-card { font-size: 0.85rem; color: var(--muted); margin: 0.75rem 0 0; }
.choice { display: inline-flex; align-items: center; gap: 0.35rem; margin-right: 1.1rem; margin-bottom: 0.3rem; }
button {
  padding: 0.55rem 1.1rem; border-radius: 8px; border: 1px solid var(--accent);
  background: var(--accent); color: #fff; cursor: pointer; font-size: 0.95rem;
  font-family: inherit; transition: background-color 0.12s ease, border-color 0.12s ease;
}
button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-secondary, .link-button {
  background: var(--surface); color: var(--fg); border: 1px solid var(--border);
}
.btn-secondary:hover, .link-button:hover { background: var(--surface-hover); border-color: var(--muted); }
.link-button { padding: 0.3rem 0.7rem; font-size: 0.8rem; color: var(--incorrect); border-color: var(--border); }
.link-button:hover { background: #fdecea; border-color: var(--incorrect); }
select, input[type=text], textarea {
  padding: 0.45rem 0.6rem; border: 1px solid var(--border); border-radius: 6px;
  width: 100%; max-width: 20rem; font-family: inherit; font-size: 0.95rem; background: var(--surface);
}
select:focus, input[type=text]:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { max-width: 100%; }

.resume-list { list-style: none; padding: 0; }
.resume-item {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.55rem 0; border-bottom: 1px solid var(--border);
}
.resume-item a { flex: 1; text-decoration: none; color: var(--fg); }
.resume-item a:hover { color: var(--accent); }
.resume-item form { margin: 0; }

.session-layout { display: flex; flex-direction: column; gap: 1rem; }
.grid-nav { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.grid-cell {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border: 1px solid var(--border); border-radius: 6px;
  text-decoration: none; color: var(--fg); font-size: 0.8rem; background: var(--surface);
  padding: 0; margin: 0; font-family: inherit; cursor: pointer; line-height: 1;
}
.grid-cell:hover { background: var(--surface-hover); border-color: var(--muted); }
.grid-cell.current { border-color: var(--accent); border-width: 2px; }
.grid-cell.status-answered { background: #eef2ff; }
.grid-cell.status-correct { background: #e6f4ea; color: var(--correct); }
.grid-cell.status-incorrect { background: #fdecea; color: var(--incorrect); }
.grid-cell.status-partial { background: #fff7e0; color: var(--partial); }
.grid-cell.status-ungraded { background: #f0f0f0; }
.grid-cell.flagged { box-shadow: inset 0 0 0 2px #d97706; }
.grid-part-label {
  flex-basis: 100%; font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.03em; color: var(--muted); margin-top: 0.5rem; padding-top: 0.4rem;
  border-top: 1px solid var(--border);
}
.grid-part-label:first-child { margin-top: 0; padding-top: 0; border-top: none; }

.question { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.q-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.5rem; }
.q-meta .q-part { font-weight: 600; color: var(--accent); }
.stem img, .open-item img { max-width: 100%; margin: 0.5rem 0; border-radius: 6px; }
.stem p { margin: 0.3rem 0; }
.stem { font-size: 1.05rem; margin-bottom: 1rem; }

.answer-actions { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; margin-top: 0.75rem; }
.saved-flash {
  display: inline-block; font-size: 0.85rem; color: var(--correct); background: #e6f4ea;
  border-radius: 6px; padding: 0.3rem 0.6rem; margin-bottom: 0.6rem;
}

.lang-de { color: #444; }
.fallback { opacity: 0.65; }
.fallback-tag {
  font-size: 0.7rem; text-transform: uppercase; border: 1px solid var(--muted);
  border-radius: 3px; padding: 0 0.3rem; margin-right: 0.3rem; color: var(--muted);
}

.options { list-style: none; padding: 0; }
.options li { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 0.5rem; transition: border-color 0.12s ease, background-color 0.12s ease; }
.options li:hover { border-color: var(--muted); }
.options li label { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.55rem 0.7rem; margin: 0; cursor: pointer; }
.options--result li.correct { border-color: var(--correct); background: #f2fbf5; }
.options--result li.wrong-selected { border-color: var(--incorrect); background: #fdf2f1; }
.options--result li { padding: 0.55rem 0.7rem; }

.open-item { margin-bottom: 1rem; }
.open-item--result.verdict-correct { border-left: 3px solid var(--correct); padding-left: 0.6rem; }
.open-item--result.verdict-incorrect { border-left: 3px solid var(--incorrect); padding-left: 0.6rem; }
.open-item--result.verdict-partial { border-left: 3px solid var(--partial); padding-left: 0.6rem; }
.elements { padding-left: 1.2rem; }
.elements li.present { color: var(--correct); }
.elements li.missing { color: var(--incorrect); }
.elements li.near { color: var(--partial); }
.source-tag, .comment { font-size: 0.85rem; color: var(--muted); }

.prev-next { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; }
.prev-next-top { margin: 0 0 1rem; }
.hint { color: var(--muted); font-size: 0.8rem; text-align: center; }

.part-bar { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
.part-name { width: 10rem; }
.bar { flex: 1; height: 0.8rem; background: #eee; border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--correct); }
.bar-fill.failed { background: var(--incorrect); }
.part-score { width: 5rem; text-align: right; }
.outcome { font-weight: 600; font-size: 1.1rem; }
.outcome-pass { color: var(--correct); }
.outcome-retake_part, .outcome-retake_all { color: var(--incorrect); }

.section-breakdown { width: 100%; border-collapse: collapse; }
.section-breakdown td { padding: 0.3rem 0.5rem; border-bottom: 1px solid var(--border); }

.review-item { border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 1rem; }
.review-part-heading {
  font-size: 1rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted);
  margin: 1.5rem 0 0.25rem; padding-bottom: 0.25rem; border-bottom: 2px solid var(--accent);
}
.review-part-heading:first-child { margin-top: 0; }
.references { margin-top: 0.5rem; font-size: 0.85rem; }

.appendix-page { max-width: 900px; margin: 0 auto; padding: 1rem; }
.appendix-page img { width: 100%; margin-bottom: 1rem; }

/* The question grid folds away on a phone (question.html); on a wider screen
   it is always open and the toggle is hidden. */
.grid-details > summary {
  cursor: pointer; font-weight: 600; font-size: 0.9rem; color: var(--accent);
  padding: 0.5rem 0.75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}
.grid-details[open] > summary { margin-bottom: 0.6rem; }
@media (min-width: 601px) {
  .grid-details > summary { display: none; }
}

/* Wide lesson tables scroll on their own instead of widening the page. */
.lesson-body table { display: block; max-width: 100%; overflow-x: auto; }

.review-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }

@media print {
  .topbar, .grid-nav, form, .review-actions, .hint, .footer { display: none; }
}

/* Course learners and admin (specs/LEARN.md §6.1) */
.learner-pick { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.learner-pick label { flex-basis: 100%; }
.not-you { display: flex; justify-content: flex-end; align-items: center; gap: 0.4rem; margin: 0 0 0.75rem; font-size: 0.85rem; color: var(--muted); }
.btn-link { background: none; border: none; padding: 0; color: var(--accent); text-decoration: underline; font-size: inherit; }
.btn-link:hover { background: none; color: var(--accent-hover); }
.learner-name { flex: 1; font-weight: 500; }
a.link-button { text-decoration: none; border-radius: 8px; border-style: solid; border-width: 1px; }
.btn-danger { background: var(--incorrect); border-color: var(--incorrect); }
.btn-danger:hover { background: #9d2b23; border-color: #9d2b23; }
.form-error { color: var(--incorrect); font-weight: 500; }
.summary { display: grid; grid-template-columns: max-content 1fr; gap: 0.2rem 1rem; }
.summary dd { margin: 0; }

/* Landing page and course (specs/LEARN.md §5, §7, §10) */
a.button {
  display: inline-block; padding: 0.55rem 1.1rem; border-radius: 8px; background: var(--accent);
  color: #fff; text-decoration: none; font-weight: 500;
}
a.button:hover { background: var(--accent-hover); color: #fff; }
.button-large { font-size: 1.05rem; padding: 0.7rem 1.4rem; }
.landing-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.landing-cards .card { margin-bottom: 0; }
.landing-cards + .card { margin-top: 1rem; }
/* Landing leaderboard: a quiet race track, one lane per learner past 0 %. */
.race h2 { font-size: 1.05rem; }
.race h2 a { color: inherit; text-decoration: none; }
.race h2 a:hover { text-decoration: underline; }
.race-lanes { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.race-lane { display: grid; grid-template-columns: minmax(4rem, 9rem) 1fr 3rem; align-items: center; gap: 0.6rem; font-size: 0.9rem; }
.race-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.race-track {
  position: relative; height: 1.4rem; border-radius: 0.3rem; background:
    repeating-linear-gradient(90deg, transparent 0 0.6rem, var(--border) 0.6rem 1rem) center / 100% 2px no-repeat,
    var(--bg);
  border-right: 4px double var(--muted);
}
.race-trail {
  position: relative; display: block; height: 100%; min-width: 1.4rem; border-radius: 0.3rem;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 25%, transparent));
}
/* The emoji car faces left on most platforms: turn it towards the flag. */
.race-car { position: absolute; right: -0.2rem; top: 50%; transform: translateY(-52%) scaleX(-1); font-size: 1.1rem; line-height: 1; }
.race-pct { text-align: right; white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.race-finished .race-pct { color: var(--correct); font-weight: 600; }
.race-more { margin: 0.6rem 0 0; font-size: 0.85rem; text-align: right; }
.course-name { color: var(--muted); margin-top: -0.4rem; }
.course-done { font-weight: 600; color: var(--correct); }
.lang-switch { display: flex; justify-content: flex-end; gap: 0.25rem; margin: -0.4rem 0 0.75rem; }
.lang-switch button { font-size: 0.8rem; padding: 0.15rem 0.5rem; background: transparent; color: var(--muted); border: 1px solid var(--border); }
.lang-switch button:hover { background: var(--surface-hover); color: var(--fg); border-color: var(--border); }
.lang-switch button.current { background: var(--accent); color: #fff; border-color: var(--accent); }
.untranslated { border-left: 3px solid var(--partial); padding: 0.3rem 0.8rem; margin: 0 0 0.75rem; font-size: 0.9rem; }
.note-untranslated { font-size: 0.9rem; color: var(--muted); font-style: italic; }
.crumbs { font-size: 0.85rem; color: var(--muted); margin: 0 0 0.75rem; }
.course-progress {
  display: flex; align-items: center; gap: 0.6rem; font-size: 0.75rem; color: var(--muted);
  margin: 0.75rem 0 0;
}
.course-progress progress {
  flex: 1; max-width: 12rem; height: 4px; border: 0; border-radius: 2px;
  background: var(--border); appearance: none; -webkit-appearance: none;
}
.course-progress progress::-webkit-progress-bar { background: var(--border); border-radius: 2px; }
.course-progress progress::-webkit-progress-value { background: var(--muted); border-radius: 2px; }
.course-progress progress::-moz-progress-bar { background: var(--muted); border-radius: 2px; }
.step-list { list-style: none; padding: 0; margin: 0; }
.step-item { padding: 0.45rem 0 0.45rem 1.6rem; border-bottom: 1px solid var(--border); position: relative; }
.step-item::before { position: absolute; left: 0.2rem; color: var(--muted); content: "○"; }
.step-item.done::before { content: "✓"; color: var(--correct); }
.step-item.next-up { font-weight: 600; }
.step-item.next-up::before { content: "→"; color: var(--accent); }
.skip-link { color: var(--muted); }
.missing-lessons { font-size: 0.9rem; color: var(--muted); }
.step-practice { font-style: italic; }
.lesson-body { font-size: 1.05rem; }
.lesson-body svg, .lesson-body img { max-width: 100%; height: auto; }
.lesson-body figure { margin: 1.2rem 0; text-align: center; }
.lesson-body figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.3rem; }
.lesson-body blockquote { margin: 1rem 0; padding: 0.5rem 0.9rem; border-left: 3px solid var(--accent); background: #eef2ff; border-radius: 0 var(--radius) var(--radius) 0; }
.lesson-body blockquote p { margin: 0.3rem 0; }
.lesson-body table { border-collapse: collapse; margin: 0.8rem 0; }
.lesson-body th, .lesson-body td { border: 1px solid var(--border); padding: 0.3rem 0.7rem; text-align: left; }
.lesson-sources, .learn-more-links { font-size: 0.9rem; }
.lesson-sources h2 { font-size: 0.95rem; color: var(--muted); }
.language-note { font-size: 0.8rem; color: var(--muted); margin-left: 0.4rem; }
.prev-next form { margin: 0 0 0 auto; }
.practice fieldset { margin: 0; }
.options li.mark-correct { border-color: var(--correct); background: #f2fbf5; }
.options li.mark-wrong { border-color: var(--incorrect); background: #fdf2f1; opacity: 0.7; }
.options li.mark-wrong label { cursor: not-allowed; text-decoration: line-through; }
.practice-verdict { font-weight: 600; }
.verdict-correct { color: var(--correct); }
.verdict-incorrect { color: var(--incorrect); }
.answer-note { border-left: 3px solid var(--correct); padding: 0.2rem 0 0.2rem 0.8rem; margin: 0.5rem 0; }
.review-links { font-size: 0.9rem; }
.practice-field { border-left: 3px solid var(--border); padding-left: 0.6rem; }
.practice-field textarea { width: 100%; }
.practice-field.field-solved { border-left-color: var(--correct); }
.practice-field.field-wrong { border-left-color: var(--incorrect); }
.solved-answer { background: #f2fbf5; border: 1px solid var(--correct); border-radius: var(--radius); padding: 0.4rem 0.6rem; margin: 0.3rem 0; }
.spelling-hint { font-size: 0.9rem; color: var(--partial); }
.part-done { font-weight: 600; color: var(--correct); }
.xp-total { font-size: 1.1rem; font-weight: 700; color: var(--accent); }
.badge-shelf h2 { font-size: 1rem; margin-top: 0; }
.badge-shelf ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.badge { font-size: 0.85rem; padding: 0.3rem 0.8rem; border-radius: 1rem; border: 1px solid var(--border); }
.badge.earned { background: #fff7e0; border-color: var(--partial); color: var(--fg); font-weight: 600; }
.badge.earned::before { content: "★ "; color: var(--partial); }
.toast {
  background: #fff7e0; border: 1px solid var(--partial); border-radius: var(--radius);
  padding: 0.6rem 1rem; margin: 0 0 1rem; font-weight: 600;
}
.toast::before { content: "★ "; color: var(--partial); }

/* Progress cards (progress page, dashboard): one tile per module. */
.learner-progress h2 { margin: 0; }
.lp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.lp-pct { font-size: 1.6rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.lp-bar { height: 0.7rem; margin: 0.5rem 0 0.4rem; background: var(--border); border-radius: 1rem; overflow: hidden; }
.lp-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--correct)); border-radius: 1rem; }
.lp-counts { margin: 0 0 0.5rem; color: var(--muted); font-size: 0.9rem; }
.lp-counts strong { color: var(--fg); }
.lp-part-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.2rem 1rem; margin: 1rem 0 0.4rem; }
.lp-part { font-size: 0.85rem; font-weight: 600; color: var(--muted); margin: 0; text-transform: uppercase; letter-spacing: 0.03em; }
.lp-part-head .part-continue, .lp-part-head .part-done { font-size: 0.85rem; }
.lp-modules {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); gap: 0.45rem;
}
.lp-module {
  display: flex; flex-direction: column; gap: 0.3rem; padding: 0.5rem 0.6rem;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-size: 0.8rem; line-height: 1.3;
}
.lp-module:has(> .lp-link) { padding: 0; }
.lp-link { display: flex; flex-direction: column; gap: 0.3rem; flex: 1; padding: 0.5rem 0.6rem; color: inherit; text-decoration: none; border-radius: 8px; }
.lp-link:hover { background: #eef2ff; }
.lp-title { flex: 1; font-weight: 500; }
.lp-mini { height: 0.3rem; background: var(--border); border-radius: 1rem; overflow: hidden; }
.lp-mini > span { display: block; height: 100%; background: var(--accent); }
.lp-steps { color: var(--muted); font-variant-numeric: tabular-nums; }
.lp-not-started { color: var(--muted); background: var(--bg); }
.lp-in-progress { border-color: #c7d4f5; }
.lp-completed { background: #e6f4ea; border-color: #b7dfc3; }
.lp-completed .lp-mini > span { background: var(--correct); }
.lp-completed .lp-steps, .lp-check { color: var(--correct); font-weight: 600; }

/* Phones: tighter gutters, stacked rows, 16px fields. */
@media (max-width: 600px) {
  main { padding: 0.75rem 0.75rem 1.5rem; }
  .topbar { position: static; padding: 0.6rem 0.75rem; }
  .card, .question { padding: 1rem 0.9rem; }
  h1 { font-size: 1.25rem; }
  /* Below 16px, iOS Safari zooms the page in when a field takes focus. */
  select, input[type=text], textarea { font-size: 1rem; max-width: 100%; }
  .choice { margin-right: 0.8rem; padding: 0.2rem 0; }
  .q-meta { gap: 0.2rem 0.75rem; font-size: 0.78rem; }
  .stem { font-size: 1rem; }
  .lesson-body { font-size: 1rem; }
  .options li label { padding: 0.65rem 0.7rem; }
  .answer-actions button { flex: 1 1 auto; }
  .prev-next { flex-wrap: wrap; }
  .part-bar { flex-wrap: wrap; gap: 0.2rem 0.6rem; margin-bottom: 0.8rem; }
  .part-name { width: 100%; font-size: 0.9rem; }
  .part-score { width: auto; }
  .module-title { flex-basis: 100%; }
  .resume-item { flex-wrap: wrap; }
  .summary { grid-template-columns: 1fr; }
  .summary dd { margin-bottom: 0.4rem; }
  .lp-head { flex-wrap: wrap; }
  .race-lane { grid-template-columns: 5rem 1fr 3rem; }
}

/* Touch screens: no keyboard, bigger targets. */
@media (hover: none) and (pointer: coarse) {
  .key-hint { display: none; }
  .grid-cell { width: 2.5rem; height: 2.5rem; font-size: 0.9rem; }
  .grid-nav { gap: 0.4rem; }
  .lang-switch button { padding: 0.35rem 0.8rem; }
  .topbar nav a { padding: 0.25rem 0; }
}

/* Finishing touches: touch feedback, selected and current states, motion.
   Everything here is progressive: an older browser just skips it. */
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
a, button, label, summary, .grid-cell { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
input[type=radio], input[type=checkbox] { accent-color: var(--accent); }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* A card's first heading sits at its padding, not a heading margin below it. */
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

/* The section you are in. */
.topbar nav a { padding-block: 0.15rem; }
.topbar nav a[aria-current=page] { color: var(--fg); box-shadow: inset 0 -2px 0 var(--accent); }

/* Pressing a button or an option answers the finger. */
button, a.button { transition: background-color 0.12s ease, border-color 0.12s ease, transform 0.08s ease; }
button:active:not(:disabled), a.button:active { transform: scale(0.97); }
button:disabled { opacity: 0.6; cursor: progress; }
.options li:not([class*=mark-]):has(input:checked) {
  border-color: var(--accent); background: #eef2ff; box-shadow: inset 0 0 0 1px var(--accent);
}
.options li:not([class*=mark-]):active { background: var(--surface-hover); }
.grid-cell.current { font-weight: 700; }

/* Previous / Next read as controls, with room for a thumb. */
.prev-next a { text-decoration: none; font-weight: 500; padding-block: 0.35rem; }
.prev-next a:hover { text-decoration: underline; }

/* Module steps: the whole row is the link. */
.step-item { padding: 0 0 0 1.6rem; }
.step-item::before { top: 0.55rem; }
.step-item a { display: block; padding: 0.55rem 0; color: var(--fg); text-decoration: none; }
.step-item a:hover, .step-item.next-up a { color: var(--accent); }
.step-item .hint { display: block; text-align: left; margin: -0.35rem 0 0.5rem; }

/* Feedback arrives, bars fill. */
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px); } }
@keyframes fill-in { from { transform: scaleX(0); } }
.toast, .saved-flash, .practice-verdict, .answer-note, .solved-answer { animation: pop-in 0.25s ease-out; }
.lp-bar > span, .lp-mini > span, .bar-fill { transform-origin: left; animation: fill-in 0.6s ease-out; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Landing: days left before EXAM_DATE, while it is ahead. */
.countdown { display: flex; align-items: center; gap: 1rem; border-left: 4px solid var(--accent); padding-block: 0.9rem; }
.countdown-num {
  font-size: 2.4rem; font-weight: 800; line-height: 1; color: var(--accent);
  font-variant-numeric: tabular-nums; min-width: 2ch; text-align: center;
}
.countdown-text { display: flex; flex-direction: column; }
.countdown-date { font-size: 0.9rem; color: var(--muted); }
