/* Video Production textbook: shared styles (FOUNDATION D). Light theme only. */
@font-face { font-family: Inter; src: url('fonts/InterVariable.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }

:root {
  --paper: #fbfaf7; --card: #ffffff; --ink: #171b1f; --muted: #5d6469; --line: #d6d8d6; --warm: #f1eee6;
  --cobalt: #3157c8; --cobalt-hover: #2747a8; --soft: #e8edfb; --orange: #b86533;
  --good: #1f7a4d; --good-soft: #e5f3ec; --bad: #a8442a; --bad-soft: #f9ebe5; --screen: #0e1114; --hint: #ffd24a;
  --radius: 10px; --text: 720px; --margin: 260px; --gap: 40px; --content: 1320px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
a { color: var(--cobalt); }
img { max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer; }
.button:hover { border-color: #b9bcb9; }
.button.primary { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.button.primary:hover { background: var(--cobalt-hover); }
.button:disabled { opacity: .5; cursor: default; }
.button.small { min-height: 36px; padding: 5px 12px; font-size: 14px; }
.button.selected { border-color: var(--cobalt); background: var(--soft); color: var(--cobalt); }
.button.good { border-color: var(--good); background: var(--good-soft); color: var(--good); opacity: 1; }
.button.bad { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- Top bar and sidebar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; height: 56px; padding: 0 20px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); font-size: 15px; }
.topbar .book { font-weight: 700; color: var(--ink); text-decoration: none; }
.topbar .crumb { color: var(--muted); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .crumb:hover, .topbar .book:hover { color: var(--cobalt); }
.topbar .sep { color: var(--line); }
.topbar .spacer { flex: 1; }
.topbar .sidebar-toggle { display: none; }
.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: calc(100vh - 56px); }
.sidebar { position: sticky; top: 56px; align-self: start; height: calc(100vh - 56px); overflow-y: auto; padding: 22px 14px 40px 20px; border-right: 1px solid var(--line); background: var(--paper); }
.sidebar h2 { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 6px 10px; }
.sidebar h2 a { color: inherit; text-decoration: none; }
.sidebar ol { list-style: none; padding: 0; }
.sidebar li a, .sidebar li span { display: flex; gap: 8px; padding: 7px 8px; border-radius: 7px; font-size: 14.5px; line-height: 1.35; color: var(--ink); text-decoration: none; }
.sidebar li a:hover { background: var(--warm); }
.sidebar li a[aria-current="page"], .sidebar li a[aria-current="page"] span { background: var(--ink); color: #fff; }
.sidebar li > span { color: var(--muted); }
.sidebar .num { flex: none; width: 36px; font-variant-numeric: tabular-nums; color: inherit; opacity: .7; }
.sidebar .test-link { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }

/* ---------- Page ---------- */
.page { width: 100%; max-width: calc(var(--text) + var(--gap) + var(--margin) + 80px); padding: 40px 40px 80px; margin: 0 auto; }
/* Topic pages use the full width beside the sidebar (FOUNDATION T2, revised Nov 2026). */
.page.wide-page { container: page / inline-size; max-width: calc(var(--content) + 96px); padding: 34px 48px 80px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--orange); text-decoration: none; }
.topic-header h1 { margin-top: 8px; font-size: 34px; line-height: 1.15; letter-spacing: -.02em; }
.topic-header h1 .tnum { color: var(--muted); font-weight: 600; margin-right: 10px; }
.big-idea { margin-top: 14px; max-width: var(--text); font-size: 21px; line-height: 1.45; font-weight: 600; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 14px; color: var(--muted); font-size: 14.5px; }
.modes { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.mode { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 7px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); font-size: 12.5px; font-weight: 600; color: var(--ink); }
.mode svg { width: 14px; height: 14px; }
.standin-note { display: inline-block; margin-top: 12px; padding: 3px 12px; border-radius: 99px; background: var(--warm); color: var(--muted); font-size: 13px; }

/* ---------- Words to know ---------- */
.lesson-start { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(250px, 1fr); gap: 20px; margin-top: 26px; align-items: stretch; }
.vocab { padding: 20px 22px; border-radius: var(--radius); background: var(--soft); }
.vocab h2 { font-size: 18px; margin-bottom: 12px; }
.vocab dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px 28px; }
.vocab dt { font-weight: 700; }
.vocab dd { margin: 2px 0 0; color: #2c333a; font-size: 15.5px; line-height: 1.5; }
.vocab .item { display: block; }
.vocab .review { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(49,87,200,.2); font-size: 15px; }
.vocab .review .label { margin-right: 6px; }
.vocab .review button.term { margin-right: 4px; }

.objectives { padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.objectives h2 { font-size: 18px; margin-bottom: 8px; }
.objectives ul { padding-left: 22px; }
.objectives li { margin: 4px 0; }

/* Term in the reading (V3) */
button.term { padding: 0; border: 0; background: none; font-weight: 650; color: inherit; text-decoration: underline dotted var(--cobalt) 1.5px; text-underline-offset: 3px; cursor: help; }
button.term:hover { color: var(--cobalt); }
.term-missing { background: var(--bad-soft); }
.term-pop { position: absolute; z-index: 40; width: 300px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: 0 10px 30px rgba(0,0,0,.14); font-size: 15px; line-height: 1.5; }
.term-pop strong { display: block; margin-bottom: 2px; }
.term-pop a { display: inline-block; margin-top: 6px; font-size: 14px; }

/* ---------- Sections and blocks ---------- */
.section { margin-top: 44px; padding-top: 34px; border-top: 1px solid var(--line); }
.section-head h2 { max-width: var(--text); font-size: 24px; line-height: 1.25; letter-spacing: -.01em; }
.section-head .intro { max-width: var(--text); margin-top: 6px; color: var(--muted); }
.section-body { display: grid; gap: 30px; margin-top: 20px; }
.sec-num { display: none; }
/* Card section style (default): each section is its own soft panel with a number, so starts and ends show when skimming. */
.sections-card .section { margin-top: 26px; padding: 28px 32px 32px; border: 1px solid #e3e3df; border-radius: 14px; background: var(--card); box-shadow: 0 1px 3px rgba(23,27,31,.04); }
.sections-card .lesson-start + .section { margin-top: 40px; }
.sections-card .section-head { display: flex; gap: 14px; align-items: flex-start; }
.sections-card .sec-num { display: grid; place-items: center; flex: none; width: 32px; height: 32px; margin-top: -1px; border-radius: 50%; background: var(--soft); color: var(--cobalt); font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sections-card .section-body { margin-top: 22px; }
.sections-card .check { margin-top: 48px; }
.blk { min-width: 0; }
/* Rows: text beside its media; callouts under the text, or beside it when there is no media. */
.row { min-width: 0; }
.col { display: grid; gap: 18px; align-content: start; min-width: 0; }
.row-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 40px; align-items: start; }
.row-note { display: grid; grid-template-columns: minmax(0, 800px) minmax(250px, 400px); gap: 40px; align-items: start; }
.row-note .col-read, .row-text .col-read { max-width: 800px; }
.row-media .col-read { max-width: none; }
.row-gallery { display: grid; gap: 28px; align-items: start; }
.row-gallery.n1 { max-width: 760px; }
.row-gallery.n1:has(> .blk > .quick-check) { max-width: none; }
.row-gallery.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row-callouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 420px)); gap: 18px; }
.text p + p, .text p + ul, .text ul + p { margin-top: 12px; }
.text ul, .text ol { padding-left: 22px; }
.text li { margin: 4px 0; }
figure.fig { display: grid; gap: 8px; }
figure.fig figcaption, .caption { font-size: 14.5px; color: var(--muted); }
.fig-row { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 14px; }
.fig-row figure { display: grid; gap: 6px; }
.fig-row figcaption strong { color: var(--ink); }
.card { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.card h3 { font-size: 17px; margin-bottom: 6px; }
.card.warm { background: var(--warm); border-color: transparent; }

/* Callouts (T6) */
.callout { padding: 14px 16px; border-radius: var(--radius); font-size: 15px; line-height: 1.5; border: 1px solid transparent; }
.callout .label { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; color: var(--ink); }
.callout.try { background: var(--warm); }
.callout.consider { background: var(--soft); }
.callout.onset { background: var(--card); border-color: var(--line); border-left: 4px solid var(--ink); }
.callout.mistake { background: var(--bad-soft); border-left: 4px solid var(--bad); }
.callout.history { background: var(--card); border-color: var(--line); border-left: 4px solid var(--orange); }
.callout.history .label { color: var(--orange); }

/* ---------- Media ---------- */
.monitor { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: var(--screen); border: 6px solid var(--screen); box-shadow: 0 6px 22px rgba(0,0,0,.12); }
.monitor video, .monitor > img, .monitor .layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.monitor .pill { position: absolute; z-index: 5; top: 10px; left: 10px; padding: 3px 10px; border-radius: 99px; background: rgba(14,17,20,.78); color: #fff; font-size: 12.5px; font-weight: 600; }
.monitor .badge, .crop .badge { position: absolute; z-index: 5; top: 10px; right: 10px; padding: 3px 10px; border-radius: 99px; background: var(--cobalt); color: #fff; font-size: 12.5px; font-weight: 600; }
.monitor.is-seeking video { opacity: .55; }
.standin-tag { position: absolute; z-index: 6; bottom: 8px; right: 8px; padding: 2px 8px; border-radius: 6px; background: rgba(255,210,74,.92); color: #3a2c00; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
.crop { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: var(--screen); }
.crop img { position: absolute; max-width: none; height: auto; pointer-events: none; user-select: none; }
.still { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: var(--screen); }
.camera-frame-guide { position: absolute; display: block; border: 2px solid #69abff; box-shadow: 0 0 0 1px #1a3a75; pointer-events: none; }
.still video { width: 100%; height: 100%; object-fit: cover; display: block; }
.illus { display: block; width: 100%; height: auto; border-radius: 8px; background: #eef0ee; }
/* Media still to come: a compact strip, not a full-size box (FOUNDATION M2). */
.placeholder { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 96px; padding: 14px 18px 14px 58px; border: 1.5px dashed #c3c5c2; border-radius: var(--radius); color: var(--muted); font-size: 14px; line-height: 1.45;
  background: repeating-linear-gradient(135deg, #f6f4ef 0 12px, #f1eee7 12px 24px); }
.placeholder::before { content: ''; position: absolute; left: 18px; top: 50%; width: 26px; height: 20px; margin-top: -10px; border: 2px solid #9aa0a4; border-radius: 4px; }
.placeholder::after { content: ''; position: absolute; left: 27px; top: 50%; margin-top: -5px; border-left: 9px solid #9aa0a4; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.fig-row .placeholder, .pair .placeholder, .still .placeholder, .monitor .placeholder { aspect-ratio: 16 / 9; min-height: 0; }
.placeholder strong { color: var(--ink); font-size: 15px; }
.placeholder strong::after { content: ' · coming soon'; font-weight: 500; color: var(--muted); }
.placeholder code { font-size: 12.5px; color: var(--muted); }
.placeholder.small { padding: 10px 12px 10px 52px; font-size: 13px; gap: 3px; min-height: 0; }
.placeholder.small strong { font-size: 13.5px; }

/* Player controls */
.player { display: grid; gap: 10px; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.controls .time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; min-width: 92px; }
.progress { position: relative; height: 8px; border-radius: 99px; background: #e4e5e3; cursor: pointer; }
.progress .fill { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--cobalt); width: 0; }
.progress .mark { position: absolute; top: -4px; width: 3px; height: 16px; border-radius: 2px; background: var(--orange); transform: translateX(-1px); }
.seq-progress { display: flex; gap: 3px; height: 6px; }
.seq-progress span { position: relative; overflow: hidden; border-radius: 99px; background: #e4e5e3; }
.seq-progress i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--cobalt); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 36px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); font-size: 14px; font-weight: 600; cursor: pointer; }
.chip[aria-pressed="true"], .chip.selected { border-color: var(--cobalt); background: var(--soft); color: var(--cobalt); }
.chip.found::after { content: ' ✓'; color: var(--good); }
.prompt { padding: 14px 16px; border-radius: var(--radius); background: var(--ink); color: #fff; }
.prompt p { margin-bottom: 10px; font-weight: 600; }
.prompt .button { min-height: 38px; }
.note { padding: 12px 14px; border-radius: 8px; background: var(--warm); font-size: 15px; }
.debug-panel { padding: 8px 10px; border: 1px dashed #b9bcb9; border-radius: 6px; background: var(--warm); font: 12px/1.5 ui-monospace, Menlo, monospace; }

/* Two-column tool layout */
.stage { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); gap: 28px; align-items: start; }
.panel { display: grid; gap: 14px; }
.checks { list-style: none; padding: 0; display: grid; gap: 6px; font-size: 15px; }
.checks li::before { content: '○'; display: inline-block; width: 22px; color: var(--muted); }
.checks li.ok::before { content: '✓'; color: var(--good); font-weight: 700; }
.checks li.no::before { content: '✕'; color: var(--bad); font-weight: 700; }

/* Sliders (trim / cut) */
.slider-row { display: grid; gap: 4px; }
.slider-row label { display: flex; justify-content: space-between; font-size: 14.5px; font-weight: 600; }
.slider-row output { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 500; }
.range-wrap { position: relative; }
input[type="range"] { width: 100%; accent-color: var(--cobalt); height: 28px; }
.hint-tick { position: absolute; top: 0; width: 4px; height: 28px; background: var(--hint); border-radius: 2px; transform: translateX(-2px); pointer-events: none; }
.trim-timeline { position: relative; height: 12px; border-radius: 99px; background: #e4e5e3; }
.trim-timeline .kept { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: var(--cobalt); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Feedback */
.feedback { padding: 12px 14px; border-radius: 8px; font-size: 15.5px; }
.feedback.good { background: var(--good-soft); color: #154e33; }
.feedback.bad { background: var(--bad-soft); color: #6f2c1b; }
.feedback:empty { display: none; }
.hint-line { font-size: 14.5px; color: var(--muted); }
.brief .quote { margin: 8px 0 14px; font-size: 20px; line-height: 1.4; font-weight: 600; }
.dots { display: flex; gap: 6px; }
.dots span { width: 26px; height: 6px; border-radius: 99px; background: #e4e5e3; }
.dots span.done { background: var(--good); }
.dots span.current { background: var(--cobalt); }

/* ---------- Check yourself (T7) ---------- */
.check { margin-top: 44px; padding-top: 34px; border-top: 1px solid var(--line); }
.check > h2 { font-size: 24px; }
.remember h2 { font-size: 18px; }
.check > .intro { margin-top: 6px; color: var(--muted); }
.quiz { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, 1fr); gap: 22px; margin-top: 18px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); align-items: start; }
.quiz.no-media { grid-template-columns: minmax(0, 720px); }
.quiz .q { font-size: 18px; font-weight: 600; line-height: 1.4; margin: 6px 0 14px; }
.quiz .answers { display: grid; gap: 8px; }
.quiz .answers .button { justify-content: flex-start; text-align: left; font-weight: 500; }
.quiz .feedback { margin-top: 12px; }
.quiz .next { margin-top: 12px; }
.quiz-score { margin-top: 18px; padding: 28px; text-align: center; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.quiz-score .big { font-size: 40px; font-weight: 800; }
.quiz-score .actions { justify-content: center; margin-top: 14px; }
.quick-check { container-type: inline-size; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.qc-grid { display: grid; gap: 12px; }
@container (min-width: 700px) { .qc-grid:not(.no-media) { grid-template-columns: minmax(0, 1.1fr) minmax(260px, 1fr); gap: 22px; align-items: start; } }
.quick-check .q { font-weight: 600; margin: 4px 0 10px; }
.quick-check .answers { display: grid; gap: 8px; }
.quick-check .answers .button { justify-content: flex-start; text-align: left; font-weight: 500; }
.quick-check .feedback { margin-top: 10px; }

/* Remember, real camera, next */
.lesson-end { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 48px; align-items: stretch; }
.remember { padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.remember ul { margin-top: 8px; padding-left: 22px; }
.remember li { margin: 6px 0; }
.real-camera > .card { height: 100%; padding: 20px 22px; }
.real-camera h3 { font-size: 18px; }
.next-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); }

/* ---------- Home, part, glossary ---------- */
.home-hero h1 { font-size: 40px; line-height: 1.1; letter-spacing: -.02em; margin-top: 8px; }
.home-hero p { margin-top: 12px; max-width: 680px; font-size: 18px; color: var(--muted); }
.how { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 26px; max-width: 980px; }
.how .card { padding: 14px 16px; font-size: 15px; }
.parts { display: grid; gap: 12px; margin-top: 34px; max-width: 980px; }
.part-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.part-card summary { display: flex; align-items: center; gap: 14px; padding: 16px 20px; cursor: pointer; list-style: none; }
.part-card summary::-webkit-details-marker { display: none; }
.part-card .pnum { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--warm); font-weight: 800; }
.part-card.ready .pnum { background: var(--cobalt); color: #fff; }
.part-card .ptitle { font-size: 18px; font-weight: 700; }
.part-card .pmeta { color: var(--muted); font-size: 14px; }
.part-card .status { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--muted); }
.part-card.ready .status { color: var(--good); }
.topic-list { list-style: none; padding: 0 20px 16px; display: grid; gap: 2px; }
.topic-list li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 7px; }
.topic-list li a { font-weight: 600; text-decoration: none; }
.topic-list li a:hover { text-decoration: underline; }
.topic-list li .tn { color: var(--muted); font-variant-numeric: tabular-nums; }
.topic-list li.soon { color: #9aa0a4; }
.topic-list .modes .mode { font-size: 11.5px; }
.topic-list li.soon .mode { opacity: .55; }
.part-intro { margin-top: 12px; max-width: 680px; font-size: 18px; color: var(--muted); }
.wide-page .part-tools { max-width: none; }
.part-main { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 20px; margin-top: 20px; align-items: start; }
.part-topics h2 { padding: 16px 28px 4px; font-size: 18px; }
.part-story { padding: 20px 22px; }
.part-words { margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--line); }
.part-words h2 { font-size: 22px; }
.word-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px 32px; margin: 16px 0 0; }
.word-grid dt { font-weight: 700; }
.word-grid dd { margin: 2px 0 0; color: #2c333a; font-size: 15.5px; line-height: 1.5; }
.review-grid { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(0, 1.6fr); gap: 40px; align-items: start; }
.review-grid .section { margin-top: 30px; }
.glossary-filter { margin-top: 22px; width: 100%; max-width: 420px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.glossary { margin-top: 22px; max-width: 820px; display: grid; gap: 4px; }
.glossary .g { display: grid; grid-template-columns: 220px 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.glossary .g strong { font-size: 16.5px; }
.glossary .g small { display: block; color: var(--muted); }

/* ---------- Part 6 interactives ---------- */
.map-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 18px; align-items: start; }
.cam-map { width: 100%; height: auto; background: #f4f5f3; border-radius: var(--radius); border: 1px solid var(--line); }
.cam-map .cam { cursor: pointer; }
.cam-map .cam:focus-visible { outline: none; }
.cam-map .cam:focus-visible circle.ring { stroke: var(--cobalt); stroke-width: 4; }
.stop-frame { position: relative; }
.sequence-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.sequence-list li { display: grid; grid-template-columns: 28px 120px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.sequence-list li.ok { border-color: var(--good); background: var(--good-soft); }
.sequence-list .n { font-weight: 800; text-align: center; }
.sequence-list .still { border-radius: 6px; }
.sequence-list .moves { display: flex; gap: 4px; }
.spot-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.spot-pair .hit { position: absolute; cursor: pointer; padding: 0; border: 2px dashed #fff; border-radius: 6px; background: transparent; box-shadow: 0 0 2px 1px #171b1f; }
.spot-pair .hit:hover, .spot-pair .hit:focus-visible { border-style: solid; }
.spot-pair .hit.found { border: 3px solid #8ce4ac; }
.spot-pair .hit.miss { border: 3px solid #ffaba1; }

/* ---------- Think first (hook) ---------- */
.hook { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, 1fr); gap: 28px; margin-top: 24px; padding: 22px; border-radius: var(--radius); background: var(--ink); color: #fff; align-items: start; }
.hook .label { color: var(--hint); }
.hook .q { font-size: 19px; font-weight: 700; line-height: 1.4; margin: 6px 0 14px; }
.hook .answers { display: grid; gap: 8px; }
.hook .answers .button { justify-content: flex-start; text-align: left; font-weight: 500; background: #23282d; border-color: #3a4046; color: #fff; }
.hook .answers .button.selected { background: #fff; color: var(--ink); border-color: #fff; opacity: 1; }
.hook .answers .button.bad { background: #3a2a24; border-color: #a8442a; color: #fff; opacity: 1; }
.hook .answers .button:disabled:not(.selected):not(.bad) { opacity: .45; }
.hook-reveal { margin-top: 14px; padding: 14px 16px; border-radius: 8px; background: #23282d; font-size: 15.5px; }
.hook-reveal .button { margin-top: 10px; }
.hook .monitor { border-color: #000; box-shadow: none; }
.hook .hint-line, .hook .caption { color: #c9ccd0; }
.hook .player .button.primary { background: #fff; color: var(--ink); border-color: #fff; }
.notes-link { font-size: 14px; font-weight: 600; text-decoration: none; }
.notes-link::before { content: '⎙ '; }

/* ---------- Predict, practice blocks ---------- */
.predict { padding: 14px 16px; border-radius: var(--radius); background: var(--soft); }
.predict .q { font-weight: 600; margin: 4px 0 10px; }
.predict .answers { display: grid; gap: 6px; }
.predict .answers .button { justify-content: flex-start; text-align: left; min-height: 38px; font-weight: 500; font-size: 15px; }
.predict .feedback { margin-top: 8px; }
.practice-card .q { font-size: 18px; font-weight: 600; margin: 4px 0 12px; }
.pc-stem { margin-top: 4px; }
.pic-options { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 12px; }
.pic-option { display: grid; gap: 6px; padding: 8px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--card); cursor: pointer; text-align: center; font-size: 14.5px; font-weight: 600; }
.pic-option:hover { border-color: #9aa0a4; }
.pic-option.good { border-color: var(--good); background: var(--good-soft); }
.pic-option.bad { border-color: var(--bad); background: var(--bad-soft); opacity: .8; }
.pic-option:disabled { cursor: default; }
.practice-card .feedback { margin-top: 12px; }
.pc-layout { display: grid; grid-template-columns: minmax(240px, .8fr) minmax(0, 1.7fr); gap: 32px; align-items: start; }
.pc-layout.no-stem { grid-template-columns: minmax(0, 1fr); }
.pc-answer > .button { margin-top: 12px; }
.shot-bank { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.shot-card { display: grid; gap: 4px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); text-align: left; font-size: 13px; cursor: pointer; }
.shot-card strong { font-size: 14px; }
.shot-card:hover { border-color: var(--cobalt); }
.shot-card.used { opacity: .35; cursor: default; }
.shot-slots { list-style: none; padding: 0; display: grid; gap: 8px; }
.shot-slots li { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px; border: 1.5px solid var(--cobalt); border-radius: 8px; background: var(--card); }
.shot-slots li.empty { border-style: dashed; border-color: #b9bcb9; }
.shot-slots .n { font-weight: 800; width: 56px; }

/* ---------- Part tools, flashcards ---------- */
.part-tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 20px; max-width: 980px; }
.tool-card { display: grid; gap: 4px; text-decoration: none; color: var(--ink); font-size: 14.5px; }
.tool-card strong { font-size: 16.5px; color: var(--cobalt); }
.tool-card:hover { border-color: var(--cobalt); }
.part-tools.home-tools { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); margin-top: 16px; }
.camera-lab-page { max-width: 1220px; }
.camera-lesson-links { margin: 32px 0; }
.camera-lesson-links ul { padding-left: 1.2em; columns: 2 260px; }
.camera-lesson-links li { margin: .4em 0; break-inside: avoid; }
#camera-practice { scroll-margin-top: 72px; }
.camera-plate { position: relative; overflow: hidden; background: #f4f1e9; border-radius: 8px; }
.camera-plate > img { position: absolute; display: block; max-width: none; height: auto; }
.camera-plate-mark { position: absolute; display: grid; place-items: center; transform: translate(-50%,-50%); background: #fff; color: #15191b; border: 2px solid #15191b; border-radius: 100%; width: 1.6em; height: 1.6em; font-size: .9em; font-weight: 800; line-height: 1; }
.camera-hotspot-choices { display: flex; flex-wrap: wrap; align-items: center; gap: .65em; margin-bottom: 12px; }
.camera-hotspot-choices select { font: inherit; padding: .35em; max-width: 100%; }
.side-extra { display: block; padding: 6px 8px; font-size: 14px; text-decoration: none; border-radius: 7px; }
.side-extra:hover { background: var(--warm); }
.flash-wrap { display: grid; gap: 12px; margin-top: 16px; max-width: 720px; }
.flashcard { display: grid; place-items: center; gap: 10px; min-height: 220px; padding: 26px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: 0 8px 24px rgba(0,0,0,.06); cursor: pointer; text-align: center; }
.flashcard .fc-term { font-size: 30px; font-weight: 800; letter-spacing: -.01em; }
.flashcard .fc-def { font-size: 20px; line-height: 1.45; max-width: 520px; }

/* ---------- Guided notes and project sheets (print first) ---------- */
.notes-wrap { max-width: 8.5in; margin: 0 auto; }
.notes-sheet { padding: 30px 40px 40px; background: #fff; margin: 20px 0; }
.notes-sheet + .notes-sheet { break-before: page; page-break-before: always; }
.notes-sheet h1 { font-size: 22px; line-height: 1.2; }
.notes-sheet h2 { margin-top: 18px; font-size: 15px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.notes-big { margin-top: 4px; font-size: 14.5px; font-weight: 600; }
.notes-terms { display: grid; gap: 6px; margin-top: 8px; }
.nt { display: grid; grid-template-columns: 170px 1fr; gap: 12px; align-items: end; font-size: 14px; }
.notes-sheet .lines div, .project .lines div { height: 26px; border-bottom: 1px solid #999; }
.word-bank { margin-top: 8px; padding: 8px 12px; border: 1px dashed #999; border-radius: 6px; font-size: 13.5px; }
.notes-fill { margin-top: 8px; padding-left: 22px; font-size: 14.5px; line-height: 2.1; }
.fill-blank { display: inline-block; min-width: 140px; border-bottom: 1.5px solid var(--ink); }
.notes-sheet .sketch, .titem .sketch { display: grid; grid-template-columns: repeat(auto-fill, minmax(2.2in, 1fr)); gap: 12px; margin-top: 8px; }
.notes-sheet .sketch > div { position: relative; aspect-ratio: 16 / 9; border: 1.5px solid var(--ink); }
.notes-sheet .sketch span { position: absolute; left: 6px; top: 3px; font-size: 11px; font-weight: 700; color: var(--muted); }
.notes-sheet p, .project p { font-size: 14px; margin-top: 6px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; }
.box { flex: none; display: inline-block; width: 16px; height: 16px; margin-top: 3px; border: 1.5px solid var(--ink); border-radius: 3px; }
.check-list { list-style: none; padding: 0; display: grid; gap: 7px; margin-top: 8px; font-size: 14.5px; }
.check-list li { display: flex; gap: 10px; }
.project .text { font-size: 14.5px; margin-top: 8px; }
.plan-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13px; }
.plan-table th, .plan-table td { border: 1px solid #999; padding: 6px 8px; text-align: left; vertical-align: top; }
.plan-table td { height: 34px; }
.plan-table thead th { background: var(--warm); }
.plan-table.rubric td { height: auto; }
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 8px; font-size: 12px; font-weight: 700; }
.board .frame { aspect-ratio: 16 / 9; border: 1.5px solid var(--ink); margin-bottom: 3px; }

/* ---------- Printable test ---------- */
.test-page { max-width: 8.5in; margin: 0 auto; padding: 30px 40px 60px; background: #fff; }
.test-tools { max-width: 8.5in; margin: 20px auto 0; padding: 0 40px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.test-head { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.test-head h1 { font-size: 24px; line-height: 1.2; }
.test-head .who { display: grid; gap: 8px; font-size: 14px; min-width: 2.9in; }
.test-head .who span { display: flex; gap: 6px; }
.test-head .who i { flex: 1; border-bottom: 1px solid var(--ink); }
.test-instr { margin: 12px 0 4px; font-size: 14px; }
.test-section { margin-top: 20px; }
.test-section > h2 { font-size: 16px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.test-section > h2 small { font-weight: 500; color: var(--muted); }
.titem { display: grid; grid-template-columns: 34px 1fr; gap: 6px; padding: 12px 0; border-bottom: 1px solid #eee; break-inside: avoid; page-break-inside: avoid; font-size: 14.5px; line-height: 1.45; }
.titem .n { font-weight: 800; }
.titem .stem { font-weight: 600; margin-bottom: 6px; }
.titem .opts { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.titem .opts.one { grid-template-columns: 1fr; }
.titem .opt { display: flex; gap: 8px; }
.titem .bubble { flex: none; width: 20px; height: 20px; border: 1.5px solid var(--ink); border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.titem .pics { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 2.6in)); gap: 10px; margin: 6px 0 8px; }
.titem .pics figure { display: grid; gap: 3px; font-size: 12.5px; text-align: center; font-weight: 700; }
.titem .pics img, .titem .pics svg { width: 100%; height: auto; border: 1px solid #ccc; border-radius: 4px; display: block; }
.titem .pics:has(.camera-plate) { grid-template-columns: repeat(var(--n, 2), minmax(0, 8cm)); }
.titem .pics .camera-plate img { max-width: none; border: 0; }
.titem .match { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 26px; }
.titem .match div { display: flex; gap: 8px; }
.titem .blank { display: inline-block; min-width: 34px; border-bottom: 1px solid var(--ink); }
.titem .lines div { height: 28px; border-bottom: 1px solid #999; }
.titem .sketch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
.titem .sketch div { aspect-ratio: 16 / 9; border: 1.5px solid var(--ink); }
.titem .tag { font-size: 11px; color: var(--muted); }

/* ---------- Part 3 camera tools (shared/camera.js) ---------- */
.vf { display: grid; gap: 10px; }
.vf-monitor { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: var(--screen); border: 6px solid var(--screen); box-shadow: 0 6px 22px rgba(0,0,0,.14); cursor: grab; touch-action: none; user-select: none; }
.vf-monitor.dragging { cursor: grabbing; }
.vf-monitor > img { position: absolute; max-width: none; height: auto; pointer-events: none; user-select: none; }
.vf-live, .vf-badge { position: absolute; z-index: 4; top: 10px; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; color: #fff; }
.vf-live { left: 10px; background: rgba(14,17,20,.72); display: inline-flex; align-items: center; gap: 6px; }
.vf-live i { width: 8px; height: 8px; border-radius: 50%; background: #e04b3a; animation: vf-blink 1.4s infinite; }
@keyframes vf-blink { 50% { opacity: .2; } }
.vf-badge { right: 10px; background: var(--cobalt); }
.vf-corner { position: absolute; z-index: 3; width: 22px; height: 22px; border: 2px solid rgba(255,255,255,.85); pointer-events: none; }
.vf-corner.tl { left: 12px; top: 40px; border-right: 0; border-bottom: 0; } .vf-corner.tr { right: 12px; top: 40px; border-left: 0; border-bottom: 0; }
.vf-corner.bl { left: 12px; bottom: 12px; border-right: 0; border-top: 0; } .vf-corner.br { right: 12px; bottom: 12px; border-left: 0; border-top: 0; }
.vf-flash { position: absolute; inset: 0; z-index: 6; background: #fff; opacity: 0; pointer-events: none; }
.vf-flash.go { animation: vf-flash .35s ease-out; }
@keyframes vf-flash { from { opacity: .85; } to { opacity: 0; } }
.vf-grid { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.vf-grid i { position: absolute; background: rgba(255,255,255,.75); box-shadow: 0 0 0 1px rgba(0,0,0,.18); }
.vf-grid .v1, .vf-grid .v2 { top: 0; bottom: 0; width: 1px; } .vf-grid .v1 { left: 33.333%; } .vf-grid .v2 { left: 66.667%; }
.vf-grid .h1, .vf-grid .h2 { left: 0; right: 0; height: 1px; } .vf-grid .h1 { top: 33.333%; } .vf-grid .h2 { top: 66.667%; }
.vf-guides { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.vf-hr { position: absolute; top: 0; width: 2px; background: var(--orange); transform: translateX(-1px); }
.vf-hr::before, .vf-hr::after { content: ''; position: absolute; left: -7px; width: 16px; height: 2px; background: inherit; }
.vf-hr::before { top: 0; } .vf-hr::after { bottom: 0; }
.vf-hr b { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); white-space: nowrap; padding: 1px 7px; border-radius: 99px; background: inherit; color: #fff; font-size: 11.5px; }
.vf-hr.ok { background: var(--good); }
.vf-hr.cut { height: auto; width: auto; padding: 2px 8px; border-radius: 0 0 6px 6px; color: #fff; font-size: 11.5px; font-weight: 700; transform: translateX(-50%); }
.vf-hr.cut::before, .vf-hr.cut::after { display: none; }
.vf-power { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--cobalt); box-shadow: 0 0 0 3px #fff; }
.vf-dbg { position: absolute; transform: translate(-4px, -4px); padding-left: 10px; font: 700 10px/1 ui-monospace, Menlo, monospace; color: #ffd24a; }
.vf-dbg::before { content: ''; position: absolute; left: 0; top: 0; width: 8px; height: 8px; border-radius: 50%; background: #ffd24a; }
.vf-zoom { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 10px; align-items: center; }
.vf-zbtn { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; font-size: 22px; line-height: 1; }
.vf-track input { display: block; }
.vf-zones { display: flex; gap: 2px; margin-top: 2px; font-size: 12px; font-weight: 700; color: var(--muted); }
.vf-zones span { padding: 2px 0; text-align: center; border-radius: 4px; background: #eceeec; }
.vf-zones span.on { background: var(--cobalt); color: #fff; }
.vf-zones .plain { flex: 1; background: none; text-align: left; } .vf-zones .plain.end { text-align: right; }
.vf-help { font-size: 14px; color: var(--muted); }
.vf-progress { margin-top: 12px; font-size: 15px; color: var(--muted); }
.vf-progress.done { color: var(--good); }
.vf-map { position: relative; overflow: hidden; border-radius: 8px; cursor: crosshair; touch-action: none; }
.vf-map img { display: block; width: 100%; height: auto; user-select: none; pointer-events: none; }
.vf-map-frame { position: absolute; border: 2px solid #fff; outline: 1px solid var(--cobalt); box-shadow: 0 0 0 999px rgba(0,0,0,.55); pointer-events: none; }
.vf-map-hint { position: absolute; z-index: 2; border: 2px dashed var(--hint); pointer-events: none; }
.vf-presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.vf-preset { display: grid; gap: 1px; min-height: 52px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); cursor: pointer; text-align: left; font-size: 13px; color: var(--muted); }
.vf-preset strong { font-size: 15px; color: var(--ink); }
.vf-preset.seen { background: var(--soft); }
.vf-preset.on { border-color: var(--cobalt); background: var(--cobalt); color: #dfe6fb; }
.vf-preset.on strong { color: #fff; }
.vf-info h3 { font-size: 18px; margin: 2px 0 4px; }
.lead-bar { display: flex; height: 34px; border-radius: 8px; overflow: hidden; font-size: 12.5px; font-weight: 700; }
.lead-bar span { display: flex; align-items: center; justify-content: center; min-width: 0; white-space: nowrap; overflow: hidden; }
.lead-bar .front { background: var(--cobalt); color: #fff; } .lead-bar .back { background: #e4e0d6; color: var(--muted); }
.film-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; margin-top: 12px; }
.film-strip .slot { position: relative; aspect-ratio: 16 / 9; overflow: hidden; display: grid; place-items: center; border: 1.5px dashed #c3c5c2; border-radius: 6px; background: var(--warm); }
.film-strip .slot.current { border: 2px solid var(--cobalt); }
.film-strip .slot.filled { border-style: solid; border-color: var(--line); }
.film-strip .slot-crop { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.film-strip .slot-num { font-weight: 800; color: var(--muted); }
.film-strip .slot-tag { position: absolute; left: 4px; bottom: 4px; padding: 1px 6px; border-radius: 4px; background: rgba(14,17,20,.8); color: #fff; font-size: 11px; font-weight: 700; }
.brief { display: grid; gap: 12px; }
.brief .quote { margin: 0; }
.brief .take { width: 100%; }
.demo-stage { position: relative; }
.slider-ends { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.demo-note h3 { font-size: 18px; margin: 2px 0 6px; }
.hot-pic { position: relative; }
.hot-dot { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: var(--cobalt); color: #fff; font-size: 14px; font-weight: 800; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.hot-dot.seen { background: #6a83cf; }
.hot-dot.on { background: var(--orange); }
.flip-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; }
.flip-strip button { padding: 2px; border: 2px solid transparent; border-radius: 6px; background: var(--card); cursor: pointer; }
.flip-strip button.on { border-color: var(--cobalt); }
.fps-box { display: grid; gap: 10px; padding: 14px 16px; border-radius: var(--radius); background: var(--screen); }
.fps-lane { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; color: #fff; font-size: 14px; }
.fps-track { position: relative; height: 30px; border-radius: 99px; background: #23282d; }
.fps-ball { position: absolute; top: 3px; left: 0; width: 24px; height: 24px; margin-left: 3px; border-radius: 50%; background: var(--hint); transform: translateX(-0%); }
.fps-track .fps-ball { left: 0; }
.sort-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 4px; }
.sort-card { display: grid; gap: 8px; align-content: space-between; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); font-size: 15px; }
.sort-card.done { border-color: var(--good); background: var(--good-soft); }
.sort-result { font-size: 14px; color: #154e33; }
.practice-card .q + .sort-items { margin-top: 0; }
.mini-diagram { margin-top: 10px; } .mini-diagram svg { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }

/* ---------- Narrower screens (FOUNDATION B2, T2) ---------- */
@media (max-width: 1180px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 30; top: 56px; left: 0; width: 290px; box-shadow: 8px 0 30px rgba(0,0,0,.12); transform: translateX(-105%); transition: transform .2s; background: var(--paper); }
  .sidebar.open { transform: none; }
  .topbar .sidebar-toggle { display: inline-flex; }
  .page, .page.wide-page { padding: 30px 28px 70px; }
}
/* Topic content narrower than this: one column, in reading order. */
@container page (max-width: 860px) {
  .lesson-start, .row-split, .row-note, .row-gallery.n2, .pc-layout, .part-main, .review-grid { grid-template-columns: minmax(0, 1fr); }
  .row-split, .row-note { gap: 22px; }
  .sections-card .section { padding: 22px 20px 24px; }
}
@media (max-width: 900px) {
  .stage, .map-wrap, .quiz, .hook { grid-template-columns: minmax(0, 1fr); }
  .part-tools { grid-template-columns: 1fr 1fr; }
  .how { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------- Print (FOUNDATION D, P4) ---------- */
.print-only { display: none; }
.hook-audio { margin: 10px 0 0; min-width: 0; }
.hook-audio audio { display: block; max-width: 100%; width: 100%; }
.hook-audio figcaption { margin-top: 4px; font-size: 13px; color: inherit; }
@media print {
  @page { size: letter; margin: 0.6in; }
  body { background: #fff; font-size: 11.5pt; }
  .topbar, .sidebar, .next-nav, .test-tools, .no-print, .check, .controls, .chips, .actions, .prompt { display: none !important; }
  .layout { display: block; }
  .page, .test-page { max-width: none; padding: 0; }
  .print-only { display: block; }
  .section-body, .row, .col, .lesson-start, .lesson-end, .pc-layout, .qc-grid { display: block; }
  .section, .sections-card .section { border: 0; padding: 0; box-shadow: none; }
  .blk { margin-top: 12px; break-inside: avoid; }
  .blk.interactive > *:not(.print-only) { display: none !important; }
  .vocab, .callout, .card { break-inside: avoid; }
  .test-page .standin-tag { display: none; }
  .notes-sheet { margin: 0; padding: 0; font-size: 10.5pt; }
  .notes-sheet h2 { margin-top: 9px; }
  .notes-sheet .test-head .who { min-width: 2in; gap: 5px; }
  .notes-sheet .notes-terms { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; }
  .notes-sheet .nt { display: block; }
  .notes-sheet .lines div { height: 18px; }
  .notes-sheet .nt .lines div + div { display: none; }
  .notes-fill { line-height: 1.65; }
  .notes-sheet .sketch[data-frames="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .notes-sheet .sketch > div { aspect-ratio: 16 / 7; max-height: 90px; }
  .page-break { break-before: page; page-break-before: always; }
  .hook { display: none !important; }
  a { color: inherit; text-decoration: none; }
}

/* ---------- Plain topic style (Nov 2026) ----------
   Topic pages read as page flow: no section cards, no boxes inside boxes, dark kept for screens.
   Only things students act on (quizzes, practice, tools) keep a box. Overrides the rules above. */
:root { --radius: 6px; }
.button { border-radius: 6px; }
.still { border-radius: 4px; }

/* Header: tags are plain text. */
.sections-card .modes { gap: 14px; }
.sections-card .mode { padding: 0; border: 0; background: none; font-weight: 500; color: var(--muted); font-size: 14px; }
.sections-card .standin-note { padding: 0; background: none; }

/* Opening question: light, with rules above and below. */
.hook { padding: 26px 0; border-radius: 0; background: none; color: var(--ink); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); gap: 36px; }
.hook .label { color: var(--orange); }
.hook .q { font-size: 21px; }
.hook .answers .button { background: var(--card); border-color: var(--line); color: var(--ink); }
.hook .answers .button:hover { border-color: #9aa0a4; }
.hook .answers .button.selected { background: var(--soft); border-color: var(--cobalt); color: var(--cobalt); }
.hook .answers .button.good { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.hook .answers .button.bad { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.hook-reveal { padding: 2px 0 2px 16px; border-radius: 0; border-left: 3px solid var(--ink); background: none; }
.hook .hint-line, .hook .caption { color: var(--muted); }
.hook .player .button.primary { background: var(--cobalt); color: #fff; border-color: var(--cobalt); }

/* Words to know and goals: plain lists. */
.sections-card .lesson-start { gap: 48px; margin-top: 30px; }
.sections-card .vocab, .sections-card .objectives { padding: 0; border: 0; border-radius: 0; background: none; }
.sections-card .vocab h2, .sections-card .objectives h2 { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* Sections: separated by a rule; the number is plain text. */
.sections-card .section { margin-top: 52px; padding: 36px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; }
.sections-card .lesson-start + .section { margin-top: 44px; }
.sections-card .section-head { gap: 12px; align-items: baseline; }
.sections-card .sec-num { display: block; width: auto; height: auto; margin: 0; border-radius: 0; background: none; color: var(--muted); font-size: 28px; font-weight: 600; line-height: 1.2; }
.sections-card .section-head h2 { font-size: 28px; line-height: 1.2; letter-spacing: -.015em; }
.sections-card .section-head .intro { margin-top: 8px; }
.sections-card .check { margin-top: 52px; }
.sections-card .check > h2 { font-size: 28px; letter-spacing: -.015em; }

/* Side cards and notes: no box in the page flow. Practice cards stay boxed. */
.sections-card .card:not(.practice-card), .sections-card .practice-card:has(.pic-options) { padding: 0; border: 0; border-radius: 0; background: none; }
.sections-card .card.warm { padding: 2px 0 2px 18px; border-left: 3px solid var(--orange); background: none; }
.sections-card .callout { padding: 2px 0 2px 16px; border: 0; border-left: 3px solid var(--line); border-radius: 0; background: none; }
.sections-card .callout.try { border-left-color: var(--orange); }
.sections-card .callout.consider { border-left-color: var(--cobalt); }
.sections-card .callout.onset { border-left-color: var(--ink); }
.sections-card .callout.mistake { border-left-color: var(--bad); }
.sections-card .callout.history { border-left-color: var(--orange); }
.sections-card .remember { padding: 0; border: 0; border-radius: 0; background: none; }
.sections-card .pic-option { padding: 0 0 8px; border-width: 1px; overflow: hidden; }
.sections-card .pic-option .still { border-radius: 0; }
@media print { .hook { display: none !important; } }

/* Plain style, continued: home and part pages. */
.topic-list .mode, .how .mode { padding: 0; border: 0; background: none; font-weight: 500; color: var(--muted); }
.topic-list .modes { gap: 12px; }
.how { gap: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.how .card { padding: 0; border: 0; border-radius: 0; background: none; }
.how .card .mode { font-size: 14px; font-weight: 700; color: var(--ink); }
.parts { gap: 0; margin-top: 30px; }
.part-card { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; }
.part-card summary { padding: 20px 0 8px; align-items: baseline; }
.part-card .pnum, .part-card.ready .pnum { width: 36px; height: auto; display: block; border-radius: 0; background: none; color: var(--muted); font-size: 24px; font-weight: 600; }
.part-card .ptitle { font-size: 22px; letter-spacing: -.01em; }
.part-card > a.button.small { min-height: 0; margin: 0 0 8px 50px; padding: 0; border: 0; background: none; color: var(--cobalt); font-size: 14.5px; }
.part-card > a.button.small:hover { text-decoration: underline; }
.topic-list { padding: 0 0 22px 42px; }
.part-tools { gap: 28px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.tool-card.card { padding: 0; border: 0; border-radius: 0; background: none; }
.tool-card:hover strong { text-decoration: underline; }
.part-main { gap: 48px; margin-top: 30px; }
.part-topics h2 { padding: 20px 0 10px; font-size: 22px; }
.part-topics .topic-list { padding-left: 0; }
.card.warm.part-story { margin-top: 20px; padding: 2px 0 2px 18px; border: 0; border-left: 3px solid var(--orange); border-radius: 0; background: none; }
