/* ============================================================
   STEMme App — styles.css
   Redesigned: 7-screen flow, dark deep-navy theme
   ============================================================ */

/* ─── Tokens ─────────────────────────────────────────────── */
:root {
  --bg:       #0a0f1e;
  --surface:  #111827;
  --border:   #1f2937;
  --primary:  #3b82f6;
  --accent:   #06b6d4;
  --success:  #10b981;
  --error:    #ef4444;
  --warning:  #f59e0b;
  --text:     #f9fafb;
  --text2:    #9ca3af;
  --radius:   14px;
  --radius-sm: 10px;
}

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

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

h1, h2, h3 {
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

/* ─── Global header ──────────────────────────────────────── */
.global-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  z-index: 100;
  background: rgba(10, 15, 30, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(31, 41, 55, 0.5);
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.version-tag {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ─── Screen system ──────────────────────────────────────── */
.screen {
  position: fixed;
  inset: 0;
  top: 52px;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg);
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 10;
}

.screen.hidden {
  display: none !important;
}

.screen.slide-out-left {
  opacity: 0;
  transform: translateX(-60px);
  pointer-events: none;
}

.screen.slide-in-right {
  opacity: 0;
  transform: translateX(60px);
  pointer-events: none;
}

.screen-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s ease;
  text-decoration: none;
}

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

.btn-cta {
  background: linear-gradient(135deg, var(--primary), #2563eb);
  color: #fff;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}
.btn-cta:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:not(:disabled):hover { background: rgba(59,130,246,0.08); }

.btn-link {
  background: none;
  border: none;
  color: var(--text2);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.5rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.btn-link:hover { color: var(--text); }

/* ─── Overlay / spinner ──────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 30, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 9999;
  color: var(--text2);
  font-size: 0.9rem;
}

.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.hidden { display: none !important; }

/* ─── Gradient text helper ───────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Field error ────────────────────────────────────────── */
.field-error {
  color: var(--error);
  font-size: 0.82rem;
  margin: 0.4rem 0;
}

/* ═══════════════════════════════════════════════════════════
   SCREEN 1 — INTRO
   ═══════════════════════════════════════════════════════════ */
.intro-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 52px);
  position: relative;
  text-align: center;
  padding-top: 0;
}

.intro-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
  animation: drift 20s ease-in-out infinite alternate;
}

.orb-1 {
  width: 500px; height: 500px;
  background: var(--primary);
  top: -10%; left: -10%;
  animation-duration: 25s;
}

.orb-2 {
  width: 400px; height: 400px;
  background: var(--accent);
  bottom: -5%; right: -5%;
  animation-duration: 20s;
  animation-delay: -5s;
}

.orb-3 {
  width: 300px; height: 300px;
  background: #8b5cf6;
  top: 40%; left: 50%;
  animation-duration: 30s;
  animation-delay: -10s;
}

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(40px, -30px) scale(1.1); }
  100% { transform: translate(-20px, 20px) scale(0.95); }
}

