/* ============== RESET & BASE ============== */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ===== LIGHT THEME (default) ===== */
  --bg-1: #fbfaf7;
  --bg-2: #f5f3ee;

  /* Primary anchor + the lively expansion palette */
  --accent:   #1e3a5f;           /* deep navy — anchor */
  --accent-2: #c2410c;           /* terracotta — warm editorial */
  --accent-3: #4f7d4a;           /* sage — positive states */
  --accent-4: #b08968;           /* warm camel — soft highlights */
  --accent-5: #7c5295;           /* aubergine — secondary headings */
  --gold:     #b45309;
  --danger:   #b91c1c;

  /* Subject tints (warm, distinct, classy) */
  --subject-english: #6b4f8a;
  --subject-maths:   #c2410c;
  --subject-verbal:  #4f7d4a;
  --subject-nvr:     #b08968;

  --text: #1a202c;
  --text-dim: #6b7280;
  --card: #ffffff;
  --card-border: #e8e3d8;
  --card-hover: #fbfaf7;
  --surface-soft: #f4f1ea;
  --surface-softer: #faf8f3;
  --tint-warm: #fef3eb;          /* peach wash for tinted sections */
  --tint-cool: #ecf0f4;           /* misty pale-blue wash */

  --shadow-card: 0 1px 2px rgba(26, 32, 44, 0.04), 0 4px 16px rgba(26, 32, 44, 0.04);
  --shadow-lift: 0 4px 14px rgba(30, 58, 95, 0.08), 0 14px 36px rgba(30, 58, 95, 0.07);

  --font-serif:   'Cormorant Garamond', 'Times New Roman', serif;
  --font-display: 'Fraunces', 'Cormorant Garamond', 'Times New Roman', serif;
  --font-sans:    'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ===== DARK THEME — used for gaming stage area only ===== */
[data-theme="dark"] {
  --bg-1: #0f172a;
  --bg-2: #1e293b;
  --gold: #fbbf24;
  --danger: #ef4444;
  --text: #f1f5f9;
  --text-dim: #94a3b8;
  --card: var(--surface-soft);
  --card-border: var(--card-hover);
  --card-hover: var(--card-hover);
  --surface-soft: var(--surface-soft);
  --surface-softer: rgba(255, 255, 255, 0.03);
  --shadow-card: none;
  --shadow-lift: 0 20px 50px rgba(99, 102, 241, 0.3);
}

html {
  background: var(--bg-1);
  min-height: 100%;
}

body {
  font-family: var(--font-sans);
  font-feature-settings: 'ss01', 'cv11';
  background: var(--bg-1);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
}

h1, h2, h3, h4, .hero-title, .land-h2, .blog-header h1, .blog-post-head h1, .dash-title {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--accent);
}
h1, .hero-title, .blog-header h1, .blog-header h2, .blog-post-head h1, .blog-post-head h2, .home-title, .auth-h1, .dash-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: 'opsz' 96, 'SOFT' 50;
}
.land-h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: 'opsz' 60, 'SOFT' 60;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ============== SCREEN SYSTEM ============== */
.screen {
  display: none;
  min-height: 100vh;
  padding: 24px;
  animation: fadeIn 0.4s ease;
}
.screen.active { display: block; }

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

.hidden { display: none !important; }

/* ============== HOME ============== */
.hero {
  max-width: 920px;
  margin: 40px auto;
  text-align: center;
}

.logo-burst {
  font-family: var(--font-serif);
  font-size: 64px;
  font-weight: 700;
  color: var(--accent);
  display: inline-block;
  line-height: 1;
  letter-spacing: -0.02em;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--accent-2);
  margin-bottom: 4px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(40px, 6vw, 64px);
  color: var(--accent);
  margin: 10px 0;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tagline {
  color: var(--text-dim);
  font-size: 18px;
  margin-bottom: 40px;
}

.mode-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.mode-card {
  background: var(--card);
  border: 2px solid var(--card-border);
  border-radius: 24px;
  padding: 32px 24px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.mode-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.mode-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lift);
}

.mode-card:hover::before { opacity: 0.4; }

.home-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(40px, 5vw, 56px);
  color: var(--accent);
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

.mode-icon { font-size: 56px; margin-bottom: 12px; }
.mode-card h2 { font-size: 24px; margin-bottom: 8px; }
.mode-card p { color: var(--text-dim); font-size: 14px; }

.mode-pill {
  display: inline-block;
  margin-top: 14px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(251, 191, 36, 0.2);
  color: var(--gold);
}

.mode-focus .mode-pill {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}

.subject-row {
  padding: 24px;
  background: var(--card);
  border-radius: 20px;
  border: 1px solid var(--card-border);
}

.subject-label {
  font-size: 14px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 14px;
}

.subject-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.chip {
  padding: 10px 18px;
  border-radius: 999px;
  background: #ffffff;
  border: 1.5px solid #d8d1c2;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.18s ease;
  cursor: pointer;
}

.chip:hover {
  background: #fdfaf3;
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(30, 58, 95, 0.10);
}

.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(30, 58, 95, 0.22);
  transform: translateY(-1px);
}
.chip.active:hover { background: #142d4d; color: #fff; }

/* ============== QUIZ ============== */
.quiz-header {
  max-width: 800px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.btn-ghost {
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 500;
  background: var(--card);
  border: 1px solid var(--card-border);
  transition: background 0.2s;
}

.btn-ghost:hover { background: var(--card-hover); }

.streak-badge, .score-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--card-border);
  font-weight: 700;
  font-size: 16px;
}

.streak-badge { color: #fb923c; }
.score-badge { color: var(--gold); }

.progress-bar {
  max-width: 800px;
  margin: 0 auto 24px;
  height: 6px;
  background: var(--surface-soft);
  border-radius: 999px;
  overflow: hidden;
}

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

.quiz-stage {
  max-width: 800px;
  margin: 0 auto;
}

.question-meta {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.meta-pill {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--card-border);
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
}

.question-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 36px;
  backdrop-filter: blur(10px);
  animation: slideUp 0.4s ease;
}

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

.question-text {
  font-size: clamp(20px, 3vw, 26px);
  line-height: 1.5;
  margin-bottom: 28px;
  font-weight: 600;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.answer-btn {
  padding: 18px 20px;
  border-radius: 12px;
  background: #ffffff;
  border: 1.5px solid #d8d1c2;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 2px rgba(26, 32, 44, 0.04);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  animation: answer-in 0.35s cubic-bezier(0.34, 1.4, 0.64, 1) backwards;
}
.answer-btn:nth-child(1) { animation-delay: 0.00s; }
.answer-btn:nth-child(2) { animation-delay: 0.05s; }
.answer-btn:nth-child(3) { animation-delay: 0.10s; }
.answer-btn:nth-child(4) { animation-delay: 0.15s; }
.answer-btn:nth-child(5) { animation-delay: 0.20s; }

@keyframes answer-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.answer-btn:hover:not(:disabled) {
  background: #fdfaf3;
  border-color: var(--accent);
  transform: translateX(3px);
  box-shadow: 0 4px 14px rgba(30, 58, 95, 0.12);
}
.answer-btn:hover:not(:disabled) .answer-letter {
  background: var(--accent-2);
  color: #fff;
  transform: scale(1.06);
}
.answer-btn:active:not(:disabled) { transform: translateX(3px) scale(0.99); }

.answer-btn:disabled { cursor: default; }
.answer-btn:focus-visible { outline: 3px solid rgba(194, 65, 12, 0.35); outline-offset: 2px; }

.answer-letter {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent);     /* solid navy — high contrast on white */
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 2px rgba(26, 32, 44, 0.15);
  transition: background 0.18s ease, transform 0.18s ease;
}

.answer-btn.correct {
  background: #ecfdf5;
  border-color: var(--accent-3);
  box-shadow: 0 4px 18px rgba(79, 125, 74, 0.18);
  animation: pop 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.answer-btn.correct .answer-letter {
  background: var(--accent-3);
  color: #fff;
}

.answer-btn.wrong {
  background: #fef2f2;
  border-color: var(--danger);
  box-shadow: 0 4px 18px rgba(185, 28, 28, 0.18);
  animation: shake 0.4s ease;
}
.answer-btn.wrong .answer-letter {
  background: var(--danger);
  color: #fff;
}

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

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ============== FEEDBACK ============== */
.feedback {
  margin-top: 20px;
  padding: 24px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--card-border);
  animation: slideUp 0.4s ease;
}

.feedback-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.feedback-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
}

.feedback.correct .feedback-icon {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-3);
}

