/* Design rules (shared with MedTech Reviewer and the portfolio): midnight blue and cool paper, solid cobalt actions,
   no gradients, no italics, no coloured glows. The accent means "link, current, or press this", never decoration.
   Every status has words. Light is the default; dark follows the OS unless the toggle picked a side.
   The two dark blocks are identical on purpose. */

@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eaf0f7;
  --surface-3: #dfe8f3;
  --line: #d5deeb;
  --ink: #172337;
  --muted: #4f6077;
  --accent: #2a4fd6;
  --accent-soft: rgba(42, 79, 214, 0.08);
  --action: #2a4fd6;
  --action-hover: #2442b8;
  --action-ink: #ffffff;
  --action-line: #2a4fd6;
  --ok: #2b7a4b;
  --ok-soft: rgba(43, 122, 75, 0.1);
  --bad: #b42318;
  --bad-soft: rgba(180, 35, 24, 0.08);
  --warn: #8a5a12;
  --warn-soft: rgba(168, 120, 42, 0.12);

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --radius: 10px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --tabbar-h: 62px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #081322;
    --surface: #0f1d32;
    --surface-2: #172941;
    --surface-3: #1f3552;
    --line: #2a3b55;
    --ink: #edf3ff;
    --muted: #b2c0d4;
    --accent: #8badff;
    --accent-soft: rgba(139, 173, 255, 0.1);
    --action: #2a4fd6;
    --action-hover: #3a5fe6;
    --action-ink: #ffffff;
    --action-line: #7696f4;
    --ok: #5fc08a;
    --ok-soft: rgba(95, 192, 138, 0.12);
    --bad: #ff8f86;
    --bad-soft: rgba(255, 143, 134, 0.1);
    --warn: #e2b85f;
    --warn-soft: rgba(226, 184, 95, 0.12);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #081322;
  --surface: #0f1d32;
  --surface-2: #172941;
  --surface-3: #1f3552;
  --line: #2a3b55;
  --ink: #edf3ff;
  --muted: #b2c0d4;
  --accent: #8badff;
  --accent-soft: rgba(139, 173, 255, 0.1);
  --action: #2a4fd6;
  --action-hover: #3a5fe6;
  --action-ink: #ffffff;
  --action-line: #7696f4;
  --ok: #5fc08a;
  --ok-soft: rgba(95, 192, 138, 0.12);
  --bad: #ff8f86;
  --bad-soft: rgba(255, 143, 134, 0.1);
  --warn: #e2b85f;
  --warn-soft: rgba(226, 184, 95, 0.12);
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
em, i { font-style: normal; color: var(--accent); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 0.5rem; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); font-weight: 650; }
h2 { font-size: 1.25rem; font-weight: 620; margin-top: 1.75rem; }
h3 { font-size: 0.95rem; font-weight: 620; }
p { margin: 0 0 0.75rem; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
code, pre { font-family: var(--font-mono); font-size: 0.9em; }
:not(pre) > code { background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 5px; }
pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--surface); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }
.muted, .meta { color: var(--muted); }
.meta { font-size: 0.9rem; }
.prewrap { white-space: pre-wrap; }
.label, .eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.35rem;
}
.lead { font-size: 1.05rem; color: var(--muted); max-width: 62ch; }

/* ---------- layout ---------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  flex-wrap: wrap;
}
.brand { color: var(--ink); text-decoration: none; font-weight: 650; display: inline-flex; align-items: center; gap: 0.5rem; }
.brand-mark {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--action);
  color: var(--action-ink);
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
}
.topnav { display: flex; gap: 0.25rem; }
.topnav a { color: var(--muted); text-decoration: none; padding: 0.35rem 0.6rem; border-radius: 8px; }
.topnav a:hover { color: var(--ink); background: var(--surface-2); }
.topnav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.topbar-end { margin-left: auto; display: flex; gap: 0.5rem; align-items: center; }
.topbar-end form { margin: 0; }

.page { max-width: 1100px; margin: 0 auto; padding: 1.5rem 16px 4rem; }
.narrow { max-width: 760px; margin: 0 auto; }
.page-head { margin-bottom: 1.25rem; }
.crumbs { font-size: 0.9rem; color: var(--muted); margin-bottom: 1rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.stack > * + * { margin-top: 1rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1rem 0 1.5rem; }
.actions form { margin: 0; }

/* ---------- cards ---------- */

