/* Y7 cell game · the world and its panels (4 Nov 2026).
   Daniel: "Fantasyland inspired … make it magical … like you're diving into a new world". The world is always a night of
   jewel light; the panels follow the reader's bright or dark choice. Year 7 sizes (memory year7-text-and-instructions):
   page text 17–18 px, nothing a pupil must read under 15 px; what to press stands on the part, and is highlighted. */
:root{
  --serif:'Fraunces',Georgia,'Times New Roman',serif;
  --gold:#FFD27A; --gold2:#F0B43A; --night:#0B0F2A; --night2:#151a46; --glass:rgba(14,16,46,.78); --glass-rule:rgba(255,226,154,.38);
  --qp-bg:rgba(255,253,247,.97); --qp-ink:#1B1B33; --qp-ink2:#45476A; --qp-rule:#E4DDCB; --qp-accent:#6B3FD1; --qp-accent2:#4E2BB0;
}
:root[data-theme="dark"]{ --qp-bg:rgba(22,20,52,.96); --qp-ink:#EEF0FF; --qp-ink2:#C2C6E8; --qp-rule:#3A3A70; --qp-accent:#B79BFF; --qp-accent2:#D3C2FF }
@media (prefers-color-scheme:dark){ :root:not([data-theme="light"]){ --qp-bg:rgba(22,20,52,.96); --qp-ink:#EEF0FF; --qp-ink2:#C2C6E8; --qp-rule:#3A3A70; --qp-accent:#B79BFF; --qp-accent2:#D3C2FF } }

body{background:var(--page)}
.top{padding-bottom:8px}
.lg{display:inline}
@media (max-width:560px){ .lg{display:none} }

/* ---------- the stage: the world fills it ---------- */
.stage{position:relative;height:calc(100vh - 150px);height:calc(100svh - 150px);min-height:560px;max-height:1100px;margin:0 auto 18px;max-width:1800px;border-radius:22px;overflow:hidden;background:radial-gradient(120% 90% at 50% 20%,#1d1f5a 0%,#0b0f2a 70%);box-shadow:0 18px 50px rgba(10,12,40,.35);isolation:isolate}
:fullscreen .stage,.stage:fullscreen{height:100vh;max-height:none;border-radius:0;margin:0}
/* full screen is the whole page (js/game/main.js): the stage fills the screen; what opens beside it stays drawn above it */
:root:fullscreen{overflow:hidden}
:root:fullscreen .stage{position:fixed;inset:0;z-index:20;height:auto;min-height:0;max-height:none;max-width:none}
#world{position:absolute;inset:0;width:100%;height:100%;display:block;cursor:grab;touch-action:none}
#world:active{cursor:grabbing}
.loading{position:absolute;inset:0;display:grid;place-content:center;justify-items:center;gap:14px;background:radial-gradient(circle at 50% 45%,#2a2370,#0b0f2a 70%);color:#E8E4FF;font:700 18px/1.4 var(--sans);z-index:40;transition:opacity .6s}
.loading[hidden]{display:none}
.loading__orb{width:70px;height:70px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff7d6,#FFD27A 30%,#8f7cff 70%,transparent 72%);box-shadow:0 0 40px #8f7cff;animation:orb 2.4s ease-in-out infinite}
@keyframes orb{50%{transform:scale(.82);box-shadow:0 0 18px #ffd27a}}
.loading p{margin:0;max-width:420px;text-align:center}

/* ---------- names on the world: level lines that follow their parts (names.js, 8 Nov 2026) ----------
   names.js places each name (its transform) and its line every frame; a name that steps back (nm--away: its part out of
   view, or no room) fades, and fades in again when it is free */
.names{position:absolute;inset:0;pointer-events:none;z-index:5;opacity:0;transition:opacity .35s}
.names.on{opacity:1}
.names__lines{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.nml{stroke:rgba(255,226,154,.85);stroke-width:1.6;transition:opacity .18s}
.nml.nml--away{opacity:0}
.nml.is-asleep{stroke:rgba(196,190,255,.55);stroke-dasharray:4 4}
.nml.is-done{stroke:rgba(140,240,200,.85)}
.nm{position:absolute;left:0;top:0;will-change:transform;transition:opacity .18s;display:inline-flex;flex-wrap:wrap;align-items:center;gap:4px 7px;max-width:205px;padding:7px 13px;border-radius:18px;font:800 16px/1.15 var(--sans);color:#FFF8E6;background:var(--glass);border:1.5px solid var(--glass-rule);box-shadow:0 4px 18px rgba(0,0,0,.35),inset 0 0 14px rgba(255,210,122,.12);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
button.nm{pointer-events:auto;cursor:pointer}
.nm.nm--away{opacity:0;pointer-events:none}
.nm--L{flex-direction:row-reverse}
.nm.is-open{border-color:var(--gold);box-shadow:0 0 0 0 rgba(255,210,122,.6),0 4px 18px rgba(0,0,0,.35);animation:awake 2.2s ease-out infinite}
@keyframes awake{0%{box-shadow:0 0 0 0 rgba(255,210,122,.55),0 4px 18px rgba(0,0,0,.35)}80%,100%{box-shadow:0 0 0 12px rgba(255,210,122,0),0 4px 18px rgba(0,0,0,.35)}}
.nm--on{font-size:15px;padding:4px 9px;gap:4px;max-width:160px}
/* a name written inside the space it names, with no box (the space between the two membranes of the nucleus, cut open: a box
   had hidden the very space it names; dark words on the lilac, a pale glow round them) */
.nm.nm--in{background:none;border-color:transparent;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none;color:#24195c;text-align:center;justify-content:center;text-shadow:0 0 4px rgba(236,230,255,.95),0 0 9px rgba(236,230,255,.8)}
.nm--on .ico{width:15px;height:15px}
.nm.is-asleep{color:#CFCBF5;background:rgba(30,28,70,.62);border-style:dashed;border-color:rgba(196,190,255,.5)}
.nm.is-done{border-color:#8CF0C8;color:#E9FFF6}
.nm.is-y7{border-color:var(--gold);color:#FFE7A8}                 /* the five parts Year 7 must know */
.nm__s{color:var(--gold)}
button.nm:hover,button.nm:focus-visible{background:rgba(40,36,110,.92);outline:2.5px solid var(--gold);outline-offset:2px}
@media (prefers-reduced-motion:reduce){ .nm.is-open{animation:none} }

/* ---------- buttons on the world (they stand on the part they act on) ---------- */
.hots{position:absolute;inset:0;pointer-events:none;z-index:8}
.hot3{position:absolute;left:0;top:0;pointer-events:none;will-change:transform}
.hot3__b{position:absolute;pointer-events:auto;display:inline-flex;align-items:center;gap:7px;white-space:nowrap;font:900 17px/1.1 var(--sans);color:#2B1A00;background:linear-gradient(180deg,#FFE7A8,#FFC95E);border:2px solid #FFF6D6;border-radius:999px;padding:9px 16px;cursor:pointer;box-shadow:0 0 0 0 rgba(255,214,110,.7),0 6px 18px rgba(0,0,0,.4);animation:hotPulse 1.8s ease-out infinite}
.hot3--c .hot3__b{transform:translate(-50%,-50%)} .hot3--t .hot3__b{transform:translate(-50%,-100%)} .hot3--b .hot3__b{transform:translate(-50%,0)}
.hot3--r .hot3__b{transform:translate(8px,-50%)} .hot3--l .hot3__b{transform:translate(calc(-100% - 8px),-50%)}
.hot3__b:hover,.hot3__b:focus-visible{background:linear-gradient(180deg,#FFF1C8,#FFD27A);outline:3px solid #fff;outline-offset:2px}
.hot3__b .ico{width:22px;height:22px}
@keyframes hotPulse{0%{box-shadow:0 0 0 0 rgba(255,214,110,.7),0 6px 18px rgba(0,0,0,.4)}75%,100%{box-shadow:0 0 0 14px rgba(255,214,110,0),0 6px 18px rgba(0,0,0,.4)}}
.hot3.tok .hot3__b{font-size:16px;padding:7px 12px;color:#0E2230;background:linear-gradient(180deg,#E8FBFF,#B9EEFF);border-color:#fff}
.hot3.tag .hot3__b{animation:none;cursor:default;font-size:15.5px;padding:6px 12px;color:#FFF8E6;background:var(--glass);border:1.5px solid var(--glass-rule)}
.hot3.tag.y7 .hot3__b{border-color:var(--gold);color:#FFE7A8}
.hot3.code .hot3__b,.hot3.count .hot3__b{animation:none;cursor:default;color:#FFF8E6;background:rgba(20,22,60,.9);border-color:#9FF3FF}
.hot3.q3 .hot3__b{min-width:44px;justify-content:center}
.hot3 .hot3__b.no,.hot3__b:disabled{animation:none}
.hot3.big .hot3__b{font-size:19px;padding:12px 22px}
.hot3.edge .hot3__b{outline:2px dashed #fff;outline-offset:3px}
.sym{font-size:20px;line-height:1}
.sym.s0{color:#2E9F84} .sym.s1{color:#3F6FD8} .sym.s2{color:#C9741E} .sym.s3{color:#B8458A}
.hot3.code .sym.s0,.hot3.count .sym.s0{color:#5BC8A8} .hot3.code .sym.s1{color:#7FA8FF} .hot3.code .sym.s2{color:#F2A65A} .hot3.code .sym.s3{color:#E36FB0}
@media (prefers-reduced-motion:reduce){ .hot3__b{animation:none} }

/* ---------- the bag and the tools ---------- */
.hud{position:absolute;left:14px;top:14px;z-index:9;display:flex;flex-direction:column;gap:8px;align-items:flex-start;max-width:min(400px,36%)}
.bag{background:var(--glass);border:1.5px solid var(--glass-rule);border-radius:18px;padding:10px 12px;color:#FFF8E6;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);box-shadow:0 6px 24px rgba(0,0,0,.35)}
.bag.pop{animation:bagPop .5s ease-out}
@keyframes bagPop{40%{transform:scale(1.06)}}
.bag__e{display:flex;align-items:center;gap:10px;font-size:15px}
/* the bag folds (quest.js paintBag): its energy bar and a button that says how many items it holds */
.bag__top{display:flex;align-items:center;gap:10px}
.bag__top .bag__e{flex:1;min-width:0}
.bag__fold{flex:none;font:800 13px/1 var(--sans);color:#FFF8E6;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.32);border-radius:999px;padding:6px 10px;cursor:pointer;white-space:nowrap}
.bag__fold:hover{background:rgba(255,255,255,.2)}
.bag__fold:focus-visible{outline:2px solid #FFE39A;outline-offset:2px}
.bag__items[hidden]{display:none}
.bag__ek{display:inline-flex;align-items:center;gap:5px;font-weight:800}
.bag__ek .ico{width:20px;height:20px}
.bag__bar{flex:1;min-width:120px;height:12px;border-radius:99px;background:rgba(255,255,255,.14);overflow:hidden;border:1px solid rgba(255,255,255,.2)}
.bag__bar i{display:block;height:100%;background:linear-gradient(90deg,#FFE39A,#FFB347);border-radius:99px;transition:width .8s}
.bag.low .bag__bar i{background:linear-gradient(90deg,#FF8A7A,#E0533F)}
.bag__items{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.bag__it{display:inline-flex;align-items:center;gap:6px;font:700 15px/1.2 var(--sans);background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.18);border-radius:999px;padding:4px 10px 4px 5px}
.bag__it .ico{width:22px;height:22px}
.bag__none{font-size:15px;color:#CFCBF5}
.tools{display:flex;gap:6px;flex-wrap:wrap}
.tool{font:800 15px/1 var(--sans);color:#FFF8E6;background:var(--glass);border:1.5px solid var(--glass-rule);border-radius:999px;padding:9px 13px;cursor:pointer}
.tool:hover,.tool:focus-visible{border-color:var(--gold)}
.wbbtn{flex:none;font:800 15.5px/1 var(--sans);color:#2B1A00;background:linear-gradient(180deg,#FFE7A8,#FFC95E);border:0;border-radius:100px;padding:10px 15px;cursor:pointer;display:inline-flex;gap:7px;align-items:center}
.wbbtn .lang{font-weight:700;opacity:.85;font-size:13.5px}
.flyer{position:fixed;z-index:70;width:44px;height:44px;margin:-22px 0 0 -22px;pointer-events:none;transition:left .85s cubic-bezier(.5,.05,.4,1),top .85s cubic-bezier(.5,.05,.4,1),transform .85s;filter:drop-shadow(0 0 10px #FFE39A)}
.flyer .ico{width:44px;height:44px}
.flyer.go{transform:scale(.6)}
.toasts{position:absolute;top:14px;left:50%;transform:translateX(-50%);z-index:12;display:flex;flex-direction:column;gap:6px;align-items:center;pointer-events:none}
.toast{font:800 17px/1.3 var(--sans);color:#2B1A00;background:linear-gradient(180deg,#FFF1C8,#FFD27A);border-radius:999px;padding:9px 18px;box-shadow:0 6px 24px rgba(0,0,0,.35);animation:toastIn .4s ease-out;transition:opacity .6s,transform .6s}
.toast.out{opacity:0;transform:translateY(-8px)}
@keyframes toastIn{from{opacity:0;transform:translateY(-8px)}}

/* ---------- the quest panel: the pupil's book ---------- */
.quest{position:absolute;z-index:10;top:14px;right:14px;bottom:14px;width:min(430px,38%);overflow-y:auto;overscroll-behavior:contain;background:var(--qp-bg);color:var(--qp-ink);border-radius:20px;border:1.5px solid rgba(255,210,122,.55);box-shadow:0 18px 50px rgba(0,0,0,.4);padding:18px 20px 22px;font-size:17px;line-height:1.55;scrollbar-width:thin}
.quest:empty{display:none}
/* Hide text / Show text (main.js): beside the panel's top, or at the top right once the panel is hidden */
.qhide{position:absolute;z-index:11;top:14px;right:calc(min(430px,38%) + 24px)}
.quest:empty ~ .qhide{display:none}
.stage.qp-off .quest{display:none}
.stage.qp-off .qhide{right:14px}
.qhide.is-new{border-color:var(--gold);animation:qhideNew 1.6s ease-in-out infinite}
@keyframes qhideNew{50%{box-shadow:0 0 0 4px rgba(255,210,122,.75)}}
@media (prefers-reduced-motion:reduce){ .qhide.is-new{animation:none;box-shadow:0 0 0 3px rgba(255,210,122,.9)} }
.qp__eyebrow,.qp__k{font:900 13px/1 var(--sans);letter-spacing:.14em;text-transform:uppercase;color:var(--qp-accent);margin:0 0 6px}
.qp__k{margin:22px 0 8px}
.qp__title{font:800 27px/1.15 var(--serif);margin:2px 0 8px;letter-spacing:-.005em}
.qp__lead{margin:0 0 12px}
.qp__note{font-size:15px;color:var(--qp-ink2);margin:14px 0 0}
.qp__top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 6px;flex-wrap:wrap}
.qp__back,.qp__mapbtn{font:800 15px/1 var(--sans);color:var(--qp-accent2);background:none;border:1.5px solid var(--qp-rule);border-radius:999px;padding:8px 13px;cursor:pointer}
.qp__back:hover,.qp__mapbtn:hover{border-color:var(--qp-accent)}
.qp__kind{font:800 13.5px/1.2 var(--sans);color:var(--qp-ink2);background:color-mix(in srgb,var(--qp-accent) 10%,transparent);border-radius:999px;padding:6px 10px}
.qp__def{border:1.5px solid color-mix(in srgb,var(--qp-accent) 35%,transparent);border-left:6px solid var(--qp-accent);border-radius:12px;padding:8px 12px;margin:6px 0 12px;background:color-mix(in srgb,var(--qp-accent) 6%,transparent)}
.qp__def p{margin:4px 0 0}
.qp__y7,.qp__x{display:inline-block;font:900 12.5px/1 var(--sans);letter-spacing:.1em;text-transform:uppercase;border-radius:6px;padding:4px 7px}
.qp__y7{color:#5A3B00;background:#FFE39A}
.qp__x{color:#fff;background:var(--qp-accent)}
.qp__intro{margin:0 0 12px}
.qp__intro p,.qp__done p,.intro__t p,.qp__lead p{margin:0}
.qp__intro p+p,.step__t p+p,.qp__done p+p,.intro__t p+p,.qp__lead p+p{margin-top:.5em}   /* one idea a paragraph */
.steps{list-style:none;margin:0;padding:0;counter-reset:st}
.step{position:relative;padding:10px 12px 10px 42px;margin:0 0 8px;border-radius:14px;border:1.5px solid var(--qp-rule);counter-increment:st}
.step::before{content:counter(st);position:absolute;left:10px;top:10px;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;font:900 14px/1 var(--sans);color:#fff;background:var(--qp-ink2)}
.step.is-now{border-color:var(--qp-accent);background:color-mix(in srgb,var(--qp-accent) 7%,transparent);box-shadow:0 0 0 3px color-mix(in srgb,var(--qp-accent) 18%,transparent)}
.step.is-now::before{background:var(--qp-accent)}
.step.is-done{opacity:.8}
.step.is-done::before{content:"✓";background:#2E9F64}
/* ↻ beside a finished step: watch it again (Daniel, 9 Nov 2026); its words show at once on pointing or focus (no title) */
.step__again{position:relative;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;margin-left:6px;vertical-align:middle;border:1.5px solid color-mix(in srgb,var(--qp-accent) 55%,transparent);border-radius:50%;background:var(--paper,#fff);color:var(--qp-accent);font:800 17px/1 inherit;cursor:pointer}
.step__again:hover,.step__again:focus-visible{background:var(--qp-accent);color:#fff;outline:none}
.step__again::after{content:attr(data-tip);position:absolute;left:50%;bottom:calc(100% + 6px);transform:translateX(-50%);white-space:nowrap;padding:4px 9px;border-radius:8px;background:#1c142c;color:#fff;font:700 13px/1.3 inherit;opacity:0;pointer-events:none}
.step__again:hover::after,.step__again:focus-visible::after{opacity:1}
.is-watching .step__again{opacity:.35;pointer-events:none}
.step.is-done.is-watching{opacity:1;border-color:var(--qp-accent);background:color-mix(in srgb,var(--qp-accent) 9%,transparent);box-shadow:0 0 0 3px color-mix(in srgb,var(--qp-accent) 22%,transparent)}
.step__watch{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:8px 0 0;font-weight:800;color:var(--qp-accent)}
.step__watch .step__stop{padding:4px 12px;font-size:14px}
.hot3__b.is-auto{transform:scale(.94);filter:brightness(1.12)}
.step__t p{margin:0}
.step__do{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.step__do:empty{display:none}
.step__say{margin:8px 0 0;font-size:16.5px}
.step__say:empty{display:none}
.step__say.ok{color:#1E7A4A;font-weight:700}
.step__say.no{color:#A14A10}
/* a longer message: one idea a line, the first line in bold and the rest plain, two facts that go together as a short list,
   an aside quieter (Daniel, 9 Nov 2026: "all in one lump is horrible for y7s") */
.step__say p{margin:0}
.step__say p+p,.step__say ul,.step__say ul+p{margin-top:.45em}
.step__say ul{margin-bottom:0;padding-left:1.25em}
.step__say li+li{margin-top:.2em}
.step__say.ok>:not(:first-child){font-weight:500}
.step__say .say__aside{font-size:.92em;font-style:italic;opacity:.85}
:root[data-theme="dark"] .step__say.ok{color:#7EE2AC} :root[data-theme="dark"] .step__say.no{color:#FFB27A}
@media (prefers-color-scheme:dark){ :root:not([data-theme="light"]) .step__say.ok{color:#7EE2AC} :root:not([data-theme="light"]) .step__say.no{color:#FFB27A} }
.btn.next{font:900 16.5px/1 var(--sans);color:#fff;background:var(--qp-accent);border:0;border-radius:999px;padding:12px 18px;cursor:pointer}
.btn.next:hover{background:var(--qp-accent2)}
.btn.next.pulse{animation:nextPulse 1.8s ease-out infinite}
@keyframes nextPulse{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--qp-accent) 60%,transparent)}80%,100%{box-shadow:0 0 0 12px transparent}}
@media (prefers-reduced-motion:reduce){ .btn.next.pulse{animation:none} }
.choices{display:flex;flex-direction:column;gap:6px;width:100%}
/* what a press added to a step glows for a moment once it is in view: two soft pulses (quest.js reveal; Daniel, 6 Nov 2026) */
.step__say.is-new,.choices.is-new{border-radius:10px;animation:stepNew 1.7s ease-out}
@keyframes stepNew{0%,40%{box-shadow:0 0 0 4px rgba(255,210,122,.95),inset 0 0 0 999px rgba(255,210,122,.2)}20%,60%{box-shadow:0 0 0 8px rgba(255,210,122,.5),inset 0 0 0 999px rgba(255,210,122,.1)}100%{box-shadow:0 0 0 12px rgba(255,210,122,0),inset 0 0 0 999px rgba(255,210,122,0)}}
@media (prefers-reduced-motion:reduce){ .step__say.is-new,.choices.is-new{animation:none;box-shadow:0 0 0 3px rgba(255,210,122,.9)} }
.choice{display:flex;gap:10px;align-items:flex-start;text-align:left;font:700 16.5px/1.35 var(--sans);color:var(--qp-ink);background:color-mix(in srgb,var(--qp-ink) 4%,transparent);border:1.5px solid var(--qp-rule);border-radius:12px;padding:10px 12px;cursor:pointer}
.choice .lt{flex:none;display:inline-grid;place-items:center;width:24px;height:24px;border-radius:7px;background:var(--qp-ink2);color:#fff;font:900 13px/1 var(--sans)}
.choice:hover:not(:disabled){border-color:var(--qp-accent)}
.choice.yes{border-color:#2E9F64;background:color-mix(in srgb,#2E9F64 12%,transparent)}
.choice.no{border-color:#C26A2A;background:color-mix(in srgb,#C26A2A 10%,transparent);opacity:.85}
.choice:disabled{cursor:default}
.qp__end{margin-top:14px}
.qp__done{display:flex;gap:10px;align-items:flex-start;background:linear-gradient(135deg,rgba(255,231,168,.55),rgba(255,210,122,.25));border:1.5px solid #F0C35A;border-radius:14px;padding:10px 12px;color:var(--qp-ink)}
/* a place not done yet: how many of its checks are right (quest.js finishPanel); done comes when all are */
.qp__todo{margin:0 0 10px;padding:8px 12px;border-radius:12px;border:1.5px dashed #C9B8FF;background:rgba(160,140,255,.10);color:var(--qp-ink);font-size:15px}
.qp__todo[hidden]{display:none}
.qp__won:empty{display:none}
.qp__won{margin-top:12px}
.qp__done .ico{width:28px;height:28px;flex:none}
.qp__done p{margin:0}
.fact{margin:12px 0 0;border-radius:14px;padding:10px 14px;background:radial-gradient(120% 120% at 0% 0%,rgba(143,124,255,.22),transparent 60%),color-mix(in srgb,var(--qp-accent) 6%,transparent);border:1.5px dashed color-mix(in srgb,var(--qp-accent) 45%,transparent)}
.fact__k{font:900 13px/1 var(--sans);letter-spacing:.12em;text-transform:uppercase;color:var(--qp-accent);margin:0 0 4px}
.fact p{margin:0}
.fact__src{font-size:13px;color:var(--qp-ink2);margin-top:4px!important}
.qp__real{margin:14px 0 0;width:100%;font:900 16.5px/1.2 var(--sans);color:#1B1240;background:linear-gradient(180deg,#E9E2FF,#CDBDF7);border:1.5px solid #B9A6FF;border-radius:14px;padding:12px 14px;cursor:pointer;text-align:left}
.qp__real:hover{border-color:var(--qp-accent)}
.qp__real:disabled{opacity:.6;cursor:default}
/* the IB switch and the IB words (quest.js ibSwitch), in IB blue; levels: SL and HL blue, HL only rose, beyond grey
   (memory level-colours-never-blank: a filled tint, never a blank box) */
.qp__ib{display:inline-flex;align-items:center;gap:8px;font:800 15px/1 var(--sans);color:#2E3A8C;background:#E7E9F7;border:1.5px solid #9EA9F0;border-radius:999px;padding:5px 12px 5px 5px;cursor:pointer}
.qp__ib:hover{border-color:#2E3A8C}
.qp__ib b{font-weight:900}
.qp__ibt{position:relative;flex:none;width:36px;height:22px;border-radius:999px;background:#B9C0E0;transition:background .2s}
.qp__ibt i{position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.3);transition:transform .2s}
.qp__ib[aria-pressed="true"] .qp__ibt{background:#2E3A8C}
.qp__ib[aria-pressed="true"] .qp__ibt i{transform:translateX(14px)}
.qp__explore--ib{color:#fff;background:linear-gradient(180deg,#3E4DAE,#2E3A8C);border-color:#2E3A8C}
.step__ib{margin:10px 0 0;padding:10px 12px;border-radius:12px;background:#EEF0FB;border-left:4px solid #2E3A8C;color:#1A1F45}
.step__ib p{margin:0 0 8px;font-size:16.5px}
.ibl{display:inline-block;font:900 11.5px/1 var(--sans);letter-spacing:.06em;text-transform:uppercase;border-radius:6px;padding:4px 7px;vertical-align:1px}
.ibl i{font-style:normal;letter-spacing:0}
.ibl--sl{color:#2E3A8C;background:#DCE0F7}
.ibl--hl{color:#9B1C4A;background:#FCE6EE}
.ibl--x{color:#4A5160;background:#E2E5EA;font-style:italic}
.step__ibdoor{display:block;width:100%;font:800 15.5px/1.25 var(--sans);color:#fff;background:#2E3A8C;border:0;border-radius:10px;padding:10px 12px;cursor:pointer;text-align:left}
.step__ibdoor:hover{background:#1F2870}
.nm.nm--ib{font-size:14.5px;padding:5px 10px}
.qp__ibchk{display:none;margin:0 0 10px;padding:9px 12px;border-radius:10px;background:#E3F4EA;color:#14532D;font:700 15.5px/1.35 var(--sans)}
.qp--ib .qp__ibchk{display:block}
.qp--ib .qp__end > .qp__k, .qp--ib .qp__end > .qp__todo, .qp--ib .qp__end > .q{display:none}
:root[data-theme="dark"] .qp__ibchk{background:#123524;color:#A7F3C9}
@media (prefers-color-scheme:dark){ :root:not([data-theme="light"]) .qp__ibchk{background:#123524;color:#A7F3C9} }
:root[data-theme="dark"] .qp__ib{color:#E7E9F7;background:#1D2240;border-color:#5A66C8} :root[data-theme="dark"] .qp__ib[aria-pressed="true"] .qp__ibt{background:#9EA9F0}
:root[data-theme="dark"] .step__ib{background:#1D2240;color:#E7E9F7;border-left-color:#9EA9F0} :root[data-theme="dark"] .step__ibdoor{color:#10142E;background:#9EA9F0}
:root[data-theme="dark"] .ibl--sl{color:#C9CFF7;background:#2A3170} :root[data-theme="dark"] .ibl--hl{color:#F59AB8;background:#3B1426} :root[data-theme="dark"] .ibl--x{color:#C7CCD6;background:#2E333D}
@media (prefers-color-scheme:dark){ :root:not([data-theme="light"]) .qp__ib{color:#E7E9F7;background:#1D2240;border-color:#5A66C8} :root:not([data-theme="light"]) .qp__ib[aria-pressed="true"] .qp__ibt{background:#9EA9F0}
  :root:not([data-theme="light"]) .step__ib{background:#1D2240;color:#E7E9F7;border-left-color:#9EA9F0} :root:not([data-theme="light"]) .step__ibdoor{color:#10142E;background:#9EA9F0}
  :root:not([data-theme="light"]) .ibl--sl{color:#C9CFF7;background:#2A3170} :root:not([data-theme="light"]) .ibl--hl{color:#F59AB8;background:#3B1426} :root:not([data-theme="light"]) .ibl--x{color:#C7CCD6;background:#2E333D} }
.qp__nav{margin-top:18px;display:flex;justify-content:flex-end}
.pls{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-direction:column;gap:6px}
.pl button{width:100%;text-align:left;display:flex;flex-direction:column;gap:2px;background:none;border:1.5px solid var(--qp-rule);border-radius:14px;padding:9px 12px;cursor:pointer;color:var(--qp-ink);font:inherit}
.pl__n{font:800 17px/1.2 var(--sans)}
.pl__s{font-size:15px;color:var(--qp-ink2)}
.pl.is-open button{border-color:#E0B000;background:color-mix(in srgb,#FFD27A 16%,transparent)}
.pl.is-open .pl__s{color:#8A5A00;font-weight:800}
:root[data-theme="dark"] .pl.is-open .pl__s{color:#FFD27A}
@media (prefers-color-scheme:dark){ :root:not([data-theme="light"]) .pl.is-open .pl__s{color:#FFD27A} }
.pl.is-done .pl__s{color:#1E7A4A}
.pl.is-asleep button{border-style:dashed;cursor:help}
.asleep{margin:6px 2px 2px;font-size:15.5px;color:var(--qp-ink2);background:color-mix(in srgb,var(--qp-accent) 8%,transparent);border-radius:10px;padding:7px 10px}
/* the checks inside the panel: the KS3 checks' look, on the panel's paper */
.quest .q{background:var(--sheet);color:var(--ink);border-radius:14px;margin:0 0 12px}

/* ---------- the starch test ---------- */
.testbox{position:absolute;z-index:9;left:14px;top:14px;right:calc(min(430px,38%) + 28px);bottom:14px;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:12px;overflow-y:auto;background:radial-gradient(circle at 50% 40%,rgba(40,34,110,.92),rgba(11,15,42,.97));border-radius:18px;padding:18px}
.testbox[hidden]{display:none}
/* in the middle when it fits; from the top, scrolling, when it does not (centring would cut off the top) */
.testbox>:first-child{margin-top:auto}.testbox>:last-child{margin-bottom:auto}
.tile{margin:0;width:min(560px,100%);text-align:center;color:#E8EDF4}
.tile svg{width:100%;height:auto}
.tile figcaption{font-size:16px;margin-top:8px}
.win{display:flex;flex-direction:column;align-items:center;gap:6px;color:#FFF8E6;font-size:17.5px;text-align:center;animation:winIn .8s ease-out}
.win p{margin:0;max-width:520px}
.win__t{font:800 30px/1.1 var(--serif);color:#FFE39A;text-shadow:0 0 18px rgba(255,210,122,.7)}
.win__star .ico{width:64px;height:64px;filter:drop-shadow(0 0 16px #FFD27A);animation:winStar 2.4s ease-in-out infinite}
.win__path{list-style:none;display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:6px 0 4px;padding:0}
.win__path li{display:inline-flex;align-items:center;gap:5px;font:700 15px/1.2 var(--sans);background:rgba(255,255,255,.08);border:1px solid rgba(255,226,154,.4);border-radius:999px;padding:4px 10px 4px 5px}
.win__path li:not(:last-child)::after{content:"→";margin-left:4px;color:#FFE39A}
.win__path .ico{width:22px;height:22px}
@keyframes winIn{from{opacity:0;transform:translateY(10px) scale(.96)}}
@keyframes winStar{50%{transform:scale(1.12) rotate(8deg)}}
@media (prefers-reduced-motion:reduce){ .win,.win__star .ico{animation:none} }
.win .btn{font:900 16.5px/1 var(--sans);color:#2B1A00;background:linear-gradient(180deg,#FFE7A8,#FFC95E);border:0;border-radius:999px;padding:12px 20px;cursor:pointer}

/* ---------- the cell as Year 7 pupils draw it: in the panel, beside the 3D cell with the same five parts lit ---------- */
.simple{margin:4px 0 14px;background:#FFFDF7;color:#1B1B33;border-radius:14px;border:1.5px solid #F0C35A;padding:10px 12px 8px}
.simple svg{display:block;width:100%;height:auto}
.simple__k{font:900 13px/1 var(--sans);letter-spacing:.12em;text-transform:uppercase;color:#6B3FD1;margin:2px 0 6px}
.simple figcaption{font-size:13px;color:#45476A;margin-top:4px}

/* ---------- the dive: a picture that moves in, then the 3D bunch of cells ---------- */
.intro{position:absolute;inset:0;z-index:35;display:grid;grid-template-columns:minmax(0,1.5fr) minmax(300px,1fr);gap:20px;align-items:center;padding:24px;transition:opacity .7s}
.intro[hidden]{display:none}
/* its grounds, as layers that fade (a gradient cannot): the dark one of steps 1 and 2, then, over the 3D world, only a
   shade behind the card. Both fade at the pace of the picture's frame, so no dark box is ever left over the 3D */
.intro::before,.intro::after{content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;pointer-events:none;transition:opacity .9s ease-in-out}
.intro::before{background:radial-gradient(120% 100% at 30% 30%,#241f66,#0b0f2a 75%)}
.intro::after{background:linear-gradient(90deg,rgba(11,15,42,0) 0%,rgba(11,15,42,0) 55%,rgba(11,15,42,.55) 75%);opacity:0}
.intro.is-world::before{opacity:0}
.intro.is-world::after{opacity:1}
.intro.out{opacity:0}
/* the picture of steps 1 and 2: each step's picture a layer, so the next can grow out of the last (intro.js) */
.intro__pic{margin:0;align-self:stretch;display:flex;flex-direction:column;justify-content:center;min-height:0;border-radius:18px;background-color:#0b0f2a;transition:background-color .9s ease-in-out}
/* 2 → 3: the frame fades with the drawing's own ground (.g-bg, .9 s), and the bunch may move out of it */
.intro.is-moving .intro__pic{background-color:transparent}
.intro__layers{position:relative;flex:1;min-height:0;border-radius:18px;overflow:hidden}
.intro.is-moving .intro__layers{overflow:visible}
/* 1 → 2 moves the head and the drawing frame by frame (intro.js, into()): no transition of their own */
.intro__layer{position:absolute;inset:0;display:flex}
.intro__layer.is-gone{opacity:0;transition:opacity 1.2s ease-in-out}   /* the drawn bunch fades into the 3D one */
.intro__layer picture{display:block;width:100%;height:100%}
.intro__layer img{display:block;width:100%;height:100%;object-fit:contain}
.intro__svg{flex:1;min-height:0;display:flex}
.intro__svg svg{display:block;width:100%;height:100%;transition:transform 1.6s cubic-bezier(.45,.05,.25,1)}
.intro__svg .gone{opacity:0;transition:opacity .9s}                     /* all but the middle bunch */
.intro__card>*{transition:opacity .4s}
.intro__card.is-going>*{opacity:.35}                                    /* its words dim; the card stays solid, nothing shows through */
/* the credit keeps two lines' room, whatever it says, so the picture above it never changes size (a move is worked out
   from the picture's size: intro.js) */
.intro__pic figcaption{font-size:13px;line-height:1.3;min-height:2.6em;color:#B9B5E8;margin-top:6px;transition:opacity .6s}
.intro.is-moving .intro__pic figcaption{opacity:0}
.intro__card{grid-column:2;background:var(--qp-bg);color:var(--qp-ink);border-radius:20px;border:1.5px solid rgba(255,210,122,.6);padding:20px 22px;box-shadow:0 18px 50px rgba(0,0,0,.45)}
.intro__n{font:900 13px/1 var(--sans);letter-spacing:.14em;text-transform:uppercase;color:var(--qp-accent);margin:0 0 8px}
/* the corner's tools (Word bank, Sound, Full screen) work from the first step: above the intro, with room kept for them;
   nothing is carried yet, so the bag waits (Daniel, 4 Nov 2026) */
.stage.is-intro .hud{z-index:40;max-width:none}
.stage.is-intro .tools{flex-wrap:nowrap}                 /* one row, so the room kept above the picture is enough */
.stage.is-intro .bag{display:none}
.stage.is-intro .intro{padding-top:68px}
/* after the dive, the panel and the bag fade in (intro.js) */
@keyframes cg-arrive{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.stage.is-arriving .quest,.stage.is-arriving #quest,.stage.is-arriving .bag{animation:cg-arrive .9s ease-out both}
.intro__t{font-size:19px;line-height:1.55;margin:0 0 14px}
@media (max-width:860px){
  /* the card first, at the top of the picture: on a phone the foot of the stage is below the first screen */
  .intro{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);padding:12px}
  .intro__card{grid-column:1;grid-row:1}
  .intro__pic{grid-row:2}
  .intro.is-world{grid-template-columns:1fr;grid-template-rows:auto 1fr;align-items:start}
  .intro::after{background:linear-gradient(0deg,rgba(11,15,42,0) 50%,rgba(11,15,42,.6))}
  .intro__t{font-size:17.5px}
  .stage.is-intro .intro{padding-top:58px}
}

/* ---------- See the real thing ---------- */
.lens{position:absolute;inset:0;z-index:30;background:rgba(6,8,26,.72);display:grid;place-items:center;padding:20px}
.lens[hidden]{display:none}
.lens__card{width:min(820px,100%);max-height:100%;overflow-y:auto;background:var(--qp-bg);color:var(--qp-ink);border-radius:20px;border:1.5px solid #B9A6FF;padding:16px 20px 20px;box-shadow:0 24px 60px rgba(0,0,0,.5)}
.lens__top{display:flex;justify-content:space-between;align-items:center;gap:12px}
.lens__top h2{font:800 24px/1.2 var(--serif);margin:0}
/* the one sentence on the game against the real thing, in the Diagram tab under its picture */
.lens__both{margin:4px 0 2px;padding:10px 14px;border-radius:12px;background:color-mix(in srgb,var(--qp-accent) 8%,transparent);border:1.5px solid color-mix(in srgb,var(--qp-accent) 35%,transparent)}
.lens__both p{margin:0;font-size:16px;line-height:1.45}.lens__both .lens__ch{margin-bottom:3px}
.lens__tabs{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0 12px}
.lens__tabs button{font:800 15px/1 var(--sans);color:var(--qp-ink2);background:none;border:1.5px solid var(--qp-rule);border-radius:999px;padding:9px 14px;cursor:pointer}
.lens__tabs button[aria-selected="true"]{color:#fff;background:var(--qp-accent);border-color:var(--qp-accent)}
.lens__fig{margin:0 0 12px}
.lens__fig svg,.lens__fig img{display:block;width:100%;height:auto;border-radius:12px;background:#fff}
.lens__fig figcaption{font-size:15.5px;margin-top:6px;color:var(--qp-ink)}
.lens__cr{display:block;font-size:13px;color:var(--qp-ink2);margin:4px 0 0}
/* the card's words set out to be read (Daniel, 6 Nov 2026: "so much text, I'm not gonna read"): a heading, where to look,
   a sentence a line, numbers in bold, small print last (lens.js capHTML, r3dCap, sizeHTML; tools/lens-text.mjs) */
.lens__capt{margin-top:10px}
.lens__ch{margin:0 0 4px;font:800 17.5px/1.35 var(--sans);color:var(--qp-ink)}
.lens__soft{font-weight:600;color:var(--qp-ink2)}
.lens__where{margin:0 0 6px;font-size:16.5px;line-height:1.45;color:var(--qp-ink)}
.lens__pts{list-style:none;margin:4px 0 8px;padding:0;display:grid;gap:6px}
.lens__pts li{position:relative;padding-left:18px;font-size:16px;line-height:1.45;color:var(--qp-ink)}
.lens__pts li::before{content:'';position:absolute;left:3px;top:.62em;width:7px;height:7px;border-radius:50%;background:var(--qp-accent)}
.lens__scale{display:inline-block;margin:2px 0 6px;padding:4px 11px;border-radius:999px;background:color-mix(in srgb,var(--qp-accent) 11%,transparent);font-size:14.5px;font-weight:700;color:var(--qp-ink)}
.lens__about{margin:4px 0 0;font-size:14px;line-height:1.4;color:var(--qp-ink2)}
.lens__ring{display:inline-block;width:15px;height:15px;margin-right:8px;vertical-align:-2px;border-radius:50%;border:3px solid #FFD84A;box-shadow:0 0 0 1.5px rgba(21,26,64,.8)}
.lens__lead{margin:2px 0 10px;font-size:20px;line-height:1.4;font-weight:600;color:var(--qp-ink)}
.lens__line{margin:0 0 8px;font-size:16.5px;line-height:1.45;color:var(--qp-ink)}
.lens__units{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0 0}
.lens__units span{padding:4px 11px;border-radius:999px;border:1.5px solid var(--qp-rule);font-size:14.5px;font-weight:700;color:var(--qp-ink2)}
.lens__drag{position:absolute;right:10px;top:10px;z-index:1;margin:0;padding:5px 11px;border-radius:999px;background:rgba(10,13,40,.72);color:#fff;font:800 13.5px/1.2 var(--sans);pointer-events:none}
.lens__3d{position:relative;min-height:260px;border-radius:12px;background:radial-gradient(circle at 50% 40%,#22265e,#0b0f2a);overflow:hidden}
.lens__3d canvas{display:block;width:100%;touch-action:none}
.lens__wait{position:absolute;inset:0;display:grid;place-items:center;margin:0;color:#E8E4FF;font-weight:700}
.lens__wait[hidden]{display:none}
/* How big?: the same size as something pupils know, if the cell were a football pitch */
.lens__big{margin:6px 0 12px;padding:10px 14px;border-radius:12px;background:rgba(79,209,139,.12);border:1.5px solid rgba(79,209,139,.55);font-size:16.5px;line-height:1.45;color:var(--qp-ink)}
.lens__big p{margin:0}.lens__bigh{font-weight:900;margin-bottom:3px!important}
.lens__big .lens__bigq{margin-top:3px;font-size:17.5px;font-weight:600}
/* the nucleus's real 3D: one nucleolus or several (a note above the picture, in the nucleolus's pink), then which colour is which */
.lens__note{margin:0 0 10px;padding:10px 14px;border-radius:12px;background:rgba(224,92,180,.11);border:1.5px solid rgba(224,92,180,.5);font-size:15.5px;line-height:1.45;color:var(--qp-ink)}
.lens__note .lens__ch{font-size:16.5px}.lens__note .lens__pts{margin-bottom:0}
/* the nucleus's real 3D: which colour is which, above the picture */
.lens__key{display:flex;flex-wrap:wrap;gap:6px 16px;margin:0 0 8px;font-size:15px;font-weight:700;color:var(--qp-ink)}
.lens__key span{display:inline-flex;align-items:center;gap:7px}
.lens__key span::before{content:'';width:14px;height:14px;border-radius:50%;background:var(--c);box-shadow:0 0 0 2px rgba(255,255,255,.7)}
/* the Explorer film of the nucleus: how a cell copies a gene (js/game/transcribe.js), in the lens's window */
.cf__x{display:inline-block;margin:2px 0 10px;font:800 13px/1 var(--sans);letter-spacing:.06em;text-transform:uppercase;color:#7a5cff;background:rgba(160,140,255,.14);border:1.5px dashed #b9a6ff;border-radius:999px;padding:6px 10px}
.cf__key{margin:8px 0 6px;font-size:15px;color:var(--qp-ink)}
.cf__key span{display:inline-grid;place-items:center;width:1.6em;height:1.6em;margin:0 2px;border-radius:50%;background:var(--c);color:#10142e;font-weight:900}
.cf__n{margin:8px 0 4px;font:900 13px/1 var(--sans);letter-spacing:.14em;text-transform:uppercase;color:var(--qp-accent)}
.cf__t{font-size:17px;line-height:1.5}
.cf__t p{margin:0}.cf__t p+p{margin-top:.45em}
.cf__do{margin-top:12px;display:flex;flex-direction:row-reverse;justify-content:flex-end;gap:10px;flex-wrap:wrap}   /* Back (after Next in the page) on the left */
/* two columns where there is room (the film beside its words, so the window fits a laptop's screen); one on a phone */
.cf{width:min(980px,100%)}
.cf__grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);gap:16px;align-items:start;margin-top:8px}
.cf__3d{height:min(56vh,400px)}
@media (max-width:760px){.cf__grid{grid-template-columns:1fr;gap:10px}.cf__3d{height:min(32vh,230px)}.cf__t{font-size:16px}}
.step__do .explore{margin-top:8px}
/* the film's scale bars and names, over its view at the parts they measure or name (transcribe.js) */
.cf__bar,.cf__lab{position:absolute;left:0;top:0;pointer-events:none;transition:opacity .3s;will-change:transform}
.cf__bar{display:flex;flex-direction:column;align-items:center;gap:4px;color:#fff;font:800 13px/1 var(--sans);text-shadow:0 1px 3px rgba(0,0,0,.7)}
.cf__bar i{display:block;height:9px;border:solid #fff;border-width:0 2px 2px;border-radius:0 0 2px 2px;box-shadow:0 2px 3px rgba(0,0,0,.35)}
.cf__bar--v{flex-direction:row-reverse;align-items:center;transform-origin:0 0}
.cf__bar--v b{margin-right:6px}
.cf__bar--v i{width:9px;height:auto;border-width:2px 0 2px 2px;border-radius:2px 0 0 2px}
.cf__lab{background:rgba(10,14,40,.86);color:#fff;font:800 13px/1.2 var(--sans);padding:5px 10px;border-radius:999px;white-space:nowrap;border:1px solid rgba(255,255,255,.4);box-shadow:0 4px 12px rgba(0,0,0,.35)}
/* a name with a level line that ends on its part (the hydrogen bonds): the pill, then the line */
.cf__lab--line{display:flex;align-items:center;background:none;border:0;box-shadow:none;padding:0}
.cf__lab--line span{background:rgba(10,14,40,.86);padding:5px 10px;border-radius:999px;border:1px solid rgba(255,255,255,.4);box-shadow:0 4px 12px rgba(0,0,0,.35)}
.cf__lab--line i{display:block;width:26px;height:2px;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.6)}
.cf__key[hidden]{display:none}

/* ---------- under the stage ---------- */

/* ---------- a phone, or a narrow window: the world above, the book below as a sheet ---------- */
@media (max-width:860px){
  .stage{height:calc(100svh - 120px);min-height:620px;border-radius:16px;margin:0 8px 14px}
  .quest{top:auto;left:0;right:0;bottom:0;width:auto;max-height:50%;border-radius:18px 18px 0 0;padding:14px 14px 18px;border-width:1.5px 0 0;overscroll-behavior:auto}   /* at its top, a swipe scrolls the page back up to the heading */
  .quest.is-map{max-height:36%}
  .qhide,.stage.qp-off .qhide{top:auto;bottom:calc(var(--qh, 50%) + 8px);right:10px}
  .stage.qp-off .qhide{bottom:10px}
  .hud{top:10px;bottom:auto;left:10px;max-width:calc(100% - 20px)}
  .bag{padding:7px 10px}
  .bag__items{margin-top:5px}
  .bag__it span{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .nm{font-size:14.5px;padding:5px 10px;max-width:180px}
  .testbox{right:14px;bottom:52%}
  .qp__title{font-size:23px}
  .toasts{top:auto;bottom:calc(50% + 10px)}
}
@media (max-width:980px){
  .upbar{flex-wrap:wrap}
  .upbar .lessonbar{order:3;flex-basis:100%}
}
@media (max-width:560px){
  .bag__it span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}   /* icons only; read aloud */
  .bag__it{padding:3px}
  .bag__none{font-size:14px}
  .bag__bar{min-width:80px}
  .top{padding:8px 12px 2px}
  .head h1{font-size:21px}
  .eyebrow{font-size:12px}
  .by{font-size:14.5px}
  .timing{display:none}
  .tool{padding:8px 10px}                            /* a phone: the icon only (its words stay for a screen reader) */
  .tool__w{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .stage{height:calc(100svh - 16px);min-height:560px;margin:0 6px 14px}
}

/* ---------- the final check (js/game/final.js, 4 Nov 2026): a layer over the whole page, one question at a time ---------- */
html.is-final{overflow:hidden}
.final{position:fixed;inset:0;z-index:95;overflow-y:auto;overscroll-behavior:contain;background:var(--page);color:var(--ink)}
.fc{box-sizing:border-box;max-width:1080px;min-height:100%;margin:0 auto;padding:18px 16px 12px;display:flex;flex-direction:column;gap:14px}
.fc--card{max-width:660px;justify-content:center;padding-bottom:24px}
.fc p{margin:0}
.fc__eyebrow{font:900 13px/1.2 var(--sans);letter-spacing:.08em;text-transform:uppercase;color:var(--accent-ink)}
.fc h2{margin:0;font:800 clamp(22px,3vw,28px)/1.2 var(--serif);color:var(--ink);outline:none}
.fc__facts{margin:0;padding-left:22px;display:flex;flex-direction:column;gap:6px}
.fc__warn{background:var(--amber-tint);border:1.5px solid color-mix(in srgb,var(--amber) 55%,transparent);border-radius:12px;padding:12px 14px}
.fc__lbl{font-weight:800}
.fc__code{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.fc__code input{box-sizing:border-box;font:900 22px/1 var(--sans);letter-spacing:.08em;text-transform:uppercase;width:13ch;max-width:100%;padding:10px 12px;border:2px solid var(--rule2);border-radius:12px;background:var(--sheet);color:var(--ink)}
.fc__code input:focus{border-color:var(--accent);outline:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 25%,transparent)}
.fc__say{min-height:1.5em;font-weight:800}
.fc__say.no{color:var(--amber)}
.fc__acts{display:flex;flex-wrap:wrap;gap:10px;margin-top:4px}
.fc .btn{min-height:44px;padding:12px 20px}
.fc .btn[disabled]{opacity:.4;cursor:default}
/* where you are: every question as a dot (filled: answered; pale: partly) */
.fc__bar{display:flex;flex-wrap:wrap;gap:4px 14px;align-items:baseline;font-size:16px}
.fc__bar b{font:800 19px/1.2 var(--serif)}
.fc__n{font-weight:800;color:var(--ink2)}
.fc__mk{margin-left:auto;font-weight:800;color:var(--accent-ink)}
.fc__dots{display:flex;flex-wrap:wrap;gap:6px}
.fc__dots button{width:34px;height:34px;padding:0;border-radius:50%;border:1.5px solid var(--rule2);background:var(--sheet);color:var(--ink2);font:800 14px/1 var(--sans);cursor:pointer}
.fc__dots button.is-done{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.fc__dots button.is-part{background:var(--accent-tint);border-color:var(--accent);color:var(--ink)}
.fc__dots button.is-cur{box-shadow:0 0 0 3px var(--focus)}
.fc__q{flex:1;display:flex;flex-direction:column;gap:12px;background:var(--sheet);border:1px solid var(--rule);border-radius:16px;padding:16px}
.fc h2.fc__stem{font:800 21px/1.4 var(--sans)}
.fc__hint{font-size:15.5px;color:var(--ink2)}
.fc__nav{position:sticky;bottom:0;display:flex;justify-content:space-between;gap:10px;padding:12px 0 6px;background:linear-gradient(to bottom,transparent,var(--page) 35%)}
/* one right answer · every right answer */
.fc-opts button[aria-pressed="true"]{border-color:var(--accent);background:var(--accent-tint);box-shadow:inset 0 0 0 1.5px var(--accent)}
.fc-opts button[aria-pressed="true"] .lt{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.fc-opts--all .lt{border-radius:6px}
.fc-opts--all button[aria-pressed="true"] .lt::before{content:"✓"}
/* label the cell: the drawing beside the names (under them on a narrow screen); the drawing stays on paper */
.fc-lab{display:grid;grid-template-columns:minmax(0,430px) minmax(0,1fr);gap:18px;align-items:start}
.fc-lab__pic{margin:0;background:#FFFFFF;border:1px solid var(--rule);border-radius:14px;padding:6px;position:sticky;top:0}
.fc-lab__svg svg{display:block;width:100%;height:auto;max-height:max(440px,calc(100vh - 170px));margin:0 auto}
.fc-lab__pic .pins{display:none}
.fc-lab__pic[data-pins="A"] .pins-A,.fc-lab__pic[data-pins="B"] .pins-B{display:inline}
.fc-lab__pic figcaption{font-size:13.5px;line-height:1.35;color:#4A5568;padding:4px 6px 2px}
.fc-lab__side{display:flex;flex-direction:column;gap:10px}
.fc-lab__side .tray{margin:0}
.fc-slots{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.fc-slots li{display:flex;gap:10px;align-items:center}
.fc-slots .n{flex:none;display:inline-grid;place-items:center;width:32px;height:32px;border-radius:50%;border:2.5px solid var(--ink);background:var(--sheet);font:900 16px/1 var(--sans)}
.fc-slot{flex:1;min-height:46px;box-sizing:border-box;display:flex;align-items:center;gap:6px;padding:4px 6px;border:2px dashed var(--rule2);border-radius:12px;background:var(--surface);cursor:pointer}
.fc-slot.target{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 25%,transparent)}
.fc-slot.is-full{border-style:solid}
.fc-slot .in{display:flex}
.fc-slot__e{font-size:14.5px;color:var(--ink3)}
.fc-slot.is-full .fc-slot__e{display:none}
@media (max-width:760px){ .fc-lab{grid-template-columns:1fr} .fc-lab__pic{position:static} .fc-lab__svg svg{max-height:66vh;margin:0 auto} }
/* a phone: the drawing takes the width (its numbers stay readable) */
@media (max-width:560px){ .fc{padding:12px 10px 8px} .fc__q{padding:12px 10px} .fc-lab__pic{padding:2px;border-radius:10px} .fc h2.fc__stem{font-size:19.5px} }
/* the result: the score, then each question right or not, never the right answer */
.fc-res{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.fc-res li{display:flex;gap:10px;align-items:flex-start;padding:8px 12px;border-radius:12px;background:var(--sheet);border:1px solid var(--rule)}
.fc-res__m{flex:none;font:900 18px/1.4 var(--sans)}
.fc-res li.ok .fc-res__m{color:var(--good)}
.fc-res li.no .fc-res__m,.fc-res li.part .fc-res__m{color:var(--amber)}
.fc-res__s{display:block;font-size:15px;color:var(--ink2)}
/* the list of places: the final check last, apart from the places of the cell */
.pl--final{margin-top:6px}
.pl--final button{border-width:2px;border-color:#7A5BE0;background:color-mix(in srgb,#7A5BE0 10%,transparent)}
/* the win card: the code for the final check */
.win__code{margin:8px 0 4px;padding:10px 18px;border:1.5px dashed rgba(255,226,154,.65);border-radius:14px;background:rgba(255,255,255,.06)}
.win__c{font:900 32px/1.15 var(--sans);letter-spacing:.12em;color:#FFE39A;user-select:all}
.win__acts{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}
.win .btn.ghost{background:none;color:#FFE7A8;border:1.5px solid rgba(255,226,154,.7)}

/* How the game works (index.html #howto, 8 Nov 2026): the first card of a new game, over the stage while the cell loads
   behind it; How to play, at the top, shows it again. Short lines, a picture for each, the key words highlighted (Daniel:
   "make it fun … otherwise, they're not going to read it"). The corner's tools stay above it, so Sound works from here */
.howto{position:absolute;inset:0;z-index:45;display:flex;overflow:auto;padding:52px 16px 12px;background:radial-gradient(120% 100% at 30% 20%,#2a2370,#0b0f2a 75%)}
.howto[hidden]{display:none}
.stage.is-howto .hud{z-index:46;max-width:none}
.stage.is-howto .tools{flex-wrap:nowrap}                /* one row of tools above the card, as in the intro */
.stage.is-howto .bag{display:none}
/* at the top of the stage, which on a laptop goes on below the first screen; centred across; when it is taller than the
   stage it scrolls, nothing cut off */
.howto__card{margin:0 auto auto;width:min(780px,100%);background:var(--qp-bg);color:var(--qp-ink);border-radius:22px;border:1.5px solid rgba(255,210,122,.6);padding:16px 24px 18px;box-shadow:0 18px 50px rgba(0,0,0,.45)}
.howto__eyebrow,.howto__h{font:900 13px/1 var(--sans);letter-spacing:.14em;text-transform:uppercase;color:var(--qp-accent);margin:0 0 6px}
.howto__mission{font:800 24px/1.25 var(--serif);margin:0}
.howto__why{font-size:15.5px;color:var(--qp-ink2);margin:4px 0 0}
.howto__h{margin:12px 0 9px;padding-top:11px;border-top:1.5px solid var(--qp-rule)}
.howto__list{list-style:none;margin:0 0 14px;padding:0;display:grid;gap:6px}
.howto__list li{display:grid;grid-template-columns:32px 1fr;gap:10px;align-items:center;font-size:16px;line-height:1.4}
.howto__i{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:rgba(255,210,122,.25);font-size:17px;line-height:1;color:#B07A00}
.hl{background:linear-gradient(transparent 50%,rgba(255,210,122,.8) 50%);padding:0 3px;border-radius:2px}
:root[data-theme="dark"] .hl{background:linear-gradient(transparent 50%,rgba(255,210,122,.4) 50%)}
@media (prefers-color-scheme:dark){ :root:not([data-theme="light"]) .hl{background:linear-gradient(transparent 50%,rgba(255,210,122,.4) 50%)} }
.howto__go{display:block;margin:0 auto;font-size:17.5px;padding:12px 24px}
/* on a laptop the mission stands on the left and the points on the right, the button under both: the card is about half
   as tall, so it fits above the bottom of a short laptop screen (1366 × 768 shows about 650 px of page) */
@media (min-width:861px){
  .howto__card{width:min(1080px,100%);display:grid;grid-template-columns:minmax(0,.62fr) minmax(0,1.9fr);column-gap:26px;align-items:start}
  .howto__w{border-left:1.5px solid var(--qp-rule);padding-left:24px}
  .howto__h{margin:2px 0 10px;padding-top:0;border-top:0}
  .howto__go{grid-column:1/-1;margin-top:16px}
}
@media (max-width:860px){
  .howto{padding:52px 10px 10px}
  .howto__card{padding:14px 16px 16px}
  .howto__mission{font-size:21px}
  .howto__list{gap:7px}
  .howto__list li{font-size:15.5px;grid-template-columns:28px 1fr;gap:9px}
  .howto__i{width:28px;height:28px;font-size:15px}
}
/* the foot: the contact line, then the sources, credits and licences, folded (Daniel: "a collapsible … if they're curious") */
footer .credits{margin-top:4px}
footer .credits summary{cursor:pointer;font-weight:700;color:var(--ink2)}
footer .credits p{margin:.5em 0 0}
