/* ============================================================================
   STEMeUp — new learner home (Quest Worlds), the learner-only layer.
   Ported from the design prototype (home_shell_prototype.html). No build step.
   THIS FILE IS THE THIRD OF THREE, and only works in that order:
     branding.css   fonts + the legacy palette
     shell.css      the rail, the canvas, the tokens and the components — SHARED
                    with the professional screens. If you are looking for
                    .app / .rail / .canvas / .nav-item / .btn / :root, it is there.
     home.css       this file: the two extra swatch themes, and everything that
                    is Quest and only Quest — worlds, the map, the diagnostic,
                    the tutor chat, progress, settings, the Avatar Creator.
   ========================================================================== */

/* The .theme-seg rules (the segmented background switch) moved to
   /static/shell.css in the a11y-parity round: the switch is shared chrome now
   — learner and carer, and staff/director at item 5 — and it is built by the
   one exported Shell.buildThemeSeg. The anti-fork ratchet
   (test_shell_layer.py) fails if a selector is defined in both files. */

/* ---- background themes: shared chrome now -------------------------------
   The [data-theme="black"] and [data-theme="white"] token blocks moved to
   /static/shell.css on 2026-08-24: the founder's 2026-08-22 build list
   (items 4+5) made the background choice an accessibility setting for every
   signed-in account — carers first, staff next — so it stopped being a
   learner-only feature. This file keeps only its Quest-specific [data-theme]
   contrast overrides (map nodes, tutor dots) further down.
   -------------------------------------------------------------------- */

/* world (strand) items with a mastery-percent progress ring */
.world{ display:flex; align-items:center; gap:12px; width:100%; text-align:left; cursor:pointer;
  padding:9px 10px; border-radius:15px; background:transparent; border:2px solid transparent; margin-bottom:7px; transition:background .15s,border-color .15s; }
.world:hover{ background:color-mix(in srgb, var(--w) 12%, transparent); }
.world:focus-visible{ outline:2px solid var(--w); outline-offset:1px; }
.ring{ flex:0 0 auto; width:42px; height:42px; border-radius:50%; display:grid; place-items:center;
  background:conic-gradient(var(--w) 0 var(--pct), var(--track) var(--pct) 100%); }
.ring > span{ width:31px; height:31px; border-radius:50%; background:var(--rail); display:grid; place-items:center;
  font-family:"Poppins",sans-serif; font-weight:700; font-size:12px; line-height:1; color:var(--w); }
.ring > span svg{ width:20px; height:20px; stroke:currentColor; fill:none; stroke-width:1.35;
  stroke-linecap:round; stroke-linejoin:round; }
.w-text{ min-width:0; flex:1; display:flex; flex-direction:column; gap:2px; }
.w-name{ display:block; font-weight:600; font-size:14px; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--ink); }
.w-sub{ display:block; font-size:11.5px; line-height:1.2; color:var(--faint); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* --------------------------------- landing -------------------------------- */
.landing{ max-width:680px; margin:7vh auto 0; padding:0 10px; text-align:center; animation:rise .5s ease both; }
.landing-hi{ font-size:34px; font-weight:400; margin:0 0 8px; letter-spacing:.004em; text-wrap:balance; }

/* The sitting's receipt, under the recap headline. */
.dg-recap-xp{ margin:10px 0 0; font-size:13px; font-weight:700; color:var(--goldtext); }

/* The next thing to work toward, named on My progress. */
.pg-next-reward{ display:flex; align-items:center; gap:14px; margin-top:16px;
  padding:13px 16px; border-radius:14px; border:1px solid var(--line);
  background:color-mix(in srgb, var(--xp) 9%, var(--surface)); }
.pnr-ic{ width:44px; height:44px; flex:0 0 auto; border-radius:12px; overflow:hidden;
  display:grid; place-items:center; background:var(--accent-wash); }
.pnr-swatch{ width:100%; height:100%; display:block; }
.pnr-text{ display:flex; flex-direction:column; line-height:1.35; }
.pnr-text b{ font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  color:var(--faint); }
.pnr-text span{ font-size:14.5px; color:var(--ink); font-weight:600; }

/* EARLIER TODAY — option C's recap line (founder decision 2026-08-27, C + D).
   A label and a sentence, not a readout: the eyebrow is small and quiet so the
   thing a child reads is what they DID. */
.landing-earlier{ display:flex; flex-direction:column; gap:2px; margin:0 auto 20px;
  max-width:560px; font-size:14.5px; line-height:1.5; color:var(--ink); text-align:left; }
.landing-earlier[hidden]{ display:none; }
.le-lead{ font-size:10.5px; font-weight:700; letter-spacing:.08em;
  text-transform:uppercase; color:var(--faint); }

/* ONE next thing (option C). One column, not two — the second card left with
   the round, and a 1fr 1fr grid with a single child stretches it to half the
   width with a hole beside it. */
.landing-cards{ display:grid; grid-template-columns:1fr; gap:18px; margin-bottom:18px;
  max-width:560px; margin-left:auto; margin-right:auto; text-align:left; }

/* ---------------------------- THE SHELF (16b) -----------------------------
   Founder decision 2026-08-27, pattern 1 — "the day settles onto it".

   The HORIZON is the whole design. Everything above `.shelf` is today;
   everything from its rule down is the past, and there is no control to press
   because scrolling IS the control. So the separation has to be carried by the
   band itself: a hairline, a change of ground, and enough air above it that the
   eye reads a break rather than another card in the stack.

   Colour comes from tokens only. `--cc` is the world's own hex, set inline per
   chip, and it paints a DOT beside a name — never text, never the only way to
   tell two chips apart. The six world colours were picked against the purple
   ground and three of them sit under 3:1 on the white theme, so a chip that
   said what it was in colour alone would stop saying it for some children. */
.shelf{ margin-top:40px; padding-top:26px; border-top:1px solid var(--line);
  text-align:left; }
.shelf-head{ display:flex; align-items:center; gap:10px; margin:0 0 16px;
  font-weight:400; flex-wrap:wrap; }
/* FOUNDER PICK S4 (2026-09-03): the shelf's icon, its name, the count as a
   gold badge in the rail tag's own recipe (--accent / --on-accent, so it is
   already contrast-tuned per theme), and the caption in the faint voice. It
   replaces decision 4's display-size number, which the founder came to
   dislike the look of; the count still leads, one size down. */
/* The icon is a BUTTON: it folds and unfolds the list (founder, 2026-09-03).
   Same 22px glyph, a round hit area that clears 44px, and the open state
   shown two ways — the icon fills, and the list is there. */
.shelf-ic{ width:44px; height:44px; margin:-11px; padding:0; border:0; border-radius:50%;
  background:none; color:var(--goldtext); display:grid; place-items:center; flex:0 0 auto;
  cursor:pointer; transition:background .16s, transform .16s; }
.shelf-ic svg{ width:22px; height:22px; }
.shelf-ic:hover{ background:var(--accent-wash); }
.shelf-ic:focus-visible{ outline:2px solid var(--accent-ink); outline-offset:2px; }
/* The shelf's name opens it too: the icon and the name are one button (founder, 2026-11-22,
   when Today's tile onto the shelf went). */
.shelf-btn{ display:inline-flex; align-items:center; gap:10px; padding:0; border:0; border-radius:12px;
  background:none; color:inherit; font:inherit; text-align:left; cursor:pointer; }
.shelf-btn:hover .shelf-ic{ background:var(--accent-wash); }
.shelf-btn:focus-visible{ outline:2px solid var(--accent-ink); outline-offset:4px; }
.shelf.open .shelf-ic{ background:var(--accent-wash); transform:rotate(-6deg); }
.shelf-row{ display:none; }
.shelf.open .shelf-row{ display:flex; }
.shelf-title{ font-family:"ITC Ronda","Poppins",sans-serif; font-size:19px; line-height:1; color:var(--ink); }
.shelf-count{ min-width:24px; height:24px; padding:0 9px; border-radius:99px; box-sizing:border-box;
  background:var(--accent); color:var(--on-accent); font-family:"Poppins",sans-serif;
  font-weight:600; font-size:13px; line-height:24px; text-align:center; }
.shelf-count[hidden]{ display:none; }
/* letter-spacing:normal: the heading's .8px spacing suits its title, not this sentence
   (2026-11-21, the founder's pick X). */
.shelf-lead{ font-size:12.5px; color:var(--faint); letter-spacing:normal; }
.shelf-empty{ margin:0; font-size:14px; line-height:1.55; color:var(--muted); }

/* `display` is owned by the fold rules above (.shelf-row / .shelf.open .shelf-row). */
.shelf-row{ flex-wrap:wrap; gap:9px; }
.shelf-chip{ --cc:var(--accent); display:inline-flex; align-items:center; gap:8px;
  padding:9px 14px; border-radius:999px; cursor:pointer;
  border:1px solid var(--line); background:var(--surface); color:var(--ink);
  font:inherit; font-size:13.5px; text-align:left;
  transition:border-color .16s, transform .16s, background .16s; }
.shelf-chip:hover{ border-color:color-mix(in srgb, var(--cc) 55%, var(--line));
  background:var(--rail); transform:translateY(-1px); }
.shelf-chip:focus-visible{ outline:2px solid var(--accent-ink); outline-offset:2px; }
/* THE DOT CARRIES A RING, and the reason is measured, not stylistic. The six
   world hues were chosen against the purple ground: on the white theme the
   Number gold measures 1.72:1 against the chip it sits on — visible as a shape
   only because something outlines it. This is exactly the precedent item 15 set
   for the unread dot ("an --ink ring as well as the gold, because plain
   --accent measures 1.64:1 against --paper"), applied for the same reason.

   --ink, so the ring inverts with the theme: dark against a light chip, light
   against a dark one, outlining the dot either way rather than fighting it. And
   the ring is a SECOND cue on top of the name beside it — the dot is never how
   a learner tells two topics apart, which is why 1.4.11 does not bind here even
   though the dot now clears its floor anyway. */
.sc-dot{ width:9px; height:9px; flex:0 0 auto; border-radius:50%; background:var(--cc);
  box-shadow:0 0 0 1px color-mix(in srgb, var(--ink) 45%, transparent); }
.sc-name{ min-width:0; }
/* "new" is a WORD as well as a colour, for the same reason the dot is never
   alone: the mark has to survive a child who cannot separate these hues. */
.sc-new{ font-size:9.5px; font-weight:700; letter-spacing:.08em;
  text-transform:uppercase; color:var(--goldtext); }

/* THE ARRIVAL. The founder's third sentence about this pattern is that the
   move onto the shelf is "an earned, animated event, not a tap" — so a chip
   that is new since the learner last looked SETTLES into place rather than
   being there already when the page paints.

   `--i` staggers a run of them so two masteries in one sitting land one after
   the other instead of together. It is capped at 11 in home.js: past a dozen
   the stagger stops reading as sequence and starts reading as lag.

   `backwards` matters — without it the chip paints in its final position for
   one frame before the delay elapses, which is the flicker this is here to
   avoid. Motion-off learners get no class at all (home.js checks first), so
   there is nothing to unwind here; the reduced-motion block below is the
   second belt, for a chip already on screen when the OS preference changes. */
@keyframes shelfSettle{
  from{ opacity:0; transform:translateY(-10px) scale(.94); }
  60%{ opacity:1; transform:translateY(2px) scale(1.01); }
  to{ opacity:1; transform:none; }
}
.shelf-chip.settling{ animation:shelfSettle .52s cubic-bezier(.22,.9,.3,1) backwards;
  animation-delay:calc(var(--i, 0) * 70ms); }
@media (prefers-reduced-motion: reduce){
  .shelf-chip.settling{ animation:none; }
  .shelf-chip:hover{ transform:none; }
}

/* The offer behind a chip — one line and one button, inside the shared quest
   popup, so it inherits that dialog's focus trap rather than growing another. */
.sp-line{ margin:0 0 16px; font-size:15px; line-height:1.5; color:var(--ink); }


/* ------------------------- placeholder (later phases) --------------------- */
.stub{ text-align:center; padding:56px 20px; color:var(--muted); max-width:520px; margin:6vh auto 0; }
.stub .display{ font-size:26px; color:var(--ink); margin-bottom:8px; }
/* pre-line so the stub body can be written as paragraphs — it is set with
   textContent (never innerHTML), so the copy cannot carry markup. */
.stub p{ white-space:pre-line; line-height:1.62; text-align:left; }
.stub-icon{ width:52px; height:52px; margin:0 auto 18px; color:var(--accent); } .stub-icon svg{ width:100%; height:100%; stroke:currentColor; fill:none; }
.stub .btn{ margin-top:22px; }
@media (max-width:560px){ .landing-cards{ grid-template-columns:1fr; } .landing-hi{ font-size:28px; }
  /* The shelf keeps its horizon on a phone but loses a step of scale —
     the chips already wrap, so only the headline needs the room. */
  .shelf{ margin-top:30px; padding-top:20px; }
  .shelf-count{ font-size:28px; } .shelf-lead{ font-size:14px; }
  .shelf-chip{ font-size:13px; padding:8px 12px; } }

/* ----------------------------------- map ---------------------------------- */
.glass{ position:relative; background:var(--glass-bg); border:1px solid var(--glass-border); box-shadow:var(--glass-shadow);
  backdrop-filter:blur(18px) saturate(160%); -webkit-backdrop-filter:blur(18px) saturate(160%); }
/* ---- the world header: title, purpose and key, all of them sticky --------
   Halfway down Number a learner has scrolled past the title and the purpose
   line, and the tiles below are coloured shapes with no key to them. All three
   therefore stick, beneath the topbar, with the topbar's own translucent blur
   so the map reads as passing BEHIND rather than being covered by a slab.

   z-index 15 is deliberate and sits between two numbers that already exist:
   above the tiles (10) and the selected tile (30 — which is why the header
   also has a solid-enough wash), and BELOW .topbar's 20, or the world header
   would slide over the theme switcher.

   --world-head-h is written back by openMap from the rendered height, because
   the header's height depends on how many rows the legend wraps to, which
   depends on the viewport. Nothing may hard-code it: at 390 the legend takes
   two rows where at 1440 it takes one. */
/* OPAQUE, and this is a deliberate departure from the topbar's glass — the
   plan asked for "the same blur treatment so the map reads as passing behind",
   and it was tried twice on the rendered page before being rejected:

     86% + blur(8px)   (the topbar's own recipe) — the keyring band underneath
                       is 13.5px text, the same size as the key's labels, and
                       the two read straight through each other. At 390 the
                       title "Number world" sat on top of "…the way into this
                       world" and both were legible.
     96% + blur(14px)  better, but blur SPREADS the keyring's gold rather than
                       removing it: a bright smudge under dark-purple text, and
                       still readable in places.

   Glass works on the topbar because what passes under it is large and
   low-detail. What passes under THIS is prose. Overlapping text is a defect,
   not a soft edge, so the header is solid and the "passing behind" reading is
   carried by the tiles sliding under its bottom edge instead.

   TWO measurements make it actually cover what it sits over, and both were
   wrong the first time:

   - `top` reads --topbar-real-h, NOT the --topbar-h token. The token is 74px
     and documented as deliberately overshooting; the Quest topbar carries no
     .btn and renders at 65. Sticking at 74 left a NINE-PIXEL BAND of the map
     scrolling past above the header, in full view. The token is still right for
     scroll-margin, where overshooting is the safe direction — it is only wrong
     as a position.
   - the background bleeds to the edges of the canvas while the text stays in
     the 1000px reading column, so the header reads as a bar across the screen
     rather than a rectangle floating in the middle of one. */
/* X5 (the founder's pick, 22 Nov 2026): ON THE MAP THE TOP BAR IS SOLID. Its glass (86%
   of the page colour and a blur, shell.css) is the founder's look elsewhere, but a lit stop
   sliding under it on the map showed through as a bright smudge. At rest it looks the
   same; every other screen keeps the glass. The pattern is kit.css's for the tutor. */
.canvas:has(#view-map.active) .topbar{ background-color:var(--paper);
  -webkit-backdrop-filter:none; backdrop-filter:none; }
.world-head{ position:sticky; top:var(--topbar-real-h, var(--topbar-h)); z-index:15;
  padding:10px 0 9px; margin-bottom:2px;
  background:var(--paper); border-bottom:1px solid var(--line);
  box-shadow:0 6px 14px -12px rgba(0,0,0,.6); }
/* The full-bleed: a painted band reaching the edges of the canvas, so the
   header reads as a bar across the screen rather than a rectangle floating in
   the middle of one, and nothing can slide past in the margins either side.

   --head-bleed is MEASURED (openMap writes it), not 100vw. 100vw is the obvious
   way to do this and it is wrong here: it includes the width of a classic
   scrollbar, so on any platform that reserves one the band is wider than the
   page and the whole app grows a horizontal scrollbar. The measurement is the
   distance from the reading column's edge to the canvas's, which is what we
   actually want to cover, and it is re-taken on resize. */
.world-head::before{ content:""; position:absolute; z-index:-1;
  top:0; bottom:0; left:calc(-1 * var(--head-bleed, 0px)); right:calc(-1 * var(--head-bleed, 0px));
  background:var(--paper); border-bottom:1px solid var(--line); }
.map-head{ display:flex; align-items:baseline; flex-wrap:wrap; gap:4px 16px; margin-bottom:4px; }
.map-title{ font-size:24px; font-weight:400; margin:0; color:var(--w, var(--ink)); transition:color .4s ease; }
/* The purpose line sits beside the name at the title's own size (founder
   2026-08-22) — the sentence gets the same billing as the name. The ink stays
   quieter than the world-coloured title so the pair reads name-then-sentence. */
.map-head .map-hint{ flex:1 1 260px; font-size:24px; font-weight:400; margin:0; line-height:1.2;
  color:var(--ink); }
.map-count{ margin-left:auto; }
.map-count{ font-size:13px; color:var(--muted); white-space:nowrap; }
.map-hint{ color:var(--muted); font-size:13.5px; margin:0 0 8px; }

/* ---- the key ------------------------------------------------------------
   Five real tiles, not five hand-painted swatches. Each carries the SAME
   .node state classes the map emits, so the key is correct in all three
   themes for free — including the white theme's separate ink-density
   renderer further down this file, which a second set of rules would have
   silently got wrong the first time anyone changed a tile.

   They live OUTSIDE #mapPath, which is not incidental: eight browser tests
   count, index and click `#mapPath .node`, and a key rendered inside the path
   would be the tile they found first.

   The swatches are aria-hidden and untappable — the label beside each one
   carries the meaning, and a key is a legend, not a set of controls. */
.map-legend{ display:flex; flex-wrap:wrap; align-items:center; gap:6px 16px; }
.lg-item{ display:inline-flex; align-items:center; gap:7px; font-size:12px; color:var(--muted); line-height:1.3; }
/* The key's samples are REAL .node elements painted by the SAME function
   as the tiles (paintTile — founder 2026-08-25, item 4g), so the key can
   never drift from the map again: state paint (fill, ring, glow, ink
   density on the white theme) comes from the .node rules and NOWHERE else.
   Only LAYOUT is overridden here — on the map a tile is absolutely placed
   by the geometry; in the key it is an inline 22px box. The one scaled
   exception: .cur's target ring, which at full size would be most of a
   22px swatch — the ring stays the tile's object, only its radii shrink
   (and its white-theme variant follows the tile's). Samples are excluded
   from every tile query via .legend-sample (contract-pinned in
   tests/contracts/test_home_shell_contracts.py). */
/* 32 x 22, wider than tall like the picture stops they stand for (b, 22 Nov 2026). The
   radius is set only where the sample is not the ellipse of start here (.node.cur). */
.map-legend .node.legend-sample{ position:static; transform:none; width:32px; height:22px;
  flex:0 0 auto; margin:0; cursor:default; pointer-events:none; }
.map-legend .node.legend-sample:not(.cur){ border-radius:7px; }
.map-legend .node.legend-sample svg{ width:13px; height:13px; }
.map-legend .node.legend-sample.cur{ box-shadow:inset 0 1px 0 rgba(255,255,255,.22),
  0 0 0 2px var(--paper), 0 0 0 4px color-mix(in srgb, var(--nc) 75%, transparent);
  margin-right:4px; }
.map-legend .node.legend-sample.n-done{ margin-right:2px; }
:root[data-theme="white"] .map-legend .node.legend-sample.cur{
  box-shadow:inset 0 1px 0 rgba(255,255,255,.5),
    0 0 0 2px var(--paper), 0 0 0 4px color-mix(in srgb, var(--nc) 80%, var(--surface)); }
@media (max-width:640px){
  /* THREE columns, not two, and the reason is the phone's height budget. The
     header is permanently sticky, so every row it takes is a row of map the
     learner never gets back: two columns made five items three rows and put
     the chrome at 230px of an 844px screen — a quarter, against the fifth the
     founder signed up for. Three columns is two rows and 194px.
     A ragged flex wrap was worse than either: five labels of unequal length
     staircase, and the eye stops reading a key that does not line up. */
  .map-legend{ display:grid; grid-template-columns:repeat(3, 1fr); gap:5px 8px; }
  .lg-item{ font-size:11px; gap:5px; }
  .map-legend .node.legend-sample{ width:26px; height:18px; }
  .map-legend .node.legend-sample:not(.cur){ border-radius:6px; }
  .map-legend .node.legend-sample svg{ width:11px; height:11px; }
  .map-hint{ margin:0 0 7px; }
}
/* The map is the whole width now. It used to be `1fr 288px`, with the topic
   detail docked in the right-hand column — see .topic-overlay below for what
   replaced it and what that cost. */
.map-grid{ display:grid; grid-template-columns:1fr; gap:24px; align-items:start; }
.map-main{ min-width:0; }
.path-wrap{ overflow-x:auto; padding-top:6px; }
/* THE CONTAINER MUST NEVER TAKE A CLICK MEANT FOR A TILE.
   `.path` is pure layout — it positions the connector, the stage rules, the
   node labels, the avatar and the tiles, and every one of those EXCEPT the
   tiles already declares `pointer-events:none` below. The container had no
   such rule, so it was the one thing left that could win a hit test at a
   tile's own centre, and on CI it did: `ui-smoke` failed ~12 map-tile tests on
   roughly one run in two with "<div class="path"> intercepts pointer events",
   on any commit including the trunk, for long enough to be written off as a
   flake.
   Nothing on the container is interactive — there is no listener on it or on
   its host, and each tile carries its own `onclick` rather than relying on
   delegation — so excluding it from hit testing cannot cost anything. Events
   from the tiles still bubble through it, because `pointer-events` governs
   hit testing, not propagation. */
.path{ position:relative; width:440px; margin:0 auto; pointer-events:none; }
.path .node{ pointer-events:auto; }
.path svg.conn{ position:absolute; top:0; left:0; overflow:visible; pointer-events:none; z-index:1; }
/* The ground of a stop that is not filled is the plain surface (it was a 15% tint of the
   world's colour), so the topic's picture on it reads in grey or in colour (b, 22 Nov 2026). */
.node{ position:absolute; transform:translate(-50%,-50%); border:2px solid var(--nc,transparent); border-radius:15px; background-clip:padding-box;
  background:var(--surface);
  display:grid; place-items:center; cursor:pointer; padding:0; font-family:"Poppins",sans-serif; font-weight:700; font-size:17px; line-height:1; z-index:10;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18); transition:transform .16s ease, box-shadow .16s ease;
  /* Opening a world scrolls to the tile it lands on, and there are now two
     sticky bars above it. shell.css:125 documents this exact trap for the
     topbar; the world header stacks a second one under it, so the offset has
     to carry both. --world-head-h is measured and written back by openMap —
     the header is taller on a phone, where the key wraps to two rows.
     The fallback matters: before the first measurement the property is unset,
     and 96px is the desktop height, which errs toward scrolling slightly far
     rather than leaving the tile behind the bar. */
  scroll-margin-top:calc(var(--topbar-h) + var(--world-head-h, 96px) + 12px); }
