/* =============================================================================
   Linkodium CRM: публичный сайт (главная, возможности, интеграции,
   документация, статьи). Свои стили, без внешних шрифтов и библиотек.
   Кабинет этим файлом не пользуется: у него assets/css/style.css.
   Шрифт Nunito подключается отдельным assets/css/fonts.css (общий с кабинетом).
   Брейкпоинты: планшет до 1024px, телефон до 720px.
   ========================================================================== */

/* --- Токены ----------------------------------------------------------------
   Палитра кабинета (assets/css/style.css): тот же фиолетово-синий акцент. */
:root {
    --ink:          #14162b;   /* заголовки */
    --text:         #474d66;   /* текст */
    --muted:        #687089;   /* подписи: 4,9:1 на белом */
    --line:         #e4e6f1;
    --tint:         #f4f5fd;   /* карточки, подвал */
    --accent:       #6366f1;
    --accent-hover: #4f46e5;
    --accent-tint:  #eaebff;
    --up:           #0f9d58;
    --up-tint:      #e2f6ea;
    --down:         #e0383e;
    --down-tint:    #fdeaea;
    --warn:         #d98a0b;
    --warn-tint:    #fdf3dd;
    --night:        #12132a;   /* тёмные блоки */
    --border:       var(--line);
    --bg-surface:   #fff;
    --radius:       14px;
    --radius-sm:    10px;
    --r-card:       28px;
    --shadow-sm:    0 1px 2px rgba(13, 21, 38, .05), 0 2px 8px rgba(13, 21, 38, .05);
    --shadow-lg:    0 24px 60px -24px rgba(13, 21, 38, .28), 0 8px 20px -12px rgba(13, 21, 38, .12);
    --font:         'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --hdr-h:        76px;
}

/* --- База ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
/* Авторский display бьёт браузерное [hidden]{display:none}: гасим явно. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
    margin: 0;
    background: #fff;
    color: var(--text);
    font-family: var(--font);
    font-size: 17px; font-weight: 400; line-height: 1.6;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; vertical-align: middle; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 800; letter-spacing: -.015em; }
b, strong { font-weight: 700; color: var(--ink); }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.skip {
    position: absolute; left: 12px; top: -60px; z-index: 3000;
    padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #fff;
}
.skip:focus { top: 12px; color: #fff; }
.ico { flex-shrink: 0; }
.num { font-variant-numeric: tabular-nums; }

/* --- Кнопки -------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 15px 34px;
    border: 0; border-radius: 999px;
    background: var(--accent); color: #fff;
    font-family: var(--font); font-size: 16px; font-weight: 700; line-height: 24px;
    text-align: center; white-space: nowrap; cursor: pointer;
    transition: background-color .2s, color .2s, box-shadow .2s, transform .2s;
}
.btn:hover, .btn:focus-visible { background: var(--accent-hover); color: #fff; box-shadow: 0 10px 24px -10px rgba(99, 102, 241, .7); }
.btn:active { transform: translateY(1px); }
.btn--lg { padding: 19px 44px; font-size: 17px; }
.btn--sm { padding: 10px 22px; font-size: 15px; line-height: 22px; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--ghost:hover, .btn--ghost:focus-visible { background: var(--tint); color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent-tint); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover, .btn--light:focus-visible { background: var(--accent-tint); color: var(--accent-hover); box-shadow: none; }

/* --- Шапка ---------------------------------------------------------------
   Липкая, с полупрозрачным фоном. Тень появляется после прокрутки (класс
   ставит site.js). До 1024px меню уходит в панель за кнопкой. */
