/* =========================================================================
   ЗАМЕТЧИК — Landing v2
   POV: светлый editorial × тяжёлый гротеск, технологичный но человечный.
   Один электрик-синий акцент (#3b82f6 — главный цвет продукта), чернила,
   бумажный фон, монохромный line-art. Минимализм и воздух (Pulze).
   Type: Unbounded (display) × Onest (body, не Inter) × JetBrains Mono (tech).
   ========================================================================= */

:root {
  /* — restrained palette: paper + ink + ONE blue — */
  --paper:        #FFFFFF;
  --paper-2:      #F5F6F8;
  --paper-3:      #EEF0F3;
  --ink:          #0B0D12;   /* near-black, AA strong */
  --ink-2:        #3B404B;   /* secondary text */
  --muted:        #6B7280;   /* tertiary, AA on white */
  --line:         #E7E9ED;
  --line-2:       #D7DBE1;

  --blue:         #3B82F6;   /* brand main — decorative / large only */
  --blue-cta:     #2563EB;   /* buttons & links — AA on/over white */
  --blue-deep:    #1D4ED8;
  --blue-tint:    #EAF1FE;
  --blue-electric:#1B43E8;   /* matches illustration mug */

  --ink-panel:    #0C0E14;   /* dark sections */

  /* type */
  --disp: "Unbounded", system-ui, sans-serif;
  --body: "Onest", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --r:    16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --wrap: 1200px;
  --ease: cubic-bezier(.22,.7,.3,1);
  --shadow: 0 2px 4px rgba(11,13,18,.04), 0 18px 44px -28px rgba(11,13,18,.30);
}

/* ----------------------------- RESET ------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
/* .btn задаёт display:inline-flex и перебивает UA-правило для [hidden] */
[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 2.5px solid var(--blue-cta); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 32px; }

/* ----------------------------- TYPE PRIMITIVES -------------------------- */
.display {
  font-family: var(--disp);
  font-weight: 800;
  font-size: 3.7rem;
  line-height: 1.02;
  letter-spacing: 0;
}
.eyebrow {
  font-family: var(--mono);
  font-size: .73rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex; align-items: center; gap: .65em;
}
.eyebrow__line { width: 26px; height: 1.5px; background: var(--blue); flex: none; }
.eyebrow__amp { color: var(--blue-cta); font-style: italic; }
.eyebrow--light { color: rgba(255,255,255,.65); }
.eyebrow--light .eyebrow__line { background: rgba(255,255,255,.6); }
.dot-blue { color: var(--blue); }

/* ----------------------------- BUTTONS ---------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: 12px 22px; border-radius: 999px;
  font-family: var(--body); font-weight: 600; font-size: .94rem; letter-spacing: 0;
  cursor: pointer; border: 1.5px solid transparent;
  transition: transform .2s var(--ease), background-color .22s, border-color .22s, color .22s;
  white-space: nowrap;
}
.btn--lg { padding: 15px 30px; font-size: 1rem; }
.btn--primary { background: var(--blue-cta); color: #fff; }
.btn--primary:hover { background: var(--blue-deep); transform: translateY(-1px); }
.btn--line { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--line:hover { border-color: var(--ink); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #2a2f3a; transform: translateY(-1px); }

/* ----------------------------- NAV -------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.is-stuck { border-bottom-color: var(--line); }
.nav__inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; height: 80px; gap: clamp(32px, 3vw, 44px); }
.brand { justify-self: start; }
.brand__name { font-family: var(--disp); font-weight: 700; font-size: 1.2rem; letter-spacing: 0; color: var(--ink); }
.brand__deg { font-family: var(--disp); font-size: .55em; font-weight: 700; color: var(--blue); vertical-align: super; }
/* Основные разделы продолжают логотип слева. Вход и язык образуют
   отдельную служебную группу у правого края. */
.nav__links { display: flex; gap: 28px; justify-self: start; }
.nav__links a { font-size: .95rem; font-weight: 500; color: #4a4f5a; transition: color .2s; }
.nav__links a:hover { color: var(--ink); }
/* текущая страница: ссылка остаётся для скринридера, но не зовёт кликнуть */
.nav__links a[aria-current="page"] { color: var(--ink); cursor: default; }
.nav__actions { display: flex; align-items: center; gap: 26px; justify-self: end; }
.nav__login { display: inline-flex; align-items: center; min-height: 44px; font-size: .95rem; font-weight: 500; color: #4a4f5a; transition: color .2s; white-space: nowrap; }
.nav__login:hover { color: var(--ink); }
.nav__menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color .2s, border-color .2s;
}
.nav__menu-toggle:hover { background: var(--paper-2); border-color: var(--line-2); }
.nav__menu-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.nav__menu-toggle path {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .22s var(--ease);
}
.nav.is-menu-open .nav__menu-toggle path:first-child { transform: translateY(4px) rotate(45deg); }
.nav.is-menu-open .nav__menu-toggle path:last-child { transform: translateY(-4px) rotate(-45deg); }
.language-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  height: 40px;
  padding: 0 4px;
  flex-shrink: 0;
  color: var(--ink-2);
  background: transparent;
  border: 0;
  transition: color .15s;
}
.language-picker:hover {
  color: var(--ink);
}
.language-picker__label {
  display: none;
  color: inherit;
  font: 400 .875rem/1.3 var(--body);
  white-space: nowrap;
}
.language-picker__code {
  display: inline;
  color: inherit;
  font: 500 .78rem/1 var(--body);
}
.language-picker__chevron {
  flex: none;
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .65;
  pointer-events: none;
}
.language-picker select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.language-picker select:focus-visible { outline: 0; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ----------------------------- HERO ------------------------------------- */
.hero { padding-top: clamp(48px, 7vw, 90px); padding-bottom: clamp(40px, 6vw, 72px); }
.hero__grid {
  /* minmax(0,…) — иначе широкое слово в h1 раздувает колонку с текстом
     и съедает ширину у иллюстрации */
  display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}
.hero__title {
  font-family: var(--disp); font-weight: 800;
  /* верхняя граница подобрана так, чтобы «Sometimes» влезало в свою колонку */
  font-size: clamp(3.4rem, 5.1vw, 4.8rem);
  line-height: .96; letter-spacing: 0;
  margin-top: 24px;
}
.hero__title-soft { color: var(--muted); font-weight: 600; }
.hero__lead { margin-top: 28px; max-width: 46ch; font-size: 1.18rem; color: var(--ink-2); }
.hero__lead .hl { color: var(--ink); font-weight: 600; box-shadow: inset 0 -.5em 0 var(--blue-tint); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero__trust { margin-top: 30px; font-size: .9rem; color: var(--muted); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero__trust-mono { font-family: var(--mono); font-size: .76rem; color: var(--ink-2); background: var(--paper-2); border: 1px solid var(--line); padding: 5px 10px; border-radius: 8px; }

/* hero art — квадратный SVG 1024×1024: без height:auto атрибут height
   растягивает бокс на 1024px и раздувает всю секцию */
.hero__shot {
  width: min(100%, 560px);
  height: auto;
  aspect-ratio: 1 / 1;
  justify-self: end;
}

/* ----------------------------- SECTION SCAFFOLD ------------------------- */
.section { padding: clamp(76px, 11vw, 148px) 0; }
.lead { max-width: 760px; }
.lead .eyebrow { margin-bottom: 22px; }
.lead__text { margin-top: 24px; font-size: 1.12rem; color: var(--ink-2); max-width: 60ch; }
.lead--split { max-width: none; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; }
.lead--split .lead__text { margin-top: 0; }

/* ----------------------------- AGENTS SHOWCASE -------------------------- */
/* секция завершается тёмным full-bleed spec-band — низ padding'а не нужен,
   иначе между ним и features зияет пустая полоса */
.agents { padding-bottom: 0; }

/* ── СЦЕНАРИИ: сцена проигрывается сама, чипы-табы переключают сюжет ──
   Без JS: показан финал первого сценария (карта #4 уже в Done),
   табы неактивны. JS добавляет .is-live на .demo и водит сценой. */
/* scroll-margin — цель CTA «Смотреть демо»: 81px липкого nav + воздух,
   плюс 20px, которые блок отыгрывает назад reveal-анимацией */
.scenes { margin-top: clamp(36px, 4.5vw, 60px); scroll-margin-top: 116px; }

/* Табы сценариев — не пилюли, а «главы» одной сцены: три реплики человека
   агенту тем же моно, что и в терминале ниже, на общем сплошном таймлайне.
   Рельс идёт под всеми тремя, у активной главы он заполняется за время
   проигрыша (--dur ставит JS). */
.scenes__tabs {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin-bottom: clamp(20px, 2.2vw, 28px);
}
.scene-tab {
  position: relative; cursor: pointer; text-align: left;
  /* grid + align-content: иначе <button> центрирует текст по высоте ячейки
     и однострочная глава висит ниже двухстрочных */
  display: grid; align-content: start; padding: 0 26px 13px 0;
  background: none; border: 0;
  font-family: var(--mono); font-size: .8rem; line-height: 1.5;
  color: var(--muted);
  transition: color .25s;
}
.scene-tab:hover { color: var(--ink-2); }
.scene-tab.is-active { color: var(--ink); }
/* каретка вместо декоративного номера: это реплика, а не пункт списка */
.scene-tab__label::before { content: "> "; color: var(--line-2); transition: color .25s; }
.scene-tab:hover .scene-tab__label::before { color: var(--muted); }
.scene-tab.is-active .scene-tab__label::before { color: var(--blue-cta); }
/* рельс таймлайна: сплошной под всем рядом */
.scene-tab::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--line);
}
/* прогресс главы: полоска заполняется за время проигрыша */
.scene-tab__bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px; z-index: 1;
  background: var(--blue); transform-origin: left; transform: scaleX(0);
  /* явный none: без него прерванная на середине глава оставалась
     подкрашенной ровно до того процента, где её перебили кликом */
  transition: none;
}
.scene-tab.is-run .scene-tab__bar { transform: scaleX(1); transition: transform var(--dur, 9s) linear; }
/* сыгранные главы залиты тем же синим: вместе с активной это одна сплошная
   полоса, которая едет слева направо через весь ряд, а не три отдельные */
