/* Syalia UI — tokens only. Injected by /_shell/nav.js into EVERY app,
   so it must carry nothing that can restyle a host document: only
   @font-face (registers a family, styles nothing) and :root custom
   properties (take effect only where referenced).

   Derived from syalia-ui.css. Never hand-edit — e2e/tests/
   test_design_system.py asserts it is a verbatim cut. Font URLs are
   relative to this stylesheet, i.e. /_shell/fonts/. */
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("fonts/SpaceGrotesk-Variable.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/Inter-Variable.woff2") format("woff2"); }
@font-face { font-family: "Material Icons"; font-style: normal; font-weight: 400; font-display: block; src: url("fonts/MaterialIcons-Regular.woff2") format("woff2"); }

:root {
  /* ---- Color: neutral ramp (one cool slate-navy family, 50→950) --------- */
  --n-50:#f8fafc; --n-100:#f1f5f9; --n-200:#e2e8f0; --n-300:#cbd5e1; --n-400:#94a3b8;
  --n-500:#64748b; --n-600:#475569; --n-700:#334155; --n-800:#1e293b; --n-900:#0f172a; --n-950:#060a17;

  /* ---- Color: blue (interactive) & amber (brand highlight) -------------- */
  --blue-400:#60a5fa; --blue-500:#3b82f6; --blue-600:#2563eb; --blue-700:#1d4ed8;
  --amber-300:#fcd34d; --amber-400:#fbbf24; --amber-500:#f59e0b;

  /* ---- Color: status ---------------------------------------------------- */
  --green-400:#34d399; --red-400:#f87171;

  /* ---- Color: brand ----------------------------------------------------- */
  --brand-grad: linear-gradient(90deg, #38bdf8, #818cf8, #c084fc); /* cyan→indigo→violet */
  --brand-blue: #3e72ad;  /* desaturated syalia-blue — atmospheric / mesh only */

  /* ---- Color: product accents (per-app identity) ------------------------ */
  --p-superbot:#10b981; --p-magpie:#60a5fa; --p-peacock:#8b5cf6;
  --p-voxpopuli:#f97316; --p-beaver:#14b8a6; --p-clipper:#84cc16;

  /* ---- Space: one non-linear scale, ~25% apart (Refactoring UI) --------- */
  --space-0:0; --space-px:1px;
  --space-1:.25rem; --space-2:.5rem; --space-3:.75rem; --space-4:1rem;
  --space-6:1.5rem; --space-8:2rem; --space-12:3rem; --space-16:4rem;
  --space-24:6rem; --space-32:8rem; --space-48:12rem; --space-64:16rem;

  /* ---- Type: families --------------------------------------------------- */
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* ---- Type: size scale (12→64, hand-picked; bundles no line-height) ---- */
  --text-xs:.75rem; --text-sm:.875rem; --text-base:1rem; --text-lg:1.125rem;
  --text-xl:1.25rem; --text-2xl:1.5rem; --text-3xl:1.875rem; --text-4xl:2.25rem;
  --text-5xl:3rem; --text-6xl:4rem;
  --text-display: clamp(2.75rem, 6vw, 5rem);  /* fluid hero */

  /* ---- Type: weight (only what we use) ---------------------------------- */
  --weight-normal:400; --weight-medium:500; --weight-semibold:600; --weight-bold:700;

  /* ---- Type: leading (inverse to size) & tracking ----------------------- */
  --leading-tight:1.1; --leading-snug:1.3; --leading-normal:1.5; --leading-relaxed:1.7;
  --tracking-tight:-.02em; --tracking-normal:0; --tracking-wide:.04em;
  --tracking-caps:.12em; --tracking-eyebrow:.22em;

  /* ---- Radius ----------------------------------------------------------- */
  --radius-sm:6px; --radius:8px; --radius-md:12px; --radius-lg:20px; --radius-full:9999px;

  /* ---- Border width ----------------------------------------------------- */
  --bw:1px;

  /* ---- Elevation: 5-level shadow scale (light from above) --------------- */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.35);
  --shadow-sm: 0 2px 6px rgba(0,0,0,.4);
  --shadow-md: 0 12px 32px -8px rgba(0,0,0,.55), 0 4px 12px -4px rgba(0,0,0,.4);
  --shadow-lg: 0 18px 50px rgba(0,0,0,.45);
  --shadow-xl: 0 30px 70px -10px rgba(0,0,0,.6);

  /* ---- Blur & glass ----------------------------------------------------- */
  --blur-glass: blur(14px) saturate(1.2);

  /* ---- Z-index scale (named, so components stop guessing) --------------- */
  --z-base:1; --z-nav:50; --z-dropdown:60; --z-modal:100; --z-tooltip:1000; --z-toast:9999;

  /* ---- Motion: one easing signature + a small duration scale ------------ */
  --ease: cubic-bezier(.2,.8,.2,1);
  --dur-micro:120ms; --dur-base:350ms; --dur-slow:800ms;

/* ===========================================================================
 * 2. TOKENS — SEMANTIC (roles that map primitives to intent)
 * ========================================================================= */
  /* Surfaces: deep page → slate panels → raised inputs → glass overlays. */
  --bg:        var(--n-950);   /* deep page background */
  --surface:   var(--n-900);   /* panels, cards, sidebars */
  --surface-2: var(--n-800);   /* inputs, raised / hover */
  --border:    #22304a;        /* hairline, reads on surface */
  --border-hi: var(--n-700);   /* hover / active borders */

  /* Text: three-step hierarchy (primary / secondary / tertiary). */
  --text:      var(--n-100);
  --text-dim:  var(--n-400);
  --text-faint:var(--n-500);

  /* Interactive accent: blue = action, everywhere. */
  --accent:    var(--blue-600);
  --accent-hi: var(--blue-500);
  --accent-lo: rgba(59,130,246,.14);

  /* Status. */
  --ok: var(--green-400); --warn: var(--amber-400); --err: var(--red-400);

  /* Glass overlay. */
  --glass-bg: rgba(30,41,59,.72);
  --glass-border: rgba(148,163,184,.28);
  --glass-shadow: var(--shadow-lg);

  /* Back-compat aliases for older vendored consumers (superbot login/account,
     peacock). The new source renamed --bg-deep→--bg and dropped the gradient. */
  --bg-deep: var(--bg);
  --syalia-grad: linear-gradient(90deg, #38bdf8, #818cf8, #c084fc);
}