/* The world icons replaced the text glyphs ("12", "x", "P"), so a tile now
   carries a drawing rather than a character: bigger, and far lighter. 2.4 was
   right for a two-stroke tick; at that weight the abacus rails and the die's
   pips close up. The tick keeps a heavier stroke below — it is a status mark,
   not an illustration. */
/* `> svg`: the glyph a key sample carries. A stop's picture and badge are each inside
   their own span and keep their own drawing (b, 22 Nov 2026). */
.node > svg{ width:29px; height:29px; stroke:currentColor; fill:none; stroke-width:1.35;
  stroke-linecap:round; stroke-linejoin:round; }
.node.n-done > svg{ stroke-width:1.9; }
.node:hover{ filter:brightness(1.06); }

/* ---- THE PICTURE STOPS (the founder's pick b, 22 Nov 2026: "every stop shows its topic")
   Each stop carries the picture its topic already has in the topic panel (figures.js),
   cropped to what it draws (QuestMap.fitPictures), so a stop is known at a glance before
   its name is read, and the finished stretch reads as things now known rather than twenty
   identical ticks. The STATE is said by the card and by how the picture is printed:
     finished       the world's colour, solid; the picture in dark ink; a tick badge
     start here     gold, an ellipse with the target ring; the picture in dark ink
     ready          the plain card; the picture in grey, in colour once worked on
     one step away  dashed; the picture faint; a key badge
     further along  the plain card; the picture fainter still
   LIGHT ONLY GROWS here too: in every state a lit picture is at least as strong as an
   unlit one, and out in the quiet half it grows within the quiet (.30, .50, .60) rather
   than out-shouting the stops one topic away. Light on the card itself is unchanged: the
   glow on Purple and Black, ink density on Light (below). */
/* On Light the grey is DARKENED, not lightened: the pictures' colours are made for dark
   grounds, and plain grayscale left a ready stop's picture about 1.8:1 on white (the
   reviewer's find, seen on the phone picture). brightness(.55) brings it to about 3.7:1. */
.path{ --fig-grey:grayscale(1) brightness(1.7); --fig-quiet:grayscale(1) brightness(1.5); }
:root[data-theme="white"] .path{ --fig-grey:grayscale(1) brightness(.55); --fig-quiet:grayscale(1) brightness(.55); }
/* Placed on the card's own box (the stop is position:absolute, so it is the containing
   block), 84% x 78% of it: a percentage HEIGHT inside the stop's grid did not resolve, and
   a tall cropped picture (a column sum) grew past the card's bottom on the rendered page. */
.node-fig{ position:absolute; left:8%; right:8%; top:11%; bottom:11%;
  display:flex; align-items:center; justify-content:center;
  pointer-events:none; filter:var(--fig-grey); opacity:.8; }
/* overflow visible: a crop measured a pixel short must not cut a digit off; the box itself is
   held to the card above, so nothing grows past it any more. */
.node-fig svg{ display:block; width:100%; height:100%; overflow:visible; }
.node.n-soon .node-fig{ filter:var(--fig-quiet); opacity:.45; }
.node.n-far .node-fig{ filter:var(--fig-quiet); opacity:.3; }
.node.lit1 .node-fig, .node.lit2 .node-fig{ filter:none; opacity:.95; }
.node.n-soon.lit1 .node-fig, .node.n-far.lit1 .node-fig{ filter:var(--fig-quiet); opacity:.5; }
.node.n-soon.lit2 .node-fig, .node.n-far.lit2 .node-fig{ filter:none; opacity:.6; }
/* On a filled stop the picture is printed in dark ink: brightness(0) is black, and at .78
   over the world's colour it is a deep shade of that colour (5:1 and more on all six). */
.node.n-done .node-fig, .node.cur .node-fig{ filter:brightness(0); opacity:.78; }
/* Start here is an ellipse; the picture keeps inside its curve. */
.node.cur .node-fig{ left:15%; right:15%; top:17%; bottom:17%; }
/* The badge: the mark that was the tile's whole face, now at its corner. On a finished
   stop it is the tick in the world's colour on the deep purple (the pair
   tests/contracts/test_map_tile_contrast.py measures, the other way round); on an
   about-to-open stop the key in the world's colour on the stop's own ground. */
/* -6px: on a SELECTED stop (scale 1.16) the badge's edge then stays 2px clear of the name and
   of the avatar beside it (QuestMap's STOP.GAP is 18); at -8px it touched a three-line name. */
.node-badge{ position:absolute; top:-6px; right:-6px; width:22px; height:22px; border-radius:50%;
  display:flex; align-items:center; justify-content:center; pointer-events:none;
  background:currentColor; box-shadow:0 0 0 2px var(--nc); }
.node-badge svg{ width:13px; height:13px; fill:none; stroke:var(--nc); stroke-width:3.4;
  stroke-linecap:round; stroke-linejoin:round; }
.node.n-soon .node-badge{ background:var(--surface); box-shadow:0 0 0 1.5px var(--nc); }
.node.n-soon .node-badge svg{ width:14px; height:14px; stroke-width:2.2; }

/* ---- the locked half of the map: a horizon, not a wall -------------------
   A grey tile with a padlock on it is the visual language of "broken" and
   "forbidden", and a learner opening the Number world met 24 of them in a
   single chapter. There is no padlock on the map any more. Two states replace
   it, and the tile stays tappable in both — the detail panel still names the
   exact topic that opens it, and the lock stays in the accessible label so it
   is never carried by colour alone.
   --------------------------------------------------------------------- */
/* ABOUT TO OPEN — one topic, startable today, stands in the way. A dashed ring
   in the world's colour and a key. Scarce by construction (25 tiles of 193). */
.node.n-soon{ border-style:dashed; }
/* Everything further out: keeps its shape and its label, carries no icon, and
   simply sits further down the road. */
/* CP9: Higher-only on a Foundation learner's map — quieter and dashed, never gone.
   QUIET BY ITS PICTURE AND ITS FILL, NOT BY SEE-THROUGH (22 Nov 2026, with X2 below): a
   see-through stop let the road show through it. The carer's .qm-node keeps its opacity. */
.qm-node.oot{ opacity:.35; border-style:dashed; filter:saturate(.4); }
.node.oot{ border-style:dashed; filter:saturate(.4); }
.node.oot .node-fig{ opacity:.35; }
.node.oot.n-done{ background:color-mix(in srgb, var(--nc) 55%, var(--surface)); }
/* X2 (the founder's pick, 22 Nov 2026): A SOLID GROUND, so the road stops at the edge of a
   stop ahead and goes on from its other side. These stops were see-through (opacity .5),
   and the dotted road ran across them. They stay quiet by their faint outline and their
   faint picture (above) instead.
   Light still grows out here — a topic the learner has spent time on is marked
   wherever it sits, which is what makes scrolling back up a world
   autobiographical. But it grows WITHIN the quiet half rather than out of it:
   at full strength a worked-on tile forty rows down out-shouted the handful of
   tiles that are actually one topic away, which inverts what the screen is for.
   Still monotonic, which is the rule that matters: its picture goes .30 → .50 → .60
   (the picture rules above), never back. */
.node.n-far{ border-color:color-mix(in srgb, var(--ink) 22%, transparent); }
/* And the ground reaches under the stop's own edge: with the background clipped to the
   padding, the road still showed through a see-through 2px outline (a far stop's) and
   through the gaps of a dashed one (a stop one step away). A filled stop keeps its clip:
   its transparent border is the gap that sets the fill off from its halo. */
.node:not(.n-done):not(.cur){ background-clip:border-box; }

/* UNMAPPED — before the first check-in every tile renders this same quiet
   outline: no ready/locked split, no keys, no light (home.js preDiagnostic).
   Quieter than ready, more present than far: a road not yet surveyed. Solid like
   every stop since X2; its picture is the ready grey. */
.node.n-pre{ border-color:color-mix(in srgb, var(--nc) 55%, transparent); }
.node.n-pre .node-fig{ opacity:.6; }

/* The pre-check-in banner that takes the legend's slot (renderLegend). */
.lg-pre{ font-size:13px; color:var(--muted); line-height:1.45; max-width:52ch; }
.map-legend .lg-pre-go{ padding:7px 14px; font-size:13px; flex:0 0 auto; }

/* ---- LIGHT: what the learner's own work has lit up ----------------------
   Settled 2026-07-29 after six vocabularies were compared side by side. Unlit
   ahead, a faint glow where they have worked, full light where they have
   mastered. The glow is the WORLD's colour (--w on the path), not the tile's,
   so the three levels read as one signal across every tile state.

   It only ever grows. Level 1 reads attempt counts and level 2 reads a stored
   high-water mark, so a mastery estimate revised downward dims nothing: a
   learner coming back after a fortnight away — often a placement move — never
   finds a darker map than the one they left.
   --------------------------------------------------------------------- */
.node.lit1{ box-shadow:inset 0 1px 0 rgba(255,255,255,.18),
  0 0 13px -3px color-mix(in srgb, var(--w, var(--accent)) 55%, transparent); }
.node.lit2{ box-shadow:inset 0 1px 0 rgba(255,255,255,.22),
  0 0 22px -4px color-mix(in srgb, var(--w, var(--accent)) 85%, transparent); }

/* SOLID — the world's OWN colour, filled, with a halo. Ready tiles are tinted
   (15% of --nc); a mastered one is the colour itself, so the two differ in form
   as well as hue. The halo is the founder's pick over a flat fill. lit2's glow
   is repeated here rather than inherited: same property, later rule wins, and
   dropping it would take the light off every mastered tile. */
.node.n-done{ background:var(--nc); border-color:transparent;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22),
    0 0 0 3px color-mix(in srgb, var(--nc) 34%, transparent),
    0 0 22px -4px color-mix(in srgb, var(--w, var(--accent)) 85%, transparent); }

/* START HERE — the loudest thing on the map, and it has to be, because it is
   the only tile that answers "what do I do now".

   It is FILLED, and that is a correctness fix rather than a restyle. The tile
   renderer paints this one gold with MAP_ON_WORLD ink — deep purple — which is
   the right ink for a filled tile (8.60:1 on the gold) and the wrong one for a
   tinted tile. It was tinted: 15% gold over the dark surface, with deep purple
   on top, measured at 1.18:1 on the rendered page. The icon was invisible, and
   the tile a learner is meant to start from read as an empty ring. It had never
   been seen: `isCur` needs an unmastered recommendation, and across the whole
   demo cohort only four learners have one, all of them in Algebra.

   Then a TARGET RING — a gap in the page colour and a second ring outside it —
   so the tile reads as marked rather than merely bright. In Number that is what
   separates it from a solid tile: the world's own colour IS this gold, so hue
   cannot do the work, and the shape difference (a circle among rounded squares)
   plus the ring plus the icon-not-tick are the three things that can. */
.node.cur{ background:var(--nc); border-color:transparent;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22),
    0 0 0 3px var(--paper),
    0 0 0 6px color-mix(in srgb, var(--nc) 75%, transparent),
    0 0 26px -2px color-mix(in srgb, var(--nc) 80%, transparent); }
/* A circle while stops were square; on a card wider than tall the same 50% is an ellipse,
   still the one stop whose shape differs from every other (b, 22 Nov 2026). */
.node.cur{ border-radius:50%; }

/* ---- PARTIAL PROGRESS: how far into this topic they have ever got ---------
   A third layer, orthogonal to both the others: `kind` is what to do next,
   `lit*` is what has been earned, and this is how far in. Without it a topic
   worked for twenty minutes that did not reach mastery drew identically to one
   never opened, because the action layer has no value between "available" and
   "mastered".

   Fed by --np from the server's best_understanding high-water mark, so it only
   ever grows. It follows the tile's own shape (border-radius:inherit), which
   also gets the recommended tile's circle right for free.

   Drawn ONLY on a tile the learner can start today — see the note in home.js
   for why a locked tile reading "98% of the way in" was a worse sentence than
   silence.

   The ring is a conic-gradient with its middle masked out. Gated behind
   @supports: where the mask does not apply the gradient would paint as a
   filled shape covering the tile, so a browser that cannot draw the ring gets
   NO ring — the percentage is in the tile's accessible name either way. */
@supports ((mask-composite: exclude) or (-webkit-mask-composite: xor)) {
  .node.has-arc::after{
    content:""; position:absolute; inset:-5px; border-radius:inherit;
    pointer-events:none; padding:3px;
    background:conic-gradient(from -90deg,
      var(--nc, var(--accent)) 0 var(--np,0%), transparent var(--np,0%) 100%);
    -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite:xor;
    mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite:exclude;
  }
  /* The recommended tile already wears a two-ring halo out to 6px (.node.cur
     above). The arc has to clear it, or the "do this next" marker and the
     progress reading sit on top of each other on the one tile a learner is
     most likely to be looking at. */
  .node.cur.has-arc::after{ inset:-11px; }
}
/* 12, NOT 30 — and the number matters, so here is the whole stack in one place:
   stage rule 5, label 6, avatar 8, tile 10, SELECTED TILE 12, world header 15,
   topbar 20, rail 200.

   A selected tile only has to beat its own neighbours and the label and figure
   beside it, because it is scaled up and would otherwise be overlapped by them.
   At 30 it also beat the sticky world header: scrolling a world made ONE tile —
   the selected one, which is the tile a learner is most likely to be looking at
   — slide over the top of the title and the key while every other tile passed
   correctly behind. Reported from the running demo, 2026-08-02.

   Anything added to the map from here goes below 15 or it will do the same. */
.node.sel{ transform:translate(-50%,-50%) scale(1.16); z-index:12;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.26), 0 0 0 4px color-mix(in srgb, var(--nc,var(--accent)) 32%, transparent); }
/* START HERE stays marked when it is the selected stop, which it is whenever a world opens on
   it: `.node.sel` above (0,2,0, later) replaced the target ring of `.node.cur` (0,2,0), and in
   Number, whose colour is the gold, the ring is half of what tells it from a finished stop.
   The scale says "selected"; the ring stays. Light's own rule already outranks both. */
.node.cur.sel{ box-shadow:inset 0 1px 0 rgba(255,255,255,.26),
  0 0 0 3px var(--paper),
  0 0 0 6px color-mix(in srgb, var(--nc) 75%, transparent),
  0 0 26px -2px color-mix(in srgb, var(--nc) 80%, transparent); }

/* A PRESS MUST NOT MOVE THE TILE OUT FROM UNDER THE POINTER.

   branding.css `button:not(:disabled):active{transform:scale(0.98)}` has
   specificity (0,2,1) and so outranks both `.node` (0,1,0) and `.node.sel`
   (0,2,0). `transform` REPLACES rather than composes, so pressing a tile used
   to drop its `translate(-50%,-50%)` — and because home-map.js puts a tile's
   `left`/`top` at its CENTRE, losing that translate threw the box 27px down
   and right, off the pointer that was pressing it. The press point then sat in
   the rounded-off corner (border-radius:13px, ~5.4px of clearance), the click
   was delivered to `div.chapter-body` behind the tile, and the topic dialog
   never opened. Measured on CI 2026-09-20 (run 35539162240): a tile pressed at
   [775, 525.8] reported its rect as [775.5, 526.3, 52.9, 52.9].

   NOT a reduce-motion-only fault, though that is how CI found it. `.node` has
   `transition:transform .16s ease`, so with motion on the tile SLIDES away
   instead of jumping and any press held past ~110ms misses too — inside the
   ordinary 80-150ms of a human click. `:root[data-motion="off"]` (shell.css)
   zeroes the transition, which is what made it fire on every attempt in CI.

   (0,3,0) and (0,4,0) beat branding's (0,2,1) on the class column, so neither
   of these depends on sheet order. `:not(:disabled)` is load-bearing, not
   decoration: the legend key samples are these same `.node` buttons, disabled
   (home-map.js) and deliberately un-translated by `.map-legend
   .node.legend-sample` (also (0,3,0)) — without it a pressed legend sample
   would tie that rule and take a translate it must not have.

   Pinned by tests/playwright/test_map_tile_press.py. */
.node:not(:disabled):active{ transform:translate(-50%,-50%) scale(0.98); }
.node.sel:not(:disabled):active{ transform:translate(-50%,-50%) scale(1.16) scale(0.98); }

/* THE LEARNER, ON THEIR OWN MAP — the "you are here" marker, standing beside
   the tile the world opened on. Below the tiles and above the connector, and
   never in the way of a tap. aria-hidden: the fact rides on the tile's own
   accessible name instead, where a screen reader will actually meet it. */
/* The figure WALKS: it follows the topic the learner opens and returns to the
   landing tile when they close it. Transitioning left/top rather than
   re-rendering keeps it to one animation while the dialog runs its own.
   No prefers-reduced-motion block here on purpose — shell.css already
   neutralises every transition under both the media query and the persisted
   data-motion="off" preference, and a local copy would be a second place to
   forget. */
.map-me{ position:absolute; transform:translateY(-50%); pointer-events:none; z-index:8;
  transition:left .28s ease, top .28s ease; }
.map-me[hidden]{ display:none; }
.map-me svg{ display:block; }
/* ON PURPLE AND BLACK THE FIGURE STANDING ON THE MAP GETS A THIN LIGHT EDGE (avatar round,
   19 Nov 2026, repair 9). Its ink outline, dark hair and the darkest skin measured 1.01 to
   1.18 against the purple page (F1): the figure dissolved. The edge is the text colour,
   drawn twice at 0.8 px. On white the outline already stands out, so the edge is not drawn. */
:root:not([data-theme="white"]) .map-me svg{
  filter:drop-shadow(0 0 .8px var(--ink)) drop-shadow(0 0 .8px var(--ink)); }

/* ---- stage rules: where you are between starting out and GCSE ------------
   The path is already in year order, so each of these is one insertion point.
   A thin labelled rule, drawn only where a path genuinely crosses from one
   stage into the next — a single rule above a whole chapter would say nothing
   the chapter header cannot, so those are named in the header instead. */
/* SIGNS ON THE ROAD (the founder's pick S, 22 Nov 2026). The thin rule with a faint word
   in it became a sign: a flag, the stage's name and "N of M mastered" for its stretch
   (home-map.js buildPath). It stands on its own ground, so the road passes BEHIND the
   words (X3): the words were knocked out of the road only by a text-shadow, and the road
   still ran through "BUILDING UP" and "GCSE LEVEL" on the rendered page. --wline is the
   world's token, the darker colour on Light (X6). */
.stage-rule{ position:absolute; left:0; right:0; height:0; display:flex; align-items:center; justify-content:center; pointer-events:none; z-index:5; }
.stage-sign{ display:inline-flex; align-items:center; gap:9px; padding:6px 15px 6px 11px; border-radius:999px;
  background:var(--paper); border:1.5px solid color-mix(in srgb, var(--wline, var(--line)) 55%, transparent);
  color:var(--ink); white-space:nowrap; }
.stage-sign svg{ flex:none; width:15px; height:15px; fill:none; stroke:var(--wline, var(--muted)); stroke-width:2;
  stroke-linejoin:round; stroke-linecap:round; }
.stage-label{ font-size:11px; font-weight:700; letter-spacing:.09em; text-transform:uppercase; color:var(--ink); }
.stage-count{ font-size:12.5px; color:var(--muted); }
/* The smallest phones (320px): the longest sign, "THE FOUNDATIONS 21 of 24 mastered", was a
   few pixels wider than the road's box; tighter spacing keeps it inside. */
@media (max-width:360px){
  .stage-sign{ gap:6px; padding:5px 10px 5px 8px; }
  .stage-label{ letter-spacing:.05em; }
  .stage-count{ font-size:12px; }
}
/* On its own line under the chapter's name (X4, 22 Nov 2026): "GCSE LEVEL" split over two
   lines when it ran on after a long name in a narrow card. */
.chapter-stage{ display:block; margin:3px 0 0; white-space:nowrap; font-family:"Poppins",sans-serif; font-size:10px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--faint); }

/* THE TRAIL AND THE WORLD STRIP LEFT WITH C+D (founder decision 2026-08-27).
   `.landing-trail`, `.jt-*` (the winding road, its gold overlay, the
   here-station and its go button) and `.land-worlds` / `.lw-*` (the six-tile
   map-at-a-glance) are gone WITH their markup and renderers, rather than left
   dead. See home/index.html for the decision, what it supersedes, and why the
   product loses nothing: every world is a rail item, and the landing carries
   "See the whole map".
   NB `.chapter-head:focus-visible` was declared inside that block and is NOT
   dead — the chapter cards live on the world page — so it is kept here. */
.chapter-head:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
/* C's QUIETING (same decision): everything that is not the trail or the
   strip drops half a step — the cards become compact rows, the quest chips
   sit low-contrast until attention, the invitation line shrinks. Every id
   is unchanged: the contracts pin that XP, days and quests REACH a learner,
   and they still do — at lower volume. */
.landing-cards{ gap:12px; margin-bottom:14px; }
/* QUIETING WITHOUT OPACITY (verifier find, 2026-08-25): a 0.72 opacity on
   the quest chips dragged their text to 1.74-3.35:1 on the white theme —
   un-doing the AA raises shell.css records making for exactly these
   surfaces, with no restore path on touch. The quests stay quiet by SIZE
   and CHROME, never by fading the words a learner needs to read. */
/* X1 (the founder's pick, 22 Nov 2026): room for the names. 13px, where 11.5px in a 94px
   box ran 16 of Number's first 40 names to three or four lines; the box is as wide as the
   road's room allows (QuestMap's picture geometry, up to 150px on a computer). A stop the
   learner can start has its name in full ink (nl-<kind>, home-map.js); the others keep
   the quieter --muted. */
.node-label{ position:absolute; font-size:13px; font-weight:600; color:var(--muted); pointer-events:none; line-height:1.2; z-index:6;
  text-shadow:0 0 5px var(--paper), 0 0 5px var(--paper), 0 0 3px var(--paper); }
