/* ===== Fonts (self-hosted) ===== */
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/chakra-petch-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/chakra-petch-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/chakra-petch-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/chakra-petch-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('assets/fonts/sora-variable.woff2') format('woff2');
}

/* ===== Reset & variables ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* ===== OFFICIAL PALETTE (docs/BRAND_COLORS.md) — 8 colors, no other hues =====
     Core: Midnight Blue + Rose Fuchsia on white. Supporting: Burgundy,
     Powder Pink, Ice Blue, Steel Blue, Olive, Warm Beige. Tonal steps of a
     palette color (darker/lighter of the same hue) are allowed; new hues are not. */
  --navy-900: #001830;   /* midnight blue, deep step — footer */
  --navy-800: #00264A;   /* MIDNIGHT BLUE — nav, dark section panels */
  --navy-700: #14406B;   /* midnight blue, light step — secondary dark panels */
  --navy-100: #E7ECF4;   /* faint midnight tint — light section backgrounds, borders */
  --pink-500: #F4157E;   /* ROSE FUCHSIA — the one accent: CTAs, glow, highlights */
  --pink-700: #C40E62;   /* rose fuchsia, deep step — accent text/icons on light */
  --pink-100: #F5D8D9;   /* powder pink tint — chips, card backgrounds */
  --blue-100: #DCE9F4;   /* ICE BLUE — secondary tint for variety on light sections */

  /* Neutrals */
  --bg: #FFFFFF;         /* page/hero background — pure white */
  --white: #F0F3F9;      /* card/surface background — grey-blue so it reads on the white page */
  --ink: #14203A;
  --ink-soft: #566079;
  --line: rgba(20, 32, 58, 0.1);

  /* ---- Supporting palette colors (names kept for back-compat) ---- */
  --amber-400: #D8BCAC;  /* WARM BEIGE — streaks, XP, "earned" highlights */
  --mint-400:  #68684A;  /* OLIVE — success ticks, positive feedback */
  --sky-300:   #879BB3;  /* STEEL BLUE — soft info tint / links on dark */
  --lilac-200: #DCE9F4;  /* ice blue — gentle card wash for variety */

  /* Semantic */
  --success: var(--mint-400);
  --error: #7B023F;      /* BURGUNDY — errors and warnings */

  /* Back-compat aliases used throughout the stylesheet.
     The former "cyan" accent is now pink — every var(--cyan*) below resolves to pink. */
  --navy: var(--navy-800);
  --navy-deep: var(--navy-900);
  --navy-soft: var(--navy-700);
  --cyan-500: var(--pink-500);
  --cyan-700: var(--pink-700);
  --cyan-100: var(--pink-100);
  --cyan: var(--pink-500);
  --cyan-dim: var(--pink-700);
  --tint-blue: var(--blue-100);
  --tint-cyan: var(--pink-100);

  --font-display: 'Chakra Petch', 'Segoe UI', sans-serif;
  --font-body: 'Sora', 'Segoe UI', sans-serif;
  --radius: 16px;
  --container: 1240px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
}

h1, h2, h3, .logo, .eyebrow, .stat-num, .demo-question, .node-label,
.badge-name, .final-cta h2 {
  font-family: var(--font-display);
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section-dark {
  background: var(--navy);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan-dim);
  background: var(--tint-cyan);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.section-dark .eyebrow {
  color: var(--cyan);
  background: rgba(244, 21, 126, 0.12);
}

.section-head {
  max-width: 620px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 14px;
}
.section-head p {
  color: var(--ink-soft);
  font-size: 16px;
}
.section-dark .section-head p { color: rgba(245, 247, 251, 0.72); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  font-family: var(--font-body);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn-cta {
  background: var(--pink-500);
  color: #FFFFFF;
  box-shadow: 0 0 0 rgba(244, 21, 126, 0);
}
.btn-cta:hover { box-shadow: 0 8px 28px rgba(244, 21, 126, 0.45); }

.btn-lg { padding: 16px 34px; font-size: 16px; }

.btn-ghost {
  background: #EFF3F9; /* light grey-blue fill — invisible as plain white on the white page */
  color: var(--ink);
  border: 1.5px solid #D9E1ED;
}
.btn-ghost:hover { border-color: var(--navy); }
.section-dark .btn-ghost { background: transparent; color: var(--white); border-color: rgba(245,247,251,0.25); }
.section-dark .btn-ghost:hover { border-color: var(--cyan); }

/* ===== Starfield backdrop (fixed, subtle) ===== */
.starfield {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--bg);
}

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 38, 74, 0.93);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(245, 247, 251, 0.08);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.01em;
}
.logo span { color: var(--cyan); }
.logo-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  gap: 26px;
  font-size: 13.5px;
  font-weight: 600;
}
.nav-links a {
  color: #FFFFFF;
  transition: color 0.15s ease;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--cyan); }
