/* ============================================================================
   ADHD OS — Landing V3
   ----------------------------------------------------------------------------
   Что V3 меняет по сравнению с V2 (правки Сергея, 2026-07-29):

     * заголовки держатся в ОДНУ строку на десктопе — размер шрифта опущен,
       формулировки укорочены; двухстрочные допускаются только на мобильном;
     * описания — максимум две строки: `max-width` в ch + короткий текст;
     * блоки по центру, а не прижаты влево: пустое чёрное поле справа было
       главной претензией к V2;
     * вертикальные ритмы сжаты (было 96px между секциями, стало ~64-88);
     * длинные списки на мобильном едут вбок (`.rail`), а не вниз;
     * иконки в макетах — те же lucide, что в приложении (спрайт в v3.html).

   Токены наследуют V2, чтобы лендинг и продукт оставались одной системой.
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --bg-soft: #10131a;
  --panel: #141820;
  --panel-2: #181d27;
  --text: #f4f6f8;
  --muted: #a7adba;
  --muted-2: #7d8492;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --accent: #66e3b4;
  --accent-2: #9b8cff;
  --accent-soft: rgba(102, 227, 180, 0.12);
  --danger: #ff8a80;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --gutter: 24px;
  --shell: min(1180px, calc(100% - var(--gutter) * 2));
  --header-height: 64px;
  --font-display: "Roboto Condensed", "Arial Narrow", sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --font-mono: "Roboto Mono", ui-monospace, monospace;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #eceef2;
  --bg-soft: #f4f5f8;
  --panel: #ffffff;
  --panel-2: #f7f8fa;
  --text: #151821;
  --muted: #545c6c;
  --muted-2: #747c8b;
  --line: rgba(21, 24, 33, 0.11);
  --line-strong: rgba(21, 24, 33, 0.2);
  --accent: #0f8c62;
  --accent-2: #6e59d9;
  --accent-soft: rgba(15, 140, 98, 0.1);
  --danger: #bd5048;
  --shadow: 0 24px 60px rgba(38, 44, 58, 0.12);
}

/* ── База ─────────────────────────────────────────────────────────────── */

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
  margin: 0;
  min-width: 280px;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color 220ms ease, color 220ms ease;
}

body.menu-open { overflow: hidden; }

button, a, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol { margin-top: 0; }

/* Все инлайновые иконки — контурные (lucide). Один раз здесь, чтобы не
   дублировать fill/stroke в каждом блоке. */
svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 72%, transparent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-150%);
  transition: transform 150ms ease;
}
.skip-link:focus { transform: translateY(0); }

.shell { width: var(--shell); margin-inline: auto; }

/* ── Типографика секций ───────────────────────────────────────────────── */

.section {
  position: relative;
  padding-block: clamp(56px, 6.4vw, 88px);
}

.section--tint {
  border-block: 1px solid var(--line);
  background:
    radial-gradient(circle at 84% 6%, color-mix(in srgb, var(--accent-2) 7%, transparent), transparent 30%),
    var(--bg-soft);
}

.section-heading {
  max-width: 780px;
  margin-inline: auto;
  margin-bottom: clamp(28px, 3.4vw, 44px);
  text-align: center;
}

