/* ===== база: сброс, холст, типографика, раскладка, утилиты ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr-h) + 16px); }
/* Решение владельца 17.09.2026: движение включено ВСЕГДА — глушилки по
   prefers-reduced-motion в интерфейсе нет (docs/DESIGN.md §10.4). */
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  font: 400 var(--fs-md)/1.6 var(--f-text); color: var(--ink); background: var(--bg);
  font-feature-settings: "ss01", "cv11"; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; text-rendering: optimizeLegibility;
}
/* живой холст: мягкое сияние цвета раздела за страницей */
body::before {
  content: ""; position: fixed; inset: -20vmax; z-index: -2; pointer-events: none;
  background:
    radial-gradient(40vmax 32vmax at 8% 0%, var(--mesh-a), transparent 70%),
    radial-gradient(36vmax 30vmax at 96% 8%, var(--mesh-b), transparent 70%),
    radial-gradient(44vmax 36vmax at 60% 110%, var(--mesh-c), transparent 70%);
  opacity: .55;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
svg { flex-shrink: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }
ul[class], ol[class] { list-style: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
table { border-collapse: collapse; width: 100%; }
[hidden] { display: none !important; }
::selection { background: color-mix(in srgb, var(--c1) 40%, transparent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 6px; }
:root[data-theme="dark"] :focus-visible { outline-color: var(--c1); }

h1, h2, h3, h4, h5, h6 { font-family: var(--f-head); font-weight: 700; line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .5em; color: var(--ink); text-wrap: balance; }
h1 { font-size: var(--fs-4xl); font-weight: 800; letter-spacing: -.035em; }
/* Против строки-сироты в тексте: браузер не оставляет одно слово на последней
   строке абзаца. Заголовки уравновешивает text-wrap: balance строкой выше. */
p, li, dd, figcaption, blockquote, .lead, .muted { text-wrap: pretty; }
h2 { font-size: var(--fs-3xl); letter-spacing: -.03em; }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
h1 em, h2 em, .display em, .serif { font-family: var(--f-serif); font-style: italic; font-weight: 600; letter-spacing: -.01em; }
h1 em, h2 em, .display em, .grad-text {
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: .06em;
}
small { font-size: var(--fs-sm); }
b, strong { font-weight: 650; }
code, kbd { font-family: var(--f-mono); font-size: .88em; }
kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--surface); color: var(--ink-3); font-size: 11px; line-height: 1; }
mark { background: color-mix(in srgb, var(--c3) 55%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }

.display { font-family: var(--f-head); font-size: var(--fs-display); font-weight: 800; line-height: .98; letter-spacing: -.045em; margin: 0 0 .35em; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px;
  font: 700 var(--fs-xs)/1 var(--f-head); letter-spacing: .14em; text-transform: uppercase; color: var(--acc-text);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--grad); }
.eyebrow--plain::before { display: none; }
.lead { font-size: clamp(1.02rem, .95rem + .35vw, 1.22rem); line-height: 1.6; color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--ink-3); }
.faint { color: var(--ink-4); }
.hint { color: var(--ink-3); font-size: var(--fs-sm); }
.tnum { font-variant-numeric: tabular-nums; }
.num { font-family: var(--f-head); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.upper { text-transform: uppercase; letter-spacing: .08em; }
.clamp-1, .clamp-2, .clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-1 { -webkit-line-clamp: 1; } .clamp-2 { -webkit-line-clamp: 2; } .clamp-3 { -webkit-line-clamp: 3; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic-sm { width: 16px !important; height: 16px !important; }
.ic-lg { width: 26px !important; height: 26px !important; }
/* Контекст форматирования у main — против сдвига вёрстки от рекламы.
   place.js (Adgora) вставляет своё место ПЕРВЫМ ребёнком main с margin: 18px auto.
   Без flow-root верхний отступ этого блока схлопывается ЧЕРЕЗ main и опускает всю
   страницу на 18 px уже после первой отрисовки: замер 18.09.2026 на телефоне давал
   CLS 0,107 при пороге 0,1, и сдвиг был привязан именно к <main> (t≈4–6 с, dy=18).
   flow-root ничего не меняет внешне и запирает схлопывание. */
main { display: flow-root; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 1000; padding: 10px 16px; border-radius: var(--r-pill); background: var(--ink); color: var(--bg); font-weight: 600; transition: top var(--t) var(--ease); }
.skip:focus { top: 12px; }

/* ---------- раскладка ---------- */
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: calc(var(--wrap-narrow) + var(--gutter) * 2); }
.wrap--wide { max-width: calc(1520px + var(--gutter) * 2); }
.pg { padding-block: clamp(20px, 3vw, 36px) clamp(56px, 7vw, 96px); }
.sect { padding-block: clamp(36px, 5.5vw, 76px); position: relative; }
.sect--tight { padding-block: clamp(22px, 3vw, 40px); }
.sect-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; margin-bottom: clamp(18px, 2.4vw, 30px); }
.sect-head h2 { margin: 0; }
.sect-head p { margin: 8px 0 0; color: var(--ink-2); max-width: 60ch; }
.stack { display: flex; flex-direction: column; gap: var(--gap, 16px); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, 10px); }
.split { display: flex; align-items: center; justify-content: space-between; gap: var(--gap, 12px); flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid { display: grid; gap: var(--gap, clamp(14px, 2vw, 22px)); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.side-layout { display: grid; gap: clamp(20px, 3vw, 36px); grid-template-columns: minmax(0, 1fr); align-items: start; }
/* Боковая колонка статична: за прокруткой не едет (docs/DESIGN.md §10.9). min-width сбрасывает
   auto-минимум grid-элемента — без него длинное слово в сайдбаре растягивает всю сетку. */
.side-col { min-width: 0; }
@media (min-width: 1024px) {
  .side-layout { grid-template-columns: minmax(0, 1fr) 360px; }
  .side-layout--left { grid-template-columns: 280px minmax(0, 1fr); }
}
.divider { height: 1px; background: var(--line); margin: 20px 0; border: 0; }
@media (max-width: 760px) { .hide-sm { display: none !important; } }
@media (min-width: 761px) { .show-sm { display: none !important; } }
@media (max-width: 1023px) { .hide-md { display: none !important; } }

/* ---------- появление при прокрутке (включает fx.js; без него всё видно сразу) ---------- */
.fx-wait [data-reveal], .fx-wait [data-reveal-group] > * { opacity: 0; }