.nav-actions { display: flex; align-items: center; gap: 18px; }
.nav-login { color: var(--pink-500); font-weight: 700; font-size: 0.95rem; }
.nav-login:hover { color: var(--pink-100); }
.nav-toggle {
  display: none;
  color: var(--white);
  font-size: 22px;
}

@media (max-width: 980px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 16px;
    border-bottom: 1px solid rgba(245,247,251,0.08);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid rgba(245,247,251,0.06); }
  .nav-toggle { display: block; }
}

/* ===== Hero — light, not a navy block; navy is now just the nav strip above it ===== */
.hero {
  background: var(--bg); /* pure white — no blue-tinted wash */
  color: var(--ink);
  position: relative;
  overflow: hidden;
  padding: 88px 0 110px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(0, 38, 74,0.22) 50%, transparent 50%),
    radial-gradient(1px 1px at 80% 10%, rgba(0, 38, 74,0.18) 50%, transparent 50%),
    radial-gradient(1.5px 1.5px at 60% 70%, rgba(244, 21, 126,0.55) 50%, transparent 50%),
    radial-gradient(1px 1px at 30% 80%, rgba(0, 38, 74,0.18) 50%, transparent 50%),
    radial-gradient(1px 1px at 90% 60%, rgba(0, 38, 74,0.16) 50%, transparent 50%),
    radial-gradient(1.5px 1.5px at 45% 35%, rgba(244, 21, 126,0.45) 50%, transparent 50%),
    radial-gradient(1px 1px at 15% 55%, rgba(0, 38, 74,0.18) 50%, transparent 50%),
    radial-gradient(1px 1px at 70% 90%, rgba(0, 38, 74,0.14) 50%, transparent 50%);
  background-repeat: repeat;
  background-size: 340px 340px;
  opacity: 0.9;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero-copy h1 {
  font-size: clamp(36px, 5.4vw, 60px);
  font-weight: 700;
  line-height: 1.08;
  margin-bottom: 20px;
  color: var(--navy);
}
.hero-copy h1 .glow {
  color: var(--cyan-700);
  text-shadow: 0 0 20px rgba(244, 21, 126, 0.35);
}
.hero-copy p {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 460px;
  margin-bottom: 34px;
}
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }

.hero-trust {
  display: flex;
  gap: 28px;
  font-size: 13px;
  color: var(--ink-soft);
  flex-wrap: wrap;
}
.hero-trust strong { color: var(--navy); font-family: var(--font-display); }

/* Hero reveal stagger */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: revealUp 0.7s cubic-bezier(.2,.8,.2,1) forwards;
}
@keyframes revealUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Hero demo widget ===== */
.hero-visual { position: relative; }
.constellation {
  position: absolute;
  inset: -40px -20px auto auto;
  width: 340px;
  max-width: 100%;
  opacity: 0.9;
  pointer-events: none;
}
.constellation circle { fill: var(--cyan-700); }
.constellation .node-dim circle { fill: rgba(0, 38, 74,0.35); }
.constellation line { stroke: rgba(10,95,85,0.3); stroke-width: 1; }
.constellation .pulse {
  animation: pulseNode 3.2s ease-in-out infinite;
}
@keyframes pulseNode {
  0%, 100% { opacity: 0.6; r: 3; }
  50% { opacity: 1; r: 4.5; }
}

