/* ═══════════════════════════════════════════════════════════════════════════
   Лендинг «Педагогического помощника».
   Отдельная статика, вне Next.js. Токены и приёмы скопированы из
   frontend/app/globals.css — лендинг и приложение должны читаться как один
   продукт. При правке палитры в приложении поправить и здесь (см. DECISIONS.md).
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Палитра — 1:1 с приложением */
  --primary: #183451;
  --primary-strong: #0f2740;
  --primary-soft: #e3e8ee;
  --primary-ring: rgba(24, 52, 81, 0.2);

  --accent: #a9501c;
  --accent-strong: #8c4115;
  --accent-deep: #8f4216;
  --accent-soft: #f3e2d3;

  --coffee: #6e4a26;
  --amber: #b0761a;
  --amber-soft: #f6e7c6;

  --text: #183451;
  --muted: #6a7482;
  --sand: #d4af83;
  --sand-soft: #efe2c9;
  --bg: #f3ecde;
  --surface: #ffffff;
  --border: #e7d9c0;

  --radius: 12px;
  --radius-lg: 14px;
  --radius-btn: 10px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(58, 44, 26, 0.06), 0 1px 3px rgba(58, 44, 26, 0.05);
  --shadow-md: 0 6px 20px rgba(58, 44, 26, 0.08), 0 2px 6px rgba(58, 44, 26, 0.05);
  --shadow-lg: 0 18px 44px rgba(58, 44, 26, 0.15), 0 5px 14px rgba(58, 44, 26, 0.08);

  --maxw: 1150px;   /* как .home-page в приложении */
  --gutter: 1.6rem;
  --header-h: 69px; /* 68px шапки + 1px границы — вычитается из высоты героя */

  /* ─── Наложенные элементы первого экрана ───
     Чтобы заменить заглушку на настоящую картинку, правим две соседние
     строки: путь и пустую подпись. Файлы класть в landing/img/. */
  /* Скриншот в телефоне. Сейчас подставлена заглушка 600×1300;
     чтобы поставить настоящий снимок — заменить файл img/phone.png. */
  /* Размеры наложений — в процентах от ширины колонки, см. .ov-phone */

  /* Типографика. На 1366px значения совпадают с прежними, к 1920px крупнее.
     Формула clamp(min, Apx + Bvw, max) подобрана так, чтобы нижний край
     приходился ровно на 1366px, а верхний — на 1920px. */
  --fs-base: clamp(18px, 13.07px + 0.36vw, 20px);          /* 18 → 20 */
  --fs-h2: clamp(36px, 6.4px + 2.17vw, 48px);              /* 36 → 48 */
  --fs-section-sub: clamp(19px, 11.62px + 0.54vw, 22px);   /* 19 → 22 */
  --fs-card-title: clamp(22px, 12.14px + 0.72vw, 26px);    /* 22 → 26 */
  --fs-card-text: clamp(17px, 12.07px + 0.36vw, 19px);     /* 17 → 19 */
  /* Карточки помощников крупнее остальных — держим их на ступень выше */
  --fs-agent-title: clamp(24px, 14.14px + 0.72vw, 28px);
  --fs-agent-text: clamp(14.5px, 9.57px + 0.36vw, 16.5px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ═════════════ Появление ═════════════ */
/* Один кейфрейм на всё: сдвиг 24px вверх + проявление, 0.5s ease-out.
   Сдвиг через translate, а не transform, чтобы не спорить с transform
   у телефона (наклон) и с подъёмом карточек при наведении. Заливка
   backwards: до старта элемент скрыт, после — живёт обычными стилями. */
@keyframes rise-in {
  from { opacity: 0; translate: 0 24px; }
  to { opacity: 1; translate: 0 0; }
}
/* Герой — при загрузке, по очереди (задержки заданы в разметке) */
.js .hero-in { animation: rise-in 0.5s ease-out var(--in-delay, 0ms) backwards; }
/* Секции — при прокрутке: класс .is-visible вешает script.js один раз;
   соседи в одном контейнере выходят с шагом 80ms (--reveal-delay). */
.js .reveal { opacity: 0; }
.js .reveal.is-visible { opacity: 1; animation: rise-in 0.5s ease-out var(--reveal-delay, 0ms) backwards; }
/* Шапка залипающая: без этого секция после перехода по меню уезжала под неё.
   Ровно высота шапки — тогда граница секции совпадает с нижним краем шапки
   и сверху не остаётся полоски предыдущей секции. Воздух над заголовком
   даёт собственный верхний отступ секции. */
main[id], section[id] { scroll-margin-top: var(--header-h); }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body {
  background:
    radial-gradient(1200px 560px at 50% -12%, #f9f3e7 0%, rgba(249, 243, 231, 0) 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3 { font-weight: 700; letter-spacing: -0.5px; text-wrap: balance; margin: 0 0 0.4em; }
/* pretty не пускает последнее слово абзаца на отдельную строку (там, где браузер
   это умеет); где не умеет — страхуют неразрывные пробелы в текстах. */
p, li { text-wrap: pretty; }
p { margin: 0 0 0.85em; }
a { color: var(--accent); }
img, svg { max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* Иконки: единый линейный стиль, как в приложении (lucide, currentColor) */
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sprite { display: none; }

/* Элементы только для мобильной вёрстки: гамбургер с меню, цитата
   в модалке, короткие варианты текстов и списков, стрелка в плашке.
   Десктоп их не видит вообще. */
.nav-toggle, .mobile-menu { display: none; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--radius-btn) 0;
}
.skip-link:focus { left: 0; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* ——— Кнопки (из globals.css) ——— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 54px; padding: 0 1.5rem;
  font: inherit; font-size: 1.02rem; font-weight: 600;
  border: 1.5px solid transparent; border-radius: var(--radius-btn); cursor: pointer;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.08s, color 0.18s;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-soft); }
.btn-primary { background: var(--accent); color: var(--bg); box-shadow: 0 3px 10px rgba(169, 80, 28, 0.25); }
.btn-primary:hover { background: var(--accent-deep); box-shadow: 0 6px 18px rgba(169, 80, 28, 0.3); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-ghost:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-strong); }
.btn-sm { min-height: 44px; padding: 0 1rem; font-size: 0.95rem; }
.btn-lg { min-height: 60px; padding: 0 2rem; font-size: 1.1rem; }
.btn-block { width: 100%; }

/* ——— Шапка ——— */
/* Два состояния. Наверху шапка прозрачная и лежит поверх тёмного героя —
   логотип и меню кремовые. После прокрутки (класс вешает script.js)
   становится светлой панелью с размытием, текст — тёмно-синий. */
/* Шапка всегда кремовая с размытием и тонкой нижней границей; состояний нет,
   герой начинается сразу под ней. */
.site-header {
  position: sticky; top: 0; z-index: 40;
  /* Полностью непрозрачный кремовый фон: без backdrop-filter оттенок не зависит
     от того, что прокручивается под шапкой (тёмный герой, карточки тарифов) */
  background: #f3ecde;
  border-bottom: 1px solid rgba(24, 52, 81, 0.08);
  box-shadow: 0 2px 14px rgba(24, 52, 81, 0.07);
}
.header-inner { display: flex; align-items: center; gap: 1.2rem; min-height: 68px; }
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem; flex: none; min-width: 0;
  text-decoration: none; color: var(--primary);
}
/* На узком экране название усекается, а не выталкивает кнопку за край */
.brand-text { font-weight: 800; font-size: 1.05rem; letter-spacing: -0.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Знак: та же книга «ПП», что в favicon (кремовая обложка, песочный корешок,
   терракотовая закладка), на тёмно-синем квадрате r≈8px — подложка нужна,
   чтобы кремовая книга читалась на кремовой шапке после прокрутки.
   Размеры в атрибутах, чтобы вёрстка не прыгала до загрузки. */
/* Знак — PNG 128px (картинка из референса как есть), показывается 52/40px: резко на retina */
.brand-logo { flex: none; display: block; width: 52px; height: 52px; }
.footer-brand .brand-logo { width: 40px; height: 40px; }

.site-nav { margin-left: auto; display: flex; gap: 1.05rem; }
.site-nav a {
  color: rgba(24, 52, 81, 0.75); text-decoration: none; font-size: 0.92rem; font-weight: 600;
  padding: 4px 0; border-bottom: 2px solid transparent; white-space: nowrap;
  transition: color 0.16s, border-color 0.16s;
}
.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active { color: var(--primary); border-bottom-color: var(--accent); outline: none; }
.header-cta { flex: none; white-space: nowrap; }

/* ——— Секции ——— */
.section { padding: 3rem 0; }
.section-alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.2));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-head { max-width: 48rem; margin: 0 0 1.8rem; }
/* Тарифы — вся секция в один экран 1920x1080, бюджет по вертикали в отчёте */
/* Бюджет по вертикали на 1920×1080 (шапка 80, доступно 900): 32 + заголовок
   + 16 + переключатель 40 + 12 + карточки ≤460 + 20 + плашка 88 + 32 */
