/* ============================================================
   MindGains · Quiz Hub — World-Class Minimal Elegant Design
   ============================================================ */

/* --- Reset & Base ------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #05060a;
  --surface:    rgba(255,255,255,.05);
  --surface-2:  rgba(255,255,255,.08);
  --border:     rgba(255,255,255,.09);
  --border-hi:  rgba(55,224,255,.4);
  --text:       #f0f4ff;
  --text-muted: #8294a8;
  --text-soft:  #b8c8db;
  --cyan:       #37e0ff;
  --cyan-dim:   rgba(55,224,255,.12);
  --cyan-glow:  rgba(55,224,255,.22);
  --teal:       #00d4c7;
  --violet:     #7d6cff;
  --green:      #34d399;
  --green-dim:  rgba(52,211,153,.13);
  --red:        #f87171;
  --red-dim:    rgba(248,113,113,.13);
  --radius-sm:  12px;
  --radius-md:  18px;
  --radius-lg:  26px;
  --radius-xl:  32px;
  --ease-out:   cubic-bezier(.16,1,.3,1);
  --ease-spring:cubic-bezier(.34,1.56,.64,1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Barlow', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* --- Animated Background ------------------------------------ */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(55,224,255,.18), transparent),
    radial-gradient(ellipse 60% 40% at 10% 20%, rgba(125,108,255,.12), transparent),
    radial-gradient(ellipse 50% 60% at 90% 80%, rgba(0,212,199,.08), transparent),
    linear-gradient(180deg, #05060a 0%, #080e18 60%, #03060d 100%);
}

.bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,.04) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 60%, rgba(55,224,255,.06) 0%, transparent 100%),
    radial-gradient(1px 1px at 40% 80%, rgba(125,108,255,.04) 0%, transparent 100%);
}

/* --- Navigation -------------------------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(20px, 5vw, 64px);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  background: rgba(5,6,10,.75);
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -.3px;
  background: linear-gradient(135deg, var(--text), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.site-nav nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav nav a {
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  transition: color .2s, background .2s;
}

.site-nav nav a:hover {
  color: var(--text);
  background: var(--surface);
}

/* --- Main Layout ------------------------------------------- */
main {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
  padding-bottom: 80px;
}

/* --- Hero / Topic Header ------------------------------------ */
.hero, .topic-hero {
  padding: 56px 0 40px;
}

.hero.compact { padding-top: 40px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 16px;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 2.8px;
  font-size: 11px;
  font-weight: 700;
}

.hero h1, .topic-hero h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: clamp(42px, 6.5vw, 80px);
  line-height: .92;
  letter-spacing: -.5px;
  font-weight: 400;
  background: linear-gradient(160deg, #fff 30%, rgba(255,255,255,.62));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 20px;
}

.hero p, .topic-hero p {
  max-width: 680px;
  color: var(--text-soft);
  font-size: clamp(15px, 1.7vw, 17.5px);
  line-height: 1.7;
}

/* --- Stat Pills -------------------------------------------- */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
}

.stats span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 15px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -.1px;
}

/* --- Search Panel ------------------------------------------ */
.search-panel {
  margin: 8px 0 32px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(22px);
}

.search-panel label {
  display: block;
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.search-panel input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(0,0,0,.25);
  padding: 14px 18px;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.search-panel input::placeholder { color: var(--text-muted); }

.search-panel input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-dim);
}