.demo-card {
  position: relative;
  z-index: 1;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(0, 38, 74,0.12);
  max-width: 380px;
  margin-left: auto;
}
.demo-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--cyan-700);
  margin-bottom: 10px;
}
.demo-question {
  font-size: 30px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--navy);
}
.demo-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.demo-options button {
  padding: 13px;
  border-radius: 12px;
  background: var(--navy-100);
  border: 1px solid var(--line);
  color: var(--navy);
  font-weight: 600;
  font-size: 15px;
  transition: all 0.15s ease;
}
.demo-options button:hover { border-color: var(--cyan-500); transform: translateY(-1px); }
.demo-options button.correct {
  background: var(--cyan-100);
  border-color: var(--cyan-500);
  box-shadow: 0 0 18px rgba(244, 21, 126,0.3);
}
.demo-options button.incorrect {
  background: rgba(123, 2, 63, 0.12);
  border-color: var(--error);
}
.demo-feedback {
  min-height: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cyan-700);
}

.spark {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  pointer-events: none;
  animation: sparkFly 0.7s ease-out forwards;
}
@keyframes sparkFly {
  to { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

/* ===== Stats bar ===== */
.stats-bar {
  background: var(--white);
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-num {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: var(--navy);
}
.stat-num span { color: var(--cyan-dim); }
.stat-label {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 6px;
}

/* ===== Learning path ===== */
.path-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  gap: 8px;
}
.path-row::before {
  content: '';
  position: absolute;
  top: 22px;
  left: 22px;
  right: 22px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--cyan) 0 8px, transparent 8px 14px);
  z-index: 0;
}
.node {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 130px;
}
.node-dot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
  box-shadow: 0 0 0 6px var(--tint-cyan);
}
.node.node-final .node-dot {
  background: var(--navy);
  color: var(--cyan);
  box-shadow: 0 0 0 6px var(--tint-cyan), 0 0 20px rgba(244, 21, 126,0.5);
}
.node-label { font-size: 13px; font-weight: 600; line-height: 1.3; }

@media (max-width: 900px) {
  .path-row { flex-direction: column; align-items: flex-start; gap: 28px; padding-left: 22px; }
  .path-row::before {
    top: 0; bottom: 0; left: 22px; right: auto; width: 2px; height: auto;
    background: repeating-linear-gradient(180deg, var(--cyan) 0 8px, transparent 8px 14px);
  }
  .node { flex-direction: row; text-align: left; width: auto; align-items: center; margin-left: -22px; }
  .node-dot { margin-bottom: 0; margin-right: 16px; flex-shrink: 0; }
}

/* ===== Practice section ===== */
.practice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.worksheet-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 38, 74, 0.1);
}
.worksheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.worksheet-head h4 { font-family: var(--font-display); font-size: 16px; }
.streak-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--tint-cyan);
  color: var(--cyan-dim);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
}
.worksheet-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
}
.worksheet-item:last-child { border-bottom: none; }
.worksheet-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  background: var(--cyan);
  color: var(--navy-deep);
}
.worksheet-check.pending {
  background: transparent;
  border: 2px solid var(--line);
}
.progress-bar {
  height: 8px;
  background: var(--tint-cyan);
  border-radius: 999px;
  margin-top: 18px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 70%;
  background: var(--cyan);
  border-radius: 999px;
}
.feature-list li {
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
}
.feature-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--tint-cyan);
  color: var(--cyan-dim);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 700;
}
.feature-list h4 { font-size: 15px; margin-bottom: 3px; }
.feature-list p { font-size: 13.5px; color: var(--ink-soft); }

/* ===== Archive ===== */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.archive-card {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.archive-card::after {
  content: '';
  position: absolute;
  top: -30%; right: -30%;
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(244, 21, 126,0.35), transparent 70%);
}
.archive-card h4 { font-family: var(--font-display); font-size: 17px; margin-bottom: 6px; position: relative; }
.archive-card .years { font-size: 12.5px; color: rgba(245,247,251,0.6); margin-bottom: 18px; position: relative; }
.archive-card a {
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ===== Free Practice — gamification preview (light variant of badge/leaderboard) ===== */
.badges-light .badge-name { color: var(--ink-soft); }
.leaderboard-light {
  background: var(--white);
  border: 1px solid var(--line);
}
.leaderboard-light .leaderboard-item { border-bottom: 1px solid var(--line); }
.leaderboard-light .leaderboard-item:not(:first-child) .rank {
  background: var(--navy-100);
  color: var(--navy);
}
.leaderboard-light .leaderboard-xp { color: var(--cyan-700); }
.gamify-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 56px 0 8px;
  flex-wrap: wrap;
  gap: 10px;
}
.gamify-preview-head h4 { font-family: var(--font-display); font-size: 16px; }
.gamify-preview-head p { font-size: 13.5px; color: var(--ink-soft); }