.section-index {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.section-index::before,
.section-index::after {
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
  content: "";
}

/* Размер подобран так, чтобы КАЖДЫЙ заголовок страницы влезал в одну строку
   при ширине оболочки 1180px. Раньше было clamp(42px,5vw,70px) — и половина
   заголовков рвалась на две строки. */
h1, .section-heading h2, .final-cta h2 {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.section-heading h2,
.final-cta h2 { font-size: clamp(28px, 3.5vw, 44px); }

h1 { font-size: clamp(34px, 5.2vw, 62px); }
h1 em { color: var(--accent); font-style: normal; }

.section-lead {
  max-width: 60ch;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: clamp(15px, 1.3vw, 17px);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  padding: 7px 14px 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

/* ── Кнопки ───────────────────────────────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.button svg { width: 18px; height: 18px; }
.button:active { transform: translateY(1px); }

.button--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #06120d;
}
html[data-theme="light"] .button--primary { color: #ffffff; }
.button--primary:hover { background: color-mix(in srgb, var(--accent) 86%, var(--text)); }

.button--quiet {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--text);
}
.button--quiet:hover { border-color: var(--accent); color: var(--accent); }

.button--large { min-height: 54px; padding: 0 26px; font-size: 16px; }

/* ── Шапка ────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  height: var(--header-height);
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  transition: border-color 180ms ease;
}
.site-header.is-scrolled { border-color: var(--line); }

.header-inner { display: flex; align-items: center; height: 100%; }

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.brand img { width: 36px; height: 36px; }
.brand--small img { width: 28px; height: 28px; }

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}
.desktop-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  transition: color 150ms ease;
}
.desktop-nav a:hover { color: var(--text); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 22px;
}

.icon-button, .menu-button, .theme-button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  background: transparent;
}
.icon-button { display: inline-grid; place-items: center; border-radius: 12px; }
.icon-button svg { width: 20px; height: 20px; }

.theme-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.theme-button:hover { color: var(--text); border-color: var(--line-strong); }
.theme-icon { display: none; width: 18px; height: 18px; }
html[data-theme-mode="system"] .theme-icon--system,
html[data-theme-mode="dark"] .theme-icon--dark,
html[data-theme-mode="light"] .theme-icon--light { display: block; }

.theme-button--wide {
  justify-content: space-between;
  width: 100%;
  padding: 0 16px;
}
.theme-button--wide strong { color: var(--text); }

.header-cta { min-height: 44px; padding: 0 16px; font-size: 14px; }

.menu-button {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 12px;
}
.menu-button span {
  width: 18px;
  height: 1.8px;
  border-radius: 2px;
  background: currentColor;
}

/* ── Мобильное меню ───────────────────────────────────────────────────── */

.mobile-menu { position: fixed; inset: 0; z-index: 200; }
.mobile-menu__scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 10, 0.6);
  opacity: 0;
  transition: opacity 220ms ease;
}
.mobile-menu.is-open .mobile-menu__scrim { opacity: 1; }

.mobile-menu__panel {
  position: absolute;
  inset: 0 0 0 auto;
  display: flex;
  flex-direction: column;
  width: min(340px, 88vw);
  padding: 18px 20px calc(20px + env(safe-area-inset-bottom));
  border-left: 1px solid var(--line);
  background: var(--bg-soft);
  transform: translateX(100%);
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}
.mobile-menu.is-open .mobile-menu__panel { transform: none; }

.mobile-menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mobile-menu nav { display: grid; gap: 2px; }
.mobile-menu nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 4px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
}
.mobile-menu nav a span {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
}

.mobile-menu__foot { display: grid; gap: 10px; margin-top: auto; padding-top: 24px; }
.mobile-menu__foot .button { width: 100%; }

/* ── Герой ────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding-block: clamp(28px, 4.4vw, 60px) clamp(48px, 6vw, 78px);
  overflow: clip;
}

.hero-glow {
  position: absolute;
  z-index: 0;
  top: -30%;
  left: 50%;
  width: min(900px, 120%);
  aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 13%, transparent), transparent 62%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-lead {
  order: 3;
  max-width: 62ch;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: clamp(15.5px, 1.5vw, 19px);
}

.hero .kicker { order: 1; }
/* Без max-width: заголовок обязан держаться в одну строку на десктопе,
   ограничение по ch сразу ломало его на две. */
.hero h1 { order: 2; }

.hero-actions {
  order: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 26px;
}
.hero-note { color: var(--muted-2); font-size: 13.5px; }

.hero-features {
  order: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}
.hero-features li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 60%, transparent);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
}
.hero-features svg { width: 15px; height: 15px; color: var(--accent); }

.hero-demo-wrap { order: 6; width: min(880px, 100%); margin-top: clamp(28px, 3.6vw, 44px); }

/* ── Интерактивная сцена «как было / в системе» ───────────────────────── */

.hero-demo {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: left;
}

.demo-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.demo-title { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.demo-title svg { width: 14px; height: 14px; color: var(--accent); }
.demo-date { color: var(--muted-2); }
.demo-dots { display: flex; gap: 5px; margin-left: auto; }
.demo-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }

.demo-canvas {
  --thought-w: min(560px, calc(100% - 36px));
  position: relative;
  height: 300px;
  padding: 18px;
}