/* --- Search Results ---------------------------------------- */
.search-results {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.search-results a,
.search-empty {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  transition: border-color .18s, background .18s, transform .18s;
}

.search-results a:hover {
  border-color: var(--border-hi);
  background: var(--cyan-dim);
  transform: translateX(3px);
}

.search-results a strong { font-weight: 600; }
.search-results a small { color: var(--text-muted); font-size: 12.5px; }
.search-results a em { font-style: normal; color: var(--cyan); font-size: 12px; font-weight: 600; white-space: nowrap; }
.search-empty { color: var(--text-muted); border: none; background: none; }

/* --- Section Headers --------------------------------------- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
}

.section-head h2 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: -.3px;
}

.section-head p { color: var(--text-muted); font-size: 14px; }

/* --- Grid Cards -------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.card {
  position: relative;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255,255,255,.075), rgba(255,255,255,.03));
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: transform .22s var(--ease-out), border-color .22s, box-shadow .22s;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 0%, rgba(55,224,255,.1), transparent);
  transition: opacity .3s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(55,224,255,.35);
  box-shadow: 0 20px 40px rgba(0,0,0,.35), 0 0 0 1px rgba(55,224,255,.1);
}

.card:hover::before { opacity: 1; }

.pill {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--cyan-dim);
  border: 1px solid rgba(55,224,255,.18);
  color: var(--cyan);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.card h2 {
  font-size: 20px;
  line-height: 1.2;
  margin: 0 0 10px;
  font-weight: 700;
  letter-spacing: -.2px;
}

.card p {
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 14px;
  font-size: 14px;
}

.meta {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
}

/* --- Start / CTA Button ------------------------------------ */
.start {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
  padding: 16px 32px;
  min-height: 56px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(55,224,255,.5);
  background: linear-gradient(135deg, var(--cyan) 0%, var(--teal) 100%);
  color: #001014;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.1px;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  text-decoration: none;
  transition: transform .2s var(--ease-spring), box-shadow .2s;
  box-shadow:
    0 0 0 1px rgba(55,224,255,.3),
    0 12px 32px rgba(0,212,199,.22),
    0 0 40px rgba(55,224,255,.15);
}

.start::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: conic-gradient(from 0deg, rgba(255,255,255,.2), var(--cyan), var(--teal), var(--violet), var(--cyan), rgba(255,255,255,.2));
  z-index: -2;
  animation: startGlow 5s linear infinite;
}

.start::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--radius-md) - 1px);
  background: linear-gradient(135deg, var(--cyan) 0%, var(--teal) 100%);
  z-index: -1;
}

.start:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 0 0 1px rgba(55,224,255,.5),
    0 20px 48px rgba(0,212,199,.3),
    0 0 56px rgba(55,224,255,.25);
}

.start:active { transform: translateY(0) scale(.99); }

@keyframes startGlow {
  to { transform: rotate(360deg); }
}

/* --- Hub Nav Link ------------------------------------------ */
.hub-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  background: var(--cyan-dim);
  border: 1px solid rgba(55,224,255,.2);
  color: #dffbff;
  font-size: 13.5px;
  font-weight: 600;
  transition: background .2s, border-color .2s;
}

.hub-link:hover {
  background: rgba(55,224,255,.18);
  border-color: rgba(55,224,255,.4);
}

/* --- Related Topics ---------------------------------------- */
.related {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.related a {
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 13.5px;
  font-weight: 500;
  transition: background .18s, border-color .18s, color .18s, transform .18s;
}

.related a:hover {
  background: var(--cyan-dim);
  border-color: rgba(55,224,255,.35);
  color: var(--text);
  transform: translateY(-1px);
}

/* ============================================================
   QUIZ PLAYER — World-Class
   ============================================================ */

.quiz-player {
  margin: 32px 0;
}

.quiz-shell {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 36px 40px;
  box-shadow: 0 40px 80px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.08);
}

/* Status Bar */
.quiz-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.quiz-status [data-progress] {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.quiz-status [data-score] {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan);
  background: var(--cyan-dim);
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid rgba(55,224,255,.2);
}

/* Progress Meter */
.quiz-meter {
  height: 3px;
  margin-bottom: 36px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  overflow: visible;
  position: relative;
}

.quiz-meter span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--teal));
  transition: width .4s var(--ease-out);
  position: relative;
}

.quiz-meter span::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(55,224,255,.8);
}

/* Question Text */
.quiz-shell h2[data-question] {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: clamp(22px, 2.8vw, 32px);
  line-height: 1.35;
  font-weight: 400;
  letter-spacing: -.2px;
  color: var(--text);
  margin: 0 0 32px;
  min-height: 3em;
}

/* Statement-type question formatting */
.quiz-shell h2[data-question] .stmt-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-size: clamp(14px, 1.5vw, 16px);
  font-weight: 400;
}

