/* SEMS design tokens.
   Dark instrument-panel base. Two accents only: blue for live/nominal, amber for
   anomaly. Blue/amber is the safest pair for deuteranopia and protanopia, and every
   status is also carried by a text label and a shape so colour is never the only signal. */

:root {
  color-scheme: dark;

  /* Surfaces */
  --bg-0: #0c1116;        /* panel base */
  --bg-1: #141b23;        /* surfaces */
  --bg-2: #1c2530;        /* raised, hovered, selected */
  --bg-3: #243040;        /* pressed, input background */
  --line: #2b3644;        /* 1px separators, no drop shadows */
  --line-strong: #3a4757;

  /* Text */
  --text: #e8eef4;        /* 13.9:1 on bg-0 */
  --text-muted: #93a1b0;  /* 7.1:1 on bg-0 */
  --text-dim: #6f7d8c;    /* 4.6:1 on bg-0, secondary labels only */

  /* Status accents */
  --nominal: #45b8f5;
  --nominal-dim: rgba(69, 184, 245, 0.18);
  --anomaly: #f5a524;
  --anomaly-dim: rgba(245, 165, 36, 0.18);
  --offline: #6f7d8c;
  --learning: #93a1b0;
  --danger: #e5545b;
  --danger-dim: rgba(229, 84, 91, 0.18);
  --focus: #ffffff;

  /* Chart */
  --chart-grid: #222c38;
  --chart-axis: #3a4757;
  --chart-series: var(--nominal);
  --chart-forecast: #9fb4c8;
  --chart-anomaly: var(--anomaly);
  --chart-truth: rgba(245, 165, 36, 0.5);
  --chart-warmup: rgba(147, 161, 176, 0.08);
  --chart-cursor: #c8d3de;

  /* Type */
  --sans: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "JetBrains Mono", "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --fs-1: 12px;
  --fs-2: 13px;
  --fs-3: 14px;
  --fs-4: 16px;
  --fs-5: 20px;
  --fs-6: 28px;
  --lh: 1.4;

  /* Spacing (4px grid) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;

  --radius: 3px;
  --control-h: 30px;

  /* Layout */
  --rail-left: 280px;
  --rail-right: 300px;
  --header-h: 56px;

  /* Motion: only where it explains a change */
  --t-fast: 120ms;
  --t-drawer: 200ms;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --t-fast: 0ms;
    --t-drawer: 0ms;
  }
}
