/* Smart System Management - Self-Hosted Fonts & Design Tokens */

/* Inter Variable (400..700) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* JetBrains Mono Variable (400..700) */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Layer 1: Primitive Palette */
  --raw-paper-50: #FFFEFB;
  --raw-paper-100: #F7F5F0;
  --raw-paper-200: #EFECE4;
  --raw-white: #FFFFFF;

  --raw-rail-200: #E4E0D8;
  --raw-rail-300: #CFC9BC;
  --raw-rail-400: #B5AEA0;

  --raw-ink-950: #111111;
  --raw-ink-700: #4A4D55;
  --raw-ink-500: #5C606A;

  --raw-obsidian-950: #111214;
  --raw-obsidian-900: #181A1E;
  --raw-obsidian-800: #22252B;
  --raw-obsidian-rail: #2A2D34;
  --raw-obsidian-soft: #B4B8C2;

  --raw-orange-500: #F6821F;
  --raw-orange-600: #DF6B0A;
  --raw-orange-700: #B85000;
  --raw-orange-800: #9E4300;
  --raw-orange-50: #FFF4EB;
  --raw-orange-200: #F3C399;

  /* Layer 2: Semantic Tokens */
  --bg-canvas: var(--raw-paper-50);
  --bg-surface: var(--raw-paper-100);
  --bg-surface-alt: var(--raw-paper-200);
  --bg-elevated: var(--raw-white);
  --bg-dark: var(--raw-obsidian-950);
  --bg-dark-cell: var(--raw-obsidian-900);
  --bg-dark-elevated: var(--raw-obsidian-800);

  --border-rail: var(--raw-rail-200);
  --border-strong: var(--raw-rail-300);
  --border-crosshair: var(--raw-rail-400);
  --border-dark: var(--raw-obsidian-rail);

  --text-primary: var(--raw-ink-950);
  --text-secondary: var(--raw-ink-700);
  --text-muted: var(--raw-ink-500);
  --text-on-dark: var(--raw-paper-100);
  --text-on-dark-soft: var(--raw-obsidian-soft);

  --accent-fill: var(--raw-orange-500);
  --accent-fill-hover: var(--raw-orange-600);
  --accent-tint: var(--raw-orange-50);
  --accent-border: var(--raw-orange-200);
  --accent-text: var(--raw-orange-700);
  --accent-text-strong: var(--raw-orange-800);

  --status-ok-bg: #EEF7F1;
  --status-ok-border: #9FD4B2;
  --status-ok-text: #145A32;

  --status-warn-bg: #FFF8EB;
  --status-warn-border: #E5BD73;
  --status-warn-text: #854700;

  --status-err-bg: #FDF0EF;
  --status-err-border: #E2A29E;
  --status-err-text: #9B1C1C;

  /* Layer 3: Typography, Scale & Rhythm */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --fs-xs: 0.75rem;      /* 12px */
  --fs-sm: 0.875rem;     /* 14px */
  --fs-base: 1rem;       /* 16px */
  --fs-md: 1.125rem;     /* 18px */
  --fs-lg: 1.25rem;      /* 20px */
  --fs-xl: clamp(1.375rem, 2vw, 1.625rem);
  --fs-2xl: clamp(1.75rem, 3vw, 2.375rem);
  --fs-display: clamp(2.15rem, 4.1vw, 3.35rem);

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

  --container-max: 1120px;
  --frame-pad: clamp(1.25rem, 2.8vw, 2.25rem);

  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 6px;

  --shadow-subtle: 0 2px 6px rgba(17, 17, 17, 0.04), 0 1px 2px rgba(17, 17, 17, 0.02);
  --shadow-card: 0 10px 28px rgba(17, 17, 17, 0.06), 0 2px 6px rgba(17, 17, 17, 0.03);

  /* Emil Kowalski Custom Easing Curves */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}