.hdr { position: sticky; top: 0; z-index: 900; background: #fff; border-bottom: 1px solid transparent; transition: box-shadow .2s, border-color .2s; }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .hdr { background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px); }
}
.hdr.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 24px rgba(13, 21, 38, .06); }
.hdr__in { display: flex; align-items: center; gap: 32px; height: var(--hdr-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 18px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.logo:hover { color: var(--ink); }
.logo__mark { width: 34px; height: 34px; }
.logo__sub { color: var(--muted); font-weight: 500; }
.hnav { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.hnav a { display: block; padding: 9px 14px; border-radius: 12px; color: var(--ink); font-size: 15px; font-weight: 500; line-height: 20px; transition: background-color .2s, color .2s; }
.hnav a:hover, .hnav a:focus-visible { background: var(--tint); color: var(--accent); }
.hdr__side { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.burger { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; background: none; color: var(--ink); cursor: pointer; }
.burger:hover { background: var(--tint); }
.burger .ico--close, .hdr.is-open .burger .ico--menu { display: none; }
.hdr.is-open .burger .ico--close { display: block; }
@media (max-width: 1024px) {
    :root { --hdr-h: 64px; }
    .burger { display: inline-flex; }
    .hdr__nav {
        position: absolute; left: 0; right: 0; top: 100%;
        display: none; padding: 12px 24px 20px;
        background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -24px rgba(13, 21, 38, .25);
    }
    .hdr.is-open .hdr__nav { display: block; }
    .hnav { flex-direction: column; align-items: stretch; gap: 2px; }
    .hnav a { padding: 12px 14px; font-size: 16px; }
}
@media (max-width: 720px) {
    .hdr__in { gap: 12px; }
    .logo__sub { display: none; }
    .hdr__side .btn { padding: 9px 16px; font-size: 14px; }
}

/* --- Уведомления сервера (flash) ----------------------------------------- */
.flash { margin: 16px 0 0; padding: 14px 18px; border-radius: var(--radius); background: var(--accent-tint); color: var(--ink); font-size: 15px; }
.flash--success { background: var(--up-tint); }
.flash--error   { background: var(--down-tint); }
.flash--warning { background: var(--warn-tint); }

/* --- Общие блоки секций -------------------------------------------------- */
.sec { padding: 110px 0 0; }
.sec--last { padding-bottom: 110px; }
.sec__head { max-width: 760px; margin: 0 auto 56px; text-align: center; }
.sec__head--left { margin-left: 0; text-align: left; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    margin-bottom: 18px; padding: 7px 14px;
    border-radius: 999px; background: var(--accent-tint); color: var(--accent-hover);
    font-size: 13px; font-weight: 600; line-height: 18px; letter-spacing: .04em; text-transform: uppercase;
}
.sec__title { font-size: clamp(30px, 4.4vw, 50px); line-height: 1.12; }
.sec__lead { margin: 18px 0 0; font-size: 19px; line-height: 1.55; }
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { padding: 36px; border-radius: var(--r-card); background: var(--tint); }
.card h3 { font-size: 22px; line-height: 1.25; }
.card p { margin: 12px 0 0; font-size: 16px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--up); flex-shrink: 0; }
.dot--down { background: var(--down); }
.dot--warn { background: var(--warn); }
.dot--pulse { box-shadow: 0 0 0 0 rgba(15, 157, 88, .5); animation: pulse 2.4s infinite; }
.dot--down.dot--pulse { box-shadow: 0 0 0 0 rgba(224, 56, 62, .5); animation-name: pulse-down; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(15, 157, 88, .45); } 70%, 100% { box-shadow: 0 0 0 9px rgba(15, 157, 88, 0); } }
@keyframes pulse-down { 0% { box-shadow: 0 0 0 0 rgba(224, 56, 62, .45); } 70%, 100% { box-shadow: 0 0 0 9px rgba(224, 56, 62, 0); } }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; background: var(--up-tint); color: var(--up); font-size: 11px; font-weight: 700; line-height: 16px; letter-spacing: .05em; }
.badge--down { background: var(--down-tint); color: var(--down); }
.badge--warn { background: var(--warn-tint); color: #a86a05; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* --- Первый экран -------------------------------------------------------- */
.hero { position: relative; isolation: isolate; padding: 72px 0 0; overflow: hidden; }
/* Фон: мягкое синее свечение и сетка, гаснущая книзу. */
.hero::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 760px; z-index: -1;
    background:
        radial-gradient(60% 55% at 50% 0%, rgba(99, 102, 241, .18), rgba(99, 102, 241, 0) 70%),
        linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 56px 56px,
        linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 56px 56px;
    -webkit-mask-image: linear-gradient(#000 0%, transparent 85%); mask-image: linear-gradient(#000 0%, transparent 85%);
    opacity: .7;
}
.hero__in { display: flex; flex-direction: column; align-items: center; text-align: center; }
/* Один <h1> на метку и слоган: в заголовок страницы входит и ключевая фраза,
   и слоган, а на экране это две строки разного кегля. */
.hero__h1 { display: flex; flex-direction: column; align-items: center; font-size: inherit; font-weight: inherit; letter-spacing: 0; }
.hero__title { display: block; max-width: 900px; color: var(--ink); font-size: clamp(38px, 6.2vw, 72px); font-weight: 800; line-height: 1.06; letter-spacing: -.03em; }
.hero__title em { font-style: normal; color: var(--accent); }
.hero__lead { max-width: 680px; margin: 28px 0 0; font-size: 20px; line-height: 1.55; }
.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 36px 0 0; }
.hero__trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; margin: 28px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 15px; font-weight: 500; }
.hero__trust li { display: inline-flex; align-items: center; gap: 8px; }
.hero__trust .ico { color: var(--up); }

