/* =========================================================================
   base.css — reset, design tokens, typography
   ========================================================================= */

/* -- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
table { border-collapse: collapse; width: 100%; }

/* -- Icon primitives ------------------------------------------------------ */
/* Shared SVG-icon classes. Используются во всех layout'ах (_AppLayout +
   _PublicLayout). Без этого блока svg.ico раздувается на 100% контейнера
   из-за общего svg { max-width: 100% } выше. landing.css/auth.css имеют
   собственные дубли — оставлены для исторической независимости public-pages. */
.ico {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}
.ico-sm { width: 14px; height: 14px; }
.ico-lg { width: 24px; height: 24px; }

/* -- Design Tokens -------------------------------------------------------- */
:root {
  /* Backgrounds (deepest -> raised) */
  --bg-base:        #0B1014;   /* page background */
  --bg-surface:     #121821;   /* sidebar, cards */
  --bg-raised:      #1A2230;   /* card-on-card, hover */
  --bg-input:       #0F151C;   /* form fields */
  --bg-overlay:     rgba(8, 12, 16, 0.72);

  /* Borders */
  --border:         #1F2A38;
  --border-strong:  #2A3A4F;
  --border-muted:   #182230;

  /* Text */
  --text-primary:   #E6ECF2;
  --text-secondary: #9AA8B8;
  --text-muted:     #5E6E80;
  --text-disabled:  #3C4858;

  /* Brand / Accent */
  --accent:         #F7A12A;   /* CS2 muted orange */
  --accent-hover:   #FFB143;
  --accent-dim:     #B47318;
  --accent-soft:    rgba(247, 161, 42, 0.12);
  --accent-glow:    rgba(247, 161, 42, 0.28);

  /* Semantic colors */
  --good:           #4FD1C5;   /* cyan-teal for positive stats */
  --good-soft:      rgba(79, 209, 197, 0.12);
  --bad:            #E74C3C;
  --bad-soft:       rgba(231, 76, 60, 0.12);
  --warn:           #F0B232;
  --warn-soft:      rgba(240, 178, 50, 0.12);
  --improve:        #5BD68A;   /* green for improvement / trending up */
  --improve-soft:   rgba(91, 214, 138, 0.12);
  --neutral:        #6A8AA8;
  --neutral-soft:   rgba(106, 138, 168, 0.12);

  /* Skill tag categories */
  --tag-aim:        #F7A12A;
  --tag-movement:   #4FD1C5;
  --tag-utility:    #B388EB;
  --tag-prefire:    #FF7B5C;
  --tag-mapknowl:   #6BA6FF;
  --tag-tactics:    #F0B232;
  --tag-economy:    #5BD68A;
  --tag-comm:       #E14F8A;
  --tag-spray:      #D97F2B;   /* spray control — darker than --tag-aim, recognizably «aim family» */

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --font-display: 'Inter', system-ui, sans-serif;

  /* Type scale */
  --fs-xs:   11px;
  --fs-sm:   12px;
  --fs-base: 13px;
  --fs-md:   14px;
  --fs-lg:   16px;
  --fs-xl:   18px;
  --fs-2xl:  22px;
  --fs-3xl:  28px;
  --fs-4xl:  36px;
  --fs-5xl:  48px;

  /* Spacing */
  --sp-1:   4px;
  --sp-2:   8px;
  --sp-3:   12px;
  --sp-4:   16px;
  --sp-5:   20px;
  --sp-6:   24px;
  --sp-8:   32px;
  --sp-10:  40px;
  --sp-12:  48px;
  --sp-16:  64px;

  /* Radii — sharp / tactical */
  --r-xs:   2px;
  --r-sm:   4px;
  --r-md:   6px;
  --r-lg:   8px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.02);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);

  /* Layout */
  --sidebar-w: 240px;
  --sidebar-w-collapsed: 64px;
  --topbar-h: 56px;

  /* Motion */
  --t-fast: 120ms cubic-bezier(.4,0,.2,1);
  --t-base: 180ms cubic-bezier(.4,0,.2,1);
  --t-slow: 280ms cubic-bezier(.4,0,.2,1);
}

/* -- Typography utilities ------------------------------------------------- */
.h1 { font-size: var(--fs-3xl); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.h2 { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; }
.h3 { font-size: var(--fs-xl); font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.h4 { font-size: var(--fs-lg); font-weight: 600; line-height: 1.35; }
.h5 { font-size: var(--fs-md); font-weight: 600; line-height: 1.4; }

.mono { font-family: var(--font-mono); font-feature-settings: 'zero' 1, 'ss01' 1; }
.tabular { font-variant-numeric: tabular-nums; }

.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-good      { color: var(--good); }
.text-bad       { color: var(--bad); }
.text-warn      { color: var(--warn); }
.text-improve   { color: var(--improve); }
.text-accent    { color: var(--accent); }

/* Eyebrow / section label */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Selection */
::selection { background: var(--accent-soft); color: var(--accent); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--r-sm); }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* Метрика noscript-пиксель: спрятан (инлайновый style запрещён CSP). */
.u-metrika-pixel { position: absolute; left: -9999px; }
