/*
 * PinoDub design tokens [EXT-4].
 * Calm and dense: warm neutrals, one accent (pine green), a 4-pt spacing grid, the system font.
 * Light and dark are both first-class: every colour is a light-dark() pair, and the theme is
 * the document's colour scheme — "auto" follows the system, data-theme forces one.
 * Motion is only used to show a change of state and is removed for reduced-motion.
 */
:root {
  color-scheme: light dark;

  /* Type */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --text-xs: 11px;
  --text-sm: 12px;
  --text-md: 13px;
  --text-lg: 15px;
  --text-xl: 18px;
  --lh-tight: 16px;
  --lh: 20px;
  --lh-loose: 24px;

  /* Space: 4-pt grid */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s8: 32px;
  --s10: 40px;

  /* Shape */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-full: 999px;
  --control-h: 32px;

  /* Motion */
  --dur: 140ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);

  /* Surfaces */
  --bg: light-dark(#f5f4f0, #131413);
  --surface: light-dark(#ffffff, #1b1d1c);
  --surface-2: light-dark(#efeee9, #242726);
  --surface-hover: light-dark(#f3f2ee, #222524);
  --border: light-dark(#e4e2db, #2c2f2e);
  --border-strong: light-dark(#cdcac1, #404442);

  /* Text */
  --text: light-dark(#1b1b18, #ecebe6);
  --text-2: light-dark(#5a5852, #a8a7a0);
  --text-3: light-dark(#75726a, #8b8a84);

  /* The one accent */
  --accent: light-dark(#17755a, #52c79f);
  --accent-strong: light-dark(#115c46, #6fd6b1);
  --accent-soft: light-dark(#e3f1eb, #17332a);
  --on-accent: light-dark(#ffffff, #07241a);

  /* Status: quiet, only where meaning needs it */
  --warn: light-dark(#8a5300, #e3b565);
  --warn-soft: light-dark(#faefd8, #33290f);
  --danger: light-dark(#b0271f, #f08a80);
  --danger-soft: light-dark(#fbe9e6, #3a1b18);

  --ring: light-dark(#17755a, #6fd6b1);
  --shadow-1: 0 1px 2px light-dark(rgba(30, 28, 20, 0.06), rgba(0, 0, 0, 0.3));
  --shadow-2: 0 6px 24px light-dark(rgba(30, 28, 20, 0.1), rgba(0, 0, 0, 0.45));
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

@media (prefers-reduced-motion: reduce) {
  :root { --dur: 0ms; }
  *, *::before, *::after { animation-duration: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 0ms !important; }
}