.quiz-shell h2[data-question] .stmt-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  line-height: 1.55;
}

.quiz-shell h2[data-question] .stmt-label {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 2px;
}

/* Options Grid */
.quiz-options {
  display: grid;
  gap: 10px;
}

.quiz-options button {
  position: relative;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.04);
  color: var(--text);
  padding: 16px 20px;
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: border-color .18s, background .18s, transform .15s var(--ease-spring), box-shadow .18s;
  overflow: hidden;
}

/* Letter badge */
.quiz-options button .opt-badge {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  margin-top: 1px;
  transition: background .18s, color .18s, border-color .18s;
}

.quiz-options button .opt-text {
  flex: 1;
  min-width: 0;
}

.quiz-options button:hover:not(:disabled) {
  border-color: rgba(55,224,255,.4);
  background: rgba(55,224,255,.05);
  transform: translateX(3px);
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
}

.quiz-options button:hover:not(:disabled) .opt-badge {
  background: rgba(55,224,255,.15);
  border-color: rgba(55,224,255,.4);
  color: var(--cyan);
}

/* Correct State */
.quiz-options button.correct {
  border-color: rgba(52,211,153,.6);
  background: var(--green-dim);
  transform: none;
}

.quiz-options button.correct .opt-badge {
  background: rgba(52,211,153,.25);
  border-color: rgba(52,211,153,.6);
  color: var(--green);
}

/* Wrong State */
.quiz-options button.wrong {
  border-color: rgba(248,113,113,.6);
  background: var(--red-dim);
}

.quiz-options button.wrong .opt-badge {
  background: rgba(248,113,113,.2);
  border-color: rgba(248,113,113,.6);
  color: var(--red);
}

.quiz-options button:disabled { cursor: default; opacity: .8; }

/* Feedback Box */
.quiz-feedback {
  margin-top: 20px;
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  color: var(--text-soft);
  line-height: 1.65;
  font-size: 14.5px;
  animation: fadeSlideUp .25s var(--ease-out) both;
}

.quiz-feedback.is-correct {
  background: var(--green-dim);
  border-color: rgba(52,211,153,.25);
}

.quiz-feedback.is-wrong {
  background: var(--red-dim);
  border-color: rgba(248,113,113,.2);
}

.quiz-feedback strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.quiz-feedback strong.correct-label { color: var(--green); }
.quiz-feedback strong.wrong-label   { color: var(--red); }

.quiz-feedback .correct-ans {
  margin-top: 6px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--green-dim);
  border: 1px solid rgba(52,211,153,.2);
  color: #a7f3d0;
  font-size: 14px;
}

.quiz-feedback .explanation {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.65;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Action Row */
.quiz-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}

.quiz-actions button,
.result-actions button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--cyan) 0%, var(--teal) 100%);
  color: #001014;
  font: inherit;
  font-size: 14.5px;
  font-weight: 800;
  padding: 13px 24px;
  cursor: pointer;
  transition: opacity .2s, transform .18s var(--ease-spring), box-shadow .2s;
  box-shadow: 0 8px 24px rgba(0,212,199,.2);
}

.quiz-actions button:hover:not(:disabled),
.result-actions button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0,212,199,.3);
}

.quiz-actions button:disabled {
  opacity: .35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ============================================================
   RESULTS SCREEN
   ============================================================ */

.result-card {
  display: grid;
  gap: 20px;
  animation: fadeSlideUp .3s var(--ease-out) both;
}

.result-card h3 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: 36px;
  font-weight: 400;
  margin-bottom: 4px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.result-grid div {
  padding: 22px 18px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
  transition: border-color .2s, transform .2s;
}

.result-grid div:hover {
  border-color: rgba(55,224,255,.25);
  transform: translateY(-2px);
}

.result-grid span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 600;
  margin-bottom: 8px;
}

