/* The CSAT Solution — one stylesheet for site, student app and admin.
   Palette: deep exam-ink navy, royal blue for actions, marigold for highlights. */
:root {
  --ink: #111c3a;
  --ink-2: #2a375c;
  --muted: #5d6680;
  --line: #e1e5ef;
  --line-2: #cfd5e3;
  --bg: #f4f6fb;
  --surface: #ffffff;
  --sunk: #eef1f8;
  --primary: #1f43c4;
  --primary-ink: #ffffff;
  --primary-soft: #e7ecfd;
  --marigold: #f2a20c;
  --marigold-soft: #fff3d9;
  --marigold-ink: #6b4500;
  --good: #137a47;
  --good-soft: #e2f5ea;
  --bad: #b42318;
  --bad-soft: #fde7e5;
  --warn: #9a5800;
  --warn-soft: #fff1dc;
  --violet: #6b3fd1;
  --violet-soft: #efe8fd;
  --c-maths: #1f43c4;
  --c-reasoning: #6b3fd1;
  --c-rc: #137a47;
  --c-strategy: #9a5800;
  --c-doubt: #b42318;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(17, 28, 58, .06), 0 4px 16px rgba(17, 28, 58, .06);
  --font-display: "Sora", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.55;
}
img { max-width: 100%; }
a { color: var(--primary); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
/* Skip link: off screen until it is focused, then the first thing on the page. Kept visible
   while focused rather than hidden with display:none, which would take it out of the tab order
   and defeat the point. */
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; padding: 10px 16px;
  background: var(--primary); color: #fff; border-radius: 0 0 10px 10px; font-weight: 600;
  text-decoration: none; transition: top .12s; }
.skip-link:focus { top: 0; }
@media (prefers-reduced-motion: reduce) { .skip-link { transition: none; } }
/* tabindex="-1" lets the skip link actually move focus (not just scroll) in every browser,
   without putting <main> in the tab order. No ring: the person asked to go here, and a box
   drawn round the whole page reads as a glitch. */
#main:focus { outline: none; }
h1 { font-size: clamp(30px, 5vw, 48px); font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: clamp(22px, 3.2vw, 30px); font-weight: 650; }
h3 { font-size: 17px; font-weight: 600; }
/* A heading that sits at the top level of a page but should read as a card title.
   Heading levels describe the structure for a screen reader; these say how it looks,
   so the two can disagree where a card is a section in its own right. */
.as-h2 { font-size: clamp(22px, 3.2vw, 30px); font-weight: 650; letter-spacing: -0.01em; }
.as-h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.as-h4 { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.num, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.tiny { font-size: 12px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--primary); }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid > *, .row > * { min-width: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 14.5px/1 var(--font-body); padding: 11px 18px; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: #1836a6; }
.btn-marigold { background: var(--marigold); color: #241600; }
.btn-marigold:hover { background: #dd9206; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--sunk); }
.btn-danger { background: transparent; color: var(--bad); border-color: #f1c0bb; }
.btn-danger:hover { background: var(--bad-soft); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 14px 22px; font-size: 16px; }
.btn-block { width: 100%; }
.linklike { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; cursor: pointer; text-decoration: underline; }

/* ---------- Cards, chips, pills ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card-flat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card h3 + p { margin-top: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--sunk); color: var(--ink-2); white-space: nowrap; }
.chip-maths { background: var(--primary-soft); color: var(--c-maths); }
.chip-reasoning { background: var(--violet-soft); color: var(--c-reasoning); }
.chip-rc { background: var(--good-soft); color: var(--c-rc); }
.chip-strategy { background: var(--warn-soft); color: var(--c-strategy); }
.chip-doubt { background: var(--bad-soft); color: var(--c-doubt); }
.chip-mixed { background: var(--sunk); color: var(--ink-2); }
.chip-demo, .chip-free { background: var(--marigold-soft); color: var(--marigold-ink); }
.chip-live { background: var(--bad); color: #fff; }
.chip-good { background: var(--good-soft); color: var(--good); }
.chip-bad { background: var(--bad-soft); color: var(--bad); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .dot-live { animation: none; } }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; font: 15px var(--font-body); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: 9px; padding: 10px 12px;
}
textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
textarea.code { font-family: var(--font-mono); font-size: 12.5px; min-height: 180px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { margin-top: 3px; width: 16px; height: 16px; flex: none; }
.segmented { display: inline-flex; background: var(--sunk); border-radius: 10px; padding: 3px; gap: 3px; flex-wrap: wrap; }
.segmented button { border: 0; background: transparent; font: 600 13.5px var(--font-body); color: var(--ink-2); padding: 8px 14px; border-radius: 8px; cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }
.form-error { background: var(--bad-soft); color: var(--bad); border-radius: 9px; padding: 10px 12px; font-size: 14px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--sunk); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }
tr.you td { background: var(--marigold-soft); font-weight: 600; }

/* ---------- Public site ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(244, 246, 251, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 17px; white-space: nowrap; }
.brand-logo { width: 30px; height: 30px; flex: none; display: block; }
.brand-name { display: flex; flex-direction: column; line-height: 1.05; letter-spacing: -.015em; }
.brand-name small { font-family: var(--font-display); font-size: 9.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.site-footer .brand-name small { color: #9aa5c7; }
.site-nav { display: flex; gap: 20px; }
/* Each link stays on one line: without this, flexbox shrinks the items and breaks
   two-word labels ("Free Risk Check") across two lines inside the 64px header. */
.site-nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 14.5px; white-space: nowrap; }
.site-nav a:hover { color: var(--primary); }
@media (max-width: 860px) { .site-nav { display: none; } .menu-btn { display: inline-flex !important; } }
@media (max-width: 480px) { .hide-xs { display: none !important; } .site-header .brand-name { font-size: 15px; } .site-header .brand-name small { display: none; } }

.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero .lead { font-size: 18px; color: var(--ink-2); max-width: 54ch; margin-top: 16px; }
.hero .cta { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero .reassure { margin-top: 14px; font-size: 13.5px; color: var(--muted); }

/* Photo on the About page */
.about-photo { float: right; width: 240px; max-width: 42%; margin: 6px 0 20px 28px; border-radius: 16px;
  overflow: hidden; box-shadow: 0 14px 34px rgba(17, 28, 58, .18); }
.about-photo { background: linear-gradient(165deg, #e8edf9, #cfd9f2); }
.about-photo img { display: block; width: 100%; height: auto; }
@media (max-width: 640px) { .about-photo { float: none; width: 100%; max-width: 320px; margin: 0 0 18px; } }

/* The stake, stated once, high up. It is the strongest true thing on the page. */
/* The stake carries the headline type, so the consequence is the first thing read.
   A sentence is longer than a slogan, so it is set a little tighter than the global h1. */
.hero-head { margin-top: 12px; font-size: clamp(28px, 4.4vw, 44px); line-height: 1.12; max-width: 17ch; }
.hero-head strong { color: var(--bad); font-weight: inherit; }

/* The brand line now sits under it, in what the stake used to wear. */
.hero-stake { margin-top: 16px; font-size: 17px; font-weight: 600; color: var(--ink-2);
  border-left: 3px solid var(--marigold); padding-left: 12px; max-width: 46ch; }

/* ---------- Student video testimonials ----------
   Nothing loads until a card is clicked: a poster image stands in for the player,
   so a page full of videos still costs one image each on a phone. */
/* A curved row: cards sit on the inside of a shallow cylinder, so the middle one
   faces you flat and its neighbours turn away. Unlike the band this is borrowed
   from, it scrolls where the reader puts it and every card stays clickable. */
.tm-grid { display: flex; gap: 20px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; perspective: 1400px; perspective-origin: 50% 46%;
  padding-block: 26px 10px; padding-inline: max(8px, calc(50% - 170px));
  scrollbar-width: none; }
.tm-grid::-webkit-scrollbar { display: none; }
.tm-card { flex: 0 0 300px; scroll-snap-align: center; transform-style: preserve-3d;
  /* set per card from its distance to the middle; these are the resting values */
  transform: rotateY(var(--turn, 0deg)) scale(var(--near, 1));
  opacity: var(--fade, 1);
  transition: transform .18s linear, opacity .18s linear; }
@media (max-width: 520px) { .tm-card { flex-basis: 262px; } }
@media (prefers-reduced-motion: reduce) { .tm-card { transition: none; } }
.tm-card { margin: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden; box-shadow: 0 18px 44px rgba(17, 28, 58, .14); }
.tm-card.is-middle { box-shadow: 0 26px 60px rgba(17, 28, 58, .22); }
.tm-play { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; cursor: pointer;
  background: var(--ink) center / cover no-repeat; position: relative; }
.tm-play__icon { position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; border-radius: 999px;
  background: rgba(255, 255, 255, .94); box-shadow: 0 8px 24px rgba(10, 18, 40, .35); }
.tm-play__icon::after { content: ""; position: absolute; inset: 0; margin: auto; width: 0; height: 0;
  border-left: 17px solid var(--ink); border-top: 11px solid transparent; border-bottom: 11px solid transparent;
  transform: translateX(3px); }
.tm-play:hover .tm-play__icon { background: #fff; transform: scale(1.06); transition: transform .15s; }
.tm-play:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; }
.tm-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  pointer-events: none; }
.tm-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }
.tm-card figcaption { padding: 16px 18px 18px; }
.tm-quote { font-size: 15px; line-height: 1.5; color: var(--ink-2); margin-bottom: 10px; }
.tm-card figcaption b { font-family: var(--font-display); font-size: 15.5px; color: var(--ink); }
.tm-card figcaption span { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-2); }  /* not --muted: the card is dimmed behind this, and muted would fall under 4.5:1 */

/* The free steps, before any price is shown */
.ladder-band { padding-bottom: 8px; }
.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: rung; }
.ladder li { position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 22px 20px 20px; box-shadow: var(--shadow); }
.ladder__n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); font-family: var(--font-display);
  font-weight: 700; font-size: 15px; }
