/* LAWS:
   - a look may set SEMANTIC TOKENS and nothing else — never a component, never an id, never a
     selector other than :root or html[data-theme="…"]; spelltrail/tools/ui-gate.mjs check ② enforces it
   - values are MOVED, never rewritten: every look must render exactly as it did before the fold
   - a new look is a block in this file and nothing anywhere else (and a retired one leaves only its tombstone)
   History: NOTES.md */

/* ══ ui/kit/themes.css — THE OTHER LOOKS (Stage 4; three since Rockpool retired, 2026-11-11) ═══
   These four palette blocks stood at the bottom of index.html's inline sheet, next to 21 rules that
   named components by hand — `html[data-theme="paper"] .lt.ok{ box-shadow:… }` nineteen times over,
   because paper is a flat look expressed as "remove the glow". Those 21 are gone: the components
   now read a semantic token, the token's default lives in tokens.semantic.css, and a look that wants
   a different answer sets the token HERE. What is left is what a theme was always supposed to be.

   LOAD ORDER IS LOAD-BEARING. index.html links raw → semantic → themes, all three ABOVE its own
   inline sheet. This file has to come after tokens.semantic.css (it overrides that file's defaults
   at equal specificity, so source order decides) and before the inline sheet (whose component rules
   consume the tokens). Moving any of the three links reorders the cascade. */

/* ══ THE THREE OTHER HOURS ══════════════════════════════════════════════════════════════════════
   Same book, different light. Everything below is TOKENS — the structural rules are counted on one
   hand and each is named for the thing it exists to fix. `night` is the absence of a data-theme
   attribute, so the sheet above IS the default and nothing here can move it.
   WHAT NEVER MOVES, in any theme: --gold/--goldD/--goldL (the lantern is the brand and every gold
   FILL keeps it) · the parchment tokens and every parchment surface (the warm beats are the same
   warm beats at every hour) · the certificate and the print block · the tester badge, the tester
   popover and the storage warning (a safety rail is not decor) · #4a3a10 on the gold quest card,
   which measures 6.12:1 everywhere · the collectible .wcard art.
   MEASURED (worst stop of each gradient, WCAG 2.x):
                      ink/card  mut/card  tileInk/tile  line/card  green/card
     night             12.70     6.48        7.20         3.41       8.62
     day               11.72     5.06        8.74         3.30       5.41   (green #1a6d3b since #186; was 4.55)
     paper             14.97     5.75       12.21         3.25       6.05
     midnight          15.74     6.84       13.62         3.45      11.19   */

/* ── DAY — morning at camp ─────────────────────────────────────────────────────────────────────
   Not an admin light-mode: a warm-paper card under a morning sky, with the tiles in light slate
   and DARK letters. --line lands at #767fae rather than the drafted #8791bd because #8791bd
   measured 2.62:1 on the card's lower stop and the boundary bar is 3:1. */
