:root {
  color-scheme: dark;

  /* Studio Broadcast Palette — WCAG AA/AAA checked */
  --bg-deep: #040817;
  --bg-mid: #081233;
  --bg-panel: #0c1a47;
  --bg-panel-elevated: #11235c;
  --bg-card: #0a153a;

  --border-steel: #5f8fe0;
  --border-bright: #9ec5ff;
  --border-subtle: rgba(126, 173, 255, 0.34);

  --gold-300: #ffe494;
  --gold-400: #f6c952;
  --gold-500: #e5a91f;
  --gold-ink: #071026;

  --amber-bg: #f59e0b;
  --amber-bright: #fbbf24;
  --amber-ink: #070f24;

  --emerald-bg: #10b981;
  --emerald-bright: #34d399;
  --emerald-ink: #021a12;

  --crimson-bg: #dc2626;
  --crimson-border: #fca5a5;
  --crimson-ink: #ffffff;

  --text-primary: #f4f7ff;
  --text-secondary: #c5d5f7;
  --text-muted: #93addc;

  --focus-ring: #ffe074;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-block-size: 100dvb;
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(37, 99, 235, 0.36), transparent 72%),
    radial-gradient(ellipse 50% 45% at 15% 85%, rgba(29, 78, 216, 0.24), transparent 70%),
    radial-gradient(ellipse 50% 45% at 85% 85%, rgba(180, 122, 16, 0.14), transparent 70%),
    linear-gradient(180deg, #060e28 0%, #040817 55%, #030612 100%);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}

/* Ambient Studio Beams (opt-in motion + user pause toggle) */
.studio-beams {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: clip;
  opacity: 0.45;
}

.studio-beam {
  position: absolute;
  inset-block-start: -18%;
  inline-size: 36%;
  block-size: 135%;
  background: linear-gradient(180deg, rgba(114, 172, 255, 0.22), rgba(59, 130, 246, 0.04) 65%, transparent);
  transform-origin: top center;
  filter: blur(18px);
}

.studio-beam--left {
  inset-inline-start: 10%;
  transform: rotate(-16deg);
}

.studio-beam--right {
  inset-inline-end: 10%;
  transform: rotate(16deg);
}

@media (prefers-reduced-motion: no-preference) {
  body:not([data-motion="paused"]) .studio-beam--left {
    animation: beamSwayLeft 18s ease-in-out infinite alternate;
  }

  body:not([data-motion="paused"]) .studio-beam--right {
    animation: beamSwayRight 21s ease-in-out infinite alternate;
  }
}

@keyframes beamSwayLeft {
  from { transform: rotate(-18deg) translate3d(0, 0, 0); opacity: 0.35; }
  to { transform: rotate(-6deg) translate3d(2%, 0, 0); opacity: 0.65; }
}

@keyframes beamSwayRight {
  from { transform: rotate(18deg) translate3d(0, 0, 0); opacity: 0.35; }
  to { transform: rotate(6deg) translate3d(-2%, 0, 0); opacity: 0.65; }
}

/* Visually Hidden Utility (with focus-within opt-out for skip links) */
.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.skip-link:focus-visible {
  position: fixed;
  inset-block-start: 1rem;
  inset-inline-start: 1rem;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-pill);
  background: var(--gold-400);
  color: var(--gold-ink);
  font-weight: 800;
  text-decoration: none;
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

/* Focus Indicators — unclipped, high contrast */
:where(a:any-link, button, input, select, summary):focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

svg {
  display: block;
}

/* App Shell */
.app-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  inline-size: 100%;
  max-inline-size: 1380px;
  margin-inline: auto;
  padding-inline: clamp(0.75rem, 2vw, 1.5rem);
  padding-block: 0.75rem 1rem;
  gap: 0.9rem;
}

/* Header */
.studio-header {
  display: flex;
  flex-wrap: wrap;
  align-items: safe center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(16, 34, 92, 0.92), rgba(9, 20, 56, 0.95));
  border: 1.5px solid var(--border-steel);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(190, 218, 255, 0.25);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-inline-size: 0;
}

.brand-emblem {
  inline-size: 46px;
  block-size: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #244db8, #0b1b52 72%);
  border: 2px solid var(--gold-400);
  box-shadow: 0 0 16px rgba(246, 201, 82, 0.32);
  color: var(--gold-300);
  font-weight: 900;
  font-size: 1.2rem;
}

.brand-text {
  min-inline-size: 0;
}

.brand-title {
  margin: 0;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gold-300);
  line-height: 1.15;
}

.brand-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.header-controls {
  display: flex;
  flex-wrap: wrap;
  flex-wrap: balance;
  align-items: safe center;
  gap: 0.5rem;
}

.ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-block-size: 40px;
  min-inline-size: 40px;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-steel);
  background: rgba(15, 32, 86, 0.88);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.ctrl-btn:hover {
  background: rgba(31, 63, 150, 0.95);
  border-color: var(--gold-400);
}

.ctrl-btn[aria-pressed="false"] {
  border-color: var(--border-subtle);
  color: var(--text-muted);
}

.ctrl-btn--gold {
  background: linear-gradient(180deg, var(--gold-400), var(--gold-500));
  border-color: var(--gold-300);
  color: var(--gold-ink);
  font-weight: 800;
}

.ctrl-btn--gold:hover {
  background: linear-gradient(180deg, var(--gold-300), var(--gold-400));
  color: var(--gold-ink);
}

.ctrl-btn--danger {
  border-color: #f87171;
  background: rgba(153, 27, 27, 0.55);
  color: #fee2e2;
}

.ctrl-btn--danger:hover {
  background: rgba(185, 28, 28, 0.85);
  border-color: #fecaca;
}

.ctrl-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Views */
.view[hidden] {
  display: none !important;
}

/* =====================================================
   START / SETUP VIEW
   ===================================================== */
.start-view {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
  gap: 1.25rem;
  align-items: start;
  flex: 1 0 auto;
}

