/* =====================================================================
   NATO English: Military Scenarios -- one stylesheet for every page
   Order: 1 tokens > 2 base > 3 frame > 4 slide layout > 5 components > 6 pages > 7 utilities
   Breakpoints (min-width): md 640px, lg 1024px, xl 1440px. Short screens: max-height 500px.
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --bg: #EFF4FA;
  --surface: #FFFFFF;
  --surface2: #E6EEF6;
  --border: #C3D3E5;
  --border-strong: #74899F;
  --fg: #0D1F35;
  --fg-muted: #4A6685;
  --accent: #1557B0;
  --accent-hover: #0F4590;
  --accent-lt: #2A7DE1;
  --gold: #845F17;
  --gold-hover: #6B4C10;
  --success: #176A43;
  --danger: #B22222;
  --navy: #1557B0;
  --star-s: #1557B0;
  --star-t: #6B4DB0;
  --star-a: #845F17;
  --star-r: #1E7A4F;
  --tint-accent: rgba(21, 87, 176, 0.08);
  --tint-success: rgba(23, 106, 67, 0.10);
  --tint-danger: rgba(178, 34, 34, 0.07);
  --tint-gold: rgba(132, 95, 23, 0.10);

  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-serif: 'Source Serif 4', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* fluid type: 360px wide -> 1600px wide */
  --fs-h1: clamp(2.5rem, 1.92rem + 2.58vw, 4.5rem);
  --fs-h2: clamp(1.75rem, 1.46rem + 1.29vw, 2.75rem);
  --fs-h3: clamp(1.0625rem, 0.99rem + 0.32vw, 1.3125rem);
  --fs-body: clamp(1rem, 0.946rem + 0.24vw, 1.1875rem);
  --fs-small: clamp(0.9375rem, 0.9rem + 0.16vw, 1.0625rem);
  --fs-label: clamp(0.8125rem, 0.794rem + 0.08vw, 0.875rem);
  --fs-btn: clamp(1rem, 0.97rem + 0.12vw, 1.0625rem);
  --lh: 1.6;

  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
  --gutter: clamp(16px, 4vw, 48px);
  --flow: clamp(1rem, 0.78rem + 0.97vw, 1.75rem);
  --measure: 62ch;
  --content-max: 760px;
  --pad-card: clamp(16px, 0.9rem + 0.8vw, 24px);

  --flow-lg: calc(var(--flow) * 1.75);

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(13, 31, 53, 0.05), 0 4px 14px rgba(13, 31, 53, 0.06);
  color-scheme: light dark;
}
/* The dark theme follows the phone (3 Nov, panel F14): every pair at least 4.5:1 on its surface; the drawings keep their colours. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1923; --surface: #16222F; --surface2: #1E2C3B; --border: #42566F; --border-strong: #5B7391;
    --fg: #E8EEF5; --fg-muted: #A7B6C8; --accent: #6FA6F0; --accent-hover: #8FBBF5; --accent-lt: #9CC4F7;
    --gold: #D3A54A; --gold-hover: #E2B960; --success: #4CBF86; --danger: #E57373; --navy: #6FA6F0;
    --star-s: #6FA6F0; --star-t: #A78BE0; --star-a: #D3A54A; --star-r: #4CBF86;
    --tint-accent: rgba(111, 166, 240, 0.16); --tint-success: rgba(76, 191, 134, 0.16); --tint-danger: rgba(229, 115, 115, 0.14); --tint-gold: rgba(211, 165, 74, 0.16);
    --shadow: none;
  }
  .course-disclaimer { background: rgba(229, 115, 115, 0.10); }
  .pic-frame { border-color: var(--border); }
  img.pc-thumb, .pic-door-img, .pic-frame img { filter: brightness(0.92); }
}
@media (min-width: 1024px) { :root { --content-max: 780px; --measure: 68ch; } } /* one edge for text and cards (second panel, A9) */
@media (min-width: 1440px) { :root { --content-max: 820px; } }
/* very large screens: scale the whole page up a little so the column does not look lost */
@media (min-width: 1920px) { html { font-size: 106.25%; } :root { --content-max: 1000px; } }
@media (min-width: 2400px) { html { font-size: 112.5%; } :root { --content-max: 1080px; } }

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: var(--lh);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, figure, blockquote, ul, ol { margin: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--fg); line-height: 1.12; font-weight: 700; }
ul, ol { padding-left: 1.25em; }
li + li { margin-top: 0.35em; }
img, svg { max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { touch-action: manipulation; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--fg); outline-offset: 3px; } /* ink, never the selected blue (second panel, A17) */
input:focus-visible, textarea:focus-visible, select:focus-visible { outline-color: var(--accent-lt); outline-offset: 1px; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--sp-3); top: -60px; z-index: 100;
  background: var(--fg); color: #fff; padding: 10px 16px; border-radius: var(--radius);
  font-family: var(--font-display); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: var(--sp-3); color: #fff; }

/* ---------- 3. Frame: top bar, stage, bottom bar ---------- */
.app {
  height: 100%;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.topbar { position: relative; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--border); }
.progress { height: 4px; background: var(--border); }
.progress-fill { height: 100%; width: 0; background: var(--gold); transition: width 0.3s ease; }
.topbar-row, .pager-row {
  max-width: calc(var(--content-max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.topbar-row { display: flex; align-items: center; gap: var(--sp-3); min-height: 52px; }
.home-link, .brand {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  font-family: var(--font-display); font-size: 1rem; font-weight: 700; letter-spacing: 0.03em;
  color: var(--accent); text-decoration: none; white-space: nowrap;
}
.home-link:hover, .brand:hover { color: var(--accent-hover); text-decoration: underline; }
.dots { display: none; flex: 1 1 auto; min-width: 0; justify-content: center; gap: 6px; }
.dot {
  width: 32px; height: 44px; padding: 0; border: 0; background: none; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.dot::before { content: ''; width: 8px; height: 8px; border-radius: 4px; background: #6A82A0; transition: width 0.2s, background 0.2s; }
.dot.is-seen::before { background: var(--fg-muted); }
.dot.is-current::before { width: 20px; background: var(--gold); }
.dot:hover::before { background: var(--accent); }
.dot.is-current:hover::before { background: var(--gold-hover); }
.dot:focus-visible { outline: 2px solid var(--accent-lt); outline-offset: 0; }
.counter {
  margin-left: auto; white-space: nowrap; font-variant-numeric: tabular-nums;
  font-family: var(--font-display); font-size: 1rem; font-weight: 600; color: var(--fg-muted);
}
/* The dots are a row of small controls; rule 8 (the owner, 31 Oct: every row) keeps them off touch screens, where a thumb lands on a neighbour. */
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .dots { display: flex; }
  .dots + .counter { margin-left: 0; }
}
.topbar-row #cb-btn.cb-inbar { margin-left: 0; flex-shrink: 0; }

.stage {
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-padding: var(--sp-5);
}
.stage:focus { outline: none; }
.slide h1[tabindex="-1"]:focus, .slide h2[tabindex="-1"]:focus { outline: none; }

.pager { position: relative; z-index: 20; background: var(--surface); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom, 0px); }
.pager-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding-top: 10px; padding-bottom: 10px; }
.pager-row #btnNext { margin-left: auto; }
body.on-cover .pager { display: none; }
body.is-typing .pager { display: none; }

/* ---------- 4. Slide layout ---------- */
.slide {
  display: none;
  max-width: calc(var(--content-max) + 2 * var(--gutter));
  margin-inline: auto;
  padding: clamp(24px, 4vh, 56px) var(--gutter) clamp(40px, 7vh, 80px);
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  font-family: var(--font-serif);
  font-size: var(--fs-body);
  line-height: var(--lh);
}
.slide.active { display: block; animation: slideIn 0.2s ease; }
@keyframes slideIn { from { opacity: 0; } to { opacity: 1; } }
.slide > * + * { margin-top: var(--flow); }
.slide > .slide-eyebrow + *, .slide > .star-chip + *, .slide > .cover-eyebrow + * { margin-top: var(--sp-2); }
.slide > .slide-title + .slide-intro, .slide > .slide-title + .slide-body,
.slide > .slide-title + .level-chip, .slide > .level-chip + .slide-intro,
.slide > .level-chip + .slide-body { margin-top: var(--sp-3); }
/* Running text stops at the measure wherever it lives, not only in p and li; cards and grids keep the column. */
.slide:not(#slide-0) :where(.slide-body, .note, .a-step-body, .tl-body, .lang-content, .listen-instr, .listen-tx, .listen-q-text,
  .cq-text, .cq-prompt, .cq-opt, .cq-fb, .cq-explain, .cq-tryagain, .try-reason, .exemplar-note, .feedback-box, .pri-fb, .pri-hint,
  .en-note, .obj-t, .star-note, .about-card-body, .transfer-list, .sc-desc, .ws-hint, .vocab-def, .phrase-item, .so-what, .so-card-body,
  .outcome-text, .rc-desc, .vocab-grid > div, .checklist > div, .sentence-starters, .reveal-note, .task-box p, .card > p, .card-muted > p, .listen-q-item, .notice-q, .notice-list, .notice-why, .recall-q, .recall-list) { max-width: var(--measure); }

.slide-eyebrow {
  font-family: var(--font-display); font-size: var(--fs-label); font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-muted);
}
.slide-title { font-size: var(--fs-h2); font-weight: 800; letter-spacing: 0.005em; }
.slide-intro, .slide-body { color: var(--fg); max-width: var(--measure); }
.slide-body p + p { margin-top: 0.75em; }
.slide p, .slide li { max-width: var(--measure); }
.slide b, .slide strong { color: var(--fg); }

/* Covers: centred start pages */
#slide-0.active { min-height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
#slide-0 > * { max-width: min(100%, 680px); }
#slide-0 > * + * { margin-top: var(--sp-4); }
#slide-0 > .cover-title { margin-top: var(--sp-3); }
#slide-0 > .vocab-box, #slide-0 > .course-disclaimer, #slide-0 > .cover-feature { text-align: left; }

/* ---------- 5. Components ---------- */

/* 5.1 Buttons */
.btn, .gen-btn, .cover-begin, .cover-start, .end-btn, .exemplar-btn, .listen-btn, .listen-chk,
.share-btn, .pri-retry, .cb-like-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px;
  border: 2px solid transparent; border-radius: var(--radius);
  font-family: var(--font-display); font-size: var(--fs-btn); font-weight: 700; letter-spacing: 0.04em; line-height: 1.1;
  text-decoration: none; text-align: center; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
/* primary: moves the learner forward */
.btn-primary, .gen-btn, .cover-begin, .cover-start, .end-btn.prim {
  background: var(--gold); border-color: var(--gold); color: #fff;
}
.btn-primary:hover, .gen-btn:hover, .cover-begin:hover, .cover-start:hover, .end-btn.prim:hover {
  background: var(--gold-hover); border-color: var(--gold-hover); color: #fff;
}
/* secondary */
.btn-secondary, .end-btn, .exemplar-btn, .share-btn, .pri-retry, .gen-btn.btn-secondary, .listen-chk {
  background: var(--surface); border-color: var(--border-strong); color: var(--fg);
}
.btn-secondary:hover, .end-btn:hover, .exemplar-btn:hover, .share-btn:hover, .pri-retry:hover,
.gen-btn.btn-secondary:hover, .listen-chk:hover {
  background: var(--surface); border-color: var(--accent); color: var(--accent);
}
.listen-chk { border-color: var(--accent); color: var(--accent); }
/* play / audio actions */
.listen-btn { background: var(--accent); border-color: var(--accent); color: #fff; border-radius: var(--radius-pill); }
.listen-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
/* quiet text action */
.btn-link, .gen-btn.reveal-btn, .listen-show-tx, .cc-go {
  background: none; border: 0; padding: 0 2px; min-height: 44px; display: inline-flex; align-items: center;
  color: var(--accent); text-decoration: underline; text-underline-offset: 3px;
  font-family: var(--font-display); font-size: var(--fs-btn); font-weight: 700; letter-spacing: 0.02em; cursor: pointer;
}
.btn-link:hover, .gen-btn.reveal-btn:hover, .listen-show-tx:hover, .cc-go:hover { background: none; color: var(--accent-hover); }
/* disabled: clearly unavailable, still readable */
.btn:disabled, .gen-btn:disabled, .end-btn:disabled, .exemplar-btn:disabled, .listen-btn:disabled,
.listen-chk:disabled, .share-btn:disabled, .cover-begin:disabled {
  background: var(--surface2); border-color: var(--border); color: var(--fg-muted); cursor: not-allowed;
}
/* a pressed state on every button, option and card (F11) */
.btn:not(:disabled):active, .gen-btn:not(:disabled):active, .end-btn:active, .listen-btn:not(:disabled):active, .audio-btn:active,
.opt:not([aria-disabled="true"]):active, .cq-opt:active, .listen-opt:not(.lc-locked):active, .pri-card:active, .notice-item:not([aria-disabled="true"]):active,
.chunk:not([aria-disabled="true"]):active, .way-btn:active, .pic-door-btn:active, .sc-card:active, .wcard:active { transform: translateY(1px); }
/* the icon set (F2): 24px symbols in /icons.svg, drawn in currentColor */
.ico { width: 1.25em; height: 1.25em; flex-shrink: 0; vertical-align: -0.2em; fill: none; stroke: currentColor; }
.ico-lg { width: 1.75em; height: 1.75em; }
.ico-xl { width: 2.25em; height: 2.25em; }
.btn-lg, .cover-begin, .cover-start { padding: 12px 28px; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); }
.btn-row, .ws-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-4) var(--sp-5); }