html[data-theme="day"]{
  --setHair:rgba(35,44,71,.13); --setOff:#e8e3d6; --setOn:#ffffff;   /* the settings rows (app-feel, 2026-11-11) */
  --stamp-blend:multiply; --stamp-ink:.8; --stamp-lift:brightness(1);   /* §58.1: a light card is paper: ink in it, at the owner's 80% */
  --bg:#f3ede0; --bg2:#dfe9f8; --card:#f8f2e6; --card2:#e9e2d0; --ink:#232c47; --mut:#5a6380;
  --green:#1a6d3b; --cyan:#0e7c96; --line:#767fae;   /* #186: was #1f7a43, 4.13:1 on the first-run chips' tint; now 4.92 */
  --tile:#d6dff4; --tileOn:#b8c7ea;
  --cardHi:#fdf9f0; --cardLo:#f3ecdd;
  --panelHi:#faf6ec; --panelLo:#ede4cf; --weekHi:#fbf7ee; --weekLo:#eee5d2;
  --launchHi:#e5ecfb; --launchLo:#cfd9f2;
  --tileHi:#e3e9f8; --tileLo:#c9d4ef; --tileEdge:#a9b6dd; --tileInk:#26304f; --tileRing:#9aa8d4;
  --tileHovHi:#eef2fc; --tileHovLo:#d6dff4;
  --fnHi:#e8ecf8; --fnLo:#ccd4ea; --fnEdge:#a9b6dd;
  --tileDimHi:#e6e6ea; --tileDimLo:#d2d3da; --tileDimEdge:#b3b5bf;
  --btn2Hi:#dee6f8; --btn2Lo:#c3cfeb; --btn2Edge:#9aa8d0;
  --chunkHi:#dfe4fa; --chunkLo:#bcc6ee; --chunkEdge:#98a3d4;
  --chunk2Hi:#e3ddfa; --chunk2Lo:#c4baec; --chunk2Edge:#9e93d2;
  --well:#ffffff; --sunk:#eae4d6; --pileBg:rgba(255,255,255,.55);
  --rowBg:#f6f1e4; --rowMine:#eef3fd; --rowMineLine:#8fa5dd; --cheerOn:#fbeecb;
  --stepBg:#f6f1e4; --stepHere:#fdf3d8; --chipBg:#f6f1e4; --chipOn:#fdf3d8;
  --clozeHi:#fbf5e6; --clozeLo:#f4ead2;
  --shelfHi:#f6f1e4; --shelfLo:#ece5d4; --growHi:#eef5ec; --growLo:#e3eee1;
  --pipBg:#ddd6c4; --dotOff:#c2cbe8; --dotOffRing:#5a67a8;
  --pill:rgba(255,255,255,.85); --pill2:rgba(255,255,255,.62);
  --glass:rgba(248,242,230,.84); --glassHi:rgba(253,249,240,.88); --glassLine:rgba(255,255,255,.55);
  --faceLight:255,244,214; --faceDark:120,136,180; --faceRing:rgba(118,127,174,.95);
  --auraLow:rgba(150,190,255,.30); --auraTop:rgba(255,209,102,.42);
  --seaLine:rgba(60,140,190,.06); --seaGlow:rgba(60,140,190,.10);
  --shade:rgba(30,40,80,.35); --shadeSoft:rgba(30,40,80,.16);
  --h1Ink:#232c47; --h1Sh:rgba(255,255,255,.8); --wordInk:#232c47; --tfSh:rgba(255,255,255,.75);
  --goldInk:#7a5200; --goldInkH:#5c3d00; --linkU:rgba(122,82,0,.45);
  --redInk:#a3283f; --artInk:#f4f6ff; --artMut:#a3b0e8;
  --markInk:#c0281f; --askInk:#a35200;   /* 5.28 and 5.00 on the card (#186); --dk-ask measured 2.69 */
  --mutRGB:90,99,128; --greenRGB:26,109,59; --cyanRGB:14,124,150;
  /* ── folded in from day's two component overrides (Stage 4) ──
     the sky at 8am: no stars, and the sea is a hint of water rather than a lit horizon */
  --star-display:none;                               /* was: [data-theme=day] .star{display:none} */
  /* the floating pressables (2026-10-25): on a morning card a light drop, not night's black one */
  --float-drop:0 2px 4px -1px rgba(20,24,40,.14), 0 6px 12px -8px rgba(20,24,40,.30);
  /* the floating gold button (2026-10-25): on a morning card a warm drop, not night's black one, and no halo */
  --elev-gold:inset 0 1px 0 rgba(255,255,255,.75), inset 0 -1px 0 rgba(160,110,20,.30), 0 2px 4px -1px rgba(120,80,0,.25), 0 7px 14px -9px rgba(96,64,0,.5);
  --sky-veil-opacity:.35;                            /* was: [data-theme=day] #sky::after{opacity:.35} */
}

/* ── PAPER — the workbook ──────────────────────────────────────────────────────────────────────
   Owner: "a more boring white — old-school, printable, mature — but not ugly." So: flat ground (no
   radials, no stars, no sea), hairline rules, and the press PHYSICS kept while every outer GLOW is
   stripped — a halo is the one thing that never prints. Gold buttons stay gold; gold on white is
   the best thing on the page. --line is #868c9b (the drafted #d6d8de measured 1.36:1 on the card
   and a boundary has a 3:1 bar; at 1px this reads as a ruled line, which is the look anyway). */
