/* ============================================================
   CS Tutorials — Tuition & Mentoring Programme
   Website stylesheet · "academic imprint" system

   What changed in this revision, and why
   --------------------------------------
   The previous sheet was a competent dark app theme: heavy rounded
   corners, gradient cards, glowing shadows. It read as a software
   product. A tutoring programme needs to read as an established
   academic imprint — something you would trust with an exam.

   So the geometry is now crisp rather than soft (4–8px radii, hairline
   rules, a left accent bar on cards instead of a gradient), the ground
   carries a faint graph-paper rule borrowed from the exam booklets the
   packs are printed as, and headings speak in a serif voice.

   That serif is the *system* serif stack (ui-serif / Georgia), not a
   downloaded font. It costs zero bytes — which matters, because this
   site is read on Zambian mobile data and the whole point of the build
   is that the page never waits for a second request. A webfont would
   have to be self-hosted and would add weight to every first visit;
   the prestige is available for free, so it is taken for free.

   Accessibility notes (unchanged commitments)
   - Body text and every muted tone below meet WCAG AA (4.5:1) against the
     surfaces they are used on; the smallest labels clear 5.5:1.
   - Visible focus rings everywhere (:focus-visible), 48px minimum tap targets,
     reduced-motion respected, and a skip link as the first thing in the DOM.
   - Every class name used by app.js in its generated markup is preserved.
   ============================================================ */

:root{
  /* --- ink ground: deep, flat, and quiet --- */
  --navy-900:#060E1C;
  --navy-850:#0A1426;
  --navy-800:#0D1A30;
  --navy-700:#122342;
  --navy-600:#1A2E52;
  --ink-000:#03070F;

  --line:rgba(255,255,255,.09);
  --line-strong:rgba(255,255,255,.18);
  --line-gold:rgba(233,162,59,.34);

  /* --- one accent, used sparingly --- */
  --orange:#EF8C22;
  --orange-lt:#F7C879;
  --orange-dk:#C96A10;
  --gold:#E9A23B;

  --text:#EEF3FB;          /* 16.2:1 on navy-700 */
  --muted:#B3C1D8;         /* 7.6:1  on navy-700 */
  --dim:#95A7C3;           /* 6.0:1  on navy-700 — the smallest labels */

  --surface:#0E1B31;
  --surface-2:#13233E;
  --card:#101F38;
  --card-solid:#101F38;

  --ok:#5FD99A;
  --bad:#FF8177;

  /* --- crisp geometry --- */
  --r-lg:8px;
  --r-md:6px;
  --r-sm:4px;
  --shadow:0 18px 40px rgba(0,0,0,.42);
  --shadow-sm:0 6px 18px rgba(0,0,0,.30);

  --safe-b:env(safe-area-inset-bottom,0px);

  /* UI text: system sans (free, ubiquitous, hinted for small sizes) */
  --font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  /* Display text: system serif (free, and it carries the academic voice) */
  --display:ui-serif,Georgia,"Times New Roman",Times,serif;
  --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;

  --maxw:1120px;

  /* --- per-subject accents: makes the catalogue legible at a glance --- */
  --sub-micro:#47B8A6;
  --sub-macro:#5AA9E6;
  --sub-chem:#E9A23B;
  --sub-maths:#8E8CF0;
  --sub-phys:#D97BC0;
  --sub-more:#95A7C3;
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{
  margin:0;
  /* iOS: 100vh includes the browser toolbars, which pushes the fixed menu out of
     view. These three lines let the real visible height win where it is known. */
  min-height:100vh;
  min-height:-webkit-fill-available;
  min-height:100dvh;
  background:var(--navy-900);
  color:var(--text);
  font-family:var(--font);
  font-size:16px;
  line-height:1.62;
  -webkit-font-smoothing:antialiased;
  -webkit-tap-highlight-color:transparent;
}

/* The graph-paper ground. 1px rules every 30px at very low contrast: enough to
   register as "ruled paper" under the content, never enough to fight the text.
   Painted on a fixed pseudo-element so it costs one composited layer and does
   not repaint as the page scrolls. */
body::before{
  content:"";position:fixed;inset:0;z-index:-2;pointer-events:none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.032) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.032) 1px, transparent 1px);
  background-size:30px 30px, 30px 30px;
  background-position:center top;
}
/* Two soft glows, warm top-right and cool left, to stop the flat ink reading
   as a dead black. Fixed, so they behave like light in the room. */
body::after{
  content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:
    radial-gradient(1100px 560px at 82% -12%, rgba(233,162,59,.10), transparent 62%),
    radial-gradient(900px 520px at 4% 8%, rgba(60,74,140,.22), transparent 60%);
}

button,a,.btn,.tab,.opt,.chip,.filter,.icon-btn,.quick__item,.video__poster,.idea-topic{
  touch-action:manipulation;
}
img{max-width:100%;display:block}
button,input,select,textarea{font:inherit;color:inherit}
a{color:inherit}
h1,h2,h3,h4{margin:0;line-height:1.22;letter-spacing:-.012em}
p{margin:0}

/* ---------- accessibility helpers ---------- */
.sr-only{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0 0 0 0);white-space:nowrap;border:0;
}
.skip-link{
  position:absolute;left:12px;top:-60px;z-index:100;
  background:var(--gold);color:#101C2E;font-weight:700;
  padding:11px 16px;border-radius:0 0 var(--r-md) var(--r-md);text-decoration:none;
  transition:top .18s;
}
.skip-link:focus{top:0}
:focus-visible{
  outline:3px solid var(--orange-lt);
  outline-offset:2px;
  border-radius:var(--r-sm);
}