.ladder h3 { margin-top: 12px; font-size: 17px; }
.ladder p { margin-top: 6px; font-size: 14px; color: var(--muted); }
.ladder a { display: inline-block; margin-top: 10px; font-weight: 600; font-size: 14.5px; }

/* Hero: Haseen Sir cut out, lit by a halo. The core of every halo is near-white,
   so his black shirt reads as the darkest thing on the page and the eye lands on him. */
.hero-figure { margin: 0; position: relative; display: flex; justify-content: center;
  align-items: flex-end; min-height: 420px; }
.hero-figure picture { display: contents; }   /* else <picture> is the flex item, not the image */
.hero-stage { position: absolute; left: 50%; bottom: 4%; translate: -50% 0; z-index: 0;
  width: min(100%, 440px); aspect-ratio: 1; border-radius: 50%; }
.hero-cutout { position: relative; z-index: 1; display: block; width: min(100%, 420px); height: auto;
  filter: drop-shadow(0 18px 26px rgba(10, 18, 40, .22));
  -webkit-mask-image: linear-gradient(to bottom, #000 86%, rgba(0, 0, 0, 0) 99%);
          mask-image: linear-gradient(to bottom, #000 86%, rgba(0, 0, 0, 0) 99%); }

/* A · Warm spotlight — white core into marigold. Warm, welcoming, uses the brand accent. */
.halo-a .hero-stage { background:
  radial-gradient(circle at 50% 42%, #fff 0%, #fff 34%, var(--marigold-soft) 58%, rgba(242, 162, 12, .22) 74%, rgba(242, 162, 12, 0) 78%); }

/* B · Cool confidence — white core into the brand blue. Calm, competent, exam-serious. */
.halo-b .hero-stage { background:
  radial-gradient(circle at 50% 42%, #fff 0%, #fff 36%, var(--primary-soft) 60%, rgba(31, 67, 196, .18) 75%, rgba(31, 67, 196, 0) 79%); }

/* C · Studio light — a plain bright disc with a cool vignette. Neutral and premium. (in use) */
.halo-c .hero-stage { background:
  radial-gradient(circle at 50% 40%, #fff 0%, #fff 44%, #eef1f8 64%, rgba(17, 28, 58, .10) 77%, rgba(17, 28, 58, 0) 80%); }

/* Name plate: dark on light, so it works over any of the three halos */
.hero-figure figcaption { position: absolute; z-index: 2; left: 50%; translate: -50% 0; bottom: 0;
  display: flex; flex-direction: column; gap: 1px; text-align: center; padding: 8px 18px;
  border-radius: 999px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px);
  box-shadow: 0 6px 20px rgba(17, 28, 58, .14); font-size: 12.5px; color: var(--muted); }
.hero-figure figcaption b { font-family: var(--font-display); font-size: 15.5px; color: var(--ink); }

@media (max-width: 900px) {
  .hero-figure { min-height: 0; margin-top: 8px; }
  .hero-stage { width: min(100%, 330px); }
  .hero-cutout { width: min(100%, 330px); }
}

/* The qualify card, now its own band under the hero */
.qualify-band { padding: 8px 0 40px; }
.qualify-wide { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; padding: 30px; }
@media (max-width: 760px) { .qualify-wide { grid-template-columns: 1fr; gap: 18px; } }

/* Photo in the round-ish avatar on the teacher card */


.qualify-card { background: var(--ink); color: #e9edf8; border-radius: 18px; padding: 24px; box-shadow: 0 20px 50px rgba(17, 28, 58, .25); }
.qualify-card h3 { color: #fff; font-size: 16px; }
.qualify-card .big { font-family: var(--font-display); font-size: 40px; font-weight: 700; color: var(--marigold); letter-spacing: -.02em; }

/* The qualify band works the marking out with the student, rather than stating it.
   Without JavaScript the markup already shows 30 right / 10 wrong, which is exactly the cutoff. */
.qcalc { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.qcalc__row label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-size: 13.5px; color: #c4cce3; margin-bottom: 6px; }
.qcalc__row output { font-family: var(--font-mono); font-size: 15px; color: #fff; font-variant-numeric: tabular-nums; }
.qcalc input[type="range"] { width: 100%; accent-color: var(--marigold); }
.qcalc input[type="range"]:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 999px; }

.qverdict { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px;
  padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .07); }
.qverdict b { font-family: var(--font-display); font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.qverdict span { font-size: 13.5px; font-weight: 600; }
.qverdict.is-ok b, .qverdict.is-ok span { color: #7ee2b0; }
.qverdict.is-no b, .qverdict.is-no span { color: #ff9c90; }

.facts { background: var(--surface); border-block: 1px solid var(--line); padding: 48px 0 40px; }

/* ---------- Card stack ----------
   Four cards of what the batch gives you, dragged through like a deck. Without
   JavaScript the markup below is a plain readable list; stack.js adds .is-stack
   and positions each card. */
.stack-track { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.fact-card { flex: 1 1 220px; max-width: 300px; border-radius: 18px; padding: 22px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.fact-card__tag { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent, var(--primary)); }
.fact-card b { display: block; margin-top: 8px; font-family: var(--font-display); font-size: 42px;
  line-height: 1.05; letter-spacing: -.02em; color: var(--ink); }
.fact-card p { margin-top: 8px; font-size: 14.5px; color: var(--muted); }

/* The 15 sectional tests, split into the three papers they cover.
   Each block carries its own section colour, the same one used across tests,
   reports and the PYQ library, so the colour already means something by the
   time a student sees it here. Three fives also read as more reachable than
   one fifteen. */
.fact-split { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px;
  margin: 14px 0 0; padding: 0; list-style: none; }
.fact-split li { border-radius: 11px; padding: 9px 4px 8px; text-align: center;
  background: color-mix(in srgb, var(--c) 11%, #fff);
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
.fact-split b { display: block; margin: 0; font-family: var(--font-display);
  font-size: 21px; line-height: 1; color: var(--c); }
.fact-split span { display: block; margin-top: 3px; font-size: 10px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }

/* Upgraded to a stack */
.stack.is-stack { position: relative; height: 350px; touch-action: pan-y; outline: none;
  overflow: hidden; }   /* outer cards would otherwise push the page sideways on phones */
.stack.is-stack .stack-track { position: absolute; inset: 0; display: block; cursor: grab; z-index: 5; }
.stack.is-stack.is-dragging .stack-track { cursor: grabbing; }
.stack.is-stack .fact-card {
  position: absolute; top: 50%; left: 50%; width: 282px; max-width: 80vw; min-height: 262px;
  margin: -131px 0 0 -141px; padding: 24px; flex: none;
  background: linear-gradient(170deg, #fff, color-mix(in srgb, var(--accent) 7%, #fff));
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
  box-shadow: 0 18px 44px rgba(17, 28, 58, .16);
  will-change: transform; pointer-events: none;
  display: flex; flex-direction: column; justify-content: center;
}
.stack.is-stack .fact-card.is-front { box-shadow: 0 26px 60px rgba(17, 28, 58, .22); }
.stack.is-stack:focus-visible { outline: 2px solid var(--primary); outline-offset: 8px; border-radius: 20px; }

.stack-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; }
.stack-arrow { width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.stack-arrow:hover { border-color: var(--primary); color: var(--primary); }
.stack-dots { display: flex; gap: 8px; }
.stack-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px;
  background: var(--line-2); cursor: pointer; transition: background .2s, width .2s; }
.stack-dot[aria-selected="true"] { width: 22px; background: var(--primary); }

@media (max-width: 640px) {
  .stack.is-stack { height: 320px; }
  .stack.is-stack .fact-card { width: 248px; margin-left: -124px; min-height: 244px; padding: 18px; }
  .fact-card b { font-size: 36px; }
}

.section { padding: 64px 0; }
.section-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; max-width: 70ch; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.ticks { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.ticks li { padding-left: 26px; position: relative; font-size: 14.5px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 12px; height: 7px; border-left: 2.5px solid var(--good); border-bottom: 2.5px solid var(--good); transform: rotate(-45deg); }
.ticks li.no::before { border: 0; width: 10px; height: 2px; background: var(--line-2); top: 11px; transform: none; }
.ticks li.no { color: var(--muted); }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.plan.featured { border: 2px solid var(--primary); box-shadow: 0 16px 40px rgba(31, 67, 196, .15); }
.plan .ribbon { position: absolute; top: -12px; left: 24px; background: var(--marigold); color: #241600; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.plan .price { font-family: var(--font-display); font-size: 36px; font-weight: 700; letter-spacing: -.02em; }
.plan .price small { font-size: 14px; font-weight: 500; color: var(--muted); font-family: var(--font-body); }
.plan .strike { text-decoration: line-through; color: var(--muted); font-size: 15px; margin-right: 6px; }
.plan .btn { margin-top: auto; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.step { counter-increment: step; padding: 20px; border-radius: var(--radius); background: var(--sunk); }
.step::before { content: "Day " counter(step); display: block; font-family: var(--font-display); font-weight: 700; color: var(--primary); margin-bottom: 6px; font-size: 14px; }
.steps.how .step::before { content: "Step " counter(step); }

.teacher { display: grid; grid-template-columns: 180px 1fr; gap: 28px; align-items: start; }
@media (max-width: 700px) { .teacher { grid-template-columns: 1fr; } }
.avatar-lg { width: 180px; max-width: 100%; aspect-ratio: 1; border-radius: 20px; background: linear-gradient(135deg, var(--ink), var(--primary)); color: var(--marigold); display: grid; place-items: center; font-family: var(--font-display); font-size: 54px; font-weight: 700; }

details.faq { border-bottom: 1px solid var(--line); padding: 16px 0; }
details.faq summary { cursor: pointer; font-weight: 600; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::after { content: "+"; font-size: 20px; color: var(--muted); line-height: 1; }
details.faq[open] summary::after { content: "–"; }
details.faq p { margin-top: 10px; color: var(--ink-2); max-width: 72ch; }

.site-footer { background: var(--ink); color: #b9c2dc; padding: 40px 0; font-size: 14px; }
.site-footer a { color: #dfe5f5; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .cols { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer .links { display: flex; gap: 18px; flex-wrap: wrap; }

/* Legal pages */
.doc { max-width: 760px; margin: 0 auto; padding: 48px 0 72px; }
.doc h1 { font-size: 32px; margin-bottom: 8px; }
.doc h2 { font-size: 20px; margin: 28px 0 8px; }
.doc p, .doc li { color: var(--ink-2); }
.doc p + p { margin-top: 10px; }
.doc ul { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.todo { background: var(--marigold-soft); color: var(--marigold-ink); padding: 0 4px; border-radius: 4px; font-weight: 600; }
.draft-note { background: var(--marigold-soft); color: var(--marigold-ink); border-radius: 10px; padding: 12px 14px; font-size: 14px; margin: 16px 0; }

/* Auth */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; background: linear-gradient(180deg, var(--bg), #e9eefb); }
/* Log in and Sign up now lead with an H1 instead of an H2 (every page needs exactly one).
   These cards are ~420px wide, so keep the old H2 size rather than the 48px H1 default. */
.auth-page h1 { font-size: clamp(22px, 3.2vw, 30px); font-weight: 650; letter-spacing: -0.01em; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card .card { padding: 28px; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- Student app ---------- */
.topbar { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 30; }
.topbar .wrap { display: flex; align-items: center; gap: 18px; height: 60px; }
.topbar .brand { color: #fff; font-size: 15.5px; }
.topbar .brand-logo { width: 28px; height: 28px; }
.topbar .brand-name small { color: #9aa5c7; }   /* --muted is too dark on the ink topbar */
.appnav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.appnav a { color: #c9d1ea; text-decoration: none; font-weight: 500; font-size: 14px; padding: 8px 12px; border-radius: 8px; white-space: nowrap; }
.appnav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.appnav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .14); }
.who { display: flex; align-items: center; gap: 10px; flex: none; }
.who .btn { color: #fff; border-color: rgba(255, 255, 255, .25); }
.who .btn:hover { background: rgba(255, 255, 255, .1); }
@media (max-width: 760px) {
  .topbar .wrap { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 6px; gap: 6px 12px; }
  .topbar .brand span:last-child { display: none; }
  .appnav { order: 3; flex-basis: 100%; }
  .who { margin-left: auto; }
  .who-name { display: none; }
}
.demo-banner { background: var(--marigold-soft); color: var(--marigold-ink); border-bottom: 1px solid #f3dca8; font-size: 14px; }
.demo-banner .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.page { padding: 28px 0 64px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { margin-top: 6px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi .l { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kpi .n { font-family: var(--font-display); font-size: 26px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.meter { height: 10px; border-radius: 99px; background: var(--sunk); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .main { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; }
.list-item .meta { font-size: 13px; color: var(--muted); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.date-badge { flex: none; width: 54px; text-align: center; border-radius: 10px; background: var(--sunk); padding: 6px 0; }
.date-badge b { display: block; font-family: var(--font-display); font-size: 19px; line-height: 1.1; }
.date-badge span { font-size: 11px; text-transform: uppercase; color: var(--muted); font-weight: 700; letter-spacing: .05em; }
.lock { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; }
.empty { text-align: center; padding: 32px 16px; color: var(--muted); }

.player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.locked-box { border: 2px dashed var(--line-2); border-radius: var(--radius); padding: 32px 20px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; background: var(--surface); }

/* ---------- Exam ---------- */
.exam-bar { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); }
.exam-bar .wrap { display: flex; align-items: center; gap: 14px; height: 60px; }
.exam-bar .title { font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timer { font-family: var(--font-mono); font-size: 20px; font-weight: 600; padding: 6px 12px; border-radius: 8px; background: var(--sunk); font-variant-numeric: tabular-nums; }
.timer.warn { background: var(--bad-soft); color: var(--bad); }
.save-state { font-size: 12px; color: var(--muted); }
.exam { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; padding: 20px 0 100px; }
@media (max-width: 960px) { .exam { grid-template-columns: 1fr; } }
.q-wrap { display: grid; gap: 16px; }
.q-wrap.has-passage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .q-wrap.has-passage { grid-template-columns: 1fr; } }
.passage { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; max-height: 70vh; overflow: auto; white-space: pre-wrap; line-height: 1.7; font-size: 15px; }
.question-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.q-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.q-text { font-size: 16.5px; white-space: pre-wrap; line-height: 1.6; }
.options { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.option { display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; padding: 12px 14px; border: 1.5px solid var(--line-2); border-radius: 10px; background: var(--surface); font: 15px/1.5 var(--font-body); color: var(--ink); cursor: pointer; }
.option:hover { border-color: var(--primary); background: var(--primary-soft); }
.option .key { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.option .txt { white-space: pre-wrap; padding-top: 2px; }
.option[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); }
.option[aria-pressed="true"] .key { background: var(--primary); border-color: var(--primary); color: #fff; }
.q-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; justify-content: space-between; }
.palette { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; align-self: start; position: sticky; top: 76px; }
.palette h4 { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 12px 0 8px; }
.palette-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; }
.pq { height: 38px; border-radius: 8px; border: 1.5px solid var(--line-2); background: var(--surface); font: 600 13px var(--font-mono); cursor: pointer; color: var(--ink-2); position: relative; }
.pq.visited { border-color: #e9a29b; background: #fff6f5; }
.pq.answered { background: var(--good); border-color: var(--good); color: #fff; }
.pq.marked { background: var(--violet); border-color: var(--violet); color: #fff; }
.pq.answered.marked::after { content: ""; position: absolute; right: 3px; top: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--good); border: 1.5px solid #fff; }
.pq.current { outline: 2.5px solid var(--marigold); outline-offset: 1px; }
.pal-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 14px; }
.pal-legend span::before { content: ""; display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--c); border: 1px solid var(--b, var(--c)); }
.palette-toggle { display: none !important; }
@media (max-width: 960px) {
  .save-state { display: none; }
  .palette { position: fixed; left: 0; right: 0; bottom: 0; top: auto; border-radius: 16px 16px 0 0; max-height: 65vh; overflow: auto; z-index: 40; transform: translateY(100%); transition: transform .2s; box-shadow: 0 -10px 30px rgba(0, 0, 0, .15); }
  .palette.open { transform: none; }
  .palette-toggle { display: inline-flex !important; }
}

/* ---------- Results ---------- */
.score-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.score-main { background: var(--ink); color: #fff; border-radius: 16px; padding: 22px; }
.score-main .big { font-family: var(--font-display); font-size: 44px; font-weight: 700; letter-spacing: -.02em; }
.score-main .big small { font-size: 18px; color: #aab4d4; font-weight: 500; }
.rank-box { background: var(--marigold-soft); border-radius: 16px; padding: 22px; color: var(--marigold-ink); }
.rank-box .big { font-family: var(--font-display); font-size: 44px; font-weight: 700; color: #3b2600; }
.bar-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 70px; gap: 12px; align-items: center; font-size: 14px; }
@media (max-width: 520px) { .bar-row { grid-template-columns: 100px minmax(0, 1fr) 56px; } }
.bar { height: 12px; background: var(--sunk); border-radius: 99px; overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; }
.bar .ok { background: var(--good); }
.bar .no { background: #e57266; }
.solution { border-top: 1px solid var(--line); padding: 18px 0; }
.solution .opt { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); margin-top: 6px; display: flex; gap: 10px; white-space: pre-wrap; }
.solution .opt.correct { border-color: var(--good); background: var(--good-soft); }
.solution .opt.wrong { border-color: #e57266; background: var(--bad-soft); }
.explain { margin-top: 12px; background: var(--sunk); border-radius: 10px; padding: 12px 14px; white-space: pre-wrap; font-size: 14.5px; }
details.passage-toggle summary { cursor: pointer; color: var(--primary); font-weight: 600; font-size: 14px; }
details.passage-toggle div { white-space: pre-wrap; margin-top: 8px; padding: 12px; background: var(--sunk); border-radius: 10px; font-size: 14.5px; }

/* ---------- Admin ---------- */
.admin-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.admin-tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 2.5px solid transparent; white-space: nowrap; }
.admin-tabs a[aria-current="page"] { color: var(--primary); border-color: var(--primary); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.q-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; }
.q-row .snip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Modal and toast ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(17, 28, 58, .45); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal { background: var(--surface); border-radius: 16px; padding: 24px; width: 100%; max-width: 460px; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); display: flex; flex-direction: column; gap: 14px; max-height: 90vh; overflow: auto; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 6px; }
.toasts { position: fixed; bottom: max(16px, env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow); }
.toast.error { background: var(--bad); }
.toast.good { background: var(--good); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--primary); animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ================= v2 additions ================= */
/* Mobile menu */
.menu-btn { display: none; flex-direction: column; justify-content: center; gap: 4px; width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); cursor: pointer; padding: 0 10px; }
.menu-btn span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }
.header-actions { flex-wrap: nowrap; }
@media (max-width: 400px) { .header-actions .btn { padding: 7px 10px; font-size: 12.5px; } }
.mobile-menu { display: flex; flex-direction: column; border-top: 1px solid var(--line); background: var(--surface); padding: 8px max(16px, env(safe-area-inset-left, 0px)) 14px; }
.mobile-menu a { padding: 12px 4px; text-decoration: none; color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--line); }
.mobile-menu a:last-child { border-bottom: 0; }

/* Footer v2 */
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
.footer-grid h2 { color: #fff; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.footer-grid div > a { display: block; padding: 4px 0; }
.footer-brand p { margin-top: 12px; max-width: 42ch; }
.footer-base { margin-top: 32px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; }

/* WhatsApp button */
.wa-float { position: fixed; right: max(18px, env(safe-area-inset-right, 0px)); bottom: max(18px, env(safe-area-inset-bottom, 0px)); width: 54px; height: 54px; border-radius: 50%; background: #25d366; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); z-index: 50; }

/* Bell */
.bell-wrap { position: relative; }
.bell { position: relative; width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .25); background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; }
.bell:hover { background: rgba(255, 255, 255, .1); }
.bell-count { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--marigold); color: #241600; font: 700 11px/19px var(--font-body); text-align: center; }
.bell-panel { position: absolute; right: 0; top: 46px; width: min(360px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 50px rgba(17, 28, 58, .25); z-index: 60; }
.bell-head { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.bell-item { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 14px; }
.bell-item span { color: var(--ink-2); font-size: 13px; }
.bell-item small { color: var(--muted); font-size: 12px; }
.bell-item.unread { background: var(--primary-soft); }
.bell-all { display: block; text-align: center; padding: 10px; font-weight: 600; font-size: 13.5px; text-decoration: none; }
@media (max-width: 760px) { .bell-panel { position: fixed; left: 16px; right: 16px; top: 64px; width: auto; } }

/* Pay page */
.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 860px) { .pay-grid { grid-template-columns: 1fr; } }
.amount-box { background: var(--ink); color: #fff; border-radius: 16px; padding: 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.amount-box .big { font-family: var(--font-display); font-size: 36px; font-weight: 700; color: var(--marigold); }
.qr-box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; justify-content: center; }
.qr-box img { width: 240px; max-width: 100%; height: auto; }
.upi-row { display: flex; align-items: center; gap: 10px; background: var(--sunk); border-radius: 10px; padding: 10px 12px; flex-wrap: wrap; }
.upi-row code { font-family: var(--font-mono); font-size: 16px; font-weight: 600; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.drop { border: 2px dashed var(--line-2); border-radius: 12px; padding: 18px; text-align: center; cursor: pointer; background: var(--surface); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.drop:hover, .drop.drag { border-color: var(--primary); background: var(--primary-soft); }
.drop img { max-height: 220px; border-radius: 8px; }
.steps-list { counter-reset: s; list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.steps-list li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; }
.steps-list li::before { content: counter(s); flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: #fff; font: 700 12px/24px var(--font-body); text-align: center; }

/* OTP / Google */
.otp-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.otp-code { letter-spacing: .4em; font-family: var(--font-mono); font-size: 20px; text-align: center; }
.divider-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.divider-or::before, .divider-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.verified { color: var(--good); font-weight: 600; font-size: 13px; }

/* Practice */
.practice-q .option.correct { border-color: var(--good); background: var(--good-soft); }
.practice-q .option.correct .key { background: var(--good); border-color: var(--good); color: #fff; }
.practice-q .option.wrong { border-color: #e57266; background: var(--bad-soft); }
.practice-q .option.wrong .key { background: var(--bad); border-color: var(--bad); color: #fff; }
.practice-q .option:disabled { cursor: default; }
.dots { display: flex; gap: 6px; flex-wrap: wrap; }
.dots button { width: 32px; height: 32px; border-radius: 8px; border: 1.5px solid var(--line-2); background: var(--surface); font: 600 12px var(--font-mono); cursor: pointer; }
.dots button.ok { background: var(--good); border-color: var(--good); color: #fff; }
.dots button.no { background: var(--bad); border-color: var(--bad); color: #fff; }
.dots button.cur { outline: 2.5px solid var(--marigold); outline-offset: 1px; }

/* PYQ library */
.topic-card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .15s, transform .15s; }
.topic-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.topic-card .thumb { aspect-ratio: 16 / 9; background: var(--ink) center / cover no-repeat; position: relative; }
.topic-card .thumb::after { content: ""; position: absolute; inset: 0; margin: auto; width: 54px; height: 38px; border-radius: 10px; background: rgba(17, 28, 58, .78) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 22px no-repeat; }
.topic-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.yt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
@media (prefers-reduced-motion: reduce) { .topic-card { transition: none; } .topic-card:hover { transform: none; } }

/* Doubts */
.doubt { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); }
.doubt .ans { background: var(--good-soft); border-radius: 10px; padding: 10px 12px; white-space: pre-wrap; font-size: 14.5px; }
.doubt .ans strong { color: var(--good); }
.doubt .q { white-space: pre-wrap; }
.doubt img { max-width: 100%; max-height: 260px; border-radius: 8px; border: 1px solid var(--line); }
.vote { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 4px 10px; font: 600 12.5px var(--font-body); cursor: pointer; color: var(--ink-2); }
.vote[aria-pressed="true"] { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }

/* Video watermark */
.vplayer { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; user-select: none; }
.vplayer video { width: 100%; height: 100%; display: block; }
.vmark { position: absolute; pointer-events: none; color: rgba(255, 255, 255, .55); font: 600 13px var(--font-body); text-shadow: 0 1px 2px rgba(0, 0, 0, .6); white-space: nowrap; transition: top 1.2s, left 1.2s; }

/* Streak / week */
.week-dots { display: flex; gap: 6px; margin-top: 10px; }
.week-dots span { flex: 1; height: 8px; border-radius: 99px; background: var(--sunk); }
.week-dots span.on { background: var(--marigold); }
.streak-num { font-family: var(--font-display); font-size: 34px; font-weight: 700; color: var(--marigold-ink); }

/* Misc */
.modal-wide { max-width: 720px; }
.pay-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; }
.callout { border-left: 3px solid var(--primary); background: var(--primary-soft); padding: 12px 14px; border-radius: 0 10px 10px 0; font-size: 14px; }
.hero-mark { width: 64px; height: 64px; }

/* ================= v3: leads, chat, live mocks, rank card ================= */
@media (max-width: 1000px) { .hide-md { display: none !important; } }
body.no-scroll { overflow: hidden; }
.btn-wa { background: #25d366; color: #073b1c; }
.btn-wa:hover { background: #1fbf5b; }

/* Counselling form: centred card on desktop, bottom sheet on phones */
.lead-back { position: fixed; inset: 0; background: rgba(17, 28, 58, .55); z-index: 120; display: grid; place-items: center; padding: 16px; }
.lead-card { position: relative; width: 100%; max-width: 440px; background: var(--surface); border-radius: 18px; padding: 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); max-height: 92vh; overflow: auto; }
.lead-x { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--sunk); font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink-2); }
@media (max-width: 600px) {
  .lead-back { place-items: end stretch; padding: 0; }
  .lead-card { max-width: none; border-radius: 18px 18px 0 0; padding-bottom: max(20px, env(safe-area-inset-bottom, 0px)); }
}

/* Chat assistant */
.chat-launch { position: fixed; right: max(18px, env(safe-area-inset-right, 0px)); bottom: max(18px, env(safe-area-inset-bottom, 0px)); width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--primary); display: grid; place-items: center; box-shadow: 0 10px 28px rgba(31, 67, 196, .4); z-index: 55; cursor: pointer; }
.chat-launch.open { background: var(--ink); }
.wa-float.wa-stacked { bottom: calc(max(18px, env(safe-area-inset-bottom, 0px)) + 70px); width: 48px; height: 48px; }
.chat-panel { position: fixed; right: max(18px, env(safe-area-inset-right, 0px)); bottom: calc(max(18px, env(safe-area-inset-bottom, 0px)) + 70px); width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 120px)); background: var(--surface); border-radius: 18px; box-shadow: 0 30px 80px rgba(17, 28, 58, .3); display: flex; flex-direction: column; overflow: hidden; z-index: 56; border: 1px solid var(--line); }
.chat-panel[hidden] { display: none !important; }
.chat-head { background: var(--ink); color: #fff; padding: 14px 16px; display: flex; align-items: center; gap: 10px; }
.chat-head div { flex: 1; display: flex; flex-direction: column; }
.chat-head span { font-size: 12px; color: #aab4d4; }
.chat-x { background: transparent; border: 0; color: #fff; font-size: 24px; cursor: pointer; }
.chat-log { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.chat-msg { max-width: 88%; padding: 10px 12px; border-radius: 14px; font-size: 14px; line-height: 1.5; }
.chat-msg.bot { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; align-self: flex-start; }
.chat-msg.me { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.chat-msg ul { margin: 6px 0; padding-left: 18px; }
.chat-msg input, .chat-msg select, .chat-msg textarea { font-size: 14px; padding: 8px 10px; }
.chat-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.chat-links a { font-weight: 600; font-size: 13px; }
.chat-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 12px 0; background: var(--surface); border-top: 1px solid var(--line); }
.chat-chips button { border: 1px solid var(--primary); color: var(--primary); background: var(--surface); border-radius: 999px; padding: 6px 10px; font: 600 12.5px var(--font-body); cursor: pointer; }
.chat-chips button:hover { background: var(--primary-soft); }
.chat-input { display: flex; gap: 8px; padding: 10px 12px 12px; background: var(--surface); }
.chat-input input { flex: 1; min-width: 0; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .2; } }
@media (max-width: 600px) { .chat-panel { left: 8px; right: 8px; width: auto; bottom: 86px; height: calc(100vh - 110px); } }
@media (prefers-reduced-motion: reduce) { .typing i { animation: none; } }

/* Live mock and focused ranks */
.chip-livemock { background: var(--ink); color: var(--marigold); }
.band { border-radius: 14px; padding: 16px; display: flex; gap: 14px; align-items: center; }
.band b { font-family: var(--font-display); font-size: 20px; }
.band-safe { background: var(--good-soft); color: var(--good); }
.band-likely { background: var(--primary-soft); color: var(--primary); }
.band-borderline { background: var(--warn-soft); color: var(--warn); }
.band-risk { background: var(--bad-soft); color: var(--bad); }
.focus-ranks { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.focus-rank { background: var(--sunk); border-radius: 12px; padding: 12px 14px; }
.focus-rank .n { font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.fair-banner { background: var(--warn-soft); color: var(--warn); font-size: 13px; padding: 6px 0; text-align: center; }

/* Receipt (prints cleanly) */
.receipt { max-width: 760px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 32px; }
.receipt table td, .receipt table th { padding: 8px 6px; }
@media print {
  body { background: #fff; }
  #app-header, .no-print, .chat-launch, .wa-float { display: none !important; }
  .receipt { border: 0; padding: 0; }
}

/* Streak: Monday-to-Sunday dots with letters; frozen = covered by the weekly streak freeze */
.week-dots.labelled span { height: 26px; display: grid; place-items: center; border-radius: 8px; }
.week-dots.labelled em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.week-dots.labelled span.on em { color: #3d2800; }
.week-dots span.frozen { background: #dcecfb; box-shadow: inset 0 0 0 1.5px #8dbbe8; }
.week-dots span.frozen em { color: #1f5f99; }
.week-dots span.future { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.week-dots span.today { outline: 2px solid var(--ink); outline-offset: 1px; }
.chip-freeze { background: #dcecfb; color: #1f5f99; }
.chip-freeze.used { background: var(--sunk); color: var(--muted); }

/* Safe Score meter */
.safe-card { display: grid; gap: 10px; }
.safe-meter { position: relative; height: 16px; border-radius: 99px; background: var(--sunk); margin-top: 26px; }
.safe-meter .zone { position: absolute; top: 0; bottom: 0; }
.safe-meter .zone:first-child { border-radius: 99px 0 0 99px; }
.safe-meter .zone:last-of-type { border-radius: 0 99px 99px 0; }
.zone-risk { background: #f6c9c4; }
.zone-borderline { background: #fbdca6; }
.zone-likely { background: #c4d1fa; }
.zone-safe { background: #b6e3c8; }
.safe-meter .line-mark { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--bad); }
.safe-meter .past-mark { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--muted); }
.safe-meter .you-mark { position: absolute; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: var(--ink); border: 3px solid var(--surface); box-shadow: 0 1px 4px rgba(17, 28, 58, .35); }
.safe-meter .you-mark b { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); font: 700 13px var(--font-mono); color: var(--ink); white-space: nowrap; }
.safe-scale { position: relative; height: 16px; }
.safe-scale span { position: absolute; transform: translateX(-50%); font-variant-numeric: tabular-nums; }
.safe-scale span:first-child { transform: none; }
.safe-scale span:last-child { transform: translateX(-100%); }
.safe-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.safe-legend span { display: inline-flex; align-items: center; gap: 6px; }
.safe-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.safe-legend i.past { border-radius: 50%; border: 2px solid var(--muted); background: var(--surface); }
.safe-next { font-size: 15px; }
.band-text-risk { color: var(--bad); }
.band-text-borderline { color: var(--warn); }
.band-text-likely { color: var(--primary); }
.band-text-safe { color: var(--good); }

/* Mistake Bank */
.revise-card.due { border-color: #c4d1fa; background: linear-gradient(180deg, var(--primary-soft), var(--surface) 70%); }
.revise-progress { display: flex; gap: 6px; }
.revise-progress span { flex: 1; height: 6px; border-radius: 99px; background: var(--sunk); }
.revise-progress span.ok { background: var(--good); }
.revise-progress span.no { background: #e57266; }
.revise-progress span.cur { background: var(--primary); }
.stage-steps { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.stage-steps .step-pill { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--sunk); color: var(--muted); }
.stage-steps .step-pill.done { background: var(--good-soft); color: var(--good); }
.stage-steps .step-pill.now { background: var(--primary-soft); color: var(--primary); }
.bank-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.bank-stats div { background: var(--sunk); border-radius: 12px; padding: 12px 14px; }
.bank-stats b { display: block; font-family: var(--font-display); font-size: 24px; }

/* Result page: strengths first, next step last */
.win-card { border-color: #b6e3c8; background: linear-gradient(180deg, var(--good-soft), var(--surface) 75%); }
.next-step { border: 2px solid var(--primary); }
.time-tip { padding: 10px 0; border-bottom: 1px solid var(--line); }
.time-tip:last-child { border-bottom: 0; }

/* Real-exam mode: option on the instructions screen, OMR sheet, invigilator banner */
.exam-mode-opt { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--sunk); cursor: pointer; }
.exam-mode-opt input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--primary); flex: none; }
.chip-exam { background: var(--ink); color: #fff; }
.exam-clock { color: var(--muted); white-space: nowrap; }
.omr-grid { display: grid; gap: 4px; max-height: 60vh; overflow-y: auto; padding-right: 4px; }
.omr-row { display: grid; grid-template-columns: 34px repeat(4, 1fr); gap: 6px; align-items: center; padding: 2px 4px; border-radius: 8px; }
.omr-row.current { background: var(--primary-soft); }
.omr-n { border: 0; background: none; font: 600 13px var(--font-mono); color: var(--ink); cursor: pointer; text-align: right; padding: 4px; }
.bubble { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid #8a93ad; background: var(--surface); color: #6b7591; font: 600 11px var(--font-body); cursor: pointer; justify-self: center; padding: 0; }
.bubble:hover { border-color: var(--ink); }
.bubble.filled { background: var(--ink); border-color: var(--ink); color: #fff; }
.invigilator { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 80; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: 0 8px 24px rgba(17, 28, 58, .3); max-width: min(560px, calc(100vw - 32px)); font-size: 15px; }

/* Result: you vs your last test */
.self-box .big { font-family: var(--font-display); }
.air-more { margin-top: 10px; }
.air-more summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }

/* Dashboard: Haseen Sir's message, fresh start */
.milestone-card { border-color: #f3dca8; background: linear-gradient(180deg, var(--marigold-soft), var(--surface) 60%); }
.video-frame { width: 100%; max-width: 560px; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; overflow: hidden; background: #000; display: block; }
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.fresh-card { border-color: #c4d1fa; background: linear-gradient(180deg, var(--primary-soft), var(--surface) 70%); }
.fresh-plan { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

/* Plans: honest price notes */
.price-note { color: var(--muted); margin-top: 4px; }

/* Study squad */
.squad-list { display: grid; gap: 8px; }
.squad-row { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(200px, 2fr) 120px; gap: 14px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--sunk); }
.squad-row.you { background: var(--marigold-soft); }
.squad-row .who { display: grid; }
.squad-row .week-dots { margin-top: 0; }
@media (max-width: 640px) { .squad-row { grid-template-columns: 1fr; gap: 8px; } }

/* Public Risk Check */
.risk-hero { border-color: #c4d1fa; background: linear-gradient(180deg, var(--primary-soft), var(--surface) 55%); }
.risk-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.risk-bar .mono { font-size: 18px; font-weight: 600; }
.risk-bar .mono.warn { color: var(--bad); }
.risk-report .kpis { margin-top: 4px; }

/* ---------- PYQ library: section > subject > topic, and the year papers ---------- */
.pyq-group { display: grid; gap: 14px; }
.pyq-group + .pyq-group { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.pyq-group-head { display: flex; align-items: center; gap: 10px; }
.pyq-subject { display: grid; gap: 10px; }
.pyq-subject h3 { font-size: 15px; }
.pyq-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px; }
.pyq-topic { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; text-decoration: none; color: var(--ink); font-size: 14.5px; font-weight: 500; transition: border-color .15s, background .15s; }
.pyq-topic:hover { border-color: var(--primary); background: var(--primary-soft); }
.pyq-topic .t { min-width: 0; }
.pyq-topic .n { font-family: var(--font-mono); font-size: 13px; color: var(--muted); flex: none; }
.pyq-years { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.pyq-year { display: grid; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.pyq-year:hover { border-color: var(--primary); transform: translateY(-2px); }
.pyq-year .yr { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.pyq-year .mix { display: flex; gap: 5px; margin-top: 5px; }
.pyq-year .mix .chip { font-style: normal; font-size: 11.5px; padding: 2px 7px; }
.q-figure { margin: 12px 0 2px; }
.q-figure img { max-width: min(100%, 460px); border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.answer-note { margin-top: 8px; font-size: 13.5px; color: var(--warn); background: var(--warn-soft); border-radius: 8px; padding: 8px 10px; }
@media (prefers-reduced-motion: reduce) { .pyq-year:hover { transform: none; } }

/* Teacher card: the cut-out portrait on a soft brand tint */
.avatar-lg.avatar-photo { background: linear-gradient(165deg, #e9edf9, #ccd7f1); overflow: hidden;
  padding: 0; display: block; position: relative; }
.avatar-lg.avatar-photo img { position: absolute; top: 0; left: 50%; translate: -50% 0;
  height: 142%; width: auto; max-width: none; display: block; }

/* ---------- Aurora backdrop ----------
   Drifting light behind a section. Plain CSS: one repeating gradient of brand
   colours, blurred, with a second copy of it animated and multiplied over the
   first so the two drift out of step. Masked to fade away from the top right.
   Markup: <div class="aurora"> <span class="aurora-layer" aria-hidden="true"></span> …content… </div> */
.aurora { position: relative; overflow: hidden; isolation: isolate; }
.aurora > *:not(.aurora-layer) { position: relative; z-index: 1; }

.aurora-layer {
  --aurora: repeating-linear-gradient(100deg,
    #dbe4fb 2%, var(--primary-soft) 8%, #cfe0fb 13%, #e4dcfa 18%, #d7e3fd 25%, #eef2fe 30%);
  position: absolute; inset: -40px; z-index: 0; pointer-events: none;
  background-image: var(--aurora);
  background-size: 260% 180%;
  background-position: 50% 50%;
  filter: blur(26px) saturate(1.25);
  opacity: .95;
  will-change: transform;
  -webkit-mask-image: radial-gradient(ellipse 120% 90% at 100% 0%, #000 8%, transparent 78%);
          mask-image: radial-gradient(ellipse 120% 90% at 100% 0%, #000 8%, transparent 78%);
}
.aurora-layer::after {
  content: ""; position: absolute; inset: 0;
  background-image: var(--aurora);
  background-size: 180% 120%;
  mix-blend-mode: multiply;
  animation: aurora 60s linear infinite;
}
@keyframes aurora {
  from { background-position: 50% 50%; }
  to   { background-position: 350% 50%; }
}
/* Weight the light to the top left instead, to stay clear of the hero photo. */
.aurora-left .aurora-layer {
  -webkit-mask-image: radial-gradient(ellipse 110% 85% at 12% 0%, #000 6%, transparent 72%);
          mask-image: radial-gradient(ellipse 110% 85% at 12% 0%, #000 6%, transparent 72%);
}
/* Respect the system setting: hold it still rather than drifting. */
@media (prefers-reduced-motion: reduce) { .aurora-layer::after { animation: none; } }

/* ---------- Server-rendered PYQ topic page ----------
   What a crawler, a social preview and a visitor without JavaScript see. The
   interactive version replaces it once the page's module runs. */
.crumbs { font-size: 13.5px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }

.pyq-facts { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pyq-facts li { background: var(--sunk); border-radius: 12px; padding: 10px 14px; }
.pyq-facts b { display: block; font-family: var(--font-display); font-size: 20px; color: var(--ink); }
.pyq-facts span { font-size: 12.5px; color: var(--muted); }

.pyq-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; counter-reset: pyq; }
.pyq-q { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; counter-increment: pyq; }
.pyq-q__text { font-weight: 500; color: var(--ink); }
.pyq-q__text::before { content: "Q" counter(pyq) ". "; font-family: var(--font-mono); color: var(--muted); font-weight: 600; }
.pyq-q__opts { margin: 10px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; font-size: 14.5px; }
.pyq-q__opts li.is-answer { font-weight: 600; color: var(--good); }
.pyq-q__ans { margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.pyq-q__year { color: var(--muted); }
.pyq-q__sol { margin-top: 8px; font-size: 14.5px; color: var(--ink-2); background: var(--sunk);
  border-radius: 10px; padding: 12px 14px; }

.pyq-related { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* Server-rendered PYQ index and the crawlable footer topic list */
.pyq-group { margin-bottom: 26px; }
.pyq-group h2 { font-size: 20px; }
.pyq-index { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.pyq-index li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14.5px; }
.foot-topics { margin-top: 10px; font-size: 14px; }
.foot-topics summary { cursor: pointer; color: #b9c2dc; }  /* on the dark footer, not a page: --muted gives 2.9:1 here */
.foot-az { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); font-size: 13.5px; }

/* Server-rendered year pages (/pyq/year/2024) and the links that feed them */
.pyq-breakdown { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.pyq-breakdown th, .pyq-breakdown td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.pyq-breakdown th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.pyq-breakdown td:last-child, .pyq-breakdown th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.pyq-prevnext { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14.5px; }
.pyq-year-head { margin: 28px 0 0; font-size: 18px; }
.pyq-year-strip { display: grid; gap: 8px; margin-top: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.pyq-year-strip a { background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; font-size: 14.5px; display: flex; justify-content: space-between; gap: 10px; }
.foot-years { margin-top: 10px; font-size: 13.5px; color: #b9c2dc; line-height: 1.9; }  /* same: dark background */
.foot-years b { color: #9aa5c7; font-weight: 600; }  /* the label, dimmer than the links but still 4.5:1 on --ink */

/* Pagination on the big topic pages */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.pager__nums { display: flex; flex-wrap: wrap; gap: 4px; }
.pager a, .pager .is-here { display: grid; place-items: center; min-width: 36px; min-height: 36px;
  padding: 0 10px; border-radius: 9px; border: 1px solid var(--line); font-size: 14px; }
.pager a { background: var(--surface); color: var(--ink-2); }
.pager a:hover { border-color: var(--primary); color: var(--primary); }
.pager .is-here { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.pager__step { font-weight: 600; }

/* Field-level validation messages on the sign-up and log-in forms */
.field-error:empty { display: none; }
.field-error { display: block; margin-top: 5px; font-size: 13px; color: var(--bad); }
input.is-invalid, select.is-invalid { border-color: var(--bad); }
input.is-invalid:focus { outline-color: var(--bad); }

/* ---------- All India mock series: the hub and each month's paper ----------
   The hub lists all six mocks; a child page is published about five weeks before its
   mock runs, and becomes that mock's result archive afterwards. */
.mock-hero { padding: 48px 0 32px; }
.mock-hero h1 { margin-top: 10px; max-width: 22ch; }
.mock-hero .lead { font-size: 18px; color: var(--ink-2); max-width: 60ch; margin-top: 16px; }
.mock-hero .cta { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }
.mock-hero .reassure { margin-top: 14px; font-size: 13.5px; color: var(--muted); }

/* The next mock, called out above the schedule. */
.mock-next { border-color: var(--line-2); box-shadow: 0 10px 30px rgba(17, 28, 58, .08); }
.mock-next__top { align-items: flex-start; gap: 24px; }
.mock-count { flex: none; text-align: center; min-width: 108px; padding: 12px 16px;
  background: var(--primary-soft); border-radius: 14px; }
.mock-count b { display: block; font-family: var(--font-display); font-size: 38px; line-height: 1;
  color: var(--primary); }
.mock-count span { display: block; margin-top: 4px; font-size: 12px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }

/* The schedule and the paper plan share one table look. */
.mock-table th[scope="row"] { background: none; text-transform: none; letter-spacing: 0;
  font-size: 14px; color: var(--ink); white-space: nowrap; }
.mock-table tr.is-next td, .mock-table tr.is-next th[scope="row"] { background: var(--marigold-soft); }
.mock-table tr.is-total td, .mock-table tr.is-total th[scope="row"] { font-weight: 700; background: var(--sunk); }

/* The facts strip on a mock's own page. */
.mock-facts { display: grid; gap: 1px; margin: 0; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.mock-facts > div { background: var(--surface); padding: 16px 18px; }
.mock-facts dt { font-size: 11.5px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); }
.mock-facts dd { margin: 6px 0 0; font-family: var(--font-display); font-size: 19px;
  font-weight: 650; color: var(--ink); }
.mock-facts dd span { display: block; font-family: var(--font-body); font-size: 12.5px;
  font-weight: 400; color: var(--muted); margin-top: 2px; }

/* Topic links, one block per section. */
.mock-sub { margin-top: 28px; font-size: 16px; }
.mock-sub + p { margin-top: 4px; }
.mock-topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mock-topics a { background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none; }
.mock-topics a:hover { border-color: var(--primary); color: var(--primary); }

.mock-why .card h3 { color: var(--ink); }
.mock-note p { margin: 0; color: var(--ink-2); max-width: 68ch; }
.mock-note p + p { margin-top: 12px; }
.mock-steps li { font-size: 15px; }

@media (max-width: 720px) {
  .mock-hero { padding: 32px 0 24px; }
  .mock-next__top { flex-direction: column; }
  .mock-count { align-self: flex-start; min-width: 0; display: flex; align-items: baseline; gap: 8px; }
  .mock-count b { font-size: 26px; }
  .mock-count span { margin-top: 0; }
}

/* ---------- Live classroom: chat, reactions, polls, files, hands (live-room.js) ---------- */
.classroom { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.classroom-side { position: sticky; top: 76px; height: min(720px, calc(100vh - 96px)); }
@media (max-width: 960px) {
  .classroom { grid-template-columns: 1fr; }
  .classroom-side { position: static; height: 560px; }
}
#player-slot { position: relative; }
.player-help { justify-content: space-between; margin-top: 8px; }

.room { display: flex; flex-direction: column; height: 100%; min-height: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.room-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--sunk); }
.room-tabs { display: flex; gap: 2px; }
.room-tabs button { border: 0; background: transparent; font: 600 13px var(--font-body); color: var(--muted); padding: 7px 10px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.room-tabs button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(17, 28, 58, .1); }
.room-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.room-viewers { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.room-viewers .dot-live { background: var(--bad); }
.room-body { flex: 1; min-height: 0; position: relative; }
.room-pane { display: none; position: absolute; inset: 0; overflow-y: auto; padding: 12px; }
.room-pane.on { display: block; }
.room-pane[data-pane="chat"].on { display: flex; flex-direction: column; padding: 0; }
.room-pinned { margin: 10px 10px 0; padding: 8px 10px; background: var(--marigold-soft); color: var(--marigold-ink); border-radius: 9px; font-size: 13.5px; }
.room-msgs { list-style: none; margin: 0; padding: 10px 12px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.room-msg { font-size: 14px; line-height: 1.4; }
.room-msg-top { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.room-msg-top time { color: var(--muted); font-size: 11.5px; }
.room-msg-act { margin-left: auto; display: none; gap: 8px; }
.room-msg:hover .room-msg-act { display: inline-flex; }
.room-msg-text { color: var(--ink); word-wrap: break-word; overflow-wrap: anywhere; margin-top: 2px; }
.room-msg.teacher .room-msg-text { background: var(--primary-soft); border-radius: 9px; padding: 6px 9px; display: inline-block; }
.room-compose { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); }
.room-compose input { flex: 1; min-width: 0; padding: 9px 11px; font-size: 14px; }
.room-react { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 4px 8px 10px; }
.room-react [data-rx] { border: 0; background: transparent; font-size: 20px; padding: 4px 5px; border-radius: 8px; cursor: pointer; transition: transform .1s; }
.room-react [data-rx]:hover { background: var(--sunk); transform: scale(1.15); }
.room-hand { margin-left: auto; border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 6px 12px; font: 600 13px var(--font-body); cursor: pointer; color: var(--ink); }
.room-hand.on { background: var(--marigold-soft); border-color: var(--marigold); color: var(--marigold-ink); }
.room-tools { padding: 4px 12px 10px; }
.room-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.room-switch input { width: auto; }
.room-empty { padding: 8px 2px; }
.room-newpoll { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.room-newpoll summary { cursor: pointer; }
.room-opt { display: flex; align-items: center; gap: 8px; }
.room-opt label { display: inline-flex; }
.room-opt input[type=radio] { width: 18px; height: 18px; }
.room-opt input[type=text] { flex: 1; padding: 8px 10px; font-size: 14px; }
.room-poll h4 { font-size: 16px; line-height: 1.35; }
.room-choice { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; text-align: left; border: 1.5px solid var(--line-2); background: var(--surface); border-radius: 10px; padding: 10px 12px; font: 500 14px var(--font-body); color: var(--ink); cursor: pointer; }
.room-choice:not(:disabled):hover { border-color: var(--primary); }
.room-choice:disabled { cursor: default; }
.room-choice .bar { position: absolute; inset: 0 auto 0 0; background: var(--primary-soft); transition: width .4s; }
.room-choice .lbl, .room-choice .val { position: relative; }
.room-choice .lbl b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--sunk); font-size: 12px; margin-right: 6px; }
.room-choice .val { font-size: 12.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.room-choice.mine { border-color: var(--primary); }
.room-choice.mine .lbl b { background: var(--primary); color: #fff; }
.room-choice.right { border-color: var(--good); }
.room-choice.right .bar { background: var(--good-soft); }
.room-choice.right .val { color: var(--good); }
.room-upload { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.room-files { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.room-files li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.room-files .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.room-file-ico { font: 700 10.5px var(--font-mono); background: var(--bad-soft); color: var(--bad); border-radius: 6px; padding: 5px 6px; }
.rx-float { position: absolute; bottom: 12%; font-size: 30px; pointer-events: none; z-index: 5; animation: rx-rise 3.1s ease-out forwards; }
@keyframes rx-rise { 0% { transform: translateY(0) scale(.7); opacity: 0; } 12% { opacity: 1; transform: translateY(-20px) scale(1.1); } 100% { transform: translateY(-260px) scale(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .rx-float { animation-duration: 1.2s; } }

/* ---------- Live studio (admin/live.html) ---------- */
.studio-body { background: #0f1630; color: #e8ecf8; }
.studio { min-height: 100vh; display: flex; flex-direction: column; }
.studio .muted, .studio .tiny.muted { color: #9aa5c4; }
.studio-msg { max-width: 520px; margin: 80px auto; color: var(--ink); }
.studio-top { display: flex; align-items: center; gap: 14px; padding: 10px 18px; background: #0b1026; border-bottom: 1px solid #222c4d; }
.studio-back { color: #c7cfe6; text-decoration: none; font-size: 20px; padding: 4px 8px; border-radius: 8px; }
.studio-back:hover { background: #1b2447; }
.studio-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.studio-title strong { font-family: var(--font-display); font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.studio-state { font: 700 12.5px var(--font-body); letter-spacing: .04em; padding: 6px 12px; border-radius: 999px; background: #222c4d; color: #c7cfe6; white-space: nowrap; }
.studio-state.live { background: #d92d20; color: #fff; }
.studio-state.wait { background: #8a5a00; color: #fff; }
.studio-state.ready { background: #1f43c4; color: #fff; }
.studio-state.ended { background: #3a4466; color: #fff; }
.studio-viewers { font-size: 14px; white-space: nowrap; }
.studio .btn-danger { background: #d92d20; color: #fff; border-color: #d92d20; }
.studio-grid { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; padding: 16px 18px; min-height: 0; }
.studio-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.studio-stage { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 14px; overflow: hidden; border: 1px solid #222c4d; }
.studio-stage video { width: 100%; height: 100%; object-fit: contain; display: block; }
.studio-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 20px; color: #c7cfe6; }
.studio-ph-icon { font-size: 44px; }
.studio-onair { position: absolute; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 8px; background: #d92d20; color: #fff; font: 700 13px var(--font-body); padding: 6px 12px; border-radius: 8px; letter-spacing: .05em; }
.studio-onair #clock { font-family: var(--font-mono); font-weight: 600; }
.studio-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: #151d3b; border: 1px solid #222c4d; border-radius: 14px; padding: 10px; }
.studio-bar .grow { flex: 1; }
.studio-bar select { width: auto; max-width: 200px; padding: 8px 10px; font-size: 13.5px; background: #0f1630; color: #e8ecf8; border-color: #2d3961; }
.studio-bar .segmented { background: #0f1630; }
.studio-bar .segmented button { color: #c7cfe6; }
.studio-bar .segmented button.on { background: #1f43c4; color: #fff; }
.studio-bar .btn-ghost { color: #e8ecf8; border-color: #2d3961; }
.studio-bar .btn-ghost:hover { background: #1b2447; }
.studio-toggle { border: 1px solid #2d3961; background: #0f1630; color: #e8ecf8; border-radius: 10px; padding: 8px 12px; font: 600 13px var(--font-body); cursor: pointer; }
.studio-toggle.off { background: #5c1a14; border-color: #d92d20; }
#go { font-size: 16px; padding: 12px 22px; }
.studio-note { min-height: 20px; font-size: 14px; color: #c7cfe6; margin: 0; }
.studio-note.bad { color: #ffb4ab; }
.studio-note.good { color: #8fe0b0; }
.studio-help { background: #151d3b; border-color: #222c4d; color: #e8ecf8; }
.studio-help summary { cursor: pointer; }
.studio-help code { background: #0f1630; color: #e8ecf8; }
.studio-side { min-height: 0; height: calc(100vh - 100px); position: sticky; top: 16px; }
.studio-side.room { color: var(--ink); }
@media (max-width: 1000px) {
  .studio-grid { grid-template-columns: 1fr; }
  .studio-side { position: static; height: 600px; }
}
.room { color: var(--ink); }
.studio .room .muted, .studio .room .tiny.muted { color: var(--muted); }
.studio-help .upi-row { background: #0f1630; }
/* The panel element is both the side column and the room: give the column its height explicitly. */
.classroom > .classroom-side { height: min(720px, calc(100vh - 96px)); }
.studio-grid > .studio-side { height: calc(100vh - 100px); }
.room-msg { display: block; }
.room-msg.teacher .room-msg-text { display: block; width: fit-content; max-width: 100%; }
@media (max-width: 960px) {
  /* Phones: video, then the live panel, then notes and doubts. */
  .classroom-main { display: contents; }
  .classroom #player-slot { order: 1; }
  .classroom > .classroom-side { order: 2; height: 70vh; min-height: 420px; }
  .classroom-main > :not(#player-slot) { order: 3; }
}
@media (max-width: 1000px) { .studio-grid > .studio-side { height: 600px; } }
.room-choice .bar { position: absolute; top: 0; bottom: 0; left: 0; height: 100%; border-radius: 0; display: block; padding: 0; margin: 0; z-index: 0; }
.room-choice .lbl, .room-choice .val { z-index: 1; }
.tap-join { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(8, 12, 30, .72); color: #fff; border: 0; cursor: pointer; font: 600 17px var(--font-body); }
.tap-join-btn { width: 76px; height: 76px; border-radius: 50%; background: var(--bad); display: grid; place-items: center; font-size: 30px; padding-left: 5px; box-shadow: 0 0 0 10px rgba(217, 45, 32, .25); }
.tap-join:hover .tap-join-btn { transform: scale(1.06); }
