/* ==========================================================================
   Блог Партнёриум — демонстрационный прототип

   Две темы. Светлая — основная и первоначальная, тёмная — по выбору читателя.

   Откуда цвета:
   · тёмная тема — «Partnerium Design System.pdf», разд. 03–07;
   · светлая тема — светлые токены самого продукта из globals.css, снятые
     с партнёриум-продакшена (--color-background #f0f2f7, --color-foreground
     #1a1a2e, --color-card #ffffffb8, --color-accent #00b8b8, --color-input
     #e2e5ed, --color-secondary #eef0f6, стеклянные тени --glass-shadow).
   Новой фирменной палитры не придумано: то, чего в источниках не было
   (три ступени серого текста, янтарные чернила предупреждения, тёмный тил
   для мелкого акцентного текста), выведено затемнением подтверждённых
   токенов до контраста не ниже 4.5:1. Замеры — в ЧЕКЛИСТ_БЕЗОПАСНОСТИ.md.
   ========================================================================== */

@import url("fonts/fonts.css");

:root {
  /* ─────────── бренд: одинаков в обеих темах (ДС, разд. 03) ─────────── */
  --primary: #6c5ce7;
  --primary-light: #a29bfe;
  --primary-dark: #5a4bd1;
  --accent: #00d2d3;
  --accent-dark: #00b894;
  --accent-light: #55efc4;
  --cyan-400: #22d3ee;
  --teal-400: #2dd4bf;

  /* ─────────── отступы: 4 / 8 / 16 / 24 / 32 / 48 / 64 ─────────── */
  --xs: 4px;  --sm: 8px;  --md: 16px;
  --lg: 24px; --xl: 32px; --2xl: 48px; --3xl: 64px;

  /* ─────────── радиусы ─────────── */
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-xl: 24px; --r-full: 999px;

  /* ─────────── ритм страницы ─────────── */
  --section-y: 64px;   /* ДС даёт 96px для лендинга; у блога плотность выше — см. README */
  --container: 1280px;
  --container-narrow: 800px;
  --gutter: 24px;
  --header-h: 72px;

  /* ─────────── типографика ─────────── */
  --font-heading: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --fs-xs: 11px; --fs-sm: 13px; --fs-base: 15px; --fs-lg: 18px;
  --fs-xl: 22px; --fs-2xl: 28px; --fs-3xl: 36px; --fs-4xl: 48px;

  /* ─────────── движение: 150 / 250 / 400, кривая ease ─────────── */
  --t-fast: 150ms ease;
  --t: 250ms ease;
}

/* ==========================================================================
   СВЕТЛАЯ ТЕМА — основная и первоначальная
   ========================================================================== */
:root,
:root[data-theme="light"] {
  color-scheme: light;

  --bg: #f0f2f7;
  --bg-alt: #eef0f6;
  --surface: #ffffff;
  --surface-2: #e8ebf2;
  --card: rgba(255, 255, 255, 0.72);
  --card-hover: #ffffff;
  --footer-bg: #e2e5ed;

  --text-primary: #1a1a2e;
  --text-secondary: #4b5563;
  --text-tertiary: #5a6478;

  --link: #5a4bd1;
  --link-hover: #6c5ce7;

  --border-c: #e2e5ed;
  --border-c-hover: #cfd4e0;
  --border-accent-c: rgba(0, 184, 184, 0.45);

  /* акцент-заливка: светлый циан продукта → accent-dark; текст на ней тёмный */
  --accent-a: #00b8b8;
  --accent-b: #00b894;
  --accent-ink: #0b0d17;
  --accent-text: #00685a;            /* циан как мелкий текст на светлом, с запасом по контрасту на тинте */
  --accent-soft: rgba(0, 184, 184, 0.1);
  --accent-line: rgba(0, 184, 184, 0.3);

  --neutral-soft: rgba(26, 26, 46, 0.06);

  --warn-ink: #7a5b16;
  --warn-bg: rgba(254, 202, 87, 0.2);
  --warn-border: rgba(254, 202, 87, 0.55);

  --glass-bg: rgba(255, 255, 255, 0.78);
  --logo-divider: rgba(26, 26, 46, 0.16);

  /* стеклянные тени продукта */
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 16px 48px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.05);
  --glow-accent: 0 6px 18px rgba(0, 184, 184, 0.25);
  --glow-accent-hover: 0 10px 26px rgba(0, 184, 184, 0.35);

  --hero-grad: linear-gradient(135deg, #00a3a8, #00967c);
  --logo-grad: linear-gradient(135deg, #6c5ce7, #00a3a8);

  --cover-bg: #ffffff;
  --cover-ink: #1a1a2e;

  --field-bg: #ffffff;
  --toast-bg: #1a1a2e;
  --toast-ink: #f0f2f7;
}

/* ==========================================================================
   ТЁМНАЯ ТЕМА — по выбору читателя (токены дизайн-системы, разд. 03–06)
   ========================================================================== */
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0b0d17;
  --bg-alt: #0d1122;
  --surface: #12152a;
  --surface-2: #1a1e3a;
  --card: #161a35;
  --card-hover: #1e2347;
  --footer-bg: #08090f;

  --text-primary: #f0f0f5;
  --text-secondary: #a0a3bd;
  /* Дизайн-система даёт --text-tertiary #6B6F8D, но на тёмных поверхностях
     он выдаёт 2.94–4.06 : 1 при норме AA 4.5 : 1 — мелкие подписи читаются плохо.
     По решению от 23.09.2026 тон осветлён на 24% в сторону белого: минимум
     стал 4.70 : 1, при этом он остаётся темнее вторичного и три ступени
     текста не сливаются. Отступление от ДС, вынесено на согласование. */
  --text-tertiary: #8f92a8;

  --link: #a29bfe;
  --link-hover: #6c5ce7;

  --border-c: rgba(255, 255, 255, 0.08);
  --border-c-hover: rgba(255, 255, 255, 0.15);
  --border-accent-c: rgba(34, 211, 238, 0.4);

  --accent-a: #22d3ee;
  --accent-b: #2dd4bf;
  --accent-ink: #0b0d17;
  --accent-text: #22d3ee;
  --accent-soft: rgba(34, 211, 238, 0.08);
  --accent-line: rgba(34, 211, 238, 0.25);

  --neutral-soft: rgba(255, 255, 255, 0.06);

  --warn-ink: #feca57;
  --warn-bg: rgba(254, 202, 87, 0.12);
  --warn-border: rgba(254, 202, 87, 0.28);

  --glass-bg: rgba(11, 13, 23, 0.72);
  --logo-divider: rgba(255, 255, 255, 0.15);

  --shadow-card: none;
  --shadow-card-hover: 0 20px 40px rgba(0, 0, 0, 0.3);
  --glow-accent: 0 0 30px rgba(34, 211, 238, 0.18);
  --glow-accent-hover: 0 0 44px rgba(34, 211, 238, 0.3);

  --hero-grad: linear-gradient(135deg, #22d3ee, #2dd4bf);
  --logo-grad: linear-gradient(135deg, #a29bfe, #22d3ee);

  --cover-bg: #12152a;
  --cover-ink: #ffffff;

  --field-bg: #1a1e3a;
  --toast-bg: #222750;
  --toast-ink: #f0f0f5;
}

/* общие производные */
:root {
  --border: 1px solid var(--border-c);
  --border-hover: 1px solid var(--border-c-hover);
  --grad-brand: linear-gradient(135deg, #a29bfe, #22d3ee);
  --grad-primary: linear-gradient(135deg, #a29bfe, #6c5ce7);
}

/* ==========================================================================
   База
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

/* Атрибут hidden обязан побеждать display из классов: карточки .card и .row
   объявлены как flex/grid, и без !important браузерное [hidden]{display:none}
   их не скрывает — фильтр и поиск тогда работают вхолостую. */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--lg));
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* плавное переключение включается только после первого взаимодействия,
   чтобы при загрузке страницы ничего не «проявлялось» */
html.theme-anim body,
html.theme-anim .header,
html.theme-anim .card,
html.theme-anim .row,
html.theme-anim .footer,
html.theme-anim .bridge,
html.theme-anim .subscribe,
html.theme-anim .toc,
html.theme-anim .cover,
html.theme-anim .section--alt {
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 800;
  /* Длинный неразрывный заголовок не должен раздвигать сетку: без этого
     одно слово в карточке растягивало grid-колонку и ломало страницу. */
  overflow-wrap: anywhere;
}

/* Грид- и флекс-элементы по умолчанию не сжимаются уже min-content —
   именно поэтому длинное слово внутри карточки уносило всю колонку. */
.grid > *, .stack > *, .card, .row, .prevnext__item { min-width: 0; }
.card__title, .card__excerpt, .row__body, .prevnext__title, .article__title,
.hero__title, .section__title { overflow-wrap: anywhere; min-width: 0; }

a { color: var(--link); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--link-hover); }
img { max-width: 100%; display: block; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: var(--container-narrow); }

.section { padding: var(--section-y) 0; }
.section--alt { background: var(--bg-alt); }
.section__head { margin-bottom: var(--2xl); }
.section__title { font-size: var(--fs-4xl); line-height: 1.1; }
.section__sub { margin: var(--md) 0 0; max-width: 640px; font-size: var(--fs-lg); }

.eyebrow {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin: 0 0 var(--md);
}

/* ==========================================================================
   Служебная плашка прототипа
   ========================================================================== */
.demo-bar {
  background: var(--warn-bg);
  border-bottom: 1px solid var(--warn-border);
  color: var(--warn-ink);
  font-size: var(--fs-sm);
  line-height: 1.45;
  padding: 10px 0;
}
.demo-bar__inner { display: flex; align-items: flex-start; gap: var(--sm); }
.demo-bar svg { flex: none; width: 16px; height: 16px; margin-top: 2px; }

/* ==========================================================================
   Шапка
   ========================================================================== */
.header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: var(--border);
}
.header__inner { height: 100%; display: flex; align-items: center; gap: var(--xl); }

