/* Clerk Lab — study site for ward clerks
   Layout: a single reading column (max 1080px) with a desk-like header;
   lessons are a 3-step sequence, rounds are a narrow 760px card. */
:root {
  /* color */
  --paper: #f4f3ea;
  --surface: #fffefa;
  --sunk: #ebeee2;
  --ink: #1f3a31;
  --ink-soft: #3f5a50;
  --muted: #5f6c64;
  --line: #d9ded0;
  --accent: #285a45;
  --accent-soft: #e3ecdc;
  --highlight: #d9e79a;
  --gold: #f0c96a;
  --gold-soft: #f6edd3;
  --gold-line: #dccd9f;
  --good: #2f6a33;
  --good-bg: #e5f1dc;
  --good-line: #8fb67f;
  --bad: #a3462a;
  --bad-bg: #fbebe2;
  --bad-line: #d79a7d;
  --btn-bg: #1f3a31;
  --btn-fg: #fbfbf4;
  --focus: #7a8f2a;
  --shadow: 0 1px 2px rgba(31, 58, 49, .06), 0 8px 24px rgba(31, 58, 49, .06);
  /* type */
  --display: 'Manrope', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --body: 'DM Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111916; --surface: #18221e; --sunk: #1e2a25; --ink: #e3ebe2; --ink-soft: #c3d0c6;
    --muted: #9aaaa0; --line: #2d3c35; --accent: #9fd0b0; --accent-soft: #1f3129; --highlight: #5d6b26;
    --gold: #d9b45a; --gold-soft: #2a2618; --gold-line: #5a4f2e; --good: #9fd69a; --good-bg: #1c2f1f;
    --good-line: #3f6b42; --bad: #f0a88c; --bad-bg: #36201a; --bad-line: #7a4636; --btn-bg: #d9e79a;
    --btn-fg: #14201b; --focus: #d9e79a; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #111916; --surface: #18221e; --sunk: #1e2a25; --ink: #e3ebe2; --ink-soft: #c3d0c6;
  --muted: #9aaaa0; --line: #2d3c35; --accent: #9fd0b0; --accent-soft: #1f3129; --highlight: #5d6b26;
  --gold: #d9b45a; --gold-soft: #2a2618; --gold-line: #5a4f2e; --good: #9fd69a; --good-bg: #1c2f1f;
  --good-line: #3f6b42; --bad: #f0a88c; --bad-bg: #36201a; --bad-line: #7a4636; --btn-bg: #d9e79a;
  --btn-fg: #14201b; --focus: #d9e79a; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--body);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
h1, h2, h3 { font-family: var(--display); color: var(--ink); text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: inherit; text-underline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1080px; margin: 0 auto; }
.narrow { max-width: 760px; margin: 0 auto; }
.mono { font-family: var(--mono); font-size: .85em; letter-spacing: 0; }
.eyebrow { font: 700 11px/1.3 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-block: 18px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--btn-bg); color: var(--highlight); }
:root .brand-mark svg { width: 20px; height: 20px; }
.brand-name { font: 800 23px/1 var(--display); letter-spacing: -.04em; }
.brand-name span { font-weight: 400; }
.brand-sub { display: block; font: 600 10px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { text-decoration: none; font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 8px; color: var(--ink-soft); }
.nav a:hover { background: var(--sunk); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--ink); }