@media (max-width: 900px) {
  .start-view {
    grid-template-columns: 1fr;
  }
}

.studio-card {
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(14, 30, 82, 0.94), rgba(8, 17, 48, 0.97));
  border: 1.5px solid var(--border-steel);
  padding: clamp(1.15rem, 2.5vw, 1.85rem);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(190, 218, 255, 0.22);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  background: rgba(246, 201, 82, 0.14);
  border: 1px solid rgba(246, 201, 82, 0.55);
  color: var(--gold-300);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-block-end: 0.8rem;
}

.hero-heading {
  margin: 0 0 0.65rem;
  font-size: clamp(1.55rem, 3.2vw, 2.35rem);
  line-height: 1.15;
  font-weight: 900;
  color: #ffffff;
}

.hero-heading span {
  color: var(--gold-300);
}

.hero-lead {
  margin: 0 0 1.25rem;
  color: var(--text-secondary);
  font-size: 1rem;
  max-inline-size: 62ch;
}

.setup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.95rem;
  margin-block-end: 1.25rem;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.field-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-300);
  letter-spacing: 0.02em;
}

.field-input,
.field-select {
  min-block-size: 44px;
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  border: 1.5px solid var(--border-steel);
  background-color: #060f2b;
  color: var(--text-primary);
  font: inherit;
  font-size: 0.95rem;
}

.field-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.mode-pills {
  display: flex;
  flex-wrap: wrap;
  flex-wrap: balance;
  gap: 0.5rem;
  margin-block: 0.35rem 1.2rem;
}

.toggle-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-block-size: 42px;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-subtle);
  background: rgba(8, 18, 52, 0.88);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
}

.toggle-chip input {
  inline-size: 18px;
  block-size: 18px;
  accent-color: var(--gold-400);
  cursor: pointer;
}

.toggle-chip:has(input:checked) {
  border-color: var(--gold-400);
  background: rgba(246, 201, 82, 0.14);
  color: #ffffff;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: safe center;
}

.primary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-block-size: 52px;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-pill);
  border: 2px solid var(--gold-300);
  background: linear-gradient(180deg, #ffd978, #e5a91f);
  color: var(--gold-ink);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(229, 169, 31, 0.32);
  transition: transform 0.16s ease, filter 0.16s ease;
}

.primary-cta:hover {
  filter: brightness(1.06);
}

@media (prefers-reduced-motion: no-preference) {
  .primary-cta:hover {
    transform: translateY(-1px);
  }
}

.secondary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-block-size: 52px;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-bright);
  background: rgba(20, 44, 114, 0.86);
  color: #ffffff;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.secondary-cta:hover {
  background: rgba(34, 70, 168, 0.95);
  border-color: var(--gold-400);
}

.lo-summary-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.lo-summary-item {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  background: rgba(5, 13, 38, 0.75);
  border: 1px solid var(--border-subtle);
  font-size: 0.88rem;
}

.lo-code {
  flex: 0 0 auto;
  padding: 0.15rem 0.52rem;
  border-radius: 7px;
  background: rgba(95, 143, 224, 0.22);
  border: 1px solid var(--border-steel);
  color: var(--gold-300);
  font-weight: 800;
  font-size: 0.78rem;
}

.feature-highlights {
  margin-block-start: 1rem;
  padding-block-start: 1rem;
  border-block-start: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.feature-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  background: rgba(17, 35, 92, 0.7);
  border: 1px solid var(--border-subtle);
}

/* =====================================================
   FASTEST FINGER FIRST VIEW
   ===================================================== */
.fff-view {
  max-inline-size: 860px;
  inline-size: 100%;
  margin-inline: auto;
}

.fff-timer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-block-end: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(6, 15, 42, 0.9);
  border: 1.5px solid var(--gold-400);
}

.fff-clock {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gold-300);
}

.fff-slots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  margin-block: 1rem;
}

@media (max-width: 680px) {
  .fff-slots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.fff-slot {
  min-block-size: 68px;
  padding: 0.6rem 0.7rem;
  border-radius: 12px;
  border: 1.5px dashed var(--border-steel);
  background: rgba(5, 12, 34, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
}

.fff-slot--filled {
  border-style: solid;
  border-color: var(--gold-400);
  background: rgba(246, 201, 82, 0.14);
}

.fff-slot-num {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--gold-300);
}

.fff-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-block: 1rem;
}

@media (max-width: 640px) {
  .fff-options {
    grid-template-columns: 1fr;
  }
}

.fff-option-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-block-size: 56px;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  border: 1.5px solid var(--border-steel);
  background: linear-gradient(180deg, #102563, #0a1742);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  text-align: start;
  cursor: pointer;
}

.fff-option-btn:hover:not(:disabled) {
  border-color: var(--gold-400);
  background: linear-gradient(180deg, #19378a, #0e2260);
}

.fff-option-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* =====================================================
   MAIN HOT SEAT GAME STUDIO LAYOUT
   ===================================================== */
.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  grid-template-areas: "stage sidebar";
  gap: 1.1rem;
  align-items: start;
  flex: 1 0 auto;
}

@media (max-width: 1020px) {
  .game-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "stage"
      "sidebar";
  }
}

.stage-column {
  grid-area: stage;
  container: stage / inline-size;
  min-inline-size: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.sidebar-column {
  grid-area: sidebar;
  min-inline-size: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* Status Ribbon above Question */
.stage-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: safe center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(9, 20, 56, 0.92);
  border: 1.5px solid var(--border-subtle);
}

.meta-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.72rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.pill--prize {
  background: linear-gradient(180deg, var(--gold-400), var(--gold-500));
  color: var(--gold-ink);
}

.pill--lo {
  background: rgba(59, 130, 246, 0.24);
  border: 1px solid var(--border-steel);
  color: #dbeafe;
}

.pill--tag {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.55);
  color: #a7f3d0;
}