.logo { display: flex; align-items: center; gap: 10px; flex: none; }
.logo__word {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: var(--fs-xl);
  letter-spacing: -0.02em;
  background: var(--logo-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.logo__divider { width: 1px; height: 20px; background: var(--logo-divider); }
.logo__section {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-lg);
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav { display: flex; align-items: center; gap: var(--lg); margin-right: auto; }
.nav a {
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--text-secondary);
  padding: var(--sm) 0;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text-primary); }

.header__actions { display: flex; align-items: center; gap: 10px; flex: none; }

/* ─── переключатель темы ─── */
.theme-toggle {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  border: var(--border);
  border-radius: var(--r-md);
  color: var(--text-primary);
  cursor: pointer;
  flex: none;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.theme-toggle:hover { border-color: var(--border-c-hover); color: var(--text-primary); }
.theme-toggle svg { width: 18px; height: 18px; }
/* в светлой теме предлагаем тёмную (луна), в тёмной — светлую (солнце) */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.theme-toggle--wide {
  width: auto; height: auto;
  gap: var(--sm);
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 600;
}
.theme-toggle--wide .label-dark { display: inline; }
.theme-toggle--wide .label-light { display: none; }
:root[data-theme="dark"] .theme-toggle--wide .label-dark { display: none; }
:root[data-theme="dark"] .theme-toggle--wide .label-light { display: inline; }

.header__search-link {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  background: var(--surface-2);
  border: var(--border);
  border-radius: var(--r-md);
  color: var(--text-primary);
  flex: none;
  transition: border-color var(--t-fast), color var(--t-fast);
}
.header__search-link:hover { border-color: var(--border-c-hover); color: var(--text-primary); }
.header__search-link svg { width: 18px; height: 18px; }

.burger {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  background: var(--surface-2);
  border: var(--border);
  border-radius: var(--r-md);
  color: var(--text-primary);
  cursor: pointer;
}
.burger svg { width: 20px; height: 20px; }

.mobile-menu {
  display: none;
  position: fixed; inset: 0; z-index: 60;
  background: var(--bg);
  padding: var(--lg) 0;
  overflow-y: auto;
}
.mobile-menu[data-open="true"] { display: block; }
.mobile-menu__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--xl); }
.mobile-menu__list { display: flex; flex-direction: column; gap: var(--xs); margin-bottom: var(--xl); }
.mobile-menu__list a {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-2xl);
  color: var(--text-primary);
  letter-spacing: -0.02em;
  padding: 10px 0;
}
.mobile-menu__rubrics { display: flex; flex-wrap: wrap; gap: var(--sm); margin-bottom: var(--xl); }
.mobile-menu .btn, .mobile-menu .theme-toggle--wide { width: 100%; }

/* ==========================================================================
   Кнопки (ДС, разд. 06 и 09): радиус 10, вес 600
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sm);
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t-fast), background var(--t-fast), color var(--t-fast);
}
.btn--sm  { padding: 8px 16px;  font-size: var(--fs-sm); }
.btn--md  { padding: 12px 24px; font-size: var(--fs-base); }
.btn--lg  { padding: 16px 32px; font-size: var(--fs-lg); }

.btn--accent {
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  color: var(--accent-ink);
  box-shadow: var(--glow-accent);
}
.btn--accent:hover { transform: translateY(-2px); box-shadow: var(--glow-accent-hover); color: var(--accent-ink); }

.btn--ghost { background: transparent; border-color: var(--border-c-hover); color: var(--text-primary); }
.btn--ghost:hover { background: var(--neutral-soft); border-color: var(--text-tertiary); color: var(--text-primary); }

.btn--secondary { background: var(--surface-2); color: var(--text-primary); border-color: var(--border-c); }
.btn--secondary:hover { background: var(--card-hover); border-color: var(--border-c-hover); color: var(--text-primary); }

.btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none;
}

.lang-chip {
  display: inline-flex; align-items: center; gap: var(--xs);
  padding: 7px 12px;
  border: var(--border-hover);
  border-radius: var(--r-md);
  font-size: var(--fs-sm); font-weight: 600;
  color: var(--text-primary);
}

/* ─── чипы рубрик ─── */
.chip {
  display: inline-flex; align-items: center; gap: var(--xs);
  padding: 7px 14px;
  border-radius: var(--r-full);
  border: var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: var(--fs-sm); font-weight: 500;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}
.chip:hover { border-color: var(--border-accent-c); color: var(--text-primary); background: var(--card-hover); }
.chip[aria-current="page"] {
  background: var(--accent-soft);
  border-color: var(--border-accent-c);
  color: var(--text-primary);
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: var(--fs-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  background: var(--accent-soft);
  color: var(--accent-text);
}
.badge--muted { background: var(--neutral-soft); color: var(--text-tertiary); }

/* ==========================================================================
   Первый экран блога
   ========================================================================== */
.hero { padding: var(--3xl) 0 var(--section-y); }
.hero__title {
  font-size: 64px; line-height: 1.05; letter-spacing: -0.03em;
  max-width: 14ch;
}
.hero__title .accent {
  background: var(--hero-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lead { font-size: 20px; line-height: 1.55; max-width: 60ch; margin: var(--lg) 0 0; }
.hero__rubrics { display: flex; flex-wrap: wrap; gap: var(--sm); margin-top: var(--xl); }
.hero__note { margin-top: var(--lg); font-size: var(--fs-sm); color: var(--text-tertiary); }

/* ==========================================================================
   Обложки — геометрия из брендовых градиентов, не фотографии.
   Цвет линий приходит через currentColor, поэтому одна и та же svg
   работает в обеих темах.
   ========================================================================== */
.cover {
  position: relative;
  border-radius: var(--r-lg);
  border: var(--border);
  background: var(--cover-bg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  color: var(--cover-ink);
}
.cover svg { width: 100%; height: 100%; display: block; }
.cover__tag {
  position: absolute; left: var(--md); bottom: var(--md);
  padding: 5px 10px;
  border-radius: var(--r-full);
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  border: var(--border);
  font-size: var(--fs-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-secondary);
}

/* ==========================================================================
   Карточки материалов
   ========================================================================== */
.card {
  display: flex; flex-direction: column;
  background: var(--card);
  border: var(--border);
  border-radius: var(--r-lg);
  padding: var(--lg);
  box-shadow: var(--shadow-card);
  transition: transform var(--t), border-color var(--t-fast), background var(--t-fast), box-shadow var(--t);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent-c);
  background: var(--card-hover);
  box-shadow: var(--shadow-card-hover);
}
.card .cover { margin: calc(var(--lg) * -1) calc(var(--lg) * -1) var(--md); border: 0; border-bottom: var(--border); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.card__meta { display: flex; align-items: center; gap: var(--sm); font-size: var(--fs-xs); color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.card__title { font-size: var(--fs-xl); line-height: 1.25; margin: 10px 0 var(--sm); font-weight: 700; }
.card__excerpt { margin: 0; font-size: var(--fs-base); color: var(--text-secondary); }
.card__foot { margin-top: auto; padding-top: var(--md); font-size: var(--fs-sm); color: var(--text-tertiary); }

.card--lead { padding: 0; overflow: hidden; }
.card--lead .cover { margin: 0; border-radius: 0; aspect-ratio: 16 / 7; }
.card--lead .card__body { padding: var(--xl); display: flex; flex-direction: column; flex: 1; }
.card--lead .card__title { font-size: var(--fs-3xl); line-height: 1.15; font-weight: 800; }

.grid { display: grid; gap: var(--lg); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--featured { grid-template-columns: 1.4fr 1fr; align-items: stretch; }
.stack { display: flex; flex-direction: column; gap: var(--lg); }

/* ─── компактная строка статьи (список рубрики) ─── */
.row {
  display: grid; grid-template-columns: 220px 1fr; gap: var(--lg);
  padding: var(--lg);
  border: var(--border);
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: var(--shadow-card);
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t), box-shadow var(--t);
}
.row:hover { border-color: var(--border-accent-c); background: var(--card-hover); transform: translateY(-2px); box-shadow: var(--shadow-card-hover); }
.row .cover { aspect-ratio: 16 / 10; }
.row__body { display: flex; flex-direction: column; }

/* ==========================================================================
   Мягкий переход на основной сайт
   ========================================================================== */
.bridge {
  border: var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  padding: var(--2xl);
  display: flex; align-items: center; justify-content: space-between; gap: var(--xl);
}
.bridge h2 { font-size: var(--fs-2xl); line-height: 1.25; max-width: 24ch; }
.bridge p { margin: var(--sm) 0 0; max-width: 56ch; }
.bridge__actions { display: flex; flex-direction: column; gap: 10px; flex: none; }

/* ─── форма подписки, в прототипе неактивна ─── */
.subscribe {
  border: var(--border);
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: var(--shadow-card);
  padding: var(--xl);
}
.subscribe__row { display: flex; gap: 10px; margin-top: var(--md); }
.input {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: var(--border);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-base);
}
.input::placeholder { color: var(--text-tertiary); }
.input[disabled] { opacity: 0.65; cursor: not-allowed; }
.form-note { margin: var(--md) 0 0; font-size: var(--fs-sm); color: var(--text-tertiary); }

/* ==========================================================================
   Страница статьи
   ========================================================================== */
.breadcrumbs { font-size: var(--fs-sm); color: var(--text-tertiary); padding-top: var(--xl); }
.breadcrumbs a { color: var(--text-secondary); }
.breadcrumbs a:hover { color: var(--link); }
.breadcrumbs span { margin: 0 var(--sm); }

.article__header { padding: var(--md) 0 var(--lg); }
.article__title { font-size: var(--fs-4xl); line-height: 1.12; margin: var(--md) 0; }
.article__lead { font-size: 20px; line-height: 1.55; margin: 0 0 var(--lg); }
.article__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--md);
  padding-top: var(--md);
  border-top: var(--border);
  font-size: var(--fs-sm); color: var(--text-tertiary);
}
.author { display: flex; align-items: center; gap: 10px; }
.author__avatar {
  width: 32px; height: 32px; border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-ink); font-family: var(--font-heading); font-weight: 800; font-size: var(--fs-sm);
}
.author__name { color: var(--text-primary); font-weight: 600; }

.notice {
  display: flex; gap: var(--md);
  border-radius: var(--r-lg);
  padding: var(--md) var(--lg);
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-ink);
  font-size: var(--fs-sm);
  line-height: 1.5;
}
.notice svg { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.notice strong { color: var(--warn-ink); }

.toc {
  border: var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  padding: var(--lg);
}
.toc__title { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-tertiary); font-weight: 600; margin: 0 0 var(--md); }
.toc ol { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 10px; }
.toc li::marker { color: var(--text-tertiary); }
.toc a { color: var(--text-secondary); font-size: var(--fs-base); }
.toc a:hover { color: var(--link); }