/* Направляющие «списка»: проявляются, когда мысли собраны. */
.demo-rail {
  position: absolute;
  left: 50%;
  top: 22px;
  width: var(--thought-w);
  display: grid;
  gap: 10px;
  opacity: 0;
  translate: -50% 0;
  transition: opacity 320ms ease;
}
.demo-rail span { height: 46px; border: 1px dashed var(--line); border-radius: 12px; }
.hero-demo:not(.is-chaos) .demo-rail { opacity: 0.55; }

.thought {
  position: absolute;
  left: 50%;
  top: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: var(--thought-w);
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--panel-2);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
  font-size: 14px;
  translate: -50% 0;
  transform: translate(var(--chaos-x), var(--chaos-y)) rotate(var(--chaos-r));
  transition: transform 620ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 320ms ease, border-color 320ms ease;
  transition-delay: calc(var(--order) * 55ms);
}
html[data-theme="light"] .thought { box-shadow: 0 12px 26px rgba(38, 44, 58, 0.12); }

.thought svg { width: 16px; height: 16px; flex: none; color: var(--accent); }
.thought span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.thought small {
  flex: none;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
  opacity: 0;
  transition: opacity 260ms ease;
  transition-delay: calc(var(--order) * 55ms + 240ms);
}

.hero-demo:not(.is-chaos) .thought {
  transform: translate(0, calc(var(--order) * 56px)) rotate(0deg);
  border-color: var(--line);
  box-shadow: none;
}
.hero-demo:not(.is-chaos) .thought small { opacity: 1; }

.demo-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.demo-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  opacity: 0;
  transition: opacity 320ms ease;
}
.demo-check svg { width: 14px; height: 14px; }
.hero-demo:not(.is-chaos) .demo-check { opacity: 1; }

/* Переключатель — главный интерактивный элемент героя, поэтому он крупный,
   подписан и до первого клика мягко пульсирует. */
.demo-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}
.demo-switch__label { color: var(--muted-2); font-size: 13.5px; }
.demo-switch__group {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 80%, transparent);
}
.demo-switch button {
  min-height: 40px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  transition: background-color 180ms ease, color 180ms ease;
}
.demo-switch button.is-active { background: var(--accent); color: #06120d; }
html[data-theme="light"] .demo-switch button.is-active { color: #ffffff; }

.demo-switch.is-untouched .demo-switch__group {
  animation: switch-pulse 2.6s ease-in-out infinite;
}
@keyframes switch-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 34%, transparent); }
  50% { box-shadow: 0 0 0 9px transparent; }
}

/* ── Карточки и «рельсы» ──────────────────────────────────────────────── */

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 22px;
  transition: border-color 160ms ease, transform 160ms ease;
}
.card h3 {
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* На десктопе — сетка, на мобильном — горизонтальная лента со снапом.
   Вертикальные простыни из 4-8 карточек были главной болью мобильной V2. */
.rail { display: grid; gap: 16px; }
.rail--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rail--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rail--price { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.rail--tools { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.rail-hint { display: none; }

.pain-card { position: relative; padding-top: 26px; }
.pain-num {
  display: block;
  margin-bottom: 12px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
}

/* ── Цикл ─────────────────────────────────────────────────────────────── */

.flow-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  list-style: none;
  overflow: hidden;
}
.flow-steps li { padding: 26px 24px; border-right: 1px solid var(--line); }
.flow-steps li:last-child { border-right: 0; }
.flow-num {
  display: block;
  margin-bottom: 14px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
}
.flow-steps h3 {
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
}
.flow-steps p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ── AI-карточки ──────────────────────────────────────────────────────── */

.ai-card { display: flex; flex-direction: column; }
.ai-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.ai-icon svg { width: 20px; height: 20px; }

.mock {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 55%, var(--panel-2));
  font-size: 12.5px;
}
.mock b { font-family: var(--font-mono); font-weight: 500; }
.mock em { color: var(--muted-2); font-style: normal; }

.mock--voice { display: flex; align-items: center; gap: 10px; }
.wave { display: flex; align-items: center; gap: 3px; height: 22px; flex: 1; }
.wave i {
  flex: 1;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.75;
  animation: wave 1.5s ease-in-out infinite;
}
.wave i:nth-child(1) { height: 30%; animation-delay: 0ms; }
.wave i:nth-child(2) { height: 70%; animation-delay: 90ms; }
.wave i:nth-child(3) { height: 45%; animation-delay: 180ms; }
.wave i:nth-child(4) { height: 95%; animation-delay: 270ms; }
.wave i:nth-child(5) { height: 55%; animation-delay: 360ms; }
.wave i:nth-child(6) { height: 80%; animation-delay: 450ms; }
.wave i:nth-child(7) { height: 35%; animation-delay: 540ms; }
.wave i:nth-child(8) { height: 65%; animation-delay: 630ms; }
.wave i:nth-child(9) { height: 40%; animation-delay: 720ms; }
.wave i:nth-child(10) { height: 75%; animation-delay: 810ms; }
@keyframes wave {
  0%, 100% { transform: scaleY(0.55); }
  50% { transform: scaleY(1); }
}

.mock--live { display: flex; align-items: center; gap: 12px; }
.orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  background: var(--accent-soft);
}
.orb i {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--accent);
}
.orb i:nth-child(1) { inset: 10px; background: var(--accent); }
.orb i:nth-child(2) { inset: 2px; opacity: 0.45; animation: orb 2.2s ease-out infinite; }
@keyframes orb {
  0% { transform: scale(0.7); opacity: 0.6; }
  100% { transform: scale(1.15); opacity: 0; }
}
.mock--live b { display: block; }

