/* ============================================================
   Body in Motion — Year 11 HMS
   Direction: a coach's training log. Ink on white, hairline rules,
   condensed athletic headings, highly legible body text.
   Colour is reserved for data: blue = aerobic, orange = anaerobic,
   green = mixed. Everything else is ink.
   ============================================================ */
:root {
  color-scheme: light;
  --paper: #ffffff;
  --surface: #ffffff;
  --surface-2: #f2f4f6;
  --wash: #f7f8f9;
  --ink: #0e1216;
  --ink-2: #39414a;
  --muted: #646d77;
  --line: #e0e4e8;
  --line-strong: #b8c0c8;

  --aerobic: #2a78d6;
  --aerobic-soft: #e4eefb;
  --anaerobic: #eb6834;
  --anaerobic-soft: #fdeae2;
  --mixed: #1baf7a;
  --mixed-soft: #def4ea;

  --accent: #0e1216;
  --accent-soft: #eef1f4;
  --focus: #2a78d6;

  --good: #0a7a2f;
  --good-soft: #e1f3e6;
  --bad: #c62f2e;
  --bad-soft: #fbe5e4;
  --warn: #8a5a00;
  --warn-soft: #fbf1db;

  --font-display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --fs: clamp(16px, 0.85vw + 8.5px, 24px);
  --r: 6px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0f1215;
    --surface: #161a1e;
    --surface-2: #1f2429;
    --wash: #13171a;
    --ink: #eef1f4;
    --ink-2: #c9d0d6;
    --muted: #96a0aa;
    --line: #2a3036;
    --line-strong: #47505a;
    --aerobic: #3987e5;
    --aerobic-soft: #172a40;
    --anaerobic: #d95926;
    --anaerobic-soft: #3a2117;
    --mixed: #199e70;
    --mixed-soft: #12302a;
    --accent: #eef1f4;
    --accent-soft: #20262c;
    --focus: #5a9cec;
    --good: #4cc276;
    --good-soft: #15301e;
    --bad: #f07272;
    --bad-soft: #3a1c1c;
    --warn: #e0a83a;
    --warn-soft: #33270f;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0f1215;
  --surface: #161a1e;
  --surface-2: #1f2429;
  --wash: #13171a;
  --ink: #eef1f4;
  --ink-2: #c9d0d6;
  --muted: #96a0aa;
  --line: #2a3036;
  --line-strong: #47505a;
  --aerobic: #3987e5;
  --aerobic-soft: #172a40;
  --anaerobic: #d95926;
  --anaerobic-soft: #3a2117;
  --mixed: #199e70;
  --mixed-soft: #12302a;
  --accent: #eef1f4;
  --accent-soft: #20262c;
  --focus: #5a9cec;
  --good: #4cc276;
  --good-soft: #15301e;
  --bad: #f07272;
  --bad-soft: #3a1c1c;
  --warn: #e0a83a;
  --warn-soft: #33270f;
}

* { box-sizing: border-box; }
html { font-size: var(--fs); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-stretch: 78%;
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -0.005em;
  margin: 0 0 .45em;
  text-wrap: balance;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.15rem; font-stretch: 85%; font-weight: 700; }
h4 { font-size: .9rem; font-stretch: 90%; font-weight: 700; }
p { margin: 0 0 .7em; }
ul, ol { margin: 0 0 .7em; padding-left: 1.2em; }
li { margin: .2em 0; }
li::marker { color: var(--muted); }
a { color: var(--ink); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
strong, b { font-weight: 700; }
kbd {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: .75em;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: .05em .4em;
  background: var(--surface);
}
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: .8rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 1rem; }
.mb0 { margin-bottom: 0; }
.aer { color: var(--aerobic); font-weight: 700; }
.ana { color: var(--anaerobic); font-weight: 700; }
.mix { color: var(--mixed); font-weight: 700; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.eyebrow {
  font-family: var(--font-display);
  font-stretch: 90%;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .66rem;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: .5em;
}

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  height: 56px;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  font-size: 15px;
}
.brand { display: flex; align-items: baseline; gap: 10px; color: var(--ink); text-decoration: none; min-width: 0; }
.brand strong { font-family: var(--font-display); font-stretch: 70%; font-weight: 800; font-size: 22px; letter-spacing: .01em; text-transform: uppercase; white-space: nowrap; }
.brand small { color: var(--muted); font-size: 13px; white-space: nowrap; }
.topnav { display: flex; align-items: center; gap: 2px; height: 100%; }
.topnav a {
  color: var(--ink-2); text-decoration: none; padding: 0 12px; height: 100%;
  display: flex; align-items: center; border-bottom: 3px solid transparent; margin-bottom: -2px;
  font-family: var(--font-display); font-stretch: 88%; font-weight: 600; letter-spacing: .02em;
}
.topnav a:hover { color: var(--ink); }
.topnav a.active { color: var(--ink); border-bottom-color: var(--ink); }
.topnav .sep { width: 1px; height: 24px; background: var(--line); margin: 0 8px; }
body.fullscreen .topbar { display: none; }
@media (max-width: 720px) {
  .brand small { display: none; }
  .topbar { padding: 0 12px; gap: 8px; }
  .topnav a { padding: 0 7px; font-size: 14px; }
  .topnav .sep { display: none; }
}
@media (max-width: 460px) { .brand strong { font-size: 17px; } .topnav a { padding: 0 5px; font-size: 13px; } .topnav a[data-nav="home"], #modeBtn { display: none; } }

/* ---------- buttons ---------- */
.btn {
  font: inherit;
  font-family: var(--font-display);
  font-stretch: 90%;
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .01em;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  padding: .45em .95em;
  border-radius: var(--r);
  cursor: pointer;
  line-height: 1.2;
  text-decoration: none;
  display: inline-block;
  transition: background .12s, color .12s;
}
.topbar .btn { font-size: 14px; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.icon { width: 2.2em; height: 2.2em; padding: 0; display: inline-grid; place-items: center; }
.btn.sel { background: var(--ink); color: var(--paper); }
.btn[disabled] { opacity: .4; cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- page shells ---------- */
.page { width: min(1240px, 100%); margin: 0 auto; padding-block: 32px 72px; padding-inline: 20px; }
.page-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; padding-bottom: 18px; border-bottom: 2px solid var(--ink); margin-bottom: 28px; }
.page-head h1 { margin: 0; }
.page-head p { margin: .5em 0 0; color: var(--ink-2); max-width: 62ch; }
@media (max-width: 720px) { .page-head { grid-template-columns: 1fr; } h1 { font-size: 2rem; } }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin: 40px 0 16px; }
.section-title h2 { margin: 0; font-size: 1.35rem; }

/* ---------- home ---------- */
.now-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1.5px solid var(--ink); border-radius: var(--r); overflow: hidden; }
.now-strip > a { display: block; padding: 14px 16px; text-decoration: none; color: var(--ink); min-width: 0; }
.now-strip > a + a { border-left: 1px solid var(--line); }
.now-strip > a:hover { background: var(--wash); }
.now-strip .when { font-family: var(--font-display); font-stretch: 85%; font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.now-strip .what { font-family: var(--font-display); font-stretch: 82%; font-weight: 700; font-size: 1.05rem; line-height: 1.15; margin-top: 4px; }
.now-strip .meta { font-size: .76rem; color: var(--muted); margin-top: 4px; }
.now-strip a.is-today { background: var(--ink); color: var(--paper); }
.now-strip a.is-today .when, .now-strip a.is-today .meta { color: var(--paper); opacity: .78; }
@media (max-width: 760px) { .now-strip { grid-template-columns: 1fr; } .now-strip > a + a { border-left: 0; border-top: 1px solid var(--line); } }

.map-card { border: 1px solid var(--line); border-radius: var(--r); padding: 8px; background: var(--wash); }
.map-scroll { overflow-x: auto; }
.map-scroll svg { width: 100%; min-width: 680px; height: auto; display: block; }
.map-edge { stroke: var(--line-strong); stroke-width: 1.5; fill: none; }
.map-edge.hot { stroke: var(--ink); stroke-width: 2.5; }
.map-edge-label { font-size: 12.5px; fill: var(--muted); font-family: var(--font-body); }
.map-edge-label.hot { fill: var(--ink); font-weight: 700; }
.map-edge-bg { fill: var(--wash); }
.map-node { cursor: pointer; }
.map-node rect { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; }
.map-node.active rect { stroke: var(--ink); stroke-width: 2; }
.map-node:hover rect, .map-node:focus rect { stroke: var(--focus); stroke-width: 2.5; }
.map-node:focus { outline: none; }
.map-node text { fill: var(--ink); }
.map-node .n-title { font-family: var(--font-display); font-stretch: 80%; font-size: 19px; font-weight: 750; }
.map-node .n-sub { font-family: var(--font-body); font-size: 12.5px; fill: var(--muted); }
.map-node .n-tag { font-family: var(--font-display); font-stretch: 90%; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; fill: var(--muted); }
.map-node.active .n-tag { fill: var(--ink); }
.map-legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: .72rem; color: var(--muted); padding: 8px 8px 2px; }
.map-legend i { display: inline-block; width: 16px; height: 11px; margin-right: 6px; vertical-align: -1px; border: 1px solid var(--line-strong); background: var(--surface); }
.map-legend i.on { border: 2px solid var(--ink); }

