/* sp web client.
   Palette and type follow the design proposal: a blue-biased neutral, one
   ultramarine accent, and monospace as the data face -- appropriate because
   the product's core artifact is a transcript diff. */

:root {
  --bg: #FBFAF9;
  --surface: #FFFFFF;
  --surface-2: #F4F2F0;
  --ink: #14161A;
  --ink-2: #4A515C;
  --ink-3: #596270;
  --line: #E3E0DC;
  --line-2: #CFCBC5;
  --accent: #2B4ACB;
  --accent-ink: #FFFFFF;
  --accent-soft: #E8EBFA;
  --good: #17755A;
  --good-soft: #E2F0EA;
  --warn: #96620E;
  --warn-soft: #F7EEDC;
  --bad: #A32C2C;
  --bad-soft: #F7E7E5;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --radius: 7px;
  --page: 860px;
}

/* Reserve the scrollbar gutter always. Otherwise a short tab has no scrollbar
   and a long one does, and everything shifts sideways by its width as you
   move between them -- the other half of the jump. */
html {
  scrollbar-gutter: stable;
}
@supports not (scrollbar-gutter: stable) {
  html { overflow-y: scroll; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1116;
    --surface: #161A21;
    --surface-2: #1D222B;
    --ink: #E9E7E4;
    --ink-2: #AFB6C2;
    --ink-3: #939BAA;
    --line: #262C36;
    --line-2: #39414E;
    --accent: #8098FF;
    --accent-ink: #0F1116;
    --accent-soft: #1B2340;
    --good: #4FBF9B;
    --good-soft: #122A24;
    --warn: #D3A050;
    --warn-soft: #2B2418;
    --bad: #E0736C;
    --bad-soft: #2E1B1B;
  }
}

:root[data-theme="dark"] {
  --bg: #0F1116;
  --surface: #161A21;
  --surface-2: #1D222B;
  --ink: #E9E7E4;
  --ink-2: #AFB6C2;
  --ink-3: #939BAA;
  --line: #262C36;
  --line-2: #39414E;
  --accent: #8098FF;
  --accent-ink: #0F1116;
  --accent-soft: #1B2340;
  --good: #4FBF9B;
  --good-soft: #122A24;
  --warn: #D3A050;
  --warn-soft: #2B2418;
  --bad: #E0736C;
  --bad-soft: #2E1B1B;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.55rem 0.8rem;
  border-radius: 5px;
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

/* One width for every tab. Switching tabs must not move the chrome: a header
   that shifts as you navigate reads as the page reloading into something
   else. 860px keeps running text near 70 characters while still giving the
   grammar rows room. */
.shell {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 1.4rem 5rem;
}

/* ---- chrome ---- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.4rem 0 1.2rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2.2rem;
  flex-wrap: wrap;
}
.brand {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--ink-3);
}
nav { display: flex; gap: 0.3rem; }
nav a {
  font-size: 0.85rem;
  padding: 0.32rem 0.8rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  text-decoration: none;
  color: var(--ink-2);
  border: 1px solid transparent;
}
nav a:hover { background: var(--surface-2); }
nav a.on { background: var(--ink); color: var(--bg); }
nav a:focus-visible, button:focus-visible, a:focus-visible, textarea:focus-visible,
select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- type ---- */
h1 { font-size: 1.85rem; letter-spacing: -0.025em; font-weight: 650; margin: 0 0 0.5rem; text-wrap: balance; }
h2 { font-size: 1.25rem; letter-spacing: -0.015em; font-weight: 620; margin: 2.2rem 0 0.6rem; }
p { margin: 0 0 1rem; max-width: 64ch; text-wrap: pretty; }
.muted { color: var(--ink-3); }
.lede { color: var(--ink-2); }
.label {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-3);
}

/* ---- cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  margin-bottom: 1.2rem;
}
.card.tight { padding: 1.1rem 1.2rem; }

/* ---- buttons ---- */
button, .btn {
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 550;
  padding: 0.58rem 1.25rem;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:hover, .btn:hover { filter: brightness(1.08); }
button.ghost, .btn.ghost {
  background: transparent;
  color: var(--ink-2);
  border-color: var(--line-2);
}
button:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }
[hidden] { display: none !important; }
button, .btn, .icon-btn { min-height: 44px; }
.actions { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; margin-top: 1.2rem; }