.prose { font-size: 17px; line-height: 1.75; color: var(--text-secondary); }
.prose h2 { font-size: var(--fs-2xl); line-height: 1.25; margin: var(--2xl) 0 var(--md); }
.prose h3 { font-size: var(--fs-xl); line-height: 1.3; margin: var(--xl) 0 10px; font-weight: 700; }
.prose p { margin: 0 0 var(--md); }
.prose ul { margin: 0 0 var(--md); padding-left: 1.3em; }
.prose li { margin-bottom: var(--sm); }
.prose li::marker { color: var(--accent-text); }
.prose strong { color: var(--text-primary); font-weight: 600; }

.pull {
  margin: var(--xl) 0;
  padding: var(--lg) var(--xl);
  border-left: 3px solid transparent;
  border-image: var(--grad-brand) 1;
  background: var(--bg-alt);
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  line-height: 1.4;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.callout {
  margin: var(--xl) 0;
  padding: var(--lg);
  border-radius: var(--r-lg);
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
}
.callout__label {
  font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--accent-text); margin: 0 0 var(--sm);
}
.callout p:last-child { margin-bottom: 0; }

.article-cta {
  margin: var(--xl) 0;
  padding: var(--xl);
  border-radius: var(--r-lg);
  border: var(--border);
  background: var(--card);
  box-shadow: var(--shadow-card);
  display: flex; align-items: center; justify-content: space-between; gap: var(--lg);
}
.article-cta h3 { font-size: var(--fs-xl); line-height: 1.3; font-weight: 700; }
.article-cta p { margin: var(--sm) 0 0; font-size: var(--fs-base); max-width: 48ch; }

/* ==========================================================================
   Подвал
   ========================================================================== */
.footer { background: var(--footer-bg); border-top: var(--border); padding: var(--3xl) 0 var(--xl); }
/* Колонок стало пять: бренд + Блог + Рубрики + Правовая информация + Контакты.
   В сетке на четыре «Контакты» уезжали на вторую строку и оставляли пустоту. */
.footer__grid { display: grid; grid-template-columns: 1.15fr repeat(5, minmax(0, 1fr)); gap: var(--xl) var(--lg); }
.footer__about { margin: var(--md) 0 0; font-size: var(--fs-sm); color: var(--text-tertiary); max-width: 34ch; }
.footer__col h4 {
  font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-tertiary); margin: 0 0 var(--md);
}
.footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer__col a { font-size: var(--fs-sm); color: var(--text-secondary); }
.footer__col a:hover { color: var(--link); }
.footer__legal {
  margin-top: var(--3xl); padding-top: var(--lg);
  border-top: var(--border);
  font-size: var(--fs-sm); color: var(--text-tertiary); line-height: 1.6;
}
.footer__legal p { margin: 0 0 var(--xs); }
.footer__legal .warn { margin-top: var(--md); color: var(--warn-ink); }

/* ==========================================================================
   Адаптив
   ========================================================================== */
@media (max-width: 1024px) {
  :root { --section-y: 56px; }
  .section__title { font-size: var(--fs-3xl); }
  .hero__title { font-size: 48px; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--featured { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--xl) var(--lg); }
  .footer__brand { grid-column: 1 / -1; }
  .article__title { font-size: var(--fs-3xl); }
}

@media (max-width: 720px) {
  :root { --section-y: 44px; --gutter: 16px; }
  .nav, .header__actions .desktop-only { display: none; }
  .burger { display: inline-flex; }
  .header__actions { margin-left: auto; }
  .header__inner { gap: var(--md); }
  .logo__word { font-size: var(--fs-lg); }
  .logo__section { font-size: var(--fs-base); }

  .hero { padding: var(--xl) 0 var(--section-y); }
  .hero__title { font-size: 30px; max-width: none; }
  .hero__lead { font-size: var(--fs-lg); }
  .section__title { font-size: 30px; }
  .section__head { margin-bottom: var(--xl); }
  .section__sub { font-size: var(--fs-base); }

  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .card--lead .card__body { padding: var(--lg); }
  .card--lead .card__title { font-size: var(--fs-2xl); }

  .row { grid-template-columns: 1fr; }

  .bridge { flex-direction: column; align-items: flex-start; padding: var(--lg); }
  .bridge__actions { width: 100%; }
  .bridge .btn { width: 100%; }

  .subscribe { padding: var(--lg); }
  .subscribe__row { flex-direction: column; }
  .subscribe .btn { width: 100%; }

  .article__title { font-size: 30px; }
  .article__lead { font-size: var(--fs-lg); }
  .prose { font-size: var(--fs-lg); }
  .prose h2 { font-size: var(--fs-xl); }
  .pull { padding: var(--md) var(--lg); font-size: var(--fs-lg); }
  .article-cta { flex-direction: column; align-items: flex-start; padding: var(--lg); }
  .article-cta .btn { width: 100%; }

  .footer { padding-top: var(--2xl); }
  .footer__grid { grid-template-columns: 1fr; gap: var(--lg); }
  .footer__brand { grid-column: auto; }
  .footer__legal { margin-top: var(--xl); }
}

/* ==========================================================================
   Доступность: подпись только для скринридеров
   ========================================================================== */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   Поиск в шапке и на страницах списков
   ========================================================================== */
.site-search {
  position: relative;
  display: flex; align-items: center; gap: var(--sm);
  padding: 0 12px;
  height: 40px;
  border: var(--border);
  border-radius: var(--r-md);
  background: var(--field-bg);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.site-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.18); }
.site-search > svg { flex: none; width: 16px; height: 16px; color: var(--text-tertiary); }
.site-search input {
  flex: 1; min-width: 0;
  border: 0; outline: 0; background: transparent;
  font-family: var(--font-body); font-size: var(--fs-sm);
  color: var(--text-primary);
}
.site-search input::placeholder { color: var(--text-tertiary); }
.site-search input::-webkit-search-cancel-button { display: none; }
.site-search--wide { width: 100%; height: 48px; padding: 0 16px; }
.site-search--wide input { font-size: var(--fs-base); }
.site-search__clear {
  flex: none; width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--r-full);
  background: var(--neutral-soft); color: var(--text-secondary);
  cursor: pointer;
}
.site-search__clear svg { width: 14px; height: 14px; }
.site-search__clear:hover { color: var(--text-primary); }
.header .site-search { width: 210px; }

/* ==========================================================================
   Панель списка: поиск + чипы + счётчик
   ========================================================================== */
.listbar { display: flex; flex-direction: column; gap: var(--md); margin-bottom: var(--xl); }
.listbar__count { margin: 0; font-size: var(--fs-sm); color: var(--text-secondary); }
.chips-row { display: flex; flex-wrap: wrap; gap: var(--sm); }

.chip__count {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: var(--r-full);
  background: var(--neutral-soft);
  font-size: var(--fs-xs); font-weight: 600;
  color: var(--text-secondary);
}
.chip[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--border-accent-c);
  color: var(--text-primary);
}
.chip[aria-pressed="true"] .chip__count { background: var(--accent-line); color: var(--text-primary); }
button.chip { font-family: var(--font-body); cursor: pointer; }

/* ==========================================================================
   Пустое состояние
   ========================================================================== */
.empty {
  text-align: center;
  padding: var(--3xl) var(--lg);
  border: 1px dashed var(--border-c-hover);
  border-radius: var(--r-lg);
  background: var(--card);
}
.empty__icon {
  width: 48px; height: 48px; margin: 0 auto var(--md);
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-full);
  background: var(--neutral-soft); color: var(--text-tertiary);
}
.empty__icon svg { width: 22px; height: 22px; }
.empty__title { font-size: var(--fs-xl); font-weight: 700; margin-bottom: var(--sm); }
.empty__text { margin: 0 auto var(--lg); max-width: 46ch; }

/* ==========================================================================
   Статья: раскладка с закреплённым оглавлением
   ========================================================================== */
/* Одна сетка на всю статью. Шапка, обложка и текст стоят в правой колонке
   и имеют общий левый край; оглавление — в левой, на одной строке с текстом.
   Раньше шапка лежала в отдельном узком контейнере и её левый край расходился
   с текстом на 138px — это и читалось как «разъехались» блоки. */
.article__layout {
  display: grid;
  grid-template-columns: 260px minmax(0, var(--container-narrow));
  grid-template-rows: auto auto;
  gap: 0 var(--3xl);
  justify-content: center;
  align-items: start;
}
.article__head  { grid-column: 2; grid-row: 1; }
.article__layout > .prose { grid-column: 2; grid-row: 2; }