/* 5.2 Chips and labels */
.chip, .cover-meta-chip, .level-chip, .sc-tag, .level-badge, .phrase-tag, .sc-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 12px; border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong); background: var(--surface);
  font-family: var(--font-display); font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.04em; line-height: 1.5;
  color: var(--fg); white-space: nowrap;
}
.level-chip { color: var(--fg-muted); border-color: var(--border); background: transparent; }
.box-label, .section-label, .vocab-box-hdr, .lang-box-hdr, .listen-hdr, .cq-num, .inc-hdr, .cover-kicker,
.cover-eyebrow, .sc-num, .exemplar-note-label {
  font-family: var(--font-display); font-size: var(--fs-label); font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold);
}
.section-label { color: var(--fg); font-size: var(--fs-small); letter-spacing: 0.06em; }
.note { font-size: var(--fs-small); color: var(--fg-muted); max-width: var(--measure); }
.form-error { font-size: var(--fs-small); color: var(--danger); }
.part-label { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.part-s, .s-col, .slide .part-s, .slide .s-col { color: var(--star-s); }
.part-t, .t-col, .slide .part-t, .slide .t-col { color: var(--star-t); }
.part-a, .a-col, .slide .part-a, .slide .a-col { color: var(--star-a); }
.part-r, .r-col, .slide .part-r, .slide .r-col { color: var(--star-r); }
.muted, .slide .muted { color: var(--fg-muted); }
.part-label { font-size: var(--fs-label); }

/* stacks: vertical rhythm inside wrappers */
.stack > * + * { margin-top: var(--sp-4); }
.stack-sm > * + * { margin-top: var(--sp-2); }
.section-label { display: block; margin-bottom: var(--sp-3); }
.box-label { display: block; margin-bottom: var(--sp-2); }

/* 5.3 Cards and boxes */
.card, .so-card, .about-card, .outcome-card, .r-card, .incident-card, .comp-question, .listen-panel,
.ws-block, .t-field, .preview-card, .complete-card, .vocab-box, .obj-item, .star-card, .a-step,
.tl-content, .timeline .tl-body, .cover-feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.card, .so-card, .about-card, .outcome-card, .r-card, .incident-card, .comp-question, .listen-panel,
.ws-block, .t-field, .preview-card, .complete-card, .vocab-box, .star-card { padding: var(--pad-card); }
.card-muted { background: var(--surface2); border-color: var(--border); }
.callout, .lang-box, .star-note, .task-box, .feedback-box, .pri-fb {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: var(--sp-4) var(--pad-card);
}
.callout-t { border-left-color: var(--star-t); }
.task-box { background: var(--tint-accent); }
.task-box p + p, .card > p + p { margin-top: 0.6em; }
.task-key { color: var(--accent); }

/* vocabulary */
.vocab-box-hdr { margin-bottom: var(--sp-3); }
.vocab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: var(--sp-3) var(--sp-5); }
.vocab-grid > div, .vocab-def { font-size: var(--fs-small); line-height: 1.55; color: var(--fg); }
.vocab-grid > div b, .vocab-term { font-family: var(--font-display); font-size: 1.05em; font-weight: 700; color: var(--fg); }
.vocab-term + .vocab-def { margin-top: 2px; color: var(--fg-muted); }

/* language notes and phrases */
.lang-box-hdr { color: var(--accent); margin-bottom: var(--sp-2); }
.lang-content { font-size: var(--fs-small); line-height: 1.75; }
.lang-content i, .lang-box i { color: var(--accent); }
.phrase-list { display: grid; gap: var(--sp-3); }
.phrase-item { display: flex; align-items: baseline; gap: var(--sp-3); font-size: var(--fs-small); line-height: 1.55; }
.phrase-tag { flex-shrink: 0; font-size: 0.8125rem; padding: 1px 8px; color: var(--fg-muted); }
.phrase-text { flex: 1; min-width: 0; color: var(--fg); }
.phrase-note { display: block; margin-top: 2px; color: var(--fg-muted); font-size: 0.92em; }
.en-note { margin-top: var(--sp-3); padding: 10px 12px; border-radius: var(--radius); background: var(--tint-accent); font-size: var(--fs-small); }
.en-note strong { color: var(--accent); }
.sentence-starters { margin-top: var(--sp-2); font-size: var(--fs-small); color: var(--fg-muted); }
.sentence-starters strong { color: var(--fg-muted); }
.sentence-starters span { color: var(--accent); }
.checklist { display: grid; gap: 6px; font-size: var(--fs-small); color: var(--fg-muted); }

/* 5.4 Framework and setup cards */
.star-overview, .so-grid, .star-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }
@media (min-width: 640px) { .star-overview, .so-grid, .star-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.so-card { --part: var(--accent); }
.so-s, .star-card.s { --part: var(--star-s); }
.so-t, .star-card.t { --part: var(--star-t); }
.so-a, .star-card.a { --part: var(--star-a); }
.so-r, .star-card.r { --part: var(--star-r); }
.star-overview .so-card, .star-card { border-top: 4px solid var(--part); }
.so-ltr, .star-letter { font-family: var(--font-display); font-size: clamp(1.75rem, 1.5rem + 1vw, 2.25rem); font-weight: 800; line-height: 1; color: var(--part); }
.so-word, .star-word { font-family: var(--font-display); font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--part); margin-top: 4px; }
.so-what { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; color: var(--fg); line-height: 1.35; margin-top: var(--sp-2); }
.so-card p, .star-desc { font-size: var(--fs-small); line-height: 1.55; margin-top: var(--sp-2); }
.so-later, .star-prompt { font-style: italic; color: var(--fg-muted); }
.so-card.so-locked { border-style: dashed; border-top-style: solid; }
.so-card.so-locked .so-ltr { opacity: 0.8; }
.so-card-hdr { font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: var(--sp-2); }
.so-card-body { font-size: var(--fs-small); line-height: 1.6; }
.star-chip {
  display: inline-flex; align-items: center; gap: var(--sp-2); padding: 3px 12px 3px 3px; border-radius: var(--radius-pill);
  font-family: var(--font-display); font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--tint-accent); color: var(--part, var(--accent));
}
.star-chip .ltr { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--part, var(--accent)); color: #fff; letter-spacing: 0; }
.chip-s { --part: var(--star-s); } .chip-t { --part: var(--star-t); } .chip-a { --part: var(--star-a); } .chip-r { --part: var(--star-r); background: var(--tint-success); }
.chip-t { background: rgba(107, 77, 176, 0.09); } .chip-a { background: var(--tint-gold); }

/* objectives / setup list (scenario 1) */
.obj-list { display: grid; gap: var(--sp-3); }
.obj-item { display: flex; align-items: flex-start; gap: var(--sp-3); padding: 14px var(--pad-card); }
.obj-n { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; line-height: 1.2; min-width: 1.4rem; }
.obj-t { font-size: var(--fs-small); line-height: 1.6; }
.obj-item.obj-later { border-style: dashed; }

/* 5.5 Timelines */
.timeline, .tl-wrap { display: grid; gap: var(--sp-3); counter-reset: tl; }
.tl-item { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 14px; counter-increment: tl; }
.tl-dot {
  grid-column: 1; grid-row: 1; position: relative; z-index: 1;
  width: 32px; height: 32px; margin-top: 10px; border-radius: 50%;
  border: 2px solid var(--gold); background: var(--surface); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 0.95rem; font-weight: 800; line-height: 1;
}
.tl-wrap .tl-dot::before { content: counter(tl); }
.tl-dot.hi { background: var(--gold); color: #fff; }
.tl-item:not(:last-child)::after { content: ''; position: absolute; left: 15px; top: 42px; bottom: calc(-1 * var(--sp-3) - 10px); width: 2px; background: var(--border); }
.tl-spine { display: none; }
.timeline .tl-body, .tl-content { grid-column: 2; grid-row: 1; padding: 12px var(--sp-4); }
.tl-time { font-family: var(--font-display); font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.08em; color: var(--gold); }
.tl-head, .timeline .tl-body h3 { font-size: var(--fs-h3); margin-top: 2px; }
.tl-wrap .tl-body, .timeline .tl-body p { font-size: var(--fs-small); line-height: 1.6; margin-top: 4px; }

/* incident report extract */
.incident-card { border-left: 4px solid var(--danger); }
.inc-hdr { color: var(--danger); margin-bottom: var(--sp-2); }
.incident-card p + p { margin-top: 0.75em; }

/* 5.6 Priority / ranking */
.priority-grid, .rank-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }
@media (min-width: 640px) { .priority-grid, .rank-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
#porder.revealing .tl-item { animation: itemIn 0.3s ease both; }
#porder.revealing .tl-item:nth-child(2) { animation-delay: 0.12s; }
#porder.revealing .tl-item:nth-child(3) { animation-delay: 0.24s; }
#porder.revealing .tl-item:nth-child(4) { animation-delay: 0.36s; }
@keyframes itemIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pri-card {
  display: flex; align-items: center; gap: var(--sp-3); min-height: 64px; padding: 12px var(--sp-4);
  background: var(--surface); border: 2px solid var(--border-strong); border-radius: var(--radius-lg);
  font-family: var(--font-serif); font-size: var(--fs-small); line-height: 1.45; text-align: left;
  cursor: pointer; user-select: none; transition: border-color 0.15s, background-color 0.15s;
}
.priority-grid .pri-card { flex-direction: column; align-items: flex-start; gap: 4px; }
.pri-card h3 { font-size: var(--fs-h3); }
.pri-card p { color: var(--fg-muted); font-size: 0.95em; }
@media (hover: hover) { .pri-card:hover { border-color: var(--accent); } }
.pri-card.selected { border-color: var(--accent); background: var(--tint-accent); }
.pri-card.correct-hi { border-color: var(--accent); background: var(--tint-accent); }
.pri-card.pri-same { border-color: var(--accent); }
.pri-hint { font-family: var(--font-display); font-size: var(--fs-small); font-weight: 700; letter-spacing: 0.02em; color: var(--accent); }
.rank-badge {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold); color: #fff; font-family: var(--font-display); font-size: 1rem; font-weight: 800;
}
.rank-badge.empty { background: transparent; border: 2px dashed var(--border-strong); }
.pri-text { flex: 1; }
.pri-story { margin-left: auto; padding-left: var(--sp-3); white-space: nowrap; font-family: var(--font-display); font-size: var(--fs-label); font-weight: 700; color: var(--fg-muted); }
.pri-same .pri-story { color: var(--accent); }
.pri-fb, .feedback-box { font-size: var(--fs-small); line-height: 1.6; }
.pri-fb:focus { outline: none; }
.rank-actions > * + * { margin-top: var(--sp-3); }
.rank-actions > .rank-clear { margin-top: var(--sp-5); }
.btn-link:disabled { color: var(--fg-muted); text-decoration: none; cursor: default; }
.rank-status { font-family: var(--font-body); font-size: var(--fs-label); color: var(--fg-muted); }
.pri-fb .pri-retry, .feedback-box .btn { margin-top: var(--sp-3); }
.feedback-box:empty { padding: 0; border: 0; background: none; }
.slide > .feedback-box:empty { margin-top: 0; }

