:root {
  --purple: #23085a;
  --purple-2: #3a1a86;
  --gold: #ffdd09;
  --gold-deep: #c9a800;
  --paper: #ffffff;
  --ink: #241433;
  --muted: #5c5670;
  --line: #e4e4ea;
  --page: #e7e7ee;
  --green: #0a9b32;
  --danger: #d7263d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 221, 9, 0.18), transparent 28%),
    var(--page);
  color: var(--ink);
  font-family: Nunito, "Segoe UI", sans-serif;
  font-size: 17px;
}

.exam {
  --paper: #ffffff;
  --ink: #241433;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f6f6f6;
  color: var(--ink);
}

.exam.font-sm { font-size: 15px; }
.exam.font-md { font-size: 18px; }
.exam.font-lg { font-size: 21px; }
.exam.font-xl { font-size: 24px; }

.exam.contrast-1 { --paper: #ffffff; --ink: #333333; }
.exam.contrast-2 { --paper: #f6c6c8; --ink: #1f5335; }
.exam.contrast-3 { --paper: #e3ec8f; --ink: #1f156c; }
.exam.contrast-4 { --paper: #eceaff; --ink: #686021; }
.exam.contrast-5 { --paper: #d89c58; --ink: #000000; }
.exam.contrast-6 { --paper: #dfd2e8; --ink: #000000; }
.exam.contrast-7 { --paper: #e3ec8f; --ink: #5f26bd; }
.exam.contrast-8 { --paper: #82bfc1; --ink: #8f1410; }
.exam.overlay-1 { --paper: #ffffff; --ink: #333333; }
.exam.overlay-2 { --paper: #ceffc0; --ink: #333333; }
.exam.overlay-3 { --paper: #d5fdfd; --ink: #333333; }
.exam.overlay-4 { --paper: #e9ddc9; --ink: #333333; }
.exam.overlay-5 { --paper: #f6c6fb; --ink: #333333; }
.exam.overlay-6 { --paper: #fafed7; --ink: #333333; }

@media (min-width: 1200px) {
  body { padding: 22px 16px 28px; }
  .exam {
    max-width: 1180px;
    min-height: calc(100vh - 50px);
    margin: 0 auto;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(35, 8, 90, 0.16);
  }
}

.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 74px;
  padding: 12px 22px;
  background: var(--purple);
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.brand-mark svg { width: 26px; height: 26px; }

.brand-name small {
  display: block;
  font-size: 0.62em;
  letter-spacing: 0.16em;
  font-weight: 700;
  opacity: 0.8;
}

.progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-track {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 99px;
  overflow: hidden;
}

#progressBar {
  display: block;
  height: 100%;
  width: 0;
  background: var(--gold);
  border-radius: inherit;
  transition: width 0.35s ease;
}

.progress-label {
  min-width: 3ch;
  font-weight: 800;
  color: var(--gold);
  font-size: 0.92rem;
}

.seal {
  background: var(--gold);
  color: var(--purple);
  font-weight: 800;
  border-radius: 999px;
  padding: 6px 14px;
  letter-spacing: 0.04em;
}

.stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 14px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(35, 8, 90, 0.06);
  overflow: hidden;
}

.flow {
  flex: 1;
  overflow: auto;
  padding: 22px 24px 32px;
  background: var(--paper);
  color: var(--ink);
}

.screen { display: none; animation: rise 0.35s ease; }
.screen.active { display: block; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.hud {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
  pointer-events: none;
}

.hud > * { pointer-events: auto; }

.listen-pill,
.mic-live,
.mic-banner,
.highlight-toast {
  background: var(--purple);
  color: #fff;
  border-radius: 999px;
  font-weight: 800;
}

.listen-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  margin: 8px 0 0;
}

.replay,
.mic-face {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--purple);
  color: var(--gold);
  display: grid;
  place-items: center;
  font-size: 1.15rem;
}

.replay:hover,
.replay:focus-visible { background: var(--purple-2); }

.mic-dock { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.mic-live {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 8px 8px;
}

.pids { display: flex; align-items: flex-end; gap: 2px; height: 22px; }
.pids span {
  width: 3px;
  height: 6px;
  border-radius: 99px;
  background: var(--gold);
}
.mic-live .pids span { animation: bounce 0.8s ease-in-out infinite; }
.pids span:nth-child(2) { animation-delay: 0.1s; }
.pids span:nth-child(3) { animation-delay: 0.2s; }
.pids span:nth-child(4) { animation-delay: 0.05s; }
.pids span:nth-child(5) { animation-delay: 0.18s; }
.pids span:nth-child(6) { animation-delay: 0.28s; }
.pids span:nth-child(7) { animation-delay: 0.12s; }
.pids span:nth-child(8) { animation-delay: 0.22s; }
.pids span:nth-child(9) { animation-delay: 0.08s; }
.pids span:nth-child(10) { animation-delay: 0.16s; }

@keyframes bounce {
  0%, 100% { height: 5px; }
  50% { height: 20px; }
}

.rec-label { font-size: 0.78rem; letter-spacing: 0.04em; }

.mic-banner,
.highlight-toast {
  margin: 0;
  border-radius: 0;
  text-align: center;
  padding: 8px 14px;
  font-size: 0.92rem;
}

.highlight-toast {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 86px;
  z-index: 8;
  border-radius: 12px;
}

.ring {
  --p: 100;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--gold) calc(var(--p) * 1%), #dedee6 0);
  box-shadow: 0 8px 18px rgba(35, 8, 90, 0.12);
  position: relative;
}

.ring::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #fff;
}

.ring span {
  position: relative;
  z-index: 1;
  font-weight: 800;
  color: var(--purple);
  font-variant-numeric: tabular-nums;
}

.ring.low { background: conic-gradient(var(--danger) calc(var(--p) * 1%), #dedee6 0); }
.ring.low span { color: var(--danger); }

.task-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding-right: 210px;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}

.task-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--purple);
  color: var(--gold);
  flex: 0 0 auto;
}

.lead-copy,
.prompt,
.passage p,
.story p,
.letter p,
.prompt-list,
.bubble p {
  font-size: 1.05rem;
  line-height: 1.55;
}

.lead-copy { margin: 0; }

.prompt {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 12px;
}

.scene svg,
.art-slot svg,
.art-card svg { width: 100%; height: auto; display: block; }

.scene {
  background: transparent;
}

.scene-sm { max-width: 420px; margin: 0 auto 16px; }

.center-copy { max-width: 640px; margin: 12px auto; text-align: center; }

.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.options.stack { grid-template-columns: 1fr; }
.options.pics { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 2px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 800;
  line-height: 1.35;
}

.choice:hover,
.choice:focus-visible { border-color: var(--gold); }

.choice.selected {
  border-color: var(--gold-deep);
  background: #fff8cc;
  box-shadow: inset 0 0 0 1px var(--gold);
}

.radio {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #c8c8d2;
  background: #fff;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.choice.selected .radio {
  background: var(--gold);
  border-color: var(--gold-deep);
}

.choice.selected .radio::after {
  content: "";
  width: 12px;
  height: 7px;
  border-left: 3px solid var(--purple);
  border-bottom: 3px solid var(--purple);
  transform: rotate(-45deg) translate(0, -1px);
}

.choice.pic {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas: "radio label" "art art";
  align-items: center;
  justify-items: start;
}
.choice.pic .radio { grid-area: radio; }
.choice.pic .pic-label { grid-area: label; }
.choice.pic .art-slot { grid-area: art; width: 100%; }

.pic-label {
  width: 28px;
  font-weight: 800;
}

.start-hero {
  min-height: 560px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 48px 20px;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 221, 9, 0.35), transparent 18%),
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.28), transparent 8%),
    radial-gradient(circle at 70% 72%, rgba(255, 255, 255, 0.18), transparent 6%),
    radial-gradient(circle at 30% 78%, rgba(255, 255, 255, 0.16), transparent 5%),
    linear-gradient(165deg, #4b1d9e 0%, #23085a 52%, #12042e 100%);
  position: relative;
  overflow: hidden;
}

.start-hero h1 {
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3.4rem);
  margin: 0 0 8px;
  max-width: 14ch;
}

.eyebrow {
  margin: 0 0 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--gold);
  font-size: 0.82rem;
}

.eyebrow.dark { color: var(--purple); }

.lede {
  max-width: 36ch;
  margin: 0 0 28px;
  font-size: 1.15rem;
}

.start-btn {
  width: 104px;
  height: 104px;
  border: 0;
  border-radius: 50%;
  background: var(--gold);
  color: var(--purple);
  font-weight: 800;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  box-shadow: 0 10px 0 var(--gold-deep);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.start-btn i { font-size: 1.8rem; line-height: 1; }
.start-btn:hover { transform: translateY(-2px); }
.start-btn:active { transform: translateY(5px); box-shadow: 0 5px 0 var(--gold-deep); }

.brief-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.brief-card {
  background: #f7f5fc;
  border-radius: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  min-height: 150px;
}

.brief-card i {
  font-size: 1.4rem;
  color: var(--purple);
}

.brief-card h2 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 8px 0;
}

.brief-card p { margin: 0; color: var(--muted); }

.tablet {
  width: min(100%, 820px);
  background: #1c1233;
  border-radius: 28px;
  padding: 22px 16px 18px;
  box-shadow: inset 0 0 0 2px #3a2a58, 0 16px 30px rgba(18, 4, 46, 0.18);
  position: relative;
}

.tablet::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4a3d66;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
}

.tablet-screen {
  background: var(--paper);
  color: var(--ink);
  border-radius: 12px;
  padding: 18px 16px;
  max-height: min(62vh, 560px);
  overflow: auto;
}

.letter p { margin: 0 0 12px; }
.letter { line-height: 2; }

.blank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 36px;
  margin: 0 4px;
  padding: 0 8px;
  border-radius: 8px;
  border: 2px dashed var(--purple);
  background: #fff;
  color: var(--purple);
  font-weight: 800;
  vertical-align: middle;
}

.blank.is-active {
  border-style: solid;
  background: #fff6c2;
  box-shadow: 0 0 0 3px rgba(255, 221, 9, 0.55);
}

.blank.filled { background: #fff; }

.banks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.bank {
  background: #f6f4fb;
  border-radius: 12px;
  padding: 10px;
  border: 2px solid transparent;
}

.bank.is-open { border-color: var(--gold); background: #fffbe8; }
.bank p { margin: 0 0 8px; font-size: 0.85rem; font-weight: 800; color: var(--muted); }

.bank button,
.nudge,
.vol-step,
.pop-close,
.ghost,
.solid,
.again-btn,
.tool,
.next,
.back {
  font-family: inherit;
}

.bank button {
  border: 0;
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 12px;
  margin: 0 6px 6px 0;
  font-weight: 800;
  box-shadow: 0 1px 0 rgba(35, 8, 90, 0.08);
}

.bank button:hover,
.bank button:focus-visible { background: var(--gold); }

.story,
.passage {
  background: #fffdf8;
  border-radius: 16px;
  padding: 18px 18px 8px;
  border: 1px solid #efe4cc;
}

.speak-panel { max-width: 680px; margin: 24px auto; text-align: center; }

.say-line {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 800;
  color: var(--purple);
  margin: 12px 0 18px;
}

.cues {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 0;
  margin: 16px 0;
  list-style: none;
}

.cues li {
  background: var(--purple);
  color: var(--gold);
  font-weight: 800;
  border-radius: 999px;
  padding: 8px 14px;
}

.wait-note,
.hint,
.limit {
  color: var(--muted);
  font-weight: 700;
}

.script { margin-top: 14px; color: var(--muted); }
.script summary { cursor: pointer; font-weight: 800; }

.chat { display: flex; flex-direction: column; gap: 14px; }

.bubble { display: flex; gap: 10px; align-items: flex-start; }
.bubble.out { justify-content: flex-end; }

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--purple);
  color: var(--gold);
  font-weight: 800;
  font-size: 0.78rem;
  flex: 0 0 auto;
}

.avatar.you { background: #4dabf7; color: #083044; }

.who { display: block; font-size: 0.78rem; font-weight: 800; color: var(--muted); margin-bottom: 4px; }

.bubble.in p,
.write-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
}

.bubble.in p { margin: 0; border-top-left-radius: 4px; }
.write-box { min-width: min(100%, 420px); border-top-right-radius: 4px; }

textarea {
  width: 100%;
  border: 1px solid #cfcfd8;
  border-radius: 12px;
  padding: 10px 12px;
  resize: vertical;
  font: inherit;
  color: inherit;
  background: #fff;
  box-shadow: none;
}

textarea:focus {
  outline: 3px solid rgba(255, 221, 9, 0.85);
  border-color: var(--gold-deep);
}

.word-count {
  margin: 8px 0 0;
  text-align: right;
  font-weight: 800;
  color: var(--muted);
}

.word-count.is-met { color: var(--green); }

.fixed-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff8cc;
  border: 2px solid var(--gold);
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 800;
  margin-bottom: 10px;
}

.sort-list { display: flex; flex-direction: column; gap: 8px; }

.drag-item {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 8px;
  align-items: center;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.drag-item.dragging {
  opacity: 0.72;
  border-color: var(--gold);
  box-shadow: 0 10px 24px rgba(35, 8, 90, 0.12);
}

.drag-item p { margin: 0; font-weight: 800; }

.grip {
  width: 14px;
  height: 18px;
  background:
    radial-gradient(circle, #9a97a8 1.5px, transparent 1.7px) 0 0 / 7px 6px;
}

.nudge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 0;
  background: #f3f1f8;
  color: var(--purple);
  font-weight: 800;
}

.nudge:hover,
.nudge:focus-visible { background: var(--gold); }

.prompt-list { margin: 0; padding-left: 1.2rem; }
.prompt-list li { margin: 8px 0; font-weight: 700; }

.art-card {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 22px rgba(35, 8, 90, 0.08);
}

.art-card:focus-visible { outline: 3px solid var(--gold); }

.pic-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--purple);
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  border-radius: 999px;
  padding: 4px 10px;
  z-index: 1;
}