/* The only shadow: a solid neutral offset behind a card (the "plate"). */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 5px 5px 0 var(--line);
}
.card h2 { margin-top: 0.35rem; }
.card-link { display: block; color: inherit; text-decoration: none; transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out); }
.card-link:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--line); }
.card-link:hover h2 { color: var(--accent); }

.code-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--surface-2);
  padding: 0.05rem 0.45rem;
  border-radius: 6px;
}
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.tag-strong { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

.meter { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin: 0.75rem 0 0.5rem; }
.meter span { display: block; height: 100%; background: var(--action); border-radius: inherit; }

.notice { border: 1px solid var(--warn); background: var(--warn-soft); padding: 0.75rem 1rem; border-radius: var(--radius); }

/* ---------- buttons and forms ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  border: 1px solid var(--action-line);
  background: var(--action);
  color: var(--action-ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--action-hover); }
.btn-quiet { background: var(--surface); color: var(--accent); border-color: var(--action-line); }
.btn-quiet:hover { background: var(--accent-soft); }
.ghost {
  font: inherit;
  font-size: 0.9rem;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 8px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
}
.ghost:hover { background: var(--surface-2); }

.field { display: block; }
.field > span { display: block; font-weight: 600; margin-bottom: 0.35rem; }
input[type="text"], input[type="password"], input:not([type]), textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
}
input:focus, textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent-soft); }
textarea { resize: vertical; }
.form-error { color: var(--bad); font-weight: 600; }
.login { margin-top: 3rem; }

/* ---------- subject and lessons ---------- */

.lesson-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.lesson-row { display: flex; gap: 1rem; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.lesson-row form { margin: 0; }
.lesson-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; flex: 0 0 auto; }
/* The text takes the remaining width, so the buttons stay on the right whenever there is room. */
.lesson-row > div:first-child { flex: 1 1 320px; min-width: 0; }
/* Blue means a link: the title opens the lesson, same as the Read button. */
.lesson-title { font-weight: 620; font-size: 1.1rem; color: var(--accent); text-decoration: none; }
.lesson-title:hover { text-decoration: underline; }
.num {
  display: inline-grid;
  place-items: center;
  min-width: 1.6rem;
  height: 1.6rem;
  margin-right: 0.5rem;
  border-radius: 6px;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.lesson-layout { display: grid; gap: 1.5rem; }
.study-path ol { list-style: none; margin: 0; padding: 0; }
.study-path li a {
  display: flex;
  align-items: center;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
}
.study-path li a:hover { background: var(--surface-2); }
.study-path li a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; outline: 1px solid var(--accent); }
.path-menu { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 0.5rem 0.75rem; }
.path-menu summary { cursor: pointer; font-weight: 600; padding: 0.25rem 0; }
.path-full { display: none; }

@media (min-width: 900px) {
  .lesson-layout { grid-template-columns: 240px 1fr; align-items: start; }
  .study-path { position: sticky; top: 1rem; }
  .path-menu { display: none; }
  .path-full { display: block; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 0.75rem; }
}

.lesson-card { margin-bottom: 1.5rem; scroll-margin-top: 1rem; }
.lesson-card > * + * { margin-top: 1rem; }
.card-head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.plain p:last-child { margin-bottom: 0; }

.compare { display: grid; gap: 0.75rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .compare { grid-template-columns: 1fr 1fr; } }
.code-box { border: 1px solid var(--line); border-radius: 8px; padding: 0.75rem; background: var(--bg); min-width: 0; }
.code-box pre { background: var(--surface-2); padding: 0.6rem 0.75rem; border-radius: 6px; }
.code-box .result { margin: 0.5rem 0 0; font-size: 0.9rem; color: var(--muted); }
.code-box .result strong { color: var(--ink); font-family: var(--font-mono); font-weight: 600; }
.compare-note { grid-column: 1 / -1; color: var(--muted); font-size: 0.9rem; margin: 0; }

.box { border: 1px solid var(--line); border-radius: 8px; padding: 0.75rem 1rem; }
.box h3 { margin-bottom: 0.35rem; }
.box > :last-child { margin-bottom: 0; }
.check { border-color: var(--action-line); background: var(--accent-soft); }
pre.code { background: var(--surface-2); border: 1px solid var(--line); padding: 0.75rem 1rem; border-radius: 8px; margin: 0.5rem 0 0.75rem; }
.check-choices { margin: 0.25rem 0 0.75rem; padding-left: 1.5rem; }

details > summary { cursor: pointer; font-weight: 600; color: var(--accent); }
details.reveal { margin-top: 0.5rem; }
details.reveal[open] > summary { margin-bottom: 0.5rem; }
.answer { font-weight: 600; margin-bottom: 0.5rem; }
/* Model answers and answer-key tables are long: normal weight reads better. */
.answer-long { font-weight: 400; }
/* Code blocks written in lesson markdown (More detail, answers). */
details pre, .plain pre, .box pre:not(.code) {
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin: 0.5rem 0 0.75rem;
}
details table, .box table { margin: 0.5rem 0 0.75rem; }
details.more { border-top: 1px dashed var(--line); padding-top: 0.75rem; }
details.more[open] > summary { margin-bottom: 0.5rem; }
.points { margin: 0 0 0.5rem; padding-left: 1.25rem; }

.lesson-foot { display: flex; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; align-items: center; margin-top: 1rem; }
.lesson-foot form { margin: 0; }

/* ---------- tests ---------- */

.qblock { margin-top: 0.5rem; }
.q-top .meta { margin: 0; }
.q-top .meter { margin-top: 0.4rem; }
.q-prompt { font-size: 1.1rem; font-weight: 550; margin-top: 1rem; }

.choices { border: 0; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.choices legend { font-weight: 600; margin-bottom: 0.5rem; padding: 0; }
.choice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}
label.choice:hover { border-color: var(--accent); }
label.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); outline: 1px solid var(--accent); }
.choice input { margin-top: 0.35rem; accent-color: var(--action); }
.choice-key {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  min-width: 1.4rem;
  height: 1.4rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  margin-top: 0.15rem;
}
.result-list { list-style: none; }
.result-list .choice, .points.marked li { cursor: default; justify-content: space-between; }
.points.marked { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.points.marked li { display: flex; gap: 0.75rem; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 0.6rem 0.8rem; justify-content: flex-start; }
.is-correct { border-color: var(--ok) !important; background: var(--ok-soft) !important; }
.is-wrong { border-color: var(--bad) !important; background: var(--bad-soft) !important; }
.flag { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
.is-correct .flag { color: var(--ok); }
.is-wrong .flag { color: var(--bad); }

.verdict { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.05rem; margin: 1rem 0; }
.verdict-icon { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 999px; font-size: 0.9rem; }
.verdict-ok { color: var(--ok); }
.verdict-ok .verdict-icon { background: var(--ok-soft); }
.verdict-bad { color: var(--bad); }
.verdict-bad .verdict-icon { background: var(--bad-soft); }
.verdict-part { color: var(--warn); }
.verdict-part .verdict-icon { background: var(--warn-soft); }

.timer { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.timer-clock { font-family: var(--font-mono); font-size: 1.4rem; font-weight: 600; min-width: 5ch; }
.timer.is-done .timer-clock { color: var(--warn); }

.answers { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1rem; margin: 0.75rem 0; }
.answers dt { font-weight: 600; color: var(--muted); }
.answers dd { margin: 0; }
.qblock .box { margin-top: 0.75rem; }
.block-actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-top: 1.25rem; }

.score { text-align: center; }
.score .verdict { justify-content: center; }
.score-num { font-size: 3rem; font-weight: 700; margin: 0; letter-spacing: -0.02em; }
.missed { margin-bottom: 1rem; }
.missed .verdict { margin-top: 0; }
.weak-list { list-style: none; padding: 0; display: grid; gap: 0.75rem; }

/* ---------- tables ---------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }

/* ---------- motion: blocks rise once, one beat apart; nothing loops ---------- */

@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 600ms var(--ease-out) both; }
  .rise:nth-child(2) { animation-delay: 60ms; }
  .rise:nth-child(3) { animation-delay: 120ms; }
  .rise:nth-child(4) { animation-delay: 180ms; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  .card-link { transition: none; }
}

@media (max-width: 520px) {
  .answers { grid-template-columns: 1fr; }
  .lesson-foot > * { width: 100%; }
  .lesson-foot .btn { width: 100%; }
}

/* =====================================================================
   Interview coach: Prep page, tab bar, card stepper, interactive checks
   ===================================================================== */

.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: default; }

