/* ===========================
   Sales Hub — Space HUD theme
   =========================== */

/* Шрифты подключены отдельной строкой в <head>, а не через @import.
   При @import браузер сначала скачивает этот файл, разбирает его, только
   потом узнаёт про fonts.css и идёт за ним — лишний круг до первой
   отрисовки на каждой странице. Двумя ссылками оба файла едут разом. */

:root {
  --bg: #05070c;
  --bg-alt: #0a0e16;
  --panel: rgba(16, 22, 34, 0.62);
  --panel-solid: #0d1420;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);

  --text: #e8edf4;
  --text-dim: #a3b1c6;   /* 9.1:1 на --bg */
  --text-faint: #7d8a9f; /* 5.8:1 на --bg — было #576277 (3.3:1, ниже нормы) */

  --accent: #ffb547;
  --accent-2: #ff7a3d;
  --accent-soft: rgba(255, 181, 71, 0.08);
  --accent-line: rgba(255, 181, 71, 0.2);
  --success: #4ade80;
  --danger: #ff8080;

  /* Manrope и JetBrains Mono содержат кириллицу — прежние Archivo и
     Share Tech Mono её не имели, и весь русский текст отрисовывался
     системным шрифтом, по-разному на каждом устройстве.
     Michroma оставлена: она используется только для латиницы и цифр. */
  --font-accent: 'Michroma', 'Manrope', system-ui, sans-serif;
  /* «Manrope Fallback» — не отдельный шрифт, а тот же системный, но с
     подогнанной шириной: строка в нём занимает почти столько же места, что и
     в Manrope. Пока основной шрифт едет, текст рисуется запасным, и без этой
     подгонки строки перевёрстываются на подмене — вёрстка прыгает. */
  --font-body: 'Manrope', 'Manrope Fallback', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  --radius: 14px;
  --container: 1240px;
  --header-h: 72px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; }

.section-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- доступность ---------- */

.skip-link {
  position: absolute;
  left: 50%;
  top: 6px;
  transform: translate(-50%, -160%);
  z-index: 100;
  background: var(--accent);
  color: #04121a;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 12px 22px;
  border-radius: 8px;
  transition: transform 0.2s var(--ease-out);
}
.skip-link:focus { transform: translate(-50%, 0); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Единый видимый фокус — раньше его не было нигде, кроме полей формы. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

/* ---------- фоновые слои ---------- */

.stars-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--bg);
}
.stars-bg span {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #fff;
  border-radius: 50%;
  opacity: 0.6;
  animation: twinkle 4s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.9; }
}

/* Свечение индикатора «ONLINE».
   Частые короткие сбои разной глубины вперемешку с ровным светом — так
   мигает контакт, который барахлит. Равномерная синусоида читалась бы как
   «дыхание» и выглядела бы искусственно, поэтому шаг между провалами
   намеренно неровный. */
/* Мерцание светодиода. Раньше здесь вместе с прозрачностью менялась
   text-shadow — а изменение тени заставляет браузер перерисовывать пиксели на
   каждом кадре, и так у восьми плашек одновременно. Теперь тень статичная, а
   гаснет она сама: opacity применяется ко всей отрисовке элемента, свечение
   тускнеет вместе с текстом. На глаз то же самое, считает видеокарта. */
@keyframes led-glow {
  0%   { opacity: 1; }
  5%   { opacity: 0.88; }
  6%   { opacity: 0.34; }
  8%   { opacity: 1; }
  12%  { opacity: 0.52; }
  14%  { opacity: 1; }
  22%  { opacity: 0.84; }
  24%  { opacity: 1; }
  33%  { opacity: 0.4; }
  35%  { opacity: 1; }
  44%  { opacity: 0.9; }
  46%  { opacity: 0.46; }
  47%  { opacity: 0.95; }
  48%  { opacity: 0.38; }
  50%  { opacity: 1; }
  62%  { opacity: 0.86; }
  64%  { opacity: 1; }
  73%  { opacity: 0.44; }
  75%  { opacity: 1; }
  86%  { opacity: 0.8; }
  88%  { opacity: 1; }
  95%  { opacity: 0.5; }
  97%  { opacity: 1; }
  100% { opacity: 1; }
}

/* Точечный индикатор — тот же ритм, но светится ореолом, а не текстом. */
/* То же для точки: box-shadow больше не анимируется. */
@keyframes led-dot {
  0%   { opacity: 1; }
  6%   { opacity: 0.3; }
  8%   { opacity: 1; }
  12%  { opacity: 0.5; }
  14%  { opacity: 1; }
  33%  { opacity: 0.36; }
  35%  { opacity: 1; }
  46%  { opacity: 0.42; }
  48%  { opacity: 0.34; }
  50%  { opacity: 1; }
  73%  { opacity: 0.4; }
  75%  { opacity: 1; }
  95%  { opacity: 0.48; }
  97%  { opacity: 1; }
  100% { opacity: 1; }
}

/* ---------- шапка ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: linear-gradient(to bottom, rgba(5, 7, 12, 0.85), rgba(5, 7, 12, 0));
  backdrop-filter: blur(6px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.site-header.scrolled {
  background: rgba(6, 9, 15, 0.94);
  border-bottom-color: var(--border);
  /* Стекло гасим при прокрутке. Размытие в закреплённой шапке пересчитывается
     на каждом кадре и стоит около восьми кадров в секунду на обычном
     ноутбуке, а при фоне плотностью 94% под ним всё равно ничего не видно.
     Наверху страницы, в покое, эффект остаётся. */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  flex-shrink: 0;
}
.logo-mark { color: var(--accent); display: flex; }
.logo-text {
  font-family: var(--font-accent);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.04em;
}
.logo-text em { font-style: normal; color: var(--accent); }

.main-nav {
  display: flex;
  gap: 26px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  transition: color 0.2s ease;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.nav-link:hover { color: var(--text); }
.nav-index { color: var(--accent); font-size: 11px; }

/* ---------- выпадающий список услуг ---------- */

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-sub-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 4px;
  color: var(--text-faint);
  cursor: pointer;
  transition: color 0.2s ease;
}
.nav-sub-toggle svg { transition: transform 0.2s var(--ease-out); }
.nav-item:hover .nav-sub-toggle,
.nav-item.is-open .nav-sub-toggle { color: var(--accent); }
.nav-item.is-open .nav-sub-toggle svg { transform: rotate(180deg); }
.nav-sub-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.nav-sub {
  display: none;
  position: absolute;
  top: calc(100% + 14px);
  left: -14px;
  z-index: 60;
  width: 470px;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 10px;
  background: var(--panel-solid);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.6);
}
/* Невидимый мостик над панелью: между пунктом меню и списком есть зазор,
   и без него курсор по дороге вниз терял наведение, а список схлопывался. */
.nav-sub::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 14px;
}

/* Мышкой — по наведению. С клавиатуры и на сенсорном экране — кнопкой,
   она же переключает класс is-open. */
@media (hover: hover) and (min-width: 861px) {
  .nav-item:hover .nav-sub { display: grid; }
}
.nav-item.is-open .nav-sub { display: grid; }

.nav-sub-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.3;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.nav-sub-link:hover,
.nav-sub-link:focus-visible { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.nav-sub-ico { display: flex; color: var(--accent); opacity: 0.8; flex-shrink: 0; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.header-icon-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.header-phone {
  display: none;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  transition: color 0.2s ease;
}
.header-phone:hover { color: var(--accent); }

.dot-badge {
  box-shadow: 0 0 9px rgba(74, 222, 128, 0.95);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
  flex-shrink: 0;
  animation: led-dot 6.7s linear infinite -6.7s;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  padding: 13px 24px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04121a;
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(255, 181, 71, 0.25), 0 8px 24px -6px rgba(255, 181, 71, 0.35);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 10px 18px; font-size: 12px; }
.btn-block { width: 100%; padding: 15px; }

/* ---------- герой ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + 40px) 0 0;
  overflow: hidden;
  z-index: 1;
}

/* isolation обязателен: без него mix-blend-mode слоя свечения смешивается
   со всей страницей, а не с фотографией под ним, и кадр пропадает. */
.hero-photo { position: absolute; inset: 0; z-index: 0; isolation: isolate; }
.hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: saturate(1.05) contrast(1.04);
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(5,7,12,0.95) 0%, rgba(5,7,12,0.72) 24%, rgba(5,7,12,0.22) 50%, rgba(5,7,12,0.02) 68%, rgba(5,7,12,0.2) 100%),
    linear-gradient(to top, var(--bg) 0%, rgba(5,7,12,0.35) 14%, transparent 38%),
    linear-gradient(to bottom, rgba(5,7,12,0.55) 0%, transparent 16%);
}

.hero-planet {
  position: absolute;
  /* В пикселях, а не в процентах: проценты считаются от высоты первого
     экрана, а она меняется, когда подгружаются шрифты и заголовок
     перевёрстывается. Планета уезжала вслед за ней — и это давало сдвиг
     вёрстки до 0.06, который Google учитывает при ранжировании. */
  top: -300px;
  right: -216px;
  width: 900px;
  height: 900px;
  border-radius: 50%;
  /* Было ещё blur(2px) и mix-blend-mode: screen. Оба дорогие: размытие
     держит отдельную поверхность 900×900, наложение заставляет смешивать её
     с фоном на каждом кадре. Сравнение кадров показало разницу в 4 единицы
     яркости из 255 — градиент и без них такой же мягкий. */
  background: radial-gradient(circle at 35% 35%, rgba(255,181,71,0.14), rgba(255,181,71,0.02) 45%, transparent 70%);
  z-index: 0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 75%);
}

.hero-terrain {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 260px;
  z-index: 0;
  background: linear-gradient(to top, var(--bg) 0%, rgba(5,7,12,0.4) 60%, transparent 100%);
}
.hero-terrain::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 100% at 20% 100%, rgba(255,255,255,0.03), transparent 60%),
    radial-gradient(ellipse 40% 100% at 70% 100%, rgba(255,255,255,0.025), transparent 60%);
}

.hero-hud {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 118px 1fr 260px;
  gap: 28px;
  align-items: start;
}

.hud-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
}