.pill--safe {
  background: rgba(246, 201, 82, 0.16);
  border: 1px solid var(--gold-400);
  color: var(--gold-300);
}

.stage-timer {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--gold-400);
  background: rgba(6, 14, 40, 0.92);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--gold-300);
}

.stage-timer[data-urgent="true"] {
  border-color: #f87171;
  background: rgba(153, 27, 27, 0.75);
  color: #ffffff;
}

/* Iconic Millionaire Question Lozenge */
.question-box-wrap {
  position: relative;
  padding-inline: clamp(0.4rem, 1.5cqi, 1.1rem);
}

.question-box-wrap::before,
.question-box-wrap::after {
  content: "";
  position: absolute;
  inset-block-start: 50%;
  block-size: 2px;
  inline-size: clamp(0.4rem, 1.5cqi, 1.1rem);
  background: linear-gradient(90deg, var(--border-steel), var(--gold-400));
  transform: translateY(-50%);
}

.question-box-wrap::before { inset-inline-start: 0; }
.question-box-wrap::after { inset-inline-end: 0; }

.question-box {
  position: relative;
  padding: clamp(1.1rem, 2.8cqi, 1.75rem) clamp(1.25rem, 3.2cqi, 2.2rem);
  border-radius: 24px;
  background:
    radial-gradient(ellipse 85% 90% at 50% 0%, rgba(44, 93, 214, 0.34), transparent 70%),
    linear-gradient(180deg, #0e215e 0%, #071238 100%);
  border: 2px solid var(--border-bright);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(246, 201, 82, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  text-align: center;
}

.question-heading {
  margin: 0;
  font-size: clamp(1.08rem, 2.35cqi, 1.42rem);
  font-weight: 800;
  line-height: 1.38;
  color: #ffffff;
}

/* Section A Exam Resource / Data Card inside Question Box */
.exam-data-card {
  margin-block-start: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  background: rgba(4, 10, 29, 0.88);
  border: 1.5px solid rgba(246, 201, 82, 0.55);
  text-align: start;
  overflow-x: auto;
}

.exam-data-card table {
  inline-size: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.exam-data-card caption {
  text-align: start;
  font-weight: 800;
  color: var(--gold-300);
  margin-block-end: 0.45rem;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.exam-data-card th,
.exam-data-card td {
  padding: 0.4rem 0.6rem;
  border-block-end: 1px solid var(--border-subtle);
  text-align: start;
}

.exam-data-card th {
  color: var(--gold-300);
  font-weight: 700;
  background: rgba(25, 51, 128, 0.42);
}

/* Active Lifeline Intel Banner (keeps Phone/Audience/Host intel visible!) */
.lifeline-intel {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.intel-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem 0.9rem;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  background: rgba(10, 25, 72, 0.92);
  border: 1.5px solid var(--gold-400);
  font-size: 0.9rem;
}

.intel-card strong {
  color: var(--gold-300);
}

.intel-reopen-btn {
  min-block-size: 34px;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-bright);
  background: rgba(24, 52, 133, 0.85);
  color: #ffffff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.intel-reopen-btn:hover {
  border-color: var(--gold-400);
  background: rgba(38, 75, 178, 0.95);
}

/* 2x2 Answer Grid — unclipped button for focus rings, diamond bevel inside! */
.answers-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

@container stage (inline-size < 580px) {
  .answers-grid {
    grid-template-columns: 1fr;
  }
}

.answer-btn {
  position: relative;
  display: block;
  inline-size: 100%;
  min-block-size: 74px;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.answer-btn:disabled {
  cursor: default;
}

/* Inner hexagonal Millionaire lozenge frame — clip/bevel stays separate from button focus ring */
.answer-frame {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-block-size: 74px;
  padding: 0.8rem 1.15rem;
  border-radius: 18px;
  background: linear-gradient(180deg, #102463 0%, #091640 100%);
  border: 2px solid var(--border-steel);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(190, 218, 255, 0.24);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.answer-btn:hover:not(:disabled) .answer-frame {
  background: linear-gradient(180deg, #193892 0%, #0f2465 100%);
  border-color: var(--gold-400);
}

.answer-letter {
  display: inline-grid;
  place-items: center;
  inline-size: 34px;
  block-size: 34px;
  border-radius: 10px;
  background: rgba(246, 201, 82, 0.16);
  border: 1.5px solid var(--gold-400);
  color: var(--gold-300);
  font-weight: 900;
  font-size: 0.95rem;
  transform: rotate(0deg);
}

.answer-text {
  font-size: clamp(0.92rem, 1.65cqi, 1.03rem);
  font-weight: 650;
  line-height: 1.35;
  min-inline-size: 0;
}

.answer-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.answer-status-badge:empty {
  display: none;
}

/* Answer States (Color + Icon + Text Badge — WCAG 1.4.1) */
.answer-btn[data-state="selected"] .answer-frame,
.answer-btn[data-state="locked"] .answer-frame {
  background: linear-gradient(180deg, var(--amber-bright) 0%, var(--amber-bg) 100%);
  border-color: #fff3c4;
  color: var(--amber-ink);
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.45);
}

.answer-btn[data-state="selected"] .answer-letter,
.answer-btn[data-state="locked"] .answer-letter {
  background: #071026;
  border-color: #071026;
  color: var(--gold-300);
}

.answer-btn[data-state="selected"] .answer-status-badge,
.answer-btn[data-state="locked"] .answer-status-badge {
  background: #071026;
  color: var(--gold-300);
}

.answer-btn[data-state="correct"] .answer-frame {
  background: linear-gradient(180deg, var(--emerald-bright) 0%, var(--emerald-bg) 100%);
  border-color: #d1fae5;
  color: var(--emerald-ink);
  box-shadow: 0 0 28px rgba(52, 211, 153, 0.52);
}

.answer-btn[data-state="correct"] .answer-letter {
  background: #022c22;
  border-color: #022c22;
  color: #a7f3d0;
}

.answer-btn[data-state="correct"] .answer-status-badge {
  background: #022c22;
  color: #a7f3d0;
}

/* Gentle glow pulse (<= 1.25 cycles/sec — well under WCAG 2.3.1 3-flash limit!) */
@media (prefers-reduced-motion: no-preference) {
  body:not([data-motion="paused"]) .answer-btn[data-state="correct"] .answer-frame {
    animation: gentleCorrectGlow 0.9s ease-in-out 2;
  }
}

@keyframes gentleCorrectGlow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.018); }
}

.answer-btn[data-state="wrong"] .answer-frame {
  background: linear-gradient(180deg, #ef4444 0%, var(--crimson-bg) 100%);
  border-color: var(--crimson-border);
  color: var(--crimson-ink);
  box-shadow: 0 0 24px rgba(220, 38, 38, 0.45);
}

.answer-btn[data-state="wrong"] .answer-letter {
  background: #450a0a;
  border-color: #fecaca;
  color: #ffffff;
}

.answer-btn[data-state="wrong"] .answer-status-badge {
  background: #450a0a;
  color: #fecaca;
}

.answer-btn[data-state="eliminated"] .answer-frame {
  background: rgba(6, 14, 38, 0.48);
  border-color: rgba(100, 116, 139, 0.35);
  border-style: dashed;
  color: var(--text-muted);
  opacity: 0.48;
  box-shadow: none;
}

.answer-btn[data-state="eliminated"] .answer-text {
  text-decoration: line-through;
}

/* Stage Action Bar & Examiner Feedback Panel */
.stage-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: safe center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(9, 20, 56, 0.9);
  border: 1.5px solid var(--border-subtle);
}

.action-prompt {
  margin: 0;
  font-size: 0.94rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.action-prompt strong {
  color: var(--gold-300);
}

.action-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.examiner-panel {
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  background: linear-gradient(180deg, rgba(13, 29, 78, 0.96), rgba(7, 16, 46, 0.98));
  border: 2px solid var(--border-bright);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.examiner-panel[data-outcome="correct"] {
  border-color: var(--emerald-bright);
}

.examiner-panel[data-outcome="wrong"] {
  border-color: #f87171;
}

.examiner-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-block-end: 0.65rem;
}

.examiner-verdict {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 900;
}

.examiner-panel[data-outcome="correct"] .examiner-verdict {
  color: var(--emerald-bright);
}

.examiner-panel[data-outcome="wrong"] .examiner-verdict {
  color: #fca5a5;
}

.examiner-explanation {
  margin: 0 0 0.7rem;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.exam-tip-box {
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  background: rgba(246, 201, 82, 0.12);
  border-inline-start: 4px solid var(--gold-400);
  font-size: 0.88rem;
  color: #fef3c7;
  margin-block-end: 0.9rem;
}

.exam-tip-box strong {
  color: var(--gold-300);
}

/* =====================================================
   SIDEBAR: LIFELINES + 15-RUNG MONEY LADDER
   ===================================================== */
.sidebar-panel {
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(13, 28, 76, 0.94), rgba(7, 15, 42, 0.97));
  border: 1.5px solid var(--border-steel);
  padding: 0.95rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.42);
}

.sidebar-title {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-300);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.lifelines-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.lifeline-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-block-size: 62px;
  padding: 0.5rem 0.45rem;
  border-radius: 999px;
  border: 2px solid var(--border-bright);
  background: radial-gradient(ellipse at 50% 25%, #1f44a8, #0b1b4f 78%);
  color: #ffffff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, opacity 0.18s ease;
}

.lifeline-btn:hover:not(:disabled) {
  border-color: var(--gold-400);
  background: radial-gradient(ellipse at 50% 25%, #2b59cf, #122872 78%);
}

.lifeline-btn[data-used="true"] {
  opacity: 0.48;
  border-color: #f87171;
  background: rgba(15, 23, 42, 0.8);
  cursor: not-allowed;
}

.lifeline-btn[data-used="true"]::after {
  content: "USED";
  position: absolute;
  inset-block-start: -7px;
  inset-inline-end: 8px;
  padding: 0.08rem 0.4rem;
  border-radius: var(--radius-pill);
  background: var(--crimson-bg);
  color: #ffffff;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.lifeline-icon {
  color: var(--gold-300);
  font-weight: 900;
  font-size: 0.95rem;
  line-height: 1;
}

/* Money Ladder */
.money-ladder {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.ladder-rung {
  display: grid;
  grid-template-columns: 28px 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gold-400);
  border: 1px solid transparent;
}

.ladder-rung[data-safe="true"] {
  color: #ffffff;
  background: rgba(246, 201, 82, 0.11);
  border-color: rgba(246, 201, 82, 0.35);
}

.ladder-rung[data-passed="true"] {
  color: #93c5fd;
}

.ladder-rung[data-current="true"] {
  background: linear-gradient(90deg, var(--amber-bg), var(--amber-bright));
  color: var(--amber-ink);
  border-color: #fff3c4;
  font-weight: 900;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.35);
}

.rung-num {
  text-align: end;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  opacity: 0.88;
}

.rung-diamond {
  text-align: center;
  font-size: 0.72rem;
}

.rung-amount {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.rung-badge {
  font-size: 0.67rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.38rem;
  border-radius: 6px;
  background: rgba(246, 201, 82, 0.2);
  color: var(--gold-300);
}

.ladder-rung[data-current="true"] .rung-badge {
  background: #071026;
  color: var(--gold-300);
}

.custom-safe-box {
  margin-block-start: 0.65rem;
  padding: 0.65rem;
  border-radius: 12px;
  background: rgba(246, 201, 82, 0.11);
  border: 1px solid rgba(246, 201, 82, 0.45);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.keyboard-legend {
  margin-block-start: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
}

kbd {
  display: inline-block;
  padding: 0.08rem 0.36rem;
  border-radius: 5px;
  border: 1px solid var(--border-steel);
  background: #071130;
  color: var(--gold-300);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
}

/* =====================================================
   END-OF-GAME GIANT CHEQUE & DIAGNOSTIC REPORT
   ===================================================== */
.end-view {
  display: grid;
  gap: 1.2rem;
  max-inline-size: 1060px;
  inline-size: 100%;
  margin-inline: auto;
}

.cheque-card {
  position: relative;
  border-radius: 20px;
  padding: clamp(1.2rem, 3vw, 2rem);
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(246, 201, 82, 0.05) 0 10px,
      transparent 10px 20px
    ),
    linear-gradient(135deg, #0d2159 0%, #153482 50%, #0b1a4a 100%);
  border: 3px solid var(--gold-400);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), inset 0 0 0 4px rgba(246, 201, 82, 0.16);
}

.cheque-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem;
  padding-block-end: 0.75rem;
  border-block-end: 1.5px solid rgba(246, 201, 82, 0.42);
  margin-block-end: 1rem;
}

.cheque-bank {
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-300);
  font-size: 0.95rem;
}

.cheque-date {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.cheque-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
}

@media (max-width: 680px) {
  .cheque-body {
    grid-template-columns: 1fr;
  }
}

.cheque-payee-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.cheque-payee {
  font-size: clamp(1.3rem, 2.8vw, 1.85rem);
  font-weight: 900;
  color: #ffffff;
  border-block-end: 1.5px dashed rgba(255, 255, 255, 0.35);
  padding-block-end: 0.25rem;
  margin-block: 0.2rem 0.6rem;
}

.cheque-words {
  font-style: italic;
  color: var(--gold-300);
  font-size: 0.98rem;
}

.cheque-amount-box {
  padding: 0.75rem 1.3rem;
  border-radius: 14px;
  background: #060f2b;
  border: 2px solid var(--gold-400);
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 3.6vw, 2.4rem);
  font-weight: 900;
  color: var(--gold-300);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}

.lo-report-card {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(6, 15, 42, 0.85);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.lo-meter-track {
  block-size: 10px;
  border-radius: var(--radius-pill);
  background: rgba(148, 163, 184, 0.2);
  overflow: clip;
}

.lo-meter-fill {
  block-size: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--gold-500), var(--emerald-bright));
}