.feedback.wrong .feedback-icon {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.feedback-title { font-size: 22px; font-weight: 700; }
.feedback.correct .feedback-title { color: var(--accent-3); }
.feedback.wrong .feedback-title { color: var(--danger); }

.feedback-explanation {
  color: var(--text-dim);
  line-height: 1.6;
  font-size: 16px;
  margin-bottom: 18px;
}

.btn-primary {
  padding: 13px 26px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 1px 2px rgba(26, 32, 44, 0.08);
}
.btn-primary:hover {
  background: #142d4d;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 32, 44, 0.12);
}

/* ============== DARK GAMING STAGE WRAPPER ============== */
/* Only the inner game stage is dark — the rest of the app stays light */
#screen-game {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #312e81 100%);
  color: #f1f5f9;
}
#screen-game [data-theme="dark"],
#screen-game .game-stage,
#screen-game .game-end {
  /* explicit dark surface variables for this scope */
  --card: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.12);
  --card-hover: rgba(255, 255, 255, 0.1);
  --surface-soft: rgba(255, 255, 255, 0.05);
  --text: #f1f5f9;
  --text-dim: #94a3b8;
}
#screen-game .quiz-header { color: #f1f5f9; }
#screen-game .btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
}
#screen-game .game-end { color: #f1f5f9; }

/* ============== GAMES ============== */
.game-title {
  font-size: 22px;
  font-weight: 700;
  flex: 1;
  text-align: center;
  color: var(--accent);
}

.game-stage {
  max-width: 800px;
  margin: 0 auto;
  height: 60vh;
  min-height: 420px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-end {
  max-width: 500px;
  margin: 60px auto;
  text-align: center;
  padding: 40px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 24px;
}

.game-end h2 { font-size: 30px; margin-bottom: 10px; }
.game-end p { color: var(--gold); font-size: 22px; font-weight: 700; margin-bottom: 24px; }

/* Game-specific styles */
.game-instructions {
  text-align: center;
  padding: 30px;
}

.game-instructions h3 {
  font-size: 28px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.game-instructions p { color: var(--text-dim); margin-bottom: 24px; font-size: 17px; line-height: 1.5; }

.game-hud {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  z-index: 5;
  pointer-events: none;
}

.hud-pill {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
}

.game-object {
  position: absolute;
  cursor: pointer;
  user-select: none;
  font-size: 40px;
  transition: transform 0.1s;
}

.game-object:hover { transform: scale(1.15); }

.flash-number {
  font-size: 120px;
  font-weight: 900;
  color: var(--accent);
  animation: flashIn 0.3s ease;
}

@keyframes flashIn {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.flash-input {
  width: 200px;
  padding: 18px;
  font-size: 32px;
  text-align: center;
  border-radius: 14px;
  background: var(--card-hover);
  border: 2px solid var(--card-border);
  color: var(--text);
  font-weight: 700;
  margin-top: 20px;
  outline: none;
}

.flash-input:focus { border-color: var(--accent); }

.color-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 30px;
  width: 100%;
  max-width: 400px;
}

.color-target {
  font-size: 28px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 24px;
  padding: 14px 28px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.3);
}

.color-tile {
  height: 90px;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.15s;
  border: 3px solid var(--card-hover);
}

.color-tile:hover { transform: scale(1.05); }

.math-prompt {
  text-align: center;
  padding: 30px;
  width: 100%;
}

.math-question {
  font-size: 56px;
  font-weight: 900;
  margin-bottom: 24px;
  letter-spacing: 2px;
}

.math-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  max-width: 300px;
  margin: 0 auto;
}

.math-option {
  padding: 18px;
  font-size: 24px;
  font-weight: 800;
  border-radius: 14px;
  background: rgba(99, 102, 241, 0.2);
  border: 2px solid var(--card-border);
  transition: all 0.2s;
}

.math-option:hover {
  background: rgba(99, 102, 241, 0.4);
  border-color: var(--accent);
}

/* ============== ROAD DODGER ============== */
.road-stage { background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%); }

.road-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.road-lane-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.3) 0,
    rgba(255, 255, 255, 0.3) 30px,
    transparent 30px,
    transparent 60px
  );
  animation: roadScroll 0.6s linear infinite;
}
@keyframes roadScroll {
  from { background-position: 0 0; }
  to   { background-position: 0 60px; }
}

.road-car {
  position: absolute;
  bottom: 30px;
  width: 56px;
  height: 56px;
  font-size: 48px;
  text-align: center;
  line-height: 56px;
  transition: left 0.15s ease-out;
  z-index: 3;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.6));
}

.road-obstacle {
  position: absolute;
  width: 44px;
  height: 44px;
  font-size: 36px;
  text-align: center;
  line-height: 44px;
  z-index: 2;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.road-controls {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 4;
}
.road-btn {
  pointer-events: auto;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  color: white;
  font-size: 22px;
  font-weight: 800;
  border: 1px solid var(--card-hover);
}
.road-btn:active { transform: scale(0.9); background: var(--accent); }

/* ============== WHACK-A-MOLE ============== */
.whack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 30px;
  width: 100%;
  max-width: 420px;
}

.whack-hole {
  aspect-ratio: 1;
  background: radial-gradient(ellipse at center, #1f2937 0%, #0f172a 70%);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.1s;
}
.whack-hole:active { transform: scale(0.96); }

.whack-mole {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  transform: translateY(100%);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.whack-hole.up .whack-mole {
  transform: translateY(0);
}

/* ============== MEMORY MATCH ============== */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 24px;
  width: 100%;
  max-width: 460px;
}

.memory-card {
  aspect-ratio: 1;
  position: relative;
  perspective: 800px;
  background: transparent;
  cursor: pointer;
}

.memory-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  backface-visibility: hidden;
  font-size: 36px;
  font-weight: 800;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}
.memory-back {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  border: 1px solid var(--card-hover);
}
.memory-front {
  background: var(--surface-soft);
  border: 1px solid var(--card-border);
  transform: rotateY(180deg);
}
.memory-card.flipped .memory-back  { transform: rotateY(180deg); }
.memory-card.flipped .memory-front { transform: rotateY(0); }
.memory-card.matched .memory-front {
  background: rgba(16, 185, 129, 0.25);
  border-color: var(--accent-3);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}

/* ============== SIMON SAYS ============== */
.simon-wrap {
  padding: 30px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.simon-grid {
  display: grid;
  grid-template-columns: repeat(2, 160px);
  gap: 16px;
}
.simon-pad {
  aspect-ratio: 1;
  border-radius: 24px;
  border: 4px solid var(--card-hover);
  cursor: pointer;
  opacity: 0.55;
  transition: all 0.12s;
  --glow: white;
}
.simon-pad:hover { opacity: 0.7; }
.simon-pad.lit {
  opacity: 1;
  box-shadow: 0 0 40px var(--glow), 0 0 80px var(--glow);
  transform: scale(1.04);
  border-color: white;
}

/* ============== RESULTS ============== */
.results-card {
  max-width: 600px;
  margin: 60px auto;
  padding: 50px 40px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  backdrop-filter: blur(10px);
}

.results-burst { font-size: 80px; margin-bottom: 16px; }

.results-card h1, .results-card h2 {
  font-size: 38px;
  color: var(--accent);
  margin-bottom: 30px;
}

.results-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.stat-block {
  padding: 20px 8px;
  background: var(--surface-soft);
  border-radius: 16px;
}

.stat-num {
  font-size: 32px;
  font-weight: 900;
  color: var(--gold);
}

.stat-label {
  font-size: 13px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.results-message {
  color: var(--text-dim);
  font-size: 17px;
  margin-bottom: 28px;
  line-height: 1.5;
}

.results-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============== PRACTICE PAPERS ============== */
.mode-pill-papers {
  background: rgba(168, 85, 247, 0.2) !important;
  color: #c4b5fd !important;
}

.papers-intro {
  max-width: 820px;
  margin: 0 auto 28px;
  padding: 18px 22px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.6;
}

.papers-filters {
  max-width: 1100px;
  margin: 0 auto 16px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.papers-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.papers-filter-label {
  font-size: 13px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-right: 6px;
  min-width: 72px;
}
.papers-chip {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface-softer);
  border: 1px solid var(--card-border);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}
.papers-chip:hover { background: var(--card-hover); }
.papers-chip.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  font-weight: 600;
  color: white;
  box-shadow: 0 3px 12px rgba(236, 72, 153, 0.35);
}

.papers-count {
  max-width: 1100px;
  margin: 0 auto 14px;
  font-size: 13px;
  color: var(--text-dim);
  text-align: right;
  padding: 0 4px;
}

.papers-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 14px;
}

