/* =========================================================================
   TrendAlytica v7 — базовые стили и семь регистров секций
   ========================================================================= */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 450;
  line-height: 1.6;
  letter-spacing: var(--ls-body);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

/* ---- Типографика --------------------------------------------------------
   Каждый кегль несёт собственный трекинг. Правило раздела 6 плана.          */

.display-1, .display-2, h1, h2, h3 {
  margin: 0;
  font-weight: 750;
  /* Русские слова длиннее английских: «конфиденциальности» в 38px не влезает
     в 375px и даёт горизонтальный overflow. Ломаем слово, а не страницу. */
  overflow-wrap: break-word;
}

.display-1, h1 {
  font-size: var(--fs-display-1);
  letter-spacing: var(--ls-display-1);
  line-height: .94;
}
.display-2 {
  font-size: var(--fs-display-2);
  letter-spacing: var(--ls-display-2);
  line-height: .98;
}
h2 {
  font-size: var(--fs-h2);
  letter-spacing: var(--ls-h2);
  line-height: 1.05;
}
h3 {
  font-size: var(--fs-h3);
  letter-spacing: var(--ls-h3);
  line-height: 1.15;
  font-weight: 700;
}
.lead {
  font-size: var(--fs-lead);
  letter-spacing: var(--ls-lead);
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0;
}
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

/* Крупный кегль: 3,64:1 на бумаге — порог для крупного текста пройден. */
.accent { color: var(--accent); }
/* Акцент мелким кеглем внутри текста. */
.accent-inline { color: var(--accent-text); font-weight: 650; }

/* Две метки. Редакционная — с точкой, обычным регистром, для повествования.
   Данные — капителью с разрядкой, для цифр, слоёв и технических подписей.   */
.label {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  font-weight: 550;
  color: var(--muted);
  margin: 0 0 clamp(16px, 2vw, 28px);
}
.label::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); flex: none;
}
.label-data {
  display: block;
  font-size: var(--fs-data);
  letter-spacing: var(--ls-data);
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 10px;
}

/* ---- Каркас ------------------------------------------------------------- */

.wrap { width: 100%; max-width: var(--shell); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: var(--sec-y); }
.section-2 { background: var(--paper-2); }

.reg-tag {
  display: block;
  width: max-content;
  max-width: 100%;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 4px 11px;
  margin-bottom: 22px;
}

/* ---- Ссылки и кнопки ---------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: inherit; font-weight: 600; font-size: var(--fs-small);
  letter-spacing: -.005em;
  padding: 15px 26px;
  border-radius: 100px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
/* Надпись идёт по затемнённой киновари: 5,20:1. Яркая остаётся для
   наведения, где текст уже прочитан. В тёмной теме пара инверсируется:
   светлая киноварь под тёмной надписью.                                    */
.btn-primary { background: var(--accent-solid); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-on-dark { background: var(--accent-on-dark); color: var(--structure); }
.btn-on-dark:hover { background: var(--white); color: var(--ink); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink); text-decoration: none; font-weight: 600;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 5px;
}

/* =========================================================================
   Шапка
   ========================================================================= */

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line-soft);
  padding-block: 16px;
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
/* Логотип — знак «Вершина A» и название (брендбук, решение владельца 25.09.2026).
   Знак 1,6 кегля названия, зазор 0,3 кегля; точки в конце названия больше нет. */
.brand-lockup { display: inline-flex; align-items: center; gap: .3em; font-weight: 750;
  letter-spacing: -.045em; line-height: 1; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand-mark { width: 1.6em; height: 1.6em; flex: none; margin-right: -.08em; }
.brand-mark .a { fill: var(--ink); }
.brand-mark .s { fill: var(--accent); }
.island .brand-lockup, .cta-band .brand-lockup,
.artifact-report-rail .brand-lockup { color: var(--on-dark); }
.island .brand-mark .a, .cta-band .brand-mark .a,
.artifact-report-rail .brand-mark .a { fill: var(--on-dark); }
.island .brand-mark .s, .cta-band .brand-mark .s,
.artifact-report-rail .brand-mark .s { fill: var(--logo-tile-dot); }
.logo { font-size: 21px; }
.logo:hover { color: var(--ink); }
.logo:hover .brand-mark .s { fill: var(--accent-text); }
.topnav { display: flex; gap: clamp(14px, 2vw, 30px); font-size: var(--fs-small); }
.topnav a { color: var(--ink-soft); text-decoration: none; font-weight: 550; }
.topnav a:hover { color: var(--accent); }

.theme-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-size: 13px; font-weight: 600;
  padding: 8px 15px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  border-radius: 100px;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease);
}
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle span { font-size: 14px; line-height: 1; }

/* =========================================================================
   Регистр 1 — paper editorial
   Бумага, крупный текст, максимум воздуха. Несущий регистр сайта.
   ========================================================================= */

.reg-editorial .editorial-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: end;
}
.reg-editorial .editorial-aside { padding-bottom: 8px; }
/* Длина строки на десктопе — 60–70 знаков (брендбук). Вне .reg-editorial
   редакционный блок идёт одной колонкой, и без ограничения лид растягивался на
   всю ширину: около 100 знаков в строке на 101 странице (аудит 2026-09-26). */
.editorial-aside, .editorial-grid p, .section > .wrap > p.lead, .section > .wrap > p:not([class]),
.island .cta-list { max-width: 68ch; }
/* В одноколоночном редакционном блоке текст не прилипает к заголовку. */
.section:not(.reg-editorial) h2 + .editorial-grid { margin-top: clamp(16px, 2vw, 24px); }
.section:not(.reg-editorial) .editorial-grid > .editorial-aside { margin-top: clamp(12px, 1.4vw, 18px); }
/* Редакционный блок в две колонки — вариант «Текст шире», решение владельца
   2026-09-26: заголовок слева и уже, текст справа шире (около 60 знаков), оба от
   верхнего края; заголовок остаётся на месте, пока читаешь длинный текст.
   У главной (.reg-editorial) своя раскладка. Уже 900 px — одна колонка. */