.review-list {
  display: grid;
  gap: 0.7rem;
  margin-block-start: 0.75rem;
}

.review-item {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(6, 15, 42, 0.82);
  border-inline-start: 4px solid var(--border-steel);
  border-block: 1px solid var(--border-subtle);
  border-inline-end: 1px solid var(--border-subtle);
}

.review-item[data-correct="true"] {
  border-inline-start-color: var(--emerald-bright);
}

.review-item[data-correct="false"] {
  border-inline-start-color: #f87171;
}

/* =====================================================
   NATIVE <dialog> MODALS (modern-web-guidance compliant)
   ===================================================== */
dialog {
  margin: auto;
  padding: 0;
  inline-size: min(94dvw, 620px);
  max-block-size: 88dvb;
  border-radius: 22px;
  border: 2px solid var(--border-bright);
  background: linear-gradient(180deg, #102460 0%, #071236 100%);
  color: var(--text-primary);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(246, 201, 82, 0.28);
  opacity: 0;
  overflow: auto;
  scrollbar-gutter: stable;

  transition-property: opacity, transform, display, overlay;
  transition-duration: 0.26s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;

  @media (prefers-reduced-motion: no-preference) {
    transform: scale(0.94);
  }
}

dialog.dialog--wide {
  inline-size: min(95dvw, 860px);
}

dialog[open]:where(:not([data-closing])) {
  opacity: 1;

  @starting-style {
    opacity: 0;
  }

  @media (prefers-reduced-motion: no-preference) {
    transform: scale(1);

    @starting-style {
      transform: scale(0.94);
    }
  }

  &::backdrop {
    background-color: rgba(2, 6, 20, 0.78);

    @starting-style {
      background-color: rgba(2, 6, 20, 0);
    }
  }
}

/* MANDATORY: Prevent scroll chaining under modal dialog (progressive enhancement) */
dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background-color: rgba(2, 6, 20, 0);
  backdrop-filter: blur(4px);
  transition-property: background-color, display, overlay;
  transition-duration: 0.26s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
}

