/* Student mode (learn/). One column on light graph-paper ground; a route of waypoints is the recurring motif. */
/* Bright light theme for students aged about 13-18: one light look on every device (no automatic dark mode).
   The bright colours are for fills and borders; text on tinted backgrounds uses the darker -ink shades,
   so every text/background pair meets WCAG AA contrast. */
:root {
  color-scheme: light;
  --paper: #f4f6ff; --surface: #ffffff; --ink: #1d1b3a; --muted: #5d5a7a; --line: #e2e0f2; --grid: rgba(91, 61, 245, .06);
  --accent: #5b3df5; --accent-deep: #3f22d6; --accent-ink: #ffffff; --accent-soft: #ece8ff;
  --pink: #ff4f8b; --pink-soft: #ffe6ef;
  --sun: #ff8a1f; --sun-deep: #e86f00; --sun-ink: #a34700; --sun-soft: #fff0e0;
  --ok: #10a35a; --ok-deep: #0b8447; --ok-ink: #0a6b3a; --ok-soft: #e1f8eb;
  --blue: #0ea5e9; --blue-deep: #0284c7; --blue-ink: #075985; --blue-soft: #e0f4fe;
  --idle: #9b98b5; --idle-soft: #f0eff8;
  --shadow: 0 1px 2px rgba(29, 27, 58, .06), 0 6px 18px rgba(91, 61, 245, .08);
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r: 18px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  background-color: var(--paper); color: var(--ink); font: 17px/1.55 var(--body);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
}
.wrap { max-width: 760px; margin: 0 auto; padding-block: 0 64px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; text-wrap: balance; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); font-weight: 800; }
h2 { font-size: 1.35rem; font-weight: 700; }
h3 { font-size: 1.08rem; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.stack { display: grid; gap: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* top bar */
.top { display: flex; align-items: center; gap: 12px; padding-block: 18px 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; cursor: pointer; }
.brand-mark { width: 34px; height: 34px; }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 1.2rem; }
.pill { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: .92rem; }
.pill b { font-weight: 700; }
.proto { font-size: .8rem; color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 18px; background: var(--surface); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 18px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 700; text-align: center; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--muted); font-weight: 400; text-decoration: underline; text-underline-offset: 3px; min-height: 40px; padding: 8px 6px; }
.btn:disabled { opacity: .45; cursor: default; }

/* home */
.hello { padding-block: 10px 6px; }
.choices2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 14px; }
.big { text-align: left; display: grid; gap: 8px; padding: 22px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.big:hover { border-color: var(--accent); }
.big .ico { width: 40px; height: 40px; }
.big h2 { font-size: 1.25rem; }
.big.lead-choice { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.lead-choice h2 { font-size: 1.45rem; }
.ready-choice .ico { width: 30px; height: 30px; flex: none; }
.lead { font-size: 1.12rem; font-weight: 700; color: var(--sun-ink); }
.changes h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-family: var(--body); }
.time { display: inline-flex; gap: 6px; align-items: center; font-size: .82rem; color: var(--muted); }

.grid-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.legend span { display: inline-flex; gap: 5px; align-items: center; }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.d-solid { background: var(--ok); } .d-refresh { background: var(--blue); } .d-build { background: var(--sun); } .d-none { background: var(--idle-soft); border: 1px solid var(--line); }
.mm-group { display: grid; gap: 8px; }
.mm-group h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-family: var(--body); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; border-radius: 10px; padding: 7px 11px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: .9rem; text-align: left; }
.chip .dot { flex: none; }
.chip:hover { border-color: var(--muted); }