.paper-card-level {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
}
.paper-card-level-beginner     { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
.paper-card-level-intermediate { background: rgba(251, 191, 36, 0.2); color: var(--gold); }
.paper-card-level-expert       { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }

.paper-card.level-beginner::before     { background: linear-gradient(90deg, #10b981, #6ee7b7); }
.paper-card.level-intermediate::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.paper-card.level-expert::before       { background: linear-gradient(90deg, #ef4444, #ec4899); }

.paper-card {
  text-align: left;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 22px;
  transition: all 0.25s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.paper-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.paper-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.25);
}

.paper-card h3 {
  font-size: 17px;
  margin-bottom: 8px;
  color: var(--text);
}

.paper-card-style {
  display: inline-block;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.15);
  color: #c4b5fd;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.paper-card-desc {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 14px;
}

.paper-card-meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--text-dim);
  border-top: 1px solid var(--card-border);
  padding-top: 12px;
}
.paper-card-meta strong { color: var(--gold); }

/* Paper reference line at the bottom of each question */
.paper-ref {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px dashed var(--card-border);
  font-size: 11px;
  color: var(--text-dim);
  text-align: right;
  font-style: italic;
  letter-spacing: 0.3px;
}

.paper-ref::before {
  content: "📄 ";
  font-style: normal;
}

/* ============== MOCK TEST MODE ============== */
.mode-mock { position: relative; }
.mode-pill-exam {
  background: rgba(16, 185, 129, 0.2) !important;
  color: var(--accent-3) !important;
}

.mock-timer, .mock-progress-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--card-border);
  font-weight: 700;
  font-size: 16px;
}

.mock-timer { color: var(--accent-3); font-variant-numeric: tabular-nums; }
.mock-progress-pill { color: var(--gold); }

.mock-nav {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.btn-submit {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-3), #0d9488);
  color: white;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.5px;
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(16, 185, 129, 0.45);
}

.answer-btn.selected {
  background: #eef2ff;
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(30, 58, 95, 0.18);
  transform: translateX(3px);
}
.answer-btn.selected .answer-letter {
  background: var(--accent-2);
  color: #fff;
  transform: scale(1.06);
}

/* Palette overlay */
.mock-palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.mock-palette-card {
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-2);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 28px;
}

.mock-palette-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.mock-palette-header h3 { font-size: 22px; }

.palette-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 18px;
}
.palette-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: middle;
}
.palette-answered { background: var(--accent-3); }
.palette-unanswered { background: var(--card-hover); }
.palette-current { background: var(--accent); }

.palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
  gap: 8px;
}

.palette-cell {
  height: 44px;
  border-radius: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--card-border);
  font-weight: 700;
  font-size: 14px;
  transition: all 0.15s;
}
.palette-cell:hover { transform: scale(1.05); }
.palette-cell.answered {
  background: rgba(16, 185, 129, 0.25);
  border-color: var(--accent-3);
  color: white;
}
.palette-cell.current {
  background: var(--accent);
  color: white;
  outline: 2px solid white;
}

/* Comprehension passages — high-contrast reading card */
.question-passage {
  background: #fffdf7;                       /* warm white */
  border-left: 4px solid var(--accent-2);
  border-radius: 10px;
  padding: 22px 26px 20px;
  margin-bottom: 22px;
  font-size: 16.5px;
  line-height: 1.75;
  color: #1a202c;                            /* solid dark navy */
  white-space: pre-wrap;
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  max-height: 340px;
  overflow-y: auto;
  box-shadow:
    0 1px 2px rgba(26, 32, 44, 0.04),
    inset 0 0 0 1px #ebe5d5;
}

.question-passage::before {
  content: "Read the passage";
  display: block;
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 12px;
  font-weight: 700;
}

/* Scrollbar in the passage stays subtle */
.question-passage::-webkit-scrollbar { width: 8px; }
.question-passage::-webkit-scrollbar-thumb {
  background: rgba(30, 58, 95, 0.18);
  border-radius: 8px;
}
.question-passage::-webkit-scrollbar-thumb:hover { background: rgba(30, 58, 95, 0.32); }

/* Difficulty chips: extra colours when active */
.difficulty-chip.active[data-difficulty="Easy"] {
  background: linear-gradient(135deg, var(--accent-3), #0ea5e9);
}
.difficulty-chip.active[data-difficulty="Medium"] {
  color: #f59e0b;
}
.difficulty-chip.active[data-difficulty="Hard"] {
  background: linear-gradient(135deg, var(--danger), #be185d);
}

/* ============== MOCK REVIEW ============== */
.review-container {
  max-width: 820px;
  margin: 40px auto;
}

.review-header {
  text-align: center;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 40px 24px 32px;
  margin-bottom: 24px;
}

.review-burst { font-size: 64px; margin-bottom: 8px; }
.review-header h1, .review-header h2 {
  font-size: 30px;
  margin-bottom: 16px;
  color: var(--accent);
}

.review-score-big {
  font-size: 56px;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
}
.review-percent {
  font-size: 22px;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 14px;
}
.review-message {
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.5;
  max-width: 500px;
  margin: 0 auto;
}

.review-breakdown {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 18px;
}

.review-breakdown h3 {
  font-size: 18px;
  margin-bottom: 16px;
  color: var(--text);
}

.bar-row {
  margin-bottom: 12px;
}
.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--text-dim);
}
.bar-label strong { color: var(--text); }
.bar-track {
  height: 10px;
  background: var(--surface-soft);
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-3), var(--accent));
  border-radius: 999px;
  transition: width 0.6s ease;
}

.review-questions {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
}

.review-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.review-tab {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--card-border);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
}
.review-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  font-weight: 700;
}

.review-item {
  border-left: 4px solid var(--card-border);
  padding: 14px 16px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
}
.review-item.correct { border-left-color: var(--accent-3); }
.review-item.wrong   { border-left-color: var(--danger); }
.review-item.unanswered { border-left-color: var(--text-dim); }

.review-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.review-item-num {
  font-weight: 800;
  color: var(--text-dim);
  font-size: 13px;
}
.review-item-status {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.review-item.correct .review-item-status { background: rgba(16, 185, 129, 0.2); color: var(--accent-3); }
.review-item.wrong .review-item-status { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.review-item.unanswered .review-item-status { background: var(--card-hover); color: var(--text-dim); }

.review-item-q {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.5;
}
.review-item-meta {
  font-size: 12px;
  color: var(--accent-2);
  margin-bottom: 8px;
  font-weight: 600;
}
.review-item-ans {
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.55;
}
.review-item-ans strong { color: var(--accent); }
.review-item-explanation {
  margin-top: 10px;
  padding: 12px 14px;
  background: #fffdf7;
  border-left: 3px solid var(--accent-3);
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.6;
}

/* ============== LETTER-ONLY ANSWER BUTTONS (image NVR) ============== */
.answer-btn-letter {
  justify-content: center;
  text-align: center;
  padding: 22px 16px;
  font-size: 24px;
  font-weight: 800;
}
.answer-btn-letter .answer-letter {
  width: 48px;
  height: 48px;
  font-size: 22px;
  border-radius: 14px;
}

/* ============== NVR IMAGE QUESTIONS ============== */
.nvr-image {
  display: block;
  width: 100%;
  max-width: 700px;
  margin: 0 auto 18px;
  background: white;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}
.review-nvr-image {
  max-width: 480px;
  padding: 10px;
  margin: 10px 0;
}

/* ============== NVR VISUAL RENDERER ============== */
.nvr-question { display: block; }

.nvr-q-prompt {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 16px;
  line-height: 1.4;
}
.nvr-q-prompt em { color: var(--gold); font-style: normal; font-weight: 600; }

.nvr-seq, .nvr-analogy, .nvr-reflection {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--surface-softer);
  border: 1px solid var(--card-border);
  border-radius: 16px;
}

.nvr-matrix {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  background: var(--surface-softer);
  border: 1px solid var(--card-border);
  border-radius: 16px;
}
.nvr-matrix .nvr-seq {
  padding: 6px;
  background: transparent;
  border: none;
}

.nvr-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  min-height: 78px;
  padding: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--surface-soft);
  border-radius: 12px;
  color: white;
}

.nvr-cell-q {
  font-size: 36px;
  font-weight: 900;
  color: var(--accent-2);
  background: transparent;
  border: 2px dashed var(--accent-2);
}

.nvr-rel {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dim);
  padding: 0 4px;
}

.nvr-mirror {
  width: 4px;
  align-self: stretch;
  background: linear-gradient(180deg, transparent, var(--gold) 30%, var(--gold) 70%, transparent);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.nvr-shape { display: block; }

.nvr-count-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: var(--surface-softer);
  border: 1px solid var(--card-border);
  border-radius: 16px;
}

.nvr-mini {
  display: inline-flex;
  padding: 2px;
}

.nvr-added .nvr-shape g {
  stroke: var(--accent-3);
}
.nvr-added .nvr-shape g[fill="#fff"] {
  fill: var(--accent-3);
}

.nvr-plus {
  font-size: 26px;
  font-weight: 800;
  color: var(--accent-2);
  margin: 0 10px;
}