.hud-side {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 6px;
  position: sticky;
  top: calc(var(--header-h) + 34px);
}
.hud-side--right {
  gap: 20px;
  padding: 0;
  background: none;
  border: none;
  backdrop-filter: none;
}

/* ---------- пульт направлений ---------- */
/* Замер: размытие фона стоило кадров и на панели контактов уже заменено на
   плотный фон — разница при сравнении кадров попиксельно оказалась в пределах
   шума. Здесь то же самое. */
.hud-rail {
  position: sticky;
  top: calc(var(--header-h) + 34px);
  padding: 0;
  overflow: hidden;
  background: rgba(16, 22, 34, 0.72);
  backdrop-filter: none;
}

.hud-rail-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 10px 8px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hud-rail-title { color: var(--text-dim); }
.hud-rail-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-line), transparent);
}
/* Живой индикатор: анимируется только прозрачность, слоёв не добавляет. */
.hud-rail-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: led-dot 3.4s linear infinite;
}

.hud-rail-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
}

/* Указатель ездит по строкам. Двигаем только transform — браузер обходится
   композитингом и не пересчитывает вёрстку. */
.hud-rail-cursor {
  position: absolute;
  left: 0;
  top: 6px;
  width: 3px;
  height: var(--rail-h, 34px);
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  opacity: 0;
  transform: translateY(var(--rail-y, 0px));
  transition: transform 0.18s var(--ease-out), opacity 0.18s ease;
}
.hud-rail:hover .hud-rail-cursor,
.hud-rail:focus-within .hud-rail-cursor { opacity: 1; }

/* Клавиша. Скос сверху — светлая волосяная линия по верхнему краю: она
   отделяет клавишу от корпуса и читается как выступающая, а не нарисованная.
   Одна тень вместо подсветки, поэтому лишних слоёв композитинга нет. */
.hud-rail-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  height: 34px;
  position: relative;
  border: 1px solid var(--border);
  /* Разные радиусы слева и справа: силуэт перестаёт быть стандартной
     скруглённой кнопкой интерфейса и читается как деталь прибора. */
  border-radius: 8px 3px 8px 3px;
  background: rgba(255, 255, 255, 0.028);
  /* Первая тень — скос по верхнему краю, вторая — торец снизу. Обе внутри
     одного свойства, лишних слоёв не появляется. */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 2px 0 rgba(0, 0, 0, 0.32);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease,
    transform 0.08s ease;
}
/* Значок сидит в утопленном окошке — как накладка на настоящей клавише. */
.hud-rail-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: color 0.16s ease, background 0.16s ease;
}
.hud-rail-ico svg { width: 13px; height: 13px; }
.hud-rail-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud-rail-item:hover,
.hud-rail-item:focus-visible {
  color: var(--text);
  background: rgba(255, 181, 71, 0.16);
  border-color: var(--accent);
}
.hud-rail-item:hover .hud-rail-ico,
.hud-rail-item:focus-visible .hud-rail-ico {
  color: var(--accent);
  background: rgba(0, 0, 0, 0.38);
}
/* Нажатие: клавиша уходит вниз на пиксель и теряет скос. Мелочь, но именно
   она отличает кнопку от картинки кнопки. */
/* Нажатие: клавиша садится на торец. Уходит и скос, и тень снизу — ход
   получается физическим, а не сменой цвета. */
.hud-rail-item:active {
  transform: translateY(2px);
  box-shadow: none;
  background: rgba(255, 181, 71, 0.16);
}

/* Включение: клавиши загораются одна за другой вслед за указателем. Идёт
   один раз при загрузке — постоянная анимация в первом экране стоила бы
   кадров там, где они дороже всего. */
.hud-rail-item::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--accent);
  opacity: 0;
  pointer-events: none;
}
.hud-rail--intro .hud-rail-item { animation: key-wake 0.5s var(--ease-out) both; }
.hud-rail--intro .hud-rail-item::after { animation: key-flash 0.5s var(--ease-out) both; }
.hud-rail--intro .hud-rail-item:nth-of-type(1), .hud-rail--intro .hud-rail-item:nth-of-type(1)::after { animation-delay: 0.40s; }
.hud-rail--intro .hud-rail-item:nth-of-type(2), .hud-rail--intro .hud-rail-item:nth-of-type(2)::after { animation-delay: 0.57s; }
.hud-rail--intro .hud-rail-item:nth-of-type(3), .hud-rail--intro .hud-rail-item:nth-of-type(3)::after { animation-delay: 0.74s; }
.hud-rail--intro .hud-rail-item:nth-of-type(4), .hud-rail--intro .hud-rail-item:nth-of-type(4)::after { animation-delay: 0.91s; }
.hud-rail--intro .hud-rail-item:nth-of-type(5), .hud-rail--intro .hud-rail-item:nth-of-type(5)::after { animation-delay: 1.08s; }
.hud-rail--intro .hud-rail-item:nth-of-type(6), .hud-rail--intro .hud-rail-item:nth-of-type(6)::after { animation-delay: 1.25s; }
.hud-rail--intro .hud-rail-item:nth-of-type(7), .hud-rail--intro .hud-rail-item:nth-of-type(7)::after { animation-delay: 1.42s; }
.hud-rail--intro .hud-rail-item:nth-of-type(8), .hud-rail--intro .hud-rail-item:nth-of-type(8)::after { animation-delay: 1.59s; }
@keyframes key-wake {
  0%   { opacity: 0.3; }
  100% { opacity: 1; }
}
@keyframes key-flash {
  0%   { opacity: 0; }
  30%  { opacity: 0.3; }
  100% { opacity: 0; }
}

/* Прогон при загрузке: указатель один раз проходит сверху вниз. Это то самое
   «включение прибора» — дальше пульт стоит неподвижно и кадров не ест. */
.hud-rail--intro .hud-rail-cursor {
  animation: rail-scan 1.5s var(--ease-out) 0.4s 1;
}
@keyframes rail-scan {
  0%   { opacity: 0; transform: translateY(0); }
  12%  { opacity: 1; }
  80%  { opacity: 1; transform: translateY(var(--rail-span, 238px)); }
  100% { opacity: 0; transform: translateY(var(--rail-span, 238px)); }
}

.hud-center { min-width: 0; padding-top: 8px; }

.mission-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 24px;
}
.mission-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* H1 состоит из двух частей: строка с ключевым запросом для поиска и
   крупный слоган для человека. Обе внутри одного заголовка. */
.hero-title { margin-bottom: 20px; }
.hero-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(13px, 1.5vw, 16px);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 12px;
}
.hero-headline {
  display: block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.hero-subtitle {
  color: var(--text-dim);
  font-size: 17px;
  max-width: 520px;
  margin-bottom: 32px;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

/* панель показателей */

.info-card {
  padding: 20px 22px 18px;
  max-width: 540px;
}
.info-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.info-card-title {
  font-family: var(--font-accent);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.04em;
}
.info-card-sub { color: var(--text-dim); font-size: 13px; margin-top: 4px; }
.info-card-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--success);
  border: 1px solid rgba(74, 222, 128, 0.3);
  background: rgba(74, 222, 128, 0.08);
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  animation: led-glow 5.8s linear infinite -2.1s;
}

.hero-stats { display: flex; flex-direction: column; gap: 12px; }
.stat-row {
  display: grid;
  grid-template-columns: 1fr 90px 38px;
  align-items: center;
  gap: 12px;
}
.stat-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.35;
}
.stat-ico {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.stat-ico--ctr { background: #ffd27a; }
.stat-ico--reach { background: var(--success); }
.stat-ico--conv { background: var(--accent-2); }

.stat-bar {
  display: block;
  height: 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.stat-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 1.4s var(--ease-out);
}
.stat-pct {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  text-align: right;
}

.exterior-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}
.status-dot {
  box-shadow: 0 0 9px rgba(74, 222, 128, 0.95);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: led-dot 4.9s linear infinite -4.3s;
}

/* правая колонка героя */

.minimap {
  padding: 18px 18px 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
}
.minimap-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.minimap-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text);
}
/* Цвет ярче соседних подписей осознанно: строка лежит на полупрозрачной
   панели поверх светлой части фотографии, и при --text-faint замер давал
   4.36 при норме 4.5. Единственное место в первом экране, где общий токен
   не дотягивал. */