/* Оглавление занимает обе строки: его верх совпадает с верхом шапки статьи,
   то есть с хлебными крошками, а не ждёт конца заголовка, лида и обложки.
   align-items:start у сетки оставляет боксу высоту по содержимому, поэтому
   sticky внутри этой области работает и доезжает до конца статьи. */
.article__rail {
  grid-column: 1;
  grid-row: 1 / -1;
  display: grid;
  gap: var(--lg);
  position: sticky;
  top: calc(var(--header-h) + 3px + var(--md));
}

/* Отступ сверху переносим с крошек на всю сетку, иначе левая колонка
   начиналась бы на 32px выше видимого текста крошек. */
.article__layout { padding-top: var(--xl); }
.article__head .breadcrumbs { padding-top: 0; }

.article__cover { margin: var(--lg) 0 0; }

details.toc > summary { list-style: none; }
details.toc > summary::-webkit-details-marker { display: none; }
details.toc > summary::marker { content: ""; }
.toc__title { display: flex; align-items: center; justify-content: space-between; gap: var(--sm); }
.toc__title::after {
  content: "";
  width: 8px; height: 8px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transform-origin: 60% 60%;
  transition: transform var(--t-fast);
  display: none;
}
.toc ol { list-style: none; padding: 0; counter-reset: toc; margin-top: var(--md); }
.toc li { counter-increment: toc; }
.toc a {
  display: block;
  padding: 7px 0 7px 14px;
  border-left: 2px solid var(--border-c);
  font-size: var(--fs-sm); line-height: 1.4;
  color: var(--text-secondary);
  transition: border-color var(--t-fast), color var(--t-fast);
}
.toc a:hover { color: var(--text-primary); border-left-color: var(--border-c-hover); }
.toc a[data-active="true"] {
  color: var(--text-primary); font-weight: 600;
  border-left-color: var(--accent-a);
}

/* ─── поделиться и скопировать ссылку ─── */
.share { display: grid; gap: var(--sm); }
.share__label {
  font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-tertiary);
}
.share__btn {
  display: inline-flex; align-items: center; gap: var(--sm);
  padding: 9px 14px;
  border: var(--border);
  border-radius: var(--r-md);
  background: var(--card);
  color: var(--text-secondary);
  font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 500;
  cursor: pointer; text-align: left;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}
.share__btn:hover:not([disabled]) { border-color: var(--border-accent-c); color: var(--text-primary); background: var(--card-hover); }
.share__btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.share__ico { display: inline-flex; flex: none; }
.share__ico svg { width: 16px; height: 16px; }
.share__ico--done { display: none; color: var(--accent-text); }
.share__btn[data-done="true"] .share__ico { display: none; }
.share__btn[data-done="true"] .share__ico--done { display: inline-flex; }
.share__btn[data-done="true"] { border-color: var(--border-accent-c); color: var(--text-primary); }
.share__note { font-size: var(--fs-xs); line-height: 1.45; color: var(--text-secondary); }

/* ─── индикатор прогресса чтения ─── */
.read-progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: 3px;
  background: transparent;
  pointer-events: none;
}
.read-progress span {
  display: block; height: 100%;
  transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent-a), var(--accent-b));
}
.page-article .header { top: 3px; }

/* ─── время чтения ─── */
.read-time { display: inline-flex; align-items: center; gap: 6px; }
.read-time svg { width: 14px; height: 14px; }

/* ─── карточка автора ─── */
.author-card {
  display: flex; gap: var(--lg);
  margin: var(--xl) 0;
  padding: var(--lg);
  border: var(--border);
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: var(--shadow-card);
}
.author-card--full { margin: 0; padding: var(--xl); }
.author__avatar--lg { width: 56px; height: 56px; font-size: var(--fs-xl); flex: none; }
.author-card__name { margin: 0; font-family: var(--font-heading); font-weight: 700;
  font-size: var(--fs-lg); color: var(--text-primary); letter-spacing: -0.02em; }
.author-card--full .author-card__name { font-size: var(--fs-2xl); font-weight: 800; }
.author-card__role { margin: 2px 0 var(--sm); font-size: var(--fs-sm); color: var(--text-secondary); }
.author-card__text { margin: 0; font-size: var(--fs-base); }

/* ─── предыдущая / следующая ─── */
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: var(--md); margin: var(--xl) 0 var(--2xl); }
.prevnext__item {
  display: grid; gap: 6px;
  padding: var(--md) var(--lg);
  border: var(--border);
  border-radius: var(--r-lg);
  background: var(--card);
  color: var(--text-secondary);
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t);
}
.prevnext__item:hover { border-color: var(--border-accent-c); background: var(--card-hover); transform: translateY(-2px); color: var(--text-secondary); }
.prevnext__item--next { text-align: right; }
.prevnext__dir {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-tertiary);
}
.prevnext__item--next .prevnext__dir { justify-content: flex-end; }
.prevnext__dir svg { width: 14px; height: 14px; }
.prevnext__title {
  font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-base);
  line-height: 1.35; color: var(--text-primary); letter-spacing: -0.02em;
}

/* ─── кнопка «наверх» ─── */
.to-top {
  position: fixed; right: var(--lg); bottom: var(--lg); z-index: 45;
  width: 46px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  border: var(--border);
  border-radius: var(--r-full);
  background: var(--glass-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card-hover);
  color: var(--text-primary);
  cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity var(--t), transform var(--t), visibility var(--t), border-color var(--t-fast);
}
.to-top[data-show="true"] { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--border-accent-c); }
.to-top svg { width: 20px; height: 20px; }

/* ─── всплывающая подсказка ─── */
.toast {
  position: fixed; left: 50%; bottom: var(--xl); z-index: 70;
  transform: translate(-50%, 16px);
  padding: 11px 20px;
  border-radius: var(--r-full);
  background: var(--toast-bg); color: var(--toast-ink);
  font-size: var(--fs-sm); font-weight: 500;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  opacity: 0; visibility: hidden;
  transition: opacity var(--t), transform var(--t), visibility var(--t);
}
.toast[data-show="true"] { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ─── заголовок секции со ссылкой справа ─── */
.section__head--row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--lg);
}
.section__head--row .section__sub { margin-bottom: 0; }

.hero--compact { padding: var(--xl) 0 var(--lg); }
.hero--compact .hero__title { max-width: 22ch; }
.subscribe__title { font-size: var(--fs-xl); line-height: 1.3; font-weight: 700; }

/* Планшет и ниже: узкую левую колонку не сохраняем. Оглавление становится
   раскрывашкой над текстом и не отнимает ширину у самой статьи. */
/* Между 721 и 1024px шапка не вмещает поле поиска: логотип, меню, поиск,
   кнопка и переключатель дают 881px при вьюпорте 834px. Поле сворачиваем
   в иконку-ссылку на страницу поиска — сам поиск остаётся доступен. */
@media (min-width: 721px) and (max-width: 1024px) {
  .header__inner { gap: var(--lg); }
  .header .site-search { display: none; }
  .header__search-link { display: inline-flex; }
}

@media (max-width: 1180px) {
  .article__layout {
    grid-template-columns: minmax(0, var(--container-narrow));
    max-width: var(--container-narrow);
    margin: 0 auto;
    gap: var(--lg) 0;
  }
  .article__head { grid-column: 1; grid-row: 1; }
  .article__rail { grid-column: 1; grid-row: 2; position: static; gap: var(--md); }
  .article__layout > .prose { grid-column: 1; grid-row: 3; }
  .article__layout { padding-top: 0; }
  .article__head .breadcrumbs { padding-top: var(--xl); }

  details.toc > summary { cursor: pointer; }
  .toc__title::after { display: block; }
  details.toc[open] .toc__title::after { transform: rotate(-135deg); }
  details.toc:not([open]) ol { margin-top: 0; }

  /* max-content здесь растягивал колонку по длине примечания (было 1089px
     при контейнере 752px) — переходим на обычный перенос по строкам. */
  .share { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sm) var(--md); }
  .share__note { flex: 1 1 100%; }
  .article__rail > * { min-width: 0; }

  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--xl); }
}

@media (max-width: 720px) {
  .header .site-search { display: none; }
  .section__head--row { flex-direction: column; align-items: flex-start; }
  .section__head--row .btn { width: 100%; }
  .prevnext { grid-template-columns: 1fr; }
  .prevnext__item--next { text-align: left; }
  .prevnext__item--next .prevnext__dir { justify-content: flex-start; }
  .author-card { flex-direction: column; gap: var(--md); }
  .share { grid-auto-flow: row; grid-auto-columns: auto; }
  .to-top { right: var(--md); bottom: var(--md); }
  .empty { padding: var(--xl) var(--md); }
  .article__cover { margin-top: var(--md); }
  .data-notice { left: var(--sm); right: var(--sm); bottom: var(--sm); padding: var(--md); }
  .data-notice__inner { flex-direction: column; align-items: stretch; gap: var(--md); }
  .data-notice .btn { width: 100%; }
  .footer__note { max-width: none; }
}

/* ==========================================================================
   Подвал: контакты и правовая информация
   ========================================================================== */
.footer__brand { display: grid; gap: var(--sm); align-content: start; }
.footer__site { margin: var(--xs) 0 0; font-size: var(--fs-sm); }
.footer__col code {
  font-family: var(--font-mono, ui-monospace, Menlo, monospace);
  font-size: 0.9em;
}
.contact--todo {
  display: inline-block;
  font-size: var(--fs-sm);
  color: var(--warn-ink);
  border-bottom: 1px dashed var(--warn-border);
}
.footer__note {
  margin-top: var(--sm);
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: var(--text-tertiary);
  max-width: 30ch;
}

