[hidden] { display: none !important; }
:root {
  --ink: #1d2433; --muted: #5c667a; --line: #dfe4ec; --bg: #f3f5f9; --card: #fff;
  --brand: #12395c; --brand2: #1f6f8b; --accent: #f2a541; --ok: #2e8b57; --mid: #e0a800; --bad: #c0392b;
  --tint: #e8f1f6; --ribbon: #3f88c5; --ribbon-ink: #ffffff; --ribbon-line: #2f72ab; --radius: 10px; --shadow: 0 1px 3px rgba(20, 30, 50, .12);
  /* organiser step colours (booklet style) */
  --s1: #1f6f8b; --s2: #6a4c93; --s3: #2e8b57; --s4: #c0662b; --s5: #b03a48;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 "Segoe UI", system-ui, -apple-system, Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand2); }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.02rem; }
button, .btn { font: inherit; border: 0; border-radius: 6px; padding: .45em .9em; cursor: pointer; background: var(--brand2); color: #fff; text-decoration: none; display: inline-block; }
.btn.ghost, button.ghost { background: #fff; color: var(--brand2); border: 1px solid var(--line); }
.btn.accent, button.accent { background: var(--accent); color: #2b2100; }
.btn.danger { background: var(--bad); }
button:disabled { opacity: .45; cursor: default; }
input, select, textarea { font: inherit; padding: .4em .55em; border: 1px solid #c6cedb; border-radius: 6px; background: #fff; color: var(--ink); width: 100%; }
label { font-size: .85rem; color: var(--muted); }

.topbar { background: var(--ribbon); color: var(--ribbon-ink); border-bottom: 2px solid var(--ribbon-line); display: flex; align-items: center; gap: 1rem; padding: .8rem 1.2rem; min-height: 5.8rem; position: sticky; top: 0; z-index: 10; flex-wrap: wrap; }
.brand { color: var(--ribbon-ink); font-weight: 600; text-decoration: none; display: flex; align-items: center; gap: .8rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; gap: .4rem; }
.brand-name { font-size: 1.6rem; font-weight: 700; letter-spacing: .01em; }
.tagline { font-size: 1rem; font-weight: 700; color: #fff; }
.tagline2 { font-size: 1.08rem; font-weight: 600; color: #ffd08a; }
.brand b { color: #ffd08a; }
.tagline-right { margin-left: auto; font-size: 1.35rem; font-weight: 700; color: #fff; text-align: right; }
.tagline-right[hidden] { display: none; }
#nav:empty { display: none; }
.logo { background: var(--accent); color: var(--brand); font-weight: 800; border-radius: 10px; padding: .55rem .7rem; font-size: 1.45rem; line-height: 1; white-space: nowrap; }
#nav { display: flex; gap: .2rem; margin-left: auto; flex-wrap: wrap; }
#nav a { color: var(--ribbon-ink); text-decoration: none; padding: .35rem .65rem; border-radius: 6px; font-size: 1.08rem; font-weight: 700; }
#nav a.on, #nav a:hover { background: rgba(255,255,255,.2); color: #fff; }
#nav .who { color: #ffd08a; font-weight: 800; }
.burger { display: none; margin-left: auto; background: transparent; font-size: 1.4rem; color: var(--ribbon-ink); }
@media (max-width: 760px) {
  .burger { display: block; } #nav { display: none; width: 100%; flex-direction: column; } #nav.open { display: flex; }
}
.banner { background: #fff4e0; border-bottom: 1px solid #f0d9a8; padding: .5rem 1rem; font-size: .9rem; }
main { max-width: 1400px; margin: 0 auto; padding: 1rem 16px 3rem; }
.foot { text-align: center; color: var(--muted); font-size: .78rem; padding: 1rem; }

.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1rem; overflow: hidden; overflow: clip; }
.panel > .hd { background: var(--ribbon); color: var(--ribbon-ink); border-bottom: 1px solid var(--ribbon-line); padding: .6rem 1rem; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.panel > .hd h2 { margin: 0; font-size: 1.05rem; flex: 1; }
.panel > .bd { padding: 1rem; }
.toolbar { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: .8rem; }
.toolbar .grow { flex: 1; min-width: 160px; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.pill { display: inline-block; font-size: .75rem; padding: .1em .55em; border-radius: 99px; background: var(--tint); color: var(--brand2); font-weight: 600; }
.pill.Homework { background: #e3effc; color: #1f5fa8; } .pill.Classwork { background: #efe7f9; color: #6a4c93; } .pill.Test { background: #fde8e4; color: #a33b2c; }

/* class cards */
.ccard { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; display: flex; flex-direction: column; gap: .6rem; }
.ccard .name { font-size: 1.35rem; font-weight: 700; color: var(--brand); }
.bar { height: 22px; background: #eef1f5; border-radius: 5px; position: relative; overflow: hidden; display: flex; align-items: center; font-size: .78rem; }
.bar > i { position: absolute; inset: 0 auto 0 0; background: var(--brand2); opacity: .85; }
.bar > span { position: relative; padding: 0 .5rem; color: #fff; font-weight: 600; mix-blend-mode: normal; }
.bar > span.r { margin-left: auto; color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: .35rem; }
.stat { border-radius: 7px; text-align: center; padding: .3rem 0; color: #fff; font-weight: 700; font-size: 1.05rem; }
.stat small { display: block; font-size: .62rem; font-weight: 500; opacity: .9; }
.stat.a { background: #1f6f8b; } .stat.b { background: #2e8b57; } .stat.c { background: #c0662b; } .stat.d { background: #6a4c93; } .stat.e { background: #b03a48; }

/* tables */
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { padding: .45rem .55rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { background: #f6f8fb; font-weight: 600; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .02em; }
tr.sel td { background: #fff7e6; }
tbody tr.click { cursor: pointer; } tbody tr.click:hover td { background: #f3f8fb; }
.scroll { overflow: auto; max-height: 60vh; }
.mk { text-align: center; font-weight: 700; color: #fff; border-radius: 5px; padding: .2rem 0; min-width: 52px; }
.mk.lo { background: var(--bad); } .mk.md { background: var(--mid); color: #2b2100; } .mk.hi { background: var(--ok); } .mk.no { background: #e5e8ee; color: var(--muted); font-weight: 400; }

/* assignment builder */
.builder { display: grid; grid-template-columns: 240px 1fr 320px; gap: 1rem; }
@media (max-width: 980px) { .builder { grid-template-columns: 1fr; } }
.filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: .55rem; align-content: start; align-self: start; }   /* children wrap to the column (30 Oct 2026) */
.filters label { font-size: 1.05rem; font-weight: 700; color: var(--brand, #1f2a5a); margin-top: .2rem; }
/* proper drop-down boxes: fixed height, arrow on the right (2026-10-19) */
select { height: 2.4em; cursor: pointer; appearance: none; -webkit-appearance: none; padding-right: 2em;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231f2a5a' stroke-width='2'/%3E%3C/svg%3E") no-repeat right .7em center; }
select:hover { border-color: #8aa0c2; }
select[multiple], select[size] { height: auto; background-image: none; padding-right: .55em; }
.list { max-height: 55vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.list .row { display: flex; gap: .6rem; padding: .45rem .6rem; border-bottom: 1px solid var(--line); align-items: center; cursor: pointer; }
.list .row:hover { background: #f3f8fb; }
.list .row .code { font-weight: 700; color: var(--brand2); width: 3rem; }
.list .row.on { background: #fff4e0; }

/* organiser player */
.tabs { display: flex; gap: .25rem; flex-wrap: wrap; border-bottom: 2px solid var(--line); margin-bottom: 1rem; }
.tabs a { padding: .45rem .8rem; text-decoration: none; color: var(--muted); border-radius: 6px 6px 0 0; font-size: .9rem; display: flex; align-items: center; gap: .3rem; }
.tabs a.on { background: var(--ribbon); color: var(--ribbon-ink); font-weight: 700; }
.tabs .dot { width: 9px; height: 9px; border-radius: 50%; background: #c6cedb; display: inline-block; }
.tabs .dot.done { background: var(--ok); } .tabs .dot.part { background: var(--mid); }
.tabs .sep { align-self: center; color: var(--muted); padding: 0 .3rem; font-size: .8rem; }
.qhead { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: .6rem; }
.src { font-size: .78rem; font-weight: 700; letter-spacing: .04em; color: var(--ribbon-ink); background: var(--ribbon); border: 1px solid var(--ribbon-line); padding: .2rem .6rem; border-radius: 4px; }
.qimg { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .6rem; text-align: center; }
.qimg img { max-width: 100%; height: auto; cursor: zoom-in; }
.qimg { margin-bottom: .2rem; }
.cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1rem; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }
.box { border: 2px solid var(--brand2); border-radius: 9px; padding: .7rem .8rem; background: #fff; margin-bottom: .7rem; }
.box h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--brand2); margin-bottom: .4rem; }
.plan { display: grid; gap: .45rem; }
.hintbar { display: flex; gap: .5rem; flex-wrap: wrap; margin: .6rem 0; }
.note { border-left: 4px solid var(--accent); background: #fff8ec; padding: .5rem .7rem; border-radius: 0 6px 6px 0; font-size: .9rem; margin: .4rem 0; }
.note.watch { border-color: var(--bad); background: #fdf0ee; }
.step { border-radius: 9px; margin-bottom: .6rem; border: 2px solid var(--c); overflow: hidden; background: #fff; }
.step > .sh { background: var(--c); color: #fff; padding: .35rem .7rem; font-weight: 700; font-size: .85rem; display: flex; gap: .5rem; align-items: center; }
.step > .sh .num { background: #fff; color: var(--c); border-radius: 50%; width: 1.4rem; height: 1.4rem; display: grid; place-items: center; font-size: .8rem; }
.step > .sb { padding: .55rem .7rem; display: grid; gap: .4rem; }
.step .prompt { font-size: .9rem; }
.step .scaf { font-size: .82rem; color: var(--muted); }
.step .model { background: var(--tint); border-radius: 6px; padding: .4rem .6rem; font-size: .9rem; }
.step .model img { max-width: 100%; height: auto; cursor: zoom-in; }
.step.revealed { opacity: .97; } .step.locked .sb { opacity: .5; }
.step textarea { min-height: 2.6em; resize: vertical; }
.answer-row { display: grid; grid-template-columns: auto 1fr; gap: .5rem; align-items: center; margin-bottom: .45rem; }
.answer-row .tag { font-weight: 700; color: var(--brand2); }
.mark { display: inline-block; font-weight: 700; padding: .1rem .5rem; border-radius: 5px; font-size: .85rem; }
.mark.ok { background: #e3f4ea; color: var(--ok); } .mark.bad { background: #fbe7e4; color: var(--bad); } .mark.self { background: #fff4e0; color: #8a5a00; }
.inp-ok { border-color: var(--ok); background: #f1faf4; } .inp-bad { border-color: var(--bad); background: #fdf3f1; }
.toolkit { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.kmove { border-radius: 9px; border: 2px solid var(--c); background: #fff; overflow: hidden; }
.kmove .hd { background: var(--c); color: #fff; padding: .35rem .7rem; font-weight: 700; }
.kmove .bd { padding: .55rem .7rem; font-size: .9rem; display: grid; gap: .4rem; }
.kmove .eg { background: var(--tint); border-radius: 6px; padding: .35rem .55rem; font-size: .85rem; }
.cycle { display: flex; gap: .4rem; flex-wrap: wrap; }
.cycle div { flex: 1; min-width: 120px; border-radius: 8px; color: #fff; padding: .45rem .6rem; font-size: .8rem; }
.cycle b { display: block; font-size: .78rem; letter-spacing: .03em; }
.progress-strip { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin-bottom: .8rem; font-size: .85rem; }
.progress-strip .bar { width: 180px; height: 12px; }

/* fractions etc. */
.frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; font-size: .92em; margin: 0 .1em; }
.frac > span:first-child { border-bottom: 1px solid currentColor; padding: 0 .15em; }
.cvec { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; border-left: 1.5px solid; border-right: 1.5px solid; border-radius: 6px; padding: 0 .3em; font-size: .9em; line-height: 1.15; }
.vec { border-top: 1px solid; position: relative; padding-top: 1px; }
.vec::after { content: "›"; position: absolute; right: -.25em; top: -.78em; font-size: .9em; }

/* modal + login */
.modal { position: fixed; inset: 0; background: rgba(15, 25, 40, .5); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal-box { background: #fff; border-radius: 12px; max-width: 520px; width: 100%; padding: 1.2rem; max-height: 90vh; overflow: auto; }
.login { max-width: 860px; margin: 2rem auto; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 760px) { .login { grid-template-columns: 1fr; } }
.hero { align-self: start; background: var(--ribbon); color: var(--ribbon-ink); border-radius: 14px; padding: 1.6rem; }
.hero h1 { font-size: 1.8rem; } .hero b { color: #ffd08a; }
.hero li { margin: .35rem 0; }
.chart { display: flex; align-items: flex-end; gap: 4px; height: 180px; border-bottom: 1px solid var(--line); padding-top: 1rem; }
.chart div { flex: 1; background: var(--brand2); border-radius: 3px 3px 0 0; position: relative; min-height: 2px; }
.chart div span { position: absolute; bottom: -1.4rem; left: 50%; transform: translateX(-50%); font-size: .65rem; color: var(--muted); }
.unread td:first-child { border-left: 4px solid var(--accent); }

/* Key Moves dock: stays on screen beside the missions */
.dockwrap { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 1rem; align-items: start; }
.dock { position: sticky; top: 6.4rem; max-height: calc(100vh - 7.2rem); display: flex; flex-direction: column;
  background: #fff; border: 2px solid var(--ribbon-line); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.dock-hd { background: var(--ribbon); color: var(--ribbon-ink); border-radius: 0; display: flex; justify-content: space-between; align-items: center; font-weight: 700; padding: .5rem .75rem; width: 100%; }
.dock-bd { overflow: auto; padding: .5rem; display: grid; gap: .45rem; }
.dock.shut .dock-bd { display: none; }
.dmove { border-left: 4px solid var(--c); background: #fafbfd; border-radius: 0 7px 7px 0; padding: .35rem .5rem; font-size: .82rem; }
.dname { font-weight: 700; color: var(--c); display: flex; gap: .35rem; align-items: center; }
.dnum { background: var(--c); color: #fff; border-radius: 50%; width: 1.25rem; height: 1.25rem; display: inline-grid; place-items: center; font-size: .72rem; flex: none; }
.drule { margin: .15rem 0; }
.deg { color: var(--muted); font-size: .78rem; }
.dstar { font-size: .78rem; background: #fff8ec; border-left: 4px solid var(--accent); padding: .3rem .5rem; border-radius: 0 6px 6px 0; }
@media (max-width: 1100px) {
  /* narrow screens: a bar pinned to the bottom of the screen that opens upwards */
  .dockwrap { grid-template-columns: 1fr; }
  .dock { position: fixed; top: auto; bottom: 0; left: 0; right: 0; max-height: 55vh; border-radius: 12px 12px 0 0; z-index: 20; border-width: 2px 0 0; }
  .dockwrap { padding-bottom: 3rem; }
}

/* the question sits full width above the working; exam answer box below it */
.qimg + .small + .cols, .qimg + .small + .examans { margin-top: .8rem; }
.examans { max-width: 640px; }
.zoom { position: fixed; inset: 0; z-index: 60; background: rgba(10, 18, 30, .88); display: grid; place-items: center; padding: 16px; cursor: zoom-out; }
.zoom img { max-width: 100%; max-height: calc(100vh - 5rem); background: #fff; border-radius: 8px; padding: .6rem; }
.zoom button { position: fixed; top: 12px; right: 16px; background: #fff; color: var(--ink); }
.ccard.locked { background: #f6f7fa; border: 2px dashed #c6cedb; }
.ccard.locked .name { color: var(--muted); }

/* question grade: bold blue on orange, like the 11–18 logo */
.grade-tag { background: var(--accent); color: var(--brand); font-weight: 800; font-size: .95rem; padding: .15rem .6rem; border-radius: 7px; letter-spacing: .02em; }
.panel > .hd a:not(.btn) { color: #fff; }
@media (max-width: 760px) {
  .topbar { min-height: 0; padding: .6rem 16px; position: relative; }   /* not pinned on phones: keeps screen space */
  .brand { padding-right: 2.6rem; gap: .6rem; }
  .burger { position: absolute; top: .7rem; right: 10px; }
  .logo { font-size: 1.1rem; padding: .4rem .5rem; }
  .brand-name { font-size: 1.25rem; } .tagline-right { font-size: 1rem; margin-left: 0; text-align: left; } .tagline2 { font-size: .9rem; }
}

/* typed maths: live preview + toolbox */
.preview { font-size: .95rem; color: var(--brand); min-height: 0; padding: .1rem .2rem; line-height: 1.9; }
.preview:empty { display: none; }
.rt { white-space: nowrap; } .rt sup { font-size: .6em; margin-right: -.35em; vertical-align: .9em; }
.rad { border-top: 1.5px solid currentColor; padding: 0 .1em; margin-left: .05em; }
.workview { display: grid; gap: .35rem; padding: .4rem .2rem; font-size: .9rem; }
textarea[data-work] { min-height: 7em; font-family: inherit; }
/* "+" inside each box, MathsWatch-style */
.mfield { position: relative; display: block; }
.mfield > input { padding-right: 2.4rem; }
.mfield > textarea { padding-right: 2.4rem; width: 100%; }
.mplus { position: absolute; right: 6px; top: 6px; width: 1.7rem; height: 1.7rem; padding: 0; border-radius: 5px;
  background: #8a96a8; color: #fff; font-size: 1.15rem; font-weight: 700; line-height: 1; }
.mfield:not(.area) .mplus { top: 50%; transform: translateY(-50%); }
.mplus:hover, .mplus:focus { background: var(--ribbon); }
#toolbox { position: absolute; width: 330px; max-width: calc(100vw - 16px); z-index: 40; background: #fff;
  border: 1px solid #c9d3df; border-radius: 10px; box-shadow: 0 8px 24px rgba(20, 30, 50, .22); }
#toolbox.pinned { position: fixed; right: 16px; bottom: 16px; left: auto !important; top: auto !important; border: 2px solid var(--ribbon); }
.tb-hd { display: flex; align-items: center; gap: .4rem; padding: .45rem .6rem .2rem; color: var(--ribbon-line); }
.tb-hd b { flex: 1; font-weight: 600; font-size: 1rem; }
.tb-pin, .tb-x { background: transparent; color: var(--muted); padding: .1rem .35rem; font-size: 1rem; filter: grayscale(1); opacity: .6; }
.tb-x { filter: none; }
#toolbox.pinned .tb-pin { filter: none; opacity: 1; background: #fff3df; }
.tb-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .3rem; padding: .35rem .6rem .5rem; }
.tb-key { background: #fff; color: var(--ink); border: 1px solid #d6dde6; border-radius: 6px; height: 2.6rem; padding: 0; font-size: 1.05rem;
  font-family: "Cambria Math", "STIX Two Math", "Times New Roman", serif; display: grid; place-items: center; }
.tb-key sup { font-size: .65em; }
.tb-key:hover { background: #fff3df; border-color: var(--accent); }
.tb-fr { font-size: .7rem; color: var(--ribbon-line); }
.tb-more { padding: 0 .6rem .5rem; font-size: .82rem; color: var(--muted); }
.tb-more summary { cursor: pointer; }
.tb-more .tb-grid { padding: .35rem 0 0; }
@media (max-width: 760px) {   /* phones: a strip along the bottom, so the box being typed in stays visible */
  #toolbox, #toolbox.pinned { position: fixed; left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto; max-width: none;
    max-height: 42vh; overflow: auto; border-radius: 12px 12px 0 0; }
  body.tb-open main { padding-bottom: 44vh; }
}

/* real maths boxes (MathLive) */
#pane math-field { font-size: 1.2rem; border: 1px solid #c6cedb; border-radius: 6px; padding: .25rem .5rem; background: #fff; display: block !important; width: 100% !important; min-height: 2.4rem; box-sizing: border-box; }
math-field:focus-within { outline: 2px solid var(--ribbon); outline-offset: 0; }
math-field::part(menu-toggle), math-field::part(virtual-keyboard-toggle) { display: none; }
math-field.inp-ok { border-color: var(--ok); background: #f1faf4; } math-field.inp-bad { border-color: var(--bad); background: #fdf3f1; }
math-field[read-only] { background: #f6f8fb; }
.mfield > math-field { padding-right: 2.4rem; }
.mi-lines { border: 1px solid #c6cedb; border-radius: 6px; background: #fff; padding: .2rem 2.4rem .2rem .2rem; min-height: 6.5rem; }
.mi-lines.ro { background: #f6f8fb; }
#pane .mi-line { border: 0; border-bottom: 1px dashed #dde3ea; border-radius: 0; min-height: 2.1rem; }
.mi-line:focus-within { outline: none; background: #f5fafe; }
.mi-hint { font-size: .75rem; color: var(--muted); margin-top: .2rem; }
.mi-static { font-size: 1.1rem; margin: .1rem 0; }
/* login button: orange like the 11–18 logo; white text in the same font as the blue panel headers */
button.login-btn { background: var(--accent); color: #fff; font-weight: 700; font-size: 1.05rem; line-height: 1.2; padding: .6rem 1rem; }
button.login-btn:hover { background: #e8962a; }
/* login page: GCSE and A Level boxes stacked on the right */
.logins { display: grid; gap: 1rem; align-content: start; }
.soon { background: var(--accent); color: #fff; font-weight: 700; font-size: .8rem; padding: .15rem .55rem; border-radius: 6px; }
/* login page: teaser picture of an organiser under the intro panel */
.login-left { display: grid; gap: 1rem; align-content: start; }
.teaser { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 6px; cursor: zoom-in; }
.teaser-box .bd p { margin: .5rem 0 0; }
/* scribble pad: handwritten working (pen / finger / mouse) */
.scribble { margin-top: .7rem; }
.sp-head { font-weight: 700; color: var(--brand); font-size: 1rem; margin-bottom: .3rem; }
.sp-tools { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-bottom: .35rem; }
.sp-tools button { font-size: .95rem; padding: .4em .85em; }
.sp-tools button.on { outline: 2px solid var(--accent); outline-offset: 1px; }
.sp-col { width: 2.2rem; height: 2.2rem; padding: 0 !important; border-radius: 50% !important; background: var(--c) !important; border: 2px solid #fff !important; box-shadow: 0 0 0 1px var(--line); }
.sp-canvas { display: block; width: 100%; height: auto; aspect-ratio: 1000 / 520; background: #fff; border: 1px solid var(--line); border-radius: 6px; touch-action: none; cursor: crosshair; }
.sp-canvas.locked { cursor: default; }
.sp-view { display: block; width: 100%; max-width: 640px; border: 1px solid var(--line); border-radius: 6px; margin-top: .3rem; }
/* fresh organiser (printable, new questions each time) */
.fo-bar { max-width: 210mm; margin: 0 auto 1rem; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: .8rem 1rem; display: flex; flex-wrap: wrap; gap: .6rem; justify-content: space-between; align-items: center; }
.fo-chk { display: inline-flex; align-items: center; gap: .3rem; color: var(--ink); font-size: .9rem; }
.fo-chk input { width: auto; }
.fo-doc { max-width: 210mm; margin: 0 auto; }
.fo-page { background: #fff; box-shadow: var(--shadow); border-radius: 6px; padding: 12mm 12mm; margin-bottom: 1rem; }
.fo-brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--brand); }
.fo-brand b { color: var(--accent); }
.fo-cover h1 { font-size: 2rem; margin: .8rem 0 .3rem; color: var(--brand); }
.fo-meta { margin-bottom: .6rem; }
.fo-name { border: 1px solid var(--line); border-radius: 6px; padding: .6rem; margin: .6rem 0 1rem; }
.fo-how { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; }
.fo-how div { border-top: 5px solid var(--c); background: #f7f9fc; padding: .5rem; border-radius: 4px; font-size: .9rem; text-align: center; }
.fo-mhd { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; font-size: 1.1rem; color: var(--brand); }
.fo-marks { margin-left: auto; font-size: .9rem; color: var(--muted); }
.fo-src { font-size: .72rem; color: var(--muted); margin: .2rem 0 .5rem; }
.fo-qimg { display: block; max-width: 100%; max-height: 125mm; margin: 0 auto .6rem; }
.fo-step { border-left: 6px solid var(--c); background: #f7f9fc; padding: .25rem .6rem; margin: .5rem 0 .3rem; font-size: .92rem; }
.fo-plan { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.fo-box { border: 1.5px solid #9aa7ba; border-radius: 6px; min-height: 22mm; padding: .25rem .4rem; }
.fo-lbl { font-size: .78rem; font-weight: 700; color: var(--muted); }
.fo-work { min-height: 70mm; background-image: linear-gradient(#e6ebf2 1px, transparent 1px), linear-gradient(90deg, #e6ebf2 1px, transparent 1px); background-size: 5mm 5mm; }
.fo-ans { min-height: 12mm; }
.fo-reflect { display: grid; grid-template-columns: 1fr auto; gap: .6rem; align-items: center; font-size: .88rem; }
.fo-watch { background: #fff8ec; border-left: 4px solid var(--accent); padding: .3rem .5rem; }
.fo-answers ol li { margin: .4rem 0; }
@media (max-width: 700px) { .fo-plan, .fo-how { grid-template-columns: 1fr; } .fo-page { padding: 6mm; } }
@media print {
  @page { size: A4; margin: 10mm; }
  .topbar, .foot, .banner, .noprint { display: none !important; }
  body, main { background: #fff !important; padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .fo-page { box-shadow: none; border-radius: 0; padding: 0; margin: 0; break-after: page; }
  .fo-page:last-child { break-after: auto; }
  .fo-mission { height: 276mm; display: flex; flex-direction: column; overflow: hidden; }
  .fo-mission .fo-work { flex: 1; min-height: 40mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* flagship BONUS organiser card under the library filters (2026-10-23) */
.bonus-card { display: flex; flex-direction: column; gap: .35rem; margin-top: 1rem; padding: .9rem; border-radius: var(--radius); background: #fff8ec;
  border: 3px solid var(--accent); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.bonus-card:hover { background: #fff1d6; }
.bonus-tag { align-self: flex-start; background: var(--accent); color: #fff; font-weight: 800; font-size: .8rem; padding: .15rem .55rem; border-radius: 6px; letter-spacing: .03em; }
.bonus-word { color: var(--accent); display: block; }
.bonus-name { display: block; overflow-wrap: anywhere; }   /* 30 Oct 2026: wraps instead of being cut off */
.bonus-grade { margin-top: .1rem; }
.bonus-title { font-size: 1.15rem; font-weight: 800; color: var(--brand); line-height: 1.2; }

.km-img { display: block; max-width: 100%; width: 260px !important; margin-top: .4rem; }

.sol-btn { margin-left: auto; font-size: .95rem; padding: .35em .9em; background: #2e8b57 !important; color: #fff !important; font-weight: 700; border: 0 !important; }
.sol-btn:hover { background: #24704a !important; }
/* A Level landing cards (2026-10-24): green progress bar to match the light-green cards */
.bar.green { background: #C6E7D0; }
.bar.green > i { background: #6CC08A; opacity: 1; }
.bar.green > span, .bar.green > span.r { color: #1E5631; }

.bar.blue { background: var(--ribbon-line); }
.bar.blue > i { background: #9CC7EC; opacity: 1; }
.bar.blue > span, .bar.blue > span.r { color: #fff; }

/* ---- public "Why graphic organisers?" page (2026-10-25) ---- */
.why { max-width: 960px; margin: 1.2rem auto; display: grid; gap: 1.1rem; }
.why-hero { background: var(--ribbon); color: #fff; border-radius: 14px; padding: 1.6rem 1.8rem; }
.why-hero h1 { margin: 0 0 .4rem; font-size: 1.75rem; line-height: 1.25; }
.why-sub { margin: 0; color: #ffd08a; font-weight: 600; font-size: 1.05rem; }
.why h3 { color: var(--brand); margin: 1.1rem 0 .4rem; font-size: 1.08rem; }
.why h3:first-child { margin-top: 0; }
.why p { line-height: 1.6; }
.why-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; margin-top: .8rem; }
.why-steps > div { background: var(--c); color: #fff; border-radius: 8px; padding: .6rem .7rem; display: grid; gap: .25rem; font-size: .88rem; }
.why-steps > div b { font-size: .98rem; }
.why-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin: .8rem 0; }
.why-stats.why-count { grid-template-columns: repeat(2, 1fr); }
.why-stats > div { background: var(--ribbon); color: #fff; border-radius: 10px; padding: .8rem 1rem; display: grid; gap: .25rem; align-content: start; }
.why-stats .big { font-size: 2.2rem; font-weight: 800; color: #ffd08a; line-height: 1; }
.why-stats > div > span:last-child { font-size: .86rem; line-height: 1.45; }
.why-table { width: 100%; border-collapse: collapse; margin: .6rem 0; }
.why-table th { background: var(--ribbon); color: #fff; text-align: left; padding: .5rem .7rem; }
.why-table td { border: 1px solid var(--line); padding: .5rem .7rem; vertical-align: top; line-height: 1.5; }
.why-table td:first-child { width: 24%; }
.why-cta { text-align: center; margin-bottom: 1rem; }
@media (max-width: 760px) { .why-steps, .why-stats, .why-stats.why-count { grid-template-columns: 1fr; } .why-hero h1 { font-size: 1.35rem; } }

/* ---- public "Maths Encyclopaedia Project" page (2026-10-25) ---- */
.ency-card { display: flex; gap: .9rem; align-items: flex-start; background: var(--ribbon); color: #fff; border-radius: 14px; padding: 1.1rem 1.3rem; text-decoration: none; box-shadow: var(--shadow); }
.ency-card:hover { background: var(--ribbon-line); }
.ency-card > span:last-child { display: grid; gap: .3rem; }
.ency-card b { font-size: 1.2rem; color: #ffd08a; }
.ency-icon { font-size: 2rem; line-height: 1; }
.ency-go { font-weight: 700; margin-top: .2rem; }
.ency-tools { display: grid; gap: .6rem; margin: .8rem 0 .4rem; }
.ency-tools input { font: inherit; padding: .55rem .8rem; border: 1px solid var(--line); border-radius: 8px; width: 100%; box-sizing: border-box; }
.ency-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.ency-chip { background: #fff; color: var(--brand); border: 1px solid var(--ribbon); border-radius: 999px; padding: .3rem .8rem; font-weight: 600; }
.ency-chip.on { background: var(--ribbon); color: #fff; }
.ency-az { display: flex; flex-wrap: wrap; gap: .3rem; margin: .7rem 0 .2rem; }
.ency-az a { background: var(--accent); color: #fff; font-weight: 800; width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 6px; text-decoration: none; }
.ency-az a:hover { background: #e8962a; }
.ency-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.ency-topic { scroll-margin-top: 7rem; transition: box-shadow .3s; }
.ency-topic.flash { box-shadow: 0 0 0 3px var(--accent); }
.ency-letter { display: inline-grid; place-items: center; background: var(--accent); color: #fff; border-radius: 5px; width: 1.6rem; height: 1.6rem; margin-right: .3rem; font-size: .95rem; }
.ency-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.ency-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; padding: .45rem .55rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.ency-list li.see { background: var(--tint); }
.ency-list li.see a { font-weight: 600; }
.ency-t { flex: 1 1 60%; line-height: 1.4; }
.ency-tag { font-size: .72rem; background: #e3eef8; color: var(--brand); border-radius: 999px; padding: .1rem .5rem; white-space: nowrap; }
.ency-acts { display: flex; gap: .3rem; margin-left: auto; }
.ency-open { background: var(--ribbon); color: #fff !important; font-weight: 700; font-size: .82rem; padding: .25rem .6rem; border-radius: 6px; text-decoration: none; white-space: nowrap; }
.ency-open:hover { background: var(--ribbon-line); }
.ency-soon { font-size: .8rem; color: #8a6d3b; background: #fff3dd; border-radius: 6px; padding: .2rem .5rem; white-space: nowrap; }
.ency-topic[hidden], .ency-list li[hidden] { display: none; }
@media (max-width: 760px) { .ency-grid { grid-template-columns: 1fr; } }
.ency-ws-list { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.ency-chip[data-l="Worked Solutions"] { border-color: var(--accent); color: #9a5a00; }
.ency-chip[data-l="Worked Solutions"].on { background: var(--accent); color: #fff; }
.ency-open.ency-hw { background: var(--accent); }
.ency-open.ency-hw:hover { background: #e8962a; }

/* generated questions (js/generators.js, 2026-10-25): Edexcel-style text + drawn diagram */
.gen-q { font-family: "Times New Roman", STIXGeneral, serif; font-size: 1.15rem; line-height: 1.6; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .6rem 1rem; }
.gen-q p { margin: .45rem 0; }
.gen-q .gbig { font-size: 1.3rem; }
.gen-q .gsvg { display: block; max-width: 440px; width: 100%; margin: .4rem auto; font-family: "Times New Roman", serif; }
.gfrac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; line-height: 1.1; margin: 0 .15em; }
.gfrac > span:first-child { border-bottom: 1.5px solid currentColor; padding: 0 .15em; }
.gvec { display: inline-grid; vertical-align: middle; justify-items: center; padding: 0 .5em; margin: 0 .15em; border-left: 1.6px solid #111; border-right: 1.6px solid #111; border-radius: 10px; line-height: 1.2; }
.fo-gen { margin: .4rem 0 .6rem; }

/* top-bar "Why graphic organisers?" link styled like the orange button in the Maths11To18 box (2026-10-25) */
#nav a.nav-cta { background: #fff; color: var(--ribbon); font-weight: 700; }
#nav a.nav-cta:hover, #nav a.nav-cta.on { background: #e8f1f8; color: var(--ribbon-line); }
/* the same white button inside the big Maths11To18 box */
.btn.hero-why { background: #fff; color: var(--ribbon); font-weight: 700; font-size: 1.08rem; }
.btn.hero-why:hover { background: #e8f1f8; color: var(--ribbon-line); }

/* worked-solution buttons stacked: green = this question, blue = the original exam question (2026-10-26) */
.sol-btns { margin-left: auto; display: inline-flex; flex-direction: column; gap: .35rem; align-items: stretch; }
.sol-btns .sol-btn { margin-left: 0; text-align: center; }
.sol-btn.sol-orig { background: var(--accent) !important; }
.sol-btn.sol-orig:hover { background: #e8962a !important; }

/* QLA & feedback sheets (2026-10-26) */
.qla-filters { display: flex; flex-wrap: wrap; gap: .6rem 1rem; margin-bottom: .8rem; }
.qla-filters label { display: flex; flex-direction: column; font-size: .85rem; color: var(--muted); gap: .2rem; }
.qla-filters select, .qla-filters input { width: auto; min-width: 9rem; }
.qla-scroll { max-height: 65vh; }
table.qla { border-collapse: separate; border-spacing: 2px; font-size: .85rem; }
table.qla th { vertical-align: bottom; font-size: .75rem; padding: .2rem; min-width: 52px; }
table.qla td { padding: 0; text-align: center; }
table.qla .qla-h { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; margin: 0 auto .2rem; font-weight: 700; }
table.qla .qla-name { text-align: left; position: sticky; left: 0; background: var(--panel, #fff); padding: .2rem .5rem; white-space: nowrap; z-index: 1; }
table.qla .qla-foot td { border-top: 2px solid var(--line); font-weight: 700; }
.qla-two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 900px) { .qla-two { grid-template-columns: 1fr; } }
.btn.disabled { pointer-events: none; opacity: .5; }
.fb-page { background: #fff; color: #111; max-width: 210mm; margin: 0 auto 1.2rem; padding: 12mm 12mm 10mm; box-shadow: var(--shadow); border-radius: 6px; }
.fb-page h2 { margin: .1rem 0; } .fb-page h3 { margin: .8rem 0 .35rem; font-size: 1rem; }
.fb-kicker { font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ribbon, #1f4e79); }
.fb-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; border-bottom: 3px solid var(--ribbon, #1f4e79); padding-bottom: .5rem; }
.fb-score { text-align: right; } .fb-score .mk { display: inline-block; font-size: 1.6rem; padding: .2rem .8rem; }
.fb-score small { display: block; color: #555; margin-top: .2rem; }
.fb-two { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: .7rem; }
.fb-box { border: 1px solid #c9d2de; border-radius: 6px; padding: .4rem .8rem; margin-top: .6rem; }
.fb-two .fb-box { margin-top: 0; }
.fb-box.good { border-left: 5px solid var(--ok); } .fb-box.bad { border-left: 5px solid var(--bad); }
.fb-box ul, .fb-box ol { margin: .2rem 0; padding-left: 1.2rem; font-size: .9rem; }
.fb-chip { display: inline-block; padding: .1rem .5rem; margin: .15rem 0; }
table.fb-table { width: 100%; font-size: .8rem; border-collapse: collapse; }
table.fb-table th, table.fb-table td { border: 1px solid #c9d2de; padding: .15rem .35rem; }
table.fb-table .mk { display: inline-block; min-width: 42px; padding: 0 .3rem; }
.flag.Revise { color: #c00000; font-weight: 700; } .flag.Strong { color: #007a33; font-weight: 700; } .flag.Notdone { color: #777; }
@media print {
  .fb-print .fb-page { box-shadow: none; border-radius: 0; margin: 0; padding: 0; max-width: none; break-after: page; }
  .fb-print .fb-page:last-child { break-after: auto; }
  .fb-print table.fb-table tr { break-inside: avoid; }
}

/* class lists (2026-10-26) */
.cl-org { display: flex; flex-direction: column; gap: .45rem; margin-bottom: .8rem; }
.cl-org label { color: var(--ink); } .cl-org input[type=radio] { width: auto; }
.cl-name input { max-width: 320px; margin-left: .4rem; }
.cl-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .5rem .8rem; }
.cl-map label { display: flex; flex-direction: column; font-size: .85rem; color: var(--muted); gap: .2rem; }
.cl-sum { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 .8rem; }
.cl-sum > div { border: 1px solid var(--line); border-radius: 6px; padding: .35rem .7rem; background: #f7f9fc; }
.cl-sum > div.warn { border-color: var(--bad); color: var(--bad); }
.cl-miss { columns: 2; } .cl-pick { max-height: 40vh; overflow: auto; border: 1px solid var(--line); border-radius: 6px; padding: .4rem .6rem; }
.cl-pick label { display: block; color: var(--ink); } .cl-pick input, .cl-miss input { width: auto; }
details.archived { margin-top: 1rem; } details.archived .toolbar { flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.slips { display: grid; grid-template-columns: 1fr 1fr; gap: 0; max-width: 210mm; margin: 0 auto; background: #fff; }
.slip { border: 1px dashed #999; padding: 4mm 5mm; height: 54mm; box-sizing: border-box; overflow: hidden; color: #111; font-size: .85rem; }
.slip-brand { font-weight: 800; color: var(--ribbon, #1f4e79); } .slip-brand b { color: var(--accent); }
.slip-name { font-size: 1.15rem; font-weight: 700; margin: .1rem 0; }
.slip table { margin-top: .3rem; font-size: .8rem; } .slip td { padding: .05rem .4rem .05rem 0; border: 0; }
@media print { .slips { max-width: none; } .slip { break-inside: avoid; } }
/* true superscript indices (2026-10-26): x^−½ → x with a raised, stacked ½ */
sup.ix { font-size: .8em; line-height: 0; vertical-align: .6em; margin-left: .04em; white-space: nowrap; }
sup.ix .frac { font-size: .95em; vertical-align: .15em; line-height: 1.05; margin: 0 .05em; }
sup.ix .frac > span:first-child { padding: 0 .1em; }

/* geometry toolbox on question images (27 Oct 2026) */
.qimg-foot { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-top: .25rem; flex-wrap: wrap; }
.geo-open { font-size: .92rem; padding: .3em .8em; }
.geo-stage { position: relative; display: inline-block; max-width: 100%; line-height: 0; }
.geo-stage img { display: block; }
.geo-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.geo-stage.drawing .geo-svg { pointer-events: auto; cursor: crosshair; touch-action: none; }
.qimg.geo-on { display: flex; gap: .7rem; align-items: flex-start; text-align: left; }
.qimg.geo-on .geo-stage { flex: 0 1 auto; min-width: 0; }   /* hug the picture exactly, so drawings keep their place when the toolbox closes */
.geo-stage img { max-width: 100%; height: auto; }
.geo-bar { position: sticky; top: .6rem; flex: 0 0 158px; display: flex; flex-direction: column; gap: .3rem; background: #f4f7fb; border: 1px solid var(--line);
  border-radius: 8px; padding: .5rem; z-index: 2; }
.geo-title { font-weight: 700; color: var(--brand); font-size: .95rem; margin-bottom: .1rem; }
.geo-tool { display: flex; align-items: center; gap: .45rem; text-align: left; font-size: .88rem; padding: .35em .55em; background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-radius: 6px; }
.geo-tool span { width: 1.3em; text-align: center; font-weight: 700; }
.geo-tool.on { outline: 2px solid var(--accent); background: #fff8ec; }
.geo-cols { display: flex; gap: .35rem; justify-content: space-between; margin: .2rem 0; }
.geo-col { width: 1.8rem; height: 1.8rem; padding: 0 !important; border-radius: 50% !important; background: var(--c) !important; border: 2px solid #fff !important; box-shadow: 0 0 0 1px var(--line); }
.geo-col.on { box-shadow: 0 0 0 3px var(--accent); }
.geo-small { font-size: .82rem; padding: .3em .5em; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; }
.geo-help { color: var(--muted); line-height: 1.35; margin-top: .2rem; }
.geo-view { position: relative; display: inline-block; max-width: 640px; width: 100%; margin-top: .3rem; border: 1px solid var(--line); border-radius: 6px; line-height: 0; }
.geo-view img { width: 100%; height: auto; }
.geo-view svg { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (max-width: 760px) { .qimg.geo-on { flex-direction: column; } .geo-bar { position: static; flex-direction: row; flex-wrap: wrap; width: 100%; } }
/* question dock: the question stays in view while scrolling (27 Oct 2026) */
.qdock { position: fixed; top: 6.6rem; right: 12px; width: min(var(--qw, 400px), calc(100vw - 24px)); max-height: calc(100vh - 7.6rem); z-index: 15;
  display: flex; flex-direction: column; background: #fff; border: 2px solid var(--ribbon-line); border-radius: 10px; box-shadow: 0 8px 28px rgba(16, 32, 64, .22); overflow: hidden; }
.qdock.left { right: auto; left: 12px; }
.qdock-bar { display: flex; align-items: center; gap: .25rem; background: var(--ribbon); color: var(--ribbon-ink); padding: .3rem .45rem; }
.qdock-title { font-weight: 700; font-size: .88rem; margin-right: auto; }
.qdock-bar button { background: rgba(255, 255, 255, .18); color: #fff; border: 0; border-radius: 6px; min-width: 1.9rem; padding: .15rem .45rem; font-size: .95rem; line-height: 1.3; cursor: pointer; }
.qdock-bar button:hover, .qdock-bar button:focus-visible { background: rgba(255, 255, 255, .34); outline: 2px solid #fff; outline-offset: 0; }
.qdock-body { overflow: auto; padding: .4rem; }
.qdock-body .qimg { border: 0; padding: 0; margin: 0; display: block; }
.qdock-body .qimg img, .qdock-body .geo-stage { width: 100% !important; max-width: 100%; }
.qdock-body .gen-q { font-size: .85rem; }
.qdock-tab { position: fixed; top: 6.8rem; right: 0; z-index: 15; border-radius: 8px 0 0 8px; background: var(--accent); color: #fff; font-weight: 700;
  border: 0; padding: .45rem .7rem; box-shadow: 0 4px 14px rgba(16, 32, 64, .25); cursor: pointer; }
.qdock-tab.left { right: auto; left: 0; border-radius: 0 8px 8px 0; }
@media (max-width: 760px) {
  /* phones: a strip across the top of the screen (the menu bar is not pinned there) */
  .qdock, .qdock.left { top: env(safe-area-inset-top, 0px); left: 0; right: 0; width: auto; max-height: var(--qh, 34vh); border-radius: 0 0 10px 10px; border-width: 0 0 2px; }
  .qdock-tab, .qdock-tab.left { top: calc(8px + env(safe-area-inset-top, 0px)); }
}
@media print { .qdock, .qdock-tab { display: none !important; } }

/* 31 Oct 2026: "Unfamiliar Problems" / "Number Skills" jump links in the Independent practice banner */
.panel > .hd .jump-link { font-size: .95rem; padding: .3rem .8rem; border: 0; cursor: pointer; }
.bonus-card.jump-flash { animation: jumpflash 1.8s ease-out 1; }
@keyframes jumpflash { 0%, 40% { box-shadow: 0 0 0 5px rgba(240,162,59,.85); } 100% { box-shadow: 0 0 0 0 rgba(240,162,59,0); } }

/* ---- server mode (Task 15 Stage 3, 6 Nov 2026) ---- */
.syncst { position: fixed; right: 12px; bottom: 12px; z-index: 50; padding: .35rem .7rem; border-radius: 999px; font-size: .82rem; font-weight: 600;
  background: #eef2f8; color: #33415c; box-shadow: var(--shadow); }
.syncst.ok { background: #e7f6ec; color: #1d6b3a; } .syncst.off { background: #fdf0ee; color: #a3322a; } .syncst.warn { background: #fff4e0; color: #8a5a00; }
.ccard.other { background: #f8f9fc; } .ccard.other .name { color: #4a5a78; }
.srv-form { max-width: 560px; } .srv-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.srv-kids .kid { display: grid; grid-template-columns: 1fr 1fr 90px 1fr auto; gap: .4rem; align-items: end; margin: .3rem 0; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.creds { font-family: Consolas, monospace; background: #f4f7fd; border: 1px solid #c9d4ef; border-radius: 6px; padding: .5rem .7rem; }
@media (max-width: 640px) { .srv-form .row2, .srv-kids .kid { grid-template-columns: 1fr; } }

.join-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: .4rem; }
@media (min-width: 1100px) { .join-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) { .join-grid { grid-template-columns: 1fr; } }
.join-card { margin-top: 0; } .join-card .bar { margin-top: auto; height: 30px; background: #2f6fb3; font-size: .9rem; } .join-card .bar > i { display: none; } .join-card:hover { transform: translateY(-2px); }
.ad-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; } .ad-grid figure { margin: 0; } .ad-grid img { width: 100%; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; }
.ad-grid figcaption { font-size: .9rem; margin-top: .4rem; }
@media (max-width: 760px) { .ad-grid { grid-template-columns: 1fr; } }
#trialbar { background: #fff4e0; border-bottom: 2px solid var(--accent); padding: .45rem 1rem; font-size: .9rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
#trialbar[hidden] { display: none; } #trialbar .btn { margin-left: auto; padding: .25em .7em; }

/* question dock (6 Nov 2026): when there is no free room beside the working, the page moves over to make room for it */
@media (min-width: 761px) { body.qd-push-right main { padding-right: var(--qpush); } body.qd-push-left main { padding-left: var(--qpush); } }
@media (min-width: 761px) { .qdock-bar { cursor: grab; touch-action: none; } .qdock.dragging { opacity: .92; box-shadow: 0 10px 30px rgba(0,0,0,.25); } .qdock.dragging .qdock-bar { cursor: grabbing; } }

/* 👁 show / hide password (6 Nov 2026) */
.pw-wrap { position: relative; display: inline-block; max-width: 100%; }
.pw-wrap.wide { display: block; }
.pw-wrap > input { padding-right: 2.4em !important; }
.pw-wrap.wide > input { width: 100%; box-sizing: border-box; }
.pw-eye { position: absolute; right: .3em; top: 50%; transform: translateY(-50%); background: none !important; border: 0 !important;
  box-shadow: none !important; padding: .2em; margin: 0; min-width: 0; line-height: 0; color: var(--muted, #667); cursor: pointer; }
.pw-eye:hover, .pw-eye:focus-visible { color: var(--ink, #223); }

/* "Password is saved. Login back in." – white bold on blue (6 Nov 2026) */
.pw-saved { display: inline-block; background: #1f5fa8; color: #fff; font-weight: 700; padding: .55em .9em; border-radius: 6px; }
.pw-saved-top { display: block; max-width: 640px; margin: 0 auto 1rem; text-align: center; font-size: 1.05rem; }