@media (min-width: 901px) {
  .section:not(.reg-editorial) .editorial-grid {
    display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: clamp(28px, 5vw, 80px); align-items: start;
  }
  .section:not(.reg-editorial) .editorial-grid > .editorial-aside { margin-top: 0; }
  .section:not(.reg-editorial) .editorial-grid > div:first-child:not(.editorial-aside) { position: sticky; top: 110px; }
  /* Лид и дополнение, когда заголовок стоит над блоком: две колонки текста. */
  .section:not(.reg-editorial) .editorial-grid:has(> p.lead:first-child) { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
}

/* =========================================================================
   Регистр 2 — card row
   Пастельные карточки. Не более одной такой секции подряд.
   ========================================================================= */

.card-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: clamp(28px, 4vw, 52px);
}
.card {
  position: relative;
  border-radius: var(--r-lg);
  padding: clamp(24px, 2.6vw, 34px);
  min-height: clamp(190px, 20vw, 250px);
  display: flex; flex-direction: column; justify-content: space-between;
  color: var(--ink);
  text-decoration: none;
  transition: transform var(--dur) var(--ease);
}
.card:hover { transform: translateY(-4px); }
.card-dark { background: var(--structure); color: var(--on-dark); }
.card-dark .label-data { color: var(--on-dark-soft); }
.card-blue   { background: var(--blue);   color: var(--on-pastel); }
.card-yellow { background: var(--yellow); color: var(--on-pastel); }
.card-lime   { background: var(--lime);   color: var(--on-pastel); }
.card-clay   { background: var(--clay);   color: var(--on-pastel); }
.card-blue .label-data, .card-yellow .label-data,
.card-lime .label-data, .card-clay .label-data { color: inherit; opacity: .7; }
.card h3 { max-width: 15ch; }
.card-arrow { position: absolute; top: clamp(24px, 2.6vw, 34px); right: clamp(24px, 2.6vw, 34px); font-size: 19px; opacity: .55; }

/* =========================================================================
   Регистр 3 — dark island
   Тёмно-зелёная панель: метод, слои платформы, данные.
   Взрослый противовес пастели.
   ========================================================================= */

.island {
  background: var(--structure);
  color: var(--on-dark);
  border-radius: var(--r-xl);
  padding: clamp(32px, 5vw, 72px);
}
.island h2, .island h3 { color: var(--on-dark); }
.island .lead { color: var(--on-dark-soft); }
.island .accent { color: var(--accent-on-dark); }

/* =========================================================================
   Ритм секций (решение владельца 2026-09-25, вариант В)
   Без линий и номеров: раздел начинается меткой с точкой над заголовком,
   блоки разделяет фон по смыслу и воздух. Разметку расставляет tools/rhythm.py;
   главная размечена вручную.
   ========================================================================= */

.section.chapter { padding-block: clamp(56px, 7.5vw, 116px); }

/* Плоскость — макет результата и вопросы: полоса бумаги-2 с линиями по краям. */
.reg-plane { background: var(--paper-2); box-shadow: inset 0 1px 0 var(--line), inset 0 -1px 0 var(--line); }
.reg-plane .artifact-grid > div { background: var(--white); border: 1px solid var(--line-soft); }

/* Лист — бриф, чек-лист, рабочий шаблон: документ на столе. */
.sheet {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(26px, 3.6vw, 52px); box-shadow: var(--shadow);
}
.sheet > :first-child, .island > :first-child { margin-top: 0; }
/* Внутри острова и листа колонка уже; уже 230 px крупный h3 рвёт слова
   («Первоисточник», «классификация»). */
.island .formats, .sheet .formats { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* Пастель — набор сигналов и соседние страницы. Плоскость, не статус. */
.reg-tones .signal-item, .reg-tones .related a {
  border: 0; border-radius: var(--r-lg); padding: clamp(22px, 2.6vw, 32px); color: var(--on-pastel);
  transition: transform var(--dur) var(--ease);
}
.reg-tones .related a:hover { transform: translateY(-3px); }
.reg-tones .signal-item:nth-child(4n+1), .reg-tones .related a:nth-child(4n+1) { background: var(--blue); }
.reg-tones .signal-item:nth-child(4n+2), .reg-tones .related a:nth-child(4n+2) { background: var(--lime); }
.reg-tones .signal-item:nth-child(4n+3), .reg-tones .related a:nth-child(4n+3) { background: var(--yellow); }
.reg-tones .signal-item:nth-child(4n+4), .reg-tones .related a:nth-child(4n+4) { background: var(--clay); }
.reg-tones .signal-item p, .reg-tones .related .label-data { color: var(--on-pastel); opacity: .78; }

/* Содержимое внутри тёмного острова. */
.island p, .island .city-note, .island .label-data, .island .label { color: var(--on-dark-soft); }
.island a:not(.btn) { color: var(--on-dark); }
.island .text-link { color: var(--accent-on-dark); }
.island .format { border-top-color: var(--on-dark-line); }
.island .format h3 a { color: var(--on-dark); }
.island .format p { color: var(--on-dark-soft); }
.island .solution-steps > div { border-top-color: var(--accent-on-dark); }
.island .solution-steps b, .island .artifact-grid b { color: var(--on-dark); }
.island .solution-steps p, .island .artifact-grid p { color: var(--on-dark-soft); }
.island .artifact-grid > div { background: var(--structure-2); }


.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(22px, 3vw, 44px);
  margin-top: clamp(32px, 4vw, 56px);
  padding-top: clamp(26px, 3vw, 40px);
  border-top: 1px solid var(--on-dark-line);
}
.step h3 { margin-bottom: 12px; }
.step p { color: var(--on-dark-soft); font-size: var(--fs-small); }

/* =========================================================================
   Регистр 4 — quote flow
   Стикер с репликой → стрелка → карточка вывода.
   Собственные объекты вместо скриншотов дашборда.
   ========================================================================= */

.quote-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, .9fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: center;
  margin-top: clamp(28px, 4vw, 48px);
}
.stickers { display: flex; flex-direction: column; gap: 14px; }
.sticker {
  align-self: flex-start;
  background: var(--white);
  border-radius: 16px 16px 16px 5px;
  padding: 15px 20px;
  font-size: var(--fs-small);
  line-height: 1.4;
  box-shadow: var(--shadow);
  max-width: 34ch;
}
.sticker:nth-child(1) { transform: rotate(-1.6deg); background: var(--blue);   color: var(--on-pastel); }
.sticker:nth-child(2) { transform: rotate(1.1deg);  background: var(--yellow); color: var(--on-pastel); align-self: flex-end; }
.sticker:nth-child(3) { transform: rotate(-.7deg);  background: var(--lime);   color: var(--on-pastel); }
.sticker cite { display: block; font-style: normal; font-size: 12px; opacity: .72; margin-top: 7px; }

.flow-arrow { color: var(--accent); font-size: 26px; text-align: center; }

.verdict {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: clamp(22px, 2.6vw, 30px);
}
.verdict-row { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line-soft); font-size: var(--fs-small); }
.verdict-row:first-of-type { border-top: 0; }
.verdict-row span:last-child { color: var(--muted); text-align: right; }

