/* ============================================================
   Битрикс24 — внедрение и интеграции. Лид Помощник
   Тёмная студийная тема + лаймовый акцент (стиль lead-helper.ru)
   Тёмный «хром» сайта + светлая читаемая полоса статей
   ============================================================ */

:root {
  --bg: #0B0D10;
  --bg-soft: #12151A;
  --bg-card: #171B21;
  --bg-card-2: #1D222A;
  --ink: #F4F6F8;
  --ink-mute: #9AA3AE;
  --ink-dim: #6B7583;
  --accent: #CDF248;
  --accent-ink: #0B0D10;
  --accent-soft: rgba(205, 242, 72, 0.12);
  --blue: #4B8BFF;
  --light-bg: #F4F5F2;
  --light-card: #FFFFFF;
  --light-ink: #0B0D10;
  --light-mute: #5B6470;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --line-dark: rgba(11, 13, 16, 0.1);
  --display: 'Unbounded', 'Manrope', -apple-system, sans-serif;
  --body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1200px;
  --pad: 20px;
}

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

html { scroll-behavior: smooth; }
html, body { width: 100%; max-width: 100%; overflow-x: hidden; }

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

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

/* ---------- Типографика ---------- */
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(30px, 5.5vw, 56px); }
h2 { font-size: clamp(24px, 3.6vw, 38px); }
h3 { font-size: clamp(17px, 2vw, 21px); }
em { font-style: normal; color: var(--accent); }

.eyebrow {
  font-family: var(--body); font-weight: 800; font-size: 12px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
  display: block; margin-bottom: 14px;
}
.eyebrow--dark { color: var(--light-mute); }

.section { padding: 84px 0; }
.section--soft { background: var(--bg-soft); }
.section--light { background: var(--light-bg); color: var(--light-ink); }
.section-head { max-width: 760px; margin-bottom: 44px; }
.section-head p { color: var(--ink-mute); font-size: 17px; margin-top: 14px; }
.section--light .section-head p { color: var(--light-mute); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--body); font-weight: 700; text-decoration: none;
  border-radius: 999px; padding: 14px 28px; font-size: 15px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  cursor: pointer; border: none; text-align: center; white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { box-shadow: 0 6px 24px rgba(205, 242, 72, 0.35); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line-strong); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--dark { background: var(--light-ink); color: #fff; }
.btn--dark:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(11, 13, 16, 0.25); }
.btn--tg { background: #2AABEE; color: #fff; }
.btn--tg:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(42, 171, 238, 0.35); }
.btn--sm { padding: 10px 20px; font-size: 14px; }
.btn--lg { padding: 17px 34px; font-size: 16px; }
.btn--block { display: flex; width: 100%; }