/* picker */
.search { width: 100%; font: inherit; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.tlist { display: grid; gap: 6px; }
.titem { display: flex; justify-content: space-between; gap: 12px; align-items: center; text-align: left; width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.titem:hover { border-color: var(--accent); }
.titem small { color: var(--muted); flex: none; }
.titem small .ti-status { color: var(--ink); font-weight: 600; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; flex-wrap: wrap; }
.seg button { border: 0; background: var(--surface); padding: 10px 14px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 700; }

/* check-in */
.progress { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pdot { width: 12px; height: 12px; border-radius: 50%; background: var(--idle-soft); border: 1px solid var(--line); }
.pdot.done { background: var(--accent); border-color: var(--accent); }
.pdot.now { outline: 2px solid var(--accent); outline-offset: 2px; }
.nudge { font-size: .92rem; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.qtext { font-size: 1.22rem; line-height: 1.5; }
.fig { color: var(--ink); }
.fig svg { width: 100%; height: auto; display: block; }
.opts { display: grid; gap: 10px; }
.opt { display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-size: 1.08rem; }
.opt .k { font-family: var(--display); font-weight: 800; color: var(--muted); min-width: 1.2em; }
.opt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.opt[aria-pressed="true"] .k { color: var(--accent); }
.opt.is-right { border-color: var(--ok); background: var(--ok-soft); }
.opt.is-pick-wrong { border-color: var(--sun); }
.ans { width: 100%; font: inherit; font-size: 1.15rem; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); }
.ans:focus { border-color: var(--accent); outline: none; }
.confirm { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .confirm { grid-template-columns: 1fr; } }
.fb { border-radius: 12px; padding: 16px 18px; display: grid; gap: 8px; background: var(--idle-soft); }
.fb.right { background: var(--ok-soft); }
.fb .lab { font-family: var(--display); font-weight: 700; font-size: 1.1rem; }
.fb.right .lab { color: var(--ok-ink); }

/* plan */
.solid-row { display: flex; flex-wrap: wrap; gap: 8px; }
.gap-list { display: grid; gap: 14px; }
.gap-item { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.gap-item:first-child { border-top: 0; padding-top: 0; }
.gap-item .name { font-weight: 700; }
.gap-item p { margin: 0; }
.stack.tight { gap: 6px; }
.knock-row { display: flex; flex-wrap: wrap; gap: 6px; }
.t-knock { background: transparent; color: var(--ink, inherit); border: 1px dashed var(--line); font-weight: 600; }
.t-knock.missed { border-style: solid; border-color: var(--sun); }
.step .why { color: var(--muted, inherit); }
.tag { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.t-solid { background: var(--ok-soft); color: var(--ok-ink); }
.t-start { background: var(--sun-soft); color: var(--sun-ink); }
.t-build { background: var(--sun-soft); color: var(--sun-ink); }
.t-refresh { background: var(--blue-soft); color: var(--blue-ink); }
.t-none { background: var(--idle-soft); color: var(--muted); }
.t-goal { background: var(--accent-soft); color: var(--accent); }
.t-done { background: var(--ok-soft); color: var(--ok-ink); }
.t-pass { background: var(--sun-soft); color: var(--sun-ink); display: inline-flex; align-items: center; gap: 4px; }
.ico-inline { width: 12px; height: 12px; flex: none; }
.collapse-empty > p:empty, .collapse-empty > div:empty { display: none; }
/* a pill that is a link (privacy, terms, pricing and pay pages) looks like the app's pill buttons */
a.pill { color: inherit; text-decoration: none; display: inline-block; }
.pass-banner { border-color: var(--sun); }
ul.plain { list-style: none; padding: 0; margin: 0; }
.print-only { display: none; }
@media print {
  .print-only { display: block; }
  /* repeated at the foot of every printed page */
  .paper-mark { position: fixed; bottom: 0; left: 0; right: 0; text-align: center; font-size: 8pt; color: #555; }
}

.path { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 14px; position: relative; }
.step .rail { display: flex; flex-direction: column; align-items: center; }
.stone { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 800; border: 2px solid var(--line); background: var(--surface); color: var(--muted); flex: none; z-index: 1; }
.step .line { flex: 1; width: 2px; background: repeating-linear-gradient(var(--line) 0 6px, transparent 6px 11px); min-height: 18px; }
.step:last-child .line { display: none; }
.step.s-start .stone { background: var(--sun); border-color: var(--sun-deep); color: var(--ink); }
.step.s-done .stone { background: var(--ok); border-color: var(--ok-deep); color: #fff; }
.step.s-goal .stone { border-color: var(--accent); color: var(--accent); }
.step .body { padding-block: 6px 22px; display: grid; gap: 6px; min-width: 0; }
.step .name { font-weight: 700; font-size: 1.05rem; }
.step.later { display: none; }
.path.open .step.later { display: grid; }

.starthere { border: 2px solid var(--sun); background: var(--sun-soft); border-radius: var(--r); padding: 20px; display: grid; gap: 10px; }
.starthere .eyebrow { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--sun-ink); }

details.teach { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
details.teach summary { cursor: pointer; padding: 16px 20px; font-weight: 700; }
details.teach .in { padding: 0 20px 20px; display: grid; gap: 12px; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .88rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 700; }

/* practice */
.crit { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.ex { border: 1px dashed var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 10px; }
.reveal { border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 6px; }

.sheet-bg { position: fixed; inset: 0; background: rgba(10, 14, 22, .45); display: grid; place-items: end center; z-index: 20; padding: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom, 0px)); }
.sheet { width: min(560px, 100%); max-height: 85vh; overflow: auto; }
@media (prefers-reduced-motion: no-preference) {
  .view { animation: rise .25s ease-out; }
  @keyframes rise { from { transform: translateY(6px); opacity: .6; } to { transform: none; opacity: 1; } }
}
footer { margin-top: 36px; font-size: .78rem; color: var(--muted); }

/* ---- student mode additions ---- */
a.btn, a.big, a.titem { text-decoration: none; color: inherit; }
a.btn.primary { color: var(--accent-ink); }
.top .link { color: var(--muted); font-size: .88rem; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.note { font-size: .85rem; border: 1px solid var(--sun); background: var(--sun-soft); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
h1.qtext { font-family: var(--body); font-weight: 400; font-size: 1.22rem; letter-spacing: 0; }
h1:focus { outline: none; }
.dot.due { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--blue); }
.t-due { background: var(--blue-soft); color: var(--blue-ink); }
.symbar { display: flex; flex-wrap: wrap; gap: 6px; }
.sym { min-width: 40px; min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 1.05rem; }
.sym:hover { border-color: var(--muted); }
.hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .92rem; }
.tablewrap { overflow-x: auto; }
.starthere.done-all { border-color: var(--ok); background: var(--ok-soft); }
.starthere.done-all .eyebrow { color: var(--ok-ink); }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stat { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: .85rem; color: var(--muted); display: grid; }
.stat b { font-family: var(--display); font-size: 1.6rem; color: var(--ink); line-height: 1.1; }
.report h3 { font-size: 1rem; }
.next-list { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.next-list .crit { margin-top: 4px; }
.snap-banner { padding-block: 6px; }
label.row { gap: 8px; cursor: pointer; }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); }
@media print {
  body { background: #fff; color: #000; font-size: 12pt; }
  .top, .note, footer, .no-print, details.teach, #sheet-root { display: none !important; }
  .card { border: 0; padding: 0; }
  .view { animation: none !important; }
  .tag { border: 1px solid #999; }
}
a.brand { color: inherit; text-decoration: none; }
body.is-snapshot .top .pill, body.is-snapshot .top .link { display: none; }


/* ---- bright, active look ---- */
body { background-color: var(--paper);
  background-image: radial-gradient(900px 420px at 110% -10%, rgba(255, 79, 139, .10), transparent 60%),
    radial-gradient(800px 420px at -10% 0%, rgba(14, 165, 233, .10), transparent 60%),
    linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: auto, auto, 24px 24px, 24px 24px; background-attachment: fixed; }
h1 { color: var(--ink); }
.brand-name { background: linear-gradient(90deg, var(--accent), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pill { border-color: transparent; background: var(--surface); box-shadow: var(--shadow); font-weight: 700; }
.pill:hover { box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow); }
.card { border-color: transparent; box-shadow: var(--shadow); }

/* chunky buttons that press down */
.btn { border-radius: 14px; border: 2px solid var(--line); border-bottom-width: 4px; transition: transform .08s ease, border-color .15s ease; }
.btn:hover { border-color: var(--accent); }
.btn:active:not(:disabled) { transform: translateY(2px); border-bottom-width: 2px; }
.btn.primary { background: linear-gradient(180deg, #6d52ff, var(--accent)); border-color: var(--accent-deep); }
.btn.primary:hover { filter: brightness(1.05); border-color: var(--accent-deep); }
.btn.quiet { border: 0; color: var(--accent); }
.btn.quiet:active { transform: none; }

/* home: two big coloured choices */
.big { border: 2px solid transparent; box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.choices2 > .big:nth-child(1) { background: linear-gradient(160deg, #fff6ec, #ffffff 60%); }
.choices2 > .big:nth-child(2) { background: linear-gradient(160deg, #eafbf1, #ffffff 60%); }
.choices2 > .big:nth-child(1):hover { border-color: var(--sun); }
.choices2 > .big:nth-child(2):hover { border-color: var(--ok); }
.big:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(91, 61, 245, .14); }
.big .ico { width: 48px; height: 48px; }
.time { font-weight: 700; color: var(--muted); }

/* my maths grid */
.chip { border-width: 2px; border-radius: 999px; }
.chip:hover { border-color: var(--accent); }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.d-solid { background: var(--ok); } .d-refresh { background: var(--blue); } .d-build { background: var(--sun); }
.mm-group h3 { color: var(--accent); }

/* questions */
.qtext, h1.qtext { font-size: 1.3rem; }
.opt { border-width: 2px; border-radius: 14px; }
.opt:hover { border-color: var(--accent); }
.opt .k { background: var(--accent-soft); color: var(--accent); border-radius: 8px; min-width: 1.8em; height: 1.8em; display: inline-grid; place-items: center; }
.opt[aria-pressed="true"] .k { background: var(--accent); color: #fff; }
.ans { border-width: 2px; border-radius: 14px; }
.ans:focus { box-shadow: 0 0 0 4px var(--accent-soft); }
.pdot { width: 14px; height: 14px; }
.pdot.done { background: linear-gradient(135deg, var(--accent), var(--pink)); border-color: transparent; }
.pdot.now { outline-color: var(--pink); }
.nudge { color: var(--accent); font-weight: 700; }
.fb { border-radius: 14px; border: 2px solid var(--line); background: #faf9ff; }
.fb.right { border-color: #9be6bd; background: var(--ok-soft); }
.fb.right .lab::before { content: "\2713  "; }

/* plan */
.starthere { border: 0; background: linear-gradient(135deg, #fff1df, #ffe3ee); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.starthere::after { content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255, 138, 31, .18); }
.starthere.done-all { background: linear-gradient(135deg, #e1f8eb, #e0f4fe); }
.stone { border-width: 3px; font-size: 1.05rem; }
.step.s-goal .stone { background: var(--accent-soft); }
.tag { padding: 4px 11px; }
details.teach { border: 0; box-shadow: var(--shadow); }

/* a small celebration when a step is done (skipped for reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  .fb.right { animation: pop .35s cubic-bezier(.2, 1.4, .4, 1); }
  @keyframes pop { from { transform: scale(.96); opacity: .4; } to { transform: none; opacity: 1; } }
  [data-test="step-done"] .lab::after { content: "  \1F389"; }
}
footer { color: var(--muted); }

/* "I'm stuck" leads on home; the unit warm-up is the smaller second choice */
.big.lead-choice { background: linear-gradient(160deg, #fff6ec, #ffffff 60%); border-color: var(--sun); }
.big.lead-choice:hover { border-color: var(--sun-deep); }
.ready-choice { padding: 14px 16px; }

/* landing page (index.html) */
.land { display: grid; gap: 28px; padding-top: 18px; }
.land .hero { display: grid; gap: 14px; }
.land .hero h1 { font-size: clamp(2.1rem, 7vw, 3.1rem); }
.land .hero p { font-size: 1.12rem; }
.land .how { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); margin: 0; padding: 0; list-style: none; }
.land .how > li { display: grid; gap: 4px; }
.land .eg { position: relative; }
.land .eg-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.land .trust { margin: 0; color: var(--ink); }
.land .eg { min-width: 0; }
.land .eg-try { font-weight: 700; color: var(--accent); text-decoration: none; justify-self: start; }
.land .eg-try:hover { text-decoration: underline; }
/* the three steps: a light strip, not cards, so the example result leads */
.land .how > li { gap: 12px; }
/* line the three pictures up across the row, however long each step's text is */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 1000px) {
    .land .how { grid-template-rows: auto auto; }
    .land .how > li { grid-row: span 2; grid-template-rows: subgrid; gap: 12px; }
  }
}
.land .mini-name { flex: 1; min-width: 0; }
/* the three steps, each with a small picture made from the app's own pieces */
.land .how-head { display: flex; gap: 12px; align-items: flex-start; }
.land .how-head > div { display: grid; gap: 2px; }
.land .how-n { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; font-size: .95rem; }
.land .mini { display: grid; gap: 8px; align-content: start; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: .9rem; min-height: 150px; }
.land .mini-search { display: flex; align-items: center; padding: 9px 12px; border-radius: 10px; border: 2px solid var(--accent); color: var(--ink); }
.land .mini-hit, .land .mini-step { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-weight: 600; }
.land .mini-hit small, .land .mini-step small { flex-basis: 100%; color: var(--muted); font-weight: 400; font-size: .78rem; }
.land .mini-hit small { padding-left: 18px; }
.land .mini-q { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--sun); background: var(--paper); color: var(--ink); }
.land .mini-q::after { content: "✗"; margin-left: auto; color: var(--sun-ink); font-weight: 800; }
.land .mini-arrow { color: var(--muted); font-size: .8rem; padding-left: 12px; }
.land .mini-sn { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--line); color: var(--ink); font-size: .75rem; font-weight: 800; }
.land .mini-step.first { border-color: var(--sun); }
.land .mini-step.first .mini-sn { background: var(--sun); color: #fff; }
.land .mini-step.first small { color: var(--sun-ink); font-weight: 700; padding-left: 30px; }
.land .mini-step { flex-wrap: wrap; }
.land .mini-step.goal small { padding-left: 30px; }

/* a gap from an earlier year (Year 9-10 behind a senior topic) */
.t-earlier { background: var(--blue-soft); color: var(--blue-ink); }

/* before your exam */
.titem.picked { border-color: var(--accent); background: var(--accent-soft); }
label.check { display: flex; gap: 10px; align-items: center; padding: 6px 2px; cursor: pointer; }
label.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.exam-row { padding-top: 12px; border-top: 1px solid var(--line); }
.exam-row:first-of-type { border-top: 0; padding-top: 0; }
.ready-list { display: grid; gap: 12px; }
.ready-row { display: grid; gap: 6px; }
.ready-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--idle-soft); gap: 2px; }
.ready-bar .seg-solid { background: var(--ok); } .ready-bar .seg-refresh { background: var(--blue); }
.ready-bar .seg-build { background: var(--sun); } .ready-bar .seg-none { background: var(--idle-soft); border: 1px solid var(--line); }
.time-left p { font-size: 1.02rem; }

/* after an answer: the explanation, then what the question tests and the earlier topics it relies on */
.explain { display: grid; gap: 10px; }
.explain .how { margin: 0; }
.about { border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 6px; }
.about[open] { gap: 8px; }
.about summary { cursor: pointer; font-size: .92rem; color: var(--ink); }
.about summary b { font-weight: 700; }
.about ul { margin: 4px 0 0; padding-left: 20px; display: grid; gap: 2px; }
.about p { margin: 0; }

/* a confident right answer: a short confirmation before the next question */
.fb.quick { padding: 10px 14px; }
.fb.quick .btn { min-height: 40px; padding: 6px 16px; }
.ans.is-right { border-color: var(--ok); background: var(--ok-soft); }

/* plan: summary first, one next step, compact steps, details folded */
details.fold { padding: 16px 20px; }
details.fold > summary { cursor: pointer; display: flex; gap: 10px; align-items: center; list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "Show"; margin-left: auto; font-size: .85rem; color: var(--accent); }
details.fold[open] > summary::after { content: "Hide"; }
details.fold[open] > summary { margin-bottom: 12px; }
details.fold > * + * { margin-top: 10px; }
.fold-title { font-family: var(--display); font-weight: 700; font-size: 1.1rem; }
.fold-count { font: 700 .8rem var(--body); padding: 2px 9px; border-radius: 999px; background: var(--idle-soft); color: var(--muted); }
.papers-line { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; padding: 14px 20px; }
.papers-line .paper { font-size: .92rem; }
.steprow { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-start; }
.why-d { flex: 1 1 220px; min-width: 0; }
.why-d > summary { cursor: pointer; color: var(--accent); font-size: .9rem; min-height: 46px; display: inline-flex; align-items: center; }
.why-d[open] > summary { min-height: 0; margin-bottom: 6px; }
.why-body { display: grid; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--idle-soft); }
.why-body p { margin: 0; }

/* My maths as a metro map (learn/views/metro.js): one line per syllabus topic, stations in teaching order */
.grid-head .seg.mm-view button { padding: 6px 12px; font-size: .85rem; }
.metro { position: relative; display: grid; gap: 18px; }
.metro-links { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; z-index: 2; }
.metro-links path { fill: none; stroke: var(--ink); stroke-width: 1.6; opacity: .14; transition: opacity .15s, stroke .15s; }
.metro-links path.on { stroke: var(--accent); opacity: .9; stroke-width: 2.6; }
.mline { --c: var(--accent); display: grid; gap: 4px; }
.mline.l0 { --c: #5b3df5; } .mline.l1 { --c: #d63f7a; } .mline.l2 { --c: #12828a; }
.mline.l3 { --c: #475569; } .mline.l4 { --c: #7a6a12; } .mline.l5 { --c: #9333ea; }
.mhead { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding-left: 44px; }
.mhead h3 { color: var(--c); font-family: var(--display); font-size: 1rem; text-transform: none; letter-spacing: 0; }
.mfrom { padding-left: 44px; margin: 0; }
.mstations { list-style: none; margin: 0; padding: 0; position: relative; }
.mstations::before { content: ""; position: absolute; left: 30px; top: 18px; bottom: 18px; width: 6px; border-radius: 3px; background: var(--c); }
.station { position: relative; display: flex; gap: 12px; align-items: center; width: 100%; min-height: 40px; padding: 6px 10px 6px 24px; border: 0; border-radius: 10px;
  background: none; color: var(--ink); text-align: left; cursor: pointer; font: inherit; transition: opacity .15s, background .15s; }
.station:hover, .station:focus-visible { background: var(--idle-soft); }
.mdot { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 4px solid var(--c); background: var(--surface); position: relative; z-index: 3; }
.mdot.s-solid { background: var(--ok); } .mdot.s-refresh { background: var(--blue); } .mdot.s-build { background: var(--sun); }
.mdot.due { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ok); }
.sname { flex: 1; min-width: 0; font-size: .94rem; }
.sstat { flex: none; font-size: .78rem; color: var(--muted); }
.station.hl .sname { font-weight: 700; }
.station.dim { opacity: .45; }
@media (max-width: 420px) { .sstat { display: none; } }
@media (prefers-reduced-motion: reduce) { .station, .metro-links path { transition: none; } }

/* practice only: how hard a question is (Warm-up / Standard / Stretch), quiet and below the question */
.qlevel { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: .8rem; color: var(--muted); }
.qlevel .meter { display: inline-flex; gap: 2px; align-items: flex-end; }
.qlevel .meter i { display: block; width: 4px; border-radius: 2px; background: var(--line); }
.qlevel .meter i:nth-child(1) { height: 6px; } .qlevel .meter i:nth-child(2) { height: 9px; } .qlevel .meter i:nth-child(3) { height: 12px; }
.qlevel .meter i.on { background: var(--accent); }

/* Home: two columns on wide screens (actions left, My maths right) once the student has some progress. */
.home-grid { display: grid; gap: 14px; }
.home-acts, .home-map { min-width: 0; align-content: start; }
@media (min-width: 1000px) {
  .wrap:has(.home-grid.two) { max-width: 1180px; }
  .home-grid.two { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 24px; align-items: start; }
  .home-grid.two .hello h1 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); }
}
.ready-choice > .row { flex-wrap: nowrap; align-items: flex-start; min-width: 0; }
.ready-choice > small { flex: none; }

/* Disabled buttons stay readable: grey on light grey; purple is only for buttons you can press. */
.btn:disabled, .btn.primary:disabled { opacity: 1; background: var(--idle-soft); border-color: #d6d4e6; color: #5d5a7a; filter: none; box-shadow: none; }
/* My maths strand headings: quiet sentence case so the topics lead. */
.mm-group h3 { text-transform: none; letter-spacing: 0; font-size: .92rem; font-weight: 700; color: var(--ink); }
/* Landing on wide screens: pitch on the left, the example result beside it, the three steps in a row below. */
.land .how > li { align-content: start; }
@media (min-width: 1000px) {
  .wrap:has(.land) { max-width: 1180px; }
  .land { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 40px; row-gap: 28px; align-items: center; padding-top: 40px; }
  .land .hero { grid-column: 1; }
  .land .eg { grid-column: 2; }
  .land .how-wrap { grid-column: 1 / -1; }
  .land .how { grid-template-columns: repeat(3, 1fr); }
  .land .hero h1 { font-size: clamp(2.6rem, 4.2vw, 3.4rem); }
}
.land p { text-wrap: pretty; }

/* My maths: say which course the topics belong to */
.mm-title { display: grid; gap: 2px; }
.mm-title p b { color: var(--ink); font-weight: 700; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* Set maths in question text (learn/math.js) */
.m sup, .m sub { font-size: .72em; line-height: 0; }
.m sup { vertical-align: .55em; }
.m sub { vertical-align: -.3em; }
.m-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.m-frac { display: inline-flex; flex-direction: column; align-items: stretch; text-align: center; vertical-align: middle; font-size: .86em; line-height: 1.2; margin: 0 .14em; white-space: nowrap; }
.m-num { padding: 0 .22em .06em; border-bottom: 1.5px solid currentColor; }
.m-den { padding: .16em .22em 0; }
.m sup .m-frac, .m sub .m-frac { font-size: .9em; }
.m-sqrt { white-space: nowrap; }
.m-rad { border-top: 1.5px solid currentColor; padding: .04em .1em 0 .06em; margin-left: -.02em; }

/* First visit: the course choice leads; the "stuck" card steps back a little */
.first-run { border: 2px solid var(--accent); }
.first-run h1 { font-size: clamp(1.6rem, 4vw, 2rem); }
.big.lead-choice.quiet-lead { border-width: 1px; border-color: var(--line); background: var(--surface); }
@media (min-width: 1000px) { .home-grid.two.first { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .wrap:has(.home-grid.first) { max-width: 1040px; } }
.or-line { margin: 0; }

/* ---------- mock exams (views/mock.js) ---------- */
.mock-bar { position: sticky; top: 0; z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; box-shadow: var(--shadow); }
.mock-bar .row { align-items: center; }
.mock-time { font-family: var(--display); font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.mock-time.read { color: var(--blue-ink); }
.mock-time.low { color: var(--sun-ink); }
.mock-time.over { color: var(--pink); }
.mock-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mock-nav .chip { min-width: 2.2em; text-align: center; padding: 4px 6px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: .9rem; }
.mock-nav .chip.done { background: var(--accent-soft); border-color: var(--accent); }
.mock-nav .chip.flag { box-shadow: inset 0 -3px 0 var(--sun); }
.mock-q { scroll-margin-top: 90px; }
.mock-qhead { align-items: baseline; }
.mock-part + .mock-part, .mock-mark + .mock-mark { border-top: 1px dashed var(--line); padding-top: 12px; }
.btn.small { padding: 6px 12px; font-size: .9rem; min-height: 0; }
.flag-btn[aria-pressed="true"] { color: var(--sun-ink); }
.marks-table { border-collapse: collapse; width: 100%; max-width: 460px; }
.marks-table td, .marks-table th { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.marks-table td:last-child, .marks-table th:last-child { text-align: right; white-space: nowrap; }
.big-score { font-family: var(--display); font-size: 2rem; font-weight: 700; }
.points { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.points .point { display: flex; gap: 6px; align-items: flex-start; }
.mark-line { margin: 0; }
.cover { border-top: 1px dashed var(--line); padding-top: 10px; }
@media print {
  .mock-bar, .btn, .symbar, header, nav, .flag-btn { display: none !important; }
  .mock-q { break-inside: avoid; box-shadow: none; border: 0; }
  .mock-q .ans { border: 0; border-bottom: 1px solid #999; }
}
/* example question on a phone: tighter options, ✓ and ✗ in place of the words */
/* "Stuck on a topic?" holds the topic search (it replaced the topic picker page): a card, not a link */
.big.stuck-card { cursor: default; }
.big.stuck-card:hover { transform: none; box-shadow: var(--shadow); border-color: var(--accent); }
.big.stuck-card.quiet-lead:hover { border-color: var(--line); }
.stuck-card .tlist:empty { display: none; }
.stuck-card .titem { flex-direction: column; align-items: flex-start; gap: 2px; }
.stuck-card .titem small { flex: initial; }

/* ---------- accounts (views/account.js) ---------- */
.field { font-weight: 700; font-size: .95rem; font-family: var(--body); }
.code-input { font-family: var(--display); font-size: 1.6rem; letter-spacing: .3em; max-width: 14ch; font-variant-numeric: tabular-nums; }
.form-error { color: var(--sun-ink); font-weight: 700; margin: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.btn.danger { color: var(--sun-ink); }
.btn.danger-fill { background: var(--sun-ink); border-color: var(--sun-ink); color: #fff; }
.save-prompt { border-color: var(--accent); }
.acct-btn { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.acct-btn[data-state="out"] { border-color: var(--accent); color: var(--accent); }
.acct-btn[data-state="ok"], .acct-btn[data-state="wait"] { padding: 6px 10px; }
.acct-ico svg { width: 20px; height: 20px; display: block; }
.acct-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.acct-dot.wait { background: var(--sun); }
/* "Before your exam": plan first, then the check and the mock; "Change" is a small link at the end */
.exam-actions { align-items: center; }

/* Landing example result: recommendation first, then the evidence (openspec: simplify-landing-diagnostic-preview).
   Kept short so it sits beside the pitch. Orange is for missed answers; the suggested start uses purple so it doesn't read as an error. */
body:has(.land) { --grid: rgba(91, 61, 245, .035); }
.land .eg { gap: 16px; }
.land .eg-label { margin: 0; }
.land .eg-topic { text-transform: none; letter-spacing: 0; color: var(--ink); font-size: 1rem; }
.land .eg-rec { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 12px; }
.land .eg-rec h2 { display: grid; gap: 2px; }
.land .eg-rec-label { font-family: var(--body); font-size: .875rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.land .eg-rec-name { font-size: clamp(1.7rem, 4.5vw, 2.1rem); font-weight: 800; color: var(--ink); }
.land .eg-year { margin-bottom: 4px; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-deep); font-size: .875rem; font-weight: 700; }
.land .eg-checks { margin: 0 0 0 7px; padding: 0; list-style: none; border-left: 2px solid var(--line); }
.land .eg-checks li { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 5px 10px 5px 18px; font-size: 1rem; }
.land .eg-checks li::before { content: ""; position: absolute; left: -7px; top: 11px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--sun); }
.land .eg-checks .ck-ok::before { border-color: var(--ok-deep); background: var(--ok-deep); }
.land .eg-checks .ck-start::before { border-color: var(--accent); background: var(--accent); }
.land .ck-start { background: var(--accent-soft); border-radius: 0 10px 10px 0; }
.land .ck-name { flex: 1 1 13rem; min-width: 0; font-weight: 700; }
.land .ck-year { margin-left: 4px; font-size: .875rem; font-weight: 400; color: var(--muted); white-space: nowrap; }
.land .ck-out { flex: none; font-size: .875rem; font-weight: 700; color: var(--sun-ink); }
.land .ck-ok .ck-out { color: var(--ok-ink); }
.land .ck-start .ck-out { color: var(--accent-deep); }
.land .eg-q { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); font-size: 1rem; line-height: 1.6; }
.land .eg-q-label { color: var(--muted); }
.land .eg-prompt { font-weight: 700; color: var(--ink); }
.land .eg-ans { display: block; font-size: .95rem; color: var(--muted); }
.land .eg-wrong { color: var(--sun-ink); } .land .eg-right { color: var(--ok-ink); }

/* walkthrough: readable sizes, no fixed heights, illustrations that don't look usable */
.land .how-head h3 { font-size: 1.1rem; }
.land .how-head p { margin: 0; font-size: 1rem; }
.land .how > li .mini { min-height: 0; align-self: start; font-size: .95rem; }
.land .mini-plan { margin: 0; list-style: none; }
.land .mini-search { border: 1.5px solid var(--line); background: var(--paper); }
.land .mini-hit small, .land .mini-step small { font-size: .875rem; }
.land .mini-arrow { font-size: .875rem; }
.land .mini-step.first { border-color: var(--accent); background: var(--accent-soft); }
.land .mini-step.first .mini-sn { background: var(--accent); }
.land .mini-step.first small { color: var(--accent-deep); }
.land .eg-label { font-size: .875rem; }
.land .mini-sn { width: 24px; height: 24px; font-size: .875rem; }

/* ---------- privacy and terms pages (privacy/, terms/) ---------- */
.legal { padding-top: 24px; max-width: 68ch; }
.legal h2 { margin-top: 18px; }
.legal ul { padding-left: 1.2em; display: grid; gap: 6px; }
.legal-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.legal-table th { font-family: var(--display); }
@media (max-width: 520px) { .legal-table thead { display: none; } .legal-table td { display: block; border: 0; padding: 4px 0; } .legal-table td:first-child { font-weight: 700; padding-top: 12px; } .legal-table tr { border-bottom: 1px solid var(--line); display: block; padding-bottom: 8px; } }
/* Step 3 plan: label beside the name ("Start here", "Your topic"), so each item is one compact row
   and the card is close in height to steps 1 and 2; the three cards then stretch to the same height. */
.land .mini-step { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; padding: 8px 12px; }
.land .mini-step small, .land .mini-step.first small, .land .mini-step.goal small { flex-basis: auto; padding-left: 0; text-align: right; white-space: nowrap; }
.land .how > li .mini { align-self: stretch; }

/* Pricing page (/pricing/): free, free account, Senior pass */
.pricing { padding-top: 24px; gap: 22px; }
.pricing .lead { max-width: 60ch; }
.pr-beta { padding: 16px 18px; border-radius: var(--r, 16px); background: var(--accent-soft); border: 1px solid var(--accent); }
.pr-beta h2 { font-size: 1.15rem; margin: 0 0 4px; color: var(--accent-deep); }
.pr-beta p { margin: 0; }
.pr-plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); align-items: stretch; }
.pr-plan { gap: 10px; }
.pr-plan h2 { font-size: 1.25rem; margin: 0; }
.pr-plan ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; flex: 1; }
.pr-plan .btn { align-self: start; margin-top: auto; }
.pr-price { margin: 0; font-family: var(--display); font-size: 2rem; font-weight: 800; color: var(--ink); line-height: 1.1; }
.pr-price span { font-family: var(--body); font-size: .95rem; font-weight: 400; color: var(--muted); margin-left: 4px; }
.pr-renew { margin: -4px 0 0; font-weight: 700; color: var(--accent-deep); }
.pr-pass { border: 2px solid var(--accent); }
.pr-soon { margin: auto 0 0; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); font-size: .95rem; }
.pr-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.pr-table th, .pr-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.pr-table thead th { font-family: var(--display); }
.pr-table tbody th { font-weight: 400; }
.pr-table td { white-space: nowrap; }
.pr-group th { padding-top: 16px; font-family: var(--display); font-weight: 700; color: var(--accent-deep); border-bottom: 2px solid var(--line); }
.pr-faq { margin: 0; display: grid; gap: 4px; max-width: 68ch; }
.pr-faq dt { font-weight: 700; margin-top: 10px; }
.pr-faq dd { margin: 0; }
@media (max-width: 620px) {
  .pr-table thead { display: none; }
  .pr-table tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .pr-table th, .pr-table td { display: block; border: 0; padding: 2px 0; white-space: normal; }
  .pr-table tbody th[scope=row] { font-weight: 700; }
  .pr-table td::before { content: attr(data-label) ": "; color: var(--muted); }
  .pr-group { border-bottom: 0; }
}
/* the three plans side by side on wide screens; the table and questions keep a readable width */
@media (min-width: 900px) {
  .wrap:has(.pricing) { max-width: 1040px; }
  .pr-plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