/* =========================================================================
   Регистр 5 — city frame
   Кадр города или отдельный район. Единственное место чужих брендовых
   цветов на сайте. Дисклеймер обязателен.
   ========================================================================= */

.city-frame { margin-top: clamp(28px, 4vw, 48px); }
.city-shot {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--paper-2);
  position: relative;
}
/* В тёмной теме город остаётся единственным ярким пятном — так и задумано,
   но резкая светлая кромка на тёмной земле режет глаз.                     */
[data-theme="dark"] .city-shot { box-shadow: 0 0 0 1px var(--line); }
.city-shot img { width: 100%; height: auto; }
.city-note {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 78ch;
}
.city-badge {
  position: absolute; top: 18px; right: 18px;
  background: var(--yellow);
  border-radius: 10px;
  padding: 7px 13px;
  font-weight: 650;
  font-size: var(--fs-small);
  letter-spacing: -.01em;
}

/* =========================================================================
   Регистр 6 — numbers
   Крупные числа набором по-журнальному, прямо на бумаге.
   Без дашбордных карточек.
   ========================================================================= */

.numbers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
  margin-top: clamp(28px, 4vw, 52px);
  border-top: 1px solid var(--line);
  padding-top: clamp(24px, 3vw, 40px);
}
.number-value {
  font-size: var(--fs-number);
  letter-spacing: var(--ls-number);
  line-height: .9;
  font-weight: 750;
  display: block;
}
.number-value small { font-size: .38em; letter-spacing: -.02em; font-weight: 650; margin-left: .06em; }
.number-note { margin-top: 14px; font-size: var(--fs-small); color: var(--muted); line-height: 1.45; }

/* =========================================================================
   Регистр 7 — cta band
   Заявка на демо. Отдельная выразительная поверхность, не продолжение
   футера.
   ========================================================================= */

/* Полоса берёт структурный цвет, а не акцент: киноварь на такой площади
   нарушила бы правило дозы и превратила бы блок в распродажу. Акцент
   остаётся на кнопке.                                                      */
.cta-band {
  background: var(--structure);
  color: var(--on-dark);
  border-radius: var(--r-xl);
  padding: clamp(32px, 5vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}
.cta-band h2 { color: var(--on-dark); }
.cta-list { list-style: none; margin: 0; padding: 0; }
.cta-list li { padding: 12px 0; border-top: 1px solid rgba(250, 251, 245, .22); font-size: var(--fs-small); }
.cta-list li:first-child { border-top: 0; }
.cta-actions { margin-top: clamp(22px, 3vw, 32px); display: flex; flex-wrap: wrap; gap: 12px; }
.contact-direct { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.contact-direct p { color: var(--on-dark-soft); font-size: var(--fs-small); max-width: 48ch; }
.contact-direct-link { color: var(--on-dark); text-decoration: underline; text-underline-offset: 4px; font-size: var(--fs-small); }
.legal-copy { max-width: 74ch; }
.legal-copy h2 { margin: 0 0 18px; font-size: clamp(1.35rem, 2.2vw, 2rem); }
.legal-copy h2:not(:first-child) { margin-top: 42px; }
.legal-copy p { margin: 0 0 18px; color: var(--ink-soft); line-height: 1.7; }
.legal-copy a { color: var(--accent-text); text-underline-offset: 3px; }
.legal-copy ul { margin: 0 0 18px; padding-left: 1.25em; color: var(--ink-soft); line-height: 1.7; }
.legal-copy li { margin: 0 0 6px; }
.legal-copy strong { color: var(--ink); }
.legal-note {
  margin: 8px 0 22px; padding: 16px 20px;
  border-left: 3px solid var(--accent); border-radius: var(--r-sm);
  background: var(--paper-2); color: var(--ink-soft); line-height: 1.7;
}

.working-template {
  margin: 26px 0 0;
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-sm);
  background: var(--white);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: clamp(12px, 1.35vw, 14px);
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* =========================================================================
   Служебное: палитра и типошкала на странице-образце
   ========================================================================= */

.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 28px; }
.swatch { border: 1px solid var(--line-soft); border-radius: var(--r-sm); overflow: hidden; background: var(--white); }
.swatch-chip { height: 72px; }
.swatch-meta { padding: 11px 13px; font-size: 12px; line-height: 1.45; }
.swatch-meta b { display: block; font-weight: 650; }
.swatch-meta code { font-family: var(--mono); font-size: 11px; color: var(--muted); }

.type-row { border-top: 1px solid var(--line); padding: clamp(18px, 2.4vw, 30px) 0; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: clamp(14px, 2vw, 32px); align-items: baseline; }
.type-row:last-child { border-bottom: 1px solid var(--line); }
.type-meta { font-family: var(--mono); font-size: 11px; color: var(--muted); line-height: 1.6; }

.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: clamp(20px, 3vw, 44px); margin-top: clamp(24px, 3vw, 40px); align-items: start; }
.rules ul { margin: 12px 0 0; padding-left: 20px; }
.rules li { padding: 5px 0; font-size: var(--fs-small); }

.site-footer { border-top: 1px solid var(--line); padding-block: 36px; font-size: 13px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; }

/* =========================================================================
   Адаптив
   ========================================================================= */

