/* Second Brain Dashboard — design tokens (layer: tokens).
   The single source of the ink-on-paper language (lineage: e-ambient-ledger
   → f-ribbon-v6 → g-ribbon-v7, extracted 2026-08-13). Nothing outside this
   file names a raw color, size step, or radius. docs/design-system.md is
   the contract; change values here, never inline. */

@layer tokens, base, components, app;

/* ── THE BREAKPOINT SET ────────────────────────────────────────────────────
   Written here, in words, because a media query cannot read a custom property:
   `@media (max-width: var(--phone))` is not a thing in any engine, so the
   numbers below are typed by hand in twelve files and the only way they stay
   one set is that this block names them.

     max-width:  719px   phone — one column, ledger is a strip above the chat
     max-width:  999px   narrow — still stacked, but the strip has more room
     min-width: 1000px   desktop — rail | chat | ledger, three columns
     max-height: 600px   the SHORT tier (2026-09-19)

   The short tier is not a device. It is every way a viewport loses its height:
   the on-screen keyboard on a phone (390x844 becomes 390x508 because the page
   declares interactive-widget=resizes-content), landscape (844x390), an iPhone
   SE at rest (320x568), and a 1280x800 laptop at 200% browser zoom (640x400).
   All four measured the same defect at ebd2794: the chrome above the chat is a
   fixed height, so the thread bottomed out at 56px of padding with no room for
   a word, and the composer was laid out over the top of it. 600 sits in the
   measured gap — 568 is broken, 667 is not — so a phone at rest keeps the
   layout Dan drew and only a viewport that has actually lost its height gets
   the tier. Rules that use it: ledger.css (the strip yields), composer.css
   (the coach line goes, the pane stops painting over the composer).

   `zoom.js` carries a fourth number, `w < 720`, which locks --ui-zoom to 1 on
   phones; it is the same line as the 719 above, one pixel apart because one is
   a max and the other a min. Change either and change both. */

/* Baseline UI scale. The interface is drawn compact and needs a zoom to read
   right. The value below is only the floor: app/zoom.js derives the real one
   from the viewport (see its header) and writes it into a <style> loaded just
   after this file, so what ships is a fit rather than one desk's judgment
   inherited by every other desk. This static value is what a no-JS render
   gets, so it is set laptop-safe: too small is a squint, too big clips.
   The scale lives in --ui-zoom because the full-height .app must divide by it:
   viewport units (dvh) report the whole viewport in CSS px and do NOT shrink
   under html{zoom}, so a bare 100dvh would stand that many times the viewport
   tall and scroll the page. Keeping both off one variable holds them in
   lockstep. Unlayered so custom.css (and zoom.js) can override --ui-zoom. */
:root { --ui-zoom: 1.15; }

/* ── the lappy, the one palette that does NOT follow the page theme ─────────
   A phosphor screen, for the terminal and for the tabs that open one. Daybreak
   is a paper room and a CRT in it would be a white rectangle pretending, so
   these are fixed rather than forked per theme, which is the one place in this
   build where that is true.

   Here rather than in term.css because raw values live in tokens.css and
   nowhere else, and because components.css needs them too now: a shell tab in
   the strip wears this palette while sitting in paper chrome. */
:root {
  /* the music records (thread.css .rdock-coin.record): a black disc, its grooves, sheen and
     spindle, and the blank cream label under a cover; the same in every room, as vinyl is */
  --vinyl-black: #141317; --vinyl-deep: #000; --vinyl-groove: rgba(255, 255, 255, .06); --vinyl-rim: rgba(255, 255, 255, .05);
  --vinyl-shadow: rgba(0, 0, 0, .55); --vinyl-sheen: rgba(255, 255, 255, .13); --vinyl-sheen-soft: rgba(255, 255, 255, .08);
  --vinyl-blank: #e9e2d0; --vinyl-label-edge: rgba(0, 0, 0, .45); --vinyl-spindle: #0b0a0d; --vinyl-spindle-rim: rgba(255, 255, 255, .15);
  --lappy-bg: #060d06;
  --lappy-ink: #6dff7a;
  --lappy-dim: #2f7a36;
  --lappy-glow: rgba(109, 255, 122, 0.42);
  --lappy-rule: rgba(109, 255, 122, 0.22);
  --lappy-face: #0b160b;
  /* the CRT's own shading: scanlines, the corner falloff, and the drop under a
     menu floating over a near-black screen */
  --lappy-scan: rgba(0, 0, 0, 0.22);
  --lappy-vignette: rgba(0, 0, 0, 0.55);
  --lappy-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  --lappy-hover: rgba(109, 255, 122, 0.12);
  /* closing something, in the phosphor's register rather than the paper one:
     --ember is tuned to be alarming on white and goes muddy on near-black */
  --lappy-halt: #ff9a90;
  --lappy-halt-wash: rgba(255, 106, 94, 0.16);
  /* the screen's own type size. Not on the --text-* scale on purpose: that
     scale is for prose in the page's body face, and this is a terminal, whose
     size is a property of the machine face it is set in.
     STAYS PX while the --text-* scale went to rem (2026-09-19): xterm sizes
     its cell grid from a NUMBER, not a CSS length (term.js passes
     `fontSize: 13.5` to the constructor), so the stylesheet and the terminal
     agree only while both are counting the same pixels. A rem here would
     silently drift the text off the grid the addon measured. */
  --lappy-text: 13.5px;
}

/* ── the laser, the second palette that does not follow the theme ──────────
   Dan, 2026-09-28: when the agent is handed a browser tab, outline the page
   "in a cool cyan glow that kinda feels like laser through smoke, thin, not
   distracting". It is not a fourth accent: like the lappy, it is scoped to one
   organ and one state (app/browse.css, .browse.driving), and it means exactly
   one thing, "a machine is steering this page". Fixed, because a laser reads
   as a laser on paper and on night alike. */
/* ── the chair's glints, a palette that does not follow the theme ─────────
   The chair (ribbon.css) sparkles in three moods: pine and white when it has
   done a job or is at work, warm yellow, orange and red when it could use a
   hand, gold for its welcome (Dan, 2026-10-15). Fixed, like the laser: each
   mood has to read as itself on paper and on night alike. */
:root {
  --chair-pine: #3f9e78;
  --chair-white: #ffffff;
  --chair-warm-1: #f7c948;
  --chair-warm-2: #f28c28;
  --chair-warm-3: #e0452b;
  --chair-gold: #f5c84c;
  --chair-gold-light: #fff1c2;
  --chair-gold-deep: #e0a930;
  --chair-gold-ink: #d9a62e;
}

:root {
  --laser: #3ff4ff;
  --laser-haze: rgba(63, 244, 255, .16);
  --laser-dim: rgba(63, 244, 255, .38);
}

/* ── the cosmos stand-in palette (premium-door.js) ─────────────────────────
   The drawn and placeholder scenes stand in Cosmos dark whatever theme the
   page wears, framed in the night sky's own palette. Fixed, because the
   scene depicts the dark theme's cosmos art. */
:root {
  --cosmos-deep:  #070a1c;
  --cosmos-mid:   #0d1330;
  --cosmos-core:  #1c2750;
  --cosmos-fog:   #9fb0ff;
  --cosmos-pale:  #aebcff;
  --cosmos-star:  #cfd8ff;
  --cosmos-white: #e9eeff;
  --cosmos-mist:  #e3e8ff;
}

/* ── fixed colours that do not change with the theme ───────────────────────
   A Globe art listing sits on its own night before the picture loads
   (panels.css .sc-art, .sd-art). Each kind of idea has its own colour, the
   same in either theme (seed.css .seed-paths [data-cap]), and --idea-cap-on is
   the ink on a button filled with one of them. */
:root {
  --globe-art-night:          #0f1430;
  --idea-default:             #8a96d8;
  --idea-private-record:      #d07aa0;
  --idea-shared-page:         #5aa2e0;
  --idea-visual-plan:         #a585e6;
  --idea-growing-document:    #dba843;
  --idea-learning-space:      #36b5ae;
  --idea-tracker:             #5cbf83;
  --idea-research-collection: #8098d6;
  --idea-tool:                #e88a5e;
  --idea-creative-draft:      #de779a;
  --idea-cap-on:              #11122a;
}
html { zoom: var(--ui-zoom); }

