/* ==========================================================
   Exam / question-runner styles — designed to feel like the
   real Pearson VUE GED interface: clean white test area, sober
   header with timer + progress, calm focus on the stem.
   ---------------------------------------------------------- */

.exam-shell {
  min-height: 100vh;
  background: #f7f7f5;
  display: grid;
  grid-template-rows: 56px 1fr 80px;
}
@media (prefers-color-scheme: dark) { .exam-shell { background: #16140f; } }

.exam-topbar {
  display: flex; align-items: center; gap: 18px;
  padding: 0 24px;
  background: #1f2937; color: #f4f4f5;
  border-bottom: 1px solid #111827;
  font-size: .92rem;
}
.exam-topbar .brand { color: #fff; }
.exam-topbar .brand-dot { box-shadow: 0 0 0 3px rgba(255,255,255,.18); }
.exam-topbar .timer {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(255,255,255,.08); font-variant-numeric: tabular-nums; font-weight: 600;
}
.exam-topbar .timer.is-low { background: rgba(248,113,113,.22); color: #fecaca; }
.exam-topbar .progress-count { color: #d4d4d8; }

.exam-stage {
  padding: 28px 0;
  overflow-y: auto;
}
.exam-stage .card { max-width: 880px; margin: 0 auto; }
.exam-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 24px;
  background: var(--bg-elev); border-top: 1px solid var(--line);
}
.exam-footer .btn { min-width: 120px; }

/* stem + passage */
.passage-pane {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 20px;
}
.split {
  display: grid; grid-template-columns: 1fr; gap: 16px;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1.1fr 1fr; }
}

.qtype-badge {
  display: inline-block; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  padding: 3px 8px; border-radius: 999px;
  background: var(--brand-tint); color: var(--brand-ink);
}

.stem {
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.55;
  margin: 10px 0 18px;
}

/* multiple choice */
.mc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.mc-list li { display: block; }
.mc-option {
  display: flex; align-items: flex-start; gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-elev); border: 1.5px solid var(--line-strong); border-radius: var(--r);
  cursor: pointer;
  transition: border-color var(--t) var(--ease-out),
              background var(--t) var(--ease-out),
              transform var(--t-fast) var(--ease-out),
              box-shadow var(--t) var(--ease-out);
  text-align: left;
}
.mc-option:hover { border-color: var(--brand); background: var(--brand-tint); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.mc-option[aria-checked="true"] {
  border-color: var(--brand); background: var(--brand-tint); box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 20%, transparent);
}
.mc-option .letter {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-weight: 700; font-size: .88rem;
  background: var(--bg); border: 1.5px solid var(--line-strong);
  color: var(--ink-muted);
  transition: inherit;
}
.mc-option[aria-checked="true"] .letter { background: var(--brand); color: white; border-color: var(--brand); }

/* review state */
.mc-option.is-correct { border-color: var(--ok); background: var(--ok-tint); }
.mc-option.is-correct .letter { background: var(--ok); color: white; border-color: var(--ok); }
.mc-option.is-wrong   { border-color: var(--err); background: var(--err-tint); }
.mc-option.is-wrong .letter   { background: var(--err); color: white; border-color: var(--err); }

/* drop-down blanks */
.dd-blank {
  display: inline-block; min-width: 110px;
  padding: 6px 12px; margin: 0 2px;
  background: var(--bg); border: 1.5px solid var(--brand); border-radius: var(--r-sm);
  font-weight: 600;
}

/* drag-drop */
.dd-items { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.dd-item {
  padding: 8px 14px; border-radius: 999px;
  background: var(--bg-elev); border: 1.5px solid var(--line-strong);
  font-weight: 500; cursor: grab;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t) var(--ease-out), border-color var(--t) var(--ease-out);
  user-select: none;
}
.dd-item.dragging { opacity: .5; cursor: grabbing; }
.dd-item.placed { opacity: .35; pointer-events: none; }
.dd-targets { display: grid; gap: 10px; }
.dd-target {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; min-height: 56px;
  background: var(--bg); border: 2px dashed var(--line-strong); border-radius: var(--r);
  transition: border-color var(--t) var(--ease-out), background var(--t) var(--ease-out);
}
.dd-target .label { font-weight: 700; color: var(--ink-muted); min-width: 36px; }
.dd-target.over { border-color: var(--brand); background: var(--brand-tint); }
.dd-target .slot { flex: 1; }

/* hot spot */
.hotspot-canvas {
  position: relative;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px;
}
.hotspot-svg { width: 100%; height: 90px; }
.hotspot-zone {
  position: absolute; border-radius: var(--r-sm);
  background: color-mix(in oklab, var(--brand) 14%, transparent);
  border: 1.5px dashed color-mix(in oklab, var(--brand) 50%, transparent);
  cursor: pointer;
  transition: background var(--t) var(--ease-out), border-color var(--t) var(--ease-out);
}
.hotspot-zone:hover, .hotspot-zone.selected { background: color-mix(in oklab, var(--brand) 28%, transparent); border-color: var(--brand); border-style: solid; }

/* short answer */
.short-input { max-width: 320px; font-size: 1.15rem; padding: 12px 14px; text-align: center; font-weight: 600; }

/* extended response */
.essay-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 6px;
  background: var(--bg-elev); border: 1px solid var(--line-strong);
  border-bottom: 0;
  border-top-left-radius: var(--r); border-top-right-radius: var(--r);
}
.ess-tool {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 9px; border-radius: 4px;
  background: transparent; border: 1px solid transparent;
  font: inherit; font-size: .86rem;
  color: var(--ink); cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.ess-tool:hover { background: color-mix(in oklab, var(--brand) 8%, transparent); border-color: color-mix(in oklab, var(--brand) 30%, transparent); }
.ess-tool:active { background: color-mix(in oklab, var(--brand) 18%, transparent); }
.ess-tool b { font-weight: 800; }
.ess-tool i { font-style: italic; }
.ess-tool u { text-decoration: underline; }
.ess-tool-sep {
  width: 1px; height: 18px; background: var(--line-strong); margin: 0 4px;
}
.essay-editor {
  min-height: 360px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-top: 0;                                   /* attaches under toolbar */
  border-bottom-left-radius: var(--r); border-bottom-right-radius: var(--r);
  background: var(--bg-elev); outline: none;
  line-height: 1.6; font-size: 1rem;
}
.essay-editor:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 20%, transparent); }
.essay-meta { display: flex; gap: 12px; color: var(--ink-muted); font-size: .9rem; padding-top: 8px; }
.essay-meta .warn-text { color: var(--warn, #b45309); }

/* math symbol palette (short_answer on math items) */
.math-palette {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
}
.math-key {
  min-width: 38px; padding: 6px 10px;
  background: var(--bg-elev); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  font: inherit; font-size: 1rem; cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.math-key:hover { background: var(--brand-tint); border-color: var(--brand); }

/* review explanation */
.explain {
  margin-top: 16px; padding: 14px 16px;
  background: var(--brand-tint); border-radius: var(--r);
  border-left: 4px solid var(--brand);
}
.explain h4 { margin: 0 0 6px; font-size: .92rem; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-ink); }

/* GED-style score band on the result page */
.ged-band { margin-top: 14px; }
.band-track {
  position: relative;
  height: 18px;
  border-radius: 999px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  overflow: hidden;
}
.band-zone {
  position: absolute; top: 0; bottom: 0;
}
.band-zone.z-no     { background: color-mix(in oklab, var(--err)     30%, transparent); }
.band-zone.z-pass   { background: color-mix(in oklab, var(--brand)   28%, transparent); }
.band-zone.z-ready  { background: color-mix(in oklab, var(--ok)      28%, transparent); }
.band-zone.z-credit { background: color-mix(in oklab, var(--science) 30%, transparent); }
.band-marker {
  position: absolute; top: -4px; bottom: -4px;
  width: 4px; border-radius: 2px;
  background: var(--ink);
  box-shadow: 0 0 0 2px var(--bg);
  transform: translateX(-2px);
  transition: left .6s cubic-bezier(.2,.7,.2,1);
}
.band-labels {
  display: flex; justify-content: space-between;
  font-size: .76rem; color: var(--ink-subtle);
  padding: 4px 2px 0; font-variant-numeric: tabular-nums;
}
.band-labels .band-pass-line { color: var(--brand-ink); font-weight: 700; }

/* navigator grid (mock exam review panel) */
.qnav {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
  gap: 6px;
}
.qnav button {
  aspect-ratio: 1; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--bg-elev); font-weight: 600; cursor: pointer;
  transition: inherit;
}
.qnav button.answered { background: var(--brand-tint); border-color: var(--brand); }
.qnav button.flagged { background: var(--warn-tint); border-color: var(--warn); }
.qnav button.current  { box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 40%, transparent); }