/* ---- audio ---- */
.player {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
}
.play {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  padding: 0;
  display: grid;
  place-items: center;
  flex: none;
}
.play .glyph {
  width: 0; height: 0;
  border-left: 15px solid var(--accent-ink);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  margin-left: 4px;
}
.play.playing .glyph {
  border: none;
  width: 14px; height: 15px;
  margin: 0;
  background: var(--accent-ink);
  clip-path: polygon(0 0, 38% 0, 38% 100%, 0 100%, 0 0, 62% 0, 100% 0, 100% 100%, 62% 100%, 62% 0);
}
.dots { display: flex; gap: 0.32rem; margin-bottom: 0.35rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.dot.spent { background: var(--line-2); }

/* ---- forms ---- */
textarea {
  width: 100%;
  min-height: 7rem;
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.7;
  padding: 0.85rem 0.95rem;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  resize: vertical;
}
input[type="text"] {
  width: 100%;
  font-family: var(--mono);
  font-size: 0.88rem;
  padding: 0.5rem 0.7rem;
  border-radius: 5px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
}

select {
  max-width: 100%;
  min-height: 44px;
  font: inherit;
  padding: 0.45rem 2rem 0.45rem 0.65rem;
  border-radius: 5px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
}

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

/* ---- timer ---- */
.timer {
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 1.6rem;
}
.timer > i {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 1s linear;
}
.timer.low > i { background: var(--warn); }
.timer.out > i { background: var(--bad); }

/* ---- stats ---- */
.stats { display: flex; gap: 2.2rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.stat .k { display: block; }
.stat .v {
  font-family: var(--mono);
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}
.v.good { color: var(--good); }
.v.warn { color: var(--warn); }
.v.bad { color: var(--bad); }

/* ---- diff ---- */
.diff { font-family: var(--mono); font-size: 0.92rem; line-height: 2.1; }
.diff .w { padding: 0.08em 0.18em; border-radius: 3px; }
.diff .sub { background: var(--bad-soft); color: var(--bad); border-bottom: 2px solid var(--bad); }
.diff .del { background: var(--bad-soft); color: var(--bad); text-decoration: line-through; }
.diff .ins { background: var(--warn-soft); color: var(--warn); }
.diff .acc { background: var(--warn-soft); color: var(--warn); border-bottom: 2px solid var(--warn); }
.legend { display: flex; gap: 1.2rem; font-size: 0.78rem; color: var(--ink-3); flex-wrap: wrap; margin-top: 0.9rem; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 0.35rem; }

/* ---- practice ---- */
.prompt { font-family: var(--mono); font-size: 1.05rem; line-height: 1.8; margin: 0.4rem 0 1.3rem; }
.options { display: grid; gap: 0.5rem; }
.option {
  text-align: left;
  width: 100%;
  font-family: var(--mono);
  font-size: 0.94rem;
  font-weight: 400;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-2);
  padding: 0.65rem 0.9rem;
}
.option:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); filter: none; }
.option.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}
.option.selected .n { color: var(--accent); font-weight: 600; }
.option.right, .option.wrong { box-shadow: none; }
.hint {
  font-size: 0.8rem;
  color: var(--ink-3);
  margin-top: 0.9rem;
}
.key {
  font-family: var(--mono);
  font-size: 0.74rem;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
  color: var(--ink-2);
}
.option .n { color: var(--ink-3); margin-right: 0.7rem; font-size: 0.82rem; }
.option.right { border-color: var(--good); background: var(--good-soft); color: var(--good); }
.option.wrong { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.feedback { margin-top: 1.2rem; border-top: 1px solid var(--line); padding-top: 1.1rem; }
.feedback .point { font-weight: 620; }

/* ---- tables / lists ---- */
.rows { display: grid; gap: 0.45rem; }
.row {
  display: grid;
  grid-template-columns: 5.2rem 1fr auto;
  gap: 1rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.6rem 0.85rem;
  font-size: 0.88rem;
}
.row .date { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-3); }
.row .nums { font-family: var(--mono); font-size: 0.8rem; font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }

details { border: 1px solid var(--line); border-radius: 6px; padding: 0.6rem 0.85rem; }
details + details { margin-top: 0.45rem; }
summary { cursor: pointer; font-size: 0.88rem; }

/* ---- the daily target ----
   Only ever on the idle screen. A cumulative figure inside a block is the
   same distraction the disclosure contract keeps out everywhere else. */
.daily { margin-bottom: 1.8rem; }
.daily-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--surface-2);
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.daily-bar > i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.daily-text { font-size: 0.88rem; color: var(--ink-2); }
.daily-text b { font-weight: 600; color: var(--ink); }