/* Visual answer buttons */
.answer-btn-visual {
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  padding: 14px 12px;
  gap: 8px;
}
.answer-btn-visual .answer-letter {
  align-self: flex-start;
}
.nvr-opt-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.nvr-opt-vis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
}
.nvr-opt-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: capitalize;
  letter-spacing: 0.3px;
  line-height: 1.3;
}

/* ============== TOP BAR ============== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
}
.topbar-brand { font-weight: 800; font-size: 18px; }
.topbar-spacer { flex: 1; }
.topbar-user { display: flex; align-items: center; gap: 10px; }
.topbar-role {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 999px;
}
.topbar-role-teacher { background: rgba(99, 102, 241, 0.25); color: #a5b4fc; }
.topbar-role-student { background: rgba(16, 185, 129, 0.25); color: #6ee7b7; }
.topbar-name { font-weight: 600; font-size: 14px; }
.btn-small { padding: 6px 12px; font-size: 13px; }

/* ============== AUTH ============== */
.auth-wrap {
  max-width: 460px;
  margin: 40px auto;
}
.auth-hero { text-align: center; margin-bottom: 28px; }
.auth-hero h1, .auth-hero h2, .auth-h1 {
  font-family: var(--font-serif);
  font-size: 38px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 8px 0;
}
.auth-hero { text-align: center; }

.auth-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 28px;
}
.auth-tabs {
  display: flex;
  gap: 6px;
  background: var(--surface-softer);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-dim);
}
.auth-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
}

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field span {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 600;
}
.auth-field input {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--card-border);
  color: var(--text);
  font-size: 15px;
  outline: none;
  font-family: inherit;
}
.auth-field input:focus { border-color: var(--accent); background: var(--card-hover); }
.auth-error {
  color: var(--danger);
  font-size: 13px;
  min-height: 18px;
}
.auth-submit { margin-top: 6px; }

/* Admin role pill in the top bar */
.topbar-role-admin {
  background: linear-gradient(135deg, var(--accent-5), var(--accent));
  color: #fff;
  font-weight: 700;
}

/* Admin stat cards */
.admin-stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.admin-stat {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 22px 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.admin-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
}
.admin-stat:nth-child(2)::before { background: var(--accent-3); }
.admin-stat:nth-child(3)::before { background: var(--accent-5); }
.admin-stat:nth-child(4)::before { background: var(--accent-2); }
.admin-stat:nth-child(5)::before { background: var(--accent-4); }
.admin-stat-num {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
  line-height: 1;
}
.admin-stat-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 8px;
}

/* TOTP setup & bookmark URL card */
.totp-qr-wrap {
  display: flex;
  justify-content: center;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  margin: 14px 0 18px;
}
.totp-qr-wrap canvas {
  display: block;
  max-width: 100%;
  border-radius: 6px;
}
.totp-secret-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background: var(--tint-warm);
  border: 1px dashed var(--accent-2);
  border-radius: 8px;
}
.totp-secret-label {
  font-size: 12px;
  color: var(--accent-2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.totp-secret-code {
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  font-size: 15px;
  letter-spacing: 0.1em;
  word-break: break-all;
  color: var(--text);
  font-weight: 600;
}

.admin-url-display {
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  font-size: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 14px 0;
  word-break: break-all;
  color: var(--accent);
  font-weight: 600;
}

/* Verification step */
.auth-step-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
}
.auth-step-sub {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
}
.auth-step-sub strong {
  color: var(--accent);
  font-weight: 600;
}
.auth-code-input {
  font-family: var(--font-sans);
  font-size: 28px;
  letter-spacing: 0.45em;
  text-align: center;
  font-weight: 700;
  padding: 16px 12px;
  font-variant-numeric: tabular-nums;
}
.auth-step-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  gap: 10px;
  flex-wrap: wrap;
}
.btn-link {
  background: none;
  border: none;
  color: var(--accent-2);
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-family: inherit;
}
.btn-link:hover { color: var(--accent); }
.btn-link:disabled {
  color: var(--text-dim);
  cursor: default;
  text-decoration: none;
}
.auth-step-cooldown {
  font-size: 12px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.auth-hint {
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
  margin-top: 8px;
  line-height: 1.5;
}

/* ============== DASHBOARD ============== */
.dash-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}
.dash-title {
  font-size: 30px;
  margin-bottom: 20px;
  color: var(--accent);
}
.dash-tabs {
  display: flex;
  gap: 6px;
  background: var(--card);
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  margin-bottom: 24px;
  overflow-x: auto;
}
.dash-tab {
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-dim);
  white-space: nowrap;
}
.dash-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: 0 3px 10px rgba(236, 72, 153, 0.3);
}
.dash-tab-pane { display: none; }
.dash-tab-pane.active { display: block; }
.dash-section { margin-bottom: 32px; }
.dash-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.dash-section h2 {
  font-size: 20px;
  margin-bottom: 14px;
}
.dash-help {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 14px;
}
.empty-state {
  padding: 40px 24px;
  text-align: center;
  background: var(--card);
  border: 1px dashed var(--card-border);
  border-radius: 16px;
  color: var(--text-dim);
}
.empty-state p { margin-bottom: 6px; }

/* ============== STUDENTS LIST ============== */
.students-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}
.student-card {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 18px;
}
.student-avatar {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
  color: white;
}
.student-info { flex: 1; min-width: 0; }
.student-info h3 { font-size: 16px; margin-bottom: 2px; }
.student-meta { font-size: 13px; color: var(--text-dim); margin-bottom: 8px; }
.student-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.stat-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.stat-pending { background: rgba(251, 191, 36, 0.2); color: var(--gold); }
.stat-done    { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
.student-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.btn-danger { color: #fca5a5; }
.btn-danger:hover { background: rgba(239, 68, 68, 0.15); }

/* ============== MODAL ============== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-card {
  background: var(--bg-2);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 28px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.modal-card h2 {
  margin-bottom: 8px;
  font-size: 22px;
}
.modal-sub { color: var(--text-dim); margin-bottom: 16px; font-size: 14px; }

/* Generic modal close button */
.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-soft);
  border: none;
  color: var(--text-dim);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.modal-close:hover { background: var(--accent-2); color: #fff; }

/* Subscribe modal — marketing-only email capture */
.subscribe-card {
  position: relative;
  max-width: 460px;
  padding: 36px 32px 28px;
}
.subscribe-title {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--accent);
  margin-bottom: 8px;
}
.subscribe-sub {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 22px;
}
.subscribe-form { display: flex; flex-direction: column; gap: 14px; }
.subscribe-done {
  text-align: center;
  padding: 20px 0 4px;
  animation: subscribe-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.subscribe-done h3 {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--accent);
  margin: 10px 0 6px;
}
.subscribe-done p { color: var(--text-dim); font-size: 14px; }
.subscribe-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-3);
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(79, 125, 74, 0.32);
}
@keyframes subscribe-pop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.modal-card form { display: flex; flex-direction: column; gap: 14px; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

/* ============== ASSIGNMENTS ============== */
.assignments-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.asgn-section-head {
  font-size: 18px;
  color: var(--text-dim);
  margin-top: 10px;
  font-weight: 600;
}
.assignment-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 18px;
  position: relative;
}
.assignment-card.asgn-pending { border-left: 4px solid var(--gold); }
.assignment-card.asgn-done    { border-left: 4px solid var(--accent-3); opacity: 0.9; }
.asgn-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.asgn-status {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
}
.assignment-card h4 {
  font-size: 17px;
  margin-bottom: 8px;
}
.asgn-note {
  font-size: 13px;
  color: var(--text-dim);
  background: var(--surface-softer);
  padding: 8px 12px;
  border-radius: 8px;
  margin: 8px 0;
}
.asgn-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.asgn-due { color: var(--gold); }
.asgn-score {
  font-size: 14px;
  color: var(--accent-3);
  margin: 6px 0;
}
.asgn-score strong { font-size: 18px; }
.asgn-start {
  margin-top: 8px;
  width: 100%;
}
.asgn-actions {
  position: absolute;
  top: 14px;
  right: 14px;
}

/* ============== ASSIGN PANE ============== */
.assign-stage {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.assign-field { display: flex; flex-direction: column; gap: 8px; }
.assign-field label {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 600;
}
.assign-field input[type="date"],
.assign-field input[type="text"] {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--card-border);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
.assign-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.check-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--card-border);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}
.check-pill input { accent-color: var(--accent); }
.check-pill:has(input:checked) {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: white;
}

/* Assign overlay on paper cards (teacher view) */
#assign-papers-grid .paper-card .assign-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.92);
  color: white;
  font-weight: 700;
  font-size: 15px;
  opacity: 0;
  transition: opacity 0.2s;
  border-radius: 18px;
}
#assign-papers-grid .paper-card:hover .assign-overlay { opacity: 1; }

