:root {
  --indigo: #4F46E5;
  --indigo-ink: #3730A3;
  --violet: #6D28D9;
  --gold: #FBBF24;
  --gold-dark: #C26C08;
  --ink-red: #C0392B;

  --bg: #F3F1EC;
  --bg-alt: #EAE7DF;
  --surface: #FFFFFF;
  --paper: #FBF8F0;
  --paper-line: #E4D9C4;
  --text: #1F1B3A;
  --text-soft: #5B577A;
  --text-faint: #8B87A6;
  --border: #E2DFD4;
  --border-strong: #CFC9B8;
  --chip-bg: #EEECE3;
  --shadow: 220 25% 20%;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14121F;
    --bg-alt: #1A1729;
    --surface: #1E1A2E;
    --paper: #FBF8F0;
    --paper-line: #E4D9C4;
    --text: #EFEDFA;
    --text-soft: #B6B1D6;
    --text-faint: #8983AD;
    --border: #322C49;
    --border-strong: #433C63;
    --chip-bg: #251F38;
  }
}
:root[data-theme="dark"] {
  --bg: #14121F;
  --bg-alt: #1A1729;
  --surface: #1E1A2E;
  --paper: #FBF8F0;
  --paper-line: #E4D9C4;
  --text: #EFEDFA;
  --text-soft: #B6B1D6;
  --text-faint: #8983AD;
  --border: #322C49;
  --border-strong: #433C63;
  --chip-bg: #251F38;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .display {
  font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif;
  color: var(--text);
  text-wrap: balance;
  margin: 0;
}
a { color: inherit; }
img { max-width: 100%; }
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}
section { padding: 96px 0; }
@media (max-width: 720px) { section { padding: 64px 0; } }

/* Reusable alternate-shade section treatment — every other section down the
   page uses this so no two adjacent sections ever render the same shade
   back-to-back (which reads as one big merged block). */
.alt-bg {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--indigo-ink);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .eyebrow { color: #B7B0FF; } }
:root[data-theme="dark"] .eyebrow { color: #B7B0FF; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  max-width: 1120px;
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  display: block;
  flex-shrink: 0;
}
.brand-name { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 18px; color: var(--text); }
.brand-super { font-size: 10px; color: var(--text-faint); font-weight: 600; letter-spacing: 0.03em; white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 14px; font-weight: 600; }
.nav-links a { text-decoration: none; color: var(--text-soft); transition: color .15s; }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--indigo-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav-links a:hover { color: #C9C3FF; } }
:root[data-theme="dark"] .nav-links a:hover { color: #C9C3FF; }
.nav-links .pill { display: inline-block; }
@media (max-width: 780px) { .nav-links a.hide-sm { display: none; } }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
}
/* .pill.pill-* (not just .pill-*): a bare single class here loses a specificity
   fight to ".nav-links a" wherever a pill sits inside the nav — two classes beats
   one class + one element, so the color always applies regardless of context. */
.pill.pill-primary {
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  color: #fff;
  box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--indigo) 70%, transparent);
}
.pill.pill-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.pill.pill-soft {
  background: var(--chip-bg);
  color: var(--text-soft);
  font-size: 13px;
}

