/* Дизайн-токены по документу «Моя концепция» (Часть I). Светлая тема по умолчанию. */
:root {
  /* Сетка и пространство */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
  --space-12: 48px; --space-16: 64px; --space-20: 80px;

  /* Скругления */
  --radius-sm: 6px; --radius-md: 8px; --radius-lg: 12px; --radius-xl: 16px;
  --radius-2xl: 20px; --radius-full: 9999px;

  /* Ширины */
  --workspace: 1400px; --readable: 680px; --drawer-w: 460px; --modal-w: 480px; --modal-w-lg: 720px;

  /* Типографика */
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --text-xs: 11px; --text-sm: 12.5px; --text-base: 13.5px; --text-md: 14px;
  --text-lg: 15px; --text-xl: 16px; --text-2xl: 18px; --text-3xl: 22px;
  --text-4xl: 26px; --text-5xl: 32px;

  /* Светлая тема */
  --bg-body: #fcfbf9; --bg-surface: #ffffff; --bg-soft: #f9f7f3; --bg-hover: #f6f4f0;
  --text-main: #2c2c2c; --text-muted: #737373; --text-light: #a3a3a3;
  --accent-warm: #d97757; --accent-soft: #fdf6f3;
  --accent: var(--accent-warm);   /* алиас: модульные стили (вкладки, чипы, каналы) */
  --calm-green: #6b8e7f; --calm-soft: #f2f7f4;
  --gold: #c9a24b; --gold-soft: #fdf6e8;
  --whisper: #8b7fb8; --whisper-soft: #f0ecf7;
  --danger: #c6503f; --danger-soft: #fbebe8;
  --border-light: #f0ece6; --border-medium: #e4dfd6; --border-strong: #d4cec2;

  --shadow-md: 0 4px 16px rgba(30,25,15,.08);
  --shadow-lg: 0 12px 40px rgba(30,25,15,.14);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
}

[data-theme="dark"] {
  --bg-body: #191712; --bg-surface: #232019; --bg-soft: #1e1b15; --bg-hover: #2e2a21;
  --text-main: #ede8df; --text-muted: #b8b1a4; --text-light: #8d8678;
  --accent-warm: #ea9378; --accent-soft: #342319;
  --calm-green: #93b8a7; --calm-soft: #1d2822;
  --gold: #e6bd72; --gold-soft: #2d2619;
  --whisper: #b3a6d6; --whisper-soft: #262030;
  --danger: #e58a72; --danger-soft: #32201b;
  --border-light: #353026; --border-medium: #454033; --border-strong: #5a5342;
  --shadow-md: 0 4px 16px rgba(0,0,0,.45);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.55);
  color-scheme: dark;
}

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