/* 5.7 Accordion */
.action-steps { display: grid; gap: var(--sp-2); }
.slide > .a-step + .a-step, div:not(.action-steps) > .a-step + .a-step { margin-top: var(--sp-2); }
.a-step { overflow: hidden; }
.a-step-hdr { display: flex; align-items: center; gap: var(--sp-3); min-height: 56px; padding: 10px var(--sp-4); cursor: pointer; }
.a-step-hdr::after { content: '\25BE'; margin-left: auto; padding-left: var(--sp-2); color: var(--fg-muted); font-size: 1rem; transition: transform 0.2s; }
.a-step-hdr:has(.step-chev)::after { content: none; }
.a-step.open .a-step-hdr::after, .a-step.open .step-chev { transform: rotate(180deg); }
.step-chev { margin-left: auto; width: 18px; height: 18px; flex-shrink: 0; color: var(--fg-muted); transition: transform 0.2s; }
.a-step-num {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface2); border: 1px solid var(--border);
  font-family: var(--font-display); font-size: 1rem; font-weight: 800; color: var(--fg);
}
.a-step.open .a-step-num, .a-step.visited .a-step-num { background: var(--gold); border-color: var(--gold); color: #fff; }
.a-step-title, .step-hdr-txt h3 { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 700; color: var(--fg); line-height: 1.25; }
.step-ico { font-size: 1.3rem; line-height: 1; flex-shrink: 0; }
.step-sub { font-family: var(--font-body); font-size: var(--fs-label); color: var(--fg-muted); }
.a-step-body { display: none; padding: 0 var(--sp-4) var(--sp-4); font-size: var(--fs-small); line-height: 1.65; }
.a-step.open .a-step-body { display: block; }
.a-step-body p + p, .a-step-body ul { margin-top: 0.6em; }
.a-step.open { border-color: var(--gold); }
.a-step-hdr:hover .a-step-title, .a-step-hdr:hover h3 { color: var(--accent); }
#step-counter { font-family: var(--font-display); font-size: var(--fs-small); font-weight: 600; letter-spacing: 0.03em; color: var(--fg-muted); }
#step-counter.is-done { color: var(--success); }
button.a-step-hdr { width: 100%; margin: 0; background: none; border: 0; border-radius: var(--radius-lg); text-align: left; font: inherit; color: inherit; }
button.a-step-hdr:focus-visible { outline: 3px solid var(--accent-lt); outline-offset: -3px; }
.step-hdr-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* 5.8 Listening */
.listen-hdr { color: var(--accent); }
.listen-instr { margin-top: var(--sp-2); font-size: var(--fs-small); color: var(--fg-muted); }
.listen-play-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-5); margin-top: var(--sp-4); }
.listen-stat { font-family: var(--font-body); font-size: var(--fs-label); color: var(--fg-muted); }
.listen-tx { display: none; margin-top: var(--sp-4); padding: var(--sp-3) var(--sp-4); border-radius: var(--radius); background: var(--surface2); font-size: var(--fs-small); line-height: 1.65; }
.listen-tx.revealed { display: block; }
.listen-q-item { margin-top: var(--sp-5); }
.listen-q-text { font-weight: 600; margin-bottom: var(--sp-2); }
.listen-opt {
  position: relative; display: flex; align-items: center; gap: var(--sp-3);
  min-height: 48px; margin-top: var(--sp-2); padding: 10px 44px 10px var(--sp-3);
  background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: var(--radius);
  font-size: var(--fs-small); cursor: pointer; transition: border-color 0.15s, background-color 0.15s;
}
.listen-opt::before { content: ''; flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--surface); }
@media (hover: hover) { .listen-opt:not(.lc-locked):hover { border-color: var(--accent); } }
.listen-opt.lc-sel { border-color: var(--accent); background: var(--tint-accent); }
.listen-opt.lc-sel::before { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 0 5px, var(--surface) 6px); }
.listen-opt.lc-ok { border-color: var(--success); background: var(--tint-success); }
.listen-opt.lc-no { border-color: var(--danger); background: var(--tint-danger); }
.listen-opt.lc-ok::after, .listen-opt.lc-no::after { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-family: var(--font-body); font-weight: 700; }
.listen-opt.lc-ok::after { content: '\2713'; color: var(--success); }
.listen-opt.lc-no::after { content: '\2715'; color: var(--danger); }
.listen-opt.lc-locked { cursor: default; }
a, button, [role="button"], [role="radio"], .pri-card, .cq-opt, .listen-opt { touch-action: manipulation; }
.cq-opt, .listen-opt { user-select: none; -webkit-touch-callout: none; }
.listen-retry { margin-top: var(--sp-3); }
/* 5.8b Noticing and recall (deeper practice, 31 Oct) */
.notice, .recall { margin-top: var(--flow); }
.notice-q, .recall-q { font-size: var(--fs-small); color: var(--fg); }
.notice-list { display: grid; gap: var(--sp-2); margin-top: var(--sp-3); }
.notice-item {
  display: block; width: 100%; min-height: 48px; padding: 10px 44px 10px var(--sp-3); text-align: left;
  background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: var(--radius);
  font-family: var(--font-serif); font-size: var(--fs-small); line-height: 1.5; color: var(--fg); cursor: pointer; position: relative;
  transition: border-color 0.15s, background-color 0.15s;
}
@media (hover: hover) { .notice-item:not([aria-disabled="true"]):hover { border-color: var(--accent); } }
.notice-item.is-on { border-color: var(--accent); background: var(--tint-accent); }
.notice-item.is-hit { border-color: var(--success); background: var(--tint-success); }
.notice-item.is-miss { border-color: var(--danger); background: var(--tint-danger); }
.notice-item.is-missed { border-color: var(--success); border-style: dashed; }
.notice-item.is-hit::after, .notice-item.is-miss::after, .notice-item.is-missed::after { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-family: var(--font-body); font-weight: 700; }
.notice-item.is-hit::after, .notice-item.is-missed::after { content: '\2713'; color: var(--success); }
.notice-item.is-miss::after { content: '\2715'; color: var(--danger); }
.notice-item[aria-disabled="true"] { cursor: default; }
.notice .btn-row, .recall .btn-row { margin-top: var(--sp-4); }
.notice-res, .recall-res { margin-top: var(--sp-2); font-family: var(--font-body); font-size: var(--fs-small); font-weight: 600; color: var(--fg); }
.notice-res:empty, .recall-res:empty { display: none; }
.notice-why { margin-top: var(--sp-3); font-size: var(--fs-small); color: var(--fg-muted); }
.recall-list { margin: var(--sp-3) 0 0; padding-left: 1.4em; display: grid; gap: var(--sp-3); }
.recall-list li { font-size: var(--fs-small); line-height: 1.7; }
.recall-gap {
  font: inherit; font-family: var(--font-body); font-size: var(--fs-small); min-height: 44px; margin: 0 2px; padding: 2px 8px;
  border: 1.5px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--fg); }
.recall-gap.ok { border-color: var(--success); background: var(--tint-success); }
.recall-gap.no { border-color: var(--danger); background: var(--tint-danger); }
.recall-gap.shown { border-color: var(--success); border-style: dashed; }
.recall-mark { display: inline-block; min-width: 1.1em; margin-right: 2px; font-weight: 800; font-family: var(--font-body); }
.recall-gap.ok + .recall-mark, .recall-gap.shown + .recall-mark { color: var(--success); }
.recall-gap.no + .recall-mark { color: var(--danger); }
.recall-gap:focus-visible { outline: 3px solid var(--accent-lt); outline-offset: 2px; }
.ws-note { font-family: var(--font-body); font-size: var(--fs-small); color: var(--fg-muted); }
/* 5.8c A fold for the class parts of the last slide (cold review, 31 Oct) */
.fold { border: 1.5px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); }
.fold > summary {
  list-style: none; display: flex; align-items: center; gap: var(--sp-3); min-height: 56px; padding: 10px var(--sp-4); cursor: pointer;
  font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 700; color: var(--fg);
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: '\25BE'; margin-left: auto; padding-left: var(--sp-2); color: var(--fg-muted); font-size: 1rem; transition: transform 0.2s; }
.fold[open] > summary::after { transform: rotate(180deg); }
.fold > summary:hover { background: var(--surface2); }
.fold > summary:focus-visible { outline: 3px solid var(--accent-lt); outline-offset: -3px; }
.fold[open] > summary { border-bottom: 1px solid var(--border); }
.fold > :not(summary) { margin: var(--flow) var(--sp-4); }
.fold > :not(summary) + :not(summary) { margin-top: var(--flow); }
.listen-chk { margin-top: var(--sp-5); }
[id^="lres"] { display: block; margin-top: var(--sp-2); font-family: var(--font-body); font-size: var(--fs-small); font-weight: 600; color: var(--fg); }
.reveal-note { font-size: var(--fs-small); font-style: italic; color: var(--fg-muted); }
.rl-hidden { display: none !important; }

/* 5.9 Outcome and results */
.outcome-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--sp-3); }
.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
@media (min-width: 1024px) { .result-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.outcome-card { border-left: 4px solid var(--border-strong); }
.outcome-card.bl-s { border-left-color: var(--star-s); }
.outcome-card.bl-t { border-left-color: var(--star-t); }
.outcome-card.bl-a { border-left-color: var(--star-a); }
.outcome-card.bl-r { border-left-color: var(--star-r); }
.outcome-card.bl-success { border-left-color: var(--success); }
.outcome-label, .rc-lbl { font-family: var(--font-display); font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.outcome-text, .rc-desc { font-size: var(--fs-small); line-height: 1.6; margin-top: 4px; }
.rc-val { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 700; margin-top: 2px; }

/* Speed: Slower | Normal | Faster (3 Nov, panel G6): a row of three small controls, 24px apart (rule 8), under the Play row */
.speed-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-5); margin-top: var(--sp-3); }
.speed-lbl { font-family: var(--font-display); font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); }
.speed-btn {
  min-height: 44px; padding: 6px 14px; border-radius: var(--radius-pill); border: 1.5px solid var(--border-strong); background: var(--surface);
  font-family: var(--font-display); font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.04em; color: var(--fg-muted); cursor: pointer;
}
.speed-btn:hover { border-color: var(--accent); color: var(--accent); }
.speed-btn[aria-pressed="true"] { border-color: var(--accent); background: var(--tint-accent); color: var(--accent); }
.model-audio .speed-ctl { margin-top: 0; flex-basis: 100%; }
/* the audio time, beside the status, not read out (audit A2) */
.audio-time { margin-left: 6px; font-family: var(--font-body); font-size: var(--fs-label); color: var(--fg-muted); font-variant-numeric: tabular-nums; }

/* 5.10 Quiz */
#cquiz { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); }
.cq-opt-txt { flex: 1 1 auto; min-width: 0; }
.comp-question.answered { border-color: var(--success); }
.cq-num { margin-bottom: var(--sp-2); }
.cq-text, .cq-prompt { font-weight: 600; margin-bottom: var(--sp-3); line-height: 1.5; }
.cq-opts { display: grid; gap: var(--sp-2); }
.cq-opt {
  position: relative; display: flex; align-items: center; gap: var(--sp-3);
  min-height: 48px; padding: 10px 44px 10px var(--sp-3);
  background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: var(--radius);
  font-size: var(--fs-small); line-height: 1.45; cursor: pointer; transition: border-color 0.15s, background-color 0.15s;
}
@media (hover: hover) { .cq-opt:hover { border-color: var(--accent); } }
.cq-opt .ol, .cq-opt .ol-auto {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--border-strong); background: var(--surface);
  font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; color: var(--fg);
}
.cq-opt.sel { border-color: var(--accent); background: var(--tint-accent); }
.comp-question.answered .cq-opt { cursor: default; }
.comp-question.answered .cq-opt:not(.correct) { color: var(--fg-muted); border-color: var(--border); }
.comp-question.answered .cq-opt:not(.correct):hover { border-color: var(--border); }
.cq-opt.correct { border-color: var(--success); background: var(--tint-success); }
.cq-opt.correct .ol, .cq-opt.correct .ol-auto { background: var(--success); border-color: var(--success); color: #fff; }
.cq-opt.wrong { border-color: var(--danger); background: var(--tint-danger); }
.cq-opt.correct::after, .cq-opt.wrong::after { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-family: var(--font-body); font-weight: 700; }
.cq-opt.correct::after { content: '\2713'; color: var(--success); }
.cq-opt.wrong::after { content: '\2715'; color: var(--danger); }
.cq-fb, .cq-explain, .cq-tryagain {
  margin-top: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-radius: var(--radius);
  font-size: var(--fs-small); line-height: 1.6; background: var(--surface2);
}
.cq-fb:empty { padding: 0; margin: 0; background: none; }
.cq-fb.correct, .cq-explain { background: var(--tint-success); }
.cq-fb.wrong, .cq-tryagain { background: var(--tint-danger); }
.cq-explain, .cq-tryagain { display: none; }
.cq-explain.show, .cq-tryagain.show { display: block; }
.try-prompt { font-family: var(--font-display); font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--danger); }
.try-reason { margin-top: 4px; color: var(--fg); }
#quiz-complete { padding: var(--pad-card); border: 1px solid var(--success); border-radius: var(--radius-lg); background: var(--tint-success); text-align: center; }
.qc-icon { font-size: 1.75rem; }
.qc-head { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 700; color: var(--success); }
.qc-sub { font-size: var(--fs-small); color: var(--fg-muted); margin: 4px auto 0; }

/* 5.11 Writing */
.template-wrap { display: grid; gap: var(--sp-3); }
.t-field, .ws-block { padding: var(--pad-card); }
.t-field label, .ws-label {
  display: block; font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.t-field .ls { color: var(--star-s); } .t-field .lt { color: var(--star-t); } .t-field .la { color: var(--star-a); } .t-field .lr { color: var(--star-r); }
.ws-hint { font-size: var(--fs-small); color: var(--fg-muted); margin-top: 2px; }
.t-field textarea, .ws-area {
  display: block; width: 100%; min-height: 140px; margin-top: var(--sp-2); padding: var(--sp-3);
  resize: vertical; background: var(--surface); color: var(--fg);
  border: 1.5px solid var(--border-strong); border-radius: var(--radius);
  font-family: var(--font-serif); font-size: max(16px, var(--fs-body)); line-height: 1.6;
}
.t-field textarea:focus, .ws-area:focus { outline: 3px solid var(--accent-lt); outline-offset: 1px; border-color: var(--accent); }
textarea::placeholder { color: var(--fg-muted); opacity: 1; }
.wc-counter { margin-top: 6px; text-align: right; font-family: var(--font-body); font-size: var(--fs-label); color: var(--fg-muted); }
.wc-counter.wc-ok { color: var(--success); font-weight: 600; }
.exemplar-wrap { padding-top: var(--flow); border-top: 1px solid var(--border); }
.exemplar-hint { font-size: var(--fs-small); color: var(--fg-muted); margin-bottom: var(--sp-2); }
.exemplar-hint:empty { display: none; }
.exemplar-body { display: none; margin-top: var(--sp-4); padding: var(--pad-card); border-radius: var(--radius-lg); background: var(--surface2); border-left: 4px solid var(--accent); }
.exemplar-body.open { display: block; }
.exemplar-lbl { font-family: var(--font-display); font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-top: var(--sp-4); }
.exemplar-lbl:first-of-type { margin-top: 0; }
.exemplar-p { font-size: var(--fs-small); line-height: 1.7; margin-top: 4px; }
.exemplar-note { margin-top: var(--sp-4); padding-top: var(--sp-3); border-top: 1px solid var(--border); font-size: var(--fs-small); color: var(--fg-muted); }
.model-audio { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.audio-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 18px;
  border-radius: var(--radius-pill); border: 2px solid var(--accent); background: var(--surface); color: var(--accent);
  font-family: var(--font-display); font-size: var(--fs-btn); font-weight: 700; letter-spacing: 0.03em; cursor: pointer;
}
.audio-btn:hover, .audio-btn.is-playing { background: var(--accent); color: #fff; }
.audio-status { font-family: var(--font-body); font-size: var(--fs-label); color: var(--fg-muted); }
.preview-card { display: none; border-left: 4px solid var(--gold); }
.preview-card.show { display: block; }
.pv-title, .preview-card h3:first-child { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 800; color: var(--fg); }
.pv-row { margin-top: var(--sp-3); }
.pv-row h3, .pv-label { font-family: var(--font-display); font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.pv-row p, .pv-text { font-size: var(--fs-small); line-height: 1.65; margin-top: 2px; }
.pv-text.is-empty { font-style: italic; color: var(--fg-muted); }
.pv-row h4 { margin: 0; }

/* 5.12 Ending */
.end-actions { display: flex; flex-wrap: wrap-reverse; justify-content: center; gap: var(--sp-4) var(--sp-5); }
.share-row { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3); padding-top: var(--sp-4); border-top: 1px solid var(--border); }
.share-manual { flex-basis: 100%; text-align: center; font-family: var(--font-body); font-size: var(--fs-small); color: var(--fg-muted); }
.share-manual input { display: block; width: min(100%, 28rem); margin: 6px auto 0; padding: 10px 12px; border: 1.5px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--fg); font-size: 16px; }
[id^="lres"]:focus, .listen-tx:focus { outline: none; }
.complete-card { border-left: 4px solid var(--fg-muted); }
.complete-card.is-done { border-left-color: var(--success); }
.cc-title { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 800; }
.cc-sub { font-size: var(--fs-small); color: var(--fg-muted); margin-top: 2px; }
.cc-row { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); column-gap: var(--sp-3); align-items: baseline; padding: var(--sp-2) 0; border-top: 1px solid var(--surface2); margin-top: var(--sp-2); }
.cc-detail { grid-column: 2; }
.cc-mark.weak { color: var(--fg-muted); }
.cc-mark { width: 1.25rem; flex-shrink: 0; text-align: center; font-weight: 700; font-family: var(--font-body); }
.cc-mark.ok { color: var(--success); }
.cc-mark.todo { color: var(--fg-muted); }
.cc-label { font-family: var(--font-display); font-size: var(--fs-btn); font-weight: 700; min-width: 11rem; }
.cc-detail { font-family: var(--font-body); font-size: var(--fs-label); color: var(--fg-muted); }
.course-done { text-align: center; }