.lesson-list { border-top: 2px solid var(--ink); }
.lesson-row {
  display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) auto; gap: 20px; align-items: center;
  padding: 18px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink);
}
.lesson-row:hover { background: var(--wash); }
.lesson-row .dp { font-family: var(--font-display); font-stretch: 70%; font-weight: 800; font-size: 2.6rem; line-height: .9; font-variant-numeric: tabular-nums; }
.lesson-row h3 { margin: 0 0 .2em; font-size: 1.3rem; }
.lesson-row p { margin: 0; color: var(--ink-2); font-size: .86rem; max-width: 70ch; }
.lesson-row .meta { text-align: right; font-size: .74rem; color: var(--muted); white-space: nowrap; }
.lesson-row .meta b { display: block; color: var(--ink); font-family: var(--font-display); font-stretch: 85%; font-size: .9rem; }
@media (max-width: 640px) { .lesson-row { grid-template-columns: 3.6rem minmax(0, 1fr); } .lesson-row .dp { font-size: 1.9rem; } .lesson-row .meta { grid-column: 2; text-align: left; } }

.howto { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.howto > div { padding: 18px 20px 4px 0; min-width: 0; }
.howto > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.howto h3 { font-size: 1rem; }
.howto p { font-size: .82rem; color: var(--ink-2); }
@media (max-width: 760px) { .howto { grid-template-columns: 1fr; } .howto > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); } }

/* ---------- deck ---------- */
.deck { flex: 1; display: flex; flex-direction: column; min-height: calc(100vh - 56px); }
body.fullscreen .deck { min-height: 100vh; }
.deck-head { display: flex; align-items: center; gap: 14px; padding: 12px 24px 0; font-size: .68rem; color: var(--muted); }
.deck-head .crumb { color: var(--muted); text-decoration: none; font-family: var(--font-display); font-stretch: 88%; font-weight: 650; text-transform: uppercase; letter-spacing: .1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deck-head a.crumb:hover { color: var(--ink); }
.deck-head .crumb.dp { color: var(--ink); }
.progress { flex: 1; min-width: 40px; height: 3px; background: var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--ink); transition: width .3s; }
.deck-head .count { font-family: var(--font-display); font-stretch: 85%; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }

