/* Design tokens — единственное место для значений цветов, шрифтов, радиусов */

/* Geist fonts via jsDelivr (Vercel official) */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/npm/geist@1.5.1/dist/fonts/geist-sans/Geist-Variable.woff2') format('woff2');
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/npm/geist@1.5.1/dist/fonts/geist-mono/GeistMono-Variable.woff2') format('woff2');
}

/* === Refero light — default theme === */
:root {
  --bg:          #ffffff;
  --surface:     #ffffff;
  --surface-2:   #f2f2f2;
  --border:      #e5e5e5;
  --text:        #0a0a0a;
  --text-strong: #000000;
  --muted:       #737373;
  --muted-2:     #a3a3a3;

  --accent:     #0a0a0a;
  --accent-dim: rgba(10, 10, 10, .06);

  --negative: #c22b10;
  --positive: #10c22b;

  --ff-sans: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --ff-mono: 'Geist Mono', 'IBM Plex Mono', ui-monospace, monospace;

  --fs-label:    .72rem;
  --ls-label:    -.01em;
  --fs-body:     .9rem;
  --fs-num:      .9rem;
  --fs-num-frac: .65em;

  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;

  --r-pill:  9999px;
  --r-badge: 26px;
  --r-card:  14px;
  --r-input: 10px;
  --r-btn:   10px;
}

/* === Dark theme — opt-in via <html data-theme="dark"> === */
[data-theme="dark"] {
  --bg:          #0a0a0a;
  --surface:     #111111;
  --surface-2:   #161616;
  --border:      #1e1e1e;
  --text:        #e8e8e8;
  --text-strong: #ffffff;
  --muted:       #888888;
  --muted-2:     #606060;

  --accent:     #ffffff;
  --accent-dim: rgba(255, 255, 255, .08);

  --negative: #e85a5a;
  --positive: #6fc08a;
}

/* Legacy "day" alias — старый код мог ссылаться (теперь light = default) */
[data-theme="day"] { /* inherits :root */ }

/* Три типографических стиля (рефакторено под refero) */

.t-label {
  font-family: var(--ff-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  color: var(--muted);
  text-transform: none;
}

.t-body {
  font-family: var(--ff-sans);
  font-size: var(--fs-body);
  color: var(--text);
}

.t-num {
  font-family: var(--ff-mono);
  font-size: var(--fs-num);
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.t-num .frac { font-size: var(--fs-num-frac); opacity: .55; }