main { padding-block: 40px 56px; min-height: 60vh; }
main:focus { outline: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--btn-bg); background: var(--btn-bg); color: var(--btn-fg); border-radius: 10px; padding: 13px 20px; font-weight: 600; font-size: 15px; text-decoration: none; line-height: 1.2; transition: transform .12s ease, opacity .12s; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:disabled { opacity: .4; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover:not(:disabled) { border-color: var(--ink-soft); }
.linkbtn { background: none; border: 0; padding: 6px 0; font-weight: 600; font-size: 14px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.linkbtn:hover { text-decoration-color: currentColor; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }

/* ---------- resume banner ---------- */
.resume { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; background: var(--highlight); color: var(--ink); border-radius: 12px; padding: 14px 18px; margin-bottom: 32px; }
.resume strong { font-family: var(--display); }
.resume .btn { padding: 10px 16px; }
.resume .linkbtn { color: var(--ink); }

/* ---------- home ---------- */
.home { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); grid-template-areas: "intro sample" "lessons lessons" "topics topics"; gap: 40px 48px; align-items: center; }
.intro { grid-area: intro; }
.intro h1 { font-size: clamp(38px, 6vw, 60px); line-height: 1.04; letter-spacing: -.045em; font-weight: 800; margin: 14px 0 18px; }
.intro h1 em { font-style: normal; background: linear-gradient(transparent 62%, var(--highlight) 62%, var(--highlight) 92%, transparent 92%); }
.lede { font-size: 18px; color: var(--ink-soft); max-width: 34em; }
.sample { grid-area: sample; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); }
.sample .eyebrow { display: flex; justify-content: space-between; gap: 8px; }
.sample h2 { font-size: 19px; margin: 10px 0 6px; letter-spacing: -.02em; }
.sample p.q { color: var(--ink-soft); font-size: 15px; margin-bottom: 14px; }
.sample .options { gap: 8px; }
.sample .option { padding: 11px 12px; font-size: 14px; }
.sample .verdict { margin-top: 12px; font-size: 14px; color: var(--ink-soft); }
.lessons { grid-area: lessons; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.section-head h2 { font-size: 22px; letter-spacing: -.02em; }
.lesson-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lesson-card { display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; text-decoration: none; transition: transform .15s ease, border-color .15s; }
.lesson-card:hover { transform: translateY(-3px); border-color: var(--ink-soft); }
.lesson-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lesson-num { font: 700 12px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.meter { display: inline-flex; gap: 3px; }
.meter i { width: 16px; height: 6px; border-radius: 3px; background: var(--line); }
.meter i.on { background: var(--accent); }
.lesson-card h3 { font-size: 24px; letter-spacing: -.03em; }
.lesson-card .tagline { font-weight: 600; color: var(--ink-soft); font-size: 15px; margin-top: -6px; }
.lesson-card p.desc { font-size: 14px; color: var(--muted); }
.lesson-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.lesson-foot .go { color: var(--accent); }
.topics { grid-area: topics; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; border-top: 1px solid var(--line); padding-top: 24px; }
.topic h3 { font-size: 15px; margin-bottom: 4px; }
.topic p { font-size: 13px; color: var(--muted); }

/* ---------- lesson page ---------- */
.lesson-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 32px 48px; align-items: start; }
.lesson-page h1 { font-size: clamp(34px, 5vw, 48px); letter-spacing: -.04em; line-height: 1.08; margin: 12px 0 14px; }
.how { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; counter-reset: how; }
.how li { counter-increment: how; display: grid; grid-template-columns: 30px 1fr; gap: 12px; color: var(--ink-soft); }
.how li::before { content: counter(how); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--ink); font: 700 13px/1 var(--display); }
.setup { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: grid; gap: 20px; }
.setup fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.setup legend { font-weight: 700; font-size: 14px; margin-bottom: 10px; padding: 0; }
.choice-list { display: grid; gap: 8px; }
.choice { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; padding: 11px 14px; font-size: 14px; text-align: left; }
.choice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.choice .count { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.setup .btn { width: 100%; }
.confirm { border: 1px solid var(--gold-line); background: var(--gold-soft); border-radius: 12px; padding: 16px; display: grid; gap: 12px; font-size: 14px; }

/* ---------- round ---------- */
.round-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.round-top .label { font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: 11px; }
.round-top .count { font-family: var(--mono); }
.bar { height: 6px; border-radius: 6px; background: var(--sunk); overflow: hidden; margin: 12px 0 22px; }
.bar > div { height: 100%; background: var(--accent); border-radius: 6px; transition: width .3s ease; }
.qcard { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 4vw, 34px); box-shadow: var(--shadow); }
.qmeta { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-block; border-radius: 30px; padding: 6px 11px; background: var(--accent-soft); color: var(--ink); font-size: 12px; font-weight: 600; }
.qcard h1 { font-size: clamp(24px, 3.6vw, 30px); letter-spacing: -.03em; line-height: 1.2; margin: 18px 0 10px; }
.qcard h1:focus { outline: none; }
.scenario { font-size: 17px; color: var(--ink-soft); margin-bottom: 22px; max-width: 40em; }
.options { display: grid; gap: 10px; }
.option { display: flex; align-items: flex-start; gap: 14px; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 12px; padding: 14px 16px; font-size: 15px; line-height: 1.45; transition: border-color .12s, background .12s; }
.option:not(:disabled):hover { border-color: var(--accent); background: var(--accent-soft); }
.option .letter { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); font: 700 13px/1 var(--display); background: var(--paper); }
.option .text { padding-top: 3px; }
.option[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.option[aria-pressed="true"] .letter { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.option:disabled { cursor: default; }
.option.is-correct { background: var(--good-bg); border-color: var(--good-line); box-shadow: inset 0 0 0 1px var(--good-line); }
.option.is-correct .letter { background: var(--good); border-color: var(--good); color: var(--surface); }
.option.is-wrong { background: var(--bad-bg); border-color: var(--bad-line); box-shadow: inset 0 0 0 1px var(--bad-line); }
.option.is-wrong .letter { background: var(--bad); border-color: var(--bad); color: var(--surface); }
.option.is-dim { opacity: .62; }
.option .tag { display: block; font-size: 12px; font-weight: 700; margin-top: 2px; }
.option.is-correct .tag { color: var(--good); }
.option.is-wrong .tag { color: var(--bad); }
.actions { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-top: 22px; }
.actions .hint { font-size: 13px; color: var(--muted); flex: 1 1 240px; }
kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; background: var(--paper); }

.feedback { margin-top: 22px; border-radius: 14px; padding: 20px 22px; background: var(--good-bg); border: 1px solid var(--good-line); display: grid; gap: 10px; }
.feedback.miss { background: var(--bad-bg); border-color: var(--bad-line); }
.feedback h2 { font-size: 18px; display: flex; gap: 8px; align-items: center; }
.feedback p { font-size: 15px; }
.cue { border-top: 1px solid var(--line); padding-top: 10px; font-size: 14px !important; }
.kv { font-size: 14px; }
.kv b { font-weight: 700; }
.sources { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; font-weight: 600; }
.sources a { color: var(--accent); }
details.more { border-top: 1px solid var(--line); padding-top: 10px; }
details.more summary { cursor: pointer; font-weight: 600; font-size: 14px; }
details.more .why { display: grid; gap: 8px; margin-top: 10px; font-size: 14px; }
.followup { margin-top: 18px; background: var(--gold-soft); border: 1px solid var(--gold-line); border-radius: 14px; padding: 18px 20px; display: grid; gap: 8px; }
.followup h3 { font-size: 16px; line-height: 1.45; }
.followup details summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.followup details p { margin-top: 8px; font-size: 15px; }

/* expert */
.speak { border: 1.5px dashed var(--line); border-radius: 14px; padding: 20px 22px; background: var(--paper); display: grid; gap: 10px; }
.speak h2 { font-size: 18px; }
.speak ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-soft); }
.ruling { border-radius: 14px; padding: 18px 20px; background: var(--accent-soft); border: 1px solid var(--line); display: grid; gap: 8px; }
.ruling p { font-size: 16px; font-weight: 600; }
.points { display: grid; gap: 8px; margin-top: 18px; }
.points-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.points-head h2 { font-size: 16px; }
.point { display: flex; align-items: flex-start; gap: 12px; text-align: left; width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 12px 14px; font-size: 15px; line-height: 1.5; }
.point .box { flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 5px; border: 1.5px solid var(--muted); display: grid; place-items: center; }
.point .box svg { width: 14px; height: 14px; opacity: 0; }
.point[aria-pressed="true"] { border-color: var(--good-line); background: var(--good-bg); }
.point[aria-pressed="true"] .box { background: var(--good); border-color: var(--good); color: var(--surface); }
.point[aria-pressed="true"] .box svg { opacity: 1; }
.rate { margin-top: 22px; display: grid; gap: 12px; }
.rate h2 { font-size: 17px; }
.rate-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rate-buttons button { border: 1px solid var(--line); background: var(--paper); border-radius: 12px; padding: 14px 10px; font-weight: 600; font-size: 15px; display: grid; gap: 2px; justify-items: center; }
.rate-buttons button span { font-weight: 400; font-size: 12px; color: var(--muted); }
.rate-buttons button:hover { border-color: var(--ink-soft); }
.rate-buttons button[aria-pressed="true"][data-rating="got"] { background: var(--good-bg); border-color: var(--good); box-shadow: inset 0 0 0 1px var(--good); }
.rate-buttons button[aria-pressed="true"][data-rating="partly"] { background: var(--gold-soft); border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.rate-buttons button[aria-pressed="true"][data-rating="missed"] { background: var(--bad-bg); border-color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); }
.scoreline { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); margin-top: 14px; flex-wrap: wrap; }