/* Макет кабинета под заголовком свёрстан, а не картинка, поэтому чёткий на любом
   экране и не весит ничего. Для читалки скрыт (aria-hidden в разметке). */
.shot { position: relative; width: 100%; max-width: 1040px; margin: 72px auto 0; text-align: left; }
.shot__win { border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--shadow-lg); overflow: hidden; }
.shot__bar { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #f8fafd; }
.shot__bar i { width: 11px; height: 11px; border-radius: 50%; background: #d5dbe7; }
.shot__url { margin-left: 14px; padding: 5px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 18px; }
.shot__body { padding: 26px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.tile { padding: 16px 18px; border-radius: 16px; background: var(--tint); }
.tile__k { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.tile__v { margin-top: 2px; color: var(--ink); font-size: 28px; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.tile__v--up { color: var(--up); }
.tile__v--down { color: var(--down); }
.rows { display: grid; gap: 8px; }
.row { display: grid; grid-template-columns: 14px minmax(0, 1.1fr) minmax(0, 1.5fr) 74px 56px; align-items: center; gap: 16px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 14px; font-size: 15px; }
.row--down { border-color: #f7c9cb; background: #fff8f8; }
.row__name { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__ms { color: var(--muted); font-size: 14px; text-align: right; }
.row--down .row__ms { color: var(--down); font-weight: 600; }
/* Полоса аптайма: по столбику на проверку, как на страницах статуса. */
.bars { display: flex; align-items: stretch; gap: 3px; height: 26px; }
.bars i { flex: 1 1 0; min-width: 2px; border-radius: 2px; background: var(--up); opacity: .85; }
.bars i.w { background: var(--warn); }
.bars i.d { background: var(--down); }
/* Всплывающие уведомления поверх макета. */
.toast { position: absolute; z-index: 2; display: flex; align-items: flex-start; gap: 12px; width: 300px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow-lg); font-size: 14px; line-height: 1.45; }
.toast__ico { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 12px; background: var(--down-tint); color: var(--down); flex-shrink: 0; }
.toast__ico--warn { background: var(--warn-tint); color: var(--warn); }
.toast b { display: block; font-size: 14px; }
.toast small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
/* Оба висят на углах окна и не закрывают ни плитки, ни строки списка. */
.toast--a { left: -64px; bottom: -44px; }
.toast--b { right: -64px; top: -36px; }
@media (prefers-reduced-motion: no-preference) {
    .toast--a { animation: float 6s ease-in-out infinite; }
    .toast--b { animation: float 7s ease-in-out -2s infinite; }
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Цифры под макетом */
.facts { width: 100%; text-align: left; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 104px 0 0; padding: 0; list-style: none; }
.facts li { padding: 0 0 0 22px; border-left: 2px solid var(--accent-tint); }
.facts b { display: block; color: var(--ink); font-size: clamp(30px, 3.6vw, 44px); font-weight: 700; line-height: 1.1; letter-spacing: -.03em; }
.facts span { display: block; margin-top: 6px; color: var(--muted); font-size: 15px; line-height: 1.4; }

/* --- «Что проверяем»: три большие карточки ------------------------------- */
.check { display: flex; flex-direction: column; min-height: 100%; }
.check__viz { margin: 28px 0 0; padding: 18px; border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm); font-size: 14px; }
.check__viz + .check__viz { margin-top: 10px; }
.check__line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.check__line + .check__line { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.check__line > span:first-child { color: var(--muted); }
.check__line b { font-weight: 600; }
.code { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--tint); color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.meter { height: 8px; margin-top: 12px; border-radius: 999px; background: var(--tint); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--up); }
.meter--warn i { background: var(--warn); }
.check .spacer { flex: 1 1 auto; }

/* --- Уведомления: тёмный широкий блок ------------------------------------ */
.dark { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 64px; padding: 64px; border-radius: 36px; background: var(--night); color: #b6c0d6; }
.dark h2, .dark h3, .dark b { color: #fff; }
.dark .eyebrow { background: rgba(255, 255, 255, .08); color: #b4b6ff; }
.dark .sec__lead { color: #b6c0d6; }
/* В половине ширины заголовок секции мельче, иначе он встаёт в четыре строки. */
.dark .sec__title, .split .sec__title { font-size: clamp(28px, 3.3vw, 40px); }
.chan { display: grid; gap: 12px; margin: 32px 0 0; padding: 0; list-style: none; }
.chan li { display: flex; align-items: flex-start; gap: 14px; font-size: 16px; }
.chan .ico { margin-top: 2px; color: #a5a8ff; }
.feed { display: grid; gap: 12px; }
.msg { display: flex; gap: 14px; padding: 18px 20px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 20px; background: rgba(255, 255, 255, .04); font-size: 15px; line-height: 1.45; }
.msg__ico { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(165, 168, 255, .16); color: #b4b6ff; flex-shrink: 0; }
.msg__top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; color: #8794b0; font-size: 13px; }
.msg__top b { font-size: 14px; }
.msg p { margin: 4px 0 0; color: #d7deee; }
.msg--up .msg__ico { background: rgba(15, 157, 88, .16); color: #4fd494; }
.msg--down .msg__ico { background: rgba(224, 56, 62, .16); color: #ff8a8e; }

/* --- Сетка возможностей -------------------------------------------------- */
.feat { padding: 30px; border: 1px solid var(--line); border-radius: 24px; background: #fff; transition: border-color .2s, box-shadow .2s, transform .2s; }
.feat:hover { border-color: var(--accent-tint); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.feat__ico { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-bottom: 20px; border-radius: 14px; background: var(--accent-tint); color: var(--accent); }
.feat h3 { font-size: 19px; line-height: 1.3; }
.feat p { margin: 10px 0 0; font-size: 15px; line-height: 1.55; }

/* --- Шаги ---------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.step { position: relative; padding: 36px; border-radius: var(--r-card); background: var(--tint); counter-increment: step; }
.step::before { content: counter(step, decimal-leading-zero); display: block; margin-bottom: 20px; color: var(--accent); font-size: 64px; font-weight: 700; line-height: 1; letter-spacing: -.04em; }
.step h3 { font-size: 22px; line-height: 1.25; }
.step p { margin: 12px 0 0; font-size: 16px; }

/* --- Аналитика: текст и график ------------------------------------------- */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: 64px; }
.ticks { display: grid; gap: 18px; margin: 32px 0 0; padding: 0; list-style: none; }
.ticks li { display: flex; gap: 14px; }
.ticks .ico { margin-top: 3px; color: var(--up); }
.ticks b { display: block; font-size: 17px; }
.ticks span span { display: block; font-size: 15px; }
.chart { padding: 28px; border: 1px solid var(--line); border-radius: var(--r-card); background: #fff; box-shadow: var(--shadow-lg); }
.chart__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.chart__top b { font-size: 16px; }
.chart__top span { color: var(--muted); font-size: 13px; }
.chart svg { display: block; width: 100%; height: auto; }
.chart__x { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 12px; }
.chart__sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.chart__sum span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.chart__sum b { display: block; margin-top: 2px; font-size: 24px; letter-spacing: -.02em; }
.chart__sum b.up { color: var(--up); }

/* --- Вопросы и ответы (details, без скриптов) ---------------------------- */
.faq { max-width: 860px; margin: 0 auto; }
.faq__item { margin-bottom: 12px; border-radius: 20px; background: var(--tint); }
.faq__q { display: flex; align-items: center; gap: 16px; padding: 24px 28px; color: var(--ink); font-size: 19px; font-weight: 600; line-height: 1.3; list-style: none; cursor: pointer; border-radius: 20px; }
.faq__q::-webkit-details-marker { display: none; }
.faq__q::marker { content: ''; }
.faq__q h3 { flex: 1 1 auto; font-size: inherit; font-weight: inherit; line-height: inherit; letter-spacing: 0; }
.faq__q .ico { color: var(--accent); transition: transform .2s; }
.faq__item[open] .faq__q .ico { transform: rotate(45deg); }
.faq__q:hover { color: var(--accent-hover); }
.faq__a { padding: 0 28px 26px; font-size: 16px; }
.faq__a a { text-decoration: underline; text-underline-offset: 3px; }

/* --- Призыв -------------------------------------------------------------- */
.cta { position: relative; padding: 80px 40px; border-radius: 36px; background: linear-gradient(120deg, #4338ca 0%, var(--accent) 55%, #8b5cf6 100%); color: rgba(255, 255, 255, .88); text-align: center; overflow: hidden; }
.cta::before { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px) 0 0 / 48px 48px, linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px) 0 0 / 48px 48px; -webkit-mask-image: radial-gradient(70% 90% at 50% 50%, #000, transparent); mask-image: radial-gradient(70% 90% at 50% 50%, #000, transparent); }
.cta > * { position: relative; }
.cta h2 { color: #fff; font-size: clamp(30px, 4.4vw, 50px); line-height: 1.12; }
.cta p { max-width: 560px; margin: 18px auto 34px; font-size: 19px; }

/* --- Подвал -------------------------------------------------------------- */
.ftr { margin-top: 110px; }

/* --- Планшет ------------------------------------------------------------- */
@media (max-width: 1180px) {
    .toast--a { left: -8px; }
    .toast--b { right: -8px; }
}
@media (max-width: 1024px) {
    .sec { padding-top: 84px; }
    .sec--last { padding-bottom: 84px; }
    .grid--3, .steps { grid-template-columns: minmax(0, 1fr); }
    .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dark, .split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .dark { padding: 48px 36px; }
    .toast { display: none; }
    .ftr { margin-top: 84px; }
    .check__viz { max-width: 460px; }
}

/* --- Телефон ------------------------------------------------------------- */
@media (max-width: 720px) {
    body { font-size: 16px; }
    .wrap { padding: 0 18px; }
    .sec { padding-top: 68px; }
    .sec--last { padding-bottom: 68px; }
    .sec__head { margin-bottom: 36px; }
    .sec__lead, .hero__lead { font-size: 17px; }
    .hero { padding-top: 44px; }
    .hero__cta { width: 100%; }
    .hero__cta .btn { width: 100%; }
    .hero__trust { flex-direction: column; align-items: center; gap: 8px; }
    .shot { margin-top: 48px; }
    .shot__body { padding: 14px; }
    .shot__url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .tile__v { font-size: 22px; }
    .row { grid-template-columns: 12px minmax(0, 1fr) 52px; gap: 10px; padding: 12px; font-size: 14px; }
    .row .bars, .row__ms { display: none; }
    .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; margin-top: 48px; }
    .facts li { padding-left: 16px; }
    .card, .step { padding: 26px; }
    .grid--4 { grid-template-columns: minmax(0, 1fr); }
    .dark { padding: 34px 22px; border-radius: 26px; }
    .msg { padding: 14px; }
    .chart { padding: 18px; }
    .chart__sum b { font-size: 19px; }
    .faq__q { padding: 20px; font-size: 17px; }
    .faq__a { padding: 0 20px 20px; }
    .cta { padding: 52px 22px; border-radius: 26px; }
    .cta .btn { width: 100%; white-space: normal; }
    .ftr { margin-top: 68px; }
}

/* =============================================================================
   Дополнения CRM: подвал, макеты кабинета, внутренние страницы, документация.
   ========================================================================== */

/* --- Выпадающее меню шапки ------------------------------------------------ */
.hnav li { position: relative; }
.hnav__sub { position: absolute; left: 0; top: 100%; z-index: 20; display: none; min-width: 280px; margin: 0; padding: 10px; list-style: none; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow-lg); }
.hnav li:hover > .hnav__sub, .hnav li:focus-within > .hnav__sub { display: block; }
.hnav__sub a { padding: 10px 12px; font-size: 15px; }
.hnav__sub small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; line-height: 1.35; }
@media (max-width: 1024px) {
    .hnav__sub { position: static; display: block; min-width: 0; padding: 0 0 6px 14px; border: 0; box-shadow: none; }
    .hnav__sub small { display: none; }
}

/* --- Подвал -------------------------------------------------------------- */
.ftr { padding: 64px 0 36px; background: var(--tint); color: var(--text); font-size: 15px; }
.ftr__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); gap: 32px; }
.ftr__about p { max-width: 300px; margin: 14px 0 0; color: var(--muted); }
.ftr h4 { margin-bottom: 14px; font-size: 14px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.ftr ul { margin: 0; padding: 0; list-style: none; }
.ftr li { margin: 0 0 9px; }
.ftr a { color: var(--text); }
.ftr a:hover { color: var(--accent); }
.ftr__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.ftr__bottom a { color: var(--muted); }
@media (max-width: 1024px) { .ftr__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ftr__about { grid-column: 1 / -1; } }
@media (max-width: 720px) { .ftr { padding: 44px 0 28px; } .ftr__grid { gap: 26px 18px; } }

/* --- Макет кабинета: заявки ---------------------------------------------- */
.app { display: grid; grid-template-columns: 190px minmax(0, 1fr); min-height: 430px; }
.app__side { padding: 18px 12px; border-right: 1px solid var(--line); background: #fafaff; }
.app__logo { display: flex; align-items: center; gap: 8px; margin: 0 8px 18px; color: var(--ink); font-size: 14px; font-weight: 800; }
.app__logo i { width: 24px; height: 24px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), #8b5cf6); }
.app__nav { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; font-size: 14px; font-weight: 600; }
.app__nav li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--text); }
.app__nav li.is-on { background: var(--accent-tint); color: var(--accent-hover); }
.app__nav .n { margin-left: auto; padding: 1px 8px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; line-height: 16px; }
.app__main { padding: 20px 22px; min-width: 0; }
.app__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.app__top b { font-size: 18px; }
.app__top span { padding: 7px 14px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; }
.leads { display: grid; gap: 8px; }
.lead { display: grid; grid-template-columns: 44px minmax(0, 1.3fr) minmax(0, 1fr) 118px 92px; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; font-size: 14px; }
.lead__n { color: var(--muted); font-size: 13px; font-weight: 700; }
.lead__who { min-width: 0; }
.lead__who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.lead__who small { display: block; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.lead__src { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead__src .ico { color: var(--accent); }
.lead__mgr { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.ava { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-tint); color: var(--accent-hover); font-size: 11px; font-weight: 800; flex-shrink: 0; }
.ava--b { background: #dcfce7; color: #15803d; }
.ava--c { background: #fef3c7; color: #b45309; }
.ava--d { background: #fce7f3; color: #be185d; }
.st { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-hover); font-size: 12px; font-weight: 700; line-height: 16px; text-align: center; white-space: nowrap; }
.st--work { background: var(--warn-tint); color: #a86a05; }
.st--ok { background: var(--up-tint); color: var(--up); }
.st--wait { background: #eef0f6; color: var(--muted); }
@media (max-width: 1024px) { .app { grid-template-columns: minmax(0, 1fr); } .app__side { display: none; } }
@media (max-width: 720px) {
    .app__main { padding: 14px; }
    .lead { grid-template-columns: minmax(0, 1fr) 92px; gap: 10px; padding: 11px 12px; }
    .lead__n, .lead__src, .lead__mgr { display: none; }
}

/* --- Макет переписки ------------------------------------------------------ */
.chat { display: grid; gap: 10px; padding: 22px; border: 1px solid var(--line); border-radius: var(--r-card); background: #fff; box-shadow: var(--shadow-lg); font-size: 15px; line-height: 1.45; }
.chat__hd { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.chat__hd b { display: block; font-size: 15px; }
.chat__hd small { display: block; color: var(--muted); font-size: 13px; }
.chat__hd .st { margin-left: auto; }
.bub { max-width: 82%; padding: 10px 14px; border-radius: 16px 16px 16px 6px; background: var(--tint); color: var(--ink); }
.bub small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.bub--out { justify-self: end; border-radius: 16px 16px 6px 16px; background: var(--accent); color: #fff; }
.bub--out small { color: rgba(255, 255, 255, .75); }
.bub--sys { justify-self: center; max-width: 100%; padding: 5px 12px; border-radius: 999px; background: none; border: 1px dashed var(--line); color: var(--muted); font-size: 12px; }
.chat__in { display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 10px 12px 10px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 14px; }
.chat__in span { flex: 1 1 auto; }
.chat__in i { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; }
.dark .chat { border-color: rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .04); box-shadow: none; color: #d9dbf5; }
.dark .chat__hd { border-bottom-color: rgba(255, 255, 255, .08); }
.dark .chat__hd small, .dark .bub small { color: #9a9dc4; }
.dark .bub { background: rgba(255, 255, 255, .08); color: #fff; }
.dark .bub--out { background: var(--accent); }
.dark .bub--sys { border-color: rgba(255, 255, 255, .14); color: #9a9dc4; background: none; }
.dark .chat__in { border-color: rgba(255, 255, 255, .12); color: #9a9dc4; }

/* --- Каналы: плашки ------------------------------------------------------ */
.chans { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0; padding: 0; list-style: none; }
.chans li { display: inline-flex; align-items: center; gap: 9px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-size: 15px; font-weight: 700; }
.chans .ico { color: var(--accent); }
.card .feat__ico { background: #fff; box-shadow: var(--shadow-sm); }
.card--link { display: block; color: var(--text); transition: box-shadow .2s, transform .2s, background-color .2s; }
.card--link:hover { color: var(--text); background: #fff; box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.card--link .more, .feat .more { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; color: var(--accent); font-size: 15px; font-weight: 700; }
a.feat { display: block; color: var(--text); }
a.feat:hover { color: var(--text); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1024px) { .grid--2 { grid-template-columns: minmax(0, 1fr); } }
.split--rev > :first-child { order: 2; }
@media (max-width: 1024px) { .split--rev > :first-child { order: 0; } }

/* --- Макет письма и списка писем ----------------------------------------- */
.mbox { border: 1px solid var(--line); border-radius: var(--r-card); background: #fff; box-shadow: var(--shadow-lg); overflow: hidden; font-size: 14px; }
.mbox__row { display: grid; grid-template-columns: 30px minmax(0, 150px) minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.mbox__row:last-child { border-bottom: 0; }
.mbox__row.is-new b { color: var(--ink); }
.mbox__row.is-new { background: #fbfbff; }
.mbox__row b { overflow: hidden; color: var(--text); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.mbox__row span { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.mbox__row span em { color: var(--ink); font-style: normal; font-weight: 600; }
.mbox__row time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.mbox__lead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; background: var(--accent-tint); color: var(--accent-hover); font-weight: 700; }
.mbox__lead span { padding: 6px 14px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13px; }
@media (max-width: 720px) { .mbox__row { grid-template-columns: 30px minmax(0, 1fr) auto; } .mbox__row span { display: none; } }

/* --- Права доступа: таблица-макет ---------------------------------------- */
.roles { display: grid; gap: 8px; padding: 22px; border: 1px solid var(--line); border-radius: var(--r-card); background: #fff; box-shadow: var(--shadow-lg); font-size: 14px; }
.roles__row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 14px; }
.roles__row b { display: block; font-size: 14px; }
.roles__row small { display: block; color: var(--muted); font-size: 12px; }

/* --- Блок кода ----------------------------------------------------------- */
.codebox { position: relative; border-radius: 20px; background: var(--night); color: #d9dbf5; overflow: hidden; }
.codebox__bar { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid rgba(255, 255, 255, .08); color: #9a9dc4; font-size: 13px; font-weight: 600; }
.codebox pre { margin: 0; padding: 18px 20px; overflow-x: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; line-height: 1.65; tab-size: 2; }
.codebox .k { color: #a5a8ff; }
.codebox .s { color: #86efac; }
.codebox .c { color: #7f83a8; }

/* --- Внутренние страницы: первый экран и крошки -------------------------- */
.phero { position: relative; isolation: isolate; padding: 56px 0 0; overflow: hidden; }
.phero::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 420px; z-index: -1; background: radial-gradient(60% 70% at 50% 0%, rgba(99, 102, 241, .14), rgba(99, 102, 241, 0) 70%); }
.phero__in { max-width: 860px; }
.phero--center .phero__in { margin: 0 auto; text-align: center; }
.phero h1 { font-size: clamp(32px, 4.8vw, 54px); line-height: 1.1; letter-spacing: -.025em; }
.phero__lead { margin: 20px 0 0; font-size: 20px; line-height: 1.55; }
.phero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 0; }
.phero--center .phero__cta { justify-content: center; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0 0 22px; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.phero--center .crumbs { justify-content: center; }
.crumbs li + li::before { content: '/'; margin-right: 8px; color: #b9bdd1; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.sec--tight { padding-top: 64px; }

/* --- Текст: статьи и документация ---------------------------------------- */
.prose { max-width: 780px; font-size: 17px; line-height: 1.7; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 48px 0 14px; font-size: clamp(24px, 3vw, 32px); line-height: 1.2; scroll-margin-top: calc(var(--hdr-h) + 20px); }
.prose h3 { margin: 32px 0 10px; font-size: 21px; line-height: 1.3; scroll-margin-top: calc(var(--hdr-h) + 20px); }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 24px; }
.prose li { margin: 0 0 8px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: 16px; }
.prose code { padding: 2px 7px; border-radius: 6px; background: var(--tint); color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; }
.prose pre { margin: 0 0 20px; padding: 18px 20px; border-radius: 16px; background: var(--night); color: #d9dbf5; overflow-x: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; line-height: 1.65; }
.prose pre code { padding: 0; background: none; color: inherit; font-size: inherit; }
.prose table { width: 100%; margin: 0 0 22px; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { color: var(--ink); font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.tablewrap { overflow-x: auto; }
.note { margin: 0 0 20px; padding: 16px 20px; border-radius: 16px; background: var(--accent-tint); color: var(--ink); font-size: 16px; }
.note--warn { background: var(--warn-tint); }
.steps-list { margin: 0 0 22px; padding: 0; list-style: none; counter-reset: s; }
.steps-list > li { position: relative; margin: 0 0 14px; padding: 2px 0 0 48px; counter-increment: s; }
.steps-list > li::before { content: counter(s); position: absolute; left: 0; top: 0; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-tint); color: var(--accent-hover); font-size: 15px; font-weight: 800; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 18px 0 0; color: var(--muted); font-size: 14px; }

/* --- Документация: боковое меню и колонка -------------------------------- */
.docs { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 56px; align-items: start; padding-top: 48px; }
.docs__nav { position: sticky; top: calc(var(--hdr-h) + 20px); max-height: calc(100vh - var(--hdr-h) - 40px); overflow-y: auto; font-size: 15px; }
.docs__nav h4 { margin: 22px 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.docs__nav h4:first-child { margin-top: 0; }
.docs__nav ul { margin: 0; padding: 0; list-style: none; }
.docs__nav a { display: block; padding: 7px 12px; border-radius: 10px; color: var(--text); font-weight: 600; }
.docs__nav a:hover { background: var(--tint); color: var(--accent); }
.docs__nav a.is-on { background: var(--accent-tint); color: var(--accent-hover); }
.docs__body h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.12; letter-spacing: -.02em; }
.docs__body .phero__lead { margin-bottom: 28px; }
.docs__pager { display: flex; justify-content: space-between; gap: 16px; max-width: 780px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-weight: 700; }
@media (max-width: 1024px) {
    .docs { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 32px; }
    .docs__nav { position: static; max-height: none; padding: 18px; border-radius: 20px; background: var(--tint); }
}

/* --- Карточки статей ----------------------------------------------------- */
.post { display: flex; flex-direction: column; padding: 30px; border: 1px solid var(--line); border-radius: 24px; background: #fff; color: var(--text); transition: border-color .2s, box-shadow .2s, transform .2s; }
.post:hover { color: var(--text); border-color: var(--accent-tint); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.post__tag { align-self: flex-start; margin-bottom: 16px; padding: 4px 12px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-hover); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.post h3 { font-size: 20px; line-height: 1.3; }
.post p { margin: 10px 0 0; font-size: 15px; line-height: 1.55; }
.post .more { margin-top: auto; padding-top: 18px; color: var(--accent); font-size: 15px; font-weight: 700; }

/* --- Страница 404 сайта --------------------------------------------------- */
.nf { padding: 96px 0 0; text-align: center; }
.nf b { display: block; color: var(--accent); font-size: clamp(72px, 14vw, 140px); font-weight: 800; line-height: 1; letter-spacing: -.04em; }

@media (max-width: 720px) {
    .phero { padding-top: 36px; }
    .phero__lead { font-size: 17px; }
    .phero__cta .btn { width: 100%; }
    .prose { font-size: 16px; }
    .chat, .roles { padding: 16px; }
    .post { padding: 24px; }
}

/* Телефон: таблицы документации не сжимаются в столбцы по одному слову, а
   прокручиваются внутри .tablewrap */
@media (max-width: 720px) {
    .prose .tablewrap table { min-width: 560px; }
}
/* Вложенный список внутри шага .steps-list */
.steps-list > li > ul { margin-top: 8px; }

.prose :not(pre) > code { overflow-wrap: anywhere; }