/* 5.13 Disclaimer */
.course-disclaimer {
  border-left: 3px solid var(--danger); background: rgba(178, 34, 34, 0.06); border-radius: var(--radius);
  padding: var(--sp-3) var(--sp-4); font-family: var(--font-serif); font-size: var(--fs-small); line-height: 1.55; color: var(--fg);
}
.course-disclaimer strong { color: var(--danger); font-family: var(--font-display); letter-spacing: 0.04em; text-transform: uppercase; margin-right: 4px; }

/* a larger gap before a task that follows reading (F13) */
.slide > .notice, .slide > .recall, .slide > .fold, .slide > .build-set, .slide > .logbox, .slide > .pick-set, .slide > .cando, .slide > .rec,
.slide > .dictate, .slide > .task-box, .slide > .section-label, .slide > .stack-sm { margin-top: var(--flow-lg); }
/* motion: a step's body and a revealed box fade in; reduced motion switches it off below (F13) */
.a-step.open .a-step-body { animation: fadeIn 0.22s ease; }
.reveal-box:not([hidden]), .exemplar-body.open, .bl-model:not([hidden]), .listen-tx.revealed { animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
/* one status component for "no sound", "loading" and the tutor's errors (F13) */
.status, .listen-stat, .audio-status, .play-stat { font-family: var(--font-body); font-size: var(--fs-label); color: var(--fg-muted); }
.status.is-error, .listen-stat.is-error, .audio-status.is-error, .play-stat.is-error { color: var(--danger); font-weight: 600; }
/* the cover: one meta line instead of chips (F8) */
.cover-meta { font-family: var(--font-display); font-size: var(--fs-small); color: var(--fg-muted); letter-spacing: 0.02em; }
.cover-meta b { color: var(--fg); font-weight: 700; }
/* 5.14 Shared task engines (3 Nov, the top-tier panel): answer options, chunk builders, log boxes, pick-one, can-do,
   Say it, the recorder, dictation, radio sound. The pieces Fast and Clear had in simple.css are here for every part. */
.opts { display: grid; gap: var(--sp-3); }
.opt {
  display: block; width: 100%; min-height: 52px; padding: var(--sp-3) var(--sp-4); text-align: left; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: var(--radius);
  font-family: var(--font-body); font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.125rem); font-weight: 600; line-height: 1.4; color: var(--fg);
}
@media (hover: hover) { .opt:hover:not([aria-disabled="true"]) { border-color: var(--accent); } }
.opt.is-sel { border-color: var(--accent); background: var(--tint-accent); }
.opt.is-ok { border-color: var(--success); background: var(--tint-success); }
.opt.is-no { border-color: var(--danger); background: var(--tint-danger); }
.opt[aria-disabled="true"] { cursor: default; }
.opt.is-ok::before { content: "\2713\00a0"; color: var(--success); font-weight: 800; }
.opt.is-no::before { content: "\2715\00a0"; color: var(--danger); font-weight: 800; }
.fb { font-size: var(--fs-body); line-height: 1.5; font-family: var(--font-body); }
.fb:empty { display: none; }
.pick .fb:empty, .decide .fb:empty, .sb .fb:empty { display: block; min-height: 1.6em; } /* the page does not move under the thumb (second panel, D7) */
.fb.ok { color: var(--success); }
.fb.no { color: var(--danger); }
.fb .why { display: block; color: var(--fg); margin-top: 2px; font-size: var(--fs-small); }
.fb .next-cue { margin-top: var(--sp-2); font-weight: 600; color: var(--accent); }
.fb:focus { outline: none; }
/* the word card (F3): one card for Fast and Clear and Describe the Picture; rows of equal height; a heard state */
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: var(--sp-3); grid-auto-rows: 1fr; }
.wcard {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) 44px; align-items: center; column-gap: var(--sp-3);
  min-height: 64px; padding: 10px 10px 10px 14px; text-align: left; cursor: pointer; color: var(--fg); font: inherit;
  background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: var(--radius-lg);
}
@media (hover: hover) { .wcard:hover { border-color: var(--accent); } }
.wcard-ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--tint-accent); color: var(--accent); }
.wcard-ico .ico { width: 24px; height: 24px; }
.wcard-ico.num { background: var(--fg); color: var(--surface); font-family: var(--font-display); font-size: 1.0625rem; font-weight: 800; }
.wcard-en { display: block; font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; line-height: 1.15; }
.wcard-gl { display: block; font-family: var(--font-body); font-size: var(--fs-small); line-height: 1.35; color: var(--fg-muted); margin-top: 2px; }
.wcard-gl:empty { display: none; }
.wcard-play { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent); }
.wcard.is-playing .wcard-play { background: var(--accent); color: var(--surface); }
.wcard.is-heard { border-color: var(--success); }
.wcard.is-heard .wcard-play { border-color: var(--success); color: var(--success); }
.wcard[aria-pressed="true"] { border-color: var(--accent); background: var(--tint-accent); }
/* a per-item play control: a 44px circle, filled while playing, a tick once played (F4) */
.play-mini {
  position: relative; width: 44px; height: 44px; flex-shrink: 0; padding: 0; display: inline-grid; place-items: center; border-radius: 50%;
  border: 1.5px solid var(--accent); background: var(--surface); color: var(--accent); cursor: pointer;
}
.play-mini .ico { width: 22px; height: 22px; }
@media (hover: hover) { .play-mini:hover { background: var(--tint-accent); } }
.play-mini.is-playing, .play-mini[data-state="playing"] { background: var(--accent); color: var(--surface); }
.play-mini[data-state="loading"] { color: var(--fg-muted); border-color: var(--border-strong); }
.play-mini[data-state="ended"]::after { content: '\2713'; position: absolute; top: -4px; right: -4px; width: 16px; height: 16px; border-radius: 50%; background: var(--success); color: var(--surface); font-size: 11px; font-weight: 800; line-height: 16px; text-align: center; font-family: var(--font-body); }
/* chunk builders: the call (Fast and Clear) and the exact-order sentences (both parts) */
.build, .builder { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--pad-card); }
.build > * + *, .builder > * + * { margin-top: var(--sp-4); }
.build-q { font-family: var(--font-body); font-size: var(--fs-small); color: var(--fg); }
.build-from { font-family: var(--font-serif); font-size: var(--fs-body); color: var(--fg); padding: var(--sp-2) var(--sp-4); border-left: 4px solid var(--border-strong); background: var(--surface2); border-radius: var(--radius-sm); }
.bl-line { min-height: 64px; padding: var(--sp-3); border: 2px dashed var(--border-strong); border-radius: var(--radius); display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
.bl-line.is-ok { border-style: solid; border-color: var(--success); background: var(--tint-success); }
.bl-empty { color: var(--fg-muted); font-size: var(--fs-small); font-family: var(--font-body); }
.chunks { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.chunk {
  min-height: 48px; padding: 8px 14px; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--accent); border-radius: var(--radius-pill);
  font-family: var(--font-body); font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem); font-weight: 600; color: var(--accent);
}
@media (hover: hover) { .chunk:hover { background: var(--tint-accent); } }
.bl-line .chunk { border-color: var(--fg); color: var(--fg); }
.chunk[aria-disabled="true"] { cursor: default; }
.bl-again { margin-bottom: 0; }
.bl-model { padding: var(--sp-3) var(--sp-4); border-left: 4px solid var(--success); background: var(--tint-success); border-radius: var(--radius); font-family: var(--font-serif); }
.build-set { display: grid; gap: var(--sp-5); }
/* log boxes */
.logbox { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--pad-card); }
.logbox > * + * { margin-top: var(--sp-3); }
.logbox-q { font-size: var(--fs-small); color: var(--fg); }
.logbox-list { margin: 0; padding-left: 1.4em; display: grid; gap: var(--sp-3); font-family: var(--font-body); }
.logbox-list li { font-size: var(--fs-small); line-height: 1.8; }
.log-in {
  font: inherit; font-family: var(--font-body); font-size: max(16px, var(--fs-small)); min-height: 44px; width: 9em; max-width: 100%; margin: 0 2px; padding: 4px 8px;
  border: 1.5px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--fg); }
.log-in.wide { width: 14em; }
.log-in.ok { border-color: var(--success); background: var(--tint-success); }
.log-in.no { border-color: var(--danger); background: var(--tint-danger); }
.log-in.shown { border-color: var(--success); border-style: dashed; }
.log-mark { display: inline-block; min-width: 1.1em; font-weight: 800; }
.log-in.ok + .log-mark, .log-in.shown + .log-mark { color: var(--success); }
.log-in.no + .log-mark { color: var(--danger); }
.log-hint { display: block; font-size: var(--fs-label); color: var(--fg-muted); }
.log-res { font-family: var(--font-body); font-size: var(--fs-small); font-weight: 600; }
.log-res:empty { display: none; }
.log-res:focus { outline: none; }
/* the find task on the story page: the options are the story's own lines, in the small face */
.find .find-opts .opt { font-size: var(--fs-small); min-height: 44px; }
/* the log line (A10) */
.logline-in { display: block; width: 100%; margin-top: var(--sp-3); padding: var(--sp-3); resize: vertical; background: var(--surface); color: var(--fg); border: 1.5px solid var(--border-strong); border-radius: var(--radius); font-family: var(--font-body); font-size: max(16px, var(--fs-small)); line-height: 1.5; }
.logline .btn-row { margin-top: var(--sp-3); }
.logline-res { margin-top: var(--sp-2); font-family: var(--font-body); font-size: var(--fs-small); font-weight: 600; }
.logline-res.ok { color: var(--success); }
.logline-res:empty { display: none; }
.transfer-story { margin-top: var(--sp-2); }
/* the numbers check: a small play control before each box */
.numbers .logbox-list li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-5); }
.numbers .logbox-list label { display: inline-flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
/* pick one */
.pick-set { display: grid; gap: var(--sp-5); }
.pick { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--pad-card); }
.pick > * + * { margin-top: var(--sp-3); }
.pick-q { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 700; line-height: 1.3; color: var(--fg); }
.pick-count { font-family: var(--font-body); font-size: var(--fs-small); font-weight: 600; color: var(--fg-muted); }
/* can-do */
.cando { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--pad-card); }
.cando-list { list-style: none; margin: var(--sp-3) 0 0; padding: 0; display: grid; gap: var(--sp-2); }
.cando-list li { margin: 0; }
.cando-list label { display: flex; align-items: flex-start; gap: var(--sp-3); min-height: 44px; padding: 6px 0; cursor: pointer; font-family: var(--font-body); font-size: var(--fs-small); line-height: 1.5; }
.cando-list input { width: 22px; height: 22px; flex-shrink: 0; margin-top: 4px; accent-color: var(--accent); }
.cando-note { margin-top: var(--sp-3); font-size: var(--fs-small); color: var(--fg-muted); }
/* vocabulary: test yourself */
.vocab-test-row { margin-bottom: var(--sp-2); }
.vocab-box.is-test .vocab-item { cursor: pointer; border-radius: var(--radius); padding: 4px 6px; margin: -4px -6px; }
@media (hover: hover) { .vocab-box.is-test .vocab-item:hover { background: var(--tint-accent); } }
.vocab-box.is-test .vocab-item:focus-visible { outline: 3px solid var(--accent-lt); }
.vocab-box.is-test .vocab-item:not(.is-shown) .vocab-def { visibility: hidden; }
.vocab-box.is-test .vocab-item:not(.is-shown) .vocab-term::after { content: " \25BE"; color: var(--accent); }
/* Say it */
.say-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-5); margin-top: var(--sp-3); }
.say-it {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px;
  border-radius: var(--radius-pill); border: 2px solid var(--star-t); background: var(--surface); color: var(--star-t);
  font-family: var(--font-display); font-size: var(--fs-btn); font-weight: 700; letter-spacing: 0.03em; cursor: pointer;
}
.say-it:hover, .say-it.is-listening { background: var(--star-t); color: #fff; }
.say-it.is-listening { animation: mic-pulse 1s infinite; }
@keyframes mic-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
.say-out { flex-basis: 100%; margin: 0; font-family: var(--font-body); font-size: var(--fs-small); color: var(--fg); }
.say-out:empty { display: none; }
.say-row.is-good .say-out { color: var(--success); font-weight: 600; }
.say-none { font-size: var(--fs-small); color: var(--fg-muted); }
/* the recorder */
.rec { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--pad-card); }
.rec > * + * { margin-top: var(--sp-3); }
.rec-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-5); }
.rec-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px;
  border-radius: var(--radius-pill); border: 2px solid var(--danger); background: var(--surface); color: var(--danger);
  font-family: var(--font-display); font-size: var(--fs-btn); font-weight: 700; letter-spacing: 0.03em; cursor: pointer;
}
.rec-btn:hover { background: var(--tint-danger); }
.rec.is-recording .rec-btn { background: var(--danger); color: #fff; animation: mic-pulse 1.2s infinite; }
.rec-time { font-family: var(--font-body); font-size: var(--fs-label); color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.rec-msg { font-family: var(--font-body); font-size: var(--fs-small); color: var(--fg); }
.rec-msg:empty { display: none; }
.rec-takes { display: grid; gap: var(--sp-3); }
.rec-takes:empty { display: none; }
.rec-take { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); }
.rec-take-lbl { font-family: var(--font-display); font-size: var(--fs-small); font-weight: 700; color: var(--fg); }
.rec-take audio { max-width: 100%; }
.rec-check { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.rec-check li { margin: 0; }
.rec-check label { display: flex; align-items: flex-start; gap: var(--sp-3); min-height: 44px; padding: 6px 0; cursor: pointer; font-family: var(--font-body); font-size: var(--fs-small); line-height: 1.5; }
.rec-check input { width: 22px; height: 22px; flex-shrink: 0; margin-top: 4px; accent-color: var(--accent); }
.rec-check input:disabled + span { color: var(--fg-muted); }
.rec-again, .rec-del { margin: 0; }
.rec-del { margin-top: var(--sp-5); }
.rec-note { font-size: var(--fs-label); color: var(--fg-muted); }
/* dictation */
.dictate { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--pad-card); }
.dictate > * + * { margin-top: var(--sp-3); }
.dictate-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px;
  border-radius: var(--radius-pill); border: 2px solid var(--star-t); background: var(--surface); color: var(--star-t);
  font-family: var(--font-display); font-size: var(--fs-btn); font-weight: 700; letter-spacing: 0.03em; cursor: pointer;
}
.dictate-btn:hover, .dictate-btn[aria-pressed="true"] { background: var(--star-t); color: #fff; }
.dictate-out { min-height: 3em; padding: var(--sp-3) var(--sp-4); border-radius: var(--radius); background: var(--surface2); font-family: var(--font-serif); font-size: var(--fs-small); line-height: 1.6; color: var(--fg); }
.dictate-out:empty { display: none; }
.dictate-sum { font-family: var(--font-body); font-size: var(--fs-small); font-weight: 600; color: var(--fg); }
.dictate-sum:empty { display: none; }
/* radio sound */
.radio-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-5); margin-top: var(--sp-3); }
.radio-ctl + p, .speed-ctl + p { margin-top: var(--sp-4); }
.brief-model .play-row + .fold { margin-top: var(--sp-4); }
.radio-hint { text-transform: none; letter-spacing: 0; font-weight: 500; font-family: var(--font-body); }