@media (max-width: 900px) {
  .reg-editorial .editorial-grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .card-row  { grid-template-columns: minmax(0, 1fr); }
  .steps     { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .numbers   { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta-band  { grid-template-columns: minmax(0, 1fr); }
  .rules     { grid-template-columns: minmax(0, 1fr); }
  .quote-flow { grid-template-columns: minmax(0, 1fr); }
  .flow-arrow { transform: rotate(90deg); }
  .type-row  { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}

@media (max-width: 560px) {
  .numbers { grid-template-columns: minmax(0, 1fr); }
  .sticker { max-width: 100%; }
  .topnav  { display: none; }
}

/* =========================================================================
   Компоненты главной страницы
   Поверх семи регистров. Каждый блок обязан объяснять продукт, а не
   заполнять ритм.
   ========================================================================= */

/* ---- Первый экран ------------------------------------------------------ */

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}
/* Заголовок первого экрана стоит в колонке, а не во всю ширину, поэтому
   берёт собственный кегль: шкала display-1 рассчитана на полную ширину и в
   колонке рвёт длинные русские строки на четыре-пять частей.               */
.hero-copy h1, .page-hero h1 {
  font-size: clamp(34px, min(4.3vw, 7.4vh), 62px);
  letter-spacing: var(--ls-display-2);
}
.hero-copy .lead { margin-top: clamp(16px, min(2.6vw, 3vh), 30px); max-width: 44ch; }
.hero-actions { margin-top: clamp(20px, min(3vw, 3.6vh), 36px); display: flex; flex-wrap: wrap; gap: 12px; }

/* Первый экран помещается в окно ноутбука (решение 2026-09-25): отступы и
   кегль заголовка зависят от высоты окна, длинный заголовок берёт меньший
   кегль — иначе на 13-дюймовом экране он уводит кнопку и факты за край.     */
main > .section:first-of-type { padding-top: clamp(32px, 6vh, 80px); padding-bottom: clamp(48px, 8vh, 110px); }
.page-hero h1.is-mid { font-size: clamp(32px, min(3.6vw, 6.4vh), 52px); }
.page-hero h1.is-long { font-size: clamp(30px, min(3.05vw, 5.6vh), 44px); }

/* Главная: три факта и оговорка под ними входят в первый экран. Текстовой
   колонке — больше ширины, чтобы лид вставал в четыре строки. */
main > .home-hero:first-of-type { padding-top: clamp(24px, 4vh, 64px); }
.home-hero h1 { font-size: clamp(34px, min(4.3vw, 6.8vh), 62px); }
.home-hero .label { margin-bottom: clamp(12px, 2.2vh, 28px); }
.home-hero .hero-copy .lead { max-width: 52ch; }
.home-hero .facts { margin-top: clamp(20px, 3.6vh, 56px); padding-top: clamp(14px, 2.2vh, 30px); }
.home-hero .facts-note { margin-top: clamp(10px, 1.6vh, 20px); }
/* На невысоком окне кадр города уже, чтобы высоту первого экрана задавал текст. */
@media (min-width: 901px) {
  .home-hero .hero-grid { grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); }
  .home-hero .city-frame { width: min(100%, 68vh); justify-self: end; }
  .home-hero .hero-copy .lead { font-size: clamp(16px, min(1.45vw, 2.35vh), 20px); }
}

/* Карта открывается отдельным окном, а не во встроенном кадре: сборка города
   внутри iframe не рисует сцену — её собственный счётчик кадров показывает
   прочерк, — тогда как отдельной страницей работает нормально. Разбираться
   в чужой сборке мы не будем, поэтому кадр здесь просто ссылка. */
.city-link { display: block; text-decoration: none; color: inherit; cursor: pointer; }
.city-link .city-open { transition: background var(--dur) var(--ease); }
.city-link:hover .city-open { background: var(--structure-2); }
.city-link:hover img { transform: scale(1.012); }
.city-link img { transition: transform var(--dur) var(--ease); }
#city-live picture, #city-live img { height: 100%; object-fit: cover; }

.city-open {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--structure); color: var(--on-dark);
  border-radius: 100px; padding: 12px 22px;
  font-size: var(--fs-small); font-weight: 600; text-decoration: none;
  white-space: nowrap;
  transition: background var(--dur) var(--ease);
}
.city-open:hover { background: var(--structure-2); }
.city-open i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-on-dark); flex: none; }

/* ---- Три факта под первым экраном -------------------------------------- */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(20px, 3vw, 44px);
  margin-top: clamp(36px, 5vw, 68px);
  padding-top: clamp(24px, 3vw, 34px);
  border-top: 1px solid var(--line);
}
.fact h3 { margin-bottom: 9px; }
.fact p { font-size: var(--fs-small); color: var(--muted); margin: 0; }

/* ---- Источники: чипы ---------------------------------------------------- */

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(26px, 3.4vw, 40px); }
.chip {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 100px;
  padding: 10px 18px;
  font-size: var(--fs-small);
  font-weight: 550;
}

/* ---- Почему разговоры: четыре противопоставления ------------------------ */

.contrasts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: clamp(22px, 3vw, 46px);
  margin-top: clamp(28px, 4vw, 52px);
}
.contrast-item { border-top: 2px solid var(--accent); padding-top: 18px; }
.contrast-item b { display: block; font-weight: 700; margin-bottom: 8px; }
.contrast-item p { font-size: var(--fs-small); color: var(--ink-soft); margin: 0; }

/* ---- Направления -------------------------------------------------------- */

.directions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: clamp(28px, 4vw, 52px);
}

/* ---- Хронология --------------------------------------------------------- */

.timeline {
  margin-top: clamp(28px, 4vw, 48px);
  border-top: 1px solid var(--line);
  padding-top: clamp(22px, 3vw, 32px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: clamp(20px, 3vw, 40px);
}
.tl-year {
  font-size: clamp(26px, 3vw, 38px); letter-spacing: -.035em;
  font-weight: 750; line-height: 1; display: block; color: var(--accent);
}
.tl-note { margin-top: 11px; font-size: var(--fs-small); color: var(--muted); line-height: 1.45; }

/* ---- Слои платформы ----------------------------------------------------- */

.layers { margin-top: clamp(32px, 4vw, 56px); }
.layer {
  display: grid; grid-template-columns: 116px minmax(0, 1fr);
  gap: clamp(14px, 2vw, 32px);
  padding: clamp(16px, 2vw, 22px) 0;
  border-top: 1px solid var(--on-dark-line);
  align-items: baseline;
}
.layer:first-child { border-top: 0; }
.layer p { color: var(--on-dark-soft); font-size: var(--fs-small); margin: 0; }

/* ---- Две аудитории ------------------------------------------------------ */

.audiences {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: clamp(28px, 4vw, 52px);
}
.audience {
  border-radius: var(--r-lg);
  padding: clamp(26px, 3.4vw, 44px);
  display: flex; flex-direction: column;
}
.audience-main { background: var(--structure); color: var(--on-dark); }
.audience-main h3, .audience-main h2 { color: var(--on-dark); }
.audience-main .label-data { color: var(--on-dark-soft); }
.audience-side { background: var(--white); border: 1px solid var(--line); }
.audience ul { list-style: none; margin: 20px 0 0; padding: 0; flex: 1; }
.audience li { padding: 10px 0; border-top: 1px solid var(--line-soft); font-size: var(--fs-small); }
.audience-main li { border-top-color: var(--on-dark-line); }
.audience li:first-child { border-top: 0; }
.audience .btn { margin-top: 24px; align-self: flex-start; }

/* ---- Форматы ------------------------------------------------------------ */

.formats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(20px, 2.6vw, 36px);
  margin-top: clamp(28px, 4vw, 52px);
}
.entry-formats { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.format { border-top: 1px solid var(--line); padding-top: 16px; }
.format h3 { margin-bottom: 8px; }
.format h3 a { color: var(--ink); text-decoration: none; }
.format h3 a:hover { color: var(--accent-text); }
.format p { font-size: var(--fs-small); color: var(--muted); margin: 0; }
.text-link { color: var(--accent-text); text-decoration-color: currentColor; text-underline-offset: 4px; font-weight: 650; }

/* ---- Методология -------------------------------------------------------- */

.principles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: clamp(22px, 3vw, 44px);
  margin-top: clamp(28px, 4vw, 52px);
}
.principle h3 { margin-bottom: 10px; }
.principle p { font-size: var(--fs-small); color: var(--ink-soft); margin: 0; }

