/* LAWS:
   - ONE LOOK, PINNED. This sheet is theme-invariant on purpose (owner, 2026-09-13): an FAQ does not
     render in Midnight because a seven-year-old chose it. No html[data-theme] block may appear here,
     and no page that links it may read sq_theme.
   - it declares TOKENS for the five grown-up pages and the furniture they SHARE. A rule belongs here
     only when the same class means the same thing on two or more of them.
   - a class whose NAME collides across pages (.card .num .why .warn .bar .w .sub .stat) stays
     page-local until it is renamed. Those names mean different things on different pages and several
     are emitted from JavaScript string literals — moving them here would repaint the wrong element.
   - `.flag` is the exception and it is SHARED on purpose: it is the amber "take note" callout on every
     document page (privacy, for-parents and curriculum all emit it, the last two from JavaScript), so
     it is declared below with `.plain` and `.good` rather than kept page-local.
   History: NOTES.md · DESIGN-POLISH-SPEC-2026-09-13.md
*/

/* ══ THE TYPING FONT, SELF-HOSTED ═══════════════════════════════════════════════════════════════
   index.html declares these too, from its own inline sheet with its own relative paths. A second
   @font-face for the same family/weight/src is free — the browser resolves one file — and the
   duplication is what lets a grown-up page be opened directly without loading the app's stylesheet.
   Paths are relative to THIS FILE (ui/kit/), not to the page. */
@font-face{
  font-family:'Nunito'; font-style:normal; font-weight:400; font-display:swap;
  src:url('../../fonts/nunito-400.woff2') format('woff2');
}
@font-face{
  font-family:'Nunito'; font-style:normal; font-weight:800; font-display:swap;
  src:url('../../fonts/nunito-800.woff2') format('woff2');
}
/* the marks (§34.9): the same two range-limited faces index.html declares — see the note there */
@font-face{
  font-family:'Nunito'; font-style:normal; font-weight:400; font-display:swap;
  src:url('../../fonts/nunito-marks-400.woff2') format('woff2');
  unicode-range:U+2190, U+2192, U+21B6, U+21BA, U+22EF, U+25B4, U+25B8, U+25BE, U+25CB, U+25CF, U+2605, U+266A, U+2713-2715, U+2717, U+2726-2727, U+279C, U+FE4F, U+FF0B;
}
@font-face{
  font-family:'Nunito'; font-style:normal; font-weight:800; font-display:swap;
  src:url('../../fonts/nunito-marks-800.woff2') format('woff2');
  unicode-range:U+2190, U+2192, U+21B6, U+21BA, U+22EF, U+25B4, U+25B8, U+25BE, U+25CB, U+25CF, U+2605, U+266A, U+2713-2715, U+2717, U+2726-2727, U+279C, U+FE4F, U+FF0B;
}

/* ══ THE STUDY ══════════════════════════════════════════════════════════════════════════════════
   The paper palette of the child's app, re-pointed for a document. Every token the five pages
   reference is declared here — all 58 of them, including the ones only parent.html uses — so that
   deleting a page's own :root leaves nothing resolving to the empty string. That is the whole
   migration: redefine once, delete five :root blocks, and every page-local rule follows.

   MEASURED (WCAG 2.x, worst stop of each gradient):
     ink/card 13.14 · mut/card 5.42 · goldInk/card 6.71 · green/card 5.83 · redInk/card 6.02
     line/card 3.31 (boundary bar is 3:1) · parchInk/parch 9.28 · parchInk2/parch2 5.56 */
