/*
  lesson.css: all visual styling. System fonts only. No images, no web fonts.
  Colors are set once in :root. Every text/background pair meets WCAG 2.1 AA (4.5:1).
*/
:root {
  --paper: #f5f2ea;
  --surface: #fcfbf7;
  --ink: #1b1a17;
  --ink-2: #4a463e;
  --ink-3: #635e54;
  --rule: #d9d3c4;
  --rule-strong: #8d877a;
  --accent: #0f4f46;
  --accent-dark: #0a3b34;
  --accent-tint: #e3ece8;
  --warn: #8a3b12;
  --warn-tint: #f6e9df;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 62ch;
  --pad: clamp(20px, 5vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

p, ul, ol, dl, dd, figure, blockquote, h1, h2, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus { outline: none; }

/* ---------- frame ---------- */

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 4px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; outline-color: var(--accent); }

.bar {
  position: sticky; top: 0; z-index: 5;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.bar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1200px; margin: 0 auto; padding: 12px var(--pad);
}
.bar-name { font-family: var(--serif); font-size: 1.0625rem; font-style: italic; letter-spacing: 0.01em; }
.progress { height: 2px; background: transparent; }
.progress-fill { display: block; height: 2px; width: 0; background: var(--accent); transition: width 400ms ease; }

main { flex: 1 0 auto; width: 100%; max-width: 1200px; margin: 0 auto; padding: clamp(28px, 6vw, 72px) var(--pad) 48px; }
main:focus { outline: none; }

.foot { border-top: 1px solid var(--rule); }
.foot p { max-width: 1200px; margin: 0 auto; padding: 16px var(--pad) 22px; font-size: 0.8125rem; line-height: 1.5; color: var(--ink-3); }

/* ---------- type ---------- */

.eyebrow {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 18px;
}
.h-screen, .h-question, .h-sprint {
  font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em;
  font-size: clamp(1.875rem, 4.2vw, 3rem); line-height: 1.12; max-width: 22ch;
  margin-bottom: 28px; text-wrap: balance;
}
.h-question { font-size: clamp(1.5rem, 2.8vw, 2.125rem); line-height: 1.2; max-width: 28ch; margin-bottom: 20px; }
.h-sprint { font-size: clamp(1.375rem, 2.4vw, 1.75rem); margin-bottom: 20px; }
.h-panel {
  font-family: var(--sans); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-2); margin-bottom: 14px;
}
.lead { font-size: 1.1875rem; line-height: 1.55; color: var(--ink-2); max-width: var(--measure); margin-bottom: 32px; }
.prose { max-width: var(--measure); }
.prose p { font-size: 1.1875rem; line-height: 1.62; margin-bottom: 1.1em; }
.cite { font-size: 0.8125rem; line-height: 1.5; color: var(--ink-3); margin-top: 14px; max-width: var(--measure); }
.cite-label { font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.6875rem; }
.footnote { font-size: 0.875rem; color: var(--ink-3); max-width: var(--measure); margin-top: 24px; }