/* ---- Вопросы ------------------------------------------------------------ */

.faq { margin-top: clamp(28px, 4vw, 48px); max-width: 84ch; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: clamp(18px, 2.2vw, 26px) 44px clamp(18px, 2.2vw, 26px) 0;
  position: relative;
  font-size: var(--fs-h3); letter-spacing: var(--ls-h3); font-weight: 700; line-height: 1.25;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-size: 26px; font-weight: 400; color: var(--accent); line-height: 1;
}
.faq details[open] summary::after { content: '−'; }
.faq details p { padding-bottom: clamp(18px, 2.2vw, 26px); max-width: 70ch; color: var(--ink-soft); margin: 0; }

/* ---- Форма -------------------------------------------------------------- */

.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 26px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-wide { grid-column: 1 / -1; }
.field label {
  font-size: var(--fs-data); letter-spacing: var(--ls-data);
  text-transform: uppercase; font-weight: 600; color: rgba(238, 243, 248, .62);
}
.field input, .field textarea {
  font: inherit; font-size: var(--fs-small);
  background: rgba(238, 243, 248, .07);
  border: 1px solid var(--on-dark-line);
  border-radius: var(--r-sm);
  padding: 13px 15px;
  color: var(--on-dark);
}
.field input::placeholder, .field textarea::placeholder { color: rgba(238, 243, 248, .38); }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent-on-dark); outline-offset: 1px; }
.field textarea { resize: vertical; min-height: 84px; }
.form-note { margin-top: 14px; font-size: 13px; color: rgba(238, 243, 248, .55); }

/* Заявка на странице контактов: форма в правой колонке тёмной полосы. */
.request-band { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: start; }
.request-band .request-lead { color: var(--on-dark-soft); font-size: var(--fs-small); margin-top: 18px; max-width: 44ch; }
.request-alt { margin-top: 22px; color: var(--on-dark-soft); font-size: var(--fs-small); }
.request-alt a, .consent a, .form-status a { color: var(--on-dark); text-underline-offset: 3px; }
.request-form { margin-top: 0; }
.choice { border: 0; margin: 0; padding: 0; min-width: 0; }
.choice legend {
  padding: 0; margin-bottom: 9px;
  font-size: var(--fs-data); letter-spacing: var(--ls-data);
  text-transform: uppercase; font-weight: 600; color: rgba(238, 243, 248, .62);
}
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-chip { position: relative; }
.topic-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.topic-chip span {
  display: inline-block; padding: 9px 14px; cursor: pointer;
  border: 1px solid var(--on-dark-line); border-radius: 999px;
  font-size: var(--fs-small); color: var(--on-dark-soft);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.topic-chip span:hover { color: var(--on-dark); border-color: rgba(238, 243, 248, .38); }
.topic-chip input:checked + span { background: var(--accent-on-dark); border-color: var(--accent-on-dark); color: var(--structure); }
.topic-chip input:focus-visible + span { outline: 2px solid var(--accent-on-dark); outline-offset: 2px; }
.consent { display: flex; gap: 11px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--on-dark-soft); }
.consent input { flex: none; width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--accent-on-dark); }
.form-actions { margin-top: 4px; }
.request-form button[disabled] { opacity: .6; cursor: progress; }
.form-status { margin: 0; min-height: 1.5em; font-size: var(--fs-small); color: var(--on-dark-soft); }
.request-form.is-sent .form-status { color: var(--on-dark); }
.request-form.is-error .form-status { color: var(--accent-on-dark); }
.field-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Адаптив компонентов главной ---------------------------------------- */

@media (max-width: 900px) {
  .hero-grid  { grid-template-columns: minmax(0, 1fr); }
  .directions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audiences  { grid-template-columns: minmax(0, 1fr); }
  .layer      { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .form       { grid-template-columns: minmax(0, 1fr); }
  .request-band { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .directions { grid-template-columns: minmax(0, 1fr); }
  .city-open  { position: static; transform: none; margin-top: 14px; display: inline-flex; }
}

/* =========================================================================
   Сквозной shell: навигация с выпадающими списками, подвал, внутренние
   страницы. Правится в одном месте — tools/shell.py.
   ========================================================================= */

.topbar-inner { gap: clamp(12px, 2vw, 28px); }
.nav-main { display: flex; align-items: center; gap: clamp(10px, 1.6vw, 24px); margin-inline-start: auto; }
.nav-item { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-small); font-weight: 550;
  color: var(--ink-soft); text-decoration: none;
  padding: 8px 0; background: none; border: 0; font-family: inherit; cursor: pointer;
  white-space: nowrap;
}
.nav-link:hover, .nav-item:focus-within > .nav-link { color: var(--accent-text); }
.nav-link[aria-current="page"] { color: var(--ink); font-weight: 650; }
.nav-link .caret { font-size: 9px; opacity: .6; }

.nav-drop {
  position: absolute; top: 100%; left: -18px; z-index: 30;
  min-width: 254px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
  padding: 10px;
  max-height: calc(100vh - 94px); overflow-y: auto; overscroll-behavior: contain;
  display: none;
}
.nav-item:hover > .nav-drop { display: block; }
.nav-item.is-open > .nav-drop { display: block; }
.nav-drop a {
  display: block; padding: 9px 12px; border-radius: var(--r-sm);
  color: var(--ink); text-decoration: none; font-size: var(--fs-small); font-weight: 550;
}
.nav-drop a:hover { background: var(--paper-2); color: var(--accent-text); }
.nav-drop a small { display: block; font-size: 12px; font-weight: 450; color: var(--muted); margin-top: 2px; }

.nav-cta { padding: 11px 20px; font-size: var(--fs-small); }

.artifact-card {
  margin-top: 30px; padding: clamp(22px, 4vw, 46px);
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white);
}
.section.compact-hero { padding-block: clamp(42px, 5vw, 70px); }
.artifact-card h3 { margin: 24px 0 18px; font-size: clamp(25px, 3vw, 40px); line-height: 1.15; }
.artifact-card .lead { max-width: 72ch; }
.artifact-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  color: var(--muted); font-size: var(--fs-data); font-weight: 650; letter-spacing: .03em; }
.artifact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 28px 0; }
.artifact-grid > div { padding: 20px; border-radius: var(--r-sm); background: var(--paper-2); }
.artifact-grid b { display: block; margin-bottom: 9px; }
.artifact-grid p { margin: 0; color: var(--ink-soft); font-size: var(--fs-small); }
@media (max-width: 760px) { .artifact-grid { grid-template-columns: minmax(0, 1fr); } }