@media (prefers-reduced-motion: reduce) {
  dialog,
  dialog::backdrop {
    transition-duration: 0.1s;
  }
}

.dialog-inner {
  padding: 1.35rem 1.45rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block-end: 0.75rem;
  border-block-end: 1px solid var(--border-subtle);
}

.dialog-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--gold-300);
  line-height: 1.25;
}

.dialog-close-btn {
  flex: 0 0 auto;
  min-inline-size: 40px;
  min-block-size: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border-steel);
  background: rgba(6, 15, 42, 0.9);
  color: #ffffff;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 800;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.dialog-close-btn:hover {
  border-color: var(--gold-400);
  background: rgba(31, 63, 150, 0.95);
}

.dialog-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
  padding-block-start: 0.75rem;
  border-block-start: 1px solid var(--border-subtle);
}

/* =====================================================
   PHONE A FRIEND SIMULATOR UI
   ===================================================== */
.friends-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

@media (max-width: 540px) {
  .friends-grid {
    grid-template-columns: 1fr;
  }
}

.friend-card-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  border: 1.5px solid var(--border-steel);
  background: rgba(7, 16, 46, 0.92);
  color: var(--text-primary);
  font: inherit;
  text-align: start;
  cursor: pointer;
  min-block-size: 74px;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.friend-card-btn:hover {
  border-color: var(--gold-400);
  background: rgba(20, 44, 114, 0.92);
}

.friend-avatar {
  flex: 0 0 46px;
  inline-size: 46px;
  block-size: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1rem;
  color: var(--gold-ink);
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  border: 2px solid #ffffff;
}