/* "Where you can start the topic" (the page's words for X1): ready and start here. A stop
   one step away cannot be started yet, so its name stays --muted. */
.node-label.nl-open, .node-label.nl-cur{ color:var(--ink); }
/* ---- light on the WHITE theme: a second renderer, not a second metaphor ---
   Glow on a white ground reads as smudge, not as achievement. The same three
   levels therefore render as INK DENSITY here — a deepening tint of the world's
   colour and a firmer edge — so a learner switching background sees the same
   progress said a different way, rather than a dirty screen.

   This is why the tile's background moved out of inline JS and into these
   classes: an inline background wins over any theme rule, and there would have
   been nowhere for a second renderer to live. */
/* 12% and 24% since the picture stops (22 Nov 2026; 22% and 42% before): the topic's
   picture, in colour once a stop is worked on, sits on this tint and must still read. */
:root[data-theme="white"] .node.lit1{ box-shadow:inset 0 1px 0 rgba(255,255,255,.5);
  background:color-mix(in srgb, var(--w, var(--accent)) 12%, var(--surface)); }
:root[data-theme="white"] .node.lit2{ box-shadow:inset 0 1px 0 rgba(255,255,255,.5);
  background:color-mix(in srgb, var(--w, var(--accent)) 24%, var(--surface)); border-width:2.5px; }
/* SOLID, on the white ground. This rule has to exist: a mastered tile is always
   lit2, and `:root[data-theme="white"] .node.lit2` (0,4,0) outranks the plain
   `.node.n-done` (0,2,0) that paints the world's colour. Without it the solid
   tile silently kept the 42% ink tint and measured 1.12:1 against a ready tile
   on the rendered page — mastered and ready were the same tile in this theme.
   Same specificity as the lit2 rule, and after it, so it wins.
   The glow is NOT repeated here: on a white ground it reads as smudge, which is
   why this theme states progress as ink density. The halo becomes a firm ring in
   the world's own colour instead — the same idea said in ink. */
:root[data-theme="white"] .node.n-done{ background:var(--nc); border-color:transparent;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.5),
    0 0 0 3px color-mix(in srgb, var(--nc) 32%, var(--surface)); }
/* START HERE on the white ground, and it needs its own rule for exactly the
   reason the one above does: a recommended tile carries a light class too, and
   `:root[data-theme="white"] .node.lit1` (0,4,0) outranks `.node.cur` (0,2,0),
   so the fill would silently lose and the deep-purple icon would go back to
   being invisible. Same specificity, and after it. The glow drops — smudge on
   white — and the target ring carries the whole signal instead. */
:root[data-theme="white"] .node.cur{ background:var(--nc); border-color:transparent;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.5),
    0 0 0 3px var(--paper),
    0 0 0 6px color-mix(in srgb, var(--nc) 80%, var(--surface)); }

/* Unlit ahead on white: these stops were see-through (.42 to .8) until X2 gave every stop
   a solid ground (22 Nov 2026); they are quiet by their outline and picture now, and the
   white twin of the outline is the plain .node.n-far rule (nothing here outranks it). */

.gate-head{ font-size:10px; font-weight:700; letter-spacing:.09em; text-transform:uppercase; color:var(--goldtext); margin-bottom:5px; }
.gate-sub{ font-size:11.5px; color:var(--muted); }

/* chapter cards (founder pick 2A, 2026-08-22): the GCSE chunks lie flat as a
   horizontally-scrolling row of cards, each wearing its approved notation
   crest from crests.js; exactly ONE chapter opens at a time and its winding
   path renders below the row. Card order is the DfE's own — never re-sorted. */
.map-canvas{ position:relative; }
/* The single-block worlds' crest banner (their card-row stand-in): the
   approved emblem, quiet, above the legend and the path. */
/* CHAPTERS-FIRST (founder 2026-08-25, item 4e): until a chapter is chosen
   the cards ARE the canvas — a grid of big cards, crest and title at full
   billing. Choosing one collapses the grid to the compact row below and
   draws its path; tapping the open card closes it again. */
.chapter-row.hero{ display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr));
  gap:16px; overflow:visible; padding:6px 2px 14px; scroll-snap-type:none; }
.chapter-row.hero .chapter{ flex:none; }
.chapter-row.hero .chapter-head{ padding:18px; gap:12px; }
.chapter-row.hero .chapter-title{ font-size:19px; }
.chapter-row.hero .chapter-count{ font-size:13.5px; }
.chapters-hint{ margin:2px 0 10px; }
.quest-popup{ max-width:560px; width:calc(100vw - 48px); }
/* the dialog's own title already says it — the band's inner head would
   say it twice in a row to a screen reader */
.chapter-row{ display:flex; gap:12px; overflow-x:auto; padding:2px 2px 10px; margin-bottom:8px;
  scroll-snap-type:x proximity; -webkit-overflow-scrolling:touch; }
.chapter{ flex:0 0 172px; scroll-snap-align:start; border:1px solid var(--line); border-radius:16px;
  background:color-mix(in srgb, var(--surface) 55%, transparent); overflow:hidden; }
.chapter.open{ border-color:color-mix(in srgb, var(--w,var(--accent)) 62%, transparent);
  box-shadow:0 0 0 1px color-mix(in srgb, var(--w,var(--accent)) 62%, transparent); }
/* X4 (the founder's pick, 22 Nov 2026): ON A COMPUTER THE CARDS SHARE THE ROW. With the
   topic panel docked beside the map (901px and up, home-map.js DOCK_MQ) the row of 172px
   cards ran on under the panel: Algebra's fourth card showed only a "P". The cards now
   shrink to fit the map's column (four at most, Algebra's; 134px each in a 574px column),
   so none is hidden. On a phone the row still scrolls sideways at full size. */
/* Never below 116px (the reviewer's find): between 901 and about 1150px the column beside the
   panel is narrow, and four cards crushed to 72px clipped their names. There they WRAP onto a
   second row (two by two at 1024px) rather than scroll, because a card cut at the column's
   edge is the fault this fix is for. At 1440px all four still share one row. */
@media (min-width:901px){
  .chapter-row:not(.hero){ flex-wrap:wrap; overflow:visible; }
  .chapter-row:not(.hero) .chapter{ flex:1 1 116px; }
}
.chapter-head{ display:flex; flex-direction:column; align-items:stretch; gap:8px; width:100%; height:100%;
  text-align:left; border:none; background:none; color:inherit; font:inherit; cursor:pointer; padding:12px; }
.chapter-head:hover{ background:var(--accent-wash); }
.chapter-crest{ display:block; border-radius:10px; overflow:hidden;
  background:color-mix(in srgb, var(--w,var(--accent)) 8%, transparent); }
.chapter-crest svg{ display:block; width:100%; height:auto; }
.chapter-title{ min-width:0; font-family:"ITC Ronda","Poppins",sans-serif; font-size:14.5px; line-height:1.25; }
.chapter-count{ font-size:12px; color:var(--muted); white-space:nowrap; }
.chapter.done .chapter-count{ color:var(--goldtext); }
/* The milestone bar (founder pick 3D): a chapter that fills as it is worked,
   with quarter-way dots so "nearly there" is visible, and a kept ribbon once
   finished. All of it reads the world's own colour (--w, set on the map host). */
.chapter-bar{ position:relative; height:7px; border-radius:99px; background:var(--track); }
.chapter-bar i{ display:block; height:100%; border-radius:99px; background:var(--w,var(--accent)); }
.ms-dot{ position:absolute; top:50%; width:4px; height:4px; margin:-2px 0 0 -2px; border-radius:50%;
  background:color-mix(in srgb, var(--ink) 28%, transparent); }
.chapter-ribbon{ align-self:flex-start; font-size:10.5px; font-weight:700; letter-spacing:.06em;
  text-transform:uppercase; color:var(--w,var(--accent)); white-space:nowrap;
  border:1px solid color-mix(in srgb, var(--w,var(--accent)) 46%, transparent);
  background:color-mix(in srgb, var(--w,var(--accent)) 12%, transparent);
  border-radius:99px; padding:3px 9px; }
.chapter-body{ padding:2px 0 8px; }
.chapter-body .map-legend{ padding:4px 4px 10px; }
/* ---- the end of a world --------------------------------------------------
   Was a static card, identical in all six worlds, that never filled and never
   changed. Now it fills as the world does and becomes a kept ribbon when the
   world is finished — both read from the grow-only mark, so neither can undo
   itself. The completion state takes the world's own colour (--w). */
.world-gate{ text-align:center; border-radius:16px; padding:14px 20px; max-width:360px; margin:4px auto 0; }
.gate-bar{ height:7px; border-radius:99px; background:var(--track); overflow:hidden; margin:10px 0 8px; }
.gate-bar i{ display:block; height:100%; border-radius:99px; background:var(--w,var(--accent)); }
.world-gate.done{ border:1px solid color-mix(in srgb, var(--w,var(--accent)) 52%, transparent);
  background:color-mix(in srgb, var(--w,var(--accent)) 12%, transparent); }
.gate-ribbon{ display:grid; place-items:center; width:40px; height:40px; margin:0 auto 8px;
  border-radius:12px; background:var(--w,var(--accent)); color:var(--paper); }
/* Stroke-only icons with no fill attribute take SVG's default fill of BLACK —
   the same trap the old My progress world chips fell into, and it rendered both of these as a
   solid blob until it was looked at. */
.gate-ribbon svg{ width:22px; height:22px; stroke:currentColor; fill:none; stroke-width:1.5;
  stroke-linecap:round; stroke-linejoin:round; }
.world-gate.done .gate-head{ color:var(--w,var(--accent)); font-weight:700; }

/* The keepable half, on My progress. Only ever rendered when there is at least
   one — an empty "Worlds finished" shelf is a list of things you have not
   done, which is the wall-of-locked-tiers rule one level up. */
.cert-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:12px; }
.cert{ display:grid; place-items:center; gap:4px; text-align:center; padding:16px 14px;
  border-radius:16px; border:1px solid color-mix(in srgb, var(--w) 46%, transparent);
  background:color-mix(in srgb, var(--w) 10%, transparent); box-shadow:var(--shadow); }
.cert-ic{ display:grid; place-items:center; width:40px; height:40px; border-radius:12px;
  background:var(--w); color:var(--paper); }
.cert-ic svg{ width:22px; height:22px; stroke:currentColor; fill:none; stroke-width:1.5;
  stroke-linecap:round; stroke-linejoin:round; }
.cert-name{ font-weight:600; font-size:14px; color:var(--ink); }
.cert-sub{ font-size:12px; color:var(--muted); }

/* The map view gets an OPACITY-ONLY entrance, and that is load-bearing.
   `.view.active` (shell.css) is `animation: rise .35s ease both`, and `rise`
   animates `transform`. With fill-mode `both` the animation's value persists
   for good, so the element keeps a transform (an identity matrix — but not
   `none`). Any transform other than `none` makes an element the containing
   block for its `position: fixed` descendants.
   `.map-detail` was `position: fixed` INSIDE this view, to sit at the bottom of
   the SCREEN. With #view-map as the containing block it sat at the bottom of the
   winding path instead — measured at top:3881px (834px wide) and top:4000px
   (390px wide), entirely off-screen. On a phone or tablet that made the map's
   own "Learn" button unreachable: the most-travelled route into a lesson,
   silently dead.
   The topic dialog now lives OUTSIDE .app entirely, so that particular trap is
   gone — but the rule stays, because the trap is not: anything fixed that a
   later round puts inside this view would fall into it again, silently and only
   on a phone. Overriding only `animation-name` keeps shell.css's duration,
   easing and fill, so the entrance still reads the same.
   Pinned by test_home_shell_contracts.test_the_map_detail_panel_is_on_screen. */
#view-map.active{ animation-name:fade-in-only; }
@keyframes fade-in-only{ from{ opacity:0; } to{ opacity:1; } }

/* ---- the topic dialog ---------------------------------------------------- */
/* This was a 288px column docked to the right of the map, visible the whole
   time the map was open. It is now a centred dialog, opened by tapping a tile.
   THE TRADE-OFF, stated because it is real: on a wide screen the docked column
   let a learner see the map and the topic detail at once, and a centred dialog
   covers the map. That was chosen deliberately — the figure rendered ~226px
   wide in the column and renders ~512px here, and the figures now carry labels
   that have to be readable. The map gets the 288px back.

   It is a MODAL: user-initiated (never opened by the map itself), dismissable
   three ways, and it takes focus. A backdrop that dismisses on click is right
   precisely because the learner asked for it — the opposite of the unbidden
   overlay that ate a first tap on 2026-08-01.

   The scrim dims and does not blur: --z-modal (350) is the shell's own token
   for exactly this, above the rail (200) and the floating rail-open button
   (300), below the skip link (400). */
/* ---- L2 · MESSAGES FROM THE PERSON YOU LIVE WITH ------------------------
   Founder decision 2026-08-27 (design artifact bc50f76e): an envelope in the
   topbar with an unread dot, opening OVER the map, which keeps the screen.

   All of this is QUEST-ONLY FURNITURE and stays in home.css. The carer's half
   of the same conversation is a rail item and a page of its own, styled by
   shell.css's existing .nav-item .tag — two presentations of one channel, and
   neither is a copy of the other. tests/contracts/test_shell_layer.py fails if any
   selector here ever also appears in shell.css.

   THE CHANNEL IS UNMONITORED BY CONSTRUCTION (founder decision 2026-08-27), so
   there is deliberately no flag state, no "held" state and no refusal styling
   anywhere below: nothing in this channel is ever refused for its content.  */

/* The topbar pips (`.topbar-pip` / `.pip-label` / `.pip-dot`) are SHELL
   furniture, not Quest furniture — the carer topbar grew the same pair on
   2026-08-30 and a primitive on two screens belongs in one sheet. shell.css
   paints them, including the 380px rule that keeps the child's labels alive on
   a phone; nothing about them is redefined here. */

.chat-overlay{ position:fixed; inset:0; z-index:var(--z-modal, 350); display:grid; place-items:center;
  padding:20px; background:rgba(0,0,0,.5); }
.chat-overlay[hidden]{ display:none; }
.chat-panel{ display:flex; flex-direction:column; width:100%; max-width:460px; max-height:min(78vh, 620px);
  border-radius:20px; overflow:hidden; background:var(--surface); color:var(--ink);
  border:1px solid var(--line); box-shadow:var(--glass-shadow);
  transform:translateY(14px) scale(.98); opacity:0;
  transition:transform .22s cubic-bezier(.22,1,.36,1), opacity .18s ease; }
.chat-overlay.show .chat-panel{ transform:none; opacity:1; }

.chat-head{ display:flex; align-items:center; gap:12px; padding:14px 16px; border-bottom:1px solid var(--line); }
/* Twice the size it was (founder ask 2026-09-05). This is the one place a
   child sees the adult they live with on this platform, and at 38px it read as
   a favicon rather than as a person. */
.chat-face{ flex:0 0 auto; width:76px; height:76px; border-radius:50%; overflow:hidden;
  display:grid; place-items:center; font-weight:700; font-size:30px;
  background:var(--accent-wash); color:var(--ink); }
.chat-face svg{ width:100%; height:100%; }
.chat-head-text{ flex:1; min-width:0; display:flex; flex-direction:column; }
.chat-title{ font-weight:600; font-size:15px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chat-note{ font-size:11.5px; color:var(--muted); }
.chat-close{ flex:0 0 auto; width:32px; height:32px; display:grid; place-items:center; border:none;
  border-radius:50%; background:color-mix(in srgb, var(--ink) 10%, transparent); color:var(--ink); cursor:pointer; }
.chat-close svg{ width:15px; height:15px; }
.chat-close:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }

.chat-thread{ flex:1; min-height:120px; overflow-y:auto; -webkit-overflow-scrolling:touch;
  padding:16px; display:flex; flex-direction:column; gap:8px; }
.chat-empty{ margin:auto; max-width:30ch; text-align:center; font-size:13.5px; color:var(--muted); line-height:1.55; }
.chat-bub{ max-width:80%; padding:8px 12px; border-radius:16px; font-size:13.5px; line-height:1.5;
  white-space:pre-wrap; overflow-wrap:anywhere; }
.chat-bub.them{ align-self:flex-start; background:var(--accent-wash); color:var(--ink); border-bottom-left-radius:6px; }
.chat-bub.mine{ align-self:flex-end; background:var(--accent); color:var(--on-accent); border-bottom-right-radius:6px; }
.chat-when{ display:block; margin-top:2px; font-size:10px; opacity:.75; }

.chat-form{ display:flex; align-items:flex-end; gap:8px; padding:12px 16px; border-top:1px solid var(--line); }
.chat-input{ flex:1; min-width:0; resize:none; font:inherit; font-size:13.5px; line-height:1.45;
  max-height:120px; color:var(--ink); background:var(--paper); border:1px solid var(--line);
  border-radius:12px; padding:10px 12px; }
.chat-input:focus-visible{ outline:2px solid var(--accent); outline-offset:1px; }
.chat-send{ flex:0 0 auto; width:38px; height:38px; display:grid; place-items:center; border:none;
  border-radius:50%; background:var(--accent); color:var(--on-accent); cursor:pointer; }
.chat-send svg{ width:17px; height:17px; }
.chat-send:disabled{ opacity:.55; cursor:default; }
.chat-send:focus-visible{ outline:2px solid var(--ink); outline-offset:2px; }

/* ---- ITEM 16 · THE BOARD -------------------------------------------------
   HOME-B, founder decision 2026-08-22, reshaped 2026-08-30 and REDESIGNED the
   same day after both earlier looks were rendered and rejected.

   THE CANVAS IS THE PLACE. Every board before this was a panel with a column
   inside it, and re-skinning the card did not change that — the founder's words
   were "it needs to be like padlet, where the canvas becomes the
   space/environment, and posts are placed there horizontally in a chronological
   order." So:

     * it is a `.view`, not an overlay — the board TAKES the screen (founder,
       asked directly: "instead of it — its own place");
     * the wall scrolls SIDEWAYS through DAY COLUMNS, oldest left, today right
       (option C of the three drawn);
     * vertical stacking survives only INSIDE a day, which is not the list that
       was rejected: the axis of the board is time, running left to right.

   Quest-only furniture, so it stays in home.css — the carer's half of the same
   board is its own page styled by shell.css tokens, and neither is a copy of
   the other. tests/contracts/test_shell_layer.py fails if any selector here ever also
   appears in shell.css.

   EVERY COLOUR BELOW IS A THEMED TOKEN (--paper / --surface / --ink / --muted /
   --faint / --line / --accent / --accent-wash / --on-accent). The learner home
   is the one surface in this codebase with no theme-token debt and it stays
   that way: nothing here reaches for branding.css's --text / --gold / --mint
   family, which carry no [data-theme] value and so render one fixed colour on
   all three themes (--text measured 1.11:1 on the white theme in exactly that
   way). Pinned by test_no_branding_only_token_reaches_the_themed_home.

   THE BOARD IS UNMONITORED BY CONSTRUCTION (founder decision 2026-08-28,
   confirmed 2026-08-29), so there is deliberately no flag state, no "held"
   state and no refusal styling anywhere below: nothing on a board is ever
   refused for its content.  */

/* The view is a column: head, canvas, composer. `min-height:0` on the canvas is
   what lets it scroll instead of pushing the composer off the screen — without
   it a flex child's min-content height wins and the form leaves the viewport.

   THE LAYOUT IS ON `.active`, AND THAT IS THE WHOLE POINT (founder report
   2026-08-31: "on every page in the learners screens you can see the board at
   the bottom of every page"). This was an unconditional `#view-board{
   display:flex }`, and an ID selector beats `.view{ display:none }` — so the
   board never hid. It sat 134px tall under the bottom of every other screen,
   reachable by scrolling, which is exactly the "accessible only from the
   button" rule undone. The base rule must therefore state NO display at all:
   an inactive view is hidden by the shell, and any rule here that names
   `display` outside `.active` takes that back. */
#view-board{ flex-direction:column; min-height:0; flex:1 1 auto; }
#view-board.active{ display:flex; }
.board-head{ flex:0 0 auto; display:flex; flex-wrap:wrap; align-items:flex-end;
  gap:10px 18px; padding:2px 0 12px; }
.board-head-text{ flex:1 1 auto; min-width:0; }
.board-title{ margin:0; font-size:26px; line-height:1.1; }
.board-note{ display:block; font-size:12.5px; color:var(--muted); margin-top:2px; }

/* THE MONTHS. It WRAPS rather than scrolling: as a scroller the oldest month
   sits half off the edge behind a hidden scrollbar, which is a board a child
   has no way of knowing is there. Measured on the rendered page. */
.board-months{ flex:0 0 auto; display:flex; flex-wrap:wrap; gap:6px; }
.bw{ position:relative; flex:0 0 auto; display:inline-flex; align-items:center; gap:5px;
  padding:5px 11px; border-radius:var(--radius-pill, 99px); border:1px solid var(--line);
  background:transparent; color:var(--muted); font:inherit; font-size:12.5px; cursor:pointer;
  white-space:nowrap; }
.bw:hover{ color:var(--ink); }
.bw:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
/* The selected month carries a RING as well as a wash: --accent-wash over
   --surface measures 1.11:1 on the white theme, so a tint alone is a state only
   some people can see — the finding that put a ring on .theme-seg button.active. */
.bw[aria-selected="true"]{ background:var(--accent-wash); color:var(--ink);
  box-shadow:inset 0 0 0 2px var(--ink); }
.bw .bw-new{ width:7px; height:7px; border-radius:50%; background:var(--accent);
  box-shadow:0 0 0 2px var(--ink); }

/* THE CANVAS — full-bleed, and it means it. The view sits inside the app's
   padding, so negative margins pull the ground out to the window edges: a
   canvas that stops short of the edge is a panel with the border taken off. */
/* The board is the ONE view that runs edge to edge. `.content` (shell.css:379)
   is a 1000px centred column with page padding, which is right for every other
   screen and wrong for a canvas that is supposed to be the room. `:has()` lifts
   both for this view only; where it is unsupported the canvas still bleeds to
   the column's edges through the negative margin below, which is narrower but
   never broken. */
/* …and it fills the window. `height:calc(100vh - …)` guessed at the topbar and
   the page padding and came up ~240px short on a 900px screen, which left the
   composer floating in the middle of the canvas. Letting the flex column do the
   arithmetic is both shorter and correct at every density. */
.content:has(#view-board.active){ max-width:none; padding-left:0; padding-right:0;
  display:flex; flex-direction:column; flex:1 1 auto; min-height:0; }