/* Continue from where you left off (panel E1): a text link under Start, never beside it */
.cover-continue { margin: 0; }
#slide-0 > .cover-continue { margin-top: var(--sp-2); }
.clear-work-line { font-family: var(--font-body); font-size: var(--fs-label); color: var(--fg-muted); margin-top: var(--sp-5); }

/* The short note on covers, the full note under it (from Fast and Clear; shared by every part since 3 Nov, F6) */
.short-note { width: 100%; text-align: left; }
.short-note p { margin: 0; }
.short-note details { margin-top: var(--sp-2); }
.short-note summary { cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; color: var(--accent); font-family: var(--font-display); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.short-note details p { margin-top: var(--sp-2); color: var(--fg-muted); }
.cover-links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-4) var(--sp-5); }
.cover-sample { font-family: var(--font-display); font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem); font-weight: 700; color: var(--accent); }
.play-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-5); }
.hint { font-size: var(--fs-small); color: var(--fg-muted); }

/* 5.15 The tutor (Help) panel, in tokens (F6), docked beside the column from 1280px (F9), an outlined pill in the top bar (F4) */
#cb-btn { position: fixed; top: 12px; right: 16px; z-index: 9999; height: 44px; padding: 0 16px 0 14px; gap: 7px; border-radius: var(--radius-pill); background: var(--surface); color: var(--accent); border: 2px solid var(--accent); cursor: pointer; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: 0.05em; transition: background 0.15s, color 0.15s; }
#cb-btn.cb-inbar { position: relative; top: auto; right: auto; box-shadow: none; margin-left: 12px; flex-shrink: 0; }
#cb-btn:hover, #cb-btn[aria-expanded="true"] { background: var(--accent); color: var(--surface); }
#cb-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 359px) { #cb-btn .cb-btn-lbl { display: none; } #cb-btn { width: 44px; padding: 0; } }
#cb-badge { position: absolute; top: -2px; right: -2px; background: var(--danger); color: #fff; border-radius: 50%; width: 18px; height: 18px; font-size: 12px; font-weight: 700; display: none; align-items: center; justify-content: center; }
#cb-panel { position: fixed; top: 64px; right: 16px; z-index: 9998; width: 340px; max-width: calc(100vw - 32px); height: min(640px, calc(100vh - 96px)); max-height: calc(100vh - 96px); background: var(--surface); border-radius: var(--radius-lg); box-shadow: 0 8px 40px rgba(13, 31, 53, 0.18); display: flex; flex-direction: column; overflow: hidden; opacity: 0; transform: translateY(-12px) scale(0.96); transition: opacity 0.2s ease, transform 0.2s ease; pointer-events: none; }
#cb-panel.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
#cb-hdr { background: var(--accent); padding: 12px 14px; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
#cb-hdr-icon { width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); display: flex; align-items: center; justify-content: center; color: #fff; }
#cb-hdr-icon svg { width: 18px; height: 18px; }
#cb-hdr-text { flex: 1; }
#cb-hdr-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: #fff; letter-spacing: 0.02em; }
#cb-hdr-sub { font-family: var(--font-body); font-size: var(--fs-label); color: rgba(255, 255, 255, 0.88); }
#cb-close { background: none; border: none; cursor: pointer; padding: 0; width: 44px; height: 44px; min-width: 44px; margin: -8px -10px -8px 0; flex-shrink: 0; color: rgba(255, 255, 255, 0.85); font-size: 18px; line-height: 1; }
#cb-close:hover { color: #fff; }
#cb-close:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
#cb-input:focus-visible { outline: 3px solid var(--accent-lt); outline-offset: 1px; }
#cb-msgs { flex: 1; min-height: 96px; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.cb-msg { max-width: 88%; border-radius: 10px; padding: 9px 12px; font-family: var(--font-body); font-size: var(--fs-small); line-height: 1.55; }
.cb-msg.bot { background: var(--surface2); color: var(--fg); align-self: flex-start; border-bottom-left-radius: 3px; }
.cb-msg.user { background: var(--accent); color: var(--surface); align-self: flex-end; border-bottom-right-radius: 3px; }
.cb-msg.typing { color: var(--fg-muted); font-style: italic; }
.cb-msg.privacy { font-size: var(--fs-label); color: var(--fg-muted); background: none; padding: 0 2px; }
.cb-msg-row { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.cb-speak-btn { background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: 22px; min-height: 44px; padding: 4px 14px; cursor: pointer; font-family: var(--font-body); font-size: var(--fs-label); font-weight: 600; color: var(--fg); transition: background 0.12s, border-color 0.12s; }
.cb-speak-btn:hover { background: var(--surface2); border-color: var(--accent); }
.cb-speak-btn.is-playing { border-color: var(--accent); color: var(--accent); background: var(--tint-accent); }
.cb-retry { margin-top: 6px; background: none; border: 0; padding: 0; min-height: 44px; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font-family: var(--font-display); font-size: var(--fs-btn); font-weight: 700; cursor: pointer; }
#cb-panel.cb-asked #cb-quick, #cb-panel.cb-short #cb-quick, #cb-panel.cb-short #cb-hdr-sub { display: none; }
#cb-panel.cb-short #cb-msgs { min-height: 48px; }
#cb-quick { padding: 8px 10px; border-top: 1px solid var(--border); display: flex; gap: 12px; flex-wrap: wrap; flex-shrink: 0; }
.cb-busy { font-family: var(--font-body); font-size: var(--fs-label); color: var(--fg-muted); padding: 0 12px 8px; display: none; }
.cb-busy.show { display: block; }
.cb-heard { font-family: var(--font-body); font-size: var(--fs-label); color: var(--fg); padding: 0 12px 8px; margin: 0; }
.cb-quick-btn { font-family: var(--font-body); font-size: var(--fs-label); font-weight: 600; padding: 4px 12px; min-height: 44px; border-radius: 20px; border: 1.5px solid var(--border); background: var(--surface); color: var(--fg-muted); cursor: pointer; white-space: nowrap; transition: border-color 0.12s, color 0.12s; }
.cb-quick-btn:hover { border-color: var(--accent); color: var(--accent); }
#cb-form { display: flex; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--border); flex-shrink: 0; }
#cb-send { margin-left: 12px; }
#cb-input { flex: 1; border: 1.5px solid var(--border-strong); border-radius: var(--radius); padding: 8px 10px; font-family: var(--font-body); font-size: 16px; color: var(--fg); background: var(--surface); resize: none; height: 44px; line-height: 1.5; transition: border-color 0.15s; }
#cb-input:focus { border-color: var(--accent); }
#cb-send { background: var(--accent); border: none; border-radius: var(--radius); width: 44px; height: 44px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.12s; color: var(--surface); }
#cb-send:hover { background: var(--accent-hover); }
#cb-send:disabled { opacity: 0.55; cursor: default; }
#cb-send svg { width: 16px; height: 16px; fill: currentColor; }
#cb-mic { background: none; border: 1.5px solid var(--border); border-radius: var(--radius); width: 44px; height: 44px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.12s, border-color 0.12s; color: var(--fg-muted); }
#cb-mic:hover { border-color: var(--accent); }
#cb-mic.recording { border-color: var(--danger); background: var(--tint-danger); animation: mic-pulse 1s infinite; color: var(--danger); }
#cb-mic svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
#cb-btn:focus-visible, #cb-send:focus-visible, #cb-mic:focus-visible, .cb-quick-btn:focus-visible, .cb-speak-btn:focus-visible, .cb-retry:focus-visible { outline: 3px solid var(--accent-lt); outline-offset: 2px; }
.cb-ask-sel { position: absolute; z-index: 9997; min-height: 44px; padding: 8px 14px; border-radius: var(--radius-pill); border: 1.5px solid var(--accent); background: var(--surface); color: var(--accent); font-family: var(--font-display); font-size: var(--fs-label); font-weight: 700; cursor: pointer; box-shadow: var(--shadow); max-width: min(90vw, 320px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px), (max-height: 520px) {
  #cb-panel { left: max(8px, env(safe-area-inset-left, 0px)); right: max(8px, env(safe-area-inset-right, 0px)); top: 56px; bottom: max(8px, env(safe-area-inset-bottom, 0px)); width: auto; max-width: none; height: auto; max-height: none; }
  #cb-quick { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
/* docked: from 1280px the open panel is a right column of the frame, full height (F9) */
@media (min-width: 1280px) {
  .app.has-panel { grid-template-columns: minmax(0, 1fr) 380px; }
  .app.has-panel > .topbar, .app.has-panel > .stage, .app.has-panel > .pager { grid-column: 1; }
  .app.has-panel > #cb-panel { position: static; grid-column: 2; grid-row: 1 / span 3; height: auto; max-height: none; width: auto; max-width: none; border-left: 1px solid var(--border); border-radius: 0; box-shadow: none; transform: none; opacity: 1; pointer-events: auto; }
}

/* 5.16 The Full and Detailed pages generated on 3 Nov (course/tools/make-scenarios.py): the pieces the panel added */
.parts-strip { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 700; letter-spacing: 0.04em; color: var(--accent); }
.people .person { display: flex; flex-wrap: wrap; gap: 2px var(--sp-3); align-items: baseline; padding: var(--sp-2) 0; border-bottom: 1px solid var(--border); }
.people .person:last-of-type { border-bottom: 0; }
.people .person b { font-family: var(--font-display); font-size: 1.0625rem; }
.people .person .muted { font-size: var(--fs-small); color: var(--fg-muted); }
.people .note { margin-top: var(--sp-3); }
.warmup { padding: 0; border: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: none; }
.warmup .pick { border: 0; border-radius: 0; padding-left: 0; padding-right: 0; border-top: 1px solid var(--border); }
.warmup .pick:first-of-type { border-top: 0; }
.pri-hint { font-family: var(--font-body); font-size: var(--fs-small); font-weight: 600; color: var(--fg); }
.warmup .pick-set { margin-top: var(--sp-2); }
.framework-fold > summary { font-family: var(--font-display); font-weight: 700; }
.steps-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-5); }
.steps-tools p { margin: 0; font-size: var(--fs-small); color: var(--fg-muted); }
.stop-line { padding: var(--sp-3) var(--sp-4); border-left: 4px solid var(--gold); background: var(--tint-gold); color: var(--fg); border-radius: var(--radius-sm); }
.listen-hint { margin: var(--sp-2) 0 0; font-size: var(--fs-small); color: var(--fg-muted); font-style: italic; }
.listen-hint:empty { display: none; }
.after-listen { display: grid; gap: var(--sp-5); margin-top: var(--sp-5); padding-top: var(--sp-5); border-top: 1px solid var(--border); }
.shadow { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-4); counter-reset: shadow; }
.shadow li { margin: 0; padding: var(--sp-3) var(--sp-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.shadow-row { display: flex; align-items: center; gap: var(--sp-3); }
.shadow-txt { font-family: var(--font-body); font-size: var(--fs-body); font-weight: 600; line-height: 1.4; }
.recall-why { margin-top: var(--sp-3); padding: var(--sp-3) var(--sp-4); background: var(--tint-success); border-radius: var(--radius-sm); font-size: var(--fs-small); }
.recall-hint { display: block; font-size: var(--fs-label); color: var(--fg-muted); font-style: italic; margin-top: 2px; }
.cq-explain-row { margin: var(--sp-2) 0 0; }
.hdr-grid { display: grid; gap: var(--sp-3); margin-top: var(--sp-3); }
.hdr-field label { display: grid; gap: 4px; font-family: var(--font-display); font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); }
.hdr-in { width: 100%; min-height: 44px; padding: var(--sp-2) var(--sp-3); font-family: var(--font-body); font-size: var(--fs-body); color: var(--fg); background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: var(--radius); }
.hdr-in:focus { outline: 3px solid var(--accent-lt); outline-offset: 1px; border-color: var(--accent); }
.hdr-in::placeholder { color: var(--fg-muted); opacity: 0.8; }
@media (min-width: 640px) { .hdr-grid { grid-template-columns: 1fr 1fr; } .hdr-field:last-child { grid-column: 1 / -1; } }
.short-mode-row { margin: 0; }
.wc-n { font-weight: 700; }
.tutor-check-row { margin: var(--sp-3) 0 0; font-size: var(--fs-small); color: var(--fg-muted); }
.check-out:empty { display: none; }
.check-out { padding: var(--pad-card); background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--radius-lg); }
.check-out:focus { outline: none; }
.check-out ul { padding-left: 1.2em; }
.check-out .check-ticks li { color: var(--success); font-weight: 600; }
.check-out .check-tries li { color: var(--fg); }
.check-out .check-sum { margin-top: var(--sp-3); font-size: var(--fs-small); color: var(--fg-muted); }
.rubric { width: 100%; border-collapse: collapse; margin-top: var(--sp-3); font-size: var(--fs-small); }
.rubric th, .rubric td { padding: var(--sp-2) var(--sp-3); border: 1px solid var(--border); text-align: left; vertical-align: top; line-height: 1.45; }
.rubric thead th { font-family: var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; font-size: var(--fs-label); color: var(--fg-muted); background: var(--surface); }
.rubric tbody th { font-family: var(--font-display); font-weight: 700; white-space: nowrap; background: var(--surface); }
.rubric-card { overflow-x: auto; }
@media (max-width: 480px) { .rubric thead { display: none; } .rubric tr { display: grid; margin-bottom: var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; } .rubric th, .rubric td { border: 0; border-bottom: 1px solid var(--border); } .rubric td::before { display: block; font-family: var(--font-display); font-size: var(--fs-label); letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-muted); } .rubric td:nth-child(2)::before { content: 'Not yet'; } .rubric td:nth-child(3)::before { content: 'Partly'; } .rubric td:nth-child(4)::before { content: 'Yes'; } }
.transfer-wrap { margin-top: var(--sp-3); }
.brief-text { font-family: var(--font-body); font-size: var(--fs-body); line-height: 1.6; max-width: var(--measure); }
.brief-model .play-row { margin-top: var(--sp-3); }
.cando-preview { margin: var(--sp-2) 0 0; padding-left: 1.2em; font-size: var(--fs-small); color: var(--fg); }
.cando-preview li + li { margin-top: 4px; }
.record-card .btn-row { margin-top: var(--sp-3); }
.end-actions-top:empty { display: none; }
.yourturn { display: grid; gap: var(--sp-3); }
.yourturn[hidden] { display: none; }
.yt-line { font-family: var(--font-body); font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem); font-weight: 600; line-height: 1.35; }
.yt-cue, .yt-end { font-size: var(--fs-small); color: var(--fg-muted); }
.yt-cue:empty, .yt-end:empty, .yt-said:empty, .yt-again:empty { display: none; }
.pri-card.pri-diff { border-color: var(--gold); background: var(--tint-gold); }
#porder.revealing { animation: fadeIn 0.3s ease; }

