/* ============================================================
 * APEX SALES OS · MODULE RUNNER · full mockup-04 parity
 * Mirrors design-mockups/04-module-runner.html
 *
 * Class taxonomy (all 7 states):
 *   .runner-shell        — 2-col grid (rail | stage)
 *   .runner-rail         — left rail (back, module card, section list, gate)
 *   .runner-stage-wrap   — right stage container
 *   .stage-head          — hero copy + optional gate pill
 *   STATE 01 video:    .video-stage, .video-frame, .video-foot, .watch-strip
 *   STATE 02 unlock:   .unlock-card, .unlock-meta-row
 *   STATE 03 mc:       .q-card, .q-options, .q-foot
 *   STATE 04/05 res:   .results-shell, .results-hero, .score-ring, .results-side
 *   STATE 06 apex:     .apex-stage, .apex-orb, .apex-controls, .apex-stage-side
 *   STATE 07 result:   .result-card, .result-score-ring, .criteria-list
 *
 * Hard rules honored:
 *   - zero red anywhere (failures use --text-faint / --bg-tint / --status-stuck)
 *   - zero emojis (icons are svg via icon.js)
 *   - tokens only (no hardcoded hex except a few RGBA shadows from mockup)
 * ============================================================ */

/* ============================================================
 * SHELL — 2-col grid (rail | stage)
 * ============================================================ */
.runner-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  background: var(--bg-warm);
  min-height: calc(100vh - 56px);
}
.runner-rail {
  background: var(--bg-soft);
  border-right: 1px solid var(--border);
  padding: 22px 18px;
  display: flex; flex-direction: column; gap: 14px;
}
.runner-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text-muted); font-weight: 500;
  padding: 6px 10px; border-radius: var(--radius);
  align-self: flex-start; transition: all var(--t);
  margin-bottom: 4px; text-decoration: none;
}
.runner-back:hover { background: var(--hover); color: var(--text); }

.runner-mod-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 16px 14px;
}
.runner-mod-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.10em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.runner-mod-title {
  font-size: 19px; font-weight: 600;
  letter-spacing: -0.014em;
  margin: 6px 0 4px;
  color: var(--text);
}
.runner-mod-sub {
  font-size: 12px; color: var(--text-muted);
  line-height: 1.5;
}

.section-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px;
  display: flex; flex-direction: column; gap: 2px;
}
.section-step {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  cursor: default;
  transition: all var(--t);
}
.section-step:hover { background: var(--hover); }
.section-step.active {
  background: var(--primary-soft);
  border: 1px solid var(--status-done-bd);
}
.section-step .pip {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-tint);
  border: 1.5px solid var(--border);
  color: var(--text-faint);
  font-size: 11px; font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
}
.section-step.done .pip {
  background: var(--primary); color: #fff;
  border-color: var(--primary);
}
.section-step.active .pip {
  background: var(--surface); color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,91,255,0.10);
}
.section-step .label {
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 500;
  flex: 1;
}
.section-step.done .label   { color: var(--text); }
.section-step.active .label { color: var(--text); font-weight: 600; }
.section-step .meta {
  font-size: 10.5px;
  color: var(--text-faint);
  font-family: 'JetBrains Mono', monospace;
}

.gate-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
}
.gate-card-title {
  font-weight: 600;
  color: var(--text);
  font-size: 12.5px;
  margin-bottom: 6px;
}

/* ============================================================
 * STAGE WRAP — generic
 * ============================================================ */
.runner-stage-wrap {
  padding: 28px 32px 32px;
  min-width: 0;
  display: flex; flex-direction: column;
  gap: 18px;
}

.stage-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 4px;
}
.stage-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  text-transform: uppercase;
  display: flex; align-items: center; gap: 10px;
}
.stage-eyebrow::before {
  content: '';
  width: 14px; height: 1px;
  background: var(--text-faint);
}
.stage-title {
  font-size: 24px; font-weight: 600;
  letter-spacing: -0.018em;
  margin: 6px 0 0;
  color: var(--text);
}
.stage-sub {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 6px 0 0;
  max-width: 720px;
  line-height: 1.5;
}
.gate-pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--status-done-bd);
  padding: 5px 11px;
  border-radius: 99px;
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.02em;
}