:root{
  /* ground and paper */
  --bg:#f7f7f5; --bg2:#f1f1ee; --card:#fdfdfb; --card2:#f2f2ef; --cardHi:#ffffff;
  --ink:#20242e; --mut:#5d6470; --line:#868c9b;

  /* the lantern — the one thing that never moves, in any look, anywhere in this product */
  --gold:#ffd166; --goldD:#a87f21; --goldL:#ffeeb8; --goldInk:#7a5200; --goldInkH:#5c3d00;
  --goldSel:#a87f21; --goldEdge:#d8ae4e;

  /* parchment — the warm beats: a rule being explained, a promise being made */
  --parch:#f7e8c8; --parch2:#e7d2a4; --parchInk:#3b2c14; --parchInk2:#5f4c24;

  /* the verdict colours. There is no blue in SpellTrail: --blue and --blueL were the document
     pages' link and callout colours and they now point at the lantern's ink and at parchment, so
     every rule that already says var(--blue) lands in the house palette without being rewritten. */
  --blue:#7a5200; --blueL:#f7e8c8;
  --green:#1c6e3d; --greenL:#e7f2ea; --cyan:#0b6e86;
  /* THE ONE BLUE, and it is a word, not a link (owner, 2026-10-29): the parent's word cloud draws the words she spells
     right in her own Writing Desk stories that SpellTrail does not teach yet "a blue instead of a green", so the two can be
     told apart. Nothing else may use it. 6.5:1 on white. */
  --fromWriting:#2a5aa8;
  --red:#a3283f; --redL:#fbecef; --redInk:#a3283f; --rose:#a3283f;
  --amber:#8a6a12; --amberL:#fdf5e0;

  /* the medal tints parent.html tiles with */
  --bronzeBg:#f3e6da; --silverBg:#eceef3; --tgoldBg:#fbf1d8; --tlearnBg:#eef1f6;
  --bronzeRGB:192,127,74; --silverRGB:207,220,240;

  /* the greys parent.html builds its own furniture from */
  --hairRGB:20,36,46; --mutRGB:93,100,112; --cyanRGB:11,110,134;
  --shadow1:rgba(20,24,40,.26); --inset1:rgba(255,255,255,.62);
  --hoverWash:#f4f4f1; --trackWash:#e9e9e5; --dashOutline:#b6bac5;
  --barBg:#e9e9e5; --barFill:#1c6e3d;
  /* a COLOUR, not a shadow: its only consumer is parent.html's `.rung .bar{box-shadow:inset 0 1px 2px
     var(--barInset)}`, and a whole shadow substituted there made the declaration invalid, so the ladder
     track silently lost its inner shadow. */
  --barInset:rgba(20,36,46,.16);
  --bandEdge:#d3d5db; --noteBg:#f7e8c8; --noteLine:#c9ab6a;
  --evchipBg:#f2f2ef; --relchipBg:#f2f2ef; --relAheadBg:#f7f7f5; --relCurBg:#fbf1d8;
  --yrchipBg:#f2f2ef; --dbtnBg:#f2f2ef;
  --auraTop:transparent;

  /* type. --f is the document pages' single stack; --fdisp/--fbody are the app's pair, and the
     three names now resolve to one family so a page cannot be half in Nunito. */
  --fdisp:"Nunito","Avenir Next","Segoe UI",system-ui,sans-serif;       /* one family, as the app (§34.9 C, 2026-09-29) */
  --fbody:"Nunito","Avenir Next","Segoe UI",system-ui,-apple-system,sans-serif;
  --f:"Nunito","Avenir Next","Segoe UI",system-ui,-apple-system,sans-serif;

  /* the measure. ONE, where there were five: 760 · 760 · 900 · 880 · 1080 (D8). 880 is the middle
     of them and the width parent.html's tables were built against; prose is capped at 68ch inside
     it, which is why the wide pages stopped looking left-shoved. */
  --guWrap:880px; --guMeasure:68ch; --guGut:24px;
  --guBar:68px;                                     /* the shared header's height */
  --guTap:44px;                                     /* every control on these pages */
  --guR:16px; --guRsm:12px; --guRpill:999px;

}

*{ box-sizing:border-box; margin:0; padding:0; }

/* ══ TWO SCOPES, AND THE SPLIT IS LOAD-BEARING ══════════════════════════════════════════════════
   `.gu-doc` on <body> means THIS PAGE IS A DOCUMENT — for-parents, curriculum, privacy, manual.
   Those four get the type ramp below. parent.html is a DASHBOARD: forty h2s inside forty cards,
   its own `.card h2` treatment, its own body background and no body font-size at all (it inherits
   16px). Anything unscoped here would grow every word on it by a point and put a gold rule above
   every card heading. So it takes the TOKENS, the bar, the nav and the print block, and nothing
   else — which is the whole of what it was missing. */
/* the bottom padding is not decoration: the pages' deleted `body` rules carried 80–90px and without it
   the footer nav sits on the very edge of the page. */
body.gu-doc{
  font:17px/1.65 var(--fbody); color:var(--ink); background:var(--bg);
  -webkit-text-size-adjust:100%; padding-bottom:90px;
}

/* ── the measure. ONE, where there were five. parent.html keeps its own 880 rule — the same
   number, declared locally, because its print block is written against `.wrap`'s children. ─── */
.gu-doc .wrap{ max-width:var(--guWrap); margin:0 auto; padding:0 var(--guGut); }
.gu-doc .gu-head{ padding-top:44px; }