/* ===== Classes ===== */
.classes-note {
  max-width: 640px;
  margin: 0 auto 40px;
  text-align: center;
  font-size: 14.5px;
  color: var(--ink-soft);
  background: var(--cyan-100);
  border-radius: 999px;
  padding: 10px 22px;
  display: inline-flex;
  gap: 8px;
}
.classes-note strong { color: var(--cyan-700); }
.classes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 40px;
}
.classes-grid-single {
  grid-template-columns: minmax(0, 420px);
  justify-content: center;
}
.class-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.class-card .tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan-700);
  background: var(--cyan-100);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.class-card h4 { font-size: 16px; margin-bottom: 6px; }
.class-card p { font-size: 13px; color: var(--ink-soft); }

.enquiry-form {
  max-width: 560px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 20px 50px rgba(0, 38, 74,0.08);
}
.enquiry-form h4 { font-family: var(--font-display); font-size: 17px; margin-bottom: 4px; text-align: center; }
.enquiry-form > p { font-size: 13.5px; color: var(--ink-soft); text-align: center; margin-bottom: 20px; }
.enquiry-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.enquiry-form input, .enquiry-form select, .enquiry-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-family: var(--font-body);
  font-size: 14px;
  background: var(--navy-100);
  color: var(--ink);
}
.enquiry-form textarea { resize: vertical; line-height: 1.5; margin-bottom: 12px; }
.enquiry-form .btn { width: 100%; margin-top: 6px; }
.enquiry-success { display: none; text-align: center; font-size: 14px; font-weight: 600; color: var(--cyan-700); margin-top: 14px; }
.enquiry-success.show { display: block; }
.enquiry-success.error { color: var(--error); }

/* ===== Concepts library ===== */
.concepts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}
.concept-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
a.concept-card:hover { border-color: var(--cyan-500); }
.concept-card:hover { transform: translateY(-3px); border-color: var(--cyan-500); }
.concept-level {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.concept-level.basics { background: var(--cyan-100); color: var(--cyan-700); }
.concept-level.school { background: var(--blue-100); color: #2A3E9E; }
.concept-level.olympiad { background: var(--navy-100); color: var(--navy); }
.concept-card h4 { font-size: 14.5px; line-height: 1.3; }
.concepts-cta { text-align: center; }

/* ===== Olympiad Zone (dark training-camp strip) ===== */
.gamify-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.badge-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 84px;
}
.badge-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: rgba(244, 21, 126, 0.12);
  border: 1px solid rgba(244, 21, 126,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.badge-name { font-size: 11px; text-align: center; color: rgba(245,247,251,0.7); }

.leaderboard {
  background: rgba(245, 247, 251, 0.05);
  border: 1px solid rgba(245, 247, 251, 0.12);
  border-radius: var(--radius);
  padding: 20px;
}
.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(245,247,251,0.08);
  font-size: 14px;
  font-weight: 600;
}
.leaderboard-item:last-child { border-bottom: none; }
.rank {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--cyan);
  color: var(--navy-deep);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 12px;
  flex-shrink: 0;
}
.leaderboard-item:not(:first-child) .rank {
  background: rgba(245,247,251,0.12);
  color: var(--white);
}
.leaderboard-xp { margin-left: auto; color: var(--cyan); font-size: 13px; }

/* ===== Testimonials ===== */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.testimonial-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.testimonial-card p.quote {
  font-size: 15px;
  margin-bottom: 18px;
  color: var(--ink);
}
.testimonial-who {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--tint-cyan);
  color: var(--cyan-dim);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
}
.testimonial-who .name { font-size: 13.5px; font-weight: 700; }
.testimonial-who .role { font-size: 12px; color: var(--ink-soft); }