.minimap-sub { font-size: 11.5px; color: var(--text-dim); margin-top: 3px; }
.expand-ico { color: var(--text-faint); flex-shrink: 0; }
.minimap-route { width: 100%; height: 70px; margin-bottom: 14px; }
.minimap-btn {
  display: block;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 9px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.minimap-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Размытие фона убрано: на панели контактов замена плотным фоном дала
   попиксельно ту же картинку, а кадры вернула. Здесь то же самое. */
.orbit-dial {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 8px auto 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Плотный диск с обводкой, а не мягкое затемнение: шкала попадает на
     светлую часть фотографии, и на градиенте подписи терялись. Заодно это
     честнее выглядит как прибор. */
  background: rgba(10, 14, 22, 0.78);
  border: 1px solid var(--border);
  border-radius: 50%;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.orbit-dial:hover, .orbit-dial:focus-visible { border-color: var(--accent-line); }
.dial-ring {
  position: absolute;
  inset: 0;
  color: var(--accent);
  animation: spin 40s linear infinite;
  transition: opacity 0.2s ease;
}
@keyframes spin { to { transform: rotate(360deg); } }
.dial-num {
  font-family: var(--font-accent);
  font-size: 30px;
  line-height: 1;
  color: var(--text);
  transition: color 0.2s ease;
}
.dial-unit {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}
/* Подпись лежит уже вне диска, прямо на фотографии, поэтому у неё своя
   табличка — как шильдик под прибором. */
.dial-cta {
  position: absolute;
  bottom: -16px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: rgba(10, 14, 22, 0.82);
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  transition: color 0.2s ease;
}
.dial-cta svg { transition: transform 0.2s var(--ease-out); }
.orbit-dial:hover .dial-num,
.orbit-dial:focus-visible .dial-num { color: var(--accent); }
.orbit-dial:hover .dial-cta,
.orbit-dial:focus-visible .dial-cta { color: var(--accent); border-color: var(--accent-line); }
.orbit-dial:hover .dial-cta svg,
.orbit-dial:focus-visible .dial-cta svg { transform: translateX(3px); }
/* Кольцо на наведении раскручивается вчетверо быстрее — прибор «оживает»
   под курсором, а не просто меняет цвет. */
.orbit-dial:hover .dial-ring { animation-duration: 10s; }

/* нижняя лента героя */

.hero-bottom-bar {
  position: relative;
  z-index: 2;
  margin-top: 48px;
  border-top: 1px solid var(--border);
  background: rgba(8, 11, 18, 0.6);
  backdrop-filter: blur(10px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 16px 32px;
}
.bar-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 24px;
  border-right: 1px solid var(--border);
}
.bar-item:last-child { border-right: none; }
.bar-k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.bar-v { font-family: var(--font-mono); font-size: 13px; color: var(--text); }

/* ---------- общие стили секций ---------- */

/* Отступ секции с одной стороны. Между двумя соседними секциями его два,
   так что на границе получается вдвое больше — при 100px выходило 200px
   пустоты между каждой парой блоков, и страница читалась разреженной. */
section:not(.hero) {
  position: relative;
  z-index: 1;
  padding: 68px 0;
  scroll-margin-top: var(--header-h);
}

.section-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 14px;
}
.section-head { max-width: 660px; margin-bottom: 38px; }
.section-head h2, .why-text h2, .contact-info h2 {
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
  line-height: 1.15;
  /* Ровняет длину строк, чтобы последнее слово не повисало в одиночестве. */
  text-wrap: balance;
}
.section-head p, .hero-subtitle, .page-hero-subtitle { text-wrap: pretty; }
.section-head p { color: var(--text-dim); font-size: 16px; }

/* ---------- услуги ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.service-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: inherit;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.service-card:hover { border-color: var(--border-strong); transform: translateY(-4px); }
.service-card:hover .service-more { color: var(--accent); gap: 10px; }

.service-card-photo {
  position: relative;
  height: 168px;
  flex-shrink: 0;
}
.service-card-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) brightness(0.68);
}
.service-card-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--panel-solid) 0%, rgba(13,20,32,0.15) 65%, rgba(13,20,32,0.05) 100%);
}
.service-card-body {
  padding: 22px 26px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.service-ico {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.service-card-photo .service-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  /* Было размытие. Восемь плашек размывали фото под собой, стоило это
     около десяти кадров в секунду, а видно не было ничего: подняли плотность
     фона с 60 до 74% — результат тот же, цена нулевая. */
  background: rgba(8, 12, 20, 0.74);
  border: 1px solid rgba(74, 222, 128, 0.3);
  padding: 4px 10px;
  border-radius: 20px;
}
.service-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--success);
  animation: led-glow 5s linear infinite;
}

/* Каждая надпись живёт в своей фазе и со своим периодом — синхронное
   мерцание восьми карточек сразу выдавало бы анимацию. Отрицательная
   задержка стартует цикл с середины, поэтому при загрузке они уже вразнобой. */
.services-grid .service-card:nth-child(1) .service-tag { animation-duration: 4.1s;  animation-delay: -0.7s; }
.services-grid .service-card:nth-child(2) .service-tag { animation-duration: 5.3s;  animation-delay: -3.2s; }
.services-grid .service-card:nth-child(3) .service-tag { animation-duration: 4.7s;  animation-delay: -5.6s; }
.services-grid .service-card:nth-child(4) .service-tag { animation-duration: 6.1s; animation-delay: -1.9s; }
.services-grid .service-card:nth-child(5) .service-tag { animation-duration: 3.9s;  animation-delay: -6.4s; }
.services-grid .service-card:nth-child(6) .service-tag { animation-duration: 5.6s;  animation-delay: -2.5s; }
.services-grid .service-card:nth-child(7) .service-tag { animation-duration: 4.4s;  animation-delay: -4.8s; }
.services-grid .service-card:nth-child(8) .service-tag { animation-duration: 6.4s; animation-delay: -0.3s; }
.service-card h3 { font-size: 20px; font-weight: 600; margin-bottom: 10px; }
.service-card > .service-card-body > p {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 18px;
}
.service-list { display: flex; flex-direction: column; gap: 9px; }
.service-list li {
  font-size: 13px;
  color: var(--text-dim);
  padding-left: 16px;
  position: relative;
}
.service-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 5px;
  height: 5px;
  background: var(--accent-2);
  border-radius: 50%;
}
.service-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  transition: color 0.2s ease, gap 0.2s ease;
}

/* ---------- клиенты ---------- */

.client-wall {
  display: grid;
  /* 168px даёт шесть карточек в один ряд на десктопе: при 190px шестая
     срывалась на вторую строку и висела там в одиночестве. */
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 14px;
}
.client-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  min-height: 150px;
  padding: 24px 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-faint);
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.client-item:hover {
  color: var(--text);
  border-color: var(--border-strong);
  transform: translateY(-3px);
}
.client-mark-wrap { display: flex; color: inherit; }
.client-name {
  font-family: var(--font-accent);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: inherit;
  line-height: 1.35;
}
.client-sector {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ---------- процесс ---------- */

.process-banner {
  position: relative;
  height: 280px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 40px;
}
.process-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) brightness(0.6);
}
.process-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5,7,12,0.92) 0%, rgba(5,7,12,0.35) 55%, rgba(5,7,12,0.15) 100%);
}
.process-banner-caption {
  position: absolute;
  left: 28px;
  bottom: 24px;
  right: 28px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.process-banner-k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.process-banner-v { font-size: 19px; color: var(--text); max-width: 460px; }

.route-track { position: relative; padding-top: 10px; }
.route-line { width: 100%; height: 60px; display: block; }
.route-line-fill {
  stroke-dashoffset: 920;
  transition: stroke-dashoffset 1.6s var(--ease-out);
}
.route-line-fill.in-view { stroke-dashoffset: 0; }

.route-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: -14px;
}
.route-step {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 18px;
}
.route-node {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  margin-bottom: 14px;
}
.route-node--end { border-color: var(--accent-2); color: var(--accent-2); }
.route-step h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.route-step p { font-size: 13px; color: var(--text-dim); }

/* ---------- герой подстраниц ---------- */

.page-hero {
  position: relative;
  min-height: 56vh;
  padding: calc(var(--header-h) + 70px) 0 64px;
  overflow: hidden;
  z-index: 1;
}
.page-hero-photo { position: absolute; inset: 0; z-index: 0; }
.page-hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  filter: saturate(1.05) contrast(1.04);
}
.page-hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(5,7,12,0.97) 0%, rgba(5,7,12,0.88) 34%, rgba(5,7,12,0.55) 62%, rgba(5,7,12,0.2) 82%, rgba(5,7,12,0.35) 100%),
    linear-gradient(to top, var(--bg) 0%, rgba(5,7,12,0.3) 14%, transparent 40%),
    linear-gradient(to bottom, rgba(5,7,12,0.7) 0%, transparent 20%);
}
/* Контейнер остаётся во всю ширину — иначе `margin: 0 auto` из .section-inner
   уводил текст в центр, на светлую часть фотографии. Ограничиваем содержимое. */