/* ============== PUBLIC NAV ============== */
.public-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--card-border);
}
.brand-link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  text-decoration: none;
  color: var(--text);
}
.brand-link-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.brand-link-btn:hover .brand-name { filter: brightness(1.05); }

.nav-guest-counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(236, 72, 153, 0.12));
  border: 1px solid rgba(99, 102, 241, 0.3);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.nav-links a {
  color: var(--text-dim);
}
.nav-links a#nav-practice {
  color: var(--accent);
  font-weight: 600;
}
.brand-mark { font-size: 24px; line-height: 1; }
.brand-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 22px;
  color: var(--accent);
  letter-spacing: 0.01em;
}
.brand-mark {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 22px;
  color: var(--accent-2);
  margin-right: 2px;
}
.brand-sub {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
  margin-left: 4px;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 4px;
  flex: 1;
  margin-left: 18px;
}
.nav-links a {
  display: block;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.15s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-soft); }
.nav-links a.active {
  color: var(--accent);
  background: rgba(30, 58, 95, 0.06);
  font-weight: 700;
  position: relative;
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--accent-2);
  border-radius: 2px;
}
.nav-actions { display: flex; gap: 8px; }
.nav-burger {
  display: none;
  font-size: 24px;
  padding: 6px 10px;
  margin-left: auto;
}

@media (max-width: 800px) {
  .nav-burger { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    background: white;
    padding: 8px;
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
    box-shadow: var(--shadow-card);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-actions .btn-ghost { display: none; }
}

/* ============== LANDING ============== */
.landing {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px;
}

.hero-section {
  text-align: center;
  padding: 60px 20px 50px;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(38px, 5.5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  font-weight: 700;
  max-width: 900px;
  margin: 0 auto 22px;
  color: var(--accent);
}
.hero-title strong {
  color: var(--accent-2);
  font-weight: 700;
  font-style: italic;
  font-family: var(--font-display);
}
.hero-title em {
  font-style: italic;
  color: var(--accent-5);
}
.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  background: transparent;
  padding: 0;
  border-bottom: 1px solid var(--card-border);
  border-radius: 0;
  padding-bottom: 8px;
  margin-bottom: 22px;
}
.hero-sub {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-dim);
  max-width: 760px;
  margin: 0 auto 30px;
  line-height: 1.55;
}
.hero-sub strong { color: var(--text); }
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.btn-large { padding: 16px 28px; font-size: 16px; }
.hero-bullets {
  list-style: none;
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
  color: var(--text-dim);
  font-size: 14px;
}

/* =====================================================================
   PLAYFUL BACKGROUND WASH — soft, colourful blobs in the landing background
   Pure decoration, very subtle, doesn't affect readability.
   ===================================================================== */
#screen-landing {
  position: relative;
  overflow-x: clip;
}
#screen-landing::before,
#screen-landing::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
  opacity: 0.55;
  animation: blob-drift 22s ease-in-out infinite;
}
#screen-landing::before {
  width: 480px; height: 480px;
  background: radial-gradient(circle, #fde2d2 0%, transparent 70%);
  top: -120px; right: -120px;
}
#screen-landing::after {
  width: 520px; height: 520px;
  background: radial-gradient(circle, #d8efdf 0%, transparent 70%);
  top: 420px; left: -180px;
  animation-delay: -8s;
}
.landing { position: relative; z-index: 1; }
@keyframes blob-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(20px, 30px) scale(1.05); }
  66%      { transform: translate(-15px, 15px) scale(0.95); }
}

/* =====================================================================
   SPARKLE DECORATIONS — small SVG-style flourishes next to key copy
   ===================================================================== */
.deco-sparkle, .deco-star {
  position: absolute;
  pointer-events: none;
  opacity: 0.85;
  animation: sparkle-twinkle 2.6s ease-in-out infinite;
}
.deco-star {
  animation: star-spin 8s linear infinite;
}
@keyframes sparkle-twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.85; }
  50%      { transform: scale(1.25) rotate(45deg); opacity: 1; }
}
@keyframes star-spin {
  to { transform: rotate(360deg); }
}