/* ===== Final CTA ===== */
.final-cta {
  text-align: center;
  padding: 100px 0;
}
.final-cta h2 {
  font-size: clamp(30px, 5vw, 46px);
  margin-bottom: 16px;
}
.final-cta p {
  color: rgba(245,247,251,0.75);
  margin-bottom: 34px;
  font-size: 16px;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--navy-deep);
  color: rgba(245,247,251,0.6);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
}
.footer-brand .logo { margin-bottom: 14px; }
.footer-brand p { font-size: 13.5px; max-width: 260px; }
.footer-col h5 {
  color: var(--white);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col a { display: block; font-size: 13.5px; margin-bottom: 12px; transition: color 0.15s ease; }
.footer-col a:hover { color: var(--cyan); }
.footer-bottom {
  border-top: 1px solid rgba(245,247,251,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ===== Scroll reveal (JS-driven) ===== */
.will-reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.will-reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .demo-card { margin: 0 auto; }
  .constellation { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .practice-grid { grid-template-columns: 1fr; }
  .archive-grid { grid-template-columns: repeat(2, 1fr); }
  .gamify-grid { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .classes-grid { grid-template-columns: 1fr 1fr; }
  .concepts-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .section { padding: 64px 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .archive-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .demo-options { grid-template-columns: 1fr 1fr; }
  .classes-grid { grid-template-columns: 1fr; }
  .concepts-grid { grid-template-columns: 1fr; }
  .enquiry-row { grid-template-columns: 1fr; }
}

/* ===== Unfilled placeholder chip (shared: privacy.html, terms.html, about.html) =====
   Marks a fact nobody has supplied yet — entity name, founder story, a date.
   Deliberately loud: an unfilled chip must never survive to production unnoticed. */
.fill {
  background: var(--pink-100);
  color: var(--pink-700);
  border: 1px dashed var(--pink-500);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: 'Chakra Petch', monospace;
  font-size: 0.88em;
  font-weight: 600;
  /* Chips run from "[DATE]" to a whole sentence of drafting notes — wrap the long
     ones rather than pushing the page into a horizontal scroll. */
  white-space: normal;
  overflow-wrap: break-word;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Breadcrumbs on the public content pages (concepts/competitions libraries).
   Sits at the top of the page's .wrap, so it inherits that width. Hex fallbacks
   because these pages define their own :root tokens, not the app.css names. */
.breadcrumbs { margin: 0 0 22px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 0; font-size: .85rem; line-height: 1.4; }
.breadcrumbs li { display: flex; align-items: center; gap: 8px; color: var(--ink-soft, #566079); }
.breadcrumbs li:not(:first-child)::before { content: "\203A"; color: #9aa4b8; }
.breadcrumbs a { color: var(--pink-700, #c40e62); text-decoration: none; font-weight: 600; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--ink-soft, #566079); font-weight: 500; }

/* Home hero quick-check: adaptive level check + Practice Points (see script.js).
   Reuses .demo-card/.demo-options/.demo-question/.demo-feedback; these add the
   points pill and the level result. */
.demo-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.demo-top .demo-label { margin-bottom: 0; }
.demo-points { font-size: 12px; font-weight: 700; color: var(--pink-700, #c40e62); background: var(--pink-100, #f5d8d9); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.demo-points b { font-weight: 800; }
.demo-question { font-size: 30px; font-weight: 600; margin-bottom: 20px; color: var(--navy); min-height: 1.2em; }
#demo-result { text-align: center; }
.demo-level { font-family: var(--font-display, 'Chakra Petch', sans-serif); font-size: 46px; line-height: 1; color: var(--pink-700, #c40e62); margin: 6px 0 4px; }
.demo-level span { font-size: 18px; color: var(--ink-soft, #566079); font-weight: 600; margin-left: 4px; }
.demo-result-line { font-size: 14px; color: var(--ink-soft, #566079); margin: 0 0 16px; }
#demo-result .btn-block { width: 100%; }