.pic-stack { display: flex; flex-direction: column; gap: 12px; }

.example {
  background: #f7f5fc;
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.example span {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.end-card {
  max-width: 720px;
  margin: 0 auto 12px;
  text-align: center;
}

.end-card h1 { font-weight: 800; margin: 0 0 8px; }

.score-ring {
  --p: 0;
  width: 124px;
  height: 124px;
  margin: 4px auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  background: conic-gradient(var(--gold) calc(var(--p) * 1%), #ececf2 0);
  position: relative;
}

.score-ring::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: var(--paper);
}

.score-ring strong,
.score-ring span { position: relative; z-index: 1; display: block; }
.score-ring strong { font-size: 1.7rem; }
.score-ring span { color: var(--muted); font-size: 0.82rem; font-weight: 800; }

.result-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  text-align: left;
}

.result-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}

.result-list .ok { color: var(--green); }
.result-list .no { color: var(--danger); }

.saved {
  text-align: left;
  background: #f7f5fc;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.saved p { margin: 0 0 6px; }

.again-btn,
.solid,
.next {
  background: var(--purple);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 800;
}

.again-btn:hover,
.solid:hover,
.next:hover,
.next:focus-visible { background: var(--purple-2); }

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 74px;
  padding: 10px 16px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.tool-wrap { position: relative; }

.tool {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #f4f3f8;
  color: var(--purple);
  font-size: 1.15rem;
}

.tool:hover,
.tool:focus-visible,
.tool[aria-pressed="true"],
.tool[aria-expanded="true"] {
  border-color: var(--purple);
  background: #fff;
}

.copy {
  margin: 0 0 0 8px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.nav-btns { display: flex; gap: 8px; }

.exam.at-start .nav-btns,
.exam.at-end #nextBtn { display: none; }

.back {
  background: #fff;
  color: var(--purple);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
}

.back i { display: none; }

.next.is-locked,
.vol-step:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pop {
  position: absolute;
  bottom: 58px;
  left: 0;
  width: 280px;
  background: #fff;
  color: #241433;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(35, 8, 90, 0.18);
  padding: 12px;
  z-index: 10;
}

.pop-wide { width: min(420px, 80vw); }

.pop-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  margin-bottom: 8px;
}

.pop-close {
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--purple);
}