/* ---------- Шапка ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(11, 13, 16, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo {
  font-family: var(--display); font-size: 14px; font-weight: 700;
  color: var(--ink); text-decoration: none; letter-spacing: 0.03em; white-space: nowrap;
  display: flex; align-items: baseline; gap: 7px;
}
.logo span { color: var(--accent); }
.logo small { font-family: var(--body); font-size: 11px; font-weight: 700; color: var(--ink-dim); letter-spacing: 0.08em; text-transform: uppercase; }
.nav { display: none; gap: 26px; }
.nav a { color: var(--ink-mute); text-decoration: none; font-size: 14px; font-weight: 600; transition: color 0.15s; }
.nav a:hover { color: var(--accent); }
.header__actions { display: flex; align-items: center; gap: 12px; }
.header__tg { display: none; color: var(--ink-mute); text-decoration: none; font-size: 14px; font-weight: 600; }
.header__tg:hover { color: var(--accent); }
.burger {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; background: none; border: none; cursor: pointer; padding: 0 8px;
}
.burger span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 64px 0 auto 0; z-index: 99;
  background: var(--bg-soft); border-bottom: 1px solid var(--line);
  padding: 20px var(--pad) 28px; display: none; flex-direction: column; gap: 4px;
}
.mobile-menu.is-open { display: flex; }
.mobile-menu a { color: var(--ink); text-decoration: none; font-weight: 600; padding: 12px 0; border-bottom: 1px solid var(--line); }
.mobile-menu a:last-child { border-bottom: none; }

/* ---------- Hero ---------- */
.hero { padding: 128px 0 72px; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; top: -220px; right: -180px; width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(205, 242, 72, 0.14) 0%, transparent 62%);
  pointer-events: none;
}
.hero__inner { position: relative; display: grid; gap: 44px; }
.hero h1 { margin-bottom: 20px; }
.hero__sub { font-size: 18px; color: var(--ink-mute); max-width: 640px; margin-bottom: 30px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 34px; }
.hero__chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 15px; font-size: 13px; font-weight: 600; color: var(--ink-mute);
}
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.hero__panel {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; align-self: start;
}
.hero__panel h3 { font-size: 15px; margin-bottom: 4px; }
.hero__panel > p { font-size: 13px; color: var(--ink-dim); margin-bottom: 20px; }
.stack-list { display: flex; flex-direction: column; }
.stack-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.stack-item:last-child { border-bottom: none; }
.stack-item b { font-weight: 700; }
.stack-item span:not(.stack-dot) { color: var(--ink-dim); font-size: 13px; margin-left: auto; text-align: right; }
.stack-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.stack-dot--blue { background: var(--blue); }
.stack-dot--mute { background: var(--ink-dim); }

/* ---------- Иллюстрации ----------
   Широкие растровые полосы прячем на узком экране: при сжатии до ~350 px
   тёмная графика теряет контраст и превращается в чёрный прямоугольник.
   Тот же смысл на мобильном несут карточки и схемы вёрсткой. */
.visual-band, .process-band { display: none; }
@media (min-width: 700px) { .visual-band, .process-band { display: block; } }

.visual-band {
  margin-top: 46px; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--bg-card); line-height: 0;
}
.visual-band img { width: 100%; height: auto; }
.process-band {
  margin-bottom: 30px; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--bg-card); line-height: 0;
}
.process-band img { width: 100%; height: auto; }
.article-figure { margin: 28px 0 26px; }
.article-figure img { width: 100%; height: auto; border-radius: var(--radius-sm); border: 1px solid var(--line-dark); }
.article-figure figcaption { font-size: 13.5px; color: var(--light-mute); margin-top: 11px; line-height: 1.55; }

/* ---------- Боли ---------- */
.pains { display: grid; gap: 16px; }
.pain {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 10px;
}
.pain__q { font-family: var(--display); font-size: 16px; font-weight: 700; line-height: 1.3; }
.pain p { font-size: 14px; color: var(--ink-mute); }
.pain__tag { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: 0.04em; text-transform: uppercase; }

/* ---------- Услуги ---------- */
.services { display: grid; gap: 16px; }
.service {
  background: var(--light-card); border: 1px solid var(--line-dark); border-radius: var(--radius);
  padding: 26px; display: flex; flex-direction: column; gap: 12px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.service:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(11, 13, 16, 0.1); }
.service__icon {
  width: 42px; height: 42px; border-radius: 12px; background: var(--light-ink); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 19px; flex: none;
}
.service h3 { color: var(--light-ink); }
.service p { font-size: 14px; color: var(--light-mute); flex: 1; }
.service__meta { font-size: 13px; font-weight: 700; color: var(--light-ink); padding-top: 12px; border-top: 1px solid var(--line-dark); }
.service__link { font-size: 13px; font-weight: 700; color: var(--light-ink); text-decoration: none; border-bottom: 2px solid var(--accent); align-self: flex-start; padding-bottom: 2px; }
.service__link:hover { color: var(--light-mute); }