/* ==========================================================================
   Уведомление об обработке данных
   ========================================================================== */
.data-notice {
  position: fixed; left: var(--lg); right: var(--lg); bottom: var(--lg); z-index: 65;
  max-width: 760px; margin: 0 auto;
  border: var(--border);
  border-radius: var(--r-lg);
  background: var(--glass-bg);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card-hover);
  padding: var(--md) var(--lg);
  animation: notice-in 300ms ease both;
}
@keyframes notice-in { from { opacity: 0; transform: translateY(12px); } }
.data-notice__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--lg);
}
.data-notice__text { margin: 0; font-size: var(--fs-sm); line-height: 1.5; }
.data-notice__text a { white-space: nowrap; }
.data-notice .btn { flex: none; }

/* ==========================================================================
   Обложки: иллюстрация подменяет геометрию без правки вёрстки
   ========================================================================== */
.cover--illustration img { width: 100%; height: 100%; object-fit: cover; }

/* ─── уважение к системной настройке (ДС, разд. 06) ─── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .card:hover, .row:hover, .btn--accent:hover, .prevnext__item:hover { transform: none; }
  .to-top[data-show="true"], .toast[data-show="true"] { transform: translateY(0); }
  .toast[data-show="true"] { transform: translate(-50%, 0); }
}

/* ── Статьи первой волны: подводка, таблицы, «Итоги», вопросы, источники ── */
.article__lead p { margin: 0 0 var(--sm); }
.article__lead p:last-child { margin-bottom: 0; }

.prose ol { margin: 0 0 var(--md); padding-left: 1.4em; }
.prose ol li::marker { color: var(--accent-text); font-weight: 600; }
.prose blockquote {
  margin: var(--lg) 0; padding: var(--md) var(--lg);
  border-left: 3px solid var(--border-accent-c);
  background: var(--surface-2); border-radius: 0 var(--r-md) var(--r-md) 0;
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose table {
  display: block; width: 100%; overflow-x: auto;
  margin: var(--lg) 0; border-collapse: collapse;
  font-size: var(--fs-sm); line-height: 1.5;
}
.prose th, .prose td {
  padding: 10px 12px; border: var(--border); text-align: left; vertical-align: top;
  min-width: 8em;
}
.prose th { color: var(--text-primary); background: var(--surface-2); font-weight: 600; }

.summary {
  margin: var(--2xl) 0 var(--lg); padding: var(--lg) var(--xl);
  border: var(--border-hover); border-radius: var(--r-lg);
  background: var(--surface-2);
}
.summary h2 { margin-top: 0; }
.summary ul { margin-bottom: 0; }

.faq { display: grid; gap: var(--sm); margin: 0 0 var(--lg); }
.faq__item {
  border: var(--border); border-radius: var(--r-md); background: var(--surface);
}
.faq__item > summary {
  cursor: pointer; list-style: none; padding: 14px 44px 14px 18px; position: relative;
  color: var(--text-primary); font-weight: 600; line-height: 1.45;
}
.faq__item > summary::-webkit-details-marker { display: none; }
.faq__item > summary::after {
  content: ""; position: absolute; right: 18px; top: 50%;
  width: 8px; height: 8px; margin-top: -6px;
  border-right: 2px solid var(--accent-text); border-bottom: 2px solid var(--accent-text);
  transform: rotate(45deg); transition: transform .2s;
}
.faq__item[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq__item > summary:focus-visible { outline: 2px solid var(--border-accent-c); outline-offset: 2px; border-radius: var(--r-md); }
.faq__item > p { margin: 0; padding: 0 18px 16px; }

.sources { font-size: var(--fs-base); }
.sources__updated { font-style: italic; }

@media (max-width: 640px) {
  .summary { padding: var(--md) var(--lg); }
}

.author__photo { object-fit: cover; object-position: center top; display: block; background: none; }


/* Интерактивные инструменты блога — локальные, без отправки данных */
.interactive {
  border: var(--border);
  border-radius: var(--r-xl);
  padding: clamp(20px, 3vw, 32px);
  background: var(--surface-card);
}
.interactive--article { margin: var(--3xl) 0; }
.interactive h2 { margin-top: 0; }
.interactive__checks { display: grid; gap: 10px; margin: var(--lg) 0; }
.interactive__checks label {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; border: var(--border); border-radius: var(--r-md);
  cursor: pointer; background: var(--surface-secondary);
}
.interactive__checks input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.interactive__form { margin: var(--lg) 0; }
.grid--tool { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: var(--md); }
.grid--tool label { display: grid; gap: 7px; color: var(--text-secondary); font-size: var(--fs-sm); font-weight: 600; }
.grid--tool input, .grid--tool select {
  width: 100%; min-width: 0; padding: 12px 13px; border: var(--border);
  border-radius: var(--r-md); background: var(--surface-secondary);
  color: var(--text-primary); font: inherit;
}
.interactive__result {
  margin-top: var(--lg); padding: 14px 16px; border-radius: var(--r-md);
  background: var(--surface-secondary); border-left: 3px solid var(--accent-a);
  color: var(--text-primary); line-height: 1.55;
}
@media (max-width: 760px) { .grid--tool { grid-template-columns: 1fr; } }


.choice-group { border: 0; padding: 0; margin: 18px 0; display: grid; gap: 8px; }
.choice-group legend { font-weight: 800; color: var(--text-primary); margin-bottom: 8px; }
.choice-group label {
  display: flex; gap: 12px; align-items: flex-start; padding: 11px 13px;
  border: var(--border); border-radius: var(--r-md); background: var(--surface-secondary); cursor: pointer;
}
.choice-group input { margin-top: 3px; width: 18px; height: 18px; flex: none; }


.article-visual {
  margin: var(--2xl) 0; padding: clamp(18px,3vw,28px); border: var(--border);
  border-radius: var(--r-xl); background: var(--surface-secondary);
}
.article-visual figcaption { margin-top: 14px; color: var(--text-secondary); font-size: var(--fs-sm); }
.article-visual--scheme img { display:block; width:100%; height:auto; border-radius:var(--r-lg); background:#0b0d17; }
.visual-flow { display:grid; grid-template-columns:1fr auto 1fr auto 1fr; gap:12px; align-items:center; }
.visual-flow div, .visual-quadrants div {
  padding:18px; border-radius:var(--r-lg); background:var(--surface-card); border:var(--border); text-align:center;
}
.visual-flow strong, .visual-quadrants strong { display:block; color:var(--text-primary); }
.visual-flow span, .visual-quadrants span { display:block; margin-top:5px; color:var(--text-secondary); font-size:var(--fs-sm); }
.visual-flow b { font-size:24px; color:var(--text-tertiary); }
.visual-quadrants { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.visual-video { display:grid; grid-template-columns:180px 1fr; gap:24px; align-items:center; }
.visual-phone {
  aspect-ratio:9/16; max-height:250px; border:8px solid var(--text-primary); border-radius:28px;
  display:flex; flex-direction:column; justify-content:center; align-items:center; gap:8px;
  background:var(--surface-card); color:var(--text-primary);
}
.visual-phone span { color:var(--accent-a); font-size:28px; }
.visual-phone small { color:var(--text-secondary); }
.visual-notes { display:grid; gap:10px; }
.visual-notes span { padding:13px 14px; border:var(--border); border-radius:var(--r-md); background:var(--surface-card); }
.visual-notes b { margin-right:8px; color:var(--text-tertiary); }
@media(max-width:680px){
  .visual-flow{grid-template-columns:1fr}.visual-flow b{transform:rotate(90deg);text-align:center}
  .visual-quadrants{grid-template-columns:1fr}
  .visual-video{grid-template-columns:1fr}.visual-phone{width:150px;justify-self:center}
}


/* ==========================================================================
   Partnerium motion layer — 29.09.2026
   Спокойная динамика в фирменной бирюзово-зелёной палитре.
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.hero > .container { position: relative; z-index: 2; }
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
  inset: -24% -12%;
  will-change: transform;
  mask-image: linear-gradient(to bottom, transparent 3%, #000 22%, #000 78%, transparent 97%);
}
.hero::before {
  opacity: .24;
  background:
    repeating-linear-gradient(
      112deg,
      transparent 0 74px,
      color-mix(in srgb, var(--accent-a) 42%, transparent) 74px 76px,
      transparent 76px 150px
    );
  animation: hero-lines-a 24s linear infinite;
}
.hero::after {
  opacity: .17;
  background:
    repeating-linear-gradient(
      18deg,
      transparent 0 132px,
      color-mix(in srgb, var(--accent-b) 36%, transparent) 132px 133px,
      transparent 133px 264px
    );
  animation: hero-lines-b 31s linear infinite;
}

/* Тонкие живые полосы поверх hero — почти незаметный "поток". */
.hero .container::before {
  content: "";
  position: absolute;
  inset: -80px -20vw;
  z-index: -1;
  pointer-events: none;
  opacity: .16;
  background:
    repeating-linear-gradient(
      112deg,
      transparent 0 84px,
      color-mix(in srgb, var(--accent-a) 28%, transparent) 84px 85px,
      transparent 85px 168px
    );
  mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 82%, transparent 100%);
  animation: stripe-flow 28s linear infinite;
}

/* Фирменный перелив в акцентной части H1. */
.hero__title .accent {
  background: linear-gradient(100deg,
    var(--accent-a) 0%,
    var(--accent-b) 36%,
    var(--accent-a) 68%,
    var(--accent-b) 100%);
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: title-shimmer 9s ease-in-out infinite;
}

/* На альтернативных секциях — только одна тонкая движущаяся линия, не фон-шум. */
.section--alt {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.section--alt > .container { position: relative; z-index: 1; }
.section--alt::before {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
  width: 66%;
  height: 1px;
  left: -20%;
  top: 26px;
  opacity: .32;
  background: linear-gradient(90deg, transparent, var(--accent-a), var(--accent-b), transparent);
  animation: section-line 20s ease-in-out infinite;
}

/* Карточки не прыгают — только чуть "дышат" обложкой при наведении. */
.card .cover img,
.card .cover svg {
  transition: transform 700ms cubic-bezier(.2,.7,.2,1), filter 700ms ease;
}
@media (hover:hover) and (pointer:fine) {
  .card:hover .cover img,
  .card:hover .cover svg {
    transform: scale(1.025);
    filter: saturate(1.06);
  }
  .chip {
    transition: transform var(--t-fast), border-color var(--t-fast), background var(--t-fast);
  }
  .chip:hover { transform: translateY(-1px); }
}

@keyframes hero-lines-a {
  from { transform: translate3d(-80px,-18px,0); }
  to   { transform: translate3d(100px,24px,0); }
}
@keyframes hero-lines-b {
  from { transform: translate3d(70px,0,0); }
  to   { transform: translate3d(-110px,18px,0); }
}
@keyframes stripe-flow {
  from { transform: translate3d(-90px,0,0); }
  to   { transform: translate3d(90px,0,0); }
}
@keyframes title-shimmer {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}
@keyframes section-line {
  0%,100% { transform: translateX(0); opacity: .16; }
  50%     { transform: translateX(105%); opacity: .34; }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .hero::after,
  .hero .container::before,
  .hero__title .accent,
  .section--alt::before {
    animation: none !important;
  }
  .card .cover img,
  .card .cover svg,
  .chip { transition: none !important; }
}


/* ==========================================================================
   Stage 3 — editorial rhythm: hook first, less text, lighter visual breaks.
   ========================================================================== */
.article-hook {
  margin-top: var(--xl);
  padding: clamp(20px, 3vw, 30px);
  border-radius: var(--r-xl);
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--accent-a) 8%, var(--surface-card)),
      color-mix(in srgb, var(--accent-b) 7%, var(--surface-card)));
  border: 1px solid color-mix(in srgb, var(--accent-a) 24%, var(--border-color));
}
.article-hook h2 {
  margin: 4px 0 12px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.12;
  max-width: 20ch;
}
.article-hook > p:not(.eyebrow) {
  margin: 0;
  max-width: 68ch;
  color: var(--text-secondary);
  font-size: var(--fs-lg);
  line-height: 1.55;
}
.article-hook__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.article-hook__chips span {
  padding: 7px 11px;
  border-radius: var(--r-full);
  border: var(--border);
  background: var(--surface-card);
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.article-pulse {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: start;
  margin: var(--2xl) 0;
  padding: 16px 0;
  border-top: var(--border);
  border-bottom: var(--border);
}
.article-pulse__mark {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  color: var(--accent-ink);
  font-weight: 800;
  font-size: var(--fs-sm);
}
.article-pulse strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.article-pulse p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.55;
}

.article-inline-visual {
  margin: 36px 0 44px;
}

.article-inline-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}

