/* THE LEARNER REFRESH KIT (founder approval 2026-10-14, design canvas
   https://claude.ai/artifact/Kz1eGi53ASbASnsmAb3eVd).

   One file, loaded LAST, so every part of the refresh can be dialled back or
   reverted in one place (the founder's standing rule for visual work: keep
   each experiment separately revertible). It reuses the shell's theme tokens
   (--paper, --surface, --ink, --muted, --faint, --line, --accent, --on-accent)
   and adds only what the three themes do not already say.

   What lives here:
     .hud / .hud-pill     the counters on every screen: streak, XP today, league
     .tabbar / .tab       the bar along the bottom of a phone
     the rail's compact world rows and its "you are here" state
*/

:root{
  --k-lip: color-mix(in srgb, var(--accent) 62%, #000);
  --k-flame: #FF8A3D;
  --k-good: #4FD1A5;
  --k-warn: #FF9A5C;
  --k-tabbar-h: 68px;
}
:root[data-theme="white"]{
  --k-lip: color-mix(in srgb, var(--accent) 70%, #5a3d00);
  --k-flame: #D9581C;
  --k-good: #1E9E74;
  --k-warn: #C4561F;
}

/* ------------------------------------------------------------ counters -- */
.hud{ display:flex; align-items:center; gap:8px; }
.hud[hidden]{ display:none; }
.hud-pill{ display:inline-flex; align-items:center; gap:6px; height:36px; padding:0 12px;
  border-radius:999px; border:1px solid var(--line); background:var(--surface);
  color:var(--ink); font:600 15px/1 "ITC Ronda", "Poppins", system-ui, sans-serif;
  font-variant-numeric:tabular-nums; cursor:pointer; white-space:nowrap; }
.hud-pill:hover{ background:color-mix(in srgb, var(--surface) 82%, var(--ink)); }
.hud-pill:focus-visible{ outline:var(--focus-ring); outline-offset:2px; }
.hud-pill[hidden]{ display:none; }
.hud-pill svg{ width:19px; height:19px; flex:none; }
.hud-pill .hud-num{ min-width:1ch; }
.hud-streak svg{ fill:var(--k-flame); }
/* Not yet safe for today: the flame waits, unlit, until one thing is done. */
.hud-streak.waiting svg{ fill:none; stroke:var(--k-flame); stroke-width:1.8; }
.hud-xp svg{ fill:var(--accent); }
.hud-league svg{ fill:#C9D3E0; }
.hud-league[data-tier="0"] svg{ fill:#C98A5B; }
.hud-league[data-tier="2"] svg{ fill:var(--accent); }
.hud-league[data-tier="3"] svg{ fill:#5B8DEF; }
.hud-league[data-tier="4"] svg{ fill:#9FD8F5; }
:root[data-theme="white"] .hud-league svg{ stroke:var(--ink); stroke-width:1; }
.hud-league .hud-tier{ font-weight:600; }
@media (prefers-reduced-motion: no-preference){
  :root:not([data-motion="off"]) .hud-streak:not(.waiting) svg{ animation:kFlick 1.6s ease-in-out infinite; transform-origin:50% 90%; }
}
@keyframes kFlick{ 0%,100%{ transform:scale(1) rotate(0); } 50%{ transform:scale(1.07) rotate(-2deg); } }

/* ------------------------------------------------------- the phone bar -- */
.tabbar{ display:none; }
@media (max-width:840px){
  /* As many equal columns as there are tabs: a Diagnostic-only place has no Practice tab. */
  .tabbar{ display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0, 1fr);
    position:fixed; left:0; right:0; bottom:0; z-index:120;
    height:calc(var(--k-tabbar-h) + env(safe-area-inset-bottom, 0px));
    padding:6px 6px env(safe-area-inset-bottom, 0px);
    background:var(--rail); border-top:1px solid var(--line); }
  .tab{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px;
    background:none; border:0; color:var(--faint); font:600 11px/1 "Poppins", system-ui, sans-serif;
    border-radius:12px; cursor:pointer; min-width:0; position:relative; }
  .tab[hidden]{ display:none; }
  .tab:focus-visible{ outline:var(--focus-ring); outline-offset:-2px; }
  .tab .tab-ic{ width:48px; height:30px; border-radius:999px; display:flex; align-items:center; justify-content:center; }
  .tab svg{ width:22px; height:22px; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
  .tab.on{ color:var(--ink); }
  .tab.on .tab-ic{ background:var(--accent-wash); }
  /* 11px, from 10px: the count on a tab (2026-11-21, the founder's pick X: no label under 11px). */
  .tab .tag{ position:absolute; top:2px; left:calc(50% + 6px); min-width:18px; height:18px; padding:0 5px;
    border-radius:9px; background:var(--accent); color:var(--on-accent); font:700 11px/18px "Poppins", sans-serif; text-align:center; }
  /* Room for the bar under every screen it sits on. */
  .app:not(.focus) .content{ padding-bottom:calc(var(--k-tabbar-h) + 24px); }
  /* A focused activity (a question, a stop on the road, the tutor, the map
     of what you know) takes the whole phone: no bar, the screen's own way back. */
  .app.focus .tabbar{ display:none; }
}

/* ----------------------------------------------------------- the rail -- */
/* The worlds are rows now, not cards: the menu carries Today, Daily mix,
   League and Me above them, so each world gives back a little height. */
.rail .world{ padding:6px 10px; gap:12px; min-height:42px; margin-bottom:2px; border-radius:12px; }
.rail .world .ring{ width:30px; height:30px; }
.rail .world .ring > span{ width:22px; height:22px; }
.rail .world .ring > span svg{ width:15px; height:15px; }
.rail .world .w-name{ font-size:14px; }
.rail .world .w-sub{ font-size:11.5px; }
.rail .world.on{ background:color-mix(in srgb, var(--w) 16%, transparent); }
.rail .world.on .w-name{ color:var(--ink); }

/* "Silver · 4th" on a computer; just "4th" where the bar is narrow. */
.hud-league .hud-tier:not(:empty)::after{ content:" · "; font-weight:500; color:var(--muted); }
@media (max-width:840px){
  .hud{ gap:6px; }
  .hud-pill{ height:34px; padding:0 10px; font-size:14px; gap:5px; }
  .hud-league .hud-tier{ display:none; }
}
/* On the narrowest phones the household's two entries keep their dot and drop their
   word, so the counters fit beside them. The words stay on every wider screen (the
   2026-08-30 decision was made at computer width). */
@media (max-width:520px){
  .topbar-pip .pip-label{ display:none; }
  /* A 390px phone holds the menu button, the household's two dots and the three
     counters on one line only if everything gives back a little (the league pill ran
     off the edge at 390px, seen in the phase 6 captures, 2026-10-14). */
  .topbar{ gap:6px; }
  .hud{ gap:4px; }
  .hud-pill{ height:32px; padding:0 8px; gap:4px; font-size:13.5px; }
  .hud-pill svg{ width:17px; height:17px; }
}
/* Paused access: no menu, so no counters and no bar either. */
.access-paused .hud, .access-paused .tabbar{ display:none !important; }

/* The menu is taller than a laptop screen now it carries four items above the worlds.
   The rail is a flex column that scrolls; without this its rows SHRINK to fit instead
   (the four items squashed to 18px on a 728px rail, seen 2026-10-14). */
.rail > *{ flex-shrink:0; }

/* ---- phase 6: Me and League (founder approval 2026-10-14) ---- */
/* ME: fewer, bigger pieces. Two columns on a wide screen, one on a phone. */
.me-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.me-head-text{ min-width:0; }
.me-gear{ display:inline-flex; align-items:center; gap:8px; height:40px; padding:0 14px; border-radius:12px;
  border:1px solid var(--line); background:var(--surface); color:var(--ink); font:600 14px/1 "Poppins", sans-serif; cursor:pointer; flex:none; }
.me-gear svg{ width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.7; }
.me-gear:focus-visible{ outline:var(--focus-ring); outline-offset:2px; }
.me-grid{ display:grid; grid-template-columns:minmax(0, 1.35fr) minmax(0, 1fr); gap:16px; align-items:start; margin-top:16px; }
.me-col{ display:flex; flex-direction:column; gap:16px; min-width:0; }
.me-card{ background:var(--surface); border:1px solid var(--line); border-radius:20px; padding:18px; min-width:0; }
.me-h{ display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:4px 12px; margin-bottom:12px; }
.me-h h3{ white-space:nowrap; }
.me-h h3{ margin:0; font:600 16px/1.3 "Poppins", sans-serif; color:var(--ink); }
.me-h span{ font-size:12.5px; color:var(--muted); }

/* An FE college learner's own parent/carer card (2026-11-18). */
.pcard-meta{ margin:0 0 12px; font-size:13.5px; line-height:1.5; color:var(--muted); }
.pcard-actions{ display:flex; gap:9px; flex-wrap:wrap; }

.me-hero{ display:grid; grid-template-columns:140px minmax(0, 1fr); padding:0; overflow:hidden; }
.me-av{ background:var(--accent-wash); display:flex; align-items:flex-end; justify-content:center; min-height:170px; overflow:hidden; }
.me-av svg{ width:132px; height:auto; display:block; }
.me-av .mono{ display:grid; place-items:center; width:100%; height:100%; color:var(--ink); }
.me-id{ padding:18px 20px; display:flex; flex-direction:column; gap:6px; min-width:0; }
.me-name-row{ display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; }
.me-name{ font-size:28px; line-height:1.1; color:var(--ink); overflow-wrap:anywhere; }
.me-lvl{ font-size:13px; color:var(--muted); }
.me-xpbar{ height:12px; border-radius:999px; background:var(--track); overflow:hidden; margin-top:4px; }
.me-xpbar span{ display:block; height:100%; border-radius:999px; background:var(--accent); }
.me-xp{ margin:0; font-size:12.5px; color:var(--muted); }
.me-xp b{ color:var(--ink); font-weight:600; }
.me-minis{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:12px; margin-top:auto; padding-top:8px; }
.me-minis > div{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.me-minis b{ font:600 20px/1.1 "ITC Ronda", "Poppins", sans-serif; color:var(--ink); }
.me-minis small{ font-size:12px; color:var(--muted); }
.me-minis .pg-gaps{ margin:0; padding:0; border:0; background:none; }

.me-streak{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; padding:14px; }
.me-tile{ display:flex; flex-direction:column; gap:4px; padding:12px; border-radius:14px; background:color-mix(in srgb, var(--surface) 80%, var(--paper)); min-width:0; }
.me-ic{ width:30px; height:30px; border-radius:10px; display:grid; place-items:center; color:var(--k-flame);
  background:color-mix(in srgb, var(--k-flame) 16%, transparent); }
.me-ic svg{ width:18px; height:18px; }
.me-flame.waiting svg path{ fill:none; stroke:currentColor; stroke-width:1.6; }
.me-big{ font:600 20px/1.1 "ITC Ronda", "Poppins", sans-serif; color:var(--ink); }
.me-small{ font-size:12px; color:var(--muted); }
.me-frz{ align-self:flex-start; font-size:11.5px; font-weight:600; color:var(--ink); padding:2px 8px; border-radius:999px;
  background:color-mix(in srgb, #7CD4FF 22%, transparent); }

.me-worlds{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:14px 8px; }
.me-world{ display:flex; flex-direction:column; align-items:center; gap:4px; text-align:center; min-width:0; }
.me-wring{ width:56px; height:56px; border-radius:50%; display:grid; place-items:center;
  background:conic-gradient(var(--w) 0 var(--pct), var(--track) var(--pct) 100%); }
.me-wring > span{ width:42px; height:42px; border-radius:50%; background:var(--surface); display:grid; place-items:center;
  font:600 15px/1 "ITC Ronda", "Poppins", sans-serif; color:var(--ink); }
.me-wname{ font-size:12.5px; font-weight:600; color:var(--ink); max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.me-wsub{ font-size:11.5px; color:var(--muted); }

.me-card .badge-grid{ grid-template-columns:repeat(auto-fill, minmax(132px, 1fr)); }
.me-recent{ display:flex; flex-wrap:wrap; gap:8px; }
.me-chip{ display:inline-flex; align-items:center; gap:6px; padding:6px 12px; border-radius:999px; border:1px solid var(--line);
  font-size:13px; color:var(--ink); max-width:100%; }
.me-chip .pr-ic svg{ width:14px; height:14px; }
.me-chip .pr-date{ color:var(--muted); font-size:12px; }
.me-card.pg-next-reward{ margin:0; }
.goal-week{ margin:0 0 4px; font-size:13.5px; color:var(--ink); }
.me-col > .pg-month{ margin-top:0; }
/* In the wide column the month's squares would grow to ~56px; keep them calendar-sized. */
.me-col > .pg-month .mg{ max-width:330px; }
/* The month carries the streak on a wide screen; a phone reads the streak card. */
.me-streak{ display:none; }
@media (max-width:1100px){
  .me-grid{ grid-template-columns:minmax(0, 1fr); }
}
@media (max-width:840px){
  .me-streak{ display:grid; }
  .me-col > .pg-month{ display:none; }
  .me-hero{ grid-template-columns:112px minmax(0, 1fr); }
  .me-av{ min-height:150px; }
  .me-av svg{ width:108px; }
  .me-name{ font-size:24px; }
  .me-id{ padding:14px 16px; }
  .me-minis b{ font-size:17px; }
  .me-gear span{ display:none; }
  .me-gear{ width:44px; padding:0; justify-content:center; }
  .me-card .badge-grid{ display:flex; overflow-x:auto; gap:10px; padding-bottom:4px; scroll-snap-type:x mandatory; }
  .me-card .badge-grid > *{ flex:0 0 136px; scroll-snap-align:start; }
}

/* LEAGUE: drawn crests, a ladder you can see, the lines drawn in the table. */
.lg-title{ margin:0; font-size:26px; font-weight:400; color:var(--ink); }
.lg-crest{ display:block; flex:none; color:#C9D3E0; }
.lg-crest[data-tier="0"]{ color:#C98A5B; }
.lg-crest[data-tier="2"]{ color:var(--accent); }
.lg-crest[data-tier="3"]{ color:#5B8DEF; }
.lg-crest[data-tier="4"]{ color:#9FD8F5; }
.lg-crest .lg-crest-star{ fill:rgba(0,0,0,.28); }
:root[data-theme="white"] .lg-crest{ color:#7A889C; }
:root[data-theme="white"] .lg-crest[data-tier="0"]{ color:#A8642F; }
:root[data-theme="white"] .lg-crest[data-tier="2"]{ color:#A87C00; }
:root[data-theme="white"] .lg-crest[data-tier="3"]{ color:#4A78D6; }
:root[data-theme="white"] .lg-crest[data-tier="4"]{ color:#2F86B3; }
.lg-banner{ display:flex; align-items:center; gap:16px; padding:18px 20px; border-radius:22px; border:1px solid var(--line);
  background:var(--surface); max-width:640px; }
.lg-b-text{ flex:1 1 auto; min-width:0; }
.lg-b-text p{ margin:4px 0 0; font-size:13px; color:var(--muted); }
.lg-b-me{ display:flex; flex-direction:column; align-items:flex-end; gap:2px; flex:none; }
.lg-b-me b{ font:600 28px/1 "ITC Ronda", "Poppins", sans-serif; color:var(--ink); }
.lg-b-me small{ font-size:12px; color:var(--muted); }
.lg-ladder2{ display:grid; grid-template-columns:repeat(5, minmax(0, 1fr)); gap:4px; max-width:640px; margin:14px 0 10px; }
.lg-step{ display:flex; flex-direction:column; align-items:center; gap:4px; padding:8px 2px; border-radius:14px; text-align:center; min-width:0; }
.lg-step.now{ background:var(--surface); box-shadow:inset 0 0 0 1.5px var(--line); }
.lg-step.ahead .lg-crest{ opacity:.35; }
.lg-step-name{ font-size:12px; font-weight:600; color:var(--ink); }
.lg-step.ahead .lg-step-name{ color:var(--muted); font-weight:500; }
/* The tags are read, so they are ink (the gold and green measured under 4.5 on white);
   which tag is which is said by the word and the step's own outline. */
.lg-step-tag{ font-size:11px; font-weight:700; color:var(--ink); min-height:13px; }
.lg-step.kept{ box-shadow:inset 0 0 0 1.5px color-mix(in srgb, var(--k-good) 60%, transparent); }
.lg-oneline{ max-width:640px; margin:4px 0 6px; font-size:13.5px; line-height:1.55; color:var(--muted); }
/* GF3 a (2026-11-19): how much of a day the league counts, said under the explainer. */
.lg-cap{ max-width:640px; margin:0 0 6px; font-size:13.5px; line-height:1.55; color:var(--muted); }
.lg-today{ max-width:640px; margin:0 0 6px; font-size:13.5px; font-weight:600; line-height:1.55; color:var(--ink); }
.lg-how{ max-width:640px; margin:0 0 14px; font-size:13.5px; color:var(--muted); }
.lg-how summary{ cursor:pointer; color:var(--ink); font-weight:600; font-size:13.5px; padding:4px 0; }
.lg-how summary:focus-visible{ outline:var(--focus-ring); outline-offset:2px; }
.lg-how p{ margin:6px 0 0; line-height:1.55; }
.lg-list{ display:flex; flex-direction:column; gap:4px; max-width:640px; }
.lg-r{ display:grid; grid-template-columns:28px 36px minmax(0, 1fr) auto; align-items:center; gap:12px;
  min-height:48px; padding:4px 12px; border-radius:14px; }
.lg-r.me{ background:var(--surface); box-shadow:inset 0 0 0 1.5px var(--accent); }
.lg-r .lg-rank{ text-align:center; font-size:15px; color:var(--muted); }
.lg-r .lg-face{ width:36px; height:36px; display:grid; place-items:center; border-radius:50%; overflow:hidden; }
.lg-r .lg-face svg{ width:36px; height:36px; }
.lg-r .lg-name{ font-size:14.5px; color:var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lg-r .lg-xp{ font-size:14px; color:var(--muted); }
/* YOUR OWN ROW never cuts your name (founder, 2026-11-20: "fix two small things in the avatar
   screens"). On a phone "200 XP this week" took half the row and left "Crimson Com…": the words
   now sit under the figure, and your name may take a second line where it still does not fit. */
.lg-r.me .lg-xp{ display:flex; flex-direction:column; align-items:flex-end; line-height:1.2; }
.lg-r.me .lg-week{ font-size:12px; font-weight:500; white-space:nowrap; }
.lg-r.me .lg-name{ white-space:normal; overflow-wrap:anywhere; }
.lg-zone{ display:flex; align-items:center; gap:8px; height:30px; padding:0 12px; font-size:12.5px; font-weight:600; }
.lg-zone svg{ width:16px; height:16px; flex:none; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.lg-zone span{ white-space:nowrap; }
.lg-zone i{ flex:1 1 auto; height:1px; background:currentColor; opacity:.35; }
.lg-zone.up{ color:var(--k-good); }
.lg-zone.down{ color:var(--k-warn); }
:root[data-theme="white"] .lg-zone.up{ color:var(--teal); }
:root[data-theme="white"] .lg-zone.down{ color:#AA4A16; }
.lg-gap{ padding:4px 12px; font-size:12.5px; color:var(--muted); }
@media (max-width:840px){
  .lg-banner{ padding:14px 16px; gap:12px; }
  .lg-title{ font-size:22px; }
  .lg-b-me b{ font-size:22px; }
  .lg-zone span{ white-space:normal; }
}

/* ---- phase 4: big moments ---- */
/* The end of a set, the road's end, a level-up and a league promotion
   (home-moments.js). The button you can feel arrives here: one yellow per
   screen, a lip that sinks when pressed. */

/* ======================================================================
   ---- phase 2: Today ----  (founder approval 2026-10-14, home page A;
   the drawing is the canvas's Main / HomeAPhone boards)
   ====================================================================== */

/* The button you can feel: one yellow per screen, a 4px lip, and it sinks when
   pressed. Today's Start is the first to use it; later phases convert theirs. */
.k-btn{ display:inline-flex; align-items:center; justify-content:center; gap:10px; height:52px; padding:0 24px;
  border:0; border-radius:16px; font:600 16px/1 "Poppins", system-ui, sans-serif; cursor:pointer; text-decoration:none;
  background:var(--accent); color:var(--on-accent); box-shadow:0 4px 0 var(--k-lip);
  transition:transform .08s ease, box-shadow .08s ease, filter .2s; white-space:nowrap; }
.k-btn:hover{ filter:brightness(1.05); }
.k-btn:active{ transform:translateY(3px); box-shadow:0 1px 0 var(--k-lip); }
.k-btn:focus-visible{ outline:var(--focus-ring); outline-offset:3px; }
.k-btn.k-lg{ height:58px; font-size:17px; border-radius:18px; }
.k-btn.k-block{ width:100%; }
.k-btn.k-quiet{ background:var(--surface); color:var(--ink); box-shadow:inset 0 0 0 1px var(--line); }
.k-btn.k-quiet:active{ transform:translateY(1px); }

/* The confetti: drawn maths shapes, three falls, then gone. */
.bm-confetti{ position:absolute; inset:0; overflow:hidden; pointer-events:none; z-index:0; }
.bm-bit{ position:absolute; top:-32px; width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2.6;
  stroke-linecap:round; animation:bmFall var(--bd, 2.6s) linear var(--bw, 0s) 3 both; }
@keyframes bmFall{ 0%{ transform:translateY(-40px) rotate(0); opacity:0; } 8%{ opacity:1; }
  100%{ transform:translateY(110vh) rotate(320deg); opacity:.85; } }

/* --- the end of a set (inside the practice view, a focused screen) --- */
.bm-end{ position:relative; max-width:560px; margin:0 auto; padding:6px 0 24px; display:flex; flex-direction:column;
  gap:14px; text-align:center; }
.bm-end > *:not(.bm-confetti){ position:relative; z-index:1; }
.bm-eyebrow{ margin:0; font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--k-good); }
.bm-xp{ margin:0; display:flex; align-items:baseline; justify-content:center; gap:8px; color:var(--goldtext);
  font-family:"ITC Ronda", "Poppins", sans-serif; font-variant-numeric:tabular-nums; }
.bm-xp[hidden]{ display:none; }
.bm-xp-n{ font-size:64px; line-height:1; }
.bm-xp-u{ font-size:28px; }
.bm-head{ margin:0; font-size:18px; font-weight:600; color:var(--ink); line-height:1.35; }
.bm-receipt{ list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; justify-content:center; gap:8px; }
.bm-receipt li{ padding:6px 12px; border-radius:999px; background:var(--surface); border:1px solid var(--line);
  font-size:13px; color:var(--muted); }
.bm-receipt b{ color:var(--goldtext); margin-right:2px; }
.bm-grid{ display:flex; flex-direction:column; gap:10px; }
.bm-tiles, .bm-row{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; }
.bm-tile-n{ background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:12px; display:flex;
  flex-direction:column; gap:4px; }
.bm-tile-n b{ font:600 28px/1 "ITC Ronda", "Poppins", sans-serif; color:var(--ink); }
.bm-tile-n.good b{ color:var(--k-good); }
.bm-tile-n span{ font-size:12px; color:var(--muted); }
.bm-card{ background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:12px 14px; display:flex;
  align-items:center; gap:12px; text-align:left; min-width:0; }
.bm-card-t{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.bm-card-t b{ font-size:15px; color:var(--ink); }
.bm-card-t span{ font-size:12.5px; color:var(--muted); }
.bm-ring{ width:48px; height:48px; flex:none; transform:rotate(-90deg); }
.bm-ring circle{ fill:none; stroke:var(--track); stroke-width:6; }
.bm-ring .bm-ring-v{ stroke:var(--accent); stroke-linecap:round; }
.bm-goal.met .bm-ring-v{ stroke:var(--k-good); }
.bm-streak svg{ width:30px; height:30px; flex:none; fill:var(--k-flame); }
.bm-quests{ flex-direction:column; align-items:stretch; gap:8px; }
.bm-card-h{ margin:0; font-size:13px; font-weight:600; color:var(--muted); }
.bm-quests ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.bm-quests li{ display:grid; grid-template-columns:28px minmax(0, 1fr) auto; gap:10px; align-items:center; font-size:14px; color:var(--ink); }
.bm-q-mark{ width:28px; height:28px; border-radius:50%; border:1px solid var(--line); display:flex; align-items:center;
  justify-content:center; font-size:10.5px; color:var(--muted); }
.bm-quests li.done .bm-q-mark{ background:var(--k-good); border-color:transparent; color:#062B1E; }
.bm-q-mark svg{ width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
.bm-q-xp{ font-size:12px; font-weight:600; color:var(--faint); }
.bm-quests li.done .bm-q-xp{ color:var(--goldtext); }
.bm-league svg{ width:28px; height:28px; flex:none; fill:#C9D3E0; }
.bm-up{ margin-left:auto; color:var(--k-good); }
.bm-up svg{ width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2.4; stroke-linecap:round; }
.bm-wins{ display:flex; flex-direction:column; gap:8px; }
.bm-wins:empty{ display:none; }
.bm-win{ margin:0; display:flex; align-items:center; gap:10px; text-align:left; padding:12px 14px; border-radius:16px;
  background:var(--accent-wash); border:1px solid var(--line); font-size:14px; color:var(--ink); }
.bm-win svg{ width:20px; height:20px; flex:none; fill:var(--accent); }
.bm-foot{ margin-top:6px; }
.bm-sub{ margin:8px 0 0; font-size:13px; color:var(--faint); }
@media (max-width:420px){
  .bm-xp-n{ font-size:56px; }
  .bm-row{ grid-template-columns:minmax(0, 1fr); }
}

/* --- the full-screen moments (a dialog over everything) --- */
.bm-overlay{ position:fixed; inset:0; z-index:var(--z-modal); background:var(--paper); overflow:auto;
  display:flex; justify-content:center; padding:24px 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
.bm-sheet{ position:relative; z-index:1; width:100%; max-width:440px; margin:auto 0; display:flex; flex-direction:column;
  align-items:center; gap:14px; text-align:center; }
.bm-close{ position:absolute; top:-8px; right:-4px; width:44px; height:44px; border-radius:50%; border:0; background:transparent;
  color:var(--muted); cursor:pointer; display:flex; align-items:center; justify-content:center; }
.bm-close:hover{ color:var(--ink); background:var(--surface); }
.bm-close:focus-visible{ outline:var(--focus-ring); }
.bm-close svg{ width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; }
.bm-bigtile{ width:120px; height:120px; border-radius:34px; background:var(--wc); color:#3A1750; display:flex; align-items:center;
  justify-content:center; margin:14px 0 8px; box-shadow:0 0 0 10px color-mix(in srgb, var(--wc) 22%, transparent),
  0 0 48px color-mix(in srgb, var(--wc) 55%, transparent); animation:bmGlow 1.2s ease-out both; }
.bm-bigtile svg{ width:56px; height:56px; fill:currentColor; }
@keyframes bmGlow{ 0%{ filter:brightness(.45) saturate(.3); transform:scale(.7); } 60%{ filter:brightness(1.4); }
  100%{ filter:none; transform:none; } }
.bm-pill{ margin:0; display:inline-flex; align-items:center; gap:6px; padding:8px 16px; border-radius:999px; background:var(--surface);
  border:1px solid var(--line); font:600 18px/1 "ITC Ronda", "Poppins", sans-serif; color:var(--goldtext); }
.bm-pill svg{ width:18px; height:18px; fill:var(--accent); }
.bm-line{ margin:0; font-size:17px; line-height:1.6; color:var(--ink); }
/* GF7 a (2026-11-19): what the learner can now do, under the road's end line. */
.bm-shelf{ margin:0; font-size:16px; line-height:1.5; color:var(--ink); font-weight:500; }
/* The chips wrap inside a narrow sheet rather than running off it. */
.bm-line .t-name{ white-space:normal; }
.bm-line .t-name{ display:inline; -webkit-box-decoration-break:clone; box-decoration-break:clone; }
.bm-actions{ width:100%; display:flex; flex-direction:column; gap:10px; margin-top:4px; }
.bm-level{ width:116px; height:116px; border-radius:50%; border:6px solid var(--accent); background:var(--surface); display:flex;
  align-items:center; justify-content:center; margin:14px 0 4px; box-shadow:0 0 44px color-mix(in srgb, var(--accent) 45%, transparent);
  animation:bmGlow 1.2s ease-out both; }
.bm-level span{ font:600 54px/1 "ITC Ronda", "Poppins", sans-serif; color:var(--ink); }
.bm-title{ margin:0; font:600 26px/1.2 "ITC Ronda", "Poppins", sans-serif; color:var(--ink); }
.bm-text{ margin:0; font-size:15px; line-height:1.5; color:var(--muted); }
.bm-unlock{ width:100%; display:flex; align-items:center; gap:12px; text-align:left; padding:10px 12px; border-radius:16px;
  background:var(--surface); border:1px solid var(--line); }
.bm-unlock-face{ width:64px; height:64px; border-radius:14px; overflow:hidden; flex:none; background:var(--rail); display:flex; }
.bm-unlock-face svg{ width:64px; height:64px; }
.bm-unlock-k{ font-size:11px !important; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--k-good) !important; }
.bm-shield{ margin:14px 0 4px; animation:bmGlow 1.2s ease-out both; }
.bm-shield svg{ width:96px; height:96px; }
.bm-ladder{ list-style:none; margin:0; padding:0; width:100%; display:grid; grid-template-columns:repeat(5, minmax(0, 1fr)); gap:4px; }
.bm-ladder li{ display:flex; flex-direction:column; align-items:center; gap:4px; font-size:11px; color:var(--faint); }
.bm-ladder li svg{ width:24px; height:24px; fill:var(--line); }
.bm-ladder li.on{ color:var(--ink); font-weight:600; }
.bm-shield.bm-bronze svg, .bm-ladder li.bm-bronze.on svg{ fill:#C98A5B; }
.bm-shield.bm-silver svg, .bm-ladder li.bm-silver.on svg{ fill:#C9D3E0; }
.bm-shield.bm-gold svg, .bm-ladder li.bm-gold.on svg{ fill:var(--accent); }
.bm-shield.bm-sapphire svg, .bm-ladder li.bm-sapphire.on svg{ fill:#5B8DEF; }
.bm-shield.bm-diamond svg, .bm-ladder li.bm-diamond.on svg{ fill:#9FD8F5; }

.k-btn[hidden]{ display:none; }
.k-btn svg{ width:20px; height:20px; flex:none; fill:currentColor; }
.k-btn.k-lg{ height:56px; font-size:16.5px; border-radius:18px; }
.k-btn.k-quiet{ background:var(--surface); color:var(--ink); box-shadow:inset 0 0 0 1px var(--line); }
.k-btn.k-quiet:hover{ filter:none; background:color-mix(in srgb, var(--surface) 82%, var(--ink)); }
.k-btn.k-quiet:active{ transform:translateY(1px); box-shadow:inset 0 0 0 1px var(--line); }

/* The page: left-aligned and wider than the old centred column. */
.landing.today{ max-width:1000px; margin:0 auto; padding:2px 0 0; text-align:left; }
.td-head{ margin:0 0 18px; }
.landing.today .landing-hi{ font-size:32px; margin:0; text-wrap:balance; }
.td-sub{ margin:6px 0 0; font-size:15px; line-height:1.45; color:var(--muted); text-wrap:pretty; }
.td-sub[hidden]{ display:none; }
.landing.today .landing-earlier{ flex-direction:row; flex-wrap:wrap; align-items:baseline; gap:8px;
  margin:6px 0 0; max-width:none; font-size:13.5px; color:var(--muted); text-align:left; }
.landing.today .landing-cards{ max-width:none; margin:0 0 16px; gap:12px; }
.landing.today .land-note{ margin-left:0; margin-right:0; }

/* YOUR NEXT STOP */
.td-hero{ --hc:var(--accent); display:grid; grid-template-columns:300px minmax(0, 1fr); min-height:248px;
  border-radius:22px; overflow:hidden; background:var(--surface); border:1px solid var(--line); box-shadow:var(--shadow); }
.td-hero[hidden]{ display:none; }
.td-pic{ display:flex; align-items:center; justify-content:center; padding:18px; color:var(--hc);
  background:color-mix(in srgb, var(--hc) 22%, var(--surface)); border-right:1px solid var(--line); }
.td-pic svg{ display:block; width:100%; max-width:250px; max-height:200px; height:auto; }
.td-pic:not(.figure) svg{ width:96px; height:96px; fill:none; stroke:currentColor; stroke-width:1.5;
  stroke-linecap:round; stroke-linejoin:round; }
.td-pic .td-fog{ width:150px; height:100px; }
.td-pic .td-fog rect{ fill:color-mix(in srgb, var(--hc) 18%, transparent); stroke:var(--hc); stroke-dasharray:3 4; }
.td-body{ display:flex; flex-direction:column; gap:10px; padding:22px 26px; min-width:0; }
.td-eyebrow{ margin:0; font:700 12px/1.2 "Poppins", sans-serif; letter-spacing:.08em; text-transform:uppercase;
  color:color-mix(in srgb, var(--hc) 78%, var(--ink)); }
.td-title{ margin:0; font:400 27px/1.15 "ITC Ronda", "Poppins", sans-serif; color:var(--ink); text-wrap:balance; }
.td-line{ margin:0; font-size:13.5px; color:var(--muted); }
.td-road{ list-style:none; margin:4px 0 0; padding:0; display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); }
.td-road[hidden]{ display:none; }
/* The road's four stops are THE LINE since 2026-11-18 (home/line.css, H.lineCells). */
.td-actions{ display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-top:auto; padding-top:4px; }
.td-go{ min-width:220px; }
.cont-doors{ display:flex; gap:10px; }
.cont-doors[hidden]{ display:none; }

/* THE DAY */
.td-cards{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:16px; margin:0 0 16px; }
/* One card left (a Diagnostic-only place keeps only the league; a learner out of the league
   with no quests keeps only the goal): it takes the row rather than a third of it. */
.td-cards:not(:has(> .td-card:not([hidden]) ~ .td-card:not([hidden]))) > .td-card{ grid-column:1 / -1; }
.td-card{ display:flex; flex-direction:column; gap:12px; min-width:0; padding:18px;
  background:var(--surface); border:1px solid var(--line); border-radius:20px; }
.td-card[hidden]{ display:none; }
.td-card-top{ display:flex; align-items:center; gap:10px; min-width:0; }
.td-card-h{ flex:1 1 auto; margin:0; font-size:16px; font-weight:600; color:var(--ink); min-width:0; }
.td-small{ margin:0; font-size:12.5px; color:var(--faint); white-space:nowrap; }
.td-foot{ margin:auto 0 0; padding-top:10px; border-top:1px solid var(--line); font-size:12.5px; line-height:1.4; color:var(--muted); }
.td-foot b{ font-weight:600; color:var(--k-good); }
.td-bar{ display:block; height:7px; border-radius:99px; background:var(--track); overflow:hidden; }
.td-bar i{ display:block; height:100%; border-radius:99px; background:var(--accent); }

.td-goal{ display:grid; grid-template-columns:96px minmax(0, 1fr); align-items:center; column-gap:16px; row-gap:14px; }
.td-goal-text{ min-width:0; }
/* The goal's line is a sentence ("Goal met. Anything more keeps counting."): it wraps. */
.td-goal .td-small{ white-space:normal; }
.td-goal .td-week{ grid-column:1 / -1; }
/* Today: three cards in a row leave the goal's line and the week's days no room below 1100px
   (900px: 40px of text, overlapping days), so the goal takes a row of its own. After THE DAY's
   own rules, which would otherwise put the three columns back. */
@media (max-width:1100px){
  .td-cards{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .td-goal{ grid-column:1 / -1; }
}
.xp-today{ position:relative; width:96px; height:96px; border-radius:50%; display:grid; place-items:center;
  padding:0; border:0; background:none; color:inherit; font:inherit; cursor:pointer; }
.xp-today[hidden]{ display:none; }
.xp-today:focus-visible{ outline:var(--focus-ring); outline-offset:3px; }
.xp-arc{ position:absolute; inset:0; width:100%; height:100%; transform:rotate(-90deg); }
.xp-track{ fill:none; stroke:var(--track); stroke-width:9; }
.xp-fill{ fill:none; stroke:var(--accent); stroke-width:9; stroke-linecap:round; stroke-dasharray:100;
  transition:stroke-dashoffset .6s ease; }
.xp-ring{ position:relative; display:flex; flex-direction:column; align-items:center; line-height:1.05; }
.xp-num{ font:400 26px/1 "ITC Ronda", "Poppins", sans-serif; color:var(--ink); }
/* 11px, from 10.5px (2026-11-21, the founder's pick X: no label under 11px). */
.xp-of{ margin-top:3px; font-size:11px; color:var(--faint); }
.xp-today.met .xp-num{ color:var(--goldtext); }
.td-week{ display:grid; grid-template-columns:repeat(7, minmax(0, 1fr)); gap:4px; margin:0; }
.td-week[hidden]{ display:none; }
.td-day{ display:flex; flex-direction:column; align-items:center; gap:4px; }
.td-day-dot{ width:30px; height:30px; border-radius:50%; display:grid; place-items:center; background:var(--track); }
.td-day-dot svg{ width:16px; height:16px; fill:currentColor; }
.td-day.on .td-day-dot{ background:var(--k-flame); color:#3A1400; }
.td-day.today .td-day-dot{ box-shadow:inset 0 0 0 2px var(--accent); }
.td-day.today.on .td-day-dot{ box-shadow:0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.td-day.ahead .td-day-dot{ opacity:.5; }
.td-day-l{ font-size:11px; color:var(--faint); }

.tdq-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:12px; }
.tdq{ display:grid; grid-template-columns:28px minmax(0, 1fr) auto; align-items:center; gap:10px; }
.tdq-ic{ width:28px; height:28px; border-radius:9px; display:grid; place-items:center; color:var(--accent);
  background:color-mix(in srgb, var(--ink) 8%, transparent); }
.tdq-ic svg{ width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.tdq.done .tdq-ic{ background:var(--k-good); color:#062B1E; }
.tdq-main{ display:flex; flex-direction:column; gap:5px; min-width:0; }
.tdq-label{ font-size:13px; line-height:1.25; font-weight:500; color:var(--ink); overflow-wrap:anywhere; }
.tdq-n{ font:400 13px/1 "ITC Ronda", "Poppins", sans-serif; color:var(--muted); font-variant-numeric:tabular-nums; white-space:nowrap; }
.tdq.done .tdq-n{ color:var(--k-good); }
.tdq.done .td-bar i{ background:var(--k-good); }
.td-sum-bar{ display:none; }

.td-league{ cursor:pointer; }
.tdl-crest{ display:grid; place-items:center; }
.tdl-crest svg{ width:26px; height:26px; fill:#C9D3E0; }
.tdl-crest[data-tier="0"] svg{ fill:#C98A5B; }
.tdl-crest[data-tier="2"] svg{ fill:var(--accent); }
.tdl-crest[data-tier="3"] svg{ fill:#5B8DEF; }
.tdl-crest[data-tier="4"] svg{ fill:#9FD8F5; }
:root[data-theme="white"] .tdl-crest svg{ stroke:var(--ink); stroke-width:1; }
.tdl-rows{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:4px; }
.tdl-row{ display:grid; grid-template-columns:22px 30px minmax(0, 1fr) auto; align-items:center; gap:10px; min-height:40px; padding:0 10px; border-radius:12px; }
.tdl-row.me{ background:color-mix(in srgb, var(--ink) 8%, transparent); }
.tdl-rank{ font:400 13px/1 "ITC Ronda", "Poppins", sans-serif; color:var(--faint); text-align:center; }
.tdl-row.me .tdl-rank{ color:var(--ink); }
.tdl-face{ width:30px; height:30px; border-radius:50%; overflow:hidden; display:grid; place-items:center; }
.tdl-face svg{ width:30px; height:30px; display:block; }
.tdl-name{ font-size:14px; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tdl-row.me .tdl-name{ font-weight:700; }
.tdl-xp{ font-size:12.5px; color:var(--muted); white-space:nowrap; }
/* Your own row, as on the league page (founder, 2026-11-20): on a computer the card is narrow and
   "200 XP this week" left "Crims…". The words go under the figure; the name may wrap. */
.tdl-row.me .tdl-xp{ display:flex; flex-direction:column; align-items:flex-end; line-height:1.2; }
.tdl-row.me .tdl-week{ font-size:12px; }
.tdl-row.me .tdl-name{ white-space:normal; overflow-wrap:anywhere; }

/* THE CREATOR'S PREVIEW ON A COMPUTER stays in sight while the options scroll beside it (P4 a did
   it for the phone, shell.css "NARROW"; founder, 2026-11-20: "fix two small things in the avatar
   screens"). Here, not in shell.css, because only the learner's creator is .is-screen. Only where
   the window shows the whole left column, or Done would sit below the screen. */
@media (min-height:640px){
  @container (min-width:700px){
    .is-screen .avp-side{ position:sticky; top:calc(var(--avp-top, 0px) + 16px); z-index:2; }
  }
}
.tdl-sum{ display:none; margin:0; font-size:13px; color:var(--muted); }

/* QUICK WAYS IN */
.td-quick{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:16px; margin:0 0 26px; }
.td-qa{ display:flex; align-items:center; gap:14px; min-height:64px; padding:10px 18px; border-radius:18px; min-width:0;
  background:var(--surface); border:1px solid var(--line); color:var(--ink); font:inherit; text-align:left; cursor:pointer; }
.td-qa[hidden]{ display:none; }
.td-qa:hover{ background:color-mix(in srgb, var(--surface) 85%, var(--ink)); }
.td-qa:focus-visible{ outline:var(--focus-ring); outline-offset:2px; }
.td-qa-ic{ display:grid; place-items:center; color:var(--accent-ink); }
.td-qa-ic svg{ width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.td-qa-t{ flex:1 1 auto; display:flex; flex-direction:column; gap:2px; min-width:0; }
.td-qa-t b{ font-size:15px; font-weight:600; }
.td-qa-t span{ font-size:12.5px; color:var(--faint); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.td-qa-go{ width:20px; height:20px; flex:none; fill:none; stroke:var(--faint); stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }

/* On a phone: the drawing is HomeAPhone — the hero stacks, the quests and the
   league fold to two small cards, the quick ways in stack under them. */
@media (max-width:840px){
  .td-head{ margin-bottom:14px; }
  .landing.today .landing-hi{ font-size:26px; }
  .td-sub{ font-size:14px; }
  .td-hero{ grid-template-columns:1fr; min-height:0; }
  .td-pic{ height:88px; padding:8px; border-right:0; border-bottom:1px solid var(--line); }
  .td-pic svg{ max-height:72px; }
  .td-hero.has-road .td-line{ display:none; }
  .td-pic:not(.figure) svg{ width:64px; height:64px; }
  .td-pic .td-fog{ width:120px; height:80px; }
  .td-body{ padding:14px 16px 16px; gap:9px; }
  .td-title{ font-size:21px; }
  .td-actions{ flex-direction:column; align-items:stretch; gap:6px; }
  .td-go{ width:100%; min-width:0; }
  .cont-doors .door{ width:100%; height:40px; background:none; box-shadow:none; color:var(--muted); font-size:14px; }
  .td-cards{ grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; }
  .td-card{ padding:14px; gap:8px; border-radius:18px; }
  .td-card-top{ flex-wrap:wrap; row-gap:2px; }
  .td-card-h{ font-size:14px; }
  .td-goal{ grid-column:1 / -1; grid-template-columns:64px minmax(0, 1fr); column-gap:14px; row-gap:8px; }
  .td-goal .xp-today{ grid-row:span 2; }
  .td-goal .td-week{ grid-column:2; }
  .xp-today{ width:64px; height:64px; }
  .xp-num{ font-size:19px; }
  .xp-of{ display:none; }
  .td-day-dot{ width:100%; height:24px; border-radius:7px; }
  .td-day-l{ display:none; }
  .td-quests .tdq-list, .td-quests .td-foot, .td-league .tdl-rows, .td-league .td-foot{ display:none; }
  .td-sum-bar, .tdl-sum{ display:block; }
  .tdl-crest svg{ width:20px; height:20px; }
  .td-quick{ grid-template-columns:1fr; gap:10px; }
  .td-qa{ min-height:56px; }
}


/* ---- phase 5: worlds, tiles and the road ---- */
/* Founder approval 2026-10-14 (ROADMAP). A world opens on the chapter that holds
   its next tile; on a computer the topic sits in a column docked beside the map,
   on a phone it slides up as a sheet and the next tile waits in a card above the
   bar; a topic's four stops are cards. */

/* The button itself (.k-btn, .k-block, .k-quiet) is phase 2's, above; phase 5 adds
   a small size. Its icons (play, practise) are line drawings, so in the panel and
   the phone's next-tile card they are stroked, not filled like phase 4's. */
.map-detail .k-btn svg, .map-next .k-btn svg{ width:18px; height:18px; stroke:currentColor; fill:none; }
.k-btn.k-sm{ height:42px; padding:0 14px; font-size:14px; border-radius:13px; }
/* The panel is itself a surface, so its quiet buttons lift a shade off it. */
.map-detail .k-btn.k-quiet{ background:color-mix(in srgb, var(--ink) 8%, transparent); }

/* The world's head: slimmer. The purpose line sits under the name, quietly. */
.world-head .map-title{ font-size:24px; }
#mapPurpose{ font-family:"Poppins", system-ui, sans-serif; font-size:14px; line-height:1.4; color:var(--muted); }
@media (max-width:840px){
  /* It used to stick under the topbar and cost ~170px of a phone for good. */
  .world-head{ position:static; }
  .world-head .map-title{ font-size:21px; }
}

/* The column beside the map (computer). Always present while a world is open, so
   filling it never moves a tile. */
.map-side{ min-width:0; }
@media (min-width:901px){
  .map-grid{ grid-template-columns:minmax(0, 1fr) 330px; }
  .map-side{ position:sticky; align-self:start;
    top:calc(var(--topbar-real-h, var(--topbar-h)) + var(--world-head-h, 96px) + 12px);
    max-height:calc(100vh - var(--topbar-real-h, var(--topbar-h)) - var(--world-head-h, 96px) - 24px);
    overflow-y:auto; }
  .map-side .map-detail{ position:relative; max-width:none; max-height:none; transform:none; opacity:1;
    box-shadow:none; border-radius:18px; padding:18px 18px 20px; }
  .map-next{ display:none !important; }
}
@media (max-width:900px){
  .map-side{ display:none; }
  /* The sheet's grab handle: it slides up, it can be pushed back down. */
  .map-detail::before{ content:""; display:block; width:40px; height:5px; border-radius:3px;
    background:var(--line); margin:-8px auto 12px; }
}
/* Inline-block so the focus ring a tap moves here hugs the name, not the ✕ beside it. */
.map-detail .d-topic{ display:inline-block; max-width:calc(100% - 40px); font-size:21px; }
.map-detail .d-topic:focus{ outline:none; }
.map-detail .d-topic:focus-visible{ outline:var(--focus-ring); outline-offset:2px; border-radius:6px; }
.d-actions{ flex-direction:column; align-items:stretch; gap:10px; }
.d-doors{ display:flex; gap:8px; }
.d-doors .k-btn{ flex:1; min-width:0; }
.d-empty{ padding:6px 2px; }

/* The next tile, pinned above the phone bar while no sheet is open. */
.map-next{ position:sticky; z-index:20; display:flex; align-items:center; gap:12px; margin:16px 0 0;
  bottom:calc(var(--k-tabbar-h) + 12px + env(safe-area-inset-bottom, 0px));
  padding:12px 12px 12px 16px; border-radius:18px; background:var(--surface);
  border:1px solid var(--line); box-shadow:var(--shadow); }
.map-next[hidden]{ display:none; }
.mn-text{ flex:1; min-width:0; }
.mn-eyebrow{ margin:0; font:700 11px/1.2 "Poppins", sans-serif; letter-spacing:.06em; text-transform:uppercase; color:var(--goldtext); }
.mn-title{ margin:3px 0 0; font-weight:600; font-size:15px; line-height:1.25; color:var(--ink); }
.k-btn.mn-go{ height:46px; padding:0 18px; }

/* A topic's road is THE LINE down the page since 2026-11-18 (home/line.css, H.roadHtml). */

/* ---- phase 7: the tutor and first time in ---- */
/* The button itself is phase 2's, above; phase 7 adds a disabled look. The first
   run's Next and the tutor's "Back to the road" carry line-drawn icons, so those two
   are stroked, not filled like phase 4's. */
.k-btn:disabled{ background:var(--surface); color:var(--faint); box-shadow:none; cursor:default; }
#frNext svg, #tcBackRoad svg{ flex:none; stroke:currentColor; fill:none; stroke-width:2;
  stroke-linecap:round; stroke-linejoin:round; }
#tcBackRoad svg{ width:20px; height:20px; }

/* The tutor's title row: what this is, and which topic. */
#view-tutor .flow-nav{ gap:14px; }
.tc-title{ display:flex; flex-direction:column; gap:2px; min-width:0; margin-bottom:20px; }
.tc-kind{ font-size:12.5px; font-weight:600; color:var(--muted); }
.tc-topic{ font:600 17px/1.25 "ITC Ronda", "Poppins", sans-serif; color:var(--w, var(--accent));
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tc-topic[hidden]{ display:none; }
:root[data-theme="white"] .tc-topic{ color:color-mix(in srgb, var(--w, var(--accent)) 55%, #1a0d26); }
@media (max-width:640px){
  #view-tutor .back-link .back-label{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
  #view-tutor.active .chat-history .ch-label{ display:none; }
  #view-tutor .chat-history{ padding:8px 10px; }
  .tc-topic{ font-size:15.5px; }
}

/* A lesson keeps its road beside the chat on a computer. */
#view-tutor.active .tc-layout{ display:flex; gap:28px; flex:1 1 auto; min-height:0; }
.tc-layout > .tc-wrap{ flex:1 1 auto; min-width:0; }
.tc-side{ display:none; }
@media (min-width:1100px){
  .tc-side:not([hidden]){ display:block; width:290px; flex:none; align-self:flex-start; }
}
.tc-side-card{ background:var(--surface); border:1px solid var(--line); border-radius:20px; padding:18px; display:flex; flex-direction:column; gap:12px; }
.tc-side-h{ margin:0; font-size:11.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--faint); }
.tc-side-t{ margin:0; font:600 18px/1.25 "ITC Ronda", "Poppins", sans-serif; color:var(--ink); }
.tc-road{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; }
.tc-stop{ display:flex; align-items:center; gap:12px; }
.tc-stop-n{ width:32px; height:32px; flex:none; border-radius:50%; display:grid; place-items:center;
  border:2px solid var(--line); color:var(--faint); font:600 13px/1 "Poppins", sans-serif; }
.tc-stop-n svg{ width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
.tc-stop.done .tc-stop-n{ background:var(--k-good); border-color:var(--k-good); color:#062B1E; }
:root[data-theme="white"] .tc-stop.done .tc-stop-n{ color:#fff; }
.tc-stop.next .tc-stop-n{ border-color:var(--accent); color:var(--ink); }
.tc-stop-t{ display:flex; flex-direction:column; gap:1px; min-width:0; }
.tc-stop-t b{ font-size:14px; font-weight:600; color:var(--ink); }
.tc-stop-t span{ font-size:12px; color:var(--faint); }
.tc-stop.next .tc-stop-t span{ color:var(--goldtext); font-weight:600; }
.tc-side-back{ height:46px; font-size:15px; margin-top:4px; }

/* Quick replies, above the composer, inside the reading column. */
.tc-quick{ display:flex; gap:8px; overflow-x:auto; padding:2px 0 10px; scrollbar-width:none; }
.tc-quick::-webkit-scrollbar{ display:none; }
.tc-quick[hidden]{ display:none; }
.tc-quick .tc-quick-chip{ flex:none; white-space:nowrap; }
/* On a phone the row scrolls sideways: its right edge fades, so the last chip reads as
   "more this way" rather than as cut off. */
@media (max-width:640px){
  .tc-quick{ -webkit-mask-image:linear-gradient(90deg, #000 85%, transparent); mask-image:linear-gradient(90deg, #000 85%, transparent); padding-right:24px; }
}

/* The practice card's hint gets its own look (it borrowed "I don't know this"). */
.tc-hint-btn{ display:inline-flex; align-items:center; gap:7px; font:600 13.5px/1 "Poppins", sans-serif; color:var(--ink);
  background:transparent; border:0; padding:10px 6px; cursor:pointer; }
.tc-hint-btn svg{ width:18px; height:18px; flex:none; fill:none; stroke:var(--accent); stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
:root[data-theme="white"] .tc-hint-btn svg{ stroke:var(--goldtext); }
.tc-hint-btn:hover{ color:var(--accent); }
.tc-hint-btn:focus-visible{ outline:var(--focus-ring); outline-offset:2px; border-radius:8px; }

/* Settings: the daily goal. */
.set-goal-row{ flex-wrap:wrap; gap:12px; }
.set-goal{ display:flex; gap:8px; flex-wrap:wrap; }
.set-goal button{ display:flex; flex-direction:column; align-items:flex-start; gap:2px; min-width:84px; padding:9px 12px; border-radius:12px;
  border:1px solid var(--line); background:transparent; color:var(--ink); font:inherit; cursor:pointer; }
.set-goal button b{ font-size:14px; font-weight:600; }
.set-goal button span{ font-size:12px; color:var(--faint); }
.set-goal button.active{ border-color:var(--accent); background:var(--accent-wash); }
.set-goal button:focus-visible{ outline:var(--focus-ring); outline-offset:2px; }

/* FIRST TIME IN: four screens over the whole app, a phone-width column everywhere. */
html.fr-open, html.fr-open body{ overflow:hidden; }
.fr-root{ position:fixed; inset:0; z-index:360; background:var(--paper); display:flex; justify-content:center; }
.fr-box{ width:100%; max-width:460px; height:100%; display:flex; flex-direction:column; padding:14px 20px calc(16px + env(safe-area-inset-bottom, 0px)); box-sizing:border-box; }
.fr-top{ display:grid; grid-template-columns:44px 1fr 44px; align-items:center; height:48px; flex:none; }
.fr-back{ width:44px; height:44px; border:0; border-radius:12px; background:transparent; color:var(--ink); cursor:pointer; display:grid; place-items:center; }
.fr-back[hidden]{ visibility:hidden; display:grid; }
.fr-back svg{ width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.fr-back:focus-visible{ outline:var(--focus-ring); }
.fr-dots{ display:flex; justify-content:center; gap:6px; }
.fr-dot{ width:8px; height:8px; border-radius:4px; background:var(--line); transition:width .25s, background .25s; }
.fr-dot.done{ background:var(--muted); }
.fr-dot.on{ width:26px; background:var(--accent); }
.fr-body{ flex:1 1 auto; min-height:0; overflow-y:auto; padding:6px 2px 12px; display:flex; flex-direction:column; gap:12px; }
.fr-foot{ flex:none; display:flex; flex-direction:column; align-items:center; gap:6px; padding-top:8px; }
.fr-foot .fr-play{ display:inline-flex; }
/* On a tablet or a computer (Giammarco's picks 3a and F1, 2026-11-23). The column was the
   screen's height with its button pinned to the bottom: on an iPad held upright that left the
   button a long way under the words, and held sideways the pinned button covered the
   explorer step's "Pick a look" (iPads hide scroll bars, so nothing said there was more).
   Now the column is as tall as its words, in the middle of the screen, the button just under
   them; a step taller than the screen scrolls whole, its button at the end. A phone keeps the
   button pinned under the thumb. The creator inside the set-up keeps the full-height column. */
@media (min-width:700px){
  .fr-root:not(.fr-making){ overflow-y:auto; align-items:flex-start; }
  .fr-root:not(.fr-making) .fr-box{ height:auto; min-height:100%; justify-content:center; }
  .fr-root:not(.fr-making) .fr-body{ flex:none; overflow:visible; }
}
/* On a phone, the explorer step only (Giammarco's pick B a, 2026-11-23). Its looks are taller
   than the screen, and with the button pinned they sat under it, only their tops showing. That
   step now scrolls whole, its button at the end; when it fits, the button is still at the
   bottom. The other three steps keep the button pinned under the thumb (home-firstrun.js
   sets .fr-scroll-whole on the explorer step). */
@media (max-width:699.98px){
  .fr-root.fr-scroll-whole:not(.fr-making){ overflow-y:auto; align-items:flex-start; }
  .fr-root.fr-scroll-whole:not(.fr-making) .fr-box{ height:auto; min-height:100%; }
  .fr-root.fr-scroll-whole:not(.fr-making) .fr-body{ flex:1 0 auto; overflow:visible; }
}
.fr-foot .fr-play[hidden]{ display:none; }
.fr-play svg{ width:18px; height:18px; }
.fr-later{ border:0; background:transparent; color:var(--muted); font:600 15px/1 "Poppins", sans-serif; padding:12px 18px; cursor:pointer; border-radius:12px; }
.fr-later[hidden]{ display:none; }
.fr-later:focus-visible{ outline:var(--focus-ring); }
.fr-error{ margin:0; min-height:1em; font-size:13px; color:var(--k-warn); text-align:center; }
.fr-logo{ width:72px; height:72px; border-radius:20px; align-self:center; margin-top:8px; }
.fr-h{ margin:0; font:600 28px/1.15 "ITC Ronda", "Poppins", sans-serif; color:var(--ink); text-align:center; outline:none; }
.fr-p{ margin:0; font-size:15px; line-height:1.5; color:var(--muted); text-align:center; }
.fr-rows{ display:flex; flex-direction:column; gap:14px; margin-top:4px; }
.fr-row{ display:flex; gap:14px; align-items:flex-start; }
.fr-row-ic{ width:44px; height:44px; flex:none; border-radius:13px; background:var(--surface); display:grid; place-items:center; color:var(--accent); }
:root[data-theme="white"] .fr-row-ic{ color:var(--goldtext); }
.fr-row-ic svg{ width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.fr-row-t{ display:flex; flex-direction:column; gap:2px; padding-top:2px; }
.fr-row-t b{ font-size:15.5px; font-weight:600; color:var(--ink); }
.fr-row-t span{ font-size:13.5px; line-height:1.4; color:var(--muted); }
.fr-me{ display:flex; flex-direction:column; align-items:center; gap:8px; }
.fr-me-face{ width:96px; height:96px; border-radius:50%; overflow:hidden; display:grid; place-items:center;
  background:color-mix(in srgb, var(--accent) 22%, var(--surface)); box-shadow:0 0 0 4px var(--line); }
.fr-me-face svg{ width:96px; height:103px; }
.fr-me-name{ font:600 20px/1.2 "ITC Ronda", "Poppins", sans-serif; color:var(--ink); }
.fr-sec{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:4px; }
.fr-sec-h{ font-size:11.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--faint); }
.fr-sec-aside{ font-size:12px; color:var(--faint); }
.fr-link{ display:inline-flex; align-items:center; gap:6px; border:0; background:transparent; color:var(--ink); font:600 13.5px/1 "Poppins", sans-serif; cursor:pointer; padding:6px 4px; border-radius:8px; }
.fr-link svg{ width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.fr-link:focus-visible{ outline:var(--focus-ring); }
.fr-names{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:6px; }
.fr-name{ height:40px; padding:0 10px; border-radius:12px; border:1px solid var(--line); background:var(--surface); color:var(--ink);
  font:600 14px/1 "Poppins", sans-serif; cursor:pointer; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fr-name.on{ background:var(--accent); color:var(--on-accent); border-color:transparent; box-shadow:0 3px 0 var(--k-lip); }
.fr-name:focus-visible, .fr-look:focus-visible, .fr-day:focus-visible, .fr-goal:focus-visible{ outline:var(--focus-ring); outline-offset:2px; }
.fr-note{ margin:0; font-size:13px; line-height:1.45; color:var(--faint); }
.fr-note-ic{ display:flex; gap:8px; align-items:flex-start; }
.fr-note-ic svg{ width:16px; height:16px; flex:none; margin-top:1px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linejoin:round; }
.fr-looks{ display:flex; gap:10px; overflow-x:auto; padding:4px 2px 6px; scrollbar-width:none; }
.fr-looks::-webkit-scrollbar{ display:none; }
.fr-look{ width:62px; height:62px; flex:none; border-radius:50%; border:0; padding:0; cursor:pointer; overflow:hidden; display:grid; place-items:center;
  background:var(--surface); box-shadow:0 0 0 2px var(--line); }
.fr-look > svg{ width:56px; height:60px; }
.fr-look.on{ box-shadow:0 0 0 3px var(--accent); }
/* "Make my own" beside the eight looks (avatar round, P8 a): the same circle, with the words. */
.fr-own{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; color:var(--ink);
  font:600 12.5px/1.15 "Poppins", system-ui, sans-serif; text-align:center; padding:4px; }
.fr-own .av-face{ width:38px; height:38px; }
.fr-own-t{ display:block; max-width:52px; }
/* While the creator is open inside the set-up, its own Done is the screen's gold button. The
   name is chosen on the set-up's own step, so the creator's name line steps aside, and a
   shorter preview leaves room for the options in the set-up's box (which on a computer is a
   narrow column the height of the screen). The band that stays in sight takes the box's ground. */
.fr-root.fr-making .fr-foot{ display:none; }
.fr-root.fr-making .avp-host{ --avp-ground:var(--paper); }
.fr-root.fr-making .avp-head{ display:none; }
.fr-root.fr-making .avp-preview{ aspect-ratio:auto; height:170px; max-height:none; }
.fr-days{ display:grid; grid-template-columns:repeat(7, minmax(0, 1fr)); gap:6px; }
.fr-day{ height:46px; border-radius:12px; border:1px solid var(--line); background:var(--surface); color:var(--ink); font:600 15px/1 "Poppins", sans-serif; cursor:pointer; }
.fr-day.on{ background:var(--accent); color:var(--on-accent); border-color:transparent; box-shadow:0 3px 0 var(--k-lip); }
.fr-goals{ display:flex; flex-direction:column; gap:8px; }
.fr-goal{ display:flex; align-items:center; gap:12px; padding:12px 14px; border-radius:16px; border:1px solid var(--line); background:var(--surface);
  color:var(--ink); text-align:left; font:inherit; cursor:pointer; }
.fr-goal.on{ border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); background:var(--accent-wash); }
.fr-goal-t{ display:flex; flex-direction:column; gap:2px; flex:1 1 auto; min-width:0; }
.fr-goal-t b{ font-size:15px; font-weight:600; }
.fr-goal-t span{ font-size:12.5px; color:var(--muted); }
.fr-goal-xp{ font:600 15px/1 "ITC Ronda", "Poppins", sans-serif; color:var(--ink); white-space:nowrap; }
.fr-goal.on .fr-goal-xp{ color:var(--goldtext); }
.fr-mapcard{ background:var(--surface); border:1px solid var(--line); border-radius:18px; padding:14px; display:flex; flex-direction:column; gap:10px; }
.fr-mapcard-h{ display:flex; justify-content:space-between; align-items:baseline; gap:8px; }
.fr-mapcard-h b{ font-size:15px; font-weight:600; color:var(--ink); }
.fr-mapcard-h span{ font-size:12px; color:var(--faint); }
.fr-worlds{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; }
.fr-world{ border:1px solid var(--line); border-radius:12px; padding:8px; display:flex; flex-direction:column; gap:6px; min-width:0; }
.fr-world-n{ display:flex; align-items:center; gap:6px; font-size:12px; font-weight:600; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.fr-world-dot{ width:8px; height:8px; flex:none; border-radius:3px; background:var(--w); }
.fr-fog{ display:grid; grid-template-columns:repeat(5, minmax(0, 1fr)); gap:3px; }
.fr-fog i{ display:block; aspect-ratio:1; border-radius:3px; border:1px dashed var(--line); }
@media (min-width:841px){
  .fr-box{ max-width:520px; padding-top:28px; }
}


/* ---- phase 3: answering a question ---- */
/* Founder approval 2026-10-14 (boards QPhone / QPhoneRight / QPhoneMiss / QComputer).
   The practice question and "Finish it": a keypad under the thumb on a phone, a Check
   that waits for an answer, the stretch to the next reward as segments, and the answer
   in a sheet whose heading, mark and colour all say which of three it is. */


.dg-aux{ display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.dg-aux .dg-ladder{ margin-top:0; }

/* Check and the way on: one yellow button you can feel. */
.ans-check, .ans-go{ appearance:none; border:0; height:52px; padding:0 28px; border-radius:16px;
  font:600 16px/1 "Poppins", system-ui, sans-serif; cursor:pointer;
  background:var(--accent); color:var(--on-accent); box-shadow:0 4px 0 var(--k-lip);
  transition:transform .08s ease, box-shadow .08s ease, filter .2s; }
.ans-check:hover:not([disabled]), .ans-go:hover{ filter:brightness(1.05); }
.ans-check:active:not([disabled]), .ans-go:active{ transform:translateY(3px); box-shadow:0 1px 0 var(--k-lip); }
.ans-check:focus-visible, .ans-go:focus-visible{ outline:var(--focus-ring); outline-offset:3px; }
.ans-check[disabled]{ background:var(--track); color:var(--faint); box-shadow:none; cursor:default; }
.ans-dock{ display:flex; flex-direction:column; gap:12px; margin-top:16px; }
.ans-dock .dg-conf{ margin-top:0; }
.ans-dock > .ans-check{ align-self:flex-end; }
.ans-row{ display:flex; flex-wrap:wrap; align-items:center; gap:12px;
  padding-top:14px; border-top:1px solid var(--line); }
.ans-row .dg-aux{ flex:1 1 auto; }
.ans-row .ans-check{ margin-left:auto; }
.dg-qcard.answered .ans-dock{ display:none; }
.kpad{ display:none; }

/* The sheet's head: a mark, a word, the server's own line. */
.dg-fb .fb-head{ display:flex; gap:12px; align-items:flex-start; }
.fb-mark{ flex:none; width:40px; height:40px; border-radius:50%; display:grid; place-items:center;
  background:var(--track); color:var(--ink); }
.fb-mark svg{ width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:3; }
.dg-fb.good .fb-mark{ background:var(--k-good); color:var(--on-accent); }
.dg-fb.miss .fb-mark{ background:var(--k-warn); color:var(--on-accent); }
.fb-words{ min-width:0; }
.fb-title{ margin:2px 0 3px; font:400 21px/1.2 "ITC Ronda", "Poppins", sans-serif; color:var(--ink); }
.dg-fb.good .fb-title{ color:var(--k-good); }
.dg-fb.miss .fb-title{ color:var(--k-warn); }
.fb-line{ margin:0; font-size:14px; line-height:1.5; color:var(--ink); }
/* "Something wrong with this question?" (2026-10-29): quiet, last on the sheet. */
.fb-report{ margin-top:14px; font-size:13px; color:var(--ink); }
.fb-report-open{ background:none; border:0; padding:0; font:inherit; color:var(--ink); text-decoration:underline; cursor:pointer; }
.fb-report-pick{ display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.fb-report-pick[hidden]{ display:none; }
.fb-report-pick p, .fb-report-done{ flex-basis:100%; margin:0; font-size:13px; color:var(--ink); }
.dg-fb.good{ border-color:var(--k-good); background:color-mix(in srgb, var(--k-good) 12%, var(--surface)); }
.dg-fb.miss{ border-color:var(--k-warn); background:color-mix(in srgb, var(--k-warn) 12%, var(--surface)); }
.dg-fb .dg-next .ans-go{ margin-left:auto; }

/* The screens that hold the dock enter by fading only, as the map does (home.css,
   #view-map). shell.css's entrance slides each view up 8px with a filling transform
   animation, and in Chrome a filling transform keeps the view a containing block for
   position:fixed — so the pinned dock and the answer sheet were drawn inside the view,
   near the top of a phone, instead of at the bottom of the screen (seen 2026-10-14). */
#view-practice.active, #view-topic.active, #view-teach.active{ animation-name:fade-in-only; }

@media (max-width:840px){
  /* The keypad replaces the computer's row of maths keys. */
  .dg-qcard.has-kpad .mathkbd{ display:none; }
  .ans-dock{ position:fixed; left:0; right:0; bottom:0; z-index:130; margin:0;
    display:flex; flex-direction:column; gap:8px;
    padding:10px 12px calc(12px + env(safe-area-inset-bottom, 0px));
    background:var(--rail); border-top:1px solid var(--line); }
  /* In the dock, top to bottom: How sure?, I don't know / a hint, the keys, Check. */
  .ans-row{ display:contents; }
  .ans-dock .dg-conf{ order:1; gap:6px; }
  .ans-dock .dg-aux{ order:2; gap:8px; }
  .ans-dock .kpad{ order:3; }
  .ans-dock .ans-check{ order:4; align-self:stretch; }
  .ans-dock .dg-notsure{ padding:8px 12px; }
  .ans-dock .dg-chip{ padding:5px 10px; }
  .dg-rung-body{ scroll-margin-bottom:470px; }
  .kpad{ display:grid; grid-template-columns:repeat(5, minmax(0, 1fr)); gap:5px; }
  /* The question's header wraps: the meter takes its own line rather than being
     squeezed beside the topic name (its words broke one to a line at 390px). */
  #pracBody .dg-top{ flex-wrap:wrap; row-gap:8px; }
  #pracBody .dg-top .meter{ margin-left:0; }
  #pracBody .meter > span{ white-space:nowrap; }
  .kp-key{ height:44px; border:0; border-radius:12px; background:var(--surface); color:var(--ink);
    font:400 20px/1 "ITC Ronda", "Poppins", sans-serif; cursor:pointer;
    box-shadow:0 2px 0 rgba(0,0,0,.28); }
  .kp-key.kp-fn{ background:var(--accent-wash); font-size:16px; }
  .kp-key .sup{ font-size:.62em; vertical-align:super; }
  .kp-key:active{ transform:translateY(2px); box-shadow:none; }
  .kp-key:focus-visible{ outline:var(--focus-ring); outline-offset:-2px; }
  .ans-check{ width:100%; }
  /* Room under the question for the dock while it is up. */
  /* Only for the screen on show: the tutor opened from a question (D1, 2026-11-18) keeps the
     question's screen as it was left, and its room would squeeze the chat to a strip. */
  .content:has(.view.active .dg-qcard.has-kpad:not(.answered)){ padding-bottom:480px; }
  /* The answer slides up as a sheet over the bottom of the screen; the question
     stays readable above it. Opaque, not glass: it is something to read. */
  /* Only an answer's sheet (it carries the heading): a "type the number on its own"
     note or a network hiccup stays in the card, above the keypad it needs. */
  #pracFeedback .dg-fb:has(.fb-head){ position:fixed; left:0; right:0; bottom:0; z-index:140; margin:0;
    max-height:78vh; overflow-y:auto; border:0; border-top:1px solid var(--line);
    border-radius:24px 24px 0 0; padding:20px 18px calc(20px + env(safe-area-inset-bottom, 0px));
    box-shadow:0 -18px 40px rgba(0,0,0,.35); }
  #pracFeedback .dg-fb.neutral:has(.fb-head){ background:var(--surface); }
  #pracFeedback .dg-fb .ans-go{ width:100%; margin-left:0; }
  /* Room to bring the question up under the top bar above the sheet (home-practice.js). */
  .content:has(.view.active #pracFeedback .fb-head){ padding-bottom:85vh; }
  #pracBody .dg-qcard{ scroll-margin-top:calc(var(--topbar-real-h, var(--topbar-h, 64px)) + 10px); }
}
@media (max-width:840px) and (prefers-reduced-motion: no-preference){
  :root:not([data-motion="off"]) #pracFeedback .dg-fb:has(.fb-head){ animation:kSheetUp .32s cubic-bezier(.2,.8,.2,1) both; }
}
@keyframes kSheetUp{ from{ transform:translateY(100%); } to{ transform:none; } }

/* The miss sheet's worked example names its own question: it is never the one on the card. */
.dg-we-q{ margin:0 0 8px; font-weight:600; color:var(--ink); }
/* An offer's "Keep going" stands in for the sheet's own way on (home-practice.js). */
.ans-go[hidden]{ display:none; }

/* ====================================================== DIAGNOSTIC ONLY ==
   Founder decisions 2026-10-15 ("I agree with the proposed changes and your
   pick"; "I agree with your recommendation 'Not checked yet'"), design canvas
   https://claude.ai/artifact/E6dvRqdehmMzJygRVSo6yU. Every rule below is for a
   Diagnostic-only place, so the whole block reverts in one cut:
     .hud-check                 the chip that replaces the league place
     .td-next / .td-how         Today's countdown and "What happens next"
     .node.look …               the look-only map's five lights
     .look-*                    the topic screen, verdict first
     .mm-*                      "Your map" and its reveal (home-mymap.js)     */
.hud-check svg{ fill:none; stroke:var(--k-good); stroke-width:1.8; stroke-linecap:round; }

/* Today */
.td-next{ border-color:color-mix(in srgb, var(--k-good) 45%, var(--line)); }
.td-next .td-card-top{ align-items:flex-start; }
.tdn-ic, .mm-ic{ width:44px; height:44px; border-radius:14px; flex:none; display:flex; align-items:center;
  justify-content:center; background:color-mix(in srgb, var(--k-good) 16%, transparent); color:var(--k-good); }
.tdn-ic svg, .mm-ic svg{ width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.8;
  stroke-linecap:round; stroke-linejoin:round; }
.tdn-text{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:2px; }
.tdn-line{ margin:0; font-size:13px; line-height:1.4; color:var(--muted); }
.tdn-bar, .mm-week{ display:flex; align-items:center; gap:10px; }
.tdn-track, .mm-track{ flex:1 1 auto; height:8px; border-radius:999px; overflow:hidden;
  background:color-mix(in srgb, var(--ink) 12%, transparent); }
.tdn-track i, .mm-track i{ display:block; height:100%; border-radius:999px; background:var(--k-good); }
.tdh-steps{ margin:0; padding-left:20px; display:grid; gap:8px; color:var(--muted); font-size:14px; line-height:1.45; }

/* The look-only map's five lights on a tile (home-map.js paintLookOnly). Mastered is
   the solid .n-done tile and still to come the quiet .n-far one; three are new. */
.node.n-looks{ border-style:dashed; background:color-mix(in srgb, var(--nc) 22%, var(--surface)); }
.node.n-gap{ border-color:var(--nc); background:color-mix(in srgb, var(--nc) 10%, var(--surface));
  box-shadow:0 0 0 3px var(--paper), 0 0 0 6px color-mix(in srgb, var(--nc) 55%, transparent); }
.node.n-unchecked{ border-style:dotted; border-color:color-mix(in srgb, var(--nc) 60%, transparent);
  background:color-mix(in srgb, var(--nc) 5%, var(--surface)); }
.node.n-unchecked .q{ font:700 20px/1 "ITC Ronda", "Poppins", system-ui, sans-serif; }
/* Selected, a gap tile keeps the selection's lift and halo over its own ring. */
.node.n-gap.sel{ box-shadow:0 0 0 3px var(--paper), 0 0 0 6px color-mix(in srgb, var(--nc) 55%, transparent),
  0 0 0 10px color-mix(in srgb, var(--nc) 32%, transparent); }
.map-legend .node.legend-sample.n-gap{ box-shadow:0 0 0 2px var(--paper), 0 0 0 4px color-mix(in srgb, var(--nc) 55%, transparent); }
.map-legend .node.legend-sample .q{ font-size:12px; }

/* The topic screen, verdict first (home-topic.js renderLookOnlyTopic). */
.look-chip{ display:inline-flex; align-items:center; height:26px; padding:0 11px; border-radius:999px;
  font-size:12.5px; font-weight:600; background:color-mix(in srgb, var(--ink) 9%, transparent); color:var(--ink); }
.look-chip.lk-mastered{ background:var(--k-good); color:#062B1E; }
.look-chip.lk-looks_known{ background:color-mix(in srgb, var(--k-good) 16%, transparent); color:var(--k-good); }
.look-chip.lk-to_work_on{ background:color-mix(in srgb, var(--accent) 20%, transparent); color:var(--goldtext, var(--accent)); }
.look-flow{ grid-template-columns:minmax(0, 1fr) 300px; }
.look-main{ display:flex; flex-direction:column; gap:20px; min-width:0; }
.look-says{ border-color:color-mix(in srgb, var(--accent) 45%, var(--line)); }
.look-verdict{ font-size:18px; font-weight:600; line-height:1.45; color:var(--ink); }
.fcard.side .look-ref{ display:flex; align-items:center; gap:10px; }
.look-name{ flex:1 1 auto; min-width:0; color:var(--ink); font-weight:600; }
.look-word{ flex:none; font-size:12px; color:var(--muted); }
.look-sw, .mm-sw{ display:inline-block; width:16px; height:16px; border-radius:5px; flex:none;
  border:2px solid color-mix(in srgb, var(--ink) 28%, transparent); }
.look-sw.lk-mastered, .mm-sw-mastered{ background:var(--k-good); border-color:var(--k-good); }
.look-sw.lk-looks_known, .mm-sw-looks_known{ border:2px dashed var(--k-good);
  background:color-mix(in srgb, var(--k-good) 22%, transparent); }
.look-sw.lk-to_work_on{ border-color:var(--accent); box-shadow:0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.look-sw.lk-not_checked, .mm-sw-not_checked{ border:2px dotted color-mix(in srgb, var(--ink) 50%, transparent); }

/* "Your map" (home-mymap.js) */
.mm-card{ background:var(--surface); border:1px solid var(--line); border-radius:22px; padding:20px 22px;
  display:flex; flex-direction:column; gap:14px; margin-top:16px; min-width:0; }
.mm-h2{ margin:0; font:600 21px/1.2 "ITC Ronda", "Poppins", system-ui, sans-serif; color:var(--ink); }
.mm-h3{ margin:0; font-size:16px; font-weight:600; line-height:1.3; color:var(--ink); }
.mm-small{ margin:0; display:block; font-size:13px; line-height:1.4; color:var(--muted); }
.mm-grow{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:2px; }
.mm-next{ border-color:color-mix(in srgb, var(--k-good) 45%, var(--line)); }
.mm-next-row{ display:flex; align-items:center; gap:16px; }
.mm-week{ width:190px; flex:none; flex-direction:column; align-items:stretch; gap:6px; }
.mm-week .mm-small{ text-align:right; }
.mm-since{ margin:0; font-size:15px; color:var(--ink); }
.mm-since .mm-small{ display:inline; }
.mm-plus{ font:700 26px/1 "ITC Ronda", "Poppins", system-ui, sans-serif; color:var(--accent); margin-right:2px; }
.mm-stats{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:12px; }
.mm-stat{ display:flex; flex-direction:column; gap:6px; padding:14px; border-radius:16px; min-width:0;
  background:color-mix(in srgb, var(--ink) 5%, var(--surface)); border:1px solid var(--line); }
.mm-stat .mm-small b{ color:var(--ink); }
.mm-stat-note{ display:none; }
.mm-two:has(> .mm-card:only-child){ grid-template-columns:minmax(0, 1fr); }
.mm-num{ font:600 30px/1 "ITC Ronda", "Poppins", system-ui, sans-serif; color:var(--ink); }
.mm-worlds{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:6px 28px; }
.mm-world{ display:grid; grid-template-columns:150px minmax(0, 1fr) auto; align-items:center; gap:12px; padding:6px 4px;
  border:0; border-radius:10px; background:none; color:var(--ink); font:inherit; text-align:left; cursor:pointer; }
.mm-world:hover, .mm-row:hover{ background:color-mix(in srgb, var(--ink) 6%, transparent); }
.mm-world:focus-visible, .mm-row:focus-visible{ outline:var(--focus-ring); outline-offset:2px; }
.mm-wname{ display:flex; align-items:center; gap:8px; min-width:0; font-size:14px; font-weight:600; }
.mm-dot{ width:12px; height:12px; border-radius:4px; flex:none; background:var(--wc); }
.mm-seg{ display:flex; height:14px; border-radius:999px; overflow:hidden; background:color-mix(in srgb, var(--ink) 10%, transparent); }
.mm-seg i{ display:block; height:100%; }
.mm-seg .s-m{ background:var(--wc); }
.mm-seg .s-k{ background:color-mix(in srgb, var(--wc) 42%, transparent); }
.mm-seg .s-n{ background:repeating-linear-gradient(90deg, color-mix(in srgb, var(--wc) 34%, transparent) 0 3px, transparent 3px 6px); }
.mm-wcount{ white-space:nowrap; text-align:right; }
.mm-legend{ margin:0; display:flex; flex-wrap:wrap; gap:8px 20px; font-size:13px; color:var(--muted); }
.mm-legend > span{ display:inline-flex; align-items:center; gap:8px; }
.mm-two{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:16px; }
.mm-list-head{ display:flex; align-items:center; gap:12px; }
.mm-ic-gold{ background:color-mix(in srgb, var(--accent) 18%, transparent); color:var(--accent); }
.mm-row{ display:flex; align-items:center; gap:14px; width:100%; padding:12px 14px; border-radius:16px;
  border:1px solid var(--line); background:color-mix(in srgb, var(--ink) 4%, var(--surface)); color:var(--ink);
  font:inherit; text-align:left; cursor:pointer; }
.mm-row b{ font-size:15px; }
.mm-go{ width:20px; height:20px; flex:none; fill:none; stroke:var(--muted); stroke-width:2; stroke-linecap:round; }
.mm-foot{ margin-top:2px; }
@media (max-width:840px){
  .mm-card{ padding:16px; }
  .mm-stats{ gap:8px; }
  .mm-stat{ padding:10px; }
  .mm-num{ font-size:24px; }
  .mm-worlds, .mm-two{ grid-template-columns:minmax(0, 1fr); }
  .mm-world{ grid-template-columns:118px minmax(0, 1fr) auto; }
  .mm-words{ display:none; }
  .mm-stat-note{ display:block; }
  .td-next .td-card-top{ flex-wrap:nowrap; }
  .mm-next-row{ flex-wrap:wrap; }
  .mm-week{ width:100%; flex-direction:row-reverse; align-items:center; }
  .look-flow{ grid-template-columns:minmax(0, 1fr); }
}

/* The reveal, once (home-mymap.js maybeReveal). The fog only moves where motion is on. */
.mm-reveal{ position:fixed; inset:0; z-index:1000; overflow-y:auto; background:var(--paper); }
.mm-reveal[hidden]{ display:none; }
.mm-reveal-in{ max-width:560px; min-height:100%; margin:0 auto; padding:24px 16px 28px;
  display:flex; flex-direction:column; gap:16px; }
.mm-skip{ align-self:flex-end; }
.mm-eyebrow{ margin:0; text-align:center; font-size:12px; font-weight:600; letter-spacing:.08em;
  text-transform:uppercase; color:var(--k-good); }
.mm-reveal-h{ margin:0; text-align:center; font-size:28px; color:var(--ink); }
.mm-isles{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; }
.mm-isle{ position:relative; overflow:hidden; display:flex; flex-direction:column; gap:10px; padding:14px;
  border-radius:20px; background:var(--surface); border:1px solid var(--line); min-width:0; }
.mm-isle b{ font-size:14px; color:var(--ink); }
.mm-mini{ display:grid; grid-template-columns:repeat(5, 22px); gap:5px; }
.mm-mini i{ display:block; width:22px; height:22px; border-radius:7px;
  border:2px solid color-mix(in srgb, var(--ink) 18%, transparent); background:color-mix(in srgb, var(--ink) 5%, transparent); }
.mm-mini i.f{ border-color:var(--wc); background:var(--wc); box-shadow:0 0 12px color-mix(in srgb, var(--wc) 55%, transparent); }
.mm-mini i.h{ border:2px dashed var(--wc); background:color-mix(in srgb, var(--wc) 18%, transparent); }
.mm-fog{ position:absolute; inset:0; pointer-events:none; opacity:0; }
@media (prefers-reduced-motion: no-preference){
  :root:not([data-motion="off"]) .mm-fog{ opacity:1; animation:mmFogOff 1s ease-out both;
    background:radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--muted) 28%, var(--paper)),
      color-mix(in srgb, var(--paper) 94%, transparent) 70%); }
}
@keyframes mmFogOff{ from{ opacity:1; } to{ opacity:0; visibility:hidden; } }
.mm-reveal-sum{ display:flex; align-items:center; gap:14px; padding:16px; border-radius:20px;
  background:var(--surface); border:1px solid var(--line); }
.mm-reveal-sum p{ margin:0; font-size:14px; line-height:1.45; color:var(--muted); }
.mm-reveal-sum b{ color:var(--ink); }
.mm-big{ font:600 40px/1 "ITC Ronda", "Poppins", system-ui, sans-serif; color:var(--k-good); }
.mm-reveal-go{ width:100%; }
/* Where focus lands when the reveal closes: a place to read from, not a control. */
#myMapTitle:focus{ outline:none; }
/* Gold and green text on the light background: the theme's own darker inks (3:1 and up). */
.mm-plus, .mm-ic-gold, .look-chip.lk-to_work_on{ color:var(--goldtext, var(--accent)); }
:root[data-theme="white"] .mm-eyebrow,
:root[data-theme="white"] .look-chip.lk-looks_known{ color:#0F6E52; }
:root[data-theme="white"] .look-chip.lk-mastered{ background:#1E9E74; color:#FFFFFF; }

/* ==========================================================================
   THE TUTOR CHAT: MADE OF THE APP'S OWN PARTS (redesign 2026-11-08)

   Max on the exercise-book page: "the ui for it looks bolted on. there is loads of spare
   room and it looks all crammed". It was: a squared panel pasted on the page, three
   different left edges (header, writing, composer), 186px of empty margin, and everything
   stacked down one strip that overflowed a laptop. The founder had already asked for the
   opposite (2026-08-31: "the chat becomes the whole environment rather than having a box
   within it"). The first redesign's lesson still holds too: no sparkle, no pill composer,
   no bubble-and-chip chatbot.

   So the chat is built from Today's parts, on Today's edges:
   - one width (Today's 928px): the header, the page and the composer share both edges, and
     the scrollbar is at the window's edge, not on the column;
   - the start is Today's heading over Today's cards, side by side, and fits one screen;
   - the tutor's words sit straight on the page, the learner's in a card on the right;
   - on a wide screen the whiteboard opens beside the chat, where the spare room was.

   Kept from the research pass: replies at 17px/1.7 in 66-character lines (BDA), 16px in
   the box (iOS zoom), 40-44px controls, the tutor never dressed as a person (DfE 2026), no
   all-caps labels.
   ========================================================================== */

#view-tutor{ --tc-w:928px; --tc-edge:36px; }
@media (max-width:840px){ #view-tutor{ --tc-edge:16px; } }

/* The chat fills the screen the phone can actually see: 100dvh, not 100vh, which on a
   phone includes the address bar and left the composer under it. With that, the phone's
   old guess at the column's height (100vh - 180px, home.css) can go. */
.canvas:has(#view-tutor.active){ height:100vh; height:100dvh; }

/* The chat has the page to itself (Max, 2026-11-07): the top bar's Messages, Board, streak,
   XP and league step aside while it is open, and come back on every other screen. The
   staff banner ("you are not this child") never does: while it shows, the bar stays with
   only the banner in it. The menu button floats where the bar was, wherever it shows (a
   phone, or a computer with the rail hidden), so the chat's own header row makes room. */
.canvas:has(#view-tutor.active) .topbar:has(#staffBanner[hidden]){ display:none; }
.canvas:has(#view-tutor.active) .topbar > :not(#staffBanner, .spacer){ display:none; }
@media (max-width:1100px){
  .app.railhidden #view-tutor .flow-nav{ padding-left:48px; }
}
/* A phone shows no menu button since the 18 Nov redesign (line.css, ".app .rail-open"), so
   its header row no longer keeps 48px for one (F2, the founder's picks of 2026-11-22): that
   room is what lets the replies ring fit on a 320px phone. The rule above still makes room
   wherever the button does show (the side menu hidden on a computer). */
@media (max-width:840px){
  :root .app:has(#view-tutor.active) .rail-open{ top:22px; }
}

/* ---- the header: what this is, in the book's hand -------------------------------------- */
.tc-title-text{ display:flex; flex-direction:column; gap:1px; min-width:0; }
.tc-kind{ font:400 21px/1.2 "ITC Ronda", "Poppins", sans-serif; color:var(--ink); }
.tc-new{ margin-left:auto; }
.tc-new + .chat-history{ margin-left:0; }

/* ---- the tutor replies ring (the founder's picks of 2026-11-22, look b) -------------------- */
/* The replies left today (home-replies.js), in the title row of both chats. The pale neutral
   colour, never gold; the number in Poppins, because the rounded heading font draws 0 as a
   circle and "80" read as "8O". 44px on a computer with the words beside it; 46px with "left"
   under the number on a phone and on a computer narrower than 1280px, where the words crowded
   the title row onto two lines (measured 900-1100px, 2026-11-22); 36px and the number alone
   at 340px wide or narrower. */
#view-tutor .flow-nav{ position:relative; }
.rr-ring{ position:relative; display:inline-flex; align-items:center; gap:10px; min-width:44px; height:44px;
  padding:0 2px; margin:-5px 0 15px auto; border:0; border-radius:22px; background:none; color:var(--ink);
  font:inherit; cursor:pointer; flex:none; }
.rr-ring[hidden]{ display:none; }
.rr-ring:focus-visible{ outline:var(--focus-ring); outline-offset:2px; }
.rr-ring:not([hidden]) ~ .tc-new{ margin-left:0; }
.rr-dial{ position:relative; display:inline-grid; place-items:center; flex:none; width:44px; height:44px; }
.rr-dial svg{ display:block; width:100%; height:100%; overflow:visible; }
.rr-trk{ fill:none; stroke:var(--track); }
.rr-val{ fill:none; stroke:var(--look-neutral); stroke-linecap:round; }
.rr-num{ position:absolute; inset:0; display:grid; place-items:center; align-content:center; gap:1px;
  font:600 15px/1 "Poppins", sans-serif; color:var(--ink); font-variant-numeric:tabular-nums; }
.rr-num b{ font-weight:600; }
.rr-sub{ display:none; }
.rr-lab{ font-size:13.5px; font-weight:500; color:var(--muted); white-space:nowrap; }
@media (max-width:1279px){
  .rr-ring .rr-lab{ display:none; }
  .rr-in-row{ width:46px; height:46px; }
  .rr-in-row .rr-num:has(.rr-sub){ font-size:14px; }
  .rr-in-row .rr-sub{ display:block; font:500 11px/1 "Poppins", sans-serif; color:var(--muted); }
}
@media (max-width:340px){
  /* With the ring there, "Talk it through" kept one line only with the gaps narrowed. */
  #view-tutor .flow-nav{ gap:8px; }
  .rr-ring{ padding:0; margin-right:-8px; }
  .rr-in-row{ width:36px; height:36px; }
  .rr-in-row .rr-num, .rr-in-row .rr-num:has(.rr-sub){ font-size:13.5px; }
  .rr-in-row .rr-sub{ display:none; }
}
/* The box a tap opens, under the ring (placed by home-replies.js): full width on a phone. */
.rr-box{ position:absolute; z-index:60; padding:16px 18px; border-radius:18px; background:var(--surface);
  color:var(--ink); border:1px solid rgba(255,255,255,.08); box-shadow:0 14px 36px rgba(0,0,0,.38); text-align:left; }
.rr-box[hidden]{ display:none; }
.rr-box-top{ display:flex; gap:14px; align-items:center; }
.rr-in-box{ width:64px; height:64px; }
.rr-in-box .rr-num{ font-size:20px; }
.rr-box-h{ margin:0; font:600 16.5px/1.3 "Poppins", sans-serif; color:var(--ink); }
.rr-box-s{ margin:4px 0 0; font-size:14px; line-height:1.4; color:var(--muted); }
.rr-box-p{ margin:12px 0 0; font-size:14px; line-height:1.45; color:var(--muted); }
.rr-caret{ position:absolute; top:-8px; width:16px; height:16px; background:var(--surface); transform:rotate(45deg);
  border-left:1px solid rgba(255,255,255,.08); border-top:1px solid rgba(255,255,255,.08); }
/* Above the message box: the quiet line from 10 left, or the card at none left / resting. */
.rr-low{ margin:2px 4px 14px; font-size:13.5px; line-height:1.35; color:var(--muted); }
.rr-low b{ color:var(--ink); font-weight:600; }
.rr-card{ display:flex; gap:14px; align-items:center; margin:2px 0 10px; padding:14px 16px; border-radius:18px;
  background:var(--surface); border:1px solid rgba(255,255,255,.07); }
.rr-in-card{ width:48px; height:48px; }
.rr-in-card .rr-num{ font-size:16.4px; }
.rr-card-h{ margin:0; font:400 19px/1.25 "ITC Ronda", "Poppins", sans-serif; color:var(--ink); }
.rr-card-s{ margin:4px 0 0; font-size:14px; line-height:1.45; color:var(--muted); }
:root[data-theme="white"] .rr-box, :root[data-theme="white"] .rr-card{ border-color:rgba(38,11,55,.10); }
:root[data-theme="white"] .rr-box{ box-shadow:0 14px 36px rgba(38,11,55,.16); }
:root[data-theme="white"] .rr-caret{ border-color:rgba(38,11,55,.10); }
/* At none left Send stays (every message is still read by the safety check) but is no longer
   the gold main button. */
#view-tutor.rr-none #tcSend{ background:transparent; color:var(--ink); box-shadow:inset 0 0 0 1.5px var(--line); }
/* A chat a disclosure closed, or a tutor a flag closed, shows none of this. */
#view-tutor.active.tc-flagged .rr-ring, #view-tutor.active.tc-flagged .rr-box,
#view-tutor.active.tc-flagged .rr-slot, #view-tutor.active.tc-locked .rr-ring,
#view-tutor.active.tc-locked .rr-box{ display:none; }

/* ---- the page ------------------------------------------------------------------------------- */
/* The scroller is the whole canvas, so its bar is at the window's edge; what is written in
   it is padded in to the same two edges as the header and the composer. */
.content:has(#view-tutor.active){ max-width:none; padding-left:0; padding-right:0; }
#view-tutor .flow-nav, .tc-wrap > :not(.tc-thread){
  width:min(var(--tc-w), calc(100% - 2 * var(--tc-edge))); max-width:none; }
#view-tutor .flow-nav{ margin-left:auto; margin-right:auto; }
.tc-thread{ gap:18px; padding:14px max(var(--tc-edge), calc((100% - var(--tc-w)) / 2)) 24px; }
/* A lesson keeps its road beside the chat: the pair sits on the page's two edges. */
@media (min-width:1100px){
  .tc-layout:has(> .tc-side:not([hidden])){ width:min(var(--tc-w), calc(100% - 2 * var(--tc-edge))); margin:0 auto; }
  .tc-layout:has(> .tc-side:not([hidden])) > .tc-wrap{ --tc-edge:0px; }
}
/* A board opened on a wide screen stands beside the chat (home-tutor.js, tcDock), so the
   learner reads the words and watches the drawing together, and keeps typing. */
.tc-dock{ display:none; }
#view-tutor.active .tc-layout.docked{ gap:24px; padding:0 var(--tc-edge); }
#view-tutor:has(.tc-layout.docked) .flow-nav{ width:calc(100% - 2 * var(--tc-edge)); }
.tc-layout.docked > .tc-wrap{ --tc-edge:0px; flex:4 1 0; }
.tc-layout.docked > .tc-dock{ display:block; flex:6 1 0; min-width:0; overflow-y:auto; padding-bottom:14px; }
/* Beside a board the chat is phone-width, so it takes the phone's economies. */
.tc-layout.docked .tc-keys-w{ display:none; }
.tc-layout.docked .tc-input::placeholder{ white-space:nowrap; }
/* Nowhere does the message box's hint take a second line, half hidden (F3, the founder's picks
   of 2026-11-22): home-tutor.js tcFitHint picks words that fit, and this is the net under it. */
.tc-input::placeholder{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tc-layout.docked .tc-quick{ flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; }
.tc-layout.docked .tc-quick::-webkit-scrollbar{ display:none; }

/* The tutor's words sit on the page; the learner's are a card on the right, as a note is
   on Today. */
.tc-msg.tutor, .tc-msg.learner{ position:relative; box-shadow:none; }
.tc-msg{ font-size:17px; line-height:1.7; letter-spacing:.01em; }
.tc-msg.tutor{ align-self:flex-start; width:100%; max-width:66ch; padding:0; color:var(--ink);
  background:none; border:none; border-radius:0; }
.tc-msg.learner{ align-self:flex-end; max-width:min(66ch, 80%); padding:9px 16px; color:var(--ink); font-weight:500;
  background:var(--surface); border:1px solid var(--line); border-radius:18px; }
/* Who is speaking is plain from where the words sit; a screen reader still hears it. */
.tc-msg.tutor.lead::before, .tc-msg.learner::before{
  position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.tc-msg.tutor.lead::before{ content:"Tutor"; }
.tc-msg.learner::before{ content:"You"; }
/* A grade or a picture keeps the page's left edge; a caring response is set apart, calm. */
.tc-msg.tutor.bare{ max-width:100%; }
.tc-msg.tutor.care{ align-self:stretch; max-width:66ch; padding:14px 18px; border-radius:16px;
  background:color-mix(in srgb, #4FD1A5 12%, var(--surface)); border:1px solid #4FD1A5; }
.tc-msg.tutor.hint{ padding:12px 16px; border-radius:16px;
  background:color-mix(in srgb, var(--accent) 12%, var(--surface)); border:1px solid var(--accent); }
/* Cards in the conversation stop at a reading width rather than running the full page. */
.tc-item, .tc-transfer, .tc-point, .tc-done{ align-self:flex-start; width:100%; max-width:720px; }

/* Under a reply: "Read it out" and "Draw it on the whiteboard", as quiet pen-coloured
   text buttons, not pills. */
.tc-acts{ display:flex; flex-wrap:wrap; gap:4px 18px; margin-top:6px; white-space:normal; }
.tc-act{ display:inline-flex; align-items:center; gap:7px; min-height:40px; padding:0; border:none;
  background:none; color:var(--muted); font:inherit; font-size:14px; font-weight:600; letter-spacing:0; cursor:pointer;
  text-decoration:underline; text-decoration-color:color-mix(in srgb, var(--muted) 45%, transparent);
  text-underline-offset:5px; text-decoration-thickness:1.5px; }
.tc-act svg{ width:18px; height:18px; flex:none; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.tc-act:hover, .tc-act.on{ color:var(--ink); text-decoration-color:var(--accent); }
/* Offered only where a drawing would help (the tutor's DRAW: line), so it can stand out. */
.tc-act-draw{ padding:0 14px; border:1px solid color-mix(in srgb, var(--goldtext) 55%, var(--line)); border-radius:99px;
  color:var(--goldtext); text-decoration:none; }
.tc-act-draw:hover{ color:var(--goldtext); background:var(--accent-wash); }
.tc-act:disabled{ opacity:.55; cursor:default; }
.tc-act:focus-visible{ outline:2px solid var(--accent); outline-offset:3px; border-radius:4px; }

/* A practice question: one of Today's cards. */
.tc-item{ border-radius:20px; box-shadow:none; border:1px solid var(--line); background:var(--surface); }

/* ---- the start: Today's heading over Today's cards ----------------------------------------- */
/* The heading says what the greeting says; the greeting stays the chat's first turn, and
   shows above the first message once this panel has gone. */
.tc-thread:has(.tc-start) > .tc-msg{ display:none; }
/* Centred in the room there is: auto margins, so a short window scrolls from the top
   instead of clipping it. No wrap: home.css's .tc-starters wraps. */
.tc-start{ display:flex; flex-direction:column; flex-wrap:nowrap; flex:none; gap:22px; width:100%; margin:auto 0; padding:0; }
.tc-start-wait{ visibility:hidden; }
.tc-start-h{ margin:0; font:400 32px/1.15 "ITC Ronda", "Poppins", sans-serif; color:var(--ink); text-wrap:balance; }
.tc-start-lede{ margin:6px 0 0; max-width:66ch; font-size:15px; line-height:1.5; color:var(--muted); text-wrap:pretty; }
.tc-start-head .tc-acts{ margin-top:2px; }
.tc-start-cards{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:16px; }
.tc-resume-slot{ display:contents; }
.tc-ways{ gap:6px; }
.tc-ways-h{ margin:0; font:400 19px/1.2 "ITC Ronda", "Poppins", sans-serif; color:var(--ink); }
.tc-start-list{ list-style:none; margin:0 -8px; padding:0; display:grid; gap:2px; }
/* Nothing to carry on: the ways in take the row, two by two. */
.tc-start-cards:not(:has(.tc-resume)) .tc-ways{ grid-column:1 / -1; }
.tc-start-cards:not(:has(.tc-resume)) .tc-start-list{ grid-template-columns:repeat(2, minmax(0, 1fr)); column-gap:16px; }
.tc-chip.tc-card{ display:flex; align-items:center; gap:14px; width:100%; min-height:56px; padding:8px;
  border:none; border-radius:12px; background:none; text-align:left; color:var(--ink); font-size:15px; cursor:pointer; }
.tc-chip.tc-card:hover{ color:var(--ink); background:color-mix(in srgb, var(--ink) 7%, transparent); }
.tc-chip.tc-card:focus-visible{ outline:var(--focus-ring); outline-offset:1px; }
.tc-card-text{ flex:1 1 auto; display:flex; flex-direction:column; gap:1px; min-width:0; }
.tc-card-t{ font-weight:600; }
.tc-card-s{ font-size:13px; color:var(--muted); }
/* "Carry on where you left off": the one gold button on the page. */
.td-card.tc-resume{ gap:4px; width:100%; font:inherit; color:var(--ink); text-align:left; cursor:pointer; }
.td-card.tc-resume:hover{ background:color-mix(in srgb, var(--surface) 85%, var(--ink)); }
.td-card.tc-resume:focus-visible{ outline:var(--focus-ring); outline-offset:2px; }
.tc-resume-l{ font:400 19px/1.2 "ITC Ronda", "Poppins", sans-serif; color:var(--goldtext); }
.tc-resume-t{ margin-top:8px; font-size:18px; line-height:1.3; font-weight:600; }
.tc-resume-s{ font-size:14px; line-height:1.45; color:var(--muted); display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
.tc-resume-w{ font-size:13px; color:var(--faint); }
.tc-resume-go{ align-self:flex-start; height:46px; margin-top:auto; font-size:15px; }

/* ---- the whiteboard ------------------------------------------------------------------------ */
.tc-board{ position:relative; align-self:flex-start; width:100%; max-width:720px; margin-top:2px; padding:14px 14px 12px;
  border-radius:20px; background:var(--surface); border:1px solid var(--line); }
.tc-dock .tc-board{ max-width:none; margin:0; }
.tc-board-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 2px 10px; }
.tc-board-t{ margin:0; font:400 19px/1.25 "ITC Ronda", "Poppins", sans-serif; color:var(--ink); }
.tc-board-btns{ display:flex; flex:none; gap:18px; }
.tc-board-full{ min-height:40px; padding:0 4px; border:none; background:none; color:var(--muted); font:inherit; font-size:14px;
  font-weight:600; cursor:pointer; text-decoration:underline; text-underline-offset:5px; }
.tc-board-full:hover{ color:var(--ink); }
.tc-board-full:focus-visible{ outline:2px solid var(--accent); outline-offset:3px; border-radius:4px; }
/* Close puts a board beside the chat back under its reply: only the dock needs it. */
.tc-board-close{ display:none; }
.tc-dock .tc-board:not(.full) .tc-board-close{ display:inline-block; }
.tc-board-wait{ display:flex; align-items:center; gap:10px; margin:6px 2px 10px; color:var(--muted); font-size:15px; }
/* A board the chat has moved on from: one line under its reply. */
.tc-board-show{ display:none; }
.tc-board.folded{ padding:6px 14px; }
.tc-board.folded .tc-board-head{ margin:0; }
.tc-board.folded .tc-board-body, .tc-board.folded .tc-board-full:not(.tc-board-show){ display:none; }
.tc-board.folded .tc-board-show{ display:inline-block; }
.tc-board .wb-say{ font-size:17px; }
/* In the chat the board keeps its controls on screen; beside it, or full screen, it has the room. */
.tc-board:not(.full) .wb-svg{ max-height:min(38vh, 340px); }
.tc-dock .tc-board:not(.full) .wb-svg{ max-height:calc(100dvh - 300px); }
.tc-board.full{ position:fixed; inset:0; z-index:950; max-width:none; margin:0; border-radius:0; overflow:auto;
  padding:max(16px, env(safe-area-inset-top)) max(16px, calc((100vw - 1000px) / 2)) max(16px, env(safe-area-inset-bottom));
  background:var(--paper); }
.tc-board.full .wb-svg{ max-height:72vh; }
:root.tc-board-open, :root.tc-board-open body{ overflow:hidden; }

/* A board in a chat opened again (2026-11-10): its title, and what it said at each step on
   request. Only its words are kept, so it reads as a folded board with no Show button. */
.tc-past-board{ align-self:flex-start; width:100%; max-width:720px; margin-top:2px; padding:8px 14px;
  border-radius:20px; background:var(--surface); border:1px solid var(--line); }
.tc-past-head{ display:flex; align-items:center; gap:12px; min-height:44px; }
.tc-past-ic{ flex:none; display:grid; place-items:center; width:34px; height:34px; border-radius:10px;
  background:color-mix(in srgb, var(--ink) 7%, transparent); color:var(--ink); }
.tc-past-ic svg{ width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.tc-past-t{ flex:1; min-width:0; display:flex; flex-direction:column; gap:1px; }
.tc-past-l{ font-size:13px; color:var(--muted); }
.tc-past-n{ font:400 17px/1.3 "ITC Ronda", "Poppins", sans-serif; color:var(--ink); }
.tc-past-btn{ flex:none; min-height:40px; padding:0 4px; border:none; background:none; color:var(--muted); font:inherit;
  font-size:14px; font-weight:600; cursor:pointer; text-decoration:underline; text-underline-offset:5px; }
.tc-past-btn:hover{ color:var(--ink); }
.tc-past-btn:focus-visible{ outline:2px solid var(--accent); outline-offset:3px; border-radius:4px; }
.tc-past-steps{ display:flex; flex-direction:column; gap:6px; margin:4px 0 8px; padding:0 0 0 24px;
  font-size:16px; line-height:1.5; color:var(--ink); }
.tc-past-steps[hidden]{ display:none; }
.tc-past-steps li::marker{ color:var(--muted); }

/* ---- quick replies, your question, the maths ----------------------------------------------- */
.tc-quick{ display:flex; flex-wrap:wrap; gap:8px; padding:8px 0 10px; }
.tc-quick[hidden]{ display:none; }
.tc-quick .tc-chip{ height:40px; padding:0 14px; border-radius:10px; font-size:14.5px; color:var(--ink); white-space:nowrap; }
.tc-wrap{ position:relative; }
.tc-wrap > .tc-jump{ width:auto; align-self:center; margin:-54px auto 14px; position:relative; z-index:3;
  display:inline-flex; align-items:center; gap:6px; height:40px; padding:0 16px 0 12px; border-radius:10px;
  border:1px solid var(--line); background:var(--surface); color:var(--ink); box-shadow:var(--shadow);
  font:inherit; font-size:14px; font-weight:600; cursor:pointer; }
.tc-wrap > .tc-jump[hidden]{ display:none; }
.tc-jump svg{ width:17px; height:17px; stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.tc-wrap > .tc-pin{ display:flex; align-items:baseline; gap:12px; margin:0 0 6px; padding:9px 14px;
  border-radius:10px; cursor:pointer; text-align:left; font:inherit; color:var(--ink);
  border:1.5px solid color-mix(in srgb, var(--ink) 28%, transparent); background:var(--paper); }
.tc-wrap > .tc-pin[hidden]{ display:none; }
.tc-pin:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.tc-pin-l{ flex:none; font:400 15px/1.4 "ITC Ronda", "Poppins", sans-serif; color:var(--goldtext); }
.tc-pin-q{ flex:1 1 auto; min-width:0; font-size:15.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tc-pin-go{ flex:none; font-size:13.5px; font-weight:600; color:var(--muted); text-decoration:underline; text-underline-offset:4px; }
.tc-preview{ display:flex; align-items:baseline; gap:12px; padding:8px 14px; margin-bottom:8px; border-radius:10px;
  border:1.5px dashed color-mix(in srgb, var(--accent) 55%, var(--line)); background:var(--paper); }
.tc-preview[hidden]{ display:none; }
.tc-preview-l{ flex:none; font:400 15px/1.4 "ITC Ronda", "Poppins", sans-serif; color:var(--goldtext); }
.tc-preview-v{ font-size:18px; color:var(--ink); line-height:1.5; overflow-x:auto; }
.tc-keys{ padding:2px 0 8px; }
.tc-keys[hidden]{ display:none; }
.tc-keys .mathkbd{ margin-top:0; flex-wrap:nowrap; overflow-x:auto; padding-bottom:2px; scrollbar-width:none; }
.tc-keys .mathkbd::-webkit-scrollbar{ display:none; }
.tc-keys .mathkbd button{ min-width:46px; height:42px; border-radius:10px; }
.tc-keys .mathkbd .mk-del{ margin-left:0; }

/* ---- the composer: a writing box and a labelled Send ----------------------------------- */
.tc-composer{ align-items:flex-end; gap:8px; padding:6px; margin-bottom:max(14px, env(safe-area-inset-bottom));
  border:1px solid var(--line); border-radius:18px; background:var(--surface); }
.tc-composer:focus-within{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-wash); }
.tc-input{ font-size:16px; line-height:1.5; border:none; background:transparent; padding:9px 8px; border-radius:0; min-height:42px; }
.tc-input:focus{ box-shadow:none; }
.tc-composer .tc-tool{ width:auto; min-width:42px; height:42px; padding:0 10px; border-radius:10px; border-color:transparent; background:transparent; }
.tc-composer .tc-tool:hover{ border-color:var(--line); }
.tc-keys-btn{ gap:6px; font-size:15px; font-weight:600; color:var(--muted); }
.tc-keys-btn sup{ font-size:.62em; }
.tc-keys-w{ font-size:13.5px; }
.tc-keys-btn.on{ color:var(--on-accent); background:var(--accent) !important; }
.tc-composer .tc-send{ height:42px; padding:0 18px; border-radius:10px; flex:none; font-weight:700; }
.tc-note{ margin:-8px 0 12px 4px; }
.tc-note:empty{ display:none; }
/* What a message paid (2026-11-24): a quiet line between the turns, never a bubble. */
.tc-paid{ align-self:flex-start; margin:0; }
.tc-paid .dg-won{ margin-top:0; font-size:13.5px; }
/* What "Next stop" paid, above the stop it opened (with its answer box on a phone). */
/* As wide as the stop it stands above: the lesson's own page centres it, the topic's stage does not. */
.tch-paid{ max-width:680px; margin:0 auto 12px; }
.t-stage .tch-paid{ max-width:none; margin:0 0 12px; }
.tch-paid .dg-won{ margin-top:0; font-size:15px; }
.tch-ack .dg-won{ font-size:13.5px; }
/* On the white look --xp is 2.1 to 1 on the card; the gold made for small text there is 4.9 and up. */
:root[data-theme="white"] .dg-won{ color:var(--accent-ink); }
/* "Next stop" opens the next stop at its top, clear of the bar (home-teach.js stopToTop). */
.t-stage, #teachBody{ scroll-margin-top:96px; }

@media (max-width:640px){
  .tc-wrap{ height:auto; }
  .tc-msg.learner{ max-width:88%; }
  .tc-start{ gap:14px; }
  .tc-start-h{ font-size:26px; }
  .tc-start-cards{ grid-template-columns:minmax(0, 1fr); gap:12px; }
  .tc-start-cards:not(:has(.tc-resume)) .tc-start-list{ grid-template-columns:minmax(0, 1fr); }
  .td-card.tc-resume, .tc-ways{ padding:14px; }
  /* The whole card is the button: on a phone its label can be words, not a second button. */
  .tc-resume-go{ height:auto; margin-top:6px; padding:0; background:none; box-shadow:none; color:var(--goldtext); font-weight:600; }
  .tc-chip.tc-card{ min-height:52px; padding:6px 8px; }
  .tc-quick{ flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; margin:0 -2px; padding-left:2px; }
  .tc-quick::-webkit-scrollbar{ display:none; }
  #view-tutor.active .tc-new .ch-label{ display:none; }
  .tc-new{ padding:8px 10px; }
  .tc-keys-w{ display:none; }
  .tc-board{ padding:12px 8px 10px; }
}
