/* Rotatoes design tokens — see DESIGN.md §3. Components never use raw colours. */
:root {
  color-scheme: dark;
  --canvas: #0F1114;
  --surface-1: #17191D;
  --surface-2: #20232A;
  --surface-3: #2B2F37;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .18);
  --text: #ECEDEF;
  --text-2: #A4A8AF;
  --text-3: #70757D;
  --accent: #F2B544;
  --on-accent: #1A1404;
  --ok: #5BC98C;
  --warn: #F08A4B;
  --danger: #EF5F5F;
  --scrim: rgba(0, 0, 0, .4);

  --font-ui: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-num: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs-label: 11px;
  --fs-body: 13px;
  --fs-title: 17px;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s6: 24px; --s8: 32px;
  --r-control: 6px;
  --r-card: 10px;
  --r-panel: 16px;
  --r-full: 999px;
  --elevation: 0 8px 24px rgba(0, 0, 0, .28);

  --hit: 28px;            /* minimum pointer target */
  --ghost: 36px;          /* ghost icon button */
  --bar-h: 48px;
  --inspector-w: 328px;
  --fast: 120ms ease-out;
  --slow: 240ms cubic-bezier(.2, .8, .2, 1);

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
}

:root[data-surface="blueprint"] { --canvas: #0D2137; }

:root[data-surface="paper"] {
  color-scheme: light;
  --canvas: #F4F1EA;
  --surface-1: #FFFFFF;
  --surface-2: #F1EFEA;
  --surface-3: #E6E3DC;
  --line: rgba(20, 20, 20, .10);
  --line-strong: rgba(20, 20, 20, .22);
  --text: #1B1D21;
  --text-2: #565B64;
  --text-3: #8A8F97;
  --accent: #A86B00;
  --on-accent: #FFFFFF;
  --ok: #1F8A4C;
  --warn: #B5530F;
  --danger: #C22F2F;
  --scrim: rgba(20, 20, 20, .25);
}

/* Touch: larger body text and 44px targets. */
@media (pointer: coarse) {
  :root { --fs-body: 15px; --hit: 44px; --ghost: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  :root { --fast: 0ms; --slow: 0ms; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
