/* Barevné tokeny 1:1 z HTML návrhu (shodné s tokens.css aplikace EduGrid).
   Motiv: bez data-theme se řídí systémem, data-theme="light|dark" na <html> ho vynutí.
   Inline skript v <head> nastaví data-theme dřív, než se stránka vykreslí. */

:root {
  --bg: #fbf9f5;
  --bg-rgb: 251 249 245;
  --surface: #ffffff;
  --surface-rgb: 255 255 255;
  --surface-muted: #f5f1ea;
  --border: #ece6dc;
  --border-strong: #d6cdbf;
  --text: #2b2620;
  --text-rgb: 43 38 32;
  --text-muted: #72695d;
  --accent: #f8a230;
  --accent-hover: #f39a1f;
  --accent-contrast: #2e1f08;
  --accent-soft: #fef3e2;
  --accent-muted: #fde6c4;
  --accent-text: #8f5406;
  --accent-text-rgb: 143 84 6;
  --link-hover: #5f3803;
  --focus: #8f5406;
  --shadow-sm: 0 1px 3px rgb(61 43 15 / 6%);
  --shadow-lg: 0 12px 32px rgb(61 43 15 / 8%);
  --toggle-shadow: 0 1px 3px rgb(61 43 15 / 8%);
  --border-input: #9a8f7e;
  --danger: #b4493f;
  --danger-soft: #fbeeec;
  --success: #3d7a57;
  --success-soft: #eaf4ee;
  /* linky mřížky (dekorace, kontrast pro ně neplatí) */
  --grid-line: rgb(248 162 48 / 55%);

  /* netbarevné tokeny z návrhu */
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius-sm: 6px;
  --radius-btn: 10px;
  --radius-card: 16px;
  --radius-pill: 999px;
  --container: 1200px;
  --container-wide: 1240px;
  --gutter: 24px;
  --target: 44px;
  --ease-out: cubic-bezier(.2, .7, .2, 1);

  color-scheme: light;
}

/* Tmavý režim – stejné hodnoty pro „systém“ i ruční volbu, drž je v obou blocích stejné. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a1714;
    --bg-rgb: 26 23 20;
    --surface: #221e1a;
    --surface-rgb: 34 30 26;
    --surface-muted: #2b2621;
    --border: #3a342d;
    --border-strong: #4d463d;
    --text: #f1ece4;
    --text-rgb: 241 236 228;
    --text-muted: #b0a696;
    --accent-contrast: #241805;
    --accent-soft: #3a2b14;
    --accent-muted: #4a3517;
    --accent-text: #ffc26e;
    --accent-text-rgb: 255 194 110;
    --link-hover: #ffd9a3;
    --focus: #f8a230;
    --shadow-sm: 0 1px 3px rgb(0 0 0 / 40%);
    --shadow-lg: 0 12px 32px rgb(0 0 0 / 50%);
    --toggle-shadow: 0 1px 3px rgb(0 0 0 / 40%);
    --border-input: #7a7062;
    --danger: #f0a097;
    --danger-soft: #3a221e;
    --success: #8fcca5;
    --success-soft: #1f2c22;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #1a1714;
  --bg-rgb: 26 23 20;
  --surface: #221e1a;
  --surface-rgb: 34 30 26;
  --surface-muted: #2b2621;
  --border: #3a342d;
  --border-strong: #4d463d;
  --text: #f1ece4;
  --text-rgb: 241 236 228;
  --text-muted: #b0a696;
  --accent-contrast: #241805;
  --accent-soft: #3a2b14;
  --accent-muted: #4a3517;
  --accent-text: #ffc26e;
  --accent-text-rgb: 255 194 110;
  --link-hover: #ffd9a3;
  --focus: #f8a230;
  --shadow-sm: 0 1px 3px rgb(0 0 0 / 40%);
  --shadow-lg: 0 12px 32px rgb(0 0 0 / 50%);
  --toggle-shadow: 0 1px 3px rgb(0 0 0 / 40%);
  --border-input: #7a7062;
  --danger: #f0a097;
  --danger-soft: #3a221e;
  --success: #8fcca5;
  --success-soft: #1f2c22;
  color-scheme: dark;
}