/* ============================================================
 * STATE 01 — VIDEO PLAYER
 * ============================================================ */
.video-stage {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.video-frame {
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(60% 60% at 30% 30%, rgba(122,115,255,0.18), transparent 65%),
    radial-gradient(40% 40% at 80% 80%, rgba(99,91,255,0.14), transparent 65%),
    #0b0f1a;
  position: relative;
  overflow: hidden;
}
.video-frame::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at center, black 30%, transparent 80%);
  pointer-events: none;
}
.video-titlebar {
  position: absolute; top: 18px; left: 18px; right: 18px;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 2;
}
.video-tag {
  background: rgba(11,15,26,0.72);
  color: #fff;
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 99px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
  border: 1px solid rgba(255,255,255,0.10);
}
.video-play {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    0 20px 56px -10px rgba(99,91,255,0.6),
    inset 0 0 0 1px rgba(255,255,255,0.22);
  cursor: pointer;
  transition: transform var(--t);
  z-index: 2;
  border: 0;
}
.video-play:hover { transform: translate(-50%, -50%) scale(1.04); }
.video-play svg { margin-left: 5px; }

.video-controls {
  position: absolute; left: 18px; right: 18px; bottom: 18px;
  display: flex; align-items: center; gap: 14px;
  z-index: 2;
}
.video-bar {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: rgba(255,255,255,0.10);
  overflow: hidden;
}
.video-bar-fill {
  height: 100%;
  background: var(--grad);
  border-radius: 99px;
  transition: width 200ms linear;
}
.video-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.video-foot {
  padding: 14px 22px;
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
}
.video-foot-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 8px;
}

/* Watch progress strip */
.watch-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 18px;
  align-items: center;
}
.watch-strip-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.watch-strip-bar {
  height: 6px;
  border-radius: 99px;
  background: var(--bg-tint);
  overflow: hidden;
  max-width: 720px;
}
.watch-strip-bar-fill {
  height: 100%;
  background: var(--grad);
  border-radius: 99px;
  transition: width 200ms linear;
}
.watch-strip-pct {
  font-family: 'Inter Tight', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.020em;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.watch-strip-pct small {
  -webkit-text-fill-color: var(--text-faint);
  color: var(--text-faint);
  font-size: 13px;
  font-weight: 500;
  margin-left: 2px;
  letter-spacing: -0.005em;
}
.watch-strip-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ============================================================
 * STATE 02 — UNLOCK CELEBRATION CARD
 * ============================================================ */
.unlock-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 56px 48px;
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column;
  align-items: center; gap: 22px;
  position: relative; overflow: hidden;
  text-align: center;
}
.unlock-card::before {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 380px; height: 380px;
  background: radial-gradient(50% 50% at 70% 30%, rgba(99,91,255,0.12), transparent 75%);
  pointer-events: none;
}
.unlock-card::after {
  content: '';
  position: absolute; bottom: 0; left: 0;
  width: 260px; height: 260px;
  background: radial-gradient(50% 50% at 30% 70%, rgba(122,115,255,0.10), transparent 75%);
  pointer-events: none;
}
.unlock-icon {
  width: 80px; height: 80px;
  border-radius: 24px;
  background: var(--grad);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow:
    0 16px 40px -10px rgba(99,91,255,0.55),
    inset 0 0 0 1px rgba(255,255,255,0.22);
  position: relative; z-index: 1;
}
.unlock-title {
  font-size: 28px; font-weight: 600;
  letter-spacing: -0.020em;
  margin: 0;
  position: relative; z-index: 1;
  color: var(--text);
}
.unlock-sub {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0;
  line-height: 1.55;
  position: relative; z-index: 1;
}
.unlock-meta-row {
  display: flex;
  gap: 20px;
  padding: 14px 22px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: 4px;
  position: relative; z-index: 1;
}
.unlock-meta-stat { text-align: center; padding: 0 8px; }
.unlock-meta-stat .num {
  font-family: 'Inter Tight', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.020em;
  line-height: 1;
  color: var(--text);
}
.unlock-meta-stat .num.purple {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.unlock-meta-stat .num small {
  font-size: 14px;
  color: var(--text-muted);
  -webkit-text-fill-color: var(--text-muted);
}
.unlock-meta-stat .label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.unlock-meta-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
}
.unlock-actions {
  display: flex; gap: 10px;
  margin-top: 4px;
  position: relative; z-index: 1;
}