#pricing { padding-top: 32px; padding-bottom: 32px; }
#pricing .section-head { margin-bottom: 16px; }
#pricing .section-head h2 { font-size: 40px; margin-bottom: 6px; }
#pricing .section-sub { font-size: 18px; }
/* Вопросы — компактная секция в один экран: без подзаголовка, заголовок мельче */
#faq { padding-top: 48px; padding-bottom: 64px; }
#faq .section-head { margin-bottom: 24px; }
#faq .section-head h2 { font-size: 40px; margin-bottom: 0; }
.section-head h2 {
  font-size: var(--fs-h2); color: var(--primary); margin: 0 0 0.5rem;
  display: flex; align-items: flex-start; gap: 0.7rem;
}
/* Кружок держим на уровне первой строки — иначе при переносе он уезжает в середину */
.section-head h2::before {
  content: ""; flex: none; width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent); margin-top: 0.62em;
}
/* 70ch — предел, после которого строку тяжело читать (строки не тянутся
   на всю широкую сетку) */
.section-sub { color: var(--muted); font-size: var(--fs-section-sub); margin: 0; max-width: 70ch; }
.eyebrow {
  display: block; color: var(--accent); font-weight: 700; font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px;
}

/* ═════════════ Первый экран ═════════════ */
/* Весь блок на тёмно-синем во всю ширину окна, высотой ровно в экран минус
   шапка (она остаётся кремовой). Две колонки: слева текст, справа коллаж.
   Базовые правила — мобильные (одна колонка); две колонки включаются от 1280px
   в конце файла: ниже левой колонке не хватает ширины под H1 в 48px. */
.hero {
  position: relative; overflow: hidden;
  background: var(--primary); color: var(--bg);
  padding: 2.4rem 0 0;
}
.hero-inner { position: relative; z-index: 1; }
.hero-copy { position: relative; z-index: 1; }
.hero .eyebrow { color: var(--sand); }
.hero h1 {
  /* 52px на 1366, 72px на 1920. Предел задаёт строка «вечер свободен»:
     при 72px она занимает 551px в колонке 640px. */
  font-size: clamp(34px, 2.7px + 3.61vw, 72px);
  line-height: 1.12; color: #fdf6ea; margin: 0 0 16px;
}
.hero h1 .hl { color: var(--sand); }
.lead {
  font-size: clamp(16px, 13.07px + 0.36vw, 20px);
  line-height: 1.55; color: rgba(243, 236, 222, 0.85);
  max-width: 40ch; margin: 0 0 24px;
}
.hero-cta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.cta-note { color: var(--muted); font-size: 0.95rem; }
.cta-note-light { color: rgba(243, 236, 222, 0.75); }

/* Круги-декор во всю площадь героя (приём с карточек помощников) */
.hero-band { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
/* Лёгкий шум поверх фона героя разбивает плавные переходы теней на кольца */
.hero-band::after {
  content: ""; position: absolute; inset: 0; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}
.band-blob { position: absolute; border-radius: 50%; }
.band-blob-1 { width: 620px; height: 620px; right: -180px; top: -220px; background: rgba(169, 80, 28, 0.28); }
.band-blob-2 { width: 520px; height: 520px; left: -190px; bottom: -220px; background: rgba(212, 175, 131, 0.12); }

/* Корпус монитора: тонкая тёмная рамка, снизу чуть толще — под ней ножка */
.shot-frame {
  margin: 0;
  background: #1b1d21; border-radius: 18px;
  padding: 12px 12px 28px;
  /* Компактная тень (blur ≤ 40px): широкое размытие на тёмном фоне давало
     ступенчатые кольца (banding) */
  box-shadow: 0 18px 36px rgba(4, 12, 22, 0.35), 0 4px 12px rgba(4, 12, 22, 0.3);
}
.shot-body { display: block; }

/* Ножка: шея и плоское основание. Размеры в процентах от ширины монитора —
   на 1920 это ровно 90×110 и 340×14, на меньших пропорционально мельче. */
.stand { position: relative; width: 100%; height: 13.47cqw; }
.stand-neck, .stand-base {
  position: absolute; left: 50%; transform: translateX(-50%);
  background: #1b1d21;
}
.stand-neck { top: 0; width: 9.78%; height: 11.95cqw; }
.stand-base {
  bottom: 0; width: 36.94%; height: 1.52cqw; border-radius: 7px;
  box-shadow: 0 8px 20px rgba(4, 12, 22, 0.35);
}
/* Радиальное свечение под основанием убрано — на тёмном фоне оно ложилось кольцами */
/* Файл уже обрезан (1902×832) — кадрировать в CSS нечего */
.shot-img { display: block; width: 100%; height: auto; border-radius: 6px; }

/* ═════════════ Коллаж справа ═════════════ */
/* Размеры и вылеты — в процентах от ширины колонки, поэтому коллаж
   масштабируется вместе с ней и не требует отдельных брейкпойнтов.
   padding-bottom держит свес телефона внутри габарита колонки — иначе
   выключка по центру считалась бы по одной рамке и коллаж уехал бы вниз. */
/* Сцена — во всю высоту героя. Обёртка .stage-shot держит всю композицию:
   её высота = рамка + нижнее поле под свес телефона, поэтому обычное
   центрирование (top: 50% + сдвиг на половину) оставляет сверху и снизу
   поровну. Скриншот — 87.9% полосы (≈920px на 1920), телефон прижат к низу
   обёртки, а поле подобрано так, что его верх приходится на ~10px ниже
   середины скриншота. */
.hero-stage { position: relative; z-index: 0; }
.stage-shot {
  position: absolute; left: 0; top: 100px;
  container-type: inline-size;
  /* Монитор опущен на 50px относительно прежних 50px сверху.
     Второе слагаемое min() — потолок по высоте окна: на низком экране
     монитор с ножкой иначе не помещался. */
  width: min(96.56%, calc(174.8vh - 382px));
}
.stage-shot .shot-frame { position: relative; z-index: 1; }

.ov { position: absolute; z-index: 2; display: none; }
/* Корпус телефона: тонкая тёмная рамка, углы 40px. Экран держит пропорцию
   файла img/phone.png (1177×2560), поэтому картинка ложится без искажений.
   Телефон стоит правее и ниже монитора и перекрывает его правый нижний угол. */
.ov-phone {
  /* Наклон +6°: верх уходит вправо, низ влево. Точка вращения — нижний
     правый угол, он же самая низкая точка, поэтому bottom задаёт низ силуэта
     напрямую. Самая правая точка — верхний правый угол, он отходит от точки
     вращения на высоту x sin6deg = 56px, на столько же сдвинут right, чтобы
     наклонённый габарит не подходил к окну ближе 3vw. */
  /* 205px корпуса + наклон 6 градусов дают габарит ровно 250px:
     w x cos6 + h x sin6 = 205 x 0.9945 + 439 x 0.1045 = 250.
     right 46px = h x sin6 — на столько верхний правый угол отходит от точки
     вращения, поэтому габарит не подходит к окну ближе 3vw. */
  right: 46px; bottom: 50px;
  width: 205px; height: auto; aspect-ratio: 1 / 2.142;
  transform: rotate(6deg); transform-origin: bottom right;
  padding: 1.4%; border-radius: 40px;
  background: #1b1d21;
  box-shadow: 0 16px 36px rgba(4, 12, 22, 0.35), 0 4px 12px rgba(4, 12, 22, 0.3);
}
.ov-phone .ov-screen {
  display: block; width: 100%; aspect-ratio: 1177 / 2560;
  border-radius: 32px;
  /* phone-520: 520×1131 — 2x от показа ≤260px; WebP через image-set, PNG — запасной
     для браузеров без image-set/type() (старые Safari берут первую строку) */
  background: #d7dbe0 url("img/phone-520.png") center / cover no-repeat;
  background-image: image-set(url("img/phone-520.webp") type("image/webp") 1x, url("img/phone-520.png") type("image/png") 1x);
}

/* ═════════════ Как это работает ═════════════ */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
/* Короткие заголовки шагов — только для десктопной полосы (≥1021px, см. ниже) */
.t-desk { display: none; }
.step {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  box-shadow: var(--shadow-sm);
}
/* Высоту строк внутри карточек выравнивает subgrid (см. конец файла).
   Здесь — только кегль и отступы одиночной колонки. */
.step h3 { font-size: var(--fs-card-title); line-height: 1.25; color: var(--primary); margin: 16px 0 12px; }
.step p { margin: 0; color: var(--muted); font-size: var(--fs-card-text); }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--primary-soft); color: var(--primary);
  font-weight: 800; font-size: 1.15rem;
}
/* Шаг с фото учебника — главная особенность, поэтому выделен терракотой */
.step-accent {
  background: linear-gradient(180deg, #fff 0%, #fdf4ea 100%);
  border-color: var(--sand);
  box-shadow: var(--shadow-md);
}
.step-accent .step-num { background: var(--accent); color: var(--bg); }
.step-badge {
  position: absolute; top: -14px; left: 28px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--radius-pill);
  background: var(--accent); color: var(--bg);
  font-size: 0.8rem; font-weight: 700;
  box-shadow: 0 3px 10px rgba(169, 80, 28, 0.25);
}
.step-badge svg { stroke-width: 2.2; }