.vol-row { display: flex; align-items: flex-end; gap: 8px; }

.vol-step {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 0;
  background: #f4f3f8;
  color: var(--purple);
  font-size: 1.3rem;
  font-weight: 800;
}

.vol-bars {
  flex: 1;
  height: 54px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
}

.vol-bars span {
  flex: 1;
  display: block;
  border-radius: 4px 4px 0 0;
  background: #e4e4ea;
  cursor: pointer;
}

.vol-bars span:nth-child(1) { height: 16%; }
.vol-bars span:nth-child(2) { height: 24%; }
.vol-bars span:nth-child(3) { height: 32%; }
.vol-bars span:nth-child(4) { height: 40%; }
.vol-bars span:nth-child(5) { height: 48%; }
.vol-bars span:nth-child(6) { height: 58%; }
.vol-bars span:nth-child(7) { height: 68%; }
.vol-bars span:nth-child(8) { height: 78%; }
.vol-bars span:nth-child(9) { height: 88%; }
.vol-bars span:nth-child(10) { height: 100%; }
.vol-bars span.on { background: var(--purple); }

.a11y-block h3 {
  font-size: 0.92rem;
  font-weight: 800;
  margin: 8px 0;
}

.swatches { display: flex; flex-wrap: wrap; gap: 6px; }