/* ---------- results ---------- */
.results-top { text-align: center; display: grid; gap: 12px; justify-items: center; padding-bottom: 8px; }
.bigscore { font: 800 clamp(56px, 10vw, 84px)/1 var(--display); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.bigscore small { font-size: .38em; color: var(--muted); letter-spacing: -.02em; }
.results-top h1 { font-size: clamp(26px, 4vw, 34px); letter-spacing: -.03em; }
.results-top p { max-width: 34em; color: var(--ink-soft); }
.stat-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.stat { border: 1px solid var(--line); border-radius: 30px; padding: 6px 14px; font-size: 13px; font-weight: 600; background: var(--surface); }
.stat.good { border-color: var(--good-line); color: var(--good); }
.stat.mid { border-color: var(--gold-line); }
.stat.bad { border-color: var(--bad-line); color: var(--bad); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.panel h2 { font-size: 17px; margin-bottom: 12px; }
.topic-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.topic-row:last-child { border-bottom: 0; }
.topic-row .num { font-family: var(--mono); font-size: 13px; }
.topic-row .track { grid-column: 1 / -1; height: 6px; background: var(--sunk); border-radius: 6px; overflow: hidden; }
.topic-row .track div { height: 100%; background: var(--accent); }
.results-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin: 28px 0; }
.results-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.review-list { display: grid; gap: 10px; margin-top: 14px; }

/* ---------- case entries (results review + study guide) ---------- */
details.case { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0; }
details.case > summary { list-style: none; cursor: pointer; padding: 14px 16px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
details.case > summary::-webkit-details-marker { display: none; }
details.case > summary .status { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--sunk); color: var(--muted); }
details.case > summary .status.good { background: var(--good-bg); color: var(--good); }
details.case > summary .status.mid { background: var(--gold-soft); color: var(--ink); }
details.case > summary .status.bad { background: var(--bad-bg); color: var(--bad); }
details.case > summary .t { font-weight: 600; font-size: 15px; }
details.case > summary .t small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
details.case > summary .sec { font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: right; }
details.case[open] > summary { border-bottom: 1px solid var(--line); }
.case-body { padding: 14px 16px 18px; display: grid; gap: 10px; font-size: 14px; }
.case-body .answer { font-weight: 700; color: var(--good); }
.case-body .yours { color: var(--bad); }
.case-body ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }

