/* ═══════════════════════════════════════
   WOBAZI — design tokens. Loaded FIRST, before app/style.css, by views/partials/head.ejs and
   app/index.html. Each token here has this one definition; sheets that load later use them and
   never redeclare them. Bump ?v= in both files on every change.

   Values are what the site shows today (the 2026-11-21 audit): radii 8/10/14px (+ 24px for sheets),
   cards #13132a. Tokens that point at theme colours (--w02, --text, --m8, --gold …) are declared
   again under body.light-mode: a custom property resolves where it is declared, so a :root-only
   alias would keep the dark value inside a light-mode body.

   Not here on purpose: element, path, shop and tier palettes; the type scale and --pad-card
   (public/css/system.css); the theme colours themselves (app/style.css).
═══════════════════════════════════════ */

:root {
  /* Corners */
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 24px;          /* sheets and large panels */
  --radius-pill: 999px;

  /* Surfaces */
  --bg-card: #13132a;
  --surface-1: var(--w02);
  --surface-2: var(--w03);
  --surface-3: var(--w04);

  /* Ink */
  --ink-1: var(--text);
  --ink-2: var(--m8);
  --ink-3: var(--m6);
  --on-gold: #1a0a00;         /* text on a gold fill, in both themes */

  /* Fills */
  --grad-gold: linear-gradient(135deg, #f0c040, #e08020);
  --grad-power: linear-gradient(135deg, #f0d080, #e8a040);   /* Power Day tier */

  /* Focus */
  --focus-ring: 2px solid var(--gold);

  /* Control heights */
  --ctl-lg: 52px;
  --ctl-md: 44px;             /* the smallest comfortable tap target */
  --ctl-sm: 36px;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;

  /* Elevation */
  --shadow-1: 0 8px 30px rgba(0, 0, 0, .35);
  --shadow-2: 0 24px 64px rgba(0, 0, 0, .62);
  /* Neutral tint as RGB channels: rgb(var(--tint) / .08) is rgba(240,240,255,.08) here and the
     light theme's ink in light mode, so lines and soft text follow the theme. */
  --tint: 240 240 255;
  --bg-panel: #10101d;                       /* solid panels (the launcher): --bg-card is translucent */
  --ink-soft: rgba(226, 226, 240, .8);       /* softer white type on panels (the launcher on phones) */
  --sky-veil: rgba(7, 7, 15, .86);           /* the veil over the sky behind the app's screens */
  /* The dim behind every bottom sheet and dialog (system.css "Sheets") */
  --scrim: rgba(0, 0, 0, .65);
  --scrim-blur: 6px;

  /* Stacking */
  --z-sticky: 40;
  --z-nav: 220;
  --z-drawer: 950;
  --z-sheet: 1000;
  --z-toast: 1200;
  --z-gate: 4000;

  /* Motion */
  --dur-fast: .15s;
  --dur-base: .2s;
  --dur-slow: .3s;

  /* Status */
  --ok: #4ade80;
  --warn: #f59e0b;
  --bad: #f87171;
}

body.light-mode {
  --bg-card: #f4f4f7;
  --tint: 20 20 30;
  --bg-panel: #f4f4f7;
  --ink-soft: rgba(20, 20, 30, .8);
  --sky-veil: rgba(232, 232, 236, .9);
  --surface-1: var(--w02);
  --surface-2: var(--w03);
  --surface-3: var(--w04);
  --ink-1: var(--text);
  --ink-2: var(--m8);
  --ink-3: var(--m6);
  --focus-ring: 2px solid var(--gold);
}