.mock--chat { display: grid; gap: 8px; }
.bubble {
  padding: 8px 11px;
  border-radius: 10px 10px 10px 3px;
  background: color-mix(in srgb, var(--text) 8%, transparent);
  color: var(--muted);
}
.bubble--bot {
  display: flex;
  gap: 8px;
  border-radius: 10px 10px 3px 10px;
  background: var(--accent-soft);
  color: var(--text);
}
.bubble--bot svg { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--accent); }

.mock--stats { display: flex; gap: 8px; }
.mock--stats span {
  flex: 1;
  display: grid;
  gap: 2px;
  color: var(--muted-2);
  font-size: 11px;
}
.mock--stats b { color: var(--text); font-family: var(--font-display); font-size: 17px; }

/* ── Инструменты ──────────────────────────────────────────────────────── */

.tool-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; }
.tool-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--bg) 45%, var(--panel-2));
  color: var(--accent);
}
.tool-icon svg { width: 19px; height: 19px; }
.tool-card h3 { margin-bottom: 2px; font-size: 18px; }
.tool-card p { font-size: 13.5px; }

.tools-extra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 22px 0 0;
  color: var(--muted-2);
  font-size: 14px;
  text-align: center;
}
.tools-extra b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 600;
}
.tools-extra b + b::before {
  margin-right: 6px;
  color: var(--muted-2);
  content: "·";
}
.tools-extra svg { width: 15px; height: 15px; color: var(--accent); }

/* ── Границы ──────────────────────────────────────────────────────────── */

.boundaries { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.boundary ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 11px; }
.boundary li {
  position: relative;
  padding-left: 26px;
  color: var(--muted);
  font-size: 14.5px;
}
.boundary li::before {
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  content: "";
}
.boundary--yes li::before { background: var(--accent); }
.boundary--no li::before { background: var(--danger); }

.boundary-tag {
  display: inline-block;
  margin-bottom: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.boundary--yes .boundary-tag { background: var(--accent-soft); color: var(--accent); }
.boundary--no .boundary-tag { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }

/* ── Тарифы ───────────────────────────────────────────────────────────── */

.price-card { position: relative; display: flex; flex-direction: column; padding: 26px 24px; }
.price-card--featured {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 9%, var(--panel)), var(--panel) 52%);
}
.price-card--pro { border-style: dashed; }

.price-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #06120d;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
html[data-theme="light"] .price-badge { color: #ffffff; }
.price-badge--soon { background: color-mix(in srgb, var(--accent-2) 22%, transparent); color: var(--accent-2); }

.price-head span {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}
.price-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-height: 44px;
  margin: 10px 0 6px;
}
.price-value b {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}
.price-value small { color: var(--muted-2); font-size: 13.5px; }
.price-sub { margin: 0 0 18px; color: var(--muted); font-size: 14px; min-height: 60px; }

.price-card ul {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}
.price-card li { position: relative; padding-left: 22px; }
.price-card li::before {
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 10px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.7;
  content: "";
}
.price-card .button { margin-top: auto; width: 100%; }

/* ── FAQ ──────────────────────────────────────────────────────────────── */

