/* ============================================================================
   Milkeon — Design Tokens
   AI Agent Operating System design system · dairy control-room dark (default)
   Single source of truth. No scattered hex/px anywhere else.
   Palette from logo/LOGO_RESEARCH.md: dairy navy #14325E, butter cream #F4C443,
   milk white, and the navy's dark-background variant #7FA7E6.
   ========================================================================== */

:root {
  /* ---- Background / surfaces (navy-leaning neutrals) ---- */
  --bg-base:   #0a0e16;
  --bg-900:    var(--bg-base);
  --bg-800:    var(--bg-base);
  --surface-1: #121a28;
  --surface-2: #192334;
  --surface-3: #212d42;
  --canvas:    #0c111b;

  /* ---- Text ---- */
  --text-primary:   #eef2f8;
  --text-secondary: #aeb7c7;
  --text-muted:     #838ea0;
  --text-faint:     #7e889a;
  --text-on-accent: #06101f;

  /* ---- Borders / grid (panel + node/edge; never between sections) ---- */
  --border-subtle:  #1b2231;
  --border-default: #283145;
  --border-strong:  #3a4560;
  --grid-line:      #171e2b;
  --ring:           #7fa7e6;

  /* ---- Brand (the mark) ---- */
  --brand-bottle: #7fa7e6;   /* navy's dark-background variant */
  --brand-cream:  #f4c443;
  --brand-milk:   #ffffff;

  /* ---- Accent (the ACTIVE PATH / primary action) ---- */
  --accent:       #7fa7e6;
  --accent-hover: #99b9ec;
  --accent-press: #6a95db;
  --accent-soft:  #16243a;   /* opaque tint of the accent on the canvas */

  /* ---- AGENT STATUS (always paired with icon + text label) ---- */
  --st-queued:  #838ea0;  --st-queued-soft:  #1d2330;
  --st-running: #7fa7e6;  --st-running-soft: #172338;
  --st-waiting: #4fc3e8;  --st-waiting-soft: #112a36;
  --st-approve: #f4c443;  --st-approve-soft: #302712;
  --st-success: #3cc9a2;  --st-success-soft: #102c27;
  --st-failed:  #f0566f;  --st-failed-soft:  #2f171f;
  --st-blocked: #bf5a70;  --st-blocked-soft: #27181f;

  /* ---- Product marks ---- */
  --prod-sepion:  #0e7c86;
  --prod-aridyn:  #b5651d;
  --prod-culvex:  #5b8c3e;
  --prod-vizra:   #1466b8;
  --prod-lactwin: #4b48c4;

  /* ---- Graph nodes / edges ---- */
  --node-bg:     var(--surface-3);
  --node-border: var(--border-default);
  --node-active: var(--accent);
  --edge:        #3a4560;
  --edge-active: var(--accent);
  --edge-wrap:   #3d5e95;   /* the accent stepped down toward the canvas */
  --run-done:    #1b5c4b;   /* success stepped down toward the canvas */

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

  /* ---- Type ---- */
  /* Cormorant Garamond carries the headlines: a text serif with the register
     of a dairy label against a plant-grade interface. Open Sans carries
     running and interface text, and Sono carries fat percentages, pH values
     and batch numbers. */
  --font-sans: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-mono: "Sono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;

  --fs-display: clamp(2.5rem, 1.6rem + 3.6vw, 4rem);
  --fs-h1:      clamp(2.25rem, 1.6rem + 2.6vw, 3.25rem);
  --fs-h2:      clamp(1.75rem, 1.3rem + 1.7vw, 2.5rem);
  --fs-h3:      clamp(1.25rem, 1.1rem + 0.8vw, 1.625rem);
  --fs-h4:      clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  --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(1.75rem, 1.35rem + 1.9vw, 2.75rem);
  --fs-price:   clamp(2.25rem, 1.8rem + 2vw, 3.25rem);

  /* ---- 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: 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 opaque 1px borders; nothing is
     raised, blurred or translucent. ---- */
  --hairline: none;
  --shadow-1: none;
  --shadow-2: none;
  --shadow-3: none;
  --scrim:    #06090f;

  --grid-cols: 12;
  --grid-gap: var(--panel-gap);
}

/* ---- Optional light theme (dairy navy on milk white) ---- */
[data-theme="light"] {
  --bg-base: #f7f9fc;  --bg-900: var(--bg-base);  --bg-800: var(--bg-base);
  --surface-1: #ffffff; --surface-2: #f1f4f9; --surface-3: #e6ebf3;
  --canvas: #f8fafd;
  --text-primary: #0a0e16; --text-secondary: #3a4252; --text-muted: #5d6678;
  --text-faint: #7b8494; --text-on-accent: #ffffff;
  --border-subtle: #e4e8ee;
  --border-default: #d3d8e1;
  --border-strong: #bfc6d2;
  --grid-line: #e9ecf1;
  --ring: #14325e;
  --brand-bottle: #14325e;
  --brand-cream: #f4c443;
  --brand-milk: #ffffff;
  --accent: #14325e; --accent-hover: #0f2749; --accent-press: #0b1d37;
  --accent-soft: #dce4f2;
  --st-queued: #5d6678; --st-running: #14325e; --st-waiting: #0a6f8a;
  --st-approve: #8a6a0f; --st-success: #0f766e; --st-failed: #be123c;
  --st-blocked: #9f1239;
  --st-queued-soft: #dee1e7;  --st-running-soft: #dce4f2; --st-waiting-soft: #d0e6ee;
  --st-approve-soft: #f6ead0; --st-success-soft: #d2e4e5; --st-failed-soft: #eed4dd;
  --st-blocked-soft: #e9d4dd;
  --edge: #bfc6d2;
  --edge-wrap: #7f9ac4;
  --run-done: #9ac5c3;
  --scrim: #f7f9fc;
}