/* Hero gets a little garden of decorations around the headline */
.hero-section { position: relative; }
.hero-section .deco-sparkle-1 { top: 4px;  left: 8%;   width: 26px; height: 26px; color: var(--accent-2); animation-delay: 0s; }
.hero-section .deco-sparkle-2 { top: 60px; right: 11%; width: 22px; height: 22px; color: var(--accent-5); animation-delay: 0.7s; }
.hero-section .deco-sparkle-3 { top: 180px; left: 14%; width: 18px; height: 18px; color: var(--accent-3); animation-delay: 1.4s; }
.hero-section .deco-star-1     { top: 38px;  right: 18%; width: 28px; height: 28px; color: #f4a261; opacity: 0.7; }
.hero-section .deco-star-2     { bottom: 90px; left: 6%;  width: 22px; height: 22px; color: var(--accent-3); opacity: 0.55; }

/* Make sure decorations don't break narrow-screen layouts */
@media (max-width: 760px) {
  .deco-sparkle, .deco-star { display: none; }
}

/* =====================================================================
   HERO "KID-TESTED" BADGE — playful floating roundel near the headline
   ===================================================================== */
.hero-badge {
  position: absolute;
  top: 8px;
  right: 4%;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffd166, #f4a261 70%, #e76f51 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: 0 8px 24px rgba(231, 111, 81, 0.35), inset 0 -4px 8px rgba(0,0,0,0.08);
  transform: rotate(-8deg);
  animation: badge-bounce 3.4s ease-in-out infinite;
  z-index: 3;
  font-weight: 700;
  text-align: center;
  line-height: 1.05;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
  pointer-events: none;
}
.hero-badge-emoji { font-size: 26px; line-height: 1; }
.hero-badge-text  { font-size: 11px; letter-spacing: 0.3px; }

@keyframes badge-bounce {
  0%, 100% { transform: rotate(-8deg) translateY(0); }
  50%      { transform: rotate(-4deg) translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-badge { animation: none; }
}

@media (max-width: 760px) {
  .hero-badge {
    width: 72px;
    height: 72px;
    top: 4px;
    right: 4%;
  }
  .hero-badge-emoji { font-size: 20px; }
  .hero-badge-text  { font-size: 9px; }
}

/* =====================================================================
   HERO STATS STRIP — colourful number band with animated counters
   ===================================================================== */
.stats-strip {
  position: relative;
  max-width: 1080px;
  margin: 40px auto 80px;
  padding: 36px 24px 32px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, #ffe4cf 0%, transparent 55%),
    linear-gradient(225deg, #d9f5e4 0%, transparent 60%),
    linear-gradient(315deg, #f0e4ff 0%, transparent 65%),
    #fffdf7;
  border: 1px solid var(--card-border);
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.stats-strip::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, #f4a261 0%, #ffd166 25%, #06d6a0 50%, #4cc9f0 75%, #c08bff 100%);
}
.stat-cell { text-align: center; padding: 8px 16px; }
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'lnum';
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.stat-cell-1 .stat-num { color: var(--accent); }
.stat-cell-2 .stat-num { color: var(--accent-2); }
.stat-cell-3 .stat-num { color: var(--accent-3); }
.stat-cell-4 .stat-num { color: var(--accent-5); }
.stat-label {
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.stat-divider {
  width: 1px;
  height: 50px;
  background: linear-gradient(180deg, transparent, var(--card-border), transparent);
  align-self: center;
}
@media (max-width: 760px) {
  .stats-strip { grid-template-columns: 1fr 1fr; gap: 16px; padding: 24px 16px; }
  .stat-divider { display: none; }
}

/* Small eyebrow above section headings */
.section-eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-2);
  padding: 4px 12px;
  background: var(--tint-warm);
  border-radius: 999px;
  margin-bottom: 14px;
}

/* =====================================================================
   "WHAT IS QUEST ARENA" — three colourful pillar cards
   ===================================================================== */
.what-section { padding-top: 30px; padding-bottom: 30px; }
.what-lead { max-width: 780px; margin-bottom: 36px; }

.what-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 12px 0 24px;
}
.what-pillar {
  background: #fff;
  border-radius: 18px;
  padding: 28px 24px 24px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.what-pillar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
}
.what-pillar-1 { background: linear-gradient(160deg, #fff0df 0%, #fffbf3 75%); }
.what-pillar-1::before { background: linear-gradient(90deg, #ffd166, #f4a261, #e76f51); height: 6px; }
.what-pillar-2 { background: linear-gradient(160deg, #e6f6ec 0%, #f6fbf7 75%); }
.what-pillar-2::before { background: linear-gradient(90deg, #06d6a0, #34d399, #2a9d8f); height: 6px; }
.what-pillar-3 { background: linear-gradient(160deg, #ede5f7 0%, #f8f4fd 75%); }
.what-pillar-3::before { background: linear-gradient(90deg, #c08bff, #a78bfa, #7b5ea7); height: 6px; }

.what-pillar:hover {
  transform: translateY(-8px) rotate(-0.5deg) scale(1.015);
  box-shadow: 0 18px 38px rgba(30, 58, 95, 0.16);
}
.what-pillar:hover .what-pillar-icon {
  transform: scale(1.15) rotate(-6deg);
}
.what-pillar-icon {
  transition: transform 0.35s cubic-bezier(.34,1.56,.64,1);
}
.what-pillar-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.what-pillar-1 .what-pillar-badge { background: var(--accent-2); color: #fff; }
.what-pillar-2 .what-pillar-badge { background: var(--accent-3); color: #fff; }
.what-pillar-3 .what-pillar-badge { background: var(--accent-5); color: #fff; }

.what-pillar-icon {
  font-size: 42px;
  line-height: 1;
  margin-bottom: 14px;
  display: inline-block;
  animation: pillar-float 4s ease-in-out infinite;
}
.what-pillar:nth-child(1) .what-pillar-icon { animation-delay: 0s; }
.what-pillar:nth-child(2) .what-pillar-icon { animation-delay: 0.7s; }
.what-pillar:nth-child(3) .what-pillar-icon { animation-delay: 1.4s; }

@keyframes pillar-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-6px) rotate(2deg); }
}

.what-pillar h3 {
  font-family: var(--font-serif);
  font-size: 21px;
  color: var(--accent);
  margin-bottom: 10px;
  line-height: 1.25;
}
.what-pillar p {
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.6;
}

.what-foot {
  text-align: center;
  color: var(--text-dim);
  font-style: italic;
  font-family: var(--font-serif);
  font-size: 17px;
  margin-top: 8px;
}

/* =====================================================================
   SCROLL-REVEAL — sections quietly fade up as they come into view
   Honours prefers-reduced-motion.
   ===================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal].revealed { opacity: 1; transform: none; transition: none; }
  .what-pillar-icon { animation: none; }
  .hero-pulse, .land-h2::after, .feature-card .feature-icon { animation: none !important; }
}

/* Stagger the feature/what-pillar reveals so they trip in one after another */
.feature-grid [data-reveal]:nth-child(1) { transition-delay: 0.00s; }
.feature-grid [data-reveal]:nth-child(2) { transition-delay: 0.08s; }
.feature-grid [data-reveal]:nth-child(3) { transition-delay: 0.16s; }
.feature-grid [data-reveal]:nth-child(4) { transition-delay: 0.24s; }
.feature-grid [data-reveal]:nth-child(5) { transition-delay: 0.32s; }
.feature-grid [data-reveal]:nth-child(6) { transition-delay: 0.40s; }
.what-pillars [data-reveal]:nth-child(1) { transition-delay: 0.00s; }
.what-pillars [data-reveal]:nth-child(2) { transition-delay: 0.12s; }
.what-pillars [data-reveal]:nth-child(3) { transition-delay: 0.24s; }

/* Wavy underline decoration beneath the big landing-section headings */
.land-h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 14px;
}
.land-h2::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 64px;
  height: 4px;
  background:
    radial-gradient(circle, var(--accent-2) 30%, transparent 31%) 0 0/12px 4px repeat-x;
  opacity: 0.9;
}

/* Feature card icons get a slow rotate-on-hover for extra liveliness */
.feature-card { transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
.feature-card:hover { transform: translateY(-4px); }
.feature-card .feature-icon {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.feature-card:hover .feature-icon {
  transform: scale(1.15) rotate(-6deg);
}

/* Primary CTA gets a gentle attention pulse on the home hero */
@keyframes hero-pulse {
  0%, 100% { box-shadow: 0 1px 2px rgba(26, 32, 44, 0.08), 0 0 0 0 rgba(194, 65, 12, 0); }
  50%      { box-shadow: 0 1px 2px rgba(26, 32, 44, 0.08), 0 0 0 8px rgba(194, 65, 12, 0.10); }
}
.hero-section .btn-primary.btn-large {
  animation: hero-pulse 2.6s ease-in-out infinite 1.5s;
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1), box-shadow 0.2s ease;
}
.hero-section .btn-primary.btn-large:hover {
  transform: translateY(-2px) scale(1.04);
}
.hero-section .btn-primary.btn-large:active {
  transform: translateY(0) scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
  .hero-section .btn-primary.btn-large { animation: none; }
  .hero-section .btn-primary.btn-large:hover,
  .hero-section .btn-primary.btn-large:active { transform: none; }
}

/* Brand mark gets a tiny wiggle on hover */
.brand-link-btn:hover .brand-mark {
  animation: brand-wiggle 0.6s ease;
}
@keyframes brand-wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(6deg); }
}

/* FAQ items: gentle hover tint */
.faq-item {
  transition: background 0.18s ease, border-color 0.18s ease;
  border-radius: 10px;
}
.faq-item:hover { background: var(--surface-softer); }
.faq-item[open] summary { color: var(--accent-2); }

.land-section {
  padding: 60px 0;
}
.land-section-tinted {
  background:
    linear-gradient(135deg, var(--tint-warm) 0%, transparent 60%),
    linear-gradient(225deg, var(--tint-cool) 0%, transparent 60%),
    #fdfbf6;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 56px 36px;
  margin: 16px 0;
}
.land-h2 {
  font-size: clamp(24px, 3.5vw, 34px);
  text-align: center;
  margin-bottom: 36px;
  letter-spacing: -0.5px;
}
.land-lead {
  text-align: center;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 780px;
  margin: 0 auto 36px;
}
.land-lead strong { color: var(--text); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 26px 24px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  opacity: 0.85;
}
.feature-card:nth-child(1)::before { background: var(--accent); }
.feature-card:nth-child(2)::before { background: var(--accent-5); }
.feature-card:nth-child(3)::before { background: var(--accent-2); }
.feature-card:nth-child(4)::before { background: var(--accent-3); }
.feature-card:nth-child(5)::before { background: var(--accent-4); }
.feature-card:nth-child(6)::before { background: var(--accent); }
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: rgba(30, 58, 95, 0.2); }
.feature-icon { font-size: 32px; margin-bottom: 12px; opacity: 0.92; }
.feature-card h3 { font-family: var(--font-serif); font-size: 20px; margin-bottom: 8px; color: var(--accent); font-weight: 600; }
.feature-card p { color: var(--text-dim); font-size: 14.5px; line-height: 1.6; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.info-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 22px 22px 22px 26px;
  position: relative;
  transition: transform 0.18s, box-shadow 0.18s;
}
.info-card::before {
  content: '';
  position: absolute;
  left: 0; top: 18px; bottom: 18px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--accent);
}
.info-card:nth-child(1)::before { background: var(--accent); }
.info-card:nth-child(2)::before { background: var(--accent-2); }
.info-card:nth-child(3)::before { background: var(--accent-3); }
.info-card:nth-child(4)::before { background: var(--accent-5); }
.info-card:nth-child(5)::before { background: var(--accent-4); }
.info-card:nth-child(6)::before { background: var(--accent); }
.info-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.info-card h3 { font-family: var(--font-serif); font-size: 18px; font-weight: 600; margin-bottom: 10px; color: var(--accent); }
.info-card p { color: var(--text-dim); font-size: 14px; line-height: 1.6; margin-bottom: 8px; }
.info-card p strong { color: var(--text); }
.info-list {
  margin-top: 8px;
  padding-left: 20px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.7;
}
.info-list li { margin-bottom: 4px; }
.info-list strong { color: var(--text); }

.subject-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.subject-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-top: 4px solid var(--accent);
  border-radius: 14px;
  padding: 26px 24px 22px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
}
.subject-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.subj-english { border-top-color: var(--subject-english); }
.subj-maths   { border-top-color: var(--subject-maths); }
.subj-verbal  { border-top-color: var(--subject-verbal); }
.subj-nvr     { border-top-color: var(--subject-nvr); }
.subj-english h3 { color: var(--subject-english); }
.subj-maths   h3 { color: var(--subject-maths); }
.subj-verbal  h3 { color: var(--subject-verbal); }
.subj-nvr     h3 { color: var(--subject-nvr); }
.subj-icon { font-size: 30px; margin-bottom: 12px; opacity: 0.95; }
.subject-card h3 { font-family: var(--font-serif); font-size: 22px; margin-bottom: 10px; font-weight: 600; letter-spacing: -0.005em; }
.subject-card p { color: var(--text-dim); font-size: 14.5px; line-height: 1.6; margin-bottom: 16px; }
.subj-stats {
  list-style: none;
  padding-top: 14px;
  border-top: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--text-dim);
}
.subj-stats strong { color: var(--text); }

.how-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.how-col {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 26px;
  box-shadow: var(--shadow-card);
}
.how-col h3 { font-size: 18px; margin-bottom: 14px; }
.how-steps {
  list-style: none;
  counter-reset: step;
  margin-bottom: 20px;
}
.how-steps li {
  counter-increment: step;
  padding: 10px 0 10px 38px;
  position: relative;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-dim);
}
.how-steps li strong { color: var(--text); }
.how-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 8px;
  width: 26px; height: 26px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quotes-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.quotes-strip blockquote {
  background: var(--card);
  border-left: 4px solid var(--accent-2);
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
  font-style: italic;
}
.quotes-strip blockquote p { font-size: 16px; line-height: 1.55; margin-bottom: 10px; }
.quotes-strip cite { font-style: normal; color: var(--text-dim); font-size: 13px; }

.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-item {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 4px 18px;
  box-shadow: var(--shadow-card);
}
.faq-item summary {
  padding: 14px 0;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 30px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 0; top: 14px;
  font-size: 22px;
  color: var(--accent);
  font-weight: 400;
  transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  padding-bottom: 16px;
  color: var(--text-dim);
  line-height: 1.6;
  font-size: 15px;
}

.land-cta {
  text-align: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(236, 72, 153, 0.06));
  border-radius: 24px;
  padding: 50px 30px;
  margin: 30px 0;
}
.land-cta h2 {
  font-size: 28px;
  margin-bottom: 8px;
}
.land-cta p {
  color: var(--text-dim);
  margin-bottom: 24px;
  font-size: 16px;
}

/* ============== PUBLIC FOOTER ============== */
.public-footer {
  margin: 60px -20px -24px;
  padding: 50px 40px 24px;
  background: #0f172a;
  color: #cbd5e1;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  max-width: 1180px;
  margin: 0 auto 30px;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.public-footer .brand-link { color: white; }
.public-footer .brand-name { color: white; -webkit-text-fill-color: white; }
.footer-tagline {
  color: #94a3b8;
  font-size: 14px;
  margin-top: 10px;
  max-width: 280px;
  line-height: 1.5;
}
.public-footer h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: white;
  margin-bottom: 14px;
}
.public-footer ul { list-style: none; }
.public-footer ul li { padding: 4px 0; font-size: 14px; }
.public-footer ul a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s;
}
.public-footer ul a:hover { color: white; }
.footer-bottom {
  max-width: 1180px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid #1e293b;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #94a3b8;
  flex-wrap: wrap;
  gap: 10px;
}

/* Inline status banner on the Assign Work tab */
.assign-status-banner {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
  animation: slideUp 0.25s ease;
}
.assign-status-banner.status-progress {
  background: #eef2ff;
  color: var(--accent);
  border-left: 3px solid var(--accent);
}
.assign-status-banner.status-success {
  background: #ecfdf5;
  color: #166534;
  border-left: 3px solid var(--accent-3);
}
.assign-status-banner.status-warn {
  background: #fffbeb;
  color: #92400e;
  border-left: 3px solid #d97706;
}
.assign-status-banner.status-error {
  background: #fef2f2;
  color: #991b1b;
  border-left: 3px solid var(--danger);
}
.assign-status-banner a {
  color: inherit;
  text-decoration: underline;
  font-weight: 700;
  margin-left: 4px;
}

/* Topbar "My assignments" button + pending count badge */
.topbar-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 10px;
}
.topbar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent-2);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

/* Role tabs on the public sign-in (Student / Teacher) */
.role-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 6px;
  background: var(--surface-soft);
  border-radius: 12px;
  margin-bottom: 22px;
}
.role-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-dim);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.18s, color 0.18s, transform 0.18s;
}
.role-tab:hover { color: var(--text); background: rgba(255,255,255,0.5); }
.role-tab.active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 1px 3px rgba(26, 32, 44, 0.08), 0 0 0 1px var(--card-border);
}
.role-tab-icon { font-size: 24px; line-height: 1; }
.role-tab-label { letter-spacing: 0.01em; }