@layer tokens {
  :root {
    /* ── surface: Cosmos daybreak ──────────────────────────────────────────
       The night sky's own navy taken up in lightness with its hue intact, so
       the two themes are one room at two hours rather than a palette and its
       inversion. Chosen 2026-08-22 after nine directions; the pre-flight shell
       and every mockup already speak this. Vault:
       projects/second-brain-dashboard/2026-08-22-cosmos-is-the-default.md */
    /* ── READABILITY PASS, 2026-09-01 ────────────────────────────────────
       A member reads in daybreak because light-on-dark does not work for their
       eyes, and she asked for two things: a background a touch darker, and
       a much darker font. She is describing a real defect, and measuring it
       named the cause more precisely than "too bright" could.

       The room was ONE UNDIFFERENTIATED FIELD. --paper-up on --paper was
       1.09:1 and --paper-sunk was 1.10:1, which is not a step, it is a
       rounding error (APCA scores both Lc 0.0). Nothing was raised or sunk;
       the whole page was a single wall of near-white. That is what a bright
       background FEELS like when there is no structure in it.

       So the ground comes down and the raised surface stays where it was.
       That answers the member's first ask and buys a visible elevation step with
       one move. The ground stops at L* 92.4: Apple's #F2F2F7, Polaris's
       #F1F1F1, and Carbon G10's #F4F4F4 all sit in the L* 95-96 band, and
       below about L* 92 a light ground starts costing contrast headroom and
       going muddy. This is the floor, deliberately, not a step past it. */
    /* ── DAYBREAK, FROM THE PORTAL (2026-09-26, later the same day) ───────
       Dan, from a screenshot of the client portal's Industries map: "let's
       just port all this styling over ... for the new version of daybreak
       instead of this mint". The room is the portal's Daybreak
       (APC-Intake-Builder `portal-theme.css`): near-white mineral paper and
       the navy ink family. The globe is its Care and learning planet, jade
       land at the portal's Daybreak depths, with the kinds lit as the portal
       lights its nodes: bright, pale points on a mid-dark world. The planet
       is an object in the room, not the room. The notes below about the
       reading room record why the mint was tried; the values are Daybreak's.
       ── THE READING ROOM, 2026-09-26 (superseded) ───────────────────────
       Daybreak retired. Dan, from a photo of his Kindle's green page: the
       light theme becomes that page. A mint ground, text in a green-grey ink
       that is never black, no glare anywhere. The readability pass above
       still holds: the ground is darker than the raised surface, so panels
       are a visible step up rather than one undifferentiated field. */
    --paper:      #f4f0e8;  /* the room: Daybreak's mineral paper */
    --paper-up:   #fbf9f4;  /* raised: panels, cards, composer */
    --paper-sunk: #ebe5da;  /* recessed: code, inactive tabs */
    --rule:       #d9d1c3;  /* structural line */
    --rule-soft:  #e8e2d6;  /* hairline */
    /* A BACKING, NEVER A RECOLOUR (the embeds PRD's own assumption). A drawing
       an agent writes is inked for paper — black strokes, no currentColor — so in
       the night room it has to sit on something light rather than be inverted,
       which would turn every deliberate colour in it into a different one. Stays
       light in both rooms, on purpose. */
    --art-backing: var(--paper-up);

    /* ── the course line: ink, not neon ───────────────────────────────────
       One material at three strengths, and it is NOT --rule. --rule is the
       structural DIVIDER and is correctly dark in Cosmos, which meant a
       called station drew #2e2e5c on a #22224f sphere and simply was not
       there. A settled mark in a dark room has to be light on dark, so the
       course borrows the light the coastline already uses rather than
       introducing a colour.

         called   the enamelled bead: a settled deposit of ink, sharp-edged
         line     the travelled thread, one strength quieter than its marks

       The acceptance test is a sentence rather than a number: if the
       travelled course could plausibly belong in a spaceship HUD, the wake
       is too bright. Cosmos is ink, astronomy, cartography, letterpress and
       navigational instruments, and it is not cyberpunk. Here on paper the
       same material runs the other way, dark on light. */
    --course-called: rgba(32,32,62,.72);
    --course-line:   rgba(32,32,62,.42);
    /* THE ANCHOR: a phase, which is STRUCTURE and not progress (13.1, 13.6).
       Green means done and only done; a phase drawn in the done colour made
       every phase read as a very large finished thing, and its hollow twin
       read as a large unfinished one, so the two loudest marks on the ball
       were arguing about a question a phase does not answer. Dan, 2026-09-07:
       "green phase nodes look too much like completed nodes ... choose a
       fitting different color".
       BLUE, and specifically not one of the seven kind hues: the phase mark is
       not a kind of note, it is the map's own furniture, so it takes the
       family the sky and the coastline are already in. It is the one colour on
       this surface that means nothing about the work at all, which is exactly
       what a boundary should mean. A phase's real progress is stated as `2/8`
       in the list and again in the ribbon; it never needed a third voice. */
    --course-anchor: #3f4bb0;
    /* THE JOURNEY'S OWN STATE PALETTE (course view refinement, 2026-09-25).
       Every representation of a course (the route, the scrubber, the progress
       bar, the cockpit, the outline) draws from these and nothing else, so the
       same state is the same light everywhere. Five meanings, one hue each:
       travelled is emerald (the map's own line is the reference), current is
       the pen, open is the anchor blue, a gate is ice, and provisional has NO
       hue of its own: it is open, ghosted. Current is LIGHT, never a surface:
       --pen-wash is orange at 16% and over this navy it composites to brick,
       which is the brown this palette exists to retire. So the warm tokens here
       are for points, hairlines and a barely-there bloom, never for a card. */
    --journey-travelled:      #34D399;   /* bright emerald: the route is drawn on the jade */
    --journey-travelled-soft: rgba(52,211,153,.42);
    --journey-travelled-wash: rgba(52,211,153,.13);
    --journey-current:        #f15a24;
    --journey-current-line:   rgba(241,90,36,.55);
    --journey-current-glow:   rgba(241,90,36,.14);
    --journey-open:           #3f4bb0;
    --journey-open-soft:      rgba(63,75,176,.30);
    --journey-base:           rgba(63,75,176,.07);
    --journey-gate:           rgba(32,32,62,.72);
    --journey-glass:          rgba(251,249,244,.72);
    --journey-focus:          rgba(63,75,176,.72);

    /* ── ink: what reads ─────────────────────────────────────────────────
       Three levels, and each one now lands where every peer system puts it:
       primary Lc 95-105, secondary Lc 85-90, tertiary Lc 68-81 (measured
       across Carbon White, Material 3, Atlassian and Polaris).

       --ink-3 WAS THE DEFECT. At #8b8fb0 it read 2.79:1 on paper, below
       Apple's SEPARATOR colour, and it dresses 165 places in this app, most
       of them 11px: timestamps, tool detail lines, panel descriptions,
       placeholders, the speaker's own name over every message. It failed AA
       for normal text and failed even the 3:1 large-text floor. Whatever
       else is true, this is the thing that was hard to read.

       Never black, in either theme. #000 on #fff is 21:1 and every shipping
       system avoids it: the brightness disparity leaves afterimages on
       scroll. The navy keeps the room's hue and stops at 13:1. */
    /* The reading room's ink is the Kindle's: a green-grey that sits in the
       page's own hue. ~11:1 on paper; --ink-3 clears 5:1 on paper and 4.5:1
       on sunk, so the 11px labels that failed in 2026-09 still pass. */
    /* FOREST INK (2026-09-26, measured). Sampled from Dan's own Kindle
       photo: the page is #c5e7ce and the text's body is #1f3e28, a deep
       GREEN, not a neutral near-black. Ours was #222824 and read grey beside
       it. All three levels move into that hue at the contrast the ladder
       already demanded (11.3 / 8.2 / 5.8:1 on paper). */
    --ink:        #20203e;  /* primary text, and never black */
    --ink-2:      #3d3d5c;  /* secondary, and what running copy uses */
    --ink-3:      #66667f;  /* tertiary, labels, quiet chrome */
    --land-lab:    #dfe4f2;  /* the globe's land names: pale on the jade */
    --land-lab-on: #ffffff;  /* the land in hand */
    --land-cap:    #66667f;  /* the land name in the globe's corner, off the sea and on bone */
    --land-cap-on: #20203e;  /* the same, for the land in hand */

    /* ── meaning-carrying accents (never decorative) ──────────────────────
       One saturated colour does identity, action and the thing you are in, and
       nothing else on screen is allowed to be it. That is what lets the eye
       find the live thing without a highlighted row. */
    --pen:        #f15a24;  /* the brain's colour: identity, action, focus */
    --pen-wash:   #fdeae2;  /* the portal's orange wash */
    /* THE SAME ORANGE, AS A WORD. #f15a24 is 2.78:1 on paper, so it can be a
       mark but it cannot legally be a letter: an orange label in the brand
       value is a thing the member has to lean in to read. Rather than repaint the
       brain's colour, the pen forks by JOB — --pen stays exactly itself for
       fills, edges, the inkwell, the logo and the globe, and --pen-ink is
       what any orange TEXT wears. Material does the same thing (primary is
       tone 40 on light and tone 80 on dark, one hue, two jobs).
       On cosmos the two are identical, because there the bright orange
       already reads: this split exists for the light room only. */
    --pen-ink:    #ae4116;
    --ember:      #8f5d0a;  /* needs-you: due, waiting, destructive */
    --ember-wash: #f7edd9;
    --trouble:    #b02e25;  /* a control that cannot work until the member fixes something (the mic's red !) */
    /* moss sits in the page's own hue now, so it is pulled darker and bluer
       than the ground to stay a signal rather than more page */
    --moss:       #0a6e4d;  /* settled: done, safe, healthy */
    --moss-wash:  #dcf0e7;
    /* THE INVITATION, and not the pen. Dan, 2026-08-23, on the glowing
       sailboats: "that is too alarming, more like a gentle color that
       appears well in dark cosmos as well in the daylight theme". The pen
       is the brain colour and it means action, focus, now; a thing quietly
       offering itself is none of those. Periwinkle sits in the same family
       as the globe rim, reads as light rather than alarm, and carries in
       both themes. Light: dark enough to hold on near-white paper. */
    --invite:      #4a59a8;
    --invite-glow: rgba(95,111,196,.42);
    /* the same periwinkle as a surface, so a note can be tinted rather than
       edged: a coloured edge on a rounded box is banned (ui-build-conventions) */
    --invite-wash: #e3e6f5;

    /* ── the diff pair: added and removed code, and ONLY that ─────────────
       Dan, 2026-08-29, asking for the Everything view: added lines green,
       removed lines red, the way Claude Code shows its own work. That needs a
       red, and the rule above says the pen owns this end of the spectrum, so
       these get their own small domain rather than borrowing a signal that
       already means something else. They are a quotation of code, the same
       register as syntax highlighting, never UI chrome: nothing outside a
       rendered diff may use them. Ember was the other candidate and is wrong,
       because ember means "needs you" and a line the brain removed is not
       asking for anything. The del is rose-crimson, pulled well off the pen's
       orange so a diff and the brain's own colour never read as one signal. */
    --diff-add:      #0a6e4d;
    --diff-add-wash: rgba(13,143,99,.13);
    --diff-del:      #b32d4d;
    --diff-del-wash: rgba(200,54,90,.13);

    /* ── the fire, and the gold on the addition (Dan, 2026-08-30) ─────────
       A running step's removed lines burn, and a real fire is not one colour:
       it is coldest at the top and hottest at the base, so the rows are
       coloured by their height in the block. These carry that spectrum, and
       like the pair above they belong to a rendered diff and to nothing else.

       They do NOT borrow --pen or --ember, which sit in the same warm band and
       already mean the brain and "needs you" respectively. A row of the diff
       glowing in the pen's own orange would read as the brain touching it.

       WHITE-HOT IS THE HARD ONE, and it is why these are theme-split rather
       than one set. On cosmos, white-hot is white. On paper, white-hot is
       invisible, so the light column ends at the palest blue that still reads
       against a wash — the ramp keeps its ORDER on both themes even though the
       top of it cannot keep its literal colour on one of them.

       --flame-char is the cold end: soot, what a line becomes after it has
       burned. It is the one that also de-vibrates the ordinary red, which is
       mixed toward it rather than merely faded, so a dimmed removal reads as
       sooty rather than as washed out. */
    --flame-blue:    #2f6bd6;
    /* two tabs paired side by side (components.css .tab-pairline): a blue no
       tab state wears, so the line across a pair never reads as one */
    --pair-line:    #2f6bd6;
    --flame-white:   #6fa8ff;
    --flame-gold:    #d99512;
    --grade-hero-size: 3.5rem; /* 56px large letter grade */
    --flame-amber:   #f59e0b;
    --amber-deep:    #92400e;
    --door-build:    #7fd6a0;  /* the first-light fork's three doors, one hue each */
    --door-mind:     #9cbcff;
    --door-help:     #ffc46b;
    /* a store item's named accent (MARKETPLACE.md): one hue, a day and a night
       value each, so a listing picks a name and fits both themes. Eucalyptus is
       bluer than --moss on purpose: green alone means done */
    --accent-eucalyptus:        #1e5b5c;
    --accent-eucalyptus-bright: #2b8a7e;
    --accent-eucalyptus-ink:    #164744;
    --item-edge-strength:       72%;  /* the green page swallows a faint edge */
    --flame-orange:  #d4571f;
    --flame-char:    #3b2028;
    /* the addition's halo. Gold, where the JSON box's is the pen's warm: the
       glyph under it is already green and carries the meaning, so the halo is
       free to be an ornament, and gold on green is the one pairing that reads
       as gilding rather than as a second signal. */
    --diff-add-gold: #c9931a;

    --shadow:     0 1px 0 rgba(34,34,74,.05), 0 8px 24px -14px rgba(34,34,74,.35);
    --scrim:      rgba(24,24,48,.42);
    /* the ground under a picture: deeper than --scrim because a photograph needs the page gone, not dimmed */
    --scrim-deep: rgba(24,24,48,.86);
    /* words and glyphs drawn straight on --scrim-deep (the viewer's file name,
       its chevrons): that ground is dark in every theme, so this ink is light.
       Daybreak's paper written out rather than var(--paper), because --paper
       does not resolve in this block today: the READING ROOM note above closes
       its comment early and the stray prose swallows that declaration */
    --scrim-ink:  #f4f0e8;

    /* ── type ─────────────────────────────────────────────────────────────
       Superclarendon and Avenir Next were macOS-only and resolved to Bookman
       Old Style and Gill Sans MT on Windows, a pairing nobody designed. These
       are web faces with installed fallbacks, so both machines see the same
       page. Fraunces carries the brain's own name and the display sizes. */
    --display: Fraunces, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
    --body: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
    --data: "JetBrains Mono", Menlo, "SF Mono", ui-monospace, monospace;

    /* REM, NOT PX, AND THE SAME SIZES AS BEFORE (2026-09-19). Every step below
       is its old px value over a 16px root: .6875rem IS 11px on a default
       browser. The unit is the whole point — a px font size is the one thing a
       browser's own "text size" setting cannot move, so a member who set their
       text larger got a page that ignored them. Measured at ebd2794: Firefox
       launched with font.size.variable.x-western at 32 drew a layout identical
       to its default, in every engine, because the scale was px all the way
       down. Keep the ratios when adding a step; the room is drawn in them. */
    --text-xs:   0.6875rem;  /* 11px — metadata, overlines, hints */
    --text-badge: 0.59375rem;/* 9.5px — the count on a tab's top edge, inside a 15px dot */
    --text-sm:   0.78125rem; /* 12.5px — secondary UI, chips, buttons small */
    --text-md:   0.84375rem; /* 13.5px — controls, tool lines, notes */
    --text-base: 0.9375rem;  /* 15px — reading copy */
    --text-lg:   1.0625rem;  /* 17px — names, card titles */
    --text-xl:   1.375rem;   /* 22px — the rare headline (asleep state) */
    /* the rail's apps and the tab's tray (2026-10-05): a launcher's small type */
    --text-app:      0.625rem;  /* 10px — an app's name under its coin, five across */
    --text-app-x:    0.8125rem; /* 13px — the × on a shaking app */
    --text-tray:     0.5rem;    /* 8px — the count in a tab's tray, beside the bell */
    --text-clock:    0.5625rem; /* 9px — the digital clock under the sun-to-bed arc */
    /* a looked tool's ribbon (focus mode, 2026-11): the picker's meta lines */
    --text-meta:     0.75rem;    /* 12px — the showing thing's kind under its name */
    --text-meta-sm:  0.71875rem; /* 11.5px — the kind line and the count in the picker */
    /* An app's coin, as a launcher draws one: a white face, a mark darkened a
       little toward black so it holds on white, and a soft shadow under it.
       Constant across the rooms, as a launcher icon is. --mask-on is the
       opaque stop of a CSS mask, which is a colour in name only. */
    --app-face:      #fff;
    --app-shade:     #000;
    --app-shadow:    0 1px 2px rgba(0, 0, 0, .28), 0 2px 6px rgba(0, 0, 0, .16);
    --app-shadow-up: 0 2px 4px rgba(0, 0, 0, .3), 0 6px 14px rgba(0, 0, 0, .2);
    --mask-on:       #000;
    /* Document scale. A brief read at length wants a longer measure and a
       larger body than any control on the page: 15px is right for a card and
       tiring for four thousand words. Only two steps, because everything else
       a document needs already exists above. */
    --text-doc:    1rem;     /* 16px — reading a document, not a panel */
    --text-doc-h1: 1.875rem; /* 30px — the title of a document */

    /* ── headline scale: the one ladder that moves with the window ──────────
       A SECOND LADDER ON PURPOSE, not more steps on the first one.
       Everything in --text-* is a fixed size because it is UI: a control, a
       label, a line of running copy. Those must not grow on a big monitor, and
       the whole interface already scales as one through --ui-zoom (zoom.js).
       A headline is the opposite case. It is the largest thing on a page, it
       sets the page's whole sense of scale, and a size that reads as confident
       at 1600 reads as shouting at 1024. So these carry their own clamp: a
       floor for narrow windows, a ceiling so a wall-sized monitor gets a
       better-proportioned page rather than a billboard, and vw between.
       They are a ladder, so a new headline takes a step rather than inventing
       a clamp; the store's front door had six one-off clamps in panels.css
       before this existed, which is a type scale written in the wrong file.
       Only --display (Fraunces) is ever set at these sizes. */
    --head-sm:  clamp(21px, 1.9vw, 26px);   /* a feature tile's title */
    --head-md:  clamp(22px, 2.3vw, 31px);   /* a section heading */
    --head-lg:  clamp(25px, 2.7vw, 35px);   /* an opened item */
    --head-xl:  clamp(26px, 3vw, 38px);     /* a standing invitation */
    --head-2xl: clamp(30px, 3.3vw, 46px);   /* a department */
    --head-3xl: clamp(32px, 4.4vw, 56px);   /* the front door's statement */

    /* ── space: one scale, no ad-hoc gaps ── */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 22px;
    --space-6: 34px;

    /* ── the room's side columns ──────────────────────────────────────────
       ONE three-column room from 1000px up, rather than a hard step at 1200
       with a band underneath where the rail had no column to stand in.
       The rail does NOT flex. It is 240px because that is what a region's name
       needs (see rail.css: a name gets two lines before it gives up any of
       itself), and a rail that shrinks starts ellipsing the member's own words,
       which is the one thing the whole panel was built not to do.
       The ledger gives instead: the globe is square and reads at any size, so
       it hands its slack to the conversation on a narrow window. At 1366 this
       is exactly the 336 it has always been.
       Divided by --ui-zoom for the same reason .app's height is: viewport units
       report the UNZOOMED viewport and would otherwise disagree with the px
       floor and cap standing next to them. */
    --rail-w:   var(--rail-w-set, 240px);
    --ledger-w: var(--ledger-w-set, clamp(300px, calc(26vw / var(--ui-zoom, 1)), 336px));
    /* --rail-w-set and --ledger-w-set are the widths the member dragged the
       sidebars to (side-widths.js, Dan 2026-10-19), kept on this computer
       because a width belongs to a screen. Unset, the defaults above stand. */

    /* ── STACKING: the order surfaces cover each other in ─────────────────
       Five levels, named, because the numbers were per-surface and one of them
       was wrong in a way no screenshot catches. `.arcx` sat at 60, under
       `.panel`'s 71, so the explainer a member reaches THROUGH the More sheet
       opened BEHIND it: measured 2026-09-19 on both engines, with
       elementFromPoint landing on the sheet at every point of the card, so the
       card's own button could not be pressed at all and Escape was the only
       way out. A tie is broken by document order, which is why these are four
       numbers and not fourteen — two surfaces at the same level are two
       surfaces where the later one in the markup is the later one on screen.

       The rule the names carry: A SURFACE RAISED FROM ANOTHER MUST COVER IT. */
    --z-view:   60;   /* a full-screen view: the globe, an opened print */
    --z-ground: 70;   /* the dimmed room behind a sheet */
    --z-sheet:  71;   /* a bottom sheet, panel, drawer or popover */
    --z-dialog: 90;   /* a card raised from one, which must cover it */
    --z-gate:  300;   /* a first-run or reconnect gate, over everything */

    /* ── overlays ── */
    /* tooltip width cap. app.js reads this to predict the edge-flip, so the
       value must live here, once — a JS copy drifted and clipped tips (#124) */
    --tip-max-width: 220px;

    /* ── shape ── */
    --radius-xs: 4px;   /* the speech-corner cut on a bubble */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;
    --radius-bowl: 18px; /* the vessel's beaker bottom */
    --radius-ribbon: 14px; /* a looked tool's floating ribbon and its picker */
    --radius-sheet: 20px;  /* the sheet a looked tool sits under */
    /* sticky notes (stickies.css, 2026-11-03): paper and its band, by colour,
       the same by day and night, the way a real note on a screen is */
    --sticky-ink: #2b2620;
    --sticky-ink-dim: rgba(43, 38, 32, .55);
    --sticky-line: rgba(43, 38, 32, .14);
    --sticky-shadow: 0 10px 28px rgba(20, 16, 10, .28), 0 2px 6px rgba(20, 16, 10, .18);
    --sticky-shadow-lift: 0 18px 40px rgba(20, 16, 10, .34), 0 4px 10px rgba(20, 16, 10, .2);
    --sticky-butter: #fff3a6;  --sticky-butter-band: #f7e276;
    --sticky-peach: #ffd9b8;   --sticky-peach-band: #f8c191;
    --sticky-mint: #cdf2d8;    --sticky-mint-band: #a8e3bb;
    --sticky-sky: #cfe6ff;     --sticky-sky-band: #a9d0fa;
    --sticky-lilac: #e5d9ff;   --sticky-lilac-band: #cdb9fb;
    --sticky-rose: #ffd3e1;    --sticky-rose-band: #f8b2c9;
    --sticky-arm: #c0392b;     /* the bin, armed: press again to delete */
    --z-stickies: 2147483000;  /* above everything else the room draws */
    /* the looked tool's glass is light and shade over the tool's own colours */
    --tl-white: #fff;
    --tl-black: #000;
    --tl-umber: #281e14; /* the warm shade under a day-coloured ribbon */
    --radius-round: 999px; /* a fully round control (mobile send) */
    --veil: rgba(20, 18, 12, 0.45); /* dimmed ground behind a confirm */
    /* the browse brake: a dark pill over any page, the same in every room */
    --brake-bg: rgb(22 19 16 / .94);  --brake-bg-hover: rgb(40 34 28 / .97);
    --brake-edge: rgb(255 255 255 / .22);  --brake-ink: #fbf4e8;
    --brake-shadow: 0 0 0 1px rgb(0 0 0 / .35), 0 10px 30px rgb(0 0 0 / .45);
    /* Bitwarden's brand blue, deliberately not ours (browse.css sign-in menu) */
    --bw: #175ddc;  --bw-wash: #175ddc1f;  --bw-hover: #1252c4;
    /* the browse key's states: signed in (and its lit dark-room form), waiting, expiring soon */
    --key-on: #1f9d55;  --key-on-lit: #4ade80;  --key-wait: #d97706;  --key-soon: #d99a2b;
    /* the undo toast on a sticky board: light type on the sticky ink */
    --sticky-toast-ink: #f6f1e6;

    /* ── the spectrum hairline and the calm arrival, shared by modals,
       boards and store heroes so they read as one family ── */
    --spectrum: linear-gradient(90deg, var(--pen), var(--ember) 34%, var(--invite) 68%, var(--moss));
    --spectrum-weight: 2px;
    --ease-calm: cubic-bezier(.16,1,.3,1);
    --dur-calm: .6s;
    --hero-ratio: 16 / 9; /* a store hero: a picture of the thing working */
    --hero-ratio-stacked: 2 / 1; /* shorter when it sits above the words */
    /* a hero on a card: a wash, never a picture to read */
    --wash-opacity: .16;
    --wash-opacity-up: .24;
    /* every hero, softened into the room: a touch dimmer, calmer colour,
       gentler contrast, and the night drawn faintly over its edges */
    --hero-soften: brightness(.9) saturate(.8) contrast(.94);
    --hero-veil: color-mix(in srgb, var(--globe-art-night) 12%, transparent);
    --hero-vignette: inset 0 0 48px color-mix(in srgb, var(--globe-art-night) 32%, transparent);
    --wash-mask: linear-gradient(to left, #000 0%, rgba(0,0,0,.45) 40%, transparent 78%);

    /* ── the magic paintbrush (paintbrush.css): the same night in every
       theme, because the room is dimmed behind it either way ── */
    --mb-dim:      rgba(6, 8, 22, .52);
    --mb-dim-deep: rgba(6, 8, 22, .58);
    --mb-glass:    rgba(16, 16, 46, .96);
    --mb-hint-bg:  rgba(14, 14, 40, .86);
    --mb-ink:      #eef0ff;
    --mb-ink-2:    #c9cde8;
    --mb-ink-dark: #1a1030;
    --mb-hair:     rgba(255, 255, 255, .16);
    --mb-hair-2:   rgba(255, 255, 255, .3);
    --mb-hair-3:   rgba(255, 255, 255, .5);
    --mb-wash:     rgba(255, 255, 255, .07);
    --mb-pink:     #ff6fa8;
    --mb-blush:    #ffb6dc;
    --mb-gold:     #ffd27a;
    --mb-glow-1:   rgba(255, 120, 200, .55);
    --mb-glow-2:   rgba(90, 170, 255, .35);
    --mb-glow-3:   rgba(199, 125, 255, .25);
    --mb-glow-4:   rgba(255, 160, 220, .6);
    --mb-shine:    rgba(255, 255, 255, .45);
    --mb-shadow:   rgba(0, 0, 0, .45);
    --mb-rainbow:  #ff6fa8, #ffb547, #5cf0a8, #5aa8ff, #c77dff, #ff6fa8;
    --mb-rainbow-soft: rgba(255,95,162,.16), rgba(255,181,71,.16), rgba(92,240,168,.16), rgba(90,168,255,.16), rgba(199,125,255,.16), rgba(255,95,162,.16);
    --radius-spot: 16px; /* the lit window the paint leaves */

    /* ── controls: one tap-target size + its touch variant ── */
    --control: 32px;
    /* The size a drawn glyph is, inside whatever box it sits in. Every icon in
       this app has been 16 since the mockups; the number was typed by hand in
       components.css (`.icon-btn svg`) and panels.css (`.gs-i`) and nowhere
       named, so a new rule had no way to ask for it. Named here 2026-09-19 so
       new rules stop guessing. The existing hand-typed 16s are left where they
       are — they are Dan's sheets and a rename pass is not a phone pass. */
    --glyph: 16px;
    /* The smallest a target may be and still be hit: WCAG 2.5.8 Target Size
       (Minimum), AA. NOT a smaller --control-touch — that is the size a
       control is DRAWN at, this is the floor its HIT AREA may not go under,
       which is why the things that use it (the tab bell, the mind bar's caret,
       the globe's kind toggles) grow their box and leave their glyph alone. */
    --hit-min: 24px;
    /* A ring drawn on the page around a control, and the gap that keeps it off
       the control's own edge — one number for both, because they have always
       been the same number. A focus ring and the ring that carries a state
       under forced colors are the same object at two moments. */
    --ring: 2px;
    /* 44px is the floor a fingertip needs (WCAG 2.5.5 AAA); 38 was the old
       value and every visible target on a phone sat under it. Raised
       2026-09-19. Consumers: the composer's attach/mic/send, .icon-btn /
       .close-btn / .ribbon-widget under (hover:none) and (pointer:coarse),
       and the ledger's workings toggle.

       IT COSTS HEIGHT, AND THE SHORT TIER ABOVE IS WHAT PAYS IT BACK. Measured
       on this build at 390x844 with the token pushed back to 38 and nothing
       else changed: the header goes 159 to 171 and the composer 196 to 202, so
       the conversation loses 18px at a phone's normal height. Read the tier
       first and this second; they pull in opposite directions and the tier is
       the larger number wherever it fires. Any further growth of a finger
       target is a layout decision, not a token one. */
    --control-touch: 44px;
    /* The tab strip's own line. Shared, because the ledger's search sits on
       the same line across the page and was measuring by eye: --tab-top is the
       space above the first tab, --tab-h is a tab (8px + a --text-sm line +
       8px). Change a tab's padding and both columns still agree. */
    --tab-top: 10px;
    --tab-h: 37px;
    /* controls that sit ON the text row (composer mic/send). Equal to
       --control-touch today by coincidence, not by meaning — this one tracks
       the text line box, that one tracks a finger */
    /* ── the globe (2026-08-22) ── the five kinds, and the sphere's own body.
       Kind colours are DECLARED (a human decision, legible at a glance) while
       a node's position is COMPUTED from its embedding. Orange is absent on
       purpose: it means the thing you are in and the primary action, and a
       kind that owned it would collapse both. */
    /* Chosen by simulating protanopia, deuteranopia and tritanopia and scoring
       the WORST pair, because a categorical palette is only as good as its
       closest two. Sky and yellow are Okabe-Ito unchanged; the other three were
       searched. Against the previous set this roughly doubles the worst-case
       separation. There is no Obsidian convention to inherit: colour groups
       there are per-vault, set by folder or tag.
       These are the LIGHT values. Yellow at its dark-theme brightness reads
       1.17:1 on this ground, which is invisible, so each kind has a second
       value below rather than one value asked to serve two rooms. */
    /* Seven kinds. The sixth paid for itself (the old collision was endeavor
       and someone, two blues a third of the population could not separate) and
       the seventh, idea, was added on 2026-08-23 after a fifty-note sample
       found three notes that answer no to all six of the other questions. An
       idea stream is defined by NOT being a plan, so falling through to plan
       misfiled it.
       Idea is the achromatic one, and that is the meaning as well as the
       measurement: it is the node that has not taken a colour yet. It also
       sits below the six in lightness, because an uncommitted thought should
       not be the loudest thing on the map.
       CORRECTED 2026-08-23. This comment used to claim a closest pair of 19.3.
       That number was CIE76 across protan and deutan only. Re-measured with
       CIEDE2000 across protan, deutan AND tritan, the real figure for the six
       was 5.9 on night and 5.4 on daybreak, both of them session against plan
       under tritanopia. Nothing was repainted over it: tritanopia is rare and
       is not sex-linked, so the trade stands. But a margin that was never
       measured should not be written down as if it were. Idea clears 12.0 on
       night and 12.9 on daybreak, which is twice what the palette already
       tolerates. Method: Machado 2009 simulation matrices at severity 1.0,
       CIEDE2000, swept against the sky and the visibility ring as well as
       against the other kinds. */
    /* Lit for the sea, not for the paper. These are read ONLY by the globe
       (and by the legend under it, which takes the globe's own palette), so
       they follow the sphere rather than the page. Against deep ocean the old
       daylight set (#25077E and friends) was ink on navy: seven kinds that all
       read as one dark speck. Same values the night theme uses, because the
       surface they sit on is now the same surface. */
    /* THE MINERAL PALETTE, ON THE GLOBE (2026-09-26; hues defined with the
       lands below). Each kind wears one of the seven identities, LIT FOR THE SEA: the
       canonical hue lifted in OKLab lightness so a tiny node survives the
       dark water, Iris and Fern most (Dan asked for Iris and Mulberry to get
       more here than in the UI; Fern needs it to clear the green sea). On the
       lamplit core every kind is 3.0-4.0:1 and 4.0:1+ on open water, before
       the bloom. Worst pair as drawn: protan 3.3, deutan 3.6, tritan 5.9. An
       idea is Fern, a seedling: still the quiet end, no longer grey. */
    /* THE PALE SEA (Dan, 2026-09-26: the slate-green globe read too heavy,
       and he chose pale mint from a trial of three). A first pass drew the
       seven hues down to 3:1 on the sea and Dan found them "too dark and
       shadowed against the mint". So they went the other way: lighter and
       CLEARER, each hue at OKLab L ~.72 with as much chroma as the gamut
       allows (up to 1.35x the land's), landing 2.3:1 on the sea. That is
       under the 3:1 a graphic would want on paper, traded on purpose for the
       airy feel; hue does the separating, and the closest pair (plan/idea)
       is still ~0.1 apart in OKLab. Framed in white: sorbet, not neon.
       DAYBREAK (same evening) put the jade planet back under them, so the
       seven are now the portal's node recipe per hue, hsl(h, 85%, 79%):
       bright pale points with a faint local light, which is what reads on
       mid-dark land.
       THE INK GLOBE (Dan, same evening: "an ink globe here in this theme",
       nodes "mostly shades of grey to white on it with outlines", in the hand
       of the landing page's ink drawing). The kinds are ONE HAND now: seven
       OKLab steps from .97 down to .61, each with a whisper of its old hue
       (chroma .035) so neighbours can still be told apart, outlined in white,
       no glow.
       EBONY WON (Dan, same evening), with colour back on it: "red and yellow
       and cyan and green nodes ... as well as white and purple". So the hand
       keeps its outline and loses the glow, and the seven are jewels on black
       stone: purple, cyan, red, green, white for craft (the made thing), and
       yellow, with idea the one warm grey, still the quietest mark. Red and
       green differ in lightness as well as hue, which is what keeps them
       apart for a red-green eye; the legend carries the names. */
    --kind-person:    #b69cff;   /* Iris */
    --kind-session:   #5ad2e6;   /* Ocean */
    --kind-decision:  #ff6a5c;   /* Coral Clay */
    --kind-plan:      #5fd38a;   /* Sea Glass */
    --kind-craft:     #f3efe7;   /* Mulberry */
    --kind-reference: #f4cf4a;   /* Golden Reed */
    --kind-idea:      #a09a90;   /* Fern */
    /* Coastlines. Ink rather than a hue, for the same reason the visibility
       marks are: the seven kinds own colour, and a border that borrowed one
       would read as an eighth kind. Resting is barely there, because five
       borders shouting at once is a quilt; the one in hand steps forward. */
    /* the pale sea takes the forest ink, as the page's own lines do */
    --coast:      rgba(255,255,255,.26);
    --coast-on:   rgba(255,255,255,.82);
    --coast-fill: rgba(255,255,255,.05);
    /* Who else can see it. Not from the kind palette and never the orange:
       borrowing a meaning-carrying colour would read as a sixth kind. Ink
       rather than hue, so the mark is a count of rings and stays legible under
       every colour vision. */
    --see-trusted: rgba(255,255,255,.5);
    --see-public:  rgba(255,255,255,.9);
    /* the hole punched through a note more than one part of the brain pulls on */
    --pip: rgba(20,26,50,.92);
    --landmark: var(--ink);        /* the planted plant on the globe (plant.js) */
    --thumb: rgba(32,32,62,.20); --thumb-on: rgba(32,32,62,.36);
    /* The primary action carries orange on its edge rather than as a slab, so
       orange still means action without shouting across a calm room. The fill
       is the inverse of night's: a warm wash against a cool lilac ground,
       where midnight would have sat on the page like a hole. */
    /* THE READING ROOM'S ACTION IS GREEN (Dan, 2026-09-26: "well suited to
       the green instead of the coral orange"). The primary button is a solid
       green-black cut from the globe's own water (see the sea below), so the
       one thing to press is the same material as the world rather than a
       warm patch laid on it. Stop (--halt) sits deeper, so Send and Stop
       remain two different buttons. On Daybreak the button is cut from the
       jade planet again, a step below its land. */
    --act:      #3d5184;   /* jade at 31%, the planet's body */
    --act-edge: #2f406c;   /* a step deeper */
    --act-ink:  #ffffff;   /* white on jade */
    /* HOVER AND FOCUS, split from the pen. 118 hover, focus-visible and
       focus-within rules used the brand orange for "you are pointing at
       this"; they read these instead. Mint: deep green (5.8:1 as text), a
       mid green edge, a green wash. Night aliases all three straight back to
       the pen, so Cosmos draws exactly what it did. */
    --hover-ink:  #2f406c;
    --hover-edge: #5a6ea3;
    --hover-wash: #e4e5ec;
    /* CURRENT / PRESSED, the same split for a control that is ON: a pinned
       ritual, a pressed toggle, the chosen option, the tab you are in when it
       has no region. Green in the reading room, the pen in night. The course
       and journey marks keep the pen: there it means the stop you are at. */
    --here-ink:   #2f406c;
    --here-edge:  #3d5184;
    --here-wash:  #e1e4ef;
    /* TOOLTIPS stay light in the light room (Dan, 2026-09-26: light text on a
       dark chip is what the light theme exists to avoid). A raised mint card
       in ink, 11:1. Night keeps its inverted chip. */
    --tip-bg:   var(--paper-up);
    --tip-ink:  var(--ink);
    --tip-edge: var(--rule);
    /* THE KINDLE HIGHLIGHT (2026-09-26). On Kindle's green page a highlight
       is colour BEHIND ink: a translucent wash that blends with the page,
       words staying dark, nothing glowing. The reading room follows it for
       everything that marks text or asks for attention. Golden Reed is the
       default highlighter, the way yellow is Kindle's. */
    --select-wash: rgba(197,162,75,.34);   /* selected text */
    --mark-wash:   rgba(197,162,75,.38);   /* ==highlighted== words */
    /* the owed ritual (sun and bed): highlighted, not lit */
    --due-bg:          rgba(197,162,75,.24);
    --due-edge:        rgba(122,95,18,.45);
    --due-sun:         #6f5610;             /* dark ochre on the wash */
    --due-glow:        #c5a24b;
    --due-glow-blur:   0px;                 /* the pulse is a widening wash, not a blur */
    --due-glow-spread: 4px;
    --arc-body:        #b08a2e;             /* the sun's place on the day arc: reed, not the pen */
    /* the ground moves down in step with --paper, all three stops together,
       so the gradient stays the same shape in a slightly dimmer room */
    --ground: radial-gradient(1100px 700px at 50% -12%, #fbf9f4 0%, #f4f0e8 42%, #ebe5da 100%);
    --sky:
      /* A page has no weather. Daybreak's sky carried a sunrise and three
         coloured blooms; the reading room keeps only the soft pool of light
         behind the globe, like a lamp over a book, so nothing in the room
         competes with the words. */
      radial-gradient(820px 660px at 46% 52%, rgba(255,252,245,.7), rgba(255,250,240,.25) 58%, transparent 80%),
      radial-gradient(46vw 46vw at 62% 92%, rgba(120,96,64,.07), transparent 62%);
    /* ── the sea (daybreak) ──────────────────────────────────────────────
       Dan, 2026-08-23: on daylight the globe should read like Earth, "vibrant
       almost like in the universal pictures rotation globe, looking more like
       lots of blue water".

       The old daylight sphere was a pale lavender-grey, chosen so it would not
       read as a ghost against white paper. It solved that and lost the thing
       worth having: a member's whole life drawn on a world. Ocean instead, lit
       from the middle and deepening to the limb, with an atmosphere on the rim.

       This makes the globe a DARK OBJECT IN A LIGHT ROOM, which is the honest
       description of Earth seen from anywhere, and it is why the node colours
       and the coastlines below stop forking by theme: what is drawn on the sea
       is lit for the sea, in both themes. */
    /* THE READING ROOM'S SEA (2026-09-26). The globe is drawn in the page's
       own ink: a deep slate-green, the colour of the Kindle's text taken up
       into a sphere, so the world reads as the darkest, most solid thing on
       the page the way a paragraph does. Deliberately LOW CHROMA. A saturated
       green sea would swallow the plan emerald and the mint and lime lands;
       a desaturated one leaves every kind and region its own hue, which is
       exactly what the night navy already does. Kind colours, coastlines,
       labels and the art stay lit for a dark sea, unchanged. The sunlit blue
       ocean read as a second room pasted into a green one. */
    /* Back to the lighter slate-green (Dan, 2026-09-26, once the keyline
       made raised nodes hold their shape on mint). The primary button is cut
       from this same water (--act = --globe-core). */
    /* THE PALE SEA (Dan, 2026-09-26). The slate-green read too heavy; the
       map is now a paler mint than the page, so the world belongs to the room
       and the small deep kinds carry the foreground. It darkens a little
       toward the limb so it still reads as a sphere. Chosen by eye over
       alabaster and sage in a live trial. Replaced the same evening by
       Daybreak's jade planet: the portal's Care and learning family
       (#59BE98, h 157) at its Daybreak land saturation, 29%, lit at 45 / 39
       and falling to a deep jade limb. Then ink: the room's own navy ink
       taken up into a sphere, lit at #33335c and falling to near-black. Then,
       chosen over ink and alabaster, EBONY: a warm black stone with pale veins
       that live on the sphere and turn with it (--globe-marble). The pool of
       light behind it (--sky) went from the reading room's mint to warm
       lamplight, so the stone sits in a warm room inside the cool page. */
    --globe-core: #3d5184;                /* lamplit mid-face */
    --globe-mid:  #2f406c;                /* open water */
    --globe-edge: #1a2444;                /* the limb, where it turns away */
    --globe-marble: .45;                  /* pale veins in the stone (globe.js drawMarble) */
    --globe-vein:   rgba(214,180,110,.55);
    --globe-shadow: rgba(48,36,24,.38);   /* the stone resting on the desk (globe.js drawDesk) */
    --globe-rings:  rgba(32,32,62,.22);   /* the instrument's engraved limb, in the ink */
    --globe-dark: 1;                      /* the sea is dark: art on the nodes is lit for it (app.js seaArtTheme) */
    --brass:        #9a7020;              /* the instrument's metal: needs-you counts, the bed's receipt */
    --kind-dot-ring: 0 0 0 1px rgba(32,32,62,.35);  /* the kind key's dots on paper: an ink ring, never a glow */
    --count-bg: #dfe3f0;  /* waiting: a lapis wash, the number in lapis */
    --count-ink: #2f406c;
    --count-edge: #fbf9f4;  /* lifted off whatever it sits on by the raised paper */
    --count-needs-bg: #f1e3bf;  /* needs you: brass */
    --count-needs-ink: #6b4c0c;
    --count-done-bg: #e6e0d4;  /* just saved: the quietest */
    --count-done-ink: #5a5a72;
    --count-kept-bg: #fbe3d8;  /* kept: the pen */
    --count-kept-ink: #a13c14;
    --globe-rim:  rgba(200,210,240,.4);  /* atmosphere: pale lapis light */
    /* the limb where a page shows around the sphere (the store hero): the key
       light, a weaker second source, and the deep water side. Each alpha is
       that source's full strength; the renderer scales down from it by angle */
    --globe-limb:      rgba(255,250,240,.9);
    --globe-limb-warm: rgba(238,224,200,.85);
    --globe-limb-deep: rgba(30,40,70,.5);
    --control-lg: 38px;
    /* the floor a text input needs so phone browsers never focus-zoom.
       max(), not 1rem alone: a member who sets their browser text SMALLER
       would otherwise drag this under 16px and hand iOS the zoom back. This is
       a threshold the platform tests, not a size in the type scale. */
    --text-touch: max(1rem, 16px);

    --shadow-drawer: -18px 0 40px -24px rgba(20,22,30,.5);

    /* ── the inkwell (v7 vessel) + the day's own colors ── */
    --pen-deep:    #1d3467;              /* bottom of the ink */
    --glass-glare: rgba(255,255,255,.32); /* the meniscus line */
    --shadow-glass: inset -5px 0 9px -6px rgba(27,33,48,.35), inset 5px 0 7px -6px rgba(255,255,255,.7);
    /* ── stopping is not an alarm (daybreak) ─────────────────────────────
       Dan, 2026-08-23: the Stop button wants "a much more calming color that
       goes with the general sense of daybreak at sea, so calm instead of the
       orange".

       He is right about more than the hue. Ember means DUE in this palette,
       and stopping is neither due nor destructive: it is the member deciding
       they have heard enough, which is an ordinary and rather calm thing to
       do. A hot button there frames a normal choice as an emergency. Sea
       instead, the same water the globe is now made of. */
    --halt:      #1a2444;  /* deeper than Send (--act), so the two never read as one button */
    --halt-edge: #111a33;
    --halt-ink:  #ffffff;
    --sunrise:     #c8912f;              /* the sun button when the morning is owed */
    /* ── the lands (Astrolabe 14) ────────────────────────────────────────
       One colour per region, so a coastline on the globe and the dot beside
       its row in the rail are obviously the same place. Assigned by the
       region's position in `context/regions.md`, which means the order the
       member chose decides the colours and the same vault draws the same map
       every time.

       Eight, deliberately. A member with more named regions than this has
       more than a rail can usefully hold anyway, and the ninth wrapping back
       to the first is a smaller lie than nine hues nobody can tell apart.
       Chosen for separation at low saturation against navy, and each one is
       darkened for daylight below rather than reused, because a line that
       reads on cosmos disappears on paper. */
    /* The lands are drawn ON the sea, so on daybreak they stay bright: the
       darkened-for-paper set that lived here read as ink on ocean and lost
       five coastlines at once. The rail dot uses the same value at 7px on
       paper, where a bright dot is a dot rather than a line, so one set
       serves both. */
    /* The lands are one palette on two grounds. The coast is drawn on ocean,
       where bright is correct; the rail dot is drawn on paper, where the same
       value is a pale speck. Rather than a second set of eight tokens that
       could drift out of step with the first, the dot wears a filter. One
       palette, one identity per region, legible in both places. */
    --land-on-paper: brightness(.72) saturate(1.05);  /* the mineral hues need far less correction than neon did */
    /* ── tabs are glass (daybreak) ───────────────────────────────────────
       Dan, 2026-08-23: in light mode the tabs should be "more translucent
       replicas of the background behind so they are like glass with just very
       slight opacity".

       They were `--paper-sunk`, an opaque slab, which on daybreak read as five
       grey cards laid over a soft gradient sky: the one place in the interface
       that looked stuck on rather than part of the room. Almost nothing, plus a
       blur, so what shows through IS the sky behind them. The active one takes
       a little more white, because the tab you are in should be the one that
       has caught the light. */
    /* Translucent like Cosmos (Dan, 2026-09-26): the same near-nothing glass
       and faint edge the night tabs wear, so only the region hem carries
       colour. The active tab lifts a touch more than night's .11 because
       white on a light room reads fainter than white on navy. */
    --tab-glass:     rgba(255,255,255,.06);
    --tab-glass-on:  rgba(255,255,255,.16);
    --tab-edge:      rgba(32,32,62,.10);
    --tab-edge-on:   rgba(32,32,62,.16);
    --tab-blur:      blur(10px) saturate(1.15);
    /* The day's own arc. It was `--rule`, the structural hairline, which is
       correct for a line that separates two things and far too faint for a line
       that IS something: this one is the path the sun walks between waking and
       winding down, and on daybreak it had all but vanished. */
    --arc-line: rgba(32,32,62,.48);
    /* The sun and the moon sit ON that arc, so their coins are glass too, and
       slightly deeper than the tabs: a full `--paper-up` disc read as two
       stickers punched over the sky. */
    --coin:      rgba(255,255,255,.12);  /* glass like the tabs, not a white disc */
    --coin-edge: rgba(32,32,62,.14);
    /* A count is good news. It says a place has things in it, or that something
       is waiting to be put away, and neither is a warning. Ember means DUE in
       this palette and rendered as gold-brown on paper, which is the one note
       this room does not have. Sea, the water the globe is made of. */
    --tally:     #2f406c;
    /* ── THE MINERAL PALETTE (reading room, 2026-09-26) ───────────────────
       Dan: the neon set read as "fluorescent confetti laid on top of the
       interface". Seven identities from sea glass, stone and plants, each one
       CANONICAL HUE here and derived per context rather than pasted
       everywhere:
         --land-N / the kind tokens  the hue itself (coastlines, tab hems)
         globe                       the kind tokens below are lit for the sea
         rail                        --land-dot-mix draws it toward the ink
         tabs                        --tab-tint / --tab-tint-on into the glass
       Region order keeps its old hue family, so every place is still
       recognisably itself: 1 Ocean, 2 Coral Clay, 3 Sea Glass, 4 Iris,
       5 Golden Reed, 6 Mulberry, 7 Fern, and 8 Driftwood, the one neutral, for
       the rare eighth region. Two targets moved: Fern went darker (#7FA765 ->
       #5E8A4A) and Coral Clay lighter (#D97B6B -> #E08878), because at equal
       lightness the pair was 0.6 apart under deuteranopia, which is the same
       colour. Worst pair now: protan 6.6, deutan 5.0, tritan 5.1 (OKLab,
       Machado 2009). Night keeps its own set.
       LAPIS, BONE AND BRASS (Daybreak, 2026-09-27). The mineral set went muddy
       on bone and the Ocean coast vanished into the lapis globe, so the lands
       join the globe's jewel family, each bright enough to read as a coast on
       lapis (Ocean lifts to sky). On paper the rail deepens them toward black
       in oklch (--land-dot-mix), which keeps the hue, rather than greying
       them toward the navy ink. */
    --land-1: #7cc4f5;   /* Ocean */
    --land-2: #ff8a78;   /* Coral Clay */
    --land-3: #4fd6bf;   /* Sea Glass */
    --land-4: #b7a4ff;   /* Iris */
    --land-5: #f0c75a;   /* Golden Reed: ochre, pollen, brass; never highlighter */
    --land-6: #ec8fd0;   /* Mulberry */
    --land-7: #8fd46a;   /* Fern */
    --land-8: #d9cbb5;   /* Driftwood */
    /* a contest light in a shared world (4.12): the template's own colour, never
       a member's and no land's hue, a cool starlight that reads apart from all eight */
    --contest: #f2f6ff;
    /* derived presentations; night resets every one of these to its old look */
    --land-dot-rest: 1;        /* a legend node is crisp, not dimmed */
    --land-dot-mix:  72%;      /* hue toward ink: every dot 3:1+ on mint */
    --kind-on-paper: 72%;      /* the kind key under the globe, drawn toward the ink on paper */
    --land-ring-w:   2.5px;    /* the node's own faint halo */
    --land-on-blur:  0px;      /* selected: a crisp ring, not a glow */
    --land-on-ring:  2px;
    --land-on-mix:   62%;
    --tab-tint:      0%;       /* glass stays clear; the hem carries the region */
    --tab-tint-on:   0%;
    --node-bloom:    0;        /* the node's faint local light, as the portal draws it */
    --coast-glow:    0;        /* the coastline's halo, a fraction of night's */
    --node-stroke-w: .9;      /* a soft white rim, as the portal's nodes wear */
    --node-stroke:   rgba(245,240,230,.75);
    /* first light: the one sunrise, played once ever. A light source reads the
       same against either ground, so these do not fork by theme. */
    --dawn-hot:    #fff6e8;              /* the middle of the sun */
    --dawn-warm:   #ffb46b;              /* the body of it */
    --dawn-pip:    rgba(255,255,255,.95);/* a star coming out */
    --text-hero:   2.125rem;             /* 34px — the one big number beside the glass */
  }

  /* ── ONE PHONE STEP, AND ONLY ON THIS TOKEN ──────────────────────────────
     --text-hero is the one size in the scale that is drawn as a HEADLINE and
     does not move with the window. The --head-* ladder clamps itself, --text-xl
     at 22px already reads on a phone, and every other step is a control or a
     line of running copy that must not grow or shrink. This one was 34px on a
     390px screen: four lines of serif before the first sentence, measured on
     the arc explainer at 831px tall inside an 844px viewport (2026-09-19).
     Its two consumers are the arc's hook and the brain's own name, and both
     want the same smaller step, so it is a token change rather than two rules.
     The short tier takes the same step: a phone turned sideways is 844px wide
     and 390px tall, and the width arm alone gave it the monitor headline (#309).
     A bare max-height also fired on a short desktop window (1280x580), so the
     short arm is scoped to landscape + touch, which a desktop window never is */
  @media (max-width: 719px), (orientation: landscape) and (max-height: 500px) and (pointer: coarse) {
    :root { --text-hero: 1.625rem; }   /* 26px */
  }

  /* The reading room set its running face in Amazon Ember for a day; the new
     Daybreak (2026-09-26) is the portal's room, which reads in Instrument
     Sans under Fraunces, so both rooms share the default --body again. */

  /* night: the same room with the lights low — hue-stable, contrast-checked.
     The explicit toggle wins in both directions; system preference fills in
     when the member hasn't chosen (three-state theme). */
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {

    --kind-person:    #9d7bff;
    --kind-session:   #5BC8F5;
    --kind-decision:  #E86A6A;
    --kind-plan:      #34D399;
    --kind-craft:     #F472B6;
    --kind-reference: #F0E442;
    --kind-idea:      #7A8888;
    --coast:      rgba(233,236,255,.26);
    --coast-on:   rgba(233,236,255,.62);
    --coast-fill: rgba(233,236,255,.06);
    --see-trusted: rgba(233,236,255,.40);
    --see-public:  rgba(233,236,255,.86);
    --pip: rgba(255,255,255,.92);
    --landmark: var(--pip);
    /* the sphere reads as a pale ghost on light unless its body is darker than
       the page it sits on, which is the opposite of the dark theme's job */
    --globe-core: rgba(43,43,98,.55);
    --globe-mid:  rgba(23,23,66,.5);
    --globe-edge: rgba(10,10,36,.55);
    --globe-marble: 0;
    --globe-shadow: ;
    --globe-rings: ;
    --brass: initial;
    --kind-dot-ring: initial;
    --count-bg: initial;
    --count-ink: initial;
    --count-edge: initial;
    --count-needs-bg: initial;
    --count-needs-ink: initial;
    --count-done-bg: initial;
    --count-done-ink: initial;
    --count-kept-bg: initial;
    --count-kept-ink: initial;
    --globe-rim:  rgba(150,175,255,.22);
    --globe-limb:      rgba(168,190,255,.36);
    --globe-limb-warm: rgba(184,142,216,.36);
    --globe-limb-deep: rgba(96,140,224,.36);
      /* Cosmos night. Running copy is --ink-2, never --ink: paper white at
         paragraph length glares on a dark ground and the eye starts to buzz
         within about ten minutes. Nobody notices in a screenshot; everybody
         notices at hour three. */
      --thumb: rgba(255,255,255,.15); --thumb-on: rgba(255,255,255,.3);
    --act:      #1d1d4e;
    --act-edge: #f15a24;
    --act-ink:  #ffffff;
      --act:      #1d1d4e;
      --act-edge: #f15a24;
      --act-ink:  #ffffff;
      --ground: radial-gradient(1100px 700px at 50% -12%, #20204e 0%, #16163f 40%, #0a0a1f 100%);
      --sky:
        radial-gradient(40vw 40vw at 20% 26%, rgba(45,163,203,.16), transparent 60%),
        radial-gradient(44vw 44vw at 82% 20%, rgba(241,90,36,.13), transparent 60%),
        radial-gradient(46vw 46vw at 62% 92%, rgba(16,185,129,.10), transparent 62%);
      --thumb: rgba(255,255,255,.15); --thumb-on: rgba(255,255,255,.3);
    --act:      #1d1d4e;
    --act-edge: #f15a24;
    --act-ink:  #ffffff;
      --act:      #1d1d4e;
      --act-edge: #f15a24;
      --act-ink:  #ffffff;
    --ground: radial-gradient(1100px 700px at 50% -12%, #20204e 0%, #16163f 40%, #0a0a1f 100%);
    --sky:
      radial-gradient(40vw 40vw at 20% 26%, rgba(45,163,203,.16), transparent 60%),
      radial-gradient(44vw 44vw at 82% 20%, rgba(241,90,36,.13), transparent 60%),
      radial-gradient(46vw 46vw at 62% 92%, rgba(16,185,129,.10), transparent 62%);
    --paper:      #16163f;
      /* ── COSMOS ELEVATION, 2026-09-16 ─────────────────────────────────
         The 2026-09-01 readability pass fixed the flat-field defect in
         daybreak and left cosmos holding it, which is the wrong way round:
         cosmos is the DEFAULT, so every member meets the unfixed room first.
         --paper-up was 1.10:1 on --paper and --paper-sunk 1.07:1 — the same
         rounding-error step (APCA Lc 0.0) apc-ai-course#228 described, in
         the theme nobody measured. Raised surfaces now lift 1.19:1 and sunk
         ones sit 1.13:1, matching the floors test/light-contrast.test.js
         already holds daybreak to.

         --paper itself does not move. Nobody has complained the night room
         is too dark, and changing the ground would repaint the whole app to
         fix a defect that is entirely about the steps off it */
      --paper-up:   #242453;
      --paper-sunk: #0a0a24;
      --rule:       #2e2e5c;
      --rule-soft:  #26264f;
      /* see the light room: a drawing gets a light slab under it in both */
      --art-backing: #f2f1f8;
      /* the course, in the coastline's own light; see the paper block above */
      --course-called: rgba(233,236,255,.64);
      --course-line:   rgba(233,236,255,.52);
      /* Lit for the sea rather than for paper. It has to clear the sphere it
         stands on (#22224f) by a wide margin, because the phase is now the
         biggest mark on the course and a dim big thing reads as a smudge. */
      --course-anchor: #8fa6ff;
      /* THE JOURNEY'S OWN STATE PALETTE (course view refinement, 2026-09-25).
         Every representation of a course (the route, the scrubber, the progress
         bar, the cockpit, the outline) draws from these and nothing else, so the
         same state is the same light everywhere. Five meanings, one hue each:
         travelled is emerald (the map's own line is the reference), current is
         the pen, open is the anchor blue, a gate is ice, and provisional has NO
         hue of its own: it is open, ghosted. Current is LIGHT, never a surface:
         --pen-wash is orange at 16% and over this navy it composites to brick,
         which is the brown this palette exists to retire. So the warm tokens here
         are for points, hairlines and a barely-there bloom, never for a card. */
      --journey-travelled:      #34D399;
      --journey-travelled-soft: rgba(52,211,153,.38);
      --journey-travelled-wash: rgba(52,211,153,.10);
      --journey-current:        #f15a24;
      --journey-current-line:   rgba(241,90,36,.60);
      --journey-current-glow:   rgba(241,90,36,.12);
      --journey-open:           #8fa6ff;
      --journey-open-soft:      rgba(143,166,255,.30);
      --journey-base:           rgba(143,166,255,.07);
      --journey-gate:           rgba(226,232,255,.84);
      --journey-glass:          rgba(30,30,72,.62);
      --journey-focus:          rgba(200,212,255,.80);
      --ink:        #eef0ff;
      --ink-2:      #c9cde8;
      --ink-3:      #8f93b8;
      --land-lab:   #8f93b8;
      --land-lab-on: #eef0ff;
      --land-cap: initial; --land-cap-on: initial;
      --pen:        #f15a24;
      /* one and the same on cosmos: the bright orange already reads on navy,
         so the light room's text-grade fork collapses back to the brand */
      --pen-ink:    #f15a24;
      /* STARLIGHT GLASS (Dan, 2026-10-07). Orange at 16% and amber at 14%
         composite to brick over this navy: the brown on the voice tip, the
         hover rows, the working widget, the warnings. A wash in cosmos is
         now a lift of starlight, the same family as the composer it sits
         on, and the warmth lives in the ink, the glyph and the edge, where
         orange reads as light. The light room keeps its own washes. */
      --pen-wash:   rgba(214,222,255,.075);
      --ember:      #f0a860;
      --veil:       rgba(0, 0, 0, 0.55);
      --ember-wash: rgba(255,228,200,.07);
      --trouble:    #ff6b5e;
      --moss:       #10b981;
      --moss-wash:  rgba(16,185,129,.14);
      /* the diff pair, lifted for cosmos (see the light block for the why) */
      --diff-add:      #10b981;
      --diff-add-wash: rgba(16,185,129,.15);
      --diff-del:      #f4718f;
      --diff-del-wash: rgba(244,113,143,.16);
      /* the fire spectrum and the gold, lifted for cosmos. White-hot really is
         white here, which is the one step the light column cannot have. */
      --flame-blue:    #6fa8ff;
      /* two tabs paired side by side (components.css .tab-pairline): a blue no
         tab state wears, so the line across a pair never reads as one */
      --pair-line:    #6fa8ff;
      --flame-white:   #eaf3ff;
      --flame-gold:    #ffd166;
      --grade-hero-size: 3.5rem;
      --flame-amber:   #ffd37a;
      --amber-deep:    #ffd166;
      --accent-eucalyptus:        #8cc7b0;
      --accent-eucalyptus-bright: #c2ecd9;
      --accent-eucalyptus-ink:    #c2ecd9;
      --item-edge-strength:       45%;
      --flame-orange:  #ff8c42;
      --flame-char:    #2a1620;
      --diff-add-gold: #ffd37a;
      /* dark: lifted so it glows on cosmos without shouting */
      --land-1: #7db8ff;
      --land-2: #ffb46b;
      --land-3: #7fe0c0;
      --land-4: #d79cff;
      --land-5: #ffd66b;
      --land-6: #ff9aa8;
      --land-7: #8fd3ff;
      --land-8: #b8e08a;
      --halt:      #2b6b8f;
    --halt-edge: #4f9dc4;
    --halt-ink:  #eaf6ff;
    --tab-glass:     rgba(233,236,255,.05);
    --tab-glass-on:  rgba(233,236,255,.11);
    --tab-edge:      rgba(233,236,255,.10);
    --tab-edge-on:   rgba(233,236,255,.18);
    --tab-blur:      blur(10px) saturate(1.1);
    --arc-line: rgba(233,236,255,.26);
    --coin:      rgba(233,236,255,.07);
    --coin-edge: rgba(233,236,255,.12);
    --tally:     #4f9dc4;
    --land-on-paper: none;   /* the rail sits on navy here */
    /* the reading room's derived presentations, set so night draws exactly
       what it drew before they existed (2026-09-26) */
    --node-bloom: 0;
    --hover-ink: var(--pen-ink);
    --hover-edge: var(--pen);
    --hover-wash: var(--pen-wash);
    --here-ink: var(--pen-ink);
    --here-edge: var(--pen);
    --here-wash: var(--pen-wash);
    --tip-bg: var(--ink);
    --tip-ink: var(--paper-up);
    --tip-edge: transparent;
    --select-wash: rgba(214,222,255,.24);   /* glass is too faint to read a selection by */
    --mark-wash: color-mix(in srgb, var(--flame-gold) 34%, transparent);
    --due-bg: var(--paper-up);
    --due-edge: currentColor;
    --due-sun: var(--sunrise);
    --due-glow: var(--ember);
    --due-glow-blur: 16px;
    --due-glow-spread: 2px;
    --arc-body: var(--pen);
    --coast-glow: 1;
    --node-stroke-w: 0;
    --node-stroke: transparent;
    --land-dot-rest: .75;
    --land-dot-mix: 100%;
    --kind-on-paper: 100%;
    --land-ring-w: 0px;
    --land-on-blur: 7px;
    --land-on-ring: 0px;
    --land-on-mix: 100%;
    --tab-tint: 0%;
    --tab-tint-on: 0%;
    --invite:      #96a8ff;
      --invite-glow: rgba(150,168,255,.55);
      --invite-wash: rgba(150,168,255,.14);
      --shadow:     0 1px 0 rgba(0,0,0,.3), 0 10px 30px -14px #000;
      --scrim:      rgba(0,0,0,.45);
      /* the ground under a picture: deeper than --scrim because a photograph needs the page gone, not dimmed */
      --scrim-deep: rgba(0,0,0,.86);
      --scrim-ink:  var(--ink-2);
      --pen-deep:    #33427a;
      --glass-glare: rgba(255,255,255,.18);
    }
  }
  :root[data-theme="dark"] {

    --kind-person:    #9d7bff;
    --kind-session:   #5BC8F5;
    --kind-decision:  #E86A6A;
    --kind-plan:      #34D399;
    --kind-craft:     #F472B6;
    --kind-reference: #F0E442;
    --kind-idea:      #7A8888;
    --coast:      rgba(233,236,255,.26);
    --coast-on:   rgba(233,236,255,.62);
    --coast-fill: rgba(233,236,255,.06);
    --see-trusted: rgba(233,236,255,.40);
    --see-public:  rgba(233,236,255,.86);
    --pip: rgba(255,255,255,.92);
    --landmark: var(--pip);
    /* the sphere reads as a pale ghost on light unless its body is darker than
       the page it sits on, which is the opposite of the dark theme's job */
    --globe-core: rgba(43,43,98,.55);
    --globe-mid:  rgba(23,23,66,.5);
    --globe-edge: rgba(10,10,36,.55);
    --globe-marble: 0;
    --globe-shadow: ;
    --globe-rings: ;
    --brass: initial;
    --kind-dot-ring: initial;
    --count-bg: initial;
    --count-ink: initial;
    --count-edge: initial;
    --count-needs-bg: initial;
    --count-needs-ink: initial;
    --count-done-bg: initial;
    --count-done-ink: initial;
    --count-kept-bg: initial;
    --count-kept-ink: initial;
    --globe-rim:  rgba(150,175,255,.22);
    --globe-limb:      rgba(168,190,255,.36);
    --globe-limb-warm: rgba(184,142,216,.36);
    --globe-limb-deep: rgba(96,140,224,.36);
    --thumb: rgba(255,255,255,.15); --thumb-on: rgba(255,255,255,.3);
    --act:      #1d1d4e;
    --act-edge: #f15a24;
    --act-ink:  #ffffff;
    --ground: radial-gradient(1100px 700px at 50% -12%, #20204e 0%, #16163f 40%, #0a0a1f 100%);
    --sky:
      radial-gradient(40vw 40vw at 20% 26%, rgba(45,163,203,.16), transparent 60%),
      radial-gradient(44vw 44vw at 82% 20%, rgba(241,90,36,.13), transparent 60%),
      radial-gradient(46vw 46vw at 62% 92%, rgba(16,185,129,.10), transparent 62%);
    --paper:      #16163f;
    /* the explicit-toggle twin of the elevation fix above; both blocks or
       the member who chose cosmos by hand keeps the flat room */
    --paper-up:   #242453;
    --paper-sunk: #0a0a24;
    --rule:       #2e2e5c;
    --rule-soft:  #26264f;
    /* the course, in the coastline's own light; see the paper block above.
       Written in BOTH cosmos blocks on purpose: the media-query one answers a
       machine set to dark, this one answers an explicit choice, and this one
       wins. Setting only the other left the globe painting the paper values on
       navy — invisible, and indistinguishable from the bug it was fixing. */
    --course-called: rgba(233,236,255,.64);
    /* .34 → .52 (13.7). Dan: the course line "makes it sort of fade into the
       background". It is the thread joining every mark on the voyage and it was
       drawn a full third quieter than the marks themselves. The wake's own
       under-stroke alpha came DOWN to compensate, so the rope gained a body and
       not a glow — see `globe.js`, and 1R.7's acceptance test still holds. */
    --course-line:   rgba(233,236,255,.52);
    /* And the anchor with them, for the reason the paragraph above gives. It
       was written into the media-query block only on the first pass and the
       explicit-choice block wins, so the globe painted the PAPER blue on navy —
       caught by reading the token off the live page rather than off the file. */
    --course-anchor: #8fa6ff;
    /* THE JOURNEY'S OWN STATE PALETTE (course view refinement, 2026-09-25).
       Every representation of a course (the route, the scrubber, the progress
       bar, the cockpit, the outline) draws from these and nothing else, so the
       same state is the same light everywhere. Five meanings, one hue each:
       travelled is emerald (the map's own line is the reference), current is
       the pen, open is the anchor blue, a gate is ice, and provisional has NO
       hue of its own: it is open, ghosted. Current is LIGHT, never a surface:
       --pen-wash is orange at 16% and over this navy it composites to brick,
       which is the brown this palette exists to retire. So the warm tokens here
       are for points, hairlines and a barely-there bloom, never for a card. */
    --journey-travelled:      #34D399;
    --journey-travelled-soft: rgba(52,211,153,.38);
    --journey-travelled-wash: rgba(52,211,153,.10);
    --journey-current:        #f15a24;
    --journey-current-line:   rgba(241,90,36,.60);
    --journey-current-glow:   rgba(241,90,36,.12);
    --journey-open:           #8fa6ff;
    --journey-open-soft:      rgba(143,166,255,.30);
    --journey-base:           rgba(143,166,255,.07);
    --journey-gate:           rgba(226,232,255,.84);
    --journey-glass:          rgba(30,30,72,.62);
    --journey-focus:          rgba(200,212,255,.80);
    --ink:        #eef0ff;
    --ink-2:      #c9cde8;
    --ink-3:      #8f93b8;
    --land-lab:   #8f93b8;
    --land-lab-on: #eef0ff;
    --land-cap: initial; --land-cap-on: initial;
    --pen:        #f15a24;
    --pen-ink:    #f15a24;
    --pen-wash:   rgba(214,222,255,.075);
    --ember:      #f0a860;
    --ember-wash: rgba(255,228,200,.07);
    --moss:       #10b981;
    --moss-wash:  rgba(16,185,129,.14);
    /* the diff pair, lifted for cosmos (see the light block for the why) */
    --diff-add:      #10b981;
    --diff-add-wash: rgba(16,185,129,.15);
    --diff-del:      #f4718f;
    --diff-del-wash: rgba(244,113,143,.16);
    /* the fire spectrum and the gold, lifted for cosmos. White-hot really is
       white here, which is the one step the light column cannot have. */
    --flame-blue:    #6fa8ff;
    /* two tabs paired side by side (components.css .tab-pairline): a blue no
       tab state wears, so the line across a pair never reads as one */
    --pair-line:    #6fa8ff;
    --flame-white:   #eaf3ff;
    --flame-gold:    #ffd166;
    --grade-hero-size: 3.5rem;
    --flame-amber:   #ffd37a;
    --amber-deep:    #ffd166;
    --accent-eucalyptus:        #8cc7b0;
    --accent-eucalyptus-bright: #c2ecd9;
    --accent-eucalyptus-ink:    #c2ecd9;
    --item-edge-strength:       45%;
    --flame-orange:  #ff8c42;
    --flame-char:    #2a1620;
    --diff-add-gold: #ffd37a;
    --land-1: #7db8ff;
    --land-2: #ffb46b;
    --land-3: #7fe0c0;
    --land-4: #d79cff;
    --land-5: #ffd66b;
    --land-6: #ff9aa8;
    --land-7: #8fd3ff;
    --land-8: #b8e08a;
    --halt:      #2b6b8f;
    --halt-edge: #4f9dc4;
    --halt-ink:  #eaf6ff;
    --tab-glass:     rgba(233,236,255,.05);
    --tab-glass-on:  rgba(233,236,255,.11);
    --tab-edge:      rgba(233,236,255,.10);
    --tab-edge-on:   rgba(233,236,255,.18);
    --tab-blur:      blur(10px) saturate(1.1);
    --arc-line: rgba(233,236,255,.26);
    --coin:      rgba(233,236,255,.07);
    --coin-edge: rgba(233,236,255,.12);
    --tally:     #4f9dc4;
    --land-on-paper: none;   /* the rail sits on navy here */
    /* the reading room's derived presentations, set so night draws exactly
       what it drew before they existed (2026-09-26) */
    --node-bloom: 0;
    --hover-ink: var(--pen-ink);
    --hover-edge: var(--pen);
    --hover-wash: var(--pen-wash);
    --here-ink: var(--pen-ink);
    --here-edge: var(--pen);
    --here-wash: var(--pen-wash);
    --tip-bg: var(--ink);
    --tip-ink: var(--paper-up);
    --tip-edge: transparent;
    --select-wash: rgba(214,222,255,.24);   /* glass is too faint to read a selection by */
    --mark-wash: color-mix(in srgb, var(--flame-gold) 34%, transparent);
    --due-bg: var(--paper-up);
    --due-edge: currentColor;
    --due-sun: var(--sunrise);
    --due-glow: var(--ember);
    --due-glow-blur: 16px;
    --due-glow-spread: 2px;
    --arc-body: var(--pen);
    --coast-glow: 1;
    --node-stroke-w: 0;
    --node-stroke: transparent;
    --land-dot-rest: .75;
    --land-dot-mix: 100%;
    --kind-on-paper: 100%;
    --land-ring-w: 0px;
    --land-on-blur: 7px;
    --land-on-ring: 0px;
    --land-on-mix: 100%;
    --tab-tint: 0%;
    --tab-tint-on: 0%;
    --invite:      #96a8ff;
    --invite-glow: rgba(150,168,255,.55);
    --invite-wash: rgba(150,168,255,.14);
    --shadow:     0 1px 0 rgba(0,0,0,.3), 0 10px 30px -14px #000;
    --scrim:      rgba(0,0,0,.45);
    /* the ground under a picture: deeper than --scrim because a photograph needs the page gone, not dimmed */
    --scrim-deep: rgba(0,0,0,.86);
    --scrim-ink:  var(--ink-2);
    --pen-deep:    #33427a;
    --glass-glare: rgba(255,255,255,.18);
  }

  /* ── DEEP SKY: the third room (Dan, 2026-10-14) ─────────────────────────
     Cosmos with the weather taken out: the repo world's indigo sky ("The
     Mark", sky #0f0f30 deepening to near-black, a soft vignette) behind the
     whole page, no coloured blooms. It is a dark theme in every other
     respect, so data-theme stays "dark" and data-depth="deep" rides beside
     it (lib.js applyTheme); anything that asks "is it dark?" keeps working.
     Last in the layer so it wins over both dark blocks above on source
     order. deep.css drops the hairlines between ribbon, rails, tabs and
     chat so the room reads as one surface. */
  :root[data-depth="deep"] {
    --paper:      #0f0f30;
    --paper-sunk: #08081e;
    --ground: radial-gradient(ellipse at 45% 40%, #0f0f30, #05050e);
    --sky: radial-gradient(ellipse 72% 70% at 46% 50%, rgba(0,0,0,0) 38%, rgba(0,0,0,.23) 100%);
    /* the chat box and the ribbon's buttons sit darker than the sky, a well
       rather than a raised card */
    --deep-well:      #07071a;
    --deep-well-edge: #1c1c44;
    --deep-box:       #151536;  /* halfway from the well to cosmos's #242453 */
    /* Stop and its soft-stop tray, in Send's periwinkle rather than cosmos's
       teal: a touch more lit than Send, so the two still never read as one
       button. The tray reads the same three, so it stays one piece with Stop. */
    --halt:      #232352;
    --halt-edge: #5a63a6;
    --halt-ink:  #e9ecff;
  }
}

@layer tokens {
  /* ── what it can reach: a restrained hierarchy (Dan, 2026-10-21) ──────────
     The information leads and the buttons support it. Three levels of text
     (a soft ivory title in the serif, a blue-slate description, a quieter
     slate for supporting status), one consistent reading axis down the left,
     and colour kept for meaning: lavender for the one primary action, green
     for the current chat, amber for the seatbelt when it is off. Everything
     else is neutral. Each theme sets its own values below: Daybreak (light),
     Cosmos (dark) and the deep sky inherit the same roles. */
  #accesspanel, .board-modal.reach {
    /* Daybreak */
    --acc-title: var(--ink);
    --acc-desc: #545e7b;
    --acc-status: #69728d;
    --acc-card: var(--paper-up);
    --acc-card-edge: color-mix(in srgb, var(--ink) 9%, transparent);
    --acc-card-hover: color-mix(in srgb, var(--invite) 4%, var(--paper-up));
    --acc-ground: color-mix(in srgb, var(--paper) 55%, var(--paper-up));
    --acc-btn: color-mix(in srgb, var(--invite) 15%, var(--paper-up));
    --acc-btn-hover: color-mix(in srgb, var(--invite) 22%, var(--paper-up));
    --acc-btn-edge: color-mix(in srgb, var(--invite) 30%, transparent);
    --acc-btn-ink: #2c3566;
    --acc-primary: #5a64c8;
    --acc-primary-hover: #4d57b8;
    --acc-primary-ink: #ffffff;
    --acc-quiet: #3f4ea0;
    --acc-safe: #f7ecd6;
    --acc-safe-edge: color-mix(in srgb, #92400e 30%, transparent);
    --acc-safe-ink: #7a3c0c;
    --acc-now: #0a6e4d;
    --acc-ring: color-mix(in srgb, #8d8ff0 55%, transparent);
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) :is(#accesspanel, .board-modal.reach) {
      --acc-title: #f1f0f8;
      --acc-desc: #aeb9d0;
      --acc-status: #98a4bf;
      --acc-card: color-mix(in srgb, #ffffff 3%, var(--paper-up));
      --acc-card-edge: color-mix(in srgb, #bbc4dd 13%, transparent);
      --acc-card-hover: color-mix(in srgb, #ffffff 6%, var(--paper-up));
      --acc-ground: color-mix(in srgb, #000000 18%, var(--paper-up));
      --acc-btn: color-mix(in srgb, #bbc4dd 10%, var(--paper-up));
      --acc-btn-hover: color-mix(in srgb, #bbc4dd 16%, var(--paper-up));
      --acc-btn-edge: color-mix(in srgb, #bbc4dd 18%, transparent);
      --acc-btn-ink: #eceef8;
      --acc-primary: #7b7fe0;
      --acc-primary-hover: #8a8eea;
      --acc-primary-ink: #ffffff;
      --acc-quiet: #c5cbf6;
      --acc-safe: color-mix(in srgb, #ffd166 13%, var(--paper-up));
      --acc-safe-edge: color-mix(in srgb, #ffd166 32%, transparent);
      --acc-safe-ink: #f3d39a;
      --acc-now: #7fd4b0;
      --acc-ring: color-mix(in srgb, #a9abff 70%, transparent);
    }
  }
  :root[data-theme="dark"] :is(#accesspanel, .board-modal.reach) {
    --acc-title: #f1f0f8;
    --acc-desc: #aeb9d0;
    --acc-status: #98a4bf;
    --acc-card: color-mix(in srgb, #ffffff 3%, var(--paper-up));
    --acc-card-edge: color-mix(in srgb, #bbc4dd 13%, transparent);
    --acc-card-hover: color-mix(in srgb, #ffffff 6%, var(--paper-up));
    --acc-ground: color-mix(in srgb, #000000 18%, var(--paper-up));
    --acc-btn: color-mix(in srgb, #bbc4dd 10%, var(--paper-up));
    --acc-btn-hover: color-mix(in srgb, #bbc4dd 16%, var(--paper-up));
    --acc-btn-edge: color-mix(in srgb, #bbc4dd 18%, transparent);
    --acc-btn-ink: #eceef8;
    --acc-primary: #7b7fe0;
    --acc-primary-hover: #8a8eea;
    --acc-primary-ink: #ffffff;
    --acc-quiet: #c5cbf6;
    --acc-safe: color-mix(in srgb, #ffd166 13%, var(--paper-up));
    --acc-safe-edge: color-mix(in srgb, #ffd166 32%, transparent);
    --acc-safe-ink: #f3d39a;
    --acc-now: #7fd4b0;
    --acc-ring: color-mix(in srgb, #a9abff 70%, transparent);
  }
  /* the deep sky: the same roles on a darker ground, the cards lifted a touch
     more so they still read as surfaces */
  :root[data-depth="deep"] :is(#accesspanel, .board-modal.reach) {
    --acc-card: color-mix(in srgb, #bbc4dd 6%, var(--paper-up));
    --acc-card-hover: color-mix(in srgb, #bbc4dd 10%, var(--paper-up));
    --acc-ground: var(--paper);
  }
}

@layer tokens {
  /* ── chat focus: the same ladder, one step up (Dan, 2026-10-23) ─────────
     "the font size for both is a little larger in this mode": the reading
     copy and the composer. Every step moves together so a heading, a tool
     line and a card keep their ratios to the words around them. ribbon.css
     "chat focus" sets the sheet's own font-size from these, because a
     descendant inherits a computed size, not the variable it came from. */
  body.chat-focus .sheet {
    --text-xs:   0.75rem;    /* 12px */
    --text-sm:   0.875rem;   /* 14px */
    --text-md:   0.9375rem;  /* 15px */
    --text-base: 1.0625rem;  /* 17px */
    --text-lg:   1.1875rem;  /* 19px */
    --text-xl:   1.5rem;     /* 24px */
  }
}

@layer tokens {
  /* LOOKS, LEAVES AND THE CONTEST (2026-11-14): the raw values the page-colors
     picker, the chat-nodes room, the mark's seasonal looks, the announcements
     and the Mark Studio draw with, named here so those sheets hold none. */
  :root {
    --white: #fff;
    --black: #000;
    --peach-white: #fff4ec;
    --moon: #eef0ff;
    --snow-blue: #a9cfe6;
    --ornament-cream: #fff6f0;
    --xmas-red: #d7263d;
    --xmas-green: #1f9d55;
    --xmas-gold: #e9b949;
    /* Dusk, as the Mark Studio wears it (its own page) */
    --dusk-paper: #2e2a4f;
    --dusk-up: #3c3762;
    --dusk-lift: #3a3560;
    --dusk-deep: #252244;
    --dusk-stage: #0a0a1f;
    --dusk-ink: #fbf5f0;
    --dusk-ink-2: #ddd2cc;
    --dusk-ink-3: #a99fb0;
    --dusk-ember: #f2682a;
    --error-coral: #f07864;
    --error-ink: #ffc9bd;
  }
}