.page-hero-content { position: relative; z-index: 2; }
.page-hero-content > * { max-width: 660px; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .current { color: var(--accent); }

.page-hero-title {
  font-weight: 700;
  /* Нижняя граница была 30px, и «конфиденциальности» одним куском не влезало
     в 320 точек — страница ехала вбок на 22 точки. Слово длинное и переносить
     его нечем, поэтому на узких экранах уменьшаем кегль и разрешаем перенос
     по слогам. */
  font-size: clamp(26px, 4.4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
  hyphens: auto;
  overflow-wrap: break-word;
}
.page-hero-subtitle {
  color: var(--text-dim);
  font-size: 16.5px;
  max-width: 560px;
  margin-bottom: 30px;
}
.page-hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- вводный текст на странице услуги ---------- */

.service-intro { padding-bottom: 0; }
.intro-body { max-width: 780px; }
.intro-body h2 {
  font-size: clamp(24px, 2.8vw, 32px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 20px;
  text-wrap: balance;
}
.intro-body p {
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.7;
  text-wrap: pretty;
}
.intro-body p + p { margin-top: 16px; }

/* ---------- сетка преимуществ ---------- */

.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}
.feature-ico {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 9px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-item p { font-size: 14px; color: var(--text); line-height: 1.45; padding-top: 6px; }

/* ---------- работы ---------- */

/* Каждая работа — снимок страницы целиком, в несколько раз выше окошка,
   в котором лежит. При наведении снимок уезжает вверх ровно на свою
   «лишнюю» высоту: translateY(-100%) отсчитывается от высоты самой
   картинки, поэтому + высота окошка возвращает низ страницы на место.
   Время прокрутки приходит из сборщика в --shot-time. */

.works-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 28px 18px;
  align-items: start;
}

/* Отдельная страница портфолио */

/* Шапка без фотографии: страницу отправляют клиенту ссылкой, и первый экран
   не должен ждать ни одного килобайта картинки. Фон рисуют звёзды и градиент. */
.page-hero--bare {
  min-height: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.page-hero--bare .page-hero-content { padding-bottom: 40px; }

/* На странице контактов форма — то, за чем пришли: держать её ниже линии
   сгиба незачем, поэтому воздух между шапкой и панелью урезан. */
.page-hero--tight .page-hero-content { padding-bottom: 14px; }
.contacts-main { padding-top: 30px; }

.works-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 32px;
  margin-top: 26px;
  font-size: 13px;
  color: var(--text-dim);
}
.works-stats li { display: flex; align-items: baseline; gap: 8px; }
.works-stats-n {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--accent);
}

/* На отдельной странице карточки крупнее: три в ряд вместо пяти, и кадр
   выше — сюда приходят рассматривать работы, а не скользить взглядом. */
.works--page .works-grid { grid-template-columns: repeat(3, 1fr); gap: 38px 24px; }
.works--page .work { --shot-h: 420px; }

.works-pager {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 42px;
}
.works-page {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.works-page:hover:not(:disabled) { color: var(--text); border-color: var(--border-strong); }
.works-page:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.works-page[aria-current="page"] {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.works-page:disabled { opacity: 0.35; cursor: default; }
.works-pager-info {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}

/* Ссылка на полное портфолио под витриной на странице услуги */
.works-more { margin-top: 38px; }
.works-more .btn { gap: 10px; }
.works-more-n {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 7px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  color: var(--text-faint);
}

@media (max-width: 1080px) {
  .works--page .works-grid { grid-template-columns: 1fr 1fr; gap: 34px 22px; }
  .works--page .work { --shot-h: 440px; }
}
@media (max-width: 560px) {
  .works--page .works-grid { grid-template-columns: 1fr; gap: 36px; }
  .works--page .work { --shot-h: 400px; }
  .works-pager { flex-wrap: wrap; }
  .works-pager-info { margin-left: 0; width: 100%; }
  .works-more .btn { width: 100%; justify-content: center; }
}

/* Фильтр по направлению */

.works-filter {
  display: flex;
  gap: 8px;
  margin: -14px 0 34px;
  flex-wrap: wrap;
}
.works-filter-btn {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 8px 14px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.works-filter-btn:hover { color: var(--text); border-color: var(--border-strong); }
.works-filter-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.works-filter-btn[aria-pressed="true"] {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.works-filter-n { font-size: 10px; color: var(--text-faint); }
.works-filter-btn[aria-pressed="true"] .works-filter-n { color: var(--accent); opacity: 0.7; }

/* Ряд одинаковых карточек читается как каталог товаров. Сдвиг через одну
   ломает эту линию — получается стопка распечаток, разложенных на столе.
   Пока скрипт не подключился, ступеньку расставляет CSS. Дальше её берёт на
   себя фильтр: nth-child считает и скрытые карточки, поэтому после отбора
   зигзаг развалился бы. */
.works-grid .work:nth-child(even) { margin-top: 42px; }
.works-grid.js .work { margin-top: 0; }
.works-grid.js .work.is-low { margin-top: 42px; }
.work[hidden] { display: none; }

/* Появление после смены фильтра. Анимация перезапускается сама: карточка
   выходит из display:none, и браузер проигрывает её заново. */
@keyframes workIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.works-grid.js .work:not([hidden]) { animation: workIn 0.35s var(--ease-out) both; }

.work { --shot-h: 340px; }

.work-screen {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-solid);
  overflow: hidden;
  transition: border-color 0.25s ease;
}
.work-screen:hover,
.work-screen:focus-within { border-color: var(--border-strong); }

.work-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}
/* Зелёный, а не акцентный оранжевый: это индикатор «сайт работает»,
   а не элемент оформления. Тем же цветом на сайте помечен статус ONLINE. */
.work-led {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.12), 0 0 7px rgba(74, 222, 128, 0.5);
}
.work-domain {
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.work-hint { margin-left: auto; opacity: 0.75; transition: opacity 0.25s ease; }
.work-screen:hover .work-hint,
.work-screen:focus-within .work-hint { opacity: 0; }

.work-glass {
  position: relative;
  height: var(--shot-h);
  overflow: hidden;
}
.work-glass:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Затемнение по нижнему краю: показывает, что страница на этом не кончается.
   На время прокрутки убираем — иначе низ сайта уходит в тень. Тень висит на
   рамке, а не на окошке: внутри прокручиваемого окошка она уехала бы вместе
   с картинкой на телефоне. */
.work-screen::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  height: 76px;
  background: linear-gradient(rgba(5, 7, 12, 0), rgba(5, 7, 12, 0.8));
  opacity: 1;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.work-screen:hover::before,
.work-screen:focus-within::before { opacity: 0; }

.work-shot {
  width: 100%;
  height: auto;
  transform: translateY(0);
  transition: transform var(--shot-time, 8s) linear;
}
.work-screen:hover .work-shot,
.work-screen:focus-within .work-shot {
  transform: translateY(calc(-100% + var(--shot-h)));
}

/* Полоска справа заполняется синхронно с прокруткой — видно, сколько
   страницы уже проехало и сколько осталось. */
.work-screen::after {
  content: "";
  position: absolute;
  right: 0;
  top: 35px;
  bottom: 0;
  z-index: 2;
  width: 2px;
  background: linear-gradient(var(--accent), var(--accent-2));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--shot-time, 8s) linear;
  pointer-events: none;
}
.work-screen:hover::after,
.work-screen:focus-within::after { transform: scaleY(1); }

.work-kind {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.work-name {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.work-note {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-dim);
  text-wrap: pretty;
}
.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.work-tags li {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}
.work-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 2px;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.work-link:hover, .work-link:focus-visible { color: var(--accent); border-color: var(--accent); }

/* Ряд из пяти держится только на широком экране: у́же карточки становятся
   такими тесными, что подпись рассыпается на семь строк. Ступенька до трёх
   стоит здесь, а не в общем блоке адаптива, — иначе она перебила бы правила
   для планшета и телефона, которые идут ниже по файлу. */
@media (max-width: 1240px) {
  .works-grid { grid-template-columns: repeat(3, 1fr); gap: 34px 22px; }
  .work { --shot-h: 400px; }
}

/* ---------- тариф ---------- */

.pricing-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 40px;
}

.price-card {
  position: relative;
  padding: 32px 30px 30px;
  background: rgba(16, 22, 34, 0.82);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  overflow: hidden;
}
.price-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 60% at 50% 0%, rgba(255, 181, 71, 0.12), transparent 70%);
  pointer-events: none;
}
.price-amount {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
  position: relative;
}
.price-value {
  font-family: var(--font-accent);
  /* Michroma широкий: «1 250 000» рвалось на две строки. Держим в одну. */
  font-size: clamp(26px, 3.2vw, 38px);
  white-space: nowrap;
  line-height: 1.05;
  color: var(--accent);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
/* Когда в слоте цены не число, а слово: Michroma — латиница без кириллицы,
   и «По запросу» свалилось бы в запасной гротеск посреди фирменного блока.
   Берём моноширинный — у него кириллица есть, и он держит технический тон. */
.price-value--text {
  font-family: var(--font-mono);
  font-size: clamp(21px, 2.4vw, 28px);
  letter-spacing: 0.01em;
}
.price-unit {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.price-note {
  position: relative;
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.55;
  margin-bottom: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.price-card .btn { position: relative; }

.price-includes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px 24px;
  align-content: start;
  padding-top: 6px;
}
.price-includes li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.5;
}
.price-includes svg { color: var(--accent); flex-shrink: 0; margin-top: 3px; }

.compare-wrap { overflow-x: auto; border-radius: var(--radius); margin-bottom: 24px; }
.compare-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.compare-table th, .compare-table td {
  text-align: left;
  padding: 15px 20px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.compare-table thead th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: rgba(255, 255, 255, 0.02);
}
.compare-table tbody th { color: var(--text-dim); font-weight: 400; }
.compare-table td { color: var(--text-dim); }
.compare-table tr:last-child th, .compare-table tr:last-child td { border-bottom: none; }
.compare-table .col-accent { color: var(--accent); font-weight: 600; }
.compare-table thead .col-accent { color: var(--accent); }
.compare-table tbody td.col-accent { background: rgba(255, 181, 71, 0.05); }

.price-footnote {
  font-size: 13.5px;
  color: var(--text-faint);
  max-width: 720px;
  line-height: 1.6;
}

@media (max-width: 860px) {
  .pricing-grid { grid-template-columns: 1fr; gap: 22px; }
  .price-includes { grid-template-columns: 1fr; }
}

/* ---------- CPA ---------- */

.cpa-explainer {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 34px;
  margin-bottom: 32px;
}
.cpa-explainer p { color: var(--text-dim); font-size: 15px; max-width: 760px; }
.cpa-explainer p + p { margin-top: 12px; }

.cpa-table-wrap { overflow-x: auto; margin-bottom: 56px; border-radius: var(--radius); }
.cpa-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.cpa-table th, .cpa-table td {
  text-align: left;
  padding: 16px 20px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border);
}
.cpa-table thead th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.02);
}
.cpa-table tbody th { color: var(--text); font-weight: 600; }
.cpa-table td { color: var(--text-dim); }
.cpa-table tr:last-child td, .cpa-table tr:last-child th { border-bottom: none; }
.cpa-table td.highlight { color: var(--accent); font-weight: 600; }
.cpa-table tr.row-highlight td, .cpa-table tr.row-highlight th { background: rgba(255, 181, 71, 0.04); }

.suited-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}
.suited-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}
.suited-item .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  flex-shrink: 0;
}

/* ---------- другие услуги ---------- */

/* Селектор с тегом не случаен: общее правило section:not(.hero) специфичнее
   одного класса и раньше перебивало этот отступ — блок «Другие услуги»
   задумывался теснее остальных, но выходил такой же высоты. */
section.related-services { border-top: 1px solid var(--border); padding: 44px 0; }
.related-services-head { margin-bottom: 24px; }
.related-services-head h2 {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
/* Портфолио стоит в списке услуг, но услугой не является — отделяем чертой. */
.footer-nav-extra {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: var(--accent);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}
.related-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.related-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.related-ico { color: var(--accent); display: flex; flex-shrink: 0; }
.related-name { font-size: 15px; font-weight: 600; flex: 1; }
.related-card > svg { color: var(--accent); flex-shrink: 0; }

/* ---------- почему мы ---------- */

.why-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.85fr 1fr;
  gap: 36px;
  align-items: center;
}
.why-photo {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 340px;
  height: 100%;
}
.why-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) brightness(0.72);
}
.why-list { margin-top: 30px; display: flex; flex-direction: column; gap: 16px; }
.why-list li {
  display: flex;
  gap: 14px;
  font-size: 15px;
  color: var(--text-dim);
  align-items: flex-start;
}
.why-list li span {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 12px;
  padding-top: 3px;
  flex-shrink: 0;
}
.why-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.why-stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
}
.why-stat-num {
  display: block;
  font-family: var(--font-accent);
  font-size: 32px;
  color: var(--accent);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.why-stat-label { display: block; font-size: 12.5px; color: var(--text-dim); }

/* ---------- FAQ ---------- */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 860px;
}
.faq-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.faq-item[open] { border-color: var(--border-strong); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-q { font-size: 16px; font-weight: 600; color: var(--text); }
.faq-marker {
  position: relative;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.faq-marker::before, .faq-marker::after {
  content: "";
  position: absolute;
  background: var(--accent);
  border-radius: 2px;
  transition: transform 0.25s var(--ease-out);
}
.faq-marker::before { top: 7px; left: 0; width: 16px; height: 2px; }
.faq-marker::after { left: 7px; top: 0; width: 2px; height: 16px; }
.faq-item[open] .faq-marker::after { transform: rotate(90deg); opacity: 0; }
.faq-a { padding: 0 24px 22px; }
.faq-a p { color: var(--text-dim); font-size: 14.5px; max-width: 70ch; }

/* ---------- контакты ---------- */

.cta-contact { position: relative; overflow: hidden; }
.contact-bg { position: absolute; inset: 0; z-index: 0; }
.contact-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
  filter: saturate(1.1) brightness(0.65);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 80%);
}
.cta-contact .section-inner { position: relative; z-index: 1; }

