:root {
  --purple: #5b2a9d;
  --purple-2: #7c3aed;
  --ink: #15121f;
  --muted: #6b6480;
  --bg: #f4f2fa;
  --card: #ffffff;
  --line: #e9e4f4;
  --good: #16a34a;
  --bad: #dc2626;
  --radius: 18px;
  --shadow: 0 10px 34px rgba(40, 20, 80, .10);
  --shadow-lg: 0 24px 60px rgba(40, 20, 80, .18);
  --subject: var(--purple);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; line-height: 1.55;
}
h1, h2, h3, .logo { font-family: "Sora", "Inter", sans-serif; letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, .82); border-bottom: 1px solid var(--line);
}
.topbar .row { display: flex; align-items: center; gap: 14px; height: 60px; }
.logo { font-weight: 800; font-size: 19px; }
.logo .sq { color: var(--subject); }
.crumbs { color: var(--muted); font-size: 14px; }
.crumbs a:hover { color: var(--ink); }
.spacer { margin-left: auto; }
.back-pill { font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 999px; background: #f0ebfa; color: var(--subject); }
.back-pill:hover { background: #e6dcf7; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff; border-radius: 0 0 36px 36px;
  background: linear-gradient(125deg, #4c1d95 0%, #6d28d9 45%, #8b5cf6 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(700px 320px at 85% -10%, rgba(255,255,255,.25), transparent 60%),
              radial-gradient(600px 300px at 5% 120%, rgba(255,216,77,.20), transparent 60%);
  pointer-events: none;
}
.hero .wrap { position: relative; padding: 54px 22px 60px; }
.hero h1 { font-size: clamp(30px, 5vw, 52px); margin: 0 0 10px; font-weight: 800; }
.hero p { font-size: clamp(15px, 2vw, 19px); max-width: 640px; opacity: .92; margin: 0 0 26px; }
.stats { display: flex; gap: 28px; flex-wrap: wrap; }
.stat .n { font-family: "Sora"; font-size: clamp(24px, 4vw, 34px); font-weight: 800; }
.stat .l { font-size: 13px; opacity: .85; text-transform: uppercase; letter-spacing: .08em; }

/* ---------- subject hero (per-subject) ---------- */
.subhero { color: #fff; border-radius: 0 0 32px 32px;
  background: linear-gradient(125deg, var(--subject), color-mix(in srgb, var(--subject) 65%, #fff)); }
.subhero .wrap { padding: 40px 22px 46px; }
.subhero .icon { font-size: 44px; }
.subhero h1 { font-size: clamp(26px, 4vw, 42px); margin: 6px 0 8px; }
.subhero .meta-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; opacity: .95; font-size: 14px; }

/* ---------- search ---------- */
.searchbar { margin: 26px 0 6px; position: relative; }
.searchbar input {
  width: 100%; padding: 14px 18px 14px 46px; border-radius: 14px; border: 1.5px solid var(--line);
  font-size: 15px; background: var(--card); box-shadow: var(--shadow); font-family: inherit;
}
.searchbar input:focus { outline: none; border-color: var(--subject); }
.searchbar::before { content: "🔍"; position: absolute; left: 16px; top: 50%; transform: translateY(-50%); opacity: .5; }

/* ---------- section headers ---------- */
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
  font-weight: 700; margin: 34px 0 14px; display: flex; align-items: center; gap: 10px; }
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- grid + cards ---------- */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); transition: transform .14s ease, box-shadow .14s ease; overflow: hidden;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card .accent { position: absolute; left: 0; top: 0; height: 5px; width: 100%; background: var(--subject); }
.card .icon { font-size: 34px; line-height: 1; }
.card .name { font-weight: 700; font-size: 19px; margin-top: 10px; font-family: "Sora"; }
.card .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.card .counts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* chips / badges */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; background: #f1edf9; color: var(--subject); white-space: nowrap; }
.chip.muted { background: #f1f0f5; color: var(--muted); }
.chip.ready { background: #e8f8ee; color: #15803d; }
.chip.year { background: #fff4d6; color: #8a6d00; }
.chip.board { background: rgba(255,255,255,.18); color: #fff; }
.chip.soon { background: #f1f0f5; color: #8b8597; }

/* progress bar */
.bar { height: 7px; border-radius: 999px; background: var(--line); margin-top: 14px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--subject); border-radius: 999px; transition: width .5s ease; }

/* ---------- workbook (modules + questions) ---------- */
.module { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-top: 18px; overflow: hidden; }
.module > .head { padding: 18px 22px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); }
.module > .head h3 { margin: 0; font-size: 18px; }
.module > .head .grow { flex: 1; }
.module .body { padding: 8px 22px 20px; }
.coming { padding: 26px 22px; color: var(--muted); font-size: 14px; text-align: center; }
.coming b { color: var(--ink); }

.q { padding: 16px 0; border-bottom: 1px dashed var(--line); }
.q:last-child { border-bottom: none; }
.q-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.q-text { font-weight: 600; margin-bottom: 12px; white-space: pre-line; }
.opt { display: block; width: 100%; text-align: left; background: #fff; border: 1.5px solid var(--line);
  border-radius: 12px; padding: 11px 14px; margin-bottom: 8px; cursor: pointer; font-size: 15px; font-family: inherit;
  transition: border-color .12s, background .12s; }
.opt:hover:not(:disabled) { border-color: var(--subject); background: #faf8ff; }
.opt.correct { border-color: var(--good); background: #ecfdf3; }
.opt.wrong { border-color: var(--bad); background: #fef2f2; }
.opt:disabled { cursor: default; }
.explain { font-size: 14px; color: var(--muted); margin-top: 2px; display: none; padding-left: 2px; }
.explain.show { display: block; color: #36304a; }
.btn { background: var(--subject); color: #fff; border: none; border-radius: 999px; padding: 10px 18px;
  font-weight: 700; cursor: pointer; font-size: 14px; font-family: inherit; display: inline-block; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: rgba(255,255,255,.18); }
.btn.reveal { background: var(--ink); }
.model-answer { display: none; margin-top: 12px; padding: 14px 16px; border-radius: 12px;
  background: #ecfdf3; border: 1px solid #b7e4c7; color: #14532d; font-size: 15px; line-height: 1.55; }
.model-answer.show { display: block; }

.score { position: sticky; bottom: 16px; margin-top: 24px; background: var(--ink); color: #fff;
  border-radius: 16px; padding: 14px 20px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-lg); }
.score .big { font-size: 22px; font-weight: 800; font-family: "Sora"; }

/* ---------- chrome: stars + student ---------- */
.chrome { display: flex; align-items: center; gap: 8px; }
.star-chip { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 14px;
  background: #fff4d6; color: #8a6d00; padding: 6px 12px; border-radius: 999px; }
.star-chip:hover { filter: brightness(.97); }
.stu-chip { font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: #f0ebfa; color: var(--subject); }
.stu-chip:hover { background: #e6dcf7; }

/* ---------- year filter ---------- */
.yearfilter { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 4px; }
.ypill { border: 1.5px solid var(--line); background: var(--card); color: var(--muted); border-radius: 999px;
  padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.ypill:hover { border-color: var(--subject); color: var(--ink); }
.ypill.on { background: var(--subject); border-color: var(--subject); color: #fff; }

/* ---------- hub ---------- */
.hubcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px; margin: 24px 0 6px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.hubcard h2 { margin: 0 0 8px; font-size: 22px; }
.hubcard p { margin: 0; color: var(--muted); }
.hubmain { flex: 1; min-width: 220px; }
.hubstats { display: flex; gap: 18px; flex-wrap: wrap; }
.hstat { font-size: 15px; color: var(--ink); } .hstat b { font-family: "Sora"; font-size: 20px; }
.hstat.soft { color: var(--muted); font-size: 13px; align-self: center; }
.hubactions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.signin-row { display: flex; gap: 8px; }
.signin-row input { padding: 11px 14px; border-radius: 12px; border: 1.5px solid var(--line); font-size: 15px; font-family: inherit; min-width: 180px; }
.signin-row input:focus { outline: none; border-color: var(--subject); }
.hubsub { color: var(--muted); font-size: 13px; margin: -2px 0 10px; }
.signin-err { color: var(--bad); font-size: 13px; display: block; margin-top: 6px; min-height: 1px; }
.answer-box { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 14px;
  font-size: 15px; font-family: inherit; resize: vertical; margin-bottom: 10px; }
.answer-box:focus { outline: none; border-color: var(--subject); }
.btn.ghost2 { background: #f0ebfa; color: var(--subject); }
.linklike { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 13px; text-decoration: underline; font-family: inherit; }

/* ---------- hints ---------- */
.q-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hint { background: #fff7e6; color: #8a6d00; border: 1px solid #f5e3b3; border-radius: 999px; padding: 8px 14px;
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.hint:hover { filter: brightness(.97); }
.opt.dim { opacity: .35; text-decoration: line-through; }
.hint-box { display: none; margin-top: 10px; padding: 10px 14px; border-radius: 12px; background: #fff7e6;
  border: 1px solid #f5e3b3; color: #6b5300; font-size: 14px; }
.hint-box.show { display: block; }

/* ---------- effects ---------- */
.starfloat { position: absolute; z-index: 80; font-weight: 800; color: #d4880a; pointer-events: none;
  animation: floatup 1.1s ease-out forwards; }
@keyframes floatup { 0% { opacity: 0; transform: translateY(6px) scale(.8); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-34px) scale(1.1); } }
.confetti { position: fixed; top: -12px; width: 9px; height: 14px; z-index: 90; border-radius: 2px;
  animation: fall 2.4s linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); opacity: .9; } }
.complete-banner { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 95;
  background: var(--ink); color: #fff; padding: 14px 20px; border-radius: 999px; box-shadow: var(--shadow-lg);
  font-weight: 600; display: flex; align-items: center; gap: 12px; }
.complete-banner .x { background: rgba(255,255,255,.2); border: none; color: #fff; border-radius: 50%; width: 24px; height: 24px; cursor: pointer; }

/* ---------- leaderboard ---------- */
.lb { max-width: 640px; margin: 24px auto 0; }
.lbrow { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 18px; margin-bottom: 10px; box-shadow: var(--shadow); }
.lbrow.me { border-color: var(--purple-2); background: #faf7ff; }
.lbrow .rank { font-size: 20px; font-weight: 800; min-width: 34px; text-align: center; }
.lbname { flex: 1; font-weight: 600; }
.lbstars { font-weight: 800; color: #8a6d00; }
.lbnote { color: var(--muted); font-size: 13px; text-align: center; margin-top: 14px; }

/* ---------- mock exam centre ---------- */
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.extlink { font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 999px; background: #f0ebfa; color: var(--subject); }
.extlink:hover { background: #e6dcf7; }
.sooncard { opacity: .65; cursor: default; }
.btn.big { font-size: 16px; padding: 14px 26px; }
.cover { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; margin-top: 26px; max-width: 760px; }
.cover-board { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.cover h1 { margin: 6px 0 12px; }
.cover-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.instructions { color: #36304a; padding-left: 20px; margin: 0 0 16px; } .instructions li { margin: 4px 0; }
.cover-note { font-size: 13px; color: var(--muted); background: #faf8ff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.examtimer { position: sticky; top: 60px; z-index: 20; display: flex; align-items: center; gap: 12px; background: var(--ink); color: #fff;
  border-radius: 14px; padding: 10px 16px; box-shadow: var(--shadow); margin: 18px 0; }
.examtimer #clock { font-family: "Sora"; font-weight: 700; }
.examtimer .grow { flex: 1; }
.qlist { list-style: none; padding: 0; margin: 0; counter-reset: q; }
.exq { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.exq-head { display: flex; gap: 12px; align-items: baseline; }
.qnum { font-family: "Sora"; font-weight: 800; color: var(--subject); min-width: 26px; }
.qbody { flex: 1; font-weight: 600; white-space: pre-line; }
.qmarks { color: var(--muted); font-size: 13px; white-space: nowrap; font-weight: 600; }
.opts { margin-top: 10px; display: grid; gap: 6px; }
.exopt { display: flex; gap: 8px; align-items: center; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; }
.exopt.correct { border-color: var(--good); background: #ecfdf3; }
.exopt.wrong { border-color: var(--bad); background: #fef2f2; }
.ms { display: none; margin-top: 10px; padding: 12px 14px; border-radius: 10px; background: #ecfdf3; border: 1px solid #b7e4c7; color: #14532d; font-size: 14px; }
.ms.show { display: block; }
.sources { background: #fbfaff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin: 14px 0; }
.sources-h { font-weight: 700; font-family: "Sora"; margin-bottom: 10px; }
.source { margin-bottom: 14px; } .source-label { font-weight: 700; font-size: 13px; color: var(--subject); margin-bottom: 4px; }
.source-text { font-size: 15px; line-height: 1.7; }
.exsection { margin-top: 22px; } .exsection h3 { margin: 0 0 4px; } .sec-inst { color: var(--muted); margin: 0 0 12px; }
.result-banner { background: var(--ink); color: #fff; border-radius: 14px; padding: 16px 20px; margin: 16px 0; box-shadow: var(--shadow-lg); }
.result-banner a { color: #ffd84d; font-weight: 600; }
/* home mock CTA */
.mock-cta { display: block; margin: 24px 0 6px; background: linear-gradient(110deg, var(--ink), #3a2a63); color: #fff;
  border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.mock-cta:hover { box-shadow: var(--shadow-lg); }
.mock-cta h2 { margin: 0 0 4px; } .mock-cta p { margin: 0; opacity: .9; }

/* ---------- AI marking ---------- */
.grade { margin-top: 10px; }
.btn.ai { background: linear-gradient(110deg, #6d28d9, #0ea5e9); color: #fff; }
.btn.ai:hover { filter: brightness(1.08); }
.grade-result { display: none; margin-top: 10px; }
.grade-result.show { display: block; }
.grade-result.note { font-size: 14px; color: var(--muted); background: #f6f4fb; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.grade-result.note .dim { display: block; margin-top: 4px; font-size: 12px; }
.grade-result.graded { background: #fbfaff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.grade-score { display: flex; align-items: center; gap: 12px; }
.gnum { font-family: "Sora"; font-weight: 800; font-size: 20px; color: var(--subject); white-space: nowrap; }
.gbar { flex: 1; height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.gbar > span { display: block; height: 100%; background: linear-gradient(90deg, #6d28d9, #0ea5e9); }
.grade-fb { margin: 10px 0; font-size: 15px; color: #2c2740; }
.glist { font-size: 14px; margin-top: 6px; } .glist b { display: block; margin-bottom: 2px; }
.glist.good b { color: var(--good); } .glist.bad b { color: #b45309; }
.glist ul { margin: 0; padding-left: 18px; } .glist li { margin: 2px 0; }
.grade-result .dim { color: var(--muted); font-size: 12px; margin-top: 8px; }

/* ---------- teacher dashboard ---------- */
.tabs { display: flex; gap: 8px; margin: 22px 0 4px; flex-wrap: wrap; }
.tab { border: 1.5px solid var(--line); background: var(--card); color: var(--muted); border-radius: 999px; padding: 9px 18px; font-weight: 600; cursor: pointer; font-family: inherit; }
.tab.on { background: var(--subject); border-color: var(--subject); color: #fff; }
.troster { display: flex; flex-direction: column; gap: 10px; }
.trow { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; box-shadow: var(--shadow); cursor: pointer; }
.trow:hover { box-shadow: var(--shadow-lg); }
.tstats { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ans { background: #fbfaff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 15px; }
.modrow { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.modrow label { font-size: 14px; font-weight: 600; }
.afield { margin-bottom: 14px; } .afield label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.afield select, .afield input { width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px; font-size: 15px; font-family: inherit; }
.afield select:focus, .afield input:focus { outline: none; border-color: var(--subject); }

/* ---------- adaptive test ---------- */
.atop { display: flex; justify-content: space-between; align-items: center; margin: 26px 0 8px; flex-wrap: wrap; gap: 8px; }
.aprog { font-weight: 700; font-family: "Sora"; }
.alevel { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.ldots { display: inline-flex; gap: 4px; }
.ldot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: inline-block; }
.ldot.on { background: var(--subject); }
.ldots.big .ldot { width: 14px; height: 14px; }
.abar { height: 7px; background: var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 18px; }
.abar > span { display: block; height: 100%; background: var(--subject); transition: width .4s ease; }
.aq { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.aq-topic { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--subject); font-weight: 700; margin-bottom: 8px; }
.aq-text { font-size: 19px; font-weight: 600; margin-bottom: 16px; white-space: pre-line; }
.aopts { display: grid; gap: 8px; }
.aexplain { display: none; margin-top: 14px; padding: 12px 16px; border-radius: 12px; font-size: 15px; }
.aexplain.show { display: block; }
.aexplain.good { background: #ecfdf3; border: 1px solid #b7e4c7; color: #14532d; }
.aexplain.bad { background: #fef2f2; border: 1px solid #f3b4b4; color: #7f1d1d; }
.anext { margin-top: 14px; }
.result-card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 30px; margin-top: 26px; max-width: 760px; border-top: 8px solid var(--subject); }
.result-card.above { border-top-color: #16a34a; } .result-card.at { border-top-color: #2563eb; }
.result-card.towards { border-top-color: #d97706; } .result-card.below { border-top-color: #dc2626; }
.are-band { font-family: "Sora"; font-weight: 800; font-size: clamp(22px, 4vw, 32px); margin: 6px 0 18px; }
.are-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.are-stat { background: #faf8ff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; text-align: center; }
.are-stat .n { font-family: "Sora"; font-weight: 800; font-size: 26px; color: var(--subject); }
.are-stat .l { font-size: 12px; color: var(--muted); margin-top: 4px; }
.are-level { display: flex; align-items: center; gap: 10px; margin: 8px 0 18px; font-weight: 600; }
.are-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.aopts2 { display: flex; gap: 14px; flex-wrap: wrap; }
.aopts2 .afield { flex: 1; min-width: 210px; }
.are-head { font-size: 16px; margin: 4px 0 16px; line-height: 1.6; }
.yscale { position: relative; height: 18px; margin: 30px 0 34px; border-radius: 10px; background: linear-gradient(90deg, #fca5a5, #fde68a, #86efac); }
.ymark { position: absolute; top: -8px; width: 3px; height: 34px; background: var(--ink); transform: translateX(-50%); border-radius: 2px; }
.ymark span { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; white-space: nowrap; }
.yexp { position: absolute; bottom: -8px; width: 3px; height: 34px; background: #2563eb; transform: translateX(-50%); border-radius: 2px; }
.yexp span { position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); background: #2563eb; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; white-space: nowrap; }
.yends { position: absolute; top: 22px; left: 0; right: 0; display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); font-weight: 600; }
/* home adaptive CTA */
.adapt-cta { display: block; margin: 14px 0 6px; background: linear-gradient(110deg, #0ea5e9, #6d28d9); color: #fff; border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.adapt-cta:hover { box-shadow: var(--shadow-lg); } .adapt-cta h2 { margin: 0 0 4px; } .adapt-cta p { margin: 0; opacity: .92; }

/* ---------- US assessments section ---------- */
.ussec { margin: 8px 0 4px; }
.usgrid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.us-card { display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 1px solid var(--line); border-left: 5px solid #2563eb;
  border-radius: 14px; padding: 18px; box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; }
.us-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.us-card b { font-family: "Sora"; font-size: 16px; } .us-card span { color: var(--muted); font-size: 13px; }
.us-card:nth-child(2) { border-left-color: #16a34a; } .us-card:nth-child(3) { border-left-color: #b45309; }

.empty { text-align: center; color: var(--muted); padding: 60px 20px; }
.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 44px 0 60px; }
.hidden { display: none !important; }
@media (max-width: 560px) { .hero .wrap { padding: 40px 18px; } .stats { gap: 18px; } }

/* ---- Lesson video (R2-hosted explainer per module) ---- */
.lessonvideo{margin:14px 0 4px;padding:14px;border:1px solid rgba(91,42,157,.18);
  background:linear-gradient(180deg,rgba(91,42,157,.05),rgba(91,42,157,.01));border-radius:14px}
.lessonvideo .lv-label{font-family:"Sora",system-ui,sans-serif;font-weight:700;font-size:.82rem;
  letter-spacing:.04em;text-transform:uppercase;color:var(--subject,#5b2a9d);margin-bottom:10px}
.lessonvideo video{width:100%;max-width:720px;display:block;border-radius:10px;background:#000;
  box-shadow:0 6px 22px rgba(0,0,0,.16)}

/* ---- Short subtopic videos: "watch first" playlist ---- */
.lessonshorts{margin:14px 0 4px;padding:14px;border:1px solid rgba(91,42,157,.18);
  background:linear-gradient(180deg,rgba(241,138,42,.06),rgba(91,42,157,.02));border-radius:14px}
.lessonshorts .lv-label{font-family:"Sora",system-ui,sans-serif;font-weight:700;font-size:.82rem;
  letter-spacing:.04em;text-transform:uppercase;color:var(--subject,#5b2a9d);margin-bottom:10px}
.short-tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.short-tab{font-family:"Mulish",system-ui,sans-serif;font-size:.86rem;font-weight:600;cursor:pointer;
  padding:7px 14px;border-radius:999px;border:1px solid rgba(91,42,157,.30);background:#fff;color:#5b2a9d;transition:.15s}
.short-tab:hover{background:rgba(91,42,157,.08)}
.short-tab.on{background:var(--subject,#5b2a9d);color:#fff;border-color:transparent}
.lessonshorts video.short-player{width:100%;max-width:720px;display:block;border-radius:10px;background:#000;
  box-shadow:0 6px 22px rgba(0,0,0,.16)}

/* ---- Adaptive results: gap → mini-video → retest cards ---- */
.gapcard{margin:12px 0;padding:14px 16px;border:1px solid rgba(180,83,9,.22);
  border-left:4px solid #f59e0b;border-radius:12px;background:linear-gradient(180deg,rgba(245,158,11,.05),rgba(245,158,11,.01))}
.gap-head{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.gap-topic{font-family:"Sora",system-ui,sans-serif;font-weight:700}
.gap-pct{margin-left:auto;font-weight:700;color:#b45309}
.retest-btn{margin-top:10px;font-size:14px;padding:9px 18px}
.delta-badge{display:inline-block;margin:8px 0 4px;padding:8px 16px;border-radius:999px;
  font-family:"Sora",system-ui,sans-serif;font-weight:700;font-size:1rem}
.delta-badge.up{background:rgba(34,197,94,.15);color:#15803d}
.delta-badge.flat{background:rgba(245,158,11,.15);color:#b45309}

/* ---- Public-page rework: unit narrative, video-coming-soon strip, member chip ---- */
.unit-narrative{margin:12px 0 4px;max-width:720px;color:#57506b;font-size:.95rem;line-height:1.65}
.video-soon{margin:12px 0 4px;padding:10px 14px;border:1px dashed rgba(91,42,157,.28);border-radius:12px;
  background:#f7f6fa;color:var(--muted,#8b8597);font-size:.86rem}
.chip.member{background:rgba(91,42,157,.10);color:#5b2a9d}