/* 5.17 The reading pages (4 Nov): /radio, /glossary, /about; one slide, read top to bottom, left-aligned */
.page-doc #slide-0.active { justify-content: flex-start; align-items: stretch; text-align: left; }
.page-doc #slide-0 > * { max-width: 100%; }
.page-doc #slide-0 > .slide-eyebrow, .page-doc #slide-0 > .slide-title { text-align: center; }
.page-doc #slide-0 > .slide-intro { max-width: var(--measure); margin-left: auto; margin-right: auto; text-align: center; }
.page-doc #slide-0 > * + * { margin-top: var(--flow); }
.page-doc #slide-0 > .slide-title + .slide-intro { margin-top: var(--sp-3); }
.page-doc #slide-0 > .section-label { margin-top: calc(var(--flow) * 1.6); font-size: var(--fs-h3); letter-spacing: 0.04em; text-transform: none; color: var(--fg); }
.page-doc #slide-0 > .section-label + * { margin-top: var(--sp-3); }
.page-doc .speed-slot { display: flex; justify-content: center; }
.page-doc .speed-slot:empty { display: none; }
.page-doc .task-box { padding: var(--pad-card); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.page-doc .task-box > * + * { margin-top: var(--sp-4); }
.wgrid-mini { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.wcard-mini { min-height: 56px; }
.compass-row { display: grid; gap: var(--sp-5); align-items: center; }
@media (min-width: 640px) { .compass-row { grid-template-columns: 240px minmax(0, 1fr); } }
.compass { width: min(100%, 240px); height: auto; color: var(--fg); margin: 0 auto; display: block; }
.spell-list { padding-left: 1.5em; display: grid; gap: var(--sp-4); }
.spell-list li .play-row { margin: 0; }
.play-rows { display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-5); align-items: center; margin-bottom: var(--sp-3); }
.play-rows .note { width: 100%; margin: 0; }
.inc-lines { list-style: none; padding: 0; display: grid; gap: var(--sp-3); }
.inc-lines li { padding-left: var(--sp-4); border-left: 3px solid var(--border-strong); }
.gl-nav { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.gl-nav a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border: 1.5px solid var(--border-strong); border-radius: var(--radius); font-family: var(--font-display); font-weight: 700; text-decoration: none; }
.gl-letter { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 800; color: var(--accent); margin-top: var(--flow); padding-top: var(--sp-3); border-top: 1px solid var(--border); }
.gl-list { margin: 0; display: grid; gap: var(--sp-3); }
.gl-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 2px var(--sp-3); align-items: center; }
.gl-row dt { display: contents; font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; }
.gl-row dd { margin: 0; grid-column: 2; font-size: var(--fs-small); color: var(--fg); }
.gl-in { color: var(--fg-muted); font-family: var(--font-display); font-size: var(--fs-label); letter-spacing: 0.06em; text-transform: uppercase; margin-left: var(--sp-2); }
.gl-table th { white-space: normal; }
.about-cards { display: grid; gap: var(--sp-5); }
@media (min-width: 900px) { .about-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.about-cards .cando-preview { font-size: var(--fs-body); }
/* the home page's front door (E2, E5, E9, F7, H8) */
.scn-card { border-color: var(--border); }
.first-step { font-family: var(--font-body); font-weight: 600; color: var(--fg); padding: var(--sp-3) var(--sp-4); border-left: 4px solid var(--accent); background: var(--tint-accent); border-radius: var(--radius-sm); text-align: left; }
.way { position: relative; display: flex; flex-direction: column; min-width: 0; }
.way .way-btn { flex: 1; padding-bottom: calc(var(--sp-3) + 48px); }
.way .play-mini { position: absolute; right: var(--sp-3); bottom: var(--sp-3); }
.way-hear { position: absolute; left: var(--sp-3); bottom: var(--sp-3); display: inline-flex; align-items: center; min-height: 44px; font-family: var(--font-display); font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-muted); pointer-events: none; }
.today { width: min(100%, 680px); padding: var(--pad-card); background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--gold); border-radius: var(--radius-lg); text-align: left; }
.today .box-label { color: var(--gold); }
.today-line { font-family: var(--font-display); font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem); font-weight: 700; line-height: 1.25; margin-top: var(--sp-2); }
.today-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-5); margin-top: var(--sp-3); }
.today-from { font-size: var(--fs-small); color: var(--fg-muted); }
.streak { font-family: var(--font-display); font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); }
.streak:empty { display: none; }
.more-doors { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3); }
.more-doors a { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 44px; padding: 0 var(--sp-4); border: 1.5px solid var(--border-strong); border-radius: 999px; font-family: var(--font-display); font-weight: 700; text-decoration: none; color: var(--fg); }
.more-doors a:hover { border-color: var(--accent); color: var(--accent); }
.trust-line { font-size: var(--fs-label); color: var(--fg-muted); }

/* ---------- 6. Page-specific pieces ---------- */

/* Covers */
.cover-eyebrow, .cover-kicker { color: var(--gold); }
.cover-kicker { color: var(--fg-muted); }
.cover-badge-row { display: flex; justify-content: center; }
.cover-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: var(--radius-pill);
  background: var(--accent); color: #fff; font-family: var(--font-display); font-size: var(--fs-label); font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.cover-title { font-size: var(--fs-h1); font-weight: 800; line-height: 1.02; letter-spacing: 0.005em; }
.cover-sub, .cover-subtitle { font-size: clamp(1.0625rem, 0.98rem + 0.4vw, 1.375rem); line-height: 1.55; color: var(--fg-muted); max-width: 36em; margin-inline: auto; }
.cover-meta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2); }
.cover-level { font-family: var(--font-display); font-size: var(--fs-small); color: var(--fg-muted); letter-spacing: 0.02em; }
.cover-level span { color: var(--fg); font-weight: 700; }
.cover-footnote { font-size: var(--fs-label); }
.cover-feature { display: inline-flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); text-align: left; }
.cover-feature-icon { font-size: 1.5rem; line-height: 1; }
.cover-feature-title { font-family: var(--font-body); font-size: var(--fs-label); font-weight: 700; color: var(--fg); letter-spacing: 0.02em; }
.cover-feature-text { font-size: var(--fs-small); color: var(--fg-muted); margin-top: 2px; }
#slide-0 > .vocab-box { width: 100%; }
#slide-0 > .course-disclaimer { width: 100%; }

/* QR code: large screens only, fixed to the window corner, outside the content */
.qr-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 5; display: none; }
.qr-section { padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.qr-svg { display: block; width: 112px; height: 112px; }
.qr-url, .qr-label { display: none; }
@media (min-width: 1000px) and (min-height: 760px) {
  body.on-cover .qr-wrap { display: block; }
}

/* Landing: about */
.about-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }
@media (min-width: 1024px) { .about-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.about-card-hdr { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 700; color: var(--fg); margin-bottom: var(--sp-2); }
.about-card-body { font-size: var(--fs-small); line-height: 1.6; }
.level-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px var(--sp-3); margin-top: var(--sp-3); }
.level-desc { font-size: var(--fs-small); color: var(--fg-muted); }
.transfer-list { margin-top: var(--sp-3); font-size: var(--fs-small); color: var(--fg-muted); }
@media (min-width: 1440px) { .star-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Landing: scenario cards */
.scenario-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }
@media (min-width: 1024px) { .scenario-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sc-card {
  position: relative; display: flex; flex-direction: column; gap: var(--sp-2);
  padding: var(--pad-card); background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: var(--radius-lg);
  color: inherit; text-decoration: none; box-shadow: var(--shadow); transition: border-color 0.15s, transform 0.15s;
}
.sc-card:hover { border-color: var(--accent); color: inherit; }
.sc-card:focus-visible { outline: 3px solid var(--accent-lt); outline-offset: 3px; }
.sc-pill { position: absolute; top: var(--sp-3); right: var(--sp-3); font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); border-color: var(--border); }
.sc-pill.is-progress { color: var(--gold); border-color: var(--gold); background: var(--tint-gold); }
.sc-pill.is-done { color: var(--success); border-color: var(--success); background: var(--tint-success); }
.sc-icon { font-size: 1.75rem; line-height: 1; }
.sc-body { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sc-title { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 800; color: var(--fg); line-height: 1.2; }
.sc-desc { font-size: var(--fs-small); line-height: 1.55; color: var(--fg-muted); }
.sc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--sp-2); }
.sc-tag { font-size: 0.8125rem; padding: 1px 10px; color: var(--fg-muted); border-color: var(--border); }
.sc-tag.level { color: var(--accent); border-color: rgba(21, 87, 176, 0.3); background: var(--tint-accent); }
.sc-cta { margin-top: var(--sp-2); font-family: var(--font-display); font-size: var(--fs-btn); font-weight: 700; color: var(--accent); }
.sc-card:hover .sc-cta { text-decoration: underline; }
.sc-arrow { display: none; }


