/* ══════════════════════════════════════════════════════════════
   NEXUS DESIGN TOKENS — single source of truth
   Loaded first, on every page, via templates/base.html.
   Do not redeclare :root token values anywhere else — page-local
   overrides should only ever set --accent (module wayfinding color).
══════════════════════════════════════════════════════════════ */

:root{
  /* ── Fonts — Roboto everywhere; differentiate via weight/size, not family ── */
  --font:'Roboto',system-ui,sans-serif;
  --font-code:'Roboto Mono',ui-monospace,monospace;
  --mono:var(--font);
  --disp:var(--font);
  --body:var(--font);

  /* ── Radius — canonical scale (Material-style, larger/softer) ── */
  --radius-sm:10px;--radius-md:16px;--radius-lg:24px;--radius-xl:28px;--radius-full:999px;
  /* Deprecated aliases — kept so untouched legacy CSS keeps working during migration */
  --radius:var(--radius-md);--r-sm:var(--radius-sm);--r-md:var(--radius-md);--r-lg:var(--radius-lg);--r-xl:var(--radius-xl);

  /* ── Spacing scale — used only by new/shared components, not retrofitted into page-local one-offs ── */
  --space-1:.25rem;--space-2:.5rem;--space-3:.75rem;--space-4:1rem;--space-5:1.5rem;--space-6:2rem;--space-7:3rem;

  /* ── Shadow scale — diffuse Material elevation, no neon glow ── */
  --shadow-sm:0 1px 2px rgba(0,0,0,.06),0 1px 3px rgba(0,0,0,.10);
  --shadow-md:0 2px 6px rgba(0,0,0,.08),0 4px 12px rgba(0,0,0,.10);
  --shadow-lg:0 8px 24px rgba(0,0,0,.12),0 2px 8px rgba(0,0,0,.08);
  --shadow-glow:var(--shadow-sm); /* retired — kept so stragglers referencing it don't break */
  /* Deprecated aliases (dashboard.css "V2" names) */
  --shadow-xl:var(--shadow-lg);--shadow-card:var(--shadow-sm);

  /* ── Breakpoint convention (documented only — @media can't consume custom
       properties). Collapses today's 10 ad hoc values down to 6. Grep
       "max-width:" / "min-width:" across static/css/*.css should only ever
       show these 6 numbers. ──
       --bp-xs: 420px   (smallest phones)
       --bp-sm: 640px   (phone / bottom-tab-bar threshold)
       --bp-md: 768px   (tablet / sidebar collapse)
       --bp-lg: 1024px  (small laptop)
       --bp-xl: 1440px  (desktop)
       --bp-2xl:1920px  (ultrawide)
  */

  --t:.15s ease; /* standard transition timing */
}

/* ── Semantic color tokens — Google dark is the default brand identity ── */
:root,[data-theme="dark"]{
  --bg:#131314;--bg2:#1e1f20;--bg3:#282a2c;--bg4:#333537;
  --text:#e8eaed;--muted:#9aa0a6;
  --text1:var(--text);--muted1:var(--muted); /* deprecated aliases, still referenced by 3 templates */
  --border:rgba(232,234,237,.08);--border2:rgba(232,234,237,.14);--border3:rgba(232,234,237,.24);

  --c:#8ab4f8;--c2:#669df6;--cg:rgba(138,180,248,.14);--cg2:rgba(138,180,248,.07);
  --v:#d0bcff;--vg:rgba(208,188,255,.14);
  --g:#81c995;--gg:rgba(129,201,149,.12);
  --r:#f28b82;--rg:rgba(242,139,130,.12);
  --a:#fdd663;--ag:rgba(253,214,99,.12);
  --fg2:var(--v); /* was undefined (dashboard.css .dlg-agent .dlg-who bug) — agent-dialogue label color */
  --text2:var(--muted); /* was undefined (settings.html .sn-quick-btn bug) — secondary text color */

  /* V2 aliases — kept alive for .mission-card-v2/.badge-*/.ks-card/.glass-panel */
  --c-primary:var(--c);--c-secondary:var(--v);--c-success:var(--g);
  --c-warning:var(--a);--c-danger:var(--r);--c-orange:#fdba74;
  --bg-base:#0f0f10;--bg-card:#1e1f20;--bg-input:#282a2c;--bg-hover:rgba(232,234,237,.05);
  --border-c:rgba(138,180,248,.3);

  /* Module wayfinding accent — default, overridden per-module page */
  --accent:var(--c);
}