.scene-tab.is-done .scene-tab__bar { transform: scaleX(1); }

.demo {
  position: relative; width: 100%;
  display: grid; grid-template-columns: 1.55fr 1fr; align-items: stretch;
  gap: clamp(16px, 2vw, 24px);
  /* высота сцены фиксирована: наполнение колонок задачами не двигает страницу */
  height: clamp(520px, 44vw, 600px);
}
.demo__panel {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; min-width: 0; min-height: 0;
  border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line-2); background: var(--paper);
  box-shadow: var(--shadow);
}
.demo__panel--term { border-color: #2A2622; box-shadow: 0 24px 60px -34px rgba(11,13,18,.55); }

.scenes__hint { margin-top: 18px; text-align: center; font-size: .88rem; color: var(--muted); }

/* window chrome */
.demo__chrome {
  display: flex; align-items: center; gap: 12px; flex: none;
  padding: 11px 16px; background: var(--paper-2); border-bottom: 1px solid var(--line);
}
.demo__chrome--dark { background: #211F1B; border-bottom-color: #34302A; }
.demo__dots { display: inline-flex; gap: 7px; flex: none; }
.demo__dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); }
.demo__chrome--dark .demo__dots i { background: #3A352E; }
.demo__chrome--dark .demo__dots i:first-child { background: #D97757; }
.demo__dot--live { position: relative; }
.demo__addr { font-family: var(--mono); font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo__addr--dark { color: #C9C2B5; }
.demo__who {
  margin-left: auto; flex: none; font-family: var(--mono); font-size: .62rem; letter-spacing: .1em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
}
.demo__who--human { color: var(--blue-deep); background: var(--blue-tint); border: 1px solid color-mix(in srgb, var(--blue) 18%, transparent); }
.demo__who--agent { color: #E7C6A0; background: rgba(217,119,87,.14); border: 1px solid rgba(217,119,87,.3); }

/* ── живая мини-доска (левая панель) — 1:1 с реальным UI приложения ──
   Значения захардкожены под настоящую светлую тему продукта (см. web/src),
   чтобы это был реальный интерфейс, а не «похожий». */
.demo__panel--board { background: #ffffff; }
.board { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 12px; background: #f8fafc; }
.board__col { min-width: 0; overflow: hidden; display: flex; flex-direction: column; gap: 8px; padding: 8px; background: #ffffff; border: 1px solid #eef2f7; border-radius: 10px; }
.board__h { display: flex; align-items: center; gap: 6px; font-family: var(--body); font-size: .74rem; font-weight: 400; color: #1e293b; white-space: nowrap; }
.board__ct { margin-left: auto; font-family: var(--body); font-weight: 500; font-size: .64rem; color: var(--blue); background: rgba(59,130,246,.12); border-radius: 6px; padding: 1px 7px; transition: color .3s, background .3s; }
.bdot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.bdot--todo { background: #ef4444; }
.bdot--prog { background: #f59e0b; }
.bdot--rev  { background: #22c55e; }
.bdot--done { background: #3b82f6; }

.mini {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
  background: #ffffff; border: 1px solid #f1f5f9; border-radius: 8px; padding: 9px;
  box-shadow: 0 1px 2px rgba(15,23,42,.05); font-family: var(--body);
}
.mini__id { font-size: .62rem; font-weight: 600; letter-spacing: .02em; color: #64748b; }
.mini__ttl { font-size: .74rem; font-weight: 500; line-height: 1.32; color: #1e293b; }
.mini__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; width: 100%; }
.mtag { font-style: normal; font-size: .62rem; font-weight: 600; color: #3b82f6; background: #eaf1fd; border: 1px solid rgba(59,130,246,.48); border-radius: 7px; padding: 1px 6px; }
.mstat { font-style: normal; font-size: .6rem; font-weight: 600; color: #1e293b; border: 1px solid; border-radius: 7px; padding: 1px 6px; }
.mstat--open { color: #64748b; background: #f8fafc; border-color: #e2e8f0; }
.mstat--prog { background: rgba(59,130,246,.18); border-color: rgba(59,130,246,.35); }
.mstat--rev  { background: rgba(245,158,11,.18); border-color: rgba(245,158,11,.35); }
.mstat--done { background: rgba(16,185,129,.18); border-color: rgba(16,185,129,.35); }
.mprio { margin-left: auto; font-style: normal; font-size: .58rem; font-weight: 400; letter-spacing: .05em; border-radius: 6px; padding: 2px 6px; }
.mprio--high { color: #ef4444; background: rgba(239,68,68,.1); }
.mprio--med  { color: #f59e0b; background: rgba(245,158,11,.1); }
.mprio--low  { color: #3b82f6; background: rgba(59,130,246,.1); }
.mprio--minor{ color: #94a3b8; background: rgba(148,163,184,.12); }

/* карточка #4 переезжает In Progress → Done.
   Базовое состояние (без JS) = финал: карта уже в Done.
   .is-live (движок сценариев) откатывает к старту; .is-moved — после переезда. */
.mini--move, .mini--land {
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.mini--move { opacity: 0; transform: translateX(26px) scale(.94); }
.mini--land { opacity: 1; transform: none; }
.demo.is-live:not(.is-moved) .mini--move { opacity: 1; transform: none; }
.demo.is-live:not(.is-moved) .mini--land { opacity: 0; transform: translateX(-18px) scale(.96); }
/* фокус-ring: агент «читает» карточку (get_task / list_tasks) */
.mini__ring { position: absolute; inset: -2px; border-radius: 10px; border: 2px solid #3b82f6; opacity: 0; pointer-events: none; box-shadow: 0 0 0 4px rgba(59,130,246,.12); transition: opacity .35s; }
.mini.is-ring .mini__ring { opacity: 1; }
.mini__note { display: inline-flex; align-items: center; gap: 4px; margin-top: 1px; font-style: normal; font-size: .56rem; font-weight: 600; color: #B4530C; background: #FDEBD8; border-radius: 5px; padding: 1px 6px; transition: opacity .35s; }
.mini__note svg { width: 9px; height: 9px; flex: none; }
/* заметки (+2ч, дедлайн) появляются по ходу сценария */
.demo.is-live .mini--move .mini__note { opacity: 0; }
.demo.is-live .mini--move .mini__note.is-in { opacity: 1; }
.mini__note--hide { display: none; }
.mini__note--hide.is-in { display: inline-flex; animation: card-in .4s var(--ease); }
.mini--land::after { content: ""; position: absolute; inset: -2px; border-radius: 10px; border: 2px solid #3b82f6; opacity: 0; pointer-events: none; }
.demo.is-moved .mini--land::after { animation: land-flash 1.1s ease-out; }
@keyframes land-flash { 0% { opacity: .85; transform: scale(1.03); } 100% { opacity: 0; transform: scale(1); } }
/* новые задачи из сценария «Заведи задачи из заметок» */
.mini--ghost { display: none; }
.mini--ghost.is-in { display: flex; animation: card-in .55s var(--ease); }
@keyframes card-in { 0% { opacity: 0; transform: translateY(-8px) scale(.96); } 100% { opacity: 1; transform: none; } }
/* смена приоритета/счётчика подсвечивается коротким «пыхом» */
.is-flash { animation: chip-flash .55s var(--ease); }
@keyframes chip-flash { 0% { transform: scale(1.3); } 100% { transform: scale(1); } }
/* счётчик Done в финале — залит синим */
.board__ct.is-hot { color: #fff; background: #3b82f6; }

/* ── terminal (правая панель) ── */
.term {
  flex: 1; background: #1A1916; padding: 16px 18px 14px;
  font-family: var(--mono); font-size: .76rem; line-height: 1.7; color: #E8E3D9;
  display: flex; flex-direction: column; overflow: hidden;
}
.term__line { margin: 0 0 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.term__banner { color: #C9C2B5; margin-bottom: 12px; }
.term__spark { color: #D97757; }
.term__dim { color: #6F685D; }
.term__user { color: #B7AF9F; margin-bottom: 10px; }
.term__say { color: #E8E3D9; margin-bottom: 6px; }
.term__dot { color: #D97757; margin-right: 7px; }
.term__b { color: #F2EEE6; font-weight: 700; }
.term__tool { color: #C9C2B5; margin-top: 7px; }
.term__mcp { color: #6F685D; }
.term__args { color: #8FB89A; }
.term__res { color: #8B8378; padding-left: 19px; }
.term__ok { color: #7BC98D; }
.term__prompt { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 11px; border-top: 1px solid #2A2622; }
.term__chev { color: #D97757; }
.term__cursor { width: 8px; height: 15px; background: #D97757; display: inline-block; animation: ccblink 1.1s step-end infinite; }
@keyframes ccblink { 50% { opacity: 0; } }
/* лента терминала: движок сценариев дописывает строки по одной */
.term__feed { min-height: 0; }
.term__line--new { animation: term-in .3s var(--ease); }
@keyframes term-in { 0% { opacity: 0; transform: translateY(5px); } 100% { opacity: 1; transform: none; } }
/* каретка на строке, которую агент «печатает» */
.term__user.is-typing::after { content: ""; display: inline-block; width: 7px; height: 13px; margin-left: 3px; vertical-align: -2px; background: #B7AF9F; animation: ccblink 1.1s step-end infinite; }

/* ── DARK SPEC-BAND: лента протокола + editorial-реестр ── */
.specs-band { position: relative; overflow: hidden; margin-top: clamp(56px, 8vw, 104px); background: var(--ink-panel); }
/* спокойное статичное свечение сверху для глубины — не «шаблонный» mesh */
.specs-band::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(52% 46% at 50% -8%, rgba(59,130,246,.15), transparent 66%);
}
.specs-band > * { position: relative; z-index: 1; }
.specs { padding: clamp(52px, 7vw, 88px) 32px clamp(30px, 4vw, 44px); }
.specs__head { max-width: 640px; }
.specs__lead { font-family: var(--disp); font-weight: 700; font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.06; color: #fff; margin-top: 20px; }

/* бегущая лента MCP-вызовов — «пульс» доски, full-bleed */
.ticker {
  overflow: hidden; padding: 15px 0;
  border-top: 1px solid rgba(255,255,255,.09); border-bottom: 1px solid rgba(255,255,255,.09);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.ticker__track { display: flex; width: max-content; animation: tickrun 38s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes tickrun { to { transform: translateX(-50%); } }
.ticker__group { display: flex; align-items: center; gap: clamp(26px, 3vw, 40px); padding-right: clamp(26px, 3vw, 40px); }
.tk { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: .78rem; color: rgba(255,255,255,.72); white-space: nowrap; }
.tk__dot { width: 5px; height: 5px; border-radius: 50%; background: #D97757; flex: none; }
.tk__args { color: #8FB89A; font-weight: 400; }
.tk__ok { color: #7BC98D; font-weight: 500; }
.tk--sum { color: #fff; font-weight: 500; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 4px 13px; }

/* реестр: строки-развороты (заголовок · текст · мета) вместо трёх колонок */
.ledger { margin: 0; padding: clamp(18px, 2.5vw, 30px) 0 clamp(52px, 7vw, 88px); }
.ledger__row {
  position: relative;
  display: grid; grid-template-columns: 1.05fr 1.6fr auto; column-gap: clamp(20px, 3.5vw, 56px);
  align-items: baseline; padding: clamp(20px, 2.6vw, 30px) 0;
  border-bottom: 1px solid rgba(255,255,255,.09);
}
.ledger__row:last-child { border-bottom: 0; }
/* маркер-тире перед заголовком подсвечивается на hover */
.ledger__t { position: relative; font-family: var(--disp); font-weight: 600; font-size: clamp(1.1rem, 1.9vw, 1.4rem); line-height: 1.15; color: #fff; padding-left: 38px; }
.ledger__t::before { content: ""; position: absolute; left: 0; top: .58em; width: 24px; height: 2px; background: rgba(255,255,255,.24); transition: background .3s, width .3s var(--ease); }
.ledger__row:hover .ledger__t::before { background: var(--blue); width: 30px; }
.ledger__d { margin: 0; }
.ledger__d p { font-size: .97rem; color: rgba(255,255,255,.62); max-width: 54ch; }
.ledger__d b { color: #fff; font-weight: 600; }
.ledger__d code, .lane__desc code { font-family: var(--mono); font-size: .82em; color: #A9C6FF; background: rgba(59,130,246,.14); border-radius: 5px; padding: 1px 6px; }
.ledger__meta { margin: 0; justify-self: end; text-align: right; font-family: var(--mono); font-size: .66rem; letter-spacing: .07em; text-transform: uppercase; color: rgba(255,255,255,.34); white-space: nowrap; }

/* ----------------------------- FEATURES (CONTENT CARDS) ----------------- */
.features { background: var(--paper-2); }
.feat-grid {
  margin-top: clamp(44px, 5vw, 68px);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.feat {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 12px;
  padding: clamp(26px, 2.6vw, 34px);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: transform .26s var(--ease), box-shadow .26s, border-color .26s;
}
.feat:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }
.feat__no { font-family: var(--mono); font-size: .74rem; letter-spacing: .08em; color: var(--blue-cta); margin-bottom: 10px; }
.feat__t { font-family: var(--disp); font-weight: 700; font-size: clamp(1.2rem, 1.7vw, 1.42rem); line-height: 1.12; letter-spacing: 0; }
.feat__p { color: var(--ink-2); font-size: .97rem; }
.feat__meta { margin-top: auto; padding-top: 22px; font-family: var(--mono); font-size: .66rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }

/* hero-карточка AI: 2 колонки, глоу и «стена промптов» вместо мокапа */
.feat--hero { grid-column: span 2; padding: clamp(30px, 3vw, 38px); }
.feat--hero .feat__t { font-size: clamp(1.5rem, 2.6vw, 2rem); max-width: 20ch; }
.feat--hero .feat__p { max-width: 54ch; font-size: 1.05rem; }
.feat__glow { position: absolute; right: -80px; top: -80px; width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(59,130,246,.16), transparent 72%); pointer-events: none; }
.feat__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.feat__kicker { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--blue-cta); }
.feat__badge { font-family: var(--mono); font-size: .72rem; font-weight: 500; color: #fff; background: var(--ink); border-radius: 999px; padding: 4px 12px; }
.feat__toolwall { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 26px; }
.feat__toolwall code { font-family: var(--mono); font-size: .74rem; color: var(--ink-2); background: var(--paper-2); border: 1px solid var(--line); border-radius: 7px; padding: 4px 10px; }
.feat__more { font-family: var(--mono); font-size: .74rem; font-weight: 600; color: var(--blue-deep); background: var(--blue-tint); border-radius: 7px; padding: 4px 11px; }

/* тёмная широкая полоса-финал */
.feat--ink { background: var(--ink-panel); border-color: #20242E; }
.feat--ink .feat__no { color: #7DB0FF; }
.feat--ink .feat__t { color: #fff; }
.feat--ink .feat__p { color: rgba(255,255,255,.66); }
.feat--ink:hover { border-color: rgba(59,130,246,.4); }
.feat--wide { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; gap: clamp(24px, 5vw, 64px); }
.feat--wide::before {
  content: ""; position: absolute; right: -70px; top: -110px; width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(59,130,246,.2), transparent 72%); pointer-events: none;
}
.feat__wide-text { max-width: 52ch; }
.feat__defaults { display: flex; flex-wrap: wrap; gap: 8px; max-width: 380px; justify-content: flex-end; }
.feat__defaults span { font-family: var(--mono); font-size: .72rem; color: rgba(255,255,255,.72); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 6px 13px; white-space: nowrap; }

/* ----------------------------- HOW (CONNECTION MAP) --------------------- */
.lead__link { color: var(--blue-cta); border-bottom: 1px solid color-mix(in srgb, var(--blue) 45%, transparent); transition: border-color .2s; }
.lead__link:hover { border-bottom-color: var(--blue-cta); }

.map {
  position: relative;
  margin-top: clamp(44px, 5vw, 68px);
  display: grid; grid-template-columns: .85fr 1.3fr .85fr; gap: clamp(30px, 3.8vw, 58px);
  align-items: center;
}
.map__col { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.map__cap { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }

.node { display: flex; align-items: center; gap: .7em; background: var(--paper); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 15px; font-size: .95rem; font-weight: 500; color: var(--ink); }
.node--client { font-family: var(--body); }
.node--muted { color: var(--muted); border-style: dashed; }
.node__name { font-weight: 500; }
/* реальные брендовые иконки клиентов */
.cli { width: 19px; height: 19px; flex: none; display: block; fill: var(--ink); }
.node--muted .cli { fill: none; opacity: .7; }
/* Claude Code — фирменный коралловый акцент Anthropic */
.node--claude { border-color: color-mix(in srgb, #D97757 42%, var(--line-2)); background: color-mix(in srgb, #D97757 6%, var(--paper)); }
.node--claude .cli { fill: #D97757; }
.node--claude .node__name { color: #B4530C; font-weight: 600; }

/* transit lanes */
.map__col--transit { gap: 14px; }
.lane {
  position: relative; display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 4px; align-items: baseline;
  background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r); padding: 16px 18px;
  box-shadow: var(--shadow);
}
.lane--remote { border-color: color-mix(in srgb, var(--blue) 30%, var(--line-2)); }
.lane__badge { grid-row: 1; font-family: var(--mono); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); background: var(--paper-3); border-radius: 999px; padding: 3px 9px; align-self: center; }
.lane__badge--alt { color: var(--blue-deep); background: var(--blue-tint); }
.lane__mode { grid-row: 1; font-family: var(--disp); font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.lane__desc { grid-column: 1 / -1; font-size: .86rem; color: var(--muted); line-height: 1.45; }
.lane__desc code { font-family: var(--mono); font-size: .82em; color: var(--blue-deep); background: var(--blue-tint); border-radius: 5px; padding: 1px 5px; }
/* дружелюбный «ключ» вместо сырого klv_-токена */
.lane__key { grid-column: 1 / -1; margin-top: 6px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: .82rem; color: var(--ink-2); background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; }
.lane__keyico { font-style: normal; font-family: var(--mono); font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--paper-3); border-radius: 6px; padding: 2px 7px; flex: none; }
.lane__keyico--alt { color: var(--blue-deep); background: var(--blue-tint); }
.lane__dots { margin-left: auto; font-family: var(--mono); letter-spacing: .12em; color: var(--blue); font-size: .8rem; }

/* board target node */
.map__col--target { align-items: stretch; text-align: center; }
.node--board { position: relative; flex-direction: column; align-items: center; gap: 8px; padding: 26px 20px; border-radius: var(--r-lg);
  background: radial-gradient(120% 100% at 50% 0%, var(--blue-tint) 0%, var(--paper) 60%); border-color: color-mix(in srgb, var(--blue) 26%, transparent); }
.node__brand { font-family: var(--disp); font-weight: 700; font-size: 1.35rem; color: var(--ink); }
.node__brand sup { color: var(--blue); font-size: .6em; }
.node__sub { font-family: var(--mono); font-size: .68rem; color: var(--muted); }
.node__pulse { position: absolute; inset: -1px; border-radius: inherit; border: 1.5px solid var(--blue); opacity: 0; animation: nodepulse 3.4s ease-out infinite; pointer-events: none; }
@keyframes nodepulse { 0% { opacity: .5; transform: scale(1); } 70%,100% { opacity: 0; transform: scale(1.05); } }
.map__foot { margin-top: 4px; font-size: .82rem; color: var(--muted); }

/* SVG-коннектор: анимированный пунктир (roadmap-стиль) — расходится к lanes
   и сходится в один канал к доске. Линии живут в зазорах между колонками. */
.map__wire { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; overflow: visible; }
.map__wire .wire { stroke-dasharray: 5 9; opacity: .8; animation: wireflow 1s linear infinite; }
@keyframes wireflow { to { stroke-dashoffset: -14; } }
/* лёгкий отклик узлов: клиенты чуть «подаются» к каналу */
.node--client { transition: border-color .25s, transform .25s var(--ease), box-shadow .25s; }
.node--client:hover { border-color: var(--ink); transform: translateX(3px); box-shadow: var(--shadow); }

/* ----------------------------- MCP DOCS --------------------------------- */
.doc-hero { padding-bottom: clamp(52px, 7vw, 92px); }
.doc-hero__grid {
  display: grid; grid-template-columns: 1.02fr .98fr; gap: clamp(28px, 4vw, 64px);
  align-items: center;
}
.doc-hero__title { font-size: clamp(3.5rem, 7vw, 6rem); }
.hero__lead code,
.lead__text code,
.doc-mode code,
.security-list code {
  font-family: var(--mono); font-size: .84em; color: var(--blue-deep);
  background: var(--blue-tint); border-radius: 6px; padding: 1px 6px;
}

.doc-console {
  overflow: hidden; border-radius: 18px; border: 1px solid #2A2622;
  background: #1A1916; box-shadow: 0 34px 72px -42px rgba(11,13,18,.72);
}
.doc-console__body {
  min-height: 390px; padding: clamp(18px, 2.6vw, 28px);
  font-family: var(--mono); font-size: .86rem; line-height: 1.8; color: #E8E3D9;
  display: flex; flex-direction: column; justify-content: center;
}
.doc-console__body p { margin: 0 0 10px; overflow-wrap: anywhere; }
.doc-console__res { color: #8B8378; padding-left: 20px; }
.doc-console__ok { color: #7BC98D; padding-left: 20px; }

.doc-strip { background: var(--paper-2); }
.doc-modes {
  margin-top: clamp(42px, 5vw, 64px);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
.doc-mode {
  position: relative; overflow: hidden;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(26px, 3vw, 36px);
  box-shadow: 0 18px 44px -34px rgba(11,13,18,.42);
}
.doc-mode::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px;
  background: var(--blue); opacity: .88;
}
.doc-mode__badge {
  display: inline-flex; margin-bottom: 18px; font-family: var(--mono); font-size: .64rem;
  letter-spacing: .09em; text-transform: uppercase; color: var(--blue-deep);
  background: var(--blue-tint); border-radius: 999px; padding: 5px 11px;
}
.doc-mode__badge--plain { color: var(--ink-2); background: var(--paper-3); }
.doc-mode h3 {
  font-family: var(--disp); font-size: clamp(1.35rem, 2vw, 1.72rem);
  line-height: 1.1; margin-bottom: 14px;
}
.doc-mode p { color: var(--ink-2); font-size: .98rem; max-width: 58ch; }
.doc-mode__endpoint {
  display: block; margin-top: 22px; padding: 11px 13px;
  font-family: var(--mono); font-size: .8rem; color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px;
  overflow-x: auto; white-space: nowrap;
}

.doc-snippets {
  margin-top: 18px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
}
.doc-snippet {
  overflow: hidden; background: #1A1916; border: 1px solid #2A2622; border-radius: var(--r);
  box-shadow: 0 24px 60px -42px rgba(11,13,18,.72);
}
.doc-snippet header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 15px; background: #211F1B; border-bottom: 1px solid #34302A;
}
.doc-snippet__k { font-family: var(--disp); font-size: .9rem; font-weight: 600; color: #fff; }
.doc-snippet__meta { font-family: var(--mono); font-size: .68rem; color: #8B8378; white-space: nowrap; }
.doc-snippet pre {
  margin: 0; padding: 16px; overflow-x: auto;
  font-family: var(--mono); font-size: .78rem; line-height: 1.68; color: #E8E3D9;
}
.doc-snippet code { font-family: inherit; }

.doc-tools { background: var(--paper); }
.tool-grid {
  margin-top: clamp(44px, 5vw, 68px);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.tool-group {
  display: flex; flex-direction: column; gap: 12px;
  min-height: 310px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: clamp(24px, 2.6vw, 32px);
  transition: transform .26s var(--ease), box-shadow .26s, border-color .26s;
}
.tool-group:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }
.tool-group__no { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; color: var(--blue-cta); }
.tool-group h3 {
  font-family: var(--disp); font-size: clamp(1.12rem, 1.6vw, 1.34rem);
  line-height: 1.14; letter-spacing: 0;
}
.tool-group p { color: var(--ink-2); font-size: .95rem; }
.tool-chipset { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 14px; }
.tool-chipset code {
  font-family: var(--mono); font-size: .68rem; color: var(--ink-2);
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 7px; padding: 4px 8px;
}

.doc-security {
  position: relative; overflow: hidden; background: var(--ink-panel);
}
.doc-security::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(50% 48% at 50% -10%, rgba(59,130,246,.18), transparent 66%);
}
.doc-security__grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(32px, 6vw, 74px);
  align-items: start;
}
.doc-security__copy { max-width: 58ch; }
.security-list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
  margin: 0;
}
.security-list div {
  min-height: 170px; padding: 22px; border-radius: var(--r);
  background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.11);
}
.security-list dt {
  font-family: var(--disp); font-size: 1rem; font-weight: 700; line-height: 1.2;
  color: #fff; margin-bottom: 10px;
}
.security-list dd { margin: 0; color: rgba(255,255,255,.64); font-size: .94rem; }
.security-list code { color: #A9C6FF; background: rgba(59,130,246,.14); }

.doc-playbook { background: var(--paper-2); }
.playbook-list {
  margin-top: clamp(42px, 5vw, 64px);
  display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line-2);
}
.playbook-item {
  display: grid; grid-template-columns: 90px 1fr; gap: clamp(18px, 4vw, 48px);
  align-items: baseline; padding: clamp(22px, 3vw, 34px) 0;
  border-bottom: 1px solid var(--line-2);
}
.playbook-item span {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; color: var(--blue-cta);
}
.playbook-item p {
  margin: 0; max-width: 68ch;
  font-family: var(--disp); font-weight: 600; font-size: clamp(1.1rem, 2.1vw, 1.55rem);
  line-height: 1.22; color: var(--ink);
}

/* ----------------------------- MCP REFERENCE DOCS ----------------------- */
.docs-page {
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
}
.docs-hero {
  padding: clamp(54px, 7vw, 90px) 0 clamp(34px, 5vw, 58px);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.docs-title {
  max-width: 980px; margin-top: 22px;
  font-family: var(--disp); font-size: clamp(2.5rem, 5.8vw, 5rem);
  line-height: 1.02; font-weight: 800; letter-spacing: 0;
  overflow-wrap: anywhere;
}
.docs-intro {
  max-width: 76ch; margin-top: 24px;
  font-size: 1.14rem; color: var(--ink-2);
}
.docs-meta {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px;
  font-family: var(--mono); font-size: .74rem; color: var(--muted);
}
.docs-meta span {
  display: inline-flex; flex-wrap: wrap; gap: 6px;
  padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--paper-2);
}
.docs-page code {
  font-family: var(--mono); font-size: .86em;
  color: var(--blue-deep); background: var(--blue-tint);
  border-radius: 5px; padding: 1px 5px;
}

.docs-layout {
  display: grid; grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(30px, 5vw, 72px);
  align-items: start;
  padding-top: clamp(38px, 5vw, 64px);
  padding-bottom: clamp(72px, 9vw, 116px);
}
.docs-toc {
  position: sticky; top: 104px;
  border-left: 1px solid var(--line-2);
  padding-left: 18px;
}
.docs-toc nav { display: flex; flex-direction: column; gap: 3px; }
.docs-toc a {
  position: relative;
  display: block; padding: 6px 0;
  font-size: .92rem; color: var(--ink-2);
  transition: color .2s, transform .2s var(--ease);
}
.docs-toc a:hover { color: var(--blue-cta); transform: translateX(2px); }
.docs-toc a.is-active {
  color: var(--blue-cta);
  font-weight: 700;
}
.docs-toc a.is-active::before {
  content: "";
  position: absolute;
  left: -19px;
  top: 50%;
  width: 3px;
  height: 1.35em;
  border-radius: 999px;
  background: var(--blue);
  transform: translateY(-50%);
}

.docs-content {
  min-width: 0; max-width: 900px;
}
.docs-section {
  padding: clamp(28px, 4vw, 46px) 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 106px;
}
.docs-section:first-child { padding-top: 0; }
.docs-section:last-child { border-bottom: 0; }
.docs-section h2 {
  font-family: var(--disp); font-size: clamp(1.65rem, 3vw, 2.25rem);
  line-height: 1.12; font-weight: 700; letter-spacing: 0;
  margin-bottom: 16px;
}
.docs-section h3 {
  font-family: var(--disp); font-size: 1.08rem;
  line-height: 1.24; font-weight: 650; letter-spacing: 0;
  margin: 26px 0 10px;
}
.docs-section p {
  max-width: 78ch; color: var(--ink-2);
  font-size: 1rem; line-height: 1.72;
}
.docs-section p + p { margin-top: 12px; }

.docs-table {
  width: 100%; margin-top: 18px;
  border-collapse: collapse;
  font-size: .94rem; line-height: 1.55;
  background: var(--paper);
  border: 1px solid var(--line);
}
.docs-table th,
.docs-table td {
  padding: 13px 14px;
  text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.docs-table th {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .08em;
  text-transform: uppercase; font-weight: 500;
  color: var(--muted); background: var(--paper-2);
}
.docs-table tr:last-child td { border-bottom: 0; }
.docs-table td { color: var(--ink-2); }
.docs-table td:first-child { color: var(--ink); }

.docs-steps {
  counter-reset: step;
  list-style: none; padding: 0; margin: 20px 0 0;
  display: grid; gap: 14px;
}
.docs-steps li {
  position: relative; padding: 18px 18px 18px 66px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
}
.docs-steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 18px; top: 19px;
  font-family: var(--mono); font-size: .72rem; color: var(--blue-cta);
}
.docs-steps h3 { margin: 0 0 6px; }
.docs-steps p { margin: 0; }

.docs-callout {
  margin-top: 18px; padding: 14px 16px;
  border-left: 3px solid var(--blue);
  background: color-mix(in srgb, var(--blue-tint) 62%, var(--paper));
  color: var(--ink-2);
}
.docs-callout strong { color: var(--ink); }

.docs-code {
  margin: 14px 0 24px;
  padding: 16px 18px;
  overflow-x: auto;
  background: #1A1916;
  border: 1px solid #2A2622;
  border-radius: 10px;
  color: #E8E3D9;
  font-family: var(--mono);
  font-size: .82rem;
  line-height: 1.68;
}
.docs-code code {
  color: inherit; background: transparent; padding: 0; border-radius: 0;
  font-size: inherit;
}

.docs-tool-list {
  display: grid; gap: 16px; margin-top: 20px;
}
.docs-tool-list section {
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.docs-tool-list h3 { margin-top: 0; }
.docs-tool-list p {
  max-width: none;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.docs-tool-list p + p { margin-top: 8px; }
.docs-tool-list code {
  display: inline-flex; white-space: nowrap;
  color: var(--ink-2); background: var(--paper-2);
  border: 1px solid var(--line); border-radius: 7px;
  padding: 3px 7px;
  font-size: .75rem;
}

.docs-links {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px;
}
.docs-links a {
  display: inline-flex;
  padding: 9px 13px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: .9rem; font-weight: 600;
  color: var(--ink);
  background: var(--paper);
  transition: border-color .2s, color .2s, transform .2s var(--ease);
}
.docs-links a:hover {
  color: var(--blue-cta);
  border-color: color-mix(in srgb, var(--blue) 45%, var(--line-2));
  transform: translateY(-1px);
}

/* ----------------------------- BLOG ------------------------------------- */
.blog-page,
.article-page {
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
}
.blog-hero {
  padding: clamp(58px, 7vw, 96px) 0 clamp(42px, 5vw, 66px);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.blog-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .72fr);
  gap: clamp(44px, 7vw, 104px);
  align-items: end;
}
.blog-title {
  max-width: 820px;
  margin-top: 22px;
  font-family: var(--disp);
  font-size: clamp(2.7rem, 5.8vw, 5rem);
  line-height: .99;
  font-weight: 800;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.blog-hero__aside {
  display: grid;
  gap: clamp(28px, 4vw, 48px);
  padding-left: 24px;
  border-left: 1px solid var(--line-2);
}
.blog-intro {
  max-width: 52ch;
  color: var(--ink-2);
  font-size: 1.05rem;
  line-height: 1.68;
}
.blog-hero__count {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}
.blog-hero__count strong {
  font-family: var(--disp);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: .8;
  color: var(--blue-cta);
}
.blog-hero__count span {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.blog-list { padding: clamp(42px, 6vw, 76px) 0 clamp(72px, 9vw, 116px); }
.blog-feed { border-top: 1px solid var(--ink); }
.blog-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(300px, .72fr);
  gap: clamp(30px, 5vw, 68px);
  align-items: stretch;
  padding: clamp(24px, 3vw, 38px) 0 clamp(38px, 5vw, 62px);
  border-bottom: 1px solid var(--line-2);
}
.blog-feature__media,
.blog-archive__media,
.article-image-slot,
.article-inline-image {
  position: relative;
  display: grid; place-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(59,130,246,.12), transparent 34%),
    repeating-linear-gradient(135deg, var(--paper-2), var(--paper-2) 10px, var(--paper-3) 10px, var(--paper-3) 20px);
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono); font-size: .78rem;
}
.blog-feature__media {
  width: 100%;
  min-width: 0;
  align-self: start;
  aspect-ratio: 12 / 5;
  border-radius: 18px;
}
.blog-feature__media img,
.blog-archive__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .45s var(--ease), filter .45s;
}
.blog-feature:hover .blog-feature__media img,
.blog-archive__item:hover .blog-archive__media img { transform: scale(1.025); filter: saturate(1.04); }
.article-image-slot--alt {
  background:
    linear-gradient(135deg, rgba(11,13,18,.08), transparent 36%),
    repeating-linear-gradient(135deg, #F7F8FA, #F7F8FA 10px, #ECEFF3 10px, #ECEFF3 20px);
}
.article-image-slot span,
.article-inline-image span {
  padding: 7px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  border: 1px solid var(--line);
}
.blog-feature__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 4px 0;
}
.blog-entry__index {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .08em;
  color: var(--blue-cta);
}
.blog-entry__meta,
.article-meta {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}
.blog-feature__body .blog-entry__meta { margin-top: auto; }
.blog-feature h2 {
  margin-top: 14px;
  font-family: var(--disp);
  font-size: clamp(1.6rem, 2.3vw, 2.1rem);
  line-height: 1.08;
  letter-spacing: 0;
}
.blog-feature h2 a,
.blog-archive__item h2 a { transition: color .2s; }
.blog-feature:hover h2 a,
.blog-archive__item:hover h2 a { color: var(--blue-cta); }
.blog-feature__body > p:not([class]) {
  max-width: 48ch;
  margin-top: 18px;
  color: var(--ink-2);
  font-size: 1rem;
}
.blog-entry__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  margin-top: 24px;
  color: var(--blue-cta);
  font-weight: 700;
  transition: color .2s;
}
.blog-entry__link span { transition: transform .2s var(--ease); }
.blog-entry__link:hover { color: var(--blue-deep); }
.blog-entry__link:hover span { transform: translateX(4px); }
.blog-archive__item {
  display: grid;
  grid-template-columns: 44px 180px minmax(0, 1fr) auto;
  gap: clamp(18px, 3vw, 36px);
  align-items: center;
  padding: clamp(24px, 3vw, 34px) 0;
  border-bottom: 1px solid var(--line-2);
}
.blog-archive__media {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
}
.blog-archive__body h2 {
  margin-top: 8px;
  font-family: var(--disp);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.14;
}
.blog-archive__body > p:not([class]) {
  max-width: 62ch;
  margin-top: 10px;
  color: var(--ink-2);
  font-size: .95rem;
}
.blog-archive__link { margin-top: 0; white-space: nowrap; }

.article-header {
  padding: clamp(54px, 7vw, 92px) 0 clamp(34px, 5vw, 58px);
  background: var(--paper);
}
.article-title {
  max-width: 980px; margin-top: 22px;
  font-family: var(--disp); font-size: clamp(2.45rem, 5.5vw, 4.7rem);
  line-height: 1.04; font-weight: 800; letter-spacing: 0;
  overflow-wrap: anywhere;
}
.article-lead {
  max-width: 76ch; margin-top: 24px;
  font-size: 1.14rem; color: var(--ink-2);
}

.article-header { border-bottom: 1px solid var(--line); }
.article-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}
.article-back {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  font-weight: 600; color: var(--blue-cta);
}
.article-kicker .eyebrow { line-height: 1; }
.article-meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 22px;
}
.article-meta span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
}
.article-image-slot {
  aspect-ratio: 16 / 7;
  margin-top: clamp(28px, 4vw, 48px);
  border-radius: var(--r-lg);
}
.article-image-slot--photo { display: block; }
.article-image-slot--photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
}
.article-image-slot--photo figcaption {
  position: absolute; left: 14px; right: 14px; bottom: 14px;
  width: max-content; max-width: calc(100% - 28px);
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 999px;
  background: rgba(11,13,18,.76);
  color: rgba(255,255,255,.88);
  font-family: var(--body); font-size: .78rem; line-height: 1.4;
  backdrop-filter: blur(10px);
}
.article-image-slot--photo figcaption a {
  color: inherit;
  text-decoration-color: rgba(255,255,255,.52);
  text-underline-offset: 2px;
}
.article-image-slot--photo figcaption a:hover { text-decoration-color: currentColor; }
.article-layout {
  display: grid; grid-template-columns: 210px minmax(0, 780px);
  gap: clamp(30px, 5vw, 70px);
  align-items: start;
  padding-top: clamp(42px, 5vw, 70px);
  padding-bottom: clamp(72px, 9vw, 116px);
}
.article-aside {
  position: sticky; top: 104px;
  border-left: 1px solid var(--line-2);
  padding-left: 18px;
}
.article-aside nav { display: flex; flex-direction: column; gap: 3px; }
.article-aside a {
  position: relative;
  display: block; padding: 6px 0;
  font-size: .92rem; color: var(--ink-2);
  transition: color .2s, transform .2s var(--ease);
}
.article-aside a:hover { color: var(--blue-cta); transform: translateX(2px); }
.article-aside a.is-active {
  color: var(--blue-cta);
  font-weight: 700;
}
.article-aside a.is-active::before {
  content: "";
  position: absolute;
  left: -19px;
  top: 50%;
  width: 3px;
  height: 1.35em;
  border-radius: 999px;
  background: var(--blue);
  transform: translateY(-50%);
}
.article-content {
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(26px, 4vw, 46px);
}
.article-content section {
  padding: 0 0 clamp(28px, 4vw, 42px);
  margin-bottom: clamp(28px, 4vw, 42px);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 106px;
}
.article-content section:last-child {
  padding-bottom: 0; margin-bottom: 0; border-bottom: 0;
}
.article-content h2 {
  font-family: var(--disp); font-size: clamp(1.45rem, 2.6vw, 2rem);
  line-height: 1.12; letter-spacing: 0;
  margin-bottom: 14px;
}
.article-content p {
  color: var(--ink-2);
  font-size: 1.03rem;
  line-height: 1.78;
}
.article-content p + p { margin-top: 14px; }
.article-content h3 {
  margin: 26px 0 10px;
  font-family: var(--disp); font-size: clamp(1.05rem, 1.8vw, 1.28rem);
  line-height: 1.25; letter-spacing: 0;
}
.article-content ul,
.article-content ol {
  margin: 16px 0 0;
  padding-left: 20px;
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.68;
}
.article-content li + li { margin-top: 10px; }
.article-content strong { color: var(--ink); font-weight: 700; }
.article-content em { color: var(--ink); }
.article-content code {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--mono); font-size: .87em;
}
.article-content a {
  color: var(--blue-cta);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--blue) 36%, transparent);
  text-underline-offset: 3px;
  transition: text-decoration-color .2s;
}
.article-content a:hover { text-decoration-color: var(--blue-cta); }
.article-note,
.article-example {
  margin-top: 22px;
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--blue) 28%, var(--line));
  border-left: 3px solid var(--blue-cta);
  border-radius: 0 var(--r) var(--r) 0;
  background: color-mix(in srgb, var(--blue) 5%, var(--paper-2));
  color: var(--ink-2);
  font-size: .97rem;
  line-height: 1.68;
}
.article-example {
  border-left-color: var(--ink);
  border-color: var(--line-2);
  background: var(--paper-2);
}
.article-note + p,
.article-example + p { margin-top: 20px; }
.article-example p { font-size: .97rem; line-height: 1.68; }
.article-source { margin-top: 22px !important; font-size: .9rem !important; color: var(--muted) !important; }
.article-table-wrap {
  overflow-x: auto;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--paper);
}
.article-table-wrap table {
  width: 100%; min-width: 560px;
  border-collapse: collapse;
  text-align: left;
}
.article-table-wrap th,
.article-table-wrap td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.article-table-wrap th {
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--mono); font-size: .75rem; line-height: 1.45;
  letter-spacing: .04em; text-transform: uppercase;
}
.article-table-wrap td { color: var(--ink-2); font-size: .94rem; line-height: 1.55; }
.article-table-wrap tr:last-child td { border-bottom: 0; }
.article-checklist { list-style: none; padding-left: 0 !important; }
.article-checklist li { position: relative; padding-left: 29px; }
.article-checklist li::before {
  content: "✓";
  position: absolute; left: 0; top: .05em;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--blue) 12%, var(--paper-2));
  color: var(--blue-cta);
  font-family: var(--mono); font-size: .74rem; font-weight: 700;
}
.article-inline-image {
  aspect-ratio: 16 / 8;
  margin: 0 0 clamp(30px, 4vw, 44px);
  border-radius: var(--r);
}
.article-inline-image--wide { aspect-ratio: 16 / 6; }

/* Витрина штампов: те самые «нейронные» приёмы, показанные вёрсткой,
   а не описанные словами. Всё на токенах — отдельных картинок не нужно. */
.slop-demo {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--paper);
}
.slop-demo + .slop-demo { margin-top: 14px; }
.slop-demo__stage {
  position: relative; overflow: hidden;
  display: grid; place-items: center;
  height: 172px; padding: 20px;
  background: var(--paper-2);
}
.slop-demo__caption {
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem; line-height: 1.6;
}
.slop-demo__tag {
  margin-right: 8px;
  color: var(--ink);
  font-family: var(--mono); font-size: .72rem;
  letter-spacing: .04em; text-transform: uppercase;
}
/* 1 — фон в сеточку */
.slop-demo__stage--grid {
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--ink) 9%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--ink) 9%, transparent) 1px, transparent 1px);
  background-size: 26px 26px;
}
/* 2 — два размытых пятна на ::before/::after, тот самый приём */
.slop-demo__stage--glow::before,
.slop-demo__stage--glow::after {
  content: ""; position: absolute;
  width: 210px; height: 210px; border-radius: 50%;
  filter: blur(48px); opacity: .7;
}
.slop-demo__stage--glow::before {
  left: -46px; top: -74px;
  background: color-mix(in srgb, var(--blue) 62%, transparent);
}
.slop-demo__stage--glow::after {
  right: -54px; bottom: -84px;
  background: color-mix(in srgb, #A855F7 55%, transparent);
}
/* условный первый экран внутри витрины */
.slop-mock {
  position: relative; z-index: 1;
  display: grid; justify-items: center; gap: 9px;
  width: min(280px, 100%);
}
.slop-mock__bar {
  display: block; height: 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 20%, transparent);
}
.slop-mock__bar--title { width: 76%; height: 16px; }
.slop-mock__bar--text {
  width: 54%; height: 9px;
  background: color-mix(in srgb, var(--ink) 12%, transparent);
}
.slop-mock__row { display: flex; gap: 8px; margin-top: 4px; }
.slop-mock__btn { width: 92px; height: 26px; border-radius: 999px; background: var(--ink); }
.slop-mock__btn--ghost {
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--ink) 24%, transparent);
}
/* 3 — три одинаковые карточки с бейджами */
.slop-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
.slop-card {
  display: grid; gap: 8px; align-content: start;
  padding: 12px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--paper);
}
.slop-card__badge {
  justify-self: start;
  padding: 3px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--blue) 12%, var(--paper-2));
  color: var(--blue-cta);
  font-family: var(--mono); font-size: .62rem;
  letter-spacing: .04em; text-transform: uppercase;
}
.slop-card__icon {
  width: 22px; height: 22px; border-radius: 7px;
  background: color-mix(in srgb, var(--ink) 16%, transparent);
}
@media (max-width: 560px) {
  .slop-demo__stage { height: 146px; padding: 14px; }
  .slop-card { padding: 9px; gap: 6px; }
  .slop-card__badge { padding: 2px 6px; font-size: .55rem; }
  .slop-card__icon { width: 18px; height: 18px; }
}

/* ----------------------------- SUPPORT (OPEN-SOURCE BAND) --------------- */
.support { padding-bottom: clamp(72px, 9vw, 120px); }
.support__card {
  position: relative; overflow: hidden;
  background: var(--ink-panel);
  border: 1px solid #20242E; border-radius: var(--r-xl);
  padding: clamp(44px, 6vw, 80px) clamp(28px, 5vw, 72px);
  box-shadow: 0 40px 90px -60px rgba(11,13,18,.7);
}
/* огромное слово-водяной знак «open» — editorial, не эмодзи */
.support__word {
  position: absolute; right: -.06em; bottom: -.28em; z-index: 0;
  font-family: var(--disp); font-weight: 900; font-size: clamp(9rem, 22vw, 20rem); line-height: .8;
  color: rgba(255,255,255,.035); letter-spacing: -.02em; pointer-events: none; user-select: none;
}
.support__body { position: relative; z-index: 1; max-width: 62ch; }
.support .eyebrow--light { color: rgba(255,255,255,.6); }
.support .eyebrow--light .eyebrow__line { background: var(--blue); }
.support__title { font-family: var(--disp); font-weight: 800; font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.02; letter-spacing: 0; color: #fff; margin: 18px 0 0; }
.support__lead { color: rgba(255,255,255,.66); font-size: 1.1rem; max-width: 54ch; margin: 20px 0 0; }
.support__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 32px 0 0; }
.btn--star { background: #fff; color: var(--ink); }
.btn--star:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 16px 34px -16px rgba(0,0,0,.6); }
.btn__gh { fill: currentColor; }
.btn--line-light { color: #fff; border-color: rgba(255,255,255,.22); }
.btn--line-light:hover { border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.04); }
.support__fine { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 26px; font-family: var(--mono); font-size: .82rem; color: rgba(255,255,255,.4); }
.support__fine a { color: rgba(255,255,255,.7); border-bottom: 1px solid rgba(255,255,255,.2); padding-bottom: 1px; transition: color .2s, border-color .2s; }
.support__fine a:hover { color: #fff; border-color: var(--blue); }
.support__fine span { color: rgba(255,255,255,.25); }

/* ----------------------------- FOOTER ----------------------------------- */
.footer { border-top: 1px solid var(--line); padding: clamp(56px, 7vw, 84px) 0 32px; }
.footer__grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 40px; }
.footer__tag { color: var(--muted); font-size: .95rem; margin-top: 16px; max-width: 32ch; }
.footer__col h4 { font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 16px; }
.footer__col a { display: block; color: var(--ink-2); font-size: .96rem; padding: 5px 0; transition: color .2s; }
.footer__col a:hover { color: var(--blue-cta); }
.footer__word {
  font-family: var(--disp); font-weight: 900;
  font-size: 14rem; line-height: .86; letter-spacing: 0;
  margin: clamp(40px, 7vw, 80px) 0 0; white-space: nowrap; overflow: hidden;
  background: linear-gradient(180deg, var(--ink) 36%, transparent 128%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  user-select: none;
}
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 26px; margin-top: 12px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }

/* ----------------------------- REVEAL ----------------------------------- */
.reveal { opacity: 0; transform: translateY(20px); filter: blur(6px); transition: opacity .7s var(--ease), transform .7s var(--ease), filter .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; filter: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }

/* ----------------------------- RESPONSIVE ------------------------------- */
@media (max-width: 1180px) {
  .nav__inner {
    position: relative;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px;
  }
  .nav__actions { grid-column: 2; grid-row: 1; }
  .nav__menu-toggle {
    display: grid;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }
  .nav__links {
    position: absolute;
    z-index: 2;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    justify-self: stretch;
    margin: 0;
    padding: 10px 32px 18px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--paper) 96%, transparent);
    box-shadow: 0 18px 36px -30px rgba(11,13,18,.55);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
  }
  .nav__links a {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 4px 0;
    border-top: 1px solid var(--line);
    font-family: var(--disp);
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
  }
  .nav__links a:first-child { border-top: 0; }
  .nav__links a[aria-current="page"] { color: var(--blue-cta); }
  .nav__menu-toggle:not([hidden]) + .nav__links {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity .18s, transform .18s var(--ease), visibility .18s;
  }
  .nav.is-menu-open .nav__menu-toggle:not([hidden]) + .nav__links {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
  .nav.is-menu-open { border-bottom-color: var(--line); }
}

/* ── tablet (≤1040px): диптих и карта складываются вертикально ── */
@media (max-width: 1040px) {
  .demo { grid-template-columns: 1fr; height: auto; }
  /* высоты панелей фиксированы и в стеке — сцена не прыгает */
  .demo__panel--board { height: clamp(460px, 58vw, 560px); }
  .demo__panel--term { height: 400px; }
  .doc-hero__grid { grid-template-columns: 1fr; }
  .doc-console__body { min-height: 320px; }
  .article-layout { grid-template-columns: 1fr; }
  .article-aside {
    position: static;
    border-left: 0;
    border-bottom: 1px solid var(--line);
    padding-left: 0;
    padding-bottom: 14px;
  }
  .article-aside nav { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .article-aside a {
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
  }
  .article-aside a:hover { transform: none; }
  .article-aside a.is-active {
    color: #fff;
    border-color: var(--blue-cta);
    background: var(--blue-cta);
  }
  .article-aside a.is-active::before { display: none; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-toc {
    position: static;
    border-left: 0;
    border-bottom: 1px solid var(--line);
    padding-left: 0;
    padding-bottom: 14px;
  }
  .docs-toc nav { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .docs-toc a {
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
  }
  .docs-toc a.is-active {
    color: #fff;
    border-color: var(--blue-cta);
    background: var(--blue-cta);
  }
  .docs-toc a.is-active::before { display: none; }
  .map { grid-template-columns: 1fr; gap: 14px; }
  .map__wire { display: none; }
  .map__col--clients { flex-direction: row; flex-wrap: wrap; }
  .map__col--transit { flex-direction: row; }
  .map__col--transit .lane { flex: 1; }
  .map__col--target { text-align: left; }
}
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__shot { width: min(100%, 420px); justify-self: center; }
  /* В три колонки реплики начинают ломаться на строки — главы встают столбиком,
     а таймлайн вместе с ними поворачивается: рельс слева идёт одной линией
     сквозь все три, заливка едет сверху вниз. Горизонтальная полоска под каждой
     строкой читалась бы как три отдельных прогресса. */
  .scenes__tabs { grid-template-columns: 1fr; }
  /* .8rem (12.8px) в столбик читалось мелко — в три колонки размер держала ширина */
  .scene-tab { padding: 11px 0 11px 18px; font-size: .85rem; }
  .scene-tab::after { left: 0; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .scene-tab__bar {
    left: 0; right: auto; top: 0; bottom: 0; width: 2px; height: auto;
    transform-origin: top; transform: scaleY(0);
  }
  .scene-tab.is-run .scene-tab__bar,
  .scene-tab.is-done .scene-tab__bar { transform: scaleY(1); }
  .lead--split { grid-template-columns: 1fr; gap: 20px; }
  .display { font-size: 3rem; }
  .hero__title { font-size: 4.6rem; }
  .footer__word { font-size: 7rem; }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-hero__grid { grid-template-columns: 1fr; gap: 30px; }
  .blog-hero__aside {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 28px;
    padding: 24px 0 0;
    border-top: 1px solid var(--line-2);
    border-left: 0;
  }
  .blog-feature { grid-template-columns: 1fr; gap: 26px; }
  .blog-feature__body .blog-entry__meta { margin-top: 26px; }
  .blog-archive__item { grid-template-columns: 36px 150px minmax(0, 1fr); }
  .blog-archive__link { grid-column: 3; margin-top: 0; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .doc-security__grid { grid-template-columns: 1fr; }
  .ledger__row { grid-template-columns: 1fr; row-gap: 10px; }
  .ledger__meta { justify-self: start; text-align: left; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: span 2; }
  .nav__actions { gap: 12px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 20px; }
  .nav__inner { gap: 12px; }
  .nav__actions { gap: 8px; }
  .nav__links { padding-inline: 20px; }
  .display { font-size: 2.35rem; }
  /* 3.25rem — «Sometimes» упиралось в правый край на 390px */
  .hero__title { font-size: 2.95rem; }
  /* на мобиле иллюстрация не несёт смысла и только отодвигает CTA вниз */
  .hero__shot { display: none; }
  .footer__word { font-size: 3.25rem; }
  .feat-grid { grid-template-columns: 1fr; }
  .blog-hero { padding: 34px 0 28px; }
  .blog-hero__grid { gap: 24px; }
  .blog-title { font-size: clamp(2.25rem, 11.5vw, 2.85rem); }
  .article-title { font-size: 2rem; }
  .blog-intro, .article-lead { font-size: 1rem; }
  .blog-hero__aside { grid-template-columns: 1fr; align-items: start; gap: 20px; padding-top: 18px; }
  .blog-hero__count strong { font-size: 2.5rem; }
  .blog-list { padding: 32px 0 72px; }
  .blog-feature { padding: 20px 0 34px; gap: 22px; }
  .blog-feature__media { aspect-ratio: 12 / 5; border-radius: 14px; }
  .blog-feature h2 { font-size: 1.45rem; }
  .blog-feature__body > p:not([class]) { margin-top: 14px; }
  .blog-archive__item {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
  }
  .blog-archive__media { grid-column: 2; width: 100%; aspect-ratio: 16 / 9; }
  .blog-archive__body { grid-column: 2; }
  .blog-archive__link { grid-column: 2; margin-top: 0; }
  .blog-archive__body h2 { font-size: 1.2rem; }
  .article-image-slot { aspect-ratio: 4 / 3; }
  .article-image-slot--photo figcaption {
    left: 10px; right: 10px; bottom: 10px;
    max-width: calc(100% - 20px);
    border-radius: 8px;
  }
  .article-layout { padding-top: 28px; }
  .article-content { padding: 22px; }
  .article-content section { scroll-margin-top: 86px; }
  .article-inline-image,
  .article-inline-image--wide { aspect-ratio: 4 / 3; }
  .doc-hero__title { font-size: 3.1rem; }
  .doc-modes, .doc-snippets, .tool-grid, .security-list { grid-template-columns: 1fr; }
  .doc-console__body { min-height: 260px; font-size: .7rem; }
  .doc-snippet header { align-items: flex-start; flex-direction: column; gap: 4px; }
  .doc-snippet pre { font-size: .68rem; }
  .docs-title { font-size: 2rem; }
  .docs-intro { font-size: 1rem; }
  .docs-layout { padding-top: 28px; }
  .docs-section { scroll-margin-top: 86px; }
  .docs-section h2 { font-size: 1.55rem; }
  .docs-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  .docs-table td,
  .docs-table th { white-space: normal; min-width: 170px; }
  .docs-steps li { padding-left: 18px; padding-top: 46px; }
  .docs-steps li::before { top: 18px; }
  .docs-code { font-size: .7rem; padding: 13px; }
  .docs-tool-list section { padding: 15px; }
  .tool-group { min-height: 0; }
  .playbook-item { grid-template-columns: 1fr; gap: 10px; }
  .playbook-item p { font-size: 1.08rem; }
  .feat--hero, .feat--wide { grid-column: auto; }
  .feat--wide { flex-direction: column; align-items: flex-start; }
  .feat__defaults { justify-content: flex-start; }
  /* ── СЦЕНА НА ТЕЛЕФОНЕ ──────────────────────────────────────────────────
     Диптих в 1071px не работал: доска и терминал не помещались в экран
     вместе, а действие уезжало за горизонтальный скролл доски. Теперь
     терминал — узкая лента сверху (человек просит), доска под ней сразу
     реагирует, весь блок ≈ 600px и виден целиком. */
  .demo { height: auto; gap: 10px; }
  .demo__panel--term { order: -1; height: 142px; }
  /* хром с адресом съедал 40px из 142 — на телефоне это роскошь */
  .demo__panel--term .demo__chrome { display: none; }
  .term { justify-content: flex-end; font-size: .66rem; padding: 11px 13px 9px; }
  .term__banner { display: none; }
  /* лента режется сверху, как хвост настоящего терминала: свежая строка всегда
     видна целиком, а строка с приглашением остаётся прижатой к низу */
  .term__feed {
    flex: 1; display: flex; flex-direction: column; justify-content: flex-end;
    overflow: hidden;
  }
  /* без этого flex сплющивает строки по высоте вместо того, чтобы срезать верхние */
  .term__feed > * { flex: none; }
  .demo__panel--board { height: 372px; }
  /* три колонки сюжета влезают без скролла: In Review в сценариях
     не участвует, а из-за него ключевой переход In Progress → Done
     оказывался за краем экрана */
  .board { grid-template-columns: repeat(3, minmax(0, 1fr)); overflow-x: visible; gap: 8px; }
  .board__col:nth-child(3) { display: none; }
  /* карточка в колонке ~104px: длинные слова рвём, из меты оставляем статус —
     иначе каждая метка ложится в свою строку и в колонку влезает одна карточка */
  .mini { padding: 8px; gap: 4px; }
  .mini__ttl { font-size: .72rem; overflow-wrap: anywhere; hyphens: auto; }
  .mini__meta .mtag, .mini__meta .mprio { display: none; }
  /* колонка длиннее панели — гасим низ, чтобы обрез читался как глубина,
     а не как поехавшая вёрстка */
  .board { mask-image: linear-gradient(to bottom, #000 86%, transparent); }
  /* задачи из сценария «Заведи задачи из заметок» встают наверх колонки:
     в хвосте To Do они оказывались под обрезом и сюжет пропадал.
     Заголовок колонки — тоже flex-ребёнок, ему нужен order помельче */
  .board__h { order: -2; }
  .mini--ghost { order: -1; }
  /* подпись про «обе панели» — про десктопный диптих, здесь панели друг под другом */
  .scenes__hint { display: none; }
  .map__col--clients { flex-direction: column; }
  .map__col--transit { flex-direction: column; }
  .support__actions .btn { width: 100%; justify-content: center; }
  .support__word { font-size: 7rem; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: span 2; }
  .nav__login { font-size: .78rem; }
  .language-picker { gap: 5px; width: max-content; height: 36px; padding-inline: 4px; }
  .language-picker__label { display: none; }
  .language-picker__code { display: inline; }
  .nav__actions .btn { padding-inline: 14px; font-size: .82rem; }
}

/* ----------------------------- MOTION SAFETY ---------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
  /* сцена показывает итоговое состояние без движения: задача уже в Done,
     JS-движок сценариев не запускается (см. script.js) */
  .mini--move { opacity: 0; }
  .mini--land { opacity: 1; transform: none; }
  .node__pulse { display: none; }
  .map__wire .wire, .ticker__track { animation: none; }
}