.article-inline-visual figcaption {
  margin-top: 10px;
  color: var(--text-tertiary);
  font-size: var(--fs-sm);
  line-height: 1.55;
}

.page-article .prose > h2 {
  margin-top: var(--3xl);
}
.page-article .prose > p,
.page-article .prose > ul,
.page-article .prose > ol {
  max-width: 68ch;
}
@media (max-width: 760px) {
  .article-hook > p:not(.eyebrow) { font-size: var(--fs-base); }
  .article-pulse { grid-template-columns: 40px 1fr; }
  .article-pulse__mark { width: 36px; height: 36px; }
}


/* Страница автора: крупный редакционный портрет вместо маленького аватара. */
.author-card--full {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: clamp(24px, 4vw, 44px);
  align-items: center;
}
.author-card--full .author__photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-xl);
  object-fit: cover;
  object-position: center top;
  border: var(--border);
}
.author-card--full .author-card__name {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
}
.author-card--full .author-card__role {
  font-size: var(--fs-base);
  margin-top: 8px;
  margin-bottom: var(--md);
}
@media (max-width: 680px) {
  .author-card--full { grid-template-columns: 1fr; }
  .author-card--full .author__photo { width: min(72vw, 280px); justify-self: center; }
}

/* ==========================================================================
   Motion refinement — soft irregular ribbons, 29.09.2026
   ========================================================================== */
.hero::before,
.hero::after {
  inset: -8% -6% !important;
  mask-image: none !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 108% 108% !important;
  filter: blur(1.2px);
}

.hero::before {
  opacity: .72 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 700'%3E%3Cpath d='M-100 520 C160 300 330 610 570 420 S960 180 1210 390 S1470 610 1700 300' fill='none' stroke='%2322D3EE' stroke-opacity='.16' stroke-width='30' stroke-linecap='round'/%3E%3Cpath d='M-120 245 C120 65 360 360 650 225 S1040 55 1300 230 S1510 410 1710 160' fill='none' stroke='%232DD4BF' stroke-opacity='.10' stroke-width='18' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-color: transparent !important;
  animation: hero-ribbons-a 26s ease-in-out infinite alternate !important;
}

.hero::after {
  opacity: .62 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 700'%3E%3Cpath d='M-120 145 C120 405 335 85 590 330 S930 585 1200 350 S1480 120 1710 410' fill='none' stroke='%236C5CE7' stroke-opacity='.085' stroke-width='24' stroke-linecap='round'/%3E%3Cpath d='M-90 610 C220 420 420 690 720 505 S1110 265 1390 470 S1550 625 1710 520' fill='none' stroke='%2322D3EE' stroke-opacity='.075' stroke-width='38' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-color: transparent !important;
  animation: hero-ribbons-b 33s ease-in-out infinite alternate !important;
}

.hero .container::before {
  opacity: .06 !important;
  inset: -50px -10vw !important;
  background: linear-gradient(118deg, transparent 16%, var(--accent-a) 48%, transparent 78%) !important;
  filter: blur(48px) !important;
  mask-image: none !important;
  animation: hero-soft-flow 25s ease-in-out infinite alternate !important;
}

/* В секциях — не прямая черта, а короткая мягкая волна. */
.section--alt::before {
  width: auto !important;
  height: 110px !important;
  left: -5% !important;
  right: -5% !important;
  top: -18px !important;
  opacity: .65 !important;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 120'%3E%3Cpath d='M-30 78 C260 18 420 112 690 58 S1120 5 1390 62 S1550 92 1660 50' fill='none' stroke='%232DD4BF' stroke-opacity='.11' stroke-width='16' stroke-linecap='round'/%3E%3C/svg%3E") center/100% 100% no-repeat !important;
  animation: section-ribbon 24s ease-in-out infinite alternate !important;
}

@keyframes hero-ribbons-a {
  from { transform: translate3d(-2.5%, -1%, 0) scale(1.01) rotate(-.5deg); }
  to   { transform: translate3d(3.5%, 1.5%, 0) scale(1.045) rotate(.7deg); }
}
@keyframes hero-ribbons-b {
  from { transform: translate3d(2.5%, 1%, 0) scale(1.02) rotate(.6deg); }
  to   { transform: translate3d(-3.5%, -1.5%, 0) scale(1.05) rotate(-.6deg); }
}
@keyframes hero-soft-flow {
  from { transform: translateX(-3%) scaleX(.97); }
  to   { transform: translateX(4%) scaleX(1.04); }
}
@keyframes section-ribbon {
  from { transform: translateX(-2%) scaleX(.99); }
  to   { transform: translateX(3%) scaleX(1.015); }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .hero::after,
  .hero .container::before,
  .section--alt::before {
    animation: none !important;
  }
}

/* ==========================================================================
   Motion reset — вернули мягкие живые круги, линии отключены.
   ========================================================================== */
.hero::before,
.hero::after {
  content: "" !important;
  position: absolute !important;
  pointer-events: none !important;
  z-index: 0 !important;
  inset: auto !important;
  border-radius: 999px !important;
  filter: blur(54px) !important;
  background-repeat: no-repeat !important;
  background-size: auto !important;
  background-position: center !important;
  mask-image: none !important;
  will-change: transform;
}
.hero::before {
  width: 520px !important;
  height: 220px !important;
  left: -110px !important;
  top: 34px !important;
  right: auto !important;
  bottom: auto !important;
  opacity: .18 !important;
  background: radial-gradient(circle at 50% 50%, var(--accent-a), transparent 68%) !important;
  animation: hero-circle-a 18s ease-in-out infinite alternate !important;
}
.hero::after {
  width: 560px !important;
  height: 260px !important;
  right: -160px !important;
  bottom: 12px !important;
  left: auto !important;
  top: auto !important;
  opacity: .18 !important;
  background: radial-gradient(circle at 50% 50%, var(--accent-b), transparent 68%) !important;
  animation: hero-circle-b 22s ease-in-out infinite alternate !important;
}
.hero .container::before,
.section--alt::before {
  content: none !important;
  display: none !important;
  animation: none !important;
  background: none !important;
}
@keyframes hero-circle-a {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(110px,34px,0) scale(1.12); }
}
@keyframes hero-circle-b {
  0%   { transform: translate3d(0,0,0) scale(1.04); }
  100% { transform: translate3d(-120px,-30px,0) scale(.94); }
}
@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .hero::after { animation: none !important; }
}

/* Кадр Николая на странице автора: ростовое фото режем примерно до пояса. */
.author-card--full .author__photo {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
}

/* ==========================================================================
   Hero route — fills the right side without heavy infographic.
   ========================================================================== */
