/* ==========================================================================
   Аритин.МедЮрист — базовые стили
   Стили общие для всех страниц сайта.
   ========================================================================== */

/* ---------- Шрифт (локально, assets/fonts) ---------- */
/* cyrillic-ext */
@font-face {
  font-family: 'Commissioner';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/commissioner-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Commissioner';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/commissioner-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'Commissioner';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/commissioner-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Commissioner';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/commissioner-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Переменные ---------- */
:root {
  --bg: #f8fafc;
  --bg-soft: #f1f5f9;
  --surface: #ffffff;
  --border: #e6ebf1;
  --text: #0f172a;
  --muted: #343c47;
  --muted-2: #94a3b8;
  /* Фирменные цвета Аритин.МедЮрист */
  --accent: #00a2e6;
  --accent-soft: rgba(0, 162, 230, .10);
  --accent-ink: #01729f;
  --brand-1: #053d51;
  --brand-2: #260f1d;
  --brand-grad: linear-gradient(135deg, #053d51 0%, #260f1d 100%);
  /* Цвета логотипа (отдельными переменными, чтобы не ломать градиент кнопок) */
  --logo-1: #053d51;
  --logo-2: #260f1d;
  /* Акцентные цвета разделов */
  --wa: #25d366;
  --tg: #2aabee;
  --tgb: #0088cc;
  --max: #7b61ff;
  /* Цвета систем */
  --bitrix24: #2fc7f7;
  --amo: #4c8bf5;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, .06), 0 2px 6px rgba(15, 23, 42, .04);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, .10), 0 8px 20px rgba(15, 23, 42, .05);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1160px;
  /* Единый «стеклянный» стиль блоков (.glass): фон, рамка, размытие фона за блоком */
  --glass-bg: #ffffff38;
  --glass-border: #e6ebf1b0;
  --glass-blur: 10px;
}

/* ---------- Reset / база ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Commissioner", sans-serif !important;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  font-size: 16px;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Единый стиль блоков с фоном («стекло») ----------
   Полупрозрачная карточка поверх фоновой анимации: сквозь неё видны монеты,
   но они размыты (backdrop-filter), поэтому текст остаётся читаемым.
   Класс сознательно лежит ВЫШЕ карточек — чтобы их собственные правила
   (radius, тень, hover) имели приоритет. */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--radius);
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand-grad);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { border-color: #cfd8e3; transform: translateY(-2px); }

/* ---------- Шапка ---------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 250, 252, .78);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
header.site-header.scrolled { border-bottom-color: var(--border); background: rgba(248, 250, 252, .92); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  position: relative;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -.02em;
}
/* Название по центру мобильной шапки (показывается только на узких экранах) */
.nav-brand-mobile {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.01em;
  white-space: nowrap;
  color: var(--text);
}
.logo-mark {
  height: 30px; width: auto;
  display: grid;
  place-items: center;
}
.logo-mark svg { height: 100%; width: auto; display: block; }

/* Иконки-изображения из assets/icons (поддержка, контакты) */
.brand-ico { display: block; object-fit: contain; }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links > a,
.nav-links > .nav-item > a {
  font-size: 15px;
  color: var(--muted);
  font-weight: 500;
  transition: color .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-links > a:hover,
.nav-links > a.is-active,
.nav-links > .nav-item:hover > a,
.nav-links > .nav-item.is-active > a { color: var(--text); }

/* ---------- Выпадающие меню ---------- */
.nav-item { position: relative; display: inline-flex; align-items: center; height: 72px; }
.nav-item .nav-caret { font-size: 10px; opacity: .65; transition: transform .2s ease; }
.nav-item:hover .nav-caret,
.nav-item:focus-within .nav-caret { transform: rotate(180deg); }

.dropdown {
  position: absolute;
  top: calc(100% - 8px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  display: grid;
  gap: 4px;
  min-width: 268px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  z-index: 60;
}
/* Невидимая «щель», чтобы не терять hover при переходе курсора в меню */
.dropdown::before { content: ''; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }

.nav-item:hover > .dropdown,
.nav-item:focus-within > .dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dropdown.dd-wide {
  grid-template-columns: 1fr 1fr;
  gap: 6px 20px;
  min-width: 600px;
  padding: 18px;
}
.dd-col { display: grid; align-content: start; gap: 2px; }
.dd-group-title {
  margin: 0 0 8px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.dropdown a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 12px;
  transition: background .15s ease;
}
.dropdown a:hover { background: var(--bg-soft); }
.dd-icon {
  width: 38px; height: 38px;
  border-radius: 11px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.dd-icon i { font-size: 18px; }
.dd-icon .brand-ico { width: 24px; height: 24px; }
.dd-body { display: grid; min-width: 0; }
.dd-title { font-size: 14.5px; font-weight: 600; color: var(--text); }
.dd-desc { font-size: 12.5px; color: var(--muted-2); line-height: 1.35; }

.nav-cta { display: flex; align-items: center; gap: 10px; }
/* Компактные кнопки в шапке */
.nav-cta .btn { padding: 10px 18px; font-size: 14px; }

.burger {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 38px; height: 38px;
  align-items: center; justify-content: center;
  cursor: pointer;
}
.burger span {
  display: block; width: 18px; height: 2px;
  background: var(--text); border-radius: 2px; position: relative;
}
.burger span::before, .burger span::after {
  content: ''; position: absolute; left: 0; width: 18px; height: 2px;
  background: var(--text); border-radius: 2px;
}
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }

/* Мобильное меню */
.mobile-menu {
  display: none;
  padding: 12px 0 20px;
  border-top: 1px solid var(--border);
  background: rgba(248,250,252,.98);
  max-height: calc(100vh - 72px);
  overflow-y: auto;
}
.mobile-menu.open { display: block; }
.mobile-inner { display: flex; flex-direction: column; gap: 2px; }
.mobile-menu a:not(.btn) {
  padding: 12px 6px; font-weight: 500; color: var(--muted);
  border-radius: 10px;
}
.mobile-menu a:not(.btn):hover { background: var(--bg-soft); color: var(--text); }
/* Кнопки «Войти» и «Подключить» — в один ряд, компактнее */
.mm-auth { display: flex; gap: 10px; margin-top: 10px; }
.mm-auth .btn { flex: 1; padding: 11px 16px; font-size: 14px; }
.mm-cta, .mm-login { margin-top: 0; }
.mm-login { order: 1; }
.mm-cta { order: 2; }
/* Переключатель темы внутри мобильного меню (а не в шапке) */
.mobile-menu .mm-theme {
  width: 100%; height: auto;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--bg-soft);
  border-radius: 12px;
  box-shadow: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.mobile-menu .mm-theme:hover { transform: none; border-color: var(--accent); }
.mm-theme__ico { display: grid; place-items: center; width: 22px; height: 22px; }
.mm-theme__ico .theme-toggle__sun,
.mm-theme__ico .theme-toggle__moon { font-size: 18px; }
.mm-theme__text { line-height: 1; }
.mm-group { border-bottom: 1px solid var(--border); }
.mm-group:last-of-type { border-bottom: none; }
.mm-group > summary {
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 6px; font-weight: 600; color: var(--text);
  cursor: pointer; border-radius: 10px;
}
.mm-group > summary::-webkit-details-marker { display: none; }
.mm-group > summary i { font-size: 12px; color: var(--muted-2); transition: transform .2s ease; }
.mm-group[open] > summary i { transform: rotate(180deg); }
.mm-sub { display: block; padding-left: 18px !important; font-size: 14.5px; }
.mm-all { color: var(--accent-ink) !important; font-weight: 600; }
.mm-title {
  margin: 6px 0 2px;
  padding: 0 6px 0 18px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted-2);
}

/* ---------- Hero (главная) ---------- */
.hero {
  position: relative;
  padding: 88px 0 72px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -260px; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 620px;
  background: radial-gradient(closest-side, rgba(0,162,230,.12), rgba(5,61,81,.07), transparent 72%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
  position: relative;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 20px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 26px;
}
.badge b { color: var(--text); font-weight: 600; }

h1 {
  font-size: 56px;
  line-height: 1.06;
  letter-spacing: -.035em;
  font-weight: 700;
  margin: 0 0 22px;
}
h1 .grad {
  background: var(--accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  font-size: 19px;
  color: var(--muted);
  max-width: 520px;
  margin: 0 0 34px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

/* Визуальный блок в hero */
.visual { position: relative; padding: 8px; }
.visual-card {
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  padding: 20px;
  position: relative;
  z-index: 2;
}
.visual-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 16px; margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.visual-head .dots { display: flex; gap: 6px; }
.visual-head .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--border); display: block; }
.visual-head .title { font-size: 13px; font-weight: 600; color: var(--muted); }

.chat-row {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px;
  border-radius: 14px;
  transition: background .2s ease;
}
.chat-row:hover { background: var(--bg-soft); }
.avatar {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center; flex-shrink: 0;
}
.avatar i { font-size: 26px; }
.avatar .brand-ico { width: 30px; height: 30px; }
.avatar.wa { background: rgba(37,211,102,.14); color: var(--wa); }
.avatar.tg { background: rgba(42,171,238,.14); color: var(--tg); }
.avatar.tgb { background: rgba(0,136,204,.14); color: var(--tgb); }
.avatar.mx { background: rgba(123,97,255,.14); color: var(--max); }
.chat-row .meta { flex: 1; min-width: 0; }
.chat-row .meta .who { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.chat-row .meta .txt {
  display: block;
  font-size: 13px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tag {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink);
}

.floating-badge {
  position: absolute;
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600;
  z-index: 3;
}
.floating-badge small { display: block; font-weight: 500; color: var(--muted-2); font-size: 11px; }
.fb-1 { top: 4px; right: -6px; animation: float 6s ease-in-out infinite; }
.fb-2 { bottom: -6px; left: -6px; animation: float 6s ease-in-out infinite 1.4s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
.fb-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; }
.fb-icon i { font-size: 17px; }
.fb-icon.green { background: rgba(34,197,94,.13); color: #16a34a; }
.fb-icon.blue { background: rgba(0,162,230,.13); color: var(--accent-ink); }

/* ---------- Строка логотипов ---------- */
.logos { padding: 12px 0 8px; text-align: center; }
.logos p {
  font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted-2); font-weight: 600; margin: 0 0 26px;
}
.logos-row {
  display: flex; align-items: center; justify-content: center;
  gap: 44px; flex-wrap: wrap;
  opacity: .85;
}
.logos-row .lg {
  display: flex; align-items: center; gap: 9px;
  font-weight: 600; font-size: 17px; color: var(--muted);
}
.logos-row .lg i { font-size: 26px; }
.logos-row .lg .brand-ico { width: 30px; height: 30px; }

/* ---------- Секции ---------- */
section { padding: 88px 0; }
.section-flush-top { padding-top: 0; }

/* Вложенные секции внутри текстовых документов (статья блога, правовые
   страницы, глоссарий) — это смысловые разделы текста, а не полноширинные
   секции сайта. Глобальный padding: 88px 0 давал бы огромные пробелы. */
.article .article-section,
.legal .legal-section,
.docs .docs-group {
  padding: 0;
}

.section-head { margin: 0 auto 56px; text-align: center; }
.section-head.is-left { margin-left: 0; text-align: left; }

h2 {
  font-size: 44px; line-height: 1.14; letter-spacing: -.03em;
  font-weight: 600; margin: 0 0 16px;
}
.section-head p { font-size: 24px; line-height: 1.1; color: var(--muted); margin: 0; }

/* ---------- Каналы ---------- */
.channels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.channel {
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  position: relative;
  overflow: hidden;
  display: block;
  color: inherit;
  text-decoration: none;
}
.channel:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.channel::after {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--c, var(--accent)); opacity: 0; transition: opacity .25s ease;
}
.channel:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: #dbe6ee; }
.channel:hover::after { opacity: 1; }
.channel .ch-icon {
  width: 92px; height: 92px; border-radius: 26px;
  display: grid; place-items: center; margin-bottom: 24px;
}
.channel .ch-icon i { font-size: 44px; }
.channel .ch-icon .brand-ico { width: 72px; height: 72px; }
.channel h3 { font-size: 18px; margin: 0 0 8px; letter-spacing: -.02em; }
.channel p { color: var(--muted); font-size: 15px; margin: 0 0 18px; }
.channel ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.channel li { font-size: 14px; color: var(--muted); display: flex; gap: 9px; align-items: flex-start; }
.channel li i { font-size: 17px; flex-shrink: 0; margin-top: 3px; color: #16a34a; }

/* ---------- Возможности ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature .f-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent-ink);
  display: grid; place-items: center; margin-bottom: 18px;
}
.feature .f-icon i { font-size: 22px; }
.feature h3 { font-size: 17px; margin: 0 0 8px; letter-spacing: -.01em; }
.feature p { font-size: 14.5px; color: var(--muted); margin: 0; }

/* ---------- Шаги ---------- */
/* Секция «Шаги»: тот же «стеклянный» фон, что у .glass,
   но во всю ширину — без скруглений и рамки по кругу */
.steps-bg {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; position: relative; }
.step { position: relative; padding-top: 8px; }
.step .num {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand-grad); color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 16px;
  margin-bottom: 20px;
}
.step h3 { font-size: 19px; margin: 0 0 8px; letter-spacing: -.02em; }
.step p { color: var(--muted); font-size: 15px; margin: 0; }
code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

/* ---------- Тарифы ---------- */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; }
.plan {
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease;
}
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.plan.featured {
  border-color: transparent;
  box-shadow: var(--shadow-lg);
  position: relative;
  /* заметно светлее обычных карточек, но тоже полупрозрачный */
  background: linear-gradient(180deg, rgba(255, 255, 255, .50), rgba(255, 255, 255, .24));
}
.plan.featured::before {
  content: ''; position: absolute; inset: -1px; border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(140deg, var(--accent), var(--brand-1), var(--brand-2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.plan .p-name { font-size: 16px; font-weight: 600; color: var(--muted); margin: 0 0 6px; }
/* Цена адаптивная: длинное «Индивидуально» не должно вылезать из карточки */
.plan .p-price {
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 700; letter-spacing: -.03em; line-height: 1;
  margin: 0 0 4px;
  overflow-wrap: break-word;
}
.plan .p-price span { font-size: 15px; font-weight: 500; color: var(--muted-2); letter-spacing: 0; white-space: nowrap; }
.plan .p-desc { font-size: 14px; color: var(--muted); margin: 12px 0 22px; }
.plan .btn { width: 100%; }
.plan ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 11px; }
.plan li { display: flex; gap: 10px; font-size: 14.5px; color: var(--muted); align-items: flex-start; }
.plan li i { font-size: 18px; color: var(--accent-ink); flex-shrink: 0; margin-top: 2px; }
.plan .popular {
  position: absolute; top: 18px; right: 18px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: var(--text); color: #fff; padding: 4px 10px; border-radius: 999px;
}

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.qa {
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.qa[open] { box-shadow: var(--shadow-sm); border-color: #dde5ee; }
.qa summary {
  list-style: none; cursor: pointer;
  padding: 20px 22px;
  font-weight: 600; font-size: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary .chev {
  font-size: 22px; flex-shrink: 0; color: var(--muted-2);
  transition: transform .25s ease;
}
.qa[open] summary .chev { transform: rotate(180deg); }
.qa .a { padding: 0 22px 22px; color: var(--muted); font-size: 15px; margin: 0; }
.qa .a code {
  font-size: 13px; background: var(--bg-soft); border: 1px solid var(--border);
  padding: 2px 6px; border-radius: 6px; color: var(--accent-ink);
}

/* ---------- CTA ---------- */
.cta {
  background: var(--brand-grad);
  border-radius: 28px;
  padding: 60px 48px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.cta::before, .cta::after {
  content: ''; position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.cta::before { width: 340px; height: 340px; top: -160px; right: -90px; }
.cta::after { width: 260px; height: 260px; bottom: -140px; left: -70px; }
.cta h2 { color: #fff; margin-bottom: 14px; position: relative; }
.cta p { color: rgba(255,255,255,.78); font-size: 18px; margin: 0 0 30px; position: relative; }
.cta .btn-primary { background: #fff; color: var(--text); position: relative; }
.cta .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); position: relative; }
.cta .btn-ghost:hover { border-color: rgba(255,255,255,.7); }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; }

/* ---------- Внутренние страницы ---------- */
.page-hero { padding: 56px 0 40px; }
.page-hero__inner {
  border-radius: var(--radius);
  padding: 40px 44px 44px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  overflow-wrap: break-word;
}
.breadcrumbs {
  font-size: 13.5px; color: var(--muted-2);
  margin-bottom: 18px; display: flex; gap: 8px; align-items: center;
  justify-content: center; flex-wrap: wrap;
}
.breadcrumbs a { transition: color .15s ease; }
.breadcrumbs a:hover { color: var(--text); }
.page-hero h1 { font-size: 44px; margin: 0 0 14px; }
.page-hero p.lead { max-width: 720px; color: var(--muted); font-size: 18px; margin: 0 auto; }

/* ---------- Контакты ---------- */
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.contacts-panel {
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}
.contacts-h { font-size: 21px; margin: 0 0 22px; letter-spacing: -.02em; }

.contacts-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.contacts-link {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-soft);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.contacts-link:hover {
  transform: translateY(-2px);
  border-color: #cfe6f2;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.contacts-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; flex-shrink: 0;
}
.contacts-icon i { font-size: 24px; }
.contacts-icon .brand-ico { width: 32px; height: 32px; }
.contacts-text { display: grid; min-width: 0; }
.contacts-value { font-weight: 600; font-size: 15px; }
.contacts-label { font-size: 12.5px; color: var(--muted-2); }

.contacts-kv { margin: 0; }
.contacts-row {
  display: flex; justify-content: space-between; gap: 10px 24px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.contacts-row:first-child { padding-top: 0; }
.contacts-row:last-child { border-bottom: none; padding-bottom: 0; }
.contacts-k { color: var(--muted); font-size: 14px; margin: 0; flex-shrink: 0; }
.contacts-v { font-weight: 600; font-size: 14.5px; margin: 0; text-align: right; }

.contacts-map {
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--surface);
}
.contacts-map iframe { display: block; width: 100%; height: 460px; border: 0; }

/* Узкая колонка для форм */
.form-narrow { max-width: 660px; margin: 0 auto; }

.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 14px; font-weight: 600; }
.input, .textarea, .select {
  width: 100%; font: inherit; font-size: 15px; color: var(--text);
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--accent); background: #fff;
  box-shadow: 0 0 0 4px rgba(0,162,230,.14);
}
.textarea { min-height: 130px; resize: vertical; }
.form-row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }

.notice {
  border-radius: 12px; padding: 14px 16px; font-size: 14.5px;
  margin-bottom: 20px; border: 1px solid;
}
.notice.success { background: rgba(34,197,94,.10); border-color: rgba(34,197,94,.3); color: #15803d; }
.notice.error { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.3); color: #b91c1c; }

.card {
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

/* ---------- Футер ---------- */
footer.site-footer {
  padding: 56px 0 40px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}
.foot-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 32px;
  margin-bottom: 44px;
}
.foot-brand p { color: var(--muted); font-size: 14.5px; margin: 16px 0 0; max-width: 280px; }
.foot-col h3 { font-size: 14px; margin: 0 0 16px; letter-spacing: -.01em; }
.foot-col a {
  display: block; color: var(--muted); font-size: 14.5px; padding: 5px 0;
  transition: color .15s ease;
}
.foot-col a:hover { color: var(--text); }
.foot-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 26px; border-top: 1px solid var(--border);
  font-size: 13.5px; color: var(--muted-2); flex-wrap: wrap; gap: 12px;
}
.foot-disclaimer {
  margin: 20px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted-2);
  max-width: 900px;
}

/* ---------- Согласие на использование cookie ---------- */
.cookie-consent {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  padding: 0 24px 16px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
.cookie-consent[hidden] { display: none; }
.cookie-consent.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.cookie-consent__inner {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.cookie-consent p { margin: 0; flex: 1; min-width: 240px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.cookie-consent a { color: var(--accent-ink); text-decoration: underline; }
.cookie-consent .btn { padding: 9px 18px; font-size: 14px; }

@media (max-width: 640px) {
  .cookie-consent { padding: 0 14px 12px; }
  .cookie-consent__inner { padding: 14px 16px; }
  .cookie-consent .btn { flex: 1; }
}

/* ---------- Интеграции ---------- */
.prose { max-width: 780px; margin: 0 auto; text-align: center; }
.prose p {
  color: var(--muted); font-size: 16.5px; line-height: 1.7; margin: 0 0 18px;
}
.prose p:last-child { margin-bottom: 0; }

/* ---------- Переход в мессенджеры (вместо формы) ---------- */
.connect-links {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  margin-top: 26px;
}
.connect-link {
  display: flex; align-items: center; gap: 16px;
  padding: 22px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.connect-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #dbe6ee; }
.connect-link .cl-ico {
  width: 54px; height: 54px; border-radius: 15px; flex-shrink: 0;
  display: grid; place-items: center;
}
.connect-link .cl-ico .brand-ico { width: 34px; height: 34px; }
.connect-link .cl-ico i { font-size: 26px; }
.connect-link .cl-body { display: grid; min-width: 0; }
.connect-link .cl-title { font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.connect-link .cl-desc { font-size: 13.5px; color: var(--muted-2); line-height: 1.4; }

@media (max-width: 640px) {
  .connect-links { grid-template-columns: 1fr; }
}

.app-card {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
}
.app-card .app-logo {
  height: 56px; width: auto; flex-shrink: 0;
  display: grid; place-items: center;
}
.app-card .app-logo svg { height: 100%; width: auto; display: block; }
.app-card .app-body { flex: 1; min-width: 220px; }
.app-card .app-name {
  font-weight: 700; font-size: 18px; letter-spacing: -.02em; margin: 0 0 4px;
}
.app-card .app-meta { color: var(--muted); font-size: 14.5px; margin: 0; }
.app-card .app-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.related-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.related-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #dbe6ee;
}
.related-card .rc-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center;
}
.related-card .rc-icon i { font-size: 24px; }
.related-card .rc-icon .brand-ico { width: 32px; height: 32px; }
.related-card .rc-body { display: grid; min-width: 0; }
.related-card .rc-title { font-weight: 600; font-size: 15px; }
.related-card .rc-label { font-size: 12.5px; color: var(--muted-2); }

/* ---------- Правовые документы (политика, согласие, соглашение) ---------- */
.legal {
  border-radius: var(--radius);
  padding: 44px 48px 48px;
  box-shadow: var(--shadow-sm);
  overflow-wrap: break-word;
}
.legal-meta {
  font-size: 14px;
  color: var(--muted-2);
  margin: 0 0 30px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.legal-lead {
  color: var(--text);
  font-size: 17px;
  line-height: 1.7;
  margin: 0 0 20px;
}
.legal p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 14px;
}
.legal-section { margin-top: 34px; }
.legal-section:first-of-type { margin-top: 0; }
.legal h2 {
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -.01em;
  text-transform: none;
  font-weight: 600;
  margin: 0 0 14px;
}
.legal h3 {
  font-size: 18px;
  line-height: 1.35;
  text-transform: none;
  margin: 0 0 10px;
}
.legal-list {
  margin: 0 0 16px;
  padding-left: 22px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}
.legal-list li { margin-bottom: 8px; }
.legal-list li::marker { color: var(--accent-ink); }
.legal-note {
  border-left: 3px solid var(--accent);
  background: var(--bg-soft);
  border-radius: 0 12px 12px 0;
  padding: 14px 18px;
  color: var(--text);
  font-size: 15px;
}

/* ---------- Личный кабинет: макет интерфейса ---------- */
.cab-mock {
  margin-top: 40px;
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.cab-mock__bar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.cab-dots { display: flex; gap: 6px; }
.cab-dots i { width: 10px; height: 10px; border-radius: 50%; display: block; background: var(--border); }
.cab-dots i:nth-child(1) { background: #f87171; }
.cab-dots i:nth-child(2) { background: #fbbf24; }
.cab-dots i:nth-child(3) { background: #34d399; }
.cab-mock__title { font-size: 13px; font-weight: 600; color: var(--muted); }

.cab-mock__body { display: grid; grid-template-columns: 280px 1fr; min-height: 430px; }

.cab-side {
  border-right: 1px solid var(--border);
  padding: 18px 14px;
  display: grid; align-content: start; gap: 6px;
}
.cab-side__label {
  font-size: 11.5px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted-2);
  padding: 0 10px; margin: 0 0 8px;
}
.cab-side__label--mt { margin-top: 16px; }
.cab-side__item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 12px;
  font-size: 14px; font-weight: 600; color: var(--muted);
}
.cab-side__item.is-active { background: var(--accent-soft); color: var(--accent-ink); }
.cab-side__name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cab-badge {
  font-size: 11.5px; font-weight: 700; padding: 2px 9px;
  border-radius: 999px; background: var(--bg-soft); color: var(--muted);
}
.cab-side__item.is-active .cab-badge { background: #fff; color: var(--accent-ink); }
.cab-ico {
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center; flex-shrink: 0;
  background: var(--bg-soft);
}
.cab-ico i { font-size: 15px; }
.cab-ico .brand-ico { width: 22px; height: 22px; }

.cab-chat { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; }
.cab-chat__head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
}
.cab-ava {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center; flex-shrink: 0;
}
.cab-ava .brand-ico { width: 26px; height: 26px; }
.cab-ava i { font-size: 22px; }
.cab-ava.wa { background: rgba(37,211,102,.14); color: var(--wa); }
.cab-chat__who { font-size: 15px; font-weight: 700; }
.cab-chat__ch { display: block; font-size: 12px; font-weight: 600; color: var(--muted-2); }
.cab-chat__status { margin-left: auto; font-size: 12px; font-weight: 600; color: #16a34a; }

.cab-chat__body { padding: 20px; display: grid; align-content: start; gap: 12px; }
.cab-msg {
  max-width: 78%; position: relative;
  font-size: 14px; line-height: 1.5;
  padding: 11px 14px 22px; border-radius: 14px;
}
.cab-msg--in { background: var(--bg-soft); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.cab-msg--out { background: var(--accent-soft); color: var(--accent-ink); margin-left: auto; border-bottom-right-radius: 4px; }
.cab-msg__time { position: absolute; right: 12px; bottom: 6px; font-size: 10.5px; color: var(--muted-2); }
.cab-msg--out .cab-msg__time { color: var(--accent-ink); opacity: .75; }
.cab-typing {
  display: inline-flex; gap: 4px; width: max-content;
  padding: 12px 14px; border-radius: 14px;
  background: var(--bg-soft); border: 1px solid var(--border);
}
.cab-typing i { width: 6px; height: 6px; border-radius: 50%; display: block; background: var(--muted-2); animation: cab-typing 1.2s infinite; }
.cab-typing i:nth-child(2) { animation-delay: .18s; }
.cab-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes cab-typing {
  0%, 60%, 100% { opacity: .3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}
.cab-composer {
  display: flex; align-items: center; gap: 10px;
  margin: 0 20px 18px; padding: 10px 12px 10px 16px;
  border: 1px solid var(--border); border-radius: 14px;
  background: var(--bg-soft);
}
.cab-composer__ph { flex: 1; font-size: 14px; color: var(--muted-2); }
.cab-composer__send {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--brand-grad); color: #fff;
}
.cab-composer__send i { font-size: 15px; }

/* ---------- Страница 404 ---------- */
.nf { max-width: 760px; margin: 0 auto; text-align: center; }
.nf-code {
  font-size: 168px;
  font-weight: 800;
  line-height: .9;
  letter-spacing: -.06em;
  margin: 0 0 10px;
  background: linear-gradient(135deg, var(--logo-1), var(--logo-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nf h1 { font-size: 34px; margin: 0 0 14px; letter-spacing: -.02em; }
.nf .lead { color: var(--muted); font-size: 17px; line-height: 1.6; max-width: 560px; margin: 0 auto; }
.nf-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.nf-links {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-top: 48px; text-align: left;
}
.nf-link {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.nf-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #dbe6ee; }
.nf-link .nf-ico {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center;
}
.nf-link .nf-ico i { font-size: 20px; }
.nf-link .nf-body { display: grid; min-width: 0; }
.nf-link .nf-title { font-weight: 600; font-size: 15px; }
.nf-link .nf-desc { font-size: 13px; color: var(--muted-2); }

/* ---------- Блог: список статей и страница статьи ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.blog-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: inherit; text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: #dbe6ee; }
.blog-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.blog-card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.blog-card__icon { width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0; display: grid; place-items: center; }
.blog-card__icon i { font-size: 20px; }
.blog-card__cat {
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted-2);
}
.blog-card__title { font-size: 18px; font-weight: 600; letter-spacing: -.02em; line-height: 1.32; }
.blog-card__text { flex: 1; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.blog-card__meta { padding-top: 12px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted-2); }

.article {
  border-radius: var(--radius);
  padding: 44px 48px 48px;
  box-shadow: var(--shadow-sm);
  overflow-wrap: break-word;
}
.article-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--muted-2);
  margin: 0 0 26px; padding-bottom: 22px; border-bottom: 1px solid var(--border);
}
.article-cat {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 13px;
  padding: 5px 12px; border-radius: 999px;
}
.article-cat i { font-size: 14px; }
.article-lead { color: var(--text); font-size: 17px; line-height: 1.7; margin: 0 0 20px; }
.article-section { margin-top: 34px; }
.article-section:first-of-type { margin-top: 0; }
.article-section p { color: var(--muted); font-size: 16px; line-height: 1.7; margin: 0 0 14px; }
.article h2 {
  font-size: 24px; line-height: 1.3; letter-spacing: -.01em;
  text-transform: none; font-weight: 600; margin: 0 0 14px;
}
.article-list {
  margin: 0 0 16px; padding-left: 22px;
  color: var(--muted); font-size: 16px; line-height: 1.7;
}
.article-list li { margin-bottom: 8px; }
.article-list li::marker { color: var(--accent-ink); }
.article-note {
  border-left: 3px solid var(--accent);
  background: var(--bg-soft);
  border-radius: 0 12px 12px 0;
  padding: 14px 18px;
  color: var(--text);
  font-size: 15px;
}
.article-takeaways {
  background: var(--accent-soft);
  border: 1px solid rgba(0,162,230,.22);
  border-radius: 14px;
  padding: 20px 24px;
  margin: 0 0 28px;
}
.article-takeaways__title {
  display: flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 15px; color: var(--text);
  margin: 0 0 12px;
}
.article-takeaways__title i { color: var(--accent-ink); }
.article-takeaways .article-list { margin-bottom: 0; }
.article-back { margin: 30px 0 0; padding-top: 22px; border-top: 1px solid var(--border); }
.article-back a {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 14.5px; color: var(--accent-ink);
}
.article-back a:hover { text-decoration: underline; }

/* ---------- Документация: глоссарий терминов ---------- */
.docs { display: grid; gap: 48px; }
.docs-group__title {
  display: flex; align-items: center; gap: 14px;
  font-size: 26px; line-height: 1.2; letter-spacing: -.02em;
  text-transform: none; font-weight: 600; margin: 0 0 22px;
}
.docs-group__icon {
  width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-ink);
}
.docs-group__icon i { font-size: 20px; }
.glossary { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0; }
.glossary-item { padding: 18px 20px; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.glossary-term { font-weight: 700; font-size: 15.5px; letter-spacing: -.01em; color: var(--text); margin: 0 0 8px; }
.glossary-def { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.65; }

/* ---------- Статус сервиса ---------- */
.status-banner {
  display: flex; align-items: center; gap: 20px;
  padding: 24px 28px; border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.status-banner__ico { width: 54px; height: 54px; border-radius: 16px; flex-shrink: 0; display: grid; place-items: center; }
.status-banner__ico i { font-size: 26px; }
.status-banner--up .status-banner__ico { background: rgba(34,197,94,.14); color: #16a34a; }
.status-banner--down .status-banner__ico { background: rgba(239,68,68,.12); color: #dc2626; }
.status-banner__body { display: grid; gap: 4px; min-width: 0; }
.status-banner__title { font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.status-banner__text { color: var(--muted); font-size: 14.5px; line-height: 1.5; }

.status-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.status-metric { display: grid; gap: 4px; padding: 20px 24px; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.status-metric__value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.status-metric__label { font-size: 13.5px; color: var(--muted-2); }

.status-list { display: grid; gap: 14px; margin-top: 24px; }
.status-row {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 20px 24px; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
}
.status-row__ico { width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0; display: grid; place-items: center; }
.status-row__ico i { font-size: 22px; }
.status-row__body { display: grid; gap: 2px; flex: 1 1 240px; min-width: 0; }
.status-row__name { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.status-row__host { font-size: 12.5px; color: var(--muted-2); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.status-row__desc { color: var(--muted); font-size: 14px; line-height: 1.5; margin-top: 4px; }
.status-row__side { display: grid; gap: 8px; justify-items: end; flex-shrink: 0; }
.status-row__meta { font-size: 12.5px; color: var(--muted-2); }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 13.5px; padding: 6px 14px;
  border-radius: 999px; white-space: nowrap;
}
.status-pill i { font-size: 13px; }
.status-pill--up { background: rgba(34,197,94,.14); color: #15803d; }
.status-pill--down { background: rgba(239,68,68,.12); color: #b91c1c; }

.status-legend { margin-top: 24px; padding: 22px 26px; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.status-legend__title { font-weight: 700; font-size: 15px; margin: 0 0 14px; }
.status-legend__list {
  list-style: none; padding: 0; margin: 0 0 16px;
  display: grid; gap: 10px;
  font-size: 14.5px; color: var(--muted);
}
.status-legend__list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.status-legend__note { margin: 0; font-size: 13px; color: var(--muted-2); line-height: 1.6; }

/* Тёмная тема: цветные статусы и врезки читаемее на чёрном */
html[data-theme="dark"] .status-pill--up { color: #4ade80; }
html[data-theme="dark"] .status-pill--down { color: #f87171; }
html[data-theme="dark"] .status-banner--up .status-banner__ico { color: #4ade80; }
html[data-theme="dark"] .status-banner--down .status-banner__ico { color: #f87171; }
html[data-theme="dark"] .article-takeaways { background: rgba(0,162,230,.10); border-color: rgba(0,162,230,.28); }
html[data-theme="dark"] .blog-card:hover { border-color: rgba(255,255,255,.22); }

@media (max-width: 980px) {
  .blog-grid { grid-template-columns: 1fr 1fr; }
  .glossary { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
  .article { padding: 26px 20px 30px; }
  .article h2 { font-size: 20px; }
  .article-lead { font-size: 16px; }
  .article-section p, .article-list { font-size: 15px; }
  .docs-group__title { font-size: 21px; }
  .status-metrics { grid-template-columns: 1fr; }
  .status-banner { flex-direction: column; align-items: flex-start; gap: 14px; padding: 20px; }
  .status-banner__title { font-size: 18px; }
  .status-row__side { justify-items: start; }
}

/* ---------- Защита от перелива сеток на мобильных ----------
   Без min-width:0 «fr»-колонка не может сжаться меньше min-content
   своего содержимого и распирает всю страницу по горизонтали. */
.hero-grid > *,
.channels > *,
.features > *,
.steps > *,
.pricing > *,
.related > *,
.blog-grid > *,
.glossary > *,
.status-metrics > *,
.contacts-grid > *,
.foot-grid > * {
  min-width: 0;
}

/* ---------- Анимация появления ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 980px) {
  h1 { font-size: 44px; }
  h2 { font-size: 36px; }
  .section-head p { font-size: 21px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero p.lead { max-width: none; }
  .channels, .features, .steps, .pricing { grid-template-columns: 1fr 1fr; }
  .contacts-grid { grid-template-columns: 1fr; }
  .page-hero h1 { font-size: 34px; }
  .page-hero__inner { padding: 32px 26px 34px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .nav-links { display: none; }
  .nav-cta .btn-ghost { display: none; }
  /* Смена темы и «Подключить» уезжают в раскрывающееся меню */
  .nav-cta > .theme-toggle,
  .nav-cta > .btn-primary { display: none; }
  .logo-text { display: none; }
  .nav-brand-mobile { display: block; }
  .burger { display: flex; }
}

@media (max-width: 560px) {
  /* На узких экранах оставляем только знак — иначе название наезжает на кнопки */
  .logo-text { display: none; }
}

@media (max-width: 640px) {
  section { padding: 64px 0; }
  .hero { padding: 56px 0 48px; }
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  .plan { padding: 26px 22px; }
  .section-head p { font-size: 18px; }
  .cta p { font-size: 16px; }
  .channels, .features, .steps, .pricing { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .contacts-panel { padding: 24px 20px; }
  .contacts-map iframe { height: 340px; }
  .contacts-row { flex-direction: column; gap: 4px; }
  .contacts-v { text-align: left; }
  .foot-grid { grid-template-columns: 1fr; }
  .cta { padding: 44px 24px; border-radius: 22px; }
  .floating-badge { display: none; }
  .logos-row { gap: 32px; }
}

@media (max-width: 980px) {
  .related { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .related { grid-template-columns: 1fr; }
  .app-card { padding: 20px; }
}

@media (max-width: 860px) {
  .cab-mock__body { grid-template-columns: 1fr; }
  .cab-side { border-right: none; border-bottom: 1px solid var(--border); }
}

@media (max-width: 640px) {
  .legal { padding: 26px 20px 30px; }
  .legal h2 { font-size: 20px; }
  .legal-lead { font-size: 16px; }
  .page-hero { padding: 40px 0 28px; }
  .page-hero__inner { padding: 26px 20px 28px; }
  .page-hero h1 { font-size: 28px; }
  .page-hero p.lead { font-size: 16px; }
  .cab-mock { border-radius: 18px; }
  .cab-chat__head, .cab-chat__body { padding-left: 14px; padding-right: 14px; }
  .cab-composer { margin: 0 14px 14px; }
  .cab-msg { max-width: 88%; }
  .nf-code { font-size: 104px; }
  .nf h1 { font-size: 26px; }
  .nf-links { grid-template-columns: 1fr; margin-top: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .cab-typing i { animation: none; }
}

/* ==========================================================================
   Тёмная тема
   ========================================================================== */

/* ---------- Фон страницы: светящиеся орбы (только тёмная тема) ---------- */
body.na-page {
  position: relative;
  isolation: isolate;
}

body.na-page > *:not(.na-bg-orbs):not(.coin-layer):not(.site-header):not(.cookie-consent) {
  position: relative;
}

.na-bg-orbs {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}

html[data-theme="dark"] .na-bg-orbs { display: block; }

.na-bg-orbs__ball {
  position: absolute;
  /* чуть крупнее, чтобы после blur край не «съедался» */
  width: min(240vmin, 260vh);
  height: min(240vmin, 260vh);
  border-radius: 50%;
  will-change: transform, filter;
  /* смягчает любой остаточный перелом; фон страницы #000 — прозрачный край визуально чёрный */
  filter: blur(56px);
  -webkit-filter: blur(56px);
}

/* Центр #053d51 → плавное затухание в прозрачность (без кольца и без обрыва на #000) */
.na-bg-orbs__ball--teal {
  left: max(-58%, -48vw);
  top: max(-50%, -42vh);
  background: radial-gradient( circle at 50% 50%, #053d51 0%, rgba(5, 61, 81, 0.92) 12%, rgba(5, 61, 81, 0.65) 28%, rgba(5, 61, 81, 0.38) 44%, rgba(5, 61, 81, 0.2) 58%, rgba(5, 61, 81, 0.09) 72%, rgba(5, 61, 81, 0.03) 86%, transparent 100% );
  animation: na-bg-drift-a 5.5s ease-in-out infinite;
}

/* Центр #260f1d → плавное затухание в прозрачность */
.na-bg-orbs__ball--plum {
  right: max(-55%, -45vw);
  bottom: max(-48%, -40vh);
  background: radial-gradient( circle at 50% 50%, #260f1d 0%, rgba(38, 15, 29, 0.9) 12%, rgba(38, 15, 29, 0.62) 28%, rgba(38, 15, 29, 0.36) 44%, rgba(38, 15, 29, 0.18) 58%, rgba(38, 15, 29, 0.08) 72%, rgba(38, 15, 29, 0.025) 86%, transparent 100% );
  animation: na-bg-drift-b 6.5s ease-in-out infinite;
}

@keyframes na-bg-drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  20% { transform: translate3d(22vw, 12vh, 0) scale(1.04); }
  45% { transform: translate3d(-14vw, 22vh, 0) scale(0.97); }
  70% { transform: translate3d(16vw, -16vh, 0) scale(1.03); }
}

@keyframes na-bg-drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  25% { transform: translate3d(-20vw, -14vh, 0) scale(1.05); }
  50% { transform: translate3d(14vw, -20vh, 0) scale(0.96); }
  75% { transform: translate3d(-10vw, 18vh, 0) scale(1.02); }
}

@media (prefers-reduced-motion: reduce) {
  .na-bg-orbs__ball--teal, .na-bg-orbs__ball--plum { animation: none; }
}

/* ---------- Кнопка переключения темы ---------- */
.theme-toggle {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.theme-toggle:hover { transform: translateY(-2px); border-color: var(--accent); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle i { font-size: 17px; }
.theme-toggle__sun { display: none; }
.theme-toggle__moon { display: block; }
html[data-theme="dark"] .theme-toggle__sun { display: block; }
html[data-theme="dark"] .theme-toggle__moon { display: none; }

/* ---------- Тёмная палитра ---------- */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --bg-soft: rgba(255, 255, 255, .05);
  --surface: #0c1320;
  --border: rgba(255, 255, 255, .10);
  --text: #e6edf6;
  --muted: #9aa8ba;
  --muted-2: #6b7a8d;
  --accent: #22b0f0;
  --accent-soft: rgba(34, 176, 240, .14);
  --accent-ink: #4cc2f1;
  /* Стеклянные блоки: на чёрном фоне — полупрозрачный тёмный, иначе белые карточки */
  --glass-bg: rgba(12, 19, 32, .55);
  --glass-border: rgba(255, 255, 255, .12);
  /* Логотип светлее, чтобы блок читался на чёрном фоне, а вырезы >_ были заметны */
  --logo-1: #1287ad;
  --logo-2: #7a3654;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .55);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .6);
}

html[data-theme="dark"] body { background: var(--bg); }

/* Полупрозрачные поверхности и «светлые» хардкод-цвета → тёмные аналоги */
html[data-theme="dark"] header.site-header { background: rgba(0, 0, 0, .55); }
html[data-theme="dark"] header.site-header.scrolled { background: rgba(0, 0, 0, .82); }
html[data-theme="dark"] .mobile-menu { background: rgba(0, 0, 0, .96); }

/* Выпадающие меню в тёмной теме: фон чуть светлее чёрного, чтобы читалось */
html[data-theme="dark"] .dropdown { background: #0f1a28; border-color: rgba(255, 255, 255, .14); }
html[data-theme="dark"] .dropdown a:hover { background: rgba(255, 255, 255, .08); }

html[data-theme="dark"] .btn-ghost:hover { border-color: rgba(255, 255, 255, .28); }
html[data-theme="dark"] .channel:hover,
html[data-theme="dark"] .related-card:hover,
html[data-theme="dark"] .qa[open] { border-color: rgba(255, 255, 255, .22); }
html[data-theme="dark"] .contacts-link:hover { border-color: rgba(34, 176, 240, .45); }

/* Мобильное меню (тёмная тема): кнопки не сливаются с чёрным фоном */
html[data-theme="dark"] .mm-login { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); color: var(--text); }
html[data-theme="dark"] .mm-cta { background: linear-gradient(135deg, #1287ad, #7a3654); color: #fff; }

html[data-theme="dark"] .plan.featured { background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03)); }
html[data-theme="dark"] .input:focus,
html[data-theme="dark"] .textarea:focus,
html[data-theme="dark"] .select:focus { background: rgba(255, 255, 255, .07); }

html[data-theme="dark"] .plan .popular,
html[data-theme="dark"] .cta .btn-primary { background: #ffffff; color: #0f172a; }

/* Без поддержки backdrop-filter фон блока должен остаться читаемым */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html:not([data-theme="dark"]) .glass,
  html:not([data-theme="dark"]) .steps-bg { background: rgba(255, 255, 255, .88); }
  html[data-theme="dark"] .glass,
  html[data-theme="dark"] .steps-bg { background: rgba(12, 19, 32, .92); }
}

html[data-theme="dark"] .btn-primary { box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), var(--shadow-md); }

html[data-theme="dark"] .notice.success { background: rgba(34, 197, 94, .14); border-color: rgba(34, 197, 94, .35); color: #86efac; }
html[data-theme="dark"] .notice.error { background: rgba(239, 68, 68, .14); border-color: rgba(239, 68, 68, .35); color: #fca5a5; }
html[data-theme="dark"] .fb-icon.green { color: #4ade80; }