/* ── type ────────────────────────────────────────────────────────────────────────────────────────
   THREE SIZES AND A GOLD RULE. The document pages reached for a bigger heading each time they
   needed a level; the rule above an h2 does that job without the size, which is what keeps a long
   page from shouting by its third section. */
.gu-doc h1{ font-family:var(--fdisp); font-weight:900; font-size:clamp(29px,4.4vw,38px);
            line-height:1.14; letter-spacing:-.4px; margin:0 0 12px; color:var(--ink); }
.gu-doc h2{ font-family:var(--fdisp); font-weight:900; font-size:25px; line-height:1.2;
            letter-spacing:-.2px; margin:46px 0 10px; color:var(--ink); }
/* the rule marks a SECTION, so it is scoped to a DIRECT CHILD of the measure — unscoped it also drew
   above every h2 JavaScript emits inside a card (for-parents' `.res h2`, under the YES pill). The
   typography rule above stays unscoped, because a card heading still wants the type. */
.gu-doc .wrap > h2::before{ content:''; display:block; width:40px; height:3px; border-radius:2px;
                            background:var(--gold); margin-bottom:14px; }
.gu-doc h3{ font-family:var(--fbody); font-weight:800; font-size:17.5px; line-height:1.35;
            margin:26px 0 4px; }
.gu-doc p{ margin:12px 0; max-width:var(--guMeasure); text-wrap:pretty; }
/* `*{padding:0}` above strips the marker indent, which hung every bullet in the left gutter outside
   the measure; privacy.html had kept a local copy of exactly this rule and the other three needed it. */
.gu-doc ul,.gu-doc ol{ margin:12px 0 12px 22px; max-width:var(--guMeasure); }
.gu-doc li{ margin:7px 0; }
.gu-doc .lede{ color:var(--mut); font-size:19px; line-height:1.55; max-width:60ch; margin:0 0 40px; }
.gu-doc small,.gu-doc .small{ font-size:14.5px; line-height:1.55; color:var(--mut); }
.gu-doc strong,.gu-doc b{ font-weight:800; }

/* links and the focus ring ARE global: parent.html already declares the same colours locally, and
   a keyboard ring is a safety rail, not a look. */
a{ color:var(--goldInk); text-decoration:underline; text-decoration-color:rgba(122,82,0,.45);
   text-underline-offset:3px; }
@media (hover:hover){ a:hover{ color:var(--goldInkH); text-decoration-color:var(--goldInkH); } }
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{
  outline:3px solid var(--goldD); outline-offset:2px; border-radius:4px;
}

/* ── THE BAR ─────────────────────────────────────────────────────────────────────────────────────
   The thing none of these pages had. manual.html and curriculum.html carried no header, no lockup
   and no way back at all: a parent who followed "The manual walks through it" out of the FAQ had
   only the browser's back button (D5b). One bar, every page, and the lockup says whose room this
   is without shouting the child's app at a grown-up. */
.gu-bar{
  display:flex; align-items:center; gap:24px; min-height:var(--guBar);
  padding:0 var(--guGut); background:var(--cardHi);
  border-bottom:1px solid rgba(var(--hairRGB),.12);
}
.gu-brand{ display:flex; align-items:center; gap:10px; flex:0 0 auto; text-decoration:none;
           color:var(--ink); }
@media (hover:hover){ .gu-brand:hover{ color:var(--ink); } }
/* The painted stepping-stone S (owner 2026-11-09: the bee was the old placeholder). Smooth, never pixelated:
   it is painted art (§33.3), and the 1x/2x tiers in the srcset cover its 28px box. */