.canvas:has(#view-board.active){ height:100vh; }
/* --bd-gutter, NOT --pad-page. `--pad-page` is a SHORTHAND ("32px 36px 64px"),
   so `calc(var(--pad-page) * -1)` is not a length: the declaration is dropped,
   and any `right`/`bottom` built from it resolves to nonsense. It put the Post
   button at the top-left of the screen, which reads exactly like CSS that never
   applied. One explicit value, used by all three rules that need it. */
#view-board{ --bd-gutter:36px; }
@media (max-width: 520px){ #view-board{ --bd-gutter:20px; } }
.content:has(#view-board.active) > #view-board{ padding:0 var(--bd-gutter); }
.content:has(#view-board.active) > #view-board > .board-canvas{
  margin-left:calc(var(--bd-gutter) * -1); margin-right:calc(var(--bd-gutter) * -1); }

.board-canvas{
  flex:1 1 auto; min-height:0;
  margin:0 calc(var(--bd-gutter, 36px) * -1);
  padding:0;
  overflow-x:auto; overflow-y:hidden;
  scroll-snap-type:x proximity; -webkit-overflow-scrolling:touch;
  /* The ground. The day rules are NOT drawn here — a repeating gradient on a
     scroll container paints against its padding box and stays put while the
     content moves, so the rules drifted out of line with the columns the moment
     the child scrolled. They live on the columns instead (`.bd-day`), which
     cannot come apart from them. Measured on the rendered page; nothing static
     would have said it.
     The alphas are token-derived, so this warms the purple theme, cools the
     dark and stays pale on white. */
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--ink) 4%, transparent), transparent 30%),
    var(--paper);
  --bd-col:250px;
}
.board-canvas::-webkit-scrollbar{ height:10px; }
.board-canvas::-webkit-scrollbar-track{ background:color-mix(in srgb, var(--ink) 8%, transparent); }
.board-canvas::-webkit-scrollbar-thumb{ background:color-mix(in srgb, var(--ink) 26%, transparent);
  border-radius:99px; }

.board-days{ display:flex; align-items:stretch; min-width:max-content; height:100%; padding:14px 0 16px; }

/* ONE DAY. Fixed width so the rules on the ground line up with the columns and
   so a swipe on a phone is a DAY rather than a post — the thing that makes this
   direction better on a small screen rather than worse. */
.bd-day{ width:var(--bd-col); flex:0 0 auto; scroll-snap-align:start;
  display:flex; flex-direction:column; gap:10px; padding:0 14px;
  border-left:1px solid color-mix(in srgb, var(--ink) 7%, transparent);
  overflow-y:auto; -webkit-overflow-scrolling:touch; }
/* No rule before the first day: it would read as an edge the wall does not have. */
.bd-day:first-child{ border-left:none; }
.bd-day-h{ position:sticky; top:0; z-index:1; margin:0 0 2px;
  font-family:"Poppins",sans-serif; font-size:10.5px; font-weight:700;
  letter-spacing:.11em; text-transform:uppercase; color:var(--faint);
  padding:2px 0 6px;
  background:linear-gradient(var(--paper) 62%, transparent); }
.bd-day.today .bd-day-h{ color:var(--accent-ink, var(--accent)); }
.bd-empty-col{ display:grid; place-items:center; width:100%; min-width:260px; padding:0 20px; }
.board-empty{ max-width:34ch; text-align:center; font-size:13.5px; color:var(--muted); line-height:1.55; }

/* ONE CARD ON THE CANVAS. Square-ish and magneted, which is what survived from
   the fridge door — the founder's objection was to the LAYOUT being a list, not
   to the card. `margin-left` is not decoration: the magnet sits half outside
   the card at left:-6px and would otherwise be clipped by the column padding. */
.pin{ position:relative; margin-left:8px; border:1px solid var(--line); border-radius:3px;
  padding:10px 12px 9px 14px; background:var(--surface); color:var(--ink);
  box-shadow:0 5px 13px rgba(0,0,0,.18); }
.pin::before{ content:""; position:absolute; top:10px; left:-6px; width:13px; height:13px;
  border-radius:50%;
  background:radial-gradient(circle at 34% 30%, color-mix(in srgb, var(--paper) 78%, white), var(--magnet) 62%);
  box-shadow:0 2px 4px rgba(0,0,0,.35); }
/* Four magnet hues, keyed on the AUTHOR'S ID in home.js rather than on their
   initial — two children in one house can share a first letter, and two people
   the same colour on one wall is the thing this is for. Decoration only: every
   card names its author in text, so no contrast floor rides on the hue. */