.auth-forgot {
  text-align: center;
  margin: 4px 0 8px;
  font-size: 13px;
}
.auth-forgot a {
  color: var(--accent-2);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent-2);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
.auth-forgot a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Auth divider for guest button */
.auth-divider {
  text-align: center;
  position: relative;
  margin: 14px 0 8px;
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--card-border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }
.auth-divider span {
  background: var(--card);
  padding: 0 12px;
  position: relative;
}
.auth-guest {
  width: 100%;
  background: var(--surface-soft);
  border: 1px solid var(--card-border);
}

/* Slight tweak so practice paper cards remain readable in light mode */
.paper-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-card);
}
.paper-card:hover { box-shadow: var(--shadow-lift); }

/* ============== BLOG ============== */
.blog-wrap, .blog-post-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

.blog-header {
  text-align: center;
  padding: 36px 16px 24px;
}
.blog-header h1, .blog-header h2 {
  font-size: clamp(28px, 4vw, 42px);
  margin: 10px 0 12px;
  letter-spacing: -0.5px;
}
.blog-header .hero-sub { max-width: 640px; margin: 0 auto; }

.blog-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 18px 0 28px;
}
.blog-chip {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--card-border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s;
}
.blog-chip:hover { background: var(--card-hover); }
.blog-chip.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(236, 72, 153, 0.3);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.blog-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}
.blog-card h3 {
  font-size: 18px;
  line-height: 1.35;
  color: var(--text);
  margin: 0;
}
.blog-card p {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.55;
  flex: 1;
}
.blog-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.blog-card-cat {
  background: var(--surface-soft);
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 10.5px;
  border: 1px solid var(--card-border);
}
/* Subtle per-category tints, applied via [data-category] on cards if you want
   even more variety later. For now a simple rotation by neighbouring cards: */
.blog-card:nth-child(5n+1) .blog-card-cat { color: var(--accent-2); }
.blog-card:nth-child(5n+2) .blog-card-cat { color: var(--accent-3); }
.blog-card:nth-child(5n+3) .blog-card-cat { color: var(--accent-5); }
.blog-card:nth-child(5n+4) .blog-card-cat { color: var(--accent-4); }
.blog-card:nth-child(5n+5) .blog-card-cat { color: var(--accent); }
.blog-card-date { color: var(--text-dim); }
.blog-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-dim);
  padding-top: 8px;
  border-top: 1px solid var(--card-border);
}
.blog-card-arrow { color: var(--accent-2); font-weight: 600; }

/* ===== Single post ===== */
.blog-back {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  margin-bottom: 24px;
  font-size: 14px;
}
.blog-back:hover { text-decoration: underline; }

.blog-post {
  max-width: 760px;
  margin: 0 auto;
}
.blog-post-head { margin-bottom: 28px; }
.blog-post-head h1, .blog-post-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.5px;
  margin: 12px 0;
  line-height: 1.2;
}
.blog-post-meta {
  font-size: 14px;
  color: var(--text-dim);
}

.blog-post-body {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
}
.blog-post-body p { margin-bottom: 18px; }
.blog-post-body h2 {
  font-size: 24px;
  margin: 32px 0 12px;
  letter-spacing: -0.3px;
}
.blog-post-body h3 {
  font-size: 19px;
  margin: 24px 0 10px;
}
.blog-post-body ul, .blog-post-body ol {
  padding-left: 24px;
  margin-bottom: 18px;
}
.blog-post-body li { margin-bottom: 6px; }
.blog-post-body strong { color: var(--text); }
.blog-post-body em { color: var(--text); }

/* Inline "Practice now" CTA */
.post-cta {
  display: inline;
  background: var(--tint-warm);
  border-bottom: 2px solid var(--accent-2);
  color: var(--accent-2);
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
  font-size: 1em;
}
.post-cta:hover {
  background: var(--accent-2);
  color: #fff;
}

/* Block-style "Practice now" CTA button */
.post-cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(26, 32, 44, 0.08);
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  margin-top: 8px;
  border: none;
  font-family: inherit;
}
.post-cta-btn:hover {
  background: #142d4d;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 32, 44, 0.12);
}

.blog-post-foot {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--card-border);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.blog-tag {
  font-size: 12px;
  color: var(--text-dim);
  background: var(--surface-soft);
  padding: 4px 10px;
  border-radius: 6px;
}