.slide-wrap { flex: 1; display: flex; justify-content: center; padding-block: 22px 16px; padding-inline: 24px; }
.slide { width: min(1320px, 100%); animation: slideIn .3s ease; }
@keyframes slideIn { from { opacity: .3; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.slide-kicker { font-family: var(--font-display); font-stretch: 88%; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .4em; }
.slide > h2 { font-size: 2.1rem; margin-bottom: .55em; }
.slide.title-slide { display: flex; flex-direction: column; justify-content: center; min-height: 62vh; }
.slide.title-slide h1 { font-size: 3.1rem; max-width: 20ch; font-stretch: 72%; font-weight: 800; line-height: 1; }

.deck-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 24px calc(12px + env(safe-area-inset-bottom, 0px)); font-size: .72rem; color: var(--muted);
  border-top: 1px solid var(--line); background: var(--paper);
}
.deck-foot .links { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; min-width: 0; }
.deck-foot .nav { display: flex; gap: 6px; align-items: center; flex: none; }
.syl { font-size: .66rem; color: var(--muted); margin-top: 1.4em; padding-top: .6em; border-top: 1px solid var(--line); max-width: 120ch; }
.syl b { color: var(--ink-2); }

.frag { transition: opacity .3s ease, transform .3s ease; }
body.present .frag:not(.shown) { opacity: 0; transform: translateY(8px); pointer-events: none; }

/* ---------- layout helpers ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; align-items: start; }
.split > *, .grid-2 > *, .grid-3 > *, .grid-4 > *, .grid-5 > * { min-width: 0; }
@media (max-width: 900px) {
  .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 12px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.card h3 { margin-bottom: .35em; }
.card ul { margin-bottom: 0; }
.card.tight { padding: 12px 14px; }
.card.aer { border-top: 3px solid var(--aerobic); }
.card.ana { border-top: 3px solid var(--anaerobic); }
.card.mix { border-top: 3px solid var(--mixed); }
.card.acc { border-top: 3px solid var(--ink); }
.card.aer, .card.ana, .card.mix, .card.acc { color: var(--ink); font-weight: inherit; }

.pill {
  display: inline-block; font-family: var(--font-display); font-stretch: 88%; font-size: .66rem; font-weight: 700; letter-spacing: .04em;
  padding: .18em .6em; border-radius: 3px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); vertical-align: middle;
}
.pill.aer { background: var(--aerobic-soft); color: var(--ink); border-color: var(--aerobic); }
.pill.ana { background: var(--anaerobic-soft); color: var(--ink); border-color: var(--anaerobic); }
.pill.mix { background: var(--mixed-soft); color: var(--ink); border-color: var(--mixed); }
.pill.ink { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.chip {
  font: inherit; font-size: .7rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  padding: .22em .65em; border-radius: 3px;
  border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink-2);
}
.chip::before { content: ""; width: 7px; height: 7px; border: 1.5px solid var(--ink); border-radius: 50%; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.term { border-bottom: 1.5px dashed var(--ink-2); cursor: help; }

/* callouts: label in a margin column under an ink rule */
.callout { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 4px 18px; padding: 12px 0 2px; border-top: 2px solid var(--ink); align-items: start; }
.callout > b:first-child, .callout > strong:first-child {
  grid-row: 1;
  font-family: var(--font-display); font-stretch: 88%; font-size: .68rem; font-weight: 750; text-transform: uppercase; letter-spacing: .1em; line-height: 1.5; padding-top: .25em;
}
.callout > :not(:first-child), .callout-body { grid-column: 2; grid-row: 1; }
.callout p:last-child, .callout ul:last-child, .callout ol:last-child { margin-bottom: 0; }
.callout.try { border-top-color: var(--anaerobic); }
.callout.try > b:first-child { color: var(--anaerobic); }
.callout.real { border-top-color: var(--mixed); }
.callout.real > b:first-child { color: var(--mixed); }
.callout.deep { border-top: 1px dashed var(--line-strong); color: var(--ink-2); }
.callout.deep > b:first-child { color: var(--muted); }
.callout.warn { border-top-color: var(--warn); }
@media (max-width: 640px) { .callout { grid-template-columns: 1fr; } .callout > b:first-child { grid-row: auto; } .callout > :not(:first-child), .callout-body { grid-column: 1; grid-row: auto; } }

.big-q { font-family: var(--font-display); font-stretch: 85%; font-size: 1.55rem; font-weight: 600; line-height: 1.2; max-width: 34ch; text-wrap: balance; }
.formula { font-family: var(--font-display); font-stretch: 85%; font-size: 1.5rem; font-weight: 750; text-align: center; padding: .45em 1em; border: 1.5px solid var(--ink); border-radius: var(--r); font-variant-numeric: tabular-nums; }
.stat { font-family: var(--font-display); font-stretch: 75%; font-size: 2.4rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.stat small { font-size: .42em; font-weight: 600; color: var(--muted); margin-left: .25em; font-stretch: 90%; }
.stat-label { font-size: .72rem; color: var(--muted); margin-top: .35em; }

/* tables */
.table { width: 100%; border-collapse: collapse; font-size: .82rem; background: var(--surface); }
.table th, .table td { padding: .55em .75em; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table thead th { font-family: var(--font-display); font-stretch: 88%; font-weight: 700; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; border-bottom: 2px solid var(--ink); color: var(--ink); }
.table td:first-child { font-weight: 700; }
.table.compact { font-size: .78rem; }
.table th.aer { box-shadow: inset 0 -4px 0 var(--aerobic); }
.table th.ana { box-shadow: inset 0 -4px 0 var(--anaerobic); }
.table th.mix { box-shadow: inset 0 -4px 0 var(--mixed); }
.table-scroll { overflow-x: auto; }
.table-scroll .table { min-width: 560px; }

.reveal-cell { cursor: pointer; position: relative; }
.reveal-cell:not(.open) { color: transparent; }
.reveal-cell:not(.open)::after {
  content: "tap to reveal"; position: absolute; inset: 5px; display: grid; place-items: center;
  color: var(--muted); font-size: .66rem; background: var(--wash); border: 1px dashed var(--line-strong); border-radius: 4px;
}
.reveal-cell:not(.open) * { visibility: hidden; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tab-panel { animation: slideIn .2s ease; }

.hbar { display: flex; height: 2rem; overflow: hidden; gap: 2px; border-radius: 3px; }
.hbar > span { display: flex; align-items: center; justify-content: center; font-size: .66rem; font-weight: 700; color: #fff; min-width: 0; white-space: nowrap; overflow: hidden; transition: flex-grow .4s ease; }
.hbar .aerobic { background: var(--aerobic); }
.hbar .anaerobic { background: var(--anaerobic); }
.hbar .mixed { background: var(--mixed); }
.hbar .rest { background: var(--surface-2); color: var(--muted); }

/* forms */
label.field { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; color: var(--ink-2); font-weight: 700; }
input[type="number"], input[type="text"], input[type="search"], select, textarea {
  font: inherit; font-size: .9rem; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--line-strong); border-radius: var(--r); padding: .45em .6em; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; }
textarea { min-height: 5em; resize: vertical; line-height: 1.55; }
input[type="range"] { width: 100%; accent-color: var(--ink); height: 1.6rem; }
.range-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; font-size: .8rem; }
.range-row output { font-family: var(--font-display); font-stretch: 85%; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 4.5em; text-align: right; }

/* quiz */
.quiz { display: grid; border-top: 2px solid var(--ink); }
.q { padding: 14px 0 16px; border-bottom: 1px solid var(--line); }
.q p { font-weight: 700; margin-bottom: .55em; }
.q .opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.q .opt { text-align: left; font-family: var(--font-body); font-stretch: 100%; font-weight: 400; font-size: .82rem; padding: .55em .8em; border-width: 1px; border-color: var(--line-strong); }
.q .opt:hover { border-color: var(--ink); background: var(--paper); }
.q .opt.right { background: var(--good-soft); border-color: var(--good); }
.q .opt.right::before { content: "✓ "; color: var(--good); font-weight: 700; }
.q .opt.wrong { background: var(--bad-soft); border-color: var(--bad); }
.q .opt.wrong::before { content: "✗ "; color: var(--bad); font-weight: 700; }
.q .why { margin-top: .6em; font-size: .8rem; color: var(--ink-2); }
.score { font-family: var(--font-display); font-stretch: 85%; font-weight: 700; }
.quiz > .btn-row { padding-top: 12px; }

/* sorter */
.sorter-pool { display: flex; flex-wrap: wrap; gap: 10px; min-height: 3.2em; padding: 10px; border: 1.5px dashed var(--line-strong); border-radius: var(--r); margin-bottom: 14px; }
.sort-card { font: inherit; font-size: .82rem; text-align: left; cursor: grab; background: var(--surface); border: 1px solid var(--ink); border-radius: 4px; padding: .5em .75em; max-width: 100%; color: var(--ink); }
.sort-card.picked { background: var(--ink); color: var(--paper); }
.sort-card.right { border-color: var(--good); background: var(--good-soft); color: var(--ink); }
.sort-card.wrong { border-color: var(--bad); background: var(--bad-soft); color: var(--ink); }
.sort-card .fb { display: block; font-size: .7rem; color: var(--ink-2); margin-top: .3em; }
.sort-bins { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.bin { border: 1px solid var(--line-strong); border-top: 3px solid var(--ink); border-radius: 0 0 var(--r) var(--r); padding: 10px; min-height: 9em; background: var(--wash); display: flex; flex-direction: column; gap: 8px; cursor: pointer; min-width: 0; }
.bin.over, .bin.target { background: var(--surface-2); outline: 2px dashed var(--ink); outline-offset: -4px; }
.bin h4 { margin: 0 0 4px; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); }

/* charts */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: var(--font-body); fill: var(--muted); font-size: 13px; }
.chart .axis line, .chart .axis path { stroke: var(--ink-2); }
.chart .grid line { stroke: var(--line); }
.chart .lbl { fill: var(--ink-2); font-size: 12.5px; font-weight: 700; }
.chart .crosshair { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .band { fill: var(--wash); }
.chart .band-label { font-family: var(--font-display); font-size: 11px; fill: var(--muted); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .72rem; color: var(--ink-2); }
.legend i { display: inline-block; width: 18px; height: 3px; vertical-align: middle; margin-right: 6px; }
.tooltip { position: fixed; pointer-events: none; z-index: 50; background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 4px; padding: 8px 10px; font-size: 13px; min-width: 130px; }
.tooltip b { display: block; margin-bottom: 3px; }
.tooltip .row { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.tooltip .row i { width: 10px; height: 10px; display: inline-block; }

/* stepper */
.stepper { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1.5px solid var(--ink); border-radius: var(--r); overflow: hidden; margin-bottom: 18px; }
.step-btn { font: inherit; font-size: .74rem; text-align: left; cursor: pointer; padding: 10px 12px; border: 0; background: var(--paper); color: var(--ink); min-width: 0; }
.step-btn + .step-btn { border-left: 1px solid var(--line); }
.step-btn b { display: block; font-family: var(--font-display); font-stretch: 75%; font-size: 1.5rem; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.step-btn.sel { background: var(--ink); color: var(--paper); }
@media (max-width: 760px) { .stepper { grid-template-columns: repeat(3, minmax(0, 1fr)); } .step-btn:nth-child(4) { border-left: 0; } .step-btn:nth-child(n+4) { border-top: 1px solid var(--line); } }

/* model answers */
details.model { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; background: var(--surface); }
details.model > summary { cursor: pointer; font-family: var(--font-display); font-stretch: 88%; font-weight: 700; }
details.model[open] > summary { margin-bottom: .6em; }
.marks { font-family: var(--font-display); font-stretch: 88%; font-size: .72rem; font-weight: 700; color: var(--muted); letter-spacing: .04em; white-space: nowrap; }
.band6 p { font-size: .86rem; }
mark { background: var(--warn-soft); color: inherit; padding: 0 .15em; }

/* overview */
.overview { position: fixed; inset: 0; background: var(--paper); z-index: 40; overflow: auto; padding: 24px; }
.overview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.overview-grid button { font: inherit; text-align: left; cursor: pointer; background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 12px; min-height: 90px; color: var(--ink); }
.overview-grid button:hover { border-color: var(--ink); }
.overview-grid button.cur { background: var(--ink); color: var(--paper); }
.overview-grid small { display: block; opacity: .7; font-size: .66rem; margin-bottom: 4px; }

/* drawer */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); z-index: 45; transform: translateX(105%); transition: transform .22s ease; }
.drawer.open { transform: none; }
.drawer-inner { height: 100%; overflow: auto; background: var(--paper); border-left: 2px solid var(--ink); padding: 24px 24px 40px; font-size: .9rem; }
.drawer-close { float: right; }
.drawer .rel { display: flex; flex-wrap: wrap; gap: 6px; margin-top: .6em; }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(8, 10, 12, .5); z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal-card { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--r); padding: 24px; width: min(560px, 100%); font-size: .9rem; }

#blackout { position: fixed; inset: 0; background: #000; z-index: 100; }

/* glossary */
.gloss-list { columns: 3 300px; column-gap: 32px; margin-top: 20px; }
.gloss-item { break-inside: avoid; padding: 12px 0 14px; border-top: 1px solid var(--line); font-size: .84rem; cursor: pointer; }
.gloss-item:hover h3 { text-decoration: underline; }
.gloss-item h3 { font-size: 1rem; margin-bottom: .25em; display: flex; align-items: center; gap: 8px; }
.gloss-item h3::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--gc, var(--line-strong)); flex: none; }
.gloss-item .src { font-size: .66rem; color: var(--muted); margin-top: .4em; font-family: var(--font-display); letter-spacing: .06em; text-transform: uppercase; }