.faq-list {
  max-width: 860px;
  margin-inline: auto;
  border-top: 1px solid var(--line);
}
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 4px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: clamp(17px, 1.8vw, 20px);
  font-weight: 700;
  list-style: none;
  transition: color 150ms ease;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:hover { color: var(--accent); }
.faq-list summary span {
  position: relative;
  width: 16px;
  height: 16px;
  flex: none;
  margin-left: auto;
}
.faq-list summary span::before,
.faq-list summary span::after {
  position: absolute;
  inset: 50% 0 auto;
  height: 1.8px;
  border-radius: 2px;
  background: currentColor;
  transform: translateY(-50%);
  transition: transform 180ms ease, opacity 180ms ease;
  content: "";
}
.faq-list summary span::after { transform: translateY(-50%) rotate(90deg); }
.faq-list details[open] summary span::after { transform: translateY(-50%); opacity: 0; }
.faq-list p { margin: 0 0 20px; max-width: 78ch; color: var(--muted); font-size: 15px; }

/* ── Финальный CTA ────────────────────────────────────────────────────── */

.final-cta { padding-block: clamp(56px, 7vw, 96px); }
.final-cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(36px, 5vw, 60px) clamp(20px, 4vw, 48px);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 70% 120% at 50% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 66%),
    var(--panel);
  text-align: center;
}
.final-cta__inner img { margin-bottom: 18px; }
.kicker--center { margin-bottom: 16px; }
.final-cta .section-lead { margin-bottom: 26px; }

/* ── Подвал ───────────────────────────────────────────────────────────── */

.site-footer { border-top: 1px solid var(--line); padding-block: 28px 40px; }
.footer-about {
  display: grid;
  gap: 10px;
  max-width: 74ch;
  margin-bottom: 26px;
  color: var(--muted-2);
  font-size: 13.5px;
  line-height: 1.6;
}
.footer-about h2 { margin: 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.footer-about strong { color: var(--text); font-weight: 600; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}
.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-left: auto;
  color: var(--muted-2);
  font-size: 13.5px;
}
.footer-inner nav a:hover { color: var(--accent); }

/* ── Лаборатория настройки ────────────────────────────────────────────── */

.custom-lab {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.custom-controls {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.control-group { margin: 0; padding: 0; border: 0; }
.control-group legend {
  padding: 0;
  margin-bottom: 9px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 50%, transparent);
}
.segmented button {
  flex: 1;
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: background-color 160ms ease, color 160ms ease;
}
.segmented button.is-active { background: var(--accent); color: #06120d; }
html[data-theme="light"] .segmented button.is-active { color: #ffffff; }

.swatches { display: flex; gap: 10px; }
.swatch {
  width: 38px;
  height: 38px;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--swatch);
  transition: transform 160ms ease, border-color 160ms ease;
}
.swatch.is-active { border-color: var(--text); transform: scale(1.08); }

.control-note {
  display: flex;
  gap: 11px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
}
.control-note svg { width: 17px; height: 17px; flex: none; color: var(--accent); }
.control-note p { margin: 0; }
.control-note strong { color: var(--text); }

/* Предпросмотр приложения. Токены с префиксом `--preview-` живут отдельно от
   токенов лендинга: этот блок должен меняться от кнопок, а не от темы сайта. */
.custom-preview {
  display: grid;
  gap: 16px;
  --preview-bg: #0e1117;
  --preview-card: #161b24;
  --preview-text: #f2f4f7;
  --preview-muted: #8b93a3;
  --preview-line: rgba(255, 255, 255, 0.1);
  --preview-accent: #53e2af;
  --preview-radius: 12px;
  --preview-gap: 10px;
  --preview-pad: 12px;
}
.custom-preview[data-theme="light"] {
  --preview-bg: #f3f4f7;
  --preview-card: #ffffff;
  --preview-text: #171a22;
  --preview-muted: #6c7484;
  --preview-line: rgba(21, 24, 33, 0.1);
}
.custom-preview[data-theme="soft"] {
  --preview-bg: #1b1a24;
  --preview-card: #24222f;
  --preview-text: #f0ecf6;
  --preview-muted: #9b93ab;
  --preview-line: rgba(255, 255, 255, 0.09);
}
.custom-preview[data-color="mint"] { --preview-accent: #53e2af; }
.custom-preview[data-color="violet"] { --preview-accent: #9a8cff; }
.custom-preview[data-color="blue"] { --preview-accent: #6ca8ff; }
.custom-preview[data-color="coral"] { --preview-accent: #ff897d; }
.custom-preview[data-shape="sharp"] { --preview-radius: 3px; }
.custom-preview[data-shape="round"] { --preview-radius: 12px; }
.custom-preview[data-shape="capsule"] { --preview-radius: 22px; }
.custom-preview[data-density="compact"] { --preview-gap: 5px; --preview-pad: 8px; }
.custom-preview[data-density="normal"] { --preview-gap: 10px; --preview-pad: 12px; }
.custom-preview[data-density="spacious"] { --preview-gap: 16px; --preview-pad: 18px; }

.preview-window {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  min-height: 380px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--preview-bg);
  color: var(--preview-text);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: background-color 220ms ease, color 220ms ease;
}

.preview-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--preview-gap);
  padding: var(--preview-pad);
  border-right: 1px solid var(--preview-line);
  background: var(--preview-card);
}
.preview-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
}
.preview-brand img { width: 22px; height: 22px; }
.preview-sidebar nav { display: grid; gap: calc(var(--preview-gap) - 4px); }
.preview-sidebar nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: calc(var(--preview-pad) * 0.55) calc(var(--preview-pad) * 0.7);
  border-radius: var(--preview-radius);
  color: var(--preview-muted);
  font-size: 12.5px;
  font-weight: 600;
  transition: background-color 180ms ease, color 180ms ease, border-radius 180ms ease;
}
.preview-sidebar nav a svg { width: 15px; height: 15px; }
.preview-sidebar nav a.is-active {
  background: color-mix(in srgb, var(--preview-accent) 18%, transparent);
  color: var(--preview-accent);
}
.preview-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--preview-line);
  color: var(--preview-muted);
  font-size: 11.5px;
}
.preview-user i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--preview-accent) 22%, transparent);
  color: var(--preview-accent);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.preview-main { display: grid; gap: var(--preview-gap); padding: var(--preview-pad); align-content: start; }