.screen { animation: rise 260ms ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- buttons ---------- */

.btn {
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 12px 24px; border-radius: 4px; border: 1.5px solid transparent;
  cursor: pointer; text-align: center;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-primary:active { transform: translateY(1px); }
.btn-large { min-height: 54px; padding: 15px 34px; font-size: 1.0625rem; }
.btn-secondary { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-secondary:hover { background: var(--accent-tint); }
.btn-quiet { background: transparent; color: var(--ink-2); border-color: transparent; padding-left: 12px; padding-right: 12px; }
.btn-quiet:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.btn-link { background: transparent; color: var(--accent); border-color: transparent; padding: 6px 0; min-height: 36px; text-decoration: underline; text-underline-offset: 4px; }
.btn-link:hover { color: var(--accent-dark); }
.btn[disabled] { cursor: default; opacity: 1; color: var(--ink-3); background: transparent; border-color: var(--rule); text-decoration: none; }
.bar .btn { min-height: 38px; padding: 7px 14px; font-size: 0.9375rem; }

.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 44px; flex-wrap: wrap; }
.nav-right { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- title ---------- */

.screen-title { position: relative; padding: clamp(8px, 4vw, 56px) 0 8px; }
.screen-title::after {
  content: "\00a7\2009 101"; position: absolute; right: 0; top: -24px; z-index: -1;
  font-family: var(--serif); font-size: clamp(9rem, 26vw, 23rem); line-height: 1; letter-spacing: -0.04em;
  color: #e9e4d6; pointer-events: none; white-space: nowrap;
}
.h-title {
  font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em;
  font-size: clamp(2.75rem, 8.4vw, 6rem); line-height: 1; max-width: 11ch; margin-bottom: 28px;
}
.title-sub { font-family: var(--serif); font-size: clamp(1.25rem, 2.4vw, 1.625rem); line-height: 1.35; max-width: 30ch; color: var(--ink-2); margin-bottom: 36px; }
.title-facts { display: flex; flex-wrap: wrap; gap: 8px 0; margin-bottom: 40px; font-size: 0.875rem; color: var(--ink-2); }
.title-facts li { padding: 0 16px; border-left: 1px solid var(--rule-strong); }
.title-facts li:first-child { padding-left: 0; border-left: 0; }
.title-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 20px; }
.title-resume { font-size: 0.9375rem; color: var(--ink-2); }
.label-note {
  margin-top: 56px; max-width: 58ch; padding: 14px 18px;
  border-left: 3px solid var(--ink); background: var(--surface);
  font-size: 0.9375rem; line-height: 1.5; color: var(--ink);
}

/* ---------- map ---------- */

.map { counter-reset: step; max-width: 780px; border-top: 1px solid var(--rule); }
.map-step {
  counter-increment: step; position: relative;
  padding: 26px 0 26px 72px; border-bottom: 1px solid var(--rule);
}
.map-step::before {
  content: counter(step); position: absolute; left: 0; top: 22px;
  font-family: var(--serif); font-size: 2.75rem; line-height: 1; color: var(--accent);
}
.map-name { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 6px; }
.map-question { font-family: var(--serif); font-size: clamp(1.1875rem, 2vw, 1.4375rem); line-height: 1.3; margin-bottom: 14px; max-width: 38ch; }
.map-exits { display: grid; gap: 6px; }
.map-exit { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 0.9375rem; color: var(--ink-2); }
.map-answer { font-weight: 700; color: var(--ink); min-width: 2.4em; }
.map-end { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); border: 1px solid var(--ink); border-radius: 2px; padding: 1px 6px; }
.map-exit.is-end .map-then { color: var(--ink); font-weight: 600; }
.map-cite { font-size: 0.8125rem; color: var(--ink-3); margin-top: 10px; }

/* ---------- terms ---------- */

.terms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; max-width: 980px; }
.term { padding: 22px 0; border-top: 1px solid var(--rule); }
.term dt { font-family: var(--serif); font-size: 1.4375rem; line-height: 1.2; margin-bottom: 8px; }
.term dd p { font-size: 1rem; line-height: 1.55; color: var(--ink-2); max-width: 46ch; }
.term dd .term-cite { font-size: 0.8125rem; color: var(--ink-3); margin-top: 8px; }

/* ---------- docket ---------- */

.docket-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.docket { border-top: 1px solid var(--rule); }
.docket-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.docket-num { font-family: var(--serif); font-size: 2rem; line-height: 1; color: var(--accent); }
.docket-title { font-family: var(--serif); font-size: 1.3125rem; line-height: 1.25; }
.docket-meta { font-size: 0.875rem; color: var(--ink-3); margin-top: 2px; }
.docket-row.is-locked .docket-num, .docket-row.is-locked .docket-title { color: var(--ink-3); }
.docket-row.is-optional .docket-num { color: var(--ink-3); }

.chip {
  display: inline-block; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 2px; border: 1px solid var(--rule-strong); color: var(--ink-2); white-space: nowrap;
}
.chip-next { border-color: var(--ink); color: var(--ink); }
.chip-decided { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-decided::before { content: "\2713\00a0"; }
.chip-locked, .chip-optional { border-style: dashed; }

.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 24px; }
.panel-note { font-size: 0.875rem; line-height: 1.5; color: var(--ink-3); margin-top: 6px; max-width: 52ch; }

