/* Jazu — главная, страницы ниш и юридические страницы.
   Та же система, что у «Инструкции» (docs.css): холодный светлый фон, глубокий бирюзовый — главный цвет,
   шафран — только подсветка (строка прайса, ответ бота, выгода). Иконки — линейные SVG (#i-… в landing.html). */
:root {
  --paper: #f5f6f8;
  --surface: #ffffff;
  --ink: #1c2430;
  --ink-2: #5a6472;
  --ink-3: #8a93a0;
  --line: #e1e4ea;
  --sea: #0f5f66;
  --sea-deep: #0b4a50;
  --sea-soft: #e3f0f0;
  --saffron: #e3a21a;
  --saffron-soft: #fff4dc;
  --ok: #1f8a4c;
  --ok-soft: #e4f4ea;
  --bad: #c2412d;
  --bad-soft: #fbe9e5;
  --chat: #e8eeec;
  --device: #1c2430;
  --on-sea: #ffffff;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --gutter: clamp(16px, 4vw, 40px);
  --wrap: 1240px;
  --nav-h: 64px;
  --shadow: 0 18px 40px -22px rgba(10, 40, 45, 0.45);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12171d;
    --surface: #1a2129;
    --ink: #e6ebf0;
    --ink-2: #a3adb9;
    --ink-3: #75808c;
    --line: #2a333d;
    --sea: #4fb3b9;
    --sea-deep: #0f5f66;
    --sea-soft: #173236;
    --saffron: #f0b43a;
    --saffron-soft: #33290f;
    --ok: #4cc27f;
    --ok-soft: #173325;
    --bad: #f07a62;
    --bad-soft: #3a1d17;
    --chat: #0f171c;
    --device: #05080b;
    --on-sea: #08201f;
    --shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

/* ---------- основа ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 20px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 17px/1.65 var(--font); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--sea); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--sea); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
h2 { font: 700 clamp(25px, 3vw, 38px)/1.15 var(--display); letter-spacing: 0; max-width: 24ch; text-wrap: balance; }
h3 { font: 700 19px/1.3 var(--font); letter-spacing: -0.01em; margin-bottom: 8px; text-wrap: balance; }
p { margin: 0; }
.muted { color: var(--ink-2); }
[hidden] { display: none !important; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 8px 14px; border-radius: 10px; background: var(--sea); color: var(--on-sea); font-weight: 600; text-decoration: none; }
.skip:focus { top: 10px; }

main > section { max-width: var(--wrap); margin: 0 auto; padding: 72px var(--gutter); }
.sec-head { margin-bottom: 36px; }
.sec-lead, .lead { font-size: 19px; line-height: 1.55; color: var(--ink-2); max-width: 54ch; margin-top: 14px; }

/* ---------- кнопки ---------- */
.l-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--sea); background: var(--sea); color: var(--on-sea); font: 600 15.5px/1 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer; transition: filter 0.15s, background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s var(--ease); }
.l-btn:hover { filter: brightness(1.08); }
.l-btn:active { transform: scale(0.98); }
.l-btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.l-btn.ghost:hover { filter: none; border-color: var(--sea); color: var(--sea); }
.l-btn.big { height: 54px; padding: 0 26px; font-size: 17px; border-radius: 14px; box-shadow: 0 14px 30px -16px color-mix(in srgb, var(--sea) 80%, transparent); }
.l-btn.big-ghost { height: 54px; padding: 0 22px; font-size: 17px; border-radius: 14px; }
.l-btn.light { background: #fff; color: #0b4a50; border-color: #fff; box-shadow: none; }
.l-btn.light:hover { filter: none; background: var(--saffron-soft); border-color: var(--saffron-soft); }
.l-btn.on-dark { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.l-btn.on-dark:hover { border-color: #fff; color: #fff; }

/* ---------- верхняя панель (как в инструкции) ---------- */
.l-nav { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; height: var(--nav-h); padding: 0 max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.l-nav.scrolled, body:not(.home) .l-nav { border-bottom-color: var(--line); }
.l-brand { font: 700 19px/1 var(--display); color: var(--sea); text-decoration: none; letter-spacing: 0.01em; white-space: nowrap; }
.l-sep { width: 1px; height: 22px; background: var(--line); }
.l-links { display: flex; gap: 2px; flex: 1; min-width: 0; }
.l-links a { padding: 6px 9px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; white-space: nowrap; transition: color 0.15s, background 0.15s; }
.l-links a:hover { color: var(--ink); background: var(--surface); }
.l-links a.on { color: var(--sea); background: var(--sea-soft); }
.l-nav-cta { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.l-nav .l-btn { height: 38px; padding: 0 16px; font-size: 15px; }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; padding: 2px; background: var(--surface); }
.lang-switch button, .lang-switch a { border: 0; background: none; padding: 4px 9px; border-radius: 7px; font: 600 13px/1.4 var(--font); color: var(--ink-2); cursor: pointer; text-decoration: none; }
.lang-switch button.active, .lang-switch a.active { background: var(--sea); color: var(--on-sea); }
.m-nav { display: none; }

/* ---------- первый экран ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: clamp(32px, 5vw, 64px); align-items: center; padding-top: 48px !important; padding-bottom: 56px !important; }
.hero-kicker { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 18px; padding: 5px 12px 5px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: 14px; font-weight: 600; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.hero h1 { font: 700 clamp(31px, 3.6vw, 50px)/1.08 var(--display); letter-spacing: -0.005em; max-width: 19ch; text-wrap: balance; }
.hero .lead { color: var(--ink); font-size: clamp(17px, 1.5vw, 20px); margin: 22px 0 12px; max-width: 46ch; }
.hero-sub { color: var(--ink-2); max-width: 54ch; font-size: 16px; line-height: 1.6; }
.hero-benefits { list-style: none; padding: 0; margin: 24px 0 30px; display: grid; gap: 10px; font-size: 15.5px; color: var(--ink-2); line-height: 1.5; max-width: 56ch; }
.hero-benefits li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; }
.hero-benefits .ic { width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--sea-soft); color: var(--sea); stroke-width: 2.6; margin-top: 1px; }
.hero-benefits b { color: var(--ink); font-weight: 600; }
.hero-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-top: 16px; font-size: 14.5px; color: var(--ink-2); }
.hero-meta:has(.hero-note:empty) { gap: 0; }
.hero-note { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 14.5px; }
.hero-note:not(:empty)::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--saffron); }
.hero-price { color: var(--ink); font-weight: 600; text-decoration-color: color-mix(in srgb, var(--sea) 50%, transparent); text-decoration-thickness: 1.5px; }

/* сцена: тёмно-бирюзовая панель с точечной сеткой, как в инструкции */
.stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 22px 22px 26px; min-height: 560px; border-radius: 28px; background: var(--sea-deep); background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1.2px, transparent 1.2px); background-size: 18px 18px; overflow: hidden; isolation: isolate; }
.stage::before { content: ''; position: absolute; inset: auto -20% -40% -20%; height: 70%; background: radial-gradient(closest-side, rgba(79, 179, 185, 0.35), transparent); z-index: -1; }
.demo-channels { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: rgba(255, 255, 255, 0.09); border: 1px solid rgba(255, 255, 255, 0.12); }
.ch-tab { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border: 0; border-radius: 9px; background: none; color: rgba(255, 255, 255, 0.75); font: 600 13px/1 var(--font); cursor: pointer; transition: background 0.2s, color 0.2s; }
.ch-tab .ic { width: 15px; height: 15px; }
.ch-tab:hover { color: #fff; }
.ch-tab.active { background: #fff; color: #0b4a50; }
.stage .phone { width: min(330px, 100%); height: 392px; margin-left: 56px; }
.stage .phone-chat { justify-content: flex-end; padding-bottom: 46px; transition: opacity 0.35s; }
.stage .phone-chat.fade { opacity: 0; }

/* телефон — как в инструкции: рамка-устройство и шапка мессенджера */
.phone { position: relative; min-width: 0; display: flex; flex-direction: column; background: var(--chat); border: 7px solid var(--device); border-radius: 30px; overflow: hidden; box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.55); font-size: 14px; line-height: 1.42; }
.phone-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--sea); color: var(--on-sea); }
.phone-head.self { background: var(--ink-2); }
.ph-ava { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.2); }
.ph-ava .ic { width: 16px; height: 16px; }
.ph-who { min-width: 0; display: flex; flex-direction: column; }
.phone-head b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity 0.3s; }
.phone-head span:not(.ph-ava):not(.ph-who) { display: block; font-size: 11.5px; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone-chat { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 7px; padding: 12px 10px; }

/* сообщения */
.msg { position: relative; max-width: 86%; padding: 7px 10px; border-radius: 12px; background: var(--surface); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06); font-size: 14px; line-height: 1.42; overflow-wrap: anywhere; }
.msg.in { align-self: flex-start; border-top-left-radius: 3px; }
.msg.out { align-self: flex-end; border-top-right-radius: 3px; background: var(--sea-soft); }
.msg.bot { background: var(--saffron-soft); box-shadow: inset 2px 0 0 var(--saffron); }
.msg .who { display: block; font-size: 12px; font-weight: 700; color: var(--sea); }
.msg .quote { display: block; margin-bottom: 4px; padding: 3px 7px; border-left: 2px solid var(--sea); border-radius: 4px; background: rgba(0, 0, 0, 0.05); font-size: 12px; color: var(--ink-2); }
.msg .quote b { display: block; color: var(--sea); }
.msg .transcript { display: block; margin-top: 5px; padding-top: 5px; border-top: 1px dashed color-mix(in srgb, var(--ink-3) 50%, transparent); font-size: 13px; font-style: italic; color: var(--ink-2); }
.msg .rec { display: flex; align-items: center; gap: 8px; min-width: 160px; font-size: 12px; color: var(--ink-3); }
.msg .rec .ic { width: 26px; height: 26px; padding: 6px; border-radius: 50%; background: var(--sea); color: #fff; }
.msg .wave { flex: 1; display: flex; align-items: center; gap: 2px; height: 18px; }
.msg .wave i { flex: 1; border-radius: 1px; background: var(--sea); opacity: 0.7; height: 40%; }
.msg .wave i:nth-child(2n) { height: 90%; }
.msg .wave i:nth-child(3n) { height: 60%; }
.msg .file { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; margin-right: 4px; }
.msg .file .ic { width: 18px; height: 18px; color: var(--sea); }
.msg .was { color: var(--ink-2); }
.msg .now { color: var(--ok); }
.msg.sys b { display: block; font-size: 13px; margin-bottom: 2px; }
.msg.sys.ok { background: var(--ok-soft); box-shadow: inset 2px 0 0 var(--ok); }
.msg a { color: var(--sea); font-weight: 600; }

/* прайс и уведомление поверх панели */
.sheet { position: relative; z-index: 2; align-self: flex-start; margin-top: -58px; width: min(310px, 100%); background: var(--surface); border-radius: 12px; box-shadow: 0 24px 44px -20px rgba(0, 0, 0, 0.6); overflow: hidden; font-size: 12px; color: var(--ink); }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-weight: 600; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.x-ico { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 4px; background: #1f7a45; color: #fff; font: 700 10px/1 var(--font); }
.sheet table { width: 100%; border-collapse: collapse; }
.sheet th, .sheet td { padding: 5px 9px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; transition: background 0.35s; }
.sheet tr:last-child td { border-bottom: 0; }
.sheet th { background: var(--paper); color: var(--ink-2); font-weight: 600; font-size: 11px; }
.sheet td:last-child, .sheet th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.sheet tr.hit td { background: var(--saffron-soft); }
.sheet tr.hit td:first-child { box-shadow: inset 3px 0 0 var(--saffron); }
.sheet tr.hit td:last-child { font-weight: 700; }
.lead-toast { position: absolute; z-index: 3; top: 72px; right: 14px; display: flex; gap: 10px; align-items: flex-start; max-width: 250px; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--ink) 92%, transparent); color: var(--paper); font-size: 12.5px; line-height: 1.4; box-shadow: 0 16px 30px -12px rgba(0, 0, 0, 0.5); }
.lead-toast .ic { width: 18px; height: 18px; color: var(--saffron); margin-top: 1px; }
.lead-toast b { display: block; font-size: 13px; }
.stage .sheet, .stage .lead-toast { color: var(--ink); }
.stage .lead-toast { color: var(--paper); }

