/* ARBIT Control Center — design tokens (per design_handoff_arbit_control_center).
 * Ported verbatim from tokens.css in the handoff bundle. */

:root {
  /* Surfaces */
  --surface-0: oklch(9% 0.012 250);
  --surface-1: oklch(13% 0.018 250);
  --surface-2: oklch(16% 0.022 250);
  --surface-3: oklch(20% 0.025 250);
  --surface-editorial: oklch(15% 0.015 60);
  --surface-glass: oklch(18% 0.02 250 / 0.55);

  /* Strokes */
  --stroke-1: oklch(28% 0.02 250 / 0.6);
  --stroke-2: oklch(40% 0.025 250 / 0.45);
  --stroke-hot: oklch(70% 0.05 250 / 0.5);

  /* Foreground */
  --fg-primary: oklch(96% 0.005 80);
  --fg-secondary: oklch(75% 0.01 80);
  --fg-tertiary: oklch(58% 0.012 80);
  --fg-quaternary: oklch(42% 0.012 80);

  /* Agent accents */
  --agent-scanner: oklch(75% 0.13 220);
  --agent-coordinator: oklch(78% 0.14 75);
  --agent-executor: oklch(60% 0.20 25);
  --agent-riskdesk: oklch(65% 0.08 240);
  --agent-janitor: oklch(55% 0.02 260);
  --agent-reporter: oklch(85% 0.04 80);
  --agent-smartmoney: oklch(65% 0.18 305);
  --agent-arbit: oklch(92% 0.03 70);
  --agent-signalagent: oklch(72% 0.12 180);  /* teal — added for Agent 9 */
  --agent-reconciler: oklch(70% 0.10 200);   /* cool slate-cyan */

  /* Semantic */
  --profit: oklch(72% 0.13 160);
  --loss: oklch(65% 0.15 30);
  --kill: oklch(58% 0.24 25);
  --warning: oklch(78% 0.14 75);

  /* Type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  --font-serif: "Source Serif 4", "Newsreader", Georgia, serif;

  /* Radii */
  --r-1: 4px; --r-2: 8px; --r-3: 12px; --r-4: 18px;
  --r-pill: 999px;

  /* Spacing (4px base) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-7: 32px; --s-8: 40px;
  --s-9: 56px; --s-10: 72px;

  /* Motion */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in: cubic-bezier(0.6, 0, 0.85, 0.25);
  --d-micro: 120ms;
  --d-state: 400ms;
  --d-hero: 700ms;

  /* Density (mutable via Tweaks) */
  --row-h: 32px;
  --pad-x: 16px;
  --pad-y: 12px;
}

[data-density="compact"] {
  --row-h: 26px;
  --pad-x: 12px;
  --pad-y: 8px;
}

[data-theme="light"] {
  --surface-0: oklch(96% 0.005 80);
  --surface-1: oklch(94% 0.006 80);
  --surface-2: oklch(91% 0.007 80);
  --surface-3: oklch(87% 0.008 80);
  --surface-editorial: oklch(93% 0.012 80);
  --surface-glass: oklch(96% 0.005 80 / 0.7);
  --stroke-1: oklch(80% 0.01 80 / 0.7);
  --stroke-2: oklch(70% 0.01 80 / 0.6);
  --fg-primary: oklch(18% 0.02 250);
  --fg-secondary: oklch(38% 0.02 250);
  --fg-tertiary: oklch(55% 0.02 250);
  --fg-quaternary: oklch(70% 0.015 250);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--surface-0);
  color: var(--fg-primary);
  font-size: 13.5px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

.mono { font-family: var(--font-mono); font-feature-settings: "tnum", "zero"; }
.tabnum { font-variant-numeric: tabular-nums; }
.serif { font-family: var(--font-serif); }

button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; color: inherit; }

::selection { background: oklch(70% 0.13 220 / 0.35); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: oklch(35% 0.02 250 / 0.4);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: oklch(45% 0.02 250 / 0.6); background-clip: padding-box; }

/* Bespoke keyframes */
@keyframes breathe {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}
@keyframes pulse-ring {
  0% { transform: scale(0.6); opacity: 0.7; }
  100% { transform: scale(1.8); opacity: 0; }
}
@keyframes scanline {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes flow-dash { to { stroke-dashoffset: -40; } }
@keyframes iridescent-shift {
  0%, 100% { filter: hue-rotate(0deg); }
  50% { filter: hue-rotate(20deg); }
}
@keyframes drift {
  0%, 100% { transform: translate(0,0); }
  50% { transform: translate(2px,-1.5px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* Halted state — silence is the alarm */
[data-halted="true"] .breathe,
[data-halted="true"] .scanline,
[data-halted="true"] .drift,
[data-halted="true"] .iridescent {
  animation: none !important;
}
[data-halted="true"] { filter: saturate(0.4) brightness(0.85); }