/* ═════════════ Карточки помощников ═════════════ */
/* Приёмы из .agent-card в globals.css: цветная подложка, круги-декор,
   квадрат с иконкой. Цвета каждой карточки заданы инлайн в index.html. */
.agents-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.agent-card {
  position: relative; overflow: hidden;
  border-radius: 16px; padding: 24px;
  background: var(--card-bg);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
  /* карточка — кнопка: открывает модальное окно помощника */
  display: flex; flex-direction: column; align-items: flex-start;
  border: none; text-align: left; font: inherit; cursor: pointer; width: 100%;
}
.agent-card:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-ring), var(--shadow-lg); }
.agent-card > *:not(.ac-blob) { position: relative; z-index: 1; }
.agent-card:hover { transform: translateY(-4px); filter: brightness(1.05); box-shadow: 0 22px 48px rgba(58, 44, 26, 0.22), 0 6px 16px rgba(58, 44, 26, 0.1); }
.ac-blob { position: absolute; border-radius: 50%; pointer-events: none; }
.ac-blob-1 { width: 170px; height: 170px; background: var(--blob-1); right: -52px; top: -52px; }
.ac-blob-2 { width: 140px; height: 140px; background: var(--blob-2); right: 26px; bottom: -74px; }
.ac-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--sq-bg); color: var(--sq-fg);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.ac-title { margin: 0 0 8px; font-size: var(--fs-agent-title); font-weight: 500; line-height: 1.15; color: var(--title-c); }
/* Справа — место под значок ↗ и круги, чтобы текст на них не заезжал */
.ac-title, .ac-line { padding-right: 36px; }
/* Строка под названием — коротко, что получите. Подробности (цитата,
   список) живут только в модалке, карточка их не дублирует. */
.ac-line { margin: 0; font-size: var(--fs-agent-text); line-height: 1.4; color: var(--desc-c); opacity: 0.9; }
/* Значок «развернуть» в правом верхнем углу — сигнал, что карточка открывается */
/* Селектор с .agent-card: общее правило .agent-card > *:not(.ac-blob) ставит
   position: relative всем детям и иначе делало значок элементом subgrid */
.agent-card > .ac-open {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(243, 236, 222, 0.16); color: var(--title-c);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.17s ease, background 0.17s ease;
}
.agent-card:hover .ac-open { background: rgba(243, 236, 222, 0.28); transform: translate(1px, -1px); }