.friend-name {
  font-weight: 800;
  color: #ffffff;
  display: block;
}

.friend-role {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: block;
}

/* Simulated Messenger Thread */
.phone-device {
  border-radius: 18px;
  background: #050b1f;
  border: 2px solid var(--border-steel);
  overflow: clip;
}

.phone-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  background: rgba(16, 35, 92, 0.9);
  border-block-end: 1px solid var(--border-subtle);
}

.phone-timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  background: rgba(246, 201, 82, 0.18);
  border: 1px solid var(--gold-400);
  font-family: var(--font-mono);
  font-weight: 900;
  color: var(--gold-300);
  font-size: 0.9rem;
}

.chat-thread {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-block-size: 180px;
}

.chat-bubble {
  max-inline-size: 90%;
  padding: 0.75rem 0.95rem;
  border-radius: 16px;
  font-size: 0.93rem;
  line-height: 1.45;
}

.chat-bubble--me {
  align-self: flex-end;
  background: #1d4ed8;
  color: #ffffff;
  border-end-end-radius: 4px;
}

.chat-bubble--friend {
  align-self: flex-start;
  background: #13255e;
  border: 1.5px solid var(--border-steel);
  color: #f8fafc;
  border-end-start-radius: 4px;
}

.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.86rem;
  color: var(--text-secondary);
  font-style: italic;
}

.confidence-box {
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: rgba(11, 24, 66, 0.95);
  border: 1.5px solid var(--gold-400);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.confidence-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.confidence-pick {
  font-size: 1rem;
  font-weight: 900;
  color: #ffffff;
}

.confidence-pick span {
  color: var(--gold-300);
}

.confidence-score {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 900;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  background: var(--gold-400);
  color: var(--gold-ink);
}

.confidence-meter-track {
  block-size: 12px;
  border-radius: var(--radius-pill);
  background: rgba(148, 163, 184, 0.22);
  overflow: clip;
}

.confidence-meter-fill {
  block-size: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, #f59e0b 0%, #34d399 100%);
  transition: inline-size 0.5s ease-out;
}

.confidence-note {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* =====================================================
   ASK THE AUDIENCE CHART + SEMANTIC TABLE
   ===================================================== */
.audience-chart {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: end;
  block-size: 210px;
  padding: 1rem 0.75rem 0.5rem;
  border-radius: 16px;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(148, 163, 184, 0.14) 0 1px,
      transparent 1px 42px
    ),
    #050c24;
  border: 1.5px solid var(--border-steel);
}

.audience-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  block-size: 100%;
  gap: 0.35rem;
}

.audience-pct {
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 0.95rem;
  color: var(--gold-300);
}

.audience-bar-track {
  inline-size: min(56px, 75%);
  flex: 1 1 auto;
  display: flex;
  align-items: flex-end;
  background: rgba(30, 58, 138, 0.25);
  border-radius: 10px 10px 4px 4px;
  overflow: clip;
}

