/* =========================================================================
   ZAVOD — дизайн-система.
   Правится ТОЛЬКО здесь, через переменные :root. По страницам цвета не пишем.

   Тема одна — тёмная. Это решение, а не упущение: страницу открывают с телефона
   из чата, и светлый вариант нам не нужен. Поэтому фон и цвет заданы явно,
   без prefers-color-scheme.

   Палитра взята от производственной разметки: графит цеха и сигнальная охра.
   Охра — единственное яркое пятно на странице, всё остальное тихое.
   Сталь используется только для данных на графиках, в интерфейсе её нет.
   ========================================================================= */

:root {
  /* Полотно */
  --bg:            #0E1216;
  --bg-2:          #141A20;
  --surface:       #1A222A;
  --surface-2:     #202A33;
  --line:          #263039;
  --line-strong:   #33414E;

  /* Текст */
  --text:          #E6E9EC;
  --text-2:        #9DA9B4;
  --text-3:        #6B7883;

  /* Акцент */
  --accent:        #E0A32E;
  --accent-dim:    #B4801D;
  --accent-ink:    #17120A;
  --accent-soft:   rgba(224, 163, 46, .12);

  /* Данные */
  --steel:         #6FA3C0;
  --steel-soft:    rgba(111, 163, 192, .14);
  --ok:            #5FA97E;
  --danger:        #C96A4B;

  /* Типографика */
  --font-display: "Prata", Georgia, "Times New Roman", serif;
  --font-text:    "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    ui-monospace, "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace;

  --step--1: clamp(.8rem, .78rem + .1vw, .86rem);
  --step-0:  clamp(1rem, .97rem + .15vw, 1.06rem);
  --step-1:  clamp(1.15rem, 1.08rem + .32vw, 1.35rem);
  --step-2:  clamp(1.45rem, 1.28rem + .78vw, 2rem);
  --step-3:  clamp(1.95rem, 1.55rem + 1.85vw, 3.1rem);
  --step-4:  clamp(2.6rem, 1.9rem + 3.2vw, 4.4rem);

  /* Ритм */
  --measure:  66ch;
  --gutter:   clamp(1.1rem, .7rem + 2vw, 2rem);
  --rhythm:   clamp(3rem, 2.2rem + 3.5vw, 5.5rem);
  --radius:   4px;

  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 16px 40px -28px rgba(0,0,0,.9);
}

/* ---------- Шрифты. Локальные сабсеты, чтобы не блокировать рендер ---------- */
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/fonts/manrope-cyrillic-400.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/fonts/manrope-latin-400.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2122, U+2212;
}
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/fonts/manrope-cyrillic-500.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/fonts/manrope-latin-500.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2122, U+2212;
}
@font-face {
  font-family: "Prata"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/fonts/prata-cyrillic-400.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* Латиница тем же начертанием. Без этого правила файл лежал рядом с
   кириллическим и не подключался ничем, а латинские слова в заголовках
   падали на Georgia — заметно на «PRO», названиях и цифрах с буквами. */
@font-face {
  font-family: "Prata"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/fonts/prata-latin-400.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122,
                 U+2191, U+2193, U+2212;
}

/* ---------- Основа ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video, svg, iframe { max-width: 100%; display: block; }

h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: var(--accent); text-underline-offset: .18em; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.num { font-variant-numeric: tabular-nums; }

/* Служебное: видно только программам чтения с экрана */
.vh {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Раскладка ---------- */
.shell {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--rhythm);
  border-top: 1px solid var(--line);
}
.section--sunk  { background: var(--bg-2); }

/* Отбивка хвостовых блоков от предыдущего содержимого. Раньше это делали
   семь инлайновых style= с пятью разными значениями. */
.section .shell > .note,
.section .shell > .disclaimer,
.section .shell > .faq,
.costs {
  margin-top: clamp(1.2rem, .9rem + 1vw, 1.9rem);
}

.section__head {
  display: flex;
  flex-direction: column;
  gap: .8rem;
  margin-bottom: clamp(1.6rem, 1.2rem + 1.5vw, 2.6rem);
}

.eyebrow {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}

h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-2);
  line-height: 1.15;
  letter-spacing: -.01em;
}

