/* PRAMANA · Дизайн-система «Полуночная библиотека» (SPEC §9.1)
   Токены: палитра, типографика, 8pt-сетка, радиусы, motion.
   Тёмная тема — по умолчанию; светлая «Бумага» — [data-theme="paper"]. */

:root {
  color-scheme: dark;

  /* Палитра */
  --bg: #0f1216;
  --surface: #171b21;
  --elevated: #20262e;
  --text: #e7e9ee;
  --muted: #9aa3b2;
  --line: #2a313b;

  --accent: #e8b44a;      /* акцент-лампа */
  --trust: #5b8def;       /* trust-blue */
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --paper: #f7f4ec;

  /* Текстовые варианты акцентов (AA на своём фоне) */
  --accent-ink: #e8b44a;
  --link: #5b8def;

  /* Типографика */
  --font-ui: Inter, Manrope, "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* 8pt-сетка */
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s5: 40px;
  --s6: 48px;
  --s7: 64px;
  --s8: 80px;

  /* Радиусы */
  --r-sm: 14px;
  --r-lg: 20px;

  /* Motion 150–250 мс */
  --t-fast: 150ms;
  --t-base: 250ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);

  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --focus: 2px solid var(--accent);
  --maxw: 1120px;
}

[data-theme="paper"] {
  color-scheme: light;
  --bg: #f7f4ec;
  --surface: #ffffff;
  --elevated: #fffdf7;
  --text: #1a1d21;
  --muted: #5a6472;
  --line: #e3ded2;
  --shadow: 0 8px 24px rgba(26, 29, 33, 0.08);
  --accent-ink: #7a5a12; /* контраст 5.8:1 на бумаге */
  --link: #2456c4;       /* контраст 6.0:1 на бумаге */
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --t-fast: 0ms;
    --t-base: 0ms;
  }
}