/* week planner (FITT) */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day { font: inherit; font-size: .72rem; text-align: left; cursor: pointer; border: 1px solid var(--line-strong); border-radius: 4px; padding: 10px; background: var(--paper); color: var(--ink); min-height: 7.5em; display: flex; flex-direction: column; gap: 4px; border-top: 5px solid var(--dc, var(--line-strong)); min-width: 0; }
.day b { font-family: var(--font-display); font-stretch: 85%; font-size: .9rem; }
.day.sel { outline: 2px solid var(--ink); outline-offset: 1px; }
@media (max-width: 760px) { .week { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.dial { text-align: center; }
.dial .letter { font-family: var(--font-display); font-stretch: 70%; font-size: 3.2rem; font-weight: 800; color: var(--ink); line-height: 1; }

/* ---------- calendar ---------- */
.cal-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: .74rem; color: var(--muted); align-items: center; }
.cal-legend i { display: inline-block; width: 12px; height: 12px; border: 1px solid var(--line-strong); vertical-align: -1px; margin-right: 6px; }
.cal-legend i.done { background: var(--surface-2); }
.cal-legend i.today { background: var(--ink); border-color: var(--ink); }
.cal-week { display: grid; grid-template-columns: 7.5rem repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.cal-weeklabel { padding: 14px 12px 14px 0; }
.cal-weeklabel b { display: block; font-family: var(--font-display); font-stretch: 72%; font-size: 1.9rem; font-weight: 800; line-height: 1; }
.cal-weeklabel span { font-size: .72rem; color: var(--muted); }
.cal-weeklabel .ab { display: inline-block; margin-top: 6px; font-family: var(--font-display); font-weight: 700; font-size: .68rem; letter-spacing: .08em; border: 1px solid var(--ink); padding: 0 .4em; border-radius: 3px; color: var(--ink); }
.cal-lesson { font: inherit; text-align: left; cursor: pointer; border: 0; border-left: 1px solid var(--line); background: var(--paper); color: var(--ink); padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-lesson:hover { background: var(--wash); }
.cal-lesson .d { font-family: var(--font-display); font-stretch: 85%; font-weight: 700; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.cal-lesson .t { font-family: var(--font-display); font-stretch: 82%; font-weight: 700; font-size: 1rem; line-height: 1.15; }
.cal-lesson .dpt { font-size: .7rem; color: var(--muted); }
.cal-lesson.done { background: var(--wash); }
.cal-lesson.done .t { color: var(--ink-2); }
.cal-lesson.today { background: var(--ink); color: var(--paper); }
.cal-lesson.today .d, .cal-lesson.today .dpt { color: var(--paper); opacity: .8; }
.cal-lesson.sel { box-shadow: inset 0 0 0 3px var(--focus); }
.cal-detail { border: 1.5px solid var(--ink); border-radius: var(--r); padding: 20px 22px; margin: 18px 0 26px; background: var(--paper); }
.cal-detail h2 { font-size: 1.6rem; margin-bottom: .2em; }
.cal-detail .steps { list-style: none; padding: 0; margin: 14px 0 0; border-top: 1px solid var(--line); }
.cal-detail .steps li { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
.cal-detail .steps li > .n { font-family: var(--font-display); font-stretch: 75%; font-weight: 800; font-size: 1.4rem; line-height: 1.1; }
.cal-detail .steps label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.cal-detail .steps input[type="checkbox"] { width: 1.1em; height: 1.1em; margin-top: .25em; accent-color: var(--ink); flex: none; }
.cal-detail .steps .btn { margin-top: 6px; }
@media (max-width: 760px) {
  .cal-week { grid-template-columns: 1fr; }
  .cal-weeklabel { padding: 12px 0 6px; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
  .cal-weeklabel b { display: inline; }
  .cal-lesson { border-left: 0; border-top: 1px solid var(--line); }
}

/* ---------- practice ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; padding: 4px 0 16px; }
.filters .lbl { font-family: var(--font-display); font-stretch: 88%; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.q-list { border-top: 2px solid var(--ink); }
.q-row { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr) 7.5rem; gap: 18px; align-items: start; padding: 16px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.q-row:hover { background: var(--wash); }
.q-row .mk { font-family: var(--font-display); font-stretch: 72%; font-weight: 800; font-size: 2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.q-row .mk small { display: block; font-size: .32em; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--muted); margin-top: 3px; }
.q-row .stem { font-size: .92rem; }
.q-row .tags { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.q-row .status { text-align: right; font-size: .72rem; color: var(--muted); }
.q-row .status b { color: var(--good); }
@media (max-width: 640px) { .q-row { grid-template-columns: 3rem minmax(0, 1fr); } .q-row .status { grid-column: 2; text-align: left; } }

.q-view { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 960px) { .q-view { grid-template-columns: 1fr; } }
.q-stem { font-family: var(--font-display); font-stretch: 85%; font-size: 1.45rem; font-weight: 650; line-height: 1.25; margin: 0 0 .6em; text-wrap: pretty; }
.q-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .76rem; color: var(--muted); align-items: center; margin-bottom: 14px; }
.verb-box { border-top: 2px solid var(--ink); padding: 10px 0 2px; display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 18px; font-size: .86rem; margin-bottom: 14px; }
.verb-box b { font-family: var(--font-display); font-stretch: 85%; font-weight: 750; font-size: 1.05rem; }
.verb-box .src { font-size: .68rem; color: var(--muted); }
@media (max-width: 640px) { .verb-box { grid-template-columns: 1fr; gap: 4px; } }
.stimulus { border: 1px solid var(--line-strong); border-radius: var(--r); padding: 14px 16px; margin: 14px 0; background: var(--wash); font-size: .86rem; }
.stimulus .eyebrow { margin-bottom: .6em; }
.answer-box textarea { min-height: 16em; font-size: .92rem; }
.answer-meta { display: flex; justify-content: space-between; gap: 12px; font-size: .74rem; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
.criteria { width: 100%; border-collapse: collapse; font-size: .82rem; }
.criteria th { font-family: var(--font-display); font-stretch: 88%; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; text-align: left; border-bottom: 2px solid var(--ink); padding: .5em .6em; }
.criteria td { border-bottom: 1px solid var(--line); padding: .6em .6em; vertical-align: top; }
.criteria td.mk { font-family: var(--font-display); font-stretch: 75%; font-weight: 800; font-size: 1.3rem; width: 4.2rem; white-space: nowrap; }
.criteria ul { margin: 0; padding-left: 1.1em; }
.criteria tbody tr { cursor: pointer; }
.criteria tbody tr:hover td { background: var(--wash); }
.criteria tbody tr.pick td { background: var(--surface-2); }
.criteria tbody tr.pick td.mk { box-shadow: inset 4px 0 0 var(--ink); }
.lookfor { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.lookfor li { padding: 8px 0; border-bottom: 1px solid var(--line); margin: 0; font-size: .84rem; }
.lookfor label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.lookfor input { accent-color: var(--ink); width: 1.05em; height: 1.05em; margin-top: .25em; flex: none; }
.src-note { font-size: .7rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; margin-top: 18px; }

@media (max-width: 560px) {
  .deck-foot { flex-direction: column; align-items: stretch; }
  .deck-foot .nav { justify-content: flex-end; }
  .deck-head { padding: 10px 16px 0; }
  .slide-wrap { padding-inline: 16px; padding-block: 14px 10px; }
  .slide.title-slide h1 { font-size: 2.1rem; }
  .slide > h2 { font-size: 1.55rem; }
  .page { padding-inline: 16px; }
}

@media print {
  .topbar, .deck-foot, .deck-head, .drawer { display: none !important; }
  .frag { opacity: 1 !important; transform: none !important; }
}

/* ---------- classwork (Google Classroom-style topics) ---------- */
.cw-layout { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 36px; align-items: start; }
.cw-topics { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 2px; }
.cw-topics button { font: inherit; text-align: left; background: none; border: 0; border-left: 3px solid transparent; padding: 7px 12px; cursor: pointer; color: var(--ink-2); display: flex; flex-direction: column; }
.cw-topics button span { font-family: var(--font-display); font-stretch: 85%; font-weight: 700; font-size: .9rem; }
.cw-topics button small { font-size: .68rem; color: var(--muted); }
.cw-topics button:hover { background: var(--wash); }
.cw-topics button.sel { border-left-color: var(--ink); color: var(--ink); }
.cw-topic { margin-bottom: 34px; scroll-margin-top: 80px; }
.cw-topic > header { border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 2px; }
.cw-topic h2 { font-size: 1.4rem; margin: 0; }
.cw-sub { font-size: .76rem; color: var(--muted); margin-top: 4px; }
.cw-sub .now { color: var(--paper); background: var(--ink); padding: .05em .45em; border-radius: 3px; font-weight: 700; }
.cw-item { display: block; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.cw-item > summary, .cw-link { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 6px; cursor: pointer; list-style: none; }
.cw-item > summary::-webkit-details-marker { display: none; }
.cw-item > summary:hover, .cw-link:hover { background: var(--wash); }
.cw-ic { width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--ink); color: var(--ink); }
.cw-ic svg { width: 1.15rem; height: 1.15rem; }
.cw-ic.asg, .cw-ic.qz { background: var(--ink); color: var(--paper); }
.cw-ti { min-width: 0; display: flex; flex-direction: column; }
.cw-ti b { font-size: .9rem; }
.cw-ti small { font-size: .74rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.cw-dt { font-size: .74rem; color: var(--muted); white-space: nowrap; text-align: right; }
.cw-dt.ok { color: var(--good); font-weight: 700; }
.cw-item.done .cw-ti b { color: var(--ink-2); font-weight: 400; }
.cw-item.today > summary { background: var(--surface-2); }
.cw-item.today .cw-dt { color: var(--ink); font-weight: 700; }
.cw-body { padding: 0 6px 16px 3.6rem; }
.cw-body .steps { list-style: none; padding: 0; margin: 0 0 8px; border-top: 1px solid var(--line); }
.cw-body .steps li { display: grid; grid-template-columns: 1.8rem minmax(0, 1fr); gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); margin: 0; font-size: .86rem; }
.cw-body .steps li > .n { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; line-height: 1.2; }
.cw-body .steps label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.cw-body .steps input { width: 1.05em; height: 1.05em; margin-top: .25em; accent-color: var(--ink); flex: none; }
.cw-body .steps .btn { margin-top: 6px; }
.cw-item.flash > summary { animation: flash 1.6s ease; }
@keyframes flash { 0%, 40% { background: var(--surface-2); box-shadow: inset 4px 0 0 var(--focus); } 100% { background: transparent; } }
.cal-lesson.empty { cursor: default; color: var(--muted); }
@media (max-width: 860px) {
  .cw-layout { grid-template-columns: 1fr; gap: 12px; }
  .cw-topics { position: static; flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 6px; }
  .cw-topics .eyebrow { display: none; }
  .cw-topics button { border: 1px solid var(--line-strong); border-radius: var(--r); flex: none; }
  .cw-topics button.sel { border-color: var(--ink); }
  .cw-body { padding-left: 6px; }
  .cw-item > summary, .cw-link { grid-template-columns: 2.2rem minmax(0, 1fr); }
  .cw-dt { grid-column: 2; text-align: left; }
}

.nav-ic { display: none; width: 20px; height: 20px; flex: none; }
.skin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 760px) { .skin-grid { grid-template-columns: 1fr; } }
.skin-card { border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; background: var(--paper); display: flex; flex-direction: column; }
.skin-card.current { outline: 3px solid var(--focus); outline-offset: 2px; }
.skin-card .meta { padding: 14px 16px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.skin-card .meta h3 { margin: 0; }
.skin-card .meta p { margin: 2px 0 0; font-size: .78rem; color: var(--muted); max-width: 44ch; }

/* ---------- levelled readings ---------- */
.ladder { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1.5px solid var(--ink); border-radius: var(--r); overflow: hidden; margin-bottom: 8px; }
.ladder a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; text-decoration: none; color: var(--ink); background: var(--paper); min-width: 0; }
.ladder a + a { border-left: 1px solid var(--line); }
.ladder a:hover { background: var(--wash); }
.ladder b { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; }
.ladder span { font-size: .8rem; font-weight: 700; }
.ladder small { font-size: .68rem; color: var(--muted); }
.ladder a.done small { color: var(--good); font-weight: 700; }
.ladder a.done b::after { content: " ✓"; font-size: .8em; color: var(--good); }
.ladder a.sel { background: var(--ink); color: var(--paper); }
.ladder a.sel small { color: var(--paper); opacity: .8; }
@media (max-width: 760px) { .ladder { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ladder a:nth-child(4) { border-left: 0; } .ladder a:nth-child(n+4) { border-top: 1px solid var(--line); } }
.reading-wrap { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 18px; }
@media (max-width: 960px) { .reading-wrap { grid-template-columns: 1fr; } }
.reading { font-size: 1.02rem; line-height: 1.75; max-width: 68ch; }
.reading p { margin-bottom: 1em; }
.reading .formula { font-size: 1.1rem; margin: .4em 0 1em; }
.vt { font: inherit; background: none; border: 0; padding: 0; color: inherit; font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--focus); cursor: help; }
button.vt { cursor: pointer; }
.xl { font-style: italic; background: var(--warn-soft); padding: 0 .12em; border-radius: 2px; }
.legend-row { display: flex; flex-wrap: wrap; gap: 18px; font-size: .74rem; color: var(--muted); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.vocab td:first-child { white-space: nowrap; }
.vocab td:last-child { color: var(--ink-2); }
.cloze { line-height: 2.4; font-size: .98rem; }
.cloze select { width: auto; display: inline-block; padding: .15em .3em; font-size: .9rem; }
.cloze select.ok { border-color: var(--good); background: var(--good-soft); }
.cloze select.no { border-color: var(--bad); background: var(--bad-soft); }
#check textarea, #rw { min-height: 10em; }

/* print handouts */
.print-bar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: 14px; margin-bottom: 24px; }
.print-bar select { width: auto; }
.print-sheet { border: 1px solid var(--line-strong); padding: 28px 32px; margin-bottom: 28px; background: #fff; color: #111; font-family: var(--font-body); }
.print-sheet .vt { text-decoration-color: #111; }
.print-sheet .xl { background: none; text-decoration: underline dotted; }
.print-sheet .table, .print-sheet .table th, .print-sheet .table td { color: #111; background: #fff; border-color: #999; }
.print-sheet h3 { margin-top: 1.2em; }
.p-head { display: flex; justify-content: space-between; gap: 12px; border-bottom: 2px solid #111; padding-bottom: 6px; font-size: .8rem; }
.p-band { font-weight: 700; }
.p-name { display: flex; flex-wrap: wrap; gap: 18px; margin: 14px 0; font-size: .85rem; }
.print-sheet .reading { max-width: none; font-size: .95rem; line-height: 1.6; }
.p-mcq > li { margin-bottom: .8em; }
.p-mcq ol { margin-top: .3em; }
.blank { display: inline-block; min-width: 9em; border-bottom: 1px solid #111; }
.line { border-bottom: 1px solid #999; height: 2.1em; }
.p-check { font-size: .82rem; }
.p-key { border: 1.5px dashed #111; padding: 10px 14px; margin-top: 18px; font-size: .85rem; }
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff !important; padding: 0 !important; }
  .no-print, .topbar, .drawer, .modal, .tooltip { display: none !important; }
  .page, :root[data-skin] .page { border: 0 !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important; width: 100% !important; background: #fff !important; }
  .print-sheet { border: 0; padding: 0; margin: 0; break-after: page; }
  .print-sheet:last-child { break-after: auto; }
  .print-sheet table, .print-sheet tr { break-inside: avoid; }
}
.vocab-list { margin: 0; border-top: 2px solid var(--ink); }
.vocab-list > div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.vocab-list dt { font-weight: 700; }
.vocab-list dd { margin: 2px 0 0; font-size: .86rem; }
.vocab-list dd.ex { font-style: italic; color: var(--ink-2); }
.p-key { break-inside: avoid; }
:root[data-skin="exam"] .q .opt, :root[data-skin="exam"] .sort-card { font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-size: .86rem; }

/* ---------- HSC-style practice paper ---------- */
.exam-print .xp-cover, .exam-print .xp-paper, .exam-print .xp-key { background: #fff; color: #111; font-family: "Source Serif 4", Georgia, "Times New Roman", serif; border: 1px solid var(--line-strong); padding: 18mm 16mm; margin-bottom: 24px; }
.exam-print h1, .exam-print h2, .exam-print h3 { color: #111; }
.xp-school { font-family: Arial, Helvetica, sans-serif; text-transform: uppercase; letter-spacing: .12em; font-size: 11pt; }
.xp-title { font-size: 34pt; margin: 6mm 0 2mm; font-weight: 700; }
.xp-sub { font-size: 14pt; margin-bottom: 10mm; }
.xp-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10mm; border-top: 2px solid #111; padding-top: 5mm; font-size: 11pt; }
.xp-grid h3 { font-size: 12pt; margin-bottom: 2mm; }
.xp-grid ul { padding-left: 5mm; }
.xp-id { display: grid; gap: 5mm; margin: 10mm 0; font-size: 11pt; }
.xp-id > div { display: flex; align-items: flex-end; gap: 4mm; }
.xp-id span { white-space: nowrap; }
.xp-id .ln { flex: 1; border-bottom: 1px solid #111; height: 7mm; }
.xp-id .ln.short { flex: 0 0 40mm; }
.sn { display: inline-flex; }
.sn i { width: 8mm; height: 9mm; border: 1px solid #111; display: inline-block; }
.sn i + i { border-left: 0; }
.xp-marks { border-collapse: collapse; font-family: Arial, Helvetica, sans-serif; font-size: 9.5pt; margin-top: 6mm; }
.xp-marks th, .xp-marks td { border: 1px solid #111; padding: 2mm 2.5mm; text-align: center; min-width: 9mm; }
.xp-mini { display: flex; justify-content: space-between; gap: 10mm; font-size: 10pt; border-bottom: 1.5px solid #111; padding-bottom: 2mm; margin-bottom: 6mm; flex-wrap: wrap; }
.xq { margin-bottom: 7mm; }
.xq-head { font-family: Arial, Helvetica, sans-serif; font-size: 11pt; border-bottom: 1px solid #111; padding-bottom: 1.5mm; margin-bottom: 3mm; }
.xq-head span { font-weight: 400; }
.xq-stim { font-size: 10.5pt; margin-bottom: 3mm; }
.xq-stim .table, .xq-stim .table td, .xq-stim .table th { color: #111; background: #fff; border-color: #777; font-size: 10pt; }
.xq-stem { display: grid; grid-template-columns: minmax(0, 1fr) 10mm; gap: 4mm; font-size: 11.5pt; line-height: 1.45; margin-bottom: 2mm; }
.xq-mk { text-align: right; font-family: Arial, Helvetica, sans-serif; align-self: end; }
.xq-line { height: 9mm; border-bottom: 1px solid #8a8a8a; margin-right: 14mm; }
.xq-note { font-size: 9.5pt; font-style: italic; margin-top: 2mm; }
.xp-end { text-align: center; font-family: Arial, Helvetica, sans-serif; font-weight: 700; margin-top: 8mm; letter-spacing: .1em; text-transform: uppercase; font-size: 10pt; }
.xp-key h2 { font-size: 18pt; border-bottom: 2px solid #111; padding-bottom: 2mm; }
.xk { margin-bottom: 8mm; }
.xk h3 { font-size: 12pt; }
.xk-stem { font-style: italic; font-size: 10.5pt; }
.xp-key .criteria td, .xp-key .criteria th { border: 1px solid #777; color: #111; background: #fff; }
.xp-key .criteria td.mk { width: 18mm; text-align: center; }
.xk-sample { font-size: 10.5pt; border-left: 3px solid #111; padding-left: 4mm; }
@media (max-width: 720px) { .exam-print .xp-cover, .exam-print .xp-paper, .exam-print .xp-key { padding: 16px; } .xp-grid { grid-template-columns: 1fr; } .xp-marks { display: block; overflow-x: auto; } }
@media print {
  .exam-print .xp-cover, .exam-print .xp-paper, .exam-print .xp-key { border: 0; padding: 0; margin: 0; }
  .xp-cover { break-after: page; }
  .xp-key { break-before: page; }
  .xq-keep, .xk table, .xq-stim { break-inside: avoid; }
  .xq-line { break-inside: avoid; }
}
.xp-key mark, :root[data-skin] .xp-key mark { background: none; text-decoration: none; font-weight: 700; padding: 0; }
.xq-stim { margin-top: 2mm; }
@media print { .xk-top { break-inside: avoid; } }

/* ---------- skill classification continua (KIQ3) ---------- */
.cont { margin: 0 0 18px; }
.cont-l { display: flex; justify-content: space-between; gap: 8px; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.cont-track { position: relative; height: 8px; border-radius: 4px; background: var(--line); margin: 0 9px; }
.cont-track i { position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--ink); transform: translate(-50%, -50%); transition: left .35s ease; }

/* ---------- printable worksheets (slides, lessons, weeks) ---------- */
.ws-sheet { background: #fff; color: #111; border: 1px solid var(--line-strong); padding: 16mm 14mm; margin-bottom: 24px; }
.ws-sheet h2, .ws-sheet h3, .ws-sheet h4 { color: #111; }
.ws-sheet, .ws-sheet * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ws-student .cont-track i { display: none; }
.ws-sheet .cont-track { background: #ddd; }
.ws-answer { margin-top: 4mm; }
.ws-answer > b { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; }
.ws-head { border-bottom: 2px solid #111; padding-bottom: 3mm; margin-bottom: 5mm; }
.ws-eyebrow { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #444; }
.ws-head h2 { font-size: 1.5rem; margin: 2mm 0 3mm; }
.ws-name { display: flex; flex-wrap: wrap; gap: 6mm; justify-content: space-between; font-size: .85rem; }
.ws-sec { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; border-bottom: 1px solid #111; padding-bottom: 1.5mm; margin: 7mm 0 3mm; }
.ws-task h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 2mm; }
.ws-task p { margin-bottom: 1mm; }
.ws-lines { margin: 2mm 0 1mm; }
.ws-line { height: 8.5mm; border-bottom: 1px solid #9a9a9a; }
.ws-slide { padding: 4mm 0 5mm; border-bottom: 1px dashed #bbb; font-size: .92rem; color: #111; }
.ws-slide:last-child { border-bottom: 0; }
.ws-num { font-size: .66rem; color: #666; letter-spacing: .06em; text-transform: uppercase; float: right; }
.ws-title { font-size: 1.2rem; margin: 0 0 3mm; }
.ws-slide.title-slide h1 { font-size: 1.6rem; max-width: none; margin: 0 0 2mm; line-height: 1.15; }
.ws-slide.title-slide .lede, .ws-slide.title-slide p { font-size: .95rem; }
.ws-slide .card, .ws-slide .table th, .ws-slide .table td { background: #fff; color: #111; }
.ws-slide .callout { border-top-color: #111; }
.ws-slide .callout.try .ws-lines { margin-top: 3mm; }
.ws-slide .reveal-cell:not(.open)::after { content: ""; background: none; border: 0; }
.ws-slide .reveal-cell { min-height: 2.4em; }
.ws-slide .reveal-cell:not(.open), .ws-slide .table td.reveal-cell:not(.open) { color: transparent; }
.ws-tabh { font-size: .95rem; margin: 4mm 0 2mm; padding-left: 2mm; border-left: 3px solid #111; }
.ws-slide [data-panel] { animation: none; }
.ws-sel { border-bottom: 1px solid #111; padding: 0 .3em; }
.ws-term { font-weight: 700; }
.ws-inst { font-size: .8rem; font-style: italic; margin-bottom: 2mm; }
.ws-mcq { padding-left: 1.4em; margin: 0; }
.ws-mcq > li { margin-bottom: 3.5mm; break-inside: avoid; }
.ws-mcq > li > p { margin-bottom: 1.5mm; font-weight: 600; }
.ws-opts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1mm 6mm; }
.ws-opts li { display: flex; gap: 2.5mm; align-items: baseline; }
.ws-opts b { flex: none; width: 1.5em; height: 1.5em; border: 1px solid #111; border-radius: 50%; display: inline-grid; place-items: center; font-size: .72rem; }
.ws-opts li.ans b { background: #111; color: #fff; }
.ws-opts li.ans { font-weight: 700; }
.ws-why { font-size: .78rem; font-style: italic; color: #333; margin-top: 1mm; }
.ws-sort { width: 100%; border-collapse: collapse; font-size: .86rem; }
.ws-sort th, .ws-sort td { border: 1px solid #555; padding: 1.8mm 2.5mm; text-align: left; vertical-align: top; color: #111; background: #fff; }
.ws-sort th { font-size: .74rem; }
.ws-sort th:not(:first-child), .ws-sort td.tick { width: 22mm; text-align: center; font-weight: 700; font-size: 1.05rem; }
.ws-practice .xq-line { margin-right: 0; }
.ws-key { break-before: page; }
.ws-note { font-size: .8rem; font-style: italic; border-top: 1px solid #bbb; padding-top: 2mm; margin-top: 6mm; }
.cw-topic > header { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.cw-print { flex: none; }
@media (max-width: 720px) { .ws-sheet { padding: 16px; } .ws-opts { grid-template-columns: 1fr; } .ws-num { float: none; display: block; } }
@media print {
  .ws-sheet { border: 0; padding: 0; margin: 0; break-after: page; }
  .ws-sheet:last-child { break-after: auto; }
  .ws-page .print-bar { display: none !important; }
  .ws-slide { break-inside: auto; }
  .ws-slide .table, .ws-sort tr, .ws-slide .card, .ws-slide svg, .ws-task, .ws-slide .callout { break-inside: avoid; }
  .ws-title, .ws-sec, .ws-tabh, .ws-slide .slide-kicker, .ws-num { break-after: avoid; }
  .ws-slide *, .ws-sheet * { animation: none !important; transition: none !important; }
}

/* worksheet picker (choose what to print) */
.ws-off { display: none !important; }
.ws-picker { border: 1px solid var(--line-strong); background: var(--surface); padding: 10px 16px 14px; margin-bottom: 24px; }
.ws-picker > summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.ws-picker .ws-count { font-weight: 400; color: var(--muted); font-size: .85rem; }
.ws-picker .btn-row { margin: 8px 0 10px; }
.ws-pick-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 10px 18px; }
.ws-pick-groups fieldset { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 6px 0 0; min-width: 0; }
.ws-pick-groups legend { font-weight: 700; font-size: .88rem; padding: 0; }
.ws-pick-groups label { display: flex; gap: 8px; align-items: flex-start; font-size: .82rem; padding: 2px 0; cursor: pointer; }
.ws-pick-groups input { accent-color: var(--ink); margin-top: .2em; flex: none; }
.ws-readings > div { break-before: page; margin-top: 8mm; }
@media print { .ws-picker { display: none !important; } .ws-readings .print-sheet { break-after: auto; } }
.ws-pick-groups.single { display: block; }
.ws-pick-groups.single fieldset { columns: 3 260px; column-gap: 24px; }
.ws-pick-groups.single legend { column-span: all; }
.ws-pick-groups label { break-inside: avoid; }
.ws-picker.is-empty { display: none; }
@media (max-width: 720px) {
  .xp-id > div { flex-wrap: wrap; }
  .sn i { width: 6.5mm; }
  .print-sheet { padding: 16px; }
  .print-sheet table.vocab { display: block; overflow-x: auto; }
}

/* printable glossary */
.gl-list { margin: 0; columns: 2 260px; column-gap: 8mm; }
.gl-list.quiz { columns: 1; }
.gl-item { break-inside: avoid; padding: 1.6mm 0 2mm; border-bottom: 1px solid #ddd; }
.gl-item dt { font-weight: 700; font-size: .9rem; }
.gl-item dd { margin: .5mm 0 0; font-size: .82rem; line-height: 1.4; }
.gl-list.quiz .gl-item { display: grid; grid-template-columns: 14em minmax(0, 1fr); gap: 4mm; align-items: end; }
.gl-list.quiz .ws-lines { margin: 0; }
.gl-group .ws-sec { break-after: avoid; }
@media (max-width: 560px) { .gl-list.quiz .gl-item { grid-template-columns: 1fr; } }

/* print one band / lesson at a time */
.ws-hold { display: none !important; }
.ws-sep { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
.ws-sep h4 { margin: 0 0 4px; font-size: .9rem; }
.ws-sep .btn.done::after { content: " ✓"; }
.ws-key-inline { margin-top: 5mm; border-top: 2px solid #111; padding-top: 3mm; }
.ws-key-inline .criteria td, .ws-key-inline .criteria th { border: 1px solid #777; color: #111; background: #fff; }
.ws-key-inline .xk-sample { font-size: .86rem; border-left: 3px solid #111; padding-left: 4mm; }
.xq-crit { margin: 3mm 14mm 0 0; break-inside: avoid; }
.xq-crit .criteria { width: 100%; border-collapse: collapse; font-family: Arial, Helvetica, sans-serif; font-size: 8.5pt; }
.xq-crit .criteria th, .xq-crit .criteria td { border: 1px solid #777; color: #111; background: #fff; padding: 1mm 2mm; text-align: left; vertical-align: top; }
.xq-crit .criteria td.mk, .xq-crit .criteria th:last-child { width: 14mm; text-align: center; }
.xq-crit ul { margin: 0; padding-left: 4mm; }
@media (max-width: 720px) { .xq-crit { margin-right: 0; } }

/* ---------- media: animations, videos, GIFs ---------- */
.deck-foot .media-links { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: 10px; }
.media-modal { position: fixed; inset: 0; z-index: 70; background: rgba(8, 10, 12, .62); display: grid; place-items: center; padding: 16px; }
.media-card { background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: var(--r); width: min(1180px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 18px 22px 16px; }
.mp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.mp-head h2 { margin: 2px 0 0; font-size: 1.35rem; }
.mp-ctrls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.mp-canvas { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.mp-cap { margin: 10px 0 4px; font-size: 1rem; max-width: 80ch; }
.mp-dl { margin: 4px 0 0; }
.mp-frame { position: relative; aspect-ratio: 16 / 9; width: 100%; }
.mp-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 6px; background: #000; }
.mp-video, .mp-img { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: 6px; }
.media-grid .card h3 { margin: 4px 0 6px; font-size: 1.05rem; }
.media-add .field input, .media-add .field select { width: 100%; }
@media (max-width: 720px) { .media-grid { grid-template-columns: 1fr; } .media-card { padding: 12px; } }
@media print { .media-modal, .media-chip { display: none !important; } }
.mp-ctrls .seg { display: inline-flex; flex-wrap: wrap; gap: 4px; }

/* ---------- answer checker ---------- */
.ck-box { margin-top: 10px; }
.ck-box textarea { width: 100%; min-height: 6em; font: inherit; font-size: .95rem; }
.ck-btns { margin-top: 6px; align-items: center; }
.ck-btns .marks { margin-left: auto; }
.ck-fb { border: 2px solid var(--ink); border-radius: var(--r); padding: 12px 14px; margin-top: 10px; background: var(--paper); }
.ck-score { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.ck-mark { font-family: var(--font-display); font-size: 2rem; font-weight: 800; line-height: 1; }
.ck-mark small { font-size: .5em; color: var(--muted); }
.ck-row { font-size: .85rem; margin: 8px 0; padding: 6px 8px; background: var(--surface-2); border-radius: 4px; }
.ck-points { list-style: none; padding: 0; margin: 6px 0 0; font-size: .86rem; }
.ck-points li { display: flex; gap: 8px; padding: 3px 0; }
.ck-points li.ok .ck-ic { color: var(--aerobic); font-weight: 800; }
.ck-points li.no .ck-ic { color: var(--anaerobic); font-weight: 800; }
.ck-points em { color: var(--muted); }
.ck-warn { color: var(--anaerobic); }
.ck-sample { border-left: 3px solid var(--ink); padding: 6px 12px; margin-top: 10px; font-size: .92rem; }
.criteria tbody tr.auto td { box-shadow: inset 0 0 0 2px var(--aerobic); }
@media print { .ck-fb, .ck-btns { display: none !important; } }
.ck-points li.self { color: var(--muted); }

/* ---------- reading handouts: exactly two A4 pages per band ----------
   A4 is 210 × 297 mm; with 14 mm margins the printable area is 182 × 269 mm.
   Each page box is that size (a little shorter for safety) on screen and in print,
   so what you see is what prints. */
.print-sheet:has(.p-page) { border: 0; padding: 0; background: none; overflow-x: auto; margin-bottom: 8mm; }
.p-page { box-sizing: border-box; width: 182mm; height: 264mm; margin: 14mm auto 28mm; background: #fff; color: #111; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 0 0 14mm #fff, 0 0 0 calc(14mm + 1px) var(--line-strong); font-family: var(--font-body); }
.p-page > * { flex: none; }
.p-page h3 { margin: .7em 0 .3em; font-size: 1.02rem; }
.p-page h4 { margin: 0 0 .2em; font-size: .9rem; }
.p-page .reading { font-size: .92rem; line-height: 1.55; }
.p-page .reading p { margin: 0 0 .55em; }
.p-page .table.compact td, .p-page .table.compact th { padding: .3em .5em; font-size: .8rem; }
.p-mini { display: flex; justify-content: space-between; gap: 10px; font-size: .78rem; border-bottom: 1.5px solid #111; padding-bottom: 4px; }
.p-extra { margin-top: 3.5mm; padding-top: 2.5mm; border-top: 1px solid #bbb; }
.p-extra p.small { margin: 0 0 .2em; }
.p-extra .line { height: 1.9em; }
.p-term { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 6px; align-items: end; font-size: .85rem; }
.p-big { margin: 0; padding-left: 1.4em; }
.p-box { height: 52mm; border: 1px dashed #888; border-radius: 4px; margin-top: 2mm; }
.p-cut { display: none !important; }
.p-fill { flex: 1 1 0; min-height: 0; overflow: hidden; margin-top: 3mm; }
.p-fill-h { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #555; }
.p-fill .line { height: 1.9em; }
.p-overflow .p-page { height: auto; overflow: visible; }
.p-overflow .p-fill { display: none; }
@media print {
  .print-sheet:has(.p-page) { overflow: visible; margin: 0; break-after: auto; }
  .p-page { margin: 0; box-shadow: none; break-after: page; break-inside: avoid; }
}
.p-self { margin-top: 2mm; }
.p-self p.small { margin: 0 0 .2em; }
.p-self .p-check { margin: 0; padding-left: 1.2em; font-size: .78rem; }
.p-answer .p-fill-h { color: #111; font-weight: 700; }
.p-page .p-mcq { margin: 0; padding-left: 1.3em; font-size: .86rem; }
.p-page .p-mcq > li { margin-bottom: .45em; }
.p-page .p-mcq ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 6mm; margin: .15em 0 0; padding-left: 1.4em; }
.p-page .cloze { line-height: 2.1; font-size: .9rem; margin: 0; }
.p-page .p-bank { margin: 0 0 .3em; font-size: .85rem; }
.p-page table.vocab { font-size: .76rem; table-layout: fixed; width: 100%; }
.p-page table.vocab th:nth-child(1) { width: 24%; } .p-page table.vocab th:nth-child(2) { width: 40%; }
.p-page table.vocab td { padding: .22em .45em; line-height: 1.3; }
.p-page table.vocab td:first-child { white-space: normal; font-weight: 700; }
.p-box { height: 42mm; }

/* ---------- media buttons: prominent, at the top of the slide ---------- */
.slide-media { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: -.2em 0 1em; }
.slide-media-label { font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.media-chip { font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; text-align: left;
  background: var(--ink); color: var(--paper); border: 2px solid var(--ink); border-radius: 999px; padding: .38em 1.05em .38em .45em;
  font-size: .86rem; font-weight: 700; line-height: 1.2; box-shadow: 0 2px 0 rgba(0, 0, 0, .18); transition: transform .12s ease, box-shadow .12s ease; }
.media-chip:hover, .media-chip:focus-visible { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0, 0, 0, .22); }
.media-chip .mc-play { flex: none; width: 1.9em; height: 1.9em; border-radius: 50%; background: var(--anaerobic); position: relative; }
.media-chip .mc-play::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-35%, -50%); border-style: solid; border-width: .42em 0 .42em .7em; border-color: transparent transparent transparent #fff; }
.media-chip .mc-text { display: flex; flex-direction: column; }
.media-chip small { font-size: .62rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .75; }
.slide-media .media-chip { animation: mediaPulse 1.6s ease-out .4s 2; }
@keyframes mediaPulse { 0% { box-shadow: 0 0 0 0 rgba(228, 87, 46, .55); } 100% { box-shadow: 0 0 0 14px rgba(228, 87, 46, 0); } }
@media (prefers-reduced-motion: reduce) { .slide-media .media-chip { animation: none; } }
.cw-body .media-chip { margin: 4px 6px 0 0; }
@media print { .slide-media { display: none !important; } }

/* ---------- Library ---------- */
.lib-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.lib-filters input[type=search] { flex: 1 1 260px; }
.lib-filters select { width: auto; flex: 0 1 auto; }
.lib-sec { margin-top: 22px; }
.lib-sec .sec-h { font-size: 1.15rem; border-bottom: 2px solid var(--ink); padding-bottom: 4px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 14px; margin-top: 12px; }
.lib-card { display: flex; flex-direction: column; }
.lib-card h3 { font-size: 1rem; margin: 4px 0 6px; }
.lib-card .btn-row { margin-top: auto; padding-top: 6px; }

/* ---------- activity pages ---------- */
.act-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: 12px; margin-bottom: 16px; }
.act-head h1 { margin: 2px 0 4px; }
.act-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.act-tabs .btn.sel { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.stage { border: 2px solid var(--ink); border-radius: var(--r); background: var(--paper); display: flex; flex-direction: column; min-height: 62vh; }
.stage:fullscreen { min-height: 100vh; border: 0; border-radius: 0; padding: 2vh 3vw; }
.stage-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.stage-count { font-weight: 800; font-variant-numeric: tabular-nums; }
.stage-step-timer { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; color: var(--anaerobic); min-width: 2ch; text-align: center; }
.stage-score { display: inline-flex; align-items: center; gap: 4px; font-size: .9rem; }
.stage-score span[data-sv] { min-width: 1.6em; text-align: center; font-weight: 800; font-size: 1.2rem; }
.stage-body { flex: 1; display: grid; place-items: center; padding: 3vh 3vw; }
.stage-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); }
.stage-card { width: min(1100px, 100%); font-size: clamp(1.05rem, 1.6vw, 1.5rem); }
.stage-card h2 { font-size: 2em; margin: 0 0 .4em; }
.stage-eyebrow { font-size: .62em; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .6em; }
.stage-big { font-family: var(--font-display); font-size: 2.1em; font-weight: 800; line-height: 1.15; margin: .2em 0 .4em; }
.stage-answer { font-family: var(--font-display); font-size: 2.4em; font-weight: 800; margin: .2em 0; color: var(--aerobic); }
.stage-answer.sys-p { color: var(--anaerobic); } .stage-answer.sys-g { color: var(--mixed); } .stage-answer.sys-a { color: var(--aerobic); }
.stage-q { font-size: 1.15em; font-weight: 600; }
.stage-weak { font-size: 1.1em; border-left: 6px solid var(--anaerobic); padding: .4em .8em; background: var(--surface-2); }
.stage-model { font-size: 1.05em; border-left: 6px solid var(--aerobic); padding: .4em .8em; background: var(--surface-2); }
.stage-list li { margin-bottom: .4em; }
.sys-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 1em; }
.sys-row span { border: 2px solid var(--ink); border-radius: 999px; padding: .2em .9em; font-weight: 700; font-size: .8em; }
.sys-pick .btn { font-size: 1rem; padding: .6em 1.2em; }
.sp-fb { min-height: 2.4em; }
.fitt-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: .8em; }
.fitt-grid span { border: 2px dashed var(--line-strong); border-radius: 8px; text-align: center; font-family: var(--font-display); font-size: 2em; font-weight: 800; padding: .4em 0; color: var(--muted); }
.act-solo { max-width: 1000px; }
.swap-list { padding-left: 1.4em; }
.swap-list li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; margin-bottom: 6px; }
.swap-res.ok { color: var(--aerobic); font-weight: 800; } .swap-res.no { color: var(--anaerobic); font-weight: 700; font-size: .85rem; }
.coach { margin-bottom: 14px; }
.coach fieldset { border: 0; padding: 0; margin: 0; }
.coach fieldset label { margin-right: 10px; display: inline-flex; gap: 4px; }
/* printed activities */
.slips { display: grid; grid-template-columns: 1fr; gap: 0; }
.slip { border-bottom: 1.5px dashed #777; padding: 4mm 0 3mm; break-inside: avoid; height: 54mm; box-sizing: border-box; overflow: hidden; }
.slip p { margin: 0 0 1mm; }
.slip .ws-line { height: 7.5mm; }
.slip-head { display: flex; justify-content: space-between; font-size: .85rem; margin-bottom: 2mm; }
.ms-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; margin: 3mm 0; }
.ms-grid img { width: 100%; border: 1px solid #999; }
.ms-grid figcaption { font-size: .85rem; margin-top: 1mm; }
.ms-q li { margin-bottom: 3mm; break-inside: avoid; }
.coach-print { break-inside: avoid; margin-bottom: 6mm; }
@media (max-width: 720px) { .ms-grid { grid-template-columns: 1fr; } .swap-list li { grid-template-columns: 1fr; } .fitt-grid span { font-size: 1.3em; } }
@media print { .act-head { display: none !important; } }