.mastery { display: grid; gap: 18px; }
.mastery-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.mastery-step { font-weight: 600; font-size: 0.9375rem; }
.mastery-level { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.level-mastered .mastery-level::before { content: "\2713\00a0"; }
.meter { height: 6px; background: #e6e0d1; border-radius: 3px; margin: 7px 0 6px; overflow: hidden; }
.meter-fill { display: block; height: 6px; width: 0; background: var(--accent); border-radius: 3px; transition: width 600ms ease; }
.level-review .meter-fill { background: var(--warn); }
.level-developing .meter-fill { background: var(--rule-strong); }
.mastery-count { font-size: 0.8125rem; color: var(--ink-3); line-height: 1.4; }
.level-count .mastery-level { text-transform: none; letter-spacing: 0; font-size: 0.8125rem; font-weight: 600; }
.level-count .meter-fill { background: var(--rule-strong); }
.mastery-recovery { font-size: 0.8125rem; color: var(--ink-2); line-height: 1.4; margin-top: 2px; }
.mastery-compact { gap: 14px; }

/* ---------- case intro ---------- */

.case-line { font-size: 0.9375rem; color: var(--ink-3); margin: -14px 0 28px; }
.callout { margin: 28px 0 20px; font-family: var(--serif); font-style: italic; font-size: 1.125rem; color: var(--ink-2); max-width: var(--measure); }
.screen-case .claim { max-width: 760px; }
.given { margin: 24px 0 8px; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--accent-tint); max-width: var(--measure); font-size: 1rem; line-height: 1.5; }
.given-label { font-weight: 700; }

/* ---------- claim sheet ---------- */

.claim { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; }
.claim-summary {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 14px 22px; cursor: pointer; list-style: none; border-radius: 6px;
}
.claim-summary::-webkit-details-marker { display: none; }
.claim-summary-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.claim-summary-hint { font-size: 0.875rem; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.claim[open] .claim-summary-hint { display: none; }
.claim[open] .claim-summary { border-bottom: 1px solid var(--rule); border-radius: 6px 6px 0 0; }
.claim-inner { padding: 20px 22px 18px; }
.claim-preamble { font-family: var(--serif); font-size: 1.0625rem; line-height: 1.5; margin-bottom: 12px; }
.claim-lims { display: grid; gap: 4px; }
.claim-lim {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px;
  padding: 9px 10px 9px 12px; border-left: 3px solid transparent; border-radius: 0 4px 4px 0;
  transition: background-color 160ms ease;
}
.claim-num { font-size: 0.8125rem; font-weight: 600; color: var(--ink-3); padding-top: 3px; }
.claim-text { font-family: var(--serif); font-size: 1.0625rem; line-height: 1.5; }
.claim-tag { display: block; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 2px; }
.claim-lim.is-exception { border-left: 3px solid var(--accent); background: var(--accent-tint); }
.claim-lim.is-exception .claim-tag { color: var(--accent-dark); }
.claim-lim.is-additional { border-left: 3px dotted var(--rule-strong); }
.claim-lim.is-additional .claim-tag { color: var(--ink-3); }
.claim-lim.is-focus { border-left: 3px double var(--ink); background: #efeadb; }
.claim-lim.is-focus .claim-tag { color: var(--ink); }
.claim-lim.is-hot { background: #efeadb; }
.claim-carry { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--ink); }
.claim-legend { font-size: 0.8125rem; line-height: 1.45; color: var(--ink-2); margin-top: 14px; }
.claim-source { font-size: 0.8125rem; color: var(--ink-3); margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--rule); }

/* ---------- question ---------- */

.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.split-side { position: sticky; top: 84px; }
.screen-item.is-single .split { grid-template-columns: minmax(0, 720px); }

.tracker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 30px; }
.tracker-step { border-top: 3px solid var(--rule); padding-top: 8px; display: grid; gap: 1px; }
.tracker-name { font-size: 0.75rem; font-weight: 600; line-height: 1.3; color: var(--ink-3); }
.tracker-state { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.tracker-step.is-done { border-top-color: var(--accent); }
.tracker-step.is-done .tracker-name, .tracker-step.is-done .tracker-state { color: var(--accent-dark); }
.tracker-step.is-current { border-top-color: var(--ink); }
.tracker-step.is-current .tracker-name { color: var(--ink); font-weight: 700; }
.tracker-step.is-current .tracker-state { color: var(--ink-2); }

.context { font-size: 1.0625rem; color: var(--ink-2); max-width: 54ch; margin-bottom: 18px; }
.practice-note { font-size: 0.875rem; color: var(--ink-3); margin: -8px 0 18px; }

.coach { border-left: 3px solid var(--accent); padding: 4px 0 4px 18px; margin: 4px 0 26px; max-width: 54ch; }
.coach[hidden] { display: none; }
.coach-label { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-dark); margin-bottom: 4px; }
.coach-text { font-size: 1rem; line-height: 1.55; color: var(--ink); }
.hint-row { margin: -6px 0 14px; }

.options { display: grid; gap: 10px; }
.options-legend { font-size: 0.8125rem; color: var(--ink-3); margin-bottom: 10px; padding: 0; }
.opt {
  display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 14px; align-items: start;
  padding: 15px 18px; background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 6px; cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.opt input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--accent); }
