/* ============================================================================
   Orebex — Design Tokens
   AI Agent Operating System design system · slate rock (default)
   Single source of truth. No scattered hex/px anywhere else.
   Brand from logo/LOGO_RESEARCH.md: the page is the rock itself, slate
   #27313D, with the liberated mineral #1CC495 as the action colour, a hi-vis
   amber for marks and approvals, and the console set in as a dark screen.
   ========================================================================== */

:root {
  /* ---- Background / surfaces (slate neutrals; the mineral green pops) ---- */
  --bg-base: #27313d;
  --bg-900: var(--bg-base);
  --bg-800: var(--bg-base);
  --surface-1: #2e3946;
  --surface-2: #364252;
  --surface-3: #41505f;
  --canvas: #0f141a;

  /* ---- Text ---- */
  --text-primary: #eef2f6;
  --text-secondary: #c6cfd8;
  --text-muted: #9ba7b4;
  --text-faint: #8d99a6;
  --text-on-accent: #07150f;

  /* ---- Borders / grid (1px, opaque, never between sections) ---- */
  --border-subtle: #34404d;
  --border-default: #44515f;
  --border-strong: #5b6a79;
  --grid-line: #1a212a;
  --ring: #1cc495;

  /* ---- Accent: liberated mineral from logo/LOGO_RESEARCH.md (dark-background value #1CC495) ---- */
  --accent: #1cc495;
  --accent-hover: #3dd4a8;
  --accent-press: #17ad83;
  --accent-soft: #163f36;
  --brand-hivis: #f5b021;   /* hi-vis amber: section numbers, approvals, the headline phrase */

  /* ---- Agent status (always paired with icon + text label) ---- */
  --st-queued: #9ba7b4;
  --st-queued-soft: #333e4a;
  --st-running: #1cc495;
  --st-running-soft: #163f36;
  --st-waiting: #4cc3f7;
  --st-waiting-soft: #163548;
  --st-approve: #f5b021;
  --st-approve-soft: #4a3a14;
  --st-success: #5ad48f;
  --st-success-soft: #1c4430;
  --st-failed: #f4516c;
  --st-failed-soft: #4a2430;
  --st-blocked: #d0667a;
  --st-blocked-soft: #40232c;

  /* ---- Graph nodes / edges ---- */
  --node-bg: var(--surface-3);
  --node-border: var(--border-default);
  --node-active: var(--accent);
  --edge: #5b6a79;
  --edge-active: var(--accent);
  --edge-wrap: #157a62;
  --run-done: #1f6a50;

  /* ---- Brand mark fills ---- */
  --mark-rock: #8c99a8;
  --mark-rock-top: #b8c2ce;
  --mark-mineral: #1cc495;

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

  /* ---- Type: Barlow Condensed (a condensed grotesque, the register of a mine-plan title block) carries the headlines in capitals, Public Sans carries interface and running text, Cascadia Mono carries tags, grades and lot numbers ---- */
  --font-sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --font-mono: "Cascadia Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --fs-display: clamp(2.75rem, 1.7rem + 4.4vw, 5rem);
  --fs-h1: clamp(2.25rem, 1.6rem + 2.8vw, 3.5rem);
  --fs-h2: clamp(1.75rem, 1.3rem + 1.9vw, 2.75rem);
  --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.45vw, 1.25rem);
  --fs-body: 1rem;
  --fs-body-lg: 1.125rem;
  --fs-small: 0.875rem;
  --fs-mono: 0.8125rem;
  --fs-micro: 0.6875rem;
  --fs-metric: clamp(2rem, 1.5rem + 2.2vw, 3.25rem);
  --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: 2px;
  --radius-md: 3px;
  --radius-lg: 4px;
  --radius-xl: 6px;
  --radius-pill: 999px;
  --radius-btn: 2px;   /* buttons, command trigger, "built for" tags */
  --radius-node: 3;   /* graph node rx, in SVG user units */

  /* ---- 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(64px, 7vw, 112px);
  --section-y-lg: clamp(72px, 8vw, 128px);
  --nav-h: 68px;

  /* ---- Control-room density ---- */
  --panel-gap: clamp(12px, 1.2vw, 20px);
  --panel-pad: clamp(20px, 2vw, 28px);
  --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: #1b232c;

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

}

/* ---- Optional light theme (control-room dark remains the identity) ---- */
[data-theme="light"] {
  --bg-base: #f6f7f9;
  --bg-900: var(--bg-base);
  --bg-800: var(--bg-base);
  --surface-1: #ffffff;
  --surface-2: #eff1f4;
  --surface-3: #e3e7ec;
  --canvas: #f8f9fb;
  --text-primary: #1f2731;
  --text-secondary: #3d4652;
  --text-muted: #5e6773;
  --text-faint: #7a838f;
  --text-on-accent: #07150f;
  --border-subtle: #e3e6ea;
  --border-default: #d2d6dc;
  --border-strong: #bec4cb;
  --grid-line: #e7eaee;
  --accent: #10a37f;
  --accent-hover: #0e9272;
  --accent-press: #0c7f63;
  --accent-soft: #d6f1e8;
  --ring: #10a37f;
  --st-queued: #5e6773;
  --st-running: #10a37f;
  --st-waiting: #0284c7;
  --st-approve: #a16207;
  --st-success: #1f8f4e;
  --st-failed: #be123c;
  --st-blocked: #9f1239;
  --st-queued-soft: #dfe2e6;
  --st-running-soft: #d6f1e8;
  --st-waiting-soft: #d0e6f4;
  --st-approve-soft: #efe4c9;
  --st-success-soft: #d5ecdc;
  --st-failed-soft: #eed4dd;
  --st-blocked-soft: #e9d4dd;
  --edge: #bec4cb;
  --edge-wrap: #7fcdb6;
  --run-done: #9ac5b6;
  --scrim: #f6f7f9;
  --mark-rock: #27313d;
  --mark-rock-top: #4a5868;
  --mark-mineral: #10a37f;
}
