/* course.css — round 39 (owned by the course agent). Loaded after app.css/game.css/hud.css, so rules here override them.

   The course screens: the levels (#/curriculum, views/curriculum.js), a level's
   briefing (#/phase/:id) and the lesson reader (#/lesson/:id, views/lesson.js).

   Reading rules, from the research (research-reports/course-experience.md):
   body text ~65 characters a line at 18px / 1.7, one column; section labels
   small and quiet; figures bold and tabular so a skimmer finds them; every
   block reachable from a sticky outline on desktop; the next step always one
   press away. Blue and white on the navy glass, like the Vault and the Map. */

/* =====================================================================
   The lesson reader
   ===================================================================== */

/* The HUD is a link back to the level briefing. */
a.lsn__hud { color: inherit; text-decoration: none; }
a.lsn__hud:hover { text-decoration: none; box-shadow: 0 0 0 1px rgba(var(--neon-rgb), 0.35); }
a.lsn__hud:focus-visible { outline: 2px solid var(--hu-blue-400); outline-offset: 3px; }

/* Two columns on a wide screen: the reading column and the rail. One column below. */
.lsn { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); align-items: start; }
.lsn__main { display: grid; gap: var(--s-5); min-width: 0; }
.lsn__main > * { min-width: 0; }
.lsn__rail { display: none; }
@media (min-width: 1100px) {
  .lsn { grid-template-columns: minmax(0, 728px) 248px; justify-content: space-between; gap: var(--s-7, 48px); }
  .lsn__rail { display: grid; gap: var(--s-5); position: sticky; top: var(--s-3); max-height: calc(100vh - var(--top-h, 64px) - var(--dock-h, 118px) - 40px); overflow-y: auto; overscroll-behavior: contain; padding: var(--s-4); border-radius: 16px; background: rgba(4, 12, 30, 0.55); border: 1px solid rgba(144, 195, 255, 0.18); scrollbar-width: thin; }
}

/* Header: one calm block. Eyebrow carries "Lesson 2 of 4 in Level 00". */
.lsn__main .view-head { gap: var(--s-2); }
.lsn__main .view-head .crumbs { margin-bottom: var(--s-1); }
.lsn__main .view-head > .label { color: var(--hu-blue-400); letter-spacing: 0.12em; }
.lsn__main .view-head h1 { max-width: 22ch; font-size: clamp(1.9rem, 3.4vw, 2.75rem); line-height: 1.06; text-wrap: balance; }
.lsn__main .point { margin: 0; max-width: 64ch; background: linear-gradient(90deg, rgba(56, 165, 255, 0.10), transparent 80%); border-left-color: var(--hu-blue-400); border-radius: 0 12px 12px 0; }

/* Reading level + facts: the control on the left, the facts trailing it. */
.lsn .lesson__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-4); padding-bottom: var(--s-4); border-bottom: 1px solid rgba(144, 195, 255, 0.14); }
.lsn .level { flex-wrap: wrap; }
.level__hint { font-size: var(--t-xs); color: var(--fg-faint); min-width: 9ch; }
.lesson__facts { display: inline-flex; flex-wrap: wrap; gap: var(--s-2); }
.lesson__facts a.pill { text-decoration: none; }
.lesson__facts a.pill:hover { filter: brightness(1.2); }

/* Sections: a little air above each, and the outline lands them below the top edge. */
.lsn__main > section, .lsn__main > .callout { scroll-margin-top: var(--s-5); }
.lsn .callout { padding: var(--s-5) var(--s-5) var(--s-5) calc(var(--s-5) + 4px); }
.lsn .callout__title { margin: 0 0 var(--s-3); font-family: var(--font-mono); font-size: var(--t-2xs); font-weight: 700; line-height: 1.3; letter-spacing: 0.12em; text-transform: uppercase; }
.lsn .callout .lesson__body { max-width: 64ch; font-size: 1.0625rem; line-height: 1.7; }
.lsn .callout--objective .lesson__body { font-size: var(--t-lg); line-height: 1.5; font-weight: 500; }
.lsn .callout--check { --edge: var(--hu-blue-400); }
.lsn .callout--takeaway { --edge: var(--hu-blue-400); background: linear-gradient(180deg, rgba(56, 165, 255, 0.08), rgba(56, 165, 255, 0.02)); }
.lsn .callout--takeaway .callout__title { color: var(--hu-blue-400); }
.lsn .callout--action { --edge: var(--neon); }