/* Образцы формы результата: схемы без вымышленных показателей или источников. */
.artifact-preview { margin-top: 24px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--paper-2); overflow: hidden; box-shadow: var(--shadow); }
.artifact-preview-heading, .artifact-dashboard-header { display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 12px; font: 650 11px/1.5 var(--mono);
  letter-spacing: .08em; color: var(--muted); }
.artifact-brand { font: 750 18px/1.2 var(--font); letter-spacing: -.045em; }
.artifact-report { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(0, 2fr); }
.artifact-report-rail { display: flex; flex-direction: column; gap: 22px; padding: clamp(24px, 3vw, 36px);
  background: var(--structure); color: var(--on-dark); }
.artifact-report-rail > span:not(.artifact-brand) { font: 650 11px/1.5 var(--mono);
  letter-spacing: .08em; color: var(--on-dark-soft); }
.artifact-report-rail strong { margin-top: auto; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.24; letter-spacing: -.03em; }
.artifact-report-rail small { color: var(--on-dark-soft); line-height: 1.5; }
.artifact-report-page { padding: clamp(24px, 3vw, 40px); }
.artifact-report-page h4, .artifact-dashboard-main h4 { margin: 22px 0 10px;
  font-size: clamp(20px, 2.2vw, 30px); line-height: 1.16; letter-spacing: -.03em; }
.artifact-report-page > p { margin: 0 0 28px; max-width: 58ch; color: var(--ink-soft); font-size: var(--fs-small); }
.artifact-report-evidence { display: grid; grid-template-columns: minmax(105px, .32fr) minmax(0, 1fr);
  gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.45; }
.artifact-report-evidence span:first-child { font-weight: 700; color: var(--accent-text); }
.artifact-report-evidence span:last-child { color: var(--ink-soft); }
.artifact-alert { max-width: 760px; padding: clamp(24px, 3vw, 38px); border-left: 5px solid var(--accent-text); }
.artifact-alert-title { display: flex; align-items: center; gap: 12px; margin: 28px 0 12px;
  font-size: clamp(19px, 2.4vw, 27px); line-height: 1.2; letter-spacing: -.02em; }
.artifact-signal-dot { flex: 0 0 11px; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); }
.artifact-alert > p { margin: 0; color: var(--ink-soft); font-size: var(--fs-small); }
.artifact-alert-route { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px; margin-top: 26px; border-top: 1px solid var(--line); padding-top: 20px; }
.artifact-alert-route span { display: block; color: var(--ink-soft); font-size: 13px; line-height: 1.45; }
.artifact-alert-route b { display: block; margin-bottom: 5px; color: var(--ink); }
.artifact-dashboard { padding: 0; }
.artifact-dashboard-header { align-items: center; padding: 20px 26px; border-bottom: 1px solid var(--line); }
.artifact-dashboard-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 26px; }
.artifact-dashboard-filters span { padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 6px; background: var(--white); color: var(--ink-soft); font-size: 12px; }
.artifact-dashboard-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(220px, .7fr);
  gap: 12px; padding: 0 26px 26px; }
.artifact-dashboard-main, .artifact-dashboard-side { padding: clamp(20px, 2.5vw, 30px); background: var(--white);
  border: 1px solid var(--line-soft); border-radius: 7px; }
.artifact-dashboard-main small, .artifact-dashboard-side small { font: 650 11px/1.5 var(--mono);
  letter-spacing: .08em; color: var(--muted); }
.artifact-dashboard-placeholder { display: grid; place-items: center; min-height: 144px; margin-top: 22px;
  padding: 22px; border: 1px dashed var(--line); color: var(--muted); text-align: center;
  font-size: 13px; line-height: 1.45; }
.artifact-dashboard-side b { display: block; margin-top: 24px; font-size: 17px; }
.artifact-dashboard-side p { margin: 8px 0 20px; color: var(--ink-soft); font-size: 13px; }
.artifact-dashboard-side > span { font: 650 11px/1.5 var(--mono); color: var(--accent-text); }
@media (max-width: 760px) {
  .artifact-report, .artifact-dashboard-body { grid-template-columns: minmax(0, 1fr); }
  .artifact-report-rail { gap: 12px; }
  .artifact-report-rail strong { margin-top: 0; }
  .artifact-alert-route { grid-template-columns: minmax(0, 1fr); }
  .artifact-dashboard-body { padding-inline: 16px; }
  .artifact-dashboard-header, .artifact-dashboard-filters { padding-inline: 16px; }
}

.nav-burger {
  display: none;
  font: inherit; font-size: 13px; font-weight: 600;
  padding: 8px 15px; border: 1px solid var(--line); background: var(--white);
  color: var(--ink); border-radius: 100px; cursor: pointer;
}

/* ---- Подвал в четыре колонки -------------------------------------------- */

.footer-main { border-top: 1px solid var(--line); padding-block: clamp(40px, 5vw, 64px) 0; }
.footer-cols {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 44px);
}
.footer-col h4 {
  margin: 0 0 14px; font-size: var(--fs-data); letter-spacing: var(--ls-data);
  text-transform: uppercase; font-weight: 600; color: var(--muted);
}
.footer-col a { display: block; padding: 6px 0; color: var(--ink-soft); text-decoration: none; font-size: var(--fs-small); overflow-wrap: anywhere; }
.footer-col a:hover { color: var(--accent-text); }
.footer-bottom {
  margin-top: clamp(32px, 4vw, 52px); padding-block: 24px;
  border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  font-size: 13px; color: var(--muted);
}
.footer-bottom a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ---- Шапка внутренней страницы ------------------------------------------ */

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: clamp(18px, 2.4vw, 26px); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent-text); }
.crumbs span { opacity: .5; }

.page-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(26px, 4vw, 64px); align-items: end; }
.page-hero .lead { margin-top: clamp(18px, 2.4vw, 26px); }