/* ============================================================
 * STATE 03 — MC QUESTION
 * ============================================================ */
.q-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 44px 32px;
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; gap: 22px;
  position: relative; overflow: hidden;
}
.q-card::before {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 320px; height: 320px;
  background: radial-gradient(50% 50% at 70% 30%, rgba(99,91,255,0.08), transparent 75%);
  pointer-events: none;
}
.q-progress {
  display: flex; align-items: center; gap: 14px;
  position: relative; z-index: 1;
}
.q-progress-dots {
  display: flex; gap: 4px;
  flex: 1; max-width: 320px;
}
.q-progress-dot {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: var(--bg-tint);
  transition: background var(--t);
}
.q-progress-dot.done   { background: var(--primary); }
.q-progress-dot.active { background: var(--grad); }
.q-progress-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.q-progress-label b { color: var(--text); font-weight: 700; }

.q-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--primary);
  text-transform: uppercase;
  display: flex; align-items: center; gap: 10px;
}
.q-eyebrow::before {
  content: '';
  width: 14px; height: 1px;
  background: var(--primary);
}
.q-prompt {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.30;
  margin: 0;
  max-width: 720px;
  position: relative; z-index: 1;
  color: var(--text);
}

.q-options {
  display: flex; flex-direction: column; gap: 10px;
  position: relative; z-index: 1;
}
.q-option {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--t);
}
.q-option:hover {
  background: var(--hover);
  border-color: var(--border-strong);
}
.q-option.selected {
  background: var(--primary-soft);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,91,255,0.10);
}
.q-option-letter {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  transition: all var(--t);
}
.q-option.selected .q-option-letter {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.22);
}
.q-option-text {
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.5;
  font-weight: 500;
  flex: 1;
}
.q-option-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  color: transparent;
  transition: all var(--t);
  flex-shrink: 0;
}
.q-option.selected .q-option-check {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.q-foot {
  display: flex; align-items: center; gap: 14px;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
  position: relative; z-index: 1;
}
.q-foot-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 8px;
}

/* ============================================================
 * STATE 04/05 — MC RESULTS (pass + fail)
 * ============================================================ */
.results-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
}
.results-shell > * { min-width: 0; }

.results-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 30px 32px;
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; gap: 18px;
  position: relative; overflow: hidden;
}
.results-hero::before {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 280px; height: 280px;
  background: radial-gradient(50% 50% at 70% 30%, rgba(99,91,255,0.10), transparent 75%);
  pointer-events: none;
}
.results-hero.fail::before {
  background: radial-gradient(50% 50% at 70% 30%, rgba(155,161,179,0.10), transparent 75%);
}