.hero--home .hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr);
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}
.hero--home .hero__copy { min-width: 0; }
.hero--home .hero__title { max-width: 13ch; }

.hero-route {
  position: relative;
  min-height: 410px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  padding: 30px 8px;
}
.hero-route::before {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-a) 16%, transparent), transparent 68%);
  filter: blur(16px);
  z-index: -1;
}
.hero-route__card {
  width: min(290px, 92%);
  padding: 18px 22px;
  border: 1px solid color-mix(in srgb, var(--accent-a) 22%, var(--border-color));
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface-card) 82%, transparent);
  backdrop-filter: blur(14px) saturate(125%);
  box-shadow: 0 14px 34px rgba(26,26,46,.06);
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  align-items: baseline;
}
.hero-route__card strong {
  font-size: clamp(20px, 2vw, 27px);
  color: var(--text-primary);
}
.hero-route__card small {
  grid-column: 2;
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  margin-top: 2px;
}
.hero-route__num {
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-text);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
}
.hero-route__card--1 { transform: translateX(-42px) rotate(-2deg); }
.hero-route__card--2 { transform: translateX(34px) rotate(1.5deg); }
.hero-route__card--3 { transform: translateX(-10px) rotate(-1deg); }
.hero-route__arrow {
  font-size: 24px;
  line-height: 1;
  color: color-mix(in srgb, var(--accent-a) 55%, var(--text-tertiary));
  transform: rotate(90deg);
  opacity: .65;
}

@media (hover:hover) and (pointer:fine) {
  .hero-route__card {
    transition: transform 600ms cubic-bezier(.2,.7,.2,1), border-color 300ms ease, background 300ms ease;
  }
  .hero-route__card--1:hover { transform: translateX(-42px) translateY(-4px) rotate(-2deg); }
  .hero-route__card--2:hover { transform: translateX(34px) translateY(-4px) rotate(1.5deg); }
  .hero-route__card--3:hover { transform: translateX(-10px) translateY(-4px) rotate(-1deg); }
}

@media (max-width: 980px) {
  .hero--home .hero__grid { grid-template-columns: 1fr; }
  .hero-route { min-height: 0; grid-template-columns: repeat(3,1fr); gap: 12px; padding-top: 6px; }
  .hero-route__card { width: 100%; transform: none !important; }
  .hero-route__arrow { display: none; }
}
@media (max-width: 700px) {
  .hero-route { grid-template-columns: 1fr; }
  .hero-route__card { max-width: 100%; }
}

/* Hero route refinement — ровные карточки, движение только в стрелках. */
.hero-route {
  justify-items: stretch;
}
.hero-route__card {
  width: 100%;
  max-width: 300px;
  justify-self: center;
  transform: none !important;
}
.hero-route__card--1,
.hero-route__card--2,
.hero-route__card--3 {
  transform: none !important;
}
.hero-route__arrow {
  display: grid;
  place-items: center;
  height: 30px;
  transform: none !important;
  font-size: 26px;
  line-height: 1;
  opacity: .55;
  color: color-mix(in srgb, var(--accent-a) 65%, var(--text-tertiary));
  animation: route-arrow-flow 1.9s ease-in-out infinite;
}
.hero-route__arrow:nth-of-type(2) {
  animation-delay: .45s;
}
@keyframes route-arrow-flow {
  0%,100% {
    transform: translateY(-2px);
    opacity: .35;
  }
  50% {
    transform: translateY(5px);
    opacity: .85;
  }
}

@media (hover:hover) and (pointer:fine) {
  .hero-route__card--1:hover,
  .hero-route__card--2:hover,
  .hero-route__card--3:hover {
    transform: translateY(-3px) !important;
  }
}