.contact-panel {
  /* Было размытие на 14px. Панель лежит на сильно затемнённой фотографии,
     разница при сравнении кадров попиксельно оказалась в пределах шума —
     подняли плотность фона вместо размытия. */
  background: rgba(16, 22, 34, 0.82);
  border: 1px solid var(--border);
  border-radius: 20px;
  display: grid;
  /* Форма-опросник заметно длиннее прежней в три поля, поэтому колонка с
     контактами сузилась до фиксированной ширины, а форма забрала остальное. */
  grid-template-columns: 330px 1fr;
  overflow: hidden;
}
.contact-info { padding: 52px 44px; border-right: 1px solid var(--border); }
.contact-info h2 { font-size: 30px; margin: 10px 0 14px; }
.contact-info > p { color: var(--text-dim); margin-bottom: 26px; max-width: 400px; }
.contact-detail {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 0;
  border-top: 1px solid var(--border);
}
.contact-detail:last-of-type { border-bottom: 1px solid var(--border); }
.contact-detail-k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.contact-detail-v { font-size: 15px; transition: color 0.2s ease; }
a.contact-detail-v:hover { color: var(--accent); }
.contact-tg { margin-top: 24px; }

/* Блок-призыв на страницах без формы. Правая колонка повторяет ритм формы —
   подпись моноширинным, короткий текст, шаги, кнопка во всю ширину, — чтобы
   переход на страницу контактов не выглядел сменой декораций. */
.contact-panel--cta { grid-template-columns: 1fr 1fr; }
.cta-action {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 52px 44px;
}
.cta-action-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.cta-action-text { color: var(--text-dim); margin-bottom: 24px; }
.cta-steps {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cta-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.cta-steps li:last-child { border-bottom: none; padding-bottom: 0; }
.cta-steps-n {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.08em;
}
.cta-action-tg { margin-top: 12px; }

/* Страница контактов: заголовки внутри панели. */
.contact-info-h { font-size: 24px; margin: 0 0 12px; }
.contact-form-h {
  font-size: 24px;
  margin: 0 0 4px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

/* Порядок работы после формы. */
.next-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  counter-reset: none;
}
.next-item {
  padding: 24px 22px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.022);
}
.next-n {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 14px;
}
.next-t { font-size: 17px; margin: 0 0 8px; }
.next-d { color: var(--text-dim); font-size: 15px; margin: 0; }

.footer-contacts-link { color: var(--text-dim); }

.contact-form { padding: 52px 44px; display: flex; flex-direction: column; gap: 18px; }
.label-optional { text-transform: none; letter-spacing: 0; }

/* Поле-приманка для спам-ботов. Убираем из виду и из потока табуляции,
   но не через display:none — часть ботов такие поля пропускает. */
.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.field-error { font-size: 12px; color: var(--danger); }
.form-note { font-size: 12px; color: var(--text-faint); text-align: center; }
.form-note a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 2px; }
.form-note a:hover { color: var(--accent); }
.form-note.success { color: var(--success); }
.form-note.error { color: var(--danger); }

/* ---------- опросник в блоке контактов ---------- */

.lead-form { gap: 26px; }

.lead-step { border: 0; padding: 0; margin: 0; min-width: 0; }
.lead-step + .lead-step, .lead-branches { padding-top: 22px; border-top: 1px solid var(--border); }
.lead-branches { display: flex; flex-direction: column; gap: 14px; }

/* Заголовок блока — строка приборной панели: метка слева, имя модуля, дальше
   волосяная линия до края. Нумерацию убрали: если направление не выбрано,
   средний блок скрыт, и счёт прыгал с первого сразу на третий. Имя блока
   не врёт независимо от того, что показано. */
.lead-block-title {
  display: flex;
  align-items: center;
  gap: 10px;
  float: none;
  width: 100%;
  padding: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.lead-block-title::before {
  content: "";
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.lead-block-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-line), transparent);
}
.lead-block-title .req { color: var(--accent); opacity: 0.7; }

/* Раскрытая ветка — отдельный модуль в рамке. Когда выбрано два-три
   направления, без рамок это читается как одна свалка из тридцати полей:
   непонятно, где кончаются вопросы про рекламу и начинаются про сайт. */
.lead-branch {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.022);
  min-width: 0;
}
/* Заголовок сидит на верхней границе рамки, как подпись на приборной панели. */
.lead-branch .lead-block-title {
  margin: -30px 0 0 -6px;
  padding: 0 8px 16px;
  background: linear-gradient(to bottom, var(--panel-solid) 62%, transparent);
  width: auto;
  max-width: calc(100% + 12px);
}
.lead-branch .lead-block-title::after { min-width: 24px; }

.lead-hint { font-size: 12px; color: var(--text-faint); margin-bottom: 12px; }

/* Выбор направлений */
.lead-picks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.lead-pick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.lead-pick:hover { border-color: var(--border-strong); color: var(--text); }
.lead-pick input { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.lead-pick:has(input:checked) {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}
.lead-pick:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Ветки вопросов */




.lead-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.lead-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.lead-field--wide { grid-column: 1 / -1; }
.lead-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--text-dim);
}
.lead-field .req { color: var(--accent); }

.lead-field input[type="text"], .lead-field textarea {
  width: 100%;
  padding: 11px 13px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.lead-field textarea { resize: vertical; min-height: 62px; }
.lead-field input::placeholder, .lead-field textarea::placeholder { color: var(--text-faint); }
.lead-field input:focus, .lead-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
}
.lead-field input[aria-invalid="true"], .lead-field textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

/* Варианты ответа: те же плашки, что и у выбора направлений, но мельче */
.lead-opts { display: flex; flex-wrap: wrap; gap: 7px; }
.lead-opt {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 12.5px;
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.lead-opt:hover { border-color: var(--border-strong); color: var(--text); }
.lead-opt input { accent-color: var(--accent); width: 14px; height: 14px; cursor: pointer; }
.lead-opt:has(input:checked) {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}
.lead-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Поле под вариантом «Другое»: появляется только когда вариант отмечен.
   Рамка акцентом — чтобы было видно, что это продолжение выбора, а не
   отдельный забытый вопрос. */
.lead-other { margin-top: 9px; }
.lead-other input {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--accent-line);
  border-radius: 7px;
  background: var(--bg-alt);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
}
.lead-other input::placeholder { color: var(--text-faint); }
.lead-other input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

/* Пояснение под вопросом: зачем мы его задаём. */
.lead-note {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text-faint);
  letter-spacing: 0;
  text-transform: none;
}

/* Подсказка, которая появляется под выбранным вариантом. Не поле ввода —
   инструкция к действию, поэтому фон, а не рамка ввода. */
.lead-reveal {
  margin-top: 9px;
  padding: 13px 15px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-dim);
}
.lead-reveal b { color: var(--text); font-weight: 600; }
.lead-reveal code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  overflow-wrap: anywhere;
}
.lead-reveal a { color: var(--accent); }
.lead-reveal ol { margin: 8px 0 0; padding-left: 18px; }
.lead-reveal li { margin-bottom: 4px; }
.lead-reveal li:last-child { margin-bottom: 0; }

.lead-submit { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }

@media (max-width: 1080px) {
  .next-list { grid-template-columns: 1fr 1fr; }
  .lead-fields { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  /* Палец промахивается по зоне ниже 44px. */
  .lead-pick, .lead-opt { padding: 12px 14px; }
}


/* ---------- страница 404 ---------- */

.error-page { padding-top: calc(var(--header-h) + 70px); }
.error-inner { max-width: 760px; }
.error-code {
  font-family: var(--font-accent);
  /* Michroma существует только в одном начертании. Это h1, и без явного 400
     браузер просил бы 700 и «раздувал» буквы сам. */
  font-weight: 400;
  font-size: clamp(72px, 14vw, 148px);
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  text-shadow: 0 0 60px rgba(255, 181, 71, 0.28);
}
.error-title {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  margin-bottom: 12px;
}
.error-text { color: var(--text-dim); font-size: 16px; max-width: 520px; margin-bottom: 30px; }
.error-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 56px; }
.error-links-title {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 16px;
}
.error-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

@media (max-width: 560px) {
  .error-ctas { flex-direction: column; align-items: stretch; }
  .error-ctas .btn { width: 100%; }
}

/* ---------- юридическая страница ---------- */

.legal-page { padding-top: calc(var(--header-h) + 60px); }
.legal-inner { max-width: 820px; }
.legal-updated {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 36px;
}
.legal-body h2 {
  font-size: 19px;
  font-weight: 600;
  margin: 34px 0 12px;
  color: var(--text);
}
.legal-body p, .legal-body li { color: var(--text-dim); font-size: 15px; }
.legal-body p + p { margin-top: 12px; }
.legal-body ul { margin: 12px 0 0 20px; list-style: disc; }
.legal-body li { margin-bottom: 6px; }
.legal-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.legal-note {
  margin-top: 36px;
  padding: 20px 24px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  border-radius: 12px;
}
.legal-note p { color: var(--text); font-size: 14px; }
.legal-back { margin-top: 40px; }