.intro-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.intro-headline {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.intro-sub {
  color: var(--text2);
  font-size: 1.05rem;
  line-height: 1.65;
  margin-bottom: 2.5rem;
}

.vp-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
  text-align: left;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.vp-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.vp-icon {
  font-size: 1.3rem;
  line-height: 1.5;
  flex-shrink: 0;
}

.vp-text {
  color: var(--text2);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   SCREENS 2 & 3 — TILE PICKERS
   ═══════════════════════════════════════════════════════════ */
.picker-screen {
  padding-top: 3rem;
  text-align: center;
}

.step-indicator {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.picker-headline {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.picker-sub {
  color: var(--text2);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  max-width: 620px;
  margin: 0 auto;
}

.tile-grid-4 {
  grid-template-columns: repeat(2, 1fr);
}

.tile {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  position: relative;
  user-select: none;
}

.tile:hover {
  border-color: var(--tile-accent, var(--primary));
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.tile.selected {
  border-color: var(--tile-accent, var(--primary));
  background: rgba(59, 130, 246, 0.08);
}

.tile.selected::after {
  content: '\2713';
  position: absolute;
  top: 8px; right: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--tile-accent, var(--primary));
  background: rgba(59, 130, 246, 0.15);
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tile-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.6rem;
  line-height: 1;
}

.tile-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.tile-desc {
  font-size: 0.75rem;
  color: var(--text2);
  margin-top: 0.25rem;
}

/* Per-subject accent colors via data attribute */
.tile[data-accent="blue"]   { --tile-accent: #3b82f6; }
.tile[data-accent="purple"] { --tile-accent: #8b5cf6; }
.tile[data-accent="green"]  { --tile-accent: #10b981; }
.tile[data-accent="teal"]   { --tile-accent: #06b6d4; }
.tile[data-accent="orange"] { --tile-accent: #f97316; }
.tile[data-accent="yellow"] { --tile-accent: #eab308; }
.tile[data-accent="red"]    { --tile-accent: #ef4444; }
.tile[data-accent="indigo"] { --tile-accent: #6366f1; }

.tile.selected[data-accent="blue"]   { background: rgba(59,130,246,0.08); border-color: #3b82f6; }
.tile.selected[data-accent="purple"] { background: rgba(139,92,246,0.08); border-color: #8b5cf6; }
.tile.selected[data-accent="green"]  { background: rgba(16,185,129,0.08); border-color: #10b981; }
.tile.selected[data-accent="teal"]   { background: rgba(6,182,212,0.08);  border-color: #06b6d4; }
.tile.selected[data-accent="orange"] { background: rgba(249,115,22,0.08); border-color: #f97316; }
.tile.selected[data-accent="yellow"] { background: rgba(234,179,8,0.08);  border-color: #eab308; }
.tile.selected[data-accent="red"]    { background: rgba(239,68,68,0.08);  border-color: #ef4444; }
.tile.selected[data-accent="indigo"] { background: rgba(99,102,241,0.08); border-color: #6366f1; }

.tile:hover[data-accent="purple"] { border-color: #8b5cf6; }
.tile:hover[data-accent="green"]  { border-color: #10b981; }
.tile:hover[data-accent="teal"]   { border-color: #06b6d4; }
.tile:hover[data-accent="orange"] { border-color: #f97316; }
.tile:hover[data-accent="yellow"] { border-color: #eab308; }
.tile:hover[data-accent="red"]    { border-color: #ef4444; }
.tile:hover[data-accent="indigo"] { border-color: #6366f1; }

/* ═══════════════════════════════════════════════════════════
   SCREEN 4 — COUNTRY
   ═══════════════════════════════════════════════════════════ */
.country-search {
  width: 100%;
  max-width: 480px;
  margin: 0 auto 1rem;
  display: block;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.country-search:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,0.12); }
.country-search::placeholder { color: var(--text2); }

.country-list {
  max-width: 480px;
  margin: 0 auto;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.country-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(31,41,55,0.5);
  font-size: 0.9rem;
}
.country-row:last-child { border-bottom: none; }
.country-row:hover { background: rgba(59,130,246,0.06); }
.country-row.selected { background: rgba(59,130,246,0.1); color: var(--primary); font-weight: 600; }
.country-flag { font-size: 1.2rem; flex-shrink: 0; }

.country-actions {
  max-width: 480px;
  margin: 1rem auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

/* ═══════════════════════════════════════════════════════════
   SCREEN 5 — QUIZ
   ═══════════════════════════════════════════════════════════ */
.quiz-screen {
  padding-top: 1rem;
}

.quiz-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.qt-left {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text2);
  white-space: nowrap;
}

.qt-center { flex: 1; min-width: 150px; }

.quiz-progress-track {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 999px;
  transition: width 0.4s ease;
  width: 0%;
}

.quiz-progress-label {
  font-size: 0.72rem;
  color: var(--text2);
  text-align: center;
}

/* Question stage */
.question-stage {
  position: relative;
  min-height: 300px;
}

.q-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  max-width: 720px;
  margin: 0 auto;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.q-card.slide-out {
  opacity: 0;
  transform: translateX(-80px);
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.q-card.slide-in {
  opacity: 0;
  transform: translateX(80px);
}

.q-badges {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}

.badge-role-v { background: rgba(59,130,246,0.12); color: var(--primary); }
.badge-role-h { background: rgba(6,182,212,0.1); color: var(--accent); }
.badge-easy   { background: rgba(16,185,129,0.1); color: var(--success); }
.badge-medium { background: rgba(245,158,11,0.1); color: var(--warning); }
.badge-hard   { background: rgba(239,68,68,0.1); color: var(--error); }
.badge-topic  { background: rgba(156,163,175,0.08); color: var(--text2); font-weight: 500; }

.q-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 1.75rem;
}

/* Options */
.q-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.q-option {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.q-option:hover { border-color: var(--primary); background: rgba(59,130,246,0.04); }

.q-option.flash {
  border-color: var(--primary);
  background: rgba(59,130,246,0.12);
}

.q-option-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  min-width: 28px;
  border-radius: 7px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  font-size: 0.75rem;
  font-weight: 700;
  transition: all 0.15s;
}

.q-option.flash .q-option-letter {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.q-option-text {
  font-size: 0.92rem;
  line-height: 1.45;
  padding-top: 2px;
}

/* Selected option (re-visited question) */
.q-option.selected {
  border-color: var(--primary);
  background: rgba(59,130,246,0.12);
}
.q-option.selected .q-option-letter {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Desktop 2x2 grid for options */
@media (min-width: 640px) {
  .q-options { display: grid; grid-template-columns: 1fr 1fr; }
}

/* ─── Energy Bar Timer ──────────────────────────────────── */
.energy-bar-wrapper {
  display: none;
  margin-bottom: 1.5rem;
}

.energy-bar-track {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.energy-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.15s linear, background 0.4s ease;
}

.energy-bar-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text2);
  transition: color 0.4s ease;
}

/* ─── Quiz Navigation ───────────────────────────────────── */
.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 720px;
  margin: 1.5rem auto 0;
  padding: 0;
}

.quiz-nav-btn {
  min-width: 120px;
}

.quiz-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════
   SCREEN 6 — EMAIL
   ═══════════════════════════════════════════════════════════ */
.email-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 52px);
  text-align: center;
}

.email-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  max-width: 440px;
  width: 100%;
}

.email-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  margin-bottom: 1rem;
  transition: border-color 0.2s;
}
.email-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,0.12); }
.email-input::placeholder { color: var(--text2); }

.privacy-note {
  font-size: 0.78rem;
  color: var(--text2);
  margin-top: 1rem;
}

/* ═══════════════════════════════════════════════════════════
   SCREEN 7 — RESULTS
   ═══════════════════════════════════════════════════════════ */
.result-screen {
  padding-top: 2rem;
}

/* Score hero */
.result-hero {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  margin-bottom: 1.5rem;
}

.result-score-big {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.result-score-denom { font-size: 1.5rem; }
.result-pct { font-size: 0.9rem; color: var(--text2); margin-top: 0.25rem; }

.result-assessed-on {
  font-size: 0.85rem;
  color: var(--text2);
  margin-top: 0.5rem;
}
.result-assessed-on strong { color: var(--text); }

.percentile-pill {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 0.75rem;
}
.percentile-pill.top-25 { background: rgba(16,185,129,0.12); color: var(--success); }
.percentile-pill.top-50 { background: rgba(59,130,246,0.12); color: var(--primary); }
.percentile-pill.bottom { background: rgba(245,158,11,0.12); color: var(--warning); }

/* Stat grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.stat-item {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.5rem;
  text-align: center;
}

.stat-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text2);
  margin-top: 0.2rem;
}

/* Breakdowns */
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.result-card-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text2);
  margin-bottom: 1rem;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.bar-label {
  font-size: 0.8rem;
  min-width: 80px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

.bar-val {
  font-size: 0.78rem;
  color: var(--text2);
  min-width: 40px;
  text-align: right;
  white-space: nowrap;
}

/* Answer review */
.answer-review-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.6rem;
  overflow: hidden;
}

.answer-review-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background 0.15s;
}
.answer-review-header:hover { background: rgba(255,255,255,0.02); }

.ar-number {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text2);
}

.ar-status {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ar-status.correct { background: var(--success); }
.ar-status.wrong   { background: var(--error); }

.ar-text {
  flex: 1;
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ar-score {
  font-size: 0.75rem;
  color: var(--text2);
  white-space: nowrap;
}

.ar-chevron {
  color: var(--text2);
  font-size: 0.7rem;
  transition: transform 0.2s;
}
.answer-review-item.open .ar-chevron { transform: rotate(180deg); }

.answer-review-body {
  display: none;
  padding: 0 1rem 1rem;
  font-size: 0.85rem;
  line-height: 1.6;
}
.answer-review-item.open .answer-review-body { display: block; }

.ar-options {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.ar-opt {
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  font-size: 0.82rem;
}
.ar-opt.ar-correct { background: rgba(16,185,129,0.1); color: var(--success); }
.ar-opt.ar-wrong   { background: rgba(239,68,68,0.08); color: var(--error); }
.ar-opt.ar-neutral  { color: var(--text2); opacity: 0.6; }

.ar-explanation {
  background: rgba(16,185,129,0.05);
  border-left: 3px solid var(--success);
  border-radius: 0 6px 6px 0;
  padding: 0.6rem 0.8rem;
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.5;
}
.ar-explanation strong { color: var(--success); margin-right: 0.3rem; }

/* ─── Review Accordion ──────────────────────────────────── */
.review-accordion {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.review-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #111827;
  border-radius: 12px;
  padding: 16px 20px;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}
.review-accordion-header:hover {
  background: #1a2235;
}

.review-accordion-header-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.review-accordion-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.review-accordion-icon {
  font-size: 0.7rem;
  color: var(--text2);
  transition: transform 0.2s;
}

.review-accordion-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.review-accordion-subtext {
  font-size: 0.78rem;
  color: var(--text2);
  margin-left: 22px;
}

.review-accordion-summary {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.review-pill-wrong,
.review-pill-correct {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.review-pill-wrong {
  background: rgba(239,68,68,0.12);
  color: #fca5a5;
}
.review-pill-correct {
  background: rgba(16,185,129,0.12);
  color: #6ee7b7;
}

.review-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms ease;
}

.review-accordion.open .review-accordion-content {
  max-height: 9999px;
}

.review-toggle-row {
  display: flex;
  justify-content: flex-end;
  padding: 16px 0 8px;
}

.review-toggle-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.review-toggle-btn:hover {
  background: rgba(59,130,246,0.08);
  border-color: var(--primary);
}

.review-empty-msg {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--success);
  font-size: 0.9rem;
  font-weight: 600;
}

.review-card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 12px;
}

.review-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.review-q-number {
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--bg);
  color: var(--text2);
  padding: 3px 10px;
  border-radius: 999px;
}

.review-status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.review-status-badge.wrong {
  background: rgba(239,68,68,0.12);
  color: #fca5a5;
}
.review-status-badge.correct {
  background: rgba(16,185,129,0.12);
  color: #6ee7b7;
}

.review-q-text {
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 16px;
  color: var(--text);
}

.review-options {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
}

.review-card .option-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  margin: 4px;
  font-size: 0.9rem;
}

.option-pill.wrong    { background: rgba(239,68,68,0.15); border: 1px solid #ef4444; color: #fca5a5; }
.option-pill.correct  { background: rgba(16,185,129,0.15); border: 1px solid #10b981; color: #6ee7b7; }
.option-pill.neutral  { background: #1f2937; border: 1px solid #374151; color: #9ca3af; }

.option-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.8;
}

.review-explanation-toggle {
  cursor: pointer;
  padding: 8px 12px;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  transition: background 0.15s;
}
.review-explanation-toggle:hover {
  background: rgba(255,255,255,0.04);
}

.review-explanation-label {
  font-size: 0.85rem;
  color: var(--text2);
}

.review-explanation-body {
  display: none;
  margin-top: 8px;
  padding: 10px 12px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text2);
  border-left: 3px solid var(--success);
  border-radius: 0 6px 6px 0;
  background: rgba(16,185,129,0.05);
}

.review-explanation-toggle.open .review-explanation-body {
  display: block;
}

/* Result actions */
.result-actions {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .screen-inner { padding: 1.5rem 1rem 3rem; }
  .q-card { padding: 1.5rem 1.25rem; }
  .stat-grid { grid-template-columns: 1fr 1fr 1fr; gap: 0.5rem; }
  .tile-grid { grid-template-columns: repeat(2, 1fr); }
  .q-options { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════
   ABOUT SECTION
   ═══════════════════════════════════════════════════════════ */

/* Block spacing */
.about-block {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.about-block + .about-block {
  margin-top: 80px;
}

/* Block 1 — Transition hook */
.about-transition {
  padding: 60px 1.25rem 0;
  text-align: center;
}

.about-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.about-divider::before,
.about-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  max-width: 200px;
}

.about-dots {
  padding: 0 1rem;
  color: var(--text2);
  font-size: 1.2rem;
  letter-spacing: 0.3em;
}

.about-scroll-hint {
  font-size: 0.82rem;
  color: var(--text2);
  letter-spacing: 0.02em;
}

.scroll-arrow {
  display: inline-block;
  animation: pulse-arrow 2s ease-in-out infinite;
}

@keyframes pulse-arrow {
  0%, 100% { opacity: 0.4; transform: translateY(0); }
  50%      { opacity: 1;   transform: translateY(3px); }
}

/* Block 2 — Mission statement */
.about-mission {
  text-align: center;
  margin-top: 80px;
}

.about-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.about-headline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.6rem, 4.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.about-body {
  color: var(--text2);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 600px;
  margin: 0 auto;
}

/* Block 3 — Vision pill */
.about-vision-card {
  max-width: 500px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 2rem;
}

.about-vision-card .about-eyebrow {
  margin-bottom: 0.75rem;
}

.about-vision-text {
  color: var(--text2);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Block 4 — Founders */
.about-founders {
  text-align: center;
}

.about-founders-headline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  margin-bottom: 2.5rem;
}

.founders-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 680px;
  margin: 0 auto;
}

.founder-card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.founder-avatar {
  filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.2));
  flex-shrink: 0;
}

.founder-card:last-child .founder-avatar {
  filter: drop-shadow(0 0 12px rgba(6, 182, 212, 0.2));
}

.founder-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.founder-role {
  font-size: 0.8rem;
  color: var(--accent);
  margin-top: 0.15rem;
}

.founder-quote {
  color: var(--text2);
  font-size: 0.88rem;
  line-height: 1.6;
  font-style: italic;
  margin-top: 0.5rem;
}

/* Block 5 — CTA */
.about-cta {
  text-align: center;
}

.about-cta-headline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.about-cta-sub {
  color: var(--text2);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.about-cta-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.share-confirmation {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--success);
  font-weight: 600;
  animation: fade-in-out 2s ease forwards;
}

@keyframes fade-in-out {
  0%   { opacity: 0; }
  15%  { opacity: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; }
}

/* Block 6 — Footer */
.about-footer {
  text-align: center;
  padding: 60px 1.25rem 40px;
  font-size: 0.78rem;
  color: var(--text2);
}

/* ─── Scroll reveal animations ──────────────────────────── */
.reveal-fade,
.reveal-up,
.reveal-stagger {
  opacity: 0;
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal-up,
.reveal-stagger {
  transform: translateY(20px);
}

.reveal-stagger:nth-child(1) { transition-delay: 100ms; }
.reveal-stagger:nth-child(2) { transition-delay: 300ms; }
.reveal-stagger:nth-child(3) { transition-delay: 500ms; }

.revealed {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* ─── About section responsive ──────────────────────────── */
@media (max-width: 768px) {
  .about-block + .about-block {
    margin-top: 48px;
  }

  .about-mission {
    margin-top: 48px;
  }

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

  .founder-card {
    padding: 1.5rem;
  }

  .about-cta-buttons {
    flex-direction: column;
    width: 100%;
  }

  .about-cta-buttons .btn {
    width: 100%;
  }
}

/* ─── Scrollbar (webkit) ─────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text2); }

/* ═══════════════════════════════════════════════════════════
   RESULT SCREEN — profile hero, stats row, topic breakdown
   ═══════════════════════════════════════════════════════════ */
.result-hero { text-align: center; padding: 32px 0 24px; }
.profile-title { font-family: 'Space Grotesk', sans-serif; font-size: 2rem; font-weight: 700; color: #3b82f6; margin-bottom: 8px; }
.profile-desc { color: #9ca3af; font-size: 1rem; margin-bottom: 20px; max-width: 480px; margin-left: auto; margin-right: auto; }
.score-pill { display: inline-block; background: #111827; border: 1px solid #1f2937; border-radius: 999px; padding: 8px 20px; color: #f9fafb; font-size: 1rem; margin-bottom: 12px; }
.percentile-badge { display: inline-block; background: rgba(59,130,246,0.15); border: 1px solid #3b82f6; border-radius: 999px; padding: 4px 14px; color: #3b82f6; font-size: 0.85rem; margin-left: 8px; }
.stats-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.stat-card { flex: 1 1 calc(50% - 12px); background: #111827; border: 1px solid #1f2937; border-radius: 12px; padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.stat-icon { font-size: 1.4rem; }
.stat-value { font-size: 1.3rem; font-weight: 700; color: #f9fafb; }
.stat-label { font-size: 0.8rem; color: #9ca3af; text-align: center; }
.topic-breakdown { margin: 32px 0; }
.topic-breakdown-title { color: #f9fafb; font-size: 1.1rem; font-weight: 600; margin-bottom: 16px; }
.topic-card { background: #111827; border: 1px solid #1f2937; border-radius: 12px; padding: 16px; margin-bottom: 10px; }
.topic-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.topic-name { color: #f9fafb; font-weight: 500; text-transform: capitalize; }
.topic-badge { font-size: 0.75rem; padding: 2px 10px; border-radius: 999px; }
.topic-badge.strongest { background: rgba(16,185,129,0.15); color: #10b981; border: 1px solid #10b981; }
.topic-badge.improve { background: rgba(245,158,11,0.15); color: #f59e0b; border: 1px solid #f59e0b; }
.topic-bar-container { background: #1f2937; border-radius: 999px; height: 6px; width: 100%; margin-bottom: 8px; }
.topic-bar { height: 6px; border-radius: 999px; transition: width 0.6s ease; }
.topic-bar.green { background: #10b981; }
.topic-bar.amber { background: #f59e0b; }
.topic-bar.red { background: #ef4444; }
.topic-stats-line { font-size: 0.78rem; color: #9ca3af; }

.result-hero, .stats-row, .topic-breakdown {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}