.lede {
  max-width: var(--measure);
  color: var(--text-2);
  font-size: var(--step-1);
  line-height: 1.5;
}

.prose { max-width: var(--measure); display: flex; flex-direction: column; gap: 1rem; }
.prose p { color: var(--text-2); }

.note {
  font-size: var(--step--1);
  line-height: 1.55;
  color: var(--text-3);
  max-width: var(--measure);
}

/* ---------- Шапка ---------- */
.header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.header__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: .85rem;
}
/* Знак: три вертикальных кадра, средний выше и в акценте. Прямо про то,
   что завод производит — вертикальное видео потоком. Засечный шрифт из логотипа
   убран: тонкие штрихи Prata на тёмном плывут и читаются книжным титулом. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--text);
  text-decoration: none;
}
.brand__mark { flex: none; display: block; }
.brand__mark rect { fill: var(--text-3); }
.brand__mark .brand__key { fill: var(--accent); }
.brand__tx {
  font-family: var(--font-text);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -.015em;
  line-height: 1;
  white-space: nowrap;
}
.brand__tx b { font-weight: 600; color: var(--accent); }

.header__meta {
  font-size: var(--step--1);
  color: var(--text-3);
  text-align: right;
  line-height: 1.3;
}

/* ---------- Первый экран ---------- */
.hero {
  padding-block: clamp(2.6rem, 1.8rem + 4vw, 5.5rem) clamp(2.2rem, 1.6rem + 3vw, 4rem);
  position: relative;
  overflow: hidden;
}