/* ---------- подвал ---------- */

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 48px 0 28px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  align-items: start;
  padding-bottom: 32px;
}
.footer-tagline {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-dim);
  max-width: 280px;
}
.footer-nav-title {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.footer-nav, .footer-contacts { display: flex; flex-direction: column; gap: 9px; font-size: 14px; }
.footer-nav a, .footer-contacts a { color: var(--text-dim); transition: color 0.2s ease; }
.footer-nav a:hover, .footer-contacts a:hover { color: var(--accent); }
.footer-addr { color: var(--text-faint); font-size: 13px; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
}
.footer-legal { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-by { color: var(--text-dim); }
.footer-legal a { transition: color 0.2s ease; }
.footer-legal a:hover { color: var(--accent); }

/* ---------- плавающие элементы ---------- */

.scroll-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 45;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--panel-solid);
  border: 1px solid var(--border-strong);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.2s ease;
}
.scroll-top[hidden] { display: none; }
.scroll-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.scroll-top:hover { border-color: var(--accent); }

/* Панель связи — только на мобильных, где шапка сжимается до логотипа.
   Оформлена как приборный блок: тёмное стекло, угловые засечки прицела
   и строка состояния с мигающим индикатором. */
.mobile-dock {
  display: none;
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 46;
  flex-direction: column;
  gap: 8px;
  padding: 9px 10px 10px;
  border-radius: 14px;
  background: rgba(8, 12, 20, 0.93);
  border: 1px solid var(--border-strong);
  box-shadow: 0 14px 40px -10px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 181, 71, 0.06);
}

/* Угловые засечки — четыре уголка рамки, как в прицеле HUD. */
.mobile-dock::before,
.mobile-dock::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border: 1px solid var(--accent);
  opacity: 0.55;
  pointer-events: none;
}
.mobile-dock::before {
  top: -1px; left: -1px;
  border-right: none; border-bottom: none;
  border-top-left-radius: 14px;
}
.mobile-dock::after {
  bottom: -1px; right: -1px;
  border-left: none; border-top: none;
  border-bottom-right-radius: 14px;
}

.dock-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
}
.dock-status-text { font-variant-numeric: tabular-nums; }

.dock-status-dot {
  box-shadow: 0 0 9px rgba(74, 222, 128, 0.95);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
  animation: led-dot 5.4s linear infinite -1.8s;
}

/* Вне часов приёма индикатор перестаёт мигать и меняет цвет на янтарный —
   состояние читается ещё до того, как глаз доберётся до цифр. */
.dock-status.is-closed .dock-status-dot {
  background: var(--accent);
  box-shadow: 0 0 6px rgba(255, 181, 71, 0.7);
  animation: none;
  opacity: 0.85;
}

.dock-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }

.dock-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 10px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  transition: filter 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
/* Звонок — основное действие, поэтому заполненная кнопка. */
.dock-btn--call {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04121a;
  font-weight: 600;
  box-shadow: 0 6px 20px -6px rgba(255, 181, 71, 0.55);
}
.dock-btn--call:active { filter: brightness(0.94); }
/* Telegram — тоже оранжевая, но подсвеченная изнутри, а не залитая:
   две одинаково яркие кнопки рядом заставляли бы выбирать дольше. */
.dock-btn--tg {
  color: var(--accent);
  border: 1px solid rgba(255, 181, 71, 0.55);
  background:
    linear-gradient(135deg, rgba(255, 181, 71, 0.22), rgba(255, 122, 61, 0.14));
  text-shadow: 0 0 10px rgba(255, 181, 71, 0.35);
  box-shadow:
    inset 0 0 18px rgba(255, 181, 71, 0.12),
    0 4px 16px -6px rgba(255, 181, 71, 0.3);
}
.dock-btn--tg:active { background: rgba(255, 181, 71, 0.3); }

/* Кабинет — для тех, кто уже клиент. Спокойная, без оранжевого: три ярких
   кнопки рядом заставляют выбирать, а не нажимать. */
.dock-btn--cab {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
}
.dock-btn--cab:active { background: rgba(255, 255, 255, 0.11); }

/* Три кнопки в ряд на узком экране: ужимаем текст, но не прячем — иконка
   без подписи заставляет гадать. */
@media (max-width: 400px) {
  .dock-btn { font-size: 11.5px; gap: 5px; padding: 12px 4px; letter-spacing: 0; }
  .dock-btn svg { width: 15px; height: 15px; flex: none; }
}
@media (max-width: 340px) {
  .dock-btn { font-size: 10.5px; }
}

/* ---------- появление при скролле ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---------- адаптив ---------- */

@media (min-width: 1081px) {
  .header-phone { display: flex; }
}

@media (max-width: 1080px) {
  .hero-hud { grid-template-columns: 1fr; }
  .hud-rail { display: none; }
  .hud-side--right {
    display: flex;
    flex-direction: row;
    position: static;
    gap: 16px;
    align-items: stretch;
  }
  .minimap { flex: 1; }
  .why-inner { grid-template-columns: 1fr; }
  .why-stats { max-width: 480px; }
  .why-photo { min-height: 240px; order: -1; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .works-grid { grid-template-columns: 1fr 1fr; gap: 34px 22px; }
  .work { --shot-h: 440px; }
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .header-phone { display: none; }
  .header-actions .btn-sm { display: none; }
  .services-grid { grid-template-columns: 1fr; }
  .route-steps { grid-template-columns: 1fr 1fr; }
  .route-line { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .contact-panel { grid-template-columns: 1fr; }
  .contact-info { border-right: none; border-bottom: 1px solid var(--border); }
  .cta-action { padding: 32px 24px; }
  .next-list { grid-template-columns: 1fr; }
  .hero-bottom-bar { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
  .bar-item { flex-shrink: 0; }
  .hud-side--right { flex-direction: column; }
  .orbit-dial { display: none; }
  .mobile-dock { display: flex; }
  .scroll-top { bottom: 108px; }

  /* Зоны нажатия на телефоне: контакты и гамбургер были 23–32px, палец
     промахивался. Ниже 44px опускаться не стоит. */
  .contact-detail { padding: 10px 0; }
  a.contact-detail-v { display: inline-flex; align-items: center; min-height: 44px; }
  .nav-toggle { padding: 12px 10px; }
  .footer-contacts a, .footer-nav a { padding: 6px 0; }
  section:not(.hero) { padding: 52px 0; }
  .site-footer { padding-bottom: 124px; }
}

@media (max-width: 560px) {
  .header-inner { padding: 14px 20px; }
  .section-inner { padding: 0 20px; }
  .hero-hud { padding: 0 20px; }
  .hero { padding-top: calc(var(--header-h) + 24px); }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn, .page-hero-ctas .btn { width: 100%; }
  .page-hero-ctas { flex-direction: column; align-items: stretch; }
  .route-steps { grid-template-columns: 1fr; }
  .why-stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .contact-info, .contact-form { padding: 32px 24px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .process-banner { height: 220px; }
  .process-banner-v { font-size: 16px; }
  .info-card { padding: 18px; }
  .stat-row { grid-template-columns: 1fr 60px 34px; gap: 10px; }
  .client-wall { grid-template-columns: 1fr 1fr; }
  .faq-item summary { padding: 16px 18px; }
  .faq-a { padding: 0 18px 18px; }
  .cpa-explainer { padding: 24px 20px; }
  .works-grid { grid-template-columns: 1fr; gap: 36px; }
  .works-grid .work:nth-child(even) { margin-top: 0; }
  .work { --shot-h: 400px; }
}

/* На телефоне и планшете наведения нет — вместо прокрутки по наведению
   отдаём окошко пальцу. overscroll-behavior не даёт странице уехать
   вместе с кадром, когда снимок домотан до конца. */
@media (hover: none) {
  .work-glass {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .work-screen:hover .work-shot,
  .work-screen:focus-within .work-shot { transform: none; }
  .work-screen::after { display: none; }
  .work-screen:hover::before,
  .work-screen:focus-within::before { opacity: 1; }
}

/* ---------- мобильное меню ---------- */

@media (max-width: 860px) {
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: calc(var(--header-h) - 6px);
    left: 16px;
    right: 16px;
    background: var(--panel-solid);
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    padding: 20px;
    gap: 18px;
    z-index: 60;
    box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.6);
  }

  /* В гамбургере список услуг раскрывается не поверх, а внутри — под самим
     пунктом. Перенос строки делает flex-wrap: ссылка и стрелка встают в одну
     строку, список во всю ширину переходит на следующую. */
  .nav-item { flex-wrap: wrap; width: 100%; }
  .nav-sub-toggle { width: 44px; height: 44px; margin: -12px 0; }
  .nav-sub {
    position: static;
    width: 100%;
    grid-template-columns: 1fr;
    margin-top: 12px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border);
    border-radius: 10px;
    box-shadow: none;
  }
  .nav-sub::before { display: none; }
  .nav-sub-link { padding: 12px 10px; font-size: 13px; }
}

/* ---------- уважение к настройкам движения ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal { opacity: 1; transform: none; }
  .stat-fill { transition: none; }
  .route-line-fill { stroke-dashoffset: 0; }
  .stars-bg span { animation: none; opacity: 0.5; }
  .dial-ring { animation: none; }
  .mission-dot { animation: none; }
  .service-tag, .info-card-badge { animation: none; text-shadow: 0 0 7px rgba(74, 222, 128, 0.45); }
  .status-dot, .dot-badge { animation: none; }
  .service-card:hover, .client-item:hover, .related-card:hover, .btn-primary:hover {
    transform: none;
  }

  /* Общее правило выше обнуляет длительность переходов — прокрутка кадра
     от этого не исчезла бы, а стала мгновенным скачком. Поэтому здесь её
     выключаем совсем и отдаём окошко на ручную прокрутку. */
  .work-glass { overflow-y: auto; overscroll-behavior: contain; }
  .work-screen:hover .work-shot,
  .work-screen:focus-within .work-shot { transform: none; }
  .work-screen::after { display: none; }
  .work-screen:hover::before,
  .work-screen:focus-within::before { opacity: 1; }
}

/* ---------- кабинет клиента на главной ---------- */
/* Три карточки показывают порядок работы, а окно под ними — сам кабинет.
   Окно закрыто по умолчанию: на первом заходе человеку нужен не дашборд,
   а понимание, что процесс вообще есть. */
.cabinet { padding: 96px 0; }

.cab-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.cab-card {
  display: flex;
  flex-direction: column;
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 21px 22px;
}
.cab-n {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.cab-card h3 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 10px 0 8px;
}
.cab-card > p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.5;
  margin: 0 0 17px;
}
.cab-shot {
  margin-top: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 15px;
}
.cab-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-dim);
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}
.cab-row:last-child { border-bottom: 0; }
.cab-row b {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.cab-tot, .cab-tot b { color: var(--accent); }
.cab-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 12.5px;
  color: var(--text-dim);
}
.cab-step span {
  width: 17px; height: 17px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  font-size: 9px;
}
.cab-step.done span {
  background: rgba(25, 158, 112, 0.2);
  border-color: rgba(25, 158, 112, 0.45);
  color: #3cbb8d;
}
.cab-step.now span { border-color: var(--accent); }
.cab-src {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
  margin: 9px 0 0;
}
.cab-src b { color: var(--text-dim); font-weight: 400; }