.opt:hover { border-color: var(--ink); }
.opt:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; }
.opt input:focus-visible { outline: none; }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-tint); box-shadow: inset 3px 0 0 var(--accent); }
.opt-body { display: block; }
.opt-label { font-size: 0.8125rem; font-weight: 700; color: var(--ink-3); margin-right: 8px; }
.opt-text { font-size: 1.0625rem; line-height: 1.5; }
.opt-marks { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.opt-marks:not(:empty) { margin-top: 8px; }
.mark { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 7px; border-radius: 2px; }
.mark-yours { border: 1px solid var(--ink); color: var(--ink); }
.mark-right { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.mark-miss { border: 1px dashed var(--warn); color: var(--warn); }
.options.is-answered .opt { cursor: default; background: transparent; border-color: var(--rule); box-shadow: none; }
.options.is-answered .opt:hover { border-color: var(--rule); }
.options.is-answered .opt.is-right { border-color: var(--accent); background: var(--accent-tint); box-shadow: inset 3px 0 0 var(--accent); }
.options.is-answered .opt.is-chosen:not(.is-right) { border: 1px dashed var(--warn); background: var(--warn-tint); }
.form-error { min-height: 1.5em; margin-top: 10px; font-size: 0.9375rem; font-weight: 600; color: var(--warn); }
.question .nav { margin-top: 14px; }

.feedback { margin-top: 28px; padding: 22px 24px 24px; background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--accent); border-radius: 0 6px 6px 0; scroll-margin-top: 84px; animation: rise 240ms ease-out both; }
.feedback.is-incorrect { border-left: 4px dashed var(--warn); }
.feedback-verdict { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 400; font-size: 1.5rem; line-height: 1.2; margin-bottom: 10px; }
.feedback-glyph { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-family: var(--sans); font-size: 0.9375rem; font-weight: 700; }
.is-incorrect .feedback-glyph { background: var(--warn); }
.feedback-text { font-size: 1.0625rem; line-height: 1.55; max-width: 58ch; }
.feedback-right { font-size: 1rem; line-height: 1.5; margin-top: 12px; max-width: 58ch; }
.feedback-right-label { font-weight: 700; }
.feedback-list { display: grid; gap: 10px; }
.feedback-list li { font-size: 1rem; line-height: 1.5; padding-left: 12px; border-left: 2px solid var(--rule); }
.feedback-list li.is-miss { border-left: 2px dashed var(--warn); }
.feedback-li-mark { font-weight: 700; }
.feedback-list li.is-miss .feedback-li-mark { color: var(--warn); }
.feedback-again { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 10px; }
.feedback-li-words mark { font-family: var(--serif); font-size: 1.0625rem; background: #f4e3a6; color: var(--ink); padding: 1px 5px; border-radius: 2px; box-shadow: inset 0 -2px 0 var(--ink); }
.feedback-more { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); }
.feedback-more summary { cursor: pointer; font-size: 0.9375rem; font-weight: 600; color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; }
.feedback-more .quote { margin-top: 8px; padding-top: 0; border-top: 0; }
.split-main > .quote { margin: 0 0 22px; padding: 16px 20px; border: 1px solid var(--rule); border-left: 3px solid var(--ink); border-radius: 0 6px 6px 0; background: var(--surface); }

.quote { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--rule); }
.quote-label { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.quote blockquote p { font-family: var(--serif); font-size: 1.125rem; line-height: 1.55; max-width: 60ch; }
.quote blockquote p::before { content: "\201c"; }
.quote blockquote p::after { content: "\201d"; }

/* ---------- targeted review ---------- */

.review-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.look { display: grid; gap: 12px; }
.look li { position: relative; padding-left: 20px; font-size: 1rem; line-height: 1.5; }
.look li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 9px; height: 1.5px; background: var(--accent); }