/* ---------- задачи и цифры ---------- */
.usecases-strip { padding-top: 0 !important; padding-bottom: 40px !important; }
.uc-pills { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.uc-pills li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 14.5px; font-weight: 500; }
.uc-pills .ic { width: 17px; height: 17px; color: var(--sea); }
.stats-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.stat-item { padding: 22px 24px; }
.stat-item + .stat-item { border-left: 1px solid var(--line); }
.stat-item dt { font: 700 clamp(26px, 2.6vw, 34px)/1.05 var(--display); color: var(--sea); margin-bottom: 8px; }
.stat-item dd { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.4; }

/* ---------- что даёт бизнесу ---------- */
.vs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.vs-card { display: flex; flex-direction: column; gap: 12px; padding: 26px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); }
.vs-card h3 { margin: 0 0 2px; font-size: 20px; }
.vs-tag { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; font-size: 14px; font-weight: 600; color: var(--sea); }
.vs-tag .ic { width: 30px; height: 30px; padding: 6px; border-radius: 9px; background: var(--sea-soft); }
.vs-pain, .vs-win { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 12px 14px; border-radius: 0 12px 12px 0; font-size: 15px; line-height: 1.55; }
.vs-pain { background: var(--paper); border-left: 3px solid var(--line); color: var(--ink-2); }
.vs-win { background: var(--sea-soft); border-left: 3px solid var(--sea); color: var(--ink); margin-top: auto; }
.vs-pain .ic, .vs-win .ic { width: 20px; height: 20px; margin-top: 2px; stroke-width: 2.4; }
.vs-pain .ic { color: var(--bad); }
.vs-win .ic { color: var(--sea); }
.vs-pain b, .vs-win b { font-weight: 600; color: var(--ink); }