/* Подложки иконок — те же, что в приложении */
.plate-blue { background: var(--primary-soft); color: var(--primary); }
.plate-terracotta { background: var(--accent-soft); color: var(--accent-strong); }
.plate-sand { background: var(--sand-soft); color: #8a6a37; }
.plate-amber { background: var(--amber-soft); color: var(--amber); }

/* ═════════════ Отзывы ═════════════ */
.reviews-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.review {
  position: relative; margin: 0; padding: 1.6rem 1.4rem 1.3rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.review.is-placeholder { border-style: dashed; background: #fffdf8; }
.review-tag {
  position: absolute; top: -11px; left: 1.4rem;
  padding: 3px 10px; border-radius: var(--radius-pill);
  background: var(--sand-soft); color: #7d5c2c;
  font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
}
.review blockquote { margin: 0 0 1.1rem; color: var(--muted); font-size: 1rem; line-height: 1.55; }
.review blockquote::before { content: "«"; color: var(--sand); font-size: 1.4rem; font-weight: 700; margin-right: 2px; }
.review blockquote::after { content: "»"; color: var(--sand); font-size: 1.4rem; font-weight: 700; margin-left: 2px; }
.review figcaption { display: flex; flex-direction: column; gap: 2px; }
.review-name { font-weight: 700; color: var(--primary); font-size: 0.95rem; }
.review-meta { font-size: 0.85rem; color: var(--accent); }

/* ═════════════ Тарифы ═════════════ */
/* Три карточки: «Бесплатно» и «Про» — белые, «Стандарт» по центру — тёмный
   акцентный, приподнят и с бейджем «Популярный». Строки выровнены subgrid'ом
   (название / цена / подпись под ценой / список / кнопка), списки одинаковой
   длины — тарифы сравниваются построчно. Переключатель «Месяц | Год» один,
   над карточками; пересчёт цен — script.js. */
.plans-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(5, auto);
  column-gap: 24px; row-gap: 0; align-items: stretch;
  padding-top: 14px; /* место под сдвиг «Стандарта» вверх и бейдж */
}
.plan {
  position: relative; display: grid; grid-template-rows: subgrid; grid-row: span 5;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 22px 24px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.plan-featured {
  background: var(--primary); border-color: var(--primary);
  color: var(--bg); box-shadow: var(--shadow-lg);
  transform: translateY(-14px);
}
.plan-featured:hover { transform: translateY(-18px); box-shadow: 0 24px 52px rgba(24, 52, 81, 0.32), 0 6px 16px rgba(24, 52, 81, 0.16); }
/* Бейдж «Популярный» — пилюля на верхней кромке карточки */
.plan-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  padding: 5px 14px; border-radius: var(--radius-pill); white-space: nowrap;
  background: var(--accent); color: var(--bg);
  font-size: 13px; font-weight: 700; line-height: 1.3; letter-spacing: 0.2px;
  box-shadow: 0 3px 10px rgba(169, 80, 28, 0.3);
}
.plan-name { grid-row: 1; font-size: 22px; line-height: 1.2; color: var(--primary); margin: 0 0 10px; }
.plan-featured .plan-name { color: #fdf6ea; }
.plan-price { grid-row: 2; align-self: end; margin: 0; color: var(--accent); }
.plan-featured .plan-price { color: #fdf6ea; }
.price-line { display: flex; align-items: baseline; gap: 8px; font-size: 36px; font-weight: 800; line-height: 1.1; letter-spacing: -0.5px; }
.price-per { font-size: 16px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.plan-featured .price-per { color: rgba(243, 236, 222, 0.75); }
/* Подпись под ценой: «≈ 333 ₽ в месяц» при годовом периоде (у «Бесплатно» —
   «навсегда, без карты»). Строка есть всегда — карточки не прыгают. */
.price-sub { grid-row: 3; min-height: 20px; margin: 4px 0 0; font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--muted); }
.plan-featured .price-sub { color: var(--sand); }
.plan-list { grid-row: 4; display: flex; flex-direction: column; gap: 0; margin: 18px 0 22px; padding: 0; list-style: none; }
.plan-list li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-top: 1px solid var(--border);
  font-size: 15px; line-height: 1.3; letter-spacing: -0.1px; color: #46566a;
}
.plan-list li:last-child { border-bottom: 1px solid var(--border); }
.plan-featured .plan-list li { color: rgba(243, 236, 222, 0.88); border-color: rgba(243, 236, 222, 0.18); }
.pf-k { flex: 1; min-width: 0; }
.pf-v { flex: none; font-weight: 800; font-size: 16px; color: var(--primary); }
.plan-featured .pf-v { color: #fdf6ea; }
.pf-v-text { font-size: 14px; font-weight: 700; }
.pf-v-no { color: var(--muted); font-weight: 600; }
.pf-v-yes { color: var(--accent); }
.plan-featured .pf-v-yes { color: var(--sand); }
.pf-note-ref { font-size: 0.7em; color: var(--accent); margin-left: 1px; }
.plan-featured .pf-note-ref { color: var(--sand); }
/* Кнопки трёх карточек на одной линии — своей строкой subgrid */
.plan .btn { grid-row: 5; align-self: end; margin-top: 0; min-height: 48px; font-size: 18px; white-space: nowrap; }
.plan-featured .btn-ghost { color: #fdf6ea; border-color: rgba(243, 236, 222, 0.5); }
/* Сноска под карточками */
.plans-note { margin: 18px 0 0; font-size: 14px; line-height: 1.4; color: var(--muted); }

/* ═════════════ Переключатель периода ═════════════ */
/* Пилюля из двух сегментов «Месяц | Год» по центру над карточками; активный — терракотовый. */
.period {
  display: inline-flex; gap: 4px; padding: 3px; margin: 0 auto 22px;
  position: relative; left: 50%; transform: translateX(-50%);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-pill); box-shadow: var(--shadow-sm);
}
.period-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 34px; padding: 0 20px; border: 0; border-radius: var(--radius-pill);
  background: none; color: var(--primary); font: inherit; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: background 0.15s, color 0.15s;
}
.period-btn:hover { background: var(--primary-soft); }
.period-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.period-btn.is-active { background: var(--accent); color: var(--bg); }

/* ═════════════ Вопросы ═════════════ */
/* Разметка — <details>/<summary>: на десктопе все открыты (open в HTML),
   вид прежний — две колонки карточек с видимыми ответами; ниже 768px
   та же разметка работает аккордеоном. */
.qa-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px; margin: 0;
}
/* Каждая пара «вопрос-ответ» — белая карточка, как плашки-преимущества */
.qa {
  margin: 0; padding: 16px 20px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow-sm);
}
.qa-q {
  display: block; list-style: none; cursor: default;
  margin: 0 0 8px;
  font-weight: 700; font-size: 19px; line-height: 1.4;
  color: var(--primary);
}
.qa-q::-webkit-details-marker { display: none; }
/* Стрелка нужна только в аккордеоне на телефоне */
.qa-chev { display: none; }
.qa-a {
  margin: 0; max-width: 70ch;
  color: var(--muted); font-size: 16px; line-height: 1.4;
}
.qa-a a { color: var(--accent); }

/* ═════════════ Финал ═════════════ */
.final {
  background:
    radial-gradient(700px 320px at 15% 0%, #24466b 0%, rgba(36, 70, 107, 0) 70%),
    var(--primary);
  color: var(--bg);
  padding: 3.2rem 0;
  position: relative; overflow: hidden;
}
/* Круг-декор, как на карточках агентов */
.final::after {
  content: ""; position: absolute; right: -110px; bottom: -150px;
  width: 340px; height: 340px; border-radius: 50%;
  background: rgba(212, 175, 131, 0.14);
}
.final-inner { position: relative; z-index: 1; text-align: center; }
.final h2 { font-size: 2.2rem; color: #fdf6ea; margin: 0 0 0.6rem; }
.final p { color: rgba(243, 236, 222, 0.85); font-size: 1.1rem; margin: 0 auto 1.8rem; max-width: 70ch; }
.final-btn { background: var(--sand); color: #3a2a16; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); }
.final-btn:hover { background: #e2c39b; transform: translateY(-1px); }
.final .cta-note { display: block; margin-top: 0.9rem; }

/* ═════════════ Подвал ═════════════ */
/* Светлый подвал в цвет шапки: кремовый фон, тонкая верхняя граница,
   текст и ссылки тёмно-синие, копирайт приглушённый */
.site-footer {
  background: rgba(243, 236, 222, 0.94); color: var(--primary);
  border-top: 1px solid rgba(24, 52, 81, 0.08); padding: 2.2rem 0;
}
.footer-inner { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; color: var(--primary); }
.footer-links { margin-left: auto; display: flex; gap: 1.4rem; flex-wrap: wrap; }
.footer-links a, .footer-links a:visited { color: rgba(24, 52, 81, 0.75); text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { color: var(--primary); text-decoration: underline; text-decoration-color: var(--accent); }
.footer-copy { font-size: 0.9rem; color: var(--muted); white-space: nowrap; }

/* ═════════════ Страницы-заглушки (privacy / offer) ═════════════ */
.doc-page {
  max-width: 760px; margin: 0 auto; padding: 48px var(--gutter) 72px;
  font-size: 18px; line-height: 1.6;
}
.doc-page h1 {
  font-size: 36px; line-height: 1.2; color: var(--primary); margin: 0 0 12px;
  /* страховка для 320px: «конфиденциальности» там шире колонки и иначе
     распирает страницу по горизонтали */
  overflow-wrap: break-word;
}
.doc-page h2 { font-size: 24px; line-height: 1.3; color: var(--primary); margin: 36px 0 12px; }
.doc-page p { margin: 0 0 14px; color: #46566a; }
/* Подзаголовок документа и строка «Редакция от…» под H1 */
.doc-lead { font-size: 20px; line-height: 1.45; color: var(--primary); }
.doc-meta { font-size: 15px; color: var(--muted); }
/* Перечисления внутри пунктов: в .md они набраны тире, здесь — точка */
/* Таблица тарифов в оферте: первая колонка — названия строк */
.doc-table-wrap { overflow-x: auto; margin: 0 0 16px; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.35; color: #46566a; }
.doc-table th, .doc-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); text-align: center; vertical-align: top; }
.doc-table th { font-weight: 700; color: var(--primary); }
.doc-table thead th { border-bottom: 2px solid var(--sand); }
.doc-table th[scope="row"] { text-align: left; font-weight: 600; }
/* числовые колонки — по содержимому, названиям строк остаётся вся ширина (важно на телефоне) */
.doc-table td, .doc-table thead th:not(:first-child) { width: 1%; white-space: nowrap; }
@media (max-width: 768px) { .doc-table { font-size: 14px; } .doc-table th, .doc-table td { padding: 7px 5px; } .doc-table th[scope="row"] { padding-left: 0; } }
.doc-list { margin: 0 0 14px; padding: 0; list-style: none; }
.doc-list li { position: relative; padding-left: 1.5rem; margin-bottom: 6px; color: #46566a; }
.doc-list li::before {
  content: ""; position: absolute; left: 3px; top: 0.66em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--sand);
}
.doc-back {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-top: 36px; font-weight: 700; font-size: 17px; text-decoration: none;
}
.doc-back:hover { text-decoration: underline; }

/* Осталось от страниц-заглушек, пока не удалено из разметки */
.doc-stub {
  margin-top: 1.6rem; padding: 1.6rem;
  border: 2px dashed var(--border); border-radius: var(--radius-lg);
  background: #fffdf8; color: var(--muted);
}

/* ═════════════ Тёмные секции (ритм страницы) ═════════════ */
.section-dark {
  background:
    radial-gradient(760px 340px at 12% 0%, #24466b 0%, rgba(36, 70, 107, 0) 72%),
    var(--primary);
  color: rgba(243, 236, 222, 0.85);
  border: none;
}
.section-head-light h2 { color: #fdf6ea; }
.section-head-light h2::before { background: var(--sand); }
.section-head-light .section-sub { color: rgba(243, 236, 222, 0.72); }

/* ═════════════ Что вы получаете: «Было → Стало» ═════════════ */
/* Пять пар строк на тёмном фоне, без рамок и подложек: слева приглушённое
   «как обычно», стрелка, справа крупное «с помощником» с песочной галочкой.
   Пары выровнены по верху — длинные строки могут занимать две строки. */
.was-now { max-width: none; }
.wn-labels, .wn-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr);
  align-items: start; column-gap: 12px;
}
.wn-labels { padding: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(243, 236, 222, 0.5); }
.wn-labels span:last-child { color: var(--sand); padding-left: 34px; }
.wn-row { padding: 18px 0; border-top: 1px solid rgba(212, 175, 131, 0.22); }
.wn-row:last-child { border-bottom: 1px solid rgba(212, 175, 131, 0.22); }
.wn-was {
  margin: 0; padding-top: 0.15em; font-size: 18px; line-height: 1.4; color: rgba(243, 236, 222, 0.55); text-wrap: balance;
}
.wn-arrow { text-align: center; padding-top: 0.2em; font-size: 22px; line-height: 1; color: rgba(243, 236, 222, 0.45); }
.wn-now {
  position: relative; margin: 0; padding-left: 34px;
  /* 20px: при 22px самая длинная пара на 1440 занимала три строки */
  font-size: 20px; line-height: 1.3; font-weight: 600; color: #fdf6ea; text-wrap: balance;
}
.wn-check { position: absolute; left: 0; top: 0.2em; color: var(--sand); stroke-width: 2.6; }

/* ═════════════ Пригласите коллегу (полоса под тарифами) ═════════════ */
/* Акцентная плашка: кремовый с песочным оттенком (30 % песочного), слева
   терракотовая полоса 4px, без тени; иконка-подарок в терракотовом кружке.
   #EADAC3 — та же смесь для браузеров без color-mix. */
.invite {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  margin-top: 20px; padding: 20px 24px 20px 22px;
  background: #eadac3; background: color-mix(in srgb, var(--sand) 30%, var(--bg));
  color: var(--primary);
  border: 0; border-left: 4px solid var(--accent); border-radius: 18px;
  box-shadow: none;
}
.invite-ico {
  flex: none; width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent); color: var(--bg);
  display: inline-flex; align-items: center; justify-content: center;
}
.invite-ico svg { width: 28px; height: 28px; }
.invite-text { flex: 1; min-width: 240px; }
.invite-title { margin: 0 0 4px; font-size: 22px; font-weight: 700; line-height: 1.2; color: var(--primary); }
.invite-text p { margin: 0; font-size: 16px; line-height: 1.4; color: rgba(24, 52, 81, 0.88); }
/* Плашка информационная: без ссылки, hover и подсветки нажатия */
.invite { cursor: default; -webkit-tap-highlight-color: transparent; }
.invite-text .invite-note { margin-top: 6px; font-size: 14px; line-height: 1.35; color: var(--muted); }

/* ═════════════ Модальные окна помощников ═════════════ */
/* Одна структура: шапка (иконка + название + крестик) — тело с прокруткой —
   подвал с кнопкой. Шапка и подвал не прокручиваются: карточка — flex column,
   прокручивается только .modal-body. На телефоне — шторка снизу (см. мобильный блок). */
.modal {
  width: min(560px, calc(100vw - 2.5rem));
  max-width: none; max-height: calc(100vh - 3rem);
  padding: 0; border: none; border-radius: 18px;
  background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.modal::backdrop { background: rgba(24, 52, 81, 0.55); backdrop-filter: blur(2px); }
.modal[open] { animation: modalIn 0.18s ease both; }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.modal-card { display: flex; flex-direction: column; max-height: calc(100vh - 3rem); }
.modal-head {
  flex: none; display: flex; align-items: center; gap: 0.9rem;
  padding: 1rem 1.3rem; background: var(--tone-soft);
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { flex: 1; margin: 0; font-size: 1.35rem; color: var(--tone); }
.modal-ico {
  flex: none; width: 44px; height: 44px; border-radius: 13px;
  background: var(--tone); color: #fdf6ea;
  display: inline-flex; align-items: center; justify-content: center;
}
.modal-close {
  flex: none; width: 40px; height: 40px; border-radius: 11px;
  border: none; background: transparent; color: var(--tone);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background 0.16s;
}
.modal-close:hover { background: rgba(0, 0, 0, 0.07); }
.modal-close:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }

.modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 1.2rem 1.3rem 1.3rem; }
.modal-what { margin: 0 0 18px; font-size: 18px; line-height: 1.45; color: var(--text); }
.modal-h {
  margin: 0 0 10px; font-size: 0.8rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.07em; color: var(--tone);
}
/* «Что получаете» — три пункта с галочками, каждый в одну строку */
.modal-checks { display: flex; flex-direction: column; gap: 8px; margin: 0 0 20px; }
.modal-checks li {
  position: relative; padding-left: 30px;
  font-size: 16px; line-height: 1.4; color: #46566a;
}
.modal-checks li::before {
  content: ""; position: absolute; left: 0; top: 0.1em;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--tone-soft);
  /* галочка — тем же тоном, что заголовок окна */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  background: var(--tone);
}
/* 11 видов заданий — три группы, ровные колонки: 3 на десктопе, 2 на телефоне */
.modal-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; margin: 0 0 20px; }
.mg h5 { margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--tone); }
.mg ul { display: flex; flex-direction: column; gap: 4px; }
.mg li { position: relative; padding-left: 14px; font-size: 15px; line-height: 1.35; color: #46566a; }
.mg li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 6px; height: 6px; border-radius: 50%; background: var(--tone); opacity: 0.7; }
/* Скрин результата — показывается только когда файл на месте (script.js) */
.modal-shot { margin: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fffdf8; }
.modal-shot[hidden] { display: none; }
.modal-shot img { display: block; width: 100%; height: auto; }
.modal-foot {
  flex: none; padding: 0.9rem 1.3rem; border-top: 1px solid var(--border); background: #fffdf8;
}

/* ═══════════════════ Адаптив ═══════════════════ */

/* Широкие экраны: сетка шире, боковые поля не меньше 48px.
   До 1600px контейнер остаётся прежним (1150px). */
@media (min-width: 1600px) {
  :root {
    --maxw: 1520px; --gutter: 48px;
  }
}

/* ═════════ Первый экран: две колонки ═════════ */
/* От 1280px: высота ровно в экран минус шапка, колонки 44/56 по центру.
   Левая колонка не уже 560px — иначе строка «Подготовка к уроку —» в 48px
   (517px) перестаёт помещаться и H1 ломается не по заданным переносам.
   Контейнер здесь шире общего (1600 против 1520): при обычной ширине
   44% не давали нужных 620px под текст. */
@media (min-width: 1280px) {
  /* высота — экран минус шапка, герой стоит под ней встык */
  .hero { height: calc(100vh - var(--header-h)); padding: 0; display: flex; align-items: center; }
  /* Герой не привязан к контейнеру страницы: слева 6vw, справа 3vw от краёв
     окна. Текстовая колонка — 640px, но не шире 40% полосы, поэтому на
     ноутбуках она сжимается вместе с экраном, а композиция забирает остаток. */
  .hero-inner {
    max-width: none; width: 100%;
    padding-left: 6vw; padding-right: 3vw;
    display: grid;
    grid-template-columns: min(580px, 40%) minmax(0, 1fr);
    /* 28px + 12px рамки корпуса = 40px от колонки до самого экрана */
    gap: 28px; align-items: center;
  }
  .ov { display: block; }
  .hero-stage { height: calc(100vh - var(--header-h)); }
  /* 48px воздуха между тёмным блоком и следующей секцией (было 80: секция не
     помещалась в экран ноутбука вместе с шапкой) */
  .hero + .section { padding-top: 48px; }
  /* «Как это работает» — компактная секция в один экран */
  #how { padding-bottom: 48px; }
}

/* ═════════ Одна линия строк в карточках ряда (subgrid) ═════════ */
/* Заголовки карточек разной длины съезжали, и описания начинались на разной
   высоте. Теперь строки задаёт родительская сетка, а карточка подхватывает их
   через grid-template-rows: subgrid и занимает нужное число строк — номер или
   иконка, заголовок и текст встают на одну линию во всех карточках ряда.
   Расстояния между строками задаёт row-gap родителя, поэтому внутренние
   margin обнулены. Работает от 1021px — ниже эти сетки складываются в одну
   колонку и выравнивать нечего. */
@media (min-width: 1021px) {
  /* steps-strip: «Как это работает» — компактная полоса без карточек: три шага в
     строку, кружок с цифрой слева, короткий заголовок (.t-desk) в одну строку,
     пример под ним мелким. Обе секции (#how и #agents) вместе — в один экран
     1366×768 с шапкой. */
  .t-desk { display: inline; }
  .t-mob { display: none; }
  /* Средняя колонка шире: в ней заголовок + бейдж «Так быстрее всего» в одну строку */
  .steps { grid-template-columns: 1fr 1.3fr 1fr; column-gap: 28px; row-gap: 0; }
  .step {
    display: grid; grid-template-columns: 40px auto minmax(0, 1fr);
    column-gap: 12px; row-gap: 2px; align-items: start;
    padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none;
  }
  .step-accent { background: none; border: 0; box-shadow: none; }
  .step-num {
    grid-column: 1; grid-row: 1 / span 2;
    width: 40px; height: 40px; border-radius: 50%; font-size: 1.05rem;
  }
  .step h3 {
    grid-column: 2; grid-row: 1; margin: 0; min-height: 0;
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px;
    font-size: clamp(17px, 0.5vw + 11px, 19px); line-height: 40px; white-space: nowrap;
  }
  .step h3 .t-desk { white-space: nowrap; }
  .step p { grid-column: 2 / span 2; grid-row: 2; margin: 0; font-size: 15px; line-height: 1.35; }
  /* Бейдж «Так быстрее всего» — своя колонка справа от заголовка шага 2 (он сосед h3, не его потомок) */
  .step-badge {
    position: static; grid-column: 3; grid-row: 1; justify-self: start; align-self: center; margin: 0; white-space: nowrap;
    padding: 3px 9px; font-size: 12px; line-height: 1.3; gap: 4px;
    box-shadow: 0 2px 6px rgba(169, 80, 28, 0.2);
  }
  .step-badge svg { width: 13px; height: 13px; }
  /* Секции «Как это работает» и «Четыре помощника»: бюджет 768 − 69 шапка = 699px */
  #how { padding-top: 34px; padding-bottom: 30px; }
  #agents { padding-top: 28px; padding-bottom: 34px; }
  #how .section-head, #agents .section-head { margin-bottom: 0.9rem; }
  #how .section-head h2, #agents .section-head h2 { margin-bottom: 0.2rem; font-size: 36px; }
  #how .section-sub { font-size: 18px; }
  #agents .agent-card { padding: 16px 18px 18px; }
  #agents .ac-icon { width: 44px; height: 44px; border-radius: 12px; margin-bottom: 6px; }
  #agents .ac-title { font-size: 24px; }
}
/* 1021–1199px: рядом с заголовком бейджу не хватает места — под примером */
@media (min-width: 1021px) and (max-width: 1199px) {
  .step-badge { grid-column: 2 / span 2; grid-row: 3; align-self: start; margin-top: 6px; }
}
}

/* Помощники на десктопе (от 1200px) — четыре карточки в ряд, высота по
   содержимому (~200px). Круги-декор только в правых углах, за пределами
   текстовой зоны; на планшете (769–1199) — базовая сетка 2×2. */
@media (min-width: 769px) {
  .agent-card { padding: 22px 20px 24px; }
  .ac-blob-1 { width: 120px; height: 120px; right: -46px; top: -50px; }
  .ac-blob-2 { width: 96px; height: 96px; right: -34px; bottom: -48px; }
}
@media (min-width: 1200px) {
  .agents-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  /* В узкой колонке строка описания идёт до края: нижний круг ниже её */
  .ac-line { padding-right: 8px; }
  .ac-blob-2 { right: -44px; bottom: -64px; }
}

@supports (grid-template-rows: subgrid) {
  @media (min-width: 1021px) {
    /* Как это работает: полоса (см. steps-strip выше) — subgrid не нужен */

  }

  /* Помощники в один ряд: иконка — название — строка. Названия в две строки
     («Раздаточный материал») не сдвигают строку описания у соседей. */
  @media (min-width: 1200px) {
    .agents-grid { grid-template-rows: repeat(3, auto); row-gap: 8px; }
    .agent-card { display: grid; grid-template-rows: subgrid; grid-row: 1 / span 3; }
    .ac-icon { margin-bottom: 8px; }
    .ac-title { margin: 0; }
  }
}

/* ═════════ Вопросы: строки карточек на одной линии ═════════ */
/* Девять карточек в три колонки — три ряда. Пустая полоса между рядами
   плюс row-gap с обеих сторон дают 16px между карточками, а внутри карточки
   вопрос от ответа отделяют те же 8px. */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 901px) {
    .qa-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      grid-template-rows: auto auto 0px auto auto 0px auto auto;
      column-gap: 12px; row-gap: 6px;
    }
    .qa { display: grid; grid-template-rows: subgrid; grid-row: 1 / span 2; }
    .qa:nth-child(n + 4) { grid-row: 4 / span 2; }
    .qa:nth-child(n + 7) { grid-row: 7 / span 2; }
    .qa-q { margin: 0 0 2px; }
    /* Chrome заворачивает содержимое details в отдельный бокс — без этого
       ответ перестаёт быть ячейкой subgrid и строки ряда расходятся */
    .qa::details-content { display: contents; }
  }
}