/* ---------- outcome ---------- */

.h-verdict { display: grid; gap: 10px; margin-bottom: 28px; }
.verdict-word { font-family: var(--serif); font-weight: 400; font-size: clamp(2.75rem, 8vw, 5.25rem); line-height: 1; letter-spacing: -0.02em; }
.h-verdict.is-eligible .verdict-word { color: var(--accent); }
.h-verdict.is-ineligible .verdict-word { color: var(--warn); }
.verdict-at { font-family: var(--sans); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.outcome-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 56px; align-items: start; }
.path { border-top: 1px solid var(--rule); }
.path-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.path-step { font-weight: 600; font-size: 0.9375rem; }
.path-q { grid-column: 1; font-size: 0.875rem; color: var(--ink-3); }
.path-result { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 10px; border: 1px solid var(--ink); border-radius: 2px; }
.path-row.is-na .path-step, .path-row.is-na .path-q { color: var(--ink-3); }
.path-row.is-na .path-result { border: 1px dashed var(--rule-strong); color: var(--ink-3); }
.outcome-grid .quote { margin-top: 0; padding-top: 0; border-top: 0; }
.takeaway { margin-top: 28px; padding: 22px 24px; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; max-width: 720px; }
.takeaway p { font-size: 1.0625rem; line-height: 1.55; max-width: 60ch; }

/* ---------- sprint ---------- */

.choice-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.sprint-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.timer { font-size: 0.9375rem; color: var(--ink-2); margin-bottom: 18px; }
.timer-value { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.screen-sprint { max-width: 820px; }
.screen-sprint .quote { margin-top: 0; padding: 26px 28px; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); }
.screen-sprint .quote blockquote p { font-size: clamp(1.1875rem, 2.2vw, 1.4375rem); line-height: 1.45; }
.sprint-prompt { margin: 26px 0 14px; font-weight: 600; }
.sprint-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.btn-choice { flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; background: var(--surface); border: 1px solid var(--rule-strong); color: var(--ink); padding: 14px 18px; min-height: 68px; }
.btn-choice:hover { border-color: var(--accent); background: var(--accent-tint); }
.choice-step { font-weight: 700; }
.choice-name { font-weight: 400; font-size: 0.875rem; color: var(--ink-2); }
.sprint-review { display: grid; gap: 0; max-width: 820px; border-top: 1px solid var(--rule); }
.sprint-review li { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.sprint-q { font-family: var(--serif); font-size: 1.0625rem; line-height: 1.5; margin-bottom: 8px; }
.sprint-a { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 0.875rem; color: var(--ink-2); }

/* ---------- results ---------- */

.results-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; margin-bottom: 48px; }
.score-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.score-value { font-family: var(--serif); line-height: 1; margin: 6px 0 14px; }
.score-num { font-size: clamp(4.5rem, 12vw, 7.5rem); letter-spacing: -0.03em; }
.score-pct { font-size: 2rem; color: var(--ink-2); margin-left: 4px; }
.score-line { font-size: 0.9375rem; color: var(--ink-2); margin-top: 14px; max-width: 36ch; }
.results-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; align-items: start; padding-top: 36px; border-top: 1px solid var(--rule); }
.review-list { display: grid; gap: 14px; margin-top: 14px; }
.review-list li { font-size: 1rem; line-height: 1.5; max-width: 52ch; }
.review-step { font-weight: 700; }
.cases { width: 100%; border-collapse: collapse; margin-bottom: 30px; }
.cases th, .cases td { text-align: left; vertical-align: top; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule); font-size: 0.9375rem; font-weight: 400; }
.cases tr:first-child th, .cases tr:first-child td { border-top: 1px solid var(--rule); }
.cases-title { display: block; font-family: var(--serif); font-size: 1.0625rem; line-height: 1.3; }
.cases-line { display: block; font-size: 0.8125rem; color: var(--ink-3); }
.cases-verdict { font-weight: 700; white-space: nowrap; }
.cases-at { color: var(--ink-3); font-size: 0.8125rem; }
.exit-note { min-height: 1.5em; margin-top: 14px; font-weight: 600; text-align: right; }
.score-recovery { margin-top: 8px; color: var(--ink-3); }
.save-note { margin-top: 28px; padding: 14px 18px; border: 1px solid var(--rule); border-left: 3px solid var(--rule-strong); border-radius: 0 6px 6px 0; max-width: var(--measure); display: grid; gap: 12px; justify-items: start; }
.save-note.is-lms-confirmed, .save-note.is-lms-closed { border-left: 3px solid var(--accent); }
.save-note.is-lms-confirmed .save-text::before, .save-note.is-lms-closed .save-text::before { content: "\2713\00a0"; font-weight: 700; }
.save-note.is-lms-failed { border: 1px dashed var(--warn); border-left: 4px solid var(--warn); background: var(--warn-tint); }
.save-note.is-lms-failed .save-text { font-weight: 600; color: var(--ink); }
.save-text { font-size: 0.9375rem; line-height: 1.5; color: var(--ink-2); }