/* ---------- каналы ---------- */
.channels-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ch-card { padding: 24px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); transition: border-color 0.2s; }
.ch-card:hover { border-color: color-mix(in srgb, var(--sea) 45%, var(--line)); }
.ch-icon { width: 44px; height: 44px; margin-bottom: 16px; border-radius: 12px; display: grid; place-items: center; background: var(--sea-soft); color: var(--sea); }
.ch-icon .ic { width: 22px; height: 22px; }
.ch-card p { color: var(--ink-2); font-size: 15px; line-height: 1.6; }

/* ---------- запуск за 10 минут (настоящая последовательность — нумерация уместна) ---------- */
.how { padding-top: 32px !important; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 24px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 16px; border-radius: 50%; background: var(--sea); color: var(--on-sea); font: 700 15px/1 var(--fun); }
.steps li:not(:last-child)::after { content: ''; position: absolute; top: 41px; left: 70px; right: 24px; height: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 12px); }
.steps p { color: var(--ink-2); font-size: 15px; }

/* ---------- путь клиента от А до Я ---------- */
.path { max-width: none !important; background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.path > * { max-width: calc(var(--wrap) - 2 * var(--gutter)); margin-left: auto; margin-right: auto; }
.path-body { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.path-phone { position: sticky; top: calc(var(--nav-h) + 28px); padding: 22px; border-radius: 28px; background: var(--sea-deep); background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1.2px, transparent 1.2px); background-size: 18px 18px; }
.path-phone .phone { height: 440px; }
.path-phone .phone-chat { justify-content: flex-end; }
.path-steps { list-style: none; margin: 0; padding: 0; position: relative; }
.path-steps::before, .path-steps::after { content: ''; position: absolute; left: 25px; top: 24px; width: 2px; border-radius: 2px; }
.path-steps::before { bottom: 40px; background: var(--line); }
.path-steps::after { height: var(--progress, 0px); max-height: calc(100% - 64px); background: var(--sea); transition: height 0.35s ease-out; }
.path-steps li { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 22px; padding: 0 0 64px; min-height: 210px; }
.path-steps li.last { padding-bottom: 0; min-height: 0; }
.letter { position: relative; z-index: 1; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font: 700 22px/1 var(--fun); background: var(--surface); color: var(--ink-3); border: 2px solid var(--line); transition: background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s; }
li.done .letter { background: var(--sea-soft); border-color: transparent; color: var(--sea); }
li.active .letter { background: var(--sea); border-color: var(--sea); color: var(--on-sea); box-shadow: 0 0 0 6px var(--sea-soft); }
.step-copy { padding-top: 10px; max-width: 50ch; }
.step-copy h3 { font: 700 21px/1.25 var(--font); }
.step-copy p { color: var(--ink-2); }
.path-steps li .step-copy { transition: opacity 0.3s; }
.path-steps li:not(.active) .step-copy { opacity: 0.5; }
.j-chat { display: none; }
.path-cta { text-align: center; margin-top: 40px !important; }

/* ---------- кейсы ---------- */
.cases-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.case-card { display: flex; flex-direction: column; gap: 12px; padding: 26px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); }
.case-niche { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.case-niche .ic { width: 18px; height: 18px; color: var(--sea); }
.case-card > p:not(.case-niche) { color: var(--ink-2); font-size: 15px; }
.case-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: auto 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.case-metrics dt { font: 700 clamp(20px, 1.9vw, 24px)/1.05 var(--display); white-space: nowrap; color: var(--sea); margin-bottom: 4px; }
.case-metrics dd { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.35; }

/* ---------- калькулятор (как тренажёр в инструкции) ---------- */
.roi-box { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 20px; padding: 20px; border-radius: 24px; border: 1px solid var(--line); background: var(--surface); }
.roi-inputs { padding: 14px 10px 10px 14px; }
.roi-inputs h2 { font-size: clamp(24px, 2.6vw, 32px); }
.roi-inputs > .muted { margin: 12px 0 0; max-width: 52ch; }
.roi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }
.roi-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.roi-grid label.wide { grid-column: 1 / -1; }
.range-head { display: flex; justify-content: space-between; gap: 12px; }
.range-head output { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.roi-grid input[type='number'] { height: 48px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font: 500 17px var(--font); font-variant-numeric: tabular-nums; transition: border-color 0.2s, box-shadow 0.2s; -moz-appearance: textfield; }
.roi-grid input[type='number']::-webkit-inner-spin-button { opacity: 0.4; }
.roi-grid input[type='number']:focus { outline: none; border-color: var(--sea); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sea) 18%, transparent); }
.roi-grid input[type='range'] { width: 100%; accent-color: var(--sea); cursor: pointer; height: 28px; }
.roi-result { display: flex; flex-direction: column; gap: 18px; padding: 28px; border-radius: 18px; background: var(--sea-deep); background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1.2px, transparent 1.2px); background-size: 18px 18px; color: #fff; }
.roi-stat span { display: block; font-size: 14px; color: rgba(255, 255, 255, 0.72); margin-bottom: 4px; line-height: 1.4; }
.roi-stat strong { font: 700 clamp(22px, 2vw, 26px)/1.15 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.roi-stat.total { padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.roi-stat.total strong { font-size: clamp(26px, 2.5vw, 34px); color: #f6c45a; white-space: nowrap; }
.roi-result .l-btn { width: 100%; margin-top: auto; }
.roi-fine { font-size: 12.5px; color: rgba(255, 255, 255, 0.6); text-align: center; }

/* ---------- для владельца ---------- */
.owner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.owner .lead { margin-top: 16px; }
.owner-list { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 0; }
.owner-list li { padding: 12px 0 12px 22px; position: relative; color: var(--ink-2); border-top: 1px solid var(--line); line-height: 1.55; }
.owner-list li:last-child { border-bottom: 1px solid var(--line); }
.owner-list li::before { content: ''; position: absolute; left: 2px; top: 1.3em; width: 8px; height: 8px; border-radius: 2px; background: var(--sea); }
.owner-list b { color: var(--ink); font-weight: 600; }
.owner-note { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); font-size: 15px; }
.owner-note .ic { color: var(--sea); margin-top: 3px; width: 18px; height: 18px; }
.owner-visual { display: grid; place-items: center; min-height: 460px; padding: 24px; border-radius: 28px; background: var(--sea-deep); background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1.2px, transparent 1.2px); background-size: 18px 18px; }
.owner-visual .phone { width: min(320px, 100%); height: 400px; }
.owner-visual .phone-chat { justify-content: flex-end; }

/* ---------- тарифы ---------- */
.pricing-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.pricing-note { color: var(--ink-2); font-size: 17px; margin-top: 12px; max-width: 56ch; }
.billing-period-switch[hidden], .bp-btn[hidden] { display: none; }
.plan-total { margin: -4px 0 8px; font-size: 13px; }
.billing-period-switch { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.bp-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); font: 600 14.5px/1 var(--font); cursor: pointer; transition: background 0.2s, color 0.2s; }
.bp-btn span { padding: 3px 6px; border-radius: 6px; background: var(--saffron-soft); color: color-mix(in srgb, var(--saffron) 60%, var(--ink)); font-size: 12px; font-weight: 700; }
.bp-btn.active { background: var(--sea); color: var(--on-sea); }
.bp-btn.active span { background: rgba(255, 255, 255, 0.2); color: inherit; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 28px 26px 26px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); }
.plan h3 { font: 700 19px/1.2 var(--display); margin: 0; }
.price { font: 700 34px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.price small { display: inline-block; font: 500 14.5px/1.3 var(--font); color: var(--ink-2); }
.plan > .muted { font-size: 15px; }
.plan ul { list-style: none; margin: 4px 0 8px; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 9px; font-size: 15px; color: var(--ink-2); }
.plan li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; line-height: 1.45; }
.plan li .ic { width: 18px; height: 18px; color: var(--sea); stroke-width: 2.4; margin-top: 2px; }
.plan .l-btn { margin-top: auto; height: 46px; }
.plan.featured { border: 2px solid var(--sea); padding: 27px 25px 25px; box-shadow: var(--shadow); }
.plan .badge { position: absolute; top: -12px; left: 24px; padding: 4px 10px; border-radius: 999px; background: var(--sea); color: var(--on-sea); font-size: 12.5px; font-weight: 700; }
.pay-note { display: flex; align-items: center; gap: 8px; margin-top: 20px; color: var(--ink-2); font-size: 14.5px; }
.pay-note .ic { width: 16px; height: 16px; color: var(--ink-3); }

