/* ══════════════════════════════════════════════════════════════
   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 ─────────────────────────────────────── */
  --mono:'Share Tech Mono',ui-monospace,monospace;
  --disp:'Rajdhani',sans-serif;
  --body:'Inter',sans-serif;

  /* ── Radius — canonical scale (replaces 3 conflicting scales) ── */
  --radius-sm:8px;--radius-md:12px;--radius-lg:18px;--radius-xl:24px;--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 ──────────────────────────────── */
  --shadow-sm:0 4px 24px rgba(0,0,0,.45);
  --shadow-md:0 8px 30px rgba(0,0,0,.3);
  --shadow-lg:0 24px 64px rgba(0,0,0,.5);
  --shadow-glow:0 0 24px rgba(34,184,212,.15);
  /* 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 — dark is the default brand identity ── */
:root,[data-theme="dark"],[data-theme="jarvis"]{
  --bg:#0a0a0d;--bg2:#121318;--bg3:#181a21;--bg4:#1f222b;
  --text:#e7e9ee;--muted:#838b99;
  --text1:var(--text);--muted1:var(--muted); /* deprecated aliases, still referenced by 3 templates */
  --border:rgba(255,255,255,.06);--border2:rgba(255,255,255,.12);--border3:rgba(255,255,255,.22);

  --c:#22b8d4;--c2:#1789a3;--cg:rgba(34,184,212,.10);--cg2:rgba(34,184,212,.05);
  --v:#8b7cf6;--vg:rgba(139,124,246,.12);
  --g:#34d399;--gg:rgba(52,211,153,.1);
  --r:#f87171;--a:#fbbf24;
  --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:#f97316;
  --bg-base:#06090f;--bg-card:#0c111a;--bg-input:#131820;--bg-hover:rgba(255,255,255,.04);
  --border-c:rgba(34,184,212,.25);

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