/* ---- learner progress dashboard ---- */
.progress-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.4rem 2rem;
  align-items: start;
  padding: 1.6rem;
  margin-bottom: 3rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    radial-gradient(circle at 92% 12%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 35%),
    var(--surface);
}
.progress-hero h1 { margin-bottom: 0.35rem; }
.progress-hero .lede { margin: 0; }
.progress-primary { justify-self: end; white-space: nowrap; }
.remeasure { text-align: right; }
.remeasure button[disabled] { opacity: 0.55; cursor: not-allowed; }
.remeasure-reason {
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-3);
  max-width: 18rem;
}
@media (max-width: 44rem) {
  .remeasure { text-align: left; }
  .remeasure-reason { max-width: none; }
}
.progress-position {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}
.progress-position.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.position-item {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
}
.position-item strong { font-size: 1.12rem; }
.position-item > span:last-child { color: var(--ink-2); font-size: 0.88rem; }
.position-label, .signal-label {
  color: var(--ink-3);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.track-note {
  grid-column: 1 / -1;
  margin: -0.5rem 0 0;
  color: var(--ink-3);
  font-size: 0.82rem;
}
.skill-journey-board {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}
.journey-card {
  --track-color: var(--accent);
  min-width: 0;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-top: 3px solid var(--track-color);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface) 94%, var(--track-color));
}
.journey-listening { --track-color: #2B62C8; }
.journey-comprehension { --track-color: #7451B8; }
.journey-grammar { --track-color: #C26036; }
.journey-vocabulary { --track-color: #17755A; }
.journey-card-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.7rem;
}
.journey-level-line { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.12rem; }
.journey-level-line strong, .journey-unplaced {
  display: block;
  font-size: 1.28rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.confidence-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 0.68rem;
  font-weight: 650;
}
.confidence-chip { background: var(--surface-2); color: var(--ink-3); }
.journey-card-chips { display: grid; justify-items: end; gap: 0.3rem; }
.calibration-chip { background: #fff4d6; color: #72520a; }
.calibration-note { color: var(--ink-3); font-size: 0.72rem; line-height: 1.4; margin: 0.45rem 0 0; }
.journey-progress-copy {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem;
  align-items: end;
  margin-top: 1rem;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.66rem;
}
.journey-progress-copy strong {
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
}
.journey-progress {
  display: block;
  width: 100%;
  height: 9px;
  margin: 0.35rem 0 0;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  appearance: none;
  accent-color: var(--track-color);
  background: var(--surface-2);
}
.journey-progress::-webkit-progress-bar { background: var(--surface-2); border-radius: 999px; }
.journey-progress::-webkit-progress-value { background: var(--track-color); border-radius: 999px; }
.journey-progress::-moz-progress-bar { background: var(--track-color); border-radius: 999px; }
.journey-progress-empty { position: relative; margin-top: 1.32rem; }
.journey-progress-empty::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 13px);
}
.journey-distance { margin: 0.42rem 0 0; color: var(--ink-2); font-size: 0.78rem; }
.skill-detail-list { display: grid; gap: 0.65rem; margin-top: 1.1rem; }
.skill-detail {
  --track-color: var(--accent);
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-left: 3px solid var(--track-color);
  border-radius: 9px;
  background: var(--surface);
  overflow: clip;
}
.skill-detail-listening { --track-color: #2B62C8; }
.skill-detail-listening { --track-color: #7451B8; }
.skill-detail-grammar { --track-color: #C26036; }
.skill-detail-vocabulary { --track-color: #17755A; }
.skill-detail > summary {
  min-height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1rem;
  list-style: none;
}
.skill-detail > summary::-webkit-details-marker { display: none; }
.skill-detail > summary > span:first-child { display: grid; gap: 0.05rem; }
.skill-detail > summary strong { font-size: 0.96rem; }
.skill-detail > summary small { color: var(--ink-3); font-size: 0.78rem; }
.skill-detail > summary > span:last-child {
  color: var(--track-color);
  font-size: 0.76rem;
  font-weight: 650;
  white-space: nowrap;
}
.skill-detail > summary > span:last-child::after { content: " +"; }
.skill-detail[open] > summary { border-bottom: 1px solid var(--line); }
.skill-detail[open] > summary > span:last-child::after { content: " −"; }
.skill-detail-body { min-width: 0; max-width: 100%; overflow: hidden; padding: 0 1rem 1.25rem; }
.skill-detail-body > section { margin-top: 1.6rem; }
.skill-detail-body > section:first-child { margin-top: 1.25rem; }
.skill-detail-body .section-heading { margin-bottom: 0.8rem; }
.skill-detail-body h2 { font-size: 1.1rem; }
.eyebrow {
  margin: 0 0 0.2rem;
  color: var(--ink-3);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.progress-hero ~ section { margin-top: 3rem; }
.progress-hero + .first-progress { margin-top: 0; }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1rem;
}
.section-heading h2, .path-card h3, .focus-card h3, .empty-card h3 {
  margin: 0;
}
.section-intro { color: var(--ink-2); margin-top: -0.25rem; }
.range-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}
.range-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 5px;
  color: var(--ink-2);
  font-size: 0.8rem;
  text-decoration: none;
}
.range-nav a:hover { background: var(--surface-2); }
.range-nav a.selected { background: var(--ink); color: var(--bg); }
.progress-signals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}
.signal-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.signal-value {
  margin-top: 0.28rem;
  font-size: 1.7rem;
  font-weight: 680;
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.signal-empty { color: var(--ink-3); }
.signal-card > span:not(.signal-label):not(.signal-value) { color: var(--ink-2); font-size: 0.85rem; }
.signal-detail { margin-top: 0.35rem; }
.focus-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}
.focus-card {
  min-width: 0;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.focus-card-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.7rem;
}
.focus-card h3 { margin-top: 0.15rem; font-size: 1rem; line-height: 1.35; overflow-wrap: anywhere; }
.focus-card > p { margin: 0.8rem 0; color: var(--ink-2); font-size: 0.86rem; }
.skill-level {
  display: block;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}
.state {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  padding: 0.12rem 0.48rem;
  border-radius: 999px;
  white-space: nowrap;
}
.state.not_started { background: var(--surface-2); color: var(--ink-3); }
.state.early       { background: var(--surface-2); color: var(--ink-2); }
.state.shaky       { background: var(--bad-soft); color: var(--bad); }
.state.getting_there { background: var(--warn-soft); color: var(--warn); }
.state.strong      { background: var(--accent-soft); color: var(--accent); }
.state.mastered    { background: var(--good-soft); color: var(--good); }
.example-disclosure, .path-details {
  padding: 0;
  border: 0;
  border-radius: 0;
}
.example-disclosure summary, .path-details summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  color: var(--accent);
  font-weight: 620;
}
.skill-example {
  margin-top: 0.5rem;
  padding: 0.75rem;
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
}
.example-label {
  margin: 0 0 0.35rem;
  color: var(--ink-3);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.example-line { margin: 0.18rem 0; font-family: var(--mono); font-size: 0.82rem; overflow-wrap: anywhere; }
.example-line s { color: var(--bad); }
.example-line strong { color: var(--good); }
.example-note { margin: 0.4rem 0 0; color: var(--ink-2); font-size: 0.8rem; }
.trend-figure { min-width: 0; max-width: 100%; margin: 0; padding: 1.25rem 1.4rem; }
.trend-summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
}
.trend-summary span, .trend-figure figcaption { color: var(--ink-3); font-size: 0.8rem; }
.trend-chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-pass { stroke: var(--ink-3); stroke-width: 1.5; stroke-dasharray: 5 5; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-point { fill: var(--surface); stroke: var(--accent); stroke-width: 3; }
.chart-label, .chart-date { fill: var(--ink-3); font-family: var(--mono); font-size: 11px; }
.chart-date-end { text-anchor: end; }
.trend-figure figcaption { margin-top: 0.4rem; }
.single-result strong { font-size: 2rem; }
.single-result p, .empty-card p { margin-bottom: 0; color: var(--ink-2); }
.learning-path {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.path-card { min-width: 0; margin: 0; }
.path-card h3 { margin-top: 0.35rem; font-size: 1.3rem; }
.path-card > p { color: var(--ink-2); }
.path-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 0.35rem;
  padding: 0;
  margin: 1.1rem 0;
  list-style: none;
}
.path-preview li {
  min-width: 0;
  display: grid;
  place-content: center;
  min-height: 64px;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-3);
  text-align: center;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}
.path-preview li[aria-current="step"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.path-preview li span { font-size: 0.66rem; text-transform: uppercase; }
.availability-note { font-size: 0.82rem; }
.full-ladder { padding: 0; margin: 0.7rem 0 0; list-style: none; }
.full-ladder li {
  display: grid;
  grid-template-columns: minmax(5rem, 0.8fr) minmax(0, 1.6fr) auto;
  gap: 0.7rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}
.full-ladder li span { color: var(--ink-2); }
.full-ladder li[aria-current="step"] strong { color: var(--accent); }
.path-counts { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1rem; }
.path-counts span { padding: 0.35rem 0.55rem; border-radius: 5px; background: var(--surface-2); font-size: 0.78rem; }
.mastery-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
}
.skills-heading { align-items: start; }
.skill-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(7.5rem, auto)) auto;
  align-items: end;
  gap: 0.5rem;
}
.skill-filters label { display: grid; gap: 0.2rem; color: var(--ink-3); font-size: 0.72rem; font-weight: 620; }
.skill-filters button { min-height: 44px; }
.skill-card { padding: 0; background: var(--surface); overflow: clip; }
.skill-card + .skill-card { margin-top: 0.55rem; }
.skill-card summary {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0.9rem;
  font-size: 0.9rem;
}
.skill-card summary::marker { color: var(--ink-3); }
.skill-name { min-width: 0; font-weight: 620; overflow-wrap: anywhere; }
.skill-card-body { padding: 0 0.9rem 1rem; }
.skill-card-body > p { margin-bottom: 0.7rem; color: var(--ink-2); font-size: 0.84rem; }
.evidence-meter { display: grid; gap: 0.3rem; color: var(--ink-3); font-size: 0.75rem; }
.evidence-meter progress { width: 100%; height: 8px; accent-color: var(--accent); }
.view-all { display: inline-flex; margin-top: 1rem; font-weight: 620; }
.benchmark-list { padding: 0.8rem 1rem; }
.benchmark-row {
  display: grid;
  grid-template-columns: 7rem 1fr auto;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
}
.benchmark-row:last-child { border-bottom: 0; }
.methodology > details { padding: 0; background: var(--surface); }
.methodology > details > summary {
  min-height: 56px;
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  font-weight: 650;
}
.methodology-body { padding: 0 1rem 1rem; }
.methodology-body h2 { margin-top: 0.5rem; }
.methodology-body p { color: var(--ink-2); }
.first-progress { padding: 1.6rem; }
@media (max-width: 759px) {
  .progress-hero { grid-template-columns: 1fr; }
  .progress-primary { justify-self: start; }
  .progress-position, .progress-position.three, .progress-signals, .focus-list, .learning-path, .skill-journey-board { grid-template-columns: 1fr; }
  .section-heading { align-items: start; flex-direction: column; }
  .range-nav { width: 100%; }
  .skills-heading { gap: 1.2rem; }
  .skill-filters { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; }
  .trend-summary { flex-direction: column; gap: 0.2rem; }
}