.blog-related {
  max-width: 760px;
  margin: 60px auto 20px;
  padding-top: 30px;
  border-top: 1px solid var(--card-border);
}
.blog-related h3 {
  font-size: 18px;
  margin-bottom: 18px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.blog-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

/* ============== RESPONSIVE ============== */
@media (max-width: 600px) {
  .screen { padding: 16px; }
  .question-card { padding: 24px; }
  .answer-grid { grid-template-columns: 1fr; }
  .results-stats { grid-template-columns: 1fr; }
  .stat-block { padding: 14px; }
}

/* =====================================================================
   ============== DYNAMIC CONTRAST PASS ==============
   Lifts the saturation + WCAG contrast across landing, eyebrows, chips,
   pillars, stats and CTAs. Layered AT THE END so it cleanly overrides
   the earlier softer palette without touching the editorial tone.
   ===================================================================== */
:root {
  /* High-saturation accent pops, used for chips, ribbons, halos */
  --pop-coral:  #e76f51;
  --pop-amber:  #f4a261;
  --pop-sun:    #ffd166;
  --pop-mint:   #06d6a0;
  --pop-teal:   #2a9d8f;
  --pop-cyan:   #4cc9f0;
  --pop-lilac:  #b67dff;
  --pop-grape:  #7b5ea7;

  /* Deeper neutrals for better body-copy contrast */
  --text-strong: #111827;
  --text-body:   #2d3748;
  --text-muted:  #4b5563;   /* was #6b7280 — now WCAG AA on cream */
}

/* Lift the default body / dim text contrast site-wide */
body, p, li { color: var(--text-body); }
.hero-sub, .land-lead, .what-lead { color: var(--text-body); }
.text-dim, .stat-label, small { color: var(--text-muted) !important; }

/* === EYEBROW CHIPS — now filled, high-contrast pills === */
.hero-eyebrow,
.section-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff !important;
  background: linear-gradient(135deg, var(--pop-coral), var(--pop-amber));
  border: none !important;
  box-shadow: 0 6px 16px rgba(231, 111, 81, 0.28);
  text-shadow: 0 1px 1px rgba(0,0,0,0.12);
}
.section-eyebrow {
  background: linear-gradient(135deg, var(--pop-grape), var(--pop-lilac));
  box-shadow: 0 6px 16px rgba(123, 94, 167, 0.28);
}

/* === HERO BADGE — coloured halo ring + slightly larger === */
.hero-badge {
  width: 104px; height: 104px;
  background: radial-gradient(circle at 30% 30%, #ffe07a, #f4a261 55%, #e76f51 100%);
  box-shadow:
    0 0 0 6px rgba(255, 209, 102, 0.25),
    0 0 0 12px rgba(231, 111, 81, 0.12),
    0 12px 28px rgba(231, 111, 81, 0.4),
    inset 0 -5px 10px rgba(0, 0, 0, 0.1);
}
.hero-badge-text { font-size: 12px; }

/* === STATS STRIP — bolder numbers + saturated colour, soft glow under === */
.stats-strip {
  background:
    linear-gradient(135deg, #ffe4cf 0%, transparent 50%),
    linear-gradient(225deg, #c8f5da 0%, transparent 55%),
    linear-gradient(315deg, #e9d8ff 0%, transparent 60%),
    #fffdf7;
  box-shadow:
    var(--shadow-card),
    0 24px 40px -20px rgba(244, 162, 97, 0.35);
}
.stat-cell-1 .stat-num { color: var(--pop-coral); }
.stat-cell-2 .stat-num { color: var(--pop-grape); }
.stat-cell-3 .stat-num { color: var(--pop-teal); }
.stat-cell-4 .stat-num { color: #c97a16; }
.stat-num {
  text-shadow: 0 2px 0 rgba(0,0,0,0.04);
  font-weight: 800;
}
.stat-label {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
  margin-top: 6px;
}

/* === PILLARS — 2px coloured outline, deeper top wash, glow on hover === */
.what-pillar {
  border: 2px solid transparent;
  transition: transform 0.35s cubic-bezier(.34,1.56,.64,1),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
}
.what-pillar-1 {
  background: linear-gradient(165deg, #ffd9b8 0%, #fff3e3 40%, #ffffff 90%);
  border-color: #ffd1aa;
}
.what-pillar-2 {
  background: linear-gradient(165deg, #c2ecd2 0%, #e8f6ee 40%, #ffffff 90%);
  border-color: #a9e2c0;
}
.what-pillar-3 {
  background: linear-gradient(165deg, #dcc9f7 0%, #efe4fb 40%, #ffffff 90%);
  border-color: #c8b1ee;
}
.what-pillar-1::before { background: linear-gradient(90deg, #ffb84d, #f4a261, #e76f51) !important; }
.what-pillar-2::before { background: linear-gradient(90deg, #06d6a0, #2a9d8f, #0a8170) !important; }
.what-pillar-3::before { background: linear-gradient(90deg, #c08bff, #9d6cf2, #7b5ea7) !important; }

.what-pillar:hover {
  transform: translateY(-10px) rotate(-0.5deg) scale(1.02);
  border-color: #fff;
}
.what-pillar-1:hover { box-shadow: 0 22px 42px rgba(231, 111, 81, 0.28), 0 0 0 2px var(--pop-coral); }
.what-pillar-2:hover { box-shadow: 0 22px 42px rgba(42, 157, 143, 0.28),  0 0 0 2px var(--pop-teal);  }
.what-pillar-3:hover { box-shadow: 0 22px 42px rgba(123, 94, 167, 0.28), 0 0 0 2px var(--pop-grape); }

/* Make the pillar badges high-contrast filled pills */
.what-pillar-1 .what-pillar-badge {
  background: linear-gradient(135deg, var(--pop-coral), var(--pop-amber));
  color: #fff; box-shadow: 0 4px 10px rgba(231, 111, 81, 0.3);
}
.what-pillar-2 .what-pillar-badge {
  background: linear-gradient(135deg, var(--pop-teal), var(--pop-mint));
  color: #fff; box-shadow: 0 4px 10px rgba(42, 157, 143, 0.3);
}
.what-pillar-3 .what-pillar-badge {
  background: linear-gradient(135deg, var(--pop-grape), var(--pop-lilac));
  color: #fff; box-shadow: 0 4px 10px rgba(123, 94, 167, 0.3);
}

.what-pillar h3 {
  color: var(--text-strong);
  font-weight: 700;
}

/* === PRIMARY CTA — animated gradient sweep underlay === */
.btn-primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg,
    transparent 0%,
    rgba(255, 209, 102, 0.0) 30%,
    rgba(255, 209, 102, 0.45) 50%,
    rgba(255, 209, 102, 0.0) 70%,
    transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  z-index: -1;
}
.btn-primary:hover::before { transform: translateX(100%); }

/* Bigger, more confident hero CTA + glow under */
.hero-section .btn-primary.btn-large {
  background: linear-gradient(135deg, #1e3a5f 0%, #2a4a73 100%);
  box-shadow:
    0 6px 18px rgba(30, 58, 95, 0.32),
    0 0 0 0 rgba(231, 111, 81, 0.0);
  letter-spacing: 0.02em;
}
.hero-section .btn-primary.btn-large:hover {
  background: linear-gradient(135deg, #2a4a73 0%, #1e3a5f 100%);
  box-shadow:
    0 14px 32px rgba(30, 58, 95, 0.4),
    0 0 0 6px rgba(244, 162, 97, 0.18);
}

/* Ghost button gains a coloured outline on hover */
.btn-ghost {
  border: 1.5px solid var(--card-border);
  transition: all 0.25s ease;
}
.btn-ghost:hover {
  border-color: var(--pop-coral);
  color: var(--pop-coral);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(231, 111, 81, 0.18);
}

/* === FEATURE CARDS — subtle 3D tilt + shadow lift === */
.feature-card,
.subject-card,
.mode-card {
  transition: transform 0.4s cubic-bezier(.34,1.56,.64,1),
              box-shadow 0.3s ease,
              border-color 0.25s ease;
  will-change: transform;
}
.feature-card:hover,
.subject-card:hover,
.mode-card:hover {
  transform: translateY(-6px) rotate(-0.3deg);
  box-shadow:
    0 18px 36px rgba(30, 58, 95, 0.14),
    0 4px 10px rgba(30, 58, 95, 0.06);
}

/* === HERO TITLE — em uses gradient text for more pop === */
.hero-title em {
  background: linear-gradient(120deg, var(--pop-grape) 0%, var(--pop-coral) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: italic;
  position: relative;
}

/* === HERO BULLETS — pill row with coloured ticks === */
.hero-bullets li {
  font-weight: 600;
  color: var(--text-body);
}
.hero-bullets li::first-letter {
  color: var(--pop-teal);
  font-weight: 800;
}

/* === LAND-H2 underline gets a brighter gradient === */
.land-h2::after {
  background: linear-gradient(90deg, var(--pop-coral), var(--pop-amber), var(--pop-sun)) !important;
}

/* === SECTION dividers — gentle wavy SVG ribbon between key bands === */
.land-section + .land-section { position: relative; }

/* Reduced motion: kill the CTA sweep animation */
@media (prefers-reduced-motion: reduce) {
  .btn-primary::before { display: none; }
  .feature-card:hover,
  .subject-card:hover,
  .mode-card:hover,
  .what-pillar:hover { transform: none; }
}