.audience-bar-fill {
  inline-size: 100%;
  background: linear-gradient(180deg, var(--gold-300) 0%, #3b82f6 55%, #1d4ed8 100%);
  border-radius: 8px 8px 0 0;
  transition: block-size 0.6s ease-out;
}

.audience-label {
  font-weight: 900;
  color: #ffffff;
  font-size: 0.95rem;
}

.audience-table {
  inline-size: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.audience-table caption {
  text-align: start;
  font-weight: 700;
  color: var(--text-secondary);
  margin-block-end: 0.4rem;
}

.audience-table th,
.audience-table td {
  padding: 0.45rem 0.65rem;
  border-block-end: 1px solid var(--border-subtle);
  text-align: start;
}

.audience-table th {
  color: var(--gold-300);
}

/* Bank Viewer */
.bank-filter-row {
  display: flex;
  flex-wrap: wrap;
  flex-wrap: balance;
  gap: 0.45rem;
}

.bank-list {
  display: grid;
  gap: 0.65rem;
  max-block-size: 52dvb;
  overflow-y: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  padding-inline-end: 0.3rem;
}

.bank-item {
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: rgba(6, 15, 42, 0.88);
  border: 1px solid var(--border-subtle);
  font-size: 0.88rem;
}

/* Footer */
.studio-footer {
  text-align: center;
  padding-block: 0.5rem 0.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* =====================================================
   FORCED COLORS MODE (Windows High Contrast — WCAG)
   ===================================================== */
@media (forced-colors: active) {
  .studio-beams {
    display: none;
  }

  .studio-header,
  .studio-card,
  .question-box,
  .answer-frame,
  .sidebar-panel,
  .lifeline-btn,
  .ctrl-btn,
  .primary-cta,
  .secondary-cta,
  .intel-card,
  .examiner-panel,
  .cheque-card,
  dialog {
    border: 2px solid ButtonBorder;
  }

  .answer-btn[data-state="selected"] .answer-frame,
  .answer-btn[data-state="locked"] .answer-frame,
  .answer-btn[data-state="correct"] .answer-frame,
  .ladder-rung[data-current="true"] {
    border: 3px solid Highlight;
    outline: 2px solid Highlight;
  }

  .answer-btn[data-state="eliminated"] .answer-frame,
  .lifeline-btn[data-used="true"] {
    border-style: dashed;
    color: GrayText;
  }

  .audience-bar-fill,
  .confidence-meter-fill,
  .lo-meter-fill {
    background: Highlight;
    border: 1px solid ButtonBorder;
  }
}

/* Utility & Component Classes (No inline static styles) */
.sidebar-title--lg {
  font-size: 0.95rem;
}

.sidebar-title--report {
  font-size: 0.98rem;
}

.hero-heading--compact {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

.hero-heading--end {
  font-size: clamp(1.25rem, 2.5vw, 1.7rem);
  margin-block-end: 0.85rem;
}

.fff-prompt-inline {
  margin-inline-start: 0.5rem;
  font-weight: 700;
}

.fff-instructions {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.fff-slot-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.fff-slot--filled .fff-slot-value {
  color: #ffffff;
}

.fff-correct-list {
  margin: 0 0 0.7rem;
  padding-inline-start: 1.25rem;
  color: #ffffff;
}

.cta-row--spaced {
  margin-block-start: 1rem;
}

.cta-row--end {
  margin-block-start: 1.15rem;
}

.push-inline-end {
  margin-inline-start: auto;
}

.primary-cta--compact {
  min-block-size: 46px;
  padding: 0.6rem 1.35rem;
  font-size: 0.98rem;
}

.ctrl-btn--sm {
  min-block-size: 38px;
}

.ctrl-btn--xs {
  min-block-size: 34px;
  padding: 0.25rem 0.7rem;
}

.end-summary-note {
  margin: 1rem 0 0;
  color: var(--text-secondary);
  font-size: 0.94rem;
}

.diagnostic-advice {
  margin: 0 0 0.9rem;
  color: var(--text-secondary);
  font-size: 0.93rem;
}

.lo-report-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.lo-report-title {
  color: var(--gold-300);
}

.lo-report-score {
  font-family: var(--font-mono);
  font-weight: 800;
}

.lo-report-full {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.lo-meter-fill {
  inline-size: var(--pct, 0%);
}

.confidence-meter-fill {
  inline-size: var(--pct, 0%);
}

.audience-bar-fill {
  block-size: var(--pct, 0%);
}

.review-item-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.45rem;
  margin-block-end: 0.4rem;
}

.review-question {
  margin: 0 0 0.4rem;
  font-weight: 700;
  color: #ffffff;
}

.review-chosen {
  margin: 0 0 0.25rem;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.review-correct {
  margin: 0 0 0.4rem;
  font-size: 0.86rem;
  color: #a7f3d0;
}

.review-tip {
  margin: 0;
  font-size: 0.84rem;
  color: #fef3c7;
}

.pill--missed {
  background: rgba(220, 38, 38, 0.28);
  border: 1px solid #f87171;
  color: #fecaca;
}

.pill--mini {
  padding: 0.1rem 0.5rem;
  font-size: 0.72rem;
}

.dialog-subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.phone-contact-name {
  color: #ffffff;
}

.phone-contact-status {
  display: block;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.phone-options-preview {
  font-size: 0.82rem;
  opacity: 0.92;
}

.confidence-box--spaced {
  margin-block-start: 0.9rem;
}

.host-speech-box {
  max-inline-size: 100%;
  font-size: 0.98rem;
}

.host-label {
  color: var(--gold-300);
}

.walkaway-summary {
  margin: 0;
  font-size: 0.98rem;
  color: var(--text-primary);
}

.walkaway-note {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.rules-content {
  display: grid;
  gap: 0.85rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.rules-heading {
  color: var(--gold-300);
}

.rules-paragraph {
  margin: 0.25rem 0 0;
}

.rules-list {
  margin: 0.25rem 0 0;
  padding-inline-start: 1.2rem;
}

.bank-search-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.toggle-chip--compact {
  min-block-size: 36px;
  padding: 0.3rem 0.7rem;
  font-size: 0.82rem;
}

.bank-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-block-end: 0.35rem;
}

.bank-tier-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-inline-start: auto;
}

.bank-question {
  margin: 0;
  font-weight: 700;
  color: #ffffff;
}

.bank-answer {
  margin: 0.45rem 0 0.25rem;
  color: #a7f3d0;
}

.bank-tip {
  margin: 0;
  font-size: 0.82rem;
  color: #fef3c7;
}


/* =====================================================
   DYNAMIC PACK BRANDING, STIMULI, & PACK MANAGER UI
   ===================================================== */
:root {
  --studio-tint: rgba(37, 99, 235, 0.36);
}

body {
  background-image:
    radial-gradient(ellipse 70% 45% at 50% 0%, var(--studio-tint), transparent 72%),
    radial-gradient(ellipse 50% 45% at 15% 85%, rgba(29, 78, 216, 0.24), transparent 70%),
    radial-gradient(ellipse 50% 45% at 85% 85%, rgba(180, 122, 16, 0.14), transparent 70%),
    linear-gradient(180deg, #060e28 0%, #040817 55%, #030612 100%);
}

/* Form controls — WCAG & iOS zoom safe sizing (forms guide) */
.field-input,
.field-select,
.field-textarea {
  font: inherit;
  font-size: max(1rem, 1em);
  min-block-size: 48px;
}

.field-textarea {
  inline-size: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1.5px solid var(--border-steel);
  background-color: #060f2b;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  resize: vertical;
}

.field-file-input {
  inline-size: 100%;
  min-block-size: 48px;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  border: 1.5px solid var(--border-steel);
  background: rgba(6, 15, 42, 0.95);
  color: var(--text-primary);
  font: inherit;
  cursor: pointer;
}

.field-input[aria-invalid="true"],
.field-textarea[aria-invalid="true"],
.field-file-input[aria-invalid="true"] {
  border-color: #f87171;
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.25);
}

.setup-fieldset,
.import-fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

.pack-switcher-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(6, 15, 42, 0.86);
  border: 1.5px solid var(--border-steel);
  margin-block-end: 0.75rem;
}

.pack-switcher-field {
  flex: 1 1 260px;
  min-inline-size: 0;
}

.bank-stats-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-block-end: 1rem;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.bank-stats-text strong {
  color: var(--gold-300);
}

/* Additional Question Stimuli: Code Snippets & Source Quotes */
.question-code-card,
.question-quote-card {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(4, 10, 29, 0.92);
  border: 1.5px solid rgba(246, 201, 82, 0.55);
  text-align: start;
}

.question-code-card figcaption,
.question-quote-card figcaption {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gold-300);
  margin-block-end: 0.45rem;
}

.question-code-card pre {
  margin: 0;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: #030714;
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.48;
  color: #e2e8f0;
}

.question-quote-card blockquote {
  margin: 0 0 0.5rem;
  padding-inline-start: 0.85rem;
  border-inline-start: 3px solid var(--gold-400);
  font-size: 0.95rem;
  font-style: italic;
  color: #f8fafc;
}

.question-quote-card figcaption {
  margin-block-end: 0;
  text-transform: none;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Pack Manager Dialog Layout */
.pack-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.75rem;
}

.pack-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: rgba(6, 15, 42, 0.9);
  border: 1.5px solid var(--border-subtle);
}

.pack-card[data-active="true"] {
  border-color: var(--gold-400);
  background: rgba(246, 201, 82, 0.1);
}

.pack-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.pack-card-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  color: #ffffff;
}

.pack-card-sub {
  margin: 0.1rem 0 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.pack-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.pack-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-block-start: auto;
  padding-block-start: 0.35rem;
}

.pack-import-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 16px;
  background: rgba(5, 12, 34, 0.85);
  border: 1.5px solid var(--border-subtle);
}

.pack-dropzone {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 2px dashed var(--border-steel);
  background: rgba(12, 26, 71, 0.45);
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.pack-dropzone[data-dragover="true"] {
  border-color: var(--gold-400);
  background: rgba(246, 201, 82, 0.14);
}

.pack-paste-details {
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: rgba(8, 18, 52, 0.72);
  padding: 0.6rem 0.85rem;
}

.pack-paste-details summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--gold-300);
}

.pack-paste-body {
  margin-block-start: 0.65rem;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-block-start: 0.35rem;
}

.pack-feedback {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.45;
  border: 1.5px solid var(--border-steel);
  background: rgba(16, 35, 92, 0.75);
}

.pack-feedback[data-kind="error"] {
  border-color: #f87171;
  background: rgba(153, 27, 27, 0.45);
  color: #fee2e2;
}

.pack-feedback[data-kind="success"] {
  border-color: var(--emerald-bright);
  background: rgba(6, 95, 70, 0.45);
  color: #d1fae5;
}

.pack-feedback ul {
  margin: 0.35rem 0 0;
  padding-inline-start: 1.2rem;
}

/* Fallback for older browsers without CSS accent-color (brand-consistent-forms guide) */
@supports not (accent-color: auto) {
  .toggle-chip {
    position: relative;
  }

  .toggle-chip input[type="checkbox"],
  .toggle-chip input[type="radio"] {
    position: absolute !important;
    clip-path: inset(50%) !important;
    overflow: hidden !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    white-space: nowrap !important;
  }

  .toggle-chip input + span {
    position: relative;
    padding-inline-start: 1.65rem;
  }

  .toggle-chip input + span::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    inset-block-start: 50%;
    transform: translateY(-50%);
    inline-size: 1.15rem;
    block-size: 1.15rem;
    border: 2px solid var(--border-bright);
    background: #060f2b;
    border-radius: 4px;
  }

  .toggle-chip input[type="radio"] + span::before {
    border-radius: 50%;
  }

  .toggle-chip input:focus-visible + span::before {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
  }

  .toggle-chip input:checked + span::before {
    background: var(--gold-400);
    border-color: var(--gold-300);
  }

  .toggle-chip input[type="checkbox"]:checked + span::after {
    content: "✓";
    position: absolute;
    inset-inline-start: 0.22rem;
    inset-block-start: 50%;
    transform: translateY(-50%);
    color: var(--gold-ink);
    font-weight: 900;
    font-size: 0.82rem;
  }

  .toggle-chip input[type="radio"]:checked + span::after {
    content: "";
    position: absolute;
    inset-inline-start: 0.34rem;
    inset-block-start: 50%;
    transform: translateY(-50%);
    inline-size: 0.48rem;
    block-size: 0.48rem;
    border-radius: 50%;
    background: var(--gold-ink);
  }
}