.score-ring {
  width: 132px; height: 132px;
  border-radius: 50%;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.score-ring.pass {
  background: conic-gradient(var(--primary) 0 100%, var(--bg-tint) 0 100%);
}
.score-ring.fail {
  background: conic-gradient(var(--text-faint) 0 80%, var(--bg-tint) 80% 100%);
}
.score-ring::before {
  content: '';
  position: absolute; inset: 8px;
  border-radius: 50%;
  background: var(--surface);
}
.score-num {
  position: relative; z-index: 1;
  font-family: 'Inter Tight', sans-serif;
  font-weight: 700;
  letter-spacing: -0.030em;
  font-size: 42px;
  line-height: 1;
  color: var(--text);
}
.score-num.pass {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.score-num.fail { color: var(--text); }
.score-num small {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 1px;
  letter-spacing: -0.010em;
  -webkit-text-fill-color: var(--text-muted);
}

.score-head-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 26px;
  position: relative; z-index: 1;
}
.score-head-body { min-width: 0; }
.score-head-body h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.016em;
  margin: 0;
  color: var(--text);
  overflow-wrap: break-word;
}
.score-head-body p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 6px 0 0;
  line-height: 1.5;
}
.score-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 99px;
  margin-bottom: 10px;
}
.score-tag.pass {
  background: var(--status-done-bg);
  color: var(--status-done-fg);
  border: 1px solid var(--status-done-bd);
}
.score-tag.fail {
  background: var(--status-stuck-bg);
  color: var(--status-stuck-fg);
  border: 1px solid var(--status-stuck-bd);
}

.answers-list {
  display: flex; flex-direction: column; gap: 8px;
  position: relative; z-index: 1;
}
.answer-row {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.answer-row .ico {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.answer-row.pass .ico {
  background: var(--primary);
  color: #fff;
}
.answer-row.fail .ico {
  background: var(--status-stuck-bg);
  color: var(--text);
  border: 1px solid var(--status-stuck-bd);
}
.answer-row .q {
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
  font-weight: 500;
}
.answer-row .meta {
  font-size: 11.5px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.results-actions {
  display: flex; gap: 10px;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
  position: relative; z-index: 1;
}

.results-side {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-xs);
  display: flex; flex-direction: column; gap: 14px;
  align-self: start;
}
.results-side-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.next-up-card {
  border: 1px solid var(--status-done-bd);
  background: var(--primary-soft);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.next-up-card .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 6px;
}
.next-up-card .title {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text);
}
.next-up-card .sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.5;
}
.results-list { display: flex; flex-direction: column; gap: 0; }
.results-list-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  border-top: 1px dashed var(--border);
  font-size: 12.5px;
}
.results-list-row:first-child {
  border-top: 0;
  padding-top: 4px;
}
.results-list-row .lbl {
  color: var(--text-muted);
  flex: 1;
}
.results-list-row .val {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.results-list-row .val.purple {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.results-coach {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.55;
}
.results-coach b { color: var(--text); }

/* ============================================================
 * STATE 06 — APEX LIVE VOICE EXAM
 * ============================================================ */
.apex-stage {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1fr 320px;
  min-height: 540px;
  margin: 28px 32px 32px;
}
.apex-stage-main {
  padding: 40px 44px;
  display: flex; flex-direction: column; gap: 24px;
  position: relative; overflow: hidden;
}
.apex-stage-main::before {
  content: '';
  position: absolute; top: -80px; right: -80px;
  width: 460px; height: 460px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(99,91,255,0.15), transparent 70%);
  pointer-events: none;
}
.apex-orb-stage {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  align-items: center; gap: 16px;
  padding: 8px 0 16px;
}
.apex-orb {
  width: 188px; height: 188px;
  border-radius: 50%;
  background: var(--grad);
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
  box-shadow:
    0 24px 64px -16px rgba(99,91,255,0.6),
    inset 0 0 0 1px rgba(255,255,255,0.22);
}
.apex-orb::before,
.apex-orb::after {
  content: '';
  position: absolute; inset: -14px;
  border-radius: 50%;
  border: 1.5px solid rgba(99,91,255,0.30);
  animation: orbRing 2.6s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.apex-orb::after {
  animation-delay: 1.3s;
  inset: -28px;
}
@keyframes orbRing {
  0%   { opacity: 0.55; transform: scale(0.86); }
  100% { opacity: 0;    transform: scale(1.35); }
}
.apex-orb-wave {
  display: flex; align-items: center; gap: 4px;
  height: 60px;
}
.apex-orb-wave .b {
  width: 4px;
  border-radius: 2px;
  background: #fff;
  animation: orbBar 1s ease-in-out infinite;
}
.apex-orb-wave .b:nth-child(1) { height: 24%; animation-delay:   0ms; }
.apex-orb-wave .b:nth-child(2) { height: 52%; animation-delay:  90ms; }
.apex-orb-wave .b:nth-child(3) { height: 76%; animation-delay: 180ms; }
.apex-orb-wave .b:nth-child(4) { height: 92%; animation-delay: 270ms; }
.apex-orb-wave .b:nth-child(5) { height: 64%; animation-delay: 360ms; }
.apex-orb-wave .b:nth-child(6) { height: 40%; animation-delay: 450ms; }
.apex-orb-wave .b:nth-child(7) { height: 70%; animation-delay: 540ms; }
@keyframes orbBar {
  0%, 100% { transform: scaleY(0.55); opacity: 0.7; }
  50%      { transform: scaleY(1);    opacity: 1;   }
}

.apex-orb-caption { text-align: center; position: relative; z-index: 1; }
.apex-orb-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.apex-orb-line {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.014em;
  line-height: 1.40;
  max-width: 560px;
  margin: 0 auto;
  color: var(--text);
}

.apex-controls {
  display: flex; align-items: center; gap: 14px;
  justify-content: center;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
  margin-top: auto;
  position: relative; z-index: 1;
}
.apex-control-btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-soft);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--t);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
}
.apex-control-btn:hover {
  background: var(--hover);
  color: var(--text);
  border-color: var(--border-strong);
}
.apex-control-btn.primary {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  width: 64px; height: 64px;
  box-shadow:
    0 10px 24px -8px rgba(99,91,255,0.5),
    inset 0 0 0 1px rgba(255,255,255,0.22);
}
.apex-control-btn.danger {
  color: var(--text-muted);
  border-color: var(--border-strong);
}
.apex-control-btn.danger:hover {
  background: var(--hover);
  color: var(--text);
}