html[data-theme="paper"]{
  --setHair:rgba(20,24,40,.11); --setOff:#e7e8ec; --setOn:#ffffff;   /* the settings rows (app-feel, 2026-11-11) */
  --stamp-blend:multiply; --stamp-ink:.8; --stamp-lift:brightness(1);   /* §58.1: a light card is paper: ink in it, at the owner's 80% */
  --bg:#f7f7f5; --bg2:#f7f7f5; --card:#fdfdfb; --card2:#eeeeeb; --ink:#20242e; --mut:#5d6470;
  --green:#1c6e3d; --cyan:#0b6e86; --line:#868c9b;
  --tile:#e9eaef; --tileOn:#d5d9e2;
  --cardHi:#ffffff; --cardLo:#fbfbf8;
  --panelHi:#fafaf8; --panelLo:#f1f1ee; --weekHi:#fafaf8; --weekLo:#f1f1ee;
  --launchHi:#f2f4f8; --launchLo:#e6e9f0;
  --tileHi:#f0f1f4; --tileLo:#e2e4ea; --tileEdge:#c6c9d2; --tileInk:#20242e; --tileRing:#b6bac5;
  --tileHovHi:#f7f8fa; --tileHovLo:#e9ebf0;
  --fnHi:#f0f1f4; --fnLo:#e2e4ea; --fnEdge:#c6c9d2;
  --tileDimHi:#eeeef0; --tileDimLo:#e0e0e4; --tileDimEdge:#c6c6cc;
  --btn2Hi:#eceef4; --btn2Lo:#dde0e8; --btn2Edge:#c2c6d0;
  --chunkHi:#eef0f5; --chunkLo:#dfe2ea; --chunkEdge:#c3c7d2;
  --chunk2Hi:#f1eff6; --chunk2Lo:#e3e0ec; --chunk2Edge:#c8c4d4;
  --well:#ffffff; --sunk:#efefec; --pileBg:rgba(255,255,255,.7);
  --rowBg:#f4f4f2; --rowMine:#eef1f6; --rowMineLine:#9aa2b4; --cheerOn:#faf1d8;
  --stepBg:#f4f4f2; --stepHere:#fbf3dc; --chipBg:#f4f4f2; --chipOn:#fbf3dc;
  --clozeHi:#ffffff; --clozeLo:#f7f7f4;
  --shelfHi:#f7f7f5; --shelfLo:#efefec; --growHi:#f4f7f4; --growLo:#ecf0ec;
  --pipBg:#e2e2df; --dotOff:#c9ccd4; --dotOffRing:#5d6470;
  --pill:rgba(255,255,255,.9); --pill2:rgba(255,255,255,.7);
  --glass:rgba(253,253,251,.84); --glassHi:rgba(255,255,255,.88); --glassLine:rgba(255,255,255,.6);
  --faceLight:255,250,238; --faceDark:150,155,168; --faceRing:rgba(134,140,155,.95);
  --auraLow:transparent; --auraTop:transparent;
  --seaLine:transparent; --seaGlow:transparent;
  --shade:rgba(20,24,40,.14); --shadeSoft:rgba(20,24,40,.08);
  --h1Ink:#20242e; --h1Sh:transparent; --wordInk:#20242e; --tfSh:transparent;
  --goldInk:#7a5200; --goldInkH:#5c3d00; --linkU:rgba(122,82,0,.45);
  --redInk:#a3283f; --artInk:#f4f6ff; --artMut:#a3b0e8;
  --markInk:#c0281f; --askInk:#a35200;   /* 5.28 and 5.00 on the card (#186); --dk-ask measured 2.69 */
  --mutRGB:93,100,112; --greenRGB:28,110,61; --cyanRGB:11,110,134;
  /* ── PAPER'S FLAT PASS, folded in from its 19 component overrides (Stage 4) ──────────────────
     Every one of these removes a GLOW and keeps the geometry — what makes a key feel pressable stays
     (since 2026-10-25 that is its inner foot and the light --float-drop, no longer a `0 Npx 0` ledge),
     the `0 0 Npx` halo around it goes. Nothing here changes a size, a radius or a position, so no
     layout moves between looks. A halo is the one thing that never prints. */
  --star-display:none; --sky-veil-display:none; --card-sheen-display:none;
  --glow-title:none; --glow-display:none; --glow-cheer:none; --glow-anchor:none;
  --glow-misswant:0 3px 0 var(--tileEdge);
  --splash-filter:none;
  /* the press physics kept, the halo dropped */
  --elev-gold:inset 0 1px 0 rgba(255,255,255,.75), inset 0 -1px 0 rgba(160,110,20,.30), 0 2px 4px -1px rgba(120,80,0,.25), 0 7px 14px -9px rgba(96,64,0,.5);
  --float-drop:0 2px 4px -1px rgba(20,24,40,.14), 0 6px 12px -8px rgba(20,24,40,.30);   /* the floating pressables (2026-10-25) */
  --elev-tile-ok:inset 0 -2px 0 var(--okEdge), var(--float-drop), inset 0 2px 0 rgba(255,255,255,.3);
  --elev-tile-grow:inset 0 -2px 0 rgba(160,110,20,.35), var(--float-drop), inset 0 2px 0 rgba(255,255,255,.6);
  --elev-tile-cursor:inset 0 0 0 3px var(--cyan);
  --elev-chip-sel:inset 0 -2px 0 rgba(160,110,20,.35), inset 0 1px 0 rgba(255,255,255,.7), var(--float-drop);
  --elev-facechip-on:inset 0 0 0 3px var(--gold);
  --elev-agechip-on:inset 0 -2px 0 rgba(160,110,20,.35), var(--float-drop);
  --elev-dot-on:none; --elev-pip-on:none; --elev-chip-on:none;
  /* …EXCEPT THE BLANK'S OWN RULE, which is not decoration (owner, 2026-09-12: "the blank spaces for
     words must still be clearly marked"). This look drops every glow and every lift, and the blank
     went with them — on a pale card a tinted rectangle with no line under it stops reading as a place
     to write. It keeps the LINE and loses the glow: the same ruled blank a child knows from paper. */
  --elev-gap:inset 0 -3px 0 var(--goldInk); --gap-animation:none;
  /* the three big soft panels become one hairline rule — the shared value gets a shared token, so
     a fifth look moves all three of them with one line (IMPLEMENTATION §4.0's rows 19+20) */
  --elev-panel-hair:inset 0 0 0 1px rgba(20,24,40,.10);
  --elev-shelf:var(--elev-panel-hair);
  --elev-cloud:var(--elev-panel-hair);
  --elev-growshelf:var(--elev-panel-hair);
  /* and the two portrait circles wear the same quiet gold ring */
  --elev-face:inset 0 0 0 2px rgba(168,127,33,.55);
  --elev-face-hero:var(--elev-face);
}

