/*
 * Design tokens shared by every page. One file so the taker, the builder and
 * the API docs read as one product; each page's own stylesheet uses these
 * names and never re-declares the palette. A survey's accent overrides
 * --accent at runtime (style.setProperty), which is why everything that should
 * follow the poll's colour uses --accent rather than a literal.
 */
:root {
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #fbfbfd;
  --surface: #ffffff;
  --surface-2: #f2f3f7;
  --fg: #16181d;
  --muted: #5d6270;
  --border: #e2e4ea;
  --accent: #3d5afe;
  --accent-fg: #ffffff;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --danger: #c62828;
  --success: #1b7f4b;
  --warning: #a15c00;
  --focus: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent);

  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 4px 16px rgb(16 24 40 / 6%);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115;
    --surface: #171a21;
    --surface-2: #1f232c;
    --fg: #eef0f4;
    --muted: #9aa1b2;
    --border: #2a2f3a;
    --accent: #7c8cff;
    --accent-fg: #0f1115;
    --danger: #ff6b6b;
    --success: #4cc38a;
    --warning: #f0a54a;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0f1115;
  --surface: #171a21;
  --surface-2: #1f232c;
  --fg: #eef0f4;
  --muted: #9aa1b2;
  --border: #2a2f3a;
  --accent: #7c8cff;
  --accent-fg: #0f1115;
  --danger: #ff6b6b;
  --success: #4cc38a;
  --warning: #f0a54a;
  color-scheme: dark;
}
