/* CRM ВПорядке — лендинг. Цвета, шрифты и элементы взяты из самой CRM (src/app/globals.css, src/components/ui.tsx),
   чтобы страница выглядела как вход в приложение. Тёмная тема — те же значения, что в CRM. */

@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/onest-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/montserrat-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light;
  --bg: #f4f4f1;
  --surface: #ffffff;
  --surface-2: #f9f9f7;
  --sidebar: #ecece8;
  --border: #e1e1dc;
  --border-strong: #cfcfc9;
  --text: #1c1d1f;
  --muted: #6b6d70;
  --muted-sb: #5d5f62;
  --accent: #2451b7;
  --accent-soft: #e6ecf9;
  --accent-text: #ffffff;
  --danger: #c2372b;
  --danger-soft: #fbe9e7;
  --warn: #9e660f;
  --warn-soft: #f8efdc;
  --success: #2a7e47;
  --success-soft: #e3f1e7;
  --c-grey: #8b9096; --c-blue: #3b6fd4; --c-orange: #e8833a; --c-purple: #8e5bd0;
  --c-green: #3f9d5b; --c-red: #d64545; --c-yellow: #d9a21b;
  --shell: rgba(36, 81, 183, 0.07);
  --shadow-pop: 0 12px 32px -12px rgba(28, 29, 31, 0.22), 0 2px 6px rgba(28, 29, 31, 0.06);
  --font-sans: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Montserrat", "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sb-w: 232px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(16px, 4vw, 56px);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #161718; --surface: #1e1f21; --surface-2: #232427; --sidebar: #1a1b1d;
  --border: #2e3033; --border-strong: #3d4044; --text: #e8e8e6; --muted: #9a9c9f; --muted-sb: #a3a5a8;
  --accent: #6d93e8; --accent-soft: #23304a; --accent-text: #0f1420;
  --danger: #ec7a6f; --danger-soft: #3a2220; --warn: #e0a84a; --warn-soft: #3a2f1c;
  --success: #6cc68b; --success-soft: #1d3326;
  --shell: rgba(109, 147, 232, 0.08);
  --shadow-pop: 0 16px 40px -12px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.3);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    color-scheme: dark;
    --bg: #161718; --surface: #1e1f21; --surface-2: #232427; --sidebar: #1a1b1d;
    --border: #2e3033; --border-strong: #3d4044; --text: #e8e8e6; --muted: #9a9c9f; --muted-sb: #a3a5a8;
    --accent: #6d93e8; --accent-soft: #23304a; --accent-text: #0f1420;
    --danger: #ec7a6f; --danger-soft: #3a2220; --warn: #e0a84a; --warn-soft: #3a2f1c;
    --success: #6cc68b; --success-soft: #1d3326;
    --shell: rgba(109, 147, 232, 0.08);
    --shadow-pop: 0 16px 40px -12px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.3);
  }
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 var(--font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.025em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
kbd { font: 500 11px/1 var(--font-sans); padding: 3px 5px; border-radius: 4px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--border); color: var(--muted); }
.ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic-12 { width: 12px; height: 12px; } .ic-13 { width: 13px; height: 13px; } .ic-14 { width: 14px; height: 14px; }
.ic-15 { width: 15px; height: 15px; } .ic-18 { width: 18px; height: 18px; } .ic-20 { width: 20px; height: 20px; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 10px 14px; border-radius: 6px; background: var(--accent); color: var(--accent-text); text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Пометки «проверить перед запуском» — подсвечиваются только на компьютере и на тестовой (см. landing.js) */
.ph-on .ph { background: #fff1a8; color: #3a3000; box-shadow: 0 0 0 2px #fff1a8; border-radius: 2px; }
.ph-on .ph-block { outline: 2px dashed #e0b400; outline-offset: 4px; }

/* ---------- Кнопки, бейджи (как в CRM, крупнее для лендинга) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border: 0; border-radius: 6px; font-size: 15px; font-weight: 600; white-space: nowrap; text-decoration: none;
  transition: background-color .15s var(--ease), box-shadow .15s var(--ease), transform .1s var(--ease), opacity .15s;
}
.btn:active { transform: translateY(1px); }
.btn-lg { height: 48px; padding: 0 22px; font-size: 16px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; font-weight: 500; }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { opacity: .92; }
.btn-secondary { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border); }
.btn-secondary:hover { background: var(--surface-2); box-shadow: 0 0 0 1px var(--border-strong); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }
.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 6px;
  background: transparent; color: var(--muted-sb); position: relative; text-decoration: none;
}
.icon-btn:hover { background: var(--surface); color: var(--text); }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 6px; border-radius: 4px; font-size: 12px; font-weight: 500; white-space: nowrap; line-height: 1; }
.b-green { background: var(--success-soft); color: var(--success); }
.b-yellow { background: var(--warn-soft); color: var(--warn); }
.b-red { background: var(--danger-soft); color: var(--danger); }
.b-grey { background: var(--surface-2); color: var(--muted); box-shadow: 0 0 0 1px var(--border); }
.b-blue { background: var(--accent-soft); color: var(--accent); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.avatar { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; flex: none; background: var(--accent-soft); color: var(--accent); font: 600 10px/1 var(--font-sans); }

/* ---------- Каркас: боковое меню как в CRM ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; height: 100dvh; width: var(--sb-w); flex: none;
  display: flex; flex-direction: column; padding: 16px 12px; background: var(--sidebar); border-right: 1px solid var(--border);
  font-size: 14px; z-index: 40;
}
.sb-top { display: flex; align-items: flex-start; gap: 4px; margin-bottom: 14px; padding-left: 4px; }
.ws { display: block; min-width: 0; flex: 1; text-decoration: none; padding: 2px 6px; margin-left: -6px; border-radius: 6px; }
.ws:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); }
.ws-name { display: flex; align-items: center; gap: 4px; font: 700 15px/1.3 var(--font-display); letter-spacing: -0.02em; white-space: nowrap; }
.ws-name .ic { color: var(--muted-sb); }
.ws-sub { display: block; margin-top: 1px; font-size: 11px; color: var(--muted-sb); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bell-badge { position: absolute; top: 1px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--danger); color: #fff; font: 600 10px/16px var(--font-sans); text-align: center; }
.search-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 10px; margin-bottom: 16px;
  border: 0; border-radius: 6px; background: var(--surface); color: var(--muted-sb); box-shadow: 0 0 0 1px var(--border); font-size: 13px; text-align: left;
}
.search-btn:hover { box-shadow: 0 0 0 1px var(--border-strong); }
.search-btn kbd { margin-left: auto; }
.sb-nav { position: relative; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; scrollbar-width: none; }
.sb-label { margin: 14px 0 4px; padding: 0 10px; font-size: 12px; color: var(--muted-sb); }
.sb-label:first-child { margin-top: 0; }
.nav-link {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 6px;
  color: var(--muted-sb); text-decoration: none; white-space: nowrap; transition: color .15s;
}
.nav-link:hover { color: var(--text); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.nav-link.is-active { color: var(--text); font-weight: 500; }
.nav-pill {
  position: absolute; left: 0; right: 0; top: 0; height: 32px; border-radius: 6px; background: var(--surface);
  box-shadow: 0 0 0 1px var(--border); transition: transform .35s var(--ease), opacity .2s; opacity: 0; pointer-events: none;
}
.sb-bottom { margin-top: auto; padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 2px; border-radius: 8px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--border); }
.seg button { display: grid; place-items: center; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--muted-sb); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border); }
.sb-contact { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 6px; color: var(--muted-sb); text-decoration: none; font-size: 13px; }
.sb-contact:hover { color: var(--text); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 12px 10px 0; border-top: 1px solid var(--border); }
.sb-user .avatar { width: 28px; height: 28px; font-size: 11px; }
.sb-user b { display: block; font-weight: 500; font-size: 14px; line-height: 1.2; }
.sb-user a { font-size: 12px; color: var(--muted-sb); }
.sb-user a:hover { color: var(--accent); }
.sb-close { display: none; }

/* Свёрнутое меню (как кнопка «свернуть» в CRM) на средних экранах */
@media (max-width: 1199px) and (min-width: 900px) {
  :root { --sb-w: 60px; }
  .sidebar { padding: 16px 10px; align-items: stretch; }
  .ws-sub, .ws-name span, .ws-name .ic, .search-btn span, .search-btn kbd, .sb-label, .nav-link span, .sb-contact span, .sb-user div, .sb-cta, .seg { display: none; }
  .sb-top { flex-direction: column; align-items: center; padding: 0; gap: 8px; }
  .ws { margin: 0; padding: 0; flex: none; }
  .ws-name::before { content: "ВП"; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: var(--accent-text); font-size: 12px; letter-spacing: 0; }
  .search-btn { justify-content: center; padding: 0; }
  .nav-link, .sb-contact { justify-content: center; padding: 0; }
  .sb-label + .nav-link { margin-top: 8px; }
  .sb-user { justify-content: center; padding: 12px 0 0; }
}

/* Верхняя полоса и выдвижное меню на телефоне — как мобильная CRM */
.topbar { display: none; }
@media (max-width: 899px) {
  .topbar {
    display: flex; align-items: center; gap: 8px; position: fixed; inset: 0 0 auto 0; height: 56px; padding: 0 8px 0 4px; z-index: 50;
    background: color-mix(in srgb, var(--sidebar) 88%, transparent); border-bottom: 1px solid var(--border);
    -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
  }
  .topbar .icon-btn { width: 44px; height: 44px; color: var(--text); }
  .topbar-name { font: 700 16px/1 var(--font-display); letter-spacing: -0.02em; text-decoration: none; margin-right: auto; white-space: nowrap; }
  .topbar .btn { height: 36px; padding: 0 12px; font-size: 14px; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; height: auto; width: min(300px, 86vw); transform: translateX(-102%);
    transition: transform .3s var(--ease); z-index: 70; box-shadow: var(--shadow-pop);
  }
  .sidebar.is-open { transform: none; }
  .sb-close { display: inline-grid; }
  .nav-link, .sb-contact { height: 44px; font-size: 15px; }
  .nav-pill { height: 44px; }
  .scrim { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .3); opacity: 0; pointer-events: none; transition: opacity .25s; }
  .scrim.is-open { opacity: 1; pointer-events: auto; }
  .main { padding-top: 56px; }
}
@supports not (backdrop-filter: blur(1px)) { .topbar { background: var(--sidebar); } }
@media (prefers-reduced-transparency: reduce) { .topbar { background: var(--sidebar); backdrop-filter: none; } }

/* ---------- Основная область ---------- */
.main { flex: 1; min-width: 0; overflow-x: clip; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(64px, 8vw, 112px) 0 clamp(72px, 9vw, 124px); }
.section + .section { border-top: 1px solid var(--border); }
.crumb { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; font-size: 14px; color: var(--muted); }
.crumb .ic { color: var(--accent); }
h2.crumb { font: 400 14px/1.6 var(--font-sans); letter-spacing: 0; }
.h2 { font-size: clamp(1.75rem, 1.1rem + 2.2vw, 2.65rem); line-height: 1.12; max-width: 22ch; }
.lead { margin-top: 18px; max-width: 60ch; font-size: clamp(1.02rem, .95rem + .3vw, 1.15rem); line-height: 1.6; color: var(--muted); }
.lead strong, .copy strong { color: var(--text); font-weight: 600; }
.sample { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.panel { background: var(--surface); border-radius: 8px; box-shadow: 0 0 0 1px var(--border); }
.panel-h { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-bottom: 1px solid var(--border); font: 600 13px/1.2 var(--font-display); letter-spacing: -0.01em; }
.panel-h .ic { color: var(--muted); }
.panel-h .count { font: 400 13px/1 var(--font-sans); color: var(--muted); }
.panel-h .right { margin-left: auto; }
/* Двойная рамка вокруг «экранов» CRM */
.bezel { padding: 8px; border-radius: 14px; background: var(--shell); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent); }
.screen { border-radius: 9px; background: var(--bg); box-shadow: 0 0 0 1px var(--border); overflow: hidden; font-size: 13px; line-height: 1.45; }
.screen-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px 12px; }
.screen-h .st { font: 700 18px/1.25 var(--font-display); letter-spacing: -0.02em; }
.screen-h .meta { color: var(--muted); font-size: 13px; }
.screen-h .tools { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Первый экран ---------- */
.hero { padding: clamp(36px, 5vw, 64px) 0 clamp(56px, 6vw, 88px); position: relative; }
.hero::before {
  content: ""; position: absolute; inset: -10% -5% auto 30%; height: 640px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(36px, 4.5vw, 60px); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px clamp(24px, 4vw, 56px); margin-top: 30px; }
.hero-actions .cta-row { margin-top: 0; gap: 12px; }
/* Кнопки первого экрана — крупнее остальных */
.hero .cta-row .btn { height: 60px; padding: 0 32px; border-radius: 8px; font-size: 18px; }
.hero-actions .notice { margin-top: 0; flex: 1 1 340px; max-width: 470px; }
.hello { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; font-size: 14px; color: var(--muted); }
.hello b { font: 600 14px/1 var(--font-display); color: var(--text); letter-spacing: -0.01em; }
.hello::first-letter { text-transform: uppercase; }
.h1 { font-size: clamp(2.1rem, 1.05rem + 2.75vw, 3.4rem); line-height: 1.06; letter-spacing: -0.032em; max-width: min(100%, 18.5em); }
.hero .lead { max-width: 60ch; margin-top: 20px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.micro { margin-top: 14px; font-size: 14px; color: var(--muted); }
.micro b { color: var(--text); font-weight: 600; }
.notice {
  display: flex; gap: 12px; align-items: flex-start; margin-top: 28px; padding: 12px 14px; border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 5%, var(--surface)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
  font-size: 14px; line-height: 1.5;
}
.notice .ic { color: var(--accent); margin-top: 2px; }

.hero-visual { position: relative; margin-bottom: 38px; }
.today { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 10px; padding: 0 12px 12px; }
.today .col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 6px 14px; border-bottom: 1px solid var(--border); }
.row:last-child { border-bottom: 0; }
.row .title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30%; flex: none; }
.row .when { font-size: 12px; white-space: nowrap; }
.when.w-overdue { color: var(--danger); } .when.w-today { color: var(--warn); } .when.w-later { color: var(--muted); }
.task-row { cursor: pointer; transition: background-color .15s; }
.task-row:hover { background: var(--surface-2); }
.task-row input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; flex: none; }
.task-row.done .title { text-decoration: line-through; color: var(--muted); }
.inv-row { align-items: flex-start; padding-top: 8px; padding-bottom: 8px; }
.inv-row .who { flex: 1; min-width: 0; }
.inv-row .who b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-row .who span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-row .amt { text-align: right; }
.inv-row .amt b { display: block; font: 600 13px/1.4 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.inv-row .amt span { display: block; font-size: 12px; white-space: nowrap; }
.bal { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.bal:last-child { border-bottom: 0; }
.bal-top { display: flex; justify-content: space-between; gap: 8px; }
.bal-top b { font-weight: 500; }
.bal-bar { height: 6px; margin-top: 7px; border-radius: 99px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; }
.bal-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.bal-bar i.low { background: var(--danger); }
.bal small { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.bal small.low { color: var(--danger); font-weight: 500; }

/* Всплывающее сообщение бота — фирменный момент первого экрана */
.bot-pop {
  position: absolute; left: clamp(16px, 4vw, 48px); bottom: -38px; width: min(360px, 82%); padding: 12px 14px 12px; border-radius: 12px;
  background: var(--surface); box-shadow: 0 0 0 1px var(--border), var(--shadow-pop); font-size: 13px; line-height: 1.45; z-index: 3;
}
.bot-pop-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12px; color: var(--muted); }
.bot-ava { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-text); font: 700 9px/1 var(--font-display); letter-spacing: 0; flex: none; }
.bot-pop-h b { color: var(--text); font-weight: 600; }
.bot-pop-h time { margin-left: auto; }
.js .bot-pop { opacity: 0; transform: translateY(14px) scale(.97); }
.js .bot-pop.is-in { opacity: 1; transform: none; transition: opacity .5s var(--ease), transform .6s var(--ease); }

.proof { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; margin-top: clamp(40px, 5vw, 64px); padding-top: 22px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.proof-label { color: var(--muted); }
.proof-list { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; }
.proof-list li { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500; }
.proof-list .ic { color: var(--muted); }

/* ---------- Боль и калькулятор ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.routine { margin-top: 28px; display: grid; gap: 0; list-style: none; border-top: 1px solid var(--border); max-width: 52ch; }
.routine li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.routine .ic { margin-top: 4px; color: var(--muted); }
.calc { padding: 22px; }
.calc h3 { font-size: 17px; letter-spacing: -0.015em; }
.calc p.hint { margin-top: 6px; font-size: 14px; color: var(--muted); }
.field { margin-top: 20px; }
.field-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; font-size: 14px; color: var(--muted); }
.field-top output { font: 700 18px/1 var(--font-display); color: var(--text); font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; height: 28px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border: 0; border-radius: 6px; font-size: 14px;
  background: var(--surface-2); color: var(--muted); box-shadow: 0 0 0 1px var(--border);
}
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"], .chip[aria-checked="true"] { background: var(--accent-soft); color: var(--accent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); font-weight: 500; }
.calc-out { margin-top: 22px; padding: 16px; border-radius: 8px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--border); }
.calc-out .big { font: 700 clamp(30px, 4vw, 40px)/1.05 var(--font-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.calc-out .big small { font-size: .5em; letter-spacing: -0.01em; font-weight: 600; color: var(--muted); }
.calc-out p { margin-top: 8px; font-size: 14px; color: var(--muted); }

/* ---------- Отчёты ---------- */
.demo { margin-top: clamp(32px, 4vw, 48px); }
.demo-cap { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.pills { display: flex; gap: 4px; flex-wrap: wrap; }
.pill { height: 30px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 13px; }
.pill:hover { background: var(--surface-2); color: var(--text); }
.pill[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.periods { display: flex; gap: 2px; flex-wrap: wrap; padding: 0 16px 12px; }
.period { height: 30px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 13px; }
.period:hover { background: var(--surface); color: var(--text); }
.period[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); }
.period-cap { margin-left: auto; align-self: center; font-size: 12px; color: var(--muted); }
.report-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; padding: 0 12px 12px; }
.report-grid > .panel { min-width: 0; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); }
.kpi { padding: 12px 14px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); min-width: 0; }
.kpi:nth-child(4n) { border-right: 0; }
.kpi:nth-last-child(-n+4) { border-bottom: 0; }
.kpi-l { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-v { margin-top: 2px; font: 700 19px/1.25 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-d { margin-top: 1px; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.up-good, .down-good { color: var(--success); } .up-bad, .down-bad { color: var(--danger); } .neutral { color: var(--muted); }
.kpi-d.alarm { color: var(--danger); font-weight: 600; }
.chart-box { padding: 12px 14px 10px; }
.chart { width: 100%; height: 170px; }
.chart .bar { fill: var(--accent); opacity: .82; }
.chart .line { fill: none; stroke: var(--success); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart-x { display: flex; justify-content: space-between; margin-top: 4px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 14px; margin-left: auto; font: 400 12px/1 var(--font-sans); color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; background: var(--accent); opacity: .82; }
.legend i.ln { height: 2px; width: 12px; background: var(--success); opacity: 1; border-radius: 1px; }
.done-list { list-style: none; }
.done-list li { display: grid; grid-template-columns: 44px 1fr; gap: 8px; padding: 9px 14px; border-bottom: 1px solid var(--border); }
.done-list li:last-child { border-bottom: 0; }
.done-list time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; padding-top: 1px; }
.comment { padding: 12px 14px; color: var(--text); }
.comment p + p { margin-top: 6px; }
.comment .by { margin-top: 10px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); margin-top: clamp(32px, 4vw, 48px); list-style: none; }
.facts li { padding-top: 16px; border-top: 2px solid var(--text); }
.facts b { display: block; font: 700 17px/1.3 var(--font-display); letter-spacing: -0.015em; margin-bottom: 6px; }
.facts p { font-size: 15px; color: var(--muted); }

/* ---------- Задачи (доска) ---------- */
.tasks-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.85fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.copy p + p { margin-top: 14px; }
.ticks { margin-top: 24px; list-style: none; display: grid; gap: 12px; }
.ticks li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; font-size: 15px; }
.ticks .ic { margin-top: 4px; color: var(--accent); }
.board-wrap { overflow-x: auto; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.board { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 8px; padding: 0 12px 12px; min-width: 640px; }
.kcol { display: flex; flex-direction: column; border-radius: 8px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--border); border-top: 3px solid var(--col, var(--c-grey)); min-height: 280px; transition: box-shadow .15s; }
.kcol.is-over { box-shadow: 0 0 0 2px var(--accent); }
.kcol-h { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; font: 600 13px/1 var(--font-display); }
.kcol-h .count { font: 400 13px/1 var(--font-sans); color: var(--muted); }
.kcol-h .ic { margin-left: auto; color: var(--muted); }
.kcol-h .ic.ok { color: var(--success); }
.kcards { display: flex; flex-direction: column; gap: 8px; padding: 0 8px 8px; flex: 1; }
.kcard {
  display: block; width: 100%; text-align: left; padding: 9px 11px; border: 0; border-radius: 6px; background: var(--surface);
  box-shadow: 0 0 0 1px var(--border); font-size: 13px; line-height: 1.35; cursor: grab; transition: box-shadow .15s, transform .2s var(--ease);
}
.kcard:hover { box-shadow: 0 0 0 1px var(--muted); }
.kcard:active { cursor: grabbing; }
.kcard.is-moved { animation: landed .7s var(--ease); }
@keyframes landed { 0% { box-shadow: 0 0 0 2px var(--accent); transform: translateY(-4px); } 100% { box-shadow: 0 0 0 1px var(--border); transform: none; } }
.kcard .t { display: flex; gap: 7px; align-items: baseline; }
.kcard .t .dot { transform: translateY(-1px); }
.kmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.kmeta span { display: inline-flex; align-items: center; gap: 4px; }
.kmeta .avatar { margin-left: auto; }
.kmeta .proj { width: 100%; }
.kadd { margin: 0 8px 8px; height: 30px; display: flex; align-items: center; gap: 6px; padding: 0 8px; border-radius: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.board-hint { display: flex; align-items: center; gap: 8px; padding: 0 16px 12px; font-size: 13px; color: var(--muted); }
.diary { margin: 0 12px 12px; }
.diary-day { padding: 6px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--muted); }
.diary ul { list-style: none; }
.diary li { display: grid; grid-template-columns: 120px 1fr auto; gap: 12px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--border); }
.diary li:last-child { border-bottom: 0; }
.diary li .c { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.diary li.is-new { animation: fresh 1.6s var(--ease); }
@keyframes fresh { 0% { background: var(--accent-soft); } 100% { background: transparent; } }

/* ---------- Финансы ---------- */
.fin-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.fin-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 0 12px; }
.tile { padding: 10px 12px; border-radius: 8px; background: var(--surface); box-shadow: 0 0 0 1px var(--border); min-width: 0; }
.tile-l { font-size: 12px; color: var(--muted); }
.tile-v { margin-top: 2px; font: 700 18px/1.25 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; transition: color .3s; }
.tile-v.acc { color: var(--accent); } .tile-v.ok { color: var(--success); }
.tile-hint { font-size: 11px; color: var(--muted); }
.plan { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin: 8px 12px 0; padding: 10px 12px; border-radius: 8px; background: var(--surface); box-shadow: 0 0 0 1px var(--border); font-size: 12px; color: var(--muted); }
.plan-bar { height: 8px; border-radius: 99px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; }
.plan-bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .8s var(--ease); }
.plan b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.inv-panel { margin: 8px 12px 12px; }
.inv-table { width: 100%; border-collapse: collapse; }
.inv-table th { text-align: left; font-weight: 400; font-size: 12px; color: var(--muted); padding: 8px 14px; border-bottom: 1px solid var(--border); }
.inv-table td { padding: 9px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.inv-table tr:last-child td { border-bottom: 0; }
.inv-table td.r, .inv-table th.r { text-align: right; }
.inv-table .what { display: block; font-size: 12px; color: var(--muted); }
.inv-table .sum { font: 600 13px/1.4 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.inv-table .hint { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.inv-table tr.flip td { animation: fresh 1.6s var(--ease); }

/* ---------- Бот ---------- */
.bot-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 12px; margin-top: clamp(32px, 4vw, 48px); align-items: stretch; }
.chat { display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; background: var(--surface); box-shadow: 0 0 0 1px var(--border); }
.chat-h { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.chat-h .bot-ava { width: 34px; height: 34px; font-size: 11px; }
.chat-h b { display: block; font-size: 14px; }
.chat-h small { display: block; font-size: 12px; color: var(--muted); }
.chat-h .tabs { margin-left: auto; }
.chat-body {
  flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 14px; min-height: 420px; max-height: 520px; overflow-y: auto;
  background: color-mix(in srgb, var(--accent) 4%, var(--bg));
}
.msg { max-width: 92%; padding: 9px 12px 7px; border-radius: 12px 12px 12px 4px; background: var(--surface); box-shadow: 0 0 0 1px var(--border); font-size: 13.5px; line-height: 1.5; white-space: pre-line; }
.msg.me { align-self: flex-end; border-radius: 12px 12px 4px 12px; background: var(--accent); color: var(--accent-text); box-shadow: none; }
.msg time { display: block; text-align: right; margin-top: 2px; font-size: 11px; color: var(--muted); }
.msg.me time { color: color-mix(in srgb, var(--accent-text) 75%, transparent); }
.msg i { color: var(--muted); font-style: italic; }
.msg a { color: var(--accent); }
.msg-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(42px, 1fr)); gap: 4px; margin-top: 8px; }
.msg-btns span, .msg-btns button {
  display: grid; place-items: center; min-height: 32px; padding: 0 8px; border: 0; border-radius: 6px; font-size: 13px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--accent); font-weight: 500;
}
.msg-btns button:hover { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); }
.msg.parsed dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 6px 0 0; }
.msg.parsed dt { color: var(--muted); }
.msg.parsed dd { margin: 0; font-weight: 500; }
.chat-in { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); background: var(--surface); }
.chat-in input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid var(--border); border-radius: 22px; background: var(--surface-2); font-size: 15px; outline: none; }
.chat-in input:focus { border-color: var(--accent); }
.chat-in button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; flex: none; }
.chat-try { padding: 10px 10px 0; background: var(--surface); display: flex; gap: 6px; flex-wrap: wrap; border-top: 1px solid var(--border); }
.chat-try .chip { height: 32px; font-size: 13px; }
.alerts { display: flex; flex-direction: column; }
.alerts .panel-h { min-height: 48px; }
.alert-list { list-style: none; }
.alert-list li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.alert-list li:last-child { border-bottom: 0; }
.alert-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--border); color: var(--muted); }
.alert-ic.red { background: var(--danger-soft); color: var(--danger); box-shadow: none; }
.alert-ic.green { background: var(--success-soft); color: var(--success); box-shadow: none; }
.alert-ic.blue { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.alert-list b { display: block; font-weight: 600; font-size: 15px; line-height: 1.35; }
.alert-list p { margin-top: 3px; font-size: 14px; color: var(--muted); }
.alert-list q { display: block; margin-top: 8px; padding: 7px 10px; border-radius: 6px; background: var(--surface-2); font-size: 13px; quotes: none; color: var(--text); }

/* ---------- Бенто «Клиенты и продажи» ---------- */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-top: clamp(32px, 4vw, 48px); }
.cell { display: flex; flex-direction: column; min-width: 0; padding: 20px; border-radius: 10px; background: var(--surface); box-shadow: 0 0 0 1px var(--border); }
.cell h3 { font-size: 18px; letter-spacing: -0.02em; line-height: 1.25; }
.cell > p { margin-top: 8px; font-size: 15px; color: var(--muted); }
.cell .mini { margin-top: auto; padding-top: 18px; font-size: 13px; line-height: 1.4; }
.c-clients { grid-column: span 4; }
.c-sales { grid-column: span 2; grid-row: span 2; }
.c-diary { grid-column: span 2; }
.c-lib { grid-column: span 2; }
.c-team { grid-column: span 3; }
.c-ws { grid-column: span 3; background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.tabs-line { display: flex; gap: 18px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs-line span { padding-bottom: 8px; margin-bottom: -1px; white-space: nowrap; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs-line span.on { color: var(--text); font-weight: 500; border-color: var(--accent); }
.access-list { list-style: none; margin-top: 4px; }
.access-list li { display: grid; grid-template-columns: 16px 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); }
.access-list li:last-child { border-bottom: 0; }
.access-list .ic { color: var(--muted); }
.access-list code { font: 500 13px/1 var(--font-sans); letter-spacing: .08em; color: var(--muted); }
.access-list .btn-ghost { height: 28px; padding: 0 8px; font-size: 12px; }
.funnel { display: grid; gap: 6px; }
.stage { display: grid; grid-template-columns: 8px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 6px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--border); }
.stage .dot { width: 8px; height: 8px; }
.stage small { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lead-pop { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: var(--surface); box-shadow: 0 0 0 1px var(--border), var(--shadow-pop); }
.lead-pop b { display: block; font-weight: 600; }
.lead-pop span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.lib-list { list-style: none; }
.lib-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.lib-list li:last-child { border-bottom: 0; }
.lib-list .ic { color: var(--muted); } .lib-list .ic.f { color: var(--accent); }
.roles { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.roles li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--border); }
.roles .avatar { width: 28px; height: 28px; font-size: 11px; }
.roles b { display: block; font-weight: 500; line-height: 1.2; }
.roles small { display: block; color: var(--muted); font-size: 12px; }
.ws-switch { padding: 6px; border-radius: 8px; background: var(--surface); box-shadow: 0 0 0 1px var(--border), var(--shadow-pop); max-width: 300px; }
.ws-switch div { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; }
.ws-switch div.on { background: var(--accent-soft); }
.ws-switch b { font: 600 13px/1.2 var(--font-display); }
.ws-switch small { margin-left: auto; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }

/* ---------- Сравнение ---------- */
.table-wrap { margin-top: clamp(32px, 4vw, 48px); overflow-x: auto; border-radius: 10px; box-shadow: 0 0 0 1px var(--border); background: var(--surface); }
.cmp { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 15px; }
.cmp th, .cmp td { padding: 14px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.cmp tr:last-child td, .cmp tr:last-child th { border-bottom: 0; }
.cmp thead th { font: 600 14px/1.3 var(--font-display); letter-spacing: -0.01em; color: var(--muted); background: var(--surface-2); }
.cmp tbody th { font-weight: 500; width: 24%; }
.cmp td { color: var(--muted); width: 25%; }
.cmp .us { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); color: var(--text); font-weight: 500; }
.cmp thead .us { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.cmp .us .ic { display: inline-block; vertical-align: -3px; margin-right: 6px; color: var(--success); }

/* ---------- Автор ---------- */
.founder { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; max-width: 940px; }
.portrait { width: clamp(120px, 16vw, 180px); aspect-ratio: 4 / 5; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); box-shadow: 0 0 0 1px var(--border); font: 700 clamp(36px, 5vw, 52px)/1 var(--font-display); letter-spacing: -0.03em; }
.founder blockquote { margin: 0; font: 600 clamp(1.25rem, 1rem + 1vw, 1.7rem)/1.38 var(--font-display); letter-spacing: -0.02em; text-wrap: pretty; }
.founder .copy { margin-top: 20px; max-width: 62ch; color: var(--muted); }
.sign { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; font-size: 15px; }
.sign b { font-weight: 600; }
.sign span { color: var(--muted); }
.sign a { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); text-decoration: none; font-weight: 500; }
.sign a:hover { text-decoration: underline; }

