/* Токены платформы КОНДА. Цвета живут только здесь и в palettes.js. */
@font-face {
  font-family: 'Inter';
  src: url('fonts/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* palette:classic start */
  --bg: #F8EAD8;
  --surface: #FFF8ED;
  --surface-2: #EFD8B8;
  --line: #E0CDA8;
  --text: #23180D;
  --text-2: #5C4331;
  --text-3: #6B5C49;
  --accent: #D6A437;
  --shell-bg: #2A190D;
  --shell-bg-2: #3A2312;
  --shell-text: #FFF3DC;
  --shell-text-2: #D4B88F;
  --shell-line: #4B3019;
  --shell-accent: #D6A437;
  --on-accent: #1A1008;
  /* palette:classic end */
  --ok: #166534;
  --warn: #92400e;
  --danger: #991b1b;
  --info: #1e40af;
  --ok-bg: #dcfce7;
  --warn-bg: #fef3c7;
  --danger-bg: #fee2e2;
  --info-bg: #dbeafe;

  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .06), 0 1px 3px rgba(0, 0, 0, .08);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, .14);
  --backdrop: rgba(0, 0, 0, .45);
  --backdrop-soft: rgba(0, 0, 0, .35);
  --t-fast: 120ms; --t-base: 200ms;
  --text-scale: 1;
  --fs-1: calc(12px * var(--text-scale)); --fs-2: calc(13px * var(--text-scale));
  --fs-3: calc(14px * var(--text-scale)); --fs-4: calc(16px * var(--text-scale));
  --fs-5: calc(20px * var(--text-scale)); --fs-6: calc(24px * var(--text-scale));
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --row-h: 44px;
  --control-h: 36px;
  color-scheme: light;
}

:root[data-scheme="dark"] {
  --ok: #4ade80;
  --warn: #fbbf24;
  --danger: #fca5a5;
  --info: #93c5fd;
  --ok-bg: #0f2e1c;
  --warn-bg: #3a2a08;
  --danger-bg: #3b1111;
  --info-bg: #0f2140;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4), 0 1px 3px rgba(0, 0, 0, .5);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, .6);
  --backdrop: rgba(0, 0, 0, .6);
  --backdrop-soft: rgba(0, 0, 0, .5);
  color-scheme: dark;
}

:root[data-density="compact"] {
  --sp-3: 8px; --sp-4: 12px; --sp-5: 16px;
  --row-h: 36px;
  --control-h: 32px;
  --fs-3: calc(13px * var(--text-scale));
}

html { font-family: var(--font-body); font-size: var(--fs-3); color: var(--text); background: var(--bg); }
body { margin: 0; }
* { box-sizing: border-box; }