/* APEX stage RIGHT — transcript + criteria */
.apex-stage-side {
  background: var(--bg-soft);
  border-left: 1px solid var(--border);
  padding: 22px;
  display: flex; flex-direction: column; gap: 16px;
}
.apex-side-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 14px 12px;
}
.apex-side-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.apex-side-head .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
}
.apex-timer {
  font-family: 'Inter Tight', sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.020em;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.apex-timer-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

.apex-tcript {
  display: flex; flex-direction: column; gap: 7px;
  font-size: 12px;
  line-height: 1.45;
  max-height: 260px;
  overflow: hidden;
  position: relative;
}
.apex-tcript::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--surface));
  pointer-events: none;
}
.apex-tcript .ln { color: var(--text-soft); }
.apex-tcript .ln .who {
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-right: 5px;
}
.apex-tcript .ln .who.apex { color: var(--primary); }
.apex-tcript .ln .who.you  { color: var(--text); }
.apex-tcript .ln.live .who { color: var(--primary); }

.apex-criteria { display: flex; flex-direction: column; gap: 6px; }
.apex-criteria-row {
  display: flex; align-items: center; gap: 9px;
  font-size: 12.5px;
}
.apex-criteria-row .box {
  width: 16px; height: 16px;
  border-radius: 5px;
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.apex-criteria-row.hit .box {
  background: var(--primary);
  color: #fff;
}
.apex-criteria-row .box.empty {
  background: var(--bg-tint);
  border: 1px solid var(--border);
}
.apex-criteria-row.hit .label { color: var(--text); }
.apex-criteria-row .label    { color: var(--text-muted); }

/* ============================================================
 * STATE 07 — APEX RESULT CARD
 * ============================================================ */
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.result-head {
  padding: 32px 36px 26px;
  display: flex; align-items: start;
  gap: 26px;
  border-bottom: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.result-head::before {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 320px; height: 320px;
  background: radial-gradient(50% 50% at 70% 30%, rgba(99,91,255,0.10), transparent 75%);
  pointer-events: none;
}
.result-score-ring {
  width: 120px; height: 120px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  background: conic-gradient(var(--primary) 0 100%, var(--bg-tint) 0 100%);
}
.result-score-ring::before {
  content: '';
  position: absolute; inset: 8px;
  border-radius: 50%;
  background: var(--surface);
}
.result-score-num {
  position: relative; z-index: 1;
  font-family: 'Inter Tight', sans-serif;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.030em;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.result-score-num small {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 2px;
  -webkit-text-fill-color: var(--text-muted);
}
.result-meta {
  flex: 1;
  min-width: 0;
  position: relative; z-index: 1;
}
.result-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--status-done-bg);
  color: var(--status-done-fg);
  border: 1px solid var(--status-done-bd);
  margin-bottom: 10px;
}
.result-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.014em;
  margin: 0 0 6px;
  color: var(--text);
}
.result-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
.result-meta-row {
  display: flex;
  gap: 22px;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.result-meta-row b {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.result-body {
  display: grid;
  grid-template-columns: 1fr 340px;
  min-height: 280px;
}
.result-body-left {
  padding: 24px 28px;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 18px;
}
.result-section-head {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}

.criteria-list { display: flex; flex-direction: column; gap: 8px; }
.criteria-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.criteria-row .ico {
  width: 20px; height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 700;
}
.criteria-row.pass .ico {
  background: var(--primary);
  color: #fff;
}
.criteria-row.fail .ico {
  background: var(--status-stuck-bg);
  color: var(--text);
  border: 1px solid var(--status-stuck-bd);
}
.criteria-row .label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  min-width: 0;
}
.criteria-row .note {
  font-size: 11.5px;
  color: var(--text-muted);
}

.audio-player {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.audio-play {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow:
    0 4px 10px -3px rgba(99,91,255,0.4),
    inset 0 0 0 1px rgba(255,255,255,0.22);
  border: 0;
  cursor: pointer;
}
.audio-wave-still {
  flex: 1;
  height: 30px;
  display: flex; align-items: center; gap: 2px;
}
.audio-wave-still .b {
  flex: 1;
  min-width: 2px;
  max-width: 3px;
  background: var(--text-faint);
  border-radius: 1px;
}
.audio-wave-still .b.played { background: var(--primary); }
.audio-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.result-body-right {
  padding: 24px 22px;
  background: var(--bg-soft);
  display: flex; flex-direction: column; gap: 14px;
}
.next-step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.next-step-card.primary {
  border-color: var(--status-done-bd);
  background: linear-gradient(135deg, rgba(99,91,255,0.04), rgba(99,91,255,0.08));
}
.next-step-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.next-step-card.primary .next-step-meta { color: var(--primary); }
.next-step-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.next-step-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.5;
}
.next-step-card .btn {
  margin-top: 10px;
  width: 100%;
  justify-content: center;
}

/* ============================================================
 * btn-hero — bigger primary CTA used in unlock + results states
 * (extends global .btn-primary)
 * ============================================================ */
.btn-hero {
  padding: 16px 28px;
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: -0.008em;
  border-radius: 12px;
  box-shadow:
    0 1px 1px rgba(0,0,0,0.04),
    inset 0 0 0 1px rgba(255,255,255,0.18),
    0 10px 28px -8px rgba(99,91,255,0.55),
    0 3px 8px -3px rgba(99,91,255,0.40);
}
.btn-xl {
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 550;
}

/* ============================================================
 * RESPONSIVE — collapse rail at narrow widths
 * ============================================================ */
@media (max-width: 1100px) {
  .runner-shell { grid-template-columns: 1fr; }
  .runner-rail  { border-right: 0; border-bottom: 1px solid var(--border); }
  .results-shell { grid-template-columns: 1fr; }
  .result-body   { grid-template-columns: 1fr; }
  .result-body-left { border-right: 0; border-bottom: 1px solid var(--border); }
  .apex-stage    { grid-template-columns: 1fr; }
  .apex-stage-side { border-left: 0; border-top: 1px solid var(--border); }
}
