
:root {
  color-scheme: light dark;

  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-surface-hover: #f4f6f8;
  --color-surface-sunken: #f7f8fa;

  --color-text: #14181d;
  --color-text-secondary: #444c56;
  --color-text-tertiary: #6b7480;

  --color-border: #dfe3e8;
  --color-border-strong: #c3c9d1;

  --color-accent: #1a5fd0;
  --color-accent-hover: #164da8;
  --color-accent-contrast: #ffffff;

  --color-focus: #1a5fd0;

  --color-success: #157a4a;
  --color-warning: #8a5a00;
  --color-danger: #b3261e;

  --color-selected-bg: #e8f0fd;
  --color-danger-bg: #fdecea;
  --color-skeleton: #e9ecf0;

  --border-hairline: 1px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-control: 8px;
  --focus-ring-width: 2px;
  --radius-pill: 999px;

  --target-min: 44px;

  --font-sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --text-caption: 0.6875rem;
  --text-metadata: 0.8125rem;
  --text-body: 0.9375rem;
  --text-result-title: 1.1875rem;
  --text-heading: 1.75rem;
  --text-display: 2.25rem;
  --weight-title: 600;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;

  --measure-result: 44rem;
  --measure-page: 60rem;

  --duration-fast: 90ms;
  --easing-standard: cubic-bezier(0.2, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0d1117;
    --color-surface: #0d1117;
    --color-surface-hover: #171d26;
    --color-surface-sunken: #010409;

    --color-text: #e8edf3;
    --color-text-secondary: #b6bfcb;
    --color-text-tertiary: #8b95a3;

    --color-border: #262d38;
    --color-border-strong: #39424f;

    --color-accent: #6ba4f5;
    --color-accent-hover: #8bb8f8;
    --color-accent-contrast: #06121f;

    --color-focus: #6ba4f5;

    --color-success: #4cc38a;
    --color-warning: #d9a441;
    --color-danger: #f2837c;

    --color-selected-bg: #16243a;
    --color-danger-bg: #2a1513;
    --color-skeleton: #1c232d;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