/* ---------- Тарифы ---------- */
.price-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }
.billing { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; border-radius: 8px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--border); }
.billing button { height: 38px; padding: 0 16px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 14px; white-space: nowrap; }
.billing button[aria-pressed="true"] { background: var(--surface); color: var(--text); font-weight: 500; box-shadow: 0 0 0 1px var(--border); }
.billing em { font-style: normal; color: var(--success); font-weight: 600; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 32px; align-items: stretch; }
.plan-card { position: relative; display: flex; flex-direction: column; padding: 24px; border-radius: 10px; background: var(--surface); box-shadow: 0 0 0 1px var(--border); }
.plan-card.rec { box-shadow: 0 0 0 2px var(--accent); }
.plan-card .tag { position: absolute; top: -11px; left: 22px; }
.plan-card h3 { font-size: 20px; }
.plan-card .for { margin-top: 4px; font-size: 14px; color: var(--muted); }
.price { margin-top: 18px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price b { font: 700 38px/1 var(--font-display); letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.price span { color: var(--muted); font-size: 15px; }
.price-sub { min-height: 22px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.limits { list-style: none; margin: 18px 0 22px; display: grid; gap: 9px; font-size: 15px; }
.limits li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; }
.limits .ic { margin-top: 4px; color: var(--accent); }
.plan-card .btn { margin-top: auto; }
.price-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); margin-top: 32px; }
.price-notes h3 { font-size: 16px; letter-spacing: -0.01em; }
.price-notes p, .price-notes li { font-size: 15px; color: var(--muted); }
.price-notes p { margin-top: 6px; }
.price-notes ul { list-style: none; margin-top: 8px; display: grid; gap: 4px; }
.price-notes a { color: var(--accent); }
.guarantee { display: flex; gap: 14px; align-items: flex-start; margin-top: 24px; padding: 16px 18px; border-radius: 10px; background: var(--success-soft); color: var(--text); }
.guarantee .ic { color: var(--success); margin-top: 3px; }
.guarantee p { font-size: 15px; }

