/* UAP Archive design tokens — single source for the dashboard, categories.js and the narrated deck.
   Docs: docs/design-system.md. Change a value here, never redefine it in a component.

   Breakpoints (mobile-first; CSS variables cannot be used inside media queries, so they are fixed values):
     base  < 600px   phones (design target: 360–430px)
     sm   >= 600px   large phones landscape, small tablets
     md   >= 900px   tablets, small laptops (top tabs, inline filters)
     lg   >= 1200px  desktop (two-column layouts, full tables)
*/
:root{
  color-scheme: dark;

  /* palette */
  --bg:#0b0f17; --bg-2:#111725; --card:#141b2b; --card-2:#1a2336;
  --border:#243049; --border-2:#2f3d5c;
  --text:#e8edf6; --muted:#9aa7bd; --faint:#8290aa;           /* --faint: 5.3:1 on --card (AA) */
  --accent:#38bdf8; --accent-dim:#1e5a76; --accent-soft:rgba(56,189,248,.12); --on-accent:#06121c;
  --good:#34d399; --warn:#fbbf24; --bad:#f87171; --info:#818cf8;

  /* depth and overlay roles (dashboard) */
  --bg-deep:#05070c; --bg-code:#0a0e16;                    /* media wells, code/transcript wells */
  --overlay:rgba(4,6,11,.94);                              /* lightbox backdrop */
  --scrim:rgba(0,0,0,.72); --scrim-deep:rgba(5,7,12,.8);   /* labels over images, map/globe notes */
  --on-media:#fff;                                         /* text on a scrim or image */
  --star:gold; --star-off:#aaa;                            /* favourite star on / off */

  /* diagram and code roles (dashboard + deck) */
  --edge:#5b6b88;                                           /* connector lines in flow diagrams */
  --code-bg:#0a0e15; --diff-add:#86efac; --diff-del:#fca5a5; /* code wells and diff lines */

  /* semantic roles (shared with the deck) */
  --surface:var(--card); --surface-2:var(--card-2);
  --focus:var(--accent); --focus-width:3px;

  /* category chips / statuses (deck and dashboard) */
  --cat-decision:#a78bfa; --cat-risk:#fb923c; --cat-evidence:#38bdf8; --cat-metric:#fbbf24;
  --cat-pr:#34d399; --cat-prompt:#f472b6; --cat-user:#60a5fa; --cat-question:#c084fc;

  /* type */
  --font-sans:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --font-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --step--2:clamp(.75rem,.72rem + .1vw,.8rem);     /* 12–12.8px: minimum for any readable text */
  --step--1:clamp(.8125rem,.78rem + .15vw,.875rem);
  --step-0:clamp(.9375rem,.9rem + .2vw,1rem);       /* body */
  --step-1:clamp(1.0625rem,1rem + .35vw,1.25rem);
  --step-2:clamp(1.25rem,1.1rem + .7vw,1.6rem);
  --step-3:clamp(1.5rem,1.25rem + 1.2vw,2.2rem);
  --step-4:clamp(1.9rem,1.5rem + 2vw,3rem);
  --leading:1.5;

  /* space, shape, depth */
  --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px; --space-5:24px; --space-6:32px; --space-7:48px; --space-8:64px;
  --radius:10px; --radius-sm:7px; --radius-pill:999px;
  --shadow:0 8px 24px rgba(0,0,0,.35);

  /* touch and motion */
  --tap:44px;
  --fast:140ms; --slow:280ms; --ease:cubic-bezier(.2,.8,.2,1);

  /* safe areas (notch, home indicator) */
  --safe-top:env(safe-area-inset-top,0px); --safe-bottom:env(safe-area-inset-bottom,0px);
}
@media (prefers-reduced-motion:reduce){ :root{ --fast:0ms; --slow:0ms; } }
