/* ==========================================================================
   The Exam Hub — 16+ admissions practice
   Design: midnight navy chrome, gold accents, ivory "exam paper" for questions.
   ========================================================================== */
:root {
  --bg: #080F1F;
  --bg2: #0C162B;
  --panel: #111C34;
  --panel2: #16233F;
  --panel3: #1C2B4B;
  --line: rgba(201, 163, 39, .16);
  --line2: rgba(255, 255, 255, .07);
  --gold: #C9A327;
  --gold2: #E3C566;
  --gold3: #F4E2A6;
  --goldGrad: linear-gradient(135deg, #F0D78A 0%, #C9A327 45%, #A8841A 100%);
  --ivory: #F7F2E6;
  --text: #ECE7DA;
  --muted: #A3ABBD;
  --muted2: #7C8499;
  --ok: #43B581;
  --okBg: rgba(67, 181, 129, .14);
  --bad: #E26D5F;
  --badBg: rgba(226, 109, 95, .14);
  --amber: #E7A93B;
  --paper: #FBF8F0;
  --paperLine: #E4DCC8;
  --ink: #16213A;
  --ink2: #4A5570;
  --radius: 16px;
  --radiusS: 10px;
  --shadow: 0 12px 34px rgba(0, 0, 0, .35);
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', 'Segoe UI', system-ui, -apple-system, Helvetica, Arial, sans-serif;
  --navW: 240px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(201, 163, 39, .10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(64, 96, 170, .10), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans); font-size: 15px; line-height: 1.55;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--gold2); }
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 600; letter-spacing: .2px; }
h1 { font-size: 30px; line-height: 1.15; margin: 0 0 6px; }
h2 { font-size: 22px; line-height: 1.2; margin: 0 0 12px; }
h3 { font-size: 17px; margin: 0 0 8px; }
.hide { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.gold { color: var(--gold2); }
.caps { text-transform: uppercase; letter-spacing: 1.6px; font-size: 11px; font-weight: 700; }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; } .mt32 { margin-top: 32px; }
.mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
.side {
  width: var(--navW); flex: none; position: fixed; top: 0; bottom: 0; left: 0;
  background: linear-gradient(180deg, #0B1428, #070D1B);
  border-right: 1px solid var(--line);
  padding: 22px 16px; display: flex; flex-direction: column; gap: 6px; z-index: 30;
}
/* the sidebar badge is the name: "The Exam Hub" is written on it, so no text wordmark beside it */
.brand { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 4px 18px; text-decoration: none; color: inherit; text-align: center; }
.brand picture, .topbar picture { display: block; flex: none; line-height: 0; }
.brand img { display: block; width: 150px; height: 150px; border-radius: 50%; filter: drop-shadow(0 10px 22px rgba(0,0,0,.5)); transition: transform .25s ease; }
.brand:hover img { transform: scale(1.02); }
.brand .bt { font-family: var(--serif); font-size: 19px; line-height: 1.05; color: var(--ivory); }
.brand .bt b { display: block; font-weight: 700; background: var(--goldGrad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand .bs { font-size: 10px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.nav-btn {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: transparent; border: 0; border-radius: 12px; padding: 11px 12px;
  color: var(--muted); font-weight: 600; font-size: 14.5px; text-align: left;
}
.nav-btn svg { width: 20px; height: 20px; flex: none; }
.nav-btn:hover { background: rgba(255,255,255,.04); color: var(--text); }
.nav-btn.on { background: linear-gradient(90deg, rgba(201,163,39,.20), rgba(201,163,39,.04)); color: var(--gold3); box-shadow: inset 2px 0 0 var(--gold); }
.side-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line2); font-size: 12px; color: var(--muted2); }

.main { flex: 1; margin-left: var(--navW); min-width: 0; }
.page-wrap { max-width: 1120px; margin: 0 auto; padding: 32px 36px 80px; }
.topbar { display: none; }

.bottom-nav { display: none; }

@media (max-width: 900px) {
  .side { display: none; }
  .main { margin-left: 0; }
  .page-wrap { padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); }
  .topbar {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 25;
    padding: 12px 16px; background: rgba(8,15,31,.88); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .topbar img { display: block; width: 44px; height: 44px; border-radius: 50%; }
  .topbar .bt { font-family: var(--serif); font-size: 17px; }
  .topbar .bt b { background: var(--goldGrad); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: rgba(9,16,32,.96); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav .nav-btn { flex-direction: column; gap: 3px; font-size: 10.5px; padding: 7px 2px; text-align: center; justify-content: center; }
  .bottom-nav .nav-btn.on { box-shadow: inset 0 2px 0 var(--gold); }
  h1 { font-size: 25px; }
}

/* ---------- surfaces ---------- */
.card {
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--line2); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.card.gold { border-color: rgba(201,163,39,.35); background: linear-gradient(160deg, rgba(201,163,39,.12), rgba(17,28,52,.9) 45%); }
.card.flat { box-shadow: none; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }
.g4.keep2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1100px) { .g4.keep2 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.eyebrow { color: var(--gold2); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.06); color: var(--muted);
  border: 1px solid var(--line2); white-space: nowrap;
}
.pill.gold { background: rgba(201,163,39,.14); color: var(--gold3); border-color: rgba(201,163,39,.35); }
.pill.ok { background: var(--okBg); color: #7FE0B0; border-color: rgba(67,181,129,.35); }
.pill.bad { background: var(--badBg); color: #F3A79D; border-color: rgba(226,109,95,.35); }
.pill.amber { background: rgba(231,169,59,.14); color: #F4C98A; border-color: rgba(231,169,59,.35); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 12px; padding: 12px 20px;
  font-weight: 700; font-size: 14.5px; letter-spacing: .2px; text-decoration: none;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--goldGrad); color: #1B1405; box-shadow: 0 8px 22px rgba(201,163,39,.28); }
.btn.primary:hover { box-shadow: 0 10px 28px rgba(201,163,39,.42); }
.btn.ghost { background: rgba(255,255,255,.04); border-color: rgba(201,163,39,.35); color: var(--gold3); }
.btn.ghost:hover { background: rgba(201,163,39,.10); }
.btn.quiet { background: transparent; color: var(--muted); padding: 10px 12px; }
.btn.quiet:hover { color: var(--text); }
.btn.sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- home ---------- */
/* The gold glow in the top-right corner is the hero's ::before. It used to be its ::after — the SAME
   pseudo-element as the card's "lit from above" sheen (.card::after, later in this file), so on every
   .card.hero the later rule won: the glow was lost and a pale 320px square with a hard edge sat in the
   top-left corner instead (v30, lane H). isolation + z-index -1 keep the glow behind the text. */
.hero { position: relative; overflow: hidden; padding: 28px; isolation: isolate; }
.hero::before {
  content: ''; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,163,39,.22), transparent 65%); pointer-events: none; z-index: -1;
}
.stat-big { font-family: var(--serif); font-size: 46px; line-height: 1; color: var(--gold2); }
.stat-lbl { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-top: 6px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.stat { background: rgba(255,255,255,.035); border: 1px solid var(--line2); border-radius: 14px; padding: 14px 16px; }
.stat b { display: block; font-family: var(--serif); font-size: 26px; color: var(--ivory); font-weight: 600; line-height: 1.1; }
.stat span { font-size: 11px; color: var(--muted); letter-spacing: 1.2px; text-transform: uppercase; font-weight: 700; }

.zone-card {
  position: relative; overflow: hidden; cursor: pointer; text-align: left; width: 100%;
  border: 1px solid var(--line2); border-radius: var(--radius); padding: 20px 18px 18px;
  background: linear-gradient(165deg, var(--panel3), var(--panel) 70%);
  transition: transform .15s ease, border-color .2s ease, box-shadow .2s ease;
  min-height: 176px; display: flex; flex-direction: column;
}
.zone-card:hover { transform: translateY(-2px); border-color: rgba(201,163,39,.45); box-shadow: 0 14px 36px rgba(0,0,0,.4); }
.zone-card .zi { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: rgba(201,163,39,.13); color: var(--gold2); border: 1px solid rgba(201,163,39,.3); }
.zone-card .zi svg { width: 24px; height: 24px; }
.zone-card h3 { margin: 14px 0 4px; font-size: 19px; color: var(--ivory); }
.zone-card p { margin: 0; color: var(--muted); font-size: 13px; }
.zone-card .zfoot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; gap: 10px; }
.bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; flex: 1; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--goldGrad); }
.bar.ok > i { background: linear-gradient(90deg, #3BA374, #6BD6A4); }
.bar.bad > i { background: linear-gradient(90deg, #C9574B, #EE8C80); }
.bar.amber > i { background: linear-gradient(90deg, #D39227, #F2C064); }

.test-card { display: flex; flex-direction: column; gap: 10px; cursor: pointer; text-align: left; width: 100%; color: inherit; }
.test-card .tt { font-family: var(--serif); font-size: 20px; color: var(--ivory); }
.test-card:hover { border-color: rgba(201,163,39,.5); }
.test-meta { display: flex; flex-wrap: wrap; gap: 6px; }
/* Test Centre groups (2026-09-23): a heading and one line for each, then its cards */
.tgroup { margin-top: 34px; }
.tg-head { display: flex; align-items: baseline; gap: 6px 16px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--line2); }
.tg-head h2 { margin: 0; }
.tg-head p { margin: 0; }
.test-card.paper { background: linear-gradient(160deg, rgba(201,163,39,.10), rgba(255,255,255,.02) 55%); }
/* Results → Areas to focus on: each topic is a button that opens a focus set */
.focus-list { display: grid; gap: 8px; }
.focus-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(56px, 1fr) auto auto; gap: 12px; align-items: center; width: 100%; min-height: 52px; padding: 9px 12px; text-align: left; color: inherit; cursor: pointer; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 12px; font: inherit; }
.focus-row:hover, .focus-row:focus-visible { border-color: rgba(201,163,39,.55); background: rgba(201,163,39,.07); }
.focus-row .fl { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.focus-row .fl b { font-size: 14px; color: var(--ivory); font-weight: 600; }
.focus-row .fl span { font-size: 12px; color: var(--muted); }
.focus-row .bar { height: 8px; }
.focus-row .fn { font-size: 13px; color: var(--muted); min-width: 40px; text-align: right; }
.focus-row .fgo { font-size: 13px; font-weight: 700; color: var(--gold2); white-space: nowrap; }
@media (max-width: 520px) { .focus-row { grid-template-columns: minmax(0, 1fr) auto auto; } .focus-row .bar { display: none; } }

/* ---------- lists ---------- */
.list { display: flex; flex-direction: column; gap: 10px; }
.li {
  display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line2);
}
.li.click { cursor: pointer; }
.li.click:hover { border-color: rgba(201,163,39,.4); background: rgba(201,163,39,.05); }
.li .lt { font-weight: 700; color: var(--ivory); }
.li .ls { font-size: 12.5px; color: var(--muted); }
.score-chip { min-width: 58px; text-align: center; font-family: var(--serif); font-size: 20px; color: var(--gold2); }

/* ---------- activity page ---------- */
.act { display: flex; flex-direction: column; gap: 12px; }
.act .ah { display: flex; gap: 14px; align-items: flex-start; }
.levels { display: flex; gap: 8px; flex-wrap: wrap; }
.lvl {
  flex: 1; min-width: 96px; border-radius: 12px; padding: 10px 12px; text-align: left;
  background: rgba(255,255,255,.035); border: 1px solid var(--line2); color: var(--text);
}
.lvl:hover { border-color: rgba(201,163,39,.5); background: rgba(201,163,39,.06); }
.lvl b { display: block; font-size: 13.5px; }
.lvl span { font-size: 11.5px; color: var(--muted); }
.lvl.l3 b { color: var(--gold2); }

/* ---------- question area (exam paper) ---------- */
.qwrap { max-width: 980px; margin: 0 auto; }
.qhead {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; border-radius: 14px; background: rgba(255,255,255,.035); border: 1px solid var(--line2); margin-bottom: 14px;
}
.qhead .qt { font-weight: 700; color: var(--ivory); }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 18px; color: var(--gold2); padding: 4px 12px; border-radius: 10px; background: rgba(201,163,39,.10); border: 1px solid rgba(201,163,39,.3); }
.timer.warn { color: #FFB4A9; background: rgba(226,109,95,.14); border-color: rgba(226,109,95,.45); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .65; } }
.progress-strip { display: flex; gap: 3px; flex: 1; min-width: 120px; }
.progress-strip i { flex: 1; height: 5px; border-radius: 3px; background: rgba(255,255,255,.1); }
.progress-strip i.done { background: rgba(201,163,39,.7); }
.progress-strip i.cur { background: var(--gold3); }
.progress-strip i.ok { background: var(--ok); }
.progress-strip i.bad { background: var(--bad); }

.paper {
  background: var(--paper); color: var(--ink); border-radius: 18px; padding: 28px 30px;
  box-shadow: 0 18px 48px rgba(0,0,0,.45), inset 0 0 0 1px rgba(201,163,39,.25);
  position: relative;
}
.paper::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: 18px 18px 0 0; background: var(--goldGrad); }
@media (max-width: 760px) { .paper { padding: 22px 16px; border-radius: 14px; } }
.paper .inst { font-size: 13px; color: var(--ink2); font-weight: 600; margin-bottom: 14px; }
.paper .qnum { font-family: var(--serif); color: #8A6F13; font-size: 14px; font-weight: 700; letter-spacing: .5px; margin-bottom: 6px; }
.paper .stem { font-size: 18px; line-height: 1.55; color: var(--ink); }
.paper .stem p { margin: 0 0 10px; }
.paper .stem .big { font-family: var(--serif); font-size: 26px; }
.paper .chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 4px; }
.paper .chip { padding: 10px 18px; border-radius: 10px; background: #fff; border: 1.5px solid var(--paperLine); font-weight: 700; font-size: 18px; color: var(--ink); }
.paper .chip.q { border-style: dashed; color: #8A6F13; border-color: #C9A327; min-width: 64px; text-align: center; }
.paper .arrow { color: #8A6F13; font-weight: 800; font-size: 20px; }
.analogy { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.analogy .pair { display: flex; align-items: center; gap: 10px; }
.seq { display: flex; flex-wrap: wrap; gap: 8px; }
.seq .n { min-width: 58px; padding: 12px 10px; text-align: center; border-radius: 10px; background: #fff; border: 1.5px solid var(--paperLine); font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; }
.seq .n.q { border: 2px dashed #C9A327; color: #8A6F13; }
.na { display: flex; flex-wrap: wrap; gap: 12px; }
.na .nb { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: #fff; border: 1.5px solid var(--paperLine); font-weight: 800; font-size: 19px; font-variant-numeric: tabular-nums; }
.na .nb .q { color: #8A6F13; }

.opts { display: grid; gap: 10px; margin-top: 20px; }
.opts.cols5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.opts.cols2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .opts.cols5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .opts.cols2 { grid-template-columns: 1fr; } }
.opt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 13px 16px; border-radius: 12px; background: #fff; color: var(--ink);
  border: 1.5px solid var(--paperLine); font-size: 16px; line-height: 1.4;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.opt:hover { border-color: #C9A327; box-shadow: 0 4px 14px rgba(201,163,39,.18); }
.opt .ol { flex: none; width: calc(28px * var(--fs, 1)); height: calc(28px * var(--fs, 1)); border-radius: 8px; display: grid; place-items: center; font-size: calc(13px * var(--fs, 1)); font-weight: 800; background: #F2EBD8; color: #6E5810; }
.opt.sel { border-color: #C9A327; background: #FFF9E6; box-shadow: 0 0 0 2px rgba(201,163,39,.35); }
.opt.sel .ol { background: #C9A327; color: #fff; }
.opt.right { border-color: #2E9B69; background: #EAF8F0; }
.opt.right .ol { background: #2E9B69; color: #fff; }
.opt.wrong { border-color: #D2594B; background: #FDEEEC; }
.opt.wrong .ol { background: #D2594B; color: #fff; }
.opt.fig { flex-direction: column; gap: 6px; padding: 10px 8px; }
.opt.fig svg { width: 100%; height: auto; max-width: 150px; }
.opt[disabled] { cursor: default; }

.feedback { margin-top: 18px; border-radius: 14px; padding: 16px 18px; font-size: 15px; line-height: 1.55; }
.feedback.ok { background: #EAF8F0; border: 1px solid #A6DEC2; color: #164E35; }
.feedback.bad { background: #FDF1EF; border: 1px solid #F0B9B1; color: #6B2118; }
.feedback .fbt { display: block; font-size: 13px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; margin-bottom: 4px; }

.qfoot { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
/* ===== the look: icons, zone colours, tiles, rings (look.js, 2026-09-23) ===== */
.ico { --z: #E9C862; --zr: 230,196,90; width: 44px; height: 44px; flex: none; border-radius: 13px; display: inline-grid; place-items: center; color: var(--z);
  background: linear-gradient(145deg, rgba(var(--zr), .24), rgba(var(--zr), .07)); border: 1px solid rgba(var(--zr), .38);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 6px 16px rgba(0,0,0,.22); }
.ico svg { width: 22px; height: 22px; }
.ico.lg { width: 58px; height: 58px; border-radius: 17px; } .ico.lg svg { width: 29px; height: 29px; }
.ico.sm { width: 38px; height: 38px; border-radius: 11px; } .ico.sm svg { width: 19px; height: 19px; }
.ico.xs { width: 28px; height: 28px; border-radius: 8px; box-shadow: none; } .ico.xs svg { width: 15px; height: 15px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.tile { --z: #E9C862; --zr: 230,196,90; display: flex; align-items: center; gap: 13px; width: 100%; min-height: 76px; padding: 12px 14px; text-align: left; color: inherit; cursor: pointer; font: inherit;
  border-radius: 16px; border: 1px solid var(--line2); background: linear-gradient(155deg, rgba(var(--zr), .08), rgba(255,255,255,.02) 62%);
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.tile:hover { transform: translateY(-2px); border-color: rgba(var(--zr), .55); background: linear-gradient(155deg, rgba(var(--zr), .14), rgba(255,255,255,.03) 62%); box-shadow: 0 12px 28px rgba(0,0,0,.28); }
.tile:active { transform: translateY(0); }
.tile:focus-visible { outline: 2px solid var(--z); outline-offset: 2px; }
.tile .tb { flex: 1; min-width: 0; display: block; }
.tile .tb b { display: block; color: var(--ivory); font-size: 15px; font-weight: 700; line-height: 1.25; }
.tile .ts { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; margin-top: 3px; }
.tile .tside { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; }
.tile.soon { opacity: .55; cursor: default; } .tile.soon:hover { transform: none; box-shadow: none; }
.mring { position: relative; display: inline-block; flex: none; }
.mring svg { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.mring > span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: var(--ivory); letter-spacing: -.2px; }
.tag-new { font-size: 11px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: var(--z, var(--gold2)); background: rgba(var(--zr, 230,196,90), .12); border: 1px solid rgba(var(--zr, 230,196,90), .32); padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.zone-title { display: flex; align-items: center; gap: 14px; margin: 34px 0 12px; }
.zone-title h2 { margin: 0; }
.zone-title .zm { color: var(--muted); font-size: 13px; margin-top: 2px; }
.act-title { display: flex; align-items: center; gap: 14px; }
.review-banner { --z: #F7A3B3; --zr: 245,154,170; display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 16px; padding: 14px 16px; border-radius: 18px; text-align: left; font: inherit; color: inherit; cursor: pointer;
  border: 1px solid rgba(var(--zr), .38); background: linear-gradient(120deg, rgba(var(--zr), .14), rgba(255,255,255,.02) 70%); transition: border-color .16s ease; }
.review-banner .tb { flex: 1; min-width: 0; } .review-banner b { display: block; color: var(--ivory); font-size: 16px; } .review-banner .ts { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.review-banner:hover { border-color: rgba(var(--zr), .62); }
.zone-card { background: linear-gradient(160deg, rgba(var(--zr, 230,196,90), .11), rgba(255,255,255,.02) 62%); }
.zone-card:hover { border-color: rgba(var(--zr, 230,196,90), .55); }
.zone-card .zc-top { display: flex; align-items: center; justify-content: space-between; }
.zone-card h3 { margin-top: 14px; }
.task .tk { position: relative; flex: none; }
.task .tn { position: absolute; right: -6px; bottom: -6px; min-width: 19px; height: 19px; padding: 0 4px; border-radius: 99px; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #0b1428; background: var(--z, var(--gold2)); border: 2px solid #0e1a33; }
.task.done .tn { background: #2E9B69; color: #fff; }
.stat { position: relative; }
.stat > svg { position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; color: var(--gold2); opacity: .55; }
.test-card .tc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.test-card:hover { border-color: rgba(var(--zr, 201,163,39), .55); }
.qhead .ico.xs { margin-right: -2px; }
@media (max-width: 760px) {
  .tiles { grid-template-columns: 1fr; gap: 8px; }
  .tile { min-height: 68px; padding: 11px 12px; }
  .zone-title { margin: 26px 0 10px; }
}
.resume-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 18px; padding: 12px 16px; border-radius: 16px;
  border: 1px solid rgba(230,196,90,.45); background: linear-gradient(120deg, rgba(230,196,90,.16), rgba(255,255,255,.02) 70%); }
.resume-banner .tb { flex: 1; min-width: 200px; } .resume-banner .tb b { display: block; color: var(--ivory); font-size: 15px; } .resume-banner .ts { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; } .resume-banner .nw { white-space: nowrap; }
/* ===== end look ===== */
/* ===== question figures (fig.js) ===== */
.qfigure { margin: 16px auto 6px; text-align: center; max-width: 460px; }
.qfigure svg, .qfigure img { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.qfigure img { border-radius: 8px; }
.qfigure figcaption { font-size: 12.5px; color: #5b6474; font-style: italic; margin-top: 4px; }
.qfigure figcaption.cap { font-style: normal; font-weight: 600; color: #3d4556; }
.qfigure.small { max-width: 300px; }
.qfigures { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; align-items: flex-end; margin-top: 10px; }
.qfigures .qfigure { margin: 6px 0 4px; flex: 0 1 auto; }
.paper.example .qfigure { max-width: 340px; }
.review-body .qfigure { max-width: 380px; }
/* ===== end figures ===== */
/* keyboard hint: only where there is a keyboard and a mouse (never on a phone or tablet) */
.kbd-hint { display: none; font-size: 12px; color: var(--muted); letter-spacing: .2px; }
@media (hover: hover) and (pointer: fine) { .kbd-hint { display: inline; } }
@media (max-width: 760px) { .kbd-hint { display: none !important; } .qfoot > .spacer { display: none; } }

.passage-split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 980px) { .passage-split { grid-template-columns: 1fr; } }
.passage {
  background: var(--paper); color: var(--ink); border-radius: 18px; padding: 24px 26px;
  max-height: calc(100vh - 170px); overflow: auto; position: sticky; top: 20px;
  box-shadow: inset 0 0 0 1px rgba(201,163,39,.25);
  font-family: Georgia, 'Times New Roman', serif; font-size: 16.5px; line-height: 1.7;
}
@media (max-width: 980px) { .passage { position: static; max-height: 46vh; } }
.passage h3 { font-family: var(--serif); color: #8A6F13; margin-bottom: 2px; }
.passage .src { font-family: var(--sans); font-size: 12px; color: var(--ink2); margin-bottom: 14px; }
.passage p { margin: 0 0 12px; text-indent: 1.2em; }
.passage p:first-of-type { text-indent: 0; }
.passage .pair-note { font-family: var(--sans); font-size: 13px; line-height: 1.45; color: #5c4710; background: rgba(201,163,39,.16); border-radius: 10px; padding: 8px 12px; margin-bottom: 14px; }
.passage details.pair { margin-top: 20px; padding-top: 8px; border-top: 1px solid rgba(201,163,39,.45); }
.passage details.pair > summary { font-family: var(--serif); font-size: 1.1em; color: #8A6F13; cursor: pointer; padding: 8px 0; }
.argument { background: #fff; border: 1.5px solid var(--paperLine); border-left: 4px solid #C9A327; border-radius: 12px; padding: 16px 18px; font-size: 16.5px; line-height: 1.65; margin-bottom: 14px; }
.paper .exhibit { background: #fff; border: 1.5px solid var(--paperLine); border-left: 4px solid #C9A327; border-radius: 12px; padding: 14px 18px; margin: 12px 0 4px; font-family: var(--serif); font-size: 19px; line-height: 1.55; color: var(--ink); }

/* navigator (tests) */
.navgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; }
.navgrid button { height: 36px; border-radius: 9px; border: 1px solid var(--line2); background: rgba(255,255,255,.04); color: var(--muted); font-weight: 700; font-size: 12.5px; }
.navgrid button.ans { background: rgba(201,163,39,.18); color: var(--gold3); border-color: rgba(201,163,39,.4); }
.navgrid button.cur { outline: 2px solid var(--gold2); color: #fff; }
.navgrid button.flag { box-shadow: inset 0 -3px 0 var(--amber); }

/* ---------- results ---------- */
.sas-ring { position: relative; width: 168px; height: 168px; flex: none; }
.sas-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.sas-ring .v { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.sas-ring .v b { font-family: var(--serif); font-size: 44px; color: var(--gold2); line-height: 1; }
.sas-ring .v span { font-size: 11px; letter-spacing: 1.6px; color: var(--muted); text-transform: uppercase; font-weight: 700; margin-top: 4px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 10px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.tscroll { overflow-x: auto; }
.chart { width: 100%; height: auto; display: block; }
.review-item { border-radius: 14px; border: 1px solid var(--line2); background: rgba(255,255,255,.03); padding: 14px 16px; }
.review-item.ok { border-left: 3px solid var(--ok); }
.review-item.bad { border-left: 3px solid var(--bad); }
.review-item.skip { border-left: 3px solid var(--muted2); }
.review-item details summary { cursor: pointer; list-style: none; display: flex; gap: 10px; align-items: center; }
.review-item details summary::-webkit-details-marker { display: none; }
.review-body { margin-top: 12px; }
.band { display: flex; height: 12px; border-radius: 99px; overflow: hidden; }
.band i { flex: 1; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tab { padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line2); background: rgba(255,255,255,.03); color: var(--muted); font-weight: 700; font-size: 13px; }
.tab.on { background: rgba(201,163,39,.16); color: var(--gold3); border-color: rgba(201,163,39,.45); }

/* ---------- forms / login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login { width: 100%; max-width: 440px; }
/* Ash's badge sits ON TOP of the sign-in box and is exactly as wide as it (Ash, 2026-09-23: "on top
   and the same width as the log in outer box, not wider"): both fill the same 440px column. */
.login-grid { width: 100%; max-width: 440px; display: flex; flex-direction: column; align-items: stretch; gap: 18px; }
.login-hero, .login-hero picture { display: block; }
.login-logo { display: block; width: 100%; height: auto; border-radius: 50%; filter: drop-shadow(0 18px 40px rgba(0,0,0,.55)) drop-shadow(0 0 30px rgba(201,163,39,.14)); }
.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; }
/* the front door (2026-09-23): splash → choose a hub → sign in. The splash badge is the width of the
   sign-in box; the two hub badges sit side by side at every size, so the choice is one glance. */
.door { width: 100%; max-width: 440px; display: flex; flex-direction: column; align-items: stretch; }
.door.wide { max-width: 800px; }
.door-logo { display: block; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; transition: transform .25s ease; }
.door-logo:hover { transform: scale(1.01); }
.door-logo picture { display: block; }
.door-enter { margin-top: 22px; font-size: 17px; padding: 15px 18px; letter-spacing: .3px; }
.hub-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 4vw, 40px); }
.hub-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 0 6px; border: 0; background: none; color: inherit; cursor: pointer; border-radius: 22px; text-align: center; }
.hub-card picture { display: block; width: 100%; max-width: 340px; }
.hub-logo { display: block; width: 100%; height: auto; border-radius: 50%; filter: drop-shadow(0 16px 36px rgba(0,0,0,.55)); transition: transform .25s ease, filter .25s ease; }
.hub-card:hover .hub-logo, .hub-card:focus-visible .hub-logo { transform: translateY(-3px) scale(1.02); filter: drop-shadow(0 20px 40px rgba(0,0,0,.6)) drop-shadow(0 0 26px rgba(201,163,39,.35)); }
.hub-card b { font-family: var(--serif); font-size: clamp(18px, 2.4vw, 24px); color: var(--ivory); margin-top: 10px; }
.hub-card span { font-size: 12.5px; color: var(--muted); }
/* the Disclaimer button sits at the very bottom of the hub-choice screen (Ash, 2026-09-23) */
.door-legal { position: fixed; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: none; border: 0; color: var(--muted2); font: inherit; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; padding: 10px 14px; cursor: pointer; }
.door-legal:hover { color: var(--ivory); }
.legal-text h3 { font-size: 16px; color: var(--ivory); margin-bottom: 4px; }
.legal-text p { line-height: 1.6; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.input {
  width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04); color: var(--text); font-size: 15px; outline: none;
}
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,163,39,.2); }
.err { color: #F3A79D; font-size: 13px; min-height: 18px; }
select.input option { background: #0C162B; }

.modal-back { position: fixed; inset: 0; background: rgba(3,6,14,.72); backdrop-filter: blur(4px); z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal { width: 100%; max-width: 520px; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 90; background: #1B2A4A; border: 1px solid rgba(201,163,39,.45); color: var(--ivory); padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 600; font-size: 14px; }
@media (max-width: 900px) { .toast { bottom: calc(90px + env(safe-area-inset-bottom)); } }

.method { border-left: 3px solid var(--gold); padding: 4px 0 4px 14px; }
.method li { margin-bottom: 6px; }
.kbd { display: inline-block; padding: 1px 7px; border-radius: 6px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); font-size: 12px; font-weight: 700; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media print { .side, .bottom-nav, .topbar { display: none !important; } .main { margin: 0; } body { background: #fff; color: #000; } }

/* word links, gaps, small extras */
.chips.wl { margin: 8px 0 12px; }
.chip.wlc { cursor: pointer; font: inherit; font-weight: 700; font-size: 17px; transition: border-color .15s ease, background .15s ease; }
.chip.wlc:hover { border-color: #C9A327; }
.chip.wlc.sel { border-color: #C9A327; background: #FFF9E6; box-shadow: 0 0 0 2px rgba(201,163,39,.35); }
.chip.wlc.right { border-color: #2E9B69; background: #EAF8F0; }
.chip.wlc.wrong { border-color: #D2594B; background: #FDEEEC; }
.gapline { letter-spacing: 1px; color: #8A6F13; font-weight: 700; }
.review-body .paper { box-shadow: none; }
.levels .lvl[disabled] { cursor: not-allowed; }
a.btn { cursor: pointer; }
details > summary { cursor: pointer; }

/* Playfair's default old-style figures make 0 look like o — use lining figures everywhere */
body, h1, h2, h3, .serif, .stat-big, .stat b, .score-chip, .sas-ring .v b, .paper .qnum, .timer { font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: center; position: relative; z-index: 1; }
.hero-grid .rec { background: rgba(8, 15, 31, .45); border: 1px solid rgba(201,163,39,.28); border-radius: 14px; padding: 18px 20px; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }

sup { font-size: .72em; line-height: 0; }

/* ===== adaptive practice, access arrangements, phone pass ===== */

/* ---------- how shall we practise? ---------- */
.chooser { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice {
  text-align: left; padding: 12px 14px; border-radius: 12px; min-height: 62px;
  border: 1px solid var(--line2); background: rgba(255,255,255,.035); color: var(--text);
}
.choice b { display: block; font-size: 14px; }
.choice span { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.choice.on { border-color: rgba(201,163,39,.55); background: rgba(201,163,39,.14); }
.choice.on b { color: var(--gold3); }
.choice:disabled { opacity: .38; cursor: not-allowed; }
.choice.rev.on { border-color: rgba(226,109,95,.55); background: rgba(226,109,95,.13); }
.choice.rev.on b { color: #FFC4BB; }
.worklvl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.revtag {
  font-size: 12.5px; color: var(--gold3); background: rgba(201,163,39,.12);
  border: 1px solid rgba(201,163,39,.30); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px;
}

/* ---------- session summary ---------- */
.res-top { display: flex; gap: 28px; flex-wrap: wrap; align-items: center; }
.res-bar { flex: 1; min-width: 220px; }
.stat-big.sm { font-size: 34px; }
.notes { display: grid; gap: 10px; }
.note { padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.035); border: 1px solid var(--line2); }
.note.amber { border-color: rgba(231,169,59,.45); background: rgba(231,169,59,.10); }
.note b { color: var(--ivory); }
.skill-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(90px,1.3fr) 54px; gap: 10px; align-items: center; margin-top: 8px; }
.skill-row .num { text-align: right; }

/* ---------- access arrangements ---------- */
:root { --fs: 1; }
body.ts1 { --fs: 1.10; }
body.ts2 { --fs: 1.22; }
.paper .inst { font-size: calc(13px * var(--fs)); }
.paper .stem { font-size: calc(18px * var(--fs)); }
.paper .chip { font-size: calc(18px * var(--fs)); }
.paper .argument { font-size: calc(15.5px * var(--fs)); }
.opt { font-size: calc(16px * var(--fs)); }
.feedback { font-size: calc(15px * var(--fs)); }
.passage { font-size: calc(16.5px * var(--fs)); }
.passage p { line-height: calc(1.7 * var(--fs)); }
body.dys .paper, body.dys .passage, body.dys .opt, body.dys .feedback, body.dys .argument, body.dys .review-body {
  font-family: Verdana, 'Trebuchet MS', 'Segoe UI', sans-serif;
  letter-spacing: .02em; word-spacing: .09em; line-height: 1.78;
}

/* ---------- one-tap practice list ---------- */
.act-list { display: grid; gap: 8px; }
.act-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 13px 14px; border-radius: 13px; border: 1px solid var(--line2);
  background: rgba(255,255,255,.035); color: var(--text); min-height: 62px;
}
.act-row:hover { border-color: rgba(201,163,39,.45); background: rgba(201,163,39,.07); }
.act-row .an { font-weight: 700; color: var(--ivory); font-size: 14.5px; }
.act-row .ad { font-size: 11.5px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.act-row .arr { color: var(--gold2); font-weight: 800; flex: none; }
.act-row .meta { flex: none; text-align: right; display: grid; gap: 3px; justify-items: end; }
.act-row.soon { opacity: .55; }
.zone-head { display: flex; align-items: center; gap: 10px; margin: 26px 0 10px; }
.zone-head .zi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(201,163,39,.13); border: 1px solid rgba(201,163,39,.3); color: var(--gold2); }
.zone-head .zi svg { width: 18px; height: 18px; }
.zone-head h2 { margin: 0; font-size: 19px; }
.badge-due { background: rgba(226,109,95,.16); border: 1px solid rgba(226,109,95,.45); color: #FFC4BB; border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 700; }

/* ---------- phones and tablets ---------- */
@media (max-width: 900px) {
  .page-wrap { padding: 14px 14px calc(96px + env(safe-area-inset-bottom)); }
  .card { padding: 16px; border-radius: 14px; }
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  .grid { gap: 12px; }
}
@media (max-width: 760px) {
  /* the question header stays put, so the timer and Exit are always reachable */
  .qhead { position: sticky; top: 56px; z-index: 22; background: rgba(12,22,43,.96); backdrop-filter: blur(8px); padding: 10px 12px; gap: 8px; }
  .qhead .qt { font-size: 13px; width: 100%; }
  .progress-strip { order: 3; width: 100%; flex-basis: 100%; }
  .timer { font-size: 16px; padding: 3px 10px; }
  /* thumb-sized answers */
  .opt { padding: 14px 14px; min-height: 54px; border-radius: 13px; }
  .opts { gap: 9px; }
  .opts.cols5 { grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)); }
  .paper { padding: 20px 15px; }
  .paper .chip { padding: 9px 14px; }
  .seq .n { min-width: 52px; padding: 10px 8px; font-size: 18px; }
  /* one clear action at the bottom, big enough to hit */
  .qfoot { gap: 8px; margin-top: 14px; }
  .qfoot .btn { min-height: 50px; }
  .qfoot .btn.primary { flex: 1; font-size: 16px; }
  .tab { min-height: 44px; padding: 10px 13px; }
  .btn.sm { min-height: 40px; }
  .chooser { gap: 7px; }
  .choice { min-height: 58px; padding: 11px 12px; }
  .res-top { gap: 18px; }
  .skill-row { grid-template-columns: minmax(0,1fr) 54px; }
  .skill-row .bar { grid-column: 1 / -1; }
  .passage { max-height: 44vh; padding: 18px 16px; }
}
@media (max-width: 420px) {
  .chooser { grid-template-columns: 1fr; }
  .choice { min-height: 52px; }
  .stats { gap: 8px; }
}
/* iPad and other tablets: two columns is right, but the reading column must stay wide */
@media (min-width: 761px) and (max-width: 1100px) {
  .page-wrap { padding: 22px 22px 80px; }
  .passage-split { grid-template-columns: minmax(0, 1fr); }
  .passage { position: static; max-height: 52vh; }
}

/* ===== phone fixes, first render ===== */
/* a grid item will not shrink below its content unless told to — this is what pushed the
   option grid off the right of the screen at 390px */
.opt { min-width: 0; }
.opt > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.chip, .seq .n, .na .nb { overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .opts.cols5.words { grid-template-columns: 1fr; }
  .opts.cols5.nums { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .opts.cols5.nums .opt { padding: 12px 10px; }
  /* the action stays above the bottom nav, so it is always one thumb away */
  .qwrap .qfoot, .passage-split .qfoot {
    position: sticky; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 18;
    padding: 10px 0 8px; margin-top: 12px;
    background: linear-gradient(180deg, rgba(8,15,31,0), rgba(8,15,31,.94) 30%);
  }
  /* title and Exit share a row; the progress strip takes the row below */
  .qhead .qt { flex: 1; width: auto; min-width: 0; }
}

/* the sticky action reads as a bar, not a gradient over the card */
@media (max-width: 760px) {
  .qwrap .qfoot, .passage-split .qfoot {
    margin-left: -14px; margin-right: -14px; padding: 10px 14px 8px;
    background: rgba(8,15,31,.96); border-top: 1px solid var(--line2);
  }
}

/* ===== the week plan and the readiness ring on home ===== */
.home-top { display: flex; align-items: center; gap: 22px; }
@media (max-width: 620px) {
  .home-top { flex-direction: column; align-items: flex-start; gap: 14px; }
  .home-top .sas-ring { width: 128px; height: 128px; align-self: center; }
  .home-top .sas-ring .v b { font-size: 34px; }
}
.plan-list { display: grid; gap: 8px; }
.task {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 13px 14px; border-radius: 13px; min-height: 66px; color: var(--text);
  border: 1px solid var(--line2); background: rgba(255,255,255,.035);
}
.task:hover { border-color: rgba(201,163,39,.45); background: rgba(201,163,39,.07); }
.task .tick {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: 13px; background: rgba(255,255,255,.06); border: 1px solid var(--line2); color: var(--muted);
}
.task .tb { flex: 1; min-width: 0; display: grid; gap: 2px; }
.task .tb b { color: var(--ivory); font-size: 14.5px; }
.task .ts { font-size: 12px; color: var(--gold2); }
.task .tw { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.task .arr { color: var(--gold2); font-weight: 800; flex: none; }
/* a finished task is still a working link, so it stays readable: it is marked by its tick, a struck-through title
   and quieter colours, not by fading the whole row (a .62 fade put its small print under 4.5:1 — v30, lane H) */
.task.done .tick { background: rgba(67,181,129,.18); border-color: rgba(67,181,129,.5); color: #8CE3BA; }
.task.done .tb b { text-decoration: line-through; text-decoration-color: rgba(255,255,255,.45); color: var(--muted); }
.task.done .ts, .task.done .tw, .task.done .hw-due { color: var(--muted); }
.task.done .ico { opacity: .7; }

/* ===== the method card, the example and the method sheet (2026-09-23) ===== */
/* three numbered steps, each a bold lead and one plain sentence */
ol.steps { list-style: none; margin: 0; padding: 0; counter-reset: st; }
ol.steps li { counter-increment: st; position: relative; padding: 2px 0 12px 40px; line-height: 1.55; font-size: calc(14.5px * var(--fs)); color: var(--text); }
ol.steps li::before {
  content: counter(st); position: absolute; left: 0; top: 0; width: 27px; height: 27px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #1A1406; background: var(--goldGrad);
}
ol.steps li b { color: var(--ivory); }
.watch { margin-top: 6px; border-radius: 12px; padding: 12px 14px; background: rgba(231,169,59,.09); border: 1px solid rgba(231,169,59,.32); }
.watch .wt { font-size: 11px; letter-spacing: 1.8px; text-transform: uppercase; font-weight: 800; color: #F4C98A; }
.watch ul { margin: 8px 0 0; padding-left: 18px; }
.watch li { margin-bottom: 5px; font-size: calc(13.5px * var(--fs)); line-height: 1.5; color: var(--text); }
.examline { display: flex; gap: 9px; align-items: flex-start; margin-top: 12px; font-size: calc(13px * var(--fs)); color: var(--muted); line-height: 1.5; }
.examline svg { flex: none; margin-top: 2px; color: var(--gold2); }
/* the example: a real question, already answered, drawn a touch smaller than a live one */
.paper.example { padding: 20px 20px 18px; box-shadow: 0 10px 28px rgba(0,0,0,.35), inset 0 0 0 1px rgba(201,163,39,.3); }
.paper.example .qnum { text-transform: uppercase; letter-spacing: 1.6px; font-family: var(--sans, Inter, sans-serif); font-size: 11.5px; }
.paper.example .opt { cursor: default; }
.paper.example .stem { font-size: calc(16.5px * var(--fs)); }
.paper.example .feedback { margin-top: 14px; }
/* the example sits in a narrow card: words and short phrases wrap to as many columns as fit */
.paper.example .opts:not(.figs):not(.nums) { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.paper.example:not(.longopts) .opt > span:last-child { white-space: nowrap; }
.paper.example .opts.nums { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.paper.example.longopts .opts { grid-template-columns: 1fr; }
.paper.example .fig-grid { max-width: 280px; }
.paper.example .fig-cell svg { max-width: 76px; }
/* thumb-sized tap areas for links inside tables and prose (the device audit wants 36px) */
/* #view in the selector so it outranks the later "#view p a" rule, which trimmed these back to 29px */
#view a.tap { display: inline-block; padding: 9px 1px; margin: 0; }
#view p.tiny a.tap { padding: 12px 1px; }     /* p92: small print has a shorter line, so a longer reach to 40px+ */
.login p a { display: inline-block; padding: 9px 1px; margin: 0; }     /* p84: thumb-sized links in the sign-in box, as #view a.tap */
/* a flagged question in the progress strip */
.progress-strip i.flag { box-shadow: inset 0 -2px 0 var(--amber); }
.sheet {
  position: fixed; inset: 0; z-index: 60; background: rgba(4,8,18,.78); backdrop-filter: blur(4px);
  overflow: auto; padding: 24px 16px calc(40px + env(safe-area-inset-bottom));
}
.sheet-in {
  max-width: 760px; margin: 0 auto; background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: var(--shadow);
}
@media (max-width: 760px) { .sheet { padding: 12px 10px 40px; } .sheet-in { padding: 14px; } }
.sheet-in .method { padding-left: 30px; }   /* the numbers were sitting on the gold rule */

/* ===== non-verbal reasoning: figures ===== */
.fig-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.fig-grid { display: grid; gap: 8px; margin-top: 6px; max-width: 360px; }
.fig-cell { background: #fff; border: 1.5px solid var(--paperLine); border-radius: 10px; padding: 5px; display: grid; place-items: center; }
.fig-cell svg { display: block; width: 100%; height: auto; max-width: 92px; }
.fig-grid .fig-cell svg { max-width: 100%; }
.fig-cell.q { border-style: dashed; border-color: #C9A327; background: #FFFCF2; min-height: 68px; min-width: 68px; }
.fig-q { font-family: var(--serif); font-size: 26px; font-weight: 700; color: #8A6F13; }
.fig-sep { width: 2px; align-self: stretch; min-height: 56px; background: rgba(201,163,39,.55); margin: 0 4px; border-radius: 2px; }
.fig-arrow { color: #8A6F13; font-weight: 800; font-size: 18px; }
.fig-lbl { font-size: 12px; font-weight: 700; color: var(--ink2); letter-spacing: .4px; }
.fig-cell.target { border-color: #C9A327; box-shadow: 0 0 0 2px rgba(201,163,39,.25); }
.opts.figs { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.opt.fig { flex-direction: column; gap: 6px; padding: 8px 6px; align-items: center; }
.opt.fig svg { display: block; width: 100%; height: auto; max-width: 78px; }
.opt.fig .ol { width: calc(22px * var(--fs, 1)); height: calc(22px * var(--fs, 1)); font-size: calc(11px * var(--fs, 1)); }
@media (max-width: 760px) {
  .opts.figs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fig-cell svg { max-width: 72px; }
  .fig-grid { max-width: 300px; }
}

/* ===== non-verbal picture questions (v31, p70) =====
 * --nvt is the one tile size for a question: stem, grid cells, fold stages, the target shape and all five options, so
 * a hidden shape is drawn at exactly the size it is hidden in the designs. The option buttons are sized to the tile
 * (not the tile to the button), and wrap: five across on a laptop, three on a phone. */
.paper { --nvt: clamp(96px, 11vw, 132px); }
.nvt { display: inline-block; width: var(--nvt); height: var(--nvt); flex: none; background-repeat: no-repeat; background-color: #fff; border: 1.5px solid var(--paperLine); border-radius: 10px; box-sizing: border-box; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.nvr-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.nvr-arr { color: #8A6F13; font-weight: 800; font-size: 18px; }
.nvr-row.fold .nvt.punched, .nvr-row.target .nvt { border-color: #C9A327; box-shadow: 0 0 0 2px rgba(201,163,39,.28); }
.nvr-lbl { font-size: 12px; font-weight: 700; color: var(--ink2); letter-spacing: .4px; }
.nvr-grid { display: grid; gap: 8px; margin-top: 8px; width: max-content; max-width: 100%; }
.nvt.nvq { display: grid; place-items: center; border: 2px dashed #C9A327; background: #FFFCF2; font-family: var(--serif); font-size: 30px; font-weight: 700; color: #8A6F13; }
.opts.figs.nvr { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 10px; grid-template-columns: none; }
.opts.figs.nvr .opt.fig { width: auto; flex: none; padding: 6px 6px 8px; gap: 6px; }
.opts.figs.nvr .opt.fig .nvt { border: 0; border-radius: 6px; }
.nvr-sol { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.nvr-sol .nvt { width: calc(var(--nvt) * 1.3); height: calc(var(--nvt) * 1.3); border: 2px solid #d97706; }
.nvr-sol .small.muted { color: inherit; opacity: .82; font-weight: 600; }
.nvr-missing { padding: 18px; border: 1.5px dashed var(--paperLine); border-radius: 10px; color: var(--ink2); }
@media (max-width: 760px) { .paper { --nvt: min(22vw, 100px); } .opts.figs.nvr { gap: 8px; justify-content: center; } .opts.figs.nvr .opt.fig { padding: 5px 5px 7px; } .nvr-row, .nvr-grid { margin-left: auto; margin-right: auto; } .nvr-row { justify-content: center; } }
@media (max-width: 380px) { .paper { --nvt: 21vw; } }
.paper.example { --nvt: 92px; }
/* p78: tiles sized from the question card, not the screen (an iPad has no sidebar, so it got the smallest tiles) */
@supports (width: 1cqi) {
  .paper.nvr:not(.example) { container-type: inline-size; --nvt: clamp(84px, calc((100cqi - 118px) / 5), 144px); }
  @media (max-width: 760px) { .paper.nvr:not(.example) { --nvt: clamp(68px, calc((100cqi - 58px) / 3), 112px); } }
}

/* ===== the CAT4-style page: choose the whole test or a part (v31, p72) ===== */
.c4choose .c4row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.c4choose .c4row.one { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.c4p { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--paperLine); background: var(--paper); color: var(--ink); cursor: pointer; font: inherit; min-height: 44px; }
.c4p b { font-size: 15px; }
.c4p .c4n { font-size: 12.5px; color: var(--ink2); }
.c4p .c4q { font-size: 12px; font-weight: 700; color: #8A6F13; }
.c4p.on { border-color: #C9A327; box-shadow: 0 0 0 2px rgba(201,163,39,.35); background: #FFFCF2; }
:root[data-theme="dark"] .c4p.on { background: rgba(201,163,39,.12); }
.c4row.one .c4p { padding: 10px 12px; }
.c4table tr.c4part td { font-weight: 800; font-size: 12px; letter-spacing: .5px; text-transform: uppercase; color: var(--gold2); background: rgba(201,163,39,.08); }
body:not(.light) .c4table .pill { color: #C3C9D6; }
@media (max-width: 760px) { .c4choose .c4row, .c4choose .c4row.one { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===== the polish pass ===== */
/* Restrained, expensive-feeling detail. Three rules held throughout:
   nothing celebratory, nothing that moves layout, and everything off under reduced motion. */

:root {
  --gold-soft: #CBB68A;            /* a quieter gold for secondary text, so gold stops shouting */
  --e1: 0 1px 2px rgba(0,0,0,.28);
  --e2: 0 6px 18px rgba(0,0,0,.34);
  --e3: 0 18px 44px rgba(0,0,0,.42);
  --ease: cubic-bezier(.22,.9,.3,1);
}

/* ---------- surfaces: lit from above ---------- */
.card { position: relative; box-shadow: var(--e2); }
.card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,0) 42%);
}
.card.gold { box-shadow: var(--e3); }
.card.flat::after { display: none; }
.zone-card, .act-row, .task, .choice, .test-card { transition: transform .16s var(--ease), border-color .16s var(--ease), background .16s var(--ease), box-shadow .16s var(--ease); }
.zone-card:hover, .act-row:hover, .task:hover, .test-card:hover { transform: translateY(-1px); box-shadow: var(--e2); }
.zone-card:active, .act-row:active, .task:active, .choice:active, .opt:active { transform: translateY(0) scale(.994); }

/* ---------- headings: a hairline rule, not a heavy one ---------- */
h2 { position: relative; }
#view > h2::after, .row > h2::after {
  content: ''; display: block; width: 34px; height: 2px; margin-top: 7px; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), rgba(201,163,39,0));
}

/* ---------- buttons: press, and a slow sheen on hover ---------- */
.btn { transition: transform .12s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease), border-color .16s var(--ease); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.primary { position: relative; overflow: hidden; }
.btn.primary::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 42%; left: -60%;
  background: linear-gradient(100deg, rgba(255,255,255,0), rgba(255,255,255,.34), rgba(255,255,255,0));
  transform: skewX(-18deg); transition: left .6s var(--ease); pointer-events: none;
}
.btn.primary:hover::after { left: 120%; }

/* ---------- the answer options ---------- */
.opt { transition: transform .12s var(--ease), border-color .14s var(--ease), background .14s var(--ease), box-shadow .14s var(--ease); }
.opt:not([disabled]):hover { transform: translateY(-1px); }
.opt.sel { animation: optPick .22s var(--ease); }
@keyframes optPick { 0% { transform: scale(.985); } 100% { transform: scale(1); } }
.feedback { animation: fbIn .28s var(--ease) both; }
@keyframes fbIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- progress and bars fill rather than jump ---------- */
.progress-strip i { transition: background .3s var(--ease); }
.bar i { transition: width .7s var(--ease); }

/* ---------- route entrance and list stagger ---------- */
#view { opacity: 0; transform: translateY(6px); }
#view.shown { opacity: 1; transform: none; transition: opacity .26s var(--ease), transform .3s var(--ease); }
.rise { animation: riseIn .34s var(--ease) both; animation-delay: calc(var(--i, 0) * 26ms); }
/* no "to" keyframe: the rise ends on the element's OWN opacity. An explicit "to { opacity: 1 }" with fill-mode
   both pinned every staggered item at full strength for good, so a finished task (.task.done, .62) never
   looked finished (v30, lane H). */
@keyframes riseIn { from { opacity: 0; transform: translateY(7px); } }

/* ---------- focus: visible for a keyboard, invisible for a mouse ---------- */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--gold2); outline-offset: 2px; border-radius: 8px;
}
.opt:focus-visible, .task:focus-visible, .act-row:focus-visible { outline-offset: 3px; }

/* ---------- reading surfaces ---------- */
.paper .stem { max-width: 62ch; }          /* a comfortable line length, even on a wide screen */
.passage { scrollbar-width: thin; scrollbar-color: rgba(201,163,39,.45) transparent; }
.passage::-webkit-scrollbar { width: 8px; }
.passage::-webkit-scrollbar-thumb { background: rgba(201,163,39,.4); border-radius: 8px; }
.passage::-webkit-scrollbar-track { background: transparent; }
html { scroll-behavior: smooth; }
.qhead, h2 { scroll-margin-top: 78px; }

/* ---------- the nav ---------- */
.nav-btn { transition: background .16s var(--ease), color .16s var(--ease), box-shadow .16s var(--ease); }
.side .nav-btn.on { text-shadow: 0 0 18px rgba(201,163,39,.35); }
.bottom-nav .nav-btn { font-size: 11px; }        /* 10.5px failed the audit's legibility bar */
.bottom-nav .nav-btn.on svg { filter: drop-shadow(0 0 6px rgba(201,163,39,.45)); }

/* ---------- quieter gold where gold was doing too much ---------- */
.li .ls, .act-row .ad, .task .tw, .test-meta .pill { color: var(--muted); }
.tiny.gold, .small.gold { color: var(--gold-soft); }

@media (prefers-reduced-motion: reduce) {
  #view, #view.shown { opacity: 1; transform: none; transition: none; }
  .rise { animation: none; }
  .btn.primary::after { display: none; }
  html { scroll-behavior: auto; }
}

/* ---------- a question should not sit at the top of a tall, empty screen ----------
   AUTO MARGINS, never justify-content: when the question is taller than the screen the autos
   resolve to zero and nothing is pushed out of reach. The Exam Zone app broke a game by centring
   the whole content block including its score bar — here .qwrap holds only the paper and the
   footer, and the question header is a separate element above it. */
@media (min-width: 761px) and (min-height: 640px) {
  .qwrap { display: flex; flex-direction: column; min-height: calc(100vh - 215px); }
  .qwrap > :first-child { margin-top: auto; }
  .qwrap > :last-child { margin-bottom: auto; }
}
/* a link in a sentence gets a little more to aim at without breaking the line */
#view p a, .li a { padding: 3px 1px; margin: -3px -1px; border-radius: 4px; }

/* ---------- the GCSE hub (gcsehub.js) ---------- */
.grade-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 10px; }
.grade-tile { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; min-height: 96px; border-radius: 14px; background: rgba(255,255,255,.035); border: 1px solid var(--line2); color: inherit; text-decoration: none; transition: border-color .2s, transform .2s; }
.grade-tile:hover, .grade-tile:focus-visible { border-color: rgba(201,163,39,.45); transform: translateY(-1px); }
.grade-tile .gs { font-size: 11px; letter-spacing: 1.1px; text-transform: uppercase; font-weight: 700; color: var(--muted); line-height: 1.3; }
.grade-tile b { font-family: var(--serif); font-size: 34px; line-height: 1.05; color: var(--gold2); font-weight: 600; margin-top: auto; }
.grade-tile .gr { font-size: 12px; color: var(--muted); }
.grade-tile.pending b { color: var(--muted2); }
.board-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.board-card { text-align: left; padding: 18px 18px 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); color: inherit; cursor: pointer; font: inherit; transition: border-color .2s, background .2s, transform .2s; }
.board-card b { display: block; font-family: var(--serif); font-size: 22px; color: var(--ivory); font-weight: 600; }
.board-card span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.board-card:hover, .board-card:focus-visible { border-color: rgba(201,163,39,.55); transform: translateY(-1px); }
.board-card.on { border-color: rgba(201,163,39,.7); background: rgba(201,163,39,.12); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 7px 12px; border: 1px solid var(--line2); border-radius: 999px; font-size: 13px; font-weight: 500; letter-spacing: normal; text-transform: none; color: var(--text); cursor: pointer; background: rgba(255,255,255,.03); }   /* not the .field label caps */
.checks label:has(input:checked) { border-color: rgba(201,163,39,.55); background: rgba(201,163,39,.12); color: var(--gold3); }
.checks input { accent-color: var(--gold); width: 16px; height: 16px; margin: 0; }
@media (max-width: 640px) { .board-pick { grid-template-columns: 1fr; } .grade-tile b { font-size: 30px; } }
/* a pill that is a link (Set your target grade, Choose your exam board) is a tap target: thumb height */
.hero a.pill { min-height: 36px; display: inline-flex; align-items: center; }
/* powers in maths questions stay readable (they were 10.8px) */
.paper sup, .paper sub { font-size: max(11.5px, .75em); }
/* a numbered .method list (papers and writing pages): the numbers sit clear of the gold rule */
ol.method { padding-left: 34px; }

/* ==========================================================================
   v30 — lane H: the app shell
   ========================================================================== */
/* colours the new pieces use, so the light theme can redefine them in one place */
:root { --track: rgba(255,255,255,.1); --okText: #8CE3BA; --badText: #F3A79D; --amberText: #F4C98A; --surface: rgba(255,255,255,.035); }
.capnote { color: var(--amberText); }

/* ---------- is my work saved? (auth.js SaveStatus) ----------
   One line, a fixed height, never wraps: a change of wording can never move anything else. */
.save-status { display: flex; align-items: center; gap: 7px; min-height: 18px; font-size: 12px; line-height: 18px; color: var(--muted); white-space: nowrap; overflow: hidden; min-width: 0; }
.save-status .ss-t { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.save-status .ss-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--muted2); }
.save-status[data-state="saved"] .ss-dot { background: var(--ok); }
.save-status[data-state="saving"] .ss-dot { background: var(--gold); }
.save-status[data-state="offline"] .ss-dot { background: var(--amber); }
.save-status[data-state="nostore"] .ss-dot { background: var(--bad); }
.save-status:not([data-state]) { visibility: hidden; }          /* nothing to say yet: the space is kept */
/* in the sidebar the longest message ("Demo — saved on this device only") needs two lines: always keep two */
.side-foot .save-status { margin-bottom: 8px; white-space: normal; align-items: flex-start; height: 36px; min-height: 36px; line-height: 18px; }
.side-foot .save-status .ss-dot { margin-top: 6px; }
.side-foot .save-status .ss-t { overflow: hidden; }
.topbar .bt-col { display: flex; flex-direction: column; justify-content: center; min-width: 0; line-height: 1.15; }
.topbar .save-status { font-size: 11px; min-height: 15px; line-height: 15px; margin-top: 2px; }

/* ---------- the first week (views.js E.onboardingHTML) ---------- */
.onboard { padding: 16px 18px; }
.onb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.onb-title { font-size: 18px; margin: 0 0 2px; }
.onb-steps { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.onb-steps a { display: flex; align-items: center; gap: 10px; min-height: 48px; height: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--surface); color: var(--text); text-decoration: none; font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.onb-steps a:hover { border-color: rgba(201,163,39,.45); }
.onb-tick { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--gold2); background: rgba(201,163,39,.10); border: 1px solid rgba(201,163,39,.35); }
.onb-steps li.done a { color: var(--muted); }
.onb-steps li.done .onb-tick { color: var(--okText); background: rgba(67,181,129,.16); border-color: rgba(67,181,129,.5); }
.onb-steps li.next a { border-color: rgba(201,163,39,.55); background: rgba(201,163,39,.10); }
@media (max-width: 1100px) { .onb-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .onb-steps { grid-template-columns: minmax(0, 1fr); } }

/* ---------- homework from Ash in the week plan (plan.js, look.js taskRow) ---------- */
.task.hw { border-color: rgba(201,163,39,.42); background: linear-gradient(115deg, rgba(201,163,39,.11), var(--surface) 62%); }
.hw-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 2px; }
.hw-tag { font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--gold3); background: rgba(201,163,39,.16); border: 1px solid rgba(201,163,39,.42); border-radius: 99px; padding: 1px 8px; line-height: 16px; }
.hw-due { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.hw-due.late { color: var(--amberText); }

/* ---------- add to home screen (views.js) ---------- */
.a2hs { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; margin-top: 16px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.a2hs .a2-ico { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--gold2); background: rgba(201,163,39,.12); border: 1px solid rgba(201,163,39,.3); }
.a2hs .a2-ico svg { width: 18px; height: 18px; }
.a2hs .a2-t { flex: 1; min-width: 190px; margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--text); }
.a2hs .a2-t b { color: var(--ivory); }

/* ---------- Account ---------- */
fieldset.field { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
fieldset.field > legend { padding: 0; margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.acc-grid { gap: 0 28px; }
details.cp > summary { color: var(--gold2); font-weight: 600; padding: 6px 0; }
.share-url { font-size: 13px; }

/* ---------- my report ---------- */
.report-bar { gap: 8px; }
@media print {
  .no-print, .save-status, .a2hs, .resume-banner, .onboard { display: none !important; }
  #view, #view.shown { opacity: 1 !important; transform: none !important; }
  .page-wrap { padding: 0; max-width: none; }
}

/* ---------- tables that stack on a phone (contract C5) ----------
   <table class="table stack"> with data-label="<column heading>" on every td: under 560px each row becomes
   a card, and each value has its column's name in front of it. Empty cells disappear. */
@media (max-width: 560px) {
  .table.stack, .table.stack tbody, .table.stack tr, .table.stack td { display: block; width: 100%; }
  .table.stack thead, .table.stack th { display: none; }
  /* a heading row written without <thead>: its own rule, because a browser that cannot read :has() (an older iPad)
     throws away the WHOLE rule it sits in — and then the headings above would show as well */
  .table.stack tr:has(> th) { display: none; }
  .table.stack tr { margin: 0 0 10px; padding: 4px 12px; border: 1px solid var(--line2); border-radius: 12px; background: var(--surface); }
  .table.stack tr:last-child { margin-bottom: 0; }
  .table.stack td { position: relative; min-height: 34px; padding: 8px 0 8px 40%; text-align: left; border-bottom: 1px solid var(--line2); overflow-wrap: anywhere; }
  .table.stack td.num { text-align: left; }
  .table.stack tr > td:last-child { border-bottom: 0; }
  .table.stack td::before { content: attr(data-label); position: absolute; left: 0; top: 10px; width: calc(40% - 12px); font-size: 11px; line-height: 1.3; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
  .table.stack td[data-label=""], .table.stack td:not([data-label]) { padding-left: 0; }
  .table.stack td[data-label=""]::before, .table.stack td:not([data-label])::before { content: none; }
  .table.stack td:empty { display: none; }
  .table.stack td.act-cell { text-align: right; }
}

/* ---------- tap targets on a phone (v30) ----------
   A link or button drawn as a pill ("Set your target", the GCSE board "AQA") is something a thumb aims at:
   44px tall on a phone. Pills that only show a figure stay small. */
@media (max-width: 760px) {
  #view a.pill, #view button.pill { min-height: 44px; display: inline-flex; align-items: center; padding-top: 6px; padding-bottom: 6px; }
  .checks label { min-height: 44px; }
  /* an email address in the middle of a sentence (the disclaimer): padding on an inline link widens where a thumb can
     land without moving the lines around it */
  #view .legal-text a, .legal-text a { padding: 12px 0; margin: 0; }       /* #view: outranks "#view p a" (3px) */
}
/* a long pill (Est. SAS 115 · verbal + quantitative) may wrap on a narrow phone rather than run off the card */
@media (max-width: 420px) { .hero .pill { white-space: normal; } }

/* ==========================================================================
   The light theme (v30): cream page, white cards, navy text, gold accents.
   Chosen in Account → How you work best → Appearance. body.light redefines the colour variables; the rules
   below cover the places where the dark design used a literal colour. The front door is always dark.
   Every text colour here was measured at 4.5:1 or better against the surface it sits on (sweep/h_light.js).
   ========================================================================== */
body.light {
  --bg: #FAF7F2; --bg2: #F3EEE4; --panel: #FFFFFF; --panel2: #FFFFFF; --panel3: #FFFDF8;
  --line: rgba(169,132,26,.34); --line2: rgba(15,35,71,.12);
  --gold2: #7D5F0C; --gold3: #6E5410; --gold-soft: #7D5F0C;
  --ivory: #0F2347; --text: #1E2A45; --muted: #566079; --muted2: #5B6479;
  --ok: #2E9B69; --okBg: rgba(46,155,105,.12); --bad: #C74A3C; --badBg: rgba(199,74,60,.10); --amber: #B7791F;
  --paper: #FFFFFF; --ink: #16213A; --ink2: #4A5570;
  --shadow: 0 10px 28px rgba(15,35,71,.08);
  --e1: 0 1px 3px rgba(15,35,71,.07); --e2: 0 6px 18px rgba(15,35,71,.08); --e3: 0 14px 34px rgba(15,35,71,.10);
  --track: rgba(15,35,71,.12); --okText: #1D6B47; --badText: #A33A2E; --amberText: #7A4D00; --surface: #FFFFFF;
  background-image: radial-gradient(1200px 600px at 85% -10%, rgba(201,163,39,.10), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(15,35,71,.04), transparent 60%);
  color-scheme: light;
}
/* the shell */
body.light .side { background: linear-gradient(180deg, #FFFFFF, #FBF8F2); }
body.light .brand img { filter: drop-shadow(0 8px 18px rgba(15,35,71,.18)); }
body.light .nav-btn:hover { background: rgba(15,35,71,.05); }
body.light .side .nav-btn.on { text-shadow: none; }
body.light .topbar { background: rgba(255,255,255,.93); }
body.light .topbar .bt b, body.light .brand .bt b { background: none; color: var(--gold2); }
body.light .bottom-nav { background: rgba(255,255,255,.97); box-shadow: 0 -6px 18px rgba(15,35,71,.06); }
body.light .bottom-nav .nav-btn.on svg { filter: none; }
body.light .toast { background: #0F2347; color: #FFFFFF; border-color: rgba(201,163,39,.55); }
body.light .sheet, body.light .modal-back { background: rgba(15,35,71,.42); }
/* surfaces */
body.light .card::after { display: none; }                       /* a white sheen on white is only a grey film over the text */
body.light .card.gold { background: linear-gradient(160deg, rgba(201,163,39,.13), #FFFFFF 46%); border-color: rgba(169,132,26,.40); }
body.light .card.flat { background: #FFFFFF; }
body.light .stat, body.light .li, body.light .act-row, body.light .task, body.light .review-item, body.light .note, body.light .focus-row, body.light .qhead, body.light .board-card { background: #FFFFFF; }
body.light .stat, body.light .task, body.light .li { box-shadow: var(--e1); }
body.light .lvl, body.light .tab, body.light .choice, body.light .navgrid button, body.light .checks label, body.light .grade-tile { background: rgba(15,35,71,.035); }
body.light .tab.on, body.light .choice.on, body.light .navgrid button.ans, body.light .board-card.on { background: rgba(201,163,39,.14); }
body.light .checks label:has(input:checked) { background: rgba(201,163,39,.14); }     /* on its own: see .table.stack above */
body.light .task.hw { background: linear-gradient(115deg, rgba(201,163,39,.12), #FFFFFF 62%); }
body.light .zone-card { background: linear-gradient(160deg, rgba(var(--zr, 125,95,12), .09), #FFFFFF 62%); box-shadow: var(--e1); }
body.light .zone-card:hover, body.light .tile:hover, body.light .task:hover { box-shadow: var(--e2); }
body.light .tile { background: linear-gradient(155deg, rgba(var(--zr), .08), rgba(255,255,255,0) 62%), #FFFFFF; box-shadow: var(--e1); }
body.light .tile:hover { background: linear-gradient(155deg, rgba(var(--zr), .13), rgba(255,255,255,0) 62%), #FFFFFF; }
body.light .test-card.paper { background: linear-gradient(160deg, rgba(201,163,39,.10), #FFFFFF 55%); }
body.light .review-banner { background: linear-gradient(120deg, rgba(var(--zr), .12), #FFFFFF 70%); }
body.light .resume-banner { background: linear-gradient(120deg, rgba(201,163,39,.14), #FFFFFF 70%); border-color: rgba(169,132,26,.45); }
body.light .ico { box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 3px 10px rgba(15,35,71,.08); }
body.light .hero-grid .rec { background: rgba(15,35,71,.04); }
body.light .table.stack tr { background: #FFFFFF; }
/* pills, badges, small print */
body.light .pill { background: rgba(15,35,71,.05); }
body.light .pill.gold { background: rgba(201,163,39,.14); border-color: rgba(169,132,26,.45); }
body.light .pill.ok { color: var(--okText); }
body.light .pill.bad { color: var(--badText); }
body.light .pill.amber { color: var(--amberText); }
body.light .badge-due { color: var(--badText); background: rgba(199,74,60,.09); border-color: rgba(199,74,60,.38); }
/* a small tag carries its own opaque base, so it reads the same wherever it sits on a tinted card */
body.light .tag-new { background-color: #FFFFFF; background-image: linear-gradient(rgba(var(--zr, 125,95,12), .10), rgba(var(--zr, 125,95,12), .10)); }
body.light .choice.rev.on b { color: var(--badText); }
body.light .watch .wt { color: var(--amberText); }
body.light .err { color: var(--badText); }
body.light .timer.warn { color: var(--badText); }
body.light .task .tn { color: #FFFFFF; border-color: #FFFFFF; }
body.light .task.done .tick { color: var(--okText); }
body.light .task.done .tb b { text-decoration-color: rgba(15,35,71,.35); }
body.light .navgrid button.cur { color: var(--ivory); }
body.light .kbd { background: rgba(15,35,71,.06); border-color: rgba(15,35,71,.16); }
/* controls */
body.light .btn.ghost { background: #FFFFFF; border-color: rgba(169,132,26,.52); }
body.light .btn.ghost:hover { background: rgba(201,163,39,.10); }
body.light .input { background: #FFFFFF; border-color: rgba(15,35,71,.22); }
body.light select.input option { background: #FFFFFF; color: var(--text); }
body.light .bar { background: rgba(15,35,71,.09); }
body.light .progress-strip i { background: rgba(15,35,71,.12); }
/* the question paper and the reading panel: white paper on a cream page needs an edge */
body.light .paper { box-shadow: 0 10px 28px rgba(15,35,71,.09), inset 0 0 0 1px rgba(169,132,26,.30); }
body.light .paper.example { box-shadow: 0 6px 18px rgba(15,35,71,.07), inset 0 0 0 1px rgba(169,132,26,.32); }
body.light .passage { background: #FFFDF7; box-shadow: inset 0 0 0 1px rgba(169,132,26,.32); }
@media (max-width: 760px) {
  body.light .qhead { background: rgba(255,255,255,.97); }
  body.light .qwrap .qfoot, body.light .passage-split .qfoot { background: rgba(250,247,242,.97); }
}
/* charts and rings drawn by results.js with colours chosen for navy (presentation attributes, so CSS wins) */
body.light .sas-ring svg circle:first-of-type { stroke: rgba(15,35,71,.10); }
body.light .chart line[stroke^="rgba(255"] { stroke: rgba(15,35,71,.10); }
body.light .chart text[fill="#7C8499"] { fill: #5B6479; }
body.light .chart text[fill="#7FE0B0"] { fill: #1D6B47; }
body.light .chart line[stroke="#43B581"] { stroke: #2E9B69; }
body.light .chart path[stroke="#E3C566"] { stroke: #A8841A; }
body.light .chart circle[stroke="#E3C566"] { stroke: #A8841A; fill: #FFFFFF; }
body.light #view [style*="color:#F4C98A"] { color: var(--amberText) !important; }
/* two colours drawn by other files that fall just short of 4.5:1 in BOTH themes (measured by sweep/h_light.js),
   guarded here until their owners change them: the Results chart's axis labels (#7C8499 on the navy card, 4.2:1)
   and a figure's highlighted label (fig.js HI #9a6c00 on the cream question paper, 4.4:1) */
.chart text[fill="#7C8499"] { fill: #A3ABBD; }
.qfigure text[fill="#9a6c00" i] { fill: #8a6000; }