.cab-more { margin-top: 20px; }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 10px;
  cursor: pointer;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost svg { transition: transform 0.2s; }
.btn-ghost[aria-expanded="true"] svg { transform: rotate(180deg); }

.cab-win {
  margin-top: 20px;
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.cab-win[hidden] { display: none; }
.cab-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 16px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.cab-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}
.cab-url {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}
.cab-body { padding: 20px 22px 24px; }

.cab-tabs {
  display: flex;
  gap: 3px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  overflow-x: auto;
}
.cab-tab {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  padding: 9px 14px;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-faint);
  cursor: pointer;
}
.cab-tab:hover { color: var(--text-dim); }
.cab-tab.is-on { color: var(--accent); border-bottom-color: var(--accent); }
.cab-pane[hidden] { display: none; }

.cab-pv {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
}
.cab-c { background: var(--panel-solid); padding: 13px 14px 15px; }
.cab-c dt {
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0;
}
.cab-c dd {
  margin: 5px 0 0;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.cab-of {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 3px;
}
.cab-bar-l {
  position: relative;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.09);
  margin-top: 11px;
}
.cab-bar-l span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: #199e70;
}
.cab-bar-l i {
  position: absolute;
  top: -3px;
  width: 2px; height: 11px;
  background: var(--text-faint);
}
.cab-chip {
  display: inline-block;
  margin-top: 10px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(25, 158, 112, 0.16);
  color: #3cbb8d;
}

.cab-h { font-size: 15px; font-weight: 700; margin: 24px 0 5px; }
.cab-p { font-size: 13px; color: var(--text-dim); margin: 0 0 12px; }
.cab-lg {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.cab-lg i {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 2px;
  margin-right: 6px;
}
.cab-chart { width: 100%; height: auto; display: block; }
.cab-ax {
  fill: var(--text-faint);
  font-size: 9px;
  font-family: var(--font-mono);
}
.cab-ax.wk { fill: #d97070; }

/* Приборная доска мокапа: САМИ приборы кабинета — SVG генерируют те же
   функции shared.py, что рисуют их клиенту. Переменные тем задаём здесь,
   пробег стрелок запускает main.js при доскролле (SMIL, как cycleSweep).
   overflow visible всюду — свечение точек не режется. */
.cab-gauges {
  --bg: #05070c; --bg-alt: #0a0e16; --panel: #0d1420;
  --text: #e8edf4; --text-dim: #a3b1c6; --text-faint: #7d8a9f;
  --accent: #ffb547; --accent-line: rgba(255, 181, 71, 0.28);
  --border: rgba(255, 255, 255, 0.09);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 0 0 26px;
}
.cab-g { text-align: center; min-width: 0; }
.cab-g-t {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 10px;
}
.cab-g svg {
  width: 100%;
  max-width: 292px;
  height: auto;
  display: block;
  margin: 0 auto;
  overflow: visible;
}
@media (max-width: 720px) { .cab-gauges { grid-template-columns: repeat(2, 1fr); row-gap: 26px; } }

/* Полосы плиток мокапа: стоят на нуле, пробегают при доскролле — тем же
   движением, что pv-полосы кабинета. */
.cab-pv .cab-bar-l span { width: 0; transition: width 2.4s cubic-bezier(0.2, 0.8, 0.25, 1); }

/* Статус строки закупки: те же пилюли, что в кабинете. */
.cab-st {
  align-self: center;
  justify-self: end;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}
.cab-st.on { color: #2f9e77; background: rgba(47, 158, 119, 0.12); border: 1px solid rgba(47, 158, 119, 0.35); }
.cab-st.off { color: #ffb547; background: rgba(255, 181, 71, 0.08); border: 1px solid rgba(255, 181, 71, 0.3); }

.cab-jr {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.cab-jr:has(.cab-st) { grid-template-columns: 64px 1fr auto; }
.cab-jr:last-child { border-bottom: 0; }
.cab-jr time {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
}
.cab-jr b { display: block; font-weight: 600; font-size: 13px; }
.cab-jr em {
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.cab-dep {
  height: 11px;
  border-radius: 999px;
  background: #199e70;
  overflow: hidden;
  margin-bottom: 16px;
}
.cab-dep span {
  display: block;
  height: 100%;
  background: #c98500;
}

.cab-note {
  margin: 18px 0 0;
  font-size: 12.5px;
  color: var(--text-faint);
}

.header-cabinet {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dim);
  text-decoration: none;
  padding: 8px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
}
.header-cabinet:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 980px) {
  .cab-trio { grid-template-columns: 1fr; }
  .cab-pv { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .header-cabinet { display: none; }
}
@media (max-width: 560px) {
  .cabinet { padding: 64px 0; }
  .cab-jr { grid-template-columns: 1fr; gap: 3px; }
}

/* Целевые действия и их цена — рядом: одна мысль в двух срезах.
   Ради этой пары агентство и работает, поэтому она идёт после трафика,
   а не теряется под ним. */
.cab-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}
.cab-two > div { min-width: 0; }
.cab-two .cab-h { margin-top: 0; }
@media (max-width: 860px) {
  .cab-two { grid-template-columns: 1fr; gap: 30px; }
}

/* Три графика в ряд. Раньше один был во всю ширину, а два под ним: окно
   выходило на два экрана, и человек до него не доскроливал. Клиенту здесь
   нужна не точка на графике, а форма кривой — она читается и в узком. */
.cab-three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 26px;
}
.cab-three > div { min-width: 0; }
.cab-three .cab-h { margin-top: 0; font-size: 14px; }
.cab-three .cab-lg { font-size: 11.5px; gap: 12px; margin-bottom: 8px; }
.cab-three svg { height: 132px; }
@media (max-width: 900px) {
  .cab-three { grid-template-columns: 1fr; gap: 26px; }
  .cab-three svg { height: 160px; }
}

/* Журнал и бухгалтерия рядом: по отдельности каждый занимал экран, а
   вместе они и есть одна мысль — видно каждый шаг и каждый сум. */
.cab-bottom { margin-top: 26px; }
.cab-half { min-width: 0; }
.cab-half .cab-h { margin-top: 0; }

/* Раздел временно снят с главной. */
.services[hidden] { display: none; }

/* ---------- короткая заявка на главной ---------- */
/* Три поля сразу за кабинетом. Человек только что увидел, как всё устроено,
   и это лучший момент попросить контакт. Всё, что длиннее трёх строк,
   отправляется в бриф — по желанию, а не на входе. */
.lead { padding: 86px 0; background: var(--bg-alt); }
.lead-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 54px;
  align-items: start;
}
.lead-left h2 { margin: 12px 0 14px; }
.lead-left > p { color: var(--text-dim); max-width: 46ch; }
.lead-pl { list-style: none; margin: 22px 0 0; padding: 0; }
.lead-pl li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 11px;
  color: var(--text-dim);
  font-size: 15px;
}
.lead-pl li::before {
  content: '';
  position: absolute;
  left: 0; top: 8px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.lead-short {
  padding: 26px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--panel, #0d1420);
}
.ls-f { display: block; margin-bottom: 15px; }
.ls-f span {
  display: block;
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.ls-f input {
  width: 100%;
  padding: 13px 15px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}
.ls-f input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.ls-f.is-bad input { border-color: #e08585; }
/* Ловушка для роботов: человек её не видит и не заполняет. */
.ls-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.ls-alt {
  margin: 14px 0 0;
  font-size: 13.5px;
  color: var(--text-faint);
  line-height: 1.55;
}
.ls-alt a { color: var(--accent); }

@media (max-width: 900px) {
  .lead { padding: 64px 0; }
  .lead-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* На телефоне три карточки «как это устроено» разворачивались в 1100
   пикселей и отодвигали от человека и сам кабинет, и заявку. Живое окно
   ниже показывает то же самое, только по-настоящему, — карточки здесь
   лишние. На широком экране они стоят одной строкой и не мешают. */
@media (max-width: 900px) {
  .cab-trio { display: none; }
  /* Журнал длиннее четырёх строк на телефоне ничего не добавляет: мысль
     «видно каждый шаг» читается и с четырёх. */
  .cab-half .cab-jr:nth-child(n+6) { display: none; }
}

/* ---------- страница входа в кабинет ---------- */
/* Кнопка «Кабинет» ведёт сюда, а не сразу на поддомен: за поддоменом стоит
   экран входа Cloudflare, и человек, зашедший посмотреть, упирался бы
   в чужую страницу с требованием почты, ничего не поняв. */
.enter { padding: 56px 0 96px; }
.enter-inner { max-width: 1040px; }
.enter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 52px;
  align-items: start;
  margin-top: 26px;
}
.enter-lede {
  font-size: 17px;
  color: var(--text-dim);
  line-height: 1.6;
  margin: 14px 0 28px;
  max-width: 48ch;
}
.enter-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15.5px;
  padding: 14px 24px;
}
.enter-note {
  font-size: 13.5px;
  color: var(--text-faint);
  margin: 14px 0 0;
  max-width: 42ch;
}

.enter-steps {
  list-style: none;
  margin: 0;
  padding: 22px 24px;
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.enter-steps li { display: flex; gap: 14px; }
.enter-n {
  width: 26px; height: 26px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
}
.enter-steps b { display: block; font-size: 15px; font-weight: 700; }
.enter-steps p {
  margin: 3px 0 0;
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.5;
}

.enter-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 52px;
  padding-top: 34px;
  border-top: 1px solid var(--border);
}
.enter-card {
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px 24px;
}
.enter-card h2 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
.enter-card p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.55;
  margin: 0 0 16px;
}
.enter-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.enter-link:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .enter-grid { grid-template-columns: 1fr; gap: 32px; }
  .enter-cards { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .enter { padding: 36px 0 64px; }
}

/* ---------- медиаобзор рынка ---------- */
/* Страница читается как отчёт: секции короче обычных, графики на панелях,
   у каждой цифры номер источника. Цвета графиков проверены валидатором
   палитры на тёмной поверхности панели: одиночные ряды — акцент сайта,
   четыре медиа в структуре рынка — #c98500 #3987e5 #199e70 #d95926. */
.mk-section { padding: 52px 0; }
.mk-section .section-head { margin-bottom: 28px; }
.mk-section .section-head p { max-width: 74ch; }
.mk-kpis { padding-top: 12px; }

.mk-stamp {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
  margin-top: 22px;
  padding: 14px 0 0;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
}
.mk-stamp-item { display: inline-flex; flex-direction: column; gap: 3px; }
.mk-stamp-k { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); }
.mk-stamp-item b { font-weight: 500; color: var(--text); }
.mk-download { margin-left: auto; }

.mk-kpi-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.mk-kpi {
  padding: 20px 20px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.022);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
/* Крупная цифра — тем же гротеском, что и текст: дисплейный шрифт на цифре
   читается как украшение, а не как показание. */
.mk-kpi-v { font-size: 30px; font-weight: 600; line-height: 1.05; color: var(--text); letter-spacing: -0.01em; }
.mk-kpi-k { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.mk-kpi-d { font-size: 13px; color: var(--text-dim); }
.mk-src { font-family: var(--font-mono); font-size: 10px; color: var(--text-faint); text-decoration: none; white-space: nowrap; }
.mk-src:hover, .mk-src:focus-visible { color: var(--accent); }

.mk-five { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.mk-five-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(16, 22, 34, 0.72);
  min-width: 0;
}
.mk-five-head { display: flex; gap: 12px; align-items: flex-start; }
.mk-five-n { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.1em; padding-top: 4px; }
.mk-five-name { font-size: 20px; margin: 0; }
.mk-five-role { display: block; margin-top: 3px; font-size: 12px; color: var(--text-dim); }
.mk-five-stat { padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.mk-five-v { display: block; font-size: 26px; font-weight: 600; color: var(--text); line-height: 1.05; }
.mk-five-vk { display: block; margin-top: 4px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
.mk-five-what { font-size: 14px; color: var(--text-dim); margin: 0; }
.mk-five-use { font-size: 13px; color: var(--text-dim); margin: auto 0 0; padding-top: 10px; border-top: 1px dashed var(--border); }
.mk-five-usek { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }

.mk-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.mk-chart {
  margin: 0;
  padding: 20px 22px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.022);
  min-width: 0;
}
.mk-chart-h { font-size: 15px; font-weight: 600; margin: 0 0 14px; }
.mk-chart-cap { margin-top: 12px; font-size: 12px; color: var(--text-faint); }
.mk-chart svg { display: block; width: 100%; height: auto; }
.mk-chart--wide { max-width: 780px; }
/* Подписи графиков — текстовыми токенами, цвет несут только полоски. */
.mk-chart text { font-family: var(--font-body); font-size: 12px; fill: var(--text-dim); }
.mk-chart .mk-val { font-family: var(--font-mono); font-size: 11px; fill: var(--text); }
.mk-chart .mk-axis { stroke: var(--border); stroke-width: 1; }
.mk-chart .mk-note { font-size: 10px; fill: var(--text-faint); }
.mk-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; font-size: 12px; color: var(--text-dim); }
.mk-legend span { display: inline-flex; align-items: center; gap: 7px; }
.mk-legend i { width: 10px; height: 10px; border-radius: 2px; }

.mk-table-wrap { overflow-x: auto; }
.mk-table { min-width: 0; }
.mk-table th, .mk-table td { padding: 11px 14px; font-size: 13px; }

.mk-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.mk-facts--row { grid-template-columns: repeat(4, 1fr); margin-top: 18px; }
.mk-fact {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.022);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.mk-fact-v { font-size: 22px; font-weight: 600; color: var(--text); line-height: 1.1; }
.mk-fact-k { font-size: 13px; color: var(--text-dim); }

.mk-notes { margin-top: 22px; max-width: 74ch; }
.mk-notes p { font-size: 15px; color: var(--text-dim); }

.mk-take .next-t { font-size: 16px; }
.mk-take { grid-template-columns: repeat(5, 1fr); }

.mk-src-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 78ch; }
.mk-src-list li { display: flex; gap: 12px; font-size: 14px; }
.mk-src-n { font-family: var(--font-mono); font-size: 11px; color: var(--accent); padding-top: 3px; flex-shrink: 0; }
.mk-src-body { display: flex; flex-direction: column; gap: 2px; }
.mk-src-body a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }
.mk-src-body a:hover { text-decoration-color: var(--accent); }
.mk-src-note { font-size: 12px; color: var(--text-faint); }
.mk-pdf-line { margin-top: 26px; }