.preview-head { display: flex; align-items: center; justify-content: space-between; }
.preview-head small { color: var(--preview-muted); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; }
.preview-head h3 { margin: 2px 0 0; font-family: var(--font-display); font-size: 20px; }

.mock-button {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: var(--preview-radius);
  background: var(--preview-accent);
  color: #06120d;
  font-size: 12px;
  font-weight: 700;
  transition: border-radius 180ms ease;
}

.preview-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--preview-gap); }
.preview-stats div {
  padding: calc(var(--preview-pad) * 0.75);
  border: 1px solid var(--preview-line);
  border-radius: var(--preview-radius);
  background: var(--preview-card);
  transition: border-radius 180ms ease;
}
.preview-stats span { display: block; color: var(--preview-muted); font-size: 10.5px; }
.preview-stats strong { font-family: var(--font-display); font-size: 22px; }
.preview-stats small { color: var(--preview-muted); font-size: 10px; font-weight: 400; }

.preview-content { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: var(--preview-gap); }
.preview-tasks {
  display: grid;
  gap: calc(var(--preview-gap) - 3px);
  padding: calc(var(--preview-pad) * 0.85);
  border: 1px solid var(--preview-line);
  border-radius: var(--preview-radius);
  background: var(--preview-card);
  transition: border-radius 180ms ease;
}
.preview-title { display: flex; align-items: baseline; justify-content: space-between; }
.preview-title h4 { margin: 0; font-size: 13px; }
.preview-title span { color: var(--preview-accent); font-size: 10.5px; }
.preview-task { display: flex; align-items: center; gap: 9px; font-size: 12px; }
.preview-task i {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  flex: none;
  border: 1px solid var(--preview-line);
  border-radius: calc(var(--preview-radius) * 0.4);
  font-style: normal;
}
.preview-task i svg { width: 11px; height: 11px; }
.preview-task.is-done i { background: var(--preview-accent); border-color: var(--preview-accent); color: #06120d; }
.preview-task.is-done span { color: var(--preview-muted); text-decoration: line-through; }

.preview-focus {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  padding: var(--preview-pad);
  border: 1px solid var(--preview-line);
  border-radius: var(--preview-radius);
  background: var(--preview-card);
  color: var(--preview-muted);
  font-size: 10.5px;
  text-align: center;
  transition: border-radius 180ms ease;
}
.preview-focus strong { color: var(--preview-text); font-family: var(--font-mono); font-size: 20px; }

.nav-editor {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.nav-editor__head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.nav-editor__head span { font-weight: 700; font-size: 14px; }
.nav-editor__head small { color: var(--muted-2); font-size: 12.5px; }
.nav-editor ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.nav-editor li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg) 40%, transparent);
  font-size: 13.5px;
}
.nav-editor li span { display: flex; align-items: center; gap: 9px; flex: 1; }
.nav-editor li span svg { width: 15px; height: 15px; color: var(--accent); }
.nav-editor li button {
  min-width: 30px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}
