/* ui/theme.css — BB's ONE token source: the chat font, the LOCKED identity (void, ivory, glow, alert, warn, ok, font) with
   its theme blocks, and the derived BB DESIGN TOKENS. Spec: docs/design/DESIGN-SYSTEM.md. Every page loads it BEFORE its
   own stylesheet (ui/index.html: right before ui/observatory.css). The identity changes only on Gareth's word. Never define
   --line (see the token block's note). Moved verbatim from the top of ui/observatory.css; "this file" in the token block's
   note still means ui/observatory.css. Core's file, like the stylesheet: a colour can hide a safety cue (bb/paths.py). */
/* The chat's reading face: JetBrains Mono (SIL OFL 1.1 — ui/fonts/JetBrainsMono-OFL.txt), one variable file,
   served from BB itself. Chrome can't reach SF Mono and Menlo has no light cut, so without it a light
   weight renders regular. Chat only; the rest of the Observatory keeps --font. */
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-wght.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}
:root {
  --void: #0a0b0c;
  --ivory: #fcfaf2;
  --ivory-rgb: 252, 250, 242;
  --glow: #7cd6d6;
  --glow-rgb: 124, 214, 214;
  --alert: #d9534f;
  --warn: #e0a23c;
  --ok: #5cbd6a;
  --font: ui-monospace, "SF Mono", Menlo, monospace;
  --chat-font: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
/* Light mode — soft paper. Only the base colours flip; every rgba(var(--…-rgb), x)
   keeps its opacity, so the whole UI re-themes from these few variables. */
html[data-theme="light"] {
  --void: #f3efe6;
  --ivory: #15191b;
  --ivory-rgb: 21, 25, 27;
  --glow: #0f7676;
  --glow-rgb: 15, 118, 118;
  --alert: #b3322e;
  --warn: #946011;
  --ok: #2f7d3c;
}
/* ===== BB DESIGN TOKENS (BB-DESIGN, 2026-10-14) — the one design system; spec: docs/design/DESIGN-SYSTEM.md =====
   The identity above (void, ivory, glow, alert, warn, ok, font) is LOCKED: it changes only on Gareth's word.
   Everything here is DERIVED from it, declared on the root element, so a theme still flips from the base colours alone.
   New CSS uses these names. A raw value elsewhere in this file is "not on the system yet"; old CSS moves onto tokens
   region by region, each move proved pixel-identical (bb/ui_shots.py before and after). Never name a token --line:
   .gl-roadmap reads an unset var(--line) today, and defining it would draw a border there. */
:root {
  /* status colours as rgb, for tints. Dark values in BOTH themes for now: the raw rgba(224,162,60,…) they replace never
     flipped either, so moving onto them changes nothing. Light values come with the light-mode pass (a visible change). */
  --warn-rgb: 224, 162, 60;
  --alert-rgb: 217, 83, 79;
  --ok-rgb: 92, 189, 106;

  /* ramps: the alpha steps the system keeps (each used 8+ times today). A step not listed stays raw until merged. */
  --glow-a05: rgba(var(--glow-rgb), 0.05); --glow-a06: rgba(var(--glow-rgb), 0.06); --glow-a08: rgba(var(--glow-rgb), 0.08);
  --glow-a10: rgba(var(--glow-rgb), 0.1);  --glow-a12: rgba(var(--glow-rgb), 0.12); --glow-a14: rgba(var(--glow-rgb), 0.14);
  --glow-a15: rgba(var(--glow-rgb), 0.15); --glow-a18: rgba(var(--glow-rgb), 0.18); --glow-a20: rgba(var(--glow-rgb), 0.2);
  --glow-a25: rgba(var(--glow-rgb), 0.25); --glow-a30: rgba(var(--glow-rgb), 0.3);  --glow-a35: rgba(var(--glow-rgb), 0.35);
  --glow-a40: rgba(var(--glow-rgb), 0.4);  --glow-a45: rgba(var(--glow-rgb), 0.45); --glow-a50: rgba(var(--glow-rgb), 0.5);
  --glow-a55: rgba(var(--glow-rgb), 0.55); --glow-a80: rgba(var(--glow-rgb), 0.8);
  --ivory-a07: rgba(var(--ivory-rgb), 0.07); --ivory-a10: rgba(var(--ivory-rgb), 0.1);  --ivory-a20: rgba(var(--ivory-rgb), 0.2);
  --ivory-a30: rgba(var(--ivory-rgb), 0.3);  --ivory-a40: rgba(var(--ivory-rgb), 0.4);  --ivory-a45: rgba(var(--ivory-rgb), 0.45);
  --ivory-a50: rgba(var(--ivory-rgb), 0.5);  --ivory-a55: rgba(var(--ivory-rgb), 0.55); --ivory-a60: rgba(var(--ivory-rgb), 0.6);
  --ivory-a70: rgba(var(--ivory-rgb), 0.7);  --ivory-a75: rgba(var(--ivory-rgb), 0.75); --ivory-a85: rgba(var(--ivory-rgb), 0.85);
  --warn-a40: rgba(var(--warn-rgb), 0.4);    --warn-a55: rgba(var(--warn-rgb), 0.55);   --warn-a60: rgba(var(--warn-rgb), 0.6);
  --warn-a80: rgba(var(--warn-rgb), 0.8);    --alert-a60: rgba(var(--alert-rgb), 0.6);  --ok-a50: rgba(var(--ok-rgb), 0.5);

  /* roles: what new CSS reaches for first */
  --text: var(--ivory);              /* titles, numbers, the thing itself */
  --text-body: var(--ivory-a85);     /* long reading */
  --text-soft: var(--ivory-a70);     /* a card's line */
  --text-muted: var(--ivory-a60);    /* a number's explanation */
  --text-quiet: var(--ivory-a50);    /* labels, quiet lines */
  --text-faint: var(--ivory-a40);    /* what is not yet */
  --hairline: var(--glow-a15);       /* BB's 1px glow hairline: rails, rules, tabs */
  --hairline-faint: var(--glow-a08); /* row dividers */
  --edge-control: var(--glow-a30);   /* inputs, chips, quiet buttons */
  --edge-strong: var(--glow-a35);
  --fill-hover: var(--glow-a06);
  --fill-active: var(--glow-a12);
  --needs-you: var(--warn);          /* only what needs a person */
  --needs-you-edge: var(--warn-a55);
  --panel-edge: var(--glow-a14);     /* the kit's panel: hairline box … */
  --panel-fill: rgba(var(--ivory-rgb), 0.015);
  --panel-corner: var(--glow-a55);   /* … with one lit corner */

  /* type: one family (--font), sizes by role (half pixels are the dense terminal's own steps) */
  --fs-micro: 10px;   --fs-label: 10.5px; --fs-small: 11px; --fs-note: 11.5px; --fs-line: 12px; --fs-row: 12.5px;
  --fs-body: 13px;   --fs-chat: 15px;    --fs-title: 16px; --fs-head: 18px;   --fs-page: 22px; --fs-kpi: 24px;
  --fw-number: 300;  --fw-regular: 400;  --fw-strong: 600;
  --ls-label: 0.2em; --ls-tag: 0.06em;   --ls-word: 0.04em;
  --lh-body: 1.6;    --lh-text: 1.5;     --lh-tight: 1.45;

  /* space: a 2px grid; --sp-N is N × 2px */
  --sp-1: 2px;  --sp-2: 4px;  --sp-3: 6px;  --sp-4: 8px;  --sp-5: 10px; --sp-6: 12px;
  --sp-7: 14px; --sp-8: 16px; --sp-9: 18px; --sp-10: 20px; --sp-12: 24px; --sp-16: 32px;

  /* shape */
  --r-hair: 1px;  /* chips, tokens */  --r-switch: 2px;  --r-panel: 3px;  --r-control: 4px;  --r-card: 6px;  --r-round: 50%;
  --bw: 1px;

  /* light: the one TRON glow, still (never animated) */
  --glow-dot: 0 0 6px var(--glow);
  --glow-dot-lg: 0 0 8px var(--glow);
  --glow-halo: 0 0 10px var(--glow-a30);
  --shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.6);

  /* layers, bottom to top (the shell's ladder today) */
  --z-raise: 1; --z-float: 5; --z-drop: 10; --z-menu: 12; --z-overlay: 15; --z-rail-scrim: 39; --z-rail: 40;
  --z-gov: 60; --z-nav: 70; --z-media: 90; --z-auth: 100; --z-voice: 200; --z-splash: 1000; --z-ask: 9999;

  /* motion: almost none */
  --dur-fast: 140ms; --ease: ease;
  /* breakpoints (CSS variables can't be used in @media; JS reads 600 and 760): 520 kit stacks · 600 phone shell ·
     760 phone mail/calendar · 820 rail becomes a drawer · 1100 two-up grids */
}