/* ---------- Данные ---------- */
.sec-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 56px); margin-top: clamp(28px, 4vw, 44px); list-style: none; }
.sec-list li { display: grid; grid-template-columns: 22px 1fr; gap: 14px; padding: 18px 0; border-top: 1px solid var(--border); }
.sec-list .ic { margin-top: 3px; color: var(--accent); width: 20px; height: 20px; }
.sec-list b { display: block; font-weight: 600; font-size: 16px; }
.sec-list p { margin-top: 4px; color: var(--muted); font-size: 15px; }

/* ---------- Вопросы ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(24px, 4vw, 56px); align-items: start; margin-top: clamp(28px, 4vw, 44px); }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:first-child { border-top: 1px solid var(--border); }
.faq summary { display: flex; align-items: center; gap: 16px; min-height: 60px; padding: 14px 0; cursor: pointer; list-style: none; font: 600 17px/1.35 var(--font-display); letter-spacing: -0.015em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { font: inherit; letter-spacing: inherit; }
.faq summary .ic { margin-left: auto; color: var(--muted); transition: transform .25s var(--ease); flex: none; }
.faq details[open] summary .ic { transform: rotate(180deg); }
.faq .ans { padding: 0 40px 20px 0; color: var(--muted); max-width: 70ch; }
.faq .ans p + p { margin-top: 8px; }
.faq .ans a { color: var(--accent); }
.ask { position: sticky; top: 24px; padding: 20px; }
.ask h3 { font-size: 17px; }
.ask p { margin-top: 6px; font-size: 14px; color: var(--muted); }
.ask .btn { margin-top: 14px; }
.ask a.mail { display: block; margin-top: 10px; font-size: 14px; color: var(--accent); }

/* ---------- Заявка ---------- */
.access-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: clamp(32px, 5vw, 72px); align-items: start; }
.steps { list-style: none; margin-top: 28px; display: grid; gap: 0; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 32px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--border); }
.steps li::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font: 700 13px/1 var(--font-display); }
.steps b { display: block; font-weight: 600; }
.steps b + span { display: block; margin-top: 2px; font-size: 15px; color: var(--muted); }
.form-card { padding: clamp(20px, 3vw, 28px); }
.form-card h3 { font-size: 20px; }
.form-card h3 + p { margin-top: 6px; font-size: 15px; color: var(--muted); }
.fld { margin-top: 18px; }
.fld label, .fld .lbl { display: block; margin-bottom: 6px; font-size: 14px; color: var(--muted); }
.fld input[type="text"], .fld input[type="email"], .fld input[type="tel"] {
  width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface);
  font-size: 16px; outline: none; transition: border-color .15s;
}
.fld input:focus { border-color: var(--accent); }
.fld input[aria-invalid="true"] { border-color: var(--danger); }
.err { display: none; margin-top: 6px; font-size: 13px; color: var(--danger); }
.err.show { display: block; }
.fld .chips .chip { height: 40px; }
.check { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; margin-top: 16px; font-size: 13px; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); }
.check a, .consent a { color: var(--accent); }
.form-card .btn { margin-top: 20px; }
.consent { margin-top: 12px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.thanks { display: none; text-align: left; }
.form-card.is-sent form { display: none; }
.form-card.is-sent .thanks { display: block; }
.thanks .ok-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--success-soft); color: var(--success); margin-bottom: 14px; }
.thanks h3 { font-size: 20px; }
.thanks p { margin-top: 8px; color: var(--muted); font-size: 15px; }
.thanks dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 16px 0 0; padding: 12px 14px; border-radius: 8px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--border); font-size: 14px; }
.thanks dt { color: var(--muted); } .thanks dd { margin: 0; font-weight: 500; word-break: break-word; }
.thanks .btn { margin-top: 18px; }