/* Тонкая цеховая разметка на фоне. Чистый CSS, без картинок и запросов. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg, var(--line) 0 1px, transparent 1px 5.5rem);
  opacity: .5;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
  pointer-events: none;
}
.hero > * { position: relative; }

.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  background: var(--accent-soft);
  padding: .3rem .7rem;
  border-radius: 2px;
  margin-bottom: 1.4rem;
}

h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-4);
  line-height: 1.04;
  letter-spacing: -.02em;
  max-width: 18ch;
}
h1 em { font-style: normal; color: var(--accent); }

.hero__sub {
  margin-top: 1.2rem;
  max-width: 46ch;
  font-size: var(--step-1);
  color: var(--text-2);
  line-height: 1.5;
}

.hero__figures {
  margin-top: clamp(2rem, 1.4rem + 2.5vw, 3rem);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.figure {
  background: var(--bg);
  padding: 1rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.figure__val {
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.figure__val span { font-size: .55em; color: var(--text-2); }
.figure__cap {
  font-size: var(--step--1);
  color: var(--text-3);
  line-height: 1.35;
}

.hero__cta {
  margin-top: clamp(1.8rem, 1.3rem + 2vw, 2.6rem);
  display: flex;
  flex-direction: column;
  gap: .9rem;
  align-items: flex-start;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  padding: .95rem 1.6rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
  min-height: 3rem;
}
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn--primary:hover { background: #EEB03A; border-color: #EEB03A; }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--text-3); background: var(--surface); }
.btn--wide { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Обратный отсчёт ---------- */
.countdown {
  display: flex;
  gap: .5rem;
  align-items: stretch;
}
.countdown__cell {
  min-width: 3.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .5rem .4rem .45rem;
  text-align: center;
}
.countdown__n {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.countdown__l {
  display: block;
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-top: .15rem;
}

/* ---------- Проблема ---------- */
.pains {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.pain {
  background: var(--bg);
  padding: 1.3rem 1.3rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.pain__t { font-weight: 600; font-size: var(--step-1); line-height: 1.3; }
.pain__d { color: var(--text-2); font-size: var(--step--1); line-height: 1.55; }

/* ---------- Что передаётся ---------- */
.transfer { display: flex; flex-direction: column; }
.transfer__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: .35rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}
.transfer__row:first-child { border-top: 1px solid var(--line); }
.transfer__name {
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: .6rem;
  flex-wrap: wrap;
}
.transfer__val { color: var(--text-2); font-size: var(--step--1); line-height: 1.55; max-width: var(--measure); }

/* ---------- Графики ---------- */
.charts {
  display: grid;
  gap: 1.1rem;
}
.chart {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .9rem;
}
.chart__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.chart__title { font-weight: 600; font-size: var(--step-0); }
.chart__unit { font-size: var(--step--1); color: var(--text-3); }
.chart__plot { width: 100%; height: auto; overflow: visible; }
.chart__grid  { stroke: var(--line); stroke-width: 1; }
.chart__foot  { font-size: var(--step--1); color: var(--text-3); }

/* Калькулятор перерисовывает график на каждое движение ползунка: обводить линию
   заново каждый раз — визуальный мусор. Он просто проявляется один раз целиком. */
.js .chart--calc .chart__plot { opacity: 0; }
.js .chart--calc.is-drawn .chart__plot { transition: opacity .55s ease; opacity: 1; }
.js .chart__area, .js .chart__bar { opacity: 0; }

/* ---------- Ролики ---------- */
.videos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: .85rem;
}
.video {
  position: relative;
  aspect-ratio: 9 / 16;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: left;
  color: var(--text);
  font: inherit;
}
.video:hover { border-color: var(--line-strong); }
.video__poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  background: var(--surface-2);
}
.video__shade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(6,9,11,.92) 0%, rgba(6,9,11,.3) 45%, rgba(6,9,11,.12) 100%);
}
.video__play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 2.9rem; height: 2.9rem;
  border-radius: 50%;
  background: rgba(14,18,22,.72);
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
}
.video__play::after {
  content: "";
  width: 0; height: 0;
  margin-left: .18rem;
  border-left: .72rem solid var(--accent);
  border-top: .44rem solid transparent;
  border-bottom: .44rem solid transparent;
}
.video__meta {
  position: relative;
  padding: .6rem .65rem .65rem;
  display: flex;
  flex-direction: column;
  gap: .12rem;
}
.video__where {
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.video__who {
  font-size: .74rem;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.video__n { font-size: .78rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.video.is-live { cursor: default; }
.video.is-live .video__shade,
.video.is-live .video__play,
.video.is-live .video__meta { display: none; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Экономика ---------- */
.compare {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.compare__col {
  background: var(--bg);
  padding: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: .9rem;
}
.compare__col--ours { background: var(--surface); }
.compare__t {
  font-weight: 600;
  font-size: var(--step-1);
  display: flex;
  align-items: center;
  gap: .55rem;
}
.compare__col--ours .compare__t { color: var(--accent); }
.compare__list { display: flex; flex-direction: column; gap: .55rem; }
.compare__list li {
  color: var(--text-2);
  font-size: var(--step--1);
  line-height: 1.5;
  padding-left: 1.1rem;
  position: relative;
}
.compare__list li::before {
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: .42rem; height: .42rem;
  border-radius: 1px;
  background: var(--line-strong);
}
.compare__col--ours .compare__list li::before { background: var(--accent); }

/* ---------- Переносимость ---------- */
.scope { display: grid; gap: 1.1rem; }
.scope__box {
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: .8rem;
}
.scope__box--yes { border-left-color: var(--ok); }
.scope__box--no  { border-left-color: var(--danger); }
.scope__t { font-weight: 600; font-size: var(--step-1); }
.scope__list { display: flex; flex-direction: column; gap: .5rem; }
.scope__list li { color: var(--text-2); font-size: var(--step--1); line-height: 1.55; }

/* ---------- Формы ---------- */
.form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.2rem, .9rem + 1.4vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow);
}
.form--build { background: var(--bg-2); }

/* Раскладка формы задаётся здесь, а не в медиазапросе: иначе на телефоне
   поля, чекбокс и кнопка стоят вплотную — отступ приходит только от 40rem. */
.form__body { display: flex; flex-direction: column; gap: 1.1rem; }
.form__grid { display: grid; gap: 1rem; }

.form__head { display: flex; flex-direction: column; gap: .5rem; }
.form__title { font-family: var(--font-display); font-weight: 400; font-size: var(--step-2); line-height: 1.15; }
.form__sub { color: var(--text-2); font-size: var(--step--1); line-height: 1.55; }

.field { display: flex; flex-direction: column; gap: .38rem; }
.field__label { font-size: var(--step--1); font-weight: 600; color: var(--text-2); }
.field__label span { color: var(--text-3); font-weight: 400; }

.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 16px; /* меньше 16px — iOS зумит страницу при фокусе */
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: .78rem .85rem;
  width: 100%;
  min-height: 3rem;
}
.field textarea { min-height: 5.5rem; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field--amount input { font-variant-numeric: tabular-nums; }

.field__hint { font-size: .78rem; color: var(--text-3); line-height: 1.45; }
/* В паре «имя | способ связи» вторая подпись занимает две строки —
   без этого поля в ряду встают на разной высоте. */
.form__grid .field__label { min-height: 2.9em; }
.field__err  { font-size: .78rem; color: var(--danger); line-height: 1.45; display: none; }
.field.is-bad input, .field.is-bad select, .field.is-bad textarea { border-color: var(--danger); }
.field.is-bad .field__err { display: block; }

/* Подсветка ошибки после переезда на общий модуль. Своих классов ядро
   не ставит: оно помечает поле aria-invalid и кладёт текст в [data-lead-err].
   Прежние .is-bad оставлены рядом — их ставит переходный обработчик js/app.js
   на странице, до которой ядро ещё не доехало, и у той разметки .field__err
   со своим текстом. Правило :not(:empty) поэтому спрашивается только
   с узлов, помеченных data-lead-err: в прежней разметке текст стоит всегда,
   и она показывала бы все ошибки сразу. */
.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--danger); }
.field__err[data-lead-err]:not(:empty) { display: block; }

.consent {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  font-size: var(--step--1);
  color: var(--text-2);
  line-height: 1.5;
  cursor: pointer;
}
.consent input {
  appearance: none;
  flex: 0 0 auto;
  width: 1.25rem; height: 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--bg);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.consent input:checked { background: var(--accent); border-color: var(--accent); }
.consent input:checked::after {
  content: "";
  width: .36rem; height: .68rem;
  border: solid var(--accent-ink);
  border-width: 0 2px 2px 0;
  transform: translateY(-.08rem) rotate(45deg);
}
.consent.is-bad { color: var(--danger); }
.consent.is-bad input { border-color: var(--danger); }
.consent input[aria-invalid="true"] { border-color: var(--danger); }
.consent:has(input[aria-invalid="true"]) { color: var(--danger); }

/* Ловушка для ботов: поле не видно и не попадает в обход по табуляции */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form__done {
  display: none;
  border: 1px solid var(--ok);
  background: rgba(95, 169, 126, .1);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  gap: .4rem;
  flex-direction: column;
}
.form.is-done .form__done { display: flex; }
.form.is-done .form__body { display: none; }
.form__done b { color: var(--ok); }

.form__fail {
  display: none;
  color: var(--danger);
  font-size: var(--step--1);
  line-height: 1.5;
}
.form.is-failed .form__fail { display: block; }

/* Блок ответа формы: сюда ядро пишет и честный отказ, и успех.

   Он нужен отдельно от .form__fail: тот показывается классом is-failed,
   а ядро этого класса не ставит и ставить не будет — при отказе сервера
   человек увидел бы пустоту. Пустым узел не занимает места, поэтому
   до первого ответа формы его на экране нет. */
.form__status { font-size: var(--step--1); line-height: 1.5; }
.form__status:empty { display: none; }
.form__status.is-err { color: var(--danger); }
.form__status.is-ok  { color: var(--ok); }

/* ---------- Вопросы ---------- */
.faq { display: flex; flex-direction: column; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item:first-child { border-top: 1px solid var(--line); }
.faq__q {
  list-style: none;
  cursor: pointer;
  padding: 1.05rem 2.2rem 1.05rem 0;
  font-weight: 600;
  position: relative;
  line-height: 1.4;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: "";
  position: absolute;
  right: .3rem; top: 1.45rem;
  width: .6rem; height: .6rem;
  border-right: 2px solid var(--text-3);
  border-bottom: 2px solid var(--text-3);
  transform: rotate(45deg);
  transition: transform .18s ease;
}
.faq__item[open] .faq__q::after { transform: rotate(-135deg); }
.faq__a {
  padding-bottom: 1.1rem;
  color: var(--text-2);
  font-size: var(--step--1);
  line-height: 1.6;
  max-width: var(--measure);
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

/* ---------- Липкая кнопка ---------- */
.sticky {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  padding: .6rem var(--gutter) calc(.6rem + env(safe-area-inset-bottom));
  background: rgba(14, 18, 22, .93);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  transform: translateY(105%);
  transition: transform .22s ease;
}
.sticky.is-on { transform: translateY(0); }
.sticky__in { max-width: 68rem; margin: 0 auto; display: flex; gap: .7rem; align-items: center; }
.sticky .btn { flex: 1; padding-block: .8rem; min-height: 2.9rem; }

/* ---------- Подвал ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem 6rem;
  color: var(--text-3);
  font-size: var(--step--1);
  line-height: 1.6;
}
.footer__in { display: flex; flex-direction: column; gap: 1.1rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; }
.footer__links a { color: var(--text-2); }
.footer__legal { max-width: var(--measure); }

/* ---------- Правовая оговорка ---------- */
.disclaimer {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-dim);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 1.1rem 1.2rem;
  color: var(--text-2);
  font-size: var(--step--1);
  line-height: 1.6;
  max-width: var(--measure);
}

/* ---------- Отдельные страницы ---------- */
.page { padding-block: var(--rhythm); }
.page h1 { font-size: var(--step-3); max-width: 24ch; }
.page__body { display: flex; flex-direction: column; gap: 1.4rem; margin-top: 1.8rem; max-width: var(--measure); }
.page__body h2 { font-size: var(--step-1); font-family: var(--font-text); font-weight: 600; }
.page__body p, .page__body li { color: var(--text-2); font-size: var(--step--1); line-height: 1.65; }
.page__body ul { display: flex; flex-direction: column; gap: .5rem; padding-left: 1.1rem; list-style: disc; }

/* ---------- Условия сделки в первом экране ---------- */
.hero__terms {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: .8rem 2.2rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
}
.hero__term { display: flex; flex-direction: column; gap: .1rem; }
.hero__term-l {
  font-size: var(--step--1);
  color: var(--text-3);
  letter-spacing: .04em;
}
.hero__term-v { font-weight: 600; font-size: var(--step-1); font-variant-numeric: tabular-nums; }

/* Главный показатель выделяется охрой — он один на первом экране */
/* Карточек пять, колонок на телефоне две — без этого рядом с последней
   зияет пустая ячейка цветом рамки. Главный показатель занимает всю ширину. */
.figure--key { background: var(--accent-soft); grid-column: 1 / -1; }
.figure--key .figure__val { color: var(--accent); }

/* ---------- Цепочка производства ---------- */
.chain {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.chain__step {
  padding: .95rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .12rem;
}
.chain__step--end { background: var(--accent-soft); }
.chain__step--end .chain__v { color: var(--accent); }
.chain__v {
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.chain__l { font-size: var(--step--1); color: var(--text-2); }
.chain__op {
  padding: .3rem 1.1rem;
  background: var(--bg-2);
  border-block: 1px solid var(--line);
  font-size: .74rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ---------- Карточки стоимости ---------- */
.costs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.cost {
  background: var(--bg);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.cost--hero { background: var(--surface); }
.cost--hero .cost__v { color: var(--accent); }
.cost__v {
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.cost__v span { font-size: .6em; color: var(--text-2); }
.cost__l { font-size: var(--step--1); color: var(--text-3); line-height: 1.4; }

/* ---------- Что даёт свой трафик ---------- */
.gains {
  margin-top: clamp(1.2rem, .9rem + 1vw, 1.9rem);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: .9rem;
}
.gains__t { font-weight: 600; font-size: var(--step-1); line-height: 1.3; }
.gains__list { display: grid; gap: .7rem; }
.gains__list li { color: var(--text-2); font-size: var(--step--1); line-height: 1.55; }
.gains__list b { color: var(--text); font-weight: 600; }

/* ---------- Распределение охвата по когортам ---------- */
.cohorts {
  margin-top: clamp(1.2rem, .9rem + 1vw, 1.9rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.cohorts__head {
  padding: 1.2rem 1.3rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  border-bottom: 1px solid var(--line);
}
.cohorts__t { font-weight: 600; font-size: var(--step-1); line-height: 1.3; }
.cohorts__d { color: var(--text-2); font-size: var(--step--1); line-height: 1.55; max-width: var(--measure); }

.cohort {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .3rem .9rem;
  padding: .9rem 1.3rem;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.cohort__name { font-weight: 600; }
.cohort__share { font-size: var(--step--1); color: var(--text-3); grid-column: 1; }
.cohort__views {
  grid-row: 1 / 3;
  grid-column: 2;
  font-family: var(--font-display);
  font-size: var(--step-1);
  text-align: right;
  white-space: nowrap;
}
/* Полоса показывает долю ОХВАТА, а не долю роликов: в этом весь смысл картинки */
.cohort__bar {
  grid-column: 1 / -1;
  height: .5rem;
  background: var(--bg);
  border-radius: 2px;
  overflow: hidden;
  margin-top: .25rem;
}
.cohort__bar span { display: block; height: 100%; background: var(--steel); }
.cohort--weak  .cohort__bar span { width: 15%; }
.cohort--mid   .cohort__bar span { width: 31%; }
.cohort--viral .cohort__bar span { width: 54%; background: var(--accent); }
.cohort--viral .cohort__views { color: var(--accent); }
.cohort__reach {
  grid-column: 1 / -1;
  font-size: var(--step--1);
  color: var(--text-3);
  justify-self: end;
  margin-top: -.15rem;
}
.cohorts__foot {
  padding: 1.1rem 1.3rem 1.2rem;
  font-size: var(--step--1);
  line-height: 1.6;
  color: var(--text-2);
  background: var(--bg-2);
}
.cohorts__foot b { color: var(--text); font-weight: 600; }

.page__back { margin-top: clamp(1.6rem, 1.2rem + 1.5vw, 2.4rem); }

/* ---------- Что управляет цифрами ---------- */
.drivers {
  margin-top: clamp(1.2rem, .9rem + 1vw, 1.9rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.drivers__head { display: flex; flex-direction: column; gap: .5rem; }
.drivers__t { font-weight: 600; font-size: var(--step-1); line-height: 1.3; }
.drivers__d { color: var(--text-2); font-size: var(--step--1); line-height: 1.55; max-width: var(--measure); }
.drivers__list { display: grid; gap: .7rem; }
.drivers__list li { color: var(--text-2); font-size: var(--step--1); line-height: 1.55; }
.drivers__list b { color: var(--text); font-weight: 600; }
.drivers__foot {
  border-top: 1px solid var(--line);
  padding-top: .9rem;
  font-size: var(--step--1);
  line-height: 1.6;
  color: var(--text-2);
  max-width: var(--measure);
}

/* ---------- Калькулятор ---------- */
.calc {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: clamp(1.1rem, .8rem + 1.2vw, 1.8rem);
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
  box-shadow: var(--shadow);
}
.calc__controls { display: flex; flex-direction: column; gap: .9rem; }

.calc__slider {
  appearance: none;
  width: 100%;
  height: 2.75rem;   /* 44px — минимальная тап-цель на телефоне */
  background: transparent;
  cursor: pointer;
}
.calc__slider::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px; background: var(--line-strong);
}
.calc__slider::-moz-range-track {
  height: 4px; border-radius: 2px; background: var(--line-strong);
}
.calc__slider::-webkit-slider-thumb {
  appearance: none;
  width: 1.5rem; height: 1.5rem;
  margin-top: -.625rem;   /* (24px бегунок − 4px трек) / 2 */
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}
.calc__slider::-moz-range-thumb {
  width: 1.5rem; height: 1.5rem;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.calc__out {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.calc__cell {
  background: var(--bg);
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.calc__cell--key { background: var(--bg-2); }
.calc__v {
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.calc__cell--key .calc__v.is-plus  { color: var(--ok); }
.calc__cell--key .calc__v.is-minus { color: var(--danger); }
.calc__cell--key .calc__v.is-edge  { color: var(--accent); }
.calc__l { font-size: var(--step--1); color: var(--text-3); line-height: 1.4; }

.calc__verdict {
  font-size: var(--step-0);
  line-height: 1.55;
  padding: .85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--text-2);
}
.calc__verdict.is-plus  { border-left-color: var(--ok); }
.calc__verdict.is-minus { border-left-color: var(--danger); }
.calc__verdict.is-edge  { border-left-color: var(--accent); }
.calc__verdict b { color: var(--text); font-weight: 600; }

/* Элементы графика окупаемости */
/* График живёт внутри карточки калькулятора: своя рамка на том же фоне
   не читается, зато набегает двойной отступ. */
.calc .chart { border: 0; background: transparent; padding: 0; }

.chart__band  { fill: var(--steel-soft); }
.chart__edge  { fill: none; stroke: var(--steel); stroke-width: 2;
                stroke-linecap: round; stroke-linejoin: round; }
.chart__zero  { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 3; }
.chart__mark  { stroke: var(--accent); stroke-width: 1.5; }
.chart__dot   { fill: var(--accent); }
.chart__label { fill: var(--text-3); font-size: 10px; font-family: var(--font-mono); }

/* ---------- Шаги процедуры ---------- */
.steps { display: grid; gap: 1px; background: var(--line);
         border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.step {
  background: var(--bg);
  padding: 1.05rem 1.1rem;
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: .1rem .8rem;
  align-items: baseline;
}
.step__n {
  font-family: var(--font-display);
  font-size: var(--step-1);
  color: var(--accent);
  line-height: 1.2;
}
.step__b { display: flex; flex-direction: column; gap: .2rem; }
.step__t { font-weight: 600; }
.step__d { font-size: var(--step--1); color: var(--text-2); line-height: 1.5; }

/* ---------- Экраны шире телефона ---------- */
/* Цепочка становится горизонтальной только с 60rem: на 640–800px на шаг
   приходится около 65px под контент, и «14 400» переносится посреди разряда. */
@media (min-width: 60rem) {
  .chain { flex-direction: row; align-items: stretch; }
  /* space-between, а не center: вертикальная надпись между шагами задаёт
     высоту больше содержимого, и при центрировании числа в соседних ячейках
     оказываются на разной высоте — ряд не выстраивается. */
  .chain__step { flex: 1; justify-content: space-between; }
  .chain__op {
    display: flex; align-items: center;
    border-block: 0; border-inline: 1px solid var(--line);
    writing-mode: vertical-rl;
    padding: 1.1rem .3rem;
    text-align: center;
  }
}

@media (min-width: 40rem) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gains__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1.6rem; }
  .drivers__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1.6rem; }
  /* На широком экране когорта — одна строка: название, доля, среднее, полоса, охват */
  .cohort {
    grid-template-columns: 8rem 11rem 8rem 1fr 3rem;
    align-items: center;
    gap: 0 1.1rem;
  }
  .cohort__share { grid-column: auto; }
  .cohort__views { grid-row: auto; grid-column: auto; text-align: left; }
  .cohort__bar { grid-column: auto; margin-top: 0; }
  .cohort__reach { grid-column: auto; margin-top: 0; }
  .calc__controls { flex-direction: row; align-items: flex-end; gap: 1.6rem; }
  .calc__controls .field { flex: 0 0 16rem; }
  /* Высота ползунка равна высоте поля: иначе при выравнивании по нижнему краю
     трек оказывается ниже оси поля. */
  .calc__slider { flex: 1; height: 3rem; }
  /* auto-fit, а не жёсткие четыре колонки: часть показателей ждёт подтверждения
     от владельца и до тех пор не выводится — ряд не должен разъезжаться дырой. */
  .hero__figures { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
  .figure--key { grid-column: auto; }
  .hero__cta { flex-direction: row; align-items: center; gap: 1.4rem; }
  .pains { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .transfer__row { grid-template-columns: 15rem 1fr; gap: 1.5rem; align-items: baseline; }
  .charts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compare { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scope { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .videos { grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); }
  .form__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form__grid .field--wide { grid-column: 1 / -1; }
  .sticky { display: none; }
}

/* ---------- Уважение к настройкам движения ---------- */
/* Снизу 6rem зарезервированы под липкую кнопку — на широком экране её нет */
@media (min-width: 40rem) {
  .footer { padding-bottom: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