/* ---------- Процесс ---------- */
.steps { display: grid; gap: 16px; counter-reset: step; }
.step {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; position: relative;
}
.step__num {
  font-family: var(--display); font-size: 13px; font-weight: 700; color: var(--accent-ink);
  background: var(--accent); border-radius: 999px; padding: 3px 11px; display: inline-block; margin-bottom: 14px;
}
.step h3 { margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--ink-mute); }
.step__time { display: block; margin-top: 12px; font-size: 12px; font-weight: 700; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Цены ---------- */
.prices { display: grid; gap: 18px; align-items: stretch; }
.price {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 16px;
}
.price--featured { border-color: var(--accent); background: var(--bg-card-2); position: relative; }
.price__badge {
  position: absolute; top: -12px; left: 28px; background: var(--accent); color: var(--accent-ink);
  font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
}
.price h3 { font-size: 19px; }
.price__sum { font-family: var(--display); font-size: 30px; font-weight: 700; line-height: 1.1; }
.price__sum small { display: block; font-family: var(--body); font-size: 13px; font-weight: 600; color: var(--ink-dim); margin-top: 6px; }
.price__for { font-size: 14px; color: var(--ink-mute); }
.price ul { list-style: none; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.price li { font-size: 14px; color: var(--ink-mute); padding-left: 24px; position: relative; }
.price li::before {
  content: '✓'; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 700; font-size: 13px;
}
.price-note {
  margin-top: 26px; padding: 20px 22px; background: var(--bg-card); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: var(--radius-sm); font-size: 14px; color: var(--ink-mute);
}
.price-note b { color: var(--ink); }

/* ---------- Доверие / критерии ---------- */
.criteria { display: grid; gap: 16px; }
.criterion {
  background: var(--light-card); border-radius: var(--radius); padding: 24px;
  border: 1px solid var(--line-dark);
}
.criterion__q { font-family: var(--display); font-size: 16px; font-weight: 700; color: var(--light-ink); margin-bottom: 10px; line-height: 1.35; }
.criterion p { font-size: 14px; color: var(--light-mute); }
.criterion p + p { margin-top: 10px; }
.criterion b { color: var(--light-ink); }

/* ---------- Кейсы ---------- */
.cases { display: grid; gap: 16px; }
.case {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.case__tag { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.case h3 { font-size: 17px; }
.case p { font-size: 14px; color: var(--ink-mute); }
.case__stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.case__stack span { font-size: 12px; font-weight: 600; color: var(--ink-dim); background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }

/* ---------- База знаний ---------- */
.kb-group { margin-bottom: 40px; }
.kb-group:last-child { margin-bottom: 0; }
.kb-group__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line-dark); }
.kb-group__head h3 { font-size: 18px; color: var(--light-ink); }
.kb-group__head span { font-size: 13px; color: var(--light-mute); font-weight: 600; }
.kb-list { display: grid; gap: 12px; }
.kb-item {
  display: flex; flex-direction: column; gap: 6px; text-decoration: none;
  background: var(--light-card); border: 1px solid var(--line-dark); border-radius: var(--radius-sm);
  padding: 18px 20px; transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.kb-item:hover { transform: translateY(-2px); border-color: var(--light-ink); box-shadow: 0 10px 26px rgba(11, 13, 16, 0.08); }
.kb-item b { font-family: var(--display); font-size: 15px; font-weight: 700; color: var(--light-ink); line-height: 1.35; }
.kb-item p { font-size: 13px; color: var(--light-mute); }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 22px; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-size: 22px; font-weight: 400; line-height: 1; flex: none; }
.faq details[open] summary::after { content: '−'; }
.faq details[open] summary { color: var(--accent); }
.faq__body { padding: 0 22px 20px; font-size: 15px; color: var(--ink-mute); }
.faq__body p + p { margin-top: 12px; }

/* ---------- Заявка ---------- */
.lead { background: var(--accent); color: var(--accent-ink); padding: 76px 0; }
.lead__inner { display: grid; gap: 34px; align-items: start; }
.lead h2 { color: var(--accent-ink); }
.lead__text p { margin-top: 14px; font-size: 16px; color: rgba(11, 13, 16, 0.72); max-width: 460px; }
.lead__points { list-style: none; margin-top: 22px; display: flex; flex-direction: column; gap: 9px; }
.lead__points li { font-size: 14px; font-weight: 600; padding-left: 22px; position: relative; }
.lead__points li::before { content: '→'; position: absolute; left: 0; }
.lead__form { background: var(--bg); color: var(--ink); border-radius: var(--radius); padding: 28px; }
.lead__form h3 { font-size: 18px; margin-bottom: 6px; }
.lead__form > p { font-size: 13px; color: var(--ink-dim); margin-bottom: 20px; }
.field { margin-bottom: 12px; }
.field input, .field textarea {
  width: 100%; background: var(--bg-card); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 14px 16px; color: var(--ink); font-family: var(--body); font-size: 15px;
}
.field textarea { min-height: 92px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-dim); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.form-note { font-size: 12px; color: var(--ink-dim); margin-top: 12px; text-align: center; }
.form-divider { text-align: center; font-size: 13px; color: var(--ink-dim); margin: 18px 0 14px; }
.form-ok { display: none; text-align: center; padding: 26px 0; }
.form-ok b { display: block; font-family: var(--display); font-size: 18px; margin-bottom: 8px; }
.form-ok p { font-size: 14px; color: var(--ink-mute); }
/* после отправки: сообщение об успехе идёт сразу под заголовком,
   способ связи «здесь и сейчас» остаётся доступным под ним */
.is-sent .lead__form { display: flex; flex-direction: column; }
.is-sent .lead__form form, .is-sent .form-note { display: none; }
.is-sent .form-ok { display: block; order: 1; }
.is-sent .form-divider { order: 2; }
.is-sent .lead__form .btn--tg { order: 3; }

/* ---------- Подвал ---------- */
.footer { background: var(--bg); border-top: 1px solid var(--line); padding: 44px 0 36px; }
.footer__inner { display: grid; gap: 26px; }
.footer__brand p { font-size: 13px; color: var(--ink-dim); margin-top: 10px; max-width: 380px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.footer__links a { color: var(--ink-mute); text-decoration: none; font-size: 14px; font-weight: 600; }
.footer__links a:hover { color: var(--accent); }
.footer__legal { font-size: 12px; color: var(--ink-dim); border-top: 1px solid var(--line); padding-top: 20px; margin-top: 6px; }

/* ============================================================
   Страница статьи
   ============================================================ */
.article-page { background: var(--light-bg); color: var(--light-ink); padding: 92px 0 0; }
.crumbs { font-size: 13px; color: var(--light-mute); padding: 20px 0 8px; }
.crumbs a { color: var(--light-mute); text-decoration: none; }
.crumbs a:hover { color: var(--light-ink); }
.crumbs span { color: var(--light-ink); }

.article-layout { display: grid; gap: 34px; padding-bottom: 70px; align-items: start; }

.article-head { padding: 14px 0 26px; }
.article-cat {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--light-ink); color: var(--accent); padding: 5px 12px; border-radius: 999px; margin-bottom: 16px;
}
.article-head h1 { color: var(--light-ink); font-size: clamp(26px, 4.2vw, 42px); }

.article-body { background: var(--light-card); border: 1px solid var(--line-dark); border-radius: var(--radius); padding: 30px 26px; min-width: 0; }
.article-body > p:first-of-type { font-size: 18px; color: var(--light-ink); font-weight: 500; }
.article-body p { font-size: 16px; line-height: 1.72; color: #23272E; margin-bottom: 17px; }
.article-body h2 {
  font-size: clamp(20px, 2.6vw, 27px); color: var(--light-ink);
  margin: 38px 0 16px; padding-top: 4px; scroll-margin-top: 84px;
}
.article-body h3 { font-size: 18px; color: var(--light-ink); margin: 26px 0 12px; }
.article-body strong { color: var(--light-ink); font-weight: 700; }
.article-body ul, .article-body ol { margin: 0 0 18px 20px; }
.article-body li { font-size: 16px; line-height: 1.7; color: #23272E; margin-bottom: 9px; }
.article-body li::marker { color: var(--light-mute); font-weight: 700; }
.table-scroll { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--line-dark); border-radius: var(--radius-sm); }
.article-body table { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 620px; }
.article-body th, .article-body td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line-dark); }
.article-body th { background: var(--light-bg); font-weight: 700; color: var(--light-ink); white-space: nowrap; }
.article-body tr:last-child td { border-bottom: none; }

.article-cta {
  margin-top: 34px; background: var(--light-ink); color: var(--ink);
  border-radius: var(--radius); padding: 28px;
}
.article-cta h3 { font-size: 20px; margin: 0 0 10px; color: var(--ink); }
.article-cta p { font-size: 15px; color: var(--ink-mute); margin-bottom: 20px; }
.article-cta__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.aside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; }
.aside__box { background: var(--light-card); border: 1px solid var(--line-dark); border-radius: var(--radius); padding: 20px 22px; }
.aside__box h4 { font-family: var(--display); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--light-mute); margin-bottom: 14px; }
.toc { list-style: none; display: flex; flex-direction: column; gap: 2px; max-height: 46vh; overflow-y: auto; }
.toc a { display: block; font-size: 13.5px; line-height: 1.45; color: var(--light-mute); text-decoration: none; padding: 6px 0 6px 12px; border-left: 2px solid var(--line-dark); }
.toc a:hover { color: var(--light-ink); border-left-color: var(--light-ink); }
.aside__box--cta { background: var(--light-ink); border-color: var(--light-ink); }
.aside__box--cta h4 { color: var(--accent); }
.aside__box--cta p { font-size: 14px; color: var(--ink-mute); margin-bottom: 16px; }
.aside__related { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.aside__related a { font-size: 14px; font-weight: 600; color: var(--light-ink); text-decoration: none; line-height: 1.4; display: block; }
.aside__related a:hover { color: var(--light-mute); }
.aside__related span { display: block; font-size: 12px; color: var(--light-mute); font-weight: 600; margin-top: 3px; }

.next-articles { border-top: 1px solid var(--line-dark); padding: 40px 0 70px; }
.next-articles h2 { font-size: 22px; color: var(--light-ink); margin-bottom: 20px; }
.next-grid { display: grid; gap: 12px; }

/* ============================================================
   Схемы в статьях (dg = diagram) — вёрстка вместо картинок
   Селекторы с двумя классами, чтобы перебивать типографику .article-body
   ============================================================ */
.dg {
  background: var(--bg); color: var(--ink);
  border-radius: var(--radius); padding: 22px 18px; margin: 30px 0 28px;
}
.dg .dg__title {
  font-family: var(--display); font-size: 15px; font-weight: 700;
  color: var(--ink); line-height: 1.35; margin: 0 0 18px;
}
.dg .dg__note { font-size: 13px; line-height: 1.55; color: var(--ink-mute); margin: 18px 0 0; }

/* flow — двусторонний обмен */
.dg .dg-flow { display: flex; flex-direction: column; gap: 14px; }
.dg .dg-node { border: 1.5px solid; border-radius: 14px; padding: 16px; text-align: center; }
.dg .dg-node b { display: block; font-family: var(--display); font-size: 22px; line-height: 1.1; }
.dg .dg-node span { display: block; font-size: 12px; color: var(--ink-dim); margin-top: 6px; }
.dg .dg-node--lime { border-color: var(--accent); }
.dg .dg-node--lime b { color: var(--accent); }
.dg .dg-node--blue { border-color: var(--blue); }
.dg .dg-node--blue b { color: var(--blue); }
.dg .dg-flow__mid { flex: 1; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
/* на узком экране узлы стоят стопкой, поэтому стрелки вертикальные */
.dg .dg-arrow { display: flex; align-items: center; gap: 12px; }
.dg .dg-arrow i { flex: none; width: 2px; height: 24px; margin-left: 16px; position: relative; }
.dg .dg-arrow i::after { content: ''; position: absolute; left: -4px; border: 5px solid transparent; }
.dg .dg-arrow em { font-style: normal; font-size: 11px; color: var(--ink-dim); }
.dg .dg-arrow--fwd i { background: var(--accent); }
.dg .dg-arrow--fwd i::after { bottom: -7px; border-top-color: var(--accent); }
.dg .dg-arrow--back i { background: var(--blue); }
.dg .dg-arrow--back i::after { top: -7px; border-bottom-color: var(--blue); }
.dg .dg-chips { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; }
.dg .dg-chips span {
  font-size: 12.5px; color: var(--ink); background: var(--bg-card);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 12px;
}

/* chain — цепочка событий */
.dg .dg-chain { display: flex; flex-direction: column; gap: 6px; }
.dg .dg-chain__item {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; flex: 1;
}
.dg .dg-chain__item b { display: block; font-size: 14px; color: var(--ink); }
.dg .dg-chain__item span { display: block; font-size: 12px; color: var(--ink-dim); margin-top: 3px; }
.dg .dg-chain__arr { display: flex; align-items: center; justify-content: center; padding: 2px 0; }
.dg .dg-chain__arr i { width: 2px; height: 14px; background: var(--accent); position: relative; }
.dg .dg-chain__arr i::after {
  content: ''; position: absolute; bottom: -7px; left: -4px;
  border: 5px solid transparent; border-top-color: var(--accent);
}

/* steps — пронумерованные шаги */
.dg .dg-steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.dg .dg-step {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px; margin: 0;
}
.dg .dg-step__n {
  display: inline-block; font-family: var(--display); font-size: 11px; font-weight: 700;
  color: var(--accent-ink); background: var(--accent);
  border-radius: 999px; padding: 2px 9px; margin-bottom: 9px;
}
.dg .dg-step b { display: block; font-size: 14px; color: var(--ink); line-height: 1.3; }
.dg .dg-step__d { display: block; font-size: 12px; color: var(--ink-dim); margin-top: 4px; line-height: 1.45; }

/* cols — сравнение вариантов */
.dg .dg-cols { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); }
.dg .dg-col {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; display: flex; flex-direction: column;
}
.dg .dg-col h4 { font-family: var(--display); font-size: 14px; color: var(--ink); margin: 0 0 5px; line-height: 1.3; }
.dg .dg-col > p { font-size: 12px; color: var(--accent); margin: 0 0 13px; }
.dg .dg-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.dg .dg-col li {
  font-size: 12.5px; line-height: 1.45; color: var(--ink-mute);
  padding-left: 14px; position: relative; margin: 0;
}
.dg .dg-col li::before {
  content: ''; position: absolute; left: 0; top: 7px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong);
}
.dg .dg-col__foot {
  margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line);
  font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-dim);
}