/* Two ways to say it: the other column is hidden until shown, so the learner says it first (C7) */
.pairs.pairs-hidden .pair-full .pair-txt, .pairs.pairs-hidden-short .pair-short .pair-txt { display: none; }
.pairs.pairs-hidden .pair-full::after, .pairs.pairs-hidden-short .pair-short::after { content: 'Say it first, then show it.'; display: block; font-family: var(--font-body); font-size: var(--fs-label); color: var(--fg-muted); font-style: italic; }
.pair-how { font-weight: 600; letter-spacing: 0.02em; text-transform: none; color: var(--fg-muted); }
/* Two ways to say it: the same scenario in Fast and Clear and in Full and Detailed (both versions use these) */
.pairs { display: grid; gap: var(--sp-3); }
.pair { display: grid; grid-template-columns: 1fr; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
@media (min-width: 640px) { .pair { grid-template-columns: 1fr 1.4fr; gap: var(--sp-5); } }
.pair-lbl { display: block; font-family: var(--font-display); font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.pair-short .pair-lbl { color: var(--gold); }
.pair-full .pair-lbl { color: var(--gold); }
.pair-short .pair-txt { font-family: var(--font-display); font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem); font-weight: 700; color: var(--fg); }
.pair-full .pair-txt { font-family: var(--font-serif); font-size: var(--fs-body); color: var(--fg); }

/* Text links on their own line keep a 44px tap area */
.page-simple .slide p > a.btn-link, .page-simple .slide p > a.btn { display: inline-flex; align-items: center; min-height: 44px; }
.page-simple .slide p > a.btn { white-space: normal; text-align: left; } /* long link buttons wrap on small phones */

.pair-txt { display: block; margin-top: 2px; }
.two-ways .pairs { margin-top: var(--sp-4); }
.two-ways > * + * { margin-top: var(--sp-4); }
/* "Know both": one quiet line with a thin two-part bar, the same in both versions (designer, 1 Nov) */
.know-both { border-left: 4px solid var(--gold); padding: 2px 0 2px var(--sp-4); color: var(--fg); max-width: var(--measure); }
#slide-0 .know-both, .page-choose .know-both { text-align: left; }

/* The home page: three scenarios, each with both ways as two equal stacked buttons (panel, 1 Nov) */
.page-choose #slide-0 > .scn-grid { width: min(100%, 1120px); max-width: 1120px; text-align: left; }
.page-choose #slide-0 > .know-both { width: min(100%, 680px); }
.scn-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); }
@media (min-width: 1024px) { .scn-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.scn-card { display: flex; flex-direction: column; gap: var(--sp-3); padding: 20px; background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: var(--radius-lg); }
.scn-head { display: flex; align-items: center; gap: var(--sp-3); }
.scn-ico { font-size: 2rem; line-height: 1; }
.scn-title { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 800; margin: 0; }
.scn-desc { font-family: var(--font-body); font-size: var(--fs-small); color: var(--fg); margin: 0; }
.scn-ways { display: grid; gap: var(--sp-5); margin-top: auto; }
@media (min-width: 640px) { .scn-ways { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); align-items: stretch; } } /* side by side where the card is wide enough; one under the other in the three-column grid */
.way-btn {
  position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 44px; padding: var(--sp-3) var(--sp-4);
  border: 1.5px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: inherit; text-decoration: none;
}
.way-btn:hover { border-color: var(--accent); background: var(--tint-accent); color: inherit; }
.scn-ico .ico { width: 28px; height: 28px; color: var(--accent); }
.way-btn .way-status { position: absolute; top: var(--sp-2); right: var(--sp-2); }
.way-btn .way-status:empty { display: none; }
.way-btn .way-name { padding-right: 5.5rem; }
.scn-ways.has-status .way-name { padding-right: 5.5rem; }
.way-btn:focus-visible { outline: 3px solid var(--accent-lt); outline-offset: 3px; }
.way-name { font-family: var(--font-display); font-size: 1.125rem; font-weight: 800; color: var(--fg); }
.way-name::after { content: " \2192"; color: var(--gold); }
.way-sample { font-family: var(--font-display); font-size: var(--fs-small); font-weight: 600; color: var(--fg-muted); }
.way-meta { font-family: var(--font-body); font-size: 0.875rem; color: var(--fg-muted); }
.way-listen { display: flex; align-items: center; gap: var(--sp-3); margin-top: 2px; }
.scn-sample { font-family: var(--font-display); font-size: var(--fs-small); font-weight: 600; color: var(--fg-muted); margin: 0; }
.one-way-line { font-family: var(--font-display); font-size: var(--fs-small); color: var(--fg-muted); }
.page-choose .qr-wrap { position: static; display: none; margin-top: var(--sp-5); }
@media (min-width: 1280px) { .page-choose .qr-wrap { display: block; } }
.page-choose .qr-section { display: inline-block; }
/* the home page's first step, today's line and the streak (E2, E5) */
.first-step { font-family: var(--font-body); font-size: var(--fs-small); color: var(--fg); }
.today { width: min(100%, 680px); text-align: left; padding: var(--sp-4) var(--pad-card); border: 1px solid var(--border); border-left: 4px solid var(--gold); border-radius: var(--radius); background: var(--surface); }
.today-line { font-family: var(--font-display); font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem); font-weight: 700; color: var(--fg); margin-top: var(--sp-2); }
.today-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-5); margin-top: var(--sp-3); }
.today-done, .streak { font-family: var(--font-body); font-size: var(--fs-small); color: var(--fg-muted); }
.today-done:empty, .streak:empty { display: none; }
.footnote-links { font-family: var(--font-body); font-size: var(--fs-label); color: var(--fg-muted); }
.footnote-links a { color: var(--accent); }
.way-status { align-self: flex-start; font-family: var(--font-display); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-muted); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 1px 8px; }
.way-status.is-progress { color: var(--gold); border-color: var(--gold); background: var(--tint-gold); }
.way-status.is-done { color: var(--success); border-color: var(--success); background: var(--tint-success); }
.one-way + .one-way { margin-top: 0; }
/* Describe the Picture's door (the owner, 3 Nov: "Add a door"): a separate speaking practice under the three scenarios */
.page-choose #slide-0 > .pic-door { width: min(100%, 1120px); max-width: 1120px; text-align: left; }
.pic-door { display: grid; grid-template-columns: 1fr; overflow: hidden; background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
@media (min-width: 720px) { .pic-door { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); } }
.pic-door-img { display: block; width: 100%; height: 100%; min-height: 0; aspect-ratio: 3 / 2; object-fit: cover; background: var(--surface2); }
.pic-door-body { display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--pad-card); }
.pic-door-btn {
  display: flex; flex-direction: column; gap: 4px; min-height: 44px; margin-top: auto; padding: var(--sp-3) var(--sp-4);
  border: 2px solid var(--accent); border-radius: var(--radius); background: var(--surface); color: inherit; text-decoration: none;
}
.pic-door-btn:hover { background: var(--tint-accent); color: inherit; }
.pic-door-btn:focus-visible { outline: 3px solid var(--accent-lt); outline-offset: 3px; }
.pic-door-btn .way-name::after { color: var(--accent); }

/* each full scenario's cover links to the same story in clear, short English (the owner, 1 Nov: two equal versions) */
.cover-alt a.btn-link { display: inline-flex; align-items: center; min-height: 44px; }