/* ---------- под ключ и партнёрам ---------- */
.turnkey-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 16px; }
.turnkey-card { display: flex; flex-direction: column; gap: 14px; padding: 32px; border-radius: 24px; border: 1px solid var(--line); background: var(--surface); }
.turnkey-card h2 { font-size: clamp(24px, 2.4vw, 30px); }
.turnkey-card > p:not(.badge-pill) { color: var(--ink-2); }
.turnkey-card.primary { border: 0; background: var(--sea-deep); background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1.2px, transparent 1.2px); background-size: 18px 18px; color: #fff; }
.turnkey-card.primary > p:not(.badge-pill) { color: rgba(255, 255, 255, 0.78); }
.badge-pill { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 5px 12px 5px 9px; border-radius: 999px; background: var(--sea-soft); color: var(--sea); font-size: 13.5px; font-weight: 700; }
.badge-pill .ic { width: 16px; height: 16px; }
.primary .badge-pill { background: rgba(255, 255, 255, 0.12); color: #fff; }
.check-list { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 10px; font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
.check-list li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; }
.check-list .ic { width: 20px; height: 20px; color: var(--sea); stroke-width: 2.4; margin-top: 1px; }
.check-list b { color: var(--ink); font-weight: 600; }
.primary .check-list { color: rgba(255, 255, 255, 0.86); }
.primary .check-list .ic { color: #f6c45a; }
.check-list code { white-space: nowrap; font: 400 0.92em var(--mono); padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line); background: var(--paper); }
.turnkey-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }

/* ---------- контроль и аналитика ---------- */
.more-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 40px; margin: 0; }
.more-list > div { display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; align-content: start; }
.m-ic { grid-row: span 2; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--sea); }
.more-list dt { font-weight: 700; font-size: 17px; margin: 1px 0 4px; }
.more-list dd { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.55; }

/* ---------- ниши ---------- */
.niche-links { display: flex; flex-wrap: wrap; gap: 8px; }
.niche-links a { padding: 8px 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; transition: border-color 0.15s, color 0.15s; }
.niche-links a:hover { border-color: var(--sea); color: var(--sea); }
.niche-links a[hidden] { display: none; }
.niche-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 18px; }
.niche-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.niche-tab { height: 36px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font: 600 14.5px/1 var(--font); white-space: nowrap; cursor: pointer; transition: background 0.15s, color 0.15s; }
.niche-tab:hover { color: var(--sea); }
.niche-tab.active { background: var(--sea); color: var(--on-sea); }
.niche-search { display: flex; align-items: center; gap: 8px; flex: 1 1 240px; max-width: 360px; height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink-3); transition: border-color 0.15s; }
.niche-search:focus-within { border-color: var(--sea); }
.niche-search .ic { width: 18px; height: 18px; flex: none; }
.niche-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font: 500 15.5px/1 var(--font); }
.niche-links .niche-custom { display: inline-flex; align-items: center; gap: 6px; border: 1.5px dashed var(--saffron); background: var(--saffron-soft); color: var(--ink); font-weight: 600; }
.niche-links .niche-custom:hover { border-style: solid; border-color: var(--saffron); color: var(--ink); }
.niche-custom .ic { width: 16px; height: 16px; color: var(--saffron); stroke-width: 2.6; }
.niche-empty { margin-top: 14px; color: var(--ink-2); font-size: 15px; }