/* ---------- phone: bottom tab bar instead of the top links ---------- */
.tabbar { display: none; }
@media (max-width: 760px) {
  .topnav { display: none; }
  .topbar { padding: 0.6rem 16px; }
  .brand { font-size: 0.95rem; }
  .tabbar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 20;
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: var(--tabbar-h);
    color: var(--muted);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
  }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a[aria-current="page"] { color: var(--accent); }
  .tabbar a[aria-current="page"] svg { stroke-width: 2.4; }
  body.has-tabbar .page { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 2rem); }
  .page { padding-top: 1rem; }
  h1 { font-size: 1.55rem; }
}

/* ---------- Prep page ---------- */
.prep { max-width: 820px; margin: 0 auto; display: grid; gap: 1.25rem; }
.prep h2 { margin-top: 0.5rem; }
.hero { padding: 0.25rem 0; }
.countdown { font-size: clamp(2rem, 1.4rem + 3vw, 3rem); margin: 0.1rem 0 0.25rem; letter-spacing: -0.02em; }
.date-form { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }
.date-form input[type="date"] {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 0.5rem 0.75rem; min-height: 44px;
}

.coach { border-color: var(--action-line); }
.coach-label, .interviewer {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent);
  margin: 0 0 0.4rem;
}
.coach-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--action); display: inline-block; flex: none; }
.coach-text { font-size: 1.1rem; font-weight: 550; }
.coach-line { display: flex; gap: 0.6rem; align-items: baseline; color: var(--ink); background: var(--accent-soft); border-radius: 8px; padding: 0.6rem 0.8rem; }
.coach-line .coach-dot { transform: translateY(-1px); }