@media (max-width: 560px) {
  .shell { padding-left: 1rem; padding-right: 1rem; }
  .topbar { margin-bottom: 1.6rem; }
  .progress-hero { margin-left: -0.25rem; margin-right: -0.25rem; padding: 1.15rem; }
  .skill-filters { grid-template-columns: 1fr 1fr; }
  .skill-filters button { grid-column: 1 / -1; }
  .path-preview { grid-template-columns: 1fr; }
  .full-ladder li, .benchmark-row { grid-template-columns: 1fr; gap: 0.15rem; }
  .skill-card summary { gap: 0.55rem; }
  .trend-figure { overflow-x: auto; }
  .trend-chart { width: 480px; max-width: none; }
  .row { grid-template-columns: 1fr; gap: 0.25rem; }
  .row .nums { white-space: normal; overflow-wrap: anywhere; }
}

.banner {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 0.85rem 1.1rem;
  border-radius: 0 6px 6px 0;
  margin-bottom: 1.2rem;
  font-size: 0.9rem;
}
.banner.warn { border-left-color: var(--warn); background: var(--warn-soft); }
.banner p:last-child { margin-bottom: 0; }

.empty { color: var(--ink-3); font-size: 0.9rem; padding: 1.5rem 0; }

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

/* ---- grammar feedback ---- */
.fb-right, .fb-wrong { margin: .35rem 0; font-size: 1.02rem; }
.fb-right::before { content: "\2713"; margin-right: .5rem; opacity: .65; }
.fb-wrong::before { content: "\2717"; margin-right: .5rem; opacity: .55; }
.fb-wrong { opacity: .62; }
.fb-wrong strong { text-decoration: line-through; font-weight: 500; }
.fb-right strong { font-weight: 700; }
.fb-why { margin: .6rem 0 .35rem; }
.fb-chose { opacity: .75; }
.fb-lesson { margin-top: .7rem; font-size: .92rem; }
.fb-lesson summary { cursor: pointer; opacity: .7; }
.fb-lesson p { margin: .5rem 0 0; opacity: .85; line-height: 1.55; }