/* ---------- Подвал ---------- */
.footer { padding: 48px 0 40px; border-top: 1px solid var(--border); background: var(--sidebar); font-size: 14px; color: var(--muted-sb); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 28px; }
.foot-name { font: 700 17px/1.2 var(--font-display); color: var(--text); letter-spacing: -0.02em; }
.footer p { margin-top: 8px; }
.foot-h { font: 600 13px/1.2 var(--font-display); color: var(--text); margin-bottom: 10px; letter-spacing: 0; }
.footer ul { list-style: none; display: grid; gap: 6px; }
.footer a { color: var(--muted-sb); text-decoration: none; }
.footer a:hover { color: var(--accent); text-decoration: underline; }
.req { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 13px; }

/* ---------- Нижняя панель на телефоне ---------- */
.mobilebar { display: none; }
@media (max-width: 699px) {
  .mobilebar {
    display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 92%, transparent);
    border-top: 1px solid var(--border); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    transform: translateY(110%); transition: transform .3s var(--ease);
  }
  .mobilebar.is-in { transform: none; }
  .mobilebar .btn { height: 46px; }
  body { padding-bottom: 72px; }
}

/* ---------- Всплывающие окна: тосты, уведомления, поиск, cookie ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast {
  max-width: 360px; padding: 10px 14px; border-radius: 8px; background: var(--text); color: var(--surface); font-size: 13.5px; line-height: 1.45;
  box-shadow: var(--shadow-pop); animation: toast-in .35s var(--ease) both;
}
.toast.out { animation: toast-out .25s var(--ease) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }
@media (max-width: 699px) { .toasts { left: 12px; right: 12px; bottom: 84px; align-items: stretch; } .toast { max-width: none; } }

.popover {
  position: fixed; z-index: 80; width: 340px; max-width: calc(100vw - 24px); border-radius: 8px; background: var(--surface);
  box-shadow: 0 0 0 1px var(--border), var(--shadow-pop); font-size: 13.5px; display: none;
}
.popover.is-open { display: block; animation: toast-in .2s var(--ease) both; }
.notif { list-style: none; max-height: 60vh; overflow-y: auto; }
.notif li { display: grid; grid-template-columns: 8px 1fr; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--border); }
.notif li:last-child { border-bottom: 0; }
.notif .dot { margin-top: 6px; background: var(--accent); }
.notif .dot.read { background: transparent; }
.notif b { font-weight: 600; }
.notif small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }

dialog.palette { width: min(560px, calc(100vw - 24px)); padding: 0; border: 0; border-radius: 10px; background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border), var(--shadow-pop); margin: 12vh auto auto; }
dialog.palette::backdrop { background: rgba(0, 0, 0, .3); }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--border); }
.pal-in .ic { color: var(--muted); }
.pal-in input { flex: 1; height: 52px; border: 0; outline: none; background: transparent; font-size: 16px; }
.pal-list { list-style: none; max-height: 52vh; overflow-y: auto; padding: 6px; }
.pal-list li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.pal-list li .ic { color: var(--muted); }
.pal-list li small { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.pal-list li[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); }
.pal-list li[aria-selected="true"] .ic { color: var(--accent); }
.pal-empty { padding: 18px; color: var(--muted); font-size: 14px; }
.pal-foot { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }

.cookie-banner {
  position: fixed; left: 20px; bottom: 20px; z-index: 85; display: none; width: min(420px, calc(100vw - 24px)); padding: 14px 16px;
  border-radius: 10px; background: var(--surface); box-shadow: 0 0 0 1px var(--border), var(--shadow-pop); font-size: 13.5px; line-height: 1.5;
}
.cookie-banner.is-open { display: block; animation: toast-in .35s var(--ease) both; }
.cookie-banner a { color: var(--accent); }
.cookie-btns { display: flex; gap: 8px; margin-top: 10px; }
@media (min-width: 900px) { .cookie-banner { left: calc(var(--sb-w) + 20px); } }
@media (max-width: 699px) { .cookie-banner { left: 12px; right: 12px; width: auto; bottom: 84px; } }

/* ---------- Появление при прокрутке (без JS всё видно сразу) ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 1199px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1099px) {
  .tasks-grid, .fin-grid { grid-template-columns: minmax(0, 1fr); }
  .fin-grid .copy { order: -1; }
  .report-grid { grid-template-columns: minmax(0, 1fr); }
  .bot-grid { grid-template-columns: minmax(0, 1fr); }
  .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .ask { position: static; }
  .price-notes { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 899px) {
  .split, .access-grid { grid-template-columns: minmax(0, 1fr); }
  .plans { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .bento .cell { grid-column: auto; grid-row: auto; }
  .sec-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 699px) {
  body { font-size: 16px; }
  .section { padding: 56px 0 64px; }
  .hero { padding-top: 24px; }
  .hello { margin-bottom: 16px; }
  .cta-row .btn { width: 100%; }
  .notice { margin-top: 22px; }
  .today { grid-template-columns: minmax(0, 1fr); }
  .today .col-extra { display: none; }
  .bot-pop { position: relative; left: auto; right: auto; bottom: auto; width: auto; margin: -18px 12px 0; }
  .hero-visual { margin-bottom: 0; }
  .hero-actions { margin-top: 24px; }
  .hero-actions .cta-row { width: 100%; }
  .row .sub { display: none; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi:nth-child(4n) { border-right: 1px solid var(--border); }
  .kpi:nth-child(2n) { border-right: 0; }
  .kpi:nth-last-child(-n+4) { border-bottom: 1px solid var(--border); }
  .kpi:nth-last-child(-n+2) { border-bottom: 0; }
  .fin-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .diary li { grid-template-columns: 1fr; gap: 2px; }
  .inv-table .hide-sm { display: none; }
  .founder { grid-template-columns: minmax(0, 1fr); }
  .portrait { width: 96px; font-size: 32px; }
  .roles { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .period-cap { width: 100%; margin: 4px 0 0; }
  .chat-body { min-height: 380px; }
  .faq .ans { padding-right: 0; }
  .billing { width: 100%; }
}
@media (max-width: 699px) {
  .chip, .fld .chips .chip { height: 44px; }
  .billing button { height: 44px; }
  .topbar .btn { height: 40px; }
  .topbar-name { padding: 14px 0; }
  .footer li a, .sign a { display: inline-block; padding: 8px 0; }
  .footer ul { gap: 0; }
}
@media (max-width: 380px) {
  .topbar .btn { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal, .js .bot-pop { opacity: 1; transform: none; }
}
@media print {
  .sidebar, .topbar, .mobilebar, .cookie-banner, .toasts { display: none !important; }
}