/* =====================================================
   LOCKED ASSESSMENT MODE UI & ENCRYPTED SUBMISSION CARD
   ===================================================== */
.ctrl-btn--assess {
  border-color: rgba(245, 158, 11, 0.72);
  background: linear-gradient(180deg, rgba(180, 83, 9, 0.42), rgba(120, 53, 15, 0.56));
  color: #fde68a;
}

.ctrl-btn--assess:hover:not(:disabled) {
  border-color: #fbbf24;
  background: linear-gradient(180deg, rgba(217, 119, 6, 0.54), rgba(146, 64, 14, 0.68));
}

.secondary-cta--assess {
  border-color: rgba(245, 158, 11, 0.7);
  color: #fde68a;
  background: rgba(120, 53, 15, 0.36);
}

.secondary-cta--assess:hover:not(:disabled) {
  border-color: #fbbf24;
  background: rgba(180, 83, 9, 0.48);
}

.pill--assess {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(251, 191, 36, 0.65);
  color: #fde68a;
  font-weight: 800;
}

.assessment-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(251, 191, 36, 0.6);
  background: linear-gradient(90deg, rgba(146, 64, 14, 0.38), rgba(30, 58, 138, 0.36));
}

.assessment-banner-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.assessment-banner-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.assessment-banner-note {
  color: #fde68a;
  font-weight: 600;
}

.lifeline-btn[data-locked="true"] {
  opacity: 0.42;
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.4);
  cursor: not-allowed;
}

.lifeline-btn[data-locked="true"]::after {
  content: "LOCKED";
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: #fca5a5;
  margin-block-start: 0.1rem;
}

.assessment-unlock-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.field-textarea--code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.45;
  word-break: break-all;
}

.assessment-result-panel {
  border-color: rgba(251, 191, 36, 0.65);
  background: linear-gradient(180deg, rgba(120, 53, 15, 0.24), rgba(6, 15, 42, 0.92));
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.assessment-result-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.assessment-result-meta {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