.gu-brand img{ width:28px; height:28px; display:block; flex:0 0 auto; border-radius:22%; }   /* the Home lockup's corner (index.html .brandmark) */
.gu-brand b{ font-family:var(--fdisp); font-weight:900; font-size:20px; letter-spacing:-.2px; }
/* THE TRADE MARK (owner, 2026-11-11: the word mark SPELLTRAILS filed with IP Australia, ref AMCZ-2616437597). On the logo name of each page and nowhere else, small and raised, exactly as spelltrails.com draws it (site doc.css .tm); ™, never ®, until the mark is registered. A child should not notice it. */
.tm{ font-size:.42em; vertical-align:super; line-height:0; margin-left:.06em; font-weight:700; }
.gu-for{
  font-family:var(--fbody); font-weight:800; font-size:11.5px; letter-spacing:1.1px;
  text-transform:uppercase; color:var(--mut);
  border:1px solid rgba(var(--hairRGB),.18); border-radius:var(--guRpill); padding:4px 10px;
}
.gu-back{
  display:inline-flex; align-items:center; gap:7px; min-height:var(--guTap); padding:0 18px;
  margin-left:14px; font-family:var(--fdisp); font-weight:800; font-size:15px; color:var(--ink);
  text-decoration:none; background:var(--card2); border:1px solid rgba(var(--hairRGB),.16);
  border-radius:var(--guRsm);
}
@media (hover:hover){ .gu-back:hover{ color:var(--ink); border-color:var(--goldD); } }
.gu-back svg{ width:15px; height:15px; }
/* ONE ROW ON A PHONE. Wrapping put the way back on a second line and the bar measured 108px at
   390 wide — two rows of chrome, where the owner's ruling for a small screen is one bar. So: no
   wrap, the lockup left and the way back right, and the pill goes (a LABEL, not an affordance —
   the h1 directly under it already says what the page is). The button keeps its 44px tap target
   and loses only side padding, which is what buys the full "Back to the app" room on one line. */
@media (max-width:720px){
  .gu-bar{ flex-wrap:nowrap; justify-content:space-between; gap:12px;
           padding-top:10px; padding-bottom:10px; }
  .gu-for{ display:none; }
  .gu-back{ margin-left:0; padding:0 14px; font-size:14.5px; flex:0 0 auto; white-space:nowrap; }
}
/* TWO THINGS THE BAR GOT WRONG BETWEEN THOSE TWO BREAKPOINTS (§36 (f), measured on all five pages).
   721–860px: `.gu-nav` is hidden and it was the only thing carrying `margin-left:auto`, so the way
   back sat wherever the lockup left it — a third of a tablet's bar empty to its right.
   ≤340px: brand (130) + gap (12) + "Back to the app" (168) + 48 of gutter is 358, and the bar does
   not wrap, so at 320 the ONE Back on the page was clipped by the right edge — law 3, on every one
   of the five pages. The wordmark goes and the lantern stays: it is still the link home, and the h1
   directly beneath it already says the product's name. 28 + 12 + 168 + 48 = 256.
   THE BREAKPOINT IS 340, NOT 400: measured, 360 and 390 both fit the wordmark AND the whole button
   (the board's own `84-privacy.phone360` shows it), and a first cut at 400 dropped the wordmark on
   two phones that never needed it. A breakpoint is a measurement, not a round number. */
@media (max-width:860px){ .gu-back{ margin-left:auto; } }
@media (max-width:340px){ .gu-brand b{ display:none; } }

/* ── THE PAGE NAV ────────────────────────────────────────────────────────────────────────────────
   The markup was already identical on all five pages; only the CSS had drifted into three variants
   (margin 30 vs 40, 14px vs 13.5px, and three different hover colours). One version, and the hover
   is the lantern's ink because there is no blue in this product.

   ONE ROW, ONCE (§36 (f), law 1). `.gu-nav` hides below 861px and `.pagenav` hid at no width at all,
   so every page carried BOTH navs on a tablet and a laptop — the same five words twice, measured on
   all five pages at 1440 (gu-nav at y=12, pagenav at the foot). They are two halves of one control
   and only one of them may be drawn: the bar's above 860px, the footer's below it, where the bar has
   no room. Nothing is added and nothing is lost at any width; what goes is the duplicate. */
.pagenav{
  display:flex; flex-wrap:wrap; gap:6px 16px; justify-content:center; margin:30px auto 0;
  padding-top:18px; border-top:1px solid rgba(var(--hairRGB),.12); font-size:14px;
}
.pagenav a{ color:var(--mut); text-decoration:none; padding:9px 4px; min-height:var(--guTap);
            display:flex; align-items:center; }
@media (hover:hover){ .pagenav a:hover{ color:var(--goldInk); text-decoration:underline; } }
.pagenav a[aria-current="page"]{ color:var(--ink); font-weight:800; }

/* …and the same six links across the top of a wide screen, where the bar has room for them */
.gu-nav{ display:flex; align-items:center; gap:2px; margin-left:auto; }
/* the radius is the HOVER WASH's shape and stays; `position:relative` is only so the current-page
   marker below can be drawn as its own box instead of borrowing that shape. */