/* The lesson text: the measure, the rhythm, figures that catch the eye. */
.lsn__text .lesson__body { max-width: 65ch; font-size: 1.125rem; line-height: 1.72; }
.lsn__text .lesson__body > p:first-child { font-size: 1.1875rem; color: #fff; }
.lsn__text .lesson__body > p > strong:first-child { color: #fff; }
.lesson__body b.num--q { font-weight: 650; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lesson__body b.num { white-space: nowrap; }
.lsn .table-wrap { max-width: 100%; }

/* The video slot: a frame with a play mark, honest when the video isn't shot yet. */
.lsn .video-slot { display: grid; grid-template-columns: auto 1fr; gap: var(--s-4); align-items: center; padding: var(--s-4) var(--s-5); border-radius: 16px; border: 1px dashed rgba(144, 195, 255, 0.28); background: rgba(4, 12, 30, 0.45); }
.lsn .video-slot:has(iframe) { display: block; padding: 0; border: 0; overflow: hidden; }
.video-slot__play { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid rgba(144, 195, 255, 0.5); position: relative; flex: none; }
.video-slot__play::after { content: ""; position: absolute; left: 19px; top: 15px; border-style: solid; border-width: 9px 0 9px 14px; border-color: transparent transparent transparent rgba(234, 245, 255, 0.85); }
.video-slot.is-soon .video-slot__play { opacity: 0.55; }
.video-slot__text { display: grid; gap: var(--s-2); justify-items: start; min-width: 0; }
.video-slot__text p { margin: 0; font-size: var(--t-sm); line-height: 1.55; }

/* ---- The check: real option cards, clear answers, room between questions ---- */
.check__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-2) var(--s-4); margin-bottom: var(--s-4); }
.check__head .callout__title { margin: 0; }
.check__sub { font-size: var(--t-xs); color: var(--fg-faint); }
.lsn .quiz { gap: var(--s-6); }
.lsn .quiz__attempt { display: grid; gap: var(--s-6); }
.lsn .quiz__q { gap: var(--s-3); padding-top: var(--s-5); border-top: 1px solid rgba(144, 195, 255, 0.12); }
.lsn .quiz__q:first-child { padding-top: 0; border-top: 0; }
.lsn .quiz__prompt { font-size: var(--t-md); font-weight: 600; line-height: 1.45; color: #fff; text-wrap: pretty; }
.lsn .quiz__options { gap: var(--s-2); }
.lsn .quiz__opt { width: 100%; min-height: 48px; align-items: center; padding: var(--s-3) var(--s-4); border-radius: 12px; border: 1px solid rgba(144, 195, 255, 0.22); background: rgba(10, 25, 54, 0.7); color: var(--fg); font: inherit; font-size: var(--t-md); line-height: 1.4; cursor: pointer; transition: border-color 150ms, background 150ms, transform 120ms; }
.lsn .quiz__opt:hover:not([disabled]) { border-color: rgba(56, 165, 255, 0.7); background: rgba(20, 103, 239, 0.16); }
.lsn .quiz__opt:active:not([disabled]) { transform: scale(0.99); }
.lsn .quiz__opt:focus-visible { outline: 2px solid var(--hu-blue-400); outline-offset: 2px; }
.lsn .quiz__key { display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border-radius: 8px; border: 1px solid rgba(144, 195, 255, 0.3); font-weight: 700; color: var(--fg-dim); }
.lsn .quiz__opt.is-correct { border-color: var(--money); background: rgba(var(--money-rgb), 0.12); }
.lsn .quiz__opt.is-correct .quiz__key { border-color: var(--money); background: var(--money); color: #04121f; }
.lsn .quiz__opt.is-wrong { border-color: var(--red); background: rgba(var(--red-rgb), 0.10); }
.lsn .quiz__opt.is-wrong .quiz__key { border-color: var(--red); background: var(--red); color: #fff; }
.lsn .quiz__opt[disabled]:not(.is-correct):not(.is-wrong) { opacity: 0.5; }
.lsn .quiz__feedback { margin: var(--s-1) 0 0; padding: var(--s-3) var(--s-4); border-radius: 12px; font-size: var(--t-sm); line-height: 1.55; animation: lsn-pop 220ms var(--ease-out, ease-out) both; }
.lsn .quiz__foot { padding-top: var(--s-4); border-top: 1px solid rgba(144, 195, 255, 0.12); }
.lsn .quiz__result { font-size: var(--t-sm); color: var(--fg); }
@keyframes lsn-pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---- The finish: one block, one button, the tool, then the outcome ---- */
.finish { display: grid; gap: var(--s-4); padding: var(--s-5); border-radius: 18px; background: linear-gradient(180deg, rgba(20, 103, 239, 0.14), rgba(20, 103, 239, 0.04)); border: 1px solid rgba(144, 195, 255, 0.28); }
.finish__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4); }
.finish__text { display: grid; gap: var(--s-1); min-width: 0; flex: 1 1 260px; }
.finish__note { margin: 0; font-size: var(--t-md); color: #fff; line-height: 1.45; }
.finish .lesson__actions { flex: none; }
.finish__tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); padding-top: var(--s-3); border-top: 1px solid rgba(144, 195, 255, 0.14); }
.finish__tools .label { margin-right: var(--s-1); }

/* The completion moment: calm, adult; a tick, the points, the level, the streak, the next step. */
.lsn .done { gap: var(--s-4); }
.done__head { display: inline-flex; align-items: center; gap: var(--s-3); min-width: 0; }
.done__head > span:last-child { display: grid; gap: 2px; min-width: 0; }
.done__tick { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--hu-blue-600); color: #fff; font-weight: 800; box-shadow: 0 0 0 4px rgba(56, 165, 255, 0.18), var(--hu-glow); animation: lsn-tick 420ms var(--ease-out, ease-out) both; }
.done__title { font-size: var(--t-md); font-weight: 600; color: #fff; overflow-wrap: anywhere; }
.done__go { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); }
@keyframes lsn-tick { from { transform: scale(0.4); opacity: 0; } 60% { transform: scale(1.12); } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .done__tick, .lsn .quiz__feedback { animation: none; } }

/* Prev / next: the next card is the strong one. */
.lsn .lesson__nav { margin-top: var(--s-2); }
.lsn .lesson__nav a { border: 1px solid rgba(144, 195, 255, 0.16); background: rgba(10, 25, 54, 0.55); }
.lsn .lesson__nav a.is-next { border-color: rgba(56, 165, 255, 0.55); background: linear-gradient(180deg, rgba(20, 103, 239, 0.22), rgba(20, 103, 239, 0.08)); }
.lsn .lesson__nav a.is-next .label { color: var(--hu-blue-400); }
.lsn .lesson__nav a:focus-visible { outline: 2px solid var(--hu-blue-400); outline-offset: 2px; }

/* ---- The rail (desktop) ---- */
.rail__where { display: grid; gap: 2px; padding-bottom: var(--s-4); border-bottom: 1px solid rgba(144, 195, 255, 0.14); }
.rail__where strong { font-size: var(--t-lg); font-weight: 700; color: #fff; }
.rail__sub { font-size: var(--t-xs); color: var(--fg-faint); }
.rail__outline { display: grid; gap: var(--s-2); }
.rail__outline ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rail__item { width: 100%; display: grid; grid-template-columns: 2.1em 1fr; gap: var(--s-2); align-items: baseline; padding: 7px 10px; border: 0; border-radius: 8px; background: none; color: var(--fg-dim); font: inherit; font-size: var(--t-sm); line-height: 1.35; text-align: left; cursor: pointer; position: relative; }
.rail__item:hover { background: rgba(144, 195, 255, 0.08); color: #fff; }
.rail__item:focus-visible { outline: 2px solid var(--hu-blue-400); outline-offset: 1px; }
.rail__n { font-family: var(--font-mono); font-size: var(--t-2xs); font-weight: 700; color: var(--fg-faint); font-variant-numeric: tabular-nums; }
.rail__item.is-read { color: var(--fg-faint); }
.rail__item.is-read .rail__n { color: var(--hu-blue-400); }
.rail__item.is-now { background: rgba(20, 103, 239, 0.22); color: #fff; }
.rail__item.is-now::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 2px; border-radius: 2px; background: var(--hu-blue-400); box-shadow: var(--hu-glow); }
.rail__item.is-now .rail__n { color: #fff; }
.rail__tools { display: grid; gap: var(--s-2); justify-items: stretch; }
.rail__tools .btn { justify-content: center; white-space: normal; text-align: center; }
.rail__next { display: grid; gap: 4px; padding: var(--s-3) var(--s-4); border-radius: 12px; border: 1px solid rgba(56, 165, 255, 0.45); background: rgba(20, 103, 239, 0.14); color: #fff; font-size: var(--t-sm); font-weight: 600; line-height: 1.35; text-decoration: none; overflow-wrap: anywhere; }
.rail__next:hover { background: rgba(20, 103, 239, 0.26); text-decoration: none; }
.rail__next .label { color: var(--hu-blue-400); }
.rail__next.is-sealed .label { color: var(--fg-faint); }

/* ---- Phone: the reader is the screen ---- */
@media (max-width: 640px) {
  .lsn__hud { padding: var(--s-2) var(--s-3); gap: var(--s-2) var(--s-3); }
  .lsn__hud .hud__lvl b { font-size: var(--t-lg); }
  .lsn__hud .hud__title { font-size: var(--t-sm); flex: 1 1 auto; min-width: 0; }
  .lsn__main { gap: var(--s-4); }
  .lsn__main .view-head h1 { font-size: 1.85rem; }
  .lsn .callout { padding: var(--s-4) var(--s-4) var(--s-4) calc(var(--s-4) + 4px); }
  .lsn__text .lesson__body { font-size: 1.0625rem; line-height: 1.7; }
  .lsn__text .lesson__body > p:first-child { font-size: 1.125rem; }
  .lsn .callout--objective .lesson__body { font-size: var(--t-md); }
  .lsn .video-slot { grid-template-columns: 1fr; padding: var(--s-4); }
  .video-slot__play { display: none; }
  .finish { padding: var(--s-4); }
  .finish .lesson__actions, .finish .lesson__actions .btn { width: 100%; }
  .finish .lesson__actions .btn { justify-content: center; }
  .done__go .btn { flex: 1 1 100%; justify-content: center; white-space: normal; text-align: center; }
  .lsn .quiz__opt { font-size: var(--t-sm); }
  .level__hint { display: none; }
}

/* =====================================================================
   The levels (#/curriculum)
   ===================================================================== */
ol.lv-cards { list-style: none; margin: 0; padding: 0; }
ol.lv-cards > li { display: grid; min-width: 0; }
.lv-card { position: relative; color: inherit; text-decoration: none; }
.lv-card:hover { text-decoration: none; }
.lv-card:focus-visible { outline: 2px solid var(--hu-blue-400); outline-offset: 3px; }
.lv-card__num { position: absolute; top: var(--s-3); left: var(--s-3); z-index: 1; padding: 4px 8px; border-radius: 8px; background: rgba(4, 12, 30, 0.78); border: 1px solid rgba(144, 195, 255, 0.35); font-size: var(--t-md); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lv-card.is-here { box-shadow: 0 0 0 1.5px var(--hu-blue-400), 0 0 40px -10px rgba(56, 165, 255, 0.6); }
.lv-card.is-here .phase__foot { color: var(--hu-blue-400); }
.lv-card--vault { align-content: start; }

/* "Continue" — the first thing on the page. */
.lv-resume { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-5); border-radius: 18px; border: 1px solid rgba(56, 165, 255, 0.5); background: linear-gradient(90deg, rgba(20, 103, 239, 0.26), rgba(20, 103, 239, 0.06)); color: #fff; text-decoration: none; }
.lv-resume:hover { text-decoration: none; background: linear-gradient(90deg, rgba(20, 103, 239, 0.34), rgba(20, 103, 239, 0.1)); }
.lv-resume:focus-visible { outline: 2px solid var(--hu-blue-400); outline-offset: 3px; }
.lv-resume__lvl { font-size: var(--t-2xl); line-height: 1; padding: 6px 10px; border-radius: 10px; background: rgba(4, 12, 30, 0.6); }
.lv-resume__text { display: grid; gap: 2px; min-width: 0; }
.lv-resume__text strong { font-size: var(--t-lg); font-weight: 650; overflow-wrap: anywhere; }
.lv-resume__count { font-size: var(--t-sm); color: var(--fg-dim); white-space: nowrap; }
.lv-resume.is-done { grid-template-columns: 1fr; }
@media (max-width: 640px) {
  .lv-resume { grid-template-columns: auto 1fr; padding: var(--s-4); gap: var(--s-3) var(--s-3); }
  .lv-resume__count { grid-column: 1 / -1; order: 3; }
  .lv-resume__go { grid-column: 1 / -1; justify-content: center; order: 4; }
  .lv-resume__text strong { font-size: var(--t-md); }
}

/* =====================================================================
   A level's briefing (#/phase/:id)
   ===================================================================== */
.lv-brief { position: relative; overflow: hidden; display: grid; min-height: 380px; border-radius: 18px; border: 1px solid rgba(144, 195, 255, 0.28); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8); isolation: isolate; }
.lv-brief__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.lv-brief::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(4, 12, 30, 0.94) 0%, rgba(4, 12, 30, 0.82) 42%, rgba(4, 12, 30, 0.25) 78%, rgba(4, 12, 30, 0.1)), linear-gradient(0deg, rgba(4, 12, 30, 0.6), transparent 40%); }
.lv-brief__body { display: grid; gap: var(--s-3); align-content: end; justify-items: start; max-width: 620px; padding: var(--s-6); }
.lv-brief .crumbs { margin-bottom: auto; }
.lv-brief__num { font-size: 3.4rem; line-height: 0.9; }
.lv-brief .label { color: rgba(234, 245, 255, 0.8); }
.lv-brief h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.02; letter-spacing: -0.02em; max-width: 16ch; text-wrap: balance; text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5); }
.lv-brief__sub { margin: 0; font-size: var(--t-lg); line-height: 1.45; color: rgba(234, 245, 255, 0.86); max-width: 44ch; }
.lv-brief__progress { display: grid; gap: var(--s-2); width: min(100%, 420px); margin-top: var(--s-2); }
.lv-segs { display: flex; min-width: 0; }
.lv-brief__stats { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); font-size: var(--t-sm); color: rgba(234, 245, 255, 0.78); }
.lv-brief__stats b { color: #fff; font-variant-numeric: tabular-nums; }
.lv-brief__cta { margin-top: var(--s-2); max-width: 100%; }
.lv-brief__cta .btn { white-space: normal; text-align: left; max-width: 100%; }

.lv-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5); align-items: start; }
@media (min-width: 980px) { .lv-grid { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); } .lv-mission { position: sticky; top: var(--s-3); } }
.lv-h { margin: 0 0 var(--s-3); font-size: var(--t-xl); letter-spacing: -0.01em; }
.lv-sub { margin: var(--s-5) 0 var(--s-2); font-size: var(--t-sm); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--fg-dim); }
.lv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.lv-row { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: var(--s-3); align-items: center; padding: var(--s-3) var(--s-4); border-radius: 14px; border: 1px solid rgba(144, 195, 255, 0.14); background: rgba(10, 25, 54, 0.5); color: var(--fg); text-decoration: none; transition: background 150ms, border-color 150ms; }
.lv-row:hover { text-decoration: none; background: rgba(20, 103, 239, 0.14); border-color: rgba(56, 165, 255, 0.45); }
.lv-row:focus-visible { outline: 2px solid var(--hu-blue-400); outline-offset: 2px; }
.lv-row__n { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 10px; border: 1px solid rgba(144, 195, 255, 0.3); font-family: var(--font-mono); font-size: var(--t-sm); font-weight: 700; color: var(--fg-dim); font-variant-numeric: tabular-nums; }
.lv-row__main { display: grid; gap: 4px; min-width: 0; }
.lv-row__title { font-size: var(--t-md); font-weight: 600; line-height: 1.35; color: #fff; overflow-wrap: anywhere; }
.lv-row__meta { display: flex; flex-wrap: wrap; gap: 4px var(--s-3); font-size: var(--t-xs); color: var(--fg-faint); }
.lv-row__meta .is-tool { color: var(--hu-blue-400); }
.lv-row__state { font-size: var(--t-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-faint); white-space: nowrap; }
.lv-row.is-done .lv-row__n { background: var(--hu-blue-600); border-color: var(--hu-blue-600); color: #fff; }
.lv-row.is-done .lv-row__state { color: var(--hu-blue-400); }
.lv-row.is-next { border-color: rgba(56, 165, 255, 0.6); background: linear-gradient(90deg, rgba(20, 103, 239, 0.2), rgba(20, 103, 239, 0.05)); }
.lv-row.is-next .lv-row__n { border-color: var(--hu-blue-400); color: #fff; }
.lv-row.is-next .lv-row__state { color: #fff; }

.lv-mission { display: grid; gap: var(--s-3); }
.lv-mission__goal { margin: 0; font-size: var(--t-lg); font-weight: 600; line-height: 1.4; color: #fff; }
.lv-mission__list .mission { grid-template-columns: auto minmax(0, 1fr) auto; padding: var(--s-3); text-align: left; }
.lv-mission__why { margin: 0; font-size: var(--t-sm); line-height: 1.55; color: var(--fg-dim); }

@media (max-width: 640px) {
  .lv-brief { min-height: 0; grid-template-rows: 180px auto; border-radius: 16px; }
  .lv-brief__img { position: static; grid-row: 1; height: 180px; }
  .lv-brief::before { background: linear-gradient(180deg, transparent 0, transparent 120px, rgba(4, 12, 30, 0.96) 180px); }
  .lv-brief__body { grid-row: 2; padding: var(--s-4); gap: var(--s-2); background: rgba(4, 12, 30, 0.96); }
  .lv-brief .crumbs { position: absolute; top: var(--s-3); left: var(--s-3); padding: 4px 10px; border-radius: 999px; background: rgba(4, 12, 30, 0.7); margin: 0; }
  .lv-brief__num { font-size: 2.4rem; }
  .lv-brief__sub { font-size: var(--t-md); }
  .lv-brief__cta, .lv-brief__cta .btn { width: 100%; justify-content: center; text-align: center; }
  .lv-row { grid-template-columns: 2.6rem minmax(0, 1fr); padding: var(--s-3); }
  .lv-row__n { width: 2.3rem; height: 2.3rem; font-size: var(--t-xs); }
  .lv-row__state { grid-column: 2; justify-self: start; }
  .lv-mission__list .mission { grid-template-columns: auto minmax(0, 1fr); }
  .lv-mission__list .mission__pts { grid-column: 2; }
}

/* ---- Round 39 polish after the first screenshots ---- */
/* Outline numbers count only what the reading level shows. */
.rail__outline ol { counter-reset: rail; }
.rail__outline li { counter-increment: rail; }
.rail__n::before { content: counter(rail, decimal-leading-zero); }
body[data-level="plain"] .rail__outline li.lvl-full { display: none; }
body:not([data-level="deep"]) .rail__outline li.lvl-deep { display: none; }
@media (min-width: 1100px) {
  .lsn__rail { gap: var(--s-4); padding: var(--s-4) var(--s-3); max-height: calc(100vh - var(--top-h, 64px) - var(--dock-h, 118px) - 110px); }
  .rail__where { padding: 0 var(--s-2) var(--s-3); }
  .rail__outline > .label, .rail__tools > .label { padding-inline: var(--s-2); }
  .rail__item { padding: 5px 8px; }
}
.lsn .callout--check .callout__title { color: var(--hu-blue-400); }
/* Quiz footer: the score on its own line, the two actions together under it. */
.lsn .quiz__foot { justify-content: flex-start; gap: var(--s-2) var(--s-3); }
.lsn .quiz__foot .quiz__result { flex: 1 1 100%; }
/* Once the completion card shows, it carries the finish; the row and tool line above it step back. */
.finish:has(.lesson__outcome:not(:empty)) > .finish__row,
.finish:has(.lesson__outcome:not(:empty)) > .finish__tools { display: none; }
.finish:has(.lesson__outcome:not(:empty)) { padding: 0; border: 0; background: none; }
/* Phone HUD: numeral, title and count on one line, the segments under them. */
@media (max-width: 640px) {
  .lsn__hud { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
  .lsn__hud .hud__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lsn__hud .hud__segs { grid-column: 1 / -1; grid-row: 2; }
  .lv-brief__num { display: none; }
}
/* One column (tablet, small laptop): keep the reading column to its measure, centred, instead of stretching the boxes. */
@media (max-width: 1099px) { .lsn__main { width: 100%; max-width: 760px; margin-inline: auto; } }

/* =====================================================================
   Round 39b — the second pass (course lead)
   ===================================================================== */

/* Sections reached by J / K or the outline take focus for screen readers; no ring on a whole block. */
.lsn__main > section:focus { outline: none; }
.lsn__main > section:focus-visible { outline: none; box-shadow: 0 0 0 1px rgba(56, 165, 255, 0.45); }

/* ---- Before you start: goal, time, check, tool, reading level ---- */
.start { display: grid; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-radius: 16px; border: 1px solid rgba(144, 195, 255, 0.2); background: linear-gradient(90deg, rgba(56, 165, 255, 0.10), rgba(4, 12, 30, 0.35) 70%); }
.start__goal { max-width: 62ch; font-size: var(--t-lg); font-weight: 500; line-height: 1.45; color: #fff; text-wrap: pretty; }
.start__goal p { margin: 0; }
.start__goal ol, .start__goal ul { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; font-size: var(--t-md); }
.start__facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-5); }
.start__facts li { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--t-sm); color: var(--fg); min-width: 0; }
.start__facts .label { line-height: 1; }
.start__facts b { font-weight: 650; color: #fff; font-variant-numeric: tabular-nums; }
.start__facts a { color: var(--hu-blue-400); font-weight: 600; text-decoration: none; }
.start__facts a:hover { text-decoration: underline; }
.start__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); padding-top: var(--s-3); border-top: 1px solid rgba(144, 195, 255, 0.14); }
.start__resume { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(56, 165, 255, 0.55); background: rgba(20, 103, 239, 0.18); color: #fff; font: inherit; font-size: var(--t-sm); font-weight: 600; cursor: pointer; text-align: left; }
.start__resume:hover { background: rgba(20, 103, 239, 0.3); }
.start__resume:focus-visible { outline: 2px solid var(--hu-blue-400); outline-offset: 2px; }

/* ---- The warm-up: one question from an earlier lesson ---- */
.warm { display: grid; gap: var(--s-2); padding: var(--s-4) var(--s-5); border-radius: 14px; border: 1px dashed rgba(144, 195, 255, 0.3); background: rgba(4, 12, 30, 0.45); }
.warm__q { margin: 0; font-size: var(--t-md); font-weight: 600; line-height: 1.45; color: #fff; text-wrap: pretty; }
.warm__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-3); }
.warm__how { font-size: var(--t-sm); color: var(--fg-dim); }
.warm__answer { margin: 0; font-size: var(--t-sm); line-height: 1.55; color: var(--fg); animation: lsn-pop 220ms var(--ease-out, ease-out) both; }
.warm__answer a { color: var(--hu-blue-400); font-weight: 600; margin-left: var(--s-1); }

/* ---- Key takeaways: the summary box, recall first ---- */
.summary__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-3); margin-bottom: var(--s-3); }
.summary__head .callout__title { margin: 0; }
.summary .lesson__body ol { display: grid; gap: var(--s-2); }
.summary .lesson__body li::marker { color: var(--hu-blue-400); font-weight: 700; }
.recall { display: grid; gap: var(--s-2); justify-items: start; padding: var(--s-4); margin-bottom: var(--s-3); border-radius: 12px; background: rgba(4, 12, 30, 0.6); border: 1px solid rgba(56, 165, 255, 0.4); }
.recall__ask { margin: 0; font-size: var(--t-md); font-weight: 650; line-height: 1.4; color: #fff; }
.recall__why { margin: 0 0 var(--s-1); font-size: var(--t-sm); color: var(--fg-dim); line-height: 1.5; }
.summary.is-covered .lesson__body { filter: blur(7px); opacity: 0.55; user-select: none; pointer-events: none; max-height: 7.5em; overflow: hidden; }
.summary:not(.is-covered) .lesson__body { animation: lsn-pop 260ms var(--ease-out, ease-out) both; }
.summary .lesson__body [tabindex="-1"]:focus { outline: none; }

/* ---- "Do this now" carries the tool ---- */
.action__tools { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.practice-link { white-space: normal; text-align: left; }

/* ---- Quiz feedback that teaches ---- */
.quiz__prompt { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-3); align-items: baseline; }
.quiz__n { font-family: var(--font-mono); font-size: var(--t-xs); font-weight: 700; color: var(--hu-blue-400); font-variant-numeric: tabular-nums; }
.lsn .quiz__feedback { display: grid; gap: var(--s-2); justify-items: start; border: 1px solid transparent; }
.lsn .quiz__feedback p { margin: 0; }
.lsn .quiz__feedback.is-right { background: rgba(var(--money-rgb), 0.10); border-color: rgba(var(--money-rgb), 0.35); }
.lsn .quiz__feedback.is-wrong { background: rgba(var(--red-rgb), 0.08); border-color: rgba(var(--red-rgb), 0.35); }
.quiz__verdict { font-weight: 750; color: #fff; }
.quiz__feedback q { color: #fff; font-weight: 600; quotes: "“" "”"; }
.quiz__source { padding: 4px 0; border: 0; background: none; color: var(--hu-blue-400); font: inherit; font-size: var(--t-sm); font-weight: 650; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.quiz__source::after { content: " ↑"; text-decoration: none; }
.quiz__source.is-quiet { color: var(--fg-dim); font-weight: 500; }
.quiz__source:focus-visible { outline: 2px solid var(--hu-blue-400); outline-offset: 2px; border-radius: 4px; }
.quiz__review { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.quiz__review:empty { display: none; }
.reflect__body { display: grid; gap: var(--s-2); justify-items: start; }
.reflect__body p { margin: 0; }
/* The passage a "Show me" jump lands on glows for a moment. */
.lesson__body .is-cited { border-radius: 6px; animation: lsn-cite 3.2s var(--ease-out, ease-out) both; }
@keyframes lsn-cite { 0%, 55% { background: rgba(56, 165, 255, 0.24); box-shadow: 0 0 0 6px rgba(56, 165, 255, 0.24); } 100% { background: transparent; box-shadow: 0 0 0 6px transparent; } }
@media (prefers-reduced-motion: reduce) { .lesson__body .is-cited { animation: none; background: rgba(56, 165, 255, 0.2); box-shadow: 0 0 0 6px rgba(56, 165, 255, 0.2); } .warm__answer, .summary .lesson__body { animation: none; } }

/* ---- Completion card + rail keys ---- */
.done__keys, .rail__keys { margin: 0; font-size: var(--t-xs); color: var(--fg-faint); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.done__keys kbd, .rail__keys kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; font: 600 0.72rem/1 var(--font-mono); color: var(--fg-dim); background: rgba(4, 12, 32, 0.7); border: 1px solid rgba(144, 195, 255, 0.22); border-bottom-width: 2px; }
.rail__keys { padding-inline: var(--s-2); }
@media (hover: none) { .done__keys, .rail__keys { display: none; } }
@media (min-width: 1100px) {
  /* Stop above the floating "Ask Craig" pill. */
  .lsn__rail { max-height: calc(100vh - var(--top-h, 64px) - var(--dock-h, 118px) - 150px); }
  .rail__tools .practice-link { justify-content: center; text-align: center; }
}
@media (max-width: 640px) {
  .start { padding: var(--s-4); }
  .start__goal { font-size: var(--t-md); }
  .start__foot { align-items: flex-start; }
  .warm { padding: var(--s-4); }
  .action__tools .btn { flex: 1 1 100%; justify-content: center; text-align: center; }
}

/* ---- The levels as a campaign: one lit path, numbered stops ---- */
.lv-totals { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-1) var(--s-4); margin: 0; font-size: var(--t-sm); color: var(--fg-dim); }
.lv-totals b { color: #fff; font-weight: 650; font-variant-numeric: tabular-nums; }
.lv-totals__note { flex: 1 1 100%; color: var(--fg-faint); font-size: var(--t-xs); }
.lv-path { --node: 44px; list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); position: relative; }
/* The path: a line through the nodes, lit as far as the member has come. */
.lv-stop { position: relative; display: grid; grid-template-columns: var(--node) minmax(0, 1fr); gap: var(--s-4); align-items: center; min-width: 0; }
.lv-stop::before { content: ""; position: absolute; left: calc(var(--node) / 2 - 1px); top: calc(50% + var(--node) / 2); height: calc(100% + var(--s-3) - var(--node)); width: 2px; background: rgba(144, 195, 255, 0.18); }
.lv-stop:last-child::before { display: none; }
.lv-stop.is-done::before { background: linear-gradient(180deg, var(--hu-blue-400), rgba(56, 165, 255, 0.5)); box-shadow: 0 0 10px rgba(56, 165, 255, 0.5); }
.lv-stop__node { position: relative; z-index: 1; display: grid; place-items: center; width: var(--node); height: var(--node); border-radius: 50%; border: 1.5px solid rgba(144, 195, 255, 0.35); background: rgba(4, 12, 30, 0.9); font-family: var(--font-mono); font-size: var(--t-sm); font-weight: 700; color: var(--fg-dim); font-variant-numeric: tabular-nums; }
.lv-stop.is-done .lv-stop__node { background: var(--hu-blue-600); border-color: var(--hu-blue-400); color: #fff; }
.lv-stop.is-here .lv-stop__node { border-color: var(--hu-blue-400); color: #fff; box-shadow: 0 0 0 5px rgba(56, 165, 255, 0.18), var(--hu-glow); }
.lv-stop.is-locked .lv-stop__node { color: var(--fg-faint); border-style: dashed; }
.lv-stop__card { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--s-4); align-items: stretch; padding: var(--s-3); border-radius: 16px; border: 1px solid rgba(144, 195, 255, 0.16); background: rgba(10, 25, 54, 0.6); color: var(--fg); text-decoration: none; min-width: 0; transition: border-color 150ms, background 150ms; }
.lv-stop__card:hover { text-decoration: none; border-color: rgba(56, 165, 255, 0.5); background: rgba(20, 103, 239, 0.14); }
.lv-stop__card:focus-visible { outline: 2px solid var(--hu-blue-400); outline-offset: 3px; }
.lv-stop.is-here .lv-stop__card { border-color: var(--hu-blue-400); background: linear-gradient(90deg, rgba(20, 103, 239, 0.24), rgba(10, 25, 54, 0.6)); box-shadow: 0 0 40px -14px rgba(56, 165, 255, 0.7); }
.lv-stop.is-locked .lv-stop__card { background: rgba(6, 16, 36, 0.55); }
.lv-stop.is-locked .lv-stop__img { filter: grayscale(0.6) brightness(0.72); }
.lv-stop__img { width: 100%; height: 100%; min-height: 112px; max-height: 140px; object-fit: cover; border-radius: 10px; background: rgba(4, 12, 30, 0.8); }
.lv-stop__main { display: grid; gap: 6px; align-content: center; min-width: 0; padding-block: var(--s-1); }
.lv-stop__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2); }
.lv-stop__chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(144, 195, 255, 0.25); font-size: var(--t-2xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-dim); white-space: nowrap; }
.lv-stop__chip--here { border-color: var(--hu-blue-400); color: #fff; background: rgba(20, 103, 239, 0.35); }
.lv-stop__chip--done { border-color: rgba(56, 165, 255, 0.5); color: var(--hu-blue-400); }
.lv-stop__lock { width: 9px; height: 11px; position: relative; }
.lv-stop__lock::before { content: ""; position: absolute; left: 1px; right: 1px; top: 0; height: 6px; border: 1.5px solid currentColor; border-bottom: 0; border-radius: 4px 4px 0 0; }
.lv-stop__lock::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; border-radius: 1.5px; background: currentColor; }
.lv-stop__title { font-size: var(--t-xl); font-weight: 700; line-height: 1.15; color: #fff; letter-spacing: -0.01em; text-wrap: balance; }
.lv-stop__sub { font-size: var(--t-sm); line-height: 1.45; color: var(--fg-dim); text-wrap: pretty; }
.lv-stop__facts { display: flex; flex-wrap: wrap; gap: 2px var(--s-3); font-size: var(--t-xs); color: var(--fg-faint); }
.lv-stop__facts span + span::before { content: "·"; margin-right: var(--s-3); color: rgba(144, 195, 255, 0.35); }
.lv-stop__foot { display: grid; grid-template-columns: minmax(80px, 200px) minmax(0, 1fr); gap: var(--s-3); align-items: center; margin-top: 2px; }
.lv-stop__status { font-size: var(--t-sm); color: var(--fg-dim); line-height: 1.4; }
.lv-stop.is-here .lv-stop__status { color: var(--hu-blue-400); font-weight: 600; }
.lv-stop.is-locked .lv-stop__status { color: var(--fg-faint); }
.lv-stop__card--vault { grid-template-columns: minmax(0, 1fr); padding: var(--s-4); }
@media (max-width: 640px) {
  .lv-path { --node: 32px; }
  .lv-stop { gap: var(--s-2); align-items: start; }
  .lv-stop::before { top: calc(var(--s-3) + var(--node)); height: calc(100% + var(--s-3) - var(--node)); }
  .lv-stop__node { margin-top: var(--s-3); font-size: var(--t-2xs); }
  .lv-stop__card { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); padding: var(--s-3); }
  .lv-stop__img { min-height: 0; height: 104px; max-height: none; }
  .lv-stop__title { font-size: var(--t-lg); }
  .lv-stop__foot { grid-template-columns: minmax(0, 1fr); gap: var(--s-2); }
}

/* ---- The briefing: before / after at the foot, the minutes on the button ---- */
.lv-brief__cta .btn__meta { font-weight: 500; opacity: 0.82; }
.lv-steps { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.lv-steps a { display: grid; gap: 4px; padding: var(--s-3) var(--s-4); border-radius: 14px; border: 1px solid rgba(144, 195, 255, 0.16); background: rgba(10, 25, 54, 0.55); color: #fff; text-decoration: none; min-width: 0; overflow-wrap: anywhere; }
.lv-steps a:hover { text-decoration: none; border-color: rgba(56, 165, 255, 0.5); }
.lv-steps a:focus-visible { outline: 2px solid var(--hu-blue-400); outline-offset: 2px; }
.lv-steps a.is-next { text-align: right; border-color: rgba(56, 165, 255, 0.5); background: linear-gradient(180deg, rgba(20, 103, 239, 0.2), rgba(20, 103, 239, 0.06)); }
.lv-steps a.is-next .label { color: var(--hu-blue-400); }
.lv-steps a.is-sealed .label { color: var(--fg-faint); }
.lv-steps strong { font-size: var(--t-md); font-weight: 650; }
@media (max-width: 640px) { .lv-steps { grid-template-columns: minmax(0, 1fr); } .lv-steps a.is-next { text-align: left; } }
/* The sealed gate (views/common.js phaseGate, shown on course screens). The stamp is
   brand blue, not alarm red: a sealed level is the next step, not an error. On a
   tablet it gets its own strip above the eyebrow; on a phone it sits in the flow,
   first line of the card, so it can never cover the eyebrow or the headline. */
.sealed__stamp { border-color: var(--hu-blue-400); color: var(--hu-blue-400); box-shadow: 0 0 18px -6px rgba(56, 165, 255, 0.6); opacity: 0.95; }
@media (max-width: 900px) and (min-width: 641px) { .card.sealed { padding-top: calc(var(--s-5) + 52px); } }
@media (max-width: 640px) {
  .sealed__stamp { position: static; justify-self: start; justify-items: start; transform: rotate(-2deg); margin-bottom: calc(var(--s-1) * -1); }
}
@media (hover: none) { .quiz__keyhint { display: none; } }

/* =====================================================================
   Round 39c
   ===================================================================== */

/* ---- The route rail on the levels page (views/route.js, app.css .station) ----
   Every station gets the same rows: dot, number, a two-line title box, state.
   One-line titles ("Scale", "Exit") used to drop their number below the rest. */
.ship--map .station { align-content: start; grid-template-rows: 30px auto auto auto; }
.ship--map .station__t { max-width: 100%; min-height: 2.5em; }

/* ---- Wide lesson tables on a phone: each row becomes a small card ----
   views/lesson.js tags tables of three or more columns (.table-wrap--stack) and
   gives each cell its column name (data-label). Under 600px the row's first cell
   is the card's title and every other cell reads "Column ......... value". */
@media (max-width: 600px) {
  .lsn .table-wrap--stack { overflow: visible; }
  .lsn .table-wrap--stack table, .lsn .table-wrap--stack tbody, .lsn .table-wrap--stack tr, .lsn .table-wrap--stack td { display: block; width: 100%; }
  .lsn .table-wrap--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .lsn .table-wrap--stack tr { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); }
  .lsn .table-wrap--stack tbody tr:last-child { border-bottom: 0; }
  .lsn .table-wrap--stack td { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-3); align-items: baseline; padding: 3px 0; border: 0; text-align: right; }
  .lsn .table-wrap--stack td::before { content: attr(data-label); text-align: left; font-family: var(--font-mono); font-size: var(--t-2xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-dim); }
  .lsn .table-wrap--stack td:first-child { display: block; padding-bottom: var(--s-2); text-align: left; font-weight: 700; color: #fff; }
  .lsn .table-wrap--stack td:first-child::before { content: none; }
  .lsn .table-wrap--stack .cell__v { min-width: 0; overflow-wrap: anywhere; }
}

/* ---- Guess first (views/lesson.js guessFirst) ----
   One question from the lesson's own check, asked before reading. The pick is
   held, not graded: the check grades it, and says what you guessed. */
.guess { display: grid; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-radius: 16px; border: 1px solid rgba(56, 165, 255, 0.35); background: linear-gradient(180deg, rgba(20, 103, 239, 0.16), rgba(10, 25, 54, 0.6)); }
.guess__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-1) var(--s-3); }
.guess__why { font-size: var(--t-sm); color: var(--fg-dim); }
.guess__q { margin: 0; font-size: var(--t-md); font-weight: 600; line-height: 1.45; color: #fff; text-wrap: pretty; }
.guess__opts { display: grid; gap: var(--s-2); }
.lsn .guess .quiz__opt { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-3); text-align: left; min-height: 44px; font-size: var(--t-sm); }
.lsn .guess .quiz__opt.is-picked { border-color: var(--hu-blue-400); background: rgba(20, 103, 239, 0.28); }
.lsn .guess .quiz__opt.is-picked .quiz__key { border-color: var(--hu-blue-400); background: var(--hu-blue-400); color: #04121f; }
.guess__held { margin: 0; font-size: var(--t-sm); color: var(--fg); }
.guess__held b { color: #fff; }
.guess__skip { justify-self: start; padding: 4px 0; border: 0; background: none; color: var(--fg-dim); font: inherit; font-size: var(--t-sm); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.guess__skip:focus-visible { outline: 2px solid var(--hu-blue-400); outline-offset: 2px; border-radius: 4px; }

/* ---- How sure are you? (app/quiz.js) ----
   An optional row of three above each question's options. Set before answering,
   it shapes the feedback (sure and wrong is the one to reread) and the tally. */
.quiz__sure { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.quiz__sure-k { font-size: var(--t-xs); color: var(--fg-faint); margin-right: 2px; }
@media (max-width: 480px) { .quiz .quiz__sure { gap: 6px; } .quiz .quiz__sure-k { flex-basis: 100%; } .quiz .quiz__sure button { padding: 4px 10px; } }
.quiz__sure button { min-height: 32px; padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(144, 195, 255, 0.22); background: transparent; color: var(--fg-dim); font: inherit; font-size: var(--t-xs); font-weight: 600; cursor: pointer; transition: border-color 150ms, background 150ms, color 150ms; }
.quiz__sure button:hover:not([disabled]) { border-color: rgba(56, 165, 255, 0.6); color: var(--fg); }
.quiz__sure button[aria-pressed="true"] { border-color: var(--hu-blue-400); background: rgba(20, 103, 239, 0.3); color: #fff; }
.quiz__sure button[disabled]:not([aria-pressed="true"]) { opacity: 0.4; cursor: default; }
.quiz__sure button:focus-visible { outline: 2px solid var(--hu-blue-400); outline-offset: 2px; }
.quiz__note { color: var(--fg-dim); }
.quiz__calib { margin: 0; font-size: var(--t-sm); color: var(--fg-dim); }
.quiz__calib b { color: #fff; }
.quiz__again { display: grid; gap: var(--s-5); padding-top: var(--s-4); border-top: 1px dashed rgba(144, 195, 255, 0.25); }

/* =====================================================================
   Round 40 — member experience
   ===================================================================== */

/* ---- The teacher briefing (views/teacher-video.js) on a level page ----
   The player on the left at 16:9, what it is and where you stand on the right.
   Without a video: the level plate, dimmed, with "Video coming soon": the same
   frame, never an empty box. */
.tv { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(240px, 1fr); gap: var(--s-5); align-items: center; padding: var(--s-4); border-radius: 18px; border: 1px solid rgba(144, 195, 255, 0.24); background: linear-gradient(90deg, rgba(20, 103, 239, 0.12), rgba(4, 12, 30, 0.5) 70%); }
.tv.is-soon { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); border-style: dashed; border-color: rgba(144, 195, 255, 0.24); background: rgba(4, 12, 30, 0.45); }
.tv__frame { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #01060f; box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.9); isolation: isolate; }
.tv__video, .tv__embed { display: block; width: 100%; height: 100%; border: 0; background: #01060f; object-fit: contain; }
.tv__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.tv__frame--soon .tv__poster { filter: grayscale(0.55) brightness(0.5) saturate(0.8); }
.tv__frame--out .tv__poster { filter: brightness(0.7); transition: filter 160ms; }
.tv__frame--out:hover .tv__poster { filter: brightness(0.85); }
.tv__frame--out:focus-visible { outline: 2px solid var(--hu-blue-400); outline-offset: 3px; }
.tv__play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(20, 103, 239, 0.9); box-shadow: 0 0 0 6px rgba(56, 165, 255, 0.22), var(--hu-glow); }
.tv__play::after { content: ""; position: absolute; left: 26px; top: 21px; border-style: solid; border-width: 11px 0 11px 17px; border-color: transparent transparent transparent #fff; }
.tv__play.is-off { width: 52px; height: 52px; margin: -26px 0 0 -26px; background: rgba(4, 12, 30, 0.55); border: 1.5px solid rgba(144, 195, 255, 0.45); box-shadow: none; }
.tv__play.is-off::after { left: 20px; top: 16px; border-width: 9px 0 9px 14px; border-left-color: rgba(234, 245, 255, 0.7); }
.tv__soon { position: absolute; left: 50%; bottom: var(--s-3); transform: translateX(-50%); padding: 4px 12px; border-radius: 999px; background: rgba(4, 12, 30, 0.8); border: 1px solid rgba(144, 195, 255, 0.3); font-size: var(--t-2xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(234, 245, 255, 0.85); white-space: nowrap; }
.tv__body { display: grid; gap: var(--s-2); align-content: center; justify-items: start; min-width: 0; }
.tv__head { display: grid; gap: 4px; min-width: 0; }
.tv__title { font-size: var(--t-lg); font-weight: 650; line-height: 1.3; color: #fff; overflow-wrap: anywhere; text-wrap: balance; }
.tv__status { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--s-2); font-size: var(--t-sm); color: var(--fg-dim); font-variant-numeric: tabular-nums; }
.tv__status:empty { display: none; }
.tv__dot { color: var(--fg-faint); }
.tv__done { color: var(--hu-blue-400); font-weight: 700; }
.tv__note { margin: 0; font-size: var(--t-sm); line-height: 1.55; color: var(--fg-dim); max-width: 46ch; }
.tv__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.tv__foot:not(:has(> :not([hidden]))) { display: none; }
.tv__error { margin: 0; font-size: var(--t-sm); color: var(--fg); }
.tv__out { font-size: var(--t-sm); }
@media (max-width: 900px) {
  .tv, .tv.is-soon { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); padding: var(--s-3); }
  .tv.is-soon { grid-template-columns: 132px minmax(0, 1fr); align-items: center; }
  .tv.is-soon .tv__soon { display: none; }
  .tv.is-soon .tv__note { font-size: var(--t-xs); }
  .tv__body { padding: 0 var(--s-1) var(--s-1); }
}
@media (max-width: 380px) { .tv.is-soon { grid-template-columns: minmax(0, 1fr); } .tv.is-soon .tv__soon { display: block; } }

/* ---- Sealed lessons for preview visitors: the round-39 sealed look, one row each ---- */
.lv-row.is-sealed { border-style: dashed; border-color: rgba(144, 195, 255, 0.2); background: repeating-linear-gradient(135deg, rgba(6, 16, 36, 0.55) 0 14px, rgba(255, 255, 255, 0.022) 14px 16px); }
.lv-row.is-sealed .lv-row__title { color: var(--fg-dim); }
.lv-row.is-sealed .lv-row__n { color: var(--hu-blue-400); border-style: dashed; }
.lv-row.is-sealed .lv-row__state { color: var(--hu-blue-400); }
.lv-row.is-sealed:hover { border-color: rgba(56, 165, 255, 0.5); background: repeating-linear-gradient(135deg, rgba(20, 103, 239, 0.12) 0 14px, rgba(255, 255, 255, 0.03) 14px 16px); }
.lv-row.is-sealed:hover .lv-row__state::after { content: " · Unlock"; }
.lv-resume__lvl .lv-stop__lock { display: inline-block; width: 12px; height: 15px; }
.lv-resume__lvl .lv-stop__lock::before { height: 8px; }
.lv-resume__lvl .lv-stop__lock::after { height: 8px; }
.lv-stop__facts .is-watched { color: var(--hu-blue-400); }

/* ---- Your record in "Before you start" ---- */
.start__record b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---- The hall screen's "coming soon" line (game.css owns the screen) ---- */
.screen__soon { display: inline-block; justify-self: start; align-self: start; width: fit-content; max-width: 100%; margin-top: 6px; padding: 3px 10px; border-radius: 999px; background: rgba(4, 12, 30, 0.6); border: 1px solid rgba(144, 195, 255, 0.3); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(234, 245, 255, 0.85); text-decoration: none; }
a.screen__soon:hover { background: rgba(20, 103, 239, 0.4); text-decoration: none; }
.hall.is-stacked .screen__soon { font-size: 10px; }
iframe.screen__embed { border: 0; }
.tv__fail { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: var(--s-3); padding: var(--s-4); text-align: center; background: rgba(4, 12, 30, 0.72); isolation: isolate; }
.tv__fail[hidden] { display: none; }
.tv__fail .tv__poster { filter: brightness(0.35) grayscale(0.4); }
.tv__fail p { margin: 0; font-size: var(--t-md); font-weight: 600; color: #fff; }
.tv__fail-row { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2); }

/* =====================================================================
   Round 40 (rooms & content fixer)
   ===================================================================== */

/* ---- Route rail (M3, L14) ----
   Under 1100px a station is ~66px wide: long level names ("Underwriting Locations")
   cannot fit in two lines, and an ellipsis reads as broken. The rail shows the
   number and the state there; the full name is the station's title and the
   campaign card right below it. Sealed states are readable (fg-dim, not faint
   at 45% opacity). */
@media (max-width: 1100px) { .ship--map .station__t { display: none; } .ship--map .station { grid-template-rows: 30px auto auto; } }
.ship--map .station--locked { opacity: 0.78; }
.ship--map .station--locked .station__s { color: var(--fg-dim); }

/* ---- Lesson skeleton (L20): what a cold load shows while the lesson arrives (views/lesson.js lessonSkeleton) ---- */
.lsn-skel { display: grid; gap: 14px; max-width: 760px; padding: var(--s-2) 0; }
.lsn-skel i { display: block; height: 14px; border-radius: 8px; background: linear-gradient(90deg, rgba(144, 195, 255, 0.08) 0%, rgba(144, 195, 255, 0.18) 50%, rgba(144, 195, 255, 0.08) 100%) 0 0 / 200% 100%; animation: lsn-skel 1.2s linear infinite; }
.lsn-skel__crumb { width: 30%; height: 12px !important; }
.lsn-skel__eyebrow { width: 22%; height: 11px !important; margin-top: 6px; }
.lsn-skel__title { width: 74%; height: 42px !important; border-radius: 12px !important; }
.lsn-skel__video { width: 100%; aspect-ratio: 16 / 9; height: auto !important; border-radius: 16px !important; margin: 8px 0; }
.lsn-skel__line--short { width: 55%; }
@keyframes lsn-skel { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .lsn-skel i { animation: none; } }
