/* ============================================================================
   TOKENS (UI/UX PR 4, 2026-11-20) — the one place a value is set
   ----------------------------------------------------------------------------
   THIS FILE IS THE SOURCE FOR THE iOS THEME. The owner chose a native SwiftUI
   app (2026-11-19); its theme is meant to be read straight off this file, so
   every group below says what it is for, and docs/design-tokens.md lists the
   same names as a table (name, light, dark, use). Change a value here and in
   that table, nowhere else.

   Why it exists. The audit (item 15) found fourteen stylesheets layered on one
   another — style.css set a palette, revamp-shell.css re-pointed it at its own
   `--shell-*` names, beta-shell.css restated those names with the Apple greys,
   and one-shell.css and motion-tokens.css each added a few more — so one
   desktop screen drew 9 font sizes, 11 corner radii and 14 backgrounds, and
   the value on screen was whichever sheet happened to load last. All of those
   definitions live here now, once. Nothing else in `public/` defines a colour,
   a radius, a type size, a shadow or a duration on `:root`.

   Linked FIRST in index.html, before every other sheet. A custom property's
   value does not depend on link order, but a second definition does: a later
   sheet that set one of these names again would win, and this file would be a
   value nothing reads (tests/trail-line-dom pins the order).

   TWO LAYERS, on purpose:
   1. THE ROLES (`--space-*`, `--radius-*`, `--type-*`, `--font-*`,
      `--weight-*`, `--elevation-*`, `--tap-min`, `--dur-*`/`--ease-*`, and
      `--color-*`). Small, named for what they do, the vocabulary new rules
      and the iOS theme use.
   2. THE OLDER NAMES (`--paper`, `--surface`, `--dim`, `--primary`,
      `--shell-page`, `--b-send`, `--r-md`, `--t-sm` …) — several hundred call
      sites across the sheets say these. Each one is an ALIAS of a role here,
      so nothing that names it had to change and the screen did not move.
      Rename at leisure; never give one a value of its own again.

   The values are the ones that were ON SCREEN before this file, measured
   from the cascade, not the first sheet that named them. Correction worth
   recording: style.css's Warm Studio surfaces (#F2F0EC paper, #1E1B18 ink,
   #C81E2B red…) and its warm dark (#161513…) were still written at the top of
   that sheet, and the contrast tests measured them, but from 2026-11-17 the
   revamp and beta shells overrode every one of them on every page — they were
   values nothing painted. They are gone; git has them (style.css before this
   commit). The hues (denim, sage, honey, sky, plum, graphite, stone), their
   washes and fills, the status colours and the monograms were never
   overridden, so they are carried over exactly, with their measurements.

   Themes: light is `:root`; dark is stated twice, under `[data-theme="dark"]`
   and under `prefers-color-scheme: dark` for `[data-theme="system"]` (theme.js
   writes the attribute only for those two choices, so an unset preference is
   light). Stated twice rather than shared because `@media` cannot be nested
   into an attribute selector in a way every shipped browser agrees on; the
   two blocks must stay identical (design-system-dom pins it). A dark block
   only RE-defines names `:root` already has: an alias on `:root` follows its
   role into the dark without being restated.
   ============================================================================ */