/* ---- comprehension constructs ---- */
.construct-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}
.construct-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  background: var(--surface);
}
.construct-item strong { display: block; font-size: 1.6rem; line-height: 1.2; margin: 0.2rem 0; }
.construct-item span:last-child { color: var(--ink-3); font-size: 0.82rem; }
.construct-item.is-unmeasured {
  border-style: dashed;
  background: var(--surface-2);
}

.position-detail { display: block; margin-top: 0.25rem; font-size: 0.78rem; color: var(--ink-3); }

/* ---- vocabulary ---- */
.vocab-head { display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; }
.vocab-word { font-size: 1.15rem; }
.vocab-gloss { color: var(--ink-2); }
.vocab-met { color: var(--ink-3); font-size: 0.85rem; }
.vocab-sentence { color: var(--ink-3); font-size: 0.9rem; margin: 0.45rem 0 0; }
.vocab-task { margin-top: 1.2rem; }
.vocab-response-label { display: block; color: var(--ink-3); font-size: .82rem; margin-bottom: .35rem; }
.vocab-task input[type="text"] { width: min(100%, 32rem); font-size: 1rem; padding: .72rem .8rem; }
.vocab-intro-form { display: grid; gap: .45rem; max-width: 34rem; }
.vocab-intro-form input { font-size: 1rem; padding: .72rem .8rem; }
.vocab-teaching p { margin: .7rem 0 0; }
.vocab-context { max-width: 65ch; overflow-wrap: anywhere; }
.vocabulary-library-card { display: flex; justify-content: space-between; gap: 1rem; }
.vocabulary-library-card h3, .vocabulary-library-card p { margin: 0 0 .35rem; }
.vocabulary-actions { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.vocabulary-actions form { margin: 0; }
.vocabulary-filters { display: flex; gap: .8rem; align-items: end; flex-wrap: wrap; margin: 1rem 0 1.5rem; }
.vocabulary-filters label { display: grid; gap: .3rem; color: var(--ink-3); font-size: .82rem; }
.vocabulary-filters input, .vocabulary-filters select { min-height: 44px; padding: .55rem .65rem; font: inherit; }
.recap-word { padding: .55rem .75rem; margin: 0 0 .4rem; border: 1px solid var(--line); border-radius: 7px; }

@media (pointer: coarse) {
  .vocab-task + .hint { display: none; }
}
@media (max-width: 560px) {
  .vocabulary-library-card { flex-direction: column; }
}

/* Profile groups: activities, competences, instruments. The headings carry
   the claim each group is making, so they need to read as labels rather than
   as decoration between cards. */
.profile-group-label { margin: 1.6rem 0 0.6rem; display: flex; gap: 0.6rem; align-items: baseline; flex-wrap: wrap; }
.profile-group-label small { text-transform: none; letter-spacing: 0; color: var(--ink-3); font-size: 0.78rem; }
.instrument-strip {
  display: flex; flex-direction: column; gap: 0.2rem;
  border: 1px solid var(--line); border-radius: 10px; padding: 0.9rem 1rem;
}
.instrument-strip strong { font-weight: 500; }

/* A reading passage is read, not skimmed: measured line length, generous
   leading, and room to breathe between it and the question. */
.reading-text {
  max-width: 62ch;
  margin: 0 0 1.6rem;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  line-height: 1.75;
  white-space: pre-wrap;
}

/* The recorder is one control and one clock. Anything more competes with the
   prompt, which is the thing the learner needs to be holding in their head. */
.recorder { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; margin: 1.4rem 0; }
.recorder-time { font-variant-numeric: tabular-nums; font-size: 1.1rem; color: var(--ink-2); }
.recorder-time.past-target { color: var(--good); }
.recorder [data-recorder-note] { flex-basis: 100%; margin: 0; }

/* An exchange reads as a conversation: the two sides sit on opposite edges so
   whose turn is whose is legible without labels. */
.exchange { display: flex; flex-direction: column; gap: 0.6rem; margin: 1.4rem 0; }
.turn { max-width: 46ch; padding: 0.7rem 0.95rem; border-radius: 12px; line-height: 1.55; }
.turn-partner { align-self: flex-start; background: var(--surface-2, #eceef1); }
.turn-learner { align-self: flex-end; background: var(--accent-soft, #e3ecf5); }
.goals { color: var(--ink-2); margin: 0 0 1.2rem; }

/* A glossable word is marked, not highlighted. A background colour breaks the
   line into fragments and makes the text harder to read, which defeats the
   exercise the marking is meant to support. */
.gloss-word {
  border-bottom: 1px dotted var(--ink-3);
  cursor: help;
}
.gloss-word:hover, .gloss-word:focus-visible { border-bottom-color: var(--accent); }
.gloss-word.gloss-taken { border-bottom-style: solid; border-bottom-color: var(--good); }

.gloss-bubble {
  position: absolute;
  z-index: 20;
  max-width: 22rem;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.85rem;
  line-height: 1.45;
  pointer-events: none;
}
.gloss-bubble .gloss-note { display: block; opacity: 0.72; font-size: 0.78rem; margin-top: 0.15rem; }

/* Leaving a block. Top-left, ahead of the wordmark, because that is where a
   way back is looked for -- and quiet, because it is an escape hatch rather
   than the thing to do next. */
.leave {
  font-size: 0.85rem;
  color: var(--ink-3);
  text-decoration: none;
  margin-right: 0.9rem;
  white-space: nowrap;
}
.leave:hover, .leave:focus-visible { color: var(--ink); }

.resume {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.2rem;
}
.resume .muted { display: block; font-size: 0.85rem; }

/* ---- speaking: waiting on the rating ---- */
.rating-wait { display: flex; gap: 1rem; align-items: flex-start;
               padding: 1.1rem 1.2rem; border: 1px solid var(--line);
               border-radius: 10px; background: var(--surface); }
.rating-wait p { margin: 0; }
.rating-wait-head { font-weight: 600; margin-bottom: 0.25rem !important; }
.spinner { flex: none; width: 1.15rem; height: 1.15rem; margin-top: 0.15rem;
           border: 2px solid var(--line-2); border-top-color: var(--accent);
           border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* The reduced-motion rule above kills the animation, which would leave a bare
   circle saying nothing. Give it a visible resting state instead. */
@media (prefers-reduced-motion: reduce) {
  .spinner { border-color: var(--accent); border-top-color: var(--accent); opacity: 0.6; }
}

/* The Path Step is derived from the floor of the plausible range, so it reads
   under the range the card leads with rather than competing with it. */
.journey-step-line { margin-top: 0.16rem; font-size: 0.78rem; color: var(--ink-2);
                     font-variant-numeric: tabular-nums; }

/* ---- dictation: looking words up in the scored transcript ---- */
/* No underline. In reading only some words are glossable, so the mark tells
   you where it is worth stopping; here everything worth glossing is glossed,
   and marking all of it would turn the transcript into a hedge. */
[data-lookup] .gloss-word { border-bottom: none; cursor: help;
                            border-radius: 3px; padding: 0 1px; }
[data-lookup] .gloss-word:hover,
[data-lookup] .gloss-word:focus-visible {
  background: var(--accent-soft);
  outline: none;
}
/* Kept words stay marked. The transcript runs to a dozen sentences and you
   would otherwise lose track of what you had already taken. */
[data-lookup] .gloss-word.gloss-taken { border-bottom: 2px solid var(--good); }
[data-lookup] .gloss-word.pick-flash { animation: pick-flash 600ms ease-out; }
@keyframes pick-flash {
  from { background: var(--good-soft); }
  to   { background: transparent; }
}

.toasts {
  position: fixed;
  right: 1rem; bottom: 1rem;
  display: flex; flex-direction: column; gap: 0.5rem;
  z-index: 40;
  pointer-events: none;
  max-width: min(22rem, calc(100vw - 2rem));
}
.toast {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--good);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.10);
  font-size: 0.86rem;
  animation: toast-in 160ms ease-out;
}
.toast-warn { border-left-color: var(--warn); }
.toast-gloss { display: block; color: var(--ink-2); margin-top: 0.1rem; }
.toast-note { display: block; color: var(--ink-3); font-size: 0.76rem;
              margin-top: 0.2rem; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
@media (max-width: 34rem) {
  .toasts { left: 1rem; right: 1rem; max-width: none; }
}

/* ---- vocabulary: throwing a word out ---- */
/* In the corner rather than in the flow: it belongs to the card, not to the
   word, and a column reserved for it would push every gloss left on a list
   where most cards are never deleted. */
.vocab-card { position: relative; }
.vocab-main { padding-right: 2rem; }
.vocab-drop { position: absolute; top: 0.6rem; right: 0.6rem; margin: 0; }
/* Grey, and the same grey the page already uses for a quiet border -- the
   default button is the accent, which would put a saturated blue square in
   the corner of every word. Quiet until reached for, too: a destructive
   control that advertises itself on a list of twelve words is a list of
   twelve invitations to delete something. */
.icon-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--line-2);
  padding: 0.3rem;
  line-height: 0;
  cursor: pointer;
  transition: color 120ms, border-color 120ms;
}
.icon-btn:hover, .icon-btn:focus-visible {
  color: var(--ink-2);
  border-color: var(--line-2);
}

/* ---- listening check --------------------------------------------------- */
.check-shell { max-width: 100%; padding: 0 0 5rem; }
.check-topbar {
  flex-wrap: nowrap; justify-content: flex-start; margin: 0; padding: 1rem 1.75rem;
  min-height: 68px;
}
.check-topbar .brand { color: var(--ink); }
.check-name { padding-left: 1.25rem; border-left: 1px solid var(--line); color: var(--ink-3); font-size: .82rem; }
.check-exit, .check-link-button {
  border: 0; background: transparent; color: var(--ink-3); padding: .5rem 0;
  min-height: 40px; font: inherit; font-size: .82rem;
}
.check-exit { margin-left: auto; display: inline-flex; align-items: center; gap: .45rem; }
.check-exit:hover, .check-link-button:hover { color: var(--accent); filter: none; }
.check-main { width: 100%; }
.check-content { width: min(calc(100% - 2.5rem), 742px); margin: 0 auto; padding: 2rem 0 0; }
.check-meta { display: flex; justify-content: space-between; align-items: center; gap: 1rem; color: var(--ink-3); font-size: .8rem; margin-bottom: 1.25rem; }
.check-steps { display: flex; align-items: center; gap: .75rem; list-style: none; margin: 0; padding: 0; }
.check-steps li { display: flex; align-items: center; gap: .38rem; }
.check-steps li > span { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; background: var(--surface-2); font-size: .68rem; }
.check-steps .current { color: var(--accent); font-weight: 600; }
.check-steps .current > span { background: var(--accent); color: var(--accent-ink); }
.check-steps .done > span { background: var(--accent-soft); color: var(--accent); }
.check-heading { margin-bottom: 1.4rem; }
.check-heading h1, .check-answer-heading h1 { font-size: clamp(1.75rem, 4vw, 2rem); font-weight: 560; }
.check-heading p { color: var(--ink-3); margin: .35rem 0 0; }
.check-player { display: flex; align-items: center; gap: 1.1rem; padding: 1rem 1.1rem; margin: 1.4rem 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.check-player-main { flex: 1; min-width: 0; }
.check-player-label { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; font-size: .82rem; }
.check-player-label strong { font-weight: 580; }
.check-time { color: var(--ink-3); font: .75rem/1.5 var(--mono); white-space: nowrap; }
.check-track { height: 4px; margin: .65rem 0 .32rem; border-radius: 3px; overflow: hidden; background: var(--surface-2); }
.check-track > span { display: block; width: 0; height: 100%; background: var(--accent); }
.check-player-status { color: var(--ink-3); font-size: .74rem; }
.check-play-button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-width: 116px; min-height: 44px; }
.check-play-button.playing { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.check-question-list { display: grid; gap: .75rem; list-style: none; margin: 0; padding: 0; }
.check-preview-question { padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.check-preview-question h2 { display: flex; gap: .65rem; margin: 0; font-size: 1rem; font-weight: 580; }
.check-preview-question h2 > span { color: var(--ink-3); font: .75rem/1.8 var(--mono); }
.check-preview-question ul { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem 1rem; list-style: none; margin: .55rem 0 0 1.4rem; padding: 0; color: var(--ink-3); font-size: .82rem; }
.check-preview-question li { display: flex; gap: .5rem; }
.check-preview-question li > span { width: 1rem; flex: none; font: .7rem/1.8 var(--mono); }
.check-bottom-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1rem; margin-top: 1.5rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.check-difficulty { display: flex; gap: .6rem; }
.check-difficulty-button { display: inline-flex; align-items: center; gap: .65rem; min-height: 54px; padding: .55rem .8rem; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--ink); text-align: left; }
.check-difficulty-button:hover:not(:disabled) { background: var(--surface-2); border-color: var(--ink-3); filter: none; }
.check-difficulty-button:disabled { color: var(--ink-3); background: var(--surface-2); }
.check-difficulty-button strong, .check-difficulty-button small { display: block; line-height: 1.35; }
.check-difficulty-button strong { font-size: .8rem; }
.check-difficulty-button small { margin-top: .05rem; color: var(--ink-3); font-size: .68rem; }
.check-action-icon { color: var(--ink-3); font-size: .85rem; }
.check-primary-action { margin-left: auto; }
form.check-primary-action { display: flex; }
.check-inline-error { margin: .6rem 0 0; color: var(--bad); font-size: .8rem; }
.check-utilities { display: flex; justify-content: flex-end; margin-top: 1.5rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.check-answer-progress { display: flex; gap: .25rem; margin-bottom: 1.7rem; }
.check-answer-progress span { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-2); }
.check-answer-progress .filled { background: var(--accent); }
.check-answer-heading { margin-bottom: 1.4rem; }
.check-answer-heading p { margin: 0 0 .4rem; color: var(--ink-3); font-size: .82rem; }
.check-answer-form fieldset { display: grid; gap: .6rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.check-choice { display: flex; align-items: center; gap: .8rem; min-height: 57px; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.check-choice:hover:not(.spent) { border-color: var(--line-2); }
.check-choice.selected, .check-choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.check-choice input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); flex: none; }
.check-choice.compact { min-height: 45px; padding: .55rem .8rem; }
.check-choice.spent { color: var(--ink-3); background: var(--surface-2); cursor: default; }
.check-choice small { margin-left: auto; color: var(--ink-3); font-size: .68rem; }
.check-answer-letter { width: 1rem; flex: none; color: var(--ink-3); font: .72rem/1.5 var(--mono); }
.check-saved-choice { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 8px; }
.check-saved-choice p { margin: 0; color: var(--ink-3); font-size: .85rem; }
.check-matching-statements { display: grid; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.check-matching-statements li { display: flex; gap: .75rem; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.check-matching-statements li > span { color: var(--ink-3); font: .75rem/1.8 var(--mono); }
.check-matching-statements li > small { margin-left: auto; color: var(--ink-3); }
.check-matching-statements .spent { color: var(--ink-3); background: var(--surface-2); }
.check-example-strip { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.25rem 0; padding: .8rem 1rem; border-radius: 8px; background: var(--accent-soft); font-size: .82rem; }
.check-matching-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.check-matching-head h1 { font-size: 1.45rem; font-weight: 580; }
.check-matching-head ol { display: flex; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.check-matching-head li { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); color: var(--ink-3); font-size: .72rem; }
.check-matching-head li.current { background: var(--accent); color: var(--accent-ink); }
.check-matching-head li.done { background: var(--accent-soft); color: var(--accent); }
.check-dialog { width: min(calc(100% - 2rem), 440px); padding: 1.6rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: 0 20px 80px rgb(0 0 0 / .22); }
.check-dialog::backdrop { background: rgb(15 17 22 / .5); }
.check-dialog h2 { margin: 0; font-size: 1.35rem; }
.check-dialog p { margin: .7rem 0 1.35rem; color: var(--ink-3); }
.check-dialog-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: .6rem; }
.check-dialog-actions form { margin: 0; }
.check-welcome { width: min(calc(100% - 2.5rem), 620px); margin: 0 auto; padding: 3rem 0 0; }
.check-welcome h1 { max-width: 14ch; font-size: clamp(2.25rem, 6vw, 2.8rem); font-weight: 560; line-height: 1.15; }
.check-welcome .lede { max-width: 24rem; font-size: 1.05rem; }
.check-sequence { display: flex; align-items: center; gap: 1rem; margin: 2rem 0; padding: 1.4rem 0; border-block: 1px solid var(--line); }
.check-sequence > div { display: grid; flex: 1; gap: .1rem; }
.check-sequence > div > span { color: var(--accent); margin-bottom: .35rem; }
.check-sequence strong { font-size: .9rem; }
.check-sequence small, .check-reassure { color: var(--ink-3); font-size: .8rem; }
.check-welcome-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem 1.2rem; margin-top: 1.2rem; }
.check-example-page > h1 { max-width: 20ch; }
.check-answer-form legend { margin: 0 0 1rem; padding: 0; font-size: 1.35rem; font-weight: 600; }
.check-example-feedback { margin-top: 1.5rem; padding: 1.2rem; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.check-example-feedback h2 { margin: 0 0 .4rem; }
.check-example-feedback p { color: var(--ink-3); }
.check-example-actions > a { order: 0; }
.check-result { width: min(calc(100% - 2.5rem), 640px); margin: 0 auto; padding: 2.6rem 0 0; }
.check-result > h1 { max-width: 20ch; font-size: clamp(2rem, 5vw, 2.5rem); font-weight: 560; }
.check-result-status { display: flex; align-items: center; gap: .4rem; margin-bottom: 1rem; color: var(--good); font-size: .82rem; }
.check-result-card { margin: 1.6rem 0; padding: 1.6rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.check-result-card > p { margin: 1.1rem 0 0; color: var(--ink-3); }
.check-result-summary { display: flex; align-items: center; gap: 1.3rem; }
.check-result-level { color: var(--accent); font-size: 3.4rem; font-weight: 600; line-height: 1; letter-spacing: -.06em; }
.check-result-summary h2 { margin: 0; font-size: 1.3rem; }
.check-result-summary span { color: var(--ink-3); font-size: .75rem; }
.check-level-scale { display: grid; grid-template-columns: repeat(6, 1fr); gap: .35rem; margin-top: 1.25rem; color: var(--ink-3); font: .68rem/1.5 var(--mono); }
.check-level-scale span::before { display: block; content: ""; height: 5px; margin-bottom: .35rem; border-radius: 3px; background: var(--surface-2); }
.check-level-scale .active { color: var(--accent); }
.check-level-scale .active::before { background: var(--accent); }
.check-result-primary { width: 100%; }
.check-result-action { margin-top: 1.5rem; }
.check-result-action .check-result-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  min-height: 58px;
  padding: 15px 20px;
  border-radius: 8px;
  font-size: 1.0625rem;
  font-weight: 550;
  line-height: 1.4;
  text-align: center;
}
.check-result-action .check-result-primary svg { width: 19px; height: 19px; flex: none; }
.check-result-action .check-result-primary span { flex: 1; }
.check-result-action > p { margin: .625rem 0 0; max-width: none; color: var(--ink-3); font-size: .75rem; line-height: 1.5; text-align: center; }
.site-footer { margin-top: 3rem; color: var(--ink-3); font-size: .8rem; }
.site-footer a { color: inherit; }
.legal > h2 { margin: 2rem 0 .5rem; font-size: 1.1rem; }
.legal > p, .legal li { color: var(--ink-2); }
.legal > ul { padding-left: 1.2rem; }
.check-result-details { margin-top: 1.5rem; padding-top: .8rem; border-top: 1px solid var(--line); color: var(--ink-3); font-size: .82rem; }
.check-result-details summary { color: var(--ink); cursor: pointer; padding: .5rem 0; }
.check-result-details > div { padding-top: .7rem; }
.check-result-details .ladder { display: grid; gap: .3rem; margin: 1rem 0; }
.check-result-details .ladder-rung { display: flex; align-items: center; gap: .7rem; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.check-result-details .ladder-rung.untried { opacity: .45; }
.check-result-details .ladder-rung.cleared { border-color: var(--good); }
.check-result-details .ladder-mark { display: grid; place-items: center; width: 1.4rem; height: 1.4rem; flex: none; border-radius: 50%; background: var(--surface-2); }
.check-result-details .ladder-body strong, .check-result-details .ladder-body small { display: block; }
.check-result-details .ladder-body small { color: var(--ink-3); }
.check-clip-details { padding: .5rem 0; border-top: 1px solid var(--line); }
.check-clip-details audio { width: 100%; margin: .6rem 0; }

@media (max-width: 600px) {
  .check-topbar { padding: .85rem 1.1rem; min-height: 60px; }
  .check-name { padding-left: .8rem; }
  .check-content, .check-welcome { width: min(calc(100% - 2rem), 742px); padding-top: 1.5rem; }
  .check-meta { align-items: flex-start; flex-direction: column; gap: .7rem; }
  .check-player { flex-wrap: wrap; gap: .75rem; }
  .check-player-main { flex-basis: 100%; }
  .check-play-button { width: 100%; }
  .check-preview-question ul { grid-template-columns: 1fr; }
  .check-bottom-actions { align-items: stretch; }
  .check-primary-action { width: 100%; order: 1; margin-left: 0; }
  .check-primary-action button, button.check-primary-action { width: 100%; }
  .check-difficulty { width: 100%; order: 2; }
  .check-difficulty-button { flex: 1; padding: .55rem .7rem; }
  .check-utilities { margin-top: 1.1rem; }
  .check-matching-head { align-items: flex-start; flex-direction: column; }
  .check-sequence { gap: .7rem; }
  .check-sequence > span { display: none; }
  .check-welcome-actions button { width: 100%; }
  .check-result { width: min(calc(100% - 2rem), 640px); padding-top: 2rem; }
  .check-result-card { padding: 1.2rem; }
  .check-result-action .check-result-primary { padding-inline: 14px; font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .check-track > span { transition: none; }
}