/* Галерея слайдов: превью из PDF, три в ряд, каждое — ссылка на страницу. */
.mk-slides { padding-top: 8px; }
.mk-deck { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mk-slide-link {
  display: block;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel-solid);
  transition: border-color 0.18s ease, transform 0.18s var(--ease-out);
}
.mk-slide-link:hover, .mk-slide-link:focus-visible { border-color: var(--accent-line); transform: translateY(-2px); }
.mk-slide-link img { display: block; width: 100%; height: auto; }
.mk-slide-cap { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 13px; color: var(--text-dim); border-top: 1px solid var(--border); }
.mk-slide-n { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; color: var(--accent); }
.mk-slide-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
@media (max-width: 860px) { .mk-deck { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .mk-deck { grid-template-columns: 1fr; } }

/* Полоса на главной */
.mk-banner { padding: 0 0 68px; }
.mk-banner-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 30px 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(16, 22, 34, 0.72);
}
.mk-banner-text h2 { font-size: 26px; margin: 8px 0 10px; }
.mk-banner-text p { color: var(--text-dim); max-width: 64ch; margin: 0; }
.mk-banner-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Строка в подменю услуг: на всю ширину, отделена волосяной линией. */
.nav-sub-link--extra { grid-column: 1 / -1; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; }

@media (max-width: 1080px) {
  .mk-kpi-row { grid-template-columns: 1fr 1fr; }
  .mk-five { grid-template-columns: repeat(3, 1fr); }
  .mk-take { grid-template-columns: 1fr 1fr; }
  .mk-facts--row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .mk-section { padding: 40px 0; }
  .mk-five { grid-template-columns: 1fr; }
  .mk-two { grid-template-columns: 1fr; }
  .mk-take { grid-template-columns: 1fr; }
  .mk-banner-panel { grid-template-columns: 1fr; padding: 24px 22px; }
  .mk-download { margin-left: 0; }
}
@media (max-width: 560px) {
  .mk-kpi-row { grid-template-columns: 1fr; }
  .mk-facts--row { grid-template-columns: 1fr; }
  .mk-kpi-v { font-size: 26px; }
}

/* ---------- печать и PDF ---------- */
/* Из этой же страницы собирается PDF. Убираем всё, что не переживёт бумагу:
   звёзды, фиксированную шапку, нижнюю панель, блок заявки, подвал. Тёмный
   фон оставляем — это часть оформления обзора, а читают его с экрана.
   Секциям разрешено рваться между страницами: запрет разрыва на целой
   секции оставлял полупустые листы. Не рвутся только карточки и графики.
   Колонтитул с выпуском ставит сам Chrome при печати — см. build-market-pdf.py. */
@media print {
  @page { size: A4; margin: 10mm 10mm 14mm; }
  html, body { background: #05070c !important; }
  .stars-bg, .site-header, .mobile-dock, .scroll-top, .cta-contact, .site-footer, .mk-download, .mk-pdf-line, .breadcrumb, .mk-print-foot { display: none !important; }
  .page-hero { padding-top: 4mm !important; min-height: 0 !important; }
  main { padding-top: 0 !important; }
  .mk-section { padding: 7mm 0 !important; }
  .section-head { break-inside: avoid; break-after: avoid; margin-bottom: 4mm !important; }
  .mk-five-card, .mk-chart, .mk-kpi, .mk-fact, .next-item, .mk-src-list li { break-inside: avoid; box-shadow: none !important; }
  /* Пять карточек — в три колонки на одном листе; выводы — так же. Целый
     блок не рвётся между страницами, иначе одна карточка уезжала на
     следующий лист и оставляла его пустым на три четверти. */
  #sources { break-before: page; }
  .mk-take, .mk-kpi-row, .mk-facts--row { break-inside: avoid; }
  .mk-five { grid-template-columns: repeat(3, 1fr); gap: 4mm; }
  .mk-five-card { padding: 4mm; gap: 2.5mm; }
  .mk-five-what, .mk-five-use { font-size: 11px; }
  .mk-five-name { font-size: 16px; }
  .mk-kpi-row { grid-template-columns: repeat(4, 1fr); gap: 3mm; }
  .mk-kpi { padding: 3.5mm; }
  .mk-kpi-v { font-size: 22px; }
  .mk-two { gap: 4mm; }
  .mk-chart { padding: 4mm; }
  .mk-take { grid-template-columns: repeat(3, 1fr); gap: 3mm; }
  .mk-facts--row { grid-template-columns: repeat(4, 1fr); gap: 3mm; }
  .section-inner { padding: 0 !important; }
  a { text-decoration: none !important; }
  .mk-src-body a { color: var(--text) !important; }
}
.mk-print-foot { display: none; }