/* Меню разделов убираем раньше остального: ниже ~1120px оно перестаёт
   помещаться рядом с названием и кнопкой и распирало страницу по горизонтали. */
@media (max-width: 1120px) {
  .site-nav { display: none; }
}

/* Планшет: длинные сетки складываются, карточки помощников остаются по две */
/* Ниже 1280px — одна колонка: текст сверху, под ним только скриншот.
   Жёсткие переносы снимаем, строки ломаются по месту. */
@media (max-width: 1279px) {
  .hero h1 br, .lead br { display: none; }
  .ov-phone { display: none; }
  /* Телефона нет — поля под его свес не нужны */
  .hero-stage { max-width: 760px; height: auto; margin: 2rem auto 0; padding: 0; }
  .stage-shot { position: static; width: 100%; padding-bottom: 0; transform: none; }
  .stand { display: none; }
  .stage-shot .shot-frame { width: 100%; }
}

/* На узком экране круги размером «под десктоп» заливали почти весь фон —
   уменьшаем и делаем бледнее */
@media (max-width: 1020px) {
  .band-blob-1 { width: 320px; height: 320px; right: -130px; top: -130px; background: rgba(169, 80, 28, 0.2); }
  .band-blob-2 { width: 280px; height: 280px; left: -120px; bottom: -120px; background: rgba(212, 175, 131, 0.1); }
}

