/* ===========================================================================
   student-play.css — the student portal as its own product.

   Loaded by layouts/student.blade.php only, after site.css, panel.css and
   student.css. Admin and franchise never see a byte of it, and nothing in it is
   written outside the [data-panel="student"] scope or the .splay shell classes,
   which exist on no other surface.

   WHY THIS FILE EXISTS. The client, 1 October 2026: the admin and franchise
   panels are right, but all three read as one product, and the student portal
   has to be built the way a CHILD uses it. student.css had already re-weighted
   the panel system for a child — rounder, roomier, warmer — but underneath it
   was still the admin SHELL: a navy sidebar of 14.5px rows, a topbar with a
   search field, grey hairline cards in a grid. Re-weighting a filing cabinet
   gives you a rounder filing cabinet.

   THE SECOND ATTEMPT, AND WHY THIS IS THE THIRD. The first version of this file
   went playful: a cream page, sticker cards with thick borders and hard offset
   edges, a different colour on every card, a watermark of maths glyphs, Baloo 2.
   The client's verdict was "saglech" — all of it. They are right again, and the
   fault is named easily enough: every single element was asking for attention.
   A bordered, tinted, hard-shadowed card in a different colour every time is not
   playful, it is loud, and a child cannot find the one thing to do today in it.

   WHAT THIS ONE DOES INSTEAD, against the reference the client gave
   (logiqids.com, their own category):

     the page       WHITE. Not cream, not tinted. Colour arrives on top of white
                    rather than underneath everything
     the cards      no border at all, one soft shadow, 20px corners. They
                    separate from the page by floating, not by being outlined
     the colour     ONE accent per screen, not seven down the page. The accent
                    is the heading rule, the primary button, the active menu row
                    and the icon tints. Everything else is ink and grey
     the type       Poppins. Big and light rather than small and bold: a 34px
                    heading at 600 reads as confident; a 19px heading at 800 in
                    a tinted band reads as a label on a filing box
     the space      roughly double. Whitespace is the thing that makes a screen
                    feel calm, and it is the one thing the previous version had
                    none of
     the motion     a fade and a rise on arrival, a press on the buttons. The
                    breathing coin and the flickering flame are gone — motion
                    that never stops is motion a child stops seeing
     decoration     none behind the page. The illustration budget goes to the
                    mascot, the badges and the empty states, where it means
                    something

   ACCESSIBILITY, unchanged: 44px targets, 4.5:1 on text, 3:1 on glyphs and
   controls, visible focus rings, every animation inside a prefers-reduced-motion
   guard, and no horizontal page scroll at any width (�10).
   ======================================================================== */

/* ---------------------------------------------------------------------------
   1. TOKENS
   ------------------------------------------------------------------------ */
[data-panel="student"] {
  --display: Poppins, "Plus Jakarta Sans", system-ui, sans-serif;
  --text:    Poppins, "DM Sans", system-ui, sans-serif;

  /* White page, white cards. They are told apart by a shadow rather than by a
     tint, which is what keeps a page of eleven cards from looking like a quilt.
     The page is a hair off white so a pure-white card still has somewhere to
     sit; at #FCFCFD that is a difference you feel and do not see. */
  --ground:      #FCFCFD;
  --paper:       #FFFFFF;
  --ink:         #101828;   /* headings — 17.4:1 on white                     */
  --muted:       #5B6B8A;   /* body and labels — 5.4:1                        */
  --faint:       #8A98B4;   /* the third level, for a date or a unit — 3.4:1,
                               so it is never used for anything that must be
                               read, only for what is already in the sentence  */
  --line:        #EDF0F7;   /* the few hairlines that are genuinely needed     */

  --r-panel:     20px;
  --sk-r-lg:     20px;
  --sk-r-md:     14px;
  --sk-r-sm:     10px;

  /* One shadow, used everywhere, so nothing on this surface floats by a
     different amount than anything else. */
  --sk-lift:     0 1px 2px rgba(16, 24, 40, .04), 0 12px 28px -18px rgba(16, 24, 40, .22);
  --sk-lift-up:  0 2px 4px rgba(16, 24, 40, .05), 0 20px 40px -22px rgba(16, 24, 40, .3);

  --sk-menu:     248px;

  /* THE TAB BAR'S TWO FIGURES, 19 October 2026. --sk-tab-h is one tab's target
     and --sk-tabs-h is the whole bar: the target plus the 6px of padding the
     bar has above and below it plus its 1px top border. They are here rather
     than written into §5 because the bottom of every student screen has to
     clear this bar, and a page that cleared 56px of a 132px bar is how the ask
     that produced these two arrived. The safe-area inset is NOT in --sk-tabs-h:
     the bar adds it to its own padding and each use adds it again, so folding
     it in here would count it twice. */
  --sk-tab-h:    52px;
  --sk-tabs-h:   calc(var(--sk-tab-h) + 13px);

  /* The seven accents. Each has a paint value, an ink value for type, and a
     pale wash for a chip. Only ONE of them is on a screen at a time. */
  --sk-red:      #E8272D;  --sk-red-ink:    #C01D23;  --sk-red-pale:   #FFF1F0;
  --sk-amber:    #F7AE44;  --sk-amber-ink:  #A05E00;  --sk-amber-pale: #FFF7EA;
  --sk-green:    #7FC141;  --sk-green-ink:  #3E7714;  --sk-green-pale: #F2FAEA;
  --sk-blue:     #3A7BD5;  --sk-blue-ink:   #1E4FC1;  --sk-blue-pale:  #EFF5FE;
  --sk-violet:   #6D4AD8;  --sk-violet-ink: #5B3DBB;  --sk-violet-pale:#F4F1FE;
  --sk-teal:     #11A394;  --sk-teal-ink:   #0F766E;  --sk-teal-pale:  #ECFAF8;
  --sk-pink:     #E8458C;  --sk-pink-ink:   #C2185B;  --sk-pink-pale:  #FFF1F7;

  --sk-hue:      var(--sk-blue);
  --sk-hue-ink:  var(--sk-blue-ink);
  --sk-hue-pale: var(--sk-blue-pale);

  /* --- gradients, allowed on this surface only ---------------------------
     The client relaxed the �7.1 ban for the student portal on 1 October 2026,
     pointing at logiqids.com, whose call-to-action is a coral-into-pink pill.
     Admin, franchise and the public site are unchanged and still flat.

     THE RULE THAT REPLACES THE BAN, so this does not become the thing the ban
     existed to prevent:
       1. a gradient may PAINT. It never carries a border, a hairline or a state
       2. wherever text or a glyph sits on one, the LIGHTEST stop has to carry
          it on its own — 4.5:1 for text, 3:1 for a glyph. Every pair below is
          measured, and the figure is written next to it
       3. two stops, one direction. A three-stop gradient on a 40px button is a
          thing nobody can see and everybody has to maintain
       4. it is for the call to action, the hero, a progress fill and the
          illustrations. Not for cards, not for backgrounds, not for chips */
  --sk-cta:      linear-gradient(135deg, #D8232A 0%, #C2185B 100%);  /* 5.01 / 5.87 on white */
  --sk-cta-deep: linear-gradient(135deg, #B01A20 0%, #9C1248 100%);  /* the hover, darker still */
  --sk-hero:     linear-gradient(135deg, #1B3160 0%, #0D1A36 100%);  /* 13.0 / 17.0 on white */
}

/* The screen's accent, set by data-hue on <body> from the route. */
[data-panel="student"][data-hue="red"]    { --sk-hue: var(--sk-red);    --sk-hue-ink: var(--sk-red-ink);    --sk-hue-pale: var(--sk-red-pale); }
[data-panel="student"][data-hue="amber"]  { --sk-hue: var(--sk-amber);  --sk-hue-ink: var(--sk-amber-ink);  --sk-hue-pale: var(--sk-amber-pale); }
[data-panel="student"][data-hue="green"]  { --sk-hue: var(--sk-green);  --sk-hue-ink: var(--sk-green-ink);  --sk-hue-pale: var(--sk-green-pale); }
[data-panel="student"][data-hue="blue"]   { --sk-hue: var(--sk-blue);   --sk-hue-ink: var(--sk-blue-ink);   --sk-hue-pale: var(--sk-blue-pale); }
[data-panel="student"][data-hue="violet"] { --sk-hue: var(--sk-violet); --sk-hue-ink: var(--sk-violet-ink); --sk-hue-pale: var(--sk-violet-pale); }
[data-panel="student"][data-hue="teal"]   { --sk-hue: var(--sk-teal);   --sk-hue-ink: var(--sk-teal-ink);   --sk-hue-pale: var(--sk-teal-pale); }
[data-panel="student"][data-hue="pink"]   { --sk-hue: var(--sk-pink);   --sk-hue-ink: var(--sk-pink-ink);   --sk-hue-pale: var(--sk-pink-pale); }

/* ---------------------------------------------------------------------------
   2. THE PAGE
   ------------------------------------------------------------------------ */
.splay {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
}
@supports not (min-height: 100dvh) { .splay { min-height: 100vh; } }
.sfocus { background: var(--ground); font-family: var(--text); }

.splay__grid {
  display: grid;
  grid-template-columns: var(--sk-menu) minmax(0, 1fr);
  align-items: start;
  position: relative;
}

.splay__main {
  min-width: 0;                 /* stops a wide table scrolling the PAGE (�10) */
  display: flex;
  flex-direction: column;
  padding: 0 clamp(16px, 3vw, 44px);
}

/* The work. The gap is the main thing that changed: 28px between cards rather
   than 16, because space is what a calm screen is made of. */
.splay__body {
  padding: clamp(18px, 2.4vw, 30px) 0 calc(56px + env(safe-area-inset-bottom));
  display: grid;
  gap: clamp(20px, 2.4vw, 28px);
  align-content: start;
  max-width: 1180px;            /* text does not want to be 1400px wide */
  width: 100%;
}

/* ---------------------------------------------------------------------------
   3. THE MENU
   A white column of plain rows. The previous version gave every destination a
   solid colour disc, and sixteen of those is a paint chart, not a menu — it was
   the single loudest thing on the screen. Here the icon is a 20px glyph in grey
   and the ONE row you are on is a pale pill in the screen's accent. A child
   finds where they are by looking for the coloured row, which works precisely
   because it is the only coloured row.
   ------------------------------------------------------------------------ */
.smenu {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 22px 10px calc(16px + env(safe-area-inset-bottom)) clamp(12px, 1.4vw, 20px);
  background: var(--paper);
  z-index: 3;
}
@supports not (height: 100dvh) { .smenu { height: 100vh; } }

.smenu__brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 10px 22px;
  color: var(--ink);
  text-decoration: none;
}
.smenu__mark { flex: 0 0 auto; display: grid; place-items: center; }
.smenu__mark img { width: 34px; height: 34px; }
.smenu__wm { display: grid; line-height: 1.15; }
.smenu__wm b { font: 600 16.5px/1.15 var(--display); letter-spacing: -.015em; }
.smenu__wm span { font: 500 10px/1.2 var(--display); letter-spacing: .04em; color: var(--faint); text-transform: none; }

.smenu__scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0 2px 8px;
  margin: 0 -2px;
  scrollbar-width: thin;
  scrollbar-color: #E4E8F2 transparent;
}
.smenu__group { display: grid; gap: 1px; }
.smenu__label {
  margin: 18px 0 6px;
  padding: 0 12px;
  font: 600 11px/1 var(--display);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--faint);
}

.smenu__item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  color: var(--muted);
  text-decoration: none;
  font: 500 14.5px/1.3 var(--display);
  transition: background .15s ease-out, color .15s ease-out;
}
.smenu__item:hover { background: #F4F6FB; color: var(--ink); }
.smenu__item:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.smenu__ico { flex: 0 0 auto; display: grid; place-items: center; width: 22px; height: 22px; }
.smenu__ico .ico { color: inherit; }
.smenu__text { min-width: 0; }

/* The one coloured row. */
.smenu__item[aria-current="page"] {
  background: var(--sk-item-pale, var(--sk-blue-pale));
  color: var(--sk-item-ink, var(--sk-blue-ink));
  font-weight: 600;
}
.smenu__item[aria-current="page"]:hover { color: var(--sk-item-ink, var(--sk-blue-ink)); }

.smenu__n {
  margin-left: auto;
  flex: 0 0 auto;
  min-width: 21px; height: 21px;
  display: grid; place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--sk-red);
  color: #FFF;
  font: 600 11.5px/1 var(--display);
}

.smenu__item--soon { opacity: .45; cursor: not-allowed; }
.smenu__soon {
  margin-left: auto;
  font: 600 10px/1 var(--display); letter-spacing: .04em;
  color: var(--faint); font-style: normal; text-transform: uppercase;
}

.smenu__foot { flex: 0 0 auto; padding-top: 10px; display: grid; gap: 2px; }
/* The mascot's line is gone from the menu. It was decoration in a list of
   destinations, and the one thing this redesign is about is that decoration
   does not go everywhere. Beady is still in the header, on the hero, in every
   empty state and on the result. */
.smenu__buddy { display: none; }
.smenu__out {
  display: flex; align-items: center; gap: 12px;
  min-height: 44px; padding: 8px 12px;
  border-radius: 12px;
  color: var(--muted);
  font: 500 14.5px/1.3 var(--display);
  text-decoration: none;
}
.smenu__out:hover { background: #F4F6FB; color: var(--ink); }
.smenu__out:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Sixteen destinations, a brand and a sign-out do not fit the ~900px a 1080p
   screen gives a browser, and the two that fall off the bottom are Notifications
   and Help. A menu nobody thinks to scroll is a menu those two are not in, so on
   a short screen the rows and the spacing tighten until they are. 40px rows are
   still past the 24px WCAG 2.2 target minimum, and this is the pointer-only
   column — the drawer, which is aimed at with a thumb, keeps 50px. */
@media (min-width: 1024px) and (max-height: 1000px) {
  .smenu { padding-top: 16px; }
  .smenu__brand { padding-bottom: 14px; }
  .smenu__item, .smenu__out { min-height: 40px; padding-top: 6px; padding-bottom: 6px; }
  .smenu__label { margin: 12px 0 4px; }
}

/* --- the menu as a drawer, below 1024px ---------------------------------- */
@media (max-width: 1023px) {
  .splay__grid { grid-template-columns: minmax(0, 1fr); }
  .smenu {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: min(290px, 85vw);
    height: auto;
    box-shadow: 20px 0 50px -28px rgba(16, 24, 40, .4);
    transform: translateX(-104%);
    transition: transform .22s ease-out;
    z-index: 60;
  }
  .splay.is-menu-open .smenu { transform: translateX(0); }
  .splay:not(.is-menu-open) .smenu { visibility: hidden; }
  .splay.is-menu-open .smenu { visibility: visible; }
  /* With room to spare in a drawer, the rows go back to a thumb's size. */
  .smenu__item, .smenu__out { min-height: 50px; font-size: 15px; }
}

.splay__scrim {
  position: fixed; inset: 0;
  background: rgba(16, 24, 40, .4);
  opacity: 0; visibility: hidden;
  transition: opacity .2s ease-out, visibility .2s ease-out;
  z-index: 50;
}
.splay.is-menu-open .splay__scrim { opacity: 1; visibility: visible; }
@media (min-width: 1024px) { .splay__scrim { display: none; } }

/* ---------------------------------------------------------------------------
   4. THE HEADER
   No card, no border, no shadow — the heading simply sits at the top of the page
   with air around it, and the counters sit opposite. The previous version put it
   in a floating bordered card, which made the first thing on every screen a box.
   ------------------------------------------------------------------------ */
.shead {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 20px);
  padding: clamp(18px, 2.4vw, 30px) 0 clamp(4px, 1vw, 10px);
  max-width: 1180px;
  width: 100%;
}

.shead__burger {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  display: none; place-items: center;
  background: var(--paper);
  border: 0;
  border-radius: 12px;
  box-shadow: var(--sk-lift);
  color: var(--ink);
  cursor: pointer;
}
.shead__burger:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 1023px) { .shead__burger { display: grid; } }

.shead__title { min-width: 0; flex: 1 1 auto; }
.shead__title h1 {
  margin: 0;
  font: 600 clamp(24px, 3vw, 34px)/1.2 var(--display);
  letter-spacing: -.02em;
  color: var(--ink);
}
.shead__title p {
  margin: 5px 0 0;
  font: 400 14.5px/1.5 var(--text);
  color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* --- the purse ----------------------------------------------------------
   Points, coins and streak, on every screen. They are the reason a child came
   back today and on the old shell they were stranded on the dashboard. They stay
   — but as three quiet tinted pills rather than three bordered, animated ones. */
.spurse { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.spurse__pill {
  display: flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 14px;
  border-radius: 999px;
  font: 600 15px/1 var(--display);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.spurse__pill .ico { color: inherit; opacity: .9; }
.spurse__pill--points { background: var(--sk-violet-pale); color: var(--sk-violet-ink); }
.spurse__pill--coins  { background: var(--sk-amber-pale);  color: var(--sk-amber-ink); }
.spurse__pill--streak { background: var(--sk-red-pale);    color: var(--sk-red-ink); }

.shead__bell {
  position: relative;
  flex: 0 0 auto;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 999px;
  color: var(--muted);
}
.shead__bell:hover { background: #F4F6FB; color: var(--ink); }
.shead__bell:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.shead__dot {
  position: absolute; top: 1px; right: 0;
  min-width: 18px; height: 18px;
  display: grid; place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--sk-red);
  border: 2px solid var(--ground);
  color: #FFF;
  font: 600 10.5px/1 var(--display);
}

.shead__me {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 4px 14px 4px 4px;
  background: var(--paper);
  border-radius: 999px;
  box-shadow: var(--sk-lift);
  color: var(--ink);
  text-decoration: none;
}
.shead__me:hover { box-shadow: var(--sk-lift-up); color: var(--ink); }
.shead__me:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.shead__face {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--sk-hue-pale);
  border-radius: 50%;
  overflow: hidden;
}
.shead__who { display: grid; line-height: 1.2; }
.shead__who b { font: 600 14px/1.2 var(--display); }
.shead__who span { font: 400 11.5px/1.2 var(--display); color: var(--faint); }

@media (max-width: 1240px) { .shead__who { display: none; } .shead__me { padding-right: 4px; } }
@media (max-width: 1023px) { .shead__title p { display: none; } }
@media (max-width: 880px)  { .spurse__pill--points { display: none; } }
@media (max-width: 560px)  {
  .shead { gap: 8px; padding-top: 14px; }
  .shead__bell { display: none; }
  .spurse__pill { height: 36px; padding: 0 11px; font-size: 14px; gap: 5px; }
}

/* ---------------------------------------------------------------------------
   5. THE TAB BAR
   ------------------------------------------------------------------------ */
.stabs {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  display: none;
  grid-template-columns: repeat(5, 1fr);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 1px solid var(--line);
}
@media (max-width: 1023px) { .stabs { display: grid; } }

/* THE CHILD COMBINATOR IS LOAD-BEARING, 19 October 2026 — Yogesh: "in mobile
   view khale tab madhe pan khup space aahe".

   This was written as `.stabs a, .stabs span`, and `.stabs span` matches the
   two spans INSIDE each tab as well as the tab itself: the icon box and the
   label. Both of them were therefore handed min-height:52px, padding 7/2/5 and
   display:grid, and a min-height beats the height:26px the .stabs__ico rule
   below sets — so the icon box was 52px tall, the label box was another 52px,
   and the tab came to 7 + 52 + 3 + 52 + 5 = 119px. With the bar's own 6px
   either side and its top border that is a 132px tab bar on a phone, which is
   more than twice what it should be and roughly a sixth of a 740px screen
   given to five words.

   The tab is 65px now — 52px of target, which is the thumb size and the floor,
   inside 6px of padding either side. Nothing else about it changed.

   The disabled tab is a <span> that is a DIRECT child, which is what the
   second half of the selector was always for. */
.stabs > a, .stabs > span {
  display: grid; justify-items: center; gap: 3px;
  padding: 7px 2px 5px;
  min-height: var(--sk-tab-h);
  border-radius: 12px;
  color: var(--faint);
  text-decoration: none;
  font: 500 10.5px/1.1 var(--display);
}
.stabs > a:focus-visible { outline: 3px solid var(--focus); outline-offset: -2px; }
.stabs .stabs__ico { display: grid; place-items: center; width: 26px; height: 26px; }
.stabs > a[aria-current="page"] { color: var(--sk-item-ink, var(--sk-blue-ink)); font-weight: 600; }
.stabs > span[aria-disabled="true"] { opacity: .45; }

/* ---------------------------------------------------------------------------
   6. CARDS
   White, no border, one soft shadow, 20px corners, and a heading that is a
   heading rather than a tinted band with a label in it.
   ------------------------------------------------------------------------ */
[data-panel="student"] .pcard {
  background: var(--paper);
  border: 0;
  border-radius: var(--sk-r-lg);
  box-shadow: var(--sk-lift);
  overflow: visible;
}
[data-panel="student"] .pcard__head {
  padding: clamp(18px, 2vw, 24px) clamp(18px, 2vw, 26px) 0;
  background: none;
  border: 0;
  gap: 14px;
  align-items: start;
}
[data-panel="student"] .pcard__head h3 {
  font: 600 clamp(18px, 1.7vw, 21px)/1.3 var(--display);
  letter-spacing: -.015em;
  color: var(--ink);
}
/* The handwritten eyebrow over a heading goes. It was a third typeface on a
   screen that now has one, and "Two things to do today" above "Your quests" is
   the same sentence twice. */
[data-panel="student"] .swrit { display: none; }
[data-panel="student"] .pcard__body { padding: clamp(14px, 1.6vw, 18px) clamp(18px, 2vw, 26px) clamp(18px, 2vw, 26px); }
[data-panel="student"] .pcard__foot {
  padding: 16px clamp(18px, 2vw, 26px);
  background: none;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
[data-panel="student"] .pcard__tools { gap: 10px; }

[data-panel="student"] a.pcard { transition: box-shadow .18s ease-out, transform .18s ease-out; }
[data-panel="student"] a.pcard:hover { transform: translateY(-2px); box-shadow: var(--sk-lift-up); }

/* ---------------------------------------------------------------------------
   7. BUTTONS
   ------------------------------------------------------------------------ */
[data-panel="student"] .btn {
  min-height: 46px;
  border-radius: 999px;
  padding: 0 22px;
  font: 600 15px/1 var(--display);
  letter-spacing: -.005em;
  gap: 8px;
  box-shadow: none;
  border: 0;
  transition: transform .14s ease-out, background .15s ease-out, box-shadow .15s ease-out;
}
[data-panel="student"] .btn--sm { min-height: 38px; font-size: 13.5px; padding: 0 16px; }
[data-panel="student"] .btn--block { width: 100%; }

/* THE PRIMARY ACTION IS ONE COLOUR ON EVERY SCREEN, and it is a gradient.

   It used to take the screen's own accent, which read well on the blue and red
   screens and turned the button brown on the amber ones and olive on the green
   ones, because neither of those can carry white text. One call-to-action colour
   across the portal is also simply better: a child learns the shape of "the
   button that does the thing" once instead of seven times. It is the reference's
   own approach — logiqids.com uses its coral button in every section.

   The gradient runs the brand red into a crimson, and both ends are measured:
   #D8232A carries white at 5.01:1 and #C2185B at 5.87:1, so the lightest pixel
   under the label is past 4.5 and the label is safe anywhere on the button. That
   is the rule that replaces the �7.1 ban for this surface — a gradient may
   paint, and the lightest stop still has to carry what sits on it. */
[data-panel="student"] .btn--blue,
[data-panel="student"] .btn--red {
  background-color: #C01D23;              /* if background-image cannot load */
  background-image: var(--sk-cta);
  color: #FFF;
}
[data-panel="student"] .btn--blue:hover,
[data-panel="student"] .btn--red:hover {
  background-image: var(--sk-cta-deep);
  color: #FFF;
}

[data-panel="student"] .btn--ghost {
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--line);
  color: var(--ink);
}
[data-panel="student"] .btn--ghost:hover {
  background: var(--sk-hue-pale);
  box-shadow: inset 0 0 0 1.5px transparent;
  color: var(--sk-hue-ink);
}
[data-panel="student"] .btn:active { transform: translateY(1px); }
[data-panel="student"] .btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* ---------------------------------------------------------------------------
   8. CHIPS
   ------------------------------------------------------------------------ */
[data-panel="student"] .st {
  border-radius: 999px;
  border: 0;
  padding: 5px 12px;
  font: 600 12.5px/1.3 var(--display);
  letter-spacing: 0;
  text-transform: none;
}
[data-panel="student"] .st--info    { background: var(--sk-blue-pale);  color: var(--sk-blue-ink); }
[data-panel="student"] .st--active  { background: var(--sk-green-pale); color: var(--sk-green-ink); }
[data-panel="student"] .st--pending { background: var(--sk-amber-pale); color: var(--sk-amber-ink); }
[data-panel="student"] .st--bad     { background: var(--sk-red-pale);   color: var(--sk-red-ink); }
[data-panel="student"] .st--locked,
[data-panel="student"] .st--muted   { background: #F4F6FB; color: var(--muted); }

/* ---------------------------------------------------------------------------
   9. FIGURE TILES
   ------------------------------------------------------------------------ */
[data-panel="student"] .kpi {
  background: var(--paper);
  border: 0;
  border-radius: var(--sk-r-lg);
  box-shadow: var(--sk-lift);
  padding: clamp(18px, 2vw, 24px);
  gap: 12px;
}
[data-panel="student"] .kpi__ico {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--sk-hue-pale);
  color: var(--sk-hue-ink);
  display: grid; place-items: center;
}
[data-panel="student"] .kpi__ico .ico { color: inherit; }
[data-panel="student"] .kpi__num {
  font: 600 clamp(30px, 3.4vw, 42px)/1 var(--display);
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
[data-panel="student"] .kpi__label {
  font: 500 13.5px/1.35 var(--display);
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}
[data-panel="student"] .kpi__foot { font: 400 13px/1.5 var(--text); color: var(--faint); }
[data-panel="student"] .kpi--good,
[data-panel="student"] .kpi--warn,
[data-panel="student"] .kpi--bad { border: 0; }

/* ---------------------------------------------------------------------------
   10. NOTES
   ------------------------------------------------------------------------ */
[data-panel="student"] .pnote {
  border: 0;
  border-radius: var(--sk-r-md);
  padding: 18px 20px;
  gap: 14px;
  font: 400 14.5px/1.6 var(--text);
  color: var(--muted);
}
[data-panel="student"] .pnote b { font-family: var(--display); font-weight: 600; color: var(--ink); }
[data-panel="student"] .pnote__ico {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--paper);
}
[data-panel="student"] .pnote--info { background: var(--sk-blue-pale); }
[data-panel="student"] .pnote--info .pnote__ico { color: var(--sk-blue-ink); }
[data-panel="student"] .pnote--good { background: var(--sk-green-pale); }
[data-panel="student"] .pnote--good .pnote__ico { color: var(--sk-green-ink); }
[data-panel="student"] .pnote--warn { background: var(--sk-amber-pale); }
[data-panel="student"] .pnote--warn .pnote__ico { color: var(--sk-amber-ink); }
[data-panel="student"] .pnote--bad  { background: var(--sk-red-pale); }
[data-panel="student"] .pnote--bad .pnote__ico { color: var(--sk-red-ink); }
[data-panel="student"] .pnote__ico .ico { color: inherit; }

/* ---------------------------------------------------------------------------
   11. EMPTY STATES
   ------------------------------------------------------------------------ */
[data-panel="student"] .pempty {
  background: none;
  border: 0;
  margin: 0;
  padding: clamp(28px, 3vw, 44px) 24px;
}
[data-panel="student"] .pempty h3 { font: 600 20px/1.3 var(--display); color: var(--ink); }
[data-panel="student"] .pempty p { font: 400 14.5px/1.65 var(--text); color: var(--muted); max-width: 46ch; margin-inline: auto; }
[data-panel="student"] .pempty__ico {
  width: 60px; height: 60px;
  border-radius: 18px;
  background: var(--sk-hue-pale);
  color: var(--sk-hue-ink);
  border: 0;
}

/* ---------------------------------------------------------------------------
   12. TABLES
   Six screens have one, and a table is right for those: a parent comparing
   payment dates is better served by rows than by cards. It loses its box and
   its uppercase and keeps its structure.
   ------------------------------------------------------------------------ */
[data-panel="student"] .ptable__scroll { border: 0; border-radius: 0; background: none; }
[data-panel="student"] .ptable { font: 400 14.5px/1.5 var(--text); }
[data-panel="student"] .ptable th {
  background: none;
  border-bottom: 1px solid var(--line);
  font: 600 12.5px/1.3 var(--display);
  letter-spacing: 0;
  text-transform: none;
  color: var(--faint);
  padding: 12px 14px;
}
[data-panel="student"] .ptable td { padding: 16px 14px; border-color: var(--line); color: var(--muted); }
[data-panel="student"] .ptable tbody tr:nth-child(even) { background: none; }
[data-panel="student"] .ptable tbody tr:hover { background: #FAFBFE; }
[data-panel="student"] .ptable td b,
[data-panel="student"] .ptable .num { font-family: var(--display); font-weight: 600; color: var(--ink); }

/* ---------------------------------------------------------------------------
   13. FIELDS
   ------------------------------------------------------------------------ */
[data-panel="student"] .field__label {
  font: 500 14px/1.35 var(--display);
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}
[data-panel="student"] .field__hint { font: 400 13px/1.5 var(--text); color: var(--faint); }
[data-panel="student"] .input,
[data-panel="student"] .select,
[data-panel="student"] textarea.input {
  min-height: 50px;
  border: 1.5px solid var(--line);
  border-radius: var(--sk-r-md);
  background: var(--paper);
  font: 400 15px/1.5 var(--text);
  padding: 12px 15px;
  color: var(--ink);
}
[data-panel="student"] .input:focus,
[data-panel="student"] .select:focus {
  border-color: var(--sk-hue);
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}
[data-panel="student"] .select--sm { min-height: 42px; }

/* ---------------------------------------------------------------------------
   14. THE SMALL SHARED PARTS
   ------------------------------------------------------------------------ */
[data-panel="student"] .pfacts dt,
[data-panel="student"] .pdl dt {
  font: 500 12.5px/1.35 var(--display);
  letter-spacing: 0; text-transform: none;
  color: var(--faint);
}
[data-panel="student"] .pfacts dd,
[data-panel="student"] .pdl dd { font: 500 15px/1.5 var(--display); color: var(--ink); }

[data-panel="student"] .pbar__track {
  height: 10px; border-radius: 999px;
  background: #EEF1F7; border: 0; overflow: hidden;
}
/* A bar is pure paint with nothing written on it, so the gradient here is free:
   it runs the accent into its own ink, which makes the filled part read as
   having depth rather than as a coloured rectangle. */
[data-panel="student"] .pbar__fill {
  border-radius: 999px;
  background-color: var(--sk-hue);
  background-image: linear-gradient(90deg, var(--sk-hue) 0%, var(--sk-hue-ink) 100%);
}

/* The bar inside the hero is the exception, and it is green on every screen.
   It sits on navy, not on white, so it cannot take the screen's accent: the blue
   one disappears into the band behind it, which is what happened the first time.
   Green also means the right thing here — the bar is progress towards the next
   coin, and progress is the one quantity that is good when it is larger. */
[data-panel="student"] .sxp__fill {
  border-radius: 999px;
  background-color: #7FC141;
  background-image: linear-gradient(90deg, #95D45C 0%, #5FA32A 100%);
}
[data-panel="student"] .pbar__label { font: 500 13.5px/1.4 var(--display); color: var(--muted); }
[data-panel="student"] .pbar__value { font: 600 13.5px/1.4 var(--display); font-variant-numeric: tabular-nums; color: var(--ink); }

[data-panel="student"] .pav {
  border-radius: 50%;
  background: #F1F4FA;
  color: var(--muted);
  border: 0;
  font: 600 12.5px/1 var(--display);
}

[data-panel="student"] .ptabs { gap: 4px; border-bottom: 1px solid var(--line); }
[data-panel="student"] .ptabs a {
  border: 0; border-radius: 10px 10px 0 0;
  padding: 11px 16px;
  font: 500 14.5px/1 var(--display);
  color: var(--muted);
}
[data-panel="student"] .ptabs a[aria-current="page"] {
  background: none;
  color: var(--sk-hue-ink);
  font-weight: 600;
  box-shadow: inset 0 -2.5px 0 var(--sk-hue);
}
[data-panel="student"] .ptoggle,
[data-panel="student"] .ppick label {
  border-radius: 999px;
  border: 1.5px solid var(--line);
  font: 500 14px/1 var(--display);
  color: var(--muted);
}
[data-panel="student"] .ptoggle a[aria-current="page"],
[data-panel="student"] .ppick label.is-on {
  background: var(--sk-hue-pale);
  border-color: transparent;
  color: var(--sk-hue-ink);
  font-weight: 600;
}

[data-panel="student"] .pmodal__box {
  border: 0;
  border-radius: var(--sk-r-lg);
  box-shadow: 0 30px 70px -24px rgba(16, 24, 40, .45);
}
[data-panel="student"] .pmodal__head { background: none; border-bottom: 1px solid var(--line); }
[data-panel="student"] .pmodal__head h2 { font-family: var(--display); font-weight: 600; }

.splay .pdemo, .sfocus .pdemo { font-family: var(--text); border-radius: 0; }

/* ---------------------------------------------------------------------------
   14b. GRIDS THAT REFLOW BY CONTENT, NOT BY COUNT
   site.css lays a .grid--4 out as four equal columns at every width above the
   phone breakpoint. That was fine while a figure tile was 28px of type in a
   tight card; at 42px in an airy one, four of them do not fit a tablet, and
   because a grid item's automatic minimum is its MIN-CONTENT, the row does not
   squeeze — it overflows, and the whole page scrolls sideways. �10 forbids that
   at every width, and the harness caught it at 834px on S6.

   Two lines fix it, and they are worth having for their own sake: the items may
   shrink, and the columns are chosen by how much room there is rather than by a
   number in a class name. Four tiles become two by two on a tablet and one above
   another on a phone, which is what they should have done anyway.
   ------------------------------------------------------------------------ */
/* The same automatic minimum applies one level up: .splay__body is itself a
   grid, so a .grid--4 inside it is a grid ITEM, and an item whose min-content is
   980px will not be made narrower than 980px however the tracks are written.
   This is the line the first fix was missing, and the harness said so by
   reporting exactly the same 1005px twice. */
.splay__body > *, .splay__main > * { min-width: 0; }
[data-panel="student"] .grid > * { min-width: 0; }
[data-panel="student"] .grid--3,
[data-panel="student"] .grid--4,
[data-panel="student"] .grid--5,
[data-panel="student"] .grid--6 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 232px), 1fr)); }
[data-panel="student"] .grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }

/* ---------------------------------------------------------------------------
   15. THE PORTAL'S OWN BLOCKS
   The hero, the quests, the section tiles, the badge shelf and the board come
   from student.css and are good designs. They are re-cut here to the new
   language: no borders, one shadow, more air.
   ------------------------------------------------------------------------ */
[data-panel="student"] .shero {
  border: 0;
  border-radius: var(--sk-r-lg);
  box-shadow: var(--sk-lift);
  /* The one big block of colour on the portal, so it is the one that earns a
     gradient. Both stops are navy — 13.0:1 and 17.0:1 against the white type on
     them — so nothing on it comes close to the contrast floor. */
  background-image: var(--sk-hero);
}
[data-panel="student"] .shero h2 {
  font: 600 clamp(24px, 3vw, 34px)/1.2 var(--display);
  letter-spacing: -.02em;
}

[data-panel="student"] .squest,
[data-panel="student"] .ssec,
[data-panel="student"] .srow,
[data-panel="student"] .sgame,
[data-panel="student"] .sgift,
[data-panel="student"] .spack {
  border: 0;
  border-left: 0;
  border-radius: var(--sk-r-md);
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
[data-panel="student"] a.squest,
[data-panel="student"] a.ssec,
[data-panel="student"] a.srow { transition: box-shadow .18s ease-out, transform .18s ease-out; }
[data-panel="student"] a.squest:hover,
[data-panel="student"] a.ssec:hover,
[data-panel="student"] a.srow:hover {
  transform: translateY(-2px);
  box-shadow: var(--sk-lift-up);
}
/* The coloured spine down the left edge of a quest goes. It is a sixth thing
   saying "this one is amber" on a tile that already has a tinted icon, a tinted
   prize chip and a coloured button, and ten of them in a column was a large part
   of what made the page read as a scrapbook. The state a spine carried — done,
   locked — is still said by the icon and by the chip under it, in words. */
[data-panel="student"] .squest::before { display: none; }
[data-panel="student"] .squest { padding-left: 16px; }

[data-panel="student"] .squest__ico,
[data-panel="student"] .srow__ico,
[data-panel="student"] .ssec__ico { border-radius: 11px; }
[data-panel="student"] .squest b,
[data-panel="student"] .srow__text b,
[data-panel="student"] .ssec__name { font-family: var(--display); font-weight: 600; color: var(--ink); }

[data-panel="student"] .sbadge { border-radius: var(--sk-r-md); }
/* A badge is a medal, and a medal is the one thing on a page that is allowed to
   shine. The disc under the sticker takes a gradient; what sits on it is art,
   not text, and the art is dark-on-light at both stops. A locked badge keeps its
   flat grey — a locked thing that glitters is a locked thing nobody believes. */
[data-panel="student"] .sbadge:not(.sbadge--locked) .sbadge__ico {
  background-image: linear-gradient(145deg, #FFD089 0%, #F7AE44 55%, #E09A2E 100%);
}
[data-panel="student"] .sbadge__ico--blue { background-image: linear-gradient(145deg, #7FB0EC 0%, #3A7BD5 100%); }
[data-panel="student"] .sbadge__ico--green { background-image: linear-gradient(145deg, #AEE07E 0%, #7FC141 100%); }
[data-panel="student"] .sbadge__ico--violet { background-image: linear-gradient(145deg, #A78BF2 0%, #6D4AD8 100%); }

/* Every large figure on the portal is the same shape, so a child compares them
   by size and not by typeface. */
[data-panel="student"] .scount dd,
[data-panel="student"] .ssec__n b,
[data-panel="student"] .sprog__n,
[data-panel="student"] .stimer,
[data-panel="student"] .spack__now,
[data-panel="student"] .sring__mid {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------------------
   15b. THE ILLUSTRATIONS
   partials/student-art draws the two games and the six things in the reward
   shop. .sart is panel.css's reserved-area box — a tint with a dashed frame and
   the words "artwork to come" — and .sart--art is that box once there IS art:
   the tint and the dashed frame come off, because the drawing brings its own
   ground and a dashed border around a finished picture reads as a placeholder
   that nobody took the frame off.
   ------------------------------------------------------------------------ */
[data-panel="student"] .sart--art {
  padding: 0;
  background: none;
  display: block;
  overflow: hidden;
}
[data-panel="student"] .sart--art::after { display: none; }   /* the dashed frame */
.sartwork { display: block; width: 100%; height: auto; }

/* A game card is wide, and a 200x130 drawing scaled to its full width is 350px
   of picture over 60px of name — the artwork swallows the card. The two game
   drawings are therefore a BAND: a fixed height with the SVG cropping to fill it
   (preserveAspectRatio="slice" in the partial) rather than letterboxing, which
   would show the white card down both sides of a drawing that brings its own
   ground. They are drawn centred, so the sides are what is lost. */
.sartwork--band { height: clamp(132px, 15vw, 168px); width: 100%; }

/* In the shop the picture is the top of a card, so it squares off at the bottom
   where the name begins. The games use the same block at the top of a wider
   card and it needs no special case. */
[data-panel="student"] .sgift .sart--art { border-radius: var(--sk-r-md) var(--sk-r-md) 0 0; }
[data-panel="student"] .sgame .sart--art { border-radius: var(--sk-r-md) var(--sk-r-md) 0 0; }

/* An item the child cannot afford, or one that is out of stock, is already said
   in words on the card. The picture goes quiet rather than grey: full greyscale
   on a drawing this small turns it into a smudge nobody can identify, and the
   point of the picture is that a child knows what the thing is. */
[data-panel="student"] .sgift--short .sart--art { opacity: .55; }

/* ---------------------------------------------------------------------------
   16. MOTION
   Two things only: an arrival, and a press. Everything that looped is gone —
   the breathing coin, the flickering flame, the drifting glyphs. Motion that
   never stops is motion a child stops seeing, and it was the loudest part of a
   design whose whole fault was loudness.
   ------------------------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  @keyframes skRise {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
  }
  .splay__body > * { animation: skRise .4s cubic-bezier(.2, .7, .3, 1) both; }
  .splay__body > :nth-child(1) { animation-delay: .02s; }
  .splay__body > :nth-child(2) { animation-delay: .07s; }
  .splay__body > :nth-child(3) { animation-delay: .12s; }
  .splay__body > :nth-child(4) { animation-delay: .17s; }
  .splay__body > :nth-child(5) { animation-delay: .22s; }
  .splay__body > :nth-child(n+6) { animation-delay: .26s; }

  /* A progress bar still fills from nothing, because the distance travelled is
     the thing the bar is for. */
  @keyframes skFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  .splay .pbar__fill,
  .splay .sxp__fill {
    transform-origin: left center;
    animation: skFill .8s .2s cubic-bezier(.2, .8, .3, 1) both;
  }
}

/* ---------------------------------------------------------------------------
   17. THE SOLVING SCREENS — ONE SCREEN, NO SCROLLING
   The client, 1 October 2026: "practice questions eka screen madhe show kara,
   scroll karaychi garaj nasli pahije."

   They are right, and it matters more here than anywhere else in the portal: a
   sheet is timed, and a child who has to scroll to find the options is spending
   their eight minutes on the page instead of on the sum. So the solving area is
   exactly the viewport and it does not scroll — the question sits in the space
   that is left after the bar at the top and the controls at the bottom, and it
   SHRINKS to fit rather than pushing anything off screen.

   The figures below are the whole of how that is done: the three rows are a grid
   of auto / 1fr / auto inside 100dvh, the middle row is min-height:0 so it may be
   smaller than its content, and the type inside it is clamped against vh as well
   as vw so a long question reduces instead of overflowing.
   ------------------------------------------------------------------------ */
/* The shell is the viewport, and the one thing inside it that scrolls is the
   area below the sheet — where the design notes for the client live. The sheet
   itself is exactly one screen high. */
.sfocus {
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);   /* the preview banner, then the work */
  /* The column has to be written down too. A grid with no column template gets
     ONE implicit auto column, and an auto column is free to be as wide as its
     widest content — so on a 360px phone the whole page became 662px wide and
     scrolled sideways, which �10 forbids at every width. minmax(0,1fr) is what
     says "the width of the screen, and the content fits inside it". */
  grid-template-columns: minmax(0, 1fr);
  overflow-x: hidden;
}
.sfocus > * { min-width: 0; }
@supports not (height: 100dvh) { .sfocus { height: 100vh; } }
/* NOTHING BELOW THE FOLD AND NOTHING TO SCROLL. The client, 1 October 2026:
   "solving screen hi single screen madhe show houdya, scroll nahi zale pahije."
   The sheet already fitted; what still scrolled the page was the block of design
   notes under it, and those are now in a dialogue opened from the bar at the top.
   With them gone from the flow, this can be hidden outright — so there is no
   scrollbar, no rubber-band on a phone, and no way to end up looking at a blank
   area below a timed sheet. The question area keeps its own last-resort scroll
   for a window too short to hold a sum. */
.sfocus > #sfocus { min-height: 0; overflow: hidden; }

/* The way into those notes. It is small, it is at the end of the bar, and it is
   rendered only when the preview flag is on — it is a note for the client, not a
   control a child has. */
.sfx__notesbtn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; padding: 0 11px;
  border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: var(--on-navy-3);
  font: 500 12px/1 var(--display);
  cursor: pointer;
}
.sfx__notesbtn:hover { background: rgba(255, 255, 255, .22); color: #FFF; }
.sfx__notesbtn:focus-visible { outline: 3px solid #FFF; outline-offset: 2px; }

/* The dialogue they open. It is a review document, so it is allowed to be tall
   and to scroll inside itself — that is a scroll the child never meets. */
.sfocus .pmodal__body { overflow-y: auto; padding: 0; }
.sfocus .pmodal__body .sfx__notes { max-width: none; margin: 0; padding: 0; }
.sfocus .pmodal__body .pcard { box-shadow: none; border-radius: 0; }

.sfocus .sfx {
  /* HEIGHT, not min-height. With min-height the form is free to grow past the
     screen, and a flex child with `flex: 1 1 auto` only gives up space inside a
     container whose height is settled — so the question never shrank and the
     controls went off the bottom of a phone by 27px. A definite height is what
     makes the middle row the one that yields. */
  height: 100%;
  min-height: 0;
  /* 920px left about 240px of empty navy down each side of a 1366 laptop, which
     is the screen the client reviews on. The sheet is not prose — it is a sum
     and four targets — so the room goes to the question and the option cards
     rather than to the margins. Still capped: beyond about 1280px the two
     columns drift so far apart that the eye has to travel between them. */
  max-width: min(1280px, 100%);
  margin: 0 auto;
  padding: clamp(10px, 1.6vh, 18px) clamp(12px, 2vw, 20px)
           calc(clamp(10px, 1.6vh, 18px) + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.3vh, 16px);
}
/* Flex rather than a fixed set of grid rows: the clock notice, the modal and the
   review step come and go from this form, and a grid-template-rows here would
   have to be edited every time one of them did. */
.sfocus .sfx > * { flex: 0 0 auto; }
.sfocus .sfx__stage {
  flex: 1 1 auto;
  min-height: 0;               /* without this the row refuses to be smaller
                                  than the question and the sheet scrolls again */
  display: grid;
  align-content: center;
  overflow-y: auto;            /* the last resort, on a very short window: the
                                  QUESTION scrolls, never the whole screen */
}

/* And the question shrinks to the space it is given. The sizes below are clamped
   against vh as well as vw, which is the part that makes this work on a laptop
   in a half-height window — a 40px sum in a 360px gap is what pushes the options
   off the bottom. */
.sfocus .sfq__ask { padding: clamp(12px, 2.2vh, 24px) 20px; border-radius: 20px; }
.sfocus .sfq__col { margin-top: clamp(8px, 1.8vh, 18px); }
.sfocus .sfq__col b { font-size: clamp(17px, 2.6vh, 30px); }
.sfocus .sfq__col i { font-size: clamp(21px, 3.6vh, 40px); }
.sfocus .sfq__rule { margin: clamp(6px, 1.2vh, 12px) auto clamp(8px, 1.6vh, 16px); }
.sfocus .sopt { min-height: clamp(48px, 7vh, 64px); }

/* THE FOUR OPTIONS ARE TWO BY TWO, everywhere above a narrow phone. This is the
   arrangement in the client's photographs of the LogiQids solving screen, and it
   is also the single thing that makes a timed sheet fit one screen: stacked in a
   column, the fourth card is below the fold on a laptop, which on a sheet with a
   clock on it is a child losing seconds to scrolling. */
.sfocus .sopts { gap: clamp(7px, 1.2vh, 11px); grid-template-columns: 1fr 1fr; }
@media (max-width: 330px) {
  /* Only on the very narrowest phones. At 390px a half-width card is about
     165px, which carries a four-digit answer at 19px without wrapping; below
     330 it does not, and a wrapped number is worse than a scroll. */
  .sfocus .sopts { grid-template-columns: 1fr; }
}

/* The question keeps the slightly smaller share now that the options are the
   other column: four cards need more room than one sum does. */
@media (min-width: 900px) {
  .sfocus .sfq { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
}
.sfocus .sfq { gap: clamp(8px, 1.4vh, 14px); }
.sfocus .sfq__main { gap: clamp(8px, 1.4vh, 14px); }

/* EVERY BUTTON SITS AT THE RIGHT OF THE BAR — the client asked for all of them
   over, not only the one being reached for (5 October 2026).

   The hint line is what used to hold them there: it has flex-grow, so it filled
   the gap and pushed the buttons across. On a short window the hint is dropped
   to save a line, and they fell back to the left — which is how the drill screen
   ended up with "Next question" in the bottom-left corner. Saying where the row
   packs says it whether the hint is there or not, and it keeps Back, Skip and
   Check together as one group instead of splitting them across the bar.

   It does nothing on a phone, where the buttons are already stretched to fill
   the row and there is no free space to pack into. */
.sfocus .sfx__act { justify-content: flex-end; }

/* The design notes under the sheet are for the client, not for the child. They
   stay in the page and stay reachable — they simply start below the fold, which
   is where something nobody solving a sheet needs belongs. */
.sfocus .sfx__notes { max-width: 920px; margin: 0 auto; padding: 0 16px 40px; }

/* --- the furniture gives up its space before the sum does ----------------
   On a phone the bar at the top wrapped onto four lines and the controls onto
   three, which between them took 358px of an 844px screen and pushed the options
   off the bottom. Measured, not guessed: the harness prints the height of every
   row of this form.

   So on a narrow or a short window the top bar becomes two tight rows — the way
   out, the sheet, the clock, and the twenty pips under them — and the controls
   become one. What is dropped is the running XP, which is on the result screen
   anyway, and the hint line, which repeats what the disabled Check button
   already says. Nothing that tells the child how far through the sheet they are
   is dropped: the pips and the "n of 20" stay. */
@media (max-width: 760px), (max-height: 780px) {
  /* The way out left this bar and stands beside it, so the old first column is
     gone. The three rows are named rather than left to flow: with the column
     removed the clock fell into the flexible track and stretched across the
     whole bar. Title, then the twenty pips, then the clock with the progress
     bar running off it. */
  .sfocus .sfx__hud {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 6px 10px;
    padding: 8px 11px;
  }
  .sfocus .sfx__hud > .sfx__mark { grid-column: 1 / -1; }
  .sfocus .sfx__hud > .sfx__segs { grid-column: 1 / -1; flex: 0 0 auto; }
  .sfocus .sfx__top { gap: 10px; }
  .sfocus .sfx__xp { display: none; }
  /* The design-notes button goes with it. It is a reviewer's control, and a
     reviewer is not on a 360px phone; keeping it there cost the bar a line and
     put the question back into a scroll. */
  .sfocus .sfx__notesbtn { display: none; }
  .sfocus .scheer { display: none; }

  .sfocus .sfx__act { flex-wrap: nowrap; gap: 8px; padding: 10px 11px; }
  .sfocus .sfx__hint { display: none; }
  .sfocus .sfx__act .btn { padding: 0 15px; min-height: 44px; }
}

/* And the sum itself comes down a size on a phone. With the bar and the controls
   compacted the question still wanted 523px of the 465px it was given on a
   390x844 screen, so the four option cards and the stacked terms shrink too —
   still 44px targets, which is the floor and not negotiable. */
@media (max-width: 760px) {
  /* Only a NARROW window shrinks the way out. On a short one it costs nothing:
     it stands beside the bar now, inside a row the bar is already taller than. */
  .sfocus .sback { width: 42px; height: 42px; border-width: 2px; box-shadow: 0 3px 0 var(--sk-amber-ink); }
  .sfocus .sback .ico { width: 20px; height: 20px; }
  .sfocus .sfq__ask { padding: clamp(10px, 1.8vh, 16px) 14px; }
  .sfocus .sfq__col { margin-top: clamp(6px, 1.2vh, 12px); }
  .sfocus .sfq__col b { font-size: clamp(15px, 2.2vh, 22px); }
  .sfocus .sfq__col i { font-size: clamp(19px, 3vh, 28px); }
  .sfocus .sfq__rule { margin: 8px auto 10px; }
  .sfocus .sopts { gap: 7px; }
  .sfocus .sopt { min-height: 44px; padding: 6px 12px 6px 10px; }
  /* The answer on an option card. 26px is right on a laptop and is 24px more
     than the card needs on a phone, four times over. 44px of target is kept —
     that is the floor, and the card is still the whole target. */
  .sfocus .sopt__v { font-size: 19px; }
  .sfocus .sopt__k { width: 26px; height: 26px; font-size: 12px; }
}

/* The preview banner is scaffolding, not design — it tells the client the
   figures are made up. It is kept on these two screens, because the rule is that
   it is said once at the top of EVERY screen, but on a short window it says so
   in one line instead of three. That is 40px, and 40px is the difference between
   a child seeing all four options and scrolling for the fourth. */
@media (max-height: 790px) {
  .sfocus .pdemo { padding: 5px 12px; font: 400 11.5px/1.35 var(--text); }
  .sfocus .pdemo span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* A window under about 780px — a small phone such as a 360x740 Android, or a laptop with
   the browser at half height. The last thing to give is the size of the option
   cards, down to 40px. WCAG 2.2's target minimum is 24px, so this is still well
   clear of it; 44px is the comfort figure the rest of the portal keeps. */
@media (max-height: 780px) {
  /* The four options go two by two instead of one under another. This is the
     change that actually bought the room — shaving the card height a few pixels
     at a time was moving 4px per attempt, and the answers are NUMBERS, which is
     the one kind of option short enough to sit two to a row on a 360px screen. */
  .sfocus .sopt { min-height: 40px; }
  .sfocus .sfq__col i { font-size: clamp(18px, 2.8vh, 26px); }
  .sfocus .sfq__col b { font-size: clamp(14px, 2vh, 20px); }
  .sfocus .sfq__n { padding: 3px 10px; }

  /* THE REVIEW STEP, which is the tallest thing this screen ever shows: a
     heading, a paragraph, twenty chips over two rows, and a footer. At 378px it
     did not fit the 330px the stage has on a 1366x645 window — a maximised
     browser on a 768px laptop, once the tabs, the address bar and the taskbar
     have taken their 120px. The stage then fell back on its own scrollbar,
     which is the one thing this screen is not supposed to do.

     Nothing is dropped, because everything here is load-bearing: the count, the
     twenty chips and both ways out. It is the PADDING and the type that give,
     the same way they do for the question itself above. The chips keep a 40px
     target, which is the floor the rest of this file holds to. */
  /* The explanation under the question gives up padding too — with it under
     the sum rather than under the options, the LEFT column is now the tall one
     on a short window. */
  .sfocus .ssol { padding: 12px 14px 13px; border-radius: 16px; }
  .sfocus .ssol__h { margin-bottom: 8px; font-size: 13px; }
  .sfocus .ssol p { font-size: 13px !important; line-height: 1.5 !important; }
  .sfocus .sfq__doubt { margin-top: 10px; padding: 7px 12px; font-size: 12.5px; }
  /* The drill puts the whole working in that box — four rows, a total and a
     link — so it is the tallest box either screen shows. The rows give up
     their padding before anything is dropped: every term stays on screen. */
  .sfocus .sfq__run { gap: 3px; }
  .sfocus .sfq__run li { padding: 4px 10px; font-size: 12.5px; }
  .sfocus .sfq__ans { margin-top: 8px; padding-top: 8px; font-size: 13px; }
  .sfocus .sfq__ans b { font-size: 17px; }

  .sfocus .srev { padding: 14px 16px; border-radius: 18px; }
  .sfocus .srev__h { font-size: 18px; }
  .sfocus .srev__p { margin-top: 6px; font-size: 13px; line-height: 1.5; }
  .sfocus .srev__grid { margin-top: 12px; gap: 7px; }
  .sfocus .srev__q { padding: 6px 6px 7px; border-radius: 11px; }
  .sfocus .srev__q b { font-size: 15px; }
  .sfocus .srev__foot { margin-top: 12px; padding-top: 11px; gap: 10px; }
  .sfocus .srev__count { font-size: 13px; }
}

/* One tier tighter, for a window under about 660px: the same laptop with a
   bookmarks bar open, or a browser that is not quite maximised. The review step
   was still 12px over at 600px. Only the spacing moves here — the type and the
   40px targets are already at the floor in the tier above. */
@media (max-height: 660px) {
  .sfocus .srev { padding: 11px 14px; }
  .sfocus .srev__grid { margin-top: 10px; gap: 6px; }
  .sfocus .srev__q { padding: 5px 6px 6px; }
  .sfocus .ssol { padding: 10px 12px 11px; }
  .sfocus .ssol__h { margin-bottom: 5px; font-size: 12.5px; }
  .sfocus .ssol p { font-size: 12.5px !important; }
  .sfocus .sfq__run li { padding: 1px 10px; font-size: 12px; }
  .sfocus .sfq__ans { margin-top: 6px; padding-top: 6px; }
  .sfocus .sfq__doubt { margin-top: 8px; padding: 6px 11px; }
  .sfocus .ssol { padding: 8px 12px 9px; }
  .sfocus .sfq__run { gap: 2px; }
  .sfocus .sfq__main { gap: 7px; }
  .sfocus .sfq__ask { padding: 10px 18px; }
  .sfocus .srev__p { margin-top: 5px; line-height: 1.42; }
  .sfocus .srev__foot { margin-top: 10px; padding-top: 9px; }
}

/* ===========================================================================
   18. THE CLIENT'S REFERENCE — 9 OCTOBER 2026

   The redesign note left one thing open: the client asked for an "attractive
   design" and referred to screenshots they believed they had sent, and none
   ever arrived. One arrived on 9 October, of the student home screen, and
   Yogesh asked for it as it is. Everything in this section is that picture.

   WHAT IT CHANGES, and why each is a real change rather than a repaint:

     the menu    goes NAVY. �3 above made it a white column of plain rows with
                 one pale pill on the row you are on, off the logiqids
                 reference the client gave on 1 October. Their own picture is a
                 navy rail with a solid blue pill, and a reference they drew
                 beats a reference they pointed at. The one-coloured-row rule
                 survives intact — it is the same rule, painted darker
     the home    stops being eleven stacked cards and becomes the five blocks
                 in the picture: a welcome bar, five subject tiles, a
                 "Let's Practice!" band, and a row of three. �15's hero, quests
                 and badge shelf are untouched and still used by the screens
                 that had them
     the art     children. See the note in partials/student-art

   WHAT IT DOES NOT CHANGE. Admin and franchise never load this file. The other
   twenty-two student screens keep .shead, �15's blocks and their own accent —
   only the menu they share is repainted, and the dashboard is the one screen
   rebuilt. And the rule relaxed on 1 October still binds every gradient below:
   two stops, paint only, and the lightest stop carries whatever sits on it.
   ======================================================================== */

/* ---------------------------------------------------------------------------
   18.1 THE NAVY RAIL
   An override of �3 rather than a rewrite of it: the structure, the scroll, the
   drawer and the short-screen tightening all still apply, and only the paint
   moves. Keeping it as an override is what makes going back to white one block
   to delete rather than a merge.
   ------------------------------------------------------------------------ */
.smenu {
  background: linear-gradient(180deg, #1D3666 0%, #10224A 100%);
  color: #C3D2EC;
  /* The rail is painted edge to edge, so �3's own padding comes off it and is
     given back to the parts inside. Zeroing the top as well is what lets the
     white masthead sit flush — a negative margin would have worked until the
     short-screen tier below 1000px moved the padding under it. */
  padding: 0 0 calc(10px + env(safe-area-inset-bottom));
  overflow: hidden;              /* keeps the stars below off the scrollbar   */
}

/* The logo sits on white, full width, exactly as the picture has it: the brand
   is the one thing on this rail that is not navy, which is what makes it read
   as a masthead rather than as the first menu row. */
.smenu__brand {
  margin: 0 0 16px;
  padding: 18px 20px;
  background: var(--paper);
  color: var(--ink);
}
@media (min-width: 1024px) and (max-height: 1000px) {
  /* �3 tightens the rail on a short screen so Notifications and Help stay
     above the fold. The masthead tightens with it. */
  .smenu { padding-top: 0; }
  .smenu__brand { padding: 13px 20px; margin-bottom: 10px; }
}
.smenu__mark img { width: 30px; height: 30px; }
.smenu__wm b    { font-size: 15.5px; color: #16294F; }
.smenu__wm span { color: var(--faint); }

.smenu__scroll { padding: 0 12px 8px; margin: 0; scrollbar-color: #35507F transparent; }
.smenu__label  { color: #7E93BC; }

.smenu__item,
.smenu__out    { color: #C3D2EC; border-radius: 13px; }
.smenu__item:hover,
.smenu__out:hover { background: rgba(255, 255, 255, .09); color: #FFFFFF; }

/* The one coloured row, still the only one. Solid blue and white type now
   rather than a pale wash, because a pale wash on navy is invisible. */
.smenu__item[aria-current="page"] {
  background: linear-gradient(135deg, #4B8AE4 0%, #2F6BD0 100%);  /* 3.4:1 glyph, white text 4.8:1 on the light stop */
  color: #FFFFFF;
  box-shadow: 0 8px 18px -10px rgba(47, 107, 208, .9);
}
.smenu__item[aria-current="page"]:hover { color: #FFFFFF; }

.smenu__item--soon { opacity: .4; }
.smenu__soon { color: #7E93BC; }

.smenu__foot { padding: 10px 12px calc(6px + env(safe-area-inset-bottom)); }
.smenu__out  { border-top: 1px solid rgba(255, 255, 255, .1); border-radius: 0 0 13px 13px; }

/* The stars in the empty bottom third of the rail. The picture has them and
   they cost nothing: one repeating background, no element, no markup, and they
   are the only decoration anywhere on this surface — see the "none behind the
   page" rule at the top of this file, which is about the WORK area. A rail
   with sixteen rows and 300px of nothing under them is the one place a
   watermark is not competing with anything. */
.smenu::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 70px;
  height: 260px;
  pointer-events: none;
  opacity: .055;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath d='M30 12l6 13 14 2-10 10 2 14-12-7-12 7 2-14L10 27l14-2z' fill='%23fff'/%3E%3Cpath d='M88 62l4.6 10 10.4 1.5-7.5 7.3 1.8 10.4L88 86.5 78.7 91.2l1.8-10.4-7.5-7.3L83.4 72z' fill='%23fff'/%3E%3C/svg%3E")
    0 0 / 120px 120px repeat;
}

/* The drawer keeps the navy — it is the same menu, moved. */
@media (max-width: 1023px) {
  .smenu { box-shadow: 20px 0 50px -24px rgba(16, 24, 40, .55); }
}

/* ---------------------------------------------------------------------------
   18.2 THE WELCOME BAR
   The dashboard replaces .shead with this, so it carries everything the header
   carried — the burger, the purse, the bell and the avatar — and adds what the
   picture has: the child, the greeting and the level card.
   ------------------------------------------------------------------------ */
.sdhi {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.8vw, 22px);
  padding: clamp(16px, 1.8vw, 22px) clamp(16px, 2vw, 24px);
  border-radius: var(--sk-r-lg);
  background: linear-gradient(120deg, #E8F2FE 0%, #DCEBFC 100%);  /* 12.4:1 for the navy heading on the lighter stop */
  overflow: hidden;

  /* IT IS THE TOP OF THE PAGE NOW, so it carries what .shead carried before it:
     the gap above it, and the same 1180px cap .splay__body uses. Without the cap
     the band ran the full width of the shell while every card beneath it stopped
     at 1180 — on a wide screen the top of the page was visibly wider than the
     rest of it. Without the margin it sat flush against the preview strip. */
  margin-top: clamp(18px, 2.4vw, 30px);
  max-width: 1180px;
  width: 100%;
}

.sdhi__burger {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  display: none; place-items: center;
  background: var(--paper);
  border: 0; border-radius: 12px;
  box-shadow: var(--sk-lift);
  color: var(--ink);
  cursor: pointer;
}
.sdhi__burger:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 1023px) { .sdhi__burger { display: grid; } }

/* The waving child that stood here came out on 16 October 2026 — see the note
   in partials/student-welcome. Its three rules went with it. */

.sdhi__say { min-width: 0; flex: 1 1 auto; }
.sdhi__say h1 {
  margin: 0;
  font: 700 clamp(22px, 2.9vw, 34px)/1.15 var(--display);
  letter-spacing: -.02em;
  color: #16294F;
}
.sdhi__say > p {
  margin: 5px 0 0;
  font: 400 clamp(13px, 1.1vw, 15px)/1.5 var(--text);
  color: #41567E;              /*  6.6:1 on the lighter stop                   */
}

/* The purse rides under the greeting here rather than in a header row. The
   picture has nothing in this spot, but points, coins and the streak are the
   reason a child came back today and �4's note is explicit that they appear on
   every screen — dropping them from the one screen they matter most on would
   be following the picture off a cliff. */
.sdhi .spurse { margin-top: 10px; flex-wrap: wrap; }
.sdhi .spurse__pill { height: 32px; padding: 0 11px; font-size: 13.5px; background: rgba(255, 255, 255, .78); }

/* --- the level card ------------------------------------------------------
   Star, level, bar, caption, as the picture draws it.

   THE BAR IS NOT "60% OF LEVEL 3". It cannot be: points do not move a child up
   a level, the centre does (SOW �4.2, F12), and S3 tells the child exactly
   that — a level bar here would be the most motivating thing on the screen and
   also a lie, and it would contradict the screen it links to. So the card
   keeps the picture's shape and the bar measures the one earning rule that is
   real and daily: fifty points mint a coin. Same two figures as the purse
   beside it and the shelf below, off the same rate. */
.sdlvl {
  flex: 0 0 auto;
  width: min(300px, 32vw);
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--sk-lift);
}
.sdlvl__top { display: flex; align-items: center; gap: 11px; margin: 0; }
.sdlvl__star { flex: 0 0 auto; width: 36px; }
.sdlvl__star .sartwork { width: 100%; height: auto; }
.sdlvl__top b { font: 600 17px/1.2 var(--display); color: var(--ink); }
.sdlvl__bar {
  display: block;
  height: 9px;
  margin: 9px 0 6px;
  border-radius: 999px;
  background: #E7EDF8;
  overflow: hidden;
}
.sdlvl__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7FC141 0%, #4FA81F 100%);   /* paint only */
}
.sdlvl p { margin: 0; font: 400 12.5px/1.4 var(--text); color: var(--muted); }
.sdlvl p b { font-weight: 600; color: var(--ink); }

.sdhi__bell, .sdhi__me { flex: 0 0 auto; }
.sdhi__bell {
  position: relative;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  color: #41567E;
}
.sdhi__bell:hover { background: var(--paper); color: var(--ink); }
.sdhi__bell:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sdhi__dot {
  position: absolute; top: 2px; right: 1px;
  min-width: 18px; height: 18px;
  display: grid; place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--sk-red);
  border: 2px solid #E4EFFD;
  color: #FFFFFF;
  font: 600 10.5px/1 var(--display);
}
.sdhi__me {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #2F6BD0 0%, #1B3160 100%);  /* a glyph on it, 4.6:1 on the light stop */
  color: #FFFFFF;
  overflow: hidden;
}
.sdhi__me:hover { color: #FFFFFF; box-shadow: var(--sk-lift-up); }
.sdhi__me:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

@media (max-width: 1100px) { .sdlvl { width: min(260px, 36vw); } }
@media (max-width: 900px) {
  .sdhi { flex-wrap: wrap; }
  .sdlvl { order: 3; width: 100%; }
}
@media (max-width: 560px) {
  .sdhi { padding: 14px; gap: 10px; }
  .sdhi__bell { display: none; }
  /* Three rows: the burger and the avatar, then the greeting, then the level
     card. Left to the wrap order, the greeting is flex:1 1 auto and takes the
     whole first row, which dropped the avatar onto a line of its own with
     nothing beside it. */
  .sdhi__me  { order: 1; margin-left: auto; }
  .sdhi__say { order: 2; flex-basis: 100%; }
}

/* ---------------------------------------------------------------------------
   18.3 THE FIVE SUBJECT TILES
   One tint each. This is the one place on the portal where the one-accent rule
   is set aside, and it is set aside because the tiles ARE the five accents:
   each is painted in the colour of the screen it opens, which is the same
   colour that screen's menu row and heading rule already use. A child learns
   "practice is the orange one" once and it holds everywhere.
   ------------------------------------------------------------------------ */
.sdtiles {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(10px, 1.2vw, 16px);
}

.sdtile {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: clamp(14px, 1.6vw, 20px) 12px clamp(16px, 1.8vw, 20px);
  border-radius: var(--sk-r-lg);
  background: var(--sd-tile, #EFF5FE);
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  transition: transform .16s ease-out, box-shadow .16s ease-out;
}
.sdtile:hover { transform: translateY(-3px); box-shadow: var(--sk-lift-up); color: var(--ink); }
.sdtile:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
/* Bigger, 12 October 2026 — Yogesh, off a photograph of the review screen:
   the drawings are too small for a six-year-old. Up about a third, which is as
   far as it goes before the tile is a picture with a caption rather than a
   button with a picture on it. */
.sdtile .sartwork--tile { width: clamp(62px, 6.4vw, 84px); height: auto; }
.sdtile b { font: 600 clamp(14px, 1.2vw, 16.5px)/1.25 var(--display); color: var(--sd-tile-ink, var(--ink)); }
.sdtile p { margin: 0; font: 400 clamp(12px, 1vw, 13.5px)/1.45 var(--text); color: #46556F; } /* 7.4:1 on every tint below */

/* The five tints. Each pale stop is measured against #46556F for the body line
   and against its own ink for the title. */
/* LEADERBOARD REPLACED MY DOUBTS in the fourth slot on 12 October 2026, and
   it brought a colour problem with it. The board is AMBER everywhere else on
   the portal — the menu chip, the "Ranks" tab, the screen's own accent — and
   Practice was sitting on a cream so close to amber (#FDEFDC against #FDF0D8)
   that the two would have been the same tile at a glance. Since the whole
   point of this row is that colour is a KEY a child learns once, two tiles
   sharing one is worse than either being 'wrong'.

   So Practice took RED, which is its colour in the menu and its heading rule
   and on S3, S4 and S5. Both pairs below are ones this file already had
   measured, from the sheet cards the 12 October rebuild removed.

   STILL OUT OF STEP, and worth knowing before anybody "fixes" one of them:
   results is blue here and TEAL in the menu, graphs is green here and VIOLET,
   games is pink here and GREEN. That predates this change. Putting all five
   right is a five-line edit and a screenshot, not a redesign — it just was not
   what was asked for today. */
.sdtile--practice { --sd-tile: #FDE4E6; --sd-tile-ink: #C01D23; }
.sdtile--results  { --sd-tile: #E4F0FD; --sd-tile-ink: #1E4FC1; }
.sdtile--graphs   { --sd-tile: #E6F5DC; --sd-tile-ink: #3E7714; }
.sdtile--board    { --sd-tile: #FDF0D8; --sd-tile-ink: #A05E00; }
.sdtile--games    { --sd-tile: #FDE8F1; --sd-tile-ink: #C2185B; }

@media (max-width: 1023px) { .sdtiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .sdtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 18.4 WAS "LET'S PRACTICE!" — the band of six sheet cards, and .sdsheet with
   it. Replaced on 12 October 2026 by the adventure path in �20, and removed
   rather than left matching no markup. git c8fa015 has it. The drawings it
   used (practice-sky, kid-laptop, sheet-thumb) are kept in
   partials/student-art: they are assets, and the next reference may want them.
   ------------------------------------------------------------------------ */

/* ---------------------------------------------------------------------------
   18.5 THE BOTTOM ROW — continue, encouragement, medals
   ------------------------------------------------------------------------ */
.sdrow {
  display: grid;
  grid-template-columns: 1.05fr .9fr 1.2fr;
  gap: clamp(14px, 1.6vw, 20px);
  align-items: stretch;
}
@media (max-width: 1100px) { .sdrow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px)  { .sdrow { grid-template-columns: minmax(0, 1fr); } }

/* The three share a head: a round tinted disc, then the title. */
.sdbox {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(14px, 1.6vw, 20px);
  border-radius: var(--sk-r-lg);
  background: var(--paper);
  box-shadow: var(--sk-lift);
  overflow: hidden;
}
.sdbox__h { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.sdbox__h h3 { margin: 0; font: 600 clamp(15px, 1.3vw, 17.5px)/1.25 var(--display); color: var(--ink); }
.sdbox__disc {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--sd-disc-pale, var(--sk-blue-pale));
  color: var(--sd-disc-ink, var(--sk-blue-ink));
}

/* .sdcont (continue where you left off) and .sdgo (keep going) were here.
   Both cards went on 12 October 2026 — the path in �20 says where the child is
   up to, and the mission card says how today is going. .sdmiss in �20.5 keeps
   .sdgo's one hard-won rule, the hill held to the bottom of the card with the
   text clearing it. git c8fa015 has both.
   --------------------------------------------------------------------- */

/* --- my achievements ---------------------------------------------------- */
.sdach {
  --sd-disc-pale: #FDF0D8; --sd-disc-ink: #A05E00;
  background: linear-gradient(135deg, #FDF0F5 0%, #FCE7EF 100%);  /* 11.8:1 for the ink on the darker stop */
}
/* REBUILT 17 OCTOBER 2026, on Yogesh's word that this card's design was wrong.
   The screenshot showed two things: a hand's width of empty pink between the
   four medals and their own labels, and the labels themselves strung out along
   a diagonal instead of sharing a line.

   WHAT WAS LEFT TO THE BROWSER. .sdach__grid is flex:1 inside the card, so it
   takes whatever height the tallest card in the row leaves it — "Today's
   mission" is that card — and every cell was stretched to fill it with nothing
   in here saying where the medal and the label should sit inside that height.
   The medal was a width with height:auto in the same stretched cell, so its
   row was the browser's arithmetic rather than ours, and four cells that were
   each resolving their own came out at four heights.

   SO EVERY ONE OF THOSE IS NOW STATED. The medal has a height as well as a
   width (its drawing is a 64x64 square, so they are the same figure), the pair
   is centred in whatever height the cell has, and the label has a two-line box
   whether or not it needs two lines — "Speed Star" and "Level Challenger" sit
   on one line as each other either way. Nothing here depends on how a cell
   happens to resolve any more.

   THE WHITE TILE under each is the client's own drawing of this row, and it is
   what makes the pairing visible: a medal and the words under it are now
   plainly one object rather than two things that happen to be above each
   other. */
/* TWO BY TWO IN THE HOME ROW, FOUR ACROSS WHEN THERE IS ROOM. This card is the
   middle one of three on a 1366px laptop and about 280px wide there; four
   columns of that is a 60px tile holding a 56px medal, which is the tall white
   strip the first build of the tile produced. Two columns give a tile with
   proportions, and "Accuracy Hero" fits on one line in it.

   THE QUERY IS THE ROW'S OWN, not a width this card can measure. .sdrow is
   three columns above 1100px, two below it and one below 680px — so below
   1100px this card is wide enough for the four-across the client's picture
   draws, and it takes it. Container queries would say this better; nothing
   else in this file uses them yet and one lone container is worse than one
   borrowed breakpoint. */
.sdach__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  flex: 1 1 auto;
  /* CENTRE THE ROWS, DO NOT STRETCH THEM. The grid fills whatever height the
     tallest card in the row leaves it, and stretched rows turned four tiles
     into four columns of empty white. Centred, each tile is as tall as what is
     in it and the spare height goes above and below the block. */
  align-content: center;
}
.sdach__one {
  display: grid;
  /* The medal and the label, and nothing else may claim a row. */
  grid-template-rows: auto auto;
  align-content: center;
  /* Both axes, because a stretched item with height:auto was half the fault. */
  align-items: center;
  justify-items: center;
  gap: 8px;
  padding: 12px 6px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .66);
  text-align: center;
}
/* A HEIGHT AS WELL AS A WIDTH. The four drawings are 64x64, so the two figures
   are the same one; written out, the row cannot be anything but this tall. */
.sdach__one .sartwork--medal {
  width: clamp(42px, 4.4vw, 56px);
  height: clamp(42px, 4.4vw, 56px);
}
/* :not(.sr-only), because the screen-reader sentence in each cell is a span
   too. It is positioned off-screen by the utility in site.css and nothing here
   should be redeclaring its box — the exclusion keeps this rule about the one
   span that is actually drawn. */
.sdach__one > span:not(.sr-only) {
  display: flex; align-items: center; justify-content: center;
  /* Two lines' worth, so "Speed Star" and "Level Challenger" sit on the same
     line as each other rather than each finding its own. */
  min-height: 2.6em;
  font: 600 10.5px/1.3 var(--display);
  color: var(--sk-blue-ink);
}
.sdach__one--off { background: rgba(255, 255, 255, .4); }
.sdach__one--off .sartwork--medal { filter: grayscale(1); opacity: .42; }
.sdach__one--off > span:not(.sr-only) { color: var(--faint); font-weight: 500; }

/* The way to the other four. A pill rather than a line of underlined text:
   this is the one thing on the card you can tap, and at the foot of four
   medals it was reading as a caption. */
.sdach__all { margin: 12px 0 0; }
.sdach__all a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  color: var(--sk-pink-ink);            /* 5.4:1 on the tile */
  font: 600 11.5px/1 var(--display);
  text-decoration: none;
  transition: background .15s ease-out, transform .15s ease-out;
}
.sdach__all a:hover { background: #FFFFFF; transform: translateY(-1px); color: var(--sk-pink-ink); }
.sdach__all a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
/* The row is two cards wide here and this one has the width for the four. */
@media (max-width: 1100px) and (min-width: 421px) {
  .sdach__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------------------------------------------------------------------------
   18.6 ARRIVAL
   Nothing is added here. �16 already fades and rises every direct child of
   .splay__body in order, and the five blocks below ARE direct children, so the
   dashboard gets its staggered arrival for free. The one thing that needed
   saying is the bar: �16 fills .pbar__fill and .sxp__fill from nothing because
   the distance travelled is what a bar is for, and the level card's bar is the
   same kind of bar.
   ------------------------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  .splay .sdlvl__fill { transform-origin: left center; animation: skFill .8s .2s cubic-bezier(.2, .8, .3, 1) both; }
}

/* The artwork sizes this section introduces. The three above (.sartwork,
   --band, and the shop's squared-off variant) are in �15. */
.sartwork--kid,
.sartwork--tile,
.sartwork--medal,
.sartwork--work,
.sartwork--thumb { display: block; height: auto; }
.sartwork--sky   { display: block; }

/* ---------------------------------------------------------------------------
   18.7 THE TOPIC MODE CHIPS — S3

   THE LEVEL MAP THAT USED TO HEAD THIS SECTION IS GONE. Yogesh cut it from
   the foot of the practice screen on 17 October 2026, with every section
   under it, so .slvls and .slvl2 had nothing left to paint; .pnums went at
   the same time with the client-review list it was written for. An
   unreachable rule is one somebody later reads as a promise. git c8fa015
   has them whole, and the screen's own header says what the cut left open.

   What is left here is the chips off the syllabus page, below.
   ------------------------------------------------------------------------ */

/* --- the modes on a topic card -------------------------------------------
   Straight off the syllabus page: which of with-abacus, without-abacus and
   orals this topic is practised in. A topic the notebook draws as a single box
   says "one kind of sheet" rather than claiming all three — see the note on
   'curriculum' in config/preview.php, question 3. */
.smodes { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.smode {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--sk-hue-pale);
  color: var(--sk-hue-ink);
  font: 600 10.5px/1.45 var(--display);
  white-space: nowrap;
}
.smode--any { background: #F1F4FA; color: var(--muted); }

/* A topic at a level the child has not reached. Not locked — there is no key
   and nothing to buy, so a padlock would say the wrong thing (�5.3). It is
   simply further along, and it carries the one fact the syllabus gives: the
   modes it is practised in. */
.ssec--ahead {
  background: #FAFBFE;
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: default;
}
.ssec--ahead .ssec__ico { background: #EEF2FA; color: var(--faint); }
.ssec--ahead .ssec__name { color: var(--muted); }

/* ===========================================================================
   19. THE EXAM SCREEN — the client's reference of 11 October 2026

   S4, the timed sheet, drawn the way the client's screenshot draws it: the
   portal's rail still down the left, a breadcrumb across the top, the question
   on a white card in the middle with the four options under it, and a rail of
   its own on the right carrying the sheet, the progress and every question as a
   numbered button.

   IT IS A RE-SKIN OF �17 AND NOT A REPLACEMENT. Everything �17 does to keep the
   sheet on one screen with no scrolling — the 100dvh grid, the min-height:0
   middle row, the type clamped against vh as well as vw — still applies and
   still matters more here than anywhere else, because this is the screen with a
   clock on it. What changes is the paint and the arrangement: navy becomes a
   pale classroom, the HUD becomes a breadcrumb, and the segment bar becomes the
   numbered grid. The drill (S4b) is untouched and keeps the dark shell.

   WHY THE DARK SHELL GOES. It was right for a screen with nothing else on it
   and no way out. The reference puts the menu back, and a navy slab sitting
   inside a white portal with a navy rail beside it is three different darks in
   one view. The light skin is also what the home screen and the rest of the
   portal are, so the sheet stops being the one screen that looks like another
   product.
   ======================================================================== */
body.sfocus--exam {
  /* The classroom behind it: the same two-stop wash as the practice band on
     S1, so the child walks from one to the other without the page changing
     temperature. Paint only — everything that carries a word sits on white. */
  background: linear-gradient(180deg, #DCEBFB 0%, #EFF6FD 46%, #F6FAFE 100%);
}
body.sfocus--exam .sfocus__grid {
  min-height: 0;
  height: 100%;
  grid-template-columns: var(--sk-menu) minmax(0, 1fr);
  align-items: stretch;
}
body.sfocus--exam .sfocus__main { min-width: 0; min-height: 0; overflow: hidden; }
@media (max-width: 1023px) {
  .sfocus--exam .sfocus__grid { grid-template-columns: minmax(0, 1fr); }
}

/* The form is the whole of the right-hand column: a bar, then the work. */
body.sfocus--exam .sfx {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(8px, 1.2vh, 14px);
  padding: clamp(8px, 1.4vh, 16px) clamp(10px, 1.6vw, 22px) clamp(10px, 1.6vh, 18px);
  background: none;
}

/* --- the breadcrumb bar --------------------------------------------------- */
body.sfocus--exam .sfx__top {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1vw, 14px);
  min-width: 0;
}
body.sfocus--exam .sback {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 0; border-radius: 999px;
  background: var(--paper);
  box-shadow: var(--sk-lift);
  color: var(--ink);
  cursor: pointer;
}
body.sfocus--exam .sback:hover { box-shadow: var(--sk-lift-up); }
body.sfocus--exam .sback:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.scrumbs {
  min-width: 0;
  display: flex; align-items: center; gap: 7px;
  font: 500 clamp(12px, 1.1vw, 14px)/1.3 var(--display);
  color: #41567E;                      /* 6.6:1 on the lightest stop above */
  white-space: nowrap;
  overflow: hidden;
}
.scrumbs .ico { color: var(--faint); flex: 0 0 auto; }
.scrumbs span, .scrumbs b { overflow: hidden; text-overflow: ellipsis; }
.scrumbs b { color: var(--ink); font-weight: 600; }
/* On a narrow window the first crumbs go before the last one does: a child
   needs "Sheet 2" more than they need "Practice". */
@media (max-width: 900px) { .scrumbs > :nth-child(-n+4) { display: none; } }

.sfx__purse { margin-left: auto; display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }

/* The full-screen toggle, 17 October 2026. A round white button the size of
   the back button, to the left of the points: it belongs with the furniture
   that is about the WINDOW rather than with the two chips that are about the
   child. It is hidden in the markup and unhidden by script, so a browser with
   no Fullscreen API never draws a control that would do nothing.

   One of the two glyphs at a time, chosen by aria-pressed - the attribute that
   already has to be right for a screen reader - so there is one source of
   truth for the state and not a class beside it. */
.sfx__full {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--paper);
  box-shadow: var(--sk-lift);
  color: var(--muted);
  cursor: pointer;
}
.sfx__full:hover { color: var(--ink); }
.sfx__full:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sfx__full .ico { grid-area: 1 / 1; }
.sfx__full .sfx__full--out,
.sfx__full[aria-pressed="true"] .sfx__full--in { display: none; }
.sfx__full[aria-pressed="true"] .sfx__full--out { display: block; }
.sfx__full[aria-pressed="true"] { color: var(--sk-blue-ink); }

/* The drill (S4b) puts it inside the navy HUD rather than beside it, where a
   white disc with a lift under it would be the brightest thing on the bar. */
.sfx__hud .sfx__full {
  width: 34px; height: 34px;
  background: rgba(255, 255, 255, .10);
  box-shadow: none;
  color: var(--on-navy-3);                 /* 9.9:1 on the HUD */
}
.sfx__hud .sfx__full:hover,
.sfx__hud .sfx__full[aria-pressed="true"] {
  background: rgba(255, 255, 255, .20);
  color: #FFFFFF;
}

.sfx__me {
  display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px 0 5px;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: var(--sk-lift);
}
/* The disc the avatar is cut to. .savatar is width:100%/height:100% — every
   other face on the portal is a round hole of a known size with the picture
   filling it — so the size lives here and not on the image. The pale ground
   under it is what a slow picture loads onto. */
.sfx__face {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: var(--sk-hue-pale, #EDF2FA);
}
.sfx__me b { font: 600 13.5px/1 var(--display); color: var(--ink); }
@media (max-width: 620px) { .sfx__me b { display: none; } .sfx__me { padding-right: 5px; } }

body.sfocus--exam .sfx__notesbtn {
  background: var(--paper);
  box-shadow: var(--sk-lift);
  color: var(--muted);
}
body.sfocus--exam .sfx__notesbtn:hover { background: var(--paper); color: var(--ink); }
body.sfocus--exam .sfx__notesbtn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* --- the two columns ------------------------------------------------------ */
.sfx__cols {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(240px, 23vw, 310px);
  gap: clamp(10px, 1.2vw, 18px);
  align-items: stretch;
}
.sfx__work {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;   /* header, question, controls */
  gap: clamp(8px, 1.4vh, 16px);
  padding: clamp(12px, 1.8vh, 20px) clamp(12px, 1.5vw, 22px);
  border-radius: var(--sk-r-lg);
  background: var(--paper);
  box-shadow: var(--sk-lift);
}
/* A FLEX COLUMN, NOT A GRID. As a grid of two auto rows inside a stretched,
   scrollable column the rows were compressed below their content, and the
   question grid hung out of the bottom of the card it belongs to and over the
   tip. Flex items default to not shrinking below their content. */
.sfx__rail {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.2vh, 14px);
  overflow-y: auto;              /* the rail may scroll; the question never does */
  scrollbar-width: thin;
}
.sfx__rail > * { flex: 0 0 auto; }
/* Under 1024px the rail goes. It is the sheet, the progress and the grid, and
   all three are repeated inside the work column or one tap away in the review
   step — and this is the screen where nothing may push the question off. */
@media (max-width: 1023px) {
  .sfx__cols { grid-template-columns: minmax(0, 1fr); }
  .sfx__rail { display: none; }
}

/* --- the question header -------------------------------------------------- */
.sfx__qhead {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.4vw, 18px);
}
.sfx__qn {
  margin: 0;
  flex: 0 0 auto;
  font: 600 clamp(14px, 1.3vw, 17px)/1.2 var(--display);
  color: var(--ink);
}
.sfx__qhead .pbar__track { flex: 1 1 auto; height: 10px; background: #E7EDF8; }
.sfx__qhead .pbar__fill { background: linear-gradient(90deg, #7FC141 0%, #4FA81F 100%); }

/* THE CLOCK IS A PILL AGAIN, 17 October 2026 - Yogesh: "sheet me timer ko
   thoda proper show karo, time aur border ko chipak raha hai."

   It was already a pill: student.css draws .sfx__clock for the DARK shell -
   #0C1833 on a 2px #2C4478 edge, 6px by 12px of padding - and this block
   repainted it for the pale exam screen by taking the background and the
   padding off. It did not take the BORDER off. So the figure sat on a navy
   2px outline with zero space inside it, which is exactly what a clock looks
   like when it has outgrown its own box.

   Either resetting the border or restoring the padding would have stopped the
   two touching; it gets both, because a clock is worth a shape on this screen.
   It is the one thing in the question header that is a reading rather than a
   label, and the cream pill marks it without the red a countdown used to earn
   - nothing on this sheet is running out any more (12 October). */
body.sfocus--exam .sfx__clock {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 9px;
  padding: clamp(6px, .9vh, 9px) clamp(13px, 1.2vw, 17px);
  border: 1px solid #F3DCAF;
  border-radius: 999px;
  background: #FEF6E7;                 /* 13.4:1 for the ink below */
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
body.sfocus--exam .sfx__clock .ico { color: var(--sk-amber); }
body.sfocus--exam .sfx__clock b { font: 700 clamp(17px, 1.9vw, 24px)/1 var(--display); }
/* The last minute. Colour is the fast signal and the live region above says it
   in words, so this is not the only thing carrying it (�9). */

/* --- the question --------------------------------------------------------- */
body.sfocus--exam .sfx__stage { min-height: 0; }
body.sfocus--exam .sfq {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(8px, 1.4vh, 16px);
}
body.sfocus--exam .sfq__main { min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 10px; }

/* The cream panel the sum sits on, with the abacus beside it. */
body.sfocus--exam .sfq__ask {
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vw, 30px);
  padding: clamp(12px, 2vh, 26px) clamp(14px, 2vw, 28px);
  border-radius: var(--sk-r-lg);
  background: linear-gradient(135deg, #FEF4DE 0%, #FDE9C6 100%);  /* 11.9:1 for the navy sum on the darker stop */
  overflow: hidden;
}
body.sfocus--exam .sfq__ask::before {
  /* The abacus in the corner, from the reference. A background rather than an
     element so it never takes a row in the grid and never pushes the sum. */
  content: "";
  position: absolute;
  left: clamp(10px, 2vw, 28px); top: 50%;
  width: clamp(72px, 9vw, 128px); height: clamp(60px, 7.5vw, 104px);
  transform: translateY(-50%);
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 128 104' fill='none'%3E%3Crect x='4' y='8' width='120' height='88' rx='10' fill='%23A8713C'/%3E%3Crect x='16' y='20' width='96' height='64' rx='6' fill='%23FFF6E6'/%3E%3Cg stroke='%23C9933F' stroke-width='3'%3E%3Cpath d='M20 32h88M20 52h88M20 72h88'/%3E%3C/g%3E%3Cg%3E%3Ccircle cx='34' cy='32' r='8' fill='%23E8272D'/%3E%3Ccircle cx='54' cy='32' r='8' fill='%23E8272D'/%3E%3Ccircle cx='74' cy='32' r='8' fill='%23E8272D'/%3E%3Ccircle cx='40' cy='52' r='8' fill='%23F7AE44'/%3E%3Ccircle cx='60' cy='52' r='8' fill='%23F7AE44'/%3E%3Ccircle cx='80' cy='52' r='8' fill='%23F7AE44'/%3E%3Ccircle cx='34' cy='72' r='8' fill='%233A7BD5'/%3E%3Ccircle cx='54' cy='72' r='8' fill='%233A7BD5'/%3E%3Ccircle cx='74' cy='72' r='8' fill='%233A7BD5'/%3E%3C/g%3E%3C/svg%3E")
    center / contain no-repeat;
}
@media (max-width: 760px) { .sfocus--exam .sfq__ask::before { display: none; } }

/* The sum itself. Clamped against vh as well as vw — �17's rule, and the
   reason a four-term question on a short laptop shrinks instead of pushing the
   options off the bottom. */
.sfq__sum {
  position: relative;
  margin: 0 0 0 clamp(0px, 8vw, 110px);
  text-align: center;
  color: #16294F;
}
.sfq__sumq {
  display: block;
  font: 700 clamp(20px, min(3.2vw, 4.4vh), 40px)/1.1 var(--display);
  letter-spacing: -.02em;
}
.sfq__sumn {
  display: block;
  margin-top: .12em;
  font: 700 clamp(22px, min(3.6vw, 5vh), 46px)/1.15 var(--display);
  letter-spacing: -.02em;
  white-space: nowrap;
}
.sfq__sumn b { font-weight: 700; }
.sfq__sumn i { font-style: normal; color: var(--sk-red); padding: 0 .18em; }
.sfq__sumn .sfq__sumx { color: #16294F; padding-left: .02em; }
@media (max-width: 760px) { .sfq__sum { margin-left: 0; } }


/* --- the question, as a column ---------------------------------------------
   12 October 2026 — Yogesh: "Question vertical dikhana h", and the same day,
   "sheet exam vala page full screen set kara".

   .sfq__sum above is the one-line form the 11 October reference drew and it is
   kept, because the flag that chooses between the two is one word in the Blade.
   What S4 renders now is the stacked column — the shape of the thing on the
   desk, and the order a child enters terms down the rods of an abacus.

   IT IS CLAMPED AGAINST vh HARDER THAN THE LINE WAS, and it has to be: a line
   grows sideways as terms are added and a column grows DOWNWARDS, which is the
   direction this screen has none to spare in. Four terms plus a rule plus the
   mark is six rows, so the type is clamped against 4.6vh rather than �17's 5vh
   and the gaps shrink with it. A five-term sheet still fits a 768px-high
   laptop; a six-term one would want the panel scrolling, which it can.
   ------------------------------------------------------------------------ */

/* The stack clears the abacus in the corner the same way the line did. */
body.sfocus--exam .sfq__stack {
  position: relative;
  display: grid; justify-items: center;
  margin-left: clamp(0px, 8vw, 110px);
  padding-top: clamp(17px, 3.2vh, 28px);
  min-width: 0;
}
@media (max-width: 760px) { body.sfocus--exam .sfq__stack { margin-left: 0; } }

/* The instruction stays, small, and is LIFTED OUT OF THE FLOW. In a written sum
   the rule ends where the digits end, and the rule is as wide as the stack — so
   while this line was in the stack it was the widest thing in it and the rule
   ran a centimetre past the last figure, which reads as a table border rather
   than as the line you add under. Absolute, the column sets the width and the
   rule lands where it belongs. */
body.sfocus--exam .sfq__what {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  margin: 0; white-space: nowrap;
  font: 500 clamp(11px, 1.5vh, 13.5px)/1.3 var(--text);
  color: #5A6B8C;                                  /* 5.1:1 on the cream panel */
  text-transform: none;
}

body.sfocus--exam .sfq__col {
  margin: 0;
  grid-template-columns: auto auto;
  gap: clamp(1px, .5vh, 6px) clamp(10px, 1.6vw, 20px);
  justify-content: center;
}
/* The operator, in the red the one-line form used for the same marks. */
body.sfocus--exam .sfq__col b {
  font: 700 clamp(17px, min(2.4vw, 3.4vh), 32px)/1.15 var(--display);
  color: var(--sk-red);
}
body.sfocus--exam .sfq__col i {
  font: 700 clamp(22px, min(3.2vw, 4.6vh), 44px)/1.15 var(--display);
  letter-spacing: -.02em;
  color: #16294F;                                  /* 11.9:1 on the darker stop */
  min-width: 2.4ch;
}

/* NO MINIMUM ON THE RULE, 17 October 2026 — Yogesh: "ye question mark proper
   nahi aa raha h".

   It had one — clamp(90px, 14vw, 180px) — and on a laptop 14vw is about 190px,
   which is wider than a column of two-digit terms. The rule is width:100% of
   the stack's grid column, so a minimum on the RULE widens that column: the
   terms stay centred in it and the question mark, which is justify-self:end,
   lands a centimetre to the right of the last digit with the rule running on
   past both. The mark has to sit under the units, because that is the one
   place an answer goes in a written sum.

   So the column sets the width and nothing else does. A sheet of single-digit
   terms still gets a rule about 100px wide, because .sfq__col i carries a
   2.4ch minimum of its own and that is the right place for one: it widens the
   figures and the mark together. */
body.sfocus--exam .sfq__rule {
  width: 100%; min-width: 0;
  margin: clamp(4px, .9vh, 10px) 0 clamp(3px, .7vh, 8px);
  border-top-width: clamp(3px, .5vh, 5px);
  border-color: #16294F;
}

/* Right-aligned with the figures, where the answer to a written sum goes: the
   same 2.4ch box and the same right edge as the units column above it. */
body.sfocus--exam .sfq__qm {
  justify-self: end;
  min-width: 2.4ch;
  text-align: right;
  font: 700 clamp(22px, min(3.2vw, 4.6vh), 44px)/1.1 var(--display);
  color: #16294F;
}

/* THE SUM IS NOT TEXT TO DRAG ACROSS. site.css paints a selection yellow, so a
   child who tapped and dragged on the question — one slip away from a tap on a
   touchpad — got a yellow block sitting over the question mark and nothing to
   tell them how to be rid of it. There is nothing on this panel worth copying
   out of a sheet anyway. */
body.sfocus--exam .sfq__ask { user-select: none; -webkit-user-select: none; }

/* --- the four options ------------------------------------------------------
   Two by two, each on its own tint with a lettered disc — the reference, and
   the same four letters the markup already had. The letter is not decoration:
   "I picked C" is how a child asks a teacher about a question out loud.

   THE COLOUR IS THE OPTION'S ADDRESS, NOT ITS STATE. A, B, C and D are blue,
   pink, green and violet on every question of every sheet, so a child learns
   where the discs are. Right and wrong are painted over the top in �17's own
   .sopt--ok / .sopt--no, which carry a tick and a cross as well, because colour
   on its own cannot say which is which when four of them are already coloured. */
body.sfocus--exam .sopts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 1.2vh, 14px);
  margin: 0; padding: 0; border: 0;
}
@media (max-width: 520px) { .sfocus--exam .sopts { grid-template-columns: minmax(0, 1fr); } }

body.sfocus--exam .sopt {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.4vw, 16px);
  min-height: clamp(52px, 8vh, 74px);
  padding: 0 clamp(12px, 1.4vw, 18px);
  border-radius: var(--sk-r-md);
  background: var(--so-pale, #F4F7FC);
  color: var(--ink);
  cursor: pointer;
  transition: transform .13s ease-out, box-shadow .13s ease-out;
}
body.sfocus--exam .sopt:hover { transform: translateY(-2px); box-shadow: var(--sk-lift); }
body.sfocus--exam .sopt__k {
  flex: 0 0 auto;
  width: clamp(32px, 3.4vw, 42px); height: clamp(32px, 3.4vw, 42px);
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--so-ink, var(--sk-blue));
  color: #FFFFFF;                      /* 4.5:1 or better on all four below */
  font: 700 clamp(14px, 1.4vw, 18px)/1 var(--display);
}
body.sfocus--exam .sopt__v {
  font: 700 clamp(18px, min(2.2vw, 3vh), 28px)/1.1 var(--display);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* The four addresses. Each pale stop carries the ink beside it and the white
   letter on the disc. */
body.sfocus--exam .sopt:nth-of-type(1) { --so-pale: #E4F0FD; --so-ink: #2F6BD0; }
body.sfocus--exam .sopt:nth-of-type(2) { --so-pale: #FDE7EE; --so-ink: #D62B63; }
body.sfocus--exam .sopt:nth-of-type(3) { --so-pale: #E6F4DC; --so-ink: #4C9220; }
body.sfocus--exam .sopt:nth-of-type(4) { --so-pale: #EEE9FD; --so-ink: #6D4AD8; }

/* Picked, before it is checked. A ring rather than a new colour, because the
   colour is the option's address and swapping it would move the furniture. */
body.sfocus--exam .sopt:has(> [data-pick]:checked) {
  box-shadow: inset 0 0 0 3px var(--so-ink, var(--sk-blue));
}
body.sfocus--exam .sopt:has(> [data-pick]:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

/* --- the controls --------------------------------------------------------- */
body.sfocus--exam .sfx__act {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: clamp(8px, 1.2vh, 14px) 0 0;
  border-top: 1px solid var(--line);
  background: none;
}
body.sfocus--exam .sfx__hint {
  margin: 0; margin-right: auto;
  font: 400 clamp(12px, 1.1vw, 13.5px)/1.4 var(--text);
  color: var(--muted);
}
body.sfocus--exam .sfx__skip {
  border: 0; background: none;
  color: var(--muted);
  font: 500 13px/1 var(--display);
  text-decoration: underline;
  cursor: pointer;
}
body.sfocus--exam .sfx__skip:hover { color: var(--ink); }
@media (max-width: 620px) { .sfocus--exam .sfx__hint { display: none; } }

/* --- the rail ------------------------------------------------------------- */
.srail, .stip {
  padding: clamp(12px, 1.6vh, 18px) clamp(12px, 1.2vw, 16px);
  border-radius: var(--sk-r-lg);
  background: var(--paper);
  box-shadow: var(--sk-lift);
}
.srail__sheet { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.srail__thumb {
  flex: 0 0 auto; width: 44px;
  padding: 5px;
  border-radius: 10px;
  background: var(--sk-blue-pale);
}
.srail__thumb .sartwork--thumb { width: 100%; height: auto; }
.srail__what { min-width: 0; display: grid; line-height: 1.3; }
.srail__what b { font: 600 14px/1.3 var(--display); color: var(--ink); }
.srail__what span { font: 400 12px/1.3 var(--text); color: var(--muted); }

.srail__prog {
  margin: 0 0 7px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  font: 500 13px/1.3 var(--display);
  color: var(--muted);
}
.srail__prog b { font: 600 14px/1.3 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.srail .pbar__track { height: 10px; background: #E7EDF8; }
.srail .pbar__fill { background: linear-gradient(90deg, #7FC141 0%, #4FA81F 100%); }

/* THE QUESTION GRID. It is [data-segs], the element panel.js has always
   painted, with a number written in it — see the note in the view. The four
   states are the script's four classes and nothing here invents a fifth. */
.sgrid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin-top: 14px;
}
.sgrid i {
  display: grid; place-items: center;
  min-height: 36px;
  border-radius: 9px;
  background: #F1F4FA;
  color: var(--muted);
  font: 600 13px/1 var(--display);
  font-style: normal;
  font-variant-numeric: tabular-nums;
}
.sgrid i.is-done  { background: var(--sk-amber-pale); color: var(--sk-amber-ink); }
.sgrid i.is-right { background: var(--sk-green-pale); color: var(--sk-green-ink); }
.sgrid i.is-wrong { background: var(--sk-red-pale);   color: var(--sk-red-ink); }
/* The one being looked at. A filled blue square, as the reference draws it,
   and it beats the other three because where you ARE matters more than where
   you have been. */
.sgrid i.is-at {
  background: var(--sk-blue);
  color: #FFFFFF;
  box-shadow: 0 6px 14px -8px rgba(47, 107, 208, .9);
}

.stip { background: linear-gradient(135deg, #FEF6E4 0%, #FDEDD0 100%); }
.stip__h {
  margin: 0 0 6px;
  display: flex; align-items: center; gap: 7px;
  font: 600 14px/1.3 var(--display);
  color: #8A4E06;                      /* 5.6:1 on the darker stop */
}
.stip__h .ico { color: var(--sk-amber); }
.stip p { margin: 0; font: 400 12.5px/1.55 var(--text); color: #46556F; }

/* --- the review step, on the light skin ----------------------------------- */
body.sfocus--exam .srev { color: var(--ink); }
body.sfocus--exam .srev__h { color: var(--ink); }
body.sfocus--exam .srev__p { color: var(--muted); }
body.sfocus--exam .srev__q {
  background: #F1F4FA;
  border: 0;
  color: var(--muted);
}
body.sfocus--exam .srev__q--blank { background: var(--sk-red-pale); color: var(--sk-red-ink); }
body.sfocus--exam .srev__foot { border-top: 1px solid var(--line); }
body.sfocus--exam .srev__count { color: var(--muted); }

/* The encouragement line is gone from this screen. It was a second voice on a
   page that now carries a tip, and two of those is one too many. It still runs
   on the drill, where there is no tip and no clock. */
body.sfocus--exam .scheer { display: none; }

/* --- the last few places �17's dark skin still showed through ------------- */

/* The page itself. .sfocus carries the navy in �17 and ties with a bare
   .sfocus--exam, so the body element settles it. */
body.sfocus--exam,
body.sfocus--exam #sfocus,
body.sfocus--exam .sfx__cols { background: none; }

/* The clock's digits were set white for the navy HUD. */
body.sfocus--exam .sfx__clock,
body.sfocus--exam .sfx__clock b,
body.sfocus--exam .sfx__clock .sr-only { color: var(--ink); }

/* The question is one column now — question on top, options under it, which is
   what the reference draws. �17 made it two because the old screen had the
   options beside the sum. */
body.sfocus--exam .sfq {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
}
body.sfocus--exam .sfq__side { min-width: 0; display: grid; gap: 10px; align-content: start; }

/* The "1 /20" chip on the question card. The header above it now says
   "Question 1 of 20" in full, and the same fact twice on one card is the
   thing that made the cream panel look busy at its top left. */
body.sfocus--exam .sfq__n,
body.sfocus--exam .sfq__kind { display: none; }

/* Waiting, and the verdict. Both were painted for navy. */
body.sfocus--exam .sfq__wait {
  margin: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border: 0; border-radius: var(--sk-r-md);
  background: #F4F7FC;
  color: var(--muted);
  font: 400 13px/1.45 var(--text);
}
body.sfocus--exam .sfq__wait .ico { color: var(--faint); }
body.sfocus--exam .sverdict {
  margin: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  border-radius: var(--sk-r-md);
  background: var(--sk-green-pale);
  color: var(--sk-green-ink);
}
body.sfocus--exam .sverdict.is-wrong { background: var(--sk-red-pale); color: var(--sk-red-ink); }
body.sfocus--exam .sverdict b { display: block; font: 600 14px/1.3 var(--display); }
body.sfocus--exam .sverdict span { font-size: 13px; }

/* The "want to know why" box under the question. */
body.sfocus--exam .ssol {
  padding: 11px 14px;
  border-radius: var(--sk-r-md);
  background: #F6F8FC;
  color: var(--muted);
}
body.sfocus--exam .ssol__h { margin: 0 0 4px; color: var(--ink); font: 600 13.5px/1.3 var(--display); display: flex; align-items: center; gap: 7px; }
body.sfocus--exam .ssol__h .ico { color: var(--sk-amber); }
body.sfocus--exam .sfq__doubt { color: var(--sk-blue-ink); }

/* --- the rail, settled ----------------------------------------------------
   It was a grid of auto rows, then a flex column, and in both the card holding
   the question grid was sized to something smaller than its own contents and
   the grid hung out of the bottom of it and over the tip below. Plain blocks in
   a scrolling block cannot be compressed by their parent, which is the whole of
   what was going wrong. There is no layout here that needs more than that. */
body.sfocus--exam .sfx__rail { display: block; }
body.sfocus--exam .sfx__rail > * { margin-bottom: clamp(8px, 1.2vh, 14px); }
body.sfocus--exam .sfx__rail > :last-child { margin-bottom: 0; }
body.sfocus--exam .srail, body.sfocus--exam .stip { height: auto; overflow: visible; }

/* The classroom. It went missing for a commit: the rule that stopped �17's navy
   showing through the inner boxes was written on the body as well, and took the
   gradient off with it. The inner boxes are the ones that must be transparent. */
body.sfocus--exam {
  background: linear-gradient(180deg, #DCEBFB 0%, #EFF6FD 46%, #F6FAFE 100%);
  background-attachment: fixed;
}
body.sfocus--exam #sfocus,
body.sfocus--exam .sfx,
body.sfocus--exam .sfx__cols,
body.sfocus--exam .sfocus__grid { background: none; }

/* THE QUESTION FILLS THE ROOM IT IS GIVEN. �17 centres the stage and starts the
   question card at its natural height, which was right when the sheet was a
   small card on a dark screen. On the reference it is a tall cream panel with
   the options under it, so the stage stretches and the panel grows into it —
   and because �17's type is clamped against vh, a four-term sum still shrinks
   rather than overflowing on a short window. */
body.sfocus--exam .sfx__stage {
  align-content: stretch;
  grid-template-rows: minmax(0, 1fr);
}
body.sfocus--exam .sfq { align-items: stretch; }
body.sfocus--exam .sfq__main { align-content: stretch; }

/* The control row had the dark shell's own card around it. */
body.sfocus--exam .sfx__act,
body.sfocus--exam .sfx__act::before { box-shadow: none; border-radius: 0; }

/* THE NO-SCROLL RULE STILL HAS TO FIND THE RIGHT ELEMENT. �17 pins it on
   `.sfocus > #sfocus`, and with the rail in place #sfocus is no longer a child
   of .sfocus — the grid holding the rail and the work is. Without this the page
   grew by the height of the preview banner and the whole sheet scrolled, which
   is the one thing the client asked this screen never to do. */
body.sfocus--exam > .sfocus__grid { min-height: 0; overflow: hidden; }

/* The rail is the height of the row it is in, not of the viewport: the preview
   banner sits above it and 100dvh ran Sign out off the bottom. */
body.sfocus--exam .smenu { height: 100%; }

/* The control row, with the dark shell's card taken off it properly. */
body.sfocus--exam .sfx__act {
  background: none;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  padding: clamp(8px, 1.2vh, 14px) 0 0;
  margin: 0;
}

/* --- a marked option ------------------------------------------------------
   Right, wrong and shown have to beat the option's address colour, and on the
   first build they only half did: a correct B kept its pink card and took a
   green disc — so the disc, which is the one part of an option that never
   changes, had turned the same green as C's disc two inches below it.

   SOLID, NOT PALE. 17 October 2026 — Yogesh: "jab answer wrong ho to correct
   answer ko green kar dijiye poora and wrong selected answer ko red kar
   dijiye."

   They were a wash of green or red with a 2px ring, and on this screen that
   was too quiet to do its job: the four cards are ALREADY coloured — blue,
   pink, green, violet, because the colour is the option's address — so a pale
   green over C's pale green said almost nothing, and the one card the child
   most needs to find on a wrong answer was the one hardest to pick out. Filled
   to the ink shade with white on top, there is no reading of the screen in
   which the green card is not the answer and the red one is not theirs.

   The tick and the cross stay, and matter more rather than less: filled, green
   and red are the only two things left on the card carrying the verdict, and
   colour alone may not carry it (�9, WCAG 1.4.1).

   The disc goes white with the card's own colour on it. It cannot keep its
   address colour here — a blue disc on a solid green card is the one
   combination that reads as a rendering fault — and a white disc is still a
   disc in the same place with the same letter in it. */
body.sfocus--exam .sopt.is-right,
body.sfocus--exam .sopt.is-shown {
  background: var(--sk-green-ink);          /* 6.4:1 for white */
  box-shadow: inset 0 0 0 2px var(--sk-green-ink);
}
body.sfocus--exam .sopt.is-wrong {
  background: var(--sk-red-ink);            /* 6.3:1 for white */
  box-shadow: inset 0 0 0 2px var(--sk-red-ink);
}
body.sfocus--exam .sopt.is-right,
body.sfocus--exam .sopt.is-shown,
body.sfocus--exam .sopt.is-wrong { color: #FFFFFF; }
body.sfocus--exam .sopt.is-right .sopt__v,
body.sfocus--exam .sopt.is-shown .sopt__v,
body.sfocus--exam .sopt.is-wrong .sopt__v { color: #FFFFFF; }

body.sfocus--exam .sopt.is-right .sopt__k,
body.sfocus--exam .sopt.is-shown .sopt__k {
  background: #FFFFFF;
  border-color: transparent;
  color: var(--sk-green-ink);
}
body.sfocus--exam .sopt.is-wrong .sopt__k {
  background: #FFFFFF;
  border-color: transparent;
  color: var(--sk-red-ink);
}

body.sfocus--exam .sopt__mark { margin-left: auto; }
body.sfocus--exam .sopt.is-right .sopt__mark--ok,
body.sfocus--exam .sopt.is-shown .sopt__mark--ok,
body.sfocus--exam .sopt.is-wrong .sopt__mark--no { color: #FFFFFF; }

/* A locked question does not take a hover lift: nothing about it can change. */
body.sfocus--exam .sopt.is-right:hover,
body.sfocus--exam .sopt.is-wrong:hover,
body.sfocus--exam .sopt.is-shown:hover { transform: none; }

/* ---------------------------------------------------------------------------
   18.8 THE RAIL'S ICONS — the client, 11 October 2026: "change side menu icons
   also", and both references they sent draw this rail with solid, coloured
   shapes rather than outlines.

   The drawings are in partials/student-ico and the note at the top of that file
   says why a second icon set is allowed on this one surface and nowhere else.
   What is here is only the colour.

   THE LIT VARIANTS. Each of the seven accents has a value tuned for type and a
   pale wash for a chip (�1), and neither works as a filled glyph on a navy
   rail: --sk-red at #E8272D lands at about 2.5:1 there, under the 3:1 a glyph
   needs. These are the same seven hues lifted until they clear it — every one
   is past 5:1 on #1D3666, so they hold at the top of the rail where it is
   darkest as well as at the bottom.
   ------------------------------------------------------------------------ */
[data-panel="student"] {
  --sk-red-lit:    #FF8A8E;   /* 5.5:1 on #1D3666 */
  --sk-amber-lit:  #FBC85B;   /* 8.0:1 */
  --sk-green-lit:  #A5D86B;   /* 7.7:1 */
  --sk-blue-lit:   #7FB0F0;   /* 5.6:1 */
  --sk-violet-lit: #B5A0F5;   /* 5.7:1 */
  --sk-teal-lit:   #5FD6C8;   /* 7.7:1 */
  --sk-pink-lit:   #FF8FC0;   /* 6.0:1 */
}

.sico { display: block; }
.smenu__ico { color: var(--sk-item-ico, var(--sk-blue-lit)); }
.smenu__ico .sico { width: 22px; height: 22px; }

/* The row you are on. The pill is already carrying the colour by then, so the
   icon goes white — which is also the one state where the icon sits on a solid
   fill rather than on the rail. */
.smenu__item[aria-current="page"] .smenu__ico { color: #FFFFFF; }

/* Sign out is not a destination and takes no hue: it is the one row in the rail
   that is deliberately quiet. */
.smenu__out .smenu__ico { color: #8FA3C4; }

/* The tab bar, below 1024px. Same drawings, and the one you are on takes the
   screen's own ink because that bar sits on white rather than on navy. */
.stabs__ico { color: var(--faint); }
.stabs a[aria-current="page"] .stabs__ico { color: var(--sk-item-ink, var(--sk-blue-ink)); }

/* The "want to know why" box, now the third card in the rail. It was in the
   question column until 11 October 2026, where checking a question made the
   cream panel shrink to make room for it — and the panel holding the sum is
   the one thing on this screen that must not move. */
body.sfocus--exam .sfx__rail .ssol {
  padding: clamp(12px, 1.6vh, 18px) clamp(12px, 1.2vw, 16px);
  border-radius: var(--sk-r-lg);
  background: var(--paper);
  box-shadow: var(--sk-lift);
}
body.sfocus--exam .sfx__rail .ssol p { margin: 0; font: 400 12.5px/1.55 var(--text); color: #46556F; }
body.sfocus--exam .sfx__rail .ssol .ssol__h {
  margin: 0 0 6px;
  display: flex; align-items: center; gap: 7px;
  font: 600 14px/1.3 var(--display);
  color: var(--ink);
}
body.sfocus--exam .sfx__rail .ssol .ssol__h .ico { color: var(--sk-amber); }
body.sfocus--exam .sfx__rail .sfq__doubt {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 10px;
  min-height: 36px; padding: 0 13px;
  border: 0; border-radius: 999px;
  background: var(--sk-blue-pale);
  color: var(--sk-blue-ink);
  font: 600 12.5px/1 var(--display);
  text-decoration: none;
}
body.sfocus--exam .sfx__rail .sfq__doubt:hover { background: #E1EBFB; color: var(--sk-blue-ink); }
body.sfocus--exam .sfx__rail .sfq__doubt:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* With "What is" gone the sum is the only line, so it may take the room the
   two of them shared. */
.sfq__sumn { font-size: clamp(26px, min(4.4vw, 6vh), 56px); }

/* ===========================================================================
   20. THE MATHS ADVENTURE CHALLENGE — S1, 12 October 2026

   The home screen asked to read like a game with a castle at the end of it
   rather than a report. What that changed, and what it did not:

     KEPT WHOLE      �18.1 the navy rail, �18.2 the welcome bar and �18.3 the
                     five tiles. The brief's block A is the welcome bar already
                     built from the client's own screenshot, and its block C is
                     the five tiles, down to the drawings and the routes. Both
                     would have come out the same from the brief in new class
                     names, so neither moved
     REPLACED        �18.4's "Let's Practice!" band and two of the three cards
                     in �18.5 — "Continue where you left off" and "Keep going"
                     — by the path, the progress strip, the daily goal and the
                     three reward cards below. �18.4 and those two rules are
                     DELETED rather than left unreachable: this file had 190
                     lines matching no markup for one commit in October and
                     that is the state the portal's own notes warn about. They
                     are in git at c8fa015 if the band is ever wanted back
     UNTOUCHED       �18.5's .sdrow, .sdbox and .sdach — the row and the card
                     shell are what the three new cards are built from, and the
                     medal panel is still partials/student-badges

   THE PATH IS A LAYOUT OVER A DRAWING, NOT A DRAWING. One SVG with the
   milestones baked in would line up at exactly one width. So the landscape is
   scenery behind, every signboard is an element laid out by CSS, and the road
   they stand on is a real <path> in that scenery — see §20.2. Below 900px the
   road straightens into a column and it is simply not what the eye follows any
   more; the order of the list is.

   THE GRADIENT RULE from �1 still binds every gradient here: two stops, paint
   only, and the lightest stop carries whatever sits on it. Each pair below has
   its measured figure written next to it.
   ======================================================================== */

/* 20.1 WAS THE PROGRESS STRIP — level, sheets solved, coins and streak in four
   tinted cells over a mastered-sections bar. Removed on 12 October 2026 on
   Yogesh's instruction, with the quests, the board and the state cards, in the
   same pass: the screen is the brief and nothing else now. Nothing it showed is
   lost — the purse in the welcome bar carries the points, the coins and the
   streak on every screen (�18.2), the level is the card beside it, and
   "N of M sections mastered" is the last line of the rewards card in �20.5.
   ------------------------------------------------------------------------ */

/* ---------------------------------------------------------------------------
   20.2 THE ADVENTURE MAP -- rebuilt from nothing, 17 October 2026

   WHAT WAS DELETED. Everything the old .sadv* block held: the flex ROW of
   boards, its zig-zag nth-child offsets, the board-shaped goal card beside
   that row and the walk that nudged a character inside its own card. None of
   it is restyled and none of it is kept -- the markup it dressed is gone too.

   THE ONE IDEA THIS REPLACES IT WITH: the drawn road is the layout.

   .amap__stage holds the scene drawing's own 1200/620 aspect ratio. So a
   percentage of the stage IS a point in the drawing, at every width, and a
   signboard can be planted at coordinates read straight off #amapTrail.
   Nothing measures anything. The character moves by asking that same <path>
   for getPointAtLength() and writing the answer back as a percentage, which is
   why it follows the road's bends instead of cutting across the valley.

   THE WOOD CAME BACK, AND IT IS NOT THE OLD WOOD. The sign, the posts and the
   coloured sign-heads went out with .sadv* and are here again, because they
   are what the client's picture draws -- but they are built on the idea above
   rather than on the row that idea replaced. The difference is the whole
   point: the old sign was a plank in a flex row that happened to sit over a
   painting, and this one is planted at a point on a road the character
   actually walks. Same joinery, different building.

   TWO THINGS ARE MADE OF ONE MATERIAL -- the title sign and the daily-goal
   board both take the same brown ramp, the same two-pixel grain and the same
   pair of ::before/::after posts. They read as one set of signage in a valley
   rather than as two separate ideas, and a change to the wood is two
   gradients rather than a search. There was a START post in this set until
   18 October 2026, when Yogesh asked for the road to carry the sheets and
   nothing else.

   SIZES ARE IN cqw, NOT px OR vw. The stage is a container, so 1cqw is 1% of
   the MAP's width rather than the window's -- which is the only unit that
   stays right when the sidebar appears at 1024px and takes 248px out of the
   page without the window changing at all. Every one is clamped, so the type
   has a floor before the layout switches to the column at 860px.
   ------------------------------------------------------------------------ */
.amap {
  /* The signboard's own measurements. --board is the width of a sign's face,
     --post how far it drops from the plate to the grass, and --base the tuft
     the post is planted in -- which is the only one of the three that touches
     the road, and so the only one the anchoring below cares about. */
  --board: clamp(74px, 10cqw, 128px);
  --post: clamp(26px, 4.4cqw, 60px);
  --base: clamp(15px, 2cqw, 26px);
  position: relative;
  border-radius: var(--sk-r-lg);
  background: #EAF6FD;
  box-shadow: var(--sk-lift);
  overflow: hidden;
  isolation: isolate;
}

/* --- the stage -----------------------------------------------------------
   THE ASPECT RATIO IS LOAD-BEARING. It is the drawing's, so the box and the
   picture inside it are the same shape, and `left: 64.17%` lands on the same
   blade of grass whatever the stage is scaled to. Change one and the
   signboards walk off the road.
   ---------------------------------------------------------------------- */
.amap__stage {
  container-type: inline-size;
  position: relative;
  aspect-ratio: 1200 / 620;
  width: 100%;
  overflow: hidden;
}
.amap__scene { position: absolute; inset: 0; z-index: 0; }
.amap__scene .sartwork--scene { display: block; width: 100%; height: 100%; }

/* --- the wooden sign -----------------------------------------------------
   "Solve worksheets to reach the Castle!" on a plank in the top left of the
   valley, which is where the client's picture plants it.

   IT IS CSS WOOD AND NOT A DRAWING, for one reason: the words have to wrap,
   and they have to keep their contrast on the grain at every width. Text baked
   into an SVG plank does neither -- it scales to illegible on a phone and
   cannot be read out at all.

   The grain is a two-pixel repeating gradient under a brown ramp, and the two
   posts are ::before / ::after at z-index -1 so they come out of the BACK of
   the plank rather than over its face. .amap__sign makes its own stacking
   context, so that -1 is behind the plank and still in front of the valley.
   ---------------------------------------------------------------------- */
.amap__sign {
  position: absolute;
  left: clamp(9px, 2.2cqw, 34px);
  top: clamp(7px, 1.8cqw, 28px);
  z-index: 3;
  width: clamp(144px, 25cqw, 330px);
  padding: clamp(7px, 1.2cqw, 17px) clamp(10px, 1.6cqw, 23px) clamp(9px, 1.4cqw, 19px);
  border-radius: clamp(5px, .7cqw, 10px);
  transform: rotate(-2.2deg);
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, .07) 0 2px, rgba(0, 0, 0, .06) 2px 4px),
    linear-gradient(180deg, #9A6128 0%, #80501C 100%);
  box-shadow:
    inset 0 0 0 clamp(2px, .35cqw, 5px) #6E4214,
    0 16px 28px -14px rgba(54, 30, 6, .8);
}
.amap__sign::before,
.amap__sign::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 72%;
  width: clamp(6px, .85cqw, 13px);
  height: clamp(22px, 4.6cqw, 62px);
  border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, #6E4214 0%, #A66F30 42%, #6E4214 100%);
}
.amap__sign::before { left: 17%; }
.amap__sign::after { right: 17%; }

.amap__eyebrow {
  margin: 0 0 2px;
  font: 800 clamp(7.5px, .7cqw, 10.5px)/1 var(--display);
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #FFDFA2;                        /* 4.9:1 on #80501C */
}
.amap__sign h2 {
  margin: 0;
  font: 800 clamp(12.5px, 1.68cqw, 25px)/1.16 var(--display);
  letter-spacing: -.012em;
  color: #FFFFFF;                        /* 7.6:1 on #80501C */
  text-shadow: 0 2px 0 rgba(72, 40, 8, .5);
}
/* The one word the picture paints gold. */
.amap__sign h2 span { color: #FFD24A; }  /* 5.6:1 on #80501C */

/* --- a checkpoint --------------------------------------------------------
   THE SIGNBOARD, as the client's picture draws it: a coloured head with the
   checkpoint's name on it, a white face under it carrying the section and its
   stars, a status plate hung beneath, and a post down to a tuft of grass.

   THE <li> IS A ZERO-SIZE ANCHOR at the road point and nothing else; the pin
   hangs off it so that the TUFT -- the only part of the sign that is on the
   ground -- centres on the road, and the board floats clear of the tarmac at
   whatever height it turns out to be. Anchoring the li itself would centre the
   whole sign on the road and bury the post in it.
   ---------------------------------------------------------------------- */
/* THE BOARDS SIT IN FRONT OF THE CASTLE, which is why this is 3 and the
   castle is 2. The last checkpoint stands at 79% of the valley and the castle
   at 91%, close enough that the keep clips the corner of that board -- and in
   the client's picture the pink board is the one in front. Things nearer the
   bottom of a valley are nearer the viewer. */
.amap__stops { position: absolute; inset: 0; z-index: 3; margin: 0; padding: 0; list-style: none; }
.amap__stop { position: absolute; left: var(--x); top: var(--y); width: 0; height: 0; }

.amap__pin {
  position: absolute;
  left: 50%;
  bottom: calc(var(--base) / -2);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;                /* board, plate, post, tuft */
  align-items: center;
  text-align: center;
  color: inherit;
}
a.amap__pin { transition: transform .18s; }
a.amap__pin:hover { transform: translateX(-50%) translateY(-4px); }
a.amap__pin:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 14px; }

.amap__board {
  position: relative;
  width: var(--board);
  border-radius: clamp(7px, .9cqw, 13px);
  background: #FFFFFF;
  box-shadow: 0 2px 3px rgba(16, 24, 40, .08), 0 16px 28px -15px rgba(16, 24, 40, .6);
}

/* THE HEAD. The hue is the board's PLACE on the road (--amap-h, set on the
   pin below) and the sheen over it is fixed, so every head is the same
   material in a different colour. White stays at or above 4.5:1 at the head's
   LIGHTEST point, which is the top of that sheen -- the five hues were picked
   to that floor rather than sampled off the picture, which is the one place
   this board does not copy it exactly. */
.amap__head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(3px, .38cqw, 6px);
  padding: clamp(3px, .5cqw, 8px) clamp(4px, .55cqw, 9px);
  border-radius: clamp(7px, .9cqw, 13px) clamp(7px, .9cqw, 13px) 0 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .12) 0%, rgba(0, 0, 0, .10) 100%),
    var(--amap-h, #46608F);
  font: 800 clamp(8.5px, .95cqw, 13px)/1.3 var(--display);
  color: #FFFFFF;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
}
.amap__op {
  display: grid;
  place-items: center;
  min-width: clamp(12px, 1.3cqw, 18px);
  height: clamp(12px, 1.3cqw, 18px);
  padding: 0 2px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .26);
  font: 800 clamp(7.5px, .82cqw, 11px)/1 var(--display);
}
.amap__op .ico { width: 74%; height: auto; }

.amap__card {
  display: grid;
  justify-items: center;
  padding: clamp(6px, .85cqw, 13px) clamp(4px, .55cqw, 9px) clamp(7px, .9cqw, 14px);
}
/* THE STARS ARE THE WHOLE FACE OF THE BOARD since the subject came off it
   on 18 October, so they are drawn at the size the reference draws them --
   three big stars a child can count across a room, not a caption. */
.amap__stars { display: flex; gap: clamp(2px, .3cqw, 4px); color: var(--sk-amber); }
.amap__stars .ico { width: clamp(13px, 1.55cqw, 22px); height: auto; opacity: .24; }
.amap__stars .ico.is-on { opacity: 1; fill: currentColor; }

/* The tick the picture stamps on a finished board, at its corner. */
.amap__tick {
  position: absolute;
  right: -5%;
  bottom: -9%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: clamp(14px, 1.8cqw, 25px);
  height: clamp(14px, 1.8cqw, 25px);
  border-radius: 50%;
  background: #2F7D16;
  box-shadow: 0 0 0 2.5px #FFFFFF, 0 5px 9px -4px rgba(16, 24, 40, .55);
  color: #FFFFFF;
}
.amap__tick .ico { width: 64%; height: 64%; }

/* THE STATUS PLATE, hung under the board. */
.amap__state {
  position: relative;
  z-index: 1;
  margin-top: clamp(3px, .4cqw, 6px);
  padding: clamp(2px, .28cqw, 4px) clamp(6px, .72cqw, 11px);
  border-radius: 999px;
  background: var(--amap-chip, #4A5565);
  box-shadow: 0 5px 10px -5px rgba(16, 24, 40, .7);
  font: 800 clamp(7.5px, .8cqw, 10.5px)/1.5 var(--display);
  letter-spacing: .02em;
  color: #FFFFFF;
  white-space: nowrap;
}

/* THE POST, and the tuft it is planted in. */
.amap__post {
  width: clamp(4px, .55cqw, 8px);
  height: var(--post);
  margin-top: -2px;
  border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, #6E4214 0%, #A66F30 42%, #6E4214 100%);
}
.amap__base {
  position: relative;
  width: var(--base);
  height: var(--base);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 32%, #96D463 0%, #5CA531 100%);
  box-shadow: 0 5px 9px -5px rgba(26, 52, 12, .85);
}

/* --- the five hues along the road ---------------------------------------
   Keyed off the SLOT and not off the window, so the board nearest the start
   is always the red one however far the window has slid. See the view.
   ---------------------------------------------------------------------- */
.amap__pin--c0 { --amap-h: #D6262C; }    /* 5.0:1 */
.amap__pin--c1 { --amap-h: #BB5604; }    /* 4.7:1 */
.amap__pin--c2 { --amap-h: #1B72C2; }    /* 5.0:1 */
.amap__pin--c3 { --amap-h: #7A47CE; }    /* 5.8:1 */
.amap__pin--c4 { --amap-h: #D62A7E; }    /* 4.7:1 */

/* --- the three states, drawn OVER the hue --------------------------------
   The picture keeps a board's colour whatever has happened to it and puts the
   state on top -- a tick, a ring, a grey. So the state is the plate, the ring
   and the saturation, and never the hue.

   Completed is green, the one you are on is the bright blue the brief asks
   for, and a section you have not reached is MUTED -- not padlocked. There is
   no rule on this platform that shuts a worksheet, so a padlock here would
   promise a restriction the child disproves in one tap. See the view.
   ---------------------------------------------------------------------- */
.amap__stop--done { --amap-chip: #2F7D16; }                 /* 5.3:1 */
.amap__stop--now { --amap-chip: #1B72C2; }                  /* 5.0:1 */
.amap__stop--now .amap__board {
  box-shadow: 0 0 0 clamp(2px, .28cqw, 4px) #46A0F5, 0 18px 30px -14px rgba(30, 79, 193, .7);
}
.amap__stop--soon { --amap-chip: #5A6472; }                 /* 6.0:1 */
.amap__stop--soon .amap__board { filter: saturate(.38); }
.amap__stop--soon .amap__card b { color: #44505F; }
.amap__stop--soon .amap__base { filter: saturate(.5); }

@media (prefers-reduced-motion: no-preference) {
  /* The one you are on breathes. Nothing else on the map moves at rest, so
     the pulse is unambiguous: it is the "you are here". */
  @keyframes amapNow {
    0%, 100% { box-shadow: 0 0 0 clamp(2px, .28cqw, 4px) #46A0F5, 0 18px 30px -14px rgba(30, 79, 193, .7); }
    50%      { box-shadow: 0 0 0 clamp(6px, .8cqw, 11px) rgba(70, 160, 245, .3), 0 18px 30px -14px rgba(30, 79, 193, .7); }
  }
  .amap__stop--now .amap__board { animation: amapNow 2.1s ease-in-out infinite; }
}

/* --- the castle --------------------------------------------------------- */
.amap__castle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 2;
  transform: translate(-50%, -100%);
  display: grid;
  justify-items: center;
}
.amap__keep { display: block; width: clamp(96px, 13.6cqw, 172px); }
.amap__keep .sartwork--castle { display: block; width: 100%; height: auto; }
.amap__castleCard {
  display: grid;
  justify-items: center;
  gap: 2px;
  margin-top: -6%;
  padding: clamp(4px, .55cqw, 8px) clamp(8px, .9cqw, 13px) clamp(5px, .6cqw, 9px);
  border-radius: clamp(9px, 1cqw, 14px);
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 10px 22px -12px rgba(16, 24, 40, .5);
  text-align: center;
}
.amap__castleCard b { font: 700 clamp(9.5px, 1.02cqw, 13px)/1.2 var(--display); color: var(--ink); }
/* The castle's own plate is the one that still carries an icon, and it is not
   hung on a post -- so it takes the plate's type and its own pale ground
   rather than the dark pill the signboards wear. */
.amap__castleCard .amap__state {
  margin-top: 0;
  background: var(--amap-chip, #EEF3FB);
  box-shadow: none;
  color: var(--amap-chipink, #46556F);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  text-transform: uppercase;
}
.amap__castleCard .amap__state .ico { width: clamp(9px, .9cqw, 12px); height: auto; }

/* The ribbon the client's picture flies over the gate. */
.amap__ribbon {
  position: relative;
  z-index: 1;
  margin-bottom: -4%;
  padding: clamp(3px, .42cqw, 6px) clamp(8px, 1cqw, 14px);
  border-radius: 4px;
  transform: rotate(-3deg);
  white-space: nowrap;
  background: linear-gradient(180deg, #F0453F 0%, #C01D23 100%);   /* 5.9:1 */
  box-shadow: 0 3px 10px -3px rgba(192, 29, 35, .6);
  font: 800 clamp(8px, .82cqw, 11px)/1 var(--display);
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #FFFFFF;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .25);
}

/* --- the castle, REACHED -------------------------------------------------
   The resting face of a finished level: halo up, gates standing open, card
   gone gold. Painted by the server on every visit from then on, needs no
   script and never replays. The fanfare is .is-opening and .amapwin below,
   and those run once. That split is the whole point -- a trophy on a shelf
   rather than a party that will not end.
   ---------------------------------------------------------------------- */
.amap__castle--won .amap__castleCard {
  background: linear-gradient(180deg, #FFFDF4 0%, #FFF3D9 100%);
  box-shadow: 0 0 0 2.5px rgba(247, 174, 68, .5), 0 14px 28px -12px rgba(185, 122, 16, .6);
}
.amap__castle--won .amap__castleCard b { color: #8A4F05; }   /* 6.2:1 */
.amap__state--won { --amap-chip: #E2F3D4; --amap-chipink: #35861A; }
.amap__castle--won .ac-glow { opacity: 1; }

/* THE GATES, OPEN -- the resting state, with no transition on it. The class is
   on the element before first paint, so a transition would swing the doors on
   every cold load, which is the replaying this split exists to prevent. The
   hinges are the jambs the leaves are drawn on (x=76 and x=124 in the castle's
   own 200x180 box); change one and the doors swing from mid-archway. */
.ac-door { transform-box: view-box; }
.ac-door--l { transform-origin: 76px 164px; }
.ac-door--r { transform-origin: 124px 164px; }
.amap__castle--won .ac-door { transform: scaleX(.12); }

@media (prefers-reduced-motion: no-preference) {
  /* `from` only, so each animation ends on the element's own computed style
     and hands it back to the rules above rather than pinning it with a
     fill-mode. The leaves are a tenth of a second apart -- two doors opening
     in lockstep read as one shutter. */
  @keyframes amapGate { from { transform: scaleX(1); } }
  @keyframes amapHalo { from { opacity: 0; } }
  @keyframes amapStar {
    0%   { transform: scale(1) rotate(0); }
    45%  { transform: scale(1.5) rotate(16deg); }
    100% { transform: scale(1) rotate(0); }
  }
  @keyframes amapGlowPulse { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }

  .amap__castle--won .ac-glow { animation: amapGlowPulse 3.4s ease-in-out infinite; }
  .amap__castle--won.is-opening .ac-door { animation: amapGate .95s cubic-bezier(.32, .9, .38, 1); }
  .amap__castle--won.is-opening .ac-door--r { animation-delay: .1s; }
  .amap__castle--won.is-opening .ac-glow { animation: amapHalo 1.1s ease-out, amapGlowPulse 3.4s 1.1s ease-in-out infinite; }
  /* THE ENTRANCE, LIT. The brief asks for the castle entrance to glow with
     warm golden light as the gates open, and the hall behind the leaves is
     already painted warm (ac-lit) -- what it needed was for that warmth to
     come OUT. A drop-shadow on the keep throws it onto the stone around the
     archway for the length of the swing and then lets go. */
  @keyframes amapKeepFlare {
    0%   { filter: drop-shadow(0 0 0 rgba(255, 205, 110, 0)); }
    45%  { filter: drop-shadow(0 6px 22px rgba(255, 199, 92, .95)); }
    100% { filter: drop-shadow(0 0 0 rgba(255, 205, 110, 0)); }
  }
  .amap__castle--won.is-opening .amap__keep { animation: amapKeepFlare 2.6s .25s ease-out; }
  .amap__castle--won.is-opening .ac-star {
    transform-box: fill-box; transform-origin: center;
    animation: amapStar 1.2s .35s ease-in-out;
  }
}

/* --- the traveller -------------------------------------------------------
   A SIBLING OF THE SIGNBOARDS, NOT A CHILD OF ONE. That is the difference
   between this and what was here before the 17 October rebuild: the old
   marker lived inside whichever card was current, so the furthest it could
   ever go was the edge of that card and back. This one is pinned to the
   stage's own coordinates, so the script can put it at ANY point on the road
   -- and the points it uses come out of #amapTrail itself, as percentages,
   which is why it bends where the road bends and needs nothing measured.

   THE FEET ARE THE ANCHOR. translate(-50%, -100%) puts the bottom centre of
   the drawing on the coordinate, so a point on the road is where the child is
   standing rather than where their waist is.
   ---------------------------------------------------------------------- */
.amap__kid {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 4;
  /* THE BRIEF'S "large cartoon child", at about a sixteenth of the valley's
     width -- big enough to be the thing the eye lands on, small enough that
     walking past a signboard does not hide it. */
  width: clamp(30px, 4.3cqw, 58px);
  /* THE FEET ARE THE ANCHOR: the bottom centre of the drawing goes on the
     coordinate, so a point on the road is where the child is STANDING.

     WHERE IT STANDS BESIDE THE SIGNPOST RATHER THAN UNDER IT is not done
     here. It was, briefly, as a -118% nudge of its own width, and that is
     wrong by construction: the road climbs, so the ground drops by a
     different amount over those hundred units at every gradient, and one
     percentage cannot be both. The offset is a point on #amapTrail instead
     -- see $stands in dashboard.blade.php and STANDOFF in student-play.js. */
  transform: translate(-50%, -100%);
  pointer-events: none;
}
.amap__kidArt { display: block; }

/* THE LADDER MARKER IS OFF EVERYWHERE BUT THE LADDER. It is a second copy of
   the traveller, drawn into the current row so a phone has a character without
   a stage to put one on -- see section 20.3. Hiding it here and switching it
   on in the one media query that needs it is one rule instead of the three
   it took to hide it across every desktop range. */
.amap__rowkid { display: none; }
/* --- THE TRAVELLER IS A WALKER WEARING THE CHILD'S OWN FACE -----------
   Two instructions meet in partials/student-traveller and both are kept:
   the face is the avatar they picked (Yogesh, 17 October) and the thing
   carrying it is a cartoon child with a backpack (the brief of 18 October,
   against the reference). So the disc is the HEAD of a drawn body rather
   than a pin with a tail under it.

   ONE BOX, TWO LAYERS. The SVG sets the height -- 92/64 of the width -- and
   the face is laid over the top of it at 58% of that width, which is the
   proportion the body is drawn to. Both are percentages of the same box, so
   the head cannot drift off the shoulders at any size.

   THE FEET ARE THE ANCHOR. The drawing puts the soles on y=90 of 92 and
   .amap__kid translates its own bottom onto the road, so a point on the
   path is where the child is STANDING rather than where their waist is.
   -------------------------------------------------------------------- */
.amap__kidArt { position: relative; }
.amap__kidBody { display: block; }
.amap__kidBody .sartwork--walker { display: block; width: 100%; height: auto; }
.amap__kidFace {
  position: absolute;
  left: 50%;
  top: 0;
  display: block;
  width: 52%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  overflow: hidden;
  background: #EAF2FB;
  /* A white rim and then the portal's blue, which is what keeps a dark
     avatar off a dark hillside -- and the blue is also the one thing that
     says "this is you" rather than "this is a child in the picture". */
  box-shadow: 0 0 0 2.5px #FFFFFF,
              0 0 0 4.5px var(--amap-pin, #1E4FC1),
              0 7px 13px -6px rgba(16, 24, 40, .6);
}
.amap__kidFace .savatar { display: block; width: 100%; height: 100%; object-fit: cover; }
/* At the gate the marker goes gold, because the blue one is "you are here on
   a worksheet" and arriving is not that. */
.amap__castle--won .amap__rowkid,
.amap[data-adv-complete] .amap__kid { --amap-pin: #E08A1E; }

@media (prefers-reduced-motion: no-preference) {
  /* At rest the child bobs. While travelling the bob comes OFF -- it animates
     transform, and transform is where the walk writes, so letting it run
     mid-route makes the character flicker home every half second. */
  @keyframes amapBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-13%); } }
  @keyframes amapRun {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50%      { transform: translateY(-18%) rotate(3deg); }
  }
  .amap__kidArt { animation: amapBob 2.3s ease-in-out infinite; }
  .amap__kid.is-running .amap__kidArt { animation: amapRun .36s ease-in-out infinite; }
}

/* --- what the character says -------------------------------------------- */
.amap__say {
  position: absolute;
  left: 50%;
  top: clamp(8px, 1.4cqw, 18px);
  z-index: 6;
  margin: 0;
  max-width: min(92%, 420px);
  padding: clamp(7px, .85cqw, 12px) clamp(12px, 1.5cqw, 20px);
  border-radius: 999px;
  transform: translate(-50%, -8px) scale(.9);
  opacity: 0;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 10px 26px -10px rgba(16, 24, 40, .55);
  font: 700 clamp(11.5px, 1.1cqw, 15px)/1.3 var(--display);
  color: var(--ink);
  text-align: center;
  pointer-events: none;
  transition: opacity .3s, transform .3s cubic-bezier(.3, 1.4, .5, 1);
}
.amap__say.is-on { opacity: 1; transform: translate(-50%, 0) scale(1); }
@media (prefers-reduced-motion: reduce) {
  .amap__say { transition: opacity .01ms; }
}

/* --- the board a sheet was just finished on ----------------------------- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes amapDone {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.12); }
    100% { transform: scale(1); }
  }
  @keyframes amapStamp {
    0%   { transform: scale(2.1) rotate(-22deg); opacity: 0; }
    55%  { transform: scale(.92) rotate(4deg); opacity: 1; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
  }
  @keyframes amapStarPop {
    0%   { transform: scale(.4) rotate(-18deg); opacity: .25; }
    60%  { transform: scale(1.3) rotate(6deg); opacity: 1; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
  }
  .amap__stop.is-justdone .amap__board { animation: amapDone .7s cubic-bezier(.3, 1.4, .5, 1); }
  .amap__stop.is-justdone .amap__tick { animation: amapStamp .6s .1s backwards; }
  .amap__stop.is-justdone .amap__stars .ico.is-on { animation: amapStarPop .5s backwards; }
  .amap__stop.is-justdone .amap__stars .ico:nth-child(1) { animation-delay: .20s; }
  .amap__stop.is-justdone .amap__stars .ico:nth-child(2) { animation-delay: .29s; }
  .amap__stop.is-justdone .amap__stars .ico:nth-child(3) { animation-delay: .38s; }
}


/* --- THE BOARD BEING WALKED TOWARDS -------------------------------------
   New 18 October 2026. The brief: "make Sheet 2 glow or highlight when the
   character approaches it."

   IT IS THE APPROACH AND NOT THE ARRIVAL, which is the whole reason it is a
   separate class from .is-justdone. The script adds .is-nearing just past
   halfway along the leg and takes it off on landing, so the glow is what
   draws the eye AHEAD of the character -- the arrival is the tick, the
   banner and the plate changing. A board that lit up on arrival would be
   saying the same thing those three already say, one beat late.

   THE RESTING LOOK IS UNTOUCHED. This is a ring and a lift laid over
   whatever hue the board already wears, so a muted "soon" board brightens
   towards its own colour rather than towards one borrowed for the occasion.
   ---------------------------------------------------------------------- */
.amap__stop.is-nearing .amap__board {
  filter: none;                          /* a 'soon' board comes out of its mute */
  box-shadow: 0 0 0 3px rgba(255, 211, 122, .95),
              0 0 26px 6px rgba(247, 174, 68, .55),
              0 14px 26px -12px rgba(16, 24, 40, .5);
}
.amap__stop.is-nearing .amap__state {
  background: #FFF3D4;
  color: #8A4F05;
}
.amap__castle.is-nearing .amap__castleCard {
  box-shadow: 0 0 0 3px rgba(255, 211, 122, .95),
              0 0 30px 8px rgba(247, 174, 68, .6);
}

@media (prefers-reduced-motion: no-preference) {
  /* A ring that simply appears is a focus style. A ring that breathes twice
     while the child covers the last third of the road is a destination. */
  @keyframes amapNearing {
    0%, 100% { box-shadow: 0 0 0 3px rgba(255, 211, 122, .95),
                           0 0 22px 4px rgba(247, 174, 68, .45),
                           0 14px 26px -12px rgba(16, 24, 40, .5); }
    50%      { box-shadow: 0 0 0 4px rgba(255, 224, 150, 1),
                           0 0 34px 10px rgba(247, 174, 68, .7),
                           0 14px 26px -12px rgba(16, 24, 40, .5); }
  }
  .amap__stop.is-nearing .amap__board { animation: amapNearing .9s ease-in-out infinite; }
}

/* THE SMALL BURST, thrown out of the board just finished. Fourteen pieces
   OUTWARD and gone in a second and a half, against the castle's thirty-four
   falling over the whole valley for five -- see the note on pop() in
   student-play.js for why the two must not look alike.

   The pieces are built by the script and removed with it, so a page that never
   finishes a sheet pays nothing for this. There is no reduced-motion branch
   because pop() does not build them at all under it. */
.amap__pop { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.amap__pop i {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 7px;
  height: 9px;
  border-radius: var(--r, 2px);
  background: var(--c, #F7AE44);
  opacity: 0;
  will-change: transform, opacity;
}
@media (prefers-reduced-motion: no-preference) {
  @keyframes amapPop {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(.35) rotate(0); }
    14%  { opacity: 1; }
    100% {
      opacity: 0;
      transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, -50px)))
                 scale(1) rotate(var(--spin, 180deg));
    }
  }
  .amap__pop i {
    animation: amapPop var(--dur, 1.1s) var(--delay, 0s) cubic-bezier(.2, .75, .35, 1) backwards;
  }
}

/* --- E. THE DAILY GOAL, a wooden board standing on the grass -------------
   The client's picture stands it on the right of the valley under the castle,
   framed in brown with a parchment face, and that is what this is -- the same
   wood as the title sign, so the two read as one set of joinery rather than
   two ideas.

   IT IS ANCHORED TO THE STAGE AND NOT TO THE ROAD. The ring is TODAY and the
   road is the LEVEL: a child who meets their goal has not moved a step along
   the path, and nothing here may suggest they have. So it takes right/bottom
   like a thing standing in the corner of a field, and no --x/--y at all.
   ---------------------------------------------------------------------- */
.amap__goal {
  position: absolute;
  right: clamp(7px, 1.6cqw, 26px);
  bottom: clamp(9px, 1.9cqw, 30px);
  /* 3, with the signboards, and so BEHIND the traveller at 4. The road does
     not pass this corner, so the two should never meet -- and if a shorter
     level ever puts a checkpoint down here, a child walking behind a board is
     a worse surprise than a board behind a child. */
  z-index: 3;
  width: clamp(126px, 20.5cqw, 262px);
  padding: clamp(7px, 1.05cqw, 15px) clamp(8px, 1.2cqw, 17px) clamp(8px, 1.25cqw, 18px);
  border-radius: clamp(6px, .8cqw, 11px);
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, .05) 0 3px, rgba(120, 80, 20, .045) 3px 6px),
    linear-gradient(180deg, #FDF3DD 0%, #F2E0BC 100%);
  box-shadow:
    inset 0 0 0 clamp(3px, .4cqw, 6px) #96682C,
    0 18px 30px -15px rgba(54, 30, 6, .85);
}
.amap__goal::before,
.amap__goal::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 86%;
  width: clamp(6px, .85cqw, 13px);
  height: clamp(16px, 3.4cqw, 46px);
  border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, #6E4214 0%, #A66F30 42%, #6E4214 100%);
}
.amap__goal::before { left: 18%; }
.amap__goal::after { right: 18%; }

.amap__goalH { display: flex; align-items: center; gap: clamp(5px, .68cqw, 10px); }
.amap__goalDisc { flex: 0 0 auto; width: clamp(17px, 2.1cqw, 30px); }
.amap__goalDisc .sartwork { display: block; width: 100%; height: auto; }
.amap__goalH h3 {
  margin: 0;
  font: 800 clamp(10.5px, 1.22cqw, 17px)/1.15 var(--display);
  color: #5A3708;                        /* 9.6:1 on the parchment */
}
.amap__goalSay {
  margin: clamp(3px, .42cqw, 7px) 0 0;
  font: 600 clamp(8.5px, .95cqw, 13px)/1.32 var(--text);
  color: #6B4411;                        /* 7.1:1 */
}
.amap__dots { display: flex; gap: clamp(3px, .42cqw, 7px); margin-top: clamp(5px, .68cqw, 10px); }
.amap__dots i {
  width: clamp(10px, 1.32cqw, 19px);
  height: clamp(10px, 1.32cqw, 19px);
  border-radius: 50%;
  background: #E4D8BE;
  box-shadow: inset 0 0 0 2px rgba(122, 74, 24, .32);
}
.amap__dots i.is-on {
  background: radial-gradient(circle at 50% 32%, #96D463 0%, #4F9C27 100%);
  box-shadow: inset 0 0 0 2px rgba(31, 92, 10, .4);
}
.amap__goalCount { margin: clamp(4px, .55cqw, 9px) 0 0; }
.amap__goalCount b { font: 800 clamp(9.5px, 1.08cqw, 15px)/1.2 var(--display); color: #5A3708; }

/* --- the one action, under the map ---------------------------------------
   Everything the picture draws is on the grass now, so what is left outside
   the stage is one strip: the prominent button the brief asks for, and the
   named overflow when a level is longer than the road.
   ---------------------------------------------------------------------- */
.amap__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px clamp(12px, 1.6vw, 22px);
  padding: clamp(11px, 1.3vw, 17px) clamp(14px, 1.8vw, 24px);
  background: linear-gradient(180deg, #FFFFFF 0%, #F5FAFE 100%);
  border-top: 1px solid #DCEAF5;
}

/* THE ONE PROMINENT ACTION. Coral, which is the brief's own pick for a primary
   button and is the single warmest thing on a strip that is otherwise white --
   it cannot be missed and it is not competing with anything. */
.amap__cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 46px;                      /* the brief's tap target, with room */
  padding: 0 clamp(15px, 1.5vw, 23px);
  border-radius: 999px;
  background: linear-gradient(180deg, #FF6B5E 0%, #E8272D 100%);
  box-shadow: 0 10px 20px -8px rgba(206, 32, 38, .62);
  font: 800 clamp(13px, 1.12vw, 16px)/1 var(--display);
  color: #FFFFFF;                        /* 4.8:1 on the darker stop */
  transition: transform .16s, box-shadow .16s;
}
.amap__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px -8px rgba(206, 32, 38, .72);
  color: #FFFFFF;
}
.amap__cta:active { transform: translateY(0); }
.amap__cta:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.amap__done {
  flex: 1 1 260px;
  display: flex;
  gap: 9px;
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}
.amap__done .ico { flex: 0 0 auto; margin-top: 2px; color: var(--sk-green-ink); }
.amap__done b { display: block; font: 600 13.5px/1.35 var(--display); color: var(--ink); }
.amap__done a { color: var(--sk-blue-ink); text-decoration: underline; }

.amap__more {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: 600 clamp(11px, .95vw, 13px)/1.3 var(--display);
  color: var(--sk-blue-ink);
}
.amap__more:hover { text-decoration: underline; }

/* ---------------------------------------------------------------------------
   20.3 THE MAP ON A NARROW PAGE

   THE ROAD BECOMES A LADDER. Below about 800px of MAP the signboards are under
   110px each and the topic names break into fragments, so the scene stops
   being the layout: it shrinks to a band across the top with the castle in it,
   and the checkpoints become a vertical list with a dotted spine. The order is
   the same because it was an <ol> all along.

   EVERYTHING THAT WAS ABSOLUTE SIMPLY FLOWS. The sign, the band, the ladder,
   the castle and the goal board are written in that order in the view for
   exactly this reason -- the narrow layout is the markup's own order with the
   positioning switched off, rather than a second layout built beside it.

   TWO RANGES, BECAUSE THE SIDEBAR IS NOT ALWAYS THERE. Under 1024px the menu
   is a drawer and the map gets the window; from 1024px up it is a 248px column
   that is always on screen, so the same 800px of map is about 1100px of
   window. Between 861 and 1023 there is no sidebar and the map still fits,
   which is why this is a pair of ranges and not one.
   ------------------------------------------------------------------------ */
@media (max-width: 860px), (min-width: 1024px) and (max-width: 1100px) {
  .amap__stage {
    aspect-ratio: auto;
    padding: 0 0 clamp(12px, 3vw, 20px);
    background: linear-gradient(180deg, #D8F0FD 0%, #EAF7E2 100%);
  }

  /* The sign stops being a plank in the sky and becomes the section's own
     heading plank above the band. The posts go with the sky they stood in. */
  .amap__sign {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    transform: none;
    border-radius: 0;
    padding: clamp(11px, 3vw, 17px) clamp(13px, 3.6vw, 20px);
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18);
  }
  .amap__sign::before,
  .amap__sign::after { display: none; }
  .amap__sign h2 { font-size: clamp(16px, 4.6vw, 23px); }
  .amap__eyebrow { font-size: clamp(9px, 2.4vw, 11px); }

  /* The scene keeps the castle end of the valley and crops the rest. */
  .amap__scene { position: relative; inset: auto; height: clamp(112px, 26vw, 176px); }
  .amap__scene .sartwork--scene {
    height: 100%;
    object-fit: cover;
    object-position: 76% 50%;
  }

  /* THE SPINE. One dotted line down the middle of the tufts, which is the
     winding road said in the one direction a phone has room for. */
  .amap__stops {
    position: relative;
    inset: auto;
    display: grid;
    gap: clamp(9px, 2vw, 14px);
    padding: clamp(12px, 3vw, 18px) clamp(12px, 3.4vw, 20px) 0;
  }
  .amap__stops::before {
    content: "";
    position: absolute;
    left: calc(clamp(12px, 3.4vw, 20px) + var(--base) / 2);
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 4px dotted rgba(201, 164, 114, .85);
    transform: translateX(-2px);
  }

  .amap { --base: clamp(42px, 10.5vw, 56px); }
  .amap__stop { position: relative; left: auto; top: auto; width: auto; height: auto; }

  /* The sign lies down: tuft on the left, board beside it, plate at the end.
     The post has nothing to span and goes. */
  .amap__pin {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    flex-direction: row;
    align-items: center;
    gap: clamp(9px, 2.4vw, 14px);
    text-align: left;
  }
  a.amap__pin:hover { transform: translateX(3px); }
  .amap__post { display: none; }
  .amap__base { order: 1; flex: 0 0 auto; z-index: 1; }
  .amap__board { order: 2; flex: 1 1 auto; width: auto; border-radius: 14px; }
  .amap__state { order: 3; flex: 0 0 auto; margin-top: 0; font-size: clamp(9px, 2.4vw, 10.5px); }

  .amap__head {
    justify-content: flex-start;
    padding: clamp(5px, 1.4vw, 7px) clamp(10px, 2.6vw, 14px);
    border-radius: 14px 14px 0 0;
    font-size: clamp(10.5px, 2.9vw, 12.5px);
  }
  .amap__op { min-width: 17px; height: 17px; font-size: 10.5px; }
  /* THE CARD IS THE STARS, lying down. It was a two-column grid of a name,
     a mode and the stars; the first two came off the board on 18 October and
     left the stars pinned to the right-hand column of an empty row. */
  .amap__card {
    justify-items: start;
    align-items: center;
    padding: clamp(7px, 1.9vw, 11px) clamp(10px, 2.6vw, 14px) clamp(8px, 2vw, 12px);
    text-align: left;
  }
  .amap__stars .ico { width: clamp(15px, 4vw, 19px); }
  .amap__tick { width: 22px; height: 22px; right: -7px; bottom: -8px; }

  /* The character rides the list instead of the road -- the full-size marker
     is a stage element and there is no stage any more. See the note in the
     view on why this one is in the markup rather than moved there by script. */
  .amap__kid { display: none; }
  .amap__rowkid {
    display: block;
    position: absolute;
    left: 50%;
    bottom: 100%;
    z-index: 3;
    width: clamp(30px, 8vw, 40px);
    margin-bottom: -5px;
    transform: translateX(-50%);
    pointer-events: none;
  }
  .amap__rowkid .amap__kidFace { box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 3.5px var(--amap-pin, #1E4FC1); }
  /* At the gate it stands IN the gateway rather than on the roof. */
  .amap__keep { position: relative; }
  .amap__rowkid--castle { bottom: 4%; margin-bottom: 0; width: clamp(24px, 6.5vw, 32px); }

  /* The castle becomes the last row of the ladder. */
  .amap__castle {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    grid-template-columns: auto 1fr;
    align-items: center;
    justify-items: start;
    gap: 0 clamp(10px, 2.6vw, 15px);
    margin: clamp(10px, 2.4vw, 16px) clamp(12px, 3.4vw, 20px) 0;
  }
  .amap__ribbon {
    grid-column: 2;
    margin: 0 0 5px;
    transform: none;
    font-size: clamp(9px, 2.4vw, 11px);
  }
  .amap__keep { grid-row: 1 / span 2; grid-column: 1; width: clamp(64px, 17vw, 88px); }
  .amap__castleCard {
    grid-column: 2;
    justify-items: start;
    margin: 0;
    padding: clamp(7px, 1.8vw, 10px) clamp(10px, 2.6vw, 14px);
    text-align: left;
  }
  .amap__castleCard b { font-size: clamp(12.5px, 3.4vw, 15px); }
  .amap__castleCard .amap__state { font-size: clamp(9px, 2.4vw, 10.5px); }

  /* The goal board comes down off the grass and stands at the foot of the
     ladder, full width, with its posts tucked away. */
  .amap__goal {
    position: relative;
    right: auto;
    bottom: auto;
    width: auto;
    margin: clamp(12px, 3vw, 18px) clamp(12px, 3.4vw, 20px) 0;
    padding: clamp(11px, 3vw, 16px) clamp(13px, 3.6vw, 18px);
    border-radius: 14px;
  }
  .amap__goal::before,
  .amap__goal::after { display: none; }
  .amap__goalH h3 { font-size: clamp(14.5px, 4vw, 17px); }
  .amap__goalDisc { width: clamp(24px, 6.4vw, 30px); }
  .amap__goalSay { font-size: clamp(12px, 3.3vw, 13.5px); }
  .amap__dots i { width: clamp(16px, 4.4vw, 20px); height: clamp(16px, 4.4vw, 20px); }
  .amap__goalCount b { font-size: clamp(13px, 3.6vw, 15px); }

  .amap__say { top: clamp(6px, 2vw, 12px); font-size: clamp(11.5px, 3vw, 14px); }
}

@media (max-width: 520px) {
  .amap__foot { gap: 10px 14px; }
  .amap__cta { width: 100%; justify-content: center; }
  .amap__more { margin-inline: auto; }
  /* A board, its plate and a tuft will not share 320px. The plate drops under
     the board and the row stops trying. */
  .amap__pin { flex-wrap: wrap; }
  .amap__state { order: 4; margin-left: calc(var(--base) + clamp(9px, 2.4vw, 14px)); }
}

/* ---------------------------------------------------------------------------
   20.4 THE CASTLE CELEBRATION -- the brief's final animation

   It covers the map and nothing else: .amap is position: relative and
   overflow: hidden, which is what keeps the backdrop and the confetti inside
   the section instead of over the page. That is where "no horizontal overflow
   on a phone" is actually won.
   ------------------------------------------------------------------------ */
.amapwin { position: absolute; inset: 0; z-index: 9; display: grid; place-items: center; padding: clamp(14px, 3vw, 28px); }

/* --- the fireworks canvas -----------------------------------------------
   New 18 October 2026. One transparent <canvas> laid over the whole section,
   built by student-play.js when the castle is reached and removed by it when
   the last spark dies. It is not in the markup: with scripting off there is
   no display to draw and so there is no element.

   THE FOUR THINGS THE BRIEF HOLDS IT TO, and where each one is kept:

     the background stays   nothing in this rule paints. The canvas is
                            cleared each frame rather than washed over, so
                            every pixel the script has not drawn is the
                            valley underneath, unchanged
     it does not block      pointer-events: none. The signboards, the goal
                            board and the champion panel's own buttons stay
                            live through the entire display
     it resizes with the    inset: 0 on a section that is position: relative,
     section                and the script re-measures its backing store on
                            every window resize
     the castle stays       z-index 10 puts it ABOVE .amapwin (9), so the
     visible                display is over the champion panel's backdrop
                            rather than under it -- and that backdrop was
                            opened up over the sky in the same pass, below

   ABOVE THE PANEL'S BACKDROP, BELOW THE PANEL'S WORDS. The one thing a
   canvas at z-index 10 cannot do is get behind the trophy card, so it does
   not need to: the launch field is built around the castle and the bursts
   sit in the sky above it, which is most of the way up the section, while
   the card is in the middle. The few sparks that cross it are additive light
   over a navy card, which reads as part of the party rather than as noise.
   ---------------------------------------------------------------------- */
.amapfx {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* `hidden` is an attribute and `display: grid` above would out-specify it. The
   panel is in the page on every finished level and on screen on almost none of
   them, so this line is doing more work than it looks. */
.amapwin[hidden] { display: none; }

/* THE BACKDROP IS A FLOOR, NOT A LID. Until 18 October 2026 this was an even
   radial wash at .5 to .86 -- which did the job a modal backdrop has to do
   and also put the castle, the valley and the fireworks behind a grey sheet.
   The brief of that day rules both of those out by name: "keep the castle
   visible", "do not use a full-screen opaque overlay that hides the adventure
   map".

   So it is a vertical ramp instead. It is barely there across the sky, where
   the display is and where the castle's towers are, and it deepens towards
   the grass, which is where the panel sits and where the contrast is actually
   needed -- the panel's own navy and its 30px shadow do the rest. The map is
   dimmed rather than covered, which is what a celebration over a picture
   wants anyway. */
.amapwin__sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 70% at 50% 100%, rgba(7, 13, 28, .5) 0%, rgba(7, 13, 28, 0) 100%),
    linear-gradient(180deg,
      rgba(11, 18, 35, .10) 0%,
      rgba(11, 18, 35, .30) 38%,
      rgba(11, 18, 35, .58) 72%,
      rgba(11, 18, 35, .72) 100%);
}
.amapwin__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  padding: clamp(14px, 2.2vw, 22px) clamp(16px, 2.6vw, 28px) clamp(16px, 2.4vw, 24px);
  border-radius: var(--sk-r-lg);
  /* THE NAVY IS NOT A MOOD. 'champion-cup' is drawn to be read on a dark panel
     -- pale rim, light stone plinth -- and its own note says so. On cream the
     plinth becomes a hole. */
  background: linear-gradient(180deg, #24375F 0%, #16233F 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 30px 60px -24px rgba(5, 10, 22, .9);
  text-align: center;
  color: #FFFFFF;
}
.amapwin__panel:focus-visible { outline: 3px solid #FFD37A; outline-offset: 3px; }
.amapwin__cup { display: block; margin: 0 auto 2px; width: clamp(72px, 8vw, 100px); }
.amapwin__cup .sartwork { width: 100%; height: auto; }
.amapwin__h {
  margin: 0;
  font: 800 clamp(19px, 2.1vw, 27px)/1.15 var(--display);
  letter-spacing: -.01em;
  color: #FFE08A;                        /* 11.4:1 on the panel */
}
.amapwin__p { margin: 7px 0 0; font: 700 clamp(13.5px, 1.25vw, 16px)/1.35 var(--display); color: #FFFFFF; }
.amapwin__sub { margin: 9px 0 0; font-size: clamp(11.5px, 1vw, 13px); line-height: 1.5; color: #BFCCE4; }
.amapwin__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-top: clamp(13px, 1.6vw, 18px); }
/* .btn--ghost is drawn for a light card and is all but invisible on the navy,
   so the one on this panel gets its own pale edge rather than a new variant
   that would have to be maintained for a single button. */
.amapwin__btns .btn--ghost { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .42); color: #FFFFFF; }
.amapwin__btns .btn--ghost:hover { background: rgba(255, 255, 255, .17); }

/* --- the confetti --------------------------------------------------------
   Thirty-four flat shapes built by the script and thrown away with the panel.
   No library: a confetti package is 10-14KB over the wire to do what one
   keyframe and a transform do here, and this portal ships no bundler at all.
   Each piece carries its own size, colour, fall, drift, spin, duration and
   delay as inline custom properties, so all of them share ONE declared
   animation and the compositor gets thirty-four transforms rather than
   thirty-four rules to parse.
   ---------------------------------------------------------------------- */
.amapwin__bits { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.amapwin__bit {
  position: absolute;
  top: -8%;
  left: var(--x);
  width: var(--w, 9px);
  height: var(--h, 13px);
  background: var(--c, #F7AE44);
  border-radius: var(--r, 2px);
  opacity: 0;
  will-change: transform, opacity;
}
@media (prefers-reduced-motion: no-preference) {
  @keyframes amapFall {
    0%   { opacity: 0; transform: translate3d(0, 0, 0) rotate(0); }
    8%   { opacity: 1; }
    85%  { opacity: 1; }
    100% { opacity: 0; transform: translate3d(var(--drift, 0px), var(--fall, 420px), 0) rotate(var(--spin, 540deg)); }
  }
  .amapwin__bit { animation: amapFall var(--dur, 2.6s) var(--delay, 0s) cubic-bezier(.25, .55, .45, 1) forwards; }

  /* The panel arrives rather than appearing -- a congratulation that is simply
     there on the next frame reads as an error dialog. */
  @keyframes amapWinIn {
    0%   { opacity: 0; transform: translateY(14px) scale(.88); }
    65%  { opacity: 1; transform: translateY(0) scale(1.03); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
  }
  @keyframes amapSkyIn { from { opacity: 0; } }
  .amapwin__panel { animation: amapWinIn .66s cubic-bezier(.3, 1.4, .5, 1) both; }
  .amapwin__sky { animation: amapSkyIn .4s ease-out both; }
}

/* UNDER REDUCED MOTION all of the above is simply absent: no confetti is built
   at all (the script tests the same query), the gates are open because that is
   their resting state, and the panel is there on the frame it is unhidden. The
   celebration becomes an arrival and a message, which is this portal's rule
   for reduced motion and is the right reading of "congratulations" anyway. */

@media (max-width: 560px) {
  .amapwin { padding: 12px; }
  .amapwin__panel { width: 100%; }
  .amapwin__cup { width: 64px; }
  .amapwin__btns { flex-direction: column; }
  .amapwin__btns .btn { width: 100%; }
}

/* ---------------------------------------------------------------------------
   20.5 YOUR REWARDS, and TODAY'S MISSION
   The third card in the row is .sdach, untouched from �18.5.
   ------------------------------------------------------------------------ */
.sdrew { --sd-disc-pale: #FDF0D8; --sd-disc-ink: #A05E00; }

/* FOUR ROWS, NOT THE REFERENCE'S FOUR COLUMNS. The chain-with-chevrons was
   built from the picture on 17 October and sent straight back — "hi design
   rahudya", keep this one. The two cards at the foot of this screen are the
   one part of S1 the client has asked to be left alone, so a future pass at
   the reference stops here. */
.sdrew__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; flex: 1 1 auto; }
.sdrew__list a {
  display: flex; align-items: center; gap: 11px;
  min-height: 52px;
  padding: 7px 11px;
  border-radius: var(--sk-r-md);
  background: #F6F8FC;
  color: var(--ink);
  text-decoration: none;
  transition: background .15s ease-out, transform .15s ease-out;
}
.sdrew__list a:hover { background: #EEF2FA; color: var(--ink); transform: translateX(2px); }
.sdrew__list a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
/* �7 allows emoji in the student portal's gamified content and nowhere else on
   the platform; in a tinted disc it reads as sticker art rather than as an
   interface icon, which is the line that rule draws. Every one of these four
   has shipped everywhere since 2018 — see the note in partials/student-badges
   for what happens when one has not. */
.sdrew__ico {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--sd-rew, #E4F0FD);
  font-size: 23px;
  line-height: 1;
}
.sdrew__ico--coins  { --sd-rew: #FDF0D8; }
.sdrew__ico--badges { --sd-rew: #FDE8F1; }
.sdrew__ico--games  { --sd-rew: #E6F5DC; }
.sdrew__ico--castle { --sd-rew: #EEE9FD; }
.sdrew__list a > span:nth-child(2) { min-width: 0; display: grid; line-height: 1.3; }
.sdrew__list b { font: 600 13.5px/1.3 var(--display); }
.sdrew__list small { font: 400 11.5px/1.4 var(--text); color: var(--muted); }
.sdrew__list .ico { flex: 0 0 auto; margin-left: auto; color: var(--faint); }

/* --- today's mission ---------------------------------------------------- */
.sdmiss { --sd-disc-pale: var(--sk-green-pale); --sd-disc-ink: var(--sk-green-ink); }

/* THE DRAWING IS THE BOTTOM THIRD AND THE TEXT CLEARS IT. Inherited verbatim
   from the card this replaces, because the mistake is worth not making twice:
   the first build ran the hill up 62% of the card at half opacity with the
   paragraph on top of it, and the dashed path went straight through the second
   line. So the hill is held to the bottom, the text is margin-bottom'ed off it,
   and the fade at its top edge is what joins the two. */
.sdmiss__art { position: absolute; inset: auto 0 0 0; height: 48%; z-index: 0; opacity: .6; }
.sdmiss__art .sartwork--band { width: 100%; height: 100%; border-radius: 0; }
.sdmiss__art::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 46%;
  background: linear-gradient(180deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%);
  z-index: 1;
}
.sdmiss__h,
.sdmiss__say,
.sdmiss__sub,
.sdmiss__go { position: relative; z-index: 2; }
.sdmiss__say {
  margin: 0 0 7px;
  max-width: 24ch;
  font: 700 clamp(15px, 1.4vw, 18px)/1.35 var(--display);
  color: var(--ink);
}
.sdmiss__sub {
  margin: 0 0 clamp(16px, 2vw, 26px);
  max-width: 28ch;
  font: 400 12.5px/1.55 var(--text);
  color: #2F4470;
}
.sdmiss__go { margin-top: auto; justify-self: start; align-self: start; }

/* ---------------------------------------------------------------------------
   20.6 THE ARTWORK SIZES THIS SECTION INTRODUCES
   ------------------------------------------------------------------------ */
.sartwork--castle,
.sartwork--hiker { display: block; width: 100%; height: auto; }

/* ---------------------------------------------------------------------------
   21. THE LEADERBOARD — S8, the client's mockup of 13 OCTOBER 2026
   ("WhatsApp Image 2026-10-13 at 8.54.03 AM.jpeg", 1536x1024), built on the
   17th. Yogesh: "i want exact same design like this image i provide".

   IT REPLACES THE CHAMPIONSHIP BLOCK written on 30 September, which was this
   screen designed against a LogiQids screenshot and a sentence. The drawing
   keeps that build's best idea — a left half that gives a child a reason to
   look at the right half — and changes what is in it: a navy panel with a cup
   and a countdown becomes a CREAM CARD WITH THE CHILD'S OWN FACE IN THE CUP.

   WHAT THE MOCKUP ACTUALLY ASKS FOR, part by part:

     the left card    a gold "Your Rank" ribbon, the cup with the chosen
                      character inside it, the child's name and level, two
                      rank tiles — class and overall, each a number over
                      "out of N" — and a yellow strip saying what per cent of
                      the country that is
     the right card   two big tabs (Class Rank, Overall Rank), a dropdown over
                      the table, and a five-column board: rank, name, sheets
                      solved, average accuracy, total points, with a medal on
                      the top three and a trophy at the end of every row
     the foot         two invitation cards, blue and amber, each one target

   WHERE THE COLOUR GOES. This screen's accent is amber (the menu chip, the
   route's $skin) and the mockup paints with four: gold on the cup and the
   ribbon, BLUE on the chosen tab and the class tile, VIOLET on the overall
   tile, amber on the strip and the second invitation. That is a deliberate
   exception to �1's one-accent rule and it is the same exception �20.3 takes
   for the milestones: where the client has drawn the thing, the drawing is
   the authority. Nothing here is told apart by colour alone — the tiles carry
   their own labels, the medals carry their numbers (�5).

   EVERY PAIR ON A GRADIENT IS MEASURED against its own lightest stop, per �1,
   and the figure is written beside it.
   ------------------------------------------------------------------------ */
.slb {
  display: grid; align-items: start;
  gap: clamp(14px, 1.8vw, 20px);
  grid-template-columns: minmax(0, 332px) minmax(0, 1fr);
}

/* --- the left card: YOUR RANK -------------------------------------------
   The one card on this surface that is not white. It is cream because the
   mockup draws it cream, and because the cup inside it is gold: gold on white
   is a yellow smudge, and the whole left half exists to make the cup look
   like something worth having. */
.slbme {
  position: relative; overflow: hidden;
  display: grid; justify-items: center; text-align: center;
  padding: clamp(16px, 2vw, 22px) clamp(14px, 1.8vw, 20px) clamp(18px, 2.2vw, 24px);
  border-radius: var(--sk-r-lg);
  background: linear-gradient(170deg, #FFF8EA 0%, #FFF0DB 100%);
  box-shadow: var(--sk-lift);
}

/* The ribbon. Notched at both ends with a clip-path rather than drawn, so it
   takes whatever width the card gives it and the notches stay the same size —
   a ribbon cut as an image is a ribbon that stretches. */
.slbme__ribbon {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; margin: 0;
  padding: 13px 26px;
  background: linear-gradient(135deg, #FFD766 0%, #F0A81C 100%);
  clip-path: polygon(0 0, 100% 0, calc(100% - 15px) 50%, 100% 100%, 0 100%, 15px 50%);
  font: 700 clamp(16px, 1.7vw, 19px)/1.2 var(--display);
  letter-spacing: -.01em;
  color: #4A2B00;                        /* 7.9:1 on #FFD766, the light stop */
}
.slbme__ribbon .ico { color: #7A4A00; }

/* The cup, and the face in its window. The drawing leaves the window empty
   (see 'rank-cup' in partials/student-art) and the <img> is placed over it in
   per cent of the drawing's own box, so the two move together at every width.

   THE FACE IS 35% AND NOT 38%, which is the window's own diameter: the white
   ring around the window is drawn ON the circle's edge, and a face at the
   full 38 covers the inner half of it and the cup loses its rim.

   IT IS A BOX WITH THE IMAGE INSIDE IT, not the image positioned directly.
   .savatar is `width: 100%; height: 100%` (�21b below) because every other
   place a character appears is a round chip that was already sized — hand the
   <img> this box and the child's face fills the whole card with the cup
   somewhere behind it. Found in a screenshot, like everything else on this
   surface that a green test suite could not see. */
.slbcup { position: relative; width: min(100%, 268px); margin-top: 6px; }
.slbcup__art { display: block; width: 100%; height: auto; }
.slbcup__face {
  position: absolute; left: 50%; top: 43.4%;
  transform: translate(-50%, -50%);
  display: block; width: 35%; aspect-ratio: 1;
  border-radius: 50%; overflow: hidden;
  background: #FFF1C9;
}

.slbme__name {
  margin: 2px 0 0;
  font: 700 clamp(20px, 2.1vw, 24px)/1.25 var(--display);
  letter-spacing: -.02em; color: #1B3160;
}
.slbme__level {
  margin: 1px 0 0;
  font: 500 clamp(13px, 1.3vw, 14.5px)/1.3 var(--text); color: #8A5A12;
}

/* The two ranks. One panel per period — the card and the board beside it
   answer to the same dropdown, and a card claiming second place next to a
   board set to the month is the oldest bug on this screen. */
.slbme__ranks { width: 100%; margin-top: 14px; }
.slbme__period {
  margin: 0 0 8px;
  font: 700 10.5px/1 var(--mark);
  letter-spacing: .14em; text-transform: uppercase; color: #A05E00;
}
.slbme__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.slbrank {
  position: relative;
  display: grid; justify-items: center; gap: 1px;
  padding: 13px 10px 14px;
  border-radius: var(--sk-r-md);
  background: var(--tint);
}
.slbrank--blue   { --tint: #E7F0FD; --tone: var(--sk-blue-ink); }
.slbrank--violet { --tint: #F2EDFD; --tone: var(--sk-violet-ink); }
.slbrank__l {
  margin: 0; font: 600 12.5px/1.3 var(--display); color: #1B3160;
}
.slbrank__ico { display: block; margin: 5px 0 1px; color: var(--tone); }
.slbrank b {
  font: 700 clamp(28px, 3.2vw, 36px)/1 var(--display);
  letter-spacing: -.03em; font-variant-numeric: tabular-nums;
  color: var(--tone);
}
.slbrank small { font: 500 12px/1.4 var(--text); color: var(--muted); }

/* The strip. Amber on cream needs its own, deeper plate or it is the same
   colour as the card it sits on. */
.slbme__top {
  display: flex; align-items: center; gap: 11px;
  width: 100%; margin: 14px 0 0;
  padding: 13px 15px;
  border-radius: var(--sk-r-md);
  background: #FFE9B8;
  text-align: left;
  font: 400 13px/1.45 var(--text); color: #5C4210;
}
.slbme__top .ico { flex: 0 0 auto; color: #E09400; fill: #F7C948; }
.slbme__top b { display: block; font: 700 14.5px/1.3 var(--display); color: #4A2B00; }

/* --- the right card: THE BOARD ------------------------------------------- */
.slbb { overflow: hidden; }

/* The two scopes, drawn as the mockup draws them: a pale bar with two big
   pills in it, the chosen one filled. They are the loudest control on the
   screen because they change WHICH BOARD you are reading; the dropdown below
   changes only the period, and is styled as the smaller question. */
.slbb__tabs {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  gap: 6px; margin: clamp(12px, 1.5vw, 16px); padding: 6px;
  background: #EDF3FC; border-radius: 14px;
}
.slbb__tabs button {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 14px;
  border: 0; border-radius: 10px; background: none; cursor: pointer;
  font: 600 clamp(14px, 1.5vw, 16.5px)/1.2 var(--display); color: #1B3160;
}
.slbb__tabs button .ico { flex: 0 0 auto; color: var(--muted); }
.slbb__tabs button:hover { background: rgba(255, 255, 255, .6); }
/* White on the LIGHTEST stop (#2D6BE0) is 4.8:1 — the same pair the sign-in
   button uses, and the reason the gradient is not --sk-blue: white on #3A7BD5
   is 3.6:1, which is a glyph's floor and not text's. */
.slbb__tabs button[aria-selected="true"] {
  background: linear-gradient(135deg, #2D6BE0 0%, #1E4FC1 100%);
  color: #FFFFFF;
  box-shadow: 0 6px 16px -8px rgba(30, 79, 193, .8);
}
.slbb__tabs button[aria-selected="true"] .ico { color: #FFFFFF; }
.slbb__tabs button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.slbb__tabs button[disabled] { cursor: default; }
/* The demo tab in the "no centre" card below the board: one tab, not a
   control — it is showing the client what we propose, not offering a choice. */
.slbb__tabs--demo { margin: 0; max-width: 340px; }

.slbb__bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  padding: 2px clamp(14px, 1.8vw, 20px) 0;
}
.slbb__caption {
  flex: 1 1 220px; min-width: 0; margin: 0;
  font: 500 13px/1.45 var(--text); color: var(--muted);
}
/* .sgpick takes itself out of the flow and into the corner of its card from
   861px up (S7, �23). Here it belongs in the row, so that is undone.

   THE SELECTOR IS TWO CLASSES ON PURPOSE. �23 is LATER in this file, so a
   single-class .slbb__pick loses to .sgpick's own media rule on source order
   and the dropdown lands on top of the Overall Rank tab — which is exactly
   what it did, and which no test could have seen. */
/* RELATIVE, not static: the chevron inside it is absolutely positioned against
   it, so taking the positioning off entirely sends the arrow to the nearest
   positioned ancestor — which put a loose chevron halfway down the board. */
.slbb__bar .sgpick { position: relative; margin: 0; justify-self: auto; }
.slbb__bar .sgpick select { box-shadow: 0 0 0 1px var(--line); }

.slbb__panel { padding: 10px clamp(10px, 1.4vw, 16px) 0; overflow-x: auto; }

/* --- the table ----------------------------------------------------------
   .sgtable is S7's and carries the grammar: the cell padding, the hairlines
   and the turn into one block per row below 720px. What is added here is what
   this board genuinely draws — the medals, the faces, the metals and the
   trophy at the end of the row. */
.slbt { min-width: 560px; }
.slbt thead th { font-weight: 600; color: var(--muted); white-space: nowrap; }
.slbt thead th:nth-child(n+3) { text-align: center; }
.slbt tbody td:nth-child(n+3) { text-align: center; font-variant-numeric: tabular-nums; }
.slbt tbody td:first-child { width: 54px; }
.slbt tbody tr td:first-child { border-radius: 10px 0 0 10px; }
.slbt tbody tr td:last-child { border-radius: 0 10px 10px 0; }

.slbt__n {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px;
  font: 600 14px/1 var(--display); font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.slbt__medal {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  font: 700 13px/1 var(--display); font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 5px -2px rgba(16, 24, 40, .4);
}

.slbt__who { display: flex; align-items: center; gap: 11px; min-width: 0; }
/* A sized round box with the character inside it — see .slbcup__face above on
   why the <img> is never given the box's job. */
.slbt__face {
  width: 38px; height: 38px; flex: 0 0 auto;
  border-radius: 50%; overflow: hidden;
  background: var(--sk-blue-pale);
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ring, #E3E9F4);
}
.slbt__who b { display: block; font: 600 14.5px/1.3 var(--display); color: var(--ink); }
.slbt__who small { display: block; font: 400 12px/1.4 var(--text); color: var(--muted); }
.slbt__you { font-weight: 600; color: var(--sk-blue-ink); }
.slbt__pts { font: 700 15px/1.3 var(--display); color: var(--ink); }

/* The trophy the mockup puts at the end of every row. Gold on the top three
   and a pale grey on the rest, which is the one thing on this table that IS
   told apart by colour alone — so it is decoration and nothing else: the rank
   is in the first cell, in a number, on every row. */
.slbt__cup { width: 42px; text-align: center; color: #DCE3F0; }
.slbt tbody tr[data-place] .slbt__cup { color: var(--metal); }

/* --- the three metals, and you ------------------------------------------- */
.slbt tbody tr[data-place="1"] { background: #FFF8E7; --metal: #D9960B; --ring: #E8B33A; }
.slbt tbody tr[data-place="2"] { background: #F4F6FB; --metal: #8D9BB3; --ring: #B9C4D6; }
.slbt tbody tr[data-place="3"] { background: #FDF3EA; --metal: #B9703A; --ring: #D1945C; }

.slbt tbody tr[data-place="1"] .slbt__medal {
  background: linear-gradient(135deg, #F7C948 0%, #D98E04 100%); color: #4A2B00;
}
.slbt tbody tr[data-place="2"] .slbt__medal {
  background: linear-gradient(135deg, #E3E8F0 0%, #A9B5C9 100%); color: #2B3A52;
}
.slbt tbody tr[data-place="3"] .slbt__medal {
  background: linear-gradient(135deg, #E8A96A 0%, #B9703A 100%); color: #4A2309;
}

/* Being you is not a rank. Blue, and deliberately not one of the metals: if
   "you" were painted in gold as well, a child at seventeenth would see their
   own row in the colour of first place. It is written last so that it wins on
   a child who is also in the top three — on their own board they are looking
   for themselves first, and the medal disc still says which place it was. */
.slbt tbody tr[data-me] { background: var(--sk-blue-pale); --ring: var(--sk-blue); }
.slbt tbody tr[data-me] td { font-weight: 600; }
.slbt tbody tr[data-me] .slbt__n { color: var(--sk-blue-ink); }

/* The hole in the overall board, where the students between the top of the
   list and the child would be. A row that says so, rather than a jump from 9
   to 17 that a child has to work out.

   A RULE BEHIND A LABEL, drawn with a ::before and a plate on the text rather
   than with a striped background: the stripes have to be told where the words
   end, and they are a different length in every language and at every width.
   TWO CLASSES in the selector for the same reason .slbb__bar .sgpick has two
   — .sgtable sets `text-align: left` on every cell from a LATER section of
   this file, so a single-class rule here loses and the label sits at the left
   end of its own divider. */
.slbt .slbt__gap td {
  position: relative;
  padding: 10px 12px; text-align: center;
}
.slbt .slbt__gap td::before {
  content: ""; position: absolute; left: 12px; right: 12px; top: 50%;
  height: 1px; background: var(--line);
}
.slbt .slbt__gap span {
  position: relative; padding: 0 12px;
  background: var(--paper);
  font: 500 12px/1.4 var(--text); color: var(--faint);
}

.slbb__foot {
  display: flex; align-items: flex-start; gap: 9px;
  margin: 0; padding: 14px clamp(14px, 1.8vw, 20px) clamp(14px, 1.8vw, 20px);
  font: 400 12.5px/1.6 var(--text); color: var(--muted);
}
.slbb__foot .ico { flex: 0 0 auto; margin-top: 2px; color: var(--sk-amber-ink); }
.slbb__foot b { color: var(--ink); font-weight: 600; }
.slbb__foot b[data-countdown] { font-variant-numeric: tabular-nums; color: var(--sk-amber-ink); }

/* --- the two invitations -------------------------------------------------- */
.slbsay {
  display: grid; gap: clamp(12px, 1.6vw, 18px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}
.slbsay__c {
  display: flex; align-items: center; gap: clamp(12px, 1.5vw, 16px);
  padding: clamp(14px, 1.7vw, 18px) clamp(14px, 1.8vw, 20px);
  border-radius: var(--sk-r-lg);
  background: var(--tint);
  box-shadow: var(--sk-lift);
  text-decoration: none;
}
.slbsay__c--blue  { --tint: #E9F1FD; --go: linear-gradient(135deg, #7E5BE8 0%, #5B3DBB 100%); }
.slbsay__c--amber { --tint: #FFF2DC; --go: linear-gradient(135deg, #EE9A22 0%, #C97606 100%); }
.slbsay__c:hover { box-shadow: var(--sk-lift-up); }
.slbsay__c:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.slbsay__c .sartwork--medal { width: clamp(44px, 5vw, 54px); flex: 0 0 auto; display: block; }
.slbsay__t { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.slbsay__t b {
  font: 700 clamp(14.5px, 1.5vw, 16.5px)/1.3 var(--display);
  letter-spacing: -.01em; color: #1B3160;
}
.slbsay__t span { font: 400 13px/1.45 var(--text); color: #3C5075; }
/* The round button the mockup ends each card with. It is a <span>, not a
   button: the whole card is the link, and a button inside a link is two
   targets where a child sees one. The arrow is a GLYPH, so its floor is 3:1 —
   white is 4.9:1 on #7E5BE8 and 3.2:1 on #EE9A22, both measured on the
   lighter stop. */
.slbsay__go {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--go);
  color: #FFFFFF;
  box-shadow: 0 6px 14px -8px rgba(16, 24, 40, .9);
}

/* THE TWO COLUMNS STACK AT 1365 AND NOT AT 1023, which is where every other
   two-column block on this surface stacks, and the figure is measured rather
   than chosen: the six-column board needs 655px, and beside a 332px card it
   only gets that from 1366 up. At 1280 — an ordinary laptop — the card is
   603px and the board scrolls sideways inside it with Total Points off the
   edge. A table is allowed to scroll in its own card (�23) but the column a
   leaderboard is ABOUT is not the one to hide, so the board takes the full
   width instead and Your Rank becomes a band above it. */
@media (max-width: 1365px) {
  .slb { grid-template-columns: minmax(0, 1fr); }

  /* The band. The cup moves left and everything that was under it lines up
     beside it — the same card, laid along its other axis, rather than a
     column of air either side of a 332px card on a 944px page. */
  .slbme {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: start; text-align: left;
    column-gap: clamp(16px, 2.6vw, 30px);
    padding-bottom: clamp(16px, 2vw, 22px);
  }
  .slbme__ribbon { grid-column: 1 / -1; justify-content: flex-start; padding-left: 34px; }
  .slbcup { grid-column: 1; grid-row: 2 / span 6; align-self: center; width: clamp(150px, 20vw, 210px); }
  .slbme__name,
  .slbme__level,
  .slbme__ranks,
  .slbme__top { grid-column: 2; }
  .slbme__name { align-self: end; margin-top: 10px; }
  .slbme__ranks { margin-top: 12px; }
  .slbme__pair { max-width: 520px; }
  .slbme__top { max-width: 520px; }
}
@media (max-width: 620px) {
  /* Narrow enough that the band is two cramped columns again. */
  .slbme { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .slbme__ribbon { justify-content: center; padding-left: 26px; }
  .slbcup { grid-column: 1; grid-row: auto; width: min(100%, 240px); }
  .slbme__name, .slbme__level, .slbme__ranks, .slbme__top { grid-column: 1; }
}

/* --- narrower ------------------------------------------------------------- */
@media (max-width: 720px) {
  /* .sgtable turns every row into one block below this width, which is what
     stops a five-column board scrolling sideways on a phone. The parts of it
     that are only true as a TABLE are undone here.

     THE .splay PREFIX IS DOING REAL WORK, not tidying: .sgtable's own mobile
     block is LATER in this file and its selectors are already two deep
     (.sgtable tbody tr), so a rule of the same weight here loses to it and the
     trophy cell stays on a 390px screen with nothing to label it. */
  .slbt { min-width: 0; }
  .slbb__panel { overflow-x: visible; }
  .splay .slbt tbody td:nth-child(n+3) { text-align: left; }
  .splay .slbt tbody td.slbt__cup { display: none; }
  .splay .slbt tbody tr { padding: 12px 10px; border-radius: 12px; }
  .splay .slbt tbody tr + tr { margin-top: 6px; }
  /* The divider goes with the table: below this width a row is a block, and a
     rule drawn across one is a line through a card. */
  .splay .slbt tbody tr.slbt__gap { display: block; padding: 8px 2px; }
  .slbt .slbt__gap td { text-align: left; padding: 6px 0; }
  .slbt .slbt__gap td::before { content: none; }
  .slbt .slbt__gap span { padding: 0; background: none; }
}
@media (max-width: 440px) {
  .slbb__tabs { grid-auto-flow: row; }
  .slbme__pair { grid-template-columns: 1fr; }
  .slbsay__c { gap: 12px; }
}

/* ---------------------------------------------------------------------------
   22. THE CLASSROOM — S3, the client's mockup of 13 OCTOBER 2026
   ("WhatsApp Image 2026-10-13 at 8.33.01 AM.jpeg", 1600x900), built on the
   16th. It replaces the block written on the 12th, which was this screen
   designed from a DESCRIPTION of this drawing.

   WHAT THE DRAWING CHANGES, now that it is here rather than described.

   1. IT IS A ROOM, NOT A HEADER. The old block painted a tinted band at the
      top of a white page. The drawing paints a classroom — window and plants
      left, a framed picture with a trophy shelf right, a wooden desk under
      everything — and stands the title, the four worksheets AND the row of
      three on it. So .sroom is one scene with all of them inside, and the page
      white starts again below it, where the level map begins.

      The scene is a gradient plus THREE CUTS OF THE CLIENT'S FILE
      (practice-room-left, -right, -floor in public/assets/img — CREDITS.txt
      has the pixel geometry). Each cut is masked to fade out on its inner
      edge, because a photograph butted against a gradient shows the join as a
      hard vertical line and no amount of colour-matching hides it at every
      width. The masks are two gradients composited with intersect, which is
      the one way to fade two edges of one box.

      THE CUTS CARRY NO UI. The drawing's home button and avatar chip are in
      the corners of those same crops and both were cropped OUT: this portal
      already has a Home row in its rail and the child's avatar in its header,
      and a picture of a button is the worst kind of button.

   2. THE CARD IS A PICTURE WITH A PLATE ON IT. Not a drawing floating on a
      tint with four lines under it. The picture is the top 62% of the card and
      the plate sits over its foot, so the abacus runs behind the plate exactly
      as drawn. Three lines on the plate: the topic, the mode in the card's own
      colour, and the round arrow. Nothing else.

      THE COUNT MOVED TO THE PICTURE. "6 sheets" is a pill in the top corner.
      It is the one thing on the card the drawing does not have, and the only
      one a child would miss — a worksheet with nothing left in it has to be
      able to say so.

   3. THE COLOUR COMES OUT OF THE DRAWING, which is why the tones below are
      not the �18 tile pairs. Each card's tint is sampled from the bottom edge
      of its own crop so the picture and the card it sits in are the same
      colour at the seam; the plate is that tint at about 8%; the arrow is the
      accent the drawing paints its own arrow in. Two of those accents needed
      deepening to be legible — the mockup's orange is 2.3:1 on white and its
      arrow fills are 2.3-2.4:1 against the white chevron. Every pair below is
      measured in the comment beside it.

      THE GREEN CARD IS VIOLET. The drawing's fourth card is a green panel with
      a violet � on it, a violet mode line and a violet arrow, and that is
      kept: the tint is the picture and the accent is the operator.

   4. ONE ACCENT PER SCREEN STILL DOES NOT APPLY HERE, for the reason it did
      not apply to the old block: six colours on a shelf of worksheets are a
      KEY, not decoration. A child finds the orals card by its blue before they
      find it by reading, and the colour is fixed per sheet type so it is in
      the same place every visit.
   ------------------------------------------------------------------------ */

/* --- the room ----------------------------------------------------------- */
.sroom {
  position: relative;
  margin-bottom: clamp(16px, 2vw, 24px);
  padding: clamp(14px, 1.8vw, 24px) clamp(12px, 1.6vw, 22px) clamp(16px, 2vw, 26px);
  border-radius: var(--sk-r-lg);
  overflow: hidden;
  /* The wall and the desk, sampled down the client's own file: sky at the top
     where the title goes, the wall desaturating behind the cards, the desk
     from about two thirds down where the row of three stands. */
  background: linear-gradient(180deg,
    #49A3E8 0%, #6DBAF0 12%, #93CDF3 24%,
    #AFD6F0 46%, #CFDFE2 60%, #F3E1BA 72%, #FAE0A6 86%, #F7CB84 100%);
}

/* The three cuts and the sparkles. They are the only direct <span> children of
   .sroom, which is what separates them from the content in the two rules
   below — and all four are aria-hidden in the markup. */
.sroom > span {
  position: absolute; z-index: 0; pointer-events: none;
}
.sroom > header,
.sroom > div { position: relative; z-index: 1; }

.sroom__left {
  left: 0; top: 0;
  width: min(30%, 340px); aspect-ratio: 335 / 206;
  background: url("img/practice-room-left.jpg") center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, #000 46%, transparent 100%),
                      linear-gradient(180deg, #000 58%, transparent 100%);
          mask-image: linear-gradient(90deg, #000 46%, transparent 100%),
                      linear-gradient(180deg, #000 58%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
}
.sroom__right {
  right: 0; top: 0;
  width: min(34%, 430px); aspect-ratio: 415 / 100;
  background: url("img/practice-room-right.jpg") center / cover no-repeat;
  -webkit-mask-image: linear-gradient(270deg, #000 52%, transparent 100%),
                      linear-gradient(180deg, #000 62%, transparent 100%);
          mask-image: linear-gradient(270deg, #000 52%, transparent 100%),
                      linear-gradient(180deg, #000 62%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
}
.sroom__floor {
  left: 0; right: 0; bottom: 0; height: clamp(44px, 6vw, 76px);
  background: url("img/practice-room-wood.jpg") center bottom / 100% 100% no-repeat;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 72%);
          mask-image: linear-gradient(180deg, transparent 0, #000 72%);
}
/* The sparkles the drawing scatters round the title. CSS rather than a cut,
   because they have to survive whatever height the room is given. */
.sroom__sky {
  inset: 0;
  background-image:
    radial-gradient(5px 5px at 36% 6%, rgba(255,255,255,.95), transparent),
    radial-gradient(4px 4px at 64% 4%, rgba(255,255,255,.85), transparent),
    radial-gradient(3px 3px at 44% 17%, rgba(255,255,255,.8), transparent),
    radial-gradient(4px 4px at 58% 19%, rgba(255,255,255,.75), transparent);
}

/* --- the title on its cloud --------------------------------------------- */
.sprac { position: relative; text-align: center; padding: clamp(4px, .8vw, 12px) 0 clamp(12px, 1.8vw, 20px); }

.sprac__h { margin: 0; }
/* The cloud. A pill with two white bumps over it — the drawing's cloud is a
   blob and a pill is the nearest honest thing CSS draws, so the bumps do the
   rest. They are white on white where they overlap, so they only ever read as
   the lumps standing out of the top. */
.sprac__h > span {
  position: relative; display: inline-block;
  padding: clamp(9px, 1.2vw, 15px) clamp(24px, 3.2vw, 44px);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 14px 34px -20px rgba(16, 24, 40, .6);
  font: 800 clamp(26px, 3.6vw, 44px)/1.12 var(--display);
  letter-spacing: -.02em;
  color: #1A4FA3;                      /* "Let's" — 7.8:1 on white */
}
.sprac__h > span::before,
.sprac__h > span::after {
  content: ""; position: absolute; z-index: -1;
  border-radius: 50%; background: var(--paper);
}
.sprac__h > span::before { width: 30%; aspect-ratio: 1; left: 7%;  top: -30%; }
.sprac__h > span::after  { width: 24%; aspect-ratio: 1; right: 9%; top: -24%; }
/* The drawing's orange is #F7941E, which is 2.3:1 on white. This is the same
   hue carried to 3.2:1, which is the floor for display type. */
.sprac__h i { font-style: normal; color: #D97706; }

.sprac__sub {
  position: relative; display: block; width: fit-content;
  margin: -4px auto 0; padding: 8px 22px;
  border-radius: 999px;
  background: #FFD75E; color: #4A2B00;              /* 9.4:1 */
  box-shadow: 0 10px 22px -16px rgba(16, 24, 40, .7);
  font: 700 clamp(13px, 1.2vw, 16px)/1.4 var(--display);
}

/* Timed test or practice with no clock. It survives every redesign because it
   is not a filter — it changes which SCREEN a card opens, and only the test
   pays points. It sits under the instruction line so the one remaining choice
   is made before a worksheet is picked. */
.sprac__kind { display: grid; justify-items: center; gap: 8px; margin-top: clamp(12px, 1.6vw, 18px); }
.sprac__kind .ppick--mode {
  display: inline-flex; width: auto; grid-template-columns: none;
  background: rgba(255, 255, 255, .88); border-color: transparent;
  box-shadow: 0 10px 24px -18px rgba(16, 24, 40, .7);
}
.sprac__kindhint {
  margin: 0; max-width: 60ch;
  padding: 7px 16px; border-radius: 14px;
  background: rgba(255, 255, 255, .72);
  font: 400 12.5px/1.6 var(--text); color: #2B3C5E;  /* 8.9:1 on the wash */
}

/* --- the worksheets ----------------------------------------------------- */
.sworks {
  display: grid; gap: clamp(12px, 1.5vw, 20px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 228px), 1fr));
  margin-top: clamp(14px, 1.8vw, 22px);
}

.swork {
  position: relative;
  /* Two rows, and the plate takes what is left. The cards in a row are all as
     tall as the tallest, so a one-line title ("Multiplication") would leave
     its arrow floating above the arrows either side of it — and the drawing
     has all four arrows on one line. */
  display: grid; grid-template-rows: auto 1fr;
  border-radius: 26px;
  background: var(--w-tint, #EFF5FE);
  /* The white rim the drawing gives every card, and the drop under it. */
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .62), 0 16px 30px -18px rgba(16, 24, 40, .75);
  overflow: hidden;
  text-decoration: none; color: var(--ink);
  transition: transform .16s ease-out, box-shadow .16s ease-out;
}
.swork:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .8), 0 22px 36px -20px rgba(16, 24, 40, .8);
  color: var(--ink);
}
.swork:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* The picture. The aspect ratio is the crop's own, and it is held for the flat
   SVG cards as well — mixed heights here would stagger the plates across a row
   and the row would read as two rows. */
.swork__art {
  position: relative; display: grid; place-items: center;
  /* width:100% is load-bearing. A grid item with an aspect-ratio and width:auto
     does NOT stretch to its column — `normal` alignment falls back to `start`
     for anything with an intrinsic ratio — so the three crops that are not
     368px wide sized themselves off their own picture and overflowed the card
     by up to 15px, which overflow:hidden then trimmed off the right of the
     drawing. Equal columns, ragged pictures.

     min-width:0 on both boxes is the other half of it, and the half that
     actually bit: a grid item's automatic minimum size is its content's, and
     for an <img> that is its intrinsic width cut down by the height it has
     been given — 259px for a 350px crop in a 186px band. The picture then
     pushed the card's own column out past the card. A grid item that is meant
     to fit its track has to be told it may shrink. */
  width: 100%; min-width: 0; aspect-ratio: 368 / 278;
}
/* The crop is taken OUT OF THE FLOW so the band keeps the ratio set above. In
   flow it sets the band's height itself — three crops, three heights, and the
   plates below them no longer line up across the row. */
.swork__art img {
  position: absolute; inset: 0;
  display: block; width: 100%; min-width: 0; height: 100%; object-fit: cover;
}
.swork__art .sartwork--work { width: min(80%, 176px); height: auto; }

/* The count, on the picture — at the FOOT of it, not in a corner. Every one of
   the four drawings keeps its operator in the top corners (a plus and a minus,
   a thought cloud, a speech bubble, a violet �), so a pill up there lands on
   one of them in three cards out of four. Down here it sits on a shirt. */
.swork__n {
  position: absolute; left: 14px; bottom: 27px;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .94); color: var(--w-ink, var(--sk-blue-ink));
  font: 700 11.5px/1.25 var(--display);
  box-shadow: 0 8px 16px -12px rgba(16, 24, 40, .9);
}
.swork__n--ahead { color: #46556F; font-weight: 600; }

/* The operator, for a box the client has not drawn — the flat SVGs are the
   same picture for every topic in a mode, so without this a child cannot tell
   division from decimals. The drawn cards have the sign IN the drawing and
   never take this chip. */
.swork__op {
  position: absolute; top: 10px; left: 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  min-width: 44px; min-height: 34px;
  padding: 5px 11px; border-radius: 13px;
  background: var(--paper); color: var(--w-ink, var(--sk-blue-ink));
  font: 800 20px/1 var(--display);
  box-shadow: 0 8px 16px -12px rgba(16, 24, 40, .9);
}

/* The plate, over the foot of the picture. */
.swork__plate {
  position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  margin: -20px 9px 10px; padding: 13px 11px 15px;
  border-radius: 20px;
  background: var(--w-plate, #FFFFFF);
  box-shadow: 0 -6px 16px -12px rgba(16, 24, 40, .5);
}
.swork__plate b { font: 700 clamp(15px, 1.4vw, 18.5px)/1.22 var(--display); color: #122C69; }
.swork__plate em {
  font-style: normal; margin: 3px 0 11px;
  font: 700 clamp(12.5px, 1.15vw, 15px)/1.3 var(--display); color: var(--w-ink);
}

/* The round arrow under the two lines, with the plate showing through the ring
   round it — that halo is the drawing's, and it is what lifts the circle off a
   plate of nearly the same value. */
.swork__go {
  /* auto, not a fixed gap: the arrow is pinned to the foot of the plate so the
     row of four lines up whatever each title wraps to. The clearance above it
     is the mode line's own margin. */
  margin-top: auto;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--w-go, var(--w-ink)); color: #FFFFFF;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, .95), 0 10px 18px -10px rgba(16, 24, 40, .85);
  transition: transform .16s ease-out;
}
.swork:hover .swork__go { transform: scale(1.08); }

/* A sheet type with nothing left in it. It keeps its place in the grid rather
   than disappearing — a card that vanishes takes with it the fact that this
   kind of sheet exists at all — and it stops being a link. The picture stays
   in colour: this is a finished worksheet, not a forbidden one. */
.swork[aria-disabled="true"] { box-shadow: 0 0 0 4px rgba(255, 255, 255, .5), 0 10px 22px -18px rgba(16, 24, 40, .6); }
.swork[aria-disabled="true"]:hover { transform: none; }
.swork[aria-disabled="true"] .swork__art img { filter: saturate(.55); opacity: .72; }
.swork[aria-disabled="true"] .sartwork--work { filter: grayscale(1); opacity: .5; }
.swork[aria-disabled="true"] .swork__go { background: #AEB8C9; box-shadow: 0 0 0 5px rgba(255,255,255,.95); }

/* THE SIX TINTS. The first four are sampled from the client's own crops at the
   row where the picture meets the card, so there is no seam; violet and teal
   are the two the drawing has no card for and are the �18 tile pairs.
   Measured, each --w-ink on its own --w-plate:
     amber 4.9:1   pink 5.3:1   blue 6.7:1   green 7.2:1   violet 7.4:1   teal 6.6:1
   and each --w-go against the white chevron on it:
     amber 3.3:1   pink 3.7:1   blue 3.4:1   green 5.5:1   violet 5.7:1   teal 4.8:1 */
.swork[data-tone="amber"]  { --w-tint: #FAE481; --w-plate: #FFFAE7; --w-ink: #A05E00; --w-go: #D9730D; }
.swork[data-tone="pink"]   { --w-tint: #FEBBDC; --w-plate: #FEF1F5; --w-ink: #C2185B; --w-go: #E8458C; }
.swork[data-tone="blue"]   { --w-tint: #8FDDFC; --w-plate: #EAFBFF; --w-ink: #1E4FC1; --w-go: #0D8FF0; }
.swork[data-tone="green"]  { --w-tint: #DEFB9F; --w-plate: #F8FEEC; --w-ink: #5B3DBB; --w-go: #8C2EF4; }
.swork[data-tone="violet"] { --w-tint: #EEE9FD; --w-plate: #FBFAFF; --w-ink: #5B3DBB; --w-go: #7C3AED; }
.swork[data-tone="teal"]   { --w-tint: #DEF3F0; --w-plate: #F4FBFA; --w-ink: #0F766E; --w-go: #0E8077; }

/* A level that is not the child's own. No count, no arrow and no colour — a
   grey card says "not yours yet" without a sentence, and looking ahead is not
   practising. */
.swork--ahead { background: #EDF1F7; box-shadow: 0 0 0 4px rgba(255,255,255,.5), 0 10px 22px -18px rgba(16,24,40,.6); }
.swork--ahead:hover { transform: none; }
.swork--ahead .swork__art img,
.swork--ahead .sartwork--work { filter: grayscale(1); opacity: .55; }
.swork--ahead .swork__plate { background: rgba(255, 255, 255, .9); }
.swork--ahead .swork__plate em { color: #46556F; }

/* --- the row of three --------------------------------------------------- */
/* .sdrow and .sdbox in �18.5 are this row: the same reference drew the same
   row on the home screen and they are shared rather than copied. What changes
   on the scene is the paint — a white card on a classroom wall reads as a hole
   cut in it, and the drawing tints all three. */
/* The sentence inside "Keep going" is longer than the drawing's, because it
   carries the three earning figures the header pills used to. The middle
   column is widened for it rather than the sentence being cut. */
.sdrow--room { margin-top: clamp(16px, 2vw, 24px); grid-template-columns: 1fr 1.12fr 1.1fr; }
@media (max-width: 1100px) { .sdrow--room { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px)  { .sdrow--room { grid-template-columns: minmax(0, 1fr); } }
.sdrow--room .sdbox {
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .5), 0 18px 32px -22px rgba(16, 24, 40, .85);
}
/* A shade smaller than �18.5's, which was written for the home screen's wider
   row: "Continue where you left off" is the longest of the three titles and it
   is one line in the drawing. */
.sdrow--room .sdbox__h h3 { font: 700 clamp(14.5px, 1.2vw, 16.5px)/1.25 var(--display); color: #122C69; }
.sdbox--cream { background: #FFF7E8; --sd-disc-pale: #FDEBD2; --sd-disc-ink: #A05E00; }
.sdbox--sky   { background: #DCF0FD; --sd-disc-pale: #FFFFFF; --sd-disc-ink: #1E4FC1; }
/* The medals already sit on a pink gradient (�18.5). On the wall they get the
   drawing's tiles under them — a white rounded square per medal — which is the
   one thing that row is missing from the mockup. */
.sdrow--room .sdach__one {
  background: rgba(255, 255, 255, .68);
  border-radius: 18px; padding: 10px 6px;
}

/* --- continue where you left off ---------------------------------------- */
.spcont { --sd-disc-pale: #FDEBD2; --sd-disc-ink: #A05E00; }
/* THE WHOLE PANEL IS THE LINK, as the drawing has it. The button it replaces
   said "Carry on" under a row that already says what you are carrying on
   with. */
.spcont__in {
  display: flex; align-items: center; gap: 13px;
  flex: 1 1 auto; padding: 10px; border-radius: 18px;
  background: rgba(255, 255, 255, .8);
  text-decoration: none; color: var(--ink);
  transition: background .16s ease-out, transform .16s ease-out;
}
.spcont__in:hover { background: #FFFFFF; transform: translateY(-2px); color: var(--ink); }
.spcont__in:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.spcont__thumb {
  flex: 0 0 auto; width: 78px; height: auto;
  border-radius: 14px;
}
/* Both of these are <span>s — the panel is a link, so the markup carries no
   <div>s — and an inline box ignores height. The bar had none and vanished. */
.spcont__of { display: block; min-width: 0; flex: 1 1 auto; }
.spcont__of b { display: block; font: 700 14.5px/1.3 var(--display); color: #122C69; }
.spcont__of small { display: block; margin-top: 2px; font: 400 12px/1.4 var(--text); color: #5B6B86; }
.spcont__bar {
  display: block; position: relative;
  height: 11px; margin-top: 9px;
  border-radius: 999px; background: #EAE2D2; overflow: hidden;
}
.spcont__fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--sk-green); }
.spcont__go {
  flex: 0 0 auto; display: grid; place-items: center;
  width: 30px; height: 30px; color: #A05E00;
}

/* --- keep going --------------------------------------------------------- */
.spgo__in { display: flex; align-items: center; gap: clamp(12px, 1.4vw, 18px); flex: 1 1 auto; }
.spgo__say {
  margin: 0; flex: 1 1 auto;
  font: 400 12.5px/1.65 var(--text); color: #27405F;   /* 9.6:1 on the sky tint */
}
.spgo__say b { font-weight: 700; color: #122C69; }

/* The ring. A conic gradient, which is a PAINT and carries no text of its own —
   the percentage sits in the hole, on paper, where it is ink on white. The
   track is the drawing's blue and the arc is the portal's green, which is the
   colour every other progress bar on this surface fills in. */
.spgo__ring {
  position: relative; flex: 0 0 auto;
  width: clamp(86px, 8.6vw, 104px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(from -90deg, var(--sk-green) calc(var(--pct, 0) * 1%), #A8D8F7 0);
  box-shadow: 0 10px 22px -16px rgba(16, 24, 40, .9);
}
.spgo__ring::before {
  content: ""; position: absolute; inset: 13px;
  border-radius: 50%; background: var(--paper);
}
.spgo__pct {
  position: relative;
  font: 700 clamp(19px, 2vw, 24px)/1 var(--display); color: #122C69;
  font-variant-numeric: tabular-nums;
}

/* --- how each topic is going -------------------------------------------- */
/* The mastery ladders, in a card of their own below the room since 16 October
   2026. They are per TOPIC and the room is per WORKSHEET; four cards off two
   topics would have drawn the same ladder twice. */
.spgo__rungs {
  margin: 0; padding: 0; list-style: none;
  display: grid; gap: clamp(12px, 1.4vw, 18px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}
.spgo__rungs li { display: grid; gap: 5px; align-content: start; }
.spgo__rungs b { font: 600 13.5px/1.3 var(--display); color: var(--ink); }
.spgo__rungs span { font: 400 11.5px/1.35 var(--text); color: var(--muted); }
.spgo__pips { display: flex; gap: 4px; }
.spgo__pips i { width: 100%; height: 6px; border-radius: 999px; background: #E7ECF5; }
.spgo__pips i.is-on { background: var(--sk-green); }
.spgo__foot { margin: 16px 0 0; font: 400 12px/1.6 var(--text); color: var(--muted); }

@media (max-width: 680px) {
  /* The room keeps its scene on a phone — the cuts are sized in per cent, so
     the window and the shelf shrink with it rather than being cropped — but
     the ring drops under the sentence it belongs to. */
  .spgo__in { flex-direction: column; align-items: stretch; }
  .spgo__ring { margin-inline: auto; }
}
@media (max-width: 560px) {
  /* TWO ACROSS ON A PHONE, not one. These cards are picture-led and a column
     of full-width ones is three screens of scrolling to see four worksheets —
     the shelf stops being a shelf. The plate shrinks with them. */
  .sworks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .swork { border-radius: 20px; }
  .swork__plate { margin: -16px 7px 8px; padding: 10px 8px 12px; border-radius: 15px; }
  .swork__plate b { font-size: 14px; }
  .swork__plate em { font-size: 12px; margin-bottom: 9px; }
  .swork__go { width: 36px; height: 36px; }
  .swork__n { left: 9px; bottom: 23px; padding: 4px 9px; font-size: 10.5px; }
  .swork__op { left: 8px; top: 8px; min-width: 36px; min-height: 28px; padding: 4px 8px; font-size: 16px; }
}
@media (max-width: 420px) {
  .sprac__h > span { padding-inline: 18px; }
  .spcont__thumb { width: 64px; }
}

/* ==========================================================================
   �21 — the chosen avatar in the two headers
   The characters arrived on 13 October 2026 (config/avatars.php). Both chips
   were already round with overflow hidden, so the drawing only has to fill
   them; the gradient under .sdhi__me and the pale disc under .shead__face
   stay as the ground a slow image loads onto.
   ========================================================================== */
.savatar { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ===========================================================================
   23. THE PERFORMANCE SCREEN — S7, the client's reference of 13 OCTOBER 2026
   ("5. On clicking performance graph")

   WHAT THE REFERENCE ASKS FOR, and what is underneath each of its parts:

     a sky band        with a castle in it, the heading over the clear half and
                       the child in a white pill on the right. It is the same
                       keep the sign-in screen uses, redrawn as SVG so it takes
                       any width (partials/student-art, 'results-sky')
     four figures      today against yesterday, each in a pastel tile with a
                       drawn badge. The arrow is COUNTED from the two days, so a
                       day that went backwards says so
     today's sheets    the day's list with its stars — what the four figures
                       above are made of
     four chart cards  two across, each tinted in its own hue with a badge, a
                       heading, a sub-line and a period dropdown
     a wide time card  and a wooden signboard beside it

   THE ONE-ACCENT-PER-SCREEN RULE IS RELAXED HERE, as it was for the classroom
   in �22, and for the same reason: the client's own reference colours every
   card and every bar differently, and that IS the design being asked for. What
   is held to is the rule under the rule — the colour never carries meaning the
   reader has to decode. A card's hue is a label for the card, a bar's hue is
   the next one in that card's cycle, and nothing asks anybody to remember that
   violet means anything. The one place colour DOES mean something is the score
   bar in the day's table, where green is exactly "this sheet paid the accuracy
   bonus" — and that one carries the figure beside it in words as well.

   CONTRAST, measured on the pale tints these cards are painted in:
     ink     #101828 on every tint below          > 15:1
     muted   #5B6B8A on every tint below          > 4.9:1
     a bar   its own --sk-<hue> on its own pale    > 3:1 as a shape
   The pale tints here are a touch deeper than �1's --sk-*-pale, because a card
   that is 2 per cent tinted next to a white card reads as a rendering fault
   rather than as a choice.
   ------------------------------------------------------------------------ */

/* --- the band ------------------------------------------------------------
   S7 is the second screen to declare @section('ownhead') and carry its own
   top; S1's welcome bar was the first. The debt is the same and it is paid the
   same way: the burger, the purse, the bell and the avatar are all in here,
   because the shared header carries them on every other screen and they would
   otherwise be gone from this one. */
.sgh {
  position: relative;
  display: flex; align-items: center;
  gap: clamp(12px, 1.8vw, 22px);
  min-height: clamp(132px, 14vw, 168px);
  padding: clamp(16px, 2vw, 22px) clamp(16px, 2vw, 26px);
  border-radius: var(--sk-r-lg);
  overflow: hidden;
  background: #DCEEFC;          /* the ground the drawing lands on while it loads */
}
.sgh__art { position: absolute; inset: 0; pointer-events: none; }
.sgh__art .sartwork--sky { width: 100%; height: 100%; }

/* Everything below sits on the sky. */
.sgh > :not(.sgh__art) { position: relative; }

.sgh__burger {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  display: none; place-items: center;
  background: var(--paper);
  border: 0; border-radius: 12px;
  box-shadow: var(--sk-lift);
  color: var(--ink);
  cursor: pointer;
}
.sgh__burger:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 1023px) { .sgh__burger { display: grid; } }

.sgh__say { min-width: 0; flex: 1 1 auto; display: grid; gap: 10px; justify-items: start; }
/* The heading sits on the lightest part of the sky gradient (#EEF7FE at its
   palest, #CDE6FB at its deepest): navy #0D1A36 is 14.6:1 on the deeper stop,
   so it reads wherever the band crops to. */
.sgh__say h1 {
  margin: 0;
  font: 700 clamp(26px, 3.4vw, 40px)/1.08 var(--display);
  letter-spacing: -.025em;
  color: #0D1A36;
}
.sgh__say > p {
  margin: 0;
  max-width: 44ch;
  font: 500 clamp(13.5px, 1.3vw, 15.5px)/1.45 var(--text);
  color: #1F3A63;               /* 8.9:1 on the deeper stop */
}
/* The purse pills keep their own tints, and on a blue sky they need a white
   plate under them or the pale violet pill disappears into it. */
.sgh .spurse { margin-top: 2px; }
.sgh .spurse__pill { background: rgba(255,255,255,.92); box-shadow: 0 1px 2px rgba(16,24,40,.08); }
.sgh .spurse__pill--points { color: var(--sk-violet-ink); }
.sgh .spurse__pill--coins  { color: var(--sk-amber-ink); }
.sgh .spurse__pill--streak { color: var(--sk-red-ink); }

.sgh__bell {
  position: relative;
  flex: 0 0 auto;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: var(--muted);
  box-shadow: 0 1px 2px rgba(16,24,40,.08);
}
.sgh__bell:hover { color: var(--ink); }
.sgh__bell:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sgh__dot {
  position: absolute; top: 2px; right: 2px;
  min-width: 18px; height: 18px; padding: 0 5px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--sk-red); color: #FFFFFF;
  font: 700 11px/1 var(--display);
}

/* The child, in the white pill the reference draws top right. */
.sgh__me {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: var(--sk-lift);
  color: var(--ink);
  text-decoration: none;
}
.sgh__me:hover { box-shadow: var(--sk-lift-up); }
.sgh__me:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sgh__face {
  width: 48px; height: 48px; flex: 0 0 auto;
  border-radius: 999px; overflow: hidden;
  background: var(--sk-blue-pale);
}
.sgh__who { display: grid; gap: 1px; }
.sgh__who b { font: 600 16px/1.2 var(--display); color: var(--ink); }
.sgh__who span { font: 500 12.5px/1.2 var(--text); color: var(--muted); }
.sgh__me .ico { color: var(--muted); }

@media (max-width: 860px) {
  .sgh { flex-wrap: wrap; }
  .sgh__say { order: 3; width: 100%; }
}
@media (max-width: 560px) {
  .sgh { min-height: 0; padding: 12px 14px; gap: 10px; }
  .sgh__bell { display: none; }
  .sgh__who { display: none; }
  .sgh__me { padding: 6px; }
  .sgh__me .ico { display: none; }
  .sgh .spurse__pill { height: 34px; padding: 0 11px; font-size: 13.5px; }
}

/* --- the four figures ----------------------------------------------------
   Pastel tiles rather than the white .pcard, because the reference draws them
   that way and because four coloured tiles in a row at the top of a white page
   is the one place on this surface where tint is doing a job: it separates
   "what today was" from the five cards of history under it. */
.sgfig {
  display: grid; gap: clamp(10px, 1.4vw, 16px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 212px), 1fr));
}
.sgfig__t {
  position: relative;
  display: grid; gap: 4px; align-content: start;
  padding: clamp(14px, 1.6vw, 18px);
  padding-right: clamp(58px, 7vw, 74px);
  border-radius: var(--sk-r-md);
  background: var(--tint);
  box-shadow: var(--sk-lift);
}
.sgfig__t--green  { --tint: #EDF8E2; }
.sgfig__t--pink   { --tint: #FDEDF4; }
.sgfig__t--blue   { --tint: #E9F2FD; }
.sgfig__t--amber  { --tint: #FDF3E1; }

.sgfig__ico {
  position: absolute; top: clamp(12px, 1.4vw, 16px); right: clamp(12px, 1.4vw, 16px);
  width: clamp(40px, 4.4vw, 50px); display: block;
}
.sgfig__label { margin: 0; font: 600 13px/1.35 var(--display); color: var(--ink); }
.sgfig__n {
  margin: 2px 0 0;
  font: 700 clamp(28px, 3.2vw, 38px)/1 var(--display);
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.sgfig__d {
  margin: 2px 0 0;
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  font: 500 11.5px/1.4 var(--text); color: var(--muted);
}
.sgfig__d b { font: 700 12.5px/1.4 var(--display); color: var(--muted); }
.sgfig__d a { color: var(--sk-amber-ink); }
/* Up is green, down is red, and the arrow is TURNED rather than swapped for a
   second glyph: one icon that rotates cannot end up pointing up next to a
   figure that fell. */
.sgfig__d.is-up   b, .sgfig__d.is-up   .ico { color: #3E7714; }
.sgfig__d.is-down b, .sgfig__d.is-down .ico { color: var(--sk-red-ink); }
.sgfig__d.is-down .ico { transform: scaleY(-1); }

/* --- today's sheets ------------------------------------------------------ */
.sgday__head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: clamp(16px, 1.8vw, 22px) clamp(16px, 2vw, 24px) 0;
}
.sgday__ico { width: 40px; flex: 0 0 auto; display: block; }
.sgday__head h2 {
  margin: 0; flex: 1 1 auto;
  font: 600 clamp(17px, 1.7vw, 21px)/1.3 var(--display);
  letter-spacing: -.015em; color: var(--ink);
}
.sgday__head > p { margin: 0; font: 500 13px/1.4 var(--text); color: var(--muted); }

/* A table is allowed to scroll inside its own card. The page never does (�10). */
.sgday__scroll { padding: clamp(12px, 1.4vw, 16px) clamp(16px, 2vw, 24px) 0; overflow-x: auto; }

.sgtable { width: 100%; border-collapse: collapse; }
.sgtable th, .sgtable td { text-align: left; padding: 11px 12px; white-space: nowrap; }
.sgtable thead th {
  font: 600 12px/1.3 var(--display);
  text-transform: none; letter-spacing: .01em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.sgtable tbody td {
  font: 500 13.5px/1.4 var(--text); color: var(--ink);
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.sgtable tbody tr:last-child td { border-bottom: 0; }

/* The sheet's own chip. The hue is the row's position, nothing more. */
.sgn {
  display: inline-block; padding: 5px 12px;
  border-radius: 999px;
  font: 600 12.5px/1.2 var(--display);
  background: var(--sk-blue-pale); color: var(--sk-blue-ink);
}
.sgn--green  { background: var(--sk-green-pale);  color: var(--sk-green-ink); }
.sgn--blue   { background: var(--sk-blue-pale);   color: var(--sk-blue-ink); }
.sgn--pink   { background: var(--sk-pink-pale);   color: var(--sk-pink-ink); }
.sgn--amber  { background: var(--sk-amber-pale);  color: var(--sk-amber-ink); }
.sgn--violet { background: var(--sk-violet-pale); color: var(--sk-violet-ink); }
.sgn--teal   { background: var(--sk-teal-pale);   color: var(--sk-teal-ink); }

/* With the abacus and without it, told apart by colour AND by the word, never
   by colour alone (�5). */
.sgmode {
  display: inline-block; padding: 5px 11px;
  border-radius: 8px;
  font: 600 12px/1.2 var(--display);
  background: #F1F4FA; color: var(--muted);
}
/* RECOLOURED 16 OCTOBER 2026 to the client's "On clicking Results" reference,
   which draws with-abacus green and orals violet where this had them blue and
   amber. It is one set of three chips for both S6 and S7 rather than two, so
   the change lands on both screens — which is the point: a child meeting the
   same three words in two colours on two screens would reasonably think they
   were two different things. Nothing is told apart by colour alone either way
   (�5): the chip carries the word. */
.sgmode--with-abacus    { background: var(--sk-green-pale); color: var(--sk-green-ink); }
.sgmode--without-abacus { background: var(--sk-pink-pale); color: var(--sk-pink-ink); }
.sgmode--orals          { background: var(--sk-violet-pale); color: var(--sk-violet-ink); }

.sgsc { display: grid; gap: 6px; min-width: 150px; }
.sgsc b { font: 600 13.5px/1.2 var(--display); font-variant-numeric: tabular-nums; color: var(--ink); }
.sgsc__track { display: block; height: 8px; border-radius: 999px; background: #E7ECF5; overflow: hidden; }
.sgsc__fill { display: block; height: 100%; border-radius: 999px; background: var(--sk-blue); }
/* Green is not "good", it is "this sheet paid the accuracy bonus" — the mark
   comes from the Rewards Master's rule, and the figure is beside it in words
   either way. */
.sgsc__fill--green { background: var(--sk-green); }
.sgsc__fill--amber { background: #F0912B; }
.sgsc__fill--red   { background: var(--sk-red); }

.sgstars { display: inline-flex; gap: 3px; }
.sgstars .ico { color: #D8DFEC; }
.sgstars .ico.is-on { color: var(--sk-amber); fill: var(--sk-amber); }

.sgday__foot {
  margin: 0;
  padding: 14px clamp(16px, 2vw, 24px) clamp(16px, 2vw, 22px);
  font: 400 12.5px/1.6 var(--text); color: var(--muted);
}

/* On a phone the table becomes one block per sheet. The header cells go and
   each cell carries its own label, which is what data-label is for in the
   markup — a six-column table on a 360px screen is either a sideways scroll or
   a lie about what fits. */
@media (max-width: 720px) {
  .sgday__scroll { overflow-x: visible; }
  .sgtable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .sgtable tbody tr {
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 14px;
    padding: 12px 0; border-bottom: 1px solid var(--line);
  }
  .sgtable tbody tr:last-child { border-bottom: 0; }
  .sgtable tbody td {
    display: grid; grid-template-columns: subgrid; grid-column: 1 / -1;
    padding: 3px 0; border: 0; white-space: normal;
  }
  .sgtable tbody td::before {
    content: attr(data-label);
    font: 500 12px/1.5 var(--text); color: var(--muted);
  }
}
/* subgrid is widely supported now but not universally; without it the label
   and the value simply stack, which is a longer card and not a broken one. */
@supports not (grid-template-columns: subgrid) {
  @media (max-width: 720px) {
    .sgtable tbody tr { grid-template-columns: minmax(0, 1fr); }
    .sgtable tbody td { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; }
  }
}

/* --- the chart cards ----------------------------------------------------- */
.sggrid {
  display: grid; gap: clamp(14px, 1.8vw, 20px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}

.sgc {
  position: relative;
  display: grid; gap: 14px; align-content: start;
  padding: clamp(16px, 1.9vw, 22px);
  border-radius: var(--sk-r-lg);
  background: var(--tint);
  box-shadow: var(--sk-lift);
}
.sgc--blue   { --tint: #EDF4FD; --edge: var(--sk-blue); }
.sgc--pink   { --tint: #FDEDF4; --edge: var(--sk-pink); }
.sgc--amber  { --tint: #FDF4E6; --edge: var(--sk-amber); }
.sgc--violet { --tint: #F3F0FD; --edge: var(--sk-violet); }
.sgc--teal   { --tint: #EAF8F6; --edge: var(--sk-teal); }
/* GREEN AND RED, added 17 October 2026 when the remaining fifteen screens came
   onto this card. The portal paints seven hues and this card carried five, so
   Games (green) and Notifications (red) had no tint of their own and would
   have had to borrow one — which breaks the rule the menu sets, that a screen's
   colour is the same colour everywhere it appears.

   Mixed to the same recipe as the five above: the hue at about 8% over white,
   which keeps #101828 past 15:1 and #5B6B8A past 4.9:1 on every one of them. */
.sgc--green  { --tint: #EFF8E4; --edge: var(--sk-green); }
.sgc--red    { --tint: #FDECEC; --edge: var(--sk-red); }

.sgc__head { display: flex; align-items: flex-start; gap: 12px; padding-right: clamp(0px, 10vw, 150px); }
.sgc__ico { width: clamp(42px, 4.6vw, 52px); flex: 0 0 auto; display: block; }
/* ANY DRAWING IN THIS SLOT SIZES BY ITS WIDTH, 17 October 2026. Section 23 only ever
   put .sartwork--badge here — 64x64 art — so the slot never had to say so.
   The fifteen screens redressed today reach for the whole drawing library, and
   some of those are BANDS: .sartwork--band carries height: clamp(132px, 15vw,
   168px) for the wide strip it was drawn for, and at 52px wide that became a
   160px ribbon down the side of a card head. Found on Game history. */
.sgc__ico .sartwork { width: 100%; height: auto; }
.sgc__say { min-width: 0; display: grid; gap: 3px; }
.sgc__say h2 {
  margin: 0;
  font: 600 clamp(16px, 1.6vw, 19px)/1.25 var(--display);
  letter-spacing: -.015em; color: var(--ink);
}
.sgc__say p { margin: 0; font: 400 12.5px/1.45 var(--text); color: var(--muted); }

/* The period dropdown. The reference draws it inside each card, so each card
   has its own and they move independently — see the picker in student-play.js.
   It is a real <select>: a custom listbox here would be four hundred bytes of
   JavaScript to rebuild something a phone already renders better than we can. */
.sgpick { position: relative; justify-self: end; margin-top: -4px; }
.sgpick select {
  appearance: none; -webkit-appearance: none;
  min-height: 40px; padding: 0 38px 0 16px;
  border: 0; border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 1px 2px rgba(16,24,40,.08);
  font: 600 13px/1 var(--display); color: var(--ink);
  cursor: pointer;
}
.sgpick select:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sgpick > .ico {
  position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
  pointer-events: none; color: var(--muted);
}
@media (min-width: 861px) { .sgpick { position: absolute; top: clamp(16px, 1.9vw, 22px); right: clamp(16px, 1.9vw, 22px); margin: 0; } }

/* The plot sits on white inside the tinted card, which is the reference's own
   arrangement and the thing that keeps four coloured cards from reading as four
   coloured charts. */
.sgc__plot {
  padding: clamp(14px, 1.7vw, 20px) clamp(12px, 1.5vw, 18px) clamp(10px, 1.2vw, 14px);
  border-radius: var(--sk-r-md);
  background: var(--paper);
}
.sgc--wide .sgc__plot { padding-bottom: clamp(12px, 1.4vw, 16px); }

/* The one card with two series on it says which is which. Three cards without
   a legend do not get one: a legend naming the only thing on the chart is a
   label on a box with one thing in it. */
.sgkey {
  margin: 10px 0 0;
  display: flex; align-items: center; flex-wrap: wrap; gap: 7px 16px;
  font: 500 12px/1.4 var(--text); color: var(--muted);
}
.sgkey__b { width: 11px; height: 11px; border-radius: 3px; background: var(--c); }
.sgkey__l { width: 18px; height: 3px; border-radius: 999px; background: var(--c); }
.sgkey__l::after {
  content: ''; display: block; width: 7px; height: 7px; margin: -2px auto 0;
  border-radius: 999px; background: var(--c);
}

/* --- the time card and the signboard ------------------------------------- */
.sgfoot {
  display: grid; gap: clamp(14px, 1.8vw, 20px); align-items: stretch;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
}
@media (max-width: 900px) { .sgfoot { grid-template-columns: minmax(0, 1fr); } }

.sgsign {
  display: grid; justify-items: center; align-content: center; gap: 2px;
  padding: clamp(16px, 2vw, 22px);
  border-radius: var(--sk-r-lg);
  background: linear-gradient(160deg, #EDF8E2 0%, #DFF2CD 100%);  /* 15.6:1 for the ink below */
  box-shadow: var(--sk-lift);
  text-align: center;
}
/* The board carries the words, so the drawing is the positioning context and
   the text is inset to the cream panel inside it: x 22→198 of the 220-unit
   viewBox is 10 per cent either side, y 60→142 of 180 is 33 per cent down and
   21 per cent up. The SVG keeps its aspect ratio at every width, so those four
   numbers hold without a media query. */
.sgsign__art { position: relative; display: block; width: min(100%, 286px); }
.sgsign__say {
  position: absolute; left: 10%; right: 10%; top: 33%; bottom: 21%;
  display: grid; align-content: center; gap: 4px;
  text-align: center;
}
.sgsign__say b {
  display: block;
  font: 700 clamp(17px, 1.8vw, 21px)/1.15 var(--display);
  letter-spacing: -.02em; color: #5A3410;     /* 8.1:1 on the #F6E3C4 panel */
}
.sgsign__say > span { font: 500 clamp(11.5px, 1.1vw, 13px)/1.35 var(--text); color: #6B4518; }

/* --- the footnote -------------------------------------------------------- */
.sgnote {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0; padding: 14px 18px;
  border-radius: var(--sk-r-md);
  background: #F3F6FC;
  font: 400 12.5px/1.65 var(--text); color: var(--muted);
}
.sgnote .ico { flex: 0 0 auto; color: var(--sk-amber-ink); margin-top: 1px; }

/* ===========================================================================
   23.1 THE CHART ITSELF — components/playchart
   HTML and CSS, with one SVG in it. Bars, gridlines, axis labels and the
   figure above each bar are elements, so they stay crisp at any width and take
   the type scale; only the LINE is an SVG, because a polyline is the one part
   of this that cannot be drawn with boxes. That SVG is stretched with
   preserveAspectRatio="none", which would thicken the stroke in one direction
   — vector-effect="non-scaling-stroke" in the component is what stops it — and
   the dots on the line are elements again, so their labels are not stretched
   either.
   ======================================================================== */
.pchart { margin: 0; display: grid; gap: 8px; }

/* --pch-h is the plot's height and every per-cent position below is measured
   against it. The value above a 100 per cent bar is allowed to sit above the
   top gridline, which is why the plot does not clip. */
.pchart__grid {
  --pch-h: clamp(170px, 19vw, 214px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: 10px;
  padding-top: 20px;
}

.pchart__axis {
  position: relative;
  grid-row: 1; height: var(--pch-h);
  margin: 0; padding: 0; list-style: none;
}
.pchart__axis--l { grid-column: 1; text-align: right; }
.pchart__axis--r { grid-column: 3; text-align: left; }
.pchart__axis li {
  position: absolute; top: calc(var(--at) * 1%);
  right: 0; transform: translateY(-50%);
  font: 500 10.5px/1 var(--text);
  font-variant-numeric: tabular-nums;
  color: var(--faint);
  white-space: nowrap;
}
.pchart__axis--r li { right: auto; left: 0; }

.pchart__plot { position: relative; grid-column: 2; grid-row: 1; height: var(--pch-h); }

.pchart__rule {
  position: absolute; left: 0; right: 0; top: calc(var(--at) * 1%);
  border-top: 1px solid var(--line);
}
/* The floor is the one line that is not a hint. */
.pchart__rule:last-of-type { border-top-color: #D9E0EE; }

.pchart__set {
  position: absolute; inset: 0;
  margin: 0; padding: 0; list-style: none;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  align-items: end;
}
.pchart__item { position: relative; height: 100%; }
/* THE BAR IS POSITIONED, NOT LAID OUT, and that is not a preference. A
   percentage height only resolves against a parent with a DEFINITE height, and
   inside a grid or flex column the row the bar sits in is sized by its own
   content — so height: 90% silently became height: auto and every bar drew as
   a 3px line at the floor. Out of flow, the percentage resolves against
   .pchart__item, which is 100% of a plot that has one. */
.pchart__bar {
  position: absolute; left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: clamp(22px, 60%, 52px); height: var(--h);
  min-height: 3px;
  border-radius: 10px 10px 3px 3px;
  background: var(--c);
}
.pchart__v {
  position: absolute; left: 50%; bottom: calc(var(--h) + 7px);
  transform: translateX(-50%);
  font: 700 12.5px/1 var(--display);
  font-variant-numeric: tabular-nums;
  color: var(--ci, var(--ink));
  white-space: nowrap;
}
/* A period with no sheets in it. A stub and a dash, never a bar at the floor:
   "you did not practise" and "you scored nothing" are different sentences, and
   the screen-reader table says "no sheets" in as many words. */
.pchart__item--none { --h: 6px; }
.pchart__item--none .pchart__bar {
  background: repeating-linear-gradient(135deg, #E2E8F3 0 5px, #EFF2F8 5px 10px);
}
.pchart__item--none .pchart__v { color: var(--faint); font-weight: 600; }

.pchart__line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

.pchart__dots { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.pchart__dots li {
  position: absolute; left: var(--x); bottom: var(--y);
  width: 11px; height: 11px; margin: 0 0 -5.5px -5.5px;
  border-radius: 999px;
  background: var(--paper);
  border: 3px solid var(--c);
}
.pchart__dots b {
  position: absolute; left: 50%; bottom: 13px;
  transform: translateX(-50%);
  font: 700 12px/1 var(--display);
  font-variant-numeric: tabular-nums;
  color: var(--ci, var(--ink));
  white-space: nowrap;
}

.pchart__x {
  grid-column: 2; grid-row: 2;
  margin: 8px 0 0; padding: 0; list-style: none;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
}
.pchart__x li {
  text-align: center;
  font: 500 11.5px/1.3 var(--text); color: var(--muted);
}

.pchart__title { margin: 6px 0 0; font: 500 11px/1.3 var(--text); color: var(--faint); }

@media (max-width: 480px) {
  .pchart__grid { --pch-h: 160px; column-gap: 7px; }
  .pchart__bar { width: clamp(16px, 62%, 34px); }
  .pchart__v { font-size: 11px; }
  .pchart__x li { font-size: 10.5px; }
}

/* The bars grow from the floor on arrival, once, like everything else on this
   surface. A chart that animates on every dropdown change is a chart a child
   waits for five times. */
@media (prefers-reduced-motion: no-preference) {
  .pchart__item .pchart__bar { animation: sgrow .5s cubic-bezier(.22,.8,.3,1) both; }
}
/* The translate is carried through both frames: a transform in a keyframe
   replaces the whole transform, so a bare scaleY() here would drop the
   centring the bar is positioned with and every bar would jump half its own
   width to the right as the animation began. */
@keyframes sgrow {
  from { transform: translateX(-50%) scaleY(0); }
  to   { transform: translateX(-50%) scaleY(1); }
}
.pchart__bar { transform-origin: 50% 100%; }

/* ===========================================================================
   24. MY RESULTS — S6, the client's reference of 13 OCTOBER 2026
   ("On clicking Results")

   WHAT THE REFERENCE ASKS FOR, and what is underneath each of its parts:

     the welcome bar   the same one the home screen has, two sentences changed
                       and the green bar counting sheets instead of points. It
                       is �18.2's .sdhi, included with three values — not a
                       second copy, because a forked band is how two screens
                       start disagreeing about the bell count
     five figures      everything done so far, in a row of pastel tiles with the
                       drawn badge on the LEFT rather than the top right: these
                       are lifetime totals and they are wider and fewer than
                       S7's four, so the icon sits in the gutter the width buys
     recent results    the sheet list, with one dropdown over it. Nine columns,
                       ending on the stars S5 stamps
     four chart cards  across the foot, �23's .sgc at a smaller size and with no
                       period picker — the reference draws none

   WHY IT REUSES �23 RATHER THAN RESTATING IT. The two references were drawn the
   same morning and share a grammar: the same card, the same chips, the same
   stars, the same chart. .sgc, .sgtable, .sgn, .sgmode, .sgstars and .sgkey are
   all S7's, and what is added here is only what this screen genuinely draws
   differently — the icon-left tile, the inline accuracy bar, and a four-across
   grid. Restating them would be two sets of chips that could drift apart.

   CONTRAST, measured on the tints below:
     ink     #101828 on every tint          > 15:1
     muted   #5B6B8A on every tint          > 4.9:1
     a bar   its own --sk-<hue> on white    > 3:1 as a shape
   --------------------------------------------------------------------------- */

/* --- the five figures ----------------------------------------------------
   auto-fit with a 232px floor: five across on a wide laptop, three then two on
   a tablet, one on a phone. The floor is the width at which "Total practice
   time" stops wrapping to three lines. */
.srfig {
  display: grid; gap: clamp(10px, 1.3vw, 16px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 208px), 1fr));
}
.srfig__t {
  display: flex; align-items: flex-start; gap: 12px;
  padding: clamp(13px, 1.3vw, 16px);
  border-radius: var(--sk-r-md);
  background: var(--tint);
  box-shadow: var(--sk-lift);
}
.srfig__t--blue   { --tint: #EDF4FD; }
.srfig__t--green  { --tint: #EFF8E4; }
.srfig__t--amber  { --tint: #FDF4E6; }
.srfig__t--pink   { --tint: #FDEDF4; }
.srfig__t--violet { --tint: #F3F0FD; }
/* The two the card above gained, so a screen's figures and its cards can be the
   one colour. Same stops, so a tile and a card on one screen cannot disagree. */
.srfig__t--teal   { --tint: #EAF8F6; }
.srfig__t--red    { --tint: #FDECEC; }

.srfig__ico { flex: 0 0 auto; width: clamp(38px, 3.6vw, 44px); display: block; }
.srfig__ico .sartwork { width: 100%; height: auto; }
.srfig__say { min-width: 0; display: grid; gap: 1px; }

.srfig__label { font: 600 13px/1.3 var(--display); color: var(--ink); }
/* The figure never wraps: "6 h 45 min" broken over two lines reads as two
   numbers, and the tile is sized from this.

   THE UNIT RIDES SMALLER, and that is what lets five tiles sit across a laptop
   rather than four and a stray. "6 h 45 min" set whole at the figure's size is
   half as wide again as "1,190", so the widest tile was setting the floor for
   all five — and the floor is what auto-fit counts with. The number is still
   the thing being read; 'min' and '%' are labels on it. */
.srfig__n {
  margin-top: 2px;
  white-space: nowrap;
  font: 700 clamp(23px, 2.3vw, 29px)/1.1 var(--display);
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.srfig__u { font-size: .54em; font-weight: 600; letter-spacing: 0; }
.srfig__foot { margin-top: 2px; font: 400 11.5px/1.45 var(--text); color: var(--muted); }
.srfig__foot b { font-weight: 700; color: var(--ink); }
.srfig__foot a { color: var(--sk-amber-ink); }

/* --- recent sheet results ------------------------------------------------ */
.srsheets__head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: clamp(16px, 1.8vw, 22px) clamp(16px, 2vw, 24px) 0;
}
.srsheets__ico { width: 40px; flex: 0 0 auto; display: block; }
.srsheets__ico .sartwork { width: 100%; height: auto; }
.srsheets__head h2 {
  margin: 0; flex: 1 1 auto;
  font: 600 clamp(17px, 1.7vw, 21px)/1.3 var(--display);
  letter-spacing: -.015em; color: var(--ink);
}
/* �23's picker, but this one sits in the flow of the head rather than pinned to
   the corner of a tinted card, so the absolute positioning .sgpick takes above
   861px is undone for it. */
.srsheets__pick { position: static; margin: 0; }
@media (min-width: 861px) { .srsheets__pick { position: static; top: auto; right: auto; } }
.srsheets__pick select { box-shadow: 0 0 0 1px var(--line); }

.srsheets__scroll { padding: clamp(12px, 1.4vw, 16px) clamp(16px, 2vw, 24px) 0; overflow-x: auto; }

/* Nine columns is three more than S7's day list, so the cells are tighter and
   the two count columns are centred under their headings — a right-aligned 20
   under a nineteen-character heading reads as belonging to the next column. */
.srtable th, .srtable td { padding: 11px 10px; }
.srtable__n { text-align: center; font-variant-numeric: tabular-nums; }
.srtable thead th:nth-child(5), .srtable thead th:nth-child(6) { text-align: center; }
.srtable__now {
  display: block;
  font: 600 11px/1.4 var(--display);
  color: var(--sk-green-ink);
}

/* The accuracy cell: the bar and the figure side by side, which is how the
   reference draws it. S7 stacks them because its cell also carries "18/20"
   above the bar; here the two counts have columns of their own, so the bar is
   free to sit in line with its own percentage. */
.sracc { display: flex; align-items: center; gap: 10px; min-width: 132px; }
.sracc__track {
  flex: 1 1 auto; min-width: 60px;
  display: block; height: 9px;
  border-radius: 999px; background: #E7ECF5; overflow: hidden;
}
/* The three bands, declared HERE rather than borrowed from �23's .sgsc__fill--*:
   those sit above this block in the file, so .sracc__fill's own background won
   the cascade and every bar on the screen came out blue whatever it scored.
   Green is not "good", it is "this sheet paid the accuracy bonus" — the mark is
   the Rewards Master's rule, and the figure is beside the bar in words anyway. */
.sracc__fill { display: block; height: 100%; border-radius: 999px; background: var(--sk-blue); }
.sracc__fill--green { background: var(--sk-green); }
.sracc__fill--amber { background: #F0912B; }
.sracc__fill--red   { background: var(--sk-red); }
.sracc b {
  flex: 0 0 auto;
  font: 600 13px/1.2 var(--display);
  font-variant-numeric: tabular-nums; color: var(--ink);
}

/* On a phone the table becomes one block per sheet, exactly as �23's does — the
   rules there are written against .sgtable and this table carries that class,
   so all that is needed here is to let the bar fill the value column. */
@media (max-width: 720px) {
  .srsheets__scroll { overflow-x: visible; }
  .srtable__n { text-align: left; }
  .sracc { min-width: 0; }
}

/* --- the four chart cards ------------------------------------------------
   Four across at the foot of a laptop, two on a tablet, one on a phone. The
   268px floor is the width at which a four-bar chart still has air between its
   bars; below it auto-fit drops to two and the cards grow rather than the bars
   crowding. */
.srgrid {
  display: grid; gap: clamp(14px, 1.6vw, 20px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 268px), 1fr));
}

/* �23's card at the size four-across needs. The head loses the right-hand
   padding that reserved room for a period picker, because this screen has
   none, and the badge is clipped round — the reference draws these four as
   circles where S7's are the squircle the rest of the portal uses. */
.sgc--sm { gap: 12px; padding: clamp(14px, 1.5vw, 18px); }
.sgc--sm .sgc__head { padding-right: 0; gap: 10px; align-items: center; }
.sgc--sm .sgc__ico { width: clamp(34px, 3.4vw, 40px); }
.sgc--sm .sgc__ico .sartwork { border-radius: 999px; }
.sgc--sm .sgc__say h2 { font: 600 clamp(14.5px, 1.3vw, 16px)/1.25 var(--display); }
.sgc--sm .sgc__say p { font-size: 11.5px; line-height: 1.4; }
.sgc--sm .sgc__plot { padding: clamp(12px, 1.4vw, 16px) clamp(10px, 1.2vw, 14px) clamp(8px, 1vw, 12px); }
.sgc--sm .pchart__grid { --pch-h: 168px; }
.sgc--sm .sgkey { margin-top: 8px; font-size: 11px; gap: 5px 12px; }

@media (max-width: 480px) {
  .sgc--sm .sgc__say p { display: none; }   /* the heading says it on a phone */
}

/* --- the doubt form ---------------------------------------------------------
   Its five parts carried .pform / .pform__row / .pfield / .pfield__label /
   .pfield__help, and NOT ONE of those had a rule in any stylesheet — so the
   form had been stacking with no gaps since the day it was written. On a white
   card that read as plain text and nobody caught it; on the tinted card of 17
   October 2026 it read as broken, which is how it was finally spotted.

   The parts are the platform's own .field / .field__label / .field__hint now.
   What is left here is the one thing those do not carry: the space BETWEEN
   fields, which on every other form comes from a grid on the wrapper. */
.sdbt__ask { display: grid; gap: clamp(13px, 1.5vh, 17px); }


/* ===========================================================================
   25. FITTING EVERY SCREEN — 19 October 2026

   Two notes from the client in one morning, both about room rather than about
   design:

     "Number cut ho ja raha h", on a photograph of S4 with the top of a
     four-term sum sliced off by the cream panel's own edge.

     "in mobile view khale tab madhe pan khup space aahe so saglya screenvr
      proper responcive kara tab desktop macbook mobile all screensize nusar
      manage kara."

   25.1 THE SUM SHRINKS AGAINST THE PANEL, NOT THE WINDOW
   -----------------------------------------------------
   WHAT WAS WRONG. §19 sizes the stacked sum against vh — "the question shrinks
   to the space it is given" — and vh is the WINDOW, which is not the space it
   is given. The space it is given is .sfq__ask, a minmax(0, 1fr) row, and that
   row loses height the moment anything else appears in the column: check an
   answer and the verdict box and the working box arrive, the panel gives up
   about 90px, and the sum does not give up anything. .sfq__ask is
   overflow:hidden with align-items:center, so what will not fit is cut off the
   TOP — which is why the client's photograph has a "24" with no top half and
   the instruction line above it gone entirely. Nothing about the window
   changed, so no vh clamp could have caught it.

   THE FIX IS TO ASK THE RIGHT BOX. .sfq__ask becomes a size container, and
   every figure in the stack is capped against cqh — a per cent of the PANEL's
   own content box — on top of the vw and vh caps §19 already gives it. The
   sum is then the largest size that fits whatever height the panel has at that
   moment, and it changes size when the verdict opens because that is exactly
   when the room changes.

   The factors are sized for the worst case the syllabus holds: six rows — five
   terms, the rule and the answer mark — which is a Level 8 sheet. A four-term
   sum on a tall panel never reaches the cap and is still drawn at §19's own
   size; the cap only bites once the panel is short.

   WHY min() AND NOT A SEPARATE RULE. Written as min(3.2vw, 4.6vh, 11cqh) the
   whole declaration is one value, so a browser without container queries drops
   the declaration entirely and keeps §19's — the behaviour of today, which was
   right on every screen but a squeezed one. Nothing is left half-applied.

   AND THE PANEL MAY SCROLL AT LAST. §19 says of a six-term sheet that it
   "would want the panel scrolling, which it can", and it could not: overflow
   was hidden. It is auto now, and the centring is `safe`, so on the one screen
   short enough to defeat even the floor the sum is reachable rather than
   silently cut. In every other case there is nothing to scroll and no
   scrollbar appears.
   ======================================================================== */
body.sfocus--exam .sfq__ask {
  container-type: size;
  /* Two declarations on purpose: a browser that does not know `safe` keeps
     plain centring, which is what it has always had. */
  align-items: center;
  align-items: safe center;
  overflow: auto;
  overscroll-behavior: contain;
}

/* The instruction line is absolute at the top of the stack and the stack's
   padding is what clears it, so the two shrink together or the line lands on
   the first term. */
body.sfocus--exam .sfq__stack { padding-top: clamp(13px, min(3.2vh, 9cqh), 28px); }
body.sfocus--exam .sfq__what { font-size: clamp(10px, min(1.5vh, 5cqh), 13.5px); }

body.sfocus--exam .sfq__col { gap: clamp(1px, min(.5vh, 1.6cqh), 6px) clamp(10px, 1.6vw, 20px); }
body.sfocus--exam .sfq__col b { font-size: clamp(14px, min(2.4vw, 3.4vh, 8cqh), 32px); }
/* The terms and the answer mark are one size — the mark sits under the units
   and a mark in a different size from the figures above it reads as a note
   rather than as the place the answer goes. */
body.sfocus--exam .sfq__col i,
body.sfocus--exam .sfq__qm { font-size: clamp(17px, min(3.2vw, 4.6vh, 11cqh), 44px); }
body.sfocus--exam .sfq__rule {
  margin: clamp(3px, min(.9vh, 2.4cqh), 10px) 0 clamp(2px, min(.7vh, 1.8cqh), 8px);
}

/* The phone sizes of §19 (max-width: 760px) are a quarter smaller all through,
   and they are restated here rather than left to be overridden: the rules
   above are a class more specific than theirs, so without this block a 390px
   screen would take the laptop figures back. */
@media (max-width: 760px) {
  body.sfocus--exam .sfq__stack { padding-top: clamp(11px, min(2.4vh, 9cqh), 20px); }
  body.sfocus--exam .sfq__col b { font-size: clamp(13px, min(2.2vh, 8cqh), 22px); }
  body.sfocus--exam .sfq__col i,
  body.sfocus--exam .sfq__qm { font-size: clamp(16px, min(3vh, 11cqh), 28px); }
}


/* ---------------------------------------------------------------------------
   25.2 THE FOOT OF EVERY SCREEN CLEARS THE TAB BAR

   .splay__body ends in 56px of padding, which on a laptop is air at the bottom
   of the page and below 1024px is supposed to be the room the fixed tab bar
   stands in. It was never enough even before the bar was measured: the bar was
   132px, so the last card on every student screen on a phone sat 76px behind
   it. With the bar down to 65px the 56px is nearly right and still not right,
   and "nearly" is what put it 76px out in the first place.

   So it is arithmetic now rather than a number: the bar's own height plus a
   card's worth of air. Change --sk-tab-h and both the bar and this move
   together. Above 1024px there is no bar and the 56px stays what it always
   was — air.
   ------------------------------------------------------------------------ */
@media (max-width: 1023px) {
  .splay__body {
    padding-bottom: calc(var(--sk-tabs-h) + 20px + env(safe-area-inset-bottom));
  }
}


/* ---------------------------------------------------------------------------
   25.3 THE SHEET BELOW 1024px — the question gets the screen, the rail goes
        under it

   WHAT WAS WRONG, and it was wrong on every phone and every tablet: the cream
   question panel was a 50px strip with the options sitting over the top of it,
   and the sum inside it was invisible. Nothing to do with the sum's own sizing
   — the panel it lives in had no height to give.

   WHY. §19 hides the rail under 1024px and says so in as many words ("Under
   1024px the rail goes … this is the screen where nothing may push the question
   off"). It does not hide: `body.sfocus--exam .sfx__rail { display: block }`
   further down the same section is two classes to the media query's one, so it
   wins wherever it is written and the rail came back on a phone. And the row
   the rail came back INTO is minmax(0, 1fr) of a height:100% grid with the page
   scroll switched off — one screenful, now shared between the work card and a
   rail carrying a sheet thumbnail, a progress bar, twenty numbered buttons, a
   tip and the working. The work card lost, and the first thing inside it to be
   squeezed was the one row that is allowed to shrink: the question.

   THE FIX IS NOT TO HIDE THE RAIL AGAIN. What is in it is wanted on a phone —
   which sheet this is (and the breadcrumb that used to say so at the top came
   off this morning), the tip, and the working behind "Want to know why?". None
   of the three is anywhere else on this screen. Hiding it would be the second
   thing lost from a phone today.

   SO THE COLUMN SCROLLS AND THE WORK CARD IS EXACTLY ONE SCREENFUL. .sfx__cols
   becomes a flex column that scrolls inside itself, the work card is given the
   full height of it, and the rail flows on below the fold. The question, the
   four options and the controls are then laid out in precisely the room they
   get at 1024px and up, and the child never scrolls to answer — scrolling
   reaches the tip and the working, which is reading rather than answering. The
   PAGE still does not scroll: .sfocus__grid keeps its overflow:hidden, which is
   the rule the client set on 12 October and it is untouched.

   HEIGHT, NOT MIN-HEIGHT, on the work card. Its own rows are auto/1fr/auto and
   a 1fr row needs a definite height to resolve against — with min-height the
   question row would size to its contents instead, and §25.1's size container
   would then have nothing to measure and collapse to nothing. This is the same
   trap §17 wrote up on .sfocus .sfx, in the same words, for the same reason.
   ------------------------------------------------------------------------ */
@media (max-width: 1023px) {
  body.sfocus--exam .sfx__cols {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
  body.sfocus--exam .sfx__work { flex: 0 0 auto; height: 100%; }
  /* The rail is its own scroller at 1024px and up, where it stands beside a
     question that must not move. Below that it is the bottom of one scrolling
     column, and a scroller inside a scroller here is a box that cannot be
     reached with a thumb. */
  body.sfocus--exam .sfx__rail { flex: 0 0 auto; overflow: visible; }
}


/* ---------------------------------------------------------------------------
   25.4 THE TINTED CARD HOLDS ITS CONTENTS — S13 and anything else on .sgc

   Found by sweeping all 21 student screens for horizontal overflow: S13, the
   payment result, was the only one that had any, and it had it at EVERY width
   — 263px past the edge of a 360px phone and still 6px past a 1440px laptop.

   WHY. .sgc is a grid with no grid-template-columns, so it gets one implicit
   `auto` column, and a grid item's automatic minimum size is its CONTENT. The
   .pfacts strip inside it is repeat(auto-fit, minmax(150px, 1fr)) — which is
   the right way to write a strip that reflows — but auto-fit needs a definite
   width to count columns against, and it did not have one. It resolved three
   columns at their 150px floor instead, so the strip asked for 532px, the auto
   column gave it 532px, and the card's own contents hung 190px out of a 343px
   card on a phone.

   So this is the automatic-minimum trap that §10 wrote up for .splay__main and
   §17 wrote up again for .sfx__work, met a third time one level further in. The
   cure is the same one both of those use, and it is two declarations: a column
   that may be narrower than its contents, and children that may be narrower
   than theirs. .pfacts then measures a real width and drops to one column on a
   phone, which is what it was written to do.

   The strip is not the only thing this fixes — it is the widest. Everything in
   a .sgc on all fifteen screens redressed on 17 October was free to push the
   card open, and nothing else happened to be wide enough yet.
   ------------------------------------------------------------------------ */
.sgc { grid-template-columns: minmax(0, 1fr); }
.sgc > * { min-width: 0; }