/* ---------- sources dialog ---------- */

dialog#sources {
  width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  padding: 28px clamp(20px, 4vw, 40px) 32px; border: 1px solid var(--rule-strong); border-radius: 8px;
  background: var(--paper); color: var(--ink); overflow: auto;
}
dialog#sources::backdrop { background: rgba(27, 26, 23, 0.55); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
.h-dialog { font-family: var(--serif); font-weight: 400; font-size: 1.875rem; }
dialog .lead { font-size: 1rem; margin-bottom: 20px; }
.sources { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.sources li { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.sources-title { font-family: var(--serif); font-size: 1.0625rem; line-height: 1.4; }
.sources-url { font-size: 0.8125rem; overflow-wrap: anywhere; margin: 4px 0; }
.sources-url a { color: var(--accent); }
.sources-note { font-size: 0.8125rem; color: var(--ink-3); }
dialog .label-note { margin-top: 24px; }

/* ---------- narrow screens and zoom ---------- */

@media (max-width: 899px) {
  .split, .docket-grid, .review-grid, .outcome-grid, .results-grid, .results-cols { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .split-side { position: static; }
  .terms { grid-template-columns: minmax(0, 1fr); }
  .results-grid { margin-bottom: 32px; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .prose p, .lead { font-size: 1.0625rem; }
  .bar-inner { padding-top: 8px; padding-bottom: 8px; }
  .map-step { padding-left: 48px; }
  .map-step::before { font-size: 2.125rem; top: 24px; }
  .tracker { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 8px; margin-bottom: 22px; }
  .docket-row { grid-template-columns: 30px minmax(0, 1fr); }
  .docket-row .chip { grid-column: 2; justify-self: start; }
  .docket-num { font-size: 1.625rem; }
  .sprint-choices { grid-template-columns: minmax(0, 1fr); }
  .nav { margin-top: 32px; }
  .nav-right { width: 100%; }
  .nav-right .btn { flex: 1 1 auto; }
  .question .nav .btn-primary { flex: 1 1 auto; }
  .opt { padding: 13px 14px; gap: 12px; }
  .feedback { padding: 18px 18px 20px; }
  .claim-inner { padding: 16px 14px 14px; }
  .claim-summary { padding: 12px 16px; }
  .claim-lim { grid-template-columns: 28px minmax(0, 1fr); padding-left: 8px; padding-right: 6px; }
  .label-note { margin-top: 40px; }
  .screen-title::after { display: none; }
  /* the outcomes table reflows: case title on one line, verdict and "decided at" beneath it.
     The table roles are set in ui.js, so the structure survives the change of display. */
  .cases, .cases tbody { display: block; }
  .cases tr { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .cases tr:first-child { border-top: 1px solid var(--rule); }
  .cases th, .cases td, .cases tr:first-child th, .cases tr:first-child td { border: 0; padding: 0; }
  .cases th { grid-column: 1 / -1; padding-bottom: 6px; }
  .cases-at { align-self: baseline; }
  .panel { padding: 18px; }
}

/* ---------- polish: arrivals, feedback and hover (round 4) ----------
   Every rule here rests on a visible default, so with motion switched off
   (see the next section) each screen simply appears complete. */

:root { --ease: cubic-bezier(0.16, 1, 0.3, 1); }

::selection { background: #cfe0da; color: var(--ink); }
html { scrollbar-color: var(--rule-strong) transparent; }
p, li, dd { text-wrap: pretty; }
.score-num, .docket-num, .claim-num, .mastery-level, .mastery-count { font-variant-numeric: lining-nums tabular-nums; }
.foot p { font-size: 0.875rem; }

/* a screen arrives in reading order; redrawing the same screen (after an answer) does not replay it */
.screen { animation: none; }
.screen > * { animation: arrive 380ms var(--ease) both; }
.screen > :nth-child(2) { animation-delay: 35ms; }
.screen > h1:nth-child(n) { animation-delay: 0ms; } /* the heading takes focus at once, so it never waits */
.screen > :nth-child(3) { animation-delay: 70ms; }
.screen > :nth-child(4) { animation-delay: 105ms; }
.screen > :nth-child(5) { animation-delay: 140ms; }
.screen > :nth-child(n+6) { animation-delay: 175ms; }
.screen.is-again > * { animation: none; }
@keyframes arrive { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: none; } }
@keyframes stamp { from { opacity: 0; transform: scale(1.3); } to { opacity: 1; transform: none; } }
@keyframes fill { from { transform: scaleX(0); } to { transform: none; } }

/* cover: the one slow entrance */
.screen-title > * { animation-duration: 560ms; }
.screen-title > :nth-child(3) { animation-delay: 180ms; }
.screen-title > :nth-child(4) { animation-delay: 270ms; }
.screen-title > :nth-child(5) { animation-delay: 360ms; }
.screen-title > :nth-child(n+6) { animation-delay: 450ms; }
.screen-title::after { animation: mark 1100ms var(--ease) both; }
/* 16px keeps the moving mark inside the 20px minimum page gutter, so it never widens the page */
@keyframes mark { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

/* buttons */
.btn { transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms var(--ease), box-shadow 160ms ease; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 16px -10px rgba(10, 59, 52, 0.7); }
.btn-primary:active { transform: translateY(1px); box-shadow: none; }
.btn-secondary:active, .btn-choice:active { transform: translateY(1px); }
.btn[disabled]:hover { transform: none; box-shadow: none; }
.progress-fill { transition: width 700ms var(--ease); }

/* answer options */
.opt { transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms var(--ease); }
.opt:hover { background: #fffefb; }
.opt:has(input:checked):hover { background: var(--accent-tint); }
.opt:active { transform: scale(0.994); }
.options.is-answered .opt:not(.is-right):not(.is-chosen):hover { background: transparent; }
.options.is-answered .opt.is-chosen:not(.is-right):hover { background: var(--warn-tint); }
.options.is-answered .opt:active { transform: none; }
.options.is-answered .opt.is-right { animation: confirm 900ms ease-out both; }
@keyframes confirm { from { background: #d2e3dc; } to { background: var(--accent-tint); } }
.mark { animation: pop 300ms var(--ease) 140ms both; transform-origin: left center; }
.claim-lim { transition: background-color 220ms ease; }

/* three desk details: the claim lies on a second sheet, the Office's quotations hang their
   opening mark in the margin, and marked claim words are drawn in like a highlighter */
.claim { box-shadow: 5px 6px 0 -1px var(--surface), 5px 6px 0 0 var(--rule); }
.quote blockquote p { text-indent: -0.44em; }
.feedback-li-words mark {
  background: linear-gradient(#f4e3a6, #f4e3a6) no-repeat 0 0 / 100% 100%;
  animation: marker 520ms var(--ease) 320ms both;
}
@keyframes marker { from { background-size: 0% 100%; } to { background-size: 100% 100%; } }

/* the step tracker: the current step's bar draws in from the left */
.tracker-step { position: relative; }
.tracker-step.is-current::before {
  content: ""; position: absolute; left: 0; right: 0; top: -3px; height: 3px;
  background: var(--rule); transform: scaleX(0); transform-origin: right;
}
.screen:not(.is-again) .tracker-step.is-current::before { animation: uncover 620ms var(--ease) 160ms both; }
@keyframes uncover { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* feedback opens downward; its mark lands a beat later */
.feedback { animation: open 420ms var(--ease) both; }
@keyframes open {
  from { opacity: 0; clip-path: inset(0 0 100% 0); transform: translateY(-8px); }
  to { opacity: 1; clip-path: inset(-16px); transform: none; }
}
.feedback-glyph { animation: pop 360ms var(--ease) 180ms both; }

/* docket: the case that is up next carries a faint wash; a decided case is stamped */
.docket-row.is-next { background: linear-gradient(90deg, var(--accent-tint), rgba(227, 236, 232, 0) 78%); }
.docket-row.is-next { box-shadow: -16px 0 0 var(--accent-tint); }
.chip-decided { animation: stamp 380ms var(--ease) 320ms both; }
.meter-fill { transform-origin: left; animation: fill 800ms var(--ease) 200ms both; }
.mastery-row:nth-child(2) .meter-fill { animation-delay: 280ms; }
.mastery-row:nth-child(3) .meter-fill { animation-delay: 360ms; }
.mastery-row:nth-child(4) .meter-fill { animation-delay: 440ms; }

/* the decision: the verdict is written in, then the path it took is replayed step by step */
.screen > .h-verdict { animation: none; }
.verdict-word { animation: write 620ms var(--ease) both; }
@keyframes write {
  from { clip-path: inset(-0.25em 100% -0.25em -0.1em); }
  to { clip-path: inset(-0.25em -0.1em -0.25em -0.1em); }
}
.verdict-at { animation: write 420ms var(--ease) 200ms both; }
/* rows and results are uncovered, never faded: their text keeps full contrast at every frame */
.path-row { animation: unroll 420ms var(--ease) both; }
@keyframes unroll { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes press { from { transform: scale(1.3); } to { transform: none; } }
.path-row:nth-child(1) { animation-delay: 380ms; }
.path-row:nth-child(2) { animation-delay: 500ms; }
.path-row:nth-child(3) { animation-delay: 620ms; }
.path-row:nth-child(n+4) { animation-delay: 740ms; }
.path-result { animation: press 320ms var(--ease) both; }
.path-row:nth-child(1) .path-result { animation-delay: 520ms; }
.path-row:nth-child(2) .path-result { animation-delay: 640ms; }
.path-row:nth-child(3) .path-result { animation-delay: 760ms; }
.path-row:nth-child(n+4) .path-result { animation-delay: 880ms; }

/* results: the score rises into place, then the pass mark is stamped */
.score-num { display: inline-block; animation: lift 640ms var(--ease) 120ms both; }
@keyframes lift {
  from { clip-path: inset(100% -0.1em -0.15em -0.1em); transform: translateY(0.18em); }
  to { clip-path: inset(-0.1em -0.1em -0.15em -0.1em); transform: none; }
}
.score .chip { animation: stamp 360ms var(--ease) 560ms both; }

/* sprint: each new finding slides in from the right */
.screen-sprint .quote { animation: next 340ms var(--ease) both; }
@keyframes next { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

/* sources dialog */
/* the dialog only slides: its Close button holds focus from the first frame and must be visible */
dialog#sources[open] { animation: settle 320ms var(--ease) both; }
@keyframes settle { from { transform: translateY(14px); } to { transform: none; } }
dialog#sources[open]::backdrop { animation: fade 240ms ease-out both; }

@media (forced-colors: active) {
  .tracker-step.is-current::before { display: none; }
  .docket-row.is-next { background: none; }
}

/* ---------- motion, contrast and print preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, ::backdrop { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .opt:has(input:checked), .options.is-answered .opt.is-right { outline: 2px solid Highlight; }
  .meter { border: 1px solid CanvasText; }
  .meter-fill { background: Highlight; }
  .screen-title::after { display: none; }
}
@media print {
  *, *::before, *::after, ::backdrop { animation: none !important; transition: none !important; }
  .bar, .nav, .skip { display: none; }
  body { background: #fff; }
}