/* ---------- shell ---------- */
.app{
  max-width:660px;margin:0 auto;
  min-height:100vh;
  min-height:-webkit-fill-available;
  min-height:100dvh;
  display:flex;flex-direction:column;
}
.appbar{
  position:sticky;top:0;z-index:40;
  display:flex;align-items:center;gap:12px;
  padding:calc(11px + env(safe-area-inset-top,0px)) 16px 11px;
  background:rgba(6,14,28,.92);
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line);
}
/* A hairline of gold under the masthead — the imprint's signature rule. */
.appbar::after{
  content:"";position:absolute;left:0;right:0;bottom:-1px;height:1px;
  background:linear-gradient(90deg,transparent,var(--line-gold) 18%,var(--line-gold) 82%,transparent);
}
.appbar__brand{display:flex;align-items:center;gap:11px;text-decoration:none;flex:1;min-width:0}
.appbar__logo{width:42px;height:42px;flex:0 0 42px;object-fit:contain;border-radius:var(--r-md);background:#fff;padding:3px}
.appbar__text{display:flex;flex-direction:column;min-width:0}
.appbar__text strong{
  font-family:var(--display);font-size:19px;font-weight:700;letter-spacing:-.01em;line-height:1.15;
}
.appbar__text span{font-size:10px;letter-spacing:.17em;text-transform:uppercase;color:var(--gold);font-weight:700;margin-top:2px}
.appbar__actions{display:flex;gap:9px;flex:0 0 auto}
.icon-btn{
  width:44px;height:44px;display:grid;place-items:center;
  border-radius:var(--r-md);border:1px solid var(--line-strong);
  background:rgba(255,255,255,.05);cursor:pointer;
  transition:background .16s,border-color .16s;
}
.icon-btn svg{width:21px;height:21px;fill:var(--text)}
.icon-btn--wa{background:#1FA855;border-color:transparent}
.icon-btn--wa svg{fill:#04200F}
.icon-btn:hover{background:rgba(255,255,255,.12);border-color:var(--line-gold)}

.view{
  flex:1;padding:20px 16px calc(96px + var(--safe-b));
  outline:none;animation:rise .28s ease;
}
@keyframes rise{from{transform:translateY(8px)}to{transform:none}}

/* ---------- bottom nav (mobile) ---------- */
.tabbar{
  position:fixed;bottom:0;left:0;right:0;z-index:45;
  display:flex;max-width:660px;margin:0 auto;
  padding:7px 8px calc(7px + var(--safe-b));
  background:rgba(6,14,28,.96);
  backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
  border-top:1px solid var(--line);
}
.tab{
  flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;gap:3px;
  padding:7px 2px 5px;min-height:52px;border-radius:var(--r-md);
  color:var(--dim);font-size:11px;font-weight:700;text-decoration:none;
  transition:color .18s,background .18s;
}
.tab svg{width:22px;height:22px;fill:currentColor;flex:0 0 auto}
.tab span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.tab[aria-current="page"]{color:var(--orange-lt);background:rgba(233,162,59,.13)}
.tab:active{transform:scale(.97)}

/* ---------- typography ---------- */
.eyebrow{
  font-size:10.5px;font-weight:800;letter-spacing:.19em;text-transform:uppercase;
  color:var(--gold);margin-bottom:9px;
}
.h1{font-family:var(--display);font-size:28px;font-weight:700;letter-spacing:-.015em;line-height:1.18}
.h2{font-family:var(--display);font-size:21px;font-weight:700;letter-spacing:-.01em}
.lead{color:var(--muted);font-size:15.5px;margin-top:10px}
.section{margin-top:34px}

/* Numbered index headings. The catalogue reads as numbered sections —
   "01 · How it works" — which is what makes a long page feel organised
   rather than merely long. ::before carries the number for section__head. */
.section__head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:14px;flex-wrap:wrap;position:relative;padding-bottom:11px}
.section__head::after{content:"";position:absolute;left:0;right:0;bottom:0;height:1px;background:var(--line)}
.section__head h2{font-family:var(--display);font-size:21px;font-weight:700}
.section__head p{margin:0;font-size:12.5px;color:var(--dim);letter-spacing:.02em}
.hr{height:1px;background:var(--line);margin:28px 0}

/* A rule with a gold tick: used to open major blocks. */
.rule{position:relative;height:1px;background:var(--line);margin:30px 0}
.rule::before{content:"";position:absolute;left:0;top:-1px;width:44px;height:3px;background:var(--gold)}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:9px;
  padding:13px 18px;border-radius:var(--r-md);border:1px solid transparent;
  font-weight:700;font-size:15px;text-decoration:none;cursor:pointer;
  min-height:50px;transition:transform .16s,box-shadow .16s,background .16s,border-color .16s;
}
.btn svg{width:19px;height:19px;fill:currentColor;flex:0 0 auto}
/* Solid, not gradient — restrained colour reads as confidence. */
.btn--primary{background:var(--orange);color:#12192B;border-color:rgba(255,255,255,.14)}
.btn--primary:hover{background:#F59A35;box-shadow:0 10px 24px rgba(239,140,34,.28)}
.btn--ghost{background:rgba(255,255,255,.04);border-color:var(--line-strong);color:var(--text)}
.btn--ghost:hover{background:rgba(255,255,255,.10);border-color:var(--line-gold)}
.btn--wa{background:#1FA855;color:#04200F;border-color:rgba(255,255,255,.14)}
.btn--wa:hover{background:#25BC61;box-shadow:0 10px 24px rgba(31,168,85,.26)}
.btn--block{display:flex;width:100%}
.btn:active{transform:translateY(1px) scale(.99)}
.btn-row{display:flex;gap:10px;margin-top:18px;flex-wrap:wrap}
.btn-row .btn{flex:1 1 150px}
.stack{display:grid;gap:10px}

/* ---------- hero ---------- */
.hero{
  position:relative;overflow:hidden;
  border-radius:var(--r-lg);padding:30px 20px 26px;text-align:center;
  background:var(--surface);
  border:1px solid var(--line);
  box-shadow:var(--shadow);
}
/* corner rule + soft warm wash: a printed cover, not a glowing button */
.hero::before{
  content:"";position:absolute;left:0;right:0;top:0;height:3px;
  background:linear-gradient(90deg,var(--gold),rgba(233,162,59,.15));
}
.hero__logo{
  width:112px;height:auto;margin:0 auto 18px;border-radius:var(--r-md);
  background:#fff;padding:9px;box-shadow:var(--shadow-sm);
}
.hero h1{
  font-family:var(--display);font-size:34px;font-weight:700;letter-spacing:-.02em;line-height:1.12;
}
.hero__tag{margin:11px 0 0;font-size:10.5px;font-weight:800;letter-spacing:.2em;text-transform:uppercase;color:var(--gold)}
.hero__rule{width:64px;height:2px;border-radius:0;margin:17px auto;background:var(--gold)}
.hero__motto{font-family:var(--display);font-size:17px;font-weight:700;color:#DCE6F6}
.hero__sub{margin-top:11px;font-size:14.5px;color:var(--muted)}

/* credentials band — the "established institution" line */
.cred{
  display:flex;flex-wrap:wrap;justify-content:center;gap:6px 16px;
  margin-top:20px;padding-top:16px;border-top:1px solid var(--line);
  font-size:12.5px;color:var(--dim);
}
.cred span{display:inline-flex;align-items:center;gap:7px}
.cred b{color:var(--muted);font-weight:700}

/* quick actions under the hero */
.quick{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}
.quick__item{
  display:flex;align-items:center;gap:10px;padding:13px;border-radius:var(--r-md);
  background:rgba(255,255,255,.035);border:1px solid var(--line);text-decoration:none;
  font-weight:700;font-size:14px;min-height:52px;
  transition:background .16s,border-color .16s;
}
.quick__item svg{width:19px;height:19px;fill:var(--gold);flex:0 0 auto}
.quick__item:hover{background:rgba(255,255,255,.08);border-color:var(--line-gold)}

/* ---------- cards / grid ---------- */
.grid{display:grid;gap:12px}
.grid--2{grid-template-columns:1fr 1fr}
.grid--3{grid-template-columns:1fr}
@media (max-width:400px){.grid--2{grid-template-columns:1fr}}

/* Cards are flat ink with a hairline frame and a 3px accent bar on the left.
   That bar is the organising device: it marks the start of each block the way
   a printed margin rule does. */
.card{
  position:relative;background:var(--card);border:1px solid var(--line);
  border-radius:var(--r-md);padding:17px 17px 17px 20px;
}
.card::before{content:"";position:absolute;left:0;top:14px;bottom:14px;width:3px;background:var(--gold);border-radius:0 2px 2px 0}
.card h3{font-family:var(--display);font-size:16px;margin-bottom:6px}
.card p{margin:0;font-size:13.5px;color:var(--muted)}
.card__badge{display:inline-block;font-size:10px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:var(--gold);margin-bottom:8px}

.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{
  padding:9px 15px;border-radius:var(--r-sm);font-size:13.5px;font-weight:600;
  background:rgba(233,162,59,.10);border:1px solid var(--line-gold);color:#F4D9AE;text-decoration:none;
  transition:background .16s,border-color .16s;
}
.chip:hover{background:rgba(233,162,59,.18)}
.chip--muted{background:rgba(255,255,255,.05);border-color:var(--line-strong);color:var(--muted)}

.value{
  position:relative;display:flex;gap:13px;align-items:flex-start;padding:16px;
  border-radius:var(--r-md);background:var(--card);border:1px solid var(--line);
}
.value__ico{
  width:40px;height:40px;flex:0 0 40px;border-radius:var(--r-sm);display:grid;place-items:center;
  background:rgba(233,162,59,.12);border:1px solid var(--line-gold);
}
.value__ico svg{width:20px;height:20px;fill:var(--gold)}
.value strong{display:block;font-size:14.5px;margin-bottom:4px;font-weight:700}
.value span{font-size:13.5px;color:var(--muted)}

/* "how it works" steps */
.steps{list-style:none;margin:0;padding:0;display:grid;gap:11px;counter-reset:s}
.steps li{
  display:flex;gap:14px;align-items:flex-start;padding:16px;
  border-radius:var(--r-md);background:var(--card);border:1px solid var(--line);
}
.steps__n{
  width:30px;height:30px;flex:0 0 30px;border-radius:var(--r-sm);display:grid;place-items:center;
  font-family:var(--display);font-size:15px;font-weight:700;
  background:var(--gold);color:#12192B;
}
.steps strong{display:block;font-size:15px;margin-bottom:4px;font-weight:700}
.steps span{font-size:13.5px;color:var(--muted)}

/* proof — a results plaque, framed like a citation */
.proof{
  position:relative;text-align:center;padding:30px 20px;border-radius:var(--r-lg);
  background:var(--surface);border:1px solid var(--line-gold);
}
.proof::before,.proof::after{content:"";position:absolute;left:18px;right:18px;height:1px;background:var(--line-gold)}
.proof::before{top:9px}
.proof::after{bottom:9px}
.proof__num{
  font-family:var(--display);font-size:56px;font-weight:700;letter-spacing:-.02em;line-height:1;color:var(--gold);
}
.proof p{margin:12px 0 0;font-size:14px;color:var(--muted)}
.proof__pill{
  display:inline-block;margin-top:16px;padding:8px 16px;border-radius:var(--r-sm);
  font-size:12.5px;font-weight:700;letter-spacing:.04em;color:#F4D9AE;
  background:rgba(233,162,59,.12);border:1px solid var(--line-gold);
}

/* ---------- sample question on the home page ---------- */
.sample{padding:19px;border-radius:var(--r-lg);background:var(--card);border:1px solid var(--line)}
.sample__topic{font-size:10px;font-weight:800;letter-spacing:.15em;text-transform:uppercase;color:var(--gold);margin-bottom:10px}
.sample__q{font-family:var(--display);font-size:18px;font-weight:700;line-height:1.42}
.sample .opts{margin-top:16px}
.sample__note{margin-top:15px;font-size:13px;color:var(--dim)}

/* ---------- FAQ ---------- */
.faq{display:grid;gap:9px}
.faq details{background:var(--card);border:1px solid var(--line);border-radius:var(--r-md);overflow:hidden}
.faq details[open]{border-color:var(--line-gold)}
.faq summary{
  cursor:pointer;padding:16px 46px 16px 17px;font-weight:700;font-size:15px;
  position:relative;list-style:none;min-height:54px;display:flex;align-items:center;
  transition:background .16s;
}
.faq summary::-webkit-details-marker{display:none}
/* a plus/minus in gold rather than a chevron: quieter, and it does not
   imply navigation the way an arrow does. */
.faq summary::after{
  content:"";position:absolute;right:19px;top:50%;width:12px;height:12px;
  transform:translateY(-50%);
  background:
    linear-gradient(var(--gold),var(--gold)) center/12px 2px no-repeat,
    linear-gradient(var(--gold),var(--gold)) center/2px 12px no-repeat;
  transition:transform .2s;
}
.faq details[open] summary::after{transform:translateY(-50%) scale(.86) rotate(90deg)}
.faq summary:hover{background:rgba(255,255,255,.035)}
.faq__a{padding:0 17px 17px;font-size:14.5px;color:var(--muted)}

/* ---------- contact ---------- */
.contact-strip{
  display:flex;align-items:center;gap:13px;padding:16px;border-radius:var(--r-md);
  background:var(--surface-2);border:1px solid var(--line-gold);
}
.contact-strip img{width:46px;height:46px;object-fit:contain;border-radius:var(--r-sm);background:#fff;padding:4px;flex:0 0 46px}
.contact-strip strong{display:block;font-size:15px}
.contact-strip a{font-size:15px;color:var(--orange-lt);font-weight:700;text-decoration:none}
.contact-card{
  display:flex;align-items:center;gap:13px;padding:15px;border-radius:var(--r-md);
  background:var(--card);border:1px solid var(--line);margin-bottom:11px;text-decoration:none;
  transition:background .16s,border-color .16s;
}
.contact-card__ico{
  width:44px;height:44px;flex:0 0 44px;border-radius:var(--r-sm);display:grid;place-items:center;
  background:rgba(233,162,59,.12);border:1px solid var(--line-gold);
}
.contact-card__ico svg{width:21px;height:21px;fill:var(--gold)}
.contact-card strong{display:block;font-size:15.5px}
.contact-card span{font-size:13px;color:var(--muted)}
.contact-card:hover{background:rgba(255,255,255,.055);border-color:var(--line-gold)}

/* ---------- in-app browser notice ---------- */
.notice{
  margin:0 16px;padding:13px 15px;border-radius:var(--r-md);
  background:rgba(233,162,59,.12);border:1px solid var(--line-gold);
  font-size:13.5px;color:#F4D9AE;display:flex;gap:10px;align-items:flex-start;line-height:1.5;
}
.notice[hidden]{display:none}
.notice strong{color:#FFE7C4}
.notice__ico{width:18px;height:18px;flex:0 0 18px;fill:var(--gold);margin-top:2px}

/* ---------- suggestion box ---------- */
.idea-topics{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:6px}
.idea-topic{
  padding:10px 15px;border-radius:var(--r-sm);font-size:13.5px;font-weight:600;cursor:pointer;
  background:rgba(255,255,255,.05);border:1px solid var(--line);color:var(--muted);min-height:44px;
  transition:background .16s,border-color .16s;
}
.idea-topic:hover{background:rgba(255,255,255,.10)}
.idea-topic[aria-pressed="true"]{background:rgba(233,162,59,.16);border-color:var(--gold);color:#FFE0B4}
.ideasends{display:grid;gap:9px;margin-top:4px}
.sendrow{display:flex;gap:9px;flex-wrap:wrap}
.sendrow .btn{flex:1 1 150px;min-height:48px;font-size:14px}
.thanks{
  padding:16px;border-radius:var(--r-md);
  background:rgba(95,217,154,.11);border:1px solid rgba(95,217,154,.42);
  font-size:14.5px;color:#D7F5E5;
}
.thanks strong{display:block;margin-bottom:6px;color:#EAFBF3;font-size:15.5px}
.thanks a{color:#8DF0BC}
.savednote{font-size:12.5px;color:var(--dim);margin-top:9px}

@media (max-width:400px){
  .tab{font-size:10.5px}
  .tab svg{width:20px;height:20px}
}

/* ---------- videos ---------- */
.videos{display:grid;gap:14px}
.video{background:var(--card);border:1px solid var(--line);border-radius:var(--r-md);overflow:hidden}
.video__box{position:relative;aspect-ratio:16/9;background:var(--surface-2)}
.video__box>video,.video__box>iframe{width:100%;height:100%;border:0;display:block;background:#000}
.video__poster{
  position:absolute;inset:0;width:100%;height:100%;border:0;padding:0;cursor:pointer;
  background-size:cover;background-position:center;display:grid;place-items:center;
  background-image:radial-gradient(420px 220px at 30% 20%, rgba(233,162,59,.22), transparent 65%),
                   linear-gradient(150deg,#182B4A,#0C1830);
}
.video__poster:hover{filter:brightness(1.08)}
.video__play{
  width:64px;height:64px;border-radius:50%;display:grid;place-items:center;
  background:var(--gold);box-shadow:0 10px 26px rgba(0,0,0,.45);
}
.video__play svg{width:26px;height:26px;fill:#12192B;margin-left:3px}
.video__len{
  position:absolute;right:10px;bottom:10px;background:rgba(3,7,15,.84);
  color:#EEF3FB;font-size:12px;font-weight:700;padding:4px 8px;border-radius:var(--r-sm);
}
.video__body{padding:15px}
.video__body h3{font-family:var(--display);font-size:16px;margin-bottom:5px}
.video__body p{margin:0;font-size:13.5px;color:var(--muted)}
.video__meta{display:flex;gap:7px;flex-wrap:wrap;margin-top:11px}

/* ---------- subjects ---------- */
/* Each card carries its subject's accent as the left rule, so the list is
   scannable by colour before you read a word of it. */
.subject{
  position:relative;padding:18px 17px 17px 21px;border-radius:var(--r-md);
  background:var(--card);border:1px solid var(--line);display:flex;flex-direction:column;gap:10px;
}
.subject::before{
  content:"";position:absolute;left:0;top:16px;bottom:16px;width:4px;border-radius:0 2px 2px 0;
  background:var(--sub,var(--gold));
}
.subject--micro{--sub:var(--sub-micro)}
.subject--macro{--sub:var(--sub-macro)}
.subject--chem{--sub:var(--sub-chem)}
.subject--maths{--sub:var(--sub-maths)}
.subject--physics{--sub:var(--sub-phys)}
.subject--more{--sub:var(--sub-more)}
.subject__top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.subject__ico{
  width:42px;height:42px;border-radius:var(--r-sm);display:grid;place-items:center;
  font-family:var(--display);font-size:19px;font-weight:700;color:#12192B;
  background:var(--sub,var(--gold));flex:0 0 42px;
}
.subject__meta{font-size:10.5px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--dim);text-align:right}
.subject p{font-size:13.5px;color:var(--muted)}
.subject__codes{display:flex;flex-wrap:wrap;gap:6px}
.code{
  font-family:var(--mono);font-size:11.5px;font-weight:600;padding:4px 9px;border-radius:var(--r-sm);
  background:rgba(255,255,255,.06);border:1px solid var(--line);color:#CFDBEE;letter-spacing:.03em;
}
.subject__topics{margin:2px 0 0;padding-left:18px;font-size:13.5px;color:var(--muted);display:grid;gap:4px}
.subject__topics li::marker{color:var(--sub,var(--gold))}

/* ---------- materials ---------- */
.filters{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.filters::-webkit-scrollbar{display:none}
.filter{
  flex:0 0 auto;padding:10px 15px;border-radius:var(--r-sm);font-size:13.5px;font-weight:600;cursor:pointer;
  background:rgba(255,255,255,.05);border:1px solid var(--line);color:var(--muted);min-height:44px;
  transition:background .16s,color .16s;
}
.filter[aria-pressed="true"]{background:var(--gold);color:#12192B;border-color:transparent}
.search{position:relative;margin:14px 0 4px}
.search input{
  width:100%;padding:14px 44px 14px 15px;border-radius:var(--r-md);
  background:rgba(255,255,255,.05);border:1px solid var(--line-strong);color:var(--text);font-size:15.5px;
}
.search input:focus{border-color:var(--gold);box-shadow:0 0 0 3px rgba(233,162,59,.16);outline:none}
.search svg{position:absolute;right:14px;top:50%;transform:translateY(-50%);width:19px;height:19px;fill:var(--dim);pointer-events:none}

/* The pack card is the product. It gets more structure than anything else:
   a spine (the doc icon), a title block, a facts row, then two actions. */
.mat{
  position:relative;padding:17px;border-radius:var(--r-md);
  background:var(--card);border:1px solid var(--line);margin-bottom:11px;
  transition:border-color .16s;
}
.mat:hover{border-color:var(--line-gold)}
.mat__top{display:flex;gap:14px;align-items:flex-start}
.mat__ico{
  width:44px;height:54px;flex:0 0 44px;border-radius:var(--r-sm);
  background:var(--surface-2);border:1px solid var(--line-strong);display:grid;place-items:center;
}
.mat__ico svg{width:21px;height:21px;fill:var(--gold)}
.mat h3{font-family:var(--display);font-size:16px;margin-bottom:6px}
.mat p{margin:0;font-size:13.5px;color:var(--muted)}
.mat__tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
.tag{
  font-size:10.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
  padding:4px 9px;border-radius:var(--r-sm);
  background:rgba(233,162,59,.10);color:#F0C88A;border:1px solid var(--line-gold);
}
.mat__actions{display:flex;gap:9px;margin-top:14px}
.mat__actions .btn{flex:1;padding:12px;min-height:46px;font-size:14px}
.noresults{padding:24px;border-radius:var(--r-md);background:var(--card);border:1px dashed var(--line-strong);text-align:center;color:var(--muted)}

/* formula sheet */
.formula{padding:16px;border-radius:var(--r-md);background:rgba(255,255,255,.035);border:1px solid var(--line);margin-bottom:10px}
.formula h3{font-size:12px;color:var(--gold);margin-bottom:10px;text-transform:uppercase;letter-spacing:.1em;font-weight:800}
.formula dl{margin:0;display:grid;gap:10px}
.formula dt{font-family:var(--mono);font-size:14px;color:#FFF3DF}
.formula dd{margin:2px 0 0;font-size:13.5px;color:var(--muted)}

/* ---------- practice ---------- */
.quiz-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;flex-wrap:wrap}
.badge{font-size:12.5px;font-weight:700;color:var(--muted)}
.bar{height:6px;border-radius:0;background:rgba(255,255,255,.09);overflow:hidden;margin-bottom:18px}
.bar i{display:block;height:100%;background:var(--gold);transition:width .35s ease}
.qcard{padding:20px;border-radius:var(--r-lg);background:var(--card);border:1px solid var(--line)}
.qcard__topic{font-size:10px;font-weight:800;letter-spacing:.15em;text-transform:uppercase;color:var(--gold);margin-bottom:11px}
.qcard__q{font-family:var(--display);font-size:19px;font-weight:700;line-height:1.4}
.opts{display:grid;gap:9px;margin-top:16px}
.opt{
  display:flex;gap:12px;align-items:flex-start;text-align:left;width:100%;
  padding:14px;border-radius:var(--r-md);cursor:pointer;
  background:rgba(255,255,255,.045);border:1px solid var(--line-strong);
  font-size:14.5px;line-height:1.45;min-height:52px;
  transition:background .16s,border-color .16s;
}
.opt:hover{background:rgba(255,255,255,.09)}
.opt__key{
  width:26px;height:26px;flex:0 0 26px;border-radius:var(--r-sm);display:grid;place-items:center;
  font-size:12.5px;font-weight:800;background:rgba(255,255,255,.12);color:#CFDBEE;
}
.opt[aria-pressed="true"].is-correct,.opt.is-correct{background:rgba(95,217,154,.14);border-color:rgba(95,217,154,.6)}
.opt.is-correct .opt__key{background:var(--ok);color:#052A16}
.opt.is-wrong{background:rgba(255,129,119,.13);border-color:rgba(255,129,119,.55)}
.opt.is-wrong .opt__key{background:var(--bad);color:#2C0A06}
.opt[disabled]{cursor:default;opacity:1}
.explain{
  margin-top:15px;padding:15px;border-radius:var(--r-md);
  background:rgba(233,162,59,.09);border:1px solid var(--line-gold);
  font-size:14px;color:#F2DFC4;
}
.explain strong{color:var(--orange-lt)}
.quiz-actions{display:flex;gap:10px;margin-top:16px;flex-wrap:wrap}
.quiz-actions .btn{flex:1 1 160px}
.result{text-align:center;padding:30px 18px;border-radius:var(--r-lg);background:var(--surface);border:1px solid var(--line)}
.result__score{font-family:var(--display);font-size:62px;font-weight:700;letter-spacing:-.02em;line-height:1}
.result__score.ok{color:var(--ok)}
.result__score.mid{color:var(--gold)}
.result__score.low{color:var(--bad)}
.result h3{margin-top:12px;font-family:var(--display);font-size:21px}
.result p{color:var(--muted);font-size:14px;margin:8px 0 0}
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:18px}
.stat{padding:14px 8px;border-radius:var(--r-md);background:rgba(255,255,255,.045);border:1px solid var(--line);text-align:center}
.stat b{display:block;font-family:var(--display);font-size:22px;font-weight:700}
.stat span{font-size:10.5px;color:var(--dim);text-transform:uppercase;letter-spacing:.08em}

/* ---------- forms ---------- */
.field{margin-bottom:15px}
.field label{display:block;font-size:13.5px;font-weight:700;color:#C9D8EE;margin-bottom:6px}
.field .opt-hint{font-weight:500;color:var(--dim);font-size:12.5px}
.field input,.field select,.field textarea{
  width:100%;padding:14px;border-radius:var(--r-md);
  background:rgba(255,255,255,.05);border:1px solid var(--line-strong);color:var(--text);font-size:16px;
}
.field textarea{min-height:96px;resize:vertical}
.field input:focus,.field select:focus,.field textarea:focus{
  outline:none;border-color:var(--gold);background:rgba(255,255,255,.09);box-shadow:0 0 0 3px rgba(233,162,59,.16);
}
.field select{appearance:none;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23B3C1D8'><path d='M7 10l5 5 5-5z'/></svg>");background-repeat:no-repeat;background-position:right 11px center;background-size:20px}
.field option{background:#0F1E37;color:#EEF3FB}
.field--error input,.field--error select,.field--error textarea{border-color:var(--bad)}
.err{display:block;margin-top:6px;font-size:13px;color:var(--bad);font-weight:600}
.note{font-size:13px;color:var(--dim);margin-top:10px}
.preview{margin-top:14px;padding:14px;border-radius:var(--r-md);background:rgba(255,255,255,.035);border:1px dashed var(--line-strong)}
.preview h3{font-size:12px;text-transform:uppercase;letter-spacing:.1em;color:var(--gold);margin-bottom:8px;font-weight:800}
.preview pre{margin:0;font-family:var(--font);font-size:13.5px;color:var(--muted);white-space:pre-wrap}

/* ---------- sheet + toast ---------- */
.sheet{position:fixed;inset:0;z-index:80;display:flex;align-items:flex-end;justify-content:center}
.sheet[hidden]{display:none}
.sheet__scrim{position:absolute;inset:0;background:rgba(3,7,15,.74);backdrop-filter:blur(3px)}
.sheet__panel{
  position:relative;width:100%;max-width:660px;
  max-height:88vh;max-height:88dvh;          /* iOS toolbars again */
  overflow:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;
  background:#0F1E37;
  border:1px solid var(--line);border-bottom:0;border-radius:var(--r-lg) var(--r-lg) 0 0;
  padding:20px 16px calc(22px + var(--safe-b));animation:up .24s ease;
}
@keyframes up{from{transform:translateY(22px);opacity:.45}to{transform:none;opacity:1}}
.sheet__head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;padding-bottom:12px;border-bottom:1px solid var(--line)}
.sheet__head h2{font-family:var(--display);font-size:19px}
.sheet__close{background:rgba(255,255,255,.07);border:1px solid var(--line);width:40px;height:40px;border-radius:var(--r-md);font-size:24px;line-height:1;cursor:pointer;color:var(--muted)}
.sheet__close:hover{background:rgba(255,255,255,.14)}
.sheet__body{font-size:14.5px;color:var(--text)}
.sheet__body p{margin:0 0 8px}
.sheet__body ol,.sheet__body ul{margin:8px 0 14px;padding-left:20px;display:grid;gap:8px;font-size:14px;color:var(--muted)}
.sheet__body li strong{color:var(--text)}
.sheet__body .kbd{display:inline-block;padding:1px 7px;border-radius:var(--r-sm);background:rgba(255,255,255,.1);border:1px solid var(--line-strong);color:var(--text);font-size:13px}
.toast{
  position:fixed;left:50%;bottom:calc(92px + var(--safe-b));transform:translate(-50%,18px);
  background:#16294A;border:1px solid var(--line-gold);color:var(--text);
  padding:12px 18px;border-radius:var(--r-md);font-size:14px;font-weight:600;
  box-shadow:var(--shadow);opacity:0;pointer-events:none;transition:.25s;z-index:90;
  max-width:min(88vw,480px);text-align:center;
}
.toast.is-on{opacity:1;transform:translate(-50%,0)}

/* ---------- footer ---------- */
.sitefooter{margin-top:38px;border-top:1px solid var(--line-gold);padding:28px 16px 42px;background:rgba(4,10,20,.7)}
.sitefooter__grid{display:grid;gap:24px;max-width:660px;margin:0 auto}
.sitefooter__h{font-size:11px;text-transform:uppercase;letter-spacing:.15em;color:var(--gold);margin-bottom:10px;font-weight:800}
.sitefooter__p{font-size:13.5px;color:var(--muted)}
.sitefooter__list{list-style:none;margin:0;padding:0;display:grid;gap:8px;font-size:13.5px;color:var(--muted)}
.sitefooter__list a{color:var(--muted);text-decoration:none;border-bottom:1px solid transparent}
.sitefooter__list a:hover{color:var(--orange-lt);border-bottom-color:rgba(233,162,59,.5)}
.sitefooter__small{margin:26px auto 0;max-width:660px;font-size:12.5px;color:var(--dim);text-align:center;line-height:1.9}
.sitefooter__small a{color:var(--dim)}
.sitefooter__small a:hover{color:var(--orange-lt)}

/* back to top */
.totop{
  position:fixed;right:14px;bottom:calc(84px + var(--safe-b));z-index:44;
  width:46px;height:46px;border-radius:var(--r-md);display:none;place-items:center;cursor:pointer;
  background:rgba(18,35,66,.96);border:1px solid var(--line-strong);color:var(--text);
}
.totop svg{width:20px;height:20px;fill:currentColor}
.totop.is-on{display:grid}

/* ============================================================
   Module landing pages  (generated — see tools/make_module_pages.py)

   These are the pages Google can actually index. The app itself is a
   single file with everything behind `#`, and Google ignores what
   follows a `#`, so a module could never rank on its own. Each module
   now gets a real URL with a real title, its own copy, its own share
   card, and a link into the app.
   ============================================================ */
.modpage{padding:26px 18px 60px;max-width:760px;margin:0 auto}
.modpage__brand{display:flex;align-items:center;gap:12px;text-decoration:none;margin-bottom:26px;padding-bottom:16px;border-bottom:1px solid var(--line-gold)}
.modpage__brand img{width:46px;height:46px;border-radius:var(--r-md);background:#fff;padding:4px}
.modpage__brand strong{font-family:var(--display);font-size:19px;display:block;line-height:1.2}
.modpage__brand span{font-size:10px;letter-spacing:.17em;text-transform:uppercase;color:var(--gold);font-weight:700}
.modpage h1{font-family:var(--display);font-size:32px;line-height:1.15;letter-spacing:-.02em;margin-bottom:14px}
.modpage .lede{font-size:16px;color:var(--muted);margin-bottom:22px}
.modpage h2{font-family:var(--display);font-size:21px;margin:32px 0 12px;padding-bottom:9px;border-bottom:1px solid var(--line)}
.modpage ul.topics{margin:0;padding-left:20px;display:grid;gap:7px;color:var(--muted);font-size:14.5px}
.modpage ul.topics li::marker{color:var(--gold)}
.modpage .codes{display:flex;flex-wrap:wrap;gap:7px;margin:14px 0}
.modpage .cta{
  display:flex;flex-wrap:wrap;gap:10px;margin:26px 0;padding:20px;
  border-radius:var(--r-lg);background:var(--surface);border:1px solid var(--line-gold);
}
.modpage .cta .btn{flex:1 1 170px}
.modpage .packlist{display:grid;gap:10px}
.modpage .pack{
  display:flex;justify-content:space-between;gap:14px;align-items:flex-start;
  padding:16px;border-radius:var(--r-md);background:var(--card);border:1px solid var(--line);
}
.modpage .pack h3{font-family:var(--display);font-size:16px;margin-bottom:5px}
.modpage .pack p{margin:0;font-size:13.5px;color:var(--muted)}
.modpage .qa{border-left:3px solid var(--gold);padding:2px 0 2px 15px;margin:16px 0}
.modpage .qa dt{font-weight:700;font-size:15px;margin-bottom:5px}
.modpage .qa dd{margin:0;font-size:14px;color:var(--muted)}
.modpage__foot{margin-top:44px;padding-top:20px;border-top:1px solid var(--line);font-size:13px;color:var(--dim)}
.modpage__foot a{color:var(--orange-lt)}
.modpage__nav{display:flex;flex-wrap:wrap;gap:8px;margin-top:26px}

/* ---------- desktop: turn the phone layout into a proper website ---------- */
@media (min-width:760px){
  .app{max-width:var(--maxw)}
  .appbar{padding:15px 30px;max-width:var(--maxw);margin:0 auto;width:100%}
  .appbar__logo{width:48px;height:48px;flex-basis:48px}
  .appbar__text strong{font-size:21px}
  /* nav moves to the top and stops being a floating bar */
  .tabbar{
    position:static;max-width:var(--maxw);margin:0 auto;width:100%;
    background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;
    border-top:0;border-bottom:1px solid var(--line);
    padding:8px 30px 14px;justify-content:flex-start;gap:8px;
  }
  .tab{flex:0 0 auto;flex-direction:row;gap:9px;padding:11px 16px;min-height:46px;font-size:14.5px;border-radius:var(--r-md)}
  .tab svg{width:19px;height:19px}
  .view{padding:30px 30px 44px}
  .grid--2{grid-template-columns:1fr 1fr}
  .grid--3{grid-template-columns:repeat(3,1fr)}
  .hero{padding:46px 36px 38px}
  .hero h1{font-size:44px}
  .hero__logo{width:132px}
  .quick{grid-template-columns:repeat(4,1fr)}
  .sitefooter{padding:38px 30px 54px}
  .sitefooter__grid{grid-template-columns:1.3fr 1fr 1fr;max-width:var(--maxw);gap:38px}
  .sitefooter__small{max-width:var(--maxw)}
  .sheet{align-items:center}
  .sheet__panel{border-radius:var(--r-lg);border-bottom:1px solid var(--line);max-height:82vh;padding:24px}
  .toast{bottom:28px}
  .totop{bottom:26px;right:26px}
  .opts{grid-template-columns:1fr 1fr}
  .qcard__q{font-size:21px}
  .h1{font-size:34px}
  .modpage{padding:38px 30px 70px}
  .modpage h1{font-size:40px}
}

/* Older iOS (before 14.1) has no flex `gap`, and no `aspect-ratio` before 15.
   Everything below only applies on those devices, so modern phones are untouched. */
@supports not (aspect-ratio: 1 / 1){
  .btn-row>*+*{margin-left:10px}
  .chips>*+*{margin-left:8px}
  .sendrow>*+*{margin-left:9px}
  .btn-row,.chips,.sendrow{flex-wrap:wrap}
}
@supports not (aspect-ratio: 16 / 9){
  .video__box{height:0;padding-top:56.25%;overflow:hidden}
  .video__box>video,.video__box>iframe,.video__poster{position:absolute;inset:0;width:100%;height:100%}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *{animation:none!important;transition:none!important}
}

/* printing: study-pack info and contact details come out clean */
@media print{
  body{background:#fff;color:#000}
  body::before,body::after{display:none}
  .tabbar,.appbar__actions,.totop,.toast,.skip-link{display:none!important}
  .card,.subject,.mat,.hero,.proof,.value,.steps li{border:1px solid #ccc;background:#fff;color:#000;box-shadow:none}
  .card::before,.subject::before,.hero::before,.proof::before,.proof::after{display:none}
  .card p,.subject p,.mat p,.lead,.value span,.steps span{color:#333}
  .eyebrow,.card__badge,.hero__tag,.section__head p,.sample__topic,.qcard__topic{color:#8a5000}
  .proof__num,.h1,.h2,.hero h1,.steps__n{color:#000}
}

/* ---- success stories (home) ---- */
.stories{display:grid;gap:12px}
@media(min-width:560px){
  .stories{grid-template-columns:1fr 1fr}
}
.story{margin:0;background:var(--card);border:1px solid var(--line);border-radius:var(--r-sm);padding:10px}
.story__img{display:block;width:100%;height:auto;border-radius:calc(var(--r-sm) - 3px);border:1px solid var(--line);background:var(--navy-800)}
.story__who{margin:10px 2px 2px;font-size:12.5px;font-weight:700;letter-spacing:.02em;color:var(--muted)}

/* ---- coaching fees (home) ---- */
.fees{background:var(--card);border:1px solid var(--line-gold);border-radius:var(--r-md);padding:18px}
.fees__big{margin:0;font-family:var(--display);font-size:32px;line-height:1.05;color:var(--gold)}
.fees__line{margin:8px 0 0;font-size:14px;color:var(--text)}
.fees__note{margin:6px 0 14px;font-size:13px;color:var(--dim)}

/* ---- more documents to order (home) ---- */
.more{background:var(--card);border:1px solid var(--line);border-radius:var(--r-md);padding:18px}
.more__lead{margin:0 0 10px;font-size:14px;color:var(--text)}
.more ul{margin:0 0 16px;padding-left:20px}
.more li{font-size:13.5px;color:var(--muted);margin:6px 0}
@media print{
  .story,.fees,.more{background:#fff;border:1px solid #ccc}
  .story__who,.fees__line,.fees__note,.more li{color:#000}
}