/* ---- Типы сигналов внутри направления ----------------------------------- */

.signal-list { margin-top: clamp(28px, 4vw, 52px); display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: clamp(20px, 2.8vw, 40px); }
.signal-item { border-top: 2px solid var(--accent); padding-top: 18px; }
.signal-item h3 { margin-bottom: 9px; }
.signal-item p { font-size: var(--fs-small); color: var(--ink-soft); margin: 0; }

/* ---- Пример выдачи ------------------------------------------------------ */

.sample { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(22px, 3vw, 46px); align-items: start; margin-top: clamp(28px, 4vw, 48px); }
.sample-quote { background: var(--blue); color: var(--on-pastel); border-radius: 18px 18px 18px 5px; padding: clamp(20px, 2.4vw, 28px); }
.sample-quote p { font-size: var(--fs-lead); line-height: 1.4; margin: 0 0 14px; }
.sample-quote cite { font-style: normal; font-size: 13px; opacity: .72; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .08em; padding: 5px 11px; border-radius: 100px; margin-bottom: 14px; background: var(--accent-solid); color: var(--on-accent); }
.tag-cold { background: var(--structure); color: var(--on-dark); }

/* ---- Классы сигналов, тарифы, воронка ----------------------------------- */

.classes { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: clamp(18px, 2.4vw, 32px); margin-top: clamp(28px, 4vw, 48px); }
.class-item { border-top: 1px solid var(--on-dark-line); padding-top: 16px; }
.class-item b { display: block; font-size: var(--fs-data); letter-spacing: var(--ls-data); font-weight: 700; margin-bottom: 8px; color: var(--accent-on-dark); }
.class-item p { font-size: var(--fs-small); color: var(--on-dark-soft); margin: 0; }

.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-top: clamp(28px, 4vw, 52px); }
.tier { border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 2.8vw, 34px); background: var(--white); display: flex; flex-direction: column; }
.tier-lead { background: var(--structure); color: var(--on-dark); border-color: transparent; }
.tier-lead .tier-note, .tier-lead .tier-row span:last-child { color: var(--on-dark-soft); }
.tier-lead .tier-row { border-top-color: var(--on-dark-line); }
.tier-name { font-size: var(--fs-data); letter-spacing: var(--ls-data); text-transform: uppercase; font-weight: 700; }
.tier-price { font-size: clamp(30px, 3.4vw, 42px); letter-spacing: -.035em; font-weight: 750; line-height: 1; margin: 14px 0 6px; }
.tier-price small { font-size: .4em; font-weight: 600; letter-spacing: -.01em; }
.tier-note { font-size: var(--fs-small); color: var(--muted); }
.tier-rows { margin: 22px 0 0; flex: 1; }
.tier-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); font-size: var(--fs-small); }
.tier-row span:last-child { font-weight: 650; text-align: right; }
.tier .btn { margin-top: 24px; }

.funnel { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: clamp(18px, 2.4vw, 34px); margin-top: clamp(28px, 4vw, 48px); border-top: 1px solid var(--line); padding-top: clamp(22px, 3vw, 32px); }
.funnel-value { font-size: clamp(28px, 3.2vw, 42px); letter-spacing: -.04em; font-weight: 750; line-height: 1; display: block; }
.funnel-note { margin-top: 10px; font-size: 13px; color: var(--muted); line-height: 1.4; }

/* ---- Соседние страницы --------------------------------------------------- */

.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--gap); margin-top: clamp(28px, 4vw, 48px); }
.related a {
  display: block; padding: clamp(20px, 2.4vw, 28px);
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--white); text-decoration: none; color: var(--ink);
  transition: border-color var(--dur) var(--ease);
}
.related a:hover { border-color: var(--ink); }
.related .label-data { margin-bottom: 8px; }
.related b { font-weight: 700; font-size: var(--fs-h3); letter-spacing: var(--ls-h3); }

/* ---- Каталог и содержательные страницы решений --------------------------- */

.solution-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: clamp(24px, 3vw, 38px);
}
.solution-tile {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 250px;
  padding: clamp(24px, 3vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.solution-tile:hover { border-color: var(--accent-text); transform: translateY(-3px); }
.solution-tile h3 { max-width: 24ch; }
.solution-tile p { color: var(--muted); font-size: var(--fs-small); max-width: 68ch; }
.solution-tile .link-arrow { margin-top: auto; align-self: flex-start; }
.solution-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: clamp(26px, 4vw, 48px);
}
.solution-steps > div {
  padding-top: 18px;
  border-top: 2px solid var(--accent);
}
.solution-steps b { display: block; margin-bottom: 14px; font-size: var(--fs-small); }
.solution-steps p { color: var(--muted); font-size: var(--fs-small); }
.solution-brief { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); list-style: none; padding: 0; margin: clamp(26px, 4vw, 48px) 0 0; }
.solution-brief li { border-top: 2px solid var(--line); padding-top: 18px; color: var(--ink-soft); line-height: 1.55; }

