/* =============================================
   ЯДРО — Design Tokens
   ============================================= */
:root {
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);

  --space-1:  0.25rem; --space-2:  0.5rem; --space-3:  0.75rem;
  --space-4:  1rem; --space-5:  1.25rem; --space-6:  1.5rem;
  --space-8:  2rem; --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem; --space-20: 5rem; --space-24: 6rem;

  --radius-sm: 0.375rem; --radius-md: 0.5rem; --radius-lg: 0.75rem;
  --radius-xl: 1rem; --radius-2xl: 1.25rem; --radius-full: 9999px;

  --transition-fast: 150ms cubic-bezier(0.16,1,0.3,1);
  --transition-interactive: 180ms cubic-bezier(0.16,1,0.3,1);

  --content-narrow: 640px; --content-default: 960px; --content-wide: 1200px;

  --font-body: 'Manrope', 'Helvetica Neue', sans-serif;
  --font-display: 'General Sans', 'Manrope', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --sidebar-width: 260px;
  --topbar-height: 56px;
}

/* Light mode */
:root, [data-theme="light"] {
  --color-bg: #f5f6fa;
  --color-surface: #ffffff;
  --color-surface-2: #f0f1f5;
  --color-surface-offset: #e8e9ef;
  --color-border: #d0d2dc;
  --color-divider: #dcdee6;
  --color-text: #1a1d2e;
  --color-text-muted: #6b6f82;
  --color-text-faint: #a0a3b3;
  --color-text-inverse: #f5f6fa;
  --color-primary: #0a6e74;
  --color-primary-hover: #085258;
  --color-primary-light: #e0f4f5;
  --color-primary-surface: #d1f0f2;
  --color-error: #c44040;
  --color-error-light: #fde8e8;
  --color-success: #2a8a4a;
  --color-success-light: #e6f5ec;
  --color-warning: #b45309;
  --color-warning-light: #fef3c7;
  --shadow-sm: 0 1px 3px rgba(26,29,46,0.06);
  --shadow-md: 0 4px 16px rgba(26,29,46,0.08);
  --shadow-lg: 0 12px 40px rgba(26,29,46,0.12);
  --sidebar-bg: #ffffff;
  --sidebar-hover: #f0f1f5;
  --sidebar-active: #e0f4f5;
  --sidebar-border: #e8e9ef;
}

/* Dark mode */
[data-theme="dark"] {
  --color-bg: #0e1117;
  --color-surface: #161b22;
  --color-surface-2: #1c2129;
  --color-surface-offset: #21262d;
  --color-border: #30363d;
  --color-divider: #282e36;
  --color-text: #d1d5db;
  --color-text-muted: #8b949e;
  --color-text-faint: #58606a;
  --color-text-inverse: #0e1117;
  --color-primary: #4fc3cb;
  --color-primary-hover: #38a8b0;
  --color-primary-light: #1a3a3d;
  --color-primary-surface: #152e30;
  --color-error: #f87171;
  --color-error-light: #3b1515;
  --color-success: #4ade80;
  --color-success-light: #0d2818;
  --color-warning: #fbbf24;
  --color-warning-light: #2d1f04;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
  --sidebar-bg: #161b22;
  --sidebar-hover: #1c2129;
  --sidebar-active: #152e30;
  --sidebar-border: #21262d;
}
