:root {
  --ink: #06131f;
  --panel: rgba(10, 31, 46, 0.93);
  --panel-2: #0d293d;
  --line: rgba(143, 205, 226, 0.2);
  --text: #f4f8fb;
  --muted: #9bb2c2;
  --cyan: #4bddf4;
  --blue: #4ca7ff;
  --violet: #ad87ff;
  --gold: #ffd166;
  --green: #61e6ab;
  --red: #ff718c;
  --shadow: 0 28px 70px rgba(0, 4, 12, 0.55);
  --radius: 24px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--ink); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Avenir Next", Avenir, "SF Pro Display", Inter, system-ui, sans-serif;
  background:
    radial-gradient(circle at 15% 8%, rgba(40, 177, 213, 0.14), transparent 26rem),
    radial-gradient(circle at 86% 18%, rgba(133, 85, 235, 0.14), transparent 28rem),
    linear-gradient(145deg, #04101a 0%, #071827 48%, #08131f 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.17;
  background-image:
    linear-gradient(rgba(116, 181, 204, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(116, 181, 204, 0.11) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.ambient { position: fixed; width: 360px; height: 360px; border-radius: 50%; filter: blur(80px); pointer-events: none; opacity: .14; }
.ambient-a { background: var(--cyan); left: -180px; top: 28%; }
.ambient-b { background: var(--violet); right: -190px; bottom: 5%; }

.app-shell { position: relative; z-index: 1; width: min(1220px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 42px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.identity { display: flex; align-items: center; gap: 14px; }
.eyebrow { margin: 0 0 4px; color: var(--cyan); font-size: 12px; font-weight: 800; letter-spacing: .17em; }
h1 { margin: 0; font-size: clamp(29px, 4vw, 42px); line-height: 1; letter-spacing: -.04em; }
.subject-mark { position: relative; width: 58px; height: 58px; border: 1px solid rgba(75,221,244,.35); border-radius: 18px; background: rgba(10,35,51,.75); box-shadow: inset 0 0 24px rgba(75,221,244,.09); }
.subject-mark .nucleus { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 18px var(--gold); left: 24px; top: 24px; }
.orbit { position: absolute; left: 11px; top: 19px; width: 35px; height: 18px; border: 1.5px solid var(--cyan); border-radius: 50%; transform: rotate(25deg); opacity: .85; }
.orbit-b { transform: rotate(-35deg); border-color: var(--violet); }
.status-pill { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(8, 27, 40, .72); font-size: 13px; font-weight: 700; }
.status-pill span:first-child { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }

.learning-layout { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 22px; align-items: start; }
.mission-panel { position: sticky; top: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(170deg, rgba(13, 41, 61, .96), rgba(7, 24, 37, .96)); box-shadow: var(--shadow); padding: 24px; overflow: hidden; }
.mission-panel::after { content: "Xe 54"; position: absolute; right: -13px; top: 88px; font: 800 66px/1 ui-monospace, monospace; color: rgba(75,221,244,.035); transform: rotate(90deg); }
.mission-heading h2 { margin: 4px 0 10px; font-size: 24px; letter-spacing: -.025em; }
.mission-heading > p:last-child { margin: 0; color: var(--muted); line-height: 1.55; font-size: 14px; }
.score-card { display: flex; align-items: center; gap: 14px; margin: 22px 0; padding: 13px; border: 1px solid rgba(75,221,244,.18); border-radius: 17px; background: rgba(3, 15, 24, .43); }
.score-ring { width: 60px; height: 60px; border-radius: 50%; display: grid; place-content: center; grid-auto-flow: column; align-items: baseline; background: conic-gradient(var(--cyan) var(--score-angle, 0deg), rgba(255,255,255,.09) 0); position: relative; }
.score-ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #0a2233; }
.score-ring strong, .score-ring span { position: relative; z-index: 1; }
.score-ring strong { font-size: 22px; }
.score-ring span { color: var(--muted); font-size: 11px; }
.score-label { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
#masteryText { display: block; margin-top: 3px; font-size: 14px; }
.checkpoint-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checkpoint { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 10px; border-radius: 13px; color: var(--muted); border: 1px solid transparent; transition: .25s ease; }
.checkpoint-index { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; font-size: 11px; font-weight: 900; border: 1px solid rgba(75,221,244,.25); color: var(--cyan); }
.checkpoint-copy strong { display: block; color: #dce9f0; font-size: 13px; }
.checkpoint-copy span { font-size: 11px; }
.checkpoint-state { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); opacity: .5; }
.checkpoint.current { background: rgba(255,209,102,.08); border-color: rgba(255,209,102,.25); }
.checkpoint.current .checkpoint-index { border-color: var(--gold); color: var(--gold); }
.checkpoint.current .checkpoint-state { background: var(--gold); opacity: 1; box-shadow: 0 0 12px var(--gold); }
.checkpoint.done { background: rgba(97,230,171,.06); }
.checkpoint.done .checkpoint-index { color: var(--green); border-color: rgba(97,230,171,.4); }
.checkpoint.done .checkpoint-state { background: var(--green); opacity: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 18px; color: var(--muted); font-size: 10px; }
.legend span { display: flex; align-items: center; gap: 5px; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot-cyan { background: var(--cyan); }.dot-gold { background: var(--gold); }.dot-green { background: var(--green); }

.player-column { min-width: 0; }
.player-frame { position: relative; width: min(100%, 508px); aspect-ratio: 9 / 16; margin: 0 auto; border-radius: 30px; border: 1px solid rgba(121, 199, 226, .28); background: #020b11; overflow: hidden; box-shadow: 0 35px 90px rgba(0,0,0,.58), 0 0 0 8px rgba(8,32,47,.68); }
.player-frame::before { content: ""; position: absolute; z-index: 5; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), inset 0 0 45px rgba(28, 163, 204, .07); }
.lab-grid { position: absolute; inset: 0; z-index: 0; opacity: .09; background-image: linear-gradient(rgba(75,221,244,.25) 1px, transparent 1px), linear-gradient(90deg, rgba(75,221,244,.25) 1px, transparent 1px); background-size: 34px 34px; }
video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; background: #03111b; }
.video-topline { position: absolute; z-index: 6; left: 22px; right: 22px; top: 18px; display: flex; justify-content: space-between; color: rgba(223,243,250,.65); font-size: 8px; font-weight: 800; letter-spacing: .12em; pointer-events: none; mix-blend-mode: screen; }
.video-topline span:last-child { color: var(--cyan); }
.center-play { position: absolute; z-index: 10; left: 50%; top: 50%; transform: translate(-50%,-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; border: 1px solid rgba(75,221,244,.45); color: white; background: rgba(4,19,29,.84); backdrop-filter: blur(14px); border-radius: 22px; padding: 19px 25px; font-weight: 800; cursor: pointer; box-shadow: 0 18px 45px rgba(0,0,0,.45), 0 0 30px rgba(75,221,244,.09); }
.play-triangle { width: 0; height: 0; border-top: 12px solid transparent; border-bottom: 12px solid transparent; border-left: 18px solid var(--cyan); margin-left: 4px; }

.controls { position: absolute; z-index: 12; left: 14px; right: 14px; bottom: 14px; display: grid; grid-template-columns: 38px auto 1fr 38px 38px; gap: 8px; align-items: center; padding: 10px; border: 1px solid rgba(155,210,230,.2); border-radius: 17px; background: rgba(3,15,23,.87); backdrop-filter: blur(16px); opacity: .15; transition: opacity .2s ease; }
.player-frame:hover .controls, .player-frame:focus-within .controls, .controls.active { opacity: 1; }
.icon-button { width: 38px; height: 38px; border: 0; border-radius: 11px; background: rgba(255,255,255,.06); color: white; cursor: pointer; font-size: 15px; }
.icon-button:hover { background: rgba(75,221,244,.14); color: var(--cyan); }
.time-readout { display: flex; gap: 4px; color: #dce9f0; font: 700 10px/1 ui-monospace, monospace; white-space: nowrap; }
.timeline-wrap { position: relative; height: 22px; display: flex; align-items: center; }
#timeline { width: 100%; accent-color: var(--cyan); cursor: pointer; }
.checkpoint-markers { position: absolute; inset: 0 7px; pointer-events: none; }
.timeline-marker { position: absolute; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); border: 2px solid #142838; transform: translateX(-50%); box-shadow: 0 0 10px rgba(255,209,102,.5); }
.timeline-marker.done { background: var(--green); }

.interaction-layer, .completion-layer { position: absolute; z-index: 20; inset: 0; display: grid; place-items: center; padding: 22px; background: radial-gradient(circle at 50% 28%, rgba(34,121,158,.28), transparent 45%), rgba(2,11,17,.88); backdrop-filter: blur(8px); }
.interaction-layer[hidden], .completion-layer[hidden] { display: none; }
.question-card, .completion-card { width: 100%; border: 1px solid rgba(75,221,244,.34); border-radius: 24px; padding: 24px; background: linear-gradient(160deg, rgba(14,46,66,.98), rgba(6,24,37,.98)); box-shadow: 0 30px 70px rgba(0,0,0,.48); animation: cardIn .28s ease-out; }
@keyframes cardIn { from { transform: translateY(18px) scale(.98); opacity: 0; } }
.question-kicker { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--cyan); font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.xp-chip { padding: 6px 9px; border-radius: 999px; background: rgba(255,209,102,.11); color: var(--gold); letter-spacing: .05em; }
.question-card h2 { margin: 14px 0 8px; font-size: clamp(22px, 5vw, 30px); line-height: 1.12; letter-spacing: -.03em; }
.question-prompt { margin: 0 0 17px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.answers { display: grid; gap: 9px; }
.answer { display: grid; grid-template-columns: 29px 1fr; align-items: center; gap: 10px; width: 100%; min-height: 54px; padding: 10px 13px; border: 1px solid rgba(147,202,220,.2); border-radius: 14px; background: rgba(3,15,23,.5); color: #eaf4f8; text-align: left; cursor: pointer; transition: .18s ease; }
.answer:hover:not(:disabled) { border-color: rgba(75,221,244,.65); transform: translateY(-1px); background: rgba(75,221,244,.08); }
.answer-letter { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 9px; color: var(--cyan); background: rgba(75,221,244,.1); font-weight: 900; font-size: 12px; }
.answer.correct { border-color: var(--green); background: rgba(97,230,171,.1); }
.answer.correct .answer-letter { background: var(--green); color: #032419; }
.answer.wrong { border-color: var(--red); background: rgba(255,113,140,.1); }
.answer.wrong .answer-letter { background: var(--red); color: #300713; }
.answer:disabled { cursor: default; }
.feedback { margin-top: 13px; padding: 12px 14px; border-radius: 13px; font-size: 13px; line-height: 1.5; border-left: 3px solid var(--cyan); background: rgba(75,221,244,.07); color: #ddecf3; }
.feedback.success { border-left-color: var(--green); background: rgba(97,230,171,.08); }
.feedback.error { border-left-color: var(--red); background: rgba(255,113,140,.08); }
.question-actions, .completion-actions { display: flex; gap: 9px; justify-content: flex-end; margin-top: 17px; }
.primary-button, .secondary-button { min-height: 44px; border-radius: 13px; padding: 0 15px; font-weight: 800; cursor: pointer; }
.primary-button { border: 0; color: #04202a; background: linear-gradient(135deg, var(--cyan), #7de9cc); box-shadow: 0 8px 25px rgba(75,221,244,.2); }
.secondary-button { color: #dcebf1; border: 1px solid rgba(158,209,226,.24); background: rgba(255,255,255,.04); }
.completion-card { text-align: center; }
.completion-icon { display: grid; place-items: center; width: 70px; height: 70px; margin: 0 auto 18px; border-radius: 22px; color: #05251b; background: var(--green); font-size: 34px; font-weight: 900; box-shadow: 0 0 40px rgba(97,230,171,.28); }
.completion-card h2 { margin: 7px 0; font-size: 29px; }
.completion-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.55; }
.completion-score { display: flex; flex-direction: column; width: 155px; margin: 18px auto; padding: 14px; border-radius: 18px; border: 1px solid rgba(255,209,102,.3); background: rgba(255,209,102,.07); }
.completion-score strong { color: var(--gold); font-size: 28px; }.completion-score span { color: var(--muted); font-size: 11px; }
.study-strip { width: min(100%, 620px); margin: 22px auto 0; display: grid; grid-template-columns: repeat(4,1fr); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: rgba(8,27,40,.72); }
.study-strip > div { display: flex; gap: 8px; align-items: center; justify-content: center; min-height: 48px; font-size: 12px; color: #d9e7ed; border-right: 1px solid var(--line); }
.study-strip > div:last-child { border: 0; }.strip-index { color: var(--cyan); font: 800 10px/1 ui-monospace, monospace; }

@media (max-width: 900px) {
  .app-shell { width: min(100% - 24px, 660px); padding-top: 18px; }
  .learning-layout { grid-template-columns: 1fr; }
  .player-column { order: 1; }.mission-panel { order: 2; position: static; }
  .checkpoint-list { grid-template-columns: repeat(2, 1fr); }
  .mission-panel::after { display: none; }
}

@media (max-width: 560px) {
  .app-shell { width: 100%; padding: 0 0 24px; }
  .topbar { padding: 14px 16px 8px; margin: 0; }
  .subject-mark { width: 48px; height: 48px; border-radius: 15px; }.subject-mark .nucleus { left: 19px; top: 19px; }.orbit { left: 7px; top: 15px; }
  .status-pill { display: none; }
  .learning-layout { gap: 15px; }
  .player-frame { width: 100%; border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; }
  .mission-panel { margin: 0 12px; padding: 20px; }
  .checkpoint-list { grid-template-columns: 1fr; }
  .study-strip { width: calc(100% - 24px); grid-template-columns: repeat(2,1fr); }
  .study-strip > div:nth-child(2) { border-right: 0; }.study-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .controls { left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); grid-template-columns: 36px auto 1fr 36px; }
  #fullscreen { display: none; }.icon-button { width: 36px; height: 36px; }
  .time-readout span:nth-child(n+2) { display: none; }
  .question-card { padding: 20px; }
  .question-actions, .completion-actions { flex-direction: column-reverse; }
  .primary-button, .secondary-button { width: 100%; }
}

/* Premium assessment sheet: calm, editorial, science-led. */
.interaction-layer {
  background: rgba(1, 8, 13, .82);
  backdrop-filter: blur(14px) saturate(75%);
}

.question-card {
  position: relative;
  padding: 26px;
  color: #10171b;
  background: #f3f3f0;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .48), 0 1px 0 rgba(255,255,255,.72) inset;
  overflow: hidden;
}

.question-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #1778a3;
}

.question-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.question-context {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #536068;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
}

.concept-tag {
  padding: 5px 8px;
  color: #176789;
  background: #dcebf0;
  border-radius: 5px;
  letter-spacing: .08em;
}

.question-stepper {
  display: flex;
  gap: 5px;
  align-items: center;
}

.question-stepper span {
  width: 17px;
  height: 3px;
  border-radius: 99px;
  background: #d0d5d7;
}

.question-stepper span.current { width: 28px; background: #1778a3; }
.question-stepper span.done { background: #5b6b72; }

.question-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 18px;
  align-items: start;
  margin-bottom: 20px;
}

.question-copy { min-width: 0; }
.question-card h2 {
  margin: 0 0 8px;
  color: #111719;
  font-size: clamp(25px, 5vw, 34px);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.question-prompt {
  margin: 0;
  max-width: 35em;
  color: #667279;
  font-size: 13px;
  font-weight: 450;
  line-height: 1.48;
  letter-spacing: -.01em;
  text-wrap: pretty;
}

.concept-tile {
  min-height: 88px;
  padding: 12px 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #e9f4f7;
  background: #102a36;
  border-radius: 12px;
}

.concept-tile strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.03em;
}

.concept-tile span {
  margin-top: 8px;
  color: #9bb7c2;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
}

.question-card .answers { gap: 8px; }
.question-card .answer {
  min-height: 56px;
  padding: 9px 13px;
  grid-template-columns: 30px 1fr;
  gap: 11px;
  color: #172126;
  background: #fbfbf9;
  border: 1px solid #d9dedf;
  border-radius: 11px;
  box-shadow: 0 1px 1px rgba(10, 25, 32, .03);
  font-size: 14px;
  font-weight: 520;
  line-height: 1.35;
}

.question-card .answer:hover:not(:disabled) {
  transform: none;
  color: #0d4e69;
  background: #f6fafb;
  border-color: #76aabd;
  box-shadow: 0 0 0 3px rgba(23, 120, 163, .08);
}

.question-card .answer-letter {
  width: 28px;
  height: 28px;
  color: #40535c;
  background: transparent;
  border: 1px solid #b9c3c7;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
}

.question-card .answer.correct {
  color: #123e32;
  background: #e7f2ed;
  border-color: #478d77;
  box-shadow: 0 0 0 3px rgba(45, 123, 96, .07);
}

.question-card .answer.correct .answer-letter {
  color: #fff;
  background: #317c64;
  border-color: #317c64;
}

.question-card .answer.wrong {
  color: #702d35;
  background: #f8e9e9;
  border-color: #c98a90;
}

.question-card .answer.wrong .answer-letter {
  color: #fff;
  background: #a94f5a;
  border-color: #a94f5a;
}

.question-card .feedback {
  display: grid;
  grid-template-columns: 31px 1fr;
  gap: 11px;
  align-items: start;
  margin-top: 12px;
  padding: 13px 14px;
  color: #193a31;
  background: #e3eee9;
  border: 0;
  border-radius: 11px;
}

.question-card .feedback.error {
  color: #5c3f23;
  background: #f1eadc;
}

.feedback-icon {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #317c64;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
}

.feedback.error .feedback-icon { background: #96703c; }
.question-card .feedback strong { display: block; margin: 1px 0 3px; font-size: 12px; font-weight: 700; }
.question-card .feedback p { margin: 0; color: inherit; font-size: 12px; line-height: 1.48; }

.question-card .question-actions {
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}

.question-card .primary-button,
.question-card .secondary-button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -.01em;
}

.question-card .primary-button {
  color: #fff;
  background: #11191d;
  box-shadow: none;
}

.question-card .primary-button:hover { background: #176d91; }
.question-card .secondary-button {
  color: #405159;
  background: transparent;
  border-color: #c5cdcf;
}
.question-card .secondary-button:hover { color: #11191d; background: #e5e8e7; }

@media (max-width: 560px) {
  .interaction-layer { padding: 14px; }
  .question-card { padding: 22px 20px 20px; border-radius: 16px; }
  .question-meta { margin-bottom: 18px; }
  .question-context { gap: 6px; font-size: 9px; }
  .question-stepper span { width: 11px; }
  .question-stepper span.current { width: 20px; }
  .question-hero { grid-template-columns: minmax(0, 1fr) 70px; gap: 12px; margin-bottom: 17px; }
  .question-card h2 { font-size: 27px; }
  .question-prompt { font-size: 12px; }
  .concept-tile { min-height: 70px; padding: 9px 5px; border-radius: 10px; }
  .concept-tile strong { font-size: 22px; }
  .concept-tile span { margin-top: 6px; font-size: 7px; }
  .question-card .answer { min-height: 52px; font-size: 13px; }
  .question-card .question-actions { flex-direction: row; }
  .question-card .primary-button,
  .question-card .secondary-button { width: auto; flex: 1; }
}

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

/* ---- Controls sit below the video so they never cover the burned-in captions ---- */
.controls { position: relative; left: auto; right: auto; bottom: auto; z-index: 2; opacity: 1;
  width: min(100%, 508px); margin: 12px auto 0; }
@media (max-width: 560px) { .controls { width: calc(100% - 24px); margin-top: 10px; } }

/* ---- Dark mode (system setting) ---- */
@media (prefers-color-scheme: dark) {

  .question-card { color: #ece8e1; background: #1c1f23; box-shadow: 0 28px 80px rgba(0,0,0,.6); }
  .question-card h2 { color: #f4f1eb; }
  .question-context, .question-prompt { color: #a9b3b8; }
  .concept-tag { color: #cfe6ee; background: #23343c; }
  .question-stepper span { background: #3a4045; }
  .question-stepper span.done { background: #8a979d; }
  .question-card .answer { color: #ece8e1; background: #24282d; border-color: #363c42; }
  .question-card .answer:hover:not(:disabled) { color: #fff; background: #2a3036; border-color: #5d8a9c; }
  .question-card .answer-letter { color: #c4ccd0; border-color: #4a5257; }
  .question-card .answer.correct { color: #d7efe5; background: #1d3a30; border-color: #3f8a70; }
  .question-card .answer.wrong { color: #f2d6d9; background: #3f2226; border-color: #a5636b; }
  .question-card .feedback { color: #d7efe5; background: #1d3a30; }
  .question-card .feedback.error { color: #f1e3c8; background: #3a3020; }
  .question-card .secondary-button { color: #ece8e1; background: #24282d; border-color: #363c42; }
  .question-card .primary-button { color: #121416; background: #ece8e1; }
}

/* ---- Readability (phone) ---- */
.eyebrow { font-size: 13px; letter-spacing: .12em; }
.mission-heading > p:last-child { font-size: 16px; font-weight: 500; }
.score-ring span, .score-label { font-size: 12.5px; }
#masteryText { font-size: 16px; }
.checkpoint-copy strong { font-size: 15.5px; line-height: 1.3; }
.checkpoint-copy span { font-size: 13px; }
.checkpoint-index { font-size: 12.5px; }
.legend { font-size: 13.5px; }
.strip-index { font-size: 12px; }
.study-strip > div { font-size: 14.5px; }
.status-pill { font-size: 14px; }
.time-readout { font-size: 12.5px; }
.resource-title { font-size: 12.5px; letter-spacing: .1em; }
.resource-link { font-size: 15.5px; }
.interaction-layer, .completion-layer { overflow-y: auto; place-items: safe center; }
.question-context { font-size: 12px; letter-spacing: .1em; }
.question-card h2 { font-size: clamp(24px, 6.4vw, 32px); }
.question-prompt { font-size: 17px; line-height: 1.45; font-weight: 500; }
.concept-tile strong { font-size: 26px; }
.concept-tile span { font-size: 11.5px; letter-spacing: .06em; }
.question-card .answer { font-size: 17px; line-height: 1.3; font-weight: 600; }
.question-card .answer-letter { font-size: 13px; }
.question-card .feedback strong { font-size: 15px; }
.question-card .feedback p { font-size: 16px; line-height: 1.5; }
.question-card .secondary-button, .question-card .primary-button { font-size: 16px; }
.completion-card p { font-size: 16px; line-height: 1.5; }
@media (max-width: 560px) {
  .question-card { padding: 18px; }
  .question-context { font-size: 11.5px; }
  .question-card h2 { font-size: 24px; }
  .question-prompt { font-size: 16.5px; margin-bottom: 12px; }
  .concept-tile strong { font-size: 21px; }
  .concept-tile span { font-size: 10.5px; }
  .question-card .answer { min-height: 54px; font-size: 16.5px; }
  .question-card .feedback p { font-size: 15.5px; }
}

/* phone: questions open as a full-screen sheet (never cut off by the video frame) */
@media (max-width: 560px) {
  .interaction-layer, .completion-layer { position: fixed; inset: 0; z-index: 60; place-items: safe center;
    padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom)); }
  .strip-index { font-size: 12.5px; }
}