@media (max-width: 900px) {
  .solution-steps, .solution-brief { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .solution-tiles, .solution-steps, .solution-brief { grid-template-columns: minmax(0, 1fr); }
}

/* ---- Заглушка правовой страницы ------------------------------------------ */

.stub { max-width: 68ch; }
.stub .btn { margin-top: 26px; }

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

@media (max-width: 1150px) {
  .nav-main {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px var(--gutter) 20px;
    max-height: calc(100vh - 72px); overflow-y: auto; overscroll-behavior: contain;
  }
  .topbar.nav-open .nav-main { display: flex; }
  .nav-burger { display: inline-flex; }
  .nav-item { position: static; }
  .nav-link { padding: 12px 0; font-size: 16px; }
  .nav-item > button.nav-link { width: 100%; justify-content: space-between; }
  .nav-link .caret { display: inline; font-size: 13px; transition: transform .2s ease; }
  .nav-item.is-open > .nav-link .caret { transform: rotate(180deg); }
  .nav-drop,
  .nav-item:hover > .nav-drop,
  .nav-item:focus-within > .nav-drop { display: none; position: static; border: 0; box-shadow: none; background: none; padding: 0 0 8px 14px; min-width: 0; }
  .nav-item.is-open > .nav-drop { display: block; }
  .nav-drop { max-height: none; overflow: visible; }
  .nav-drop a { padding: 8px 0; }
  .nav-drop a small { display: none; }
  .nav-cta { margin-top: 14px; align-self: flex-start; }
}
/* На телефоне переключатель темы — только значок (подпись есть в aria-label):
   иначе при открытом меню «Закрыть» выталкивает его за правый край. Текущая
   страница в хлебных крошках не повторяет заголовок, идущий сразу под ней. */
@media (max-width: 480px) {
  .theme-toggle { min-width: 44px; min-height: 44px; padding: 8px 10px;
    gap: 0; justify-content: center; font-size: 0; }
  .theme-toggle span { font-size: 18px; }
  .crumbs > span:last-child, .crumbs > span:nth-last-child(2) { display: none; }
}
@media (max-width: 360px) {
  .topbar-inner { gap: 6px; }
  .logo { font-size: 18px; }
  .nav-burger { min-height: 40px; padding: 8px 10px; }
  .theme-toggle { min-width: 40px; min-height: 40px; }
}
@media (max-width: 900px) {
  .page-hero { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .page-hero { gap: 22px; }
  .page-hero .lead { margin-top: 0; }
  .sample     { grid-template-columns: minmax(0, 1fr); }
  .tiers      { grid-template-columns: minmax(0, 1fr); }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .page-hero h1 { font-size: clamp(31px, 9vw, 40px); line-height: 1.06; }
  .page-hero h1.is-mid, .page-hero h1.is-long { font-size: clamp(28px, 8vw, 36px); }
  .page-hero .hero-actions { margin-top: 22px; }
  .page-hero .hero-actions .btn { width: 100%; justify-content: center; }
}

/* =========================================================================
   Блог: лента и статья
   ========================================================================= */

.cat-filter { display: flex; flex-wrap: wrap; gap: 9px; margin-top: clamp(26px, 3.4vw, 40px); }
.cat-btn {
  font: inherit; font-size: 13px; font-weight: 600;
  padding: 9px 16px; border-radius: 100px;
  border: 1px solid var(--line); background: var(--white); color: var(--ink);
  cursor: pointer; transition: border-color var(--dur) var(--ease);
}
.cat-btn:hover { border-color: var(--ink); }
.cat-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.cat-btn span { opacity: .55; margin-left: 5px; font-weight: 450; }

.post-list { margin-top: clamp(26px, 3.4vw, 42px); border-top: 1px solid var(--line); }
.post-card {
  display: grid; grid-template-columns: 132px minmax(0, 1fr) auto;
  gap: clamp(16px, 2.4vw, 36px);
  align-items: baseline;
  padding: clamp(20px, 2.4vw, 30px) 0;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none; color: var(--ink);
}
.post-card:hover .post-title { color: var(--accent-text); }
.post-meta { font-family: var(--mono); font-size: 12px; color: var(--muted); line-height: 1.6; }
.post-meta b { display: block; font-family: var(--font); font-weight: 650; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 4px; }
/* Заголовок и описание лежат в span внутри span: без display:block отступы
   не работают и описание прилипает к заголовку одной строкой. */
.post-title { display: block; font-size: var(--fs-h3); letter-spacing: var(--ls-h3); font-weight: 700; line-height: 1.25; margin: 0 0 8px; transition: color var(--dur) var(--ease); }
.post-desc { display: block; font-size: var(--fs-small); color: var(--muted); margin: 0; max-width: 72ch; }
.post-arrow { font-size: 18px; color: var(--muted); }
.post-empty { padding: 40px 0; color: var(--muted); }

/* ---- Статья -------------------------------------------------------------- */

.post-h1 {
  font-size: clamp(31px, min(3.9vw, 6.6vh), 54px);
  letter-spacing: var(--ls-display-2);
  max-width: 24ch;
}

.post-h1.is-long { font-size: clamp(28px, min(3.2vw, 5.4vh), 44px); max-width: 28ch; }
/* На телефоне архивные заголовки до 144 знаков шли в 7–8 строк. */
@media (max-width: 560px) {
  .post-h1 { font-size: clamp(26px, 7.4vw, 30px); }
  .post-h1.is-long { font-size: clamp(22px, 6.4vw, 26px); }
}

.article { max-width: 68ch; overflow-wrap: anywhere; }
.article h2 { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: var(--ls-h2); margin: clamp(34px, 4vw, 52px) 0 14px; }
.article h3, .article h4 { font-size: var(--fs-h3); letter-spacing: var(--ls-h3); margin: clamp(26px, 3vw, 38px) 0 12px; }
.article p { margin: 0 0 1.1em; line-height: 1.68; }
.article ul, .article ol { margin: 0 0 1.4em; padding-left: 24px; }
.article li { padding: 5px 0; line-height: 1.6; }
.article a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.article strong { font-weight: 700; }
.article figure { margin: clamp(26px, 3vw, 40px) 0; }
.article figure img { border-radius: var(--r-md); width: 100%; }
.article img { border-radius: var(--r-sm); }

.archive-note {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-sm);
  background: var(--white);
  padding: 16px 20px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: clamp(28px, 3.4vw, 44px);
  max-width: 68ch;
}

.article-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 13px; color: var(--muted); margin-top: 18px; }
.article-meta b { color: var(--accent-text); font-weight: 650; }

@media (max-width: 760px) {
  .post-card { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .post-arrow { display: none; }
  .post-meta { display: flex; gap: 12px; align-items: baseline; }
  .post-meta b { margin-bottom: 0; }
}

/* ---- Сетки без одиночки в последнем ряду -------------------------------- */
/* Аудит планшетов 2026-09-26: на iPad и узком десктопе четыре карточки ложились
   3 + 1, пять шагов — 4 + 1. Четыре — 2 × 2, на широком экране 4 в ряд;
   пять — 3 + 2. На телефоне остаются одноколоночные правила. */
@media (min-width: 641px) {
  :is(.related, .signal-list, .formats, .solution-brief, .solution-steps, .principles,
      .contrasts, .classes, .steps, .timeline, .directions):has(> :nth-child(4):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 901px) {
  :is(.related, .signal-list, .formats, .solution-steps, .steps, .classes):has(> :nth-child(5):last-child) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .related:has(> :nth-child(7):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* Четыре в ряд — только сетки с мелким текстом. В сетках с крупным h3
   (карточки направлений, сигналы, форматы, шаги, принципы) четыре колонки рвали
   слова вроде «формулируют» и «Сопровождение» — они остаются 2 × 2. */
@media (min-width: 1200px) {
  :is(.related, .solution-brief, .solution-steps, .contrasts, .classes, .timeline):has(> :nth-child(4):last-child) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
/* На самом узком экране заголовок CTA-полосы не рвёт длинные слова. */
@media (max-width: 380px) { .cta-band h2 { font-size: 24px; } }
