/* COPY of sites/_shared/chassis/tokens.css — edit the source there and run node _shared/sync.mjs */
/* The shared chassis — one set of token NAMES for every app in sites/.

   Source: sites/_shared/chassis/tokens.css (seeded from Content Hub, the most complete set).
   Design audit, 4 Nov 2026: the apps share a look already; what differs is the names. An app
   adopts the chassis by defining these names — either by loading this file and overriding
   --accent (its identity colour, the one on its icon), or, while it still has its own
   tokens, by mapping these names onto them in an alias block (Food Planner does this).

   Shared: neutrals, type scale, spacing, radii, shadows, status colours, light + dark.
   Each app keeps: --accent, an optional --font-display, its hero and textures. */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  --font-display: var(--font-sans);
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* type — 15px body */
  --text-xs: 12px; --text-sm: 13px; --text-md: 15px; --text-lg: 17px; --text-xl: 22px; --text-2xl: 28px;

  /* spacing — 4px grid */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;
  --tap: 44px;

  /* radii: inputs 8 · buttons 12 · cards 16 · chips full */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px; --r-full: 999px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1); --dur: 200ms;

  /* --text-3 deepened in Light and lifted in Dark, and --danger given a dark value (16 Nov 2026 sweep):
     hints and labels were about 3.2:1, red button text 3.8:1 in Dark; now 4.5:1 or better.
     Light green and amber are the deeper shades (11 Nov 2026): the bright ones were about 3:1 on
     white, too faint for words; these are 5:1. Dark keeps the bright ones (below). */
  --success: #15803d; --warning: #b45309; --danger: #dc2626;
  --danger-fill: #dc2626;     /* red behind white text: the same in both themes (white on the dark --danger is too faint) */
  --accent: #3b82f6;          /* every app overrides this with its identity colour */
  --magic: var(--accent);     /* the magic mark's colour */

  color-scheme: light;
  --bg: #f5f5f7; --surface: #ffffff; --surface-2: #f2f2f5;
  --border: rgb(16 18 32 / 0.08); --border-strong: rgb(16 18 32 / 0.15);
  --text: #101220; --text-2: #4b4f62; --text-3: #676b7c; --text-on-accent: #ffffff;
  --overlay: rgb(16 18 32 / 0.36);
  --shadow-md: 0 1px 2px rgb(16 18 32 / 0.04), 0 6px 20px -6px rgb(16 18 32 / 0.12);
  --shadow-lg: 0 2px 6px rgb(16 18 32 / 0.06), 0 24px 60px -12px rgb(16 18 32 / 0.25);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #0a0b0f; --surface: #131419; --surface-2: #1a1c23;
    --success: #16a34a; --warning: #d97706; --danger: #f87171;
    --border: rgb(255 255 255 / 0.07); --border-strong: rgb(255 255 255 / 0.14);
    --text: #f3f4f8; --text-2: #a8acbc; --text-3: #8a8ea2;
    --overlay: rgb(0 0 0 / 0.6);
    --shadow-md: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -8px rgb(0 0 0 / 0.6);
    --shadow-lg: 0 2px 6px rgb(0 0 0 / 0.4), 0 30px 70px -10px rgb(0 0 0 / 0.75);
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0a0b0f; --surface: #131419; --surface-2: #1a1c23;
  --success: #16a34a; --warning: #d97706; --danger: #f87171;
  --border: rgb(255 255 255 / 0.07); --border-strong: rgb(255 255 255 / 0.14);
  --text: #f3f4f8; --text-2: #a8acbc; --text-3: #8a8ea2;
  --overlay: rgb(0 0 0 / 0.6);
  --shadow-md: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -8px rgb(0 0 0 / 0.6);
  --shadow-lg: 0 2px 6px rgb(0 0 0 / 0.4), 0 30px 70px -10px rgb(0 0 0 / 0.75);
}