/* ── MIDNIGHT — the same world at 2am ──────────────────────────────────────────────────────────
   Night's structure with the purple drained out of it: near-black neutral slate, the stars stay,
   and the gold burns brighter for having less blue to compete with. green/cyan are night's. */
html[data-theme="midnight"]{
  --setHair:rgba(120,136,200,.22); --setOff:rgba(255,255,255,.08); --setOn:#1c2547;   /* the settings rows (app-feel, 2026-11-11) */
  --bg:#05070d; --bg2:#0b0f1a; --card:#0f1424; --card2:#1a2138; --ink:#eef1fa; --mut:#94a0c4;
  --line:#5b6aa8; --tile:#1d2543; --tileOn:#31407a;
  --cardHi:#12172a; --cardLo:#0c101f;
  --panelHi:#151b33; --panelLo:#0e1226; --weekHi:#171d36; --weekLo:#0e1226;
  --launchHi:#1c2547; --launchLo:#111733;
  --tileHi:#232c4e; --tileLo:#171e38; --tileEdge:#0d1224; --tileRing:#2e3a68;
  --tileHovHi:#2b3660; --tileHovLo:#1c2444;
  --fnHi:#1a2140; --fnLo:#12172c; --fnEdge:#0a0e1c;
  --tileDimHi:#1a2038; --tileDimLo:#12172a; --tileDimEdge:#090d18;
  --btn2Hi:#2a3560; --btn2Lo:#1c2440; --btn2Edge:#111730;
  --chunkHi:#2b3564; --chunkLo:#1c2447; --chunkEdge:#111737;
  --chunk2Hi:#332f64; --chunk2Lo:#211d47; --chunk2Edge:#151137;
  --okHi:#39a568; --okLo:#1b5f3e; --okEdge:#0f4029;
  --well:#070b16; --sunk:#080c1a; --pileBg:rgba(7,11,22,.55);
  --rowBg:#0e1226; --rowMine:#141a34; --rowMineLine:#31407a;
  --stepBg:#0d1122; --stepHere:#161d3a; --chipBg:#0d1122; --chipOn:#171e3c;
  --clozeHi:#0d1224; --clozeLo:#080b18;
  --shelfHi:#0d1224; --shelfLo:#080b16; --growHi:#0a1020; --growLo:#070b14;
  --pipBg:#1c2444; --dotOff:#3d4a86; --dotOffRing:#7c88c0;
  --pill:rgba(12,16,31,.88); --pill2:rgba(12,16,31,.6);
  --glass:rgba(15,20,36,.88); --glassHi:rgba(18,23,42,.9); --glassLine:rgba(255,255,255,.12);
  --faceDark:2,4,10; --faceRing:rgba(91,106,168,.95);
  --auraLow:rgba(107,231,255,.07); --auraTop:rgba(255,209,102,.09);
  --seaLine:rgba(107,231,255,.04); --seaGlow:rgba(107,231,255,.07);
  --shade:#000; --shadeSoft:rgba(0,0,0,.85);
  --h1Sh:#000; --tfSh:#07160f;
  --mutRGB:148,160,196;
}

/* ── ROCKPOOL, RETIRED (owner, 2026-11-11) ─────────────────────────────────────────────────────
   "I don't really like that greenish one." Its block stood here: night's structure re-hued deep teal. The
   paintings are warm (sand, sunlit grass, gold), and a teal card fought them on every screen. A family who
   chose it lands on Midnight, the dark look the owner likes (index.html's head script, once). */