@media (max-width: 980px) {
  .hero-route__arrow {
    display: none;
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-route__arrow { animation: none !important; }
}

/* ==========================================================================
   Spacing refinement — tighter vertical rhythm on home hero/diagnostic.
   ========================================================================== */
.hero--home {
  padding-bottom: clamp(28px, 4vw, 48px);
}
.hero--home .hero__grid {
  gap: clamp(30px, 4vw, 64px);
  align-items: center;
}
.hero--home .hero__rubrics {
  margin-top: 22px;
}
.hero-route {
  min-height: 320px;
  padding-top: 10px;
  padding-bottom: 10px;
  gap: 6px;
}
.hero-route__arrow {
  height: 22px;
}

/* Самодиагностика должна начинаться сразу после hero, без второй большой паузы. */
.hero--home + .section {
  padding-top: clamp(28px, 4vw, 46px);
}
.hero--home + .section .section__head {
  margin-bottom: clamp(18px, 2.5vw, 28px);
}

/* На широком экране уменьшаем высоту пустого правого поля. */
@media (min-width: 981px) {
  .hero--home .hero__copy {
    padding-bottom: 4px;
  }
  .hero-route {
    transform: translateY(-4px);
  }
}

/* На планшете/мобиле сохраняем воздух, но без провалов. */
@media (max-width: 980px) {
  .hero--home {
    padding-bottom: 30px;
  }
  .hero-route {
    min-height: 0;
    padding-top: 8px;
    padding-bottom: 0;
  }
  .hero--home + .section {
    padding-top: 30px;
  }
}

/* ==========================================================================
   Home density pass — larger route cards, tighter section rhythm.
   ========================================================================== */
.hero-route__card {
  max-width: 340px;
  padding: 22px 26px;
  border-radius: 24px;
}
.hero-route__card strong {
  font-size: clamp(22px, 2.2vw, 30px);
}
.hero-route__card small {
  font-size: 15px;
}
.hero-route__num {
  width: 36px;
  height: 36px;
}

/* Плотнее вся главная ниже hero. */
.page-home .section,
body:not(.page-article) main > .section {
  padding-top: clamp(34px, 4vw, 46px);
  padding-bottom: clamp(34px, 4vw, 46px);
}
body:not(.page-article) .section__head {
  margin-bottom: clamp(18px, 2.5vw, 28px);
}
body:not(.page-article) .section__sub {
  margin-top: 10px;
}

/* Стыки секций на главной — без лишнего двойного воздуха. */
.hero--home + .section {
  padding-top: 24px;
}
.hero--home + .section + .section,
.hero--home + .section + .section + .section,
.hero--home + .section + .section + .section + .section {
  padding-top: 34px;
}

/* Нижние блоки тоже чуть плотнее. */
main > .section:last-of-type {
  padding-bottom: 40px;
}

@media (max-width: 980px) {
  .hero-route__card {
    max-width: none;
    padding: 18px 20px;
  }
  body:not(.page-article) main > .section {
    padding-top: 30px;
    padding-bottom: 30px;
  }
}


.interactive__actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.interactive__actions[hidden] { display: none; }
.interactive__actions span {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  max-width: 48ch;
}
.author-expertise {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}
.author-expertise span {
  padding: 7px 11px;
  border-radius: var(--r-full);
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: var(--fs-sm);
  font-weight: 600;
}

/* Full-height cutout on author page */
.author-card--full {
  align-items: stretch;
}
.author-card--full .author__photo {
  width: min(100%, 320px);
  height: 100%;
  min-height: 560px;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center bottom;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  align-self: end;
  justify-self: center;
}
@media (max-width: 680px) {
  .author-card--full .author__photo {
    width: min(78vw, 300px);
    min-height: 440px;
  }
}

/* Author page: full-height transparent cutout */
.author-card--full {
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: clamp(28px, 4vw, 48px);
  align-items: stretch;
}
.author-card--full .author__photo--cutout {
  width: 100%;
  max-width: 360px;
  height: 100%;
  min-height: 640px;
  object-fit: contain;
  object-position: center bottom;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  align-self: end;
  justify-self: center;
}
@media (max-width: 760px) {
  .author-card--full {
    grid-template-columns: 1fr;
  }
  .author-card--full .author__photo--cutout {
    width: min(82vw, 320px);
    min-height: 520px;
  }
}

/* Exact user-approved Nikolay cutout */
.author-card--full .author__photo {
  width: min(100%, 360px) !important;
  height: 100% !important;
  min-height: 600px !important;
  object-fit: contain !important;
  object-position: center bottom !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Approved author portrait — waist-up */
.author-card--full {
  align-items: center !important;
}
.author-card--full .author__photo {
  width: 100% !important;
  max-width: 320px !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 4 / 5 !important;
  object-fit: cover !important;
  object-position: center top !important;
  border-radius: var(--r-xl) !important;
  border: var(--border) !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Author page final layout */
.author-page__container {
  max-width: 1040px;
}
.author-page .author-card--full {
  display: grid !important;
  grid-template-columns: minmax(300px, 40%) minmax(0, 1fr) !important;
  gap: clamp(32px, 5vw, 64px) !important;
  align-items: start !important;
  padding: clamp(28px, 4vw, 48px) !important;
}
.author-page .author-card--full .author__photo {
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  aspect-ratio: 4 / 5 !important;
  object-fit: cover !important;
  object-position: center top !important;
  align-self: start !important;
  justify-self: stretch !important;
  margin-top: 12px !important;
}
.author-page .author-card--full > div {
  min-width: 0;
  padding-top: 4px;
}
.author-page .author-card__name {
  margin-top: 0;
}
@media (max-width: 760px) {
  .author-page .author-card--full {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .author-page .author-card--full .author__photo {
    width: min(100%, 420px) !important;
    justify-self: center !important;
  }
}

/* Partnerium lead capture */
body.lead-open{overflow:hidden}
.lead-float{position:fixed;right:22px;bottom:22px;z-index:80;display:flex;align-items:center;gap:9px;border:0;border-radius:999px;padding:13px 18px;background:var(--ink,#171a1f);color:#fff;font:inherit;font-weight:700;box-shadow:0 12px 34px rgba(0,0,0,.22);cursor:pointer;transition:transform .2s ease,box-shadow .2s ease}
.lead-float:hover{transform:translateY(-2px);box-shadow:0 16px 38px rgba(0,0,0,.26)}
.lead-float__dot{width:9px;height:9px;border-radius:50%;background:#ff4f45;box-shadow:0 0 0 5px rgba(255,79,69,.14)}
.lead-modal[hidden]{display:none!important}
.lead-modal{position:fixed;inset:0;z-index:120;display:grid;place-items:center;padding:20px}
.lead-modal__backdrop{position:absolute;inset:0;background:rgba(10,14,20,.58);backdrop-filter:blur(5px)}
.lead-modal__panel{position:relative;width:min(620px,100%);max-height:min(90vh,820px);overflow:auto;border-radius:24px;background:var(--surface,#fff);color:var(--text,#171a1f);padding:30px;box-shadow:0 28px 70px rgba(0,0,0,.28)}
.lead-modal__close{position:absolute;right:16px;top:14px;width:38px;height:38px;border:0;border-radius:50%;background:rgba(127,127,127,.1);font-size:26px;line-height:1;cursor:pointer;color:inherit}
.lead-modal__eyebrow,.article-lead-cta__eyebrow{text-transform:uppercase;letter-spacing:.09em;font-size:12px;font-weight:800;opacity:.55}
.lead-modal__panel h2{margin:.3rem 0 .6rem;font-size:clamp(28px,4vw,40px)}
.lead-modal__lead{margin:0 0 22px;line-height:1.55;opacity:.78}
.lead-form{display:grid;gap:16px}
.lead-form>label,.lead-form fieldset{display:grid;gap:7px;font-weight:700}
.lead-form fieldset{border:0;padding:0;margin:0}
.lead-form legend{margin-bottom:7px}
.lead-form input,.lead-form textarea{width:100%;box-sizing:border-box;border:1px solid rgba(120,125,135,.35);border-radius:13px;background:transparent;color:inherit;padding:12px 13px;font:inherit;outline:none}
.lead-form input:focus,.lead-form textarea:focus{border-color:#ff554d;box-shadow:0 0 0 3px rgba(255,85,77,.12)}
.lead-methods{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.lead-methods label{position:relative}
.lead-methods input{position:absolute;opacity:0;pointer-events:none}
.lead-methods span{display:block;text-align:center;border:1px solid rgba(120,125,135,.28);border-radius:11px;padding:9px 7px;font-size:13px;cursor:pointer}
.lead-methods input:checked+span{border-color:#ff554d;background:rgba(255,85,77,.09)}
.lead-optional{font-weight:400;opacity:.55}
.lead-hp{position:absolute!important;left:-9999px!important;opacity:0!important}
.lead-consent{margin:0;font-size:12px;line-height:1.45;opacity:.66}
.lead-consent a{color:inherit;text-decoration:underline}
.lead-submit,.lead-success button{border:0;border-radius:13px;background:#ff554d;color:#fff;padding:13px 18px;font:inherit;font-weight:800;cursor:pointer}
.lead-submit:disabled{opacity:.65;cursor:wait}
.lead-status{font-size:13px;line-height:1.45;color:#b13b35}
.lead-status a{color:inherit;text-decoration:underline;font-weight:700}
.lead-success{text-align:center;padding:14px 4px 4px}
.lead-success__mark{display:grid;place-items:center;margin:0 auto 15px;width:54px;height:54px;border-radius:50%;background:rgba(35,170,95,.12);color:#1d9a57;font-size:30px;font-weight:900}
.lead-success h3{margin:0 0 8px;font-size:26px}
.lead-success p{margin:0 0 18px;opacity:.75}
.article-lead-cta{margin:34px 0;padding:24px;border:1px solid rgba(120,125,135,.22);border-radius:20px;background:linear-gradient(135deg,rgba(255,85,77,.06),rgba(255,255,255,.02));display:flex;align-items:center;justify-content:space-between;gap:24px}
.article-lead-cta h3{margin:5px 0 5px;font-size:clamp(22px,3vw,30px)}
.article-lead-cta p{margin:0;max-width:650px;line-height:1.5;opacity:.72}
.article-lead-cta button{flex:0 0 auto;border:0;border-radius:12px;background:#ff554d;color:#fff;padding:12px 16px;font:inherit;font-weight:800;cursor:pointer}
.article-lead-cta--end{margin-top:48px}
@media(max-width:720px){
  .lead-float{right:14px;bottom:14px;padding:12px 15px}
  .lead-modal{padding:10px}
  .lead-modal__panel{padding:24px 18px 20px;border-radius:18px}
  .lead-methods{grid-template-columns:1fr 1fr}
  .article-lead-cta{align-items:flex-start;flex-direction:column;padding:20px}
  .article-lead-cta button{width:100%}
}

/* ==========================================================================
   ОФОРМЛЕНИЕ СТАТЕЙ (12.10.2026): блоки вместо тёмных схем — оформление_статей.py
   ========================================================================== */
.chat-compare {
  margin: var(--2xl) 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--lg);
}
.chat { display: flex; flex-direction: column; }
.chat__label {
  margin: 0 0 var(--sm); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-tertiary);
}
.chat--bad .chat__label { color: var(--warn-ink); }
.chat--good .chat__label { color: var(--accent-text); }
.chat__screen {
  flex: 1; display: flex; flex-direction: column; gap: 10px; padding: var(--lg) var(--md);
  border-radius: var(--r-xl); background: var(--surface-2); border: 1px solid var(--border-c);
}
.chat--bad .chat__screen { border-color: var(--warn-border); }
.chat--good .chat__screen { border-color: var(--accent-line); }
.chat__msg {
  max-width: 88%; padding: 10px 14px; border-radius: 18px; font-size: var(--fs-base); line-height: 1.5;
}
.chat__msg--out { align-self: flex-end; background: var(--card); border: 1px solid var(--border-c); border-bottom-right-radius: 6px; color: var(--text-primary); }
.chat--good .chat__msg--out { background: var(--accent-soft); border-color: var(--accent-line); }
.chat__msg--in { align-self: flex-start; background: var(--card); border: 1px solid var(--border-c); border-bottom-left-radius: 6px; color: var(--text-primary); }
.chat__status { align-self: flex-end; font-size: var(--fs-xs); color: var(--text-tertiary); }
.chat__note { margin: var(--sm) 0 0; font-size: var(--fs-sm); color: var(--text-secondary); }

.expert-quote {
  margin: var(--2xl) 0; padding: var(--xl); border-radius: var(--r-xl);
  background: var(--card); border: 1px solid var(--border-c); box-shadow: var(--shadow-card);
  display: grid; grid-template-columns: 88px 1fr; gap: var(--md) var(--lg); align-items: start;
}
.expert-quote__photo { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; grid-row: span 2; border: 3px solid var(--accent-line); }
.prose .expert-quote__text, .expert-quote__text {
  margin: 0; padding: 0; border: 0; background: none;
  font-family: var(--font-heading); font-size: var(--fs-xl); line-height: 1.4; font-weight: 600; color: var(--text-primary);
}
.expert-quote__text p::before { content: "«"; } .expert-quote__text p::after { content: "»"; }
.expert-quote__who { font-size: var(--fs-sm); color: var(--text-secondary); }
.expert-quote__who strong { color: var(--text-primary); }
.expert-quote__who span { display: block; color: var(--text-tertiary); margin-top: 2px; }

.say-cards { margin: var(--2xl) 0; }
.say-cards__title { margin: 0 0 var(--md); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-tertiary); }
.say-cards__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--md); }
.say-card {
  padding: var(--lg); border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--border-c);
  display: flex; flex-direction: column; gap: var(--sm);
}
.prose .say-card p { margin: 0; }
.say-card__phrase { font-family: var(--font-heading); font-size: var(--fs-lg); font-weight: 700; color: var(--text-primary); }
.say-card__meaning { font-size: var(--fs-sm); color: var(--text-secondary); flex: 1; }
.say-card__ask { padding-top: var(--sm); border-top: 1px dashed var(--border-c); font-size: var(--fs-sm); color: var(--text-primary); }
.say-card__ask span { display: block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 2px; }

.say-cards--4 .say-cards__grid, .say-cards--2 .say-cards__grid { grid-template-columns: repeat(2, 1fr); }

.contact-record {
  margin: var(--2xl) 0; padding: var(--lg) var(--xl); border-radius: var(--r-xl);
  background: var(--card); border: 1px solid var(--border-c); box-shadow: var(--shadow-card);
  border-left: 4px solid var(--accent-line);
}
.contact-record__label { margin: 0 0 var(--md); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }
.contact-record__fields { margin: 0; display: grid; gap: 0; }
.contact-record__fields > div { display: grid; grid-template-columns: 170px 1fr; gap: var(--md); padding: 10px 0; border-top: 1px dashed var(--border-c); }
.contact-record__fields > div:first-child { border-top: 0; }
.contact-record dt { font-size: var(--fs-sm); color: var(--text-tertiary); }
.contact-record dd { margin: 0; color: var(--text-primary); }
.contact-record figcaption { margin-top: var(--md); font-size: var(--fs-sm); color: var(--text-secondary); }

@media (max-width: 720px) {
  .chat-compare, .say-cards__grid { grid-template-columns: 1fr; }
  .expert-quote { grid-template-columns: 64px 1fr; padding: var(--lg); }
  .expert-quote__photo { width: 64px; height: 64px; grid-row: auto; }
  .expert-quote__text { grid-column: 1 / -1; font-size: var(--fs-lg); }
  .expert-quote__who { grid-column: 1 / -1; }
  .contact-record { padding: var(--lg); }
  .contact-record__fields > div { grid-template-columns: 1fr; gap: 2px; }
}