.session-head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.session-head h2 { margin: 0 0 0.25rem; }
.ready-ring {
  flex: none; width: 84px; height: 84px; border-radius: 999px;
  border: 6px solid var(--action);
  display: grid; place-content: center; text-align: center; line-height: 1.1;
}
.ready-ring strong { font-size: 1.25rem; }
.ready-ring span { font-size: 0.75rem; color: var(--muted); }

.quick { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.quick-item { display: grid; gap: 0.2rem; padding: 1rem 1.1rem; }
.quick-item strong { color: var(--accent); }

.path-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.path-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "num title status" "num meter count";
  gap: 0.25rem 0.75rem;
  align-items: center;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  min-height: 56px;
}
.path-row:hover { border-color: var(--accent); }
.path-row .num { grid-area: num; margin: 0; }
.path-title { grid-area: title; font-weight: 600; }
.path-status { grid-area: status; font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.path-meter { grid-area: meter; height: 5px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.path-meter span { display: block; height: 100%; background: var(--action); }
.path-count { grid-area: count; font-size: 0.8rem; white-space: nowrap; }
.status-ok { color: var(--ok); }
.status-bad { color: var(--bad); }
.status-part { color: var(--warn); }
.status-none { color: var(--muted); }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.check-item { display: flex; align-items: center; gap: 0.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding-right: 0.75rem; }
.check-item form { flex: 1; margin: 0; }
.check-toggle {
  width: 100%; display: flex; align-items: flex-start; gap: 0.75rem; text-align: left;
  font: inherit; color: var(--ink); background: none; border: 0; padding: 0.75rem; cursor: pointer; min-height: 52px;
}
.check-box {
  flex: none; width: 24px; height: 24px; border-radius: 6px; border: 2px solid var(--line);
  display: grid; place-items: center; font-weight: 800; font-size: 0.9rem; color: var(--action-ink); margin-top: 1px;
}
.is-checked .check-box { background: var(--ok); border-color: var(--ok); }
.is-checked .check-text { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line); }
.check-link { font-size: 0.85rem; white-space: nowrap; }

.recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.recent li { display: grid; gap: 0.1rem; }
.tips ul { padding-left: 1.2rem; margin-top: 0.25rem; }

/* ---------- lesson: one card at a time ---------- */
.stepper-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.5rem; }
.stepper-count { font-weight: 700; color: var(--muted); font-size: 0.9rem; }
.stepper-dots { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 1rem; }
.stepper-dots .dot {
  width: 26px; height: 8px; border-radius: 999px; border: 0; padding: 0; cursor: pointer;
  background: var(--surface-3);
}
.stepper-dots .dot.is-current { background: var(--action); }
.stepper-bar { display: flex; justify-content: space-between; gap: 0.75rem; margin: 0.5rem 0 1rem; }
.stepper-bar .btn { flex: 1; }
.stepper-bar .btn[hidden] { display: none; }
@media (max-width: 760px) {
  .stepper-bar {
    position: sticky;
    bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px);
    z-index: 10;
    background: var(--bg);
    padding: 0.5rem 0;
    margin: 0;
  }
  .lesson-card { box-shadow: none; }
}