/* ---------- кнопка демо-бота ---------- */
.hero-demo { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-weight: 600; font-size: 15.5px; color: var(--sea); text-decoration: none; }
.hero-demo:hover { text-decoration: underline; }
.hero-demo .ic { width: 18px; height: 18px; }
.demo-fab { position: fixed; left: 20px; bottom: 20px; z-index: 59; display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 20px 0 16px; border-radius: 999px; background: #128c4a; color: #fff; font: 600 15px/1 var(--font); text-decoration: none; box-shadow: 0 16px 34px -12px rgba(18, 140, 74, 0.75); transition: transform 0.25s var(--ease), opacity 0.25s, filter 0.15s; }
.demo-fab:hover { filter: brightness(1.08); transform: translateY(-1px); }
.demo-fab .ic { width: 22px; height: 22px; }
.demo-fab .fab-short { display: none; }
/* индикатор «онлайн»: точка с расходящимся кольцом */
.fab-ping { position: relative; flex: none; width: 10px; height: 10px; border-radius: 50%; background: #3ddc84; }
.fab-ping::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #3ddc84; animation: fab-ping 1.6s cubic-bezier(0, 0, 0.2, 1) infinite; }
@keyframes fab-ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .fab-ping::after { animation: none; } }
.demo-fab.is-hidden { opacity: 0; pointer-events: none; transform: translateY(16px); }
body:has(.ai-widget-modal:not([hidden])) .demo-fab { display: none; }

/* ---------- окно виртуального демо-бота (demo-bot.js): как переписка в WhatsApp, в цветах сайта ---------- */
html.db-open { overflow: hidden; }
.db-overlay { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(8, 16, 22, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.db-overlay[hidden] { display: none; }
.db-box {
  --db-bg: #efeae2; --db-dots: rgba(15, 95, 102, 0.07); --db-in: #ffffff; --db-out: #d9fdd3; --db-out-ink: #111b21; --db-time: #667781;
  display: flex; flex-direction: column; width: min(420px, 100%); height: min(720px, calc(100dvh - 32px));
  border-radius: 24px; background: var(--surface); overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
  animation: pop-in 0.25s var(--ease);
}
@media (prefers-color-scheme: dark) {
  .db-box { --db-bg: #0b141a; --db-dots: rgba(255, 255, 255, 0.035); --db-in: #202c33; --db-out: #005c4b; --db-out-ink: #e9edef; --db-time: #8696a0; }
}

/* шапка: аватар, название ниши, статус; ниже — смена ниши */
.db-head { flex: none; padding: 12px 12px 10px 14px; background: var(--sea-deep); color: #fff; }
.db-top { display: flex; align-items: center; gap: 11px; }
.db-ava { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%; background: #fff; font-size: 22px; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25); }
.db-who { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.db-who b { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-sub { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: rgba(255, 255, 255, 0.78); }
.db-dot { width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.25); }
.db-close { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 16px; cursor: pointer; transition: background 0.15s; }
.db-close:hover { background: rgba(255, 255, 255, 0.22); }
.db-pick { position: relative; display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 0 12px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.18); cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.db-pick:hover, .db-pick:focus-within { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.4); }
.db-pick-ic { flex: none; opacity: 0.85; }
.db-pick-label { flex: none; font-size: 12.5px; font-weight: 600; color: rgba(255, 255, 255, 0.75); }
.db-pick select { flex: 1; min-width: 0; height: 100%; padding: 0 22px 0 0; border: 0; background: transparent; color: #fff; font: 700 14.5px/1 var(--font); cursor: pointer; appearance: none; -webkit-appearance: none; outline: 0; text-overflow: ellipsis; }
.db-pick select option { color: #111b21; background: #fff; }
.db-pick::after { content: ''; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); pointer-events: none; }

/* переписка на фоне с узором, как в WhatsApp */
.db-chat { flex: 1; min-height: 0; display: flex; flex-direction: column; background-color: var(--db-bg); background-image: radial-gradient(var(--db-dots) 1.2px, transparent 1.2px); background-size: 16px 16px; }
.db-msgs { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; padding: 14px 14px 8px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.db-msg { position: relative; max-width: 84%; padding: 7px 10px 6px; border-radius: 10px; font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13); animation: pop-in 0.2s var(--ease); }
.db-msg.in { align-self: flex-start; border-top-left-radius: 0; background: var(--db-in); color: var(--ink); }
.db-msg.out { align-self: flex-end; border-top-right-radius: 0; background: var(--db-out); color: var(--db-out-ink); }
.db-msg.in::before, .db-msg.out::before { content: ''; position: absolute; top: 0; width: 8px; height: 13px; background: inherit; }
.db-msg.in::before { left: -7px; clip-path: polygon(0 0, 100% 0, 100% 100%); }
.db-msg.out::before { right: -7px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.db-msg.in + .db-msg.in::before, .db-msg.out + .db-msg.out::before { display: none; }
.db-time { float: right; margin: 6px 0 -3px 10px; font-size: 11px; line-height: 1; color: var(--db-time); }
.db-msg.note { align-self: center; max-width: 92%; padding: 6px 12px; border-radius: 8px; background: color-mix(in srgb, var(--saffron-soft) 90%, transparent); color: var(--ink); font-size: 12.5px; text-align: center; box-shadow: none; }
.db-msg a { font-weight: 600; color: var(--sea); }
.db-msg.typing { display: inline-flex; align-items: center; gap: 4px; padding: 12px 14px; }
.db-msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--db-time); animation: db-blink 1.2s infinite; }
.db-msg.typing i:nth-child(2) { animation-delay: 0.2s; }
.db-msg.typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes db-blink { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }

/* подсказки — прямо на фоне чата, одной лентой */
.db-quick { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 12px 10px; }
.db-quick::-webkit-scrollbar { display: none; }
.db-quick[hidden], .db-quick:empty { display: none; }
.db-quick-label { flex: 0 0 100%; font-size: 12px; font-weight: 600; color: var(--db-time); }
.db-quick button { flex: 0 1 auto; max-width: 100%; padding: 7px 12px; border: 1px solid color-mix(in srgb, var(--sea) 30%, transparent); border-radius: 999px; background: var(--db-in); color: var(--sea); font: 600 13px/1.25 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; box-shadow: 0 1px 2px rgba(11, 20, 26, 0.1); transition: background 0.15s, border-color 0.15s, transform 0.15s; }
.db-quick button:hover { border-color: var(--sea); transform: translateY(-1px); }

/* поле ввода */
.db-form { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--db-bg); }
.db-form input { flex: 1; min-width: 0; height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--db-in); color: var(--ink); font: 400 15px/1 var(--font); outline: 0; box-shadow: 0 1px 1px rgba(11, 20, 26, 0.12); }
.db-form input:focus { box-shadow: 0 0 0 2px color-mix(in srgb, var(--sea) 45%, transparent); }
.db-form button { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--sea); color: var(--on-sea); cursor: pointer; transition: transform 0.15s, filter 0.15s; }
.db-form button:hover { filter: brightness(1.08); transform: scale(1.04); }
.db-form.busy button { opacity: 0.5; pointer-events: none; }

/* низ: главная кнопка и одна строка со ссылкой WhatsApp и пометкой */
.db-foot { flex: none; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.db-cta { display: flex; align-items: center; justify-content: center; gap: 6px; height: 46px; padding: 0 14px; border-radius: 13px; background: var(--sea); color: var(--on-sea); font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--sea) 85%, transparent); transition: filter 0.15s, transform 0.15s; }
.db-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }
.db-foot-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 20px; }
.db-wa { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: #128c4a; text-decoration: none; white-space: nowrap; }
.db-wa:hover { text-decoration: underline; }
.db-wa[hidden] { display: none; }
.db-note { margin: 0 0 0 auto; font-size: 11.5px; color: var(--ink-3); text-align: right; }
@media (prefers-color-scheme: dark) { .db-wa { color: #4cc27f; } }

@media (max-width: 720px) {
  .db-overlay { padding: 0; }
  .db-box { width: 100%; height: 100dvh; border-radius: 0; }
  .db-foot-row { flex-wrap: wrap; justify-content: center; }
  .db-note { margin: 0; text-align: center; }
}

/* ---------- сравнение: менеджер и ИИ-сотрудник ---------- */
.cmp { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); overflow: hidden; }
.cmp-row { display: grid; grid-template-columns: minmax(150px, 0.8fr) 1fr 1fr; }
.cmp-row + .cmp-row { border-top: 1px solid var(--line); }
.cmp-row > span { padding: 18px 22px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.cmp-row > span b { display: block; margin-bottom: 2px; font-size: 17px; color: var(--ink); }
.cmp-label { font-weight: 700; color: var(--ink) !important; }
.cmp-row .cmp-ai { background: var(--sea-soft); }
.cmp-row .cmp-ai b { color: var(--sea); }
.cmp-head > span { display: flex; align-items: center; gap: 8px; padding-top: 16px; padding-bottom: 16px; font-weight: 700; font-size: 16px; color: var(--ink); }
.cmp-head .ic { width: 20px; height: 20px; color: var(--sea); }
.cmp-head .cmp-human .ic { color: var(--ink-3); }
.cmp-payback { margin: 18px 0 0; padding: 14px 18px; border-left: 3px solid var(--saffron); border-radius: 0 12px 12px 0; background: var(--saffron-soft); font-weight: 600; }
.cmp-cta, .final-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.cmp-cta-center { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 28px; text-align: center; }
.cmp-cta-note { margin: 0; font-size: 14.5px; color: var(--ink-2); }
.final-cta { justify-content: center; margin-top: 0; }

/* ---------- локальные фишки (bento) и безопасность ---------- */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bento-card, .safety-grid article { display: flex; flex-direction: column; gap: 10px; padding: 26px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); }
.bento-card h3, .safety-grid h3 { margin: 4px 0 0; }
.bento-card p, .safety-grid p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.bento-wide { grid-column: span 2; }
.bento-ic { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--sea-soft); color: var(--sea); }
.bento-ic .ic { width: 22px; height: 22px; }
.bento-quote { display: flex; align-items: center; gap: 10px; align-self: flex-start; margin-top: auto !important; padding: 10px 14px; border-radius: 14px 14px 14px 4px; background: var(--chat); color: var(--ink) !important; font-size: 14.5px !important; }
.bento-quote span { padding: 3px 8px; border-radius: 999px; background: var(--sea); color: var(--on-sea); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.bento-link { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; font-weight: 600; text-decoration: none; }
.bento-link:hover { text-decoration: underline; }
.bento-link .ic { width: 16px; height: 16px; }
.safety-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.safety-grid article { padding: 22px; }
.safety-grid h3 { font-size: 17px; }

/* ---------- вопросы (как в инструкции) ---------- */
.faq-list { max-width: 860px; display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color 0.2s; }
.faq details[open] { border-color: color-mix(in srgb, var(--sea) 40%, var(--line)); }
.faq summary { cursor: pointer; position: relative; padding: 18px 56px 18px 20px; font-weight: 600; font-size: 17px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px; border: solid var(--ink-3); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); transition: transform 0.2s var(--ease); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details > p { padding: 0 20px 20px; color: var(--ink-2); max-width: 70ch; }

/* ---------- финальный призыв ---------- */
.final { text-align: center; max-width: calc(var(--wrap) - 2 * var(--gutter)) !important; margin: 24px auto 80px !important; padding: clamp(48px, 7vw, 80px) var(--gutter) !important; border-radius: 28px; background: var(--sea-deep); background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1.2px, transparent 1.2px); background-size: 18px 18px; color: #fff; }
.final h2 { max-width: 26ch; margin: 0 auto 16px; color: #fff; }
.final p { max-width: 52ch; margin: 0 auto 30px; color: rgba(255, 255, 255, 0.8); font-size: 18px; }

/* ---------- ИИ-консультант ---------- */
.ai-widget-fab { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; background: var(--sea); color: var(--on-sea); font: 600 15px/1 var(--font); cursor: pointer; box-shadow: 0 16px 34px -12px color-mix(in srgb, var(--sea) 80%, #000); transition: transform 0.2s var(--ease), filter 0.15s; }
.ai-widget-fab:hover { filter: brightness(1.08); transform: translateY(-1px); }
.ai-widget-fab .ic { width: 22px; height: 22px; }
.ai-widget-fab .fab-dot { position: absolute; top: 9px; left: 32px; width: 9px; height: 9px; border-radius: 50%; background: #3ddc84; border: 2px solid var(--sea); }
.ai-widget-fab.open .fab-dot { display: none; }
.ai-widget-modal { position: fixed; right: 20px; bottom: 84px; z-index: 65; display: flex; flex-direction: column; width: min(390px, calc(100vw - 32px)); height: min(560px, calc(100dvh - 120px)); border-radius: 22px; border: 1px solid var(--line); background: var(--chat); box-shadow: 0 30px 70px -20px rgba(10, 30, 35, 0.5); overflow: hidden; animation: pop-in 0.25s var(--ease); transform-origin: 100% 100%; }
@keyframes pop-in { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: none; } }
.ai-w-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 14px; background: var(--sea); color: var(--on-sea); }
.ai-w-head > div { flex: 1; min-width: 0; }
.ai-w-head b { display: block; font-size: 15px; }
.ai-w-head small { font-size: 12px; opacity: 0.8; }
.ai-w-head button { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: inherit; cursor: pointer; }
.ai-w-head button:hover { background: rgba(255, 255, 255, 0.14); }
.ai-w-msgs { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 14px 12px; overscroll-behavior: contain; }
.ai-w-msgs .msg { max-width: 88%; font-size: 14.5px; white-space: pre-line; }
.ai-w-msgs .msg.out { background: var(--surface); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06); }
.ai-w-msgs .msg.bot { background: var(--surface); box-shadow: inset 2px 0 0 var(--sea), 0 1px 0 rgba(0, 0, 0, 0.06); }
.ai-w-msgs .msg.out { background: var(--sea-soft); box-shadow: none; }
.ai-w-quick { flex: none; display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto; scrollbar-width: none; }
.ai-w-quick::-webkit-scrollbar { display: none; }
.ai-w-quick button { flex: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 500 13px/1.2 var(--font); cursor: pointer; transition: border-color 0.15s, color 0.15s; }
.ai-w-quick button:hover { border-color: var(--sea); color: var(--sea); }
.ai-w-form { flex: none; display: flex; gap: 8px; padding: 10px 12px 12px; background: var(--surface); border-top: 1px solid var(--line); }
.ai-w-form input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font: 16px var(--font); }
.ai-w-form input:focus { outline: none; border-color: var(--sea); }
.ai-w-form button { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; background: var(--sea); color: var(--on-sea); cursor: pointer; }
.ai-w-form.busy button { opacity: 0.5; pointer-events: none; }

/* ---------- закреплённая кнопка на телефоне ---------- */
.sticky-cta { display: none; }

/* ---------- подвал ---------- */
.l-footer { max-width: var(--wrap); margin: 0 auto; padding: 36px var(--gutter) 56px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; font-size: 14.5px; color: var(--ink-2); }
.l-footer p { margin: 10px 0 0; }
.foot-about { max-width: 40ch; }
.contacts { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.contacts a { color: var(--ink); font-weight: 500; }
.details { white-space: pre-line; }
.legal-links { display: flex; gap: 6px 18px; flex-wrap: wrap; }
.legal-links a { color: var(--ink-2); }
.legal-links a:hover { color: var(--sea); }
.pay-cards { font-size: 13.5px; color: var(--ink-3); }

/* ---------- страницы ниш (разметка в server.js) ---------- */
body:not(.home) .hero > .phone { width: min(360px, 100%); height: 440px; justify-self: center; box-shadow: 0 30px 60px -24px rgba(10, 40, 45, 0.5); }
body:not(.home) .hero .hero-note { padding: 5px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; margin-bottom: 18px; }
body:not(.home) .hero .hero-note::before { display: none; }
body:not(.home) .hero h1 { margin-bottom: 0; }
body:not(.home) .hero-cta { margin-top: 26px; }
body:not(.home) .phone-chat { justify-content: flex-end; }
body:not(.home) main > section > h2 { margin-bottom: 28px; }
.features { background: none; }
.feature-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature-list article { padding: 24px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); }
.feature-list article::before { content: ''; display: block; width: 28px; height: 3px; border-radius: 2px; background: var(--sea); margin-bottom: 16px; }
.feature-list p { color: var(--ink-2); font-size: 15px; }
body:not(.home) .faq .legal-links { gap: 8px; font-size: 15px; }

/* ---------- оферта и политика ---------- */
.legal-body { max-width: 780px; margin: 0 auto; padding: 32px var(--gutter) 72px; }
.legal-body h1 { font: 700 clamp(26px, 3vw, 34px)/1.2 var(--display); margin: 12px 0 28px; }
.legal-body p { margin: 0 0 14px; }
.legal-body hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0 16px; }

/* ================= движение ================= */
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(0.94); } to { opacity: 1; transform: none; } }
.msg.enter { animation: pop 0.38s var(--ease) both; }
.typing { align-self: flex-end; display: inline-flex; gap: 4px; padding: 11px 13px; border-radius: 12px; border-top-right-radius: 3px; background: var(--saffron-soft); box-shadow: inset 2px 0 0 var(--saffron); }
.typing.in-side { align-self: flex-start; background: var(--surface); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06); border-top-right-radius: 12px; border-top-left-radius: 3px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: dot 1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 60%, 100% { transform: none; opacity: 0.45; } 30% { transform: translateY(-3px); opacity: 1; } }
.msg .wave i { animation: wave 0.9s infinite ease-in-out alternate; }
.msg .wave i:nth-child(2n) { animation-delay: 0.2s; }
.msg .wave i:nth-child(3n) { animation-delay: 0.4s; }
@keyframes wave { from { transform: scaleY(0.4); } }
.lead-toast.show { animation: toast 4.2s var(--ease) both; }
@keyframes toast { 0% { opacity: 0; transform: translateY(-12px); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-8px); } }
/* одна оркестрованная сцена при загрузке: текст, затем панель */
html.js .home .hero-copy > * { animation: rise 0.7s var(--ease) both; }
html.js .home .hero-copy > :nth-child(2) { animation-delay: 0.06s; }
html.js .home .hero-copy > :nth-child(3) { animation-delay: 0.12s; }
html.js .home .hero-copy > :nth-child(n + 4) { animation-delay: 0.18s; }
html.js .home .stage { animation: rise 0.9s 0.15s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
html.js .play-on-view:not(.playing) .msg { opacity: 0; }
html.js .play-on-view.playing .msg { opacity: 1; animation: pop 0.45s var(--ease) both; animation-delay: calc(var(--d) * 0.9s + 0.2s); }
.msg .was { text-decoration: none; background: linear-gradient(currentColor, currentColor) no-repeat 0 55% / 0 1.5px; transition: background-size 0.5s 1.4s; }
.playing .msg .was, html:not(.js) .msg .was { background-size: 100% 1.5px; }

/* ================= планшет ================= */
/* пункты, которые не поместились в шапку, скрипт прячет целиком (landing.js → fitNav); без скрипта — просто обрезка */
.l-links { overflow: hidden; }
.l-links a.nav-hidden { display: none; }
@media (max-width: 1240px) { .l-links a { padding: 6px 6px; font-size: 14.5px; } }
@media (max-width: 1060px) {
  .safety-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento-wide { grid-column: span 2; }
  .l-links, .l-sep { display: none; }
  .m-nav { position: sticky; top: var(--nav-h); z-index: 35; display: flex; gap: 6px; overflow-x: auto; padding: 8px var(--gutter) 10px; background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .m-nav::-webkit-scrollbar { display: none; }
  .m-nav a { flex: none; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; }
  .m-nav a.on { background: var(--sea); border-color: var(--sea); color: var(--on-sea); }
  html { scroll-padding-top: calc(var(--nav-h) + 64px); }
  .l-nav.scrolled { border-bottom-color: transparent; }
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 36px !important; }
  .hero h1 { max-width: 18ch; }
  .stage { min-height: 540px; }
  .channels-grid, .cases-grid, .feature-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .more-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-item:nth-child(3) { border-left: 0; }
  .stat-item:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .path-body { grid-template-columns: minmax(0, 1fr); }
  .path-phone { display: none; }
  .path-steps li { min-height: 0; padding-bottom: 44px; }
  .path-steps li .step-copy, .path-steps li:not(.active) .step-copy { opacity: 1; }
  .j-chat { display: flex; flex-direction: column; gap: 7px; grid-column: 2; margin-top: 16px; padding: 14px 12px; border-radius: 16px; background: var(--chat); }
  .roi-box, .owner, .turnkey-grid { grid-template-columns: minmax(0, 1fr); }
  .owner-visual { min-height: 0; }
}

/* ================= телефон ================= */
@media (max-width: 720px) {
  body { font-size: 16.5px; }
  :root { --nav-h: 58px; }
  main > section { padding-top: 52px; padding-bottom: 52px; }
  .sec-head { margin-bottom: 26px; }
  .sec-lead, .lead { font-size: 17px; }
  .l-nav { gap: 8px; }
  .l-brand { font-size: 17px; }
  .hide-sm { display: none; }
  .l-nav-cta { gap: 6px; }
  .l-nav .l-btn { height: 36px; padding: 0 12px; font-size: 14px; }
  .hero { padding-top: 24px !important; gap: 32px; }
  .hero h1 { font-size: clamp(30px, 8.6vw, 40px); }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .l-btn { width: 100%; }
  .stage { margin: 0 calc(-1 * var(--gutter)); border-radius: 0; padding: 18px 14px 22px; min-height: 0; }
  .demo-channels { width: 100%; }
  .ch-tab { flex: 1; justify-content: center; padding: 0 6px; font-size: 12.5px; }
  .ch-tab .ic { display: none; }
  .stage .phone { height: 360px; }
  .stage .phone { margin-left: 0; }
  .stage .phone-chat { padding-bottom: 12px; }
  .sheet { align-self: center; width: min(330px, 100%); margin-top: -4px; }
  .lead-toast { top: 66px; right: 10px; left: 10px; max-width: none; }
  .uc-pills li { font-size: 14px; }
  .stat-item { padding: 16px; }
  .stat-item dt { font-size: 22px; white-space: nowrap; }
  .bp-btn { white-space: nowrap; gap: 4px; }
  .bp-btn span { padding: 2px 4px; font-size: 11px; }
  .vs-grid, .channels-grid, .cases-grid, .steps, .feature-list, .more-list { grid-template-columns: minmax(0, 1fr); }
  .vs-card, .ch-card, .case-card, .steps li, .feature-list article { padding: 20px; }
  .steps li:not(:last-child)::after { display: none; }
  .more-list { gap: 24px; }
  .path-steps::before, .path-steps::after { left: 19px; }
  .path-steps li { grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; }
  .letter { width: 40px; height: 40px; font-size: 17px; }
  .step-copy { padding-top: 6px; }
  .step-copy h3 { font-size: 18.5px; }
  .j-chat { grid-column: 1 / -1; margin-left: 54px; }
  .roi-box { padding: 10px; border-radius: 20px; }
  .roi-inputs { padding: 12px 8px 4px; }
  .roi-grid { grid-template-columns: minmax(0, 1fr); }
  .roi-result { padding: 22px; }
  .owner-visual { margin: 0 calc(-1 * var(--gutter)); border-radius: 0; }
  .pricing-head { flex-direction: column; align-items: stretch; }
  .billing-period-switch { width: 100%; }
  .bp-btn { flex: 1; justify-content: center; padding: 0 8px; font-size: 13.5px; }
  .turnkey-card { padding: 24px 20px; }
  .turnkey-actions .l-btn { flex: 1 1 100%; }
  .final { border-radius: 0; margin: 0 !important; max-width: none !important; }
  .faq summary { font-size: 16px; padding: 16px 48px 16px 16px; }
  .faq details > p { padding: 0 16px 16px; }
  .l-footer { padding-bottom: 96px; }
  body:not(.home) .hero > .phone { height: 380px; }
  /* закреплённая кнопка + круглый консультант */
  .sticky-cta { display: flex; align-items: center; gap: 12px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 10px 84px calc(10px + env(safe-area-inset-bottom)) 16px; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); transform: translateY(110%); transition: transform 0.35s var(--ease); }
  .sticky-cta.show { transform: none; }
  .sticky-cta .l-btn { flex: 1; height: 46px; }
  .sticky-price { color: var(--ink-2); font-size: 12.5px; line-height: 1.25; max-width: 84px; text-align: center; }
  .ai-widget-fab { right: 14px; bottom: calc(10px + env(safe-area-inset-bottom)); width: 56px; height: 56px; padding: 0; justify-content: center; }
  .ai-widget-fab .fab-label { display: none; }
  .ai-widget-fab .fab-dot { top: 12px; left: auto; right: 12px; }
  .ai-widget-modal { right: 0; left: 0; bottom: 0; width: 100%; height: min(86dvh, 640px); border-radius: 22px 22px 0 0; border-width: 1px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  body:has(.ai-widget-modal:not([hidden])) .ai-widget-fab { display: none; }
  /* ниши: табы листаются по горизонтали, поиск на всю ширину */
  .niche-tools { flex-direction: column; align-items: stretch; }
  .niche-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .niche-tabs::-webkit-scrollbar { display: none; }
  .niche-search { max-width: none; flex-basis: auto; }
  .niche-links a { font-size: 14.5px; padding: 7px 13px; }
  /* сравнение: каждая строка — карточка, две колонки рядом */
  .cmp-head { display: none !important; }
  .cmp-row { grid-template-columns: 1fr 1fr; }
  .cmp-row > span { padding: 12px 14px; font-size: 14px; }
  .cmp-row > span b { font-size: 15.5px; }
  .cmp-label { grid-column: 1 / -1; padding-bottom: 0 !important; font-size: 15px !important; }
  .cmp-row .cmp-human::before, .cmp-row .cmp-ai::before { content: attr(data-label); display: block; margin-bottom: 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-3); }
  .cmp-row .cmp-ai::before { color: var(--sea); }
  .bento, .safety-grid { grid-template-columns: minmax(0, 1fr); }
  .bento-wide { grid-column: auto; }
  .cmp-cta .l-btn, .final-cta .l-btn, .cmp-cta-center .l-btn { width: 100%; white-space: normal; text-align: center; }
}
@media (max-width: 380px) {
  .l-nav .l-btn { padding: 0 10px; font-size: 13px; }
  .lang-switch button, .lang-switch a { padding: 4px 7px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* шапка телефона на страницах ниш: имя и подпись без обёртки */
.phone-head:not(:has(.ph-who)) { flex-direction: column; align-items: flex-start; gap: 0; }
body:not(.home) .hero-cta .hero-note { padding: 0; border: 0; background: none; margin: 0; font-weight: 500; }

/* плавающие кнопки на телефонах (< 768px): слева компактная «Тест демо-бота», справа — круглая иконка консультанта */
@media (max-width: 767px) {
  .demo-fab { left: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); height: 48px; gap: 8px; padding: 0 14px 0 12px; font-size: 14px; }
  .demo-fab .fab-long { display: none; }
  .demo-fab .fab-short { display: inline; }
  .demo-fab .ic { width: 20px; height: 20px; }
  /* нижняя панель «Нанять ИИ-сотрудника» на телефоне: кнопка демо поднимается над ней, консультант остаётся в её правом углу */
  body:has(.sticky-cta.show) .demo-fab { bottom: calc(78px + env(safe-area-inset-bottom)); }
  .demo-fab { transition: transform 0.25s var(--ease), opacity 0.25s, filter 0.15s, bottom 0.3s var(--ease); }
  .ai-widget-fab { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); width: 48px; height: 48px; padding: 0; justify-content: center; border-radius: 50%; }
  .ai-widget-fab .fab-label { display: none; }
  .ai-widget-fab .fab-dot { top: 8px; left: auto; right: 8px; }
}