/* bars — диапазоны и объёмы */
.dg .dg-bars { display: flex; flex-direction: column; gap: 17px; }
.dg .dg-bar__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 9px; }
.dg .dg-bar__head b { font-size: 14px; color: var(--ink); }
.dg .dg-bar__head span { font-family: var(--display); font-size: 14px; color: var(--accent); }
.dg .dg-bar__track { height: 8px; background: var(--bg-card); border-radius: 999px; overflow: hidden; }
.dg .dg-bar__track i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.dg .dg-bar p { font-size: 12.5px; line-height: 1.5; color: var(--ink-dim); margin: 9px 0 0; }

/* funnel — стадии воронки */
.dg .dg-funnel { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.dg .dg-funnel__row {
  width: 100%; background: var(--bg-card); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: 10px; padding: 11px 14px;
}
.dg .dg-funnel__row b { font-size: 14px; color: var(--ink); }
.dg .dg-funnel__row span { display: block; font-size: 12px; color: var(--ink-dim); margin-top: 3px; }

/* matrix — кто что видит */
.dg .dg-matrix-wrap { overflow-x: auto; }
.dg .dg-matrix { border-collapse: collapse; width: 100%; min-width: 420px; font-size: 12.5px; }
.dg .dg-scroll-hint { font-size: 11px; color: var(--ink-dim); margin: 9px 0 0; }
.dg .dg-scroll-hint::before { content: '↔ '; }
.dg .dg-matrix th, .dg .dg-matrix td {
  padding: 10px; border-bottom: 1px solid var(--line); text-align: center; color: var(--ink-mute);
}
.dg .dg-matrix thead th { font-size: 11px; color: var(--ink-dim); font-weight: 700; background: none; white-space: normal; }
.dg .dg-matrix tbody th { text-align: left; color: var(--ink); font-weight: 700; background: none; white-space: nowrap; }
.dg .dg-matrix .dg-yes { color: var(--accent); font-weight: 700; }
.dg .dg-matrix .dg-no { color: var(--ink-dim); }
.dg .dg-matrix tbody tr:last-child th, .dg .dg-matrix tbody tr:last-child td { border-bottom: none; }

/* hub — портал и направления вокруг */
.dg .dg-hub { display: grid; gap: 14px; }
.dg .dg-hub__center {
  font-family: var(--display); font-size: 18px; text-align: center;
  color: var(--accent-ink); background: var(--accent); border-radius: 12px; padding: 15px;
}
.dg .dg-hub__items { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.dg .dg-hub__item { background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.dg .dg-hub__item b { display: block; font-size: 14px; color: var(--ink); }
.dg .dg-hub__item span { display: block; font-size: 12px; color: var(--ink-dim); margin-top: 3px; }

@media (min-width: 560px) {
  .dg { padding: 26px 24px; }
  .dg .dg-funnel__row { width: var(--w, 100%); min-width: 240px; }
}

@media (min-width: 700px) {
  .dg .dg-flow { flex-direction: row; align-items: center; gap: 18px; }
  .dg .dg-node { min-width: 132px; }
  .dg .dg-arrow { gap: 9px; }
  .dg .dg-arrow i { flex: 1; width: auto; height: 2px; margin-left: 0; }
  .dg .dg-arrow i::after { left: auto; top: -4px; bottom: auto; }
  .dg .dg-arrow--fwd i::after { right: -1px; border-top-color: transparent; border-left-color: var(--accent); }
  .dg .dg-arrow--back i::after { left: -1px; border-bottom-color: transparent; border-right-color: var(--blue); }
  .dg .dg-chain { flex-direction: row; align-items: stretch; gap: 4px; }
  .dg .dg-chain__arr { padding: 0 2px; }
  .dg .dg-chain__arr i { width: 14px; height: 2px; }
  .dg .dg-chain__arr i::after {
    bottom: auto; top: -4px; left: auto; right: -7px;
    border-top-color: transparent; border-left-color: var(--accent);
  }
}

/* ---------- Адаптив ---------- */
@media (min-width: 620px) {
  .pains, .services, .steps, .prices, .criteria, .cases, .kb-list, .next-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr auto; align-items: start; }
  .footer__legal { grid-column: 1 / -1; }
}

@media (min-width: 900px) {
  .nav { display: flex; }
  .header__tg { display: block; }
  .burger { display: none; }
  .section { padding: 100px 0; }
  .hero { padding: 148px 0 96px; }
  .hero__inner { grid-template-columns: 1.35fr 0.95fr; gap: 56px; align-items: center; }
  .services, .steps, .kb-list { grid-template-columns: repeat(3, 1fr); }
  .prices { grid-template-columns: repeat(3, 1fr); }
  .cases { grid-template-columns: repeat(3, 1fr); }
  .lead__inner { grid-template-columns: 1fr 1fr; gap: 56px; }
  .article-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; }
  .article-body { padding: 42px 46px; }
  .next-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1100px) {
  .pains { grid-template-columns: repeat(3, 1fr); }
  .criteria { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 899px) {
  .aside { position: static; }
}

@media (max-width: 520px) {
  .logo small { display: none; }
  .header__actions .btn--sm { padding: 9px 15px; font-size: 13px; }
  .article-body { padding: 24px 18px; }
}

/* ---------- Анимация появления ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
