/* ============================================================================
   Powdrix — Design Tokens
   AI Agent Operating System design system · control-room dark (default)
   Single source of truth. No scattered hex/px anywhere else.
   Brand: fused melt rose #E5245A / #FF3D6E and powder graphite #2A2E37 / #C7CCD4
   from logo/LOGO_RESEARCH.md.
   ========================================================================== */

:root {
  /* ---- Background / surfaces (neutral; melt rose pops) ---- */
  --bg-base: #0c0d11;
  --bg-900: var(--bg-base);
  --bg-800: var(--bg-base);
  --surface-1: #15171d;
  --surface-2: #1c1f26;
  --surface-3: #242830;
  --canvas: #0e1014;

  /* ---- Text ---- */
  --text-primary: #f2f3f5;
  --text-secondary: #b4b9c3;
  --text-muted: #868d99;
  --text-faint: #7e8591;
  --text-on-accent: #1c1f26;

  /* ---- Borders / grid (1px, opaque, never between sections) ---- */
  --border-subtle: #1d2026;
  --border-default: #2a2e37;
  --border-strong: #3b404a;
  --grid-line: #191c21;
  --ring: #ff3d6e;

  /* ---- Accent: fused melt rose from logo/LOGO_RESEARCH.md (dark-background value #FF3D6E) ---- */
  --accent: #ff3d6e;
  --accent-hover: #ff5c85;
  --accent-press: #e5245a;
  --accent-soft: #3a1522;

  /* ---- Powder: the loose-grain grey of the mark on dark backgrounds ---- */
  --powder: #c7ccd4;

  /* ---- Agent status (always paired with icon + text label) ---- */
  --st-queued: #868d99;
  --st-queued-soft: #1f2229;
  --st-running: #ff3d6e;
  --st-running-soft: #3a1522;
  --st-waiting: #38bdf8;
  --st-waiting-soft: #112835;
  --st-approve: #f5b942;
  --st-approve-soft: #302713;
  --st-success: #2dd4a0;
  --st-success-soft: #102c27;
  --st-failed: #f4516c;
  --st-failed-soft: #2f171f;
  --st-blocked: #c0566b;
  --st-blocked-soft: #27181f;

  /* ---- Graph nodes / edges ---- */
  --node-bg: var(--surface-3);
  --node-border: var(--border-default);
  --node-active: var(--accent);
  --edge: #3b404a;
  --edge-active: var(--accent);
  --edge-wrap: #9a3552;
  --run-done: #185c4a;

  /* ---- Generic semantic ---- */
  --good: var(--st-success);
  --warn: var(--st-approve);
  --bad: var(--st-failed);
  --info: var(--st-waiting);

  /* ---- Type: Teko carries the headlines (condensed, upright, engineered), Heebo carries interface and running text, Oxygen Mono carries tags, layer numbers and CT readings ---- */
  --font-sans: "Heebo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Teko", "Arial Narrow", Impact, sans-serif;
  --font-mono: "Oxygen Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --fs-display: clamp(3rem, 2rem + 4.4vw, 5.25rem);
  --fs-h1: clamp(2.6rem, 2rem + 3vw, 4rem);
  --fs-h2: clamp(2rem, 1.5rem + 2vw, 3rem);
  --fs-h3: clamp(1.35rem, 1.15rem + 0.9vw, 1.8rem);
  --fs-h4: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem);
  --fs-lead: clamp(1.0625rem, 1rem + 0.5vw, 1.3125rem);
  --fs-body: 0.9375rem;
  --fs-body-lg: 1.0625rem;
  --fs-small: 0.8125rem;
  --fs-mono: 0.8125rem;
  --fs-micro: 0.6875rem;
  --fs-metric: clamp(2.2rem, 1.6rem + 2.4vw, 3.6rem);
  --fs-price: clamp(2.75rem, 2.2rem + 2.4vw, 4rem);

  /* ---- Spacing: 4-pt base / 8-pt rhythm ---- */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-28: 112px;
  --space-32: 128px;
  --space-40: 160px;

  /* ---- Radii: pill-shaped like the fused bars in the mark ---- */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 999px;

  /* ---- Containers ---- */
  --container-sm: 680px;
  --container-md: 840px;
  --container-lg: 1080px;
  --container-xl: 1240px;
  --container-2xl: 1440px;
  --gutter: clamp(20px, 4vw, 40px);

  /* ---- Section rhythm ---- */
  --section-y: clamp(52px, 5.6vw, 88px);
  --section-y-lg: clamp(72px, 8vw, 132px);
  --nav-h: 64px;

  /* ---- Control-room density ---- */
  --panel-gap: clamp(12px, 1.2vw, 20px);
  --panel-pad: clamp(16px, 1.6vw, 24px);
  --log-line-y: 4px;
  --node-pad: var(--space-3) var(--space-4);
  --step-gap: var(--space-4);
  --stack: clamp(12px, 1.4vw, 20px);

  /* ---- Motion ---- */
  --dur-fast: 120ms;
  --dur-base: 220ms;
  --dur-slow: 380ms;
  --dur-run: 600ms;
  --ease-out: cubic-bezier(0.2, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --pulse: 1.6s;

  /* ---- Elevation: flat by rule. Edges are 1px opaque borders; no shadows, no colour ramps, no translucency anywhere. ---- */
  --hairline: none;
  --shadow-1: none;
  --shadow-2: none;
  --shadow-3: none;
  --scrim: #08090c;

  /* ---- Grid ---- */
  --grid-cols: 12;
  --grid-gap: var(--panel-gap);

}

/* ---- Optional light theme (control-room dark remains the identity) ---- */
[data-theme="light"] {
  --bg-base: #f7f8fa;
  --bg-900: var(--bg-base);
  --bg-800: var(--bg-base);
  --surface-1: #ffffff;
  --surface-2: #f1f3f6;
  --surface-3: #e6e9ee;
  --canvas: #f9fafc;
  --text-primary: #1c1f26;
  --text-secondary: #3d434d;
  --text-muted: #5f6773;
  --text-faint: #7b838f;
  --text-on-accent: #ffffff;
  --border-subtle: #e5e8ec;
  --border-default: #d5d9df;
  --border-strong: #c1c6ce;
  --grid-line: #e9ebef;
  --accent: #e5245a;
  --accent-hover: #cc1f50;
  --accent-press: #b31b46;
  --accent-soft: #f9dde5;
  --ring: #e5245a;
  --powder: #2a2e37;
  --st-queued: #5f6773;
  --st-running: #e5245a;
  --st-waiting: #0284c7;
  --st-approve: #a16207;
  --st-success: #0f766e;
  --st-failed: #be123c;
  --st-blocked: #9f1239;
  --st-queued-soft: #e0e3e8;
  --st-running-soft: #f9dde5;
  --st-waiting-soft: #d0e6f4;
  --st-approve-soft: #efe4c9;
  --st-success-soft: #d2e4e5;
  --st-failed-soft: #eed4dd;
  --st-blocked-soft: #e9d4dd;
  --edge: #c1c6ce;
  --edge-wrap: #ee8fab;
  --run-done: #9ac5c3;
  --scrim: #f7f8fa;
}