.nav-editor li button:hover { border-color: var(--accent); color: var(--accent); }

/* ── Адаптив ──────────────────────────────────────────────────────────── */

@media (max-width: 1080px) {
  .rail--tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .custom-lab { grid-template-columns: minmax(0, 1fr); }
  .custom-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .control-note { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .desktop-nav { display: none; }
  .menu-button { display: inline-flex; }
  .header-cta { display: none; }
  .theme-button span[data-theme-label] { display: none; }
  .theme-button { padding: 0; justify-content: center; }
  .rail--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-steps { grid-template-columns: minmax(0, 1fr); }
  .flow-steps li { border-right: 0; border-bottom: 1px solid var(--line); }
  .flow-steps li:last-child { border-bottom: 0; }
  .boundaries { grid-template-columns: minmax(0, 1fr); }
  .preview-window { grid-template-columns: minmax(0, 1fr); }
  .preview-sidebar { flex-direction: row; align-items: center; border-right: 0; border-bottom: 1px solid var(--preview-line); }
  .preview-brand { flex: none; padding-bottom: 0; }
  .preview-brand span { display: none; }
  .preview-sidebar nav { grid-auto-flow: column; grid-template-columns: none; overflow-x: auto; }
  .preview-user { display: none; }
}

@media (max-width: 760px) {
  :root { --gutter: 18px; --header-height: 60px; }

  /* Горизонтальные ленты. Кровля до краёв экрана — чтобы карточка «выглядывала»
     и было видно, что дальше есть ещё. */
  .rail {
    display: flex;
    gap: 12px;
    margin-inline: calc(var(--gutter) * -1);
    padding: 4px var(--gutter) 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .rail::-webkit-scrollbar { display: none; }
  .rail > * {
    flex: 0 0 min(78%, 300px);
    scroll-snap-align: center;
  }
  .rail--price > * { flex-basis: min(84%, 320px); }

  .rail-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 2px 0 0;
    color: var(--muted-2);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .rail-hint svg { width: 15px; height: 15px; }

  /* На мобильном сцена важнее списка преимуществ: она должна попасть
     в первый экран, а чипы уезжают под неё. */
  .hero-demo-wrap { order: 5; margin-top: 22px; }
  .hero-features { order: 6; }
  /* Подводка должна уложиться в две строки: на 390px 17px давали три. */
  .hero-lead { font-size: 15px; margin-top: 12px; }
  .hero-actions { margin-top: 20px; }
  .hero-features li { font-size: 12.5px; padding: 6px 11px; }
  .hero-actions { width: 100%; flex-direction: column; gap: 10px; }
  .hero-actions .button { width: 100%; }
  .hero h1 { max-width: none; }

  .demo-canvas { --thought-w: calc(100% - 26px); height: 268px; }
  .thought { font-size: 13px; padding: 10px 12px; }
  .hero-demo:not(.is-chaos) .thought { transform: translate(0, calc(var(--order) * 50px)); }
  .demo-rail span { height: 42px; }
  .demo-switch { flex-direction: column; gap: 8px; }
  .demo-switch__group { width: 100%; }
  .demo-switch button { flex: 1; padding: 0 12px; }

  .custom-controls { grid-template-columns: minmax(0, 1fr); }
  .preview-content { grid-template-columns: minmax(0, 1fr); }
  .footer-inner nav { margin-left: 0; }
  .tools-extra { font-size: 13px; }
}

@media (max-width: 380px) {
  .rail > * { flex-basis: 86%; }
  .hero-features li { flex: 1 1 calc(50% - 8px); justify-content: center; }
}

/* ── Уважение к reduced-motion ────────────────────────────────────────── */

@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;
  }
}