.pin.pin1{ --magnet:#57C9A3; }
.pin.pin2{ --magnet:#E2A34C; }
.pin.pin3{ --magnet:#A992E0; }
.pin.pin4{ --magnet:#E4718F; }
.pin.mine{ background:var(--accent-wash); }

/* The face is 57px now, so the two text lines stack beside it instead of
   sharing one row with it — a day column is too narrow for name + time + a
   circle three times its old size, and they collided at every width. */
.pin-top{ display:flex; align-items:center; gap:8px; margin-bottom:5px; }
.pin-top-text{ display:flex; flex-direction:column; min-width:0; flex:1; }
/* THE FACE IS THE POST'S SIGNATURE (founder ask 2026-09-05: three times as
   big). At 19px the explorer a child spent real time building was a dot; the
   avatar is the one thing on a fridge door that says whose card this is. The
   name moves under it rather than beside it, because a 57px circle plus a name
   plus a time on one line does not fit a day column — see .pin-top. */
.pin .av{ flex:0 0 auto; width:57px; height:57px; border-radius:50%; display:grid; place-items:center;
  font-size:28.5px; font-weight:700; background:var(--magnet); color:#1A0A26; }
.pin-who{ font-size:11px; font-weight:700; color:var(--ink); min-width:0;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* The COLUMN says which day, so the card says which hour — a relative line
   would answer a question the canvas has already answered. The exact stamp is
   in the title, so "a timestamp on every post" still holds to the minute. */
.pin-when{ font-size:9.5px; color:var(--faint); flex:0 0 auto; }
.pin-text{ font-size:12.5px; line-height:1.45; white-space:pre-wrap; overflow-wrap:anywhere; }
/* A poll: the question is the pin's own text, the options are the choices.
   Order is preserved — the T-B menu is ordered lightest-first and that order is
   the teaching. */
.poll-opts{ display:flex; flex-direction:column; gap:4px; margin-top:7px; }
.poll-opt{ display:flex; align-items:center; gap:7px; width:100%; text-align:left;
  padding:6px 10px; border-radius:4px; border:1px solid var(--line);
  background:var(--paper); color:var(--ink); font:inherit; font-size:11.5px; cursor:pointer; }
.poll-opt:hover{ border-color:var(--accent); }
.poll-opt:disabled{ cursor:default; opacity:.75; }
.poll-opt:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
/* Picked by ME gets the ring; picked by SOMEBODY ELSE gets their name, never
   the same treatment — a poll of a household is not an election, and on a wall
   with three children "2" hides the thing that matters. */
.poll-opt.mine{ background:var(--accent-wash); box-shadow:inset 0 0 0 2px var(--ink); }

/* THE HEART LINE (founder decision 2026-08-30: react AND reply). Names rather
   than a count, for the same reason the poll shows names. */
.pin-hearts{ margin-top:6px; font-size:10.5px; color:var(--muted); }

.pin-replies{ display:flex; flex-direction:column; gap:5px; margin-top:8px;
  padding-top:7px; border-top:1px solid var(--line); }
.rep{ font-size:11.5px; line-height:1.45; white-space:pre-wrap; overflow-wrap:anywhere; color:var(--ink); }
.rep b{ font-weight:600; color:var(--muted); font-size:11px; }
.rep-when{ font-size:9.5px; color:var(--faint); }

.pin-actions{ display:flex; align-items:center; gap:9px; margin-top:7px; }
.pin-heart{ flex:0 0 auto; width:25px; height:25px; display:grid; place-items:center;
  border:1px solid var(--line); border-radius:50%; background:transparent;
  color:var(--muted); font-size:11.5px; line-height:1; cursor:pointer; }
.pin-heart:hover{ color:var(--ink); }
/* Hearted carries a FILL AND A RING, not a hue change alone: --accent against
   --surface is 1.64:1 on the white theme, under the 3:1 floor SC 1.4.11 sets
   for a non-text indicator, and aria-pressed carries the state either way. */
.pin-heart.on{ background:var(--accent-wash); color:var(--ink); box-shadow:inset 0 0 0 2px var(--ink); }
.pin-heart:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.pin-reply-btn{ border:none; background:none; padding:0;
  font:inherit; font-size:11px; color:var(--muted); cursor:pointer; text-decoration:underline; }
.pin-reply-btn:hover{ color:var(--ink); }
.pin-reply-btn:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.pin-reply-row{ display:flex; gap:6px; margin-top:7px; }
.pin-reply-row input{ flex:1; min-width:0; font:inherit; font-size:11.5px; color:var(--ink);
  background:var(--paper); border:1px solid var(--line); border-radius:4px; padding:6px 9px; }
.pin-reply-row input:focus-visible{ outline:2px solid var(--accent); outline-offset:1px; }
.pin-reply-row button{ flex:0 0 auto; border:none; border-radius:4px; padding:0 11px;
  background:var(--accent); color:var(--on-accent); font:inherit; font-size:11.5px; font-weight:600; cursor:pointer; }

/* The composer, docked under the canvas. HIDDEN on an archived month rather
   than disabled — the server refuses the write either way, and a greyed box a
   child can click into invites them to type something that will be thrown
   away. */
.board-input{ flex:1; min-width:0; resize:none; font:inherit; font-size:13.5px; line-height:1.45;
  max-height:120px; color:var(--ink); background:var(--paper); border:1px solid var(--line);
  border-radius:12px; padding:10px 12px; }
.board-input:focus-visible{ outline:2px solid var(--accent); outline-offset:1px; }
/* A day column narrows on a phone so one fills the screen: a swipe is a day,
   which is the whole reason this direction gets better on a small screen. */
@media (max-width: 520px){
  .board-canvas{ --bd-col:min(86vw, 300px); }
  .board-title{ font-size:22px; }
}

.topic-overlay{ position:fixed; inset:0; z-index:var(--z-modal, 350); display:grid; place-items:center;
  padding:20px; background:rgba(0,0,0,.5); }
.topic-overlay[hidden]{ display:none; }
.map-detail{ position:relative; width:100%; max-width:560px; max-height:86vh; overflow-y:auto;
  -webkit-overflow-scrolling:touch; border-radius:20px; padding:22px 24px;
  /* Opaque, not glass, at every width. The panel used to be .glass when docked
     and opaque only as a phone sheet; over the map the half-transparent
     background let tile labels read straight through the panel's own text. */
  background:var(--surface); border:1px solid var(--line); box-shadow:var(--glass-shadow);
  transform:translateY(14px) scale(.98); opacity:0; transition:transform .22s cubic-bezier(.22,1,.36,1), opacity .18s ease; }
.topic-overlay.show .map-detail{ transform:none; opacity:1; }
.d-close{ position:absolute; top:10px; right:10px; width:32px; height:32px; display:grid; place-items:center; z-index:2;
  border:none; border-radius:50%; background:color-mix(in srgb, var(--ink) 10%, transparent); color:var(--ink); cursor:pointer; }
.d-close svg{ width:16px; height:16px; }
.d-close:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.d-status{ font-size:10px; font-weight:700; letter-spacing:.09em; text-transform:uppercase; margin-bottom:6px; }
.d-topic{ font-family:"ITC Ronda","Poppins",sans-serif; font-size:19px; margin-bottom:3px; }
.d-world{ display:flex; flex-direction:column; gap:2px; font-size:12px; font-weight:600; margin-bottom:12px; }
/* What the topic IS, in the child's own language. It sits above the figure so
   the card reads name → world → what it is → picture → what to do, which is the
   order the questions arrive in.

   Full --ink, unlike .d-line's --muted: .d-line is a status ("Learn it, then
   practise") and belongs with the buttons, whereas this is the answer to what
   the learner tapped for. Only ever rendered when a line exists — home.js emits
   nothing otherwise, so there is no empty box and no reserved gap. */
.d-about{ font-size:13.5px; color:var(--ink); line-height:1.5; margin:0 0 13px; }
.d-visual{ background:color-mix(in srgb, var(--vc,var(--accent)) 8%, var(--surface)); border:1px solid var(--line); border-radius:12px; padding:10px 12px; margin:2px 0 13px; }
.d-visual svg{ width:100%; height:auto; display:block; }
.d-line{ font-size:13px; color:var(--muted); line-height:1.45; margin-bottom:15px; }
.d-line b{ color:var(--ink); font-weight:600; }
.d-actions{ display:flex; gap:9px; flex-wrap:wrap; }
/* Learn / Practise are the two most-pressed buttons a learner meets and they
   had no hover either. Same gesture as .btn in shell.css — one vocabulary. */
/* Sign out, directly under the child's name in the rail. Quiet by default — it
   must be findable without competing with the things a learner is here to do —
   and it borrows the rail's own collapsed-state rule rather than inventing one,
   so it behaves like every other rail item when the rail is narrowed. */
/* The rail avatar, made to behave like the other two avatar slots. avatarSvg
   draws a 200x330 figure, so a 34px avatar is 34 WIDE BY 56 TALL — and .avatar
   in shell.css has overflow:visible, so the character's legs hung 22px below
   their circle. That went unnoticed while .rail-foot was the last thing in the
   rail and the spill fell into empty space; the sign-out row below it turned
   the spill into an 18px overlap.
   Both other hosts (.set-avatar, .av-preset-fig) clip and top-align instead,
   which is what makes the chosen background read as a filled circle rather than
   a figure standing on it. This matches them. Scoped to the rail foot, so the
   staff surfaces — which fill the same id with a single initial — are untouched. */
/* The level, pinned to the avatar. The ring is progress into THIS level, drawn
   with the same conic-gradient idiom as the world rings above. Both the number
   and the ring come from the server's floored level, so neither can fall — the
   one property that lets it sit on screen permanently without ever reading as
   a loss. Lives here rather than in shell.css: the staff surfaces share that
   chrome and have no level. */
/* Laid out by margin rather than by position: see the note in index.html for
   why it can neither wrap the avatar nor give .rail-foot a position.
   The -30px is exact — 11px of flex gap plus the chip's own 19px — so the chip
   lands on the avatar's corner and the name beside it does not move at all. */
.rail-lvl{ flex:0 0 auto; margin-left:-30px; margin-bottom:-3px; align-self:flex-end;
  width:19px; height:19px; border-radius:50%; position:relative;
  isolation:isolate; display:grid; place-items:center;
  font-family:"Poppins",sans-serif; font-weight:700; font-size:9.5px; line-height:1;
  color:var(--goldtext);
  background:conic-gradient(var(--goldtext) 0 var(--lp,0%), color-mix(in srgb, var(--ink) 30%, transparent) var(--lp,0%) 100%); }
/* The digit sits on its own disc so the ring stays legible behind it.
   z-index:-1 keeps that disc above the element's background but BELOW its
   text — an absolutely-positioned pseudo-element otherwise paints over the
   content and hides the number. `isolation:isolate` above keeps the negative
   index inside this chip rather than escaping behind the rail. */
.rail-lvl::before{ content:""; position:absolute; inset:2.5px; z-index:-1; border-radius:50%;
  background:var(--rail); }  /* --rail, not --surface: this disc sits ON the rail */
/* The rail foot's avatar crop moved to shell.css on 2026-08-31 — the carer's
   foot wears their own face now too, and it was arriving as a whole body
   squashed into a 34px circle because only this sheet knew how to crop it. */
.rail-signout{ display:flex; align-items:center; gap:11px; width:100%; padding:7px 8px 10px;
  border:none; background:none; color:var(--faint); font:inherit; font-size:12.5px;
  font-weight:600; text-align:left; cursor:pointer; border-radius:9px;
  transition:color .14s ease, background .14s ease; }
.rail-signout svg{ width:17px; height:17px; flex:0 0 auto; }
.rail-signout:hover{ color:var(--ink); background:var(--accent-wash); }
.rail-signout:focus-visible{ outline:2px solid var(--accent); outline-offset:1px; }
.collapsed .rail-signout{ justify-content:center; }
.collapsed .rail-signout-text{ opacity:0; pointer-events:none; }
@media (prefers-reduced-motion: reduce){ .rail-signout{ transition:none; } }


@media (max-width:900px){
  /* On a phone the dialog is a sheet rising from the bottom, which is the
     gesture a thumb expects and is what this panel already did below 900px.
     It stays OPAQUE — background:var(--surface) — for the same reason it did
     then: over the map, a half-transparent panel let tile labels and chapter
     rows read straight through its own text. */
  .topic-overlay{ padding:0; place-items:end center; }
  .map-detail{ max-width:none; border-radius:20px 20px 0 0; max-height:88vh; padding:20px 18px 24px;
    background:var(--surface); backdrop-filter:none; -webkit-backdrop-filter:none;
    transform:translateY(100%); transition:transform .26s cubic-bezier(.22,1,.36,1); opacity:1; }
  .topic-overlay.show .map-detail{ transform:none; }
}

/* ---- the initial assessment, in-canvas ---------------------------------- */
.dg-card{ max-width:640px; margin:4vh auto 0; border:1px solid var(--line); border-radius:20px;
  background:var(--surface); box-shadow:var(--shadow); padding:28px 30px 26px; }
.dg-h{ font-family:"ITC Ronda","Poppins",sans-serif; font-size:24px; font-weight:400; margin:0 0 10px; }
.dg-p{ font-size:14.5px; line-height:1.6; color:var(--muted); margin:0 0 18px; }
.dg-how{ border:1px solid var(--line); border-radius:14px; padding:14px 16px; margin-bottom:20px;
  background:color-mix(in srgb, var(--accent) 6%, transparent); }
.dg-how-h{ font-size:11px; font-weight:700; letter-spacing:.09em; text-transform:uppercase; color:var(--faint); margin-bottom:8px; }
.dg-how ul{ margin:0; padding-left:18px; }
.dg-how li{ font-size:13.5px; line-height:1.65; color:var(--muted); }
.dg-how strong{ color:var(--ink); font-weight:600; }
.dg-note{ font-size:12.5px; color:var(--faint); margin:14px 0 0; }
/* The check-in start card's one line naming why it is here (home-diagnostic.js),
   between the paragraph and the Start button. */
.dg-why{ font-size:13px; color:var(--muted); margin:-6px 0 18px; }

/* ---- E3 session recap ----------------------------------------------------
   The end of a sitting. The lead line is the LEARNING (server-composed) and
   is the largest thing here; the score, when it shows at all, is the quietest.
   That ordering is the point — session_recap.py withholds the count entirely
   below three correct, so this block must never grow a locally-tallied
   fallback score to fill the gap. */
.dg-recap{ margin:0 0 18px; }
.dg-recap-lead{ font-size:16.5px; line-height:1.55; color:var(--ink); font-weight:600; margin:0; }
.dg-recap-score{ font-size:12.5px; color:var(--faint); margin:10px 0 0; }

.dg-top{ display:flex; align-items:baseline; justify-content:space-between; gap:14px;
  max-width:680px; margin:0 auto 12px; }
.dg-sess{ font-size:11px; font-weight:700; letter-spacing:.09em; text-transform:uppercase; color:var(--faint); }
.dg-topic{ font-size:13px; color:var(--muted); }
.dg-intro{ max-width:680px; margin:0 auto 16px; font-size:14px; line-height:1.6; color:var(--muted);
  border-left:3px solid var(--accent); padding-left:14px; }
.dg-qcard{ max-width:680px; margin:0 auto; border:1px solid var(--line); border-radius:20px;
  background:var(--surface); box-shadow:var(--shadow); padding:26px 28px; }
.dg-prompt{ font-size:21px; line-height:1.45; color:var(--ink); margin:0 0 20px; }
/* A numbered statement in a question that lists them: its own line (home-maths.js). */
.dg-statement{ display:block; margin-top:.5em; }
/* "No calculator" / "Calculator allowed" above a question (items.Calculator, 2026-10-04; the
   tinted pill and the wording "allowed" are the founder's pick, 2026-10-05). The glyph is a
   CSS mask painted in currentColor: the crossed calculator's cut-out gap would otherwise need
   an SVG <mask> id, and a chip repeats on one screen (Ask's thread), where a repeated id
   resolves to the first copy. The mask's id lives inside the image, not the page. */
.calc-chip{ display:inline-flex; align-items:center; gap:7px; margin:0 0 12px; padding:5px 12px 5px 9px;
  border-radius:999px; font-size:13px; font-weight:600; color:var(--ink);
  background:color-mix(in srgb, var(--ink) 9%, transparent); }
.calc-chip.calc-needed{ background:var(--accent-wash);
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent); }
.calc-glyph{ flex:0 0 auto; width:16px; height:16px; background:currentColor;
  -webkit-mask:var(--calc-icon) center / contain no-repeat; mask:var(--calc-icon) center / contain no-repeat;
  --calc-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cmask id='c'%3E%3Crect width='16' height='16' fill='%23fff'/%3E%3Cline x1='1' y1='15' x2='15' y2='1' stroke='%23000' stroke-width='3.6'/%3E%3C/mask%3E%3Cg mask='url%28%23c%29'%3E%3Crect x='3' y='1.25' width='10' height='13.5' rx='2' fill='none' stroke='%23000' stroke-width='1.4'/%3E%3Crect x='5.1' y='3.3' width='5.8' height='2.5' rx='.6'/%3E%3Ccircle cx='5.9' cy='8.4' r='.85'/%3E%3Ccircle cx='8' cy='8.4' r='.85'/%3E%3Ccircle cx='10.1' cy='8.4' r='.85'/%3E%3Ccircle cx='5.9' cy='11.2' r='.85'/%3E%3Ccircle cx='8' cy='11.2' r='.85'/%3E%3Ccircle cx='10.1' cy='11.2' r='.85'/%3E%3C/g%3E%3Cline x1='1.8' y1='14.2' x2='14.2' y2='1.8' stroke='%23000' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); }
.calc-needed .calc-glyph{ color:var(--accent-ink);
  --calc-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='3' y='1.25' width='10' height='13.5' rx='2' fill='none' stroke='%23000' stroke-width='1.4'/%3E%3Crect x='5.1' y='3.3' width='5.8' height='2.5' rx='.6'/%3E%3Ccircle cx='5.9' cy='8.4' r='.85'/%3E%3Ccircle cx='8' cy='8.4' r='.85'/%3E%3Ccircle cx='10.1' cy='8.4' r='.85'/%3E%3Ccircle cx='5.9' cy='11.2' r='.85'/%3E%3Ccircle cx='8' cy='11.2' r='.85'/%3E%3Ccircle cx='10.1' cy='11.2' r='.85'/%3E%3C/svg%3E"); }
.dg-answer{ display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.dg-input{ flex:1 1 200px; min-width:0; font:inherit; font-size:16px; padding:12px 14px; border-radius:12px;
  border:1px solid var(--line); background:color-mix(in srgb, var(--ink) 4%, transparent); color:var(--ink); }
.dg-input:focus{ outline:none; border-color:var(--accent); box-shadow:0 0 0 2px var(--accent-wash); }
.dg-notsure{ font:inherit; font-size:13px; padding:11px 15px; border-radius:12px; cursor:pointer;
  border:1px dashed var(--faint); background:none; color:var(--muted); }
.dg-notsure:hover{ color:var(--ink); border-color:var(--muted); }
.dg-notsure:focus-visible,.dg-chip:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }

.dg-conf{ display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:16px; }
.dg-conf-l{ font-size:12px; color:var(--faint); margin-right:2px; }
.dg-chip{ font:inherit; font-size:12.5px; padding:6px 12px; border-radius:99px; cursor:pointer;
  border:1px solid var(--line); background:none; color:var(--muted); }
.dg-chip.on{ background:var(--accent); border-color:var(--accent); color:var(--on-accent); }

.dg-fb{ margin-top:18px; padding:14px 16px; border-radius:13px; font-size:14px; line-height:1.55;
  border:1px solid var(--line); background:color-mix(in srgb, var(--ink) 5%, transparent); color:var(--muted); }
.dg-fb.good{ border-color:#2FA96C; background:color-mix(in srgb, #2FA96C 12%, transparent); color:var(--ink); }
.dg-fb.miss{ border-color:var(--accent); background:var(--accent-wash); color:var(--ink); }
.dg-spot{ display:block; margin-top:8px; font-size:13px; color:var(--muted); }

@media (max-width:640px){
  .dg-card,.dg-qcard{ padding:22px 18px; }
  .dg-answer .dg-notsure,.dg-answer .btn{ flex:1 1 auto; justify-content:center; }
}

/* ---- a part of the first assessment (home-journey.js, home-diagnostic.js) --
   Founder decisions 2026-11-19 (ROADMAP, "the assessment's progress display"),
   replacing the trail of 2026-10-11. Sizes, colours and words are the round's
   drawing (ux-workspace/pages/diagnostic-experience: kit.css, screens.js). The
   question keeps its own width and stands alone, on a computer too (6 b, 2026-11-24:
   the map so far used to sit beside it). A tile is soft (checked) or bright (shown);
   it is never drawn dimmer than it was. */
/* On the assessment's screen, not in blocks of their own named for a theme: the theme
   blocks are shell.css's, and the contrast contracts read the first one they meet. */
#view-diagnostic{ --dg-soft:26%; --dg-now:var(--accent); }
:root[data-theme="white"] #view-diagnostic{ --dg-soft:16%; --dg-now:#B88A00; }
:root[data-theme="black"] #view-diagnostic{ --dg-soft:22%; }
.dg-stage{ display:flex; flex-wrap:wrap; gap:28px; justify-content:center; align-items:flex-start; }
.dg-main{ flex:1 1 520px; min-width:0; max-width:680px; }
#diagBody{ min-width:0; }
/* A part's plain end card starts level with the page, not 4vh below. */
.journey-on .dg-card{ margin-top:0; }
/* In a part the top row carries the way back, as a round button. */
#view-diagnostic.active.journey-on > .back-link{ display:none; }

/* The top row: the way back, the part's name, the parts as a small line (P4 a). */
.dg-atop{ display:flex; align-items:center; gap:12px; max-width:680px; min-height:56px; margin:0 auto 12px; }
.dg-round{ flex:none; display:flex; align-items:center; justify-content:center; width:44px; height:44px; padding:0;
  border:0; border-radius:50%; background:var(--look-tint); color:var(--ink); cursor:pointer; }
.dg-round svg{ width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.dg-round:focus-visible{ outline:var(--focus-ring); outline-offset:2px; }
.dg-ttl{ flex:1 1 auto; min-width:0; margin:0; font:600 14px/1.35 "Poppins", system-ui, sans-serif; color:var(--ink); }
.dg-atop .rl.rl-mini{ width:112px; margin:0; }
.dg-atop .rl-mini .rl-stn{ width:12px; height:12px; margin:5px 0; border-width:2.5px; }
.dg-atop .rl-mini .rl-stn.done{ width:18px; height:18px; margin:2px 0; }
.dg-atop .rl-mini .rl-stn.done svg{ width:11px; height:11px; }
.dg-atop .rl-mini .rl-stn.here{ width:22px; height:22px; margin:0; border-width:5.5px;
  box-shadow:0 0 0 2px var(--ink), 0 0 0 6px rgba(246, 189, 0, .2); }
.dg-atop .rl-mini .rl-sc::before{ top:9.5px; height:3px; }
.dg-atop .rl-mini .rl-sc.more::before{ height:0; border-top-width:3px; }

/* The strip (P1 e): five blocks of the part's time, each topic's tile above the block
   in which it was first checked. A bar fills with the time used, redrawn when the screen
   opens and when an answer comes back; the gold edge marks the block under way. */
.dg-strip{ --dg-gap:var(--paper); margin:0 0 14px; padding:12px 12px 10px; border-radius:18px; background:var(--look-tint2); }
.dg-bands{ display:flex; gap:12px; align-items:flex-end; }
.dg-band{ flex:1 1 0; min-width:0; display:flex; flex-direction:column; gap:8px; }
.dg-tiles{ display:flex; flex-wrap:wrap; gap:5px; min-height:16px; }
.dg-band .dg-tiles{ min-height:37px; flex-wrap:wrap-reverse; align-content:flex-start; }
.dg-tl{ flex:none; display:block; width:16px; height:16px; border-radius:5px; box-sizing:border-box;
  background:color-mix(in srgb, var(--wc) var(--dg-soft), transparent); box-shadow:inset 0 0 0 2px var(--wc); }
.dg-tl.bright{ background:var(--wc); box-shadow:none; }
.dg-tl.new{ box-shadow:inset 0 0 0 2px var(--wc), 0 0 0 2px var(--dg-gap), 0 0 0 4px var(--ink); }
.dg-bar{ position:relative; display:block; height:8px; border-radius:4px; overflow:hidden;
  background:color-mix(in srgb, var(--look-neutral) var(--look-ahead), transparent); }
.dg-bar::after{ content:""; position:absolute; left:0; top:0; bottom:0; width:calc(var(--f, 0) * 100%);
  border-radius:4px; background:var(--look-neutral); }
.dg-band.now .dg-bar{ outline:2px solid var(--dg-now); outline-offset:2px; }
.dg-cap{ display:flex; flex-wrap:wrap; justify-content:space-between; gap:2px 8px; margin-top:9px;
  font:400 13.5px/1.3 "Poppins", system-ui, sans-serif; color:var(--muted); }
.dg-cap > span{ white-space:nowrap; }
.dg-cap b{ color:var(--ink); font-weight:600; }
.dg-mins.last{ color:var(--look-gold-text); font-weight:600; }
/* "Nearly done: about 2 more questions" (6 a, 2026-11-24), on the strip and on the paused screen. */
.dg-mins.nearly{ color:var(--ink); font-weight:600; }
.dg-end .dg-nearly{ color:var(--ink); font-weight:600; }
/* The narrowest phones: the caption's two halves still share a line. */
@media (max-width:380px){ .dg-cap{ font-size:13px; } }

/* The question card's own label: the topic, with the calculator pill beside it. */
.dg-qhead{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin:0 0 12px;
  font:600 13.5px/1.3 "Poppins", system-ui, sans-serif; color:var(--muted); }
.dg-qtopic{ min-width:0; overflow-wrap:anywhere; }
.dg-qhead .calc-chip{ flex:none; margin:0; }
/* After an answer that put a new topic on the map. */
.dg-onmap{ --dg-gap:var(--surface); display:flex; align-items:center; gap:9px; margin:10px 0 0;
  font:400 14px/1.35 "Poppins", system-ui, sans-serif; color:var(--muted); }
.dg-onmap b{ color:var(--ink); font-weight:600; }

/* The six worlds as rows (the end of a part). */
.dg-wrows{ display:grid; grid-template-columns:20px minmax(0, auto) minmax(0, 1fr); column-gap:10px; row-gap:13px; align-items:center; }
.dg-sq{ width:20px; height:20px; border-radius:7px; background:var(--wc); }
.dg-wn{ min-width:0; padding-right:6px; font:500 14.5px/1.2 "Poppins", system-ui, sans-serif; color:var(--ink); }
.dg-none{ font:400 13.5px/1.2 "Poppins", system-ui, sans-serif; color:var(--muted); }

/* The end of a part (P5 a). */
.dg-end{ max-width:680px; margin:0 auto; }
.dg-eyebrow{ margin:0 0 4px; padding:0 4px; font:600 13.5px/1.3 "Poppins", system-ui, sans-serif; color:var(--look-neutral); }
.dg-endh{ margin:0; padding:0 4px; font:400 28px/1.2 "ITC Ronda", "Poppins", sans-serif; color:var(--ink); text-wrap:balance; }
.dg-end .dg-mapline{ margin:10px 4px 0; }
.dg-endline .rl{ margin:16px -6px 0; }
.dg-endcard{ --dg-gap:var(--surface); margin-top:12px; padding:18px; border-radius:26px; background:var(--surface);
  box-shadow:var(--look-card-edge); }
.dg-key{ display:flex; flex-wrap:wrap; gap:6px 18px; margin-top:16px; padding-top:14px; border-top:1px solid var(--look-rule);
  font:400 13.5px/1.3 "Poppins", system-ui, sans-serif; color:var(--muted); }
.dg-key span{ display:inline-flex; align-items:center; gap:8px; }
.dg-lit{ margin:12px 0 0; font-size:14.5px; line-height:1.45; color:var(--ink); }
.dg-lit b{ font-weight:600; }
.dg-end .dg-recap{ margin:16px 4px 0; }
.dg-end .dg-endgo{ display:flex; width:100%; justify-content:center; margin-top:18px; }
.dg-next{ margin:0; padding:15px 0; text-align:center; font:500 14.5px/1.3 "Poppins", system-ui, sans-serif; color:var(--muted); }
.dg-textbtn{ display:block; width:100%; min-height:44px; margin-top:4px; border:0; background:none; color:var(--muted);
  font:500 14.5px/1 "Poppins", system-ui, sans-serif; cursor:pointer; }
.dg-textbtn:focus-visible{ outline:var(--focus-ring); outline-offset:2px; }
/* THE PAUSE (founder decisions 2026-11-19, P9 a), as drawn on the design page (Draft 2,
   phonePaused): the round Pause button where the back arrow was, its two bars a little
   heavier; while paused the top row loses it, the eyebrow and heading sit above the strip,
   the strip says "Paused" where the minutes were, and the card reuses the end screen's gold
   button and text button. */
.dg-pause svg{ stroke-width:2.6; }
.dg-atop.bare{ padding-left:4px; }
.dg-pzh{ margin:18px 0 14px; }
.dg-pzh[hidden]{ display:none; }
.dg-mins.paused{ color:var(--ink); font-weight:600; }
.dg-paused .dg-p{ margin:0 4px; color:var(--ink); font-size:15.5px; }
.dg-paused .dg-textbtn{ margin-top:4px; }

@media (min-width:841px){
  .dg-atop{ gap:16px; margin-bottom:22px; }
  .dg-ttl{ font-size:15.5px; }
  .dg-atop .rl.rl-mini{ width:150px; }
  .dg-atop .rl-mini .rl-stn{ width:14px; height:14px; margin:6px 0; border-width:3px; }
  .dg-atop .rl-mini .rl-stn.done{ width:22px; height:22px; margin:2px 0; }
  .dg-atop .rl-mini .rl-stn.done svg{ width:13px; height:13px; }
  .dg-atop .rl-mini .rl-stn.here{ width:26px; height:26px; border-width:6.5px; }
  .dg-atop .rl-mini .rl-sc::before{ top:11px; height:4px; }
  .dg-atop .rl-mini .rl-sc.more::before{ border-top-width:4px; }
  .dg-strip{ margin-bottom:18px; }
  .dg-bands{ gap:16px; }
  .dg-band .dg-tiles{ min-height:16px; }
}

/* Movement: a new tile pops in, a topic asked again pulses, and at a part's end the newly
   bright tiles come up one after another. Only where the learner's setting and the
   device's allow it, and never in print. */
@keyframes dgPop{ 0%{ transform:scale(.2); opacity:0; } 60%{ transform:scale(1.35); } 100%{ transform:scale(1); opacity:1; } }
@keyframes dgPulse{ 0%, 100%{ transform:scale(1); } 40%{ transform:scale(1.4); } }
@keyframes dgLit{ 0%{ transform:scale(.6); filter:brightness(.5); } 60%{ transform:scale(1.3); filter:brightness(1.3); }
  100%{ transform:scale(1); filter:none; } }
@keyframes dgFade{ from{ opacity:0; transform:translateY(4px); } to{ opacity:1; transform:none; } }
@media screen and (prefers-reduced-motion: no-preference){
  :root:not([data-motion="off"]) .dg-tl.new{ animation:dgPop .45s ease-out both; }
  :root:not([data-motion="off"]) .dg-tl.pulse{ animation:dgPulse .6s ease-in-out both; }
  :root:not([data-motion="off"]) .dg-tl.lit{ animation:dgLit .6s ease-out both; }
  :root:not([data-motion="off"]) .dg-onmap{ animation:dgFade .3s ease-out both; }
  :root:not([data-motion="off"]) .dg-onmap .dg-tl{ animation:dgPop .45s ease-out both; }
}

/* ---- maths keypad + live answer display --------------------------------- */
.answer-display{ max-width:680px; margin:0 0 12px; border:1px solid var(--line); border-radius:12px;
  padding:10px 14px; background:color-mix(in srgb, var(--accent) 7%, transparent); }
.answer-display .ad-label{ display:block; font-size:10.5px; font-weight:700; letter-spacing:.09em;
  text-transform:uppercase; color:var(--faint); margin-bottom:3px; }
.answer-display .ad-value{ display:block; font-size:19px; color:var(--ink); min-height:1.3em; }
.answer-display.empty .ad-value{ font-size:14px; color:var(--faint); }
.mathkbd{ display:flex; flex-wrap:wrap; gap:7px; margin-top:12px; }
.mathkbd button{ flex:0 0 auto; min-width:46px; height:40px; padding:0 12px; font:inherit; font-size:16px;
  border-radius:10px; cursor:pointer; border:1px solid var(--line); color:var(--ink);
  background:color-mix(in srgb, var(--ink) 6%, transparent); }
.mathkbd button:hover{ background:color-mix(in srgb, var(--accent) 18%, transparent); }
.mathkbd button:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.mathkbd .mk-del{ margin-left:auto; }
.sup{ font-size:.72em; vertical-align:super; }
.sub{ font-size:.72em; vertical-align:sub; }
/* Typeset maths primitives — copied from the classic shell so a fraction or an
   exponent looks identical in both. Inline/baseline box model on purpose (NOT
   flex): that is what lets an exponent actually raise above the baseline. */
.tx{ display:inline-block; vertical-align:middle; }
.tx-frac{ display:inline-block; vertical-align:middle; text-align:center; margin:0 3px; position:relative; top:-0.05em; }
.tx-num{ display:block; padding:0 6px 2px; border-bottom:1.7px solid currentColor; }
.tx-den{ display:block; padding:2px 6px 0; }
.tx-sup{ font-size:0.62em; vertical-align:super; line-height:1; margin-left:1px; }
.tx-sup .tx-sup{ font-size:0.85em; }
/* The one-line fraction, for maths sitting INSIDE prose (typesetInline). The
   stacked form above is two lines tall, so one of them in a sentence makes that
   line 1.9x the height of its neighbours and the paragraph's leading lurches —
   worst on a phone, where a fraction-heavy tutor reply also strands fractions
   on lines of their own. This one stays within the line box, keeps the numerator
   above the denominator's level either side of a real fraction slash, and never
   breaks across a line. `.tx` around it must NOT be inline-block here or the
   whole expression becomes an unbreakable atom mid-sentence. */
.tx-inline{ display:inline; vertical-align:baseline; }
.tx-fri{ white-space:nowrap; }
.tx-fri > .tx-fn{ font-size:0.82em; vertical-align:0.32em; }
.tx-fri > .tx-fs{ margin:0 0.5px; }
.tx-fri > .tx-fd{ font-size:0.82em; vertical-align:-0.06em; }
.tx-sqrt{ display:inline-block; white-space:nowrap; }
.tx-sqrt > .tx-radsign{ display:inline-block; transform:scaleY(1.25); transform-origin:bottom; margin-right:1px; }
.tx-rad{ display:inline-block; border-top:1.7px solid currentColor; padding:2px 4px 0; }
.tx-op{ margin:0 5px; }
@media (max-width:640px){
  .mathkbd button{ flex:1 1 auto; height:44px; font-size:18px; }
}

/* practice-specific reveal furniture (shares .dg-* with the assessment) */
.dg-ans{ display:block; margin-top:10px; font-size:14.5px; color:var(--ink); }
.dg-we{ margin-top:14px; border-top:1px solid var(--line); padding-top:12px; }
.dg-we-h{ font-size:10.5px; font-weight:700; letter-spacing:.09em; text-transform:uppercase; color:var(--faint); margin-bottom:8px; }
.dg-we ol{ margin:0; padding-left:20px; }
.dg-we li{ font-size:13.5px; line-height:1.7; color:var(--muted); }
.dg-fig{ margin-top:14px; border:1px solid var(--line); border-radius:12px; padding:10px 12px;
  background:color-mix(in srgb, var(--ink) 4%, transparent); }
/* Figure ink on the white theme (2026-08-25, the invisible-figures
   escalation): the SVGs consume --fig-* tokens with dark fallbacks
   (visuals/primitives.py), so ONLY a surface that goes light needs
   overrides. These are the print re-ink values the platform already
   shipped for paper — every ink role AA-computed against this card's real
   composite (#f6f5f7): text 13.46, axis 6.97, gold 4.53, teal 4.93; a
   stored drawing's shaded shape (--fig-shade, founder 2026-11-05: it read
   1.2:1 here) 1.96 against the card, with words over it at 7.45; iso
   ramp shifted one step darker keeping the face-vs-face ratios (~1.8)
   that make the solid read; knockout follows the card it must vanish
   into. tests/contracts/test_figure_theme_contrast.py recomputes all of this. */
:root[data-theme="white"] .dg-fig{
  /* OPAQUE on purpose (verifier find, 2026-08-25): .dg-fig's translucent
     tint made the figure's ground HOST-dependent, and the practice-miss
     reveal sits in an 18% gold wash where gold read 4.10:1 — the very
     failure shape this fix exists to end. A drawing gets its own paper. */
  background:var(--surface);
  --fig-text:#1e293b; --fig-axis:#475569; --fig-gold:#a16207; --fig-teal:#0e7490;
  --fig-faint:rgba(71,85,105,0.35);
  --fig-shade:rgba(14,116,144,0.45);
  --fig-knockout:rgba(255,255,255,0.85); --fig-knockout-soft:rgba(255,255,255,0.55);
  --fig-iso-top:#3f9aa4; --fig-iso-right:#2b6d75; --fig-iso-left:#174449;
  /* the edge becomes the card-coloured SEAM between faces (light-mode
     isometric convention) — the dark fallback edge read 1.08:1 against
     the darkened left face and vanished exactly where shading is deepest */
  --fig-iso-edge:#FFFFFF;
}
.dg-fig svg{ width:100%; height:auto; display:block; }
/* A turn's figure sits INSIDE that turn's tutor bubble — one turn, one message.
   .tc-msg is pre-wrap for step-per-line working, which a caption must not
   inherit, and the card needs a little less top gap in there than it does
   standing alone. */
.tc-msg.tutor > .dg-fig{ white-space:normal; margin-top:12px; }
/* The reply's closing question, split off so a released figure can sit ABOVE
   it (tcReplyHtml / tcAttachFigure). A block of its own with the paragraph gap
   the blank line used to give it; the bubble's pre-wrap still applies inside. */
.tc-msg.tutor > .tc-close{ display:block; margin-top:12px; }
.dg-next{ display:flex; flex-wrap:wrap; gap:9px; margin-top:16px; align-items:center; }

/* ---- help BEFORE answering, and the two offers -------------------------
   Everything Quest gave a stuck learner used to be post-hoc, and the two
   routes it offered after a miss are the two that make model calls — i.e. the
   two the model-free Phase 1 switches off. These are all deterministic.

   Deliberately quiet: a rung is a text button, not a primary action, because
   the question is still the thing on the screen. Neither rung is penalised. */
.dg-ladder{ display:flex; flex-wrap:wrap; gap:10px; margin-top:14px; }
.dg-rung{ border:1px dashed var(--line); background:none; color:var(--accent-ink);
  font:inherit; font-size:13px; font-weight:600; padding:7px 13px; border-radius:99px;
  cursor:pointer; transition:background .14s ease, border-color .14s ease; }
.dg-rung:hover{ background:var(--accent-wash); border-color:var(--accent); }
.dg-rung:disabled{ opacity:.55; cursor:default; }
.dg-rung-body{ margin-top:12px; padding:13px 15px; border-radius:13px;
  background:color-mix(in srgb, var(--accent) 7%, transparent); border:1px solid var(--line); }
.dg-rung-text{ margin:0; font-size:14px; line-height:1.6; color:var(--ink); }
.dg-rung-l{ display:inline-block; margin-right:6px; font-size:10.5px; font-weight:700; letter-spacing:.09em; text-transform:uppercase;
  color:var(--goldtext); margin-bottom:5px; }
.dg-rung-body .dg-we{ margin-top:10px; }

/* "Half there" — the engine already grades a half-right pair as Hard rather
   than Again; this is the UI finally saying the same thing. */
.dg-partial{ display:block; margin-top:8px; font-size:13.5px; font-weight:600; color:var(--goldtext); }

/* The support offer and stop-on-a-high. Warm, opt-in, once a sitting. "Keep
   going" sits beside every option so neither ever reads as a redirect. */
.dg-offer{ margin-top:16px; padding:14px 16px; border-radius:14px; border:1px solid var(--line);
  /* OPAQUE, not a translucent tint. The offer renders inside the miss feedback
     block, so a see-through background let the miss colour bleed through and
     the whole card read as part of the error rather than as a hand offered.
     Mixing into --surface keeps it its own thing. */
  background:color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.dg-offer.stop{ background:color-mix(in srgb, var(--goldtext) 14%, var(--surface));
  border-color:color-mix(in srgb, var(--goldtext) 38%, transparent); }
.dg-offer-msg{ margin:0 0 12px; font-size:14px; line-height:1.6; color:var(--ink); }
.dg-offer-acts{ display:flex; flex-wrap:wrap; gap:9px; align-items:center; }
.dg-next .btn{ font-weight:600; }

/* ---- tutor chat ---------------------------------------------------------- */
/* THE SCROLLBAR SITS AT THE EDGE OF THE SCREEN, not through the conversation.
   `.tc-wrap` used to be the 760px column AND the flex parent, so the thread
   scrolled inside it and its scrollbar was drawn at the column's right edge —
   in the middle of the page, over the learner's own bubbles (founder report,
   2026-08-28, with a screenshot of it cutting through the chat).
   The scroller is now FULL WIDTH and the content is centred inside it, so the
   bar lands where every other app puts it. Same trick as the composer below:
   the column is padding, not a box. */
/* THE CHAT IS THE ENVIRONMENT, NOT A BOX INSIDE ONE (founder, 2026-08-31: "I
   want the feel to be similar to Claude, where the chat becomes the whole
   environment rather than having a box within it which you can scroll").

   `height:calc(100vh - 210px)` was the box. 210 is a guess at the topbar plus
   the page's padding plus the back-link row, and a guess is wrong at every
   density but one: on a short window the composer floated in the middle of the
   canvas with dead space under it, and on a tall one the chat stopped short of
   the bottom. The board hit exactly this and its comment records the cure —
   let the flex column do the arithmetic instead of guessing at it.

   So `#view-tutor` becomes a flex column that FILLS the canvas, the same shape
   `#view-board` uses, and `.tc-wrap` grows into it. `min-height:0` on every
   link of the chain is what actually makes the thread scroll rather than push
   the composer off the bottom: a flex item's default `min-height:auto` is its
   content, so one missing declaration anywhere up the chain and the composer
   leaves the screen instead of the thread scrolling. */
.content:has(#view-tutor.active){ display:flex; flex-direction:column;
  flex:1 1 auto; min-height:0; padding-bottom:0; }
.canvas:has(#view-tutor.active){ height:100vh; }
#view-tutor.active{ display:flex; flex-direction:column; flex:1 1 auto; min-height:0; }
.tc-wrap{ margin:0 auto; display:flex; flex-direction:column;
  flex:1 1 auto; min-height:0; width:100%; }
.tc-thread{ flex:1; overflow-y:auto; display:flex; flex-direction:column; gap:12px;
  padding:4px max(2px, calc((100% - 760px) / 2)) 12px;
  /* Thin and translucent so it reads as chrome rather than as furniture. The
     track stays transparent: a visible groove down a dark chat is exactly the
     "gets in the way" the founder reported. */
  /* --faint, not --line: --line is a HAIRLINE token (1.19-1.38:1 against --paper in
     all three themes) and a scrollbar thumb is a UI component needing 3:1 under WCAG
     1.4.11. --faint measures 5.10-5.50:1. Firefox only ever sees this line — it does
     not implement ::-webkit-scrollbar — so the base value has to be the correct one
     rather than relying on the :hover rule below. */
  scrollbar-width:thin; scrollbar-color:var(--faint) transparent; }
.tc-thread::-webkit-scrollbar{ width:11px; }
.tc-thread::-webkit-scrollbar-track{ background:transparent; }
.tc-thread::-webkit-scrollbar-thumb{ background:var(--faint); border-radius:99px;
  border:3px solid transparent; background-clip:content-box; }
.tc-thread:hover::-webkit-scrollbar-thumb{ background:var(--muted); background-clip:content-box; }
/* Everything BELOW the thread keeps the reading column — only the scroller is
   full width. Without this the composer would stretch to the viewport. */
.tc-wrap > :not(.tc-thread){ width:100%; max-width:760px; margin-left:auto; margin-right:auto; }
.tc-loading{ color:var(--muted); font-size:14px; padding:20px 2px; }
/* pre-wrap is load-bearing, not cosmetic: the tutor lays a worked solution out
   ONE STEP PER LINE and the output gate deliberately preserves those breaks.
   In innerHTML they collapse, and a solution reaches the child as a wall. */
.tc-msg{ max-width:82%; padding:12px 15px; border-radius:16px; font-size:14.5px; line-height:1.6;
  white-space:pre-wrap; }
.tc-msg.learner{ align-self:flex-end; background:var(--accent); color:var(--on-accent); border-bottom-right-radius:6px;
  position:relative; }
/* The learner's figure beside their latest message. OUTSIDE the bubble's left
   edge, absolutely, because .tc-msg is pre-wrap and an inline child would
   inherit it. Baseline-aligned to the bottom of the bubble so it reads as
   someone standing next to what they just said. */
.tc-me{ position:absolute; right:calc(100% + 8px); bottom:0; pointer-events:none;
  white-space:normal; }
.tc-me svg{ display:block; }
.tc-msg.tutor{ align-self:flex-start; background:var(--surface); border:1px solid var(--line);
  color:var(--ink); border-bottom-left-radius:6px; }
.tc-msg.bare{ background:none; border:none; padding:0; max-width:100%; white-space:normal; }
.tc-msg.hint{ background:color-mix(in srgb, var(--accent) 12%, var(--surface)); border-color:var(--accent); }
.tc-hint-l{ display:block; font-size:10.5px; font-weight:700; letter-spacing:.09em; text-transform:uppercase;
  color:var(--goldtext); margin-bottom:5px; }
/* A caring response is never dressed as tutoring — calm, distinct, no verdict. */
.tc-msg.care{ align-self:stretch; max-width:100%; background:color-mix(in srgb, #4FD1A5 12%, var(--surface));
  border-color:#4FD1A5; }
.tc-grade{ padding:10px 13px; border-radius:12px; font-size:14px; border:1px solid var(--line);
  background:color-mix(in srgb, var(--ink) 5%, transparent); }
.tc-grade.good{ border-color:#2FA96C; background:color-mix(in srgb, #2FA96C 12%, transparent); }
.tc-grade.miss{ border-color:var(--accent); background:var(--accent-wash); }
.tc-cap{ font-size:12px; color:var(--faint); margin-top:6px; }
.tc-item{ align-self:stretch; border:1px solid var(--line); border-radius:16px; background:var(--surface);
  box-shadow:var(--shadow); padding:16px 18px; }
.tc-item-q{ font-size:17px; line-height:1.45; margin:0 0 14px; color:var(--ink); }
/* A practice card the server has set aside — the learner skipped it, or moved
   on. It stays in the thread because it is part of the conversation, but it
   must not look answerable: an enabled box that grades nothing is worse than
   no box. */
.tc-item.done{ opacity:.62; }
.tc-item.done .dg-input{ background:transparent; }
.tc-starters{ display:flex; flex-wrap:wrap; gap:8px; padding-top:4px; }
.tc-chip{ font:inherit; font-size:13px; padding:9px 14px; border-radius:99px; cursor:pointer;
  border:1px solid var(--line); background:var(--surface); color:var(--muted); }
.tc-chip:hover{ color:var(--ink); border-color:var(--accent); }
.tc-chip:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.tc-transfer{ align-self:stretch; display:flex; align-items:center; justify-content:space-between;
  gap:12px; flex-wrap:wrap; border:1px dashed var(--line); border-radius:14px; padding:12px 15px;
  font-size:13.5px; color:var(--muted); }
/* A FIGURE ON REQUEST — the control, and the line that points at it.
   The row is rendered only while a figure genuinely exists for the topic in
   hand (home.js hides it otherwise), so it can never be a button that refuses.
   Quiet by default: it is an offer, not a thing the child is being told to do,
   and it must not compete with Send. */
/* THE PICTURE CONTROL, IN THE COMPOSER (founder, 2026-08-31: "the show me a
   picture gets in the way, can we have it a button next to 'send'").

   It was a labelled button in its own row above the composer. That row took a
   line of the conversation's height whenever a figure was available and pushed
   the composer down as it appeared and vanished — which is the getting in the
   way. As a square icon button beside Send it is always in the same place and
   costs no vertical space.

   44px, which is the tap-target floor and also happens to match the Send
   button's height, so the two sit on one baseline. */
.tc-tools{ display:flex; align-items:flex-end; flex:0 0 auto; }
.tc-tools[hidden]{ display:none; }
.tc-tool{ display:inline-flex; align-items:center; justify-content:center;
  width:44px; height:44px; padding:0; font:inherit; border-radius:99px;
  cursor:pointer; border:1px solid var(--line); background:var(--surface);
  color:var(--muted); transition:color .14s, border-color .14s; }
.tc-tool svg{ width:19px; height:19px; flex:none; stroke:currentColor; fill:none; stroke-width:1.6; }
.tc-tool:hover{ color:var(--ink); border-color:var(--accent); }
.tc-tool:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
/* Shown, not gone: the picture stays on screen above, so the control reports
   that rather than vanishing — a control that disappears after one tap reads
   as something taken away, which is the one thing this cohort's design never
   does. */
.tc-tool:disabled{ opacity:.55; cursor:default; }
.tc-tool:disabled:hover{ color:var(--muted); border-color:var(--line); }
/* Fetching. The label used to become "…" while a figure was on its way; there
   is no room for that beside Send, so the wait is the button dimming and the
   pointer going away — the same signal in the space available. */
.tc-tool.busy{ opacity:.55; }
/* The pointer shown when a learner asked for a picture in WORDS. Deliberately
   not a tutor bubble: the tutor did not say it, and the transcript the
   end-of-session analyser reads must not gain words the model never wrote. */
.tc-point{ align-self:stretch; border:1px dashed var(--line); border-radius:14px; padding:11px 15px;
  font-size:13.5px; color:var(--muted); }
/* The composer is the floor of the canvas: it keeps the reading column but its
   rule runs the full width, so the chat ends where the window does rather than
   at the end of a floating card. The bottom padding is the page padding this
   view gave up above. */
.tc-composer{ display:flex; gap:9px; align-items:flex-end; padding-top:12px;
  padding-bottom:20px; border-top:1px solid var(--line); background:var(--paper); }
.tc-input{ flex:1; min-width:0; resize:none; font:inherit; font-size:15px; line-height:1.5; padding:11px 14px;
  border-radius:13px; border:1px solid var(--line); background:var(--surface); color:var(--ink); max-height:160px; }
.tc-input:focus{ outline:none; border-color:var(--accent); box-shadow:0 0 0 2px var(--accent-wash); }
/* "Viewing as staff" — unmissable but not alarming, and it must not be
   mistaken for something the CHILD did. Amber-on-surface, never the accent. */
.staff-chip{ display:inline-flex; align-items:center; gap:7px; padding:6px 12px; border-radius:99px;
  font-size:12.5px; font-weight:600; letter-spacing:.01em; white-space:nowrap;
  color:var(--goldtext); background:color-mix(in srgb, var(--goldtext) 12%, var(--surface));
  border:1px solid color-mix(in srgb, var(--goldtext) 38%, transparent); }
.staff-chip svg{ width:15px; height:15px; flex:none; }
@media (max-width:640px){
  /* Keep the marker, drop the name, so it never pushes the theme switch off. */
  .staff-chip{ padding:5px 9px; font-size:11.5px; max-width:52vw; overflow:hidden; text-overflow:ellipsis; }
}

/* A safeguarding flag closed the tutor: this page, and nothing of the tutor around it. */
.tc-blocked{ max-width:560px; margin:40px auto; padding:28px; border-radius:18px;
  border:1px solid var(--line); background:var(--surface); }
.tc-blocked[hidden]{ display:none; }
.tc-blocked h2{ margin:0 0 10px; font-size:22px; }
.tc-blocked p{ margin:0; font-size:16px; line-height:1.55; color:var(--ink); }
#view-tutor.active.tc-locked .tc-layout,
#view-tutor.active.tc-locked #tcNew,
#view-tutor.active.tc-locked #tcRecent,
#view-tutor.active.tc-locked #tcTitle{ display:none; }
.tc-note{ font-size:12.5px; color:var(--faint); margin:8px 0 0; min-height:1em; }
.tc-note.warn{ color:var(--goldtext); }
/* A disclosure closes the chat: the standing note under the composer says who
   picks it up from here, so the closed box never reads as the app breaking. */
.tc-note.care{ color:var(--ink); }
/* The end of a lesson — its retrieval check has been answered. Same dashed
   frame as the transfer offer, so a close reads as a close and not an error. */
.tc-done{ align-self:stretch; display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  border:1px dashed var(--line); border-radius:14px; padding:14px 15px;
  font-size:13.5px; color:var(--muted); }
.tc-done span{ flex:1 1 auto; min-width:0; }
/* The recap headline inside the chat close. Takes its own full-width row so it
   reads as a statement about the session rather than as another button label. */
.tc-recap{ flex:1 0 100%; margin:0; }
/* A closed composer must LOOK closed — otherwise the child keeps typing into
   a session the server has already ended. */
.tc-input:disabled{ opacity:.55; cursor:not-allowed; }
.tc-composer .btn:disabled{ opacity:.55; cursor:not-allowed; }
/* The waiting indicator. Gold and pulsing, restored from the classic shell's
   .think-dots — the grey bobbing version that replaced it read as a loading
   artefact rather than someone composing a reply. Gold is the platform's
   attention colour, so it says "we are on it" in the same voice as everything
   else. It sits in its own row above the composer (see index.html) instead of
   as a thread bubble, so it is beside what the child just typed. */
.tc-thinking{ display:flex; justify-content:flex-start; align-items:center; gap:9px; padding:0 2px 6px; }
/* The word beside the dots. Fades between lines rather than snapping — a hard
   swap at this size reads as a glitch. shell.css already turns every animation
   off under prefers-reduced-motion, and tcThinking additionally stops the
   rotation, so a still word is the reduced-motion state rather than a flicker. */
.tc-think-word{ font-size:13px; color:var(--faint); animation:tcWordIn .45s ease both; }
@keyframes tcWordIn{ from{ opacity:0; transform:translateY(2px); } to{ opacity:1; transform:none; } }
.tc-thinking[hidden]{ display:none; }
.tc-dots{ display:inline-flex; gap:5px; align-items:center; }
/* --goldtext, NOT the raw --gold the classic shell used. Measured on the
   rendered page: #F6BD00 scores 10.3:1 on purple and 11.0:1 on black but
   1.59:1 on the white theme — invisible. --goldtext exists for exactly this,
   and each theme already carries a value darkened or lightened to suit. */
.tc-dots i{ width:7px; height:7px; border-radius:50%; background:var(--goldtext);
  opacity:.3; animation:tcb 1.2s infinite ease-in-out; }
.tc-dots i:nth-child(2){ animation-delay:.2s; } .tc-dots i:nth-child(3){ animation-delay:.4s; }
@keyframes tcb{ 0%,80%,100%{ opacity:.3; transform:scale(.8); } 40%{ opacity:1; transform:scale(1); } }
/* --goldtext on the white theme is #B8890B, which measures 2.90:1 against this
   theme's paper — just under the 3:1 WCAG minimum for a graphical object. It is
   the right token for gold TEXT, which sits on other surfaces; a 7px dot needs
   a little more. Darkened here only. Measured on the rendered page at 4.12:1
   (purple 11.7, black 12.5 with --goldtext unchanged). */
:root[data-theme="white"] .tc-dots i{ background:#9A7108; }
@media (prefers-reduced-motion: reduce){ .tc-dots i{ animation:none; opacity:.6; } }
@media (max-width:640px){
  .tc-wrap{ height:calc(100vh - 180px); }
  .tc-msg{ max-width:92%; }
  /* 92% leaves about 30px to the left of a learner's bubble, and the figure is
     26 wide by 43 tall — it would sit on top of the thread's own padding and,
     on the longest messages, on top of the bubble. The maths is what has to
     survive a small screen; presence is the nicety. */
  .tc-me{ display:none; }
}

/* ---- today's topics, beside the mix ------------------------------------- */
/* 250px → 300px: the extra 50 is the gutter the learner's figure stands in.
   Founder-approved widening — at 250 the avatar would have had to sit inside
   the rows, which pushes one row taller than its neighbours every time it
   moves. */
.prac-grid{ display:grid; grid-template-columns:1fr 300px; gap:24px; align-items:start; }
.prac-map{ border:1px solid var(--line); border-radius:18px; background:var(--surface);
  box-shadow:var(--shadow); padding:16px 16px 14px; position:sticky; top:86px; }
.pm-head{ font-size:11px; font-weight:700; letter-spacing:.09em; text-transform:uppercase;
  color:var(--faint); margin-bottom:4px; }
.pm-count{ font-size:19px; color:var(--ink); margin-bottom:9px; }
.pm-track{ height:6px; border-radius:99px; background:var(--track); overflow:hidden; margin-bottom:14px; }
.pm-track span{ display:block; height:100%; border-radius:99px; background:var(--accent); transition:width .4s ease; }
/* The left inset is the gutter .pm-me stands in — same "you are here" language
   as the map, so the two surfaces agree about where the learner is. */
.pm-list{ display:flex; flex-direction:column; gap:3px; max-height:52vh; overflow-y:auto; padding-left:32px;
  position:relative; }
.pm-me{ position:absolute; left:0; transform:translateY(-50%); pointer-events:none; z-index:2;
  transition:top .28s ease; }
.pm-me[hidden]{ display:none; }
.pm-me svg{ display:block; }
.pm-row{ display:flex; align-items:center; gap:9px; width:100%; text-align:left; font:inherit; font-size:12.5px;
  line-height:1.35; padding:8px 9px; border-radius:10px; cursor:pointer; border:1px solid transparent;
  background:none; color:var(--muted); }
.pm-row:hover{ background:color-mix(in srgb, var(--pc, var(--accent)) 14%, transparent); color:var(--ink); }
.pm-row:focus-visible{ outline:2px solid var(--accent); outline-offset:1px; }
.pm-row.cur{ background:color-mix(in srgb, var(--pc, var(--accent)) 18%, transparent);
  border-color:var(--pc, var(--accent)); color:var(--ink); font-weight:600; }
.pm-row.done{ color:var(--ink); }
.pm-mark{ flex:0 0 auto; width:17px; height:17px; display:grid; place-items:center; color:var(--pc, var(--accent)); }
.pm-mark svg{ width:15px; height:15px; stroke:currentColor; fill:none; stroke-width:2.6; }
.pm-dot{ width:7px; height:7px; border-radius:50%; background:currentColor; opacity:.45; }
.pm-row.cur .pm-dot{ opacity:1; }
.pm-row.done .pm-mark{ color:#2FA96C; }
.pm-row.miss .pm-dot{ background:var(--accent); opacity:1; }
.pm-name{ min-width:0; }
@media (max-width:900px){
  /* Below the question on a phone: the question is what matters, the map is
     context — and a 300px column would squeeze the maths. */
  .prac-grid{ grid-template-columns:1fr; }
  .prac-map{ position:static; }
  .pm-list{ flex-direction:row; flex-wrap:wrap; max-height:none; padding-left:0; }
  .pm-row{ width:auto; }
  /* The list stops being a list here — it wraps into a cloud of chips, and a
     figure standing in a left gutter has nothing to stand beside. The rows keep
     saying "— current" in their accessible names either way, which is the part
     that was never decorative. */
  .pm-me{ display:none; }
}

/* The PIN / name-picker modal chrome moved to shell.css with the avatar
   creator above — the carer picks a name through the same dialog now. */

.toast{ position:fixed; left:50%; bottom:28px; transform:translateX(-50%); z-index:500;
  background:var(--ink); color:var(--paper); font-size:13.5px; padding:11px 18px; border-radius:99px;
  box-shadow:0 10px 30px rgba(0,0,0,.35); max-width:88vw; text-align:center; transition:opacity .4s ease; }
.toast.go{ opacity:0; }

/* ---- the celebration -----------------------------------------------------
   Fires on arrival only: a topic gone solid, a badge earned. Never on a miss
   and never on a return to absence.

   `pointer-events:none` throughout — a flourish must never sit between a
   learner and the button underneath it, and this one covers the viewport.
   The pieces are only created when motion is allowed (home.js motionOff), so
   the shell.css rule that flattens every animation has nothing to flatten. */
.q-cheer{ position:fixed; inset:0; z-index:600; pointer-events:none;
  display:flex; align-items:center; justify-content:center; transition:opacity .5s ease; }
.q-cheer.go{ opacity:0; }
.q-cheer-card{ background:var(--surface); color:var(--ink); border:1px solid var(--line);
  border-radius:16px; padding:14px 22px; font-size:16px; font-weight:600; text-align:center;
  max-width:80vw; text-wrap:balance; box-shadow:0 18px 50px rgba(0,0,0,.34);
  animation:q-cheer-in .42s cubic-bezier(.2,.9,.3,1.2) both; }
.q-cheer-bit{ position:absolute; top:46%; left:50%; width:9px; height:9px; border-radius:2px;
  animation:q-cheer-fly var(--bd,.6s) cubic-bezier(.2,.7,.4,1) both; }
@keyframes q-cheer-in{ from{ opacity:0; transform:scale(.86) translateY(8px); }
  to{ opacity:1; transform:none; } }
@keyframes q-cheer-fly{
  from{ opacity:1; transform:translate(-50%,0) rotate(0deg); }
  to{ opacity:0; transform:translate(calc(-50% + var(--bx,0)), -42vh) rotate(340deg); } }

/* ---- teaching activity (faded scaffolding) ------------------------------- */
/* THE ROAD (2026-09-03): five stop marks under the topic hero. A done stop is
   filled; the next one carries a ring; ahead stops are outlined. Every mark is
   a button (a route in), so it gets a real focus state. `.dim` is a locked
   topic's road — visible, quiet, never a padlock. */
.road{ display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 18px; }
.road-stop{ font:inherit; display:inline-flex; align-items:center; gap:8px; padding:7px 12px 7px 8px; border-radius:999px; cursor:pointer;
  border:1.5px solid var(--line); background:transparent; color:var(--muted); }
  border:1.5px solid var(--line); color:var(--muted); }
.road-stop.done{ border-color:var(--accent); color:var(--ink); }
.road-stop.next{ border-color:var(--accent); color:var(--ink); box-shadow:0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
.road-stop:hover{ border-color:var(--accent); }
.road-stop:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.road.dim .road-stop{ opacity:.55; }
/* The two doors beside the Continue card (Option C). */
.cont-doors{ display:flex; gap:10px; flex-wrap:wrap; margin-top:-6px; }
/* `display:flex` would beat the `hidden` attribute's UA display:none — and
   did, on the first render: the doors showed under the diagnostic's "Start
   here" card. Hidden means hidden. */
.cont-doors[hidden]{ display:none; }
/* The two plans (founder decisions 2026-10-13): the rail's AI entries carry `hidden`
   until /auth/me says the learner is on Core + AI tutor, and shell.css's
   `.nav-item{display:flex}` would otherwise beat the attribute, as above. Paused (30
   days past the contract's end date): the rail's ways in go, sign-out stays. */
.nav-item[hidden]{ display:none; }
.access-paused .nav-item,
.access-paused .rail-section,
.access-paused .rail-foot,
.access-paused .soon-back,
.access-paused .stub [data-action="welcome"]{ display:none; }
/* `.btn`'s display beat `hidden` here too: the "soon" screen showed a dead "Try again"
   (wired only for a failed boot) under the homework-lens page. */
#soonRetry[hidden]{ display:none; }
.door{ font:inherit; font-size:13.5px; font-weight:700; cursor:pointer; padding:9px 14px; border-radius:999px;
  border:1.5px solid var(--line); background:transparent; color:var(--ink); }
.door:hover{ border-color:var(--accent); }
.door:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.tch-lead{ font-size:14px; color:var(--muted); margin:0 0 14px; }
.tch-ex{ border:1px solid var(--line); border-radius:14px; padding:14px 16px; margin-bottom:14px;
  background:color-mix(in srgb, var(--accent) 5%, transparent); }
.tch-ex-h{ font-size:10.5px; font-weight:700; letter-spacing:.09em; text-transform:uppercase;
  color:var(--faint); margin-bottom:8px; }
.tch-q{ font-size:16.5px; color:var(--ink); margin:0 0 10px; }
.tch-steps{ margin:0 0 10px; padding-left:20px; }
.tch-steps li{ font-size:14px; line-height:1.75; color:var(--muted); }
.tch-blank{ color:var(--goldtext); font-weight:700; }
.tch-ans{ font-size:14px; color:var(--ink); margin:0; }
.tch-explain{ border-top:1px solid var(--line); margin-top:14px; padding-top:14px; }
.tch-explain label{ display:block; font-size:13.5px; color:var(--muted); margin-bottom:8px; }
.tch-explain .dg-input{ width:100%; resize:vertical; margin-bottom:9px; }
.tch-ack{ font-size:13px; color:var(--muted); margin:9px 0 0; }
.tch-spot{ display:flex; flex-direction:column; gap:8px; margin-bottom:4px; }
.tch-step{ display:flex; align-items:flex-start; gap:11px; width:100%; text-align:left; font:inherit;
  font-size:14.5px; line-height:1.5; padding:12px 14px; border-radius:12px; cursor:pointer;
  border:1px solid var(--line); background:var(--surface); color:var(--ink); }
.tch-step:hover:not(:disabled){ border-color:var(--accent); }
.tch-step:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.tch-step:disabled{ cursor:default; opacity:.85; }
.tch-n{ flex:0 0 auto; width:22px; height:22px; border-radius:50%; display:grid; place-items:center;
  font-size:12px; font-weight:700; background:color-mix(in srgb, var(--ink) 10%, transparent); }
.tch-step.wrong{ border-color:var(--accent); background:var(--accent-wash); }
.tch-step.picked-right{ border-color:#2FA96C; background:color-mix(in srgb, #2FA96C 12%, transparent); }
.tch-step.picked-wrong{ border-color:#FF8A5B; }

/* ==========================================================================
   Phase 3 — per-topic screen, My progress, Settings
   ========================================================================== */

.pg-title{ font-size:26px; font-weight:400; margin:0 0 4px; }
.pg-sub{ color:var(--muted); font-size:14px; margin:0 0 22px; }
.pg-loading{ color:var(--muted); font-size:14px; padding:36px 4px; text-align:center; }
.mono{ font-family:"ITC Ronda","Poppins",sans-serif; font-weight:600; color:var(--on-accent); }

/* rings + bars (shared) */
.ring2{ width:78px; height:78px; flex:0 0 auto; border-radius:50%; display:grid; place-items:center;
  background:conic-gradient(var(--rc,var(--accent)) 0 var(--rp,0%), var(--track) var(--rp,0%) 100%); }
.ring2>span{ width:60px; height:60px; border-radius:50%; background:var(--surface); display:grid; place-items:center; text-align:center; line-height:1.05; }
.ring2 b{ font:700 17px "Poppins",sans-serif; color:var(--ink); }
.ring2 small{ display:block; font-size:9px; letter-spacing:.05em; color:var(--faint); margin-top:1px; }
.pbar{ height:8px; border-radius:99px; background:var(--track); overflow:hidden; margin-top:8px; }
.pbar>span{ display:block; height:100%; border-radius:99px; }

/* ---- My progress ---- */

/* THIS MONTH AS A GRID (founder pick, 2026-09-03): Mon-Sun columns, a row a
   week, a filled square for every day of maths, today ringed in --ink, and the
   two streak numbers under it. Days ahead of today sit fainter than days
   behind it — a blank future is not a missed one. The week labels are their
   own column with the SAME row count and gap as the grid, so they line up. */
.pg-month{ margin-top:16px; padding:20px; border-radius:20px; border:1px solid var(--line);
  background:var(--surface); box-shadow:var(--shadow); }
.pg-month-h{ display:flex; align-items:baseline; justify-content:space-between; gap:12px;
  margin:0 0 14px; }
.pg-month-h h3{ margin:0; font-family:"ITC Ronda","Poppins",sans-serif; font-weight:400;
  font-size:18px; color:var(--ink); }
.pg-month-h span{ font-size:12.5px; color:var(--muted); }
/* The grid and the two streak numbers share the card side by side on a wide
   screen — the grid never grows past 440px, so its squares stay squares a
   thumb could hit, and the numbers take the room beside it; on a phone the
   numbers drop underneath, as the reference has them. */
.pg-month-body{ display:flex; flex-wrap:wrap; gap:18px 40px; align-items:flex-start; }
.mg{ display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"days ." "grid weeks";
  column-gap:16px; row-gap:8px; flex:1 1 320px; max-width:440px; }
.mg-days{ grid-area:days; display:grid; grid-template-columns:repeat(7,1fr); gap:8px; }
.mg-days span{ text-align:center; font-family:"Poppins",sans-serif; font-weight:700;
  font-size:10.5px; letter-spacing:.08em; color:var(--faint); }
.mg-grid{ grid-area:grid; display:grid; grid-template-columns:repeat(7,1fr); gap:8px; }
.mg-cell{ aspect-ratio:1; border-radius:9px; border:1.5px solid var(--line); background:transparent; }
.mg-cell.pad{ border-color:transparent; }
.mg-cell.on{ background:var(--goldtext); border-color:var(--goldtext); }
.mg-cell.today{ box-shadow:0 0 0 2px var(--surface), 0 0 0 3.5px var(--ink); }
.mg-cell.ahead{ opacity:.45; }
.mg-weeks{ grid-area:weeks; display:grid; grid-auto-rows:1fr; gap:8px; align-items:center; }
.mg-wk{ font-family:"Poppins",sans-serif; font-weight:700; font-size:10px; letter-spacing:.08em;
  text-transform:uppercase; color:var(--faint); white-space:nowrap; }
.mg-streaks{ display:flex; flex-direction:column; gap:18px; flex:0 1 auto; padding-top:26px; }
@media (max-width:760px){ .mg-streaks{ flex-direction:row; gap:36px; padding-top:0; width:100%; } }
.mg-streaks small{ display:block; font-family:"Poppins",sans-serif; font-weight:700; font-size:10.5px;
  letter-spacing:.1em; text-transform:uppercase; color:var(--faint); }
.mg-streaks b{ display:block; margin-top:2px; font-family:"ITC Ronda","Poppins",sans-serif;
  font-weight:400; font-size:22px; color:var(--ink); }
/* The streak's two states, said in words under the numbers. */
.mg-stake{ display:flex; align-items:center; gap:7px; font-size:12.5px; color:var(--muted);
  margin-top:2px; }
.mg-stake svg{ width:14px; height:14px; flex:0 0 auto; }
.mg-stake.safe svg{ color:var(--xp); }
.mg-stake.at-risk svg{ color:var(--goldtext); }
/* Gaps closed — the PRD's headline measure, computed since the beginning and
   shown on no learner screen until now. A quiet full-width line rather than a
   fourth ring: it is a statement about what the work was FOR, not another
   score to compare against the three above it. */
.pg-gaps{ margin-top:16px; padding:13px 16px; border:1px solid var(--line); border-radius:14px;
  background:color-mix(in srgb, var(--accent) 6%, transparent);
  font-size:14px; line-height:1.55; color:var(--muted); }
.pg-gaps b{ color:var(--ink); font-weight:600; }
.badge-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(158px,1fr)); gap:12px; }
.badge-tile{ background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:16px; box-shadow:var(--shadow); }
.badge-tile.locked{ opacity:.55; }
/* A badge just earned. The chip carries the word, not just the colour — the
   ring alone would be a state only a sighted learner could read. */
.badge-tile.is-new{ position:relative; border-color:var(--goldtext);
  box-shadow:var(--shadow), 0 0 0 2px color-mix(in srgb, var(--goldtext) 34%, transparent); }
.badge-new{ position:absolute; top:10px; right:10px; font-size:10px; font-weight:700;
  letter-spacing:.08em; text-transform:uppercase; color:var(--paper);
  background:var(--goldtext); border-radius:99px; padding:3px 8px; }
.badge-ic{ display:grid; place-items:center; width:40px; height:40px; border-radius:12px; background:var(--accent-wash); color:var(--goldtext); margin-bottom:10px; }
.badge-tile.locked .badge-ic{ background:color-mix(in srgb, var(--ink) 8%, transparent); color:var(--faint); }
.badge-ic svg{ width:22px; height:22px; }
.badge-name{ display:block; font-weight:600; font-size:13.5px; margin-bottom:3px; }
.badge-desc{ display:block; font-size:11.5px; color:var(--muted); line-height:1.35; }
.pr-ic{ width:28px; height:28px; flex:0 0 auto; border-radius:8px; display:grid; place-items:center; background:color-mix(in srgb, #2FA96C 18%, transparent); color:#2FA96C; }
.pr-ic svg{ width:16px; height:16px; stroke:currentColor; fill:none; stroke-width:2.4; }
.pr-date{ font-size:12px; color:var(--faint); white-space:nowrap; }

/* "Your maths days" — the learner's own weekly goal, set here beside the ring
   it drives. No penalty styling anywhere: an unpicked day is just unpicked. */
.goal-card{ border:1px solid var(--line); border-radius:16px; background:var(--surface); padding:16px 18px; box-shadow:var(--shadow); }
.goal-copy{ font-size:13.5px; color:var(--muted); line-height:1.5; margin:0 0 12px; }
.goal-days{ display:flex; flex-wrap:wrap; gap:8px; }
.gd{ min-width:52px; padding:9px 10px; border-radius:11px; cursor:pointer; font:inherit; font-size:13px; font-weight:600;
  border:1px solid var(--line); background:color-mix(in srgb, var(--ink) 5%, transparent); color:var(--muted); }
.gd:hover{ color:var(--ink); }
.gd.on{ background:var(--accent); border-color:var(--accent); color:var(--on-accent); }
.gd:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.goal-note{ font-size:12.5px; color:var(--muted); margin:12px 0 0; min-height:1em; }

/* ---- per-topic screen ---- */
.flow-nav{ display:flex; align-items:center; gap:16px; }
.back-link.subtle{ color:var(--faint); margin-bottom:20px; }
/* .back-link sets display (shell.css), so without this a hidden one is still drawn. */
.back-link.subtle[hidden]{ display:none; }
/* Out of sight and out of the tab order, its place kept: the way on says the same words. */
.back-link.gives-way{ visibility:hidden; }
/* "Recent chats" is a way IN, not a second way out. It was `.back-link.subtle`
   — the same component one shade dimmer — so the row read as two Backs and the
   control was invisible as a thing you could open (founder, 2026-08-28). */
.chat-history{ margin-left:auto; margin-bottom:20px; display:inline-flex; align-items:center; gap:7px;
  /* --muted, NOT --text: `--text` is a legacy branding.css token (#f7e9ff) that no
     [data-theme] block overrides, so it renders at 1.11:1 on the white theme —
     invisible, which is the very defect this control was changed to fix. --muted is
     the Quest token the sibling pills (.tc-chip, .tc-tool) already use. */
  border:1px solid var(--line); background:transparent; color:var(--muted);
  border-radius:99px; padding:7px 13px; font:inherit; font-size:13.5px; font-weight:600; cursor:pointer; }
.chat-history:hover{ background:var(--accent-wash); border-color:var(--accent); }
/* No :focus-visible override here on purpose. `--accent` (#F6BD00) measures 1.64:1
   on the white theme's paper, under the 3:1 WCAG floor for a focus indicator — the
   SAME open Tier-1 defect logged against the shared --focus-ring. The element this
   replaced had no override and inherited the UA's background-proof default; adding
   one here would have been a downgrade AND a second site to fix. Falls through on
   purpose until the shared ring is cured. */
.chat-history svg{ width:15px; height:15px; stroke:currentColor; fill:none; stroke-width:1.9;
  stroke-linecap:round; stroke-linejoin:round; }
.topic-hero{ position:relative; display:flex; align-items:center; gap:18px; background:var(--surface); border:1px solid var(--line);
  border-radius:22px; padding:22px 24px; margin-bottom:20px; overflow:hidden; box-shadow:var(--shadow); }
.topic-hero::before{ content:""; position:absolute; left:0; top:0; bottom:0; width:6px; background:var(--th,var(--accent)); }
.th-left{ flex:1; min-width:0; }
.th-crumb{ font-size:11px; font-weight:700; letter-spacing:.07em; text-transform:uppercase; margin-bottom:6px; }
.th-title{ font-size:28px; font-weight:400; margin:0 0 10px; }
.th-meta{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.th-status{ font-size:12.5px; color:var(--muted); }
.flow-cards{ display:grid; grid-template-columns:1fr 262px; gap:20px; align-items:start; }
.fcard{ background:var(--surface); border:1px solid var(--line); border-radius:18px; padding:22px 24px; box-shadow:var(--shadow); }
.fcard-h{ display:flex; align-items:baseline; justify-content:space-between; gap:10px; font-size:11px; font-weight:700; letter-spacing:.09em; text-transform:uppercase; color:var(--faint); margin-bottom:14px; }
.fcard-h span{ letter-spacing:0; text-transform:none; font-weight:500; color:var(--muted); }
.t-visual{ background:color-mix(in srgb, var(--vc,var(--accent)) 8%, var(--surface)); border:1px solid var(--line); border-radius:12px; padding:10px 12px; margin-bottom:14px; }
.t-visual svg{ width:100%; height:auto; display:block; }
.t-line{ font-size:13.5px; color:var(--muted); line-height:1.5; margin:0 0 16px; }
.t-actions{ display:flex; gap:10px; flex-wrap:wrap; }
.flow-cta{ display:inline-flex; align-items:center; gap:8px; padding:11px 18px; border-radius:12px; border:none; cursor:pointer; font:inherit; font-weight:600; font-size:14px; background:var(--accent); color:var(--on-accent); }
.btn.ghost2, .ghost2{ background:color-mix(in srgb, var(--ink) 8%, transparent); color:var(--ink); border:1px solid var(--line); }
.fcard.side .side-item{ font-size:13px; color:var(--muted); padding:9px 0; border-bottom:1px solid var(--line); }
.fcard.side .side-item:last-child{ border-bottom:none; }
.side-chip{ display:inline-block; font-size:12.5px; font-weight:600; color:var(--ink); background:color-mix(in srgb, var(--ink) 8%, transparent); padding:5px 11px; border-radius:99px; }

/* ---- THE STAGE (founder decision 2026-09-08) ------------------------------
   Every stop opens INSIDE the topic card: the hero, the marks and the side
   card stay put and only the stage changes (home.js openStop). The activity
   cards were sized for their own views (a 680px column, centred); in the
   stage they fill the card. */
.t-stage{ margin-bottom:14px; }
.t-stage .dg-top{ max-width:none; margin:0 0 10px; }
.t-stage .dg-qcard,.t-stage .dg-card{ max-width:none; margin:0; box-shadow:none; }
.t-stage .dg-intro{ max-width:none; margin:0 0 12px; }
.t-stage .answer-display{ max-width:none; }
.t-stage .pg-loading{ padding:24px 0; }
/* `display:inline-flex` on a button beats the hidden attribute (seen once on
   the Continue card's doors); while a stop is open the primary and the line
   must actually go. */
#topicBody [hidden]{ display:none !important; }
/* The open stop is the current one: filled, so the row reads as tabs while a
   stop is open and as a road while none is. */
.road-stop.active{ background:var(--accent); border-color:var(--accent); color:var(--on-accent); }
/* The end of the road, and a finished stop. The two names are set apart from
   the sentence AND from each other: the mastered topic in the green of a
   right answer, the one it opens in the gold of the road ahead. */
.t-end{ border:1px solid color-mix(in srgb, #2FA96C 45%, var(--line)); border-radius:14px; padding:18px 20px;
  background:color-mix(in srgb, #2FA96C 9%, var(--surface)); }
#teachBody > .t-end{ margin-top:14px; }
.t-end-msg{ font-size:16.5px; line-height:1.75; color:var(--ink); margin:0 0 14px; }
.t-end .t-actions{ margin:0; }
.t-name{ display:inline-block; font-weight:700; padding:1px 10px; border-radius:99px; line-height:1.5; white-space:nowrap; }
.t-name.mastered{ background:color-mix(in srgb, #2FA96C 20%, transparent); color:var(--ink); border:1px solid #2FA96C; }
.t-name.opens{ background:var(--accent-wash); color:var(--goldtext); border:1px solid var(--accent); }
/* On a phone the hero and the marks would push an open stop below the fold:
   the hero folds to a slim bar while a stop is open (the title stays). */
@media (max-width:820px){
  #topicBody.stop-active .topic-hero{ padding:12px 16px; gap:12px; margin-bottom:12px; }
  #topicBody.stop-active .th-title{ font-size:19px; margin-bottom:4px; }
  #topicBody.stop-active .th-crumb{ margin-bottom:3px; }
  #topicBody.stop-active .th-status{ display:none; }
  #topicBody.stop-active .ring2{ width:54px; height:54px; }
  #topicBody.stop-active .ring2>span{ width:42px; height:42px; }
  #topicBody.stop-active .ring2 b{ font-size:12px; }
  #topicBody.stop-active .ring2 small{ display:none; }
}

/* ---- Settings ---- */
.set-grid{ display:grid; grid-template-columns:1fr 1fr; gap:20px; max-width:840px; }
.set-profile{ display:flex; align-items:center; gap:16px; margin-bottom:16px; }
.set-avatar{ width:84px; height:84px; flex:0 0 auto; border-radius:50%; background:var(--accent-wash); display:grid; place-items:center; overflow:hidden;
  border:0; padding:0; cursor:pointer; }
/* The face is a button now: it opens the creator (avatar round, 19 Nov 2026, repair 12). */
.set-avatar:focus-visible{ outline:3px solid var(--accent); outline-offset:3px; }
.set-avatar .mono{ color:var(--goldtext); }
.set-avatar svg{ width:100%; height:100%; display:block; }
.set-field{ margin-bottom:14px; }
.set-field label{ display:block; font-size:11.5px; font-weight:600; color:var(--faint); margin-bottom:6px; }
.set-input{ width:100%; border:2px solid var(--line); background:transparent; border-radius:12px; padding:10px 12px; font:inherit; font-size:14px; color:var(--ink); }
.set-input:focus{ outline:none; border-color:var(--accent); }
.set-input[readonly]{ color:var(--muted); }
/* A username is typed letter for letter: a fixed-width face keeps 1 and l apart. */
#setUsername{ font-family:ui-monospace,"SF Mono",Menlo,monospace; color:var(--ink); }
/* .set-theme / .set-row / .switch moved to /static/shell.css (2026-08-24):
   they are the shared accessibility controls now — the learner Settings page
   below and Shell.mountAccessibilitySettings render the same classes. */
.set-link{ border:none; background:none; color:var(--goldtext); font:inherit; font-size:13.5px; font-weight:600; cursor:pointer; padding:0; }
.set-link.set-danger{ color:#E4568A; }
.set-avatar-cta .btn.ghost2{ min-height:44px; padding:0 16px; font-size:13.5px; border-radius:22px; }

@media (max-width:820px){
  .flow-cards{ grid-template-columns:1fr; }
  .set-grid{ grid-template-columns:1fr; }
}

/* The Avatar Creator's chrome (.av-*) and the PIN/name modal chrome
   (.pin-*, .name-*, .set-name*) moved to shell.css on 2026-08-31. The carer's
   own name-and-face picker is now the same control — founder: "I want the UI
   of the setting the name and choosing the avatar for carers to look exactly
   like the learners" — and two sheets describing one control is how they stop
   looking alike. shell.css paints them for both. */

/* Near-equivalent picks under the continue card. The engine has always
   computed these (learner_plan.focus_alternatives) and only the retired
   classic shell rendered them; on the measured accuracy of the top pick a
   real choice is worth more than the ranking. Deliberately quiet — this is
   an offer, not a correction, and the recommended card stays the default. */
/* `.land-alts` / `.la-*` — the "or, if you'd rather" row — left with C+D
   (2026-08-27): option C is ONE next thing, and three near-equivalent picks
   under it is the competition the decision removes. plan.focus_alternatives
   still exists; only this row is gone. */

/* ---- the weekly league ---------------------------------------------------
   The first surface in this product where one learner sees another. Every name
   on it is self-chosen; the server never sends a real name or a learner id
   here, and the table never crosses an institution (leagues.py enforces both).

   The promotion and relegation bands are marked with an edge stripe AND a word
   in the note beneath, never colour alone. */
.lg-note{ font-size:13.5px; line-height:1.6; color:var(--muted); margin:0 0 16px; max-width:60ch; }
/* The explainer + ladder that make Bronze mean something (2026-08-22). */
/* Stepping out is a real choice, quietly offered — a text control, not a CTA. */
.lg-leave{ display:inline-block; margin-top:18px; border:none; background:none; cursor:pointer;
  font:inherit; font-size:13px; color:var(--muted); text-decoration:underline; padding:4px 0; }
.lg-leave:hover{ color:var(--ink); }
/* The explorer's own face on their row (founder ask, 2026-09-03), or the
   first letter of their explorer name where they never built one. 60px —
   "twice as big", the founder's second ask the same day. */
.lg-face{ width:60px; height:60px; border-radius:50%; overflow:hidden; display:grid;
  place-items:center; background:var(--accent-wash); }
.lg-face svg{ width:100%; height:100%; display:block; }
.lg-mono{ font-family:"Poppins",sans-serif; font-weight:700; font-size:22px; color:var(--ink); }
.lg-rank{ font-family:"Poppins",sans-serif; font-weight:700; font-size:14px; color:var(--faint);
  text-align:center; }
.lg-name{ font-size:14.5px; color:var(--ink); min-width:0; overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap; }
.lg-xp{ font-family:"Poppins",sans-serif; font-weight:700; font-size:13px; color:var(--goldtext);
  white-space:nowrap; }

/* ---- Momentum pill (practice header) + today's quest strip -------------- */
/* Colour from a token, never a raw hex: most hex literals in this file are dead
   var() fallback arms, and a new one here would be a real theme bug on the two
   dark themes. --heart is defined in all THREE theme roots (the default in
   shell.css, the two learner swatches at the top of this file). */
/* The compact momentum meter that sat in the practice question header left with GF8 a
   (founder decision 2026-11-19: "The answer bonus tells; it does not ask"). */
.dg-won{ display:block; margin-top:6px; font-size:12.5px; color:var(--xp); font-weight:600; }

/* ---- ITEM 16 · THE COMPOSER ---------------------------------------------
   Founder decision 2026-08-30: Post is a button that opens a sheet, and the
   sheet carries TWO tools — a picture from our own gallery, and a poll.

   Upload, Camera and a Giphy / YouTube / Spotify search were all scrapped the
   same day. `stickers.js` records what each would have cost; the short version
   is that a gallery we draw ourselves stores an id rather than an image, so it
   needs no object storage, no size or type gate, no erasure path of its own and
   no widening of the app's `'self'`-only Content-Security-Policy.  */

.board-post{ position:absolute; right:var(--bd-gutter, 36px); bottom:24px;
  z-index:5; display:inline-flex; align-items:center; gap:9px;
  padding:13px 22px 13px 18px; border:none; border-radius:var(--radius-pill, 99px);
  background:var(--accent); color:var(--on-accent);
  font:inherit; font-family:"ITC Ronda","Poppins",sans-serif; font-size:17px; font-weight:700;
  box-shadow:0 10px 26px -8px rgba(0,0,0,.55); cursor:pointer; }
.board-post[hidden]{ display:none; }
.board-post .bp-plus{ font-size:20px; line-height:1; }
.board-post:focus-visible{ outline:2px solid var(--ink); outline-offset:3px; }
/* The view is the positioning context: the button rides the board, not the
   page, so it stays put while the canvas scrolls sideways under it. */
#view-board{ position:relative; }

.compose-scrim{ position:fixed; inset:0; z-index:var(--z-modal, 350);
  display:grid; place-items:center; padding:20px; background:rgba(0,0,0,.55); }
.compose-scrim[hidden]{ display:none; }
/* It arrives like every pop-up: the keyframes are branding.css's (3c), and so is the
   timing, written out here because this sheet takes no branding.css tokens
   (test_tutor_chat_contrast). */
.compose-scrim{ animation:sm-scrim-in .24s ease-out; }
.compose{ animation:sm-pop-in .34s cubic-bezier(.16,1,.3,1); }
.compose{ width:100%; max-width:420px; max-height:min(88vh, 720px); overflow-y:auto;
  border-radius:18px; background:var(--surface); color:var(--ink);
  border:1px solid var(--line); box-shadow:var(--glass-shadow); padding:12px 14px 16px; }
.compose-top{ display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.compose-x{ width:32px; height:32px; display:grid; place-items:center; border:none;
  border-radius:50%; background:color-mix(in srgb, var(--ink) 10%, transparent);
  color:var(--ink); cursor:pointer; }
.compose-x svg{ width:15px; height:15px; }
.compose-x:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.compose-go{ margin-left:auto; border:none; border-radius:var(--radius-pill, 99px);
  padding:9px 20px; background:var(--accent); color:var(--on-accent);
  font:inherit; font-weight:700; font-size:14px; cursor:pointer; }
/* Inactive until there is something to post. A disabled control still has to be
   legible — `opacity:.5` on gold over --surface drops it under 3:1 on the white
   theme, so this changes the FILL rather than fading it. */
.compose-go:disabled{ background:color-mix(in srgb, var(--ink) 12%, transparent);
  color:var(--muted); cursor:default; }
.compose-go:focus-visible{ outline:2px solid var(--ink); outline-offset:2px; }

.compose-tools{ display:flex; gap:8px; }
.ctool{ flex:1 1 0; min-width:0; display:flex; flex-direction:column; align-items:center;
  justify-content:center; gap:7px; padding:14px 6px; cursor:pointer;
  border:1px dashed var(--line); border-radius:12px; background:transparent;
  color:var(--muted); font:inherit; font-size:11px; }
.ctool svg{ width:21px; height:21px; }
.ctool b{ font-weight:600; }
.ctool:hover{ color:var(--ink); background:color-mix(in srgb, var(--ink) 6%, transparent); }
/* Pressed carries a FILL AND A RING, never a hue alone: --accent against
   --surface is 1.64:1 on the white theme, under the 3:1 floor SC 1.4.11 sets
   for a non-text indicator. aria-pressed carries it for a screen reader. */
.ctool[aria-pressed="true"]{ background:var(--accent-wash); color:var(--ink);
  border-style:solid; box-shadow:inset 0 0 0 2px var(--ink); }
.ctool:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }

.gallery{ margin-top:12px; display:flex; flex-direction:column; gap:12px;
  max-height:238px; overflow-y:auto; }
.gallery[hidden]{ display:none; }
.gal-h{ margin:0 0 6px; font-family:"Poppins",sans-serif; font-size:10px; font-weight:700;
  letter-spacing:.11em; text-transform:uppercase; color:var(--faint); }
.gal-row{ display:grid; grid-template-columns:repeat(4, 1fr); gap:7px; }
.gal{ aspect-ratio:1; display:grid; place-items:center; padding:9px; cursor:pointer;
  border:1px solid var(--line); border-radius:10px; background:var(--paper); color:var(--ink); }
.gal:hover{ border-color:var(--accent); }
.gal.on{ background:var(--accent-wash); box-shadow:inset 0 0 0 2px var(--ink); }
.gal:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.gal svg{ width:100%; height:100%; }

.chosen{ display:flex; align-items:center; gap:10px; margin-top:12px;
  border:1px solid var(--line); border-radius:12px; padding:8px 10px; background:var(--paper); }
.chosen[hidden]{ display:none; }
.chosen-art{ flex:0 0 auto; width:34px; height:34px; display:grid; place-items:center; color:var(--ink); }
.chosen-art svg{ width:34px; height:34px; }
.chosen-name{ flex:1; min-width:0; font-size:12.5px; color:var(--ink);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chosen-x{ flex:0 0 auto; border:none; background:none; padding:0; font:inherit; font-size:11.5px;
  color:var(--muted); text-decoration:underline; cursor:pointer; }
.chosen-x:hover{ color:var(--ink); }
.chosen-x:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }

.compose .board-input{ width:100%; margin-top:12px; }
.poll-fields{ display:flex; flex-direction:column; gap:6px; margin-top:10px; }
.poll-fields[hidden]{ display:none; }
.poll-in{ font:inherit; font-size:12.5px; color:var(--ink); background:var(--paper);
  border:1px solid var(--line); border-radius:10px; padding:8px 11px; }
.poll-in:focus-visible{ outline:2px solid var(--accent); outline-offset:1px; }

/* A PICTURE ON A CARD. Sized so it reads at a glance down a narrow day column
   without taking the words' place — the picture is a mood, the words are the
   post. */
.pin-art{ display:grid; place-items:center; width:46px; height:46px; margin:2px 0 7px;
  color:var(--ink); }
.pin-art svg{ width:46px; height:46px; }

/* A FACE, not an initial. The avatar is a full-body explorer, so the circle
   crops to the head — the same trick .chat-face uses for the carer. */
.pin .av.face{ overflow:hidden; background:var(--magnet); }
/* A whole figure drawn straight into the circle (the board's own crop); the face in its circle
   (QuestAvatar.face, avatar round 19 Nov 2026) sizes itself. */
.pin .av.face > svg{ width:78px; height:78px; margin-top:6px; }

/* ---- ITEM 16 · EDITING A REPLY, AND A CLOSED POLL'S RESULT --------------
   Two founder decisions, 2026-08-30. */

.rep-edit-btn{ border:none; background:none; padding:0; font:inherit; font-size:10px;
  color:var(--muted); text-decoration:underline; cursor:pointer; }
.rep-edit-btn:hover{ color:var(--ink); }
.rep-edit-btn:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.rep-edit{ display:flex; gap:5px; margin:5px 0; flex-wrap:wrap; }
.rep-edit input{ flex:1 1 100%; min-width:0; font:inherit; font-size:11.5px; color:var(--ink);
  background:var(--paper); border:1px solid var(--line); border-radius:4px; padding:6px 9px; }
.rep-edit input:focus-visible{ outline:2px solid var(--accent); outline-offset:1px; }
.rep-edit button{ border:none; border-radius:4px; padding:5px 11px; font:inherit; font-size:11px;
  font-weight:600; background:var(--accent); color:var(--on-accent); cursor:pointer; }
.rep-edit button.rep-cancel{ background:transparent; color:var(--muted); font-weight:400;
  text-decoration:underline; padding:5px 4px; }

.poll-close{ margin-top:7px; border:1px solid var(--line); border-radius:99px;
  padding:5px 12px; background:transparent; color:var(--muted);
  font:inherit; font-size:11px; cursor:pointer; }
.poll-close:hover{ color:var(--ink); border-color:var(--accent); }
.poll-close:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }

/* TALLY DOTS, while the poll is open (founder pick 2026-08-30). One filled dot
   per vote, hollow for the rest of the household. */
.tallies{ display:flex; gap:3px; margin-left:auto; flex:0 0 auto; }
.tally{ width:9px; height:9px; border-radius:50%; background:var(--accent); }
/* A hollow dot is a RING, not a faded fill: --accent at low opacity drops under
   the 3:1 floor for a non-text indicator on the white theme, and the difference
   between "voted" and "could still vote" is the whole point of the row. */
.tally.off{ background:transparent; box-shadow:inset 0 0 0 1.5px var(--line); }

/* THE RESULT, once closed: ONE BAR, SHARED OUT. One bar rather than four,
   because at three votes four nearly-equal lengths compare worse than shares of
   the same thing.

   THIS IS THE ONE PLACE ON THE BOARD WITH A COLOUR PER CATEGORY, so the four
   hues are a validated palette rather than a choice: run through the dataviz
   validator against ALL THREE theme surfaces (#37164E purple, #171C24 black,
   #FFFFFF white) — lightness band, chroma floor, CVD separation, normal-vision
   floor and contrast all PASS, in this order. The order is load-bearing: green
   beside orange scored ΔE 6.9 under protanopia (a WARN), and moving purple
   between them takes the worst adjacent pair to 16.5. Do not reorder these
   without re-running it.

   Colour never carries identity alone: every segment prints its own count, the
   key direct-labels each with its option and its voters, and a 2px gap
   separates the fills. */
.poll-result{ margin-top:8px; display:flex; flex-direction:column; gap:8px; text-align:left; }
.pr-head{ font-family:"Poppins",sans-serif; font-size:9.5px; font-weight:700;
  letter-spacing:.1em; text-transform:uppercase; color:var(--faint); }
.pr-bar{ display:flex; gap:2px; height:26px; border-radius:6px; overflow:hidden; }
.pr-seg{ display:grid; place-items:center; min-width:14px;
  font-size:11px; font-weight:700; color:#12140F; font-variant-numeric:tabular-nums; }
.pr-c0{ background:#3B86D8; }
.pr-c1{ background:#2E9E63; }
.pr-c2{ background:#A75BC7; }
.pr-c3{ background:#D9752B; }
.pr-key{ display:flex; flex-direction:column; gap:5px; }
.pr-k{ display:flex; align-items:baseline; gap:7px; font-size:10.5px; color:var(--muted);
  overflow-wrap:anywhere; }
.pr-k b{ color:var(--ink); font-weight:600; }
.pr-sw{ width:10px; height:10px; border-radius:3px; flex:0 0 auto; align-self:center; }

/* The composer's write row: the box and the emoji button side by side. */
.compose-write{ display:flex; align-items:flex-end; gap:8px; margin-top:12px; }
.compose-write .board-input{ flex:1; min-width:0; margin-top:0; }
.chat-form .emoji-host{ flex:0 0 auto; }

/* Editing or removing your own POST (founder decision 2026-08-30). Quieter than
   Reply: these are the controls you want findable and not inviting. */
.pin-own{ border:none; background:none; padding:0; font:inherit; font-size:11px;
  color:var(--muted); text-decoration:underline; cursor:pointer; }
.pin-own:hover{ color:var(--ink); }
.pin-own:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.pin-edited{ font-size:9.5px; color:var(--faint); }
.pin-edit{ display:flex; flex-direction:column; gap:6px; margin:2px 0 4px; }
.pin-edit textarea{ width:100%; resize:none; font:inherit; font-size:12.5px; line-height:1.45;
  color:var(--ink); background:var(--paper); border:1px solid var(--line);
  border-radius:4px; padding:7px 9px; }
.pin-edit textarea:focus-visible{ outline:2px solid var(--accent); outline-offset:1px; }
.pin-edit-row{ display:flex; gap:6px; }
.pin-edit-row button{ border:none; border-radius:4px; padding:5px 11px; font:inherit;
  font-size:11px; font-weight:600; background:var(--accent); color:var(--on-accent); cursor:pointer; }
.pin-edit-row button.rep-cancel{ background:none; color:var(--muted); font-weight:400;
  text-decoration:underline; padding:5px 4px; }

/* CT4d: a college teacher's note, above the one next thing (home-landing.js). */
.land-note{ display:flex; flex-wrap:wrap; align-items:center; justify-content:center; text-align:center; gap:6px 12px; margin:0 0 14px;
  padding:12px 14px; border-radius:14px; border:1px solid color-mix(in srgb, var(--goldtext) 55%, transparent);
  background:color-mix(in srgb, var(--goldtext) 10%, transparent); color:var(--ink); }
.land-note[hidden]{ display:none; }
.land-note .ln-from{ font-size:11px; font-weight:700; letter-spacing:.07em; text-transform:uppercase; flex-basis:100%; }
.land-note .ln-body{ flex:1 1 16rem; font-size:15px; line-height:1.45; }
.land-note .ln-ok{ font:inherit; font-size:14px; font-weight:600; padding:6px 14px; border-radius:99px; cursor:pointer;
  border:1px solid color-mix(in srgb, var(--ink) 30%, transparent); background:transparent; color:var(--ink); }
.land-note .ln-ok:focus-visible{ outline:2px solid var(--goldtext); outline-offset:2px; }

/* A QUESTIONNAIRE, until it's finished (founder decisions 2026-10-11, "Student B";
   home-survey.js). The dot on the menu button and the sheet live here; the yellow box under
   the topbar is the carer's (shell.css `.survey-banner`, "Student A", 2026-10-12). */
.rail-open.has-survey::after{ content:""; position:absolute; top:-4px; right:-4px; width:12px; height:12px;
  border-radius:50%; background:var(--accent); border:2px solid var(--paper); }
/* THE SHEET — look "C" (founder, 2026-10-11 late: "go ahead with C"; canvas L1aeVjFuqM5cyuUq8TKtMd):
   a green panel with the student's own avatar beside a big +XP coin, then "Got 4 minutes,
   <name>?", why, who sees it, one button. A bottom sheet on a phone; from 900px a two-column
   card in the middle of the screen, the panel on the left. The panel's colours are fixed —
   it is a picture, the same in every theme; everything else follows the theme. */
.survey-sheet-wrap{ position:fixed; inset:0; z-index:var(--z-modal); display:flex; align-items:flex-end; justify-content:center;
  background:rgba(12,4,20,.62); }
.survey-sheet-wrap[hidden]{ display:none; }
/* Up from the bottom on a phone, popped in from 900px (below). Keyframes: branding.css (3c). */
.survey-sheet-wrap{ animation:sm-scrim-in .24s ease-out; }
.survey-sheet{ animation:sm-sheet-in .34s cubic-bezier(.16,1,.3,1); }
.survey-sheet{ position:relative; width:100%; max-width:520px; box-sizing:border-box; background:var(--surface); color:var(--ink);
  border-radius:28px 28px 0 0; padding:12px 20px 22px; display:flex; flex-direction:column; gap:16px;
  box-shadow:0 -12px 40px rgba(0,0,0,.35); }
.survey-grab{ align-self:center; width:40px; height:5px; border-radius:99px; background:color-mix(in srgb, var(--ink) 28%, transparent); }
.survey-x{ display:none; position:absolute; right:14px; top:14px; z-index:1; width:44px; height:44px; border-radius:50%; border:0;
  align-items:center; justify-content:center; padding:0; cursor:pointer;
  background:color-mix(in srgb, var(--ink) 8%, transparent); color:var(--ink); }
.survey-x svg{ width:18px; height:18px; }
.survey-x:focus-visible{ outline:2px solid var(--accent-ink); outline-offset:2px; }
.survey-stage{ position:relative; height:178px; flex:0 0 auto; border-radius:22px; background:#9BE2C8; overflow:hidden;
  display:flex; align-items:flex-end; justify-content:space-between; padding:0 28px 0 22px; }
.survey-blob{ position:absolute; display:block; }
.survey-blob-a{ left:-30px; top:-40px; width:140px; height:140px; border-radius:50%; background:#B8EDDA; }
.survey-blob-b{ right:70px; bottom:-50px; width:120px; height:120px; border-radius:30px; background:#86D6B9; transform:rotate(18deg); }
.survey-avatar{ position:relative; display:block; }
.survey-avatar svg{ display:block; width:118px; height:170px; }
.survey-coin{ position:relative; align-self:center; flex:0 0 auto; width:118px; height:118px; box-sizing:border-box; border-radius:50%;
  background:#F6BD00; border:6px solid #FFE08A; box-shadow:0 8px 0 #C99A00; color:#260B37;
  display:flex; flex-direction:column; align-items:center; justify-content:center; }
.survey-coin b{ font-size:34px; font-weight:800; line-height:1; }
.survey-coin span{ font-size:14px; font-weight:700; letter-spacing:.08em; }
.survey-spark{ position:absolute; display:block; stroke:#260B37; fill:none; }
.survey-spark-a{ right:22px; top:18px; width:22px; height:22px; stroke-width:2; }
.survey-spark-b{ right:150px; top:26px; width:14px; height:14px; stroke-width:2.4; }
.survey-body{ display:flex; flex-direction:column; gap:16px; min-width:0; }
.survey-words{ display:flex; flex-direction:column; gap:8px; }
.survey-kicker{ display:none; font-size:12px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--accent-ink); }
.survey-sheet h2{ margin:0; font-size:26px; line-height:1.15; font-weight:700; letter-spacing:-.015em; }
.survey-sheet p{ margin:0; font-size:15.5px; line-height:1.55; }
.survey-sheet .survey-private{ display:flex; align-items:center; gap:8px; font-size:13px; color:var(--muted); }
.survey-private svg{ flex:0 0 auto; width:16px; height:16px; }
.survey-sheet .survey-go{ display:flex; align-items:center; justify-content:center; gap:10px; min-height:56px; box-sizing:border-box;
  text-decoration:none; font-weight:600; font-size:16px; background:var(--accent); color:var(--on-accent); border-radius:18px; padding:0 16px; }
.survey-go svg{ width:18px; height:18px; }
.survey-sheet .survey-go:focus-visible{ outline:2px solid var(--ink); outline-offset:2px; }
.survey-sheet-foot{ display:flex; justify-content:space-between; gap:12px; margin-top:-6px; }
.survey-quiet[data-survey-close]{ text-decoration:none; }
@media (min-width: 900px){
  .survey-sheet-wrap{ align-items:center; padding:24px; }
  .survey-sheet{ animation-name:sm-pop-in; }
  .survey-sheet{ max-width:770px; flex-direction:row; gap:28px; padding:14px; border-radius:28px; box-shadow:0 24px 60px rgba(0,0,0,.45); }
  .survey-grab{ display:none; }
  .survey-x{ display:flex; }
  .survey-stage{ flex:0 0 300px; height:auto; min-height:420px; border-radius:20px; justify-content:center; padding:0; }
  .survey-blob-a{ left:-50px; top:-50px; width:200px; height:200px; }
  .survey-blob-b{ right:-40px; bottom:60px; width:150px; height:150px; border-radius:36px; }
  .survey-avatar{ margin-left:-50px; }
  .survey-avatar svg{ width:180px; height:265px; }
  .survey-coin{ position:absolute; right:24px; top:24px; width:118px; height:118px; }
  .survey-coin b{ font-size:36px; }
  .survey-spark-a{ left:30px; right:auto; top:40px; width:24px; height:24px; }
  .survey-spark-b{ right:40px; top:180px; width:15px; height:15px; }
  .survey-body{ flex:1; justify-content:center; gap:18px; padding:28px 30px 20px 0; }
  .survey-words{ gap:10px; }
  .survey-kicker{ display:block; }
  .survey-sheet h2{ font-size:34px; line-height:1.12; letter-spacing:-.02em; }
  .survey-sheet p{ font-size:16.5px; }
  .survey-sheet .survey-private{ font-size:13.5px; }
}
/* The thank-you after finishing: once, until it is closed (home-survey.js). */
.survey-thanks{ display:flex; align-items:center; gap:12px; margin:12px 32px 0; padding:14px 16px; border-radius:16px;
  background:var(--accent-wash); border:1px solid var(--accent); color:var(--ink); }
.survey-thanks[hidden]{ display:none; }
.survey-thanks-xp{ flex:0 0 auto; padding:6px 12px; border-radius:99px; background:var(--accent); color:var(--on-accent);
  font-size:15px; font-weight:700; white-space:nowrap; }
.survey-thanks-text{ flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.survey-thanks-title{ font-size:15px; font-weight:600; }
.survey-thanks-sub{ font-size:13px; color:var(--muted); }
.survey-thanks-ok{ flex:0 0 auto; font:inherit; font-size:14px; font-weight:600; padding:8px 16px; min-height:44px; border-radius:99px;
  border:1px solid color-mix(in srgb, var(--ink) 30%, transparent); background:transparent; color:var(--ink); cursor:pointer; }
.survey-thanks-ok:focus-visible{ outline:2px solid var(--accent-ink); outline-offset:2px; }
.survey-quiet{ background:none; border:0; color:var(--muted); font:inherit; font-size:14px; text-decoration:underline;
  cursor:pointer; padding:10px 4px; min-height:44px; }
.survey-quiet:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
@media (max-width: 840px){ .survey-thanks{ margin:12px 16px 0; } }

/* An FE college learner's own parent/carer (2026-11-18): the add/edit/remove
   dialogs ride the shared .pin-overlay/.pin-box shell (shell.css) and its
   .set-lab/.pin-input field styling (already used by the password-change
   form), but need their own close button and actions row — .pin-actions
   above this point in the file is the pinboard's heart row, a same-named,
   unrelated rule that would otherwise win here too. */
.hm-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.hm-head h2{ margin:0; }
.hm-close{ display:grid; place-items:center; flex:0 0 auto; width:32px; height:32px;
  margin:-6px -6px 0 0; border:none; border-radius:10px; background:none; color:var(--muted); cursor:pointer; }
.hm-close:hover{ background:color-mix(in srgb, var(--ink) 8%, transparent); color:var(--ink); }
.hm-close:focus-visible{ outline:2px solid var(--accent); outline-offset:1px; }
.hm-close svg{ width:18px; height:18px; stroke:currentColor; fill:none; }
.hm-field{ margin-top:12px; }
.hm-actions{ display:flex; align-items:center; justify-content:flex-end; gap:9px; margin-top:16px; flex-wrap:wrap; }