:root {
  /* ---------- SPACE -------------------------------------------------------
     A 4px grid. Padding, gaps and margins step through these and nothing in
     between. iOS: the same numbers in points. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* ---------- RADIUS ------------------------------------------------------
     Five corners and the capsule, chosen from the radii actually drawn (8 and
     10 were the commonest, then 12, 14 and 6). A button is the one thing
     shaped like a pill, so a pill always means "press".
       xs  6px   a tag, a key hint, a small chip
       sm  8px   a sidebar row, a menu item            (was --r-sm)
       md 10px   a control, an inset inside a card     (was --ctl-r, --card-r-in)
       lg 12px   a card                                (was --r-md, --card-r)
       xl 16px   a sheet, a large panel                (was --r-lg)
       pill      a button, a segmented control's thumb  (was --r-pill, --btn-r) */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 999px;

  /* ---------- TYPE --------------------------------------------------------
     One family, Geist (owner's choice, 2026-11-17, over the system face and
     Inter: one face that "looks good on mobile and desktop", the same on
     both). Fetched without blocking (index.html), so the stack after it is
     what paints first and what stays if the font host never answers. Code
     keeps the platform mono; Geist Mono was not part of the decision. iOS:
     bundle Geist, and map these sizes to custom Font styles that scale with
     Dynamic Type relative to the style named on each line.
       caption   12/16   a timestamp, a count, a hint      (≈ .caption)
       footnote  13/18   a card's second line, a chip       (≈ .footnote)
       body      14/20   the app's running text, a button   (≈ .body)
       callout   15/22   a chat message, a lead paragraph   (≈ .callout)
       headline  20/26   a section or dialog title          (≈ .title3)
       title     28/34   a page's title                     (≈ .largeTitle) */
  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --type-caption: 12px;
  --type-caption-lh: 16px;
  --type-footnote: 13px;
  --type-footnote-lh: 18px;
  --type-body: 14px;
  --type-body-lh: 20px;
  --type-callout: 15px;
  --type-callout-lh: 22px;
  --type-headline: 20px;
  --type-headline-lh: 26px;
  --type-title: 28px;
  --type-title-lh: 34px;
  /* The three weights the font request asks for (index.html); a weight
     between them is synthesised by the browser and looks it. */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  /* ---------- LAYOUT ------------------------------------------------------
     The widest a page's content runs on a desk. Results, the Calendar and
     Spaces each centred their own column (1120, 1180, 1120) while Team, Goals
     and the Library ran edge to edge, so on a wide screen no two titles
     started at the same x (audit item 11). One width now (components.css). */
  --page-max: 1120px;

  /* ---------- TOUCH -------------------------------------------------------
     The smallest thing a thumb is asked to press: Apple's 44pt. one-shell.css
     makes it a floor under a coarse pointer (it was defined there until this
     file). */
  --tap-min: 44px;

  /* ---------- MOTION ------------------------------------------------------
     Folded in from motion-tokens.css (UI/UX PR 3, 2026-11-19), which this file
     replaces. The rule every use keeps: everything moves from where it came
     from — a side panel from its right edge, a sheet from the foot, a toast
     the few pixels from the edge it sits on, a tap in place. Nothing fades in
     from nowhere or zooms from the middle of the screen.
       --dur-tap    a tap, a hover, a press: the control answering in place
       --dur-panel  a panel arriving from the side it lives on (200ms: 240ms
                    read as the app thinking about it)
       --dur-sheet  a sheet rising from the foot: the longest move, because
                    it travels the furthest, on the gentlest curve
       --ease-standard  a calm ease-out, no overshoot
       --ease-sheet     the long decelerating rise a phone's own sheets use;
                        it never passes its place and comes back
     Under reduced motion the three go to .01ms — not 0, which some engines
     treat as "no animation" and then never fire the `animationend` motion.js
     waits on (the block at the foot of this file). */
  --dur-tap: 120ms;
  --dur-panel: 200ms;
  --dur-sheet: 320ms;
  --ease-standard: cubic-bezier(.2, 0, 0, 1);
  --ease-sheet: cubic-bezier(.32, .72, 0, 1);
  /* The older motion names (design system, 2026-10-11), still named by many
     rules; folding them into the five above is follow-up. Exits run at 0.7 of
     the entrance (`--dur-exit-scale`). The spring overshoots, so it is never
     used on anything about money: a bar that bounces past its value has, for
     a frame, said the wrong number. */
  --dur-instant: 90ms;
  --dur-quick: 140ms;
  --dur-base: 200ms;
  --dur-exit-scale: .7;
  --ease-snap: cubic-bezier(.2, .9, .1, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-exit: cubic-bezier(.4, 0, 1, 1);
  --ease-move: cubic-bezier(.3, .7, 0, 1);

  /* ---------- COLOUR ROLES ------------------------------------------------
     The neutral greys are the Apple system greys the beta shell is drawn in
     (beta-shell.css, 2026-11-17, the owner's approved mocks), so they map one
     to one onto SwiftUI's semantic colours:
       bg              the page                      systemGroupedBackground
       surface         a card, a pane, the composer  secondarySystemGroupedBackground
       surface-raised  a menu, a popover, a sheet    (the same as surface on
                       the web, where --elevation-2 tells them apart; iOS
                       may lift it in dark, as UIKit's elevated colours do)
       surface-inset   a chip, a track, an inset     tertiarySystemFill-like
       ink             words                         label
       ink-muted       a second line, a label        secondaryLabel
       ink-faint       the faintest word             (equal to ink-muted today:
                       the revamp shell folded the two together, and a fainter
                       grey failed 4.5:1 on every ground it was tried on — so
                       on iOS use secondaryLabel, never tertiaryLabel, for words)
       line            a hairline between things     separator
       line-strong     a control's outline           opaqueSeparator
       fill-hover / fill-selected  a row's hover and "you are here"
       focus           the keyboard ring             (a blue: never an action)
     Colour that means something:
       ink + on-ink    THE PRIMARY BUTTON. A filled button is ink: black on a
                       light page, near-white on a dark one (see the button set
                       in components.css for why it is ink and not red)
       accent          the brand red: the mark, a count, an unread dot. Never a
                       button fill, never a status, never an error
       attention       "needs you": a dot, a rule, a bar; -ink is its word
       success         "done": a dot, a fill; -ink is its word
       danger          an error or a destructive word, beside an icon
     Every word colour clears 4.5:1 on bg, surface and surface-inset in its
     theme (design-system-dom measures them), and the muted grey on every
     section wash and tint as well (tokens-dom). */
  --color-bg: #F3F1EC;
  --color-surface: #FAF9F6;
  --color-surface-raised: #FFFFFF;
  --color-surface-inset: #ECE9E2;
  --color-ink: #191816;
  /* Warm Alabaster muted ink (#5C5852): clears 4.5:1 on every surface, wash
     and tint (5.69:1 on --plum-wash at worst). */
  --color-ink-muted: #5C5852;
  --color-ink-faint: #5C5852;
  --color-on-ink: #FFFFFF;
  --color-line: #E2DFD7;
  --color-line-strong: #C8C4BA;
  --color-fill-hover: rgb(25 24 22 / .05);
  --color-fill-selected: rgb(25 24 22 / .085);
  --color-focus: #0B63CE;
  --color-accent: #C2412D;
  --color-accent-hover: #A93725;
  --color-on-accent: #FFFFFF;
  /* Status, measured on white / the page: needs-you's word #8A5A12 5.91 /
     5.68, done's #4E6A3A 6.09 / 5.86, the error wine 9.19 / 8.84. The dots are
     fills, a graphic's 3:1. */
  --color-attention: #B7791F;
  --color-attention-ink: #8A5A12;
  --color-success: #5E8446;
  --color-success-ink: #4E6A3A;
  --color-danger: #8E1620;
  /* The modal dim: a warm light dim says "behind" without putting the lights
     out (DS-15: black at 60% turned the light app a muddy grey). */
  --color-scrim: rgba(40, 25, 10, .28);

  /* ---------- ELEVATION ---------------------------------------------------
     Three steps and the drop on its own. The ring is a 1px hairline in the
     line colour, paired with a crisp top specular edge and warm shadow.
       1  a card on a page              ring + specular + whisper drop
       2  a menu, a popover, a toast    ring + specular + soft drop
       3  a modal, a sheet              ring + deep drop
       drop  the soft drop alone, for something whose border is already drawn */
  --elevation-drop: 0 10px 28px -12px rgb(24 20 14 / .12), 0 2px 6px rgb(24 20 14 / .04);
  --elevation-1: 0 0 0 1px var(--color-line), inset 0 1px 0 rgb(255 255 255 / .85), 0 1px 2px rgb(24 20 14 / .03);
  --elevation-2: 0 0 0 1px var(--color-line), inset 0 1px 0 rgb(255 255 255 / .85), var(--elevation-drop);
  --elevation-3: 0 0 0 1px var(--color-line), 0 32px 80px -28px rgba(40, 28, 16, .42);

  /* Native controls follow the theme (DS-11): without it a dark page drew
     white checkboxes, light select popups and light scrollbars. */
  color-scheme: light;

  /* ======================================================================
     THE PALETTE THE ROLES DO NOT COVER — the section hues. Carried over from
     style.css unchanged (Warm Studio 2026-09-25, the squircle fills 2026-09-26),
     because the shells never overrode them. Each hue has a deep value (a
     glyph, a word, a bar), a tint (the ground a word sits on), a wash (a
     tinted surface: a header band, a chosen segment) and a fill (a squircle
     with a white glyph, a graphic's 3:1). Measured deep-on-tint: denim 5.23,
     sage 4.67, honey 5.38, stone 4.86; sky #13658C 5.62 on its tint, plum
     7.47, graphite 9.68. No purple, no periwinkle.
     ====================================================================== */
  --denim: #2F6690;
  --denim-tint: #E6EEF5;
  --sage: #5B7043;
  --sage-tint: #EAEFE3;
  --honey: #855614;
  --honey-tint: #F6ECDC;
  --stone: #6B645C;
  --stone-tint: #EEEAE4;
  --sky: #13658C;
  --sky-tint: #E4F2FA;
  --plum: #7A2F55;
  --plum-tint: #F5E8EF;
  --graphite: #3A3C42;
  --graphite-tint: #F1F0EE;
  /* Text on a solid hue fill — a done quest's check on sage (5.46:1). */
  --on-hue: #FFFFFF;
  /* The squircle fills: red 5.71, denim 6.13, plum 7.34, graphite 5.84, sage
     4.32, sky 3.33, honey 3.64 under a white glyph — a graphic's 3:1, never a
     word's colour. */
  --fill-red: #C81E2B;
  --fill-denim: #2F6690;
  --fill-sage: #5E8446;
  --fill-sky: #2596CC;
  --fill-plum: #8A3A62;
  --fill-honey: #B7791F;
  --fill-graphite: #62656C;
  /* Home's squircle wears ink, the one place that is "yours" (SHELL-08). */
  --fill-ink: #2E2A26;
  /* A monogram is a letter, so its fill carries a white WORD at 4.5:1 at the
     lightest point of the tile's top-light gradient (corrected 2026-09-26):
     denim 4.70, sage 4.63, honey 4.62, plum 5.54, sky 4.60, stone 4.62. */
  --mono-denim: #2F6690;
  --mono-sage: #4B6B37;
  --mono-honey: #895914;
  --mono-plum: #8A3A62;
  --mono-sky: #1C6A95;
  --mono-stone: #68615A;
  /* Washes (design-system pass): pastels at 8–17% saturation, so a page
     washed in them reads as colour and not as a grey. */
  --sage-wash: #E5F0DA;
  --sky-wash: #DCF0FB;
  --honey-wash: #FBEBD0;
  --denim-wash: #DDEAF6;
  --plum-wash: #F6E1ED;
  --graphite-wash: #EDEDEF;
  --blush-wash: #FCE2E4;
  /* The error family's tint: the error banner's ground. */
  --blush: #FBEAEA;
  --blush-edge: #F2CFD2;
  /* Status beyond the three roles: working is sky, idle is graphite (a ring,
     not a fill — nothing is happening). Working's word 6.43 on white. */
  --st-working: #2596CC;
  --st-working-ink: #13658C;
  --st-idle: #62656C;
  /* The ink on a done fill: the white check on a done quest (4.32:1 on
     #5E8446, a glyph's 3:1). Near-black in dark, where the fill is light. */
  --on-win: #FFFFFF;
  /* `--info` is denim: a running pill, a link — one blue in the panel, and
     not a periwinkle. Its text name `--blue` is the most-used alias below. */
  --info: #2F6690;
  --info-ink: #2F6690;
  /* The beta shell's own few (beta-shell.css, 2026-11-17): the panel's
     hairline, the composer's ring and lift, Send at rest with an empty box,
     and the side panel's status colours. Not roles: each is one place's. */
  --b-hair: #E6E3DB;
  --b-ring: #D8D4CA;
  --b-lift: inset 0 1px 0 rgb(255 255 255 / .85), 0 1px 2px rgb(24 20 14 / .04), 0 10px 28px -12px rgb(24 20 14 / .07);
  --b-send-off: #D6D2C9;
  --b-blue: #0B63CE;
  --b-blue-track: #DCE3EE;
  --b-amber: #A35200;
  --b-green: #1A7F37;
  --b-dash: #ABA69C;
  --b-chip: #E4E0D8;

  /* ======================================================================
     THE OLDER NAMES, each an alias of a role. Grouped by the sheet that
     introduced them; the comment says what they were before this file.
     ====================================================================== */
  /* style.css's semantic layer (v5.1 preview, Warm Studio). */
  --paper: var(--color-bg);
  --card: var(--color-surface);
  --card-2: var(--color-surface-inset);
  --edge: var(--color-line);
  --edge-2: var(--color-line-strong);
  --ink: var(--color-ink);
  --ink-dim: var(--color-ink-muted);
  --ink-faint: var(--color-ink-faint);
  /* The red as a mark, a count, a word. */
  --primary: var(--color-accent);
  --primary-ink: var(--color-accent);
  /* The FILLED BUTTON. `--primary-strong` and `--primary-hover` paint every
     `.primary` and `.btn-play` (style.css, "ONE BUTTON SCALE"), so pointing
     them at ink is what makes the app's primary button ink everywhere at once
     — the beta shell's Send, the side panel's Review and Today's Review were
     already ink, and the page headers' New worker, Add a goal and New space
     were the red ones beside them (audit item 10). `--on-primary` is the word
     on both the button and a red count: on-ink and on-accent are the same in
     each theme (white; near-black in dark), so one name serves both. */
  --primary-strong: var(--color-ink);
  --primary-hover: color-mix(in srgb, var(--color-ink) 86%, var(--color-bg));
  --on-primary: var(--color-on-accent);
  --primary-edge: var(--primary-ink);
  --btn-ink: var(--color-ink);
  --on-btn-ink: var(--color-on-ink);
  --wine: var(--color-danger);
  --danger: var(--color-danger);
  --sun: var(--color-attention);
  --sun-ink: var(--color-attention-ink);
  --st-needs: var(--color-attention);
  --st-needs-ink: var(--color-attention-ink);
  --st-done: var(--color-success);
  --st-done-ink: var(--color-success-ink);
  --st-failed: var(--color-danger);
  --win: var(--color-success-ink);
  --win-fill: var(--color-success);
  --focus-ring: var(--color-focus);
  --scrim: var(--color-scrim);
  /* The agentic-OS windows. Flat since the revamp shell (2026-11-17): the
     panes share hairlines rather than floating, so the window is a surface,
     its shadow none and the ground glow gone. */
  --window: var(--color-surface);
  --window-2: var(--color-surface);
  --window-ring: var(--color-line);
  --window-sh: none;
  --chrome: var(--color-surface);
  --ground-glow: none;
  --rail-glass: var(--color-bg);
  --rail-solid: var(--color-bg);
  /* Purple was retired as a UI hue (2026-09-10); these two paint a pinned
     tab's dot, in denim rather than spending the red. */
  --quest: var(--denim);
  --quest-edge: var(--denim);
  /* Elevation and shape. */
  --shadow-1: none;
  --shadow-2: var(--elevation-drop);
  --elev-1: var(--elevation-1);
  --elev-2: var(--elevation-2);
  --elev-3: var(--elevation-3);
  --r-sm: var(--radius-sm);
  --r-md: var(--radius-lg);
  --r-lg: var(--radius-xl);
  --r-pill: var(--radius-pill);
  --card-r: var(--radius-lg);
  --card-r-in: var(--radius-md);
  --ctl-r: var(--radius-md);
  /* One button scale (DS-07): two heights, one capsule. 40 and 32 are a
     desk's sizes; under a coarse pointer one-shell.css floors every button
     at `--tap-min`. */
  --btn-r: var(--radius-pill);
  --btn-h: 40px;
  --btn-h-sm: 32px;
  --btn-fs: var(--type-body);
  --btn-fs-sm: var(--type-footnote);
  --btn-px: 17px;
  --btn-px-sm: 13px;
  /* Type. */
  --t-xs: var(--type-caption);
  --t-sm: var(--type-body);
  --t-md: var(--type-callout);
  --t-lg: var(--type-headline);
  --f-body: var(--font-sans);
  --f-display: var(--font-sans);
  --f-mono: var(--font-mono);
  /* style.css's thirteen first names, which most of that sheet is written in. */
  --bg: var(--paper);
  --sidebar: var(--rail-solid);
  --surface: var(--card);
  --surface-2: var(--card-2);
  --line: var(--edge);
  --line-2: var(--edge-2);
  --text: var(--ink);
  --dim: var(--ink-dim);
  --dim-2: var(--ink-faint);
  --accent: var(--sun);
  /* The TEXT blue, so it aliases `--info-ink` rather than `--info`. */
  --blue: var(--info-ink);
  --ok: var(--win);
  --err: var(--danger);
  /* revamp-shell.css's and beta-shell.css's names for the same roles. */
  --shell-page: var(--color-bg);
  --shell-surface: var(--color-surface);
  --shell-inset: var(--color-surface-inset);
  --shell-border: var(--color-line);
  --shell-border-strong: var(--color-line-strong);
  --shell-ink: var(--color-ink);
  --shell-muted: var(--color-ink-muted);
  --shell-accent: var(--color-accent);
  --shell-accent-hover: var(--color-accent-hover);
  --shell-on-accent: var(--color-on-accent);
  --shell-focus: var(--color-focus);
  --shell-shadow: var(--elevation-drop);
  --b-hover: var(--color-fill-hover);
  --b-on: var(--color-fill-selected);
  --b-send: var(--color-ink);
  --b-on-send: var(--color-on-ink);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    color-scheme: dark;
    /* Obsidian Graphite dark palette (Muse/Manus studio dark): muted text
       clears 4.5:1 on every surface, wash and tint (5.21:1 worst on sage wash). */
    --color-bg: #0E0E11;
    --color-surface: #16161A;
    --color-surface-raised: #1E1E24;
    --color-surface-inset: #25252C;
    --color-ink: #F3F3F6;
    --color-ink-muted: #A6A6B2;
    --color-ink-faint: #A6A6B2;
    --color-on-ink: #121215;
    --color-line: #2A2A32;
    --color-line-strong: #454552;
    --color-fill-hover: rgb(255 255 255 / .06);
    --color-fill-selected: rgb(255 255 255 / .10);
    --color-focus: #5AA2FF;
    /* A lighter coral, because the light theme's red is about 3.5:1 on the
       dark ground and a mark that dim reads as disabled. It carries the
       near-black on-accent, as white on it would not clear 3:1. */
    --color-accent: #FF7B61;
    --color-accent-hover: #FF9580;
    --color-on-accent: #121215;
    /* On a dark ground amber IS readable as text, so attention's two names are
       the dot and the label. Words on a card: needs 9.39, done 8.25, the error
       rose 8.19 (desaturated so it never reads as the coral, DS-02). */
    --color-attention: #E0A33A;
    --color-attention-ink: #F0B85A;
    --color-success: #8DB06F;
    --color-success-ink: #A7BD8A;
    --color-danger: #E7A3A9;
    --color-scrim: rgba(0, 0, 0, .58);
    --elevation-drop: 0 12px 32px -12px rgb(0 0 0 / .65);
    --elevation-1: 0 0 0 1px var(--color-line), inset 0 1px 0 rgb(255 255 255 / .04), 0 1px 2px rgb(0 0 0 / .28);
    --elevation-2: 0 0 0 1px var(--color-line), inset 0 1px 0 rgb(255 255 255 / .05), var(--elevation-drop);
    --elevation-3: 0 0 0 1px rgba(255, 255, 255, .09), 0 32px 80px -28px rgba(0, 0, 0, .95);
    /* The hues on the dark ground: each tint a low-alpha wash of the hue, so
       it sits on whichever dark ground is under it. Each hue's word on its own
       wash over a card: denim 6.00, sage 6.27, honey 5.85, sky 6.86, plum
       7.07, graphite 8.02. */
    --denim: #8DB4D8;
    --denim-tint: rgba(91, 143, 191, .18);
    --sage: #A7BD8A;
    --sage-tint: rgba(124, 154, 94, .18);
    --honey: #D9A45C;
    --honey-tint: rgba(184, 129, 58, .18);
    --stone: #B3ACA2;
    --stone-tint: rgba(138, 130, 120, .16);
    --sky: #7CC4EA;
    --sky-tint: rgba(37, 150, 204, .18);
    --plum: #E2A6C4;
    --plum-tint: rgba(138, 58, 98, .26);
    --graphite: #C9CBD0;
    --graphite-tint: rgba(150, 152, 160, .16);
    --on-hue: #161513;
    /* Home's ink squircle has to be seen on a dark ground: a lifted graphite,
       white glyph on it 9.46:1. */
    --fill-ink: #4A4541;
    --sage-wash: rgba(124, 154, 94, .24);
    --sky-wash: rgba(37, 150, 204, .24);
    --honey-wash: rgba(184, 129, 58, .24);
    --denim-wash: rgba(91, 143, 191, .24);
    --plum-wash: rgba(138, 58, 98, .32);
    --graphite-wash: rgba(150, 152, 160, .2);
    --blush-wash: rgba(242, 96, 107, .2);
    --blush: rgba(242, 96, 107, .16);
    --blush-edge: rgba(242, 96, 107, .34);
    --st-working: #4FB3E3;
    --st-working-ink: #7CC4EA;
    --st-idle: #8E9198;
    --on-win: #161513;
    --info: #8DB4D8;
    --info-ink: var(--info);
    --b-hair: #26262E;
    --b-ring: #383844;
    --b-lift: inset 0 1px 0 rgb(255 255 255 / .05), 0 2px 6px rgb(0 0 0 / .35), 0 14px 34px -12px rgb(0 0 0 / .55);
    --b-send-off: #484854;
    --b-blue: #5AA2FF;
    --b-blue-track: #2A3446;
    --b-amber: #E9A24F;
    --b-green: #3FB950;
    --b-dash: #63636E;
    --b-chip: #2E2E38;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  /* Obsidian Graphite dark palette (Muse/Manus studio dark): muted text
     clears 4.5:1 on every surface, wash and tint (5.21:1 worst on sage wash). */
  --color-bg: #0E0E11;
  --color-surface: #16161A;
  --color-surface-raised: #1E1E24;
  --color-surface-inset: #25252C;
  --color-ink: #F3F3F6;
  --color-ink-muted: #A6A6B2;
  --color-ink-faint: #A6A6B2;
  --color-on-ink: #121215;
  --color-line: #2A2A32;
  --color-line-strong: #454552;
  --color-fill-hover: rgb(255 255 255 / .06);
  --color-fill-selected: rgb(255 255 255 / .10);
  --color-focus: #5AA2FF;
  /* A lighter coral, because the light theme's red is about 3.5:1 on the
     dark ground and a mark that dim reads as disabled. It carries the
     near-black on-accent, as white on it would not clear 3:1. */
  --color-accent: #FF7B61;
  --color-accent-hover: #FF9580;
  --color-on-accent: #121215;
  /* On a dark ground amber IS readable as text, so attention's two names are
     the dot and the label. Words on a card: needs 9.39, done 8.25, the error
     rose 8.19 (desaturated so it never reads as the coral, DS-02). */
  --color-attention: #E0A33A;
  --color-attention-ink: #F0B85A;
  --color-success: #8DB06F;
  --color-success-ink: #A7BD8A;
  --color-danger: #E7A3A9;
  --color-scrim: rgba(0, 0, 0, .58);
  --elevation-drop: 0 12px 32px -12px rgb(0 0 0 / .65);
  --elevation-1: 0 0 0 1px var(--color-line), inset 0 1px 0 rgb(255 255 255 / .04), 0 1px 2px rgb(0 0 0 / .28);
  --elevation-2: 0 0 0 1px var(--color-line), inset 0 1px 0 rgb(255 255 255 / .05), var(--elevation-drop);
  --elevation-3: 0 0 0 1px rgba(255, 255, 255, .09), 0 32px 80px -28px rgba(0, 0, 0, .95);
  /* The hues on the dark ground: each tint a low-alpha wash of the hue, so
     it sits on whichever dark ground is under it. Each hue's word on its own
     wash over a card: denim 6.00, sage 6.27, honey 5.85, sky 6.86, plum
     7.07, graphite 8.02. */
  --denim: #8DB4D8;
  --denim-tint: rgba(91, 143, 191, .18);
  --sage: #A7BD8A;
  --sage-tint: rgba(124, 154, 94, .18);
  --honey: #D9A45C;
  --honey-tint: rgba(184, 129, 58, .18);
  --stone: #B3ACA2;
  --stone-tint: rgba(138, 130, 120, .16);
  --sky: #7CC4EA;
  --sky-tint: rgba(37, 150, 204, .18);
  --plum: #E2A6C4;
  --plum-tint: rgba(138, 58, 98, .26);
  --graphite: #C9CBD0;
  --graphite-tint: rgba(150, 152, 160, .16);
  --on-hue: #161513;
  /* Home's ink squircle has to be seen on a dark ground: a lifted graphite,
     white glyph on it 9.46:1. */
  --fill-ink: #4A4541;
  --sage-wash: rgba(124, 154, 94, .24);
  --sky-wash: rgba(37, 150, 204, .24);
  --honey-wash: rgba(184, 129, 58, .24);
  --denim-wash: rgba(91, 143, 191, .24);
  --plum-wash: rgba(138, 58, 98, .32);
  --graphite-wash: rgba(150, 152, 160, .2);
  --blush-wash: rgba(242, 96, 107, .2);
  --blush: rgba(242, 96, 107, .16);
  --blush-edge: rgba(242, 96, 107, .34);
  --st-working: #4FB3E3;
  --st-working-ink: #7CC4EA;
  --st-idle: #8E9198;
  --on-win: #161513;
  --info: #8DB4D8;
  --info-ink: var(--info);
  --b-hair: #26262E;
  --b-ring: #383844;
  --b-lift: inset 0 1px 0 rgb(255 255 255 / .05), 0 2px 6px rgb(0 0 0 / .35), 0 14px 34px -12px rgb(0 0 0 / .55);
  --b-send-off: #484854;
  --b-blue: #5AA2FF;
  --b-blue-track: #2A3446;
  --b-amber: #E9A24F;
  --b-green: #3FB950;
  --b-dash: #63636E;
  --b-chip: #2E2E38;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-tap: .01ms;
    --dur-panel: .01ms;
    --dur-sheet: .01ms;
  }
}