/* Guess the result, then reveal it. */
details.guess { margin-top: 0.5rem; }
details.guess > summary {
  font-size: 0.85rem; font-weight: 600; color: var(--accent);
  border: 1px dashed var(--action-line); border-radius: 6px; padding: 0.35rem 0.6rem; list-style: none; display: inline-block;
}
details.guess > summary::-webkit-details-marker { display: none; }
details.guess[open] > summary { display: none; }
details.guess .result { margin-top: 0; }

/* ---------- lesson: interactive quick checks ---------- */
.check-choices.is-interactive { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.check-choice {
  width: 100%; text-align: left; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 0.65rem 0.85rem; min-height: 48px; cursor: pointer;
}
.check-choice:hover:not(:disabled) { border-color: var(--accent); }
.check-choice:disabled { cursor: default; }
.check-choice.is-correct { border-color: var(--ok); background: var(--ok-soft); }
.check-choice.is-wrong { border-color: var(--bad); background: var(--bad-soft); }
.check-result { font-weight: 700; margin: 0.5rem 0; padding: 0.5rem 0.75rem; border-radius: 8px; border: 1px solid var(--line); }
.check-result.is-correct { color: var(--ok); }
.check-result.is-wrong { color: var(--bad); }
.check-form { display: flex; gap: 0.5rem; margin: 0.5rem 0; }
.check-form input { flex: 1; min-height: 44px; }
.points.is-checklist { list-style: none; padding: 0; display: grid; gap: 0.35rem; }
.point-check { display: flex; gap: 0.6rem; align-items: flex-start; cursor: pointer; }
.point-check input { margin-top: 0.4rem; accent-color: var(--ok); width: 18px; height: 18px; flex: none; }
.check .timer { margin: 0.5rem 0; }

/* ---------- tests on a phone: answer buttons within thumb reach ---------- */
.interviewer { margin-top: 1rem; }
@media (max-width: 760px) {
  body.is-test .page { padding-left: 12px; padding-right: 12px; }
  .qblock { padding: 1rem; box-shadow: none; }
  .qblock .block-actions {
    position: sticky;
    bottom: 0;
    z-index: 10;
    background: var(--surface);
    margin: 1rem -1rem -1rem;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    border-radius: 0 0 var(--radius) var(--radius);
  }
  .qblock .block-actions .btn { flex: 1 1 100%; }
  .qblock .block-actions > a:not(.btn) { width: 100%; text-align: center; }
  .choice { padding: 0.85rem 0.9rem; }
  .q-prompt { font-size: 1.05rem; }
  pre.code, .code-box pre { font-size: 0.8rem; }
}