/* ---------- study guide ---------- */
.guide-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 220px); gap: 12px; margin: 22px 0 8px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 20px; }
.tab { border: 1px solid var(--line); background: var(--surface); border-radius: 30px; padding: 8px 14px; font-size: 14px; font-weight: 600; }
.tab[aria-selected="true"] { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.field input, .field select { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--surface); color: var(--ink); font: 400 16px var(--body); }

/* ---------- handbook map ---------- */
.map-list { display: grid; gap: 0; margin-top: 24px; border-top: 1px solid var(--line); }
.map-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 18px 0; border-bottom: 1px solid var(--line); }
.chapter { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--sunk); font: 800 18px/1 var(--display); }
.map-item.anchor .chapter { background: var(--highlight); color: var(--ink); }
.map-item h2 { font-size: 17px; letter-spacing: -.01em; }
.map-item h2 a { text-decoration-color: var(--line); }
.map-item p { font-size: 14px; color: var(--muted); margin-top: 4px; }
.map-item .n { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; padding-top: 4px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { padding-block: 22px 32px; font-size: 12px; color: var(--muted); display: grid; gap: 4px; }

@keyframes rise { from { opacity: .4; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.feedback, .ruling, .points, .followup { animation: rise .22s ease; }

@media (max-width: 860px) {
  .home { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "lessons" "sample" "topics"; gap: 32px; }
  .lesson-grid { grid-template-columns: minmax(0, 1fr); }
  .topics { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .lesson-page { grid-template-columns: minmax(0, 1fr); }
  .results-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  main { padding-block: 24px 40px; }
  .brand-sub { display: none; }
  .nav a { padding: 6px 9px; font-size: 13px; }
  .lede { font-size: 16px; }
  .scenario { font-size: 16px; }
  .option { font-size: 14px; padding: 12px; gap: 12px; }
  .actions .btn { flex: 1 1 100%; }
  .rate-buttons { grid-template-columns: minmax(0, 1fr); }
  .rate-buttons button { grid-template-columns: auto 1fr; justify-items: start; text-align: left; gap: 10px; padding: 13px 14px; }
  .guide-tools { grid-template-columns: minmax(0, 1fr); }
  .map-item { grid-template-columns: 44px minmax(0, 1fr); }
  .map-item .n { grid-column: 2; padding-top: 0; }
  .chapter { width: 40px; height: 40px; font-size: 16px; }
  details.case > summary { grid-template-columns: auto minmax(0, 1fr); }
  details.case > summary .sec { grid-column: 2; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