.gu-nav a{
  position:relative;
  display:flex; align-items:center; min-height:var(--guTap); padding:0 14px;
  font-size:15px; font-weight:700; color:var(--mut); text-decoration:none; border-radius:10px;
}
@media (hover:hover){ .gu-nav a:hover{ color:var(--ink); background:var(--hoverWash); } }
/* The marker is a FLAT 3px bar, inset to the link's own 14px padding — the same mark as the gold
   rule above an h2. It was an inset box-shadow, which follows the 10px radius and so drew the
   current page's underline as a drooping curve (measured, privacy canary 2026-09-13). */
.gu-nav a[aria-current="page"]{ color:var(--ink); font-weight:900; }
.gu-nav a[aria-current="page"]::after{
  content:''; position:absolute; left:14px; right:14px; bottom:0; height:3px;
  border-radius:2px; background:var(--gold);
}
@media (max-width:860px){ .gu-nav{ display:none; } }     /* the footer .pagenav carries it instead */
@media (min-width:861px){ .pagenav{ display:none; } }    /* …and above it the bar does, alone */

/* ── THE CALLOUT FAMILY ──────────────────────────────────────────────────────────────────────────
   `.plain` was byte-identical on for-parents and privacy already, and privacy had generalised it
   into a matched set of three. What changes is only the ground: a tinted box with a left accent
   rule is the single most machine-authored component on a page, and parchment is this product's own
   surface for "a thing is being explained to you". Geometry is unchanged, so nothing reflows. */
.gu-doc .plain,.gu-doc .good,.gu-doc .flag{
  border-radius:var(--guR); padding:18px 22px; margin:22px 0;
  box-shadow:inset 0 0 0 1px rgba(59,44,20,.14);
}
.gu-doc .plain{ background:linear-gradient(180deg,var(--parch),var(--parch2)); color:var(--parchInk); }
.gu-doc .plain p{ margin:6px 0; color:var(--parchInk); max-width:none; }
.gu-doc .plain a{ color:var(--parchInk); text-decoration-color:rgba(59,44,20,.5); }
@media (hover:hover){ .gu-doc .plain a:hover{ color:#241a0c; } }
.gu-doc .good{ background:var(--greenL); color:var(--ink); box-shadow:inset 0 0 0 1px rgba(28,110,61,.24); }
.gu-doc .good p{ margin:6px 0; max-width:none; }
.gu-doc .flag{ background:var(--amberL); color:var(--ink); box-shadow:inset 0 0 0 1px rgba(138,106,18,.28); }
.gu-doc .flag p{ margin:6px 0; max-width:none; }

/* ── TABLES ──────────────────────────────────────────────────────────────────────────────────────
   Merged from the two halves that each had part of it: curriculum's explicit th weight and row
   hover, and manual's overflow handling — which is the one that matters on a phone and which only
   the dark page had. */
.gu-doc table{ border-collapse:collapse; width:100%; font-size:15.5px; margin-top:14px; }
.gu-doc th{
  text-align:left; font-size:11.5px; font-weight:800; letter-spacing:1.1px; text-transform:uppercase;
  color:var(--mut); padding:0 12px 10px 0; border-bottom:2px solid rgba(var(--hairRGB),.16);
  white-space:nowrap;
}
.gu-doc td{ padding:13px 12px 13px 0; border-bottom:1px solid rgba(var(--hairRGB),.10);
    vertical-align:top; line-height:1.55; }
@media (hover:hover){ .gu-doc tr:hover td{ background:var(--hoverWash); } }
@media (max-width:640px){
  .gu-scroll{ display:block; overflow-x:auto; -webkit-overflow-scrolling:touch; }
}

/* ── FOOTER ──────────────────────────────────────────────────────────────────────────────────── */
.gu-doc footer{
  color:var(--mut); font-size:14px; border-top:1px solid rgba(var(--hairRGB),.12);
  margin-top:44px; padding-top:18px;
}

/* ── PRINT ───────────────────────────────────────────────────────────────────────────────────────
   The four document pages each had their own partial print block and manual.html had none. One
   rule: white ground, black ink, the chrome gone, and links that show where they went. */
@media print{
  body{ background:#fff; color:#000; }
  .gu-bar,.pagenav,.gu-nav{ display:none; }
  a{ color:inherit; text-decoration:none; }
  .gu-doc .plain,.gu-doc .good,.gu-doc .flag{ background:none; box-shadow:none; border:1pt solid #9a9a9a; }
  .gu-doc h2::before{ background:#9a9a9a; }
  @media (hover:hover){ .gu-doc tr:hover td{ background:none; } }
}

@media (prefers-reduced-motion:reduce){
  *{ animation-duration:.001ms !important; transition-duration:.001ms !important; }
}
