/* ============================================================================
   Forgiron — Design Tokens
   AI Agent Operating System design system · control-room dark (default)
   Single source of truth. No scattered hex/px anywhere else.
   Brand: hot metal #F05A1A / #FF6A26 and punch iron #23272E / #AEB6C2 from logo/LOGO_RESEARCH.md.
   ========================================================================== */

:root {
  /* ---- Background / surfaces (neutral graphite; hot metal pops) ---- */
  --bg-base: #0c0d10;
  --bg-900: var(--bg-base);
  --bg-800: var(--bg-base);
  --surface-1: #15171c;
  --surface-2: #1c1f25;
  --surface-3: #23272e;
  --canvas: #0e1014;

  /* ---- Text ---- */
  --text-primary: #eef0f3;
  --text-secondary: #b4bac4;
  --text-muted: #878f9b;
  --text-faint: #7f8793;
  --text-on-accent: #1b1e23;

  /* ---- Borders / grid (1px, opaque, never between sections) ---- */
  --border-subtle: #1d2026;
  --border-default: #292d35;
  --border-strong: #3b4049;
  --grid-line: #191c21;
  --ring: #ff6a26;

  /* ---- Accent: hot metal from logo/LOGO_RESEARCH.md (dark-background value #FF6A26) ---- */
  --accent: #ff6a26;
  --accent-hover: #ff7f47;
  --accent-press: #e65a1c;
  --accent-soft: #34211a;

  /* ---- Agent status (always paired with icon + text label) ---- */
  --st-queued: #878f9b;
  --st-queued-soft: #1f2229;
  --st-running: #ff6a26;
  --st-running-soft: #34211a;
  --st-waiting: #38bdf8;
  --st-waiting-soft: #112835;
  --st-approve: #f5c042;
  --st-approve-soft: #302913;
  --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: #3b4049;
  --edge-active: var(--accent);
  --edge-wrap: #9a4a24;
  --run-done: #185c4a;

  /* ---- Brand mark fills ---- */
  --mark-hex: #ff6a26;
  --mark-punch: #aeb6c2;

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

  /* ---- Type: Rokkitt (a slab serif, the register of stamped steel) carries the headlines, Catamaran carries interface and running text, Lekton carries tags, temperatures and lot numbers ---- */
  --font-sans: "Catamaran", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Rokkitt", "Rockwell", Georgia, serif;
  --font-mono: "Lekton", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --fs-display: clamp(2.5rem, 1.7rem + 3.8vw, 4.25rem);
  --fs-h1: clamp(2.2rem, 1.6rem + 2.8vw, 3.4rem);
  --fs-h2: clamp(1.7rem, 1.3rem + 1.8vw, 2.5rem);
  --fs-h3: clamp(1.3rem, 1.1rem + 0.9vw, 1.7rem);
  --fs-h4: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
  --fs-lead: clamp(1.0625rem, 1rem + 0.5vw, 1.3125rem);
  --fs-body: 1rem;
  --fs-body-lg: 1.125rem;
  --fs-small: 0.875rem;
  --fs-mono: 0.8125rem;
  --fs-micro: 0.6875rem;
  --fs-metric: clamp(1.9rem, 1.45rem + 2vw, 3rem);
  --fs-price: clamp(2.4rem, 1.9rem + 2.1vw, 3.5rem);

  /* ---- 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 ---- */
  --radius-sm: 3px;
  --radius-md: 5px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --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: #f7f7f8;
  --bg-900: var(--bg-base);
  --bg-800: var(--bg-base);
  --surface-1: #ffffff;
  --surface-2: #f0f1f3;
  --surface-3: #e5e7ea;
  --canvas: #f9f9fa;
  --text-primary: #1b1e23;
  --text-secondary: #3b414b;
  --text-muted: #5e6671;
  --text-faint: #7a828e;
  --text-on-accent: #1b1e23;
  --border-subtle: #e4e6e9;
  --border-default: #d3d6db;
  --border-strong: #bfc3ca;
  --grid-line: #e8eaed;
  --accent: #f05a1a;
  --accent-hover: #db5017;
  --accent-press: #c44611;
  --accent-soft: #fbe4d8;
  --ring: #f05a1a;
  --st-queued: #5e6671;
  --st-running: #f05a1a;
  --st-waiting: #0284c7;
  --st-approve: #a16207;
  --st-success: #0f766e;
  --st-failed: #be123c;
  --st-blocked: #9f1239;
  --st-queued-soft: #dfe2e6;
  --st-running-soft: #fbe4d8;
  --st-waiting-soft: #d0e6f4;
  --st-approve-soft: #efe4c9;
  --st-success-soft: #d2e4e5;
  --st-failed-soft: #eed4dd;
  --st-blocked-soft: #e9d4dd;
  --edge: #bfc3ca;
  --edge-wrap: #f0a07c;
  --run-done: #9ac5c3;
  --scrim: #f7f7f8;
  --mark-hex: #f05a1a;
  --mark-punch: #23272e;
}