@media (max-width: 1020px) {
  .hero h1 { font-size: 2.2rem; }
  .steps { grid-template-columns: 1fr; }
  .step-badge { position: static; display: inline-flex; margin-bottom: 0.8rem; }
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }
  /* Тарифы до 1020px — карусель, см. блок «Карусель тарифов» ниже */
}

/* ═════════ Первый экран на телефоне ═════════ */
/* Одна колонка, высота по содержимому. Скриншот компьютера не показываем —
   вместо него снимок мобильной версии в рамке телефона, целиком и без свесов. */
@media (max-width: 768px) {
  .hero { height: auto; padding: 2.4rem 0 0; display: block; }
  .hero h1 { font-size: 36px; }
  .hero-cta .btn { width: 100%; }
  .hero-stage { max-width: none; margin: 2rem 0 0; padding: 0; }
  .stage-shot .shot-frame { display: none; }
  .ov-phone {
    display: block; position: static; transform: none;
    width: 260px; height: auto; aspect-ratio: auto; margin: 0 auto;
    inset: auto;
    padding: 6px; border-radius: 28px;
  }
  .ov-phone .ov-screen { border-radius: 22px; }
  /* 40px от скриншота до «Как это работает» */
  .hero + .section { padding-top: 40px; }
}

@media (max-width: 900px) {
  /* minmax(0,1fr): иначе колонка растягивается по самой длинной неразрывной
     фразе в ответе и карточка вылезает за экран */
  .qa-grid { grid-template-columns: minmax(0, 1fr); gap: 1.3rem; }
}

/* Карточки помощников стали компактными — две колонки держатся до 700px */
@media (max-width: 700px) {
  .agents-grid { grid-template-columns: 1fr; }
}

