/* aitism learn: enamel transit signage around a sheet of white A4. */
:root {
  --tile: #E7EBEE; --panel: #F6F8F9; --paper: #FFFFFF;
  --sign: #12203A; --sign-2: #1D2F52; --sign-deep: #0B1528;
  --ink: #141C2B; --ink-2: #44505F; --ink-3: #66717E;
  --rule: #CDD4DA; --rule-2: #9AA5B1; --hover: #EDF1F3;
  --amber: #FFB547; --focus: #1658D8; --danger: #A3261B;
  --line: #00804A; --line-ink: #FFFFFF;
  --ui: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, "Segoe UI", sans-serif;
  --kidfont: "Andika", "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --emoji: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  --r: 6px; --ease: cubic-bezier(.16, 1, .3, 1); --bar-h: 86px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* station wall: brick-bond tiles, 2px grout one step darker, a highlight and a shade on every tile */
body { margin: 0; color: var(--ink); font: 400 16px/1.5 var(--ui);
  background: var(--tile) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Crect width='64' height='64' fill='%23D8DEE2'/%3E%3Cg fill='%23E7EBEE'%3E%3Crect x='2' y='2' width='62' height='30' rx='2'/%3E%3Crect x='-30' y='34' width='62' height='30' rx='2'/%3E%3Crect x='34' y='34' width='62' height='30' rx='2'/%3E%3C/g%3E%3Cg fill='%23fff' fill-opacity='.75'%3E%3Crect x='3' y='2' width='60' height='1'/%3E%3Crect x='-29' y='34' width='60' height='1'/%3E%3Crect x='35' y='34' width='60' height='1'/%3E%3C/g%3E%3Cg fill='%2312203A' fill-opacity='.07'%3E%3Crect x='3' y='31' width='60' height='1'/%3E%3Crect x='-29' y='63' width='60' height='1'/%3E%3Crect x='35' y='63' width='60' height='1'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 64px 64px; }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- sign bar ---------- */
.bar { position: sticky; top: 0; z-index: 30; min-height: var(--bar-h); color: #fff;
  background: var(--sign) linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,0) 50%);
  box-shadow: 0 1px 0 #070E1C, 0 4px 12px rgba(11,21,40,.18);
  display: flex; align-items: center; gap: 20px; padding: 12px 26px; }
/* enamel: a keyline just inside every sign */
.bar::before, .plate::before, .about-head::before { content: ""; position: absolute; inset: 4px; border: 1.5px solid rgba(255,255,255,.72);
  border-radius: 5px; pointer-events: none; }
