/* ChargeBench design tokens — docs/UX_SPEC.md */

:root {
  /* Brand */
  --color-brand: #0f766e;
  --color-brand-hover: #115e59;
  --color-brand-tint: #ccfbf1;
  --color-brand-soft: #f0fdfa;

  /* Neutrals (slate) */
  --color-text: #0f172a;
  --color-text-secondary: #475569;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --color-border-strong: #cbd5e1;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-raised: #ffffff;

  /* Status */
  --color-pass: #15803d;
  --color-pass-bg: #dcfce7;
  --color-fail: #b91c1c;
  --color-fail-bg: #fee2e2;
  --color-warn: #b45309;
  --color-warn-bg: #ffedd5;
  --color-na: #64748b;
  --color-na-bg: #f1f5f9;
  --color-running: #1d4ed8;
  --color-running-bg: #dbeafe;

  /* Typography */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", "Roboto Mono", monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  --line-height: 1.5;

  /* Radius & shadow */
  --radius-sm: 6px;
  --radius-md: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);

  /* Spacing (4pt grid) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;

  /* Focus */
  --focus-ring: 0 0 0 3px rgba(15, 118, 110, 0.35);

  color-scheme: light;
}

[data-theme="dark"] {
  --color-text: #f1f5f9;
  --color-text-secondary: #94a3b8;
  --color-text-muted: #64748b;
  --color-border: #334155;
  --color-border-strong: #475569;
  --color-bg: #0f172a;
  --color-surface: #1e293b;
  --color-surface-raised: #243044;
  --color-brand-tint: #134e4a;
  --color-brand-soft: #042f2e;
  --color-pass-bg: #14532d;
  --color-fail-bg: #7f1d1d;
  --color-warn-bg: #78350f;
  --color-na-bg: #334155;
  --color-running-bg: #1e3a8a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-text: #f1f5f9;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #64748b;
    --color-border: #334155;
    --color-border-strong: #475569;
    --color-bg: #0f172a;
    --color-surface: #1e293b;
    --color-surface-raised: #243044;
    --color-brand-tint: #134e4a;
    --color-brand-soft: #042f2e;
    --color-pass-bg: #14532d;
    --color-fail-bg: #7f1d1d;
    --color-warn-bg: #78350f;
    --color-na-bg: #334155;
    --color-running-bg: #1e3a8a;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}