/* Телефон: всё в одну колонку */
@media (max-width: 640px) {
  /* Кнопка в шапке мельче, полоса становится 61px вместо 69 */
  :root { --gutter: 1.1rem; --header-h: 61px; }
  html, body { font-size: 17px; }
  .section { padding: 3rem 0; }
  .hero h1 { font-size: 36px; letter-spacing: -0.4px; }
  .lead { font-size: 1.08rem; }
  .section-head h2 { font-size: 1.6rem; }
  .section-head { margin-bottom: 1.8rem; }
  .header-inner { min-height: 60px; gap: 0.7rem; }
  /* Название рядом со знаком: при 16px на 360px помещается без переноса
     (знак 23 + 10 + текст ≈ 210 + гамбургер 48) */
  .brand-text { font-size: 16px; }
  .brand-logo { width: 40px; height: 40px; }
  /* уже 340px название с гамбургером не помещается — остаётся только знак */
  @media (max-width: 339px) { .brand-text { display: none; } }
  .header-cta { font-size: 0.9rem; padding: 0 1rem; margin-left: auto; }

  .hero-cta { gap: 0.6rem; }
  .hero-cta .btn { width: 100%; }

  .agent-card { padding: 20px; }
  .ac-title { font-size: 22px; }
  .ac-blob-1 { width: 130px; height: 130px; right: -40px; top: -40px; }
  .ac-blob-2 { width: 110px; height: 110px; right: 18px; bottom: -62px; }

  /* На узком экране фраза не помещается в строку — разрешаем перенос внутри
     плашки, иначе «Библиотека — своя и общая» распирала страницу по ширине */
  /* На 320px неразрывные связки в ответах длиннее карточки — разрешаем
     перенос внутри слова, это крайняя мера и срабатывает только там */
  .qa-a { overflow-wrap: anywhere; }
  /* 20px вопроса на узкой карточке ломается на две строки с коротким хвостом */
  .qa-q { font-size: 18px; }
  .reviews-grid { grid-template-columns: 1fr; }


  .invite { flex-direction: column; align-items: flex-start; }
  .final h2 { font-size: 1.7rem; }
  .final-btn { width: 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .footer-links { margin-left: 0; gap: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
  /* Появления и подъёмы выключены полностью: элементы сразу на месте */
  .js .hero-in, .js .reveal, .js .reveal.is-visible { opacity: 1; animation: none; translate: none; }
  .agent-card:hover, .plan:hover { transform: none; }
}

/* ═════════════════ Мобильная версия (до 768px) ═════════════════ */
/* Собрана отдельно от десктопа, а не «десктоп в столбик»: компактные строки
   вместо карточек в шагах, плитки 2×2 у помощников, две колонки в тарифах,
   аккордеон в вопросах. Десктопные правила выше не меняются — здесь только
   переопределения внутри медиазапроса. */
@media (max-width: 768px) {

  /* ═══ Шапка ═══ */
  .header-cta { display: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    margin-left: auto; flex: none;
    width: 48px; height: 48px; border-radius: 12px;
    border: none; background: none; color: var(--primary); cursor: pointer;
    transition: background 0.2s;
  }
  .nav-toggle:active { background: rgba(24, 52, 81, 0.08); }

  .mobile-menu {
    display: flex; flex-direction: column; gap: 8px;
    position: fixed; inset: 0; z-index: 60;
    padding: 12px var(--gutter) calc(24px + env(safe-area-inset-bottom));
    background: var(--primary); color: var(--bg);
    transform: translateY(-100%); transition: transform 0.25s ease;
    overflow-y: auto;
  }
  .mobile-menu.is-open { transform: none; }
  .mobile-menu-top { display: flex; align-items: center; min-height: 48px; }
  .mobile-menu-top .brand { gap: 10px; }
  .mobile-menu-top .brand-text { color: #f3ecde; }
  .nav-close {
    margin-left: auto; flex: none;
    width: 48px; height: 48px; border-radius: 12px;
    border: none; background: none; color: #f3ecde; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .mobile-nav { display: flex; flex-direction: column; margin: 12px 0 auto; }
  .mobile-nav a {
    display: flex; align-items: center; min-height: 56px;
    font-size: 20px; font-weight: 600; color: #f3ecde; text-decoration: none;
    border-bottom: 1px solid rgba(243, 236, 222, 0.12);
  }
  .mobile-menu .btn { min-height: 56px; font-size: 18px; }

  /* ═══ Общее ═══ */
  .section, #how, #pricing, #faq, .final { padding-top: 40px; padding-bottom: 40px; }
  .btn { min-height: 48px; }
  .section-head { max-width: none; margin: 0 0 16px; }
  .section-head h2,
  #pricing .section-head h2,
  #faq .section-head h2 { font-size: 30px; line-height: 1.2; margin: 0 0 6px; }
  .section-sub,
  #pricing .section-sub { font-size: 15px; line-height: 1.45; max-width: none; }
  /* Хвост фразы, который на телефоне только удлиняет подзаголовок */
  .d-tail { display: none; }

  /* ═══ 1. Первый экран ═══ */
  /* Одна колонка; всё до низа кнопки помещается в экран, телефон уходит
     нижней четвертью под следующую секцию. */
  .hero {
    display: block; height: auto; overflow: hidden;
    padding: 24px 0 0;
  }
  /* 13px и разрядка 0.02em: «Для учителей, педагогов и репетиторов» занимает
     315px при 323 доступных на 360px — ровно одна строка (при 0.04em — две) */
  .hero .eyebrow { font-size: 13px; letter-spacing: 0.02em; margin-bottom: 10px; }
  .hero h1 { font-size: 34px; line-height: 1.15; letter-spacing: -0.4px; margin: 0 0 12px; }
  .hero h1 br { display: inline; }
  /* balance вместо общего pretty: на узкой колонке pretty оставлял то
     короткий хвост, то рваную строку в середине — balance выравнивает все */
  .lead { font-size: 16px; line-height: 1.5; max-width: none; margin: 0 0 20px; text-wrap: balance; }
  .hero-cta { gap: 10px; }
  .hero-cta .btn { width: 100%; min-height: 56px; font-size: 18px; }

  /* Телефон показан только верхом: окно 300px с overflow hidden, внутри
     снимок 260px с наклоном −5°. Видно шапку приложения, вопрос и первые
     строки ответа; низ гасит градиент в цвет героя. */
  .hero-stage {
    display: block; position: relative; overflow: hidden;
    /* 320 = окно 300px + нижняя рамка 20px чистого синего: overflow hidden
       режет по padding-box, поэтому телефон на рамку не заходит, а
       градиент (::after, bottom: 0) заканчивается ровно над ней */
    max-width: none; height: 320px; margin: 28px 0 0; padding: 0;
    border-bottom: 20px solid var(--primary);
  }
  .stage-shot { display: none; }
  .ov-phone {
    display: block; position: absolute; inset: auto;
    /* 16px сверху: при повороте вокруг верхней грани угол поднимается
       на 130 × sin5° ≈ 11px, иначе его срезало бы краем окна */
    top: 16px; left: 50%;
    width: 260px; height: auto; aspect-ratio: 1 / 2.142;
    transform: translateX(-50%) rotate(-5deg); transform-origin: top center;
    padding: 4px; border-radius: 34px;
    box-shadow: 0 14px 32px rgba(4, 12, 22, 0.35), 0 4px 10px rgba(4, 12, 22, 0.3);
  }
  .ov-phone .ov-screen { border-radius: 30px; }
  /* Затухание среза: 120px из прозрачного в цвет героя, поверх снимка.
     z-index 3 — выше телефона (.ov даёт ему z-index: 2), иначе градиент
     оказывался под снимком и среза не смягчал. */
  .hero-stage::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; z-index: 3;
    background: linear-gradient(to bottom, rgba(24, 52, 81, 0) 0%, #183451 100%);
    pointer-events: none;
  }

  /* ═══ Стыки секций ═══ */
  /* Секция с другим фоном наезжает на предыдущую скруглённым верхом:
     radius 28, margin-top −28, z-index на единицу выше. У предыдущей нижний
     padding +28, чтобы её контент не ушёл под скругление. Секции с одним
     фоном подряд стыкуются тонкой линией по ширине контента. */
  .hero { z-index: 1; padding-bottom: 28px; }
  .hero + .section,
  #idea, #pricing, .final, .site-footer {
    position: relative; margin-top: -28px; border-radius: 28px 28px 0 0;
  }
  .hero + .section { z-index: 2; background: var(--bg); }
  #idea { z-index: 3; }
  #pricing { z-index: 4; background: var(--bg); }
  .final { z-index: 5; }
  .site-footer { z-index: 6; }
  #agents, #idea, #faq, .final { padding-bottom: 68px; }
  /* На телефоне «Помощники» и «Тарифы» того же цвета, что соседи:
     подложка и рамки section-alt здесь лишние */
  .section-alt { background: none; border-top: 0; border-bottom: 0; }
  #agents, #faq { position: relative; }
  #agents::before, #faq::before {
    content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter);
    height: 1px; background: rgba(24, 52, 81, 0.08);
  }

  /* ═══ 2. Как это работает ═══ */
  /* Шаг — не карточка, а строка: кружок с номером слева, текст справа. */
  .steps { display: flex; flex-direction: column; gap: 10px; }
  .step {
    display: grid; grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 10px; row-gap: 2px; align-items: start;
    padding: 14px; border-radius: 14px;
  }
  .step-num {
    grid-column: 1; grid-row: 1 / span 2;
    width: 40px; height: 40px; border-radius: 50%; font-size: 16px;
  }
  .step h3 {
    grid-column: 2; grid-row: 1; margin: 0;
    font-size: 17px; font-weight: 700; line-height: 1.25; letter-spacing: -0.2px;
  }
  .step p { grid-column: 2; grid-row: 2; margin: 0; font-size: 15px; line-height: 1.35; }
  /* Бейдж — в правом верхнем углу второй строки; под него отведена
     собственная полоса сверху, иначе он лёг бы на заголовок. */
  .step-accent { padding-top: 36px; }
  .step-badge {
    position: absolute; top: 8px; right: 10px; left: auto;
    padding: 3px 9px; gap: 4px; font-size: 13px; line-height: 1.3;
  }
  .step-badge svg { width: 13px; height: 13px; }


  /* ═══ 3. Четыре помощника ═══ */
  /* Квадратные плитки 2×2: иконка и название; цитата и список — в модалке. */
  .agents-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  /* Плитка по содержимому: иконка, название 20/700, строка 14px, значок «развернуть» */
  .agent-card { aspect-ratio: auto; min-height: 150px; padding: 14px 14px 16px; border-radius: 16px; }
  .ac-icon { width: 32px; height: 32px; border-radius: 10px; margin: 0 0 12px; }
  .ac-icon svg { width: 18px; height: 18px; }
  .ac-title { margin: 0 0 4px; padding-right: 8px; font-size: 20px; font-weight: 700; line-height: 1.15; }
  .ac-line { margin: 0; padding-right: 0; font-size: 14px; line-height: 1.3; opacity: 0.8; }
  .agent-card > .ac-open { top: 10px; right: 10px; width: 26px; height: 26px; }
  .ac-open svg { width: 14px; height: 14px; }
  /* круги — в углах, вне текста */
  .ac-blob-1 { width: 80px; height: 80px; right: -30px; top: -34px; }
  .ac-blob-2 { width: 56px; height: 56px; right: -18px; bottom: -30px; }

  /* Модалка — шторка снизу: прижата к низу, скруглённый верх, не выше 92dvh.
     Шапка с крестиком и подвал с кнопкой не прокручиваются, тело — да. */
  .modal {
    position: fixed; inset: auto 0 0 0; margin: 0;
    width: 100vw; max-width: 100vw; max-height: 92dvh;
    border-radius: 20px 20px 0 0;
  }
  .modal[open] { animation: sheetIn 0.22s ease both; }
  @keyframes sheetIn { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
  .modal-card { max-height: 92dvh; }
  .modal-head { padding: 12px 16px; }
  .modal-head h3 { font-size: 20px; }
  .modal-close { width: 48px; height: 48px; }
  .modal-body { padding: 16px 16px 18px; }
  .modal-what { font-size: 16px; margin-bottom: 14px; }
  .modal-checks li { font-size: 15px; }
  .modal-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
  .mg li { font-size: 14px; }
  .modal-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }

  /* ═══ 4. Что вы получаете ═══ */
  /* Пары друг под другом: мелкое зачёркнутое «было», под ним крупное «стало»; стрелки и метки нет */
  .wn-labels { display: none; }
  .wn-row { grid-template-columns: minmax(0, 1fr); row-gap: 4px; padding: 14px 0; }
  .wn-arrow { display: none; }
  .wn-was { font-size: 14px; }
  .wn-now { font-size: 20px; padding-left: 30px; }
  .wn-check { width: 20px; height: 20px; top: 0.15em; }

  /* ═══ 5. Тарифы ═══ */
  /* Карусель — общий блок ниже; здесь только размеры */
  .plan { padding: 18px 16px 16px; border-radius: 16px; }
  .plan-badge { top: -12px; font-size: 12px; padding: 4px 12px; }
  .plan-name { font-size: 20px; margin: 0 0 6px; }
  .price-line { font-size: 30px; gap: 6px; }
  .price-per { font-size: 14px; }
  .price-sub { font-size: 13px; min-height: 17px; margin-top: 2px; }
  .plan-list { margin: 14px 0 16px; }
  .plan-list li { padding: 8px 0; font-size: 15px; }
  .pf-v { font-size: 16px; }
  .pf-v-text { font-size: 14px; }
  .plan .btn { margin-top: 0; width: 100%; min-height: 46px; font-size: 16px; }
  .plans-note { font-size: 13px; margin-top: 12px; }
  /* Переключатель — по центру, сегменты покрупнее для пальца */
  .period { margin-bottom: 18px; }
  .period-btn { min-height: 36px; padding: 0 22px; font-size: 15px; }

  /* Плашка приглашения — одна строка, не кликается */
  .invite {
    position: relative; flex-direction: row; flex-wrap: nowrap; align-items: flex-start;
    gap: 14px; padding: 16px 16px 16px 14px; min-height: 0; text-align: left; margin-top: 16px; border-radius: 16px;
  }
  .invite-text { flex: 1; min-width: 0; }
  .invite-title { font-size: 22px; margin: 0 0 4px; }
  .invite-text p { font-size: 16px; line-height: 1.35; }
  .invite-text .invite-note { font-size: 14px; margin-top: 6px; }

  /* ═══ 6. Вопросы ═══ */
  /* Аккордеон: свёрнутая строка 52px, открыт ровно один (name="faq").
     50px в summary + 1px рамки карточки с каждой стороны = 52px. */
  .qa-grid { display: flex; flex-direction: column; gap: 8px; }
  .qa { display: block; padding: 0; border-radius: 12px; overflow: hidden; }
  .qa-q {
    display: flex; align-items: center; gap: 10px;
    min-height: 50px; padding: 0 14px; margin: 0;
    font-size: 16px; line-height: 1.25; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .qa-chev {
    display: block; flex: none; margin-left: auto;
    width: 20px; height: 20px; color: var(--muted);
    transition: transform 0.2s ease;
  }
  .qa[open] .qa-chev { transform: rotate(180deg); }
  .qa-a { padding: 0 14px 14px; font-size: 15px; line-height: 1.4; max-width: none; min-height: 0; overflow: hidden; }
  /* Плавное раскрытие: обёртка содержимого details — grid-строка 0fr→1fr.
     content-visibility с allow-discrete держит ответ видимым, пока он
     сворачивается. Браузеры без ::details-content открывают мгновенно. */
  .qa::details-content {
    display: grid; grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease, content-visibility 0.3s allow-discrete;
  }
  .qa[open]::details-content { grid-template-rows: 1fr; }

  /* ═══ Страницы документов ═══ */
  /* Одна колонка и так; на телефоне меняются только поля. Кегли
     (36/24/18) оставлены как на десктопе — текст юридический,
     мельче его делать незачем. */
  .doc-page { padding: 32px var(--gutter) 56px; }
  /* 36px не держит «конфиденциальности»: слово шире колонки 353px и рвётся
     переносом посреди букв. 30px — ближайший кегль, при котором оно целое. */
  .doc-page h1 { font-size: 30px; }
  .doc-page h2 { font-size: 22px; margin-top: 28px; }
  .doc-lead { font-size: 18px; }

  /* ═══ 7. Финал и подвал ═══ */
  .final-inner { text-align: center; }
  .final h2 { font-size: 26px; line-height: 1.2; margin: 0 0 8px; }
  .final p { font-size: 16px; line-height: 1.45; margin: 0 0 16px; }
  .final-btn { width: 100%; }
  .final .cta-note { margin-top: 10px; }
  .site-footer { padding: 28px 0; }
  /* Скруглённый верх подвала наезжает на призыв на 28px — контент ниже */
  .site-footer { padding-top: 56px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .footer-links { margin-left: 0; flex-direction: column; gap: 0; width: 100%; }
  .footer-links a { display: flex; align-items: center; min-height: 44px; font-size: 16px; }
  .footer-copy { font-size: 15px; }
}

/* ═════════════ Карусель тарифов (до 1020px) ═════════════ */
/* Одна карточка на экран, свайп по scroll-snap, стрелки и точки — script.js.
   По умолчанию показан «Стандарт» (средняя карточка), порядок карточек как в
   разметке: Бесплатно ← Стандарт → Про. Десктоп (от 1021px) не затронут. */
@media (max-width: 1020px) {
  .plans-grid {
    display: flex; flex-direction: row; gap: 12px;
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    padding: 14px 0 12px; /* сверху — бейдж «Популярный», снизу — тень карточки */
    margin: 0 calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter);
    scroll-padding: 0 var(--gutter);
  }
  .plans-grid::-webkit-scrollbar { display: none; }
  .plan {
    flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always;
    display: flex; flex-direction: column;
  }
  .plan-price, .plan .btn { align-self: stretch; }
  .plan-featured, .plan-featured:hover, .plan:hover { transform: none; }
  .plans-ctl {
    display: flex; align-items: center; justify-content: center; gap: 14px; margin: 4px 0 0;
  }
  .plans-ctl[hidden] { display: none; }
  .plans-arrow {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 50%;
    border: 1px solid var(--border); background: var(--surface); color: var(--primary);
    cursor: pointer; box-shadow: var(--shadow-sm); transition: background 0.15s, opacity 0.15s;
  }
  /* #i-chev — шеврон вниз: поворачиваем влево/вправо */
  .plans-arrow-prev svg { transform: rotate(90deg); }
  .plans-arrow-next svg { transform: rotate(-90deg); }
  .plans-arrow:disabled { opacity: 0.35; cursor: default; }
  .plans-dots { display: flex; gap: 8px; }
  .plans-dot {
    width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0;
    background: rgba(24, 52, 81, 0.22); cursor: pointer; transition: transform 0.15s, background 0.15s;
  }
  .plans-dot.is-active { background: var(--accent); transform: scale(1.25); }
}

/* Знак ПП в мобильном меню — на кремовом круге, как в сайдбаре портала */
@media (max-width: 1020px) {
  .mobile-menu-top .menu-logo {
    flex: none; width: 44px; height: 44px; border-radius: 50%;
    background: #f3ecde; display: inline-flex; align-items: center; justify-content: center;
  }
  .mobile-menu-top .menu-logo .brand-logo { width: 30px; height: 30px; }
}