/* The choosing page at the main address (the owner, 1 Nov: "Main address"): two doors, Simple Scenarios and the full course */
.app-choose { grid-template-rows: auto minmax(0, 1fr); }
.page-choose #slide-0 > .choose-grid { width: min(100%, 880px); max-width: 880px; text-align: left; }
.choose-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); }
@media (min-width: 720px) { .choose-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.door {
  display: flex; flex-direction: column; gap: var(--sp-2);
  padding: var(--pad-card); background: var(--surface); border: 2px solid var(--border-strong); border-radius: var(--radius-lg);
  color: inherit; text-decoration: none; box-shadow: var(--shadow); transition: border-color 0.15s;
}
.door:hover { border-color: var(--accent); color: inherit; }
.door:focus-visible { outline: 3px solid var(--accent-lt); outline-offset: 3px; }
.door-simple { border-top: 6px solid var(--gold); }
.door-full { border-top: 6px solid var(--gold); }
.door-ask { font-family: var(--font-display); font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.door-full .door-ask { color: var(--gold); }
.door-name { font-family: var(--font-display); font-size: var(--fs-h2); font-weight: 800; line-height: 1.1; color: var(--fg); }
.door-text { font-family: var(--font-body); font-size: var(--fs-body); color: var(--fg); line-height: 1.45; }
.door-sample { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 700; color: var(--fg-muted); }
.door-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.door-cta { margin-top: auto; padding-top: var(--sp-2); font-family: var(--font-display); font-size: var(--fs-btn); font-weight: 700; color: var(--accent); }
.door:hover .door-cta { text-decoration: underline; }
.choose-note p + p { margin-top: var(--sp-2); }
.choose-note-full { color: var(--fg-muted); }

/* Home in every top bar (the owner, 1 Nov: "there is always a way to return home... maybe a nav bar"): it goes to the
   choosing page at the main address. Rule 8: 24px to the next link (12px row gap + 12px margin), with a thin divider. */
.nav-home {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-shrink: 0;
  min-height: 44px; min-width: 44px; padding: 0 4px;
  font-family: var(--font-display); font-size: 1rem; font-weight: 700; letter-spacing: 0.03em;
  color: var(--accent); text-decoration: none; white-space: nowrap;
}
.nav-home:hover { color: var(--accent-hover); text-decoration: underline; }
.nav-home svg { width: 22px; height: 22px; flex-shrink: 0; }
.topbar-row .nav-home + .home-link, .topbar-row .nav-home + .brand { position: relative; margin-left: var(--sp-3); min-width: 0; }
.topbar-row .nav-home + .home-link::before, .topbar-row .nav-home + .brand::before {
  content: ''; position: absolute; left: -12.5px; top: 12px; bottom: 12px; width: 1px; background: var(--border);
}
.brand-head { font-weight: inherit; white-space: pre; }
.brand { gap: 0; } /* the name's parts sit together: "NATO English: Military Scenarios", no space before the colon */
@media (max-width: 639px) { .brand-head { display: none; } }
/* below laptop width Home is a house icon (its name is still read out), so the bar fits beside the slide dots */
@media (max-width: 1023px) { .nav-home .nav-lbl { display: none; } }
/* the top bar never widens the page */
.app { grid-template-columns: minmax(0, 1fr); }
.topbar-row { min-width: 0; }
.dots { overflow: hidden; }
/* phones: the page counter gives way to Home (the progress bar stays) */
@media (max-width: 479px) {
  .topbar-row .nav-home ~ .counter { display: none; }
  .topbar-row .nav-home ~ #cb-btn.cb-inbar { margin-left: auto; }
}

/* ---------- 7. Short screens (landscape phones) and touch typing ---------- */
@media (max-height: 500px) {
  :root { --fs-h1: clamp(1.75rem, 1.4rem + 2vw, 2.25rem); --fs-h2: clamp(1.375rem, 1.2rem + 1vw, 1.75rem); --flow: 0.875rem; }
  .topbar-row { min-height: 44px; }
  .home-link, .brand { min-height: 44px; }
  .pager-row { padding-top: 4px; padding-bottom: 4px; }
  .pager .btn { min-height: 44px; padding: 6px 16px; }
  .slide { padding-top: 16px; padding-bottom: 24px; }
  #slide-0.active { justify-content: flex-start; }
  .page-scenario .cover-badge-row, .page-scenario .cover-meta-row { display: none; }
  .cover-sub, .cover-subtitle { font-size: var(--fs-small); }
}

/* Laptop windows: the whole cover, disclaimer included, on the first screen (seat 1 A2) */
@media (min-width: 640px) and (max-height: 900px) {
  :root { --fs-h1: clamp(2.25rem, 1.5rem + 2vw, 3.25rem); }
  #slide-0.active { padding-top: var(--sp-5); padding-bottom: var(--sp-5); }
  #slide-0 > * + * { margin-top: var(--sp-3); }
  .cover-sub, .cover-subtitle { font-size: var(--fs-body); }
}

/* Narrow phones: the labelled Next button may wrap instead of crowding Back (seat 1 B4) */
@media (max-width: 359px) {
  .pager .btn { white-space: normal; text-align: center; }
  .pager-row { gap: var(--sp-4); }
}
/* an inline link with a 44px tap area that does not change the line */
.cover-about { font: inherit; display: inline-block; min-height: 44px; padding: 10px 2px; margin: -10px 0; vertical-align: baseline; line-height: 24px; }
.brand-tail { font-weight: inherit; }
@media (max-width: 639px) { .brand-tail { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .topbar, .pager, .qr-wrap, #cb-btn, #cb-panel, .btn, .audio-btn, .listen-btn, .pic-tools, .talk, .say-row, .rec, .dictate, .speed-ctl, .radio-ctl, .share-row, .play-mini { display: none !important; }
  body, .app, .stage { height: auto; overflow: visible; display: block; background: #fff; color: #000; }
  .slide { display: block !important; break-before: page; }
  .slide:first-of-type { break-before: auto; }
  .a-step-body, .listen-tx, .exemplar-body, .bl-model, .reveal-box[hidden], .radio-tx[hidden], .sb-order[hidden] { display: block !important; }
  .pic-frame { box-shadow: none; border: 1px solid #C3D3E5; }
  @page { size: A4; margin: 18mm 16mm; }
}


/* ---------- 8. The second panel (4 Nov): hierarchy, density, phones, dark (A, C, D of qa-output/panel-uxui) ---------- */
/* A1: Next is outlined while the slide's task waits; the engines set body.slide-task */
body.slide-task .pager #btnNext { background: var(--surface); border-color: var(--border-strong); color: var(--fg); }
body.slide-task .pager #btnNext:hover { border-color: var(--accent); color: var(--accent); background: var(--surface); }
/* A3: the glossary's tables */
.gl-table { width: 100%; border-collapse: collapse; margin-top: var(--sp-3); font-size: var(--fs-small); }
.gl-table th, .gl-table td { padding: var(--sp-2) var(--sp-3); border: 1px solid var(--border); text-align: left; vertical-align: top; line-height: 1.45; }
.gl-table thead th { font-family: var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; font-size: var(--fs-label); color: var(--fg-muted); background: var(--surface); }
.gl-table tbody th { font-family: var(--font-display); font-weight: 700; background: var(--surface); }
@media (max-width: 480px) {
  .gl-table thead { display: none; }
  .gl-table tr { display: grid; margin-bottom: var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
  .gl-table th, .gl-table td { border: 0; border-bottom: 1px solid var(--border); }
  .gl-table tr > :last-child { border-bottom: 0; }
}
/* A4: the home page's one-way links on one line, the way names unwrapped */
.one-way { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--sp-2) var(--sp-5); }
.one-way-lbl { font-family: var(--font-display); font-size: var(--fs-small); color: var(--fg-muted); }
.way-name { white-space: nowrap; }
.scn-desc { min-height: 3.2em; }
/* A6: the listening options folded under one line */
.listen-opts { margin-top: var(--sp-3); }
.listen-opts > summary { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 44px; padding: 0 2px; cursor: pointer; list-style: none; font-family: var(--font-display); font-size: var(--fs-btn); font-weight: 700; color: var(--accent); }
.listen-opts > summary::-webkit-details-marker { display: none; }
.listen-opts > summary::before { content: '\25B8'; font-size: 0.8em; }
.listen-opts[open] > summary::before { content: '\25BE'; }
.listen-opts .lo-state { font-family: var(--font-body); font-weight: 500; color: var(--fg-muted); font-size: var(--fs-small); }
.listen-opts .speed-ctl, .listen-opts .radio-ctl { margin-top: var(--sp-3); }
/* A7: forms on phones: the label above a full-width box; placeholders that read as placeholders; the gap sentence with ___ and the select below */
.hdr-in::placeholder { font-weight: 400; color: var(--fg-muted); opacity: 0.9; }
.hdr-in { font-weight: 600; }
.gap-s { margin: 0 0 4px; }
@media (max-width: 639px) {
  .logbox-list li label { display: grid; grid-template-columns: 1fr; gap: 4px; }
  .logbox-list li .log-in, .logbox-list li .log-in.wide { width: 100%; margin-left: 0; }
  .logbox-list li .log-mark { display: inline-block; margin-top: 2px; }
  .numbers .logbox-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--sp-2) var(--sp-5); align-items: start; }
  .numbers .logbox-list li .num-play { grid-row: 1 / span 2; }
  .recall-list label { display: block; }
  .recall-list .recall-gap { display: block; width: 100%; margin: 0; }
}
/* A11: the tutor sheet fits its content on phones */
@media (max-width: 600px) {
  #cb-panel { top: auto !important; bottom: 0 !important; left: 0 !important; right: 0 !important; height: auto !important; max-height: 85dvh !important; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  #cb-msgs { min-height: 120px; }
  #cb-quick { flex-wrap: wrap; overflow: visible; }
}
/* A16, C6: the Help pill keeps 24px from the links on the reading pages */
.page-doc .topbar-row #cb-btn.cb-inbar { margin-left: auto; }
/* D10: the word's Hear control keeps its distance */
.vocab-term .play-mini { margin-left: var(--sp-3); }
/* C16: a third mark on the progress card: checked, not all right, with the way back */
.cc-mark.weak::before { content: ''; }
/* C18: the Result chip on white, so its text passes */
.star-chip.chip-r { background: var(--surface); }
/* the two-step Clear my work line (C9) */
.clear-confirm { display: grid; gap: var(--sp-2); justify-items: start; }
.clear-confirm .btn-link { min-height: 44px; }
/* C1: the dark theme's filled buttons and the Help header, at the end so they win over the button rules */
@media (prefers-color-scheme: dark) {
  .btn-primary, .gen-btn, .cover-begin, .cover-start, .end-btn.prim, .listen-btn, .cover-badge, .star-chip .ltr, .rank-badge, .tl-dot.hi,
  .a-step.open .a-step-num, .a-step.visited .a-step-num, .cq-opt.correct .ol, .cq-opt.correct .ol-auto, .try-prompt { color: #0F1923; }
  .btn-primary:hover, .gen-btn:hover, .cover-begin:hover, .cover-start:hover, .end-btn.prim:hover, .listen-btn:hover { color: #0F1923; }
  .cq-opt.correct .ol { color: #0F1923; }
  .try-prompt { color: #EF8A8A; }
  #cb-hdr { background: #1557B0; }
  .cb-msg.user { color: #0F1923; }
  body.slide-task .pager #btnNext { color: var(--fg); }
}
/* the second panel, small pieces: the empty pill, the Continue line, the first-step block, the first call, the vocabulary example */
.sc-pill:empty, .way-status:empty { display: none; }
.first-step p { margin: 0; }
.first-step .continue-line { margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--border); font-weight: 500; }
.first-step .continue-line a { font-weight: 700; }
.vocab-ex { margin-top: 4px; font-size: var(--fs-label); color: var(--fg-muted); font-style: italic; }
.first-call .first-call-in { width: 100%; min-height: 64px; font: inherit; font-family: var(--font-body); padding: var(--sp-2) var(--sp-3); border: 1.5px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--fg); }
.first-call-write { margin-top: var(--sp-3); display: grid; gap: var(--sp-3); }
.first-call-res:empty { display: none; }
.first-call-res { font-size: var(--fs-small); }
.chip-min { font-weight: 500; letter-spacing: 0.06em; opacity: 0.85; }
.after-write > summary, .build-fold > summary, .key-answer > summary { font-family: var(--font-display); font-weight: 700; }
.sc-card .sc-cta.btn { align-self: flex-start; color: var(--fg); }
.listen-stat.is-error, .play-stat.is-error { color: var(--danger); font-weight: 700; }

/* the long buttons on the writing page wrap instead of overflowing (4 Nov) */
.tutor-check-row .btn, .short-mode-row .btn { white-space: normal; text-align: left; line-height: 1.25; }
/* the dots keep rule 8's distance from the way-back link in the narrower column (4 Nov) */
.topbar-row .home-link + .dots { margin-left: var(--sp-5); }
/* a closed Listening options fold hides its controls outright (Chromium keeps their boxes otherwise) */
.listen-opts:not([open]) > :not(summary) { display: none !important; }

/* the second walk (4 Nov): a finished fast choice folds to its question and feedback; the page counter shows on phones too */
.decide.is-done .opts, .decide.is-done .timer, .decide.is-done .timer-txt, .decide.is-done .say-first, .decide.is-done .decide-start { display: none; }
.decide.is-done { opacity: 0.85; }
@media (max-width: 639px) { .topbar-row .nav-home ~ .counter { display: inline; font-size: var(--fs-label); margin-left: auto; padding-right: var(--sp-2); } }
.sb-said { margin: var(--sp-3) 0 0; }

/* the third walk (4 Nov): nothing moves once the lines are shown; the Said it button; the short report's rubric note; the home's one-way links as a unit */
.timer-txt { min-height: 1.5em; }
.talk-msg { min-height: 1.5em; }
.sb-said .btn { margin-top: var(--sp-2); }
.rubric-note-short { display: none; }
body.short-report .rubric-note-short { display: block; }
.one-way-links { white-space: nowrap; display: inline-flex; gap: var(--sp-5); }
.pc-card .sc-cta.btn { align-self: flex-start; color: var(--fg); margin-top: var(--sp-3); }
/* the end page's buttons wrap on a phone instead of pushing the page sideways (5 Nov) */
.end-actions .end-btn { white-space: normal; max-width: 100%; line-height: 1.25; }

/* ---------- 9. Spacing (5 Nov, the owner: "spacing/gaps with object and line seem too tight or not consistent... many other place
   as well"). One rhythm on every page, measured on every slide by qa/spacing-sweep.js:
     8px                    a label to the line it names; a field's hint under the field
     12px                   items of one list: answer options, steps, word cards, story lines, cards in a column
     16px                   pieces inside one box
     --flow (16 to 28px)    pieces of one slide
     --flow-lg (28 to 40px) a new section: a task after reading, a box on a cover, a heading over its part
   Boxes run the full width of their column, so their edges line up; the text inside them keeps the reading measure. ---------- */
:root { --flow-lg: clamp(28px, 1.2rem + 1.5vw, 40px); }

/* covers: the title group stays close; each box steps further away, on short laptop screens too */
body:not(.page-doc) #slide-0 > :is(.vocab-box, .course-disclaimer, .cover-feature, .first-step, .scn-grid, .choose-grid, .pic-door,
  .more-doors, .today, .qr-wrap, .scenario-grid, .about-grid, .star-grid, .star-note, .card, .task-box, .level-grid),
body:not(.page-doc) #slide-0 > :is(.vocab-box, .cover-feature, .first-step, .scn-grid, .choose-grid, .pic-door, .more-doors, .today,
  .scenario-grid, .about-grid, .star-grid, .star-note, .card, .task-box) + * { margin-top: var(--flow-lg); }
body:not(.page-doc) #slide-0 > .scn-grid + .pic-door { margin-top: var(--sp-5); } /* the picture door reads as one more card under the three */
body:not(.page-doc) #slide-0 > .cover-subtitle + .first-step { margin-top: var(--flow); }
#slide-0 > .cover-feature { display: flex; width: 100%; } /* as wide as the note under it */
.cover-title { line-height: 1.08; }
/* the home page: every box as wide as the three scenario cards, so the edges line up */
.page-choose #slide-0 > :is(.first-step, .today, .course-disclaimer) { width: min(100%, 1120px); max-width: 1120px; }
.first-step { padding: var(--sp-4) var(--pad-card); }
.first-step .continue-line { margin-top: var(--sp-4); padding-top: var(--sp-4); }
.today { padding: var(--pad-card); }
/* the three scenario cards: one gap inside, and both ways start on the same line in every card */
.scn-card { gap: var(--sp-4); }
.scn-ways { gap: var(--sp-4); }
@media (min-width: 1024px) {
  .scn-card { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: var(--sp-4); }
  .scn-ways { grid-row: span 2; grid-template-rows: subgrid; row-gap: var(--sp-4); margin-top: 0; }
  .scn-desc { min-height: 0; }
}
.pic-door-body { gap: var(--sp-4); }
.way-hear { left: calc(var(--sp-4) + 1.5px); } /* Hear it lines up with the words above it */
.level-row { row-gap: var(--sp-2); }
.sc-tags { gap: var(--sp-2); }
.scenario-grid, .star-grid, .star-overview, .so-grid { gap: var(--sp-4); }

/* slides: a chip over the title keeps 12px; a heading on its own sits closer to its part than to what is above */
.slide > .star-chip + *, .slide > .level-chip + * { margin-top: var(--sp-3); }
.slide > * + :is(.box-label, .words-hdr, h3) { margin-top: var(--flow-lg); }
.slide > :is(.box-label, .words-hdr, h3, .section-label) + * { margin-top: var(--sp-3); }

/* boxes run the column's full width (the measure stays on the text inside) */
.slide:not(#slide-0) :is(.tl-body, .listen-tx, .cq-fb, .cq-explain, .cq-tryagain, .feedback-box, .pri-fb, .en-note, .listen-q-item,
  .notice-list, .stop-line, .star-note, .build-from, .note.stop-line, .reveal-note) { max-width: none; }
.cq-opt-txt { max-width: var(--measure); }

/* lists of like items: 12px */
.cq-opts, .notice-list, .action-steps, .rec-takes, .wds, .wgrid { gap: var(--sp-3); }
.slide > .a-step + .a-step, div:not(.action-steps) > .a-step + .a-step { margin-top: var(--sp-3); }
.listen-q-text { margin-bottom: var(--sp-3); }
.listen-opt { margin-top: var(--sp-3); }
.template-wrap { gap: var(--sp-4); }

/* pieces inside one box: 16px (paragraphs of one text stay closer) */
.task-box > * + *, .card > * + *, .vocab-box > * + * { margin-top: var(--sp-4); }
.task-box > p + p, .card > p + p { margin-top: 0.6em; }
.vocab-box > .vocab-box-hdr + * { margin-top: var(--sp-2); }
.vocab-box > .cando-hdr { margin-top: var(--sp-5); }
.exemplar-hint { margin-bottom: var(--sp-3); }
.gap-s { margin-bottom: var(--sp-2); }
.build-from { padding: var(--sp-3) var(--sp-4); }

/* the radio exchange in Full and Detailed: the same rhythm as everywhere (its pieces lived only in Fast and Clear's sheet) */
.radio-fd > * + * { margin-top: var(--sp-4); }
.radio-fd > :is(.logbox, .yourturn) { margin-top: var(--flow-lg); }
.yourturn > .section-label { margin-bottom: 0; }
.radio-tx { list-style: none; margin-left: 0; padding: var(--sp-3) var(--sp-4); background: var(--surface2); border-radius: var(--radius); display: grid; gap: var(--sp-2); }
.radio-tx li { margin: 0; font-size: var(--fs-body); line-height: 1.45; }
.radio-tx li b { font-family: var(--font-display); letter-spacing: 0.02em; }
.radio-tx li[data-v="b"] b { color: var(--star-t); }
.radio-tx li[data-v="a"] b { color: var(--accent); }
.radio-tx li.is-now { background: var(--tint-gold); border-radius: var(--radius-sm); }

/* the warm-up: the line above it, then air, then its questions on the page's own ground */
.warmup { padding-top: var(--sp-5); padding-bottom: var(--sp-4); }
.warmup .pick { background: none; }

/* dividers: the same space above and below the line */
.cc-sub + .cc-row { margin-top: var(--sp-3); }
.slide > .share-row { margin-top: var(--flow-lg); padding-top: var(--flow-lg); }
.page-doc #slide-0 > .gl-letter { margin-top: var(--flow-lg); padding-top: var(--sp-4); }
.page-doc #slide-0 > .gl-letter + * { margin-top: var(--sp-3); }

/* a label and the line it names: at least 4px between their boxes */
.sc-num + :is(h2, h3, .sc-title, .scn-title), .tl-time + .tl-head, .timeline .tl-body .tl-time + h3, .pair-lbl + .pair-txt, .cc-title + .cc-sub { margin-top: 4px; }
/* boxed list lines run the column's width too */
.slide :is(.scene, .shadow, .inc-lines, .radio-tx) > li { max-width: none; }
/* the warm-up's questions are separated by lines, not by gaps */
.warmup .pick-set { gap: 0; }
.warmup .pick { padding-top: 40px; padding-bottom: 0; } /* 40px on every screen: the empty feedback line above the rule is space too */
.warmup .pick:first-of-type { padding-top: var(--sp-4); }

/* the end of a slide lines up on the left like everything above it; the other way sits under its buttons */
.slide:not(#slide-0) > .end-actions, .slide:not(#slide-0) > .share-row { justify-content: flex-start; }
.slide > .end-actions + .cover-alt { margin-top: var(--sp-3); }

/* lines that wrap keep air between them */
.tutor-check-row .btn, .short-mode-row .btn, .end-actions .end-btn { line-height: 1.3; }
.a-step-title, .step-hdr-txt h3, .sc-title { line-height: 1.3; }
.slide-title { line-height: 1.15; }
.wcard-en, .wd-en, .word-en { line-height: 1.25; }
