/* My Diorama Plan v4: the paper sheet's navy, plum, teal and gold, freshened for 10 and 11 year olds.
   Each step has its own colour (Brief navy, Part 1 teal, Part 2 plum, Part 3 gold, Finish green), so pupils always know where they are. */
@font-face { font-family: 'Lexend'; src: url('fonts/lexend-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Lexend'; src: url('fonts/lexend-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Lexend'; src: url('fonts/lexend-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Lexend'; src: url('fonts/lexend-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Atkinson'; src: url('fonts/atkinson-hyperlegible-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Atkinson'; src: url('fonts/atkinson-hyperlegible-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --navy: #1F3A6B; --navy-2: #2C4F8C; --navy-t: #E8EDF7;
  --plum: #7D2A62; --plum-t: #F8ECF4;
  --teal: #2AA2B2; --teal-d: #0E6C78; --teal-t: #E2F3F5;
  --gold: #E9AE2B; --gold-d: #7A5200; --gold-dd: #5A3D00; --cream: #FFF5DA; --gold-t: #FFF1CC;
  --green: #2E9A5E; --green-d: #1E7444; --green-t: #E5F4EB;
  --amber: #E09400; --amber-ink: #8A5A00; --red: #C0392B;
  --bg: #F2F5FA; --card: #FFFFFF; --ink: #1B2333; --muted: #535D6D; --rule: #7F899B; --gold-b: #B07C00; --line: #D7DDE7; --hint-grey: #687180;
  --radius: 18px; --fs: 17px;
  --press: 0 -3px 0 rgba(0,0,0,.2) inset;
  --font: 'Lexend', -apple-system, 'Segoe UI', Roboto, sans-serif;
}
html.big { --fs: 20px; --font: 'Atkinson', 'Lexend', -apple-system, sans-serif; }
html.pupil { --fs: 19px; }
html.pupil.big { --fs: 22px; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 190px; scroll-padding-bottom: 120px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--fs); line-height: 1.5; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
/* iPad: no double-tap zoom on controls, no grey tap flash (buttons have their own press feedback) */
button, a, input, select, textarea, label, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; box-shadow: 0 0 0 6px rgba(255,255,255,.9); }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
main:focus { outline: none; }

/* ---------- Per-step colour ---------- */
[data-step="lesson"], [data-step-tab="lesson"] { --c: #3B4AA0; --ct: #ECEEFA; }
[data-step="brief"], [data-step-tab="brief"] { --c: var(--navy); --ct: var(--navy-t); }
[data-step="p1"], [data-step-tab="p1"] { --c: var(--teal-d); --ct: var(--teal-t); }
[data-step="p2"], [data-step-tab="p2"] { --c: var(--plum); --ct: var(--plum-t); }
[data-step="p3"], [data-step-tab="p3"] { --c: var(--gold-d); --ct: var(--gold-t); }
[data-step="finish"], [data-step-tab="finish"] { --c: var(--green-d); --ct: var(--green-t); }

/* ---------- Top bar ---------- */
.top { position: sticky; top: 0; z-index: 20; background: #fff; box-shadow: 0 1px 0 var(--line), 0 6px 18px rgba(31,58,107,.07); }
.top-in { max-width: 1240px; margin: 0 auto; padding: 8px 16px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.brand { min-width: 150px; }
.brand h1, .brand-name { margin: 0; font-size: 1.12em; color: var(--navy); font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.brand p { margin: 0; }
.brand-sub { color: var(--teal-d); font-size: .74em; }
.who { display: flex; gap: 12px; flex: 1; min-width: 300px; }
.who label, .who .nm > label { display: flex; flex-direction: column; font-size: .74em; font-weight: 600; color: var(--navy); }
.who input { margin-top: 2px; border: 2px solid var(--rule); border-radius: 12px; padding: 6px 12px; min-height: 48px; font-size: 1.12rem; font-weight: 500; background: #fff; color: var(--ink); width: 100%; }
html.big .who input { font-size: 1.3rem; }
.who input:focus { outline: none; border-color: var(--teal-d); box-shadow: 0 0 0 4px rgba(42,162,178,.22); }
.who .cls { width: 112px; flex: none; }
.who .nm { flex: 1; position: relative; display: flex; flex-direction: column; }
.name-hint { position: absolute; left: 0; right: 0; top: 100%; margin: 6px 0 0; z-index: 3; background: var(--navy); color: #fff; font-size: .78em; line-height: 1.4; padding: 8px 12px; border-radius: 12px; box-shadow: 0 8px 20px rgba(0,0,0,.18); opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity 160ms ease-out, transform 160ms ease-out; }
.nm:focus-within .name-hint { opacity: 1; transform: none; }
.top-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pill { border: 2px solid var(--navy); background: #fff; color: var(--navy); border-radius: 999px; padding: 6px 16px; font-weight: 600; font-size: .8em; display: inline-flex; gap: 6px; align-items: center; min-height: 48px; }
.pill .aa { font-weight: 700; }
.pill[aria-pressed="true"] { background: var(--navy); color: #fff; }
.pill.simpler[aria-pressed="true"] { background: var(--plum); border-color: var(--plum); }
.status { font-size: .74em; color: var(--muted); min-width: 110px; text-align: right; }
.status b { color: var(--green-d); }
.status .bad { color: var(--red); font-weight: 600; }

/* ---------- Step tabs ---------- */
.steps { background: #fff; border-top: 1px solid var(--line); }
.steps-in { max-width: 1240px; margin: 0 auto; padding: 6px 12px 8px; display: flex; gap: 6px; }
.steps button { flex: 1; min-height: 58px; border: 2px solid transparent; background: transparent; border-radius: 16px; display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; color: var(--ink); font-size: .86em; padding: 4px 8px; position: relative; }
.steps button .st-l { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.steps button .st-l small { font-weight: 400; font-size: .8em; color: var(--muted); }
.steps button[aria-selected="true"] { background: var(--ct); border-color: var(--c); }
.steps button[aria-selected="true"] .st-l { color: var(--c); }
.steps button[aria-selected="true"] .st-l small { color: var(--ink); }
.steps .qi { width: 40px; height: 40px; border-radius: 12px; background: var(--ct); color: var(--c); display: grid; place-items: center; flex: none; }
.steps .qi .ico { width: 24px; height: 24px; }
.steps button[aria-selected="true"] .qi { background: var(--c); color: #fff; }
.st-tick { display: none; position: absolute; top: 2px; left: calc(50% - 46px); width: 22px; height: 22px; border-radius: 50%; background: var(--green-d); color: #fff; place-items: center; box-shadow: 0 0 0 2px #fff; }
.st-tick .ico { width: 14px; height: 14px; stroke-width: 3.2; }
.steps button.done .st-tick { display: grid; }
.steps button.pop-done .st-tick { animation: tick-pop 420ms cubic-bezier(.3,1.5,.5,1) both; }
@media (max-width: 900px) { .steps button .st-l small { display: none; } .st-tick { left: 4px; } }

/* ---------- Layout ---------- */
main { max-width: 940px; margin: 0 auto; padding: 18px 16px 140px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(31,58,107,.06); border: 1px solid #E1E6EE; padding: 22px 24px; margin-bottom: 18px; }
.step-h { display: flex; align-items: center; gap: 14px; margin: 4px 0 14px; font-size: 1.5em; line-height: 1.2; color: var(--c); font-weight: 700; letter-spacing: -.015em; }
.step-h:focus { outline: none; }
.step-h > .qi { width: 52px; height: 52px; border-radius: 16px; background: var(--c); color: #fff; display: grid; place-items: center; flex: none; }
.step-h > .qi .ico { width: 30px; height: 30px; }
.step-note { margin: -6px 0 14px; font-weight: 600; color: var(--ink); max-width: 46em; }
.lead { font-size: 1.06em; margin: 0 0 14px; }
.step-bar { display: flex; gap: 10px 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.step-next { display: flex; justify-content: space-between; gap: 12px; margin: 6px 0 24px; }
.step-next .btn.primary { margin-left: auto; }

/* Question numbers along the top of Parts 1 and 3: one question per screen */
.qnav { display: flex; gap: 8px; flex-wrap: wrap; }
.qdot { min-width: 48px; height: 48px; border-radius: 999px; border: 2px solid var(--rule); background: #fff; color: var(--ink); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; }
.qdot .ico { width: 20px; height: 20px; }
.qdot small { display: none; font-size: .82em; font-weight: 600; }
.qdot[aria-current="step"] { background: var(--c); border-color: var(--c); color: #fff; padding: 0 16px 0 14px; }
.qdot[aria-current="step"] small { display: inline; }
.qdot.done { border-color: var(--green-d); color: var(--green-d); background: var(--green-t); }
.qdot.done .ico { stroke-width: 3; }
.qdot.done[aria-current="step"] { background: var(--green-d); color: #fff; }

/* Lesson (taught before the tasks begin) */
.lesson .ql { font-size: 1.22em; }
.quote { margin: 0 0 16px; padding: 14px 18px; border-left: 6px solid var(--plum); background: var(--plum-t); border-radius: 0 14px 14px 0; font-size: 1.1em; font-weight: 600; font-style: italic; }
.donow { margin: 0 0 16px; padding-left: 1.4em; display: grid; gap: 12px; }
.donow li b { font-weight: 600; }
.ans { margin: 6px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--green-t); border-left: 5px solid var(--green-d); }
.lo { font-size: 1.14em; margin: 0 0 16px; padding: 14px 18px; background: var(--ct); border-radius: 14px; }
.sub-h { margin: 14px 0 8px; font-size: 1em; color: var(--c); }
.sub-h span { font-weight: 400; color: var(--muted); font-size: .88em; margin-left: 6px; }
.toknow { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 10px; }
.toknow li { display: flex; gap: 12px; align-items: center; }
.toknow .bi { width: 40px; height: 40px; border-radius: 12px; background: var(--ct); color: var(--c); display: grid; place-items: center; flex: none; }
.toknow .bi .ico { width: 24px; height: 24px; }
.ido { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: start; }
.ido p { margin: 0 0 10px; }
.ido-pics { display: grid; gap: 8px; }
.ido-pics img, .wedo img { width: 100%; max-height: 300px; object-fit: cover; border-radius: 12px; display: block; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.three div { background: var(--ct); border-radius: 14px; padding: 12px 14px; font-size: .92em; }
.three b { display: block; color: var(--c); font-size: 1.05em; }
.wedo { display: grid; grid-template-columns: 1fr 1.25fr; gap: 18px; align-items: start; }
.youdo { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
.think { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; font-weight: 600; }
.issues-box { background: var(--ct); border-radius: 14px; padding: 4px 16px 10px; }
.issues-box ul { margin: 0; padding-left: 1.1em; font-size: .94em; }
.looking { margin-top: 16px; background: var(--cream); border: 2px solid #EBD39A; border-radius: 14px; padding: 4px 16px 12px; }
.looking .sub-h { color: var(--gold-d); }
.looking ul { margin: 0 0 8px; padding-left: 1.2em; }
.looking p { margin: 0; font-size: .92em; }
@media (max-width: 860px) { .ido, .wedo, .youdo { grid-template-columns: 1fr; } .three { grid-template-columns: 1fr; } .ido-pics { grid-template-columns: 1fr 1fr; } }

/* Fold-away help */
.helpers { display: flex; gap: 8px; flex-wrap: wrap; }
.helper-btn { min-height: 48px; border-radius: 999px; border: 2px solid var(--rule); background: #fff; color: var(--ink); font-weight: 600; font-size: .84em; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px 0 12px; }
.helper-btn .ico { width: 22px; height: 22px; color: var(--c); }
.helper-btn[aria-expanded="true"] { background: var(--ct); border-color: var(--c); }
.help-panel { border-radius: var(--radius); padding: 16px 18px; margin: 0 0 16px; }
.help-panel h2 { margin: 0 0 8px; font-size: .95em; }
.help-panel .hint { margin: 0 0 8px; }

/* Picture prompts beside questions: bigger, in the step's colour */
.ico { width: 20px; height: 20px; flex: none; }
.ql > .qi, .ready-h > .qi, .mb-h > .qi { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--ct, var(--teal-t)); color: var(--c, var(--teal-d)); margin-right: 12px; vertical-align: middle; flex: none; }
.ql > .qi .ico, .ready-h > .qi .ico, .mb-h > .qi .ico { width: 26px; height: 26px; }
.qtick { display: none; width: 28px; height: 28px; border-radius: 50%; background: var(--green-d); color: #fff; place-items: center; margin-left: 10px; vertical-align: middle; }
.qtick .ico { width: 18px; height: 18px; stroke-width: 3; }
.q.done > .ql .qtick { display: inline-grid; }
html.ready .q.done > .ql .qtick { animation: tick-pop 380ms cubic-bezier(.3,1.5,.5,1) both; }

.q { margin: 0 0 18px; }
.q > .ql { display: flex; align-items: center; font-size: 1.16em; line-height: 1.3; font-weight: 700; color: var(--ink); margin: 0 0 10px; }
.q > .ql:focus { outline: none; }
.q > .ql .n { display: inline-grid; place-items: center; min-width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--c, var(--teal-d)); color: #fff; font-size: .78em; margin-right: 10px; flex: none; }
.q-sub { display: block; margin: -2px 0 10px; color: var(--muted); font-size: .92em; }
label.q-sub { color: var(--ink); font-weight: 600; margin-top: 10px; }
.screen-kicker { margin: 0 0 8px; font-size: .84em; font-weight: 700; color: var(--plum); }
.hint { color: var(--muted); font-size: .86em; font-weight: 400; }
.tip { color: var(--muted); font-size: .86em; margin: 0; }
.req-miss { box-shadow: 0 0 0 4px rgba(192,57,43,.6) !important; border-radius: 12px; }
.screens { min-height: 280px; }

/* Examples, success checklists, paste nudge */
.q-tools { margin: -4px 0 6px; }
.ex-btn { border: 0; background: none; color: var(--teal-d); font-weight: 700; font-size: .88em; min-height: 48px; display: inline-flex; gap: 8px; align-items: center; padding: 0 4px; }
.ex-btn .ico { width: 22px; height: 22px; }
.ex-panel { background: #F4F7FC; border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; font-size: .9em; }
.ex-row { display: flex; gap: 10px; align-items: baseline; margin: 6px 0; }
.ex-tag { flex: none; font-size: .78em; padding: 2px 10px; border-radius: 999px; color: #fff; }
.ex-tag.good { background: var(--teal-d); } .ex-tag.better { background: var(--green-d); }
.ex-note { margin: 6px 0 0; color: var(--muted); font-size: .92em; }
.crit { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.crit-i { border: 2px dashed var(--rule); background: #fff; color: var(--muted); border-radius: 999px; min-height: 48px; padding: 4px 14px 4px 8px; font-size: .82em; display: inline-flex; align-items: center; gap: 8px; }
.crit-i .ico { width: 24px; height: 24px; padding: 3px; border-radius: 50%; border: 2px solid var(--rule); color: transparent; stroke-width: 3; }
.crit-i[aria-pressed="true"] { border-style: solid; border-color: var(--green-d); color: var(--green-d); background: var(--green-t); font-weight: 600; }
.crit-i[aria-pressed="true"] .ico { background: var(--green-d); border-color: var(--green-d); color: #fff; }
.paste-note { margin-top: 8px; background: var(--cream); border-left: 5px solid var(--gold); color: var(--gold-dd); border-radius: 10px; padding: 8px 12px; font-size: .9em; font-weight: 600; }
.org-name { margin-top: 14px; }
.org-name label { display: block; font-weight: 700; margin-bottom: 6px; }

/* Word bank */
.wordbank { background: var(--cream); border: 2px solid #EBD39A; }
.wordbank h2 { color: var(--gold-d); display: flex; gap: 8px; align-items: center; }
.wordbank .chips { margin-bottom: 0; }
.pop-ins { display: block; margin-top: 10px; width: 100%; min-height: 48px; border: 0; border-radius: 12px; background: #fff; color: var(--navy); font-weight: 700; }
.pop.pop-in { position: static; max-width: none; margin-top: 12px; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; background: #fff; color: var(--ink); border: 2px solid var(--gold); box-shadow: none; font-size: .92em; }
.pop.pop-in b { color: var(--gold-d); font-size: 1.05em; }
.pop.pop-in .pop-ins { grid-column: 1 / -1; background: var(--navy); color: #fff; box-shadow: var(--press); }
[data-wb][aria-expanded="true"] { background: var(--gold-d); color: #fff; border-color: var(--gold-d); }

/* Simpler version suggestion */
.offer { border: 2px solid var(--plum); background: var(--plum-t); }
.offer p { margin: 0 0 12px; }
.offer-btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* Finish: ready list */
.ready-h { display: flex; align-items: center; margin: 0 0 12px; font-size: 1.16em; color: var(--ink); }
.ready-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
@media (max-width: 760px) { .ready-list { grid-template-columns: 1fr; } }
.ready-list li { display: flex; align-items: center; min-height: 48px; font-size: .94em; }
.ready-list li.ok { color: var(--green-d); font-weight: 600; gap: 10px; }
.ready-list button { border: 0; background: none; color: var(--plum); text-decoration: underline; text-underline-offset: 3px; min-height: 48px; display: inline-flex; gap: 10px; align-items: center; text-align: left; padding: 0; font-weight: 600; }
.rl-tick { width: 26px; height: 26px; border-radius: 50%; background: var(--green-d); color: #fff; display: inline-grid; place-items: center; flex: none; }
.rl-tick .ico { width: 16px; height: 16px; stroke-width: 3; }
.rl-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--rule); flex: none; margin: 0 2px; }
.date-words { color: var(--ink); font-weight: 600; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }
.band { display: block; color: #fff; font-weight: 700; font-size: .82em; letter-spacing: .04em; padding: 7px 12px; border-radius: 8px; margin: 0 0 12px; }
.band.navy { background: var(--navy); }
.band.plum { background: var(--plum); }
.band small { font-weight: 500; letter-spacing: 0; opacity: .95; }

/* Lined answer boxes, like the paper sheet */
textarea.lined, input.lined { width: 100%; border: 2px solid var(--rule); border-radius: 12px; padding: 6px 14px; resize: vertical; background-color: #fff;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(2em - 1px), #E3E8F0 calc(2em - 1px), #E3E8F0 2em);
  background-attachment: local; background-position: 0 6px; line-height: 2em; min-height: calc(2em * 3 + 16px); }
input.lined { min-height: 52px; background-image: none; line-height: 1.5; padding: 10px 14px; }
textarea.lined:focus, input.lined:focus { outline: none; border-color: var(--teal-d); box-shadow: 0 0 0 4px rgba(42,162,178,.22); }
textarea.lined::placeholder, input.lined::placeholder, .who input::placeholder { color: var(--hint-grey); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 12px; }
.chip { border: 2px solid var(--rule); background: #fff; border-radius: 999px; padding: 8px 18px; font-size: .9em; font-weight: 600; min-height: 52px; }
.chip[aria-pressed="true"] { border-color: var(--c, var(--teal-d)); background: var(--c, var(--teal-d)); color: #fff; box-shadow: var(--press); }
.chip.add { border-style: dashed; color: var(--teal-d); }
.chip.small { min-height: 48px; padding: 6px 14px; font-size: .86em; }

/* Brief */
.brief-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 22px; }
@media (max-width: 900px) { .brief-grid { grid-template-columns: 1fr; } }
.brief p { margin: 0 0 12px; }
.sides-explain { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 14px; }
.sides-explain div { border-radius: 14px; padding: 12px 14px; font-size: .9em; }
.sides-explain .p { background: var(--plum-t); border: 2px solid var(--plum); }
.sides-explain .s { background: var(--teal-t); border: 2px solid var(--teal-d); }
.sides-explain b { display: block; font-size: 1.02em; }
.sides-explain .p b { color: var(--plum); } .sides-explain .s b { color: var(--teal-d); }
.kw { background: var(--cream); border: 2px solid #EBD39A; border-radius: 16px; padding: 12px 14px; margin-bottom: 14px; }
.kw-h { margin: 0 0 8px; font-size: .95em; color: var(--gold-d); }
.kw-h span { display: block; font-weight: 400; color: var(--gold-dd); font-size: .9em; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gallery figure { margin: 0; border-radius: 12px; overflow: hidden; background: #ddd; aspect-ratio: 4/3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-cap { font-size: .84em; color: var(--muted); margin: 8px 0 0; }
.vocab { display: flex; flex-wrap: wrap; gap: 8px; }
.vword { background: #fff; border: 2px solid var(--gold-b); color: var(--gold-dd); border-radius: 12px; padding: 6px 14px; font-weight: 700; font-size: .88em; min-height: 48px; }
.vword.inline { min-height: 0; padding: 0 1px; margin: 0 -1px; font-size: inherit; font-weight: 600; border-radius: 4px; text-decoration: underline dotted; text-decoration-thickness: 2px; text-underline-offset: 4px; background: transparent; border: 0; color: var(--plum); }

/* Group */
.group-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.group-row .chips { margin: 0; }
.gname { display: inline-flex; align-items: center; gap: 6px; background: var(--navy-t); border-radius: 999px; padding: 2px 2px 2px 16px; font-weight: 600; }
.gname button { border: 0; background: #fff; border-radius: 50%; width: 48px; height: 48px; font-weight: 700; color: var(--muted); font-size: 1.1em; }
.group-add { display: flex; gap: 8px; }
.group-add input { width: 220px; }

/* Buttons: chunky, with a pressable edge */
.btn { border: 0; border-radius: 12px; padding: 10px 16px; font-weight: 600; min-height: 44px; background: var(--bg); color: var(--navy); display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.btn .bi { display: inline-flex; } .btn .bi .ico { width: 22px; height: 22px; }
.btn.primary { background: var(--navy); color: #fff; }
.btn.teal { background: var(--teal-d); color: #fff; }
.btn.gold { background: #fff; color: var(--gold-d); border: 2px solid var(--gold); }
.btn.plum { background: var(--plum); color: #fff; }
.btn.ghost { background: #fff; border: 2px solid var(--rule); color: var(--navy); }
.btn.danger { background: #fbe9e7; color: #A93226; }
.btn:disabled { opacity: .45; cursor: default; }
html.pupil .btn { min-height: 52px; border-radius: 14px; padding: 10px 20px; font-weight: 700; box-shadow: var(--press); }
html.pupil .btn.ghost { box-shadow: 0 -3px 0 #E1E6EE inset; }
html.pupil .step-next .btn { min-height: 60px; padding: 12px 24px; font-size: 1.02em; }
.check { display: inline-flex; gap: 10px; align-items: center; font-size: .92em; min-height: 48px; font-weight: 600; }
.check input { width: 26px; height: 26px; accent-color: var(--teal-d); }

/* Research helper */
.research { border: 2px solid var(--teal); background: var(--teal-t); }
.research h2 { color: var(--teal-d); }
.research .row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.linkbtn { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; background: #fff; border: 2px solid var(--teal-d); color: var(--teal-d); border-radius: 14px; padding: 8px 14px; font-weight: 700; font-size: .86em; min-height: 52px; line-height: 1.3; }
.linkbtn small { font-weight: 400; color: var(--muted); }
.linkbtn.big { background: var(--teal-d); color: #fff; box-shadow: var(--press); }
.linkbtn svg { flex: none; }
.org { background: #fff; border-radius: 12px; padding: 12px 14px; font-size: .9em; border-left: 5px solid var(--plum); }
.org b { color: var(--plum); }
.org a { color: var(--teal-d); font-weight: 700; }
.example { background: #fff; border: 2px solid var(--line); }
.example h2 { color: var(--navy); }
.example-body { display: grid; grid-template-columns: 1fr 170px; gap: 14px; font-size: .9em; }
.example-body dl { margin: 0; }
.example-body img { width: 100%; border-radius: 10px; display: block; margin-bottom: 8px; }
.example-body dt { font-weight: 700; color: var(--navy); margin-top: 8px; }
.example-body dd { margin: 0; }
@media (max-width: 700px) { .example-body { grid-template-columns: 1fr; } }

/* Support starters */
.starter { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.starter span { background: var(--cream); border: 2px dashed var(--gold); color: var(--gold-dd); padding: 6px 12px; border-radius: 12px; font-size: .9em; }
.starter button { border: 0; background: none; color: var(--teal-d); font-weight: 700; font-size: .88em; text-decoration: underline; text-underline-offset: 3px; min-height: 48px; }

/* Traffic light */
.lights { display: flex; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.light { flex: 1; min-width: 150px; border: 2px solid var(--rule); background: #fff; border-radius: 16px; padding: 10px 12px; text-align: left; display: flex; gap: 12px; align-items: center; min-height: 64px; }
.light i { width: 32px; height: 32px; border-radius: 50%; flex: none; border: 2px solid rgba(0,0,0,.35); }
.light.green i { background: var(--green); } .light.amber i { background: var(--amber); } .light.red i { background: var(--red); }
.light span { display: flex; flex-direction: column; font-weight: 700; font-size: .92em; }
.light small { font-weight: 400; color: var(--muted); font-size: .88em; line-height: 1.35; }
.light[aria-pressed="true"] { border-width: 3px; padding: 9px 11px; }
.light[aria-pressed="true"].green { border-color: var(--green-d); background: var(--green-t); }
.light[aria-pressed="true"].amber { border-color: var(--amber); background: #FDF2DD; }
.light[aria-pressed="true"].red { border-color: var(--red); background: #FBE9E7; }
.light[aria-pressed="true"] i { box-shadow: 0 0 0 4px #fff, 0 0 0 6px currentColor; }

/* Sketch sides */
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 4px; }
@media (max-width: 640px) { .sides { grid-template-columns: 1fr; } }
.side { border: 2px solid var(--plum); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; background: #fff; }
.side.sol { border-color: var(--teal-d); }
.side-h { margin: 0; background: var(--plum); color: #fff; text-align: center; font-weight: 700; font-size: .95em; padding: 8px; }
.side.sol .side-h { background: var(--teal-d); }
.side-sub { margin: 0; text-align: center; color: var(--muted); font-size: .86em; padding: 6px; }
.side-prev { aspect-ratio: 16/9; margin: 0 10px; border-radius: 10px; background: #FAFBFD; border: 2px dashed var(--rule); display: grid; place-items: center; overflow: hidden; cursor: pointer; padding: 0; width: calc(100% - 20px); }
.side-prev img { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.side-prev .empty { color: var(--muted); font-size: .86em; padding: 12px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.side-prev .empty .ico { width: 36px; height: 36px; color: var(--hint-grey); }
.side-btns { display: flex; gap: 8px; padding: 10px; }
.side-btns .btn { flex: 1; font-size: .9em; padding: 8px 8px; }
.mb { background: var(--cream); border: 2px solid var(--gold); }
.mb-h { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-weight: 700; color: var(--gold-d); font-size: 1.08em; margin: 0 0 12px; }
.mb-h > .qi { background: #fff; color: var(--gold-d); }
.mb-h .opt { font-weight: 500; color: var(--gold-dd); font-size: .82em; }
.mb .q > .ql { color: var(--gold-dd); font-size: 1em; display: block; }
.mb textarea.lined { background-color: #FFFDF6; }
.extra { border-top: 2px dashed var(--gold); padding-top: 14px; margin-top: 4px; }
.mb-locked { text-align: center; }

/* Part 3 */
.mat-table { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.mat-table th { text-align: left; font-size: .82em; color: var(--ink); background: var(--gold-t); padding: 8px 10px; }
.mat-table th:first-child { border-radius: 10px 0 0 10px; } .mat-table th:last-child { border-radius: 0 10px 10px 0; }
.mat-table td { padding: 5px 4px; vertical-align: top; }
.mat-table td:last-child { width: 56px; }
.mat-table input { width: 100%; }
.mat-del { border: 0; background: var(--bg); border-radius: 12px; width: 48px; height: 52px; color: var(--muted); font-weight: 700; font-size: 1.1em; }
.ideas-title { font-size: .9em; font-weight: 700; color: var(--ink); margin: 14px 0 6px; }
.supplies { font-size: .88em; color: var(--muted); margin: 8px 0 0; }
.bring-by { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.bring-by input { width: auto; min-width: 220px; }

/* End + send */
.end-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .end-grid { grid-template-columns: 1fr; } }
.sendbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: #fff; box-shadow: 0 -1px 0 var(--line), 0 -6px 18px rgba(31,58,107,.08); padding-bottom: env(safe-area-inset-bottom); }
.sendbar-in { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: flex; gap: 12px; align-items: center; }
.sendinfo { flex: 1; min-width: 0; }
.progress { display: flex; align-items: center; gap: 12px; font-size: .88em; color: var(--ink); margin-bottom: 2px; }
.pbar { width: 150px; height: 14px; border-radius: 999px; background: #E1E6EE; overflow: hidden; flex: none; }
.pbar i { display: block; height: 100%; width: 0; background: var(--green-d); border-radius: 999px; transition: width 280ms cubic-bezier(.2,.8,.2,1); }
.sendmsg { font-size: .8em; color: var(--muted); }
.sendmsg.ok { color: var(--green-d); font-weight: 600; }
.sendmsg.wait { color: var(--amber-ink); font-weight: 600; }
.sendmsg.err { color: var(--red); font-weight: 600; }
.btn.send { background: var(--green-d); color: #fff; font-size: 1.02em; padding: 12px 24px; min-height: 56px; }
html.pupil .btn.send { min-height: 60px; }
.teacher-note { border-left: 6px solid var(--teal-d); background: var(--teal-t); }
/* iPad keyboard open: the header scrolls away and the send bar hides, so the answer box has room */
html.kb .top { position: static; }
html.kb .sendbar { display: none; }
.teacher-note h2 { margin: 0 0 6px; font-size: 1em; color: var(--teal-d); }

/* ---------- Done moments (off under reduced motion) ---------- */
.cele { position: fixed; left: 50%; top: 200px; z-index: 85; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; background: #fff; border: 2px solid var(--gold); border-radius: 999px; padding: 6px 22px 6px 6px; box-shadow: 0 12px 30px rgba(31,58,107,.22); pointer-events: none; animation: cele-life 2100ms ease-out both; }
.cele-badge { position: relative; width: 52px; height: 52px; border-radius: 50%; background: var(--gold); color: var(--gold-dd); display: grid; place-items: center; }
.cele-badge .ico { width: 30px; height: 30px; fill: #FFE7A3; }
.cele-t { font-weight: 700; color: var(--ink); font-size: 1.08em; white-space: nowrap; }
.spark { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; pointer-events: none; animation: spark 760ms cubic-bezier(.15,.8,.3,1) both; }
.spark.s0 { background: var(--gold); } .spark.s1 { background: var(--teal); } .spark.s2 { background: var(--plum); border-radius: 2px; } .spark.s3 { background: var(--green); border-radius: 2px; }
@keyframes spark { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(.4); opacity: 0; } }
@keyframes cele-life { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.85); } 14% { opacity: 1; transform: translate(-50%, 0) scale(1.03); } 22% { transform: translate(-50%, 0) scale(1); } 82% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -6px); } }
@keyframes tick-pop { 0% { transform: scale(.3); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes stamp-in { 0% { transform: scale(.4) rotate(-12deg); opacity: 0; } 60% { transform: scale(1.08) rotate(3deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
.modal.sent .modal-box { text-align: center; }
.modal.sent .modal-btns { justify-content: center; }
.sent-stamp { position: relative; width: 92px; height: 92px; margin: 4px auto 8px; border-radius: 50%; background: var(--green-d); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 6px var(--green-t); animation: stamp-in 520ms cubic-bezier(.2,1.2,.4,1) both; }
.sent-stamp .ico { width: 46px; height: 46px; }
.modal.sent h2 { font-size: 1.6em; }

/* ---------- Modals ---------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(20,30,50,.5); display: grid; place-items: center; padding: 16px; }
.modal-box { background: #fff; border-radius: 22px; max-width: 580px; width: 100%; padding: 24px 26px; box-shadow: 0 24px 60px rgba(0,0,0,.28); max-height: 90vh; overflow: auto; }
.modal-box h2 { margin: 0 0 10px; color: var(--navy); font-size: 1.3em; }
.modal-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.miss-list { margin: 0; padding-left: 1.2em; }
.miss-list button { border: 0; background: none; color: var(--plum); text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; font-size: 1em; font-weight: 600; text-align: left; min-height: 48px; }
.selfcheck label { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); min-height: 48px; }
.selfcheck input { width: 28px; height: 28px; flex: none; accent-color: var(--green-d); margin-top: 1px; }
.pop { position: absolute; z-index: 70; max-width: 300px; background: var(--navy); color: #fff; border-radius: 14px; padding: 12px 14px; font-size: .88em; box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.pop b { display: block; text-transform: capitalize; color: #FCE9A8; }
.toast { position: fixed; left: 50%; bottom: 104px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 999px; z-index: 80; font-size: .9em; box-shadow: 0 8px 20px rgba(0,0,0,.2); max-width: calc(100vw - 32px); text-align: center; }
.toast.bad { background: var(--red); }

/* Press feedback: respond the moment a finger lands */
.btn, .chip, .pill, .tb, .light, .linkbtn, .vword:not(.inline), .sw, .steps button, .crit-i, .ex-btn, .more-btn, .qdot, .helper-btn { transition: transform 90ms ease-out, box-shadow 90ms ease-out; }
.btn:active:not(:disabled), .chip:active, .pill:active, .tb:active, .light:active, .linkbtn:active, .vword:not(.inline):active, .steps button:active, .crit-i:active, .more-btn:active, .qdot:active, .helper-btn:active { transform: scale(.97); }
html.pupil .btn:active:not(:disabled) { transform: translateY(2px) scale(.985); box-shadow: 0 -1px 0 rgba(0,0,0,.2) inset; }

/* ---------- Sketch editor ---------- */
.sk { position: fixed; inset: 0; z-index: 50; background: #E4E9F0; display: flex; flex-direction: column; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.sk-top { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #fff; border-bottom: 4px solid var(--plum); flex: none; position: relative; z-index: 1; }
.sk.sol .sk-top { border-bottom-color: var(--teal-d); }
.sk-title { font-weight: 700; color: var(--plum); flex: 1; font-size: 1.05em; }
.sk.sol .sk-title { color: var(--teal-d); }
.sk-title small { display: block; font-weight: 400; color: var(--muted); font-size: .74em; }
.sk-top .btn { min-height: 52px; border-radius: 14px; font-weight: 700; }
.sk-top [data-act="done"] { background: var(--green-d); color: #fff; box-shadow: var(--press); font-size: 1.05em; }
.sk-body { flex: 1; display: flex; min-height: 0; }
.sk-tools { width: 220px; background: #fff; padding: 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; border-right: 1px solid var(--line); }
.sk-group h5 { margin: 0 0 6px; font-size: .82em; color: var(--ink); font-weight: 700; }
.sk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.sk-grid.four { grid-template-columns: repeat(4, 1fr); }
.sk-grid.three { grid-template-columns: repeat(3, 1fr); }
.tb { border: 2px solid transparent; background: var(--bg); border-radius: 12px; min-height: 52px; min-width: 44px; display: grid; place-items: center; padding: 3px; font-size: .74em; font-weight: 700; color: var(--navy); gap: 2px; }
.tb svg { width: 26px; height: 26px; }
.tb[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: #fff; }
.stamp-btn[aria-pressed="true"] { background: var(--gold-t); border-color: var(--gold-d); }
.sw { width: 100%; aspect-ratio: 1; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--rule); }
.sw[aria-pressed="true"] { box-shadow: 0 0 0 4px var(--navy); }
.stamp-btn canvas { width: 40px; height: 40px; }
.more-btn { width: 100%; min-height: 52px; border: 2px dashed var(--rule); background: #fff; border-radius: 12px; font-weight: 700; color: var(--navy); font-size: .82em; }
.more-btn[aria-expanded="true"] { border-style: solid; border-color: var(--navy); }
.sk-more { display: flex; flex-direction: column; gap: 12px; }
.sk-stage { flex: 1; display: grid; place-items: center; padding: 12px; min-width: 0; min-height: 0; position: relative; overflow: hidden; }
.sk-canvas-wrap { position: relative; box-shadow: 0 4px 18px rgba(0,0,0,.15); background: #fff; border-radius: 6px; }
.sk-canvas-wrap canvas { display: block; touch-action: none; border-radius: 6px; }
.sk-sel { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: #fff; border-radius: 999px; padding: 4px; display: flex; gap: 4px; box-shadow: 0 4px 12px rgba(0,0,0,.15); z-index: 2; }
.sk-sel .btn { min-height: 48px; padding: 6px 14px; font-size: .86em; border-radius: 999px; }
.sk-tip { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; font-size: .9em; font-weight: 600; padding: 8px 18px; border-radius: 999px; pointer-events: none; white-space: nowrap; box-shadow: 0 6px 16px rgba(0,0,0,.18); }

/* ---------- Print sheet (A4 landscape) ---------- */
.print-sheet { font-family: var(--font); color: #1B2333; font-size: 8.4pt; line-height: 1.3; background: #fff; width: 281mm; min-height: 194mm; padding: 0; display: flex; flex-direction: column; gap: 2.2mm; }
.ps-top { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 1.5px solid var(--navy); padding-bottom: 1.5mm; }
.ps-title { font-size: 14pt; font-weight: 700; color: var(--navy); }
.ps-tag { color: var(--teal-d); font-size: 7.5pt; }
.ps-who { display: flex; gap: 6mm; font-size: 9pt; }
.ps-who b { color: var(--navy); }
.ps-grid { display: grid; grid-template-columns: 1fr 1.08fr; gap: 4mm; }
.ps-band { color: #fff; font-weight: 700; font-size: 7.5pt; letter-spacing: .05em; padding: 1mm 2.5mm; border-radius: 2mm; margin: 0 0 1.2mm; }
.ps-band.navy { background: var(--navy); } .ps-band.plum { background: var(--plum); margin-top: 1.5mm; }
.ps-q { color: var(--navy); margin-top: 1mm; }
.ps-issue { color: var(--plum); font-weight: 700; }
.ps-org { color: var(--plum); font-weight: 600; margin-left: 2mm; }
.ps-ans { border-bottom: .6px solid #BBB; padding: .4mm 0 .8mm; white-space: normal; word-wrap: break-word; }
.ps-empty { color: #A3A9B3; font-style: italic; }
.ps-light { padding: .3mm 2mm; border-radius: 3mm; color: #fff; font-weight: 700; font-size: 7pt; }
.ps-light.green { background: var(--green-d); } .ps-light.amber { background: var(--amber); color: #1B2333; } .ps-light.red { background: var(--red); }
.ps-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5mm; }
.ps-side { border: .8px solid var(--plum); border-radius: 2mm; overflow: hidden; }
.ps-side.sol { border-color: var(--teal-d); }
.ps-side-h { background: var(--plum); color: #fff; text-align: center; font-weight: 700; font-size: 7pt; padding: .6mm; }
.ps-side.sol .ps-side-h { background: var(--teal-d); }
.ps-side-sub { text-align: center; font-style: italic; color: #777; font-size: 6.5pt; }
.ps-side-img { aspect-ratio: 10/7; display: grid; place-items: center; }
.ps-side-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ps-mb { background: var(--cream); border: .8px solid var(--gold); border-radius: 2mm; padding: 1.5mm 2.5mm; margin-top: 2mm; color: var(--gold-dd); }
.ps-mb-h { font-weight: 700; color: var(--gold-d); font-size: 7.5pt; letter-spacing: .05em; }
.ps-mb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3mm; }
.ps-mb .ps-ans { color: #1B2333; border-color: #D8C9A0; }
.ps-p3-grid { display: grid; grid-template-columns: 60mm 1fr; gap: 4mm; }
.ps-box { background: var(--cream); border: .8px solid var(--gold); border-radius: 2mm; padding: 1.5mm 2.5mm; color: var(--gold-dd); }
.ps-box > div { color: #1B2333; }
.ps-by { margin-top: 1.5mm; color: var(--plum) !important; }
.ps-mat { width: 100%; border-collapse: collapse; }
.ps-mat th { background: #EEF2F7; text-align: left; color: var(--navy); font-size: 7.5pt; padding: .6mm 1.5mm; border: .6px solid #CCC; }
.ps-mat td { border: .6px solid #CCC; padding: .6mm 1.5mm; height: 4.5mm; }
.ps-end { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; }
.ps-end b { color: var(--navy); }
.ps-review { border-left: 2mm solid var(--teal-d); background: #F0F8F9; padding: 1.5mm 2.5mm; }
.ps-foot { margin-top: auto; text-align: right; color: #888; font-size: 6.5pt; }

/* Landscape: More tools sits above the stamps, so its extra tools open in view */
@media (orientation: landscape) { .g-more { order: 1; } .sk-more { order: 2; } .g-stamps { order: 3; } }

/* Portrait iPad: tools move under the canvas so the drawing can use the full width */
@media (orientation: portrait) {
  .sk-top { flex-wrap: wrap; row-gap: 6px; }
  .sk-title { flex: 1 1 100%; display: flex; align-items: baseline; gap: 10px; }
  .sk-title small { display: inline; }
  .sk-top .btn, .sk-top .tb { flex: 1 1 auto; white-space: nowrap; }
  .sk-body { flex-direction: column-reverse; }
  /* Tools wrap onto rows (portrait has room under the canvas), so More tools opens in view instead of off to the side */
  .sk-tools { width: auto; flex-direction: row; flex-wrap: wrap; overflow: visible; border-right: 0; border-top: 1px solid var(--line); gap: 10px 14px; padding: 8px 10px; flex: none; }
  .sk-group { flex: none; }
  .sk-more { flex-direction: row; gap: 14px; flex: none; }
  .g-draw { width: 170px; } .g-label { width: 140px; } .g-more { width: 130px; }
  .g-colour { width: 160px; } .g-colour .sk-grid.three { grid-template-columns: repeat(3, 1fr); }
  .g-stamps { width: 520px; } .g-stamps .sk-grid.four { grid-template-columns: repeat(10, 1fr); }
  .g-shapes { width: 210px; } .g-size { width: 180px; } .g-colour2 { width: 160px; } .g-colour2 .sk-grid.three { grid-template-columns: repeat(3, 1fr); }
}

/* Narrow screens (portrait iPads with Bigger text): keep everything inside the width */
@media (max-width: 860px) {
  .top-in { gap: 8px 12px; }
  .brand { min-width: 0; }
  .brand-sub { display: none; }
  .who { order: 3; flex-basis: 100%; }
  .top-tools { margin-left: auto; }
  .status { min-width: 0; }
  .step-h { font-size: 1.35em; }
  .sides-explain { grid-template-columns: 1fr; }
  .progress .pbar { width: 90px; }
  .sendbar-in { gap: 8px; }
  html.pupil .btn.send, html.pupil #printBtn { padding: 10px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
  .cele { animation: none !important; }
  .spark { display: none; }
  .btn:active, .chip:active, .pill:active, .tb:active, .light:active, .linkbtn:active, .vword:active, .steps button:active, .crit-i:active, .more-btn:active, .qdot:active, .helper-btn:active, html.pupil .btn:active:not(:disabled) { transform: none !important; }
}

#printArea { display: none; }
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  html, body { background: #fff !important; --fs: 12px; }
  body > *:not(#printArea) { display: none !important; }
  #printArea { display: block !important; }
  .print-sheet { break-after: page; page-break-after: always; }
  .print-sheet:last-child { break-after: auto; page-break-after: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