.bar::before { inset: 5px; border-color: rgba(255,255,255,.5); border-radius: 7px; }
.bar :focus-visible { outline-color: var(--amber); }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; border-radius: 4px; }
.brand-mark { width: 44px; height: 18px; flex: none; }
.brand-name { font-weight: 800; font-size: 22px; letter-spacing: -.01em; }
.brand-tag { font-size: 14px; color: #C9D2DE; padding-left: 18px; border-left: 1px solid #34466B; white-space: nowrap; }
/* a recessed window of unlit amber LEDs */
.board { flex: 1; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 1px 14px;
  padding: 7px 16px 8px; border-radius: var(--r); overflow: hidden;
  background: var(--sign-deep) radial-gradient(circle, rgba(255,181,71,.12) .8px, transparent 1.25px) 0 0 / 4px 4px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.6), inset 0 0 0 1px #24355A, 0 1px 0 rgba(255,255,255,.16); }
.board-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #C9D2DE; white-space: nowrap; }
.board-win { min-width: 0; overflow: hidden; }
/* dot-matrix lettering; a long name wraps rather than being cut short */
.board-text { display: block; color: var(--amber); font: 900 20px/26px "Doto", var(--ui); letter-spacing: .02em; overflow-wrap: anywhere;
  text-shadow: 0 0 7px rgba(255,181,71,.38); }
.board-call { min-width: 0; color: #FFD9A0; font-size: 14px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.board-text.roll, .board-call.roll { animation: roll .26s var(--ease); }
@keyframes roll { from { transform: translateY(80%); opacity: 0; } to { transform: none; opacity: 1; } }
.proto { font-size: 12px; line-height: 1.35; color: #C9D2DE; max-width: 220px; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 280px minmax(0, 1fr) 316px; grid-template-areas: "left mid right";
  gap: 24px; padding: 24px; align-items: start; max-width: 1720px; margin: 0 auto; }
.col-left { grid-area: left; } .col-mid { grid-area: mid; position: sticky; top: calc(var(--bar-real, var(--bar-h)) + 24px); } .col-right { grid-area: right; }
.col h2 { font-size: 18px; font-weight: 700; line-height: 1.3; }
/* column headings are enamel plates with a pictogram */
.plate { position: relative; display: flex; align-items: center; gap: 10px; min-height: 50px; margin: 0 0 10px; padding: 9px 16px 9px 12px;
  border-radius: 8px; color: #fff; background: var(--sign) linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,0) 55%);
  box-shadow: 0 1px 0 rgba(11,21,40,.4), 0 3px 8px rgba(11,21,40,.16); }
.plate h2 { flex: 1; min-width: 0; }
.plate-pict { flex: none; display: grid; place-items: center; width: 26px; height: 26px; }
.plate-pict svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.link { border: 0; background: none; padding: 2px 0; font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--ink); }
.link.danger { color: var(--danger); }

/* ---------- line status board (children) ---------- */
.kids, .types { list-style: none; margin: 0 0 28px; padding: 0; background: var(--panel); border-radius: var(--r);
  box-shadow: 0 0 0 1px var(--rule); overflow: hidden; }
.kids { margin-bottom: 6px; }
.list-foot { display: grid; justify-items: end; gap: 10px; margin: 0 2px 20px; }
#reset-slot { justify-self: stretch; }
#reset-slot:empty { display: none; }
#reset-slot .confirm { margin: 0; }
.kids > li + li, .types > li + li { border-top: 1px solid var(--rule); }
.kid, .type, .add-kid { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; align-items: center;
  width: 100%; padding: 12px 14px; border: 0; background: none; text-align: left; }
.kid:focus-visible, .type:focus-visible, .add-kid:focus-visible { outline-offset: -4px; }
.kid:hover, .type:hover, .add-kid:hover { background: var(--hover); }
.kid[aria-pressed="true"] { background: var(--paper); box-shadow: inset 0 0 0 2px var(--sign); }
.kid .bullet, .type .pict, .add-kid .bullet { grid-row: span 2; }
.bullet { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; flex: none;
  background: var(--c, var(--line)); color: var(--ci, #fff); font: 800 17px/1 var(--ui); }
.kid-name { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-weight: 700; line-height: 1.3; min-width: 0; }
.kid-name > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.kid-name .age { font-weight: 400; color: var(--ink-2); font-size: 14px; }
.tag { font-size: 12px; font-weight: 700; color: var(--ink-2); border: 1px solid var(--rule-2); border-radius: 999px; padding: 0 7px; line-height: 18px; }
.kid-status { font-size: 14px; color: var(--ink-2); line-height: 1.35; }
.add-kid { color: var(--ink-2); font-weight: 700; padding-top: 10px; padding-bottom: 10px; }
.add-kid .bullet { grid-row: auto; background: none; color: var(--ink-2); border: 2px dashed var(--rule-2); font-size: 20px; font-weight: 500; }

/* ---------- departures (what to make) ---------- */
.type { row-gap: 1px; }
.pict { width: 40px; height: 40px; border-radius: var(--r); background: var(--sign); display: grid; place-items: center; }
.pict svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.type-name { font-weight: 700; line-height: 1.3; }
.type-sub { font-size: 14px; color: var(--ink-2); line-height: 1.35; }
.type[aria-pressed="true"] { background: var(--sign); color: #fff; }
.type[aria-pressed="true"] .type-sub { color: #C9D2DE; }
.type[aria-pressed="true"] .pict { background: var(--amber); }
.type[aria-pressed="true"] .pict svg { stroke: var(--sign); }
.type[aria-pressed="true"]:focus-visible { outline-color: var(--amber); }

.confirm { background: var(--paper); border-radius: var(--r); box-shadow: 0 0 0 1px var(--rule-2); padding: 12px 14px; margin: 0 0 12px; font-size: 14px; }
.confirm p { margin-bottom: 10px; overflow-wrap: anywhere; }
.confirm .row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- option chips + toolbar ---------- */
.opts { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 12px; min-height: 34px; }
.opt-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.opt-label { font-size: 14px; color: var(--ink-2); font-weight: 700; margin-right: 2px; }
.opt-none { font-size: 14px; color: var(--ink-2); }
.chip { border: 1px solid var(--rule-2); background: var(--paper); border-radius: 999px; padding: 5px 10px; font-size: 14px;
  font-weight: 500; line-height: 1.3; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.chip:hover { border-color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--sign); border-color: var(--sign); color: #fff; }
.chip .em, .ck .em { font-family: var(--emoji); font-size: 15px; line-height: 1; }

.tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.tools .spacer { flex: 1; }
.seg { display: inline-flex; background: var(--panel); border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--rule-2); padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; border-radius: 4px; padding: 6px 10px; font-size: 14px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.seg button:hover { color: var(--ink); background: var(--hover); }
.seg button[aria-pressed="true"] { background: var(--sign); color: #fff; }
.btn { border: 1px solid var(--rule-2); background: var(--paper); border-radius: var(--r); padding: 7px 11px; font-size: 14px;
  font-weight: 700; line-height: 1.3; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn:hover:not(:disabled) { border-color: var(--ink-2); }
.btn:disabled { color: var(--ink-3); background: var(--panel); border-color: var(--rule); cursor: not-allowed; }
.btn-primary { background: var(--sign); border-color: var(--sign); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--sign-2); border-color: var(--sign-2); }
.btn-small { padding: 5px 11px; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.note { font-size: 14px; color: var(--ink-2); line-height: 1.4; min-height: 20px; margin-bottom: 12px; overflow-wrap: anywhere; }
.note b { color: var(--ink); }

/* ---------- stage ---------- */
.stage { position: relative; }
.sheet-wrap { position: relative; margin: 0 auto; isolation: isolate; }
/* the sheet hangs in a poster frame on the tiled wall */
.sheet-wrap::before { content: ""; position: absolute; inset: -8px; z-index: -1; border-radius: 4px;
  background: linear-gradient(180deg, #4A5565, #252E3B);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 0 0 1px #0B1528, 0 18px 32px -10px rgba(11,21,40,.45); }
.sheet-wrap .sheet { position: absolute; top: 0; left: 0; transform-origin: 0 0; box-shadow: none; }
.sheet-in > :not(.xr) { animation: sheetIn .26s var(--ease); }
.sheet-in.xray > :not(.xr) { animation: none; }
.sheet-err { margin: auto; max-width: 30ch; text-align: center; font: 700 20px/1.4 var(--ui); color: var(--ink-2); }
@keyframes sheetIn { from { opacity: .4; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) {
  .board-text.roll, .board-call.roll, .sheet-in > :not(.xr) { animation: none; }
}

/* ---------- the child's line (right column) ---------- */
.about { background: var(--panel); border-radius: 8px; box-shadow: 0 0 0 1px var(--rule), 0 3px 8px rgba(11,21,40,.08); padding: 8px 8px 6px; }
/* the head is the line itself: an enamel band in the child's colour */
.about-head { position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 0 12px; align-items: center;
  padding: 14px 14px 14px 12px; border-radius: 6px; color: var(--line-ink);
  background: var(--line) linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,0) 55%);
  box-shadow: 0 1px 0 rgba(11,21,40,.3), 0 2px 6px rgba(11,21,40,.14); }
.about-head::before { border-color: currentColor; opacity: .7; }
.about-head .bullet { width: 46px; height: 46px; font-size: 21px; grid-row: span 2; background: var(--line-ink); color: var(--line); }
.about-name { font-size: 22px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.about-sub { font-size: 14px; color: inherit; line-height: 1.35; }
.about-name, .about-sub { grid-column: 2; }
.about-head .btn { grid-column: 3; grid-row: 1 / span 2; position: relative; color: var(--ink); }
.about-head :focus-visible { outline-color: var(--line-ink); }

.kid-form { margin: 0 8px; padding: 14px 0 4px; border-bottom: 1px solid var(--rule); display: grid; gap: 12px; }
.fld { display: grid; gap: 4px; font-size: 14px; font-weight: 700; color: var(--ink-2); border: 0; padding: 0; margin: 0; min-width: 0; }
.fld legend { padding: 0; margin-bottom: 6px; }
.fld input[type="text"], .fld select { font-size: 16px; font-weight: 400; color: var(--ink); background: var(--paper);
  border: 1px solid var(--rule-2); border-radius: var(--r); padding: 7px 10px; min-height: 40px; width: 100%; }
.fld input[type="text"]:hover, .fld select:hover { border-color: var(--ink-2); }
.fld-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 12px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { position: relative; }
.swatch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.swatch span { display: block; width: 30px; height: 30px; border-radius: 999px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--ink); }
.swatch input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 5px; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.form-foot .link { min-width: 0; overflow-wrap: anywhere; text-align: left; }

.stations { list-style: none; margin: 0 8px; padding: 6px 0 0; position: relative; }
.stations::before { content: ""; position: absolute; left: 14px; top: 26px; bottom: 30px; width: 4px; border-radius: 2px; background: var(--line); }
.st { position: relative; padding: 12px 0 12px 44px; }
.st + .st { border-top: 1px solid var(--rule); }
.st-dot { position: absolute; left: 2px; top: 12px; width: 28px; height: 28px; border-radius: 999px; background: var(--paper);
  border: 4px solid var(--line); display: grid; place-items: center; font: 800 11px/1 var(--ui); letter-spacing: -.02em; color: var(--ink); }
.st.off .st-dot { border-style: dashed; border-color: var(--rule-2); color: var(--ink-3); }
.xraying .st:not(.off) .st-dot.lit { background: var(--sign); color: #fff; }
.st-top { display: flex; align-items: center; gap: 10px; min-height: 26px; }
.st-name { font-size: 14px; font-weight: 700; color: var(--ink-2); flex: 1; }
.st-val { font-weight: 700; line-height: 1.35; margin-top: 2px; overflow-wrap: anywhere; }
.st.off .st-val { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1px; }
.st-fx { font-size: 14px; color: var(--ink-2); line-height: 1.4; margin-top: 3px; }
.st-fx.idle { color: var(--ink-3); }
.st.hot { background: var(--hover); box-shadow: -8px 0 0 var(--hover), 8px 0 0 var(--hover); }
.st-change { margin-top: 6px; border: 0; background: none; padding: 2px 0; font-size: 14px; font-weight: 700; color: var(--sign);
  text-decoration: underline; text-underline-offset: 3px; }
.st-change:hover { color: var(--focus); }

.sw { position: relative; width: 46px; height: 26px; border-radius: 999px; border: 0; padding: 0; background: var(--rule-2); flex: none; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 999px; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.sw[aria-checked="true"] { background: var(--sign); }
.sw[aria-checked="true"]::after { transform: translateX(20px); }
.sw-wrap { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink-2); }

.st-ed { margin-top: 10px; padding: 12px; background: var(--paper); border-radius: var(--r); box-shadow: 0 0 0 1px var(--rule-2); }
.st-ed fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.st-ed legend { font-size: 14px; font-weight: 700; margin-bottom: 8px; padding: 0; }
.st-ed .hint { font-size: 12px; color: var(--ink-2); font-weight: 400; }
.cks { display: flex; flex-wrap: wrap; gap: 6px; }
.ck { position: relative; display: inline-flex; }
.ck input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ck input:disabled { cursor: not-allowed; }
.ck span { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--rule-2); border-radius: 999px; padding: 5px 11px;
  font-size: 14px; font-weight: 500; line-height: 1.3; background: var(--paper); min-height: 32px; }
.ck input:hover + span { border-color: var(--ink-2); }
.ck input:checked + span { background: var(--sign); border-color: var(--sign); color: #fff; }
.ck input:disabled + span { color: var(--ink-3); border-style: dashed; }
.ck input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.st-ed .done-row { margin-top: 12px; display: flex; justify-content: flex-end; }

/* ---------- the sheet: A4 at 96dpi, every size in em of the child's base size ---------- */
.sheet { --base: 28px; --k: 1; width: 794px; height: 1120px; background: var(--paper); color: #111; overflow: hidden; overflow-wrap: break-word;
  box-shadow: 0 1px 2px rgba(18,32,58,.12), 0 8px 24px rgba(18,32,58,.12);
  padding: 44px 50px 28px; display: flex; flex-direction: column; font: 400 calc(var(--base) * var(--k))/1.3 var(--kidfont); }
.sheet.big { --base: 34px; }
.sheet .em, .pics, .pchoice, .card-pic, .step-pic { font-family: var(--emoji); font-style: normal; }
.sh-head { display: flex; align-items: center; gap: .45em; padding-bottom: .35em; border-bottom: 3px solid #111; margin-bottom: .5em; }
.sh-head .bullet { font: 700 .8em/1 var(--ui); width: 1.95em; height: 1.95em; background: var(--line); color: var(--line-ink); }
.sh-title { flex: 1; min-width: 0; font-size: 1.1em; font-weight: 700; line-height: 1.1; }
.sh-title small { display: block; font-size: .55em; font-weight: 400; color: #333; margin-top: .2em; }
.sh-date { align-self: flex-end; font-size: .5em; color: #333; white-space: nowrap; }

.ws { display: grid; gap: .4em; margin-bottom: .65em; font-size: .62em; }
.ws-k { font-weight: 700; white-space: nowrap; }
.ws-do { border: 2px solid #111; border-radius: 12px; padding: .45em .75em; font-size: 1.12em; line-height: 1.25; display: flex; gap: .7em; align-items: baseline; }
.ws-route { display: flex; align-items: center; gap: .7em; }
.stops { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; justify-content: space-between; align-items: center; position: relative; gap: .2em; }
.stops::before { content: ""; position: absolute; left: .6em; right: -1em; top: 50%; height: .24em; margin-top: -.12em; background: var(--line); }
.stops li { position: relative; width: 1.75em; height: 1.75em; border-radius: 50%; background: #fff; border: .17em solid var(--line);
  display: grid; place-items: center; font: 700 .9em/1 var(--ui); }
.ws-then { position: relative; display: flex; align-items: center; gap: .4em; background: var(--line); color: var(--line-ink);
  border-radius: 999px; padding: .22em 1em .22em .9em; font-weight: 700; white-space: nowrap; }
.ws-then .em { font-size: 1.45em; line-height: 1; width: 1.3em; height: 1.3em; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.ws-then.done { background: #fff; color: #111; border: .17em solid var(--line); }
.ws-line { flex: 1; height: .24em; background: var(--line); border-radius: .12em; }

.sh-body { flex: 1; display: flex; flex-direction: column; gap: .5em; min-height: 0; }
.sh-foot { margin-top: .5em; padding-top: 6px; border-top: 1px solid #999; display: flex; justify-content: space-between; gap: 16px;
  font: 400 12px/1.3 var(--ui); color: #444; }

/* maths */
/* the questions take the whole body and share any spare height out evenly, as room between questions, never as a blank bottom half */
.qs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6em .7em; align-content: space-evenly; flex: 1 0 auto; }
.qs.one { grid-template-columns: minmax(0, 1fr); }
.q { position: relative; border: 2px solid #BDBDBD; border-radius: 14px; padding: .5em .6em .5em .85em; display: flex; align-items: center;
  justify-content: space-between; gap: .45em; min-width: 0; }
.q.col { flex-direction: column; align-items: flex-start; }
.q-n { position: absolute; top: 0; left: 0; translate: -38% -38%; font: 700 .52em/1 var(--ui); width: 2em; height: 2em; border-radius: 50%;
  background: var(--line); color: var(--line-ink); display: grid; place-items: center; }
.pics { display: grid; grid-template-columns: repeat(5, 1.12em); gap: .06em .03em; font-size: .88em; line-height: 1.12; }
.pics.sm { font-size: .7em; }
.pics i { font-style: normal; text-align: center; position: relative; }
.x::before, .x::after { content: ""; position: absolute; left: 4%; right: 4%; top: 50%; height: .12em; margin-top: -.06em; background: #111; border-radius: 2px; }
.x::before { transform: rotate(45deg); } .x::after { transform: rotate(-45deg); }
.eq { display: flex; align-items: center; flex-wrap: wrap; gap: .3em; font-weight: 700; font-size: 1.05em; }
/* with pictures stacked over the numbers, the signs and the box sit on the numbers' line */
.eq.stack { align-items: flex-end; }
.eq.stack .box { margin-bottom: -.09em; }
.term { display: inline-flex; flex-direction: column; align-items: center; gap: .12em; }
.term .pics { font-size: .62em; grid-template-columns: repeat(5, 1.12em); }
.op { font-family: var(--ui); font-weight: 700; }
.q-em { font-size: .9em; line-height: 1; }
.box { display: inline-block; width: 1.9em; height: 1.55em; border: 3px solid #111; border-radius: 10px; background: #fff; flex: none; }
.choices { display: inline-flex; gap: .3em; flex: none; }
.choice { min-width: 1.6em; height: 1.6em; padding: 0 .25em; border: 2px solid #111; border-radius: 999px; display: grid; place-items: center; font-weight: 700; font-size: .9em; }
.choices.words { flex-wrap: wrap; }
.choices.words .choice { font-size: .78em; font-weight: 400; padding: .1em .65em; height: auto; min-height: 1.75em; }
.lineans { display: inline-block; width: 2.8em; height: 1.2em; border-bottom: 2px solid #111; flex: none; }
.story-q { font-size: .8em; line-height: 1.3; }
.numline { position: relative; display: flex; justify-content: space-between; margin: 0 .3em .35em; padding-top: .55em; font: 700 .42em/1 var(--ui); }
.numline::before { content: ""; position: absolute; left: .7em; right: .7em; top: .2em; height: 3px; background: #111; }
.numline span { position: relative; width: 1.4em; text-align: center; }
.numline span::before { content: ""; position: absolute; left: 50%; top: -.75em; width: 2px; height: .6em; margin-left: -1px; background: #111; }
.numline-k { font: 700 .45em/1.2 var(--ui); color: #333; }
.numline.wide { font-size: .55em; margin-bottom: .2em; }
.track { display: flex; align-items: center; gap: .12em; flex-wrap: nowrap; }
.car { min-width: 1.75em; height: 1.55em; padding: 0 .2em; border: 2px solid #111; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: .8em; }
.car.gap { border-width: 3px; border-style: dashed; }
.groups { display: flex; flex-wrap: wrap; gap: .25em; align-items: center; }
.group { border: 2px solid #111; border-radius: 999px; padding: .15em .3em; display: flex; flex-wrap: wrap; justify-content: center; max-width: 3.3em; font-size: .72em; font-family: var(--emoji); }
.group i { font-style: normal; }
.g-label { font-size: .8em; font-weight: 700; }

/* telling the time: a line-art teaching clock over each answer */
.qs.clocks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.qs.clocks.one { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.q.tq { flex-direction: column; justify-content: flex-start; gap: .4em; padding: .6em .55em .55em; }
.clock-w { position: relative; display: block; line-height: 0; }
.clock { display: block; width: 4.8em; height: 4.8em; overflow: visible; }
/* three across only stays this small with big text; otherwise the clock takes the room it has */
.qs.clocks.one .clock, .sheet:not(.big) .qs.clocks .clock { width: 5.6em; height: 5.6em; }
.clock-w .q-em { position: absolute; right: -.35em; bottom: -.1em; font-size: .78em; line-height: 1; }
.c-face { fill: #fff; stroke: #111; stroke-width: 2.4; }
.c-hr { stroke: #111; stroke-width: 2.4; stroke-linecap: round; }
.c-min { stroke: #111; stroke-width: 1; }
.c-num text { font: 700 11.5px var(--kidfont); fill: #111; text-anchor: middle; dominant-baseline: central; }
.c-hand { stroke: #111; stroke-linecap: round; fill: none; }
.c-hub { fill: var(--line); stroke: #111; stroke-width: 1.2; }
.tq .choices.tc { flex-direction: column; align-self: stretch; gap: .25em; }
.tq .choices.tc .choice { font-size: .68em; padding: .1em .5em; text-align: center; text-wrap: balance; }
.qs.clocks.one.l4 .choices.tc { flex-direction: row; flex-wrap: wrap; justify-content: center; }
/* hours : minutes is one answer, so it never breaks over two lines */
.qs.clocks.l4 .tframe { flex-wrap: nowrap; }
.tframe { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .25em .3em; }
.tf-w { font-size: .78em; font-weight: 700; white-space: nowrap; }
.tf-c { font: 700 1.1em/1 var(--ui); }
.box.w2 { width: 2.6em; }
.lineans.wide { width: 5em; }

/* reading */
.read-t { font-weight: 700; font-size: .95em; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: .2em; }
.facts li { position: relative; padding-left: 1em; line-height: 1.28; font-size: .92em; }
.facts li::before { content: ""; position: absolute; left: .1em; top: .42em; width: .45em; height: .45em; border-radius: 50%; background: var(--line); }
.passage { font-size: .85em; line-height: 1.55; }
.ghost { display: none !important; }
.xray .ghost { display: block !important; color: #8A8A8A; text-decoration: line-through; }
.xray span.ghost { display: inline !important; }
.symtext { display: grid; gap: .45em; }
.sym-line { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .25em .3em; }
.sym { display: inline-flex; flex-direction: column; align-items: center; padding: .08em .2em; border-radius: 8px; border: 2px solid transparent; }
.sym.has { border-color: #111; }
.sym .em { font-size: 1.15em; line-height: 1.15; }
.rqs { list-style: none; margin: 0; padding: 0; display: grid; gap: .55em; }
.rq { position: relative; border: 2px solid #BDBDBD; border-radius: 14px; padding: .45em .65em .55em .9em; display: grid; gap: .35em; }
.rq-q { font-weight: 700; font-size: .82em; line-height: 1.3; }
.cloze { font-size: .82em; line-height: 1.6; }
.blank { display: inline-block; width: 4.2em; height: 1em; border-bottom: 2px solid #111; vertical-align: baseline; }
.longline { display: block; height: 1.25em; border-bottom: 2px solid #111; }
.pchoices { display: flex; gap: .55em; align-items: center; }
.pchoice { width: 1.95em; height: 1.95em; border: 2px solid #111; border-radius: 50%; display: grid; place-items: center; font-size: 1.05em; line-height: 1; }
.trace { display: inline-block; font-size: 1.05em; color: #B3B3B3; letter-spacing: .06em; border-bottom: 2px solid #111; padding: 0 .3em; line-height: 1.2; }
.rq-row { display: flex; align-items: center; gap: .9em; flex-wrap: wrap; }
/* no lone word left on a last line */
.step-t, .story-q, .rq-q, .facts li, .passage, .ws-do, .cope { text-wrap: pretty; }

/* story and day plan: a route of numbered steps */
.route { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: .3em; align-content: start; }
.route::before { content: ""; position: absolute; left: .56em; top: .9em; bottom: .9em; width: .2em; margin-left: -.1em; border-radius: .1em; background: var(--line); }
.step { position: relative; display: grid; grid-template-columns: 1.12em 1.9em minmax(0, 1fr); gap: 0 .42em; align-items: center; }
.plan .step { grid-template-columns: 1.12em 1.9em minmax(0, 1fr) 1.25em; }
.step-n { width: 1.12em; height: 1.12em; border-radius: 50%; background: #fff; border: .12em solid var(--line); display: grid; place-items: center; }
.step-n b { font: 700 .46em/1 var(--ui); }
.step-pic { width: 1.9em; height: 1.9em; border: 2px solid #111; border-radius: .35em; display: grid; place-items: center; background: #fff; }
.step-pic .em { font-size: 1.15em; line-height: 1; }
.route.l1 .step { grid-template-columns: 1.12em 2.35em minmax(0, 1fr); }
.plan.l1 .step { grid-template-columns: 1.12em 2.35em minmax(0, 1fr) 1.25em; }
.route.l1 .step-pic { width: 2.35em; height: 2.35em; }
.route.l1 .step-pic .em { font-size: 1.5em; }
.step-t { font-size: .8em; line-height: 1.28; min-width: 0; }
.route.l1 .step-t { font-size: .9em; }
.step-x { display: block; font-size: .86em; color: #333; margin-top: .12em; }
.cope { display: inline-flex; align-items: center; gap: .35em; margin-top: .3em; padding: .1em .6em; border: 2px dashed var(--line); border-radius: .5em; font-size: .88em; line-height: 1.3; }
.step-t .cope { display: flex; width: fit-content; }
.step.end .step-n { background: var(--line); box-shadow: 0 0 0 .1em #fff, 0 0 0 .22em var(--line); }
.step.end .step-n b { color: var(--line-ink); }
.step.end .step-t { font-weight: 700; }
.tick { width: 1.25em; height: 1.25em; border: 3px solid #111; border-radius: .28em; background: #fff; }
.cutcard { margin-top: auto; display: flex; align-items: center; gap: .6em; padding-top: .4em; }
.cutcard-in { display: inline-flex; align-items: center; gap: .35em; border: 3px dashed #111; border-radius: .45em; padding: .2em .9em; font-weight: 700; }
.cutcard-in .em { font-size: 1.3em; }
.cut-k { font: 400 13px/1.3 var(--ui); color: #444; }

/* word cards */
.cards { position: relative; flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; border-top: 2px dashed #666; border-left: 2px dashed #666; margin-top: .3em; }
.cards::before { content: "\2702"; position: absolute; top: -.6em; left: .5em; font: 400 .7em/1 "Segoe UI Symbol", var(--ui); background: #fff; padding: 0 .15em; color: #444; }
.card { border-right: 2px dashed #666; border-bottom: 2px dashed #666; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1em; padding: .3em; min-height: 0; }
.card-pic { font-size: 2.6em; line-height: 1.15; }
.card-w { font-size: 1.1em; font-weight: 700; text-align: center; line-height: 1.15; }
.cards.four .card-pic { font-size: 3.2em; }
.cards.four .card-w { font-size: 1.3em; }

/* writing: each word sits on handwriting lines, solid base, dashed middle for small letters, pale top for tall ones */
.wrs { list-style: none; margin: 0; padding: 0; display: grid; gap: .45em; align-content: start; }
.wr { position: relative; border: 2px solid #BDBDBD; border-radius: 14px; padding: .2em .75em .4em .85em;
  display: grid; grid-template-columns: 1.9em minmax(0, 1fr); gap: 0 .6em; align-items: center; }
.wr-pic { width: 1.9em; height: 1.9em; border: 2px solid #111; border-radius: .35em; display: grid; place-items: center; background: #fff; overflow: hidden; }
.wr-pic .em { font-size: 1.15em; line-height: 1; }
.wr-me { width: 100%; height: 100%; display: grid; place-items: center; background: var(--line); color: var(--line-ink); font-weight: 700; font-size: 1.05em; line-height: 1; }
.wr-l { min-width: 0; }
.wl { display: block; position: relative; white-space: nowrap; line-height: 1.4; }
.ru { position: relative; display: inline-block; width: 100%; margin-right: -100%; height: calc(1ex - 2px); vertical-align: baseline;
  border-bottom: 2px solid #111; background: repeating-linear-gradient(90deg, #8F8F8F 0 .2em, transparent .2em .36em) 0 0 / 100% 1.5px no-repeat; }
.ru::before { content: ""; position: absolute; left: 0; right: 0; bottom: calc(.72em - 2px); bottom: calc(1cap - 2px); height: 1.5px; background: #C8C8C8; }
.tw { position: relative; color: #B3B3B3; letter-spacing: .04em; padding-left: .25em; }

/* the usual sheet, for comparison: deliberately typical */
.sheet.usual { --base: 17px; padding: 26px 30px; font-family: "Comic Sans MS", "Comic Neue", "Chalkboard SE", cursive; line-height: 1.35; color: #222; }
.u-frame { flex: 1; display: flex; flex-direction: column; gap: 12px; border: 5px double #444; border-radius: 4px; padding: 16px 18px; min-height: 0; }
.u-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.u-title { font-size: 2.3em; font-weight: 700; line-height: 1.05; color: #D6336C; }
.u-name { font-size: .95em; }
.u-intro { font-size: 1.05em; }
.u-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 20px; font-size: 1.15em; }
.u-grid span { white-space: nowrap; }
.u-grid i { font-style: normal; display: inline-block; min-width: 1.7em; color: #555; }
.u-work { flex: 1; min-height: 120px; border: 2px solid #444; border-radius: 8px; padding: 6px 12px; color: #444; background-color: #fff;
  background-image: linear-gradient(#DCE3EC 1px, transparent 1px), linear-gradient(90deg, #DCE3EC 1px, transparent 1px); background-size: 18px 18px; }
.u-chal { border: 2px solid #444; border-radius: 10px; padding: 8px 12px; background: #FFF4D6; }
.u-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 1.05em; }
.u-sticker { display: inline-flex; align-items: center; gap: 6px; border: 3px solid #D6336C; color: #D6336C; border-radius: 999px; padding: 4px 14px; font-weight: 700; transform: rotate(-5deg); }
.u-sticker .em { font-size: 1.6em; }
.u-text { font-size: 1.12em; line-height: 1.55; }
.u-qs { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; font-size: 1.05em; }
.u-qs li { padding-bottom: 26px; border-bottom: 1px solid #999; }
.u-draw { flex: 1; min-height: 160px; border: 2px solid #444; border-radius: 8px; padding: 8px 12px; color: #444; }
.u-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: .95em; }
.u-list li { display: flex; gap: 14px; border-bottom: 1px dotted #888; padding-bottom: 6px; }
.u-list b { width: 3.2em; flex: none; }
.u-warn { font-size: 1.6em; font-weight: 700; color: #C92A2A; text-align: center; }
.u-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px dashed #666; border-left: 1px dashed #666; }
.u-cards span { border-right: 1px dashed #666; border-bottom: 1px dashed #666; padding: 10px 4px; text-align: center; font-size: .95em; display: grid; gap: 2px; }
.u-cards .em { font-size: 1.5em; }
.u-model { font: 400 1.7em/1.3 "Segoe Script", "Lucida Handwriting", "Brush Script MT", cursive; color: #333; }
.u-lines { flex: 1; min-height: 0; border-top: 1px solid #9DB4CC; background-color: #fff;
  background-image: linear-gradient(90deg, transparent 44px, #E58F8F 44px 46px, transparent 46px), repeating-linear-gradient(transparent 0 41px, #9DB4CC 41px 42px); }

/* x-ray: what changed and why */
.xr { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
/* markers are navy signs carrying the station's code (S1), never circles, so they can't be mistaken for the sheet's own numbers */
.xr-m { position: absolute; min-width: 42px; height: 34px; padding: 0 7px; border-radius: 9px; background: var(--sign); color: #fff; white-space: nowrap;
  box-shadow: 0 0 0 3px var(--amber), 0 2px 8px rgba(0,0,0,.35); display: grid; place-items: center; font: 800 16px/1 var(--ui); }
.sheet.xray [data-why] { outline: 2px dashed var(--sign); outline-offset: 4px; border-radius: 4px; }
.sheet.xray [data-why="page"] { outline: none; }
.sheet .hot { outline: 3px solid var(--sign) !important; outline-offset: 4px; }
/* everything nothing changed fades back, so the changes stand out */
.sheet .xr-dim { opacity: .45; transition: opacity .2s var(--ease); }
.sheet.bw > :not(.xr) { filter: grayscale(1); }
/* black and white: pictures keep a firm outline so they survive a mono printer */
.sheet.bw :is(.em, .q-em, .pics, .group, .pchoice, .card-pic) { filter: contrast(1.35) drop-shadow(0 0 .5px #000) drop-shadow(0 0 .5px #000); }

/* ---------- responsive ---------- */
@media (max-width: 1199px) {
  .app { grid-template-columns: 290px minmax(0, 1fr); grid-template-areas: "left mid" "right mid"; }
  .brand-tag { display: none; }
}
@media (max-width: 859px) {
  .bar { position: relative; flex-wrap: wrap; padding: 12px 18px; gap: 8px 14px; }
  .proto { order: 2; flex: 1 1 180px; max-width: none; }
  .board { order: 3; flex: 1 1 100%; }
  .app { display: flex; flex-direction: column; gap: 20px; padding: 16px; }
  .col-left, .col-mid, .col-right { width: 100%; min-width: 0; }
  .col-mid { position: static; }
  .kids, .types { display: flex; overflow-x: auto; scroll-snap-type: x proximity; }
  .types { margin-bottom: 20px; }
  .kids > li, .types > li { flex: 0 0 auto; width: 232px; scroll-snap-align: start; }
  .types > li { width: 210px; }
  .kids > li + li, .types > li + li { border-top: 0; border-left: 1px solid var(--rule); }
  .kid, .type, .add-kid { height: 100%; }
}
@media (max-width: 599px) {
  .board { grid-template-columns: minmax(0, 1fr); }
  .call-k { margin-top: 6px; }
}

/* ---------- print: only the sheet, A4, no x-ray ---------- */
@page { size: A4; margin: 0; }
@media print {
  html, body { background: #fff !important; }
  .bar, .col-left, .col-right, .opts, .tools, .note { display: none !important; }
  .app { display: block; padding: 0; margin: 0; max-width: none; }
  .col-mid { position: static; }
  .stage, .sheet-wrap { width: auto !important; height: auto !important; margin: 0; }
  .sheet-wrap .sheet { position: static; transform: none !important; box-shadow: none; width: 794px; height: 1120px; }
  .sheet-wrap::before { display: none; }
  .sheet .xr, .sheet.xray .ghost, .sheet.xray span.ghost { display: none !important; }
  .sheet .xr-dim { opacity: 1 !important; }
  .sheet [data-why], .sheet .hot { outline: none !important; }
  .sheet-in > :not(.xr) { animation: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