.result-grid strong {
  display: block;
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.5px;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.result-actions button:last-child {
  background: var(--surface);
  color: var(--text-soft);
  border: 1px solid var(--border);
  box-shadow: none;
}

.result-actions button:last-child:hover {
  background: var(--surface-2);
  color: var(--text);
  box-shadow: none;
}

/* ============================================================
   MISTAKES LIST
   ============================================================ */

.mistake-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  animation: fadeSlideUp .25s var(--ease-out) both;
}

.mistake-list article {
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
}

.mistake-list article strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
  line-height: 1.45;
}

.mistake-list article p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.55;
}

.mistake-list article p strong { display: inline; font-size: inherit; color: var(--green); }

/* ============================================================
   APP BRIDGE / CTA SECTION
   ============================================================ */

.app-bridge {
  margin: 32px 0 0;
  padding: 36px 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, rgba(55,224,255,.06), rgba(125,108,255,.04));
  position: relative;
  overflow: hidden;
}

.app-bridge::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(55,224,255,.1), transparent 70%);
  pointer-events: none;
}

.app-bridge h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 400;
  margin: 0 0 12px;
  letter-spacing: -.3px;
}

.app-bridge p {
  max-width: 680px;
  color: var(--text-soft);
  line-height: 1.65;
  font-size: 15px;
}

.app-bridge p + p { margin-top: 8px; }

.app-bridge ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 24px;
  padding-left: 0;
  list-style: none;
  margin: 20px 0 0;
}

.app-bridge ul li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.5;
}

.app-bridge ul li::before {
  content: '→';
  color: var(--cyan);
  font-size: 12px;
  margin-top: 3px;
  flex-shrink: 0;
}

/* ============================================================
   QUESTION LIST (browse mode)
   ============================================================ */

.questions { display: grid; gap: 14px; }

.question {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color .2s;
}

.question:hover { border-color: rgba(255,255,255,.15); }

.qtop {
  display: flex;
  justify-content: space-between;
  color: var(--cyan);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  font-weight: 700;
  margin-bottom: 12px;
}

.qtop em { font-style: normal; color: var(--text-muted); }

.question h2 {
  font-size: 17px;
  line-height: 1.45;
  margin-bottom: 14px;
  font-weight: 600;
  color: var(--text);
}

.question ol {
  display: grid;
  gap: 7px;
  margin: 0 0 14px;
  padding-left: 0;
  list-style: none;
  counter-reset: opt;
}

.question li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.04);
  color: var(--text-soft);
  font-size: 14px;
  counter-increment: opt;
}

.question li::before {
  content: counter(opt, upper-alpha) '.';
  color: var(--text-muted);
  font-weight: 700;
  font-size: 12px;
  min-width: 18px;
  margin-top: 1px;
  flex-shrink: 0;
}

.question li.answer {
  border: 1px solid rgba(52,211,153,.35);
  background: var(--green-dim);
  color: #d1fae5;
}

.question li.answer::before { color: var(--green); }

details {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  color: var(--text-soft);
  font-size: 13.5px;
  line-height: 1.65;
}

summary {
  cursor: pointer;
  color: var(--cyan);
  font-weight: 700;
  font-size: 13px;
  user-select: none;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

summary:hover { opacity: .8; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 820px) {
  .site-nav { padding: 14px 18px; }
  .hero, .topic-hero { padding: 36px 0 28px; }

  .grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }

  .quiz-shell,
  .app-bridge { padding: 24px 20px; }

  .quiz-shell h2[data-question] { margin-bottom: 24px; }

  .quiz-status { gap: 8px; }
  .quiz-status [data-progress] { font-size: 11px; }
  .quiz-status [data-score] { font-size: 12px; padding: 4px 10px; }

  .quiz-options button { padding: 14px 16px; font-size: 14px; gap: 12px; }
  .quiz-options button .opt-badge { width: 26px; height: 26px; font-size: 11px; }

  .result-grid { grid-template-columns: 1fr; }

  .quiz-actions { justify-content: stretch; }
  .quiz-actions button { width: 100%; justify-content: center; }

  .start { width: 100%; margin-top: 24px; }

  .app-bridge ul { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  main { width: calc(100% - 28px); }
  .quiz-meter { margin-bottom: 24px; }
  .quiz-shell h2[data-question] { font-size: 20px; }
}