.swatch {
  width: 42px;
  height: 36px;
  border-radius: 8px;
  border: 2px solid transparent;
  font-weight: 800;
  background: #fff;
  color: var(--purple);
}

.swatch.applied { outline: 2px solid var(--purple); }

.sizes .swatch:nth-child(1) { font-size: 12px; }
.sizes .swatch:nth-child(2) { font-size: 15px; }
.sizes .swatch:nth-child(3) { font-size: 18px; }
.sizes .swatch:nth-child(4) { font-size: 22px; }

.help-dialog,
.zoom-dialog {
  border: 0;
  border-radius: 18px;
  padding: 22px;
  width: min(520px, calc(100vw - 32px));
  box-shadow: 0 24px 60px rgba(35, 8, 90, 0.25);
}

.help-dialog::backdrop,
.zoom-dialog::backdrop { background: rgba(18, 4, 46, 0.45); }

.help-dialog h2 { font-weight: 800; font-size: 1.35rem; }

.help-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

.ghost {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
  color: var(--purple);
}

.zoom-dialog { width: min(760px, calc(100vw - 24px)); }
.zoom-dialog svg { width: 100%; height: auto; }

.exam.highlighting .markable { cursor: text; }
.exam.highlighting .markable ::selection { background: #fff100; }
mark { background: #fff100; color: inherit; border-radius: 2px; }

button:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

@media (max-width: 991.98px) {
  .topbar {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand seal"
      "progress progress";
  }
  .brand { grid-area: brand; }
  .seal { grid-area: seal; justify-self: end; }
  .progress-wrap { grid-area: progress; }
  .hud { flex-direction: column; align-items: flex-end; }
  .task-title { padding-right: 0; padding-top: 96px; }
  .brief-grid,
  .options,
  .banks,
  .options.pics { grid-template-columns: 1fr; }
  .start-hero { min-height: 460px; }
  .ring { width: 68px; height: 68px; }
  .foot { flex-direction: column; align-items: stretch; }
  .nav-btns { width: 100%; }
  .nav-btns .back,
  .nav-btns .next { flex: 1; }
  .pop { left: 0; right: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .screen,
  #progressBar,
  .start-btn,
  .mic-live .pids span { animation: none; transition: none; }
}