.play-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #000;
  color: #fff;
  border-radius: 10px;
  padding: 9px 16px 9px 14px;
  text-decoration: none;
  flex-shrink: 0;
}
.play-badge svg { flex-shrink: 0; }
.play-badge .play-text { display: flex; flex-direction: column; line-height: 1.1; }
.play-badge .play-eyebrow { font-size: 9.5px; letter-spacing: 0.04em; opacity: 0.85; }
.play-badge .play-name { font-family: 'Poppins', sans-serif; font-size: 15.5px; font-weight: 600; }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 40px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 { font-size: clamp(34px, 4.4vw, 52px); line-height: 1.08; font-weight: 700; letter-spacing: -0.01em; }
.hero-accent { color: var(--indigo-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero-accent { color: #B7B0FF; } }
:root[data-theme="dark"] .hero-accent { color: #B7B0FF; }

.hero p.lede {
  margin-top: 20px;
  font-size: 17.5px;
  color: var(--text-soft);
  max-width: 46ch;
}
.hero-ctas { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; align-items: center; }
.hero-note { margin-top: 14px; font-size: 13px; color: var(--text-faint); }

/* ---------- Marked answer sheet ---------- */
.sheet-wrap { position: relative; }
.sheet {
  position: relative;
  z-index: 1;
  background:
    repeating-linear-gradient(var(--paper), var(--paper) 27px, var(--paper-line) 28px);
  background-color: var(--paper);
  border-radius: 14px;
  /* Right padding is wide enough to clear the score-circle badge, which is
     absolutely positioned in that top-right corner — otherwise question/answer
     text runs underneath it. */
  padding: 30px 92px 26px 46px;
  box-shadow: 0 30px 60px -25px hsl(var(--shadow) / 0.45), 0 2px 0 var(--border-strong);
  transform: rotate(-1.2deg);
  color: #2B2640;
}
.sheet::before {
  content: "";
  position: absolute;
  left: 30px; top: 0; bottom: 0;
  width: 2px;
  background: color-mix(in srgb, var(--ink-red) 55%, transparent);
}
.sheet-head {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #7A6F52;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.sheet-q {
  font-size: 15.5px;
  font-weight: 600;
  color: #2B2640;
  margin-bottom: 10px;
}
.sheet-answer {
  font-family: 'Kalam', cursive;
  font-size: 18px;
  line-height: 1.5;
  color: #33304a;
  max-width: 92%;
}
.mark-tick {
  color: var(--ink-red);
  font-weight: 700;
  margin-right: 6px;
}
.score-circle {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 58px;
  height: 58px;
  border: 3px solid var(--ink-red);
  border-radius: 55% 48% 58% 45% / 50% 55% 45% 50%;
  transform: rotate(6deg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Kalam', cursive;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink-red);
  background: color-mix(in srgb, var(--ink-red) 6%, transparent);
}
.sticky {
  margin-top: 20px;
  margin-left: 6%;
  background: #FFF3C4;
  color: #4A3B0A;
  border-radius: 3px 12px 12px 12px;
  padding: 14px 16px;
  max-width: 88%;
  font-size: 13.5px;
  box-shadow: 0 10px 20px -12px rgba(0,0,0,0.35);
  transform: rotate(1deg);
}
.sticky b { font-family: 'Poppins', sans-serif; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; display: block; margin-bottom: 6px; color: #8A6A00; }
.mastery-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 700;
  color: #1F7A4D;
  background: #DFF3E7;
  padding: 5px 12px;
  border-radius: 999px;
}
.mastery-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: #1F7A4D; }

.floaty {
  position: absolute;
  z-index: 2;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 14px 26px -14px hsl(var(--shadow) / 0.4);
  display: flex;
  align-items: center;
  gap: 8px;
}
.floaty-1 { top: -18px; left: -18px; transform: rotate(-4deg); color: var(--gold-dark); }
.floaty-2 { bottom: -16px; right: 12px; transform: rotate(3deg); color: var(--indigo-ink); }
@media (max-width: 900px) { .floaty { display: none; } }

/* ---------- Stat band ---------- */
.stats {
  padding: 46px 0;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
@media (max-width: 780px) { .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; } }
.stat { text-align: left; padding: 0 20px; border-left: 2px solid var(--border-strong); }
.stat:first-child { border-left: none; padding-left: 0; }
@media (max-width: 780px) { .stat { border-left: none; padding: 0; } }
.stat-num {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 34px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.stat-label { font-size: 13.5px; color: var(--text-soft); margin-top: 4px; }

/* ---------- Section headers ---------- */
.section-head { max-width: 620px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(26px, 3vw, 36px); margin-top: 10px; font-weight: 700; }
.section-head p { color: var(--text-soft); margin-top: 12px; font-size: 16px; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-top: 6px; }
.step-num {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: var(--surface);
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  width: 34px; height: 34px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.step h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.step p { color: var(--text-soft); font-size: 14.5px; margin: 0; }

/* ---------- Date sheet ---------- */
.datesheet {
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
}
.datesheet-head {
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  color: white;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
}
.datesheet-head span.sub { font-family: 'Inter', sans-serif; font-weight: 500; font-size: 12px; opacity: 0.85; letter-spacing: normal; }
.ds-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  border-top: 1px solid var(--border);
}
.ds-row:first-of-type { border-top: none; }
@media (max-width: 620px) { .ds-row { grid-template-columns: 72px 1fr; } }
.ds-class {
  padding: 18px 16px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--indigo-ink);
  background: var(--chip-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.1;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ds-class { color: #C9C3FF; } }
:root[data-theme="dark"] .ds-class { color: #C9C3FF; }
.ds-class small { font-size: 10.5px; font-weight: 600; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.05em; }
.ds-subjects { padding: 16px 20px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip {
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--text-soft);
  border: 1px solid var(--border);
  white-space: nowrap;
}

/* ---------- Features ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }
.feature {
  padding: 26px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.feature-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.feature h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 8px; }
.feature p { font-size: 14px; color: var(--text-soft); margin: 0; }

/* ---------- Pricing ---------- */
.marks-table {
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
}
.mt-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; }
.mt-row + .mt-row { border-top: 1px solid var(--border); }
.mt-row.head { background: var(--bg-alt); font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 14px; }
.mt-cell { padding: 16px 20px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.mt-row.head .mt-cell:not(:first-child) { justify-content: center; text-align: center; }
.mt-row:not(.head) .mt-cell:not(:first-child) { justify-content: center; }
.mt-cell.plan-name { flex-direction: column; align-items: flex-start; gap: 2px; }
.plan-price { font-size: 12.5px; color: var(--text-faint); font-weight: 500; }
.yes { color: #1F7A4D; font-weight: 700; }
.dash { color: var(--text-faint); }
@media (max-width: 620px) { .mt-cell { padding: 12px 10px; font-size: 12.5px; } }

/* ---------- Privacy (document treatment) ---------- */
.doc-section { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.doc-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-soft);
  text-decoration: none;
  margin-bottom: 20px;
}
.doc-back:hover { color: var(--indigo-ink); }
.doc {
  max-width: 720px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px clamp(24px, 5vw, 56px);
}
.doc h2 { font-size: 26px; font-weight: 700; }
.doc .doc-updated { color: var(--text-faint); font-size: 13px; margin-top: 8px; }
.doc h3 { font-family: 'Poppins', sans-serif; font-size: 16px; font-weight: 700; margin: 34px 0 10px; }
.doc p, .doc li { font-size: 14.5px; color: var(--text-soft); max-width: 62ch; }
.doc ul { padding-left: 20px; margin: 10px 0; }
.doc li { margin-bottom: 6px; }
.doc strong { color: var(--text); }
.doc a.link { color: var(--indigo-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .doc a.link { color: #C9C3FF; } }
:root[data-theme="dark"] .doc a.link { color: #C9C3FF; }

/* ---------- Footer ---------- */
footer { padding: 48px 0 40px; }
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.footer-links { display: flex; gap: 22px; font-size: 13.5px; font-weight: 600; color: var(--text-soft); }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--indigo-ink); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 22px;
  font-size: 12.5px;
  color: var(--text-faint);
}
.footer-bottom a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- Phone mock (CompetePrep hero visual - the app's own dark practice
   screen, not a notebook metaphor) ---------- */
.phone-mock {
  background: #141225;
  border-radius: 28px;
  padding: 22px 20px 24px;
  box-shadow: 0 30px 60px -25px hsl(var(--shadow) / 0.45), 0 2px 0 var(--border-strong);
  color: #EDEBFB;
  max-width: 360px;
  margin: 0 auto;
}
.pm-bar { height: 4px; border-radius: 2px; background: linear-gradient(135deg, var(--indigo), var(--violet)); width: 68%; margin-bottom: 18px; }
.pm-q { font-size: 14.5px; line-height: 1.55; margin-bottom: 16px; }
.pm-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid #322C49; margin-bottom: 8px; font-size: 13px; }
.pm-opt .pm-idx { width: 20px; height: 20px; border-radius: 50%; background: #251F38; display: flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; }
.pm-opt.correct { border-color: #1F7A4D; background: color-mix(in srgb, #1F7A4D 18%, transparent); }
.pm-opt.wrong { border-color: #C0392B; background: color-mix(in srgb, #C0392B 16%, transparent); }
.pm-feedback { margin-top: 14px; font-size: 12.5px; font-weight: 600; color: #F2A65A; }

/* ---------- Free band (CompetePrep has no pricing tiers) ---------- */
.free-band {
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: var(--surface);
  padding: 32px clamp(20px, 5vw, 44px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.free-band h3 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.free-band p { color: var(--text-soft); font-size: 14.5px; margin: 0; max-width: 48ch; }
