/* ==========================================================================
   «Все смены» — лендинг
   Палитра взята из самого сервиса (client/src/styles.css): основной #0F6E63,
   чернила #16302E, фон #F1F5F4, бирюза из сайдбара #4FBFAE. Сайт и продукт
   должны выглядеть одной вещью — заказчик увидит этот цвет потом каждый день.

   Тема одна, светлая, с тёмными разделами. Это решение, а не упущение:
   сервис светлый, и лендинг показывает его таким, какой он есть.
   ========================================================================== */

:root {
  --ground:       #F1F5F4;
  --surface:      #FFFFFF;
  --surface-2:    #E8EFED;
  --ink:          #16302E;
  --ink-2:        #4A6360;
  --ink-3:        #6F8784;
  --line:         #D5DFDD;
  --line-soft:    #E3EAE8;

  --primary:      #0F6E63;
  --primary-dark: #0B544B;
  --mint:         #4FBFAE;
  --mint-soft:    #DCEFEB;

  --alert:        #C2452D;
  --alert-soft:   #FDF0ED;
  --warn:         #A9700F;
  --warn-soft:    #FDF6E7;
  --ok:           #17795E;

  /* тёмные разделы */
  --night:        #16302E;
  --night-2:      #112624;
  --night-card:   #1C3A37;
  --on-night:     #E7F0EE;
  --on-night-2:   #9DBCB7;
  --night-line:   rgba(231, 240, 238, .12);

  --serif: 'Literata', 'PT Serif', Georgia, serif;
  --sans:  'Golos Text', 'PT Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono:  'JetBrains Mono', 'Consolas', ui-monospace, monospace;

  --fs-xs:  .8125rem;
  --fs-sm:  .9375rem;
  --fs-md:  1.0625rem;
  --fs-lg:  1.25rem;
  --fs-xl:  clamp(1.5rem, 2.2vw, 1.875rem);
  --fs-h2:  clamp(2rem, 3.8vw, 3.125rem);
  --fs-h1:  clamp(2.5rem, 5.4vw, 4.5rem);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;

  --wrap: 1180px;
  --gutter: clamp(18px, 4vw, 40px);
  --section: clamp(72px, 10vw, 132px);

  --shadow-sm: 0 1px 2px rgba(22, 48, 46, .06), 0 2px 8px rgba(22, 48, 46, .04);
  --shadow-md: 0 2px 4px rgba(22, 48, 46, .05), 0 18px 40px -18px rgba(22, 48, 46, .28);
  --shadow-lg: 0 30px 80px -30px rgba(11, 40, 37, .55), 0 10px 24px -12px rgba(11, 40, 37, .3);

  --ease: cubic-bezier(.22, .8, .24, 1);
  --header-h: 72px;
}

/* ---------- основа ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
  interpolate-size: allow-keywords;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
ul, ol { margin: 0; padding: 0; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-sm);
  text-decoration: none; transition: top .2s;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: var(--section) 0; position: relative; }
.section--surface { background: var(--surface); }
.section--night { background: var(--night); color: var(--on-night); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
}
.eyebrow::before {
  content: ""; width: 22px; height: 1.5px; background: currentColor; opacity: .6;
}
.section--night .eyebrow { color: var(--mint); }

.h2 {
  font-family: var(--serif);
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.02em;
}
.h2 em, .h1 em { font-style: italic; font-weight: 500; color: var(--primary); }
.section--night .h2 em { color: var(--mint); }

.lead { font-size: var(--fs-lg); color: var(--ink-2); max-width: 60ch; line-height: 1.55; }
.section--night .lead { color: var(--on-night-2); }

.section-head { display: flex; flex-direction: column; gap: 18px; margin-bottom: clamp(40px, 6vw, 64px); max-width: 780px; }
.section-head--center { margin-inline: auto; text-align: center; align-items: center; }

/* ---------- кнопки ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: var(--fs-md); text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), background-color .2s, border-color .2s, box-shadow .25s var(--ease), color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }

.btn--primary { background: var(--primary); color: #fff; box-shadow: 0 10px 24px -12px rgba(15, 110, 99, .8); }
.btn--primary:hover { background: var(--primary-dark); box-shadow: 0 16px 30px -14px rgba(15, 110, 99, .9); }

.btn--ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); background: var(--surface); }

.btn--mint { background: var(--mint); color: var(--night-2); }
.btn--mint:hover { background: #6CCDBE; }

.btn--sm { min-height: 42px; padding: 0 20px; font-size: var(--fs-sm); }
.btn--block { width: 100%; }

/* ==========================================================================
   Шапка
   ========================================================================== */

.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  transition: background-color .3s, box-shadow .3s, height .3s var(--ease);
}
.header.is-scrolled {
  background: rgba(241, 245, 244, .82);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--line);
  --header-h: 64px;
  height: 64px;
}

.header .wrap { height: 100%; display: flex; align-items: center; gap: 28px; }

.brand {
  display: inline-flex; align-items: center; gap: 11px;
  text-decoration: none; font-weight: 650; font-size: 1.0625rem; letter-spacing: -.01em;
  flex-shrink: 0;
}
.brand img { display: block; height: 48px; width: auto; transition: height .3s var(--ease); }
.header.is-scrolled .brand img { height: 42px; }
@media (max-width: 640px) { .brand img { height: 42px; } }
.footer .brand img { height: 46px; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  text-decoration: none; font-size: var(--fs-sm); color: var(--ink-2);
  padding: 8px 14px; border-radius: 999px; transition: color .2s, background-color .2s;
}
.nav a:hover { color: var(--ink); background: rgba(22, 48, 46, .06); }
.nav a.is-active { color: var(--primary); }

.header .btn { margin-left: 10px; }

/* Телефон в шапке: номером — где есть место, кнопкой звонка — на телефоне */
.header-phone {
  font-weight: 600; font-size: var(--fs-sm); text-decoration: none; white-space: nowrap;
  font-variant-numeric: tabular-nums; margin-left: 12px; transition: color .2s;
}
.header-phone:hover { color: var(--primary); }
.header--doc .header-phone { margin-left: auto; }
.call {
  display: none; place-items: center; width: 46px; height: 46px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--primary); margin-left: auto;
}
.call svg { width: 20px; height: 20px; }
.menu-phone { font-family: var(--sans) !important; font-variant-numeric: tabular-nums; color: var(--primary); }

.burger {
  display: none; margin-left: auto;
  width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; position: relative;
}
/* Толщина полосок — целые пиксели, и крайние отсчитываются от верха средней:
   при дробной толщине браузер округлял их в разные стороны, и промежутки
   получались неравными */
.burger span, .burger span::before, .burger span::after {
  position: absolute; left: 50%; top: calc(50% - 1px); width: 18px; height: 2px; margin-left: -9px;
  background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s;
}
.burger span::before, .burger span::after { content: ""; left: 0; top: 0; margin: 0; }
.burger span::before { transform: translateY(-6px); }
.burger span::after  { transform: translateY(6px); }
.menu-open .burger span { background: transparent; }
.menu-open .burger span::before { transform: rotate(45deg); background: var(--ink); }
.menu-open .burger span::after  { transform: rotate(-45deg); background: var(--ink); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 45;
  background: var(--ground);
  padding: calc(var(--header-h) + 24px) var(--gutter) 32px;
  display: flex; flex-direction: column; gap: 6px;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s linear .3s;
}
.menu-open .mobile-menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.mobile-menu a:not(.btn) {
  font-family: var(--serif); font-size: 1.75rem; font-weight: 600; text-decoration: none;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.mobile-menu .btn { margin-top: 24px; }
.mobile-menu .btn + .btn { margin-top: 10px; }

/* Вход в CRM для действующих клиентов. Заявки в шапке нет: к ней ведут первый экран,
   тарифы, кнопки в разделах и плавающая кнопка. На узком экране подпись короче:
   «Войти», а совсем на маленьком — только значок. */
.header-login { padding: 0 16px; gap: 8px; }
.header-login svg { width: 17px; height: 17px; flex-shrink: 0; }
.header-login .hl-short { display: none; }

/* Переход к заявке внутри раздела */
.section-cta { margin-top: 32px; }
.launch-aside .section-cta { margin-top: 8px; align-self: flex-start; }
.mobile-menu .menu-phone { border-bottom: 0; }

/* ==========================================================================
   Первый экран
   ========================================================================== */

.hero {
  padding: calc(var(--header-h) + clamp(40px, 7vw, 88px)) 0 clamp(64px, 9vw, 112px);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; z-index: 0;
  width: 900px; height: 900px; right: -260px; top: -180px;
  background: radial-gradient(closest-side, rgba(79, 191, 174, .28), rgba(79, 191, 174, 0) 70%);
  pointer-events: none;
}
.hero .wrap {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
}

.hero-copy { display: flex; flex-direction: column; gap: 26px; }

.h1 {
  font-family: var(--serif);
  font-size: var(--fs-h1);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.028em;
}
.h1 em { display: inline; }

.hero .lead { font-size: clamp(1.0625rem, 1.4vw, 1.25rem); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }

.hero-facts {
  display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 8px;
  font-family: var(--mono); font-size: var(--fs-xs); color: var(--ink-3); list-style: none;
}
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--mint); }

/* ---------- телефон с чатом ---------- */

.stage { position: relative; display: flex; justify-content: center; padding: 20px 0; }

.phone {
  width: min(360px, 100%);
  background: #0E1D1C;
  border-radius: 46px;
  padding: 11px;
  box-shadow: var(--shadow-lg), inset 0 0 0 1.5px rgba(255, 255, 255, .08);
  position: relative;
}
.phone::before {
  content: ""; position: absolute; top: 20px; left: 50%; width: 92px; height: 24px; margin-left: -46px;
  background: #0E1D1C; border-radius: 20px; z-index: 3;
}

.screen {
  border-radius: 36px; overflow: hidden;
  background: #E6EEEC;
  display: flex; flex-direction: column;
  min-height: 600px;
}

.chat-head {
  background: var(--surface);
  padding: 50px 18px 14px;
  display: flex; align-items: center; gap: 11px;
  border-bottom: 1px solid var(--line-soft);
}
.chat-head .ava {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: var(--primary); display: grid; place-items: center;
}
.chat-head .ava svg { width: 22px; height: 22px; }
.chat-head b { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.25; }
.chat-head span { font-size: 12px; color: var(--ink-3); }
.chat-head .max {
  margin-left: auto; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em;
  color: var(--primary); background: var(--mint-soft); padding: 3px 8px; border-radius: 6px;
}

.chat-body {
  flex: 1; padding: 14px 12px 16px;
  display: flex; flex-direction: column; gap: 9px;
  font-size: 13.5px; line-height: 1.45;
}

.day {
  align-self: center; font-size: 11.5px; color: var(--ink-3);
  background: rgba(255, 255, 255, .7); padding: 2px 10px; border-radius: 999px; margin: 4px 0;
}

.msg {
  max-width: 88%; padding: 9px 12px 7px; border-radius: 16px 16px 16px 5px;
  background: var(--surface); box-shadow: var(--shadow-sm); position: relative;
}
.msg .t { display: block; text-align: right; font-size: 10.5px; color: var(--ink-3); margin-top: 3px; font-variant-numeric: tabular-nums; }
.msg--old { opacity: .62; }
.msg--old p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.msg--report { max-width: 94%; padding: 11px 13px 8px; }
.msg--report .ttl { font-weight: 650; display: block; margin-bottom: 4px; }
.msg--report .row { display: block; }
.msg--report .row b { font-weight: 600; }
.msg--report .note { display: block; margin-top: 4px; }

.msg--out {
  align-self: flex-end; border-radius: 16px 16px 5px 16px;
  background: #D2F0E9; box-shadow: none;
}
.msg--out .t::after { content: " ✓✓"; color: var(--primary); letter-spacing: -2px; }

.typing {
  display: inline-flex; gap: 4px; align-items: center;
  padding: 12px 14px; border-radius: 16px 16px 16px 5px; background: var(--surface);
  align-self: flex-start; box-shadow: var(--shadow-sm);
}
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: typing 1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-3px); opacity: 1; } }

.chat-input {
  margin: 0 10px 12px; background: var(--surface); border-radius: 999px;
  padding: 11px 16px; font-size: 13px; color: var(--ink-3);
  display: flex; align-items: center; justify-content: space-between;
}
.chat-input i { width: 26px; height: 26px; border-radius: 50%; background: var(--primary); opacity: .9; }

/* воспроизведение сценария: по умолчанию всё видно, скрываем только на время показа */
.replay [data-step] { opacity: 0; transform: translateY(8px); }
.replay [data-step].on { opacity: 1; transform: none; transition: opacity .45s var(--ease), transform .45s var(--ease); }
.typing[hidden] { display: none; }

/* плашки CRM вокруг телефона */
.chip {
  position: absolute; z-index: 4;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line);
  padding: 10px 14px; border-radius: 14px; box-shadow: var(--shadow-md);
  font-size: 13px; line-height: 1.3; white-space: nowrap;
}
.chip b { display: block; font-weight: 600; }
.chip span { color: var(--ink-3); font-size: 12px; }
.chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); flex-shrink: 0; box-shadow: 0 0 0 4px rgba(23, 121, 94, .15); }
.chip .coin {
  width: 30px; height: 30px; border-radius: 9px; background: var(--mint-soft); color: var(--primary);
  display: grid; place-items: center; font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.chip--top { top: 70px; left: -34px; animation: float 6s ease-in-out infinite; }
.chip--bottom { bottom: -6px; right: -30px; animation: float 6s ease-in-out -3s infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ==========================================================================
   Как проходит смена — таймлайн
   ========================================================================== */

.timeline {
  list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px; position: relative; counter-reset: step;
  /* Своя плоскость отрисовки: линия ниже шагов при любых их слоях.
     Пока шаги проявляются, прозрачность делает каждый шаг отдельным слоем,
     и без этого линия, идущая в разметке последней, ложилась поверх плашек. */
  isolation: isolate;
}
.timeline::before, .timeline::after {
  content: ""; position: absolute; z-index: -1;
  left: 0; right: 0; height: 2px; border-radius: 2px;
  /* ровно по центру плашки времени: её высота задана ниже, 40px */
  top: 19px;
}
.timeline::before { background: var(--line); }
.timeline::after {
  background: linear-gradient(90deg, var(--primary), var(--mint));
  transform-origin: left center;
}

.step { position: relative; display: flex; flex-direction: column; gap: 12px; padding-top: 0; }
.step-time {
  align-self: flex-start;
  display: inline-flex; align-items: center; height: 40px; padding: 0 14px;
  font-family: var(--mono); font-size: var(--fs-sm); font-weight: 500;
  background: var(--surface); border: 1.5px solid var(--primary); color: var(--primary);
  border-radius: 999px; line-height: 1; font-variant-numeric: tabular-nums;
}
.step:last-child .step-time { background: var(--primary); color: #fff; }
.step h3 { font-size: var(--fs-lg); font-weight: 650; line-height: 1.3; margin-top: 10px; }
.step p { color: var(--ink-2); font-size: var(--fs-sm); }
.step .who {
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
}

.alert-note {
  margin-top: 44px; display: flex; gap: 16px; align-items: flex-start;
  background: var(--alert-soft); border: 1px solid #F3D3CB; border-radius: var(--r-md);
  padding: 18px 22px; max-width: 820px;
}
.alert-note .pulse {
  width: 12px; height: 12px; border-radius: 50%; background: var(--alert); flex-shrink: 0; margin-top: 7px;
  box-shadow: 0 0 0 0 rgba(194, 69, 45, .5); animation: pulse 2s infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(194, 69, 45, .45); } 70% { box-shadow: 0 0 0 12px rgba(194, 69, 45, 0); } 100% { box-shadow: 0 0 0 0 rgba(194, 69, 45, 0); } }
.alert-note b { color: var(--alert); }
.alert-note p { font-size: var(--fs-sm); color: var(--ink-2); }

/* ==========================================================================
   Отчёт семье — главный раздел
   ========================================================================== */

.usp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 88px); align-items: start; }

.anatomy { position: relative; }
.anatomy-card {
  background: var(--surface); color: var(--ink); border-radius: var(--r-lg);
  padding: 26px 26px 22px; font-size: var(--fs-md); line-height: 1.55;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .6);
  position: relative;
}
.anatomy-card .src {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft); font-size: var(--fs-sm); color: var(--ink-3);
}
.anatomy-card .src i { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); display: grid; place-items: center; }
.anatomy-card .src i svg { width: 16px; height: 16px; }

.part { display: block; position: relative; padding: 6px 10px; margin: 0 -10px; border-radius: 8px; transition: background-color .3s; }
.part b { font-weight: 600; }
.part.is-lit { background: var(--mint-soft); }
.part-ttl { font-weight: 650; }

.anatomy-legend { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; margin-top: 28px; }
.anatomy-legend li {
  display: flex; gap: 12px; align-items: flex-start; font-size: var(--fs-sm); color: var(--on-night-2);
  cursor: default; transition: color .2s;
}
.anatomy-legend li:hover, .anatomy-legend li.is-lit { color: var(--on-night); }
.anatomy-legend .n {
  width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%;
  border: 1.5px solid var(--mint); color: var(--mint);
  display: grid; place-items: center; font-family: var(--mono); font-size: 11.5px; font-weight: 500;
}
.anatomy-legend b { display: block; color: var(--on-night); font-weight: 600; }

.usp-points { display: flex; flex-direction: column; gap: 0; margin-top: 36px; }
.usp-point {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px;
  padding: 22px 0; border-top: 1px solid var(--night-line);
}
.usp-point:last-child { border-bottom: 1px solid var(--night-line); }
.usp-point .ic {
  width: 44px; height: 44px; border-radius: 12px; background: var(--night-card);
  display: grid; place-items: center; color: var(--mint);
}
.usp-point .ic svg { width: 22px; height: 22px; }
.usp-point h3 { font-size: var(--fs-lg); font-weight: 600; margin-bottom: 4px; color: var(--on-night); }
.usp-point p { font-size: var(--fs-sm); color: var(--on-night-2); }

.quote {
  margin-top: 40px; padding-left: 22px; border-left: 2px solid var(--mint);
  font-family: var(--serif); font-style: italic; font-size: var(--fs-xl); line-height: 1.4; color: var(--on-night);
}
.quote cite { display: block; margin-top: 12px; font-family: var(--sans); font-style: normal; font-size: var(--fs-sm); color: var(--on-night-2); }

/* ==========================================================================
   Было / стало
   ========================================================================== */

.compare { list-style: none; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.compare li {
  display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1.15fr);
  align-items: center; gap: 12px; padding: 22px 0; border-bottom: 1px solid var(--line);
}
.compare .was { color: var(--ink-3); font-size: var(--fs-md); text-decoration: line-through; text-decoration-color: rgba(194, 69, 45, .55); text-decoration-thickness: 1.5px; }
.compare .arrow { color: var(--primary); display: grid; place-items: center; }
.compare .arrow svg { width: 26px; height: 26px; }
.compare .now { font-size: var(--fs-md); font-weight: 550; }
.compare .tag {
  display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 400; margin-bottom: 4px; text-decoration: none;
}
.compare .now .tag { color: var(--primary); }

/* ==========================================================================
   Возможности — сетка
   ========================================================================== */

.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }

.cell {
  grid-column: span 4;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  padding: 28px; display: flex; flex-direction: column; gap: 14px;
  position: relative; overflow: hidden; isolation: isolate;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.cell::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .35s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(79, 191, 174, .14), transparent 60%);
}
@media (hover: hover) and (pointer: fine) {
  .cell:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line); }
  .cell:hover::before { opacity: 1; }
}

.cell--7 { grid-column: span 7; }
.cell--5 { grid-column: span 5; }

.cell h3 { font-size: var(--fs-lg); font-weight: 650; line-height: 1.3; }
.cell p { color: var(--ink-2); font-size: var(--fs-sm); }
.cell .kicker { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }

.mini {
  margin-top: auto; background: var(--ground); border-radius: var(--r-md);
  padding: 16px; font-size: 13px; line-height: 1.4;
}

/* мини: загруженность */
.heat { display: grid; grid-template-columns: 94px repeat(7, minmax(0, 1fr)); gap: 5px; align-items: center; }
.heat .h-name { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.heat .h-day { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); text-align: center; }
.heat .c {
  height: 30px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line-soft);
  font-family: var(--mono); font-size: 11px; display: grid; place-items: center; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.heat .c.w1 { background: #E3F2EF; border-color: #CBE7E1; }
.heat .c.w2 { background: #BFE3DB; border-color: #A7D8CD; color: var(--primary-dark); }
.heat .c.over { background: var(--alert-soft); border: 1.5px solid var(--alert); color: var(--alert); font-weight: 600; }
.heat .c.clash {
  border: 1.5px solid var(--warn); color: var(--warn); font-weight: 600;
  background: repeating-linear-gradient(45deg, var(--warn-soft) 0 5px, #F8E7C2 5px 10px);
}
.heat-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 12px; color: var(--ink-3); }
.heat-legend span { display: inline-flex; align-items: center; gap: 6px; }
.heat-legend i { width: 10px; height: 10px; border-radius: 3px; }

/* мини: алерт */
.alerts-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;
  font-size: 12px; font-weight: 600; color: var(--alert);
}
.alerts-head .count { background: var(--alert); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 11px; }
.alert-card {
  background: var(--surface); border: 1px solid #F3D3CB; border-radius: 12px; padding: 12px 14px;
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 2px 12px; align-items: center;
}
.alert-card + .alert-card { margin-top: 8px; }
.alert-card .pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--alert); animation: pulse 2s infinite; }
.alert-card b { font-weight: 600; font-size: 13px; }
.alert-card .sub { grid-column: 2 / -1; color: var(--ink-3); font-size: 12px; }
.alert-card .late { color: var(--alert); font-weight: 500; font-family: var(--mono); font-size: 11.5px; white-space: nowrap; }

/* мини: депозит */
.meter { display: flex; flex-direction: column; gap: 10px; }
.meter-top { display: flex; justify-content: space-between; align-items: baseline; font-variant-numeric: tabular-nums; }
.meter-top b { font-family: var(--mono); font-size: 15px; font-weight: 500; }
.meter-bar { height: 8px; border-radius: 99px; background: var(--line-soft); overflow: hidden; }
.meter-bar i { display: block; height: 100%; width: 22%; border-radius: 99px; background: linear-gradient(90deg, var(--warn), #D69A2F); }
.meter-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-3); }
.meter-foot .pill { background: var(--primary); color: #fff; padding: 5px 11px; border-radius: 999px; font-weight: 600; font-size: 11.5px; }

/* мини: заполнение графика */
.fill { display: flex; flex-direction: column; gap: 8px; }
.fill-row { display: flex; justify-content: space-between; gap: 10px; }
.fill-row b { font-family: var(--mono); font-weight: 500; }
.fill-skip { color: var(--warn); font-size: 12px; border-top: 1px dashed var(--line); padding-top: 8px; }

/* мини: надбавка */
.split { display: flex; flex-direction: column; gap: 9px; }
.split-bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; }
.split-bar .cg { background: var(--mint); flex: 63; }
.split-bar .ct { background: var(--primary); flex: 37; }
.split-row { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
.split-row b { font-family: var(--mono); font-weight: 500; }
.split-row .sw { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); }
.split-row .sw i { width: 9px; height: 9px; border-radius: 2px; }

/* мини: шаблон договора */
.doc {
  background: var(--surface); border-radius: 10px; padding: 14px 16px; border: 1px solid var(--line-soft);
  font-family: var(--serif); font-size: 12.5px; line-height: 1.7; color: var(--ink-2);
}
.doc code {
  font-family: var(--mono); font-size: 11px; color: var(--primary); background: var(--mint-soft);
  padding: 1px 5px; border-radius: 4px;
}

/* мини: роли */
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.role { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; padding: 11px 12px; }
.role b { display: block; font-size: 13px; margin-bottom: 4px; }
.role span { display: block; font-size: 12px; color: var(--ink-3); }
.role .yes { color: var(--ok); }
.role .no { color: var(--ink-3); text-decoration: line-through; }

/* мини: отчёты */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 64px; }
.bars i { flex: 1; border-radius: 4px 4px 2px 2px; background: #BFE3DB; }
.bars i:nth-child(5) { background: var(--primary); }
.bars-foot { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.bars-foot b { color: var(--ink); font-family: var(--mono); font-weight: 500; }

.cell--flat { padding: 24px 26px; gap: 10px; }
.cell--flat .ic {
  width: 42px; height: 42px; border-radius: 12px; background: var(--mint-soft); color: var(--primary);
  display: grid; place-items: center;
}
.cell--flat .ic svg { width: 22px; height: 22px; }

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

.billing {
  display: inline-flex; padding: 5px; border-radius: 999px; background: var(--surface-2);
  position: relative; margin: 0 auto 40px;
}
.billing button {
  position: relative; z-index: 1; border: 0; background: transparent; cursor: pointer;
  padding: 11px 22px; border-radius: 999px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2);
  transition: color .25s;
}
.billing button[aria-pressed="true"] { color: var(--ink); }
.billing .save {
  font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--primary);
  background: var(--mint-soft); padding: 2px 7px; border-radius: 6px; margin-left: 6px;
}
.billing .knob {
  position: absolute; top: 5px; bottom: 5px; left: 5px; border-radius: 999px; background: var(--surface);
  box-shadow: var(--shadow-sm); transition: transform .35s var(--ease), width .35s var(--ease);
}
.billing:not(.is-ready) button[aria-pressed="true"] { background: var(--surface); box-shadow: var(--shadow-sm); }
.billing-wrap { display: flex; justify-content: center; }

.tiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }

.tier {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  padding: 28px 24px 24px; display: flex; flex-direction: column; gap: 20px; position: relative;
}
.tier--hot {
  background: var(--night); color: var(--on-night); border-color: var(--night);
  box-shadow: var(--shadow-lg);
}
.tier-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tier-name { font-family: var(--serif); font-size: 1.625rem; font-weight: 600; letter-spacing: -.01em; }
.tier-badge {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  background: var(--mint); color: var(--night-2); padding: 4px 10px; border-radius: 999px; font-weight: 500;
}
.tier-scope { font-size: var(--fs-sm); color: var(--ink-3); margin-top: -12px; }
/* В ряду из четырёх карточек подпись про штат у «Сети» длиннее остальных —
   резервируем три строки всем, чтобы цены стояли на одной линии */
@media (min-width: 1101px) {
  .tier-scope { min-height: calc(3 * 1.6em); }
}
.tier--hot .tier-scope { color: var(--on-night-2); }

.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-num {
  font-family: var(--serif); font-size: clamp(2.125rem, 2.8vw, 2.625rem); font-weight: 700; letter-spacing: -.03em;
  line-height: 1; font-variant-numeric: tabular-nums;
}
.price-unit { font-size: var(--fs-sm); color: var(--ink-3); }
.tier--hot .price-unit { color: var(--on-night-2); }
.price-note { font-size: 13px; color: var(--ink-3); min-height: 1.4em; font-variant-numeric: tabular-nums; margin-top: 10px; }
.tier--hot .price-note { color: var(--on-night-2); }

.tier-setup {
  font-size: 13px; color: var(--ink-2); margin-top: 8px; font-variant-numeric: tabular-nums;
}
.tier-setup b { font-weight: 600; color: var(--ink); }
.tier--hot .tier-setup { color: var(--on-night-2); }
.tier--hot .tier-setup b { color: var(--on-night); }

.tier ul { list-style: none; display: flex; flex-direction: column; gap: 11px; font-size: var(--fs-sm); padding-top: 20px; border-top: 1px solid var(--line-soft); }
.tier--hot ul { border-top-color: var(--night-line); }
.tier li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; color: var(--ink-2); }
.tier--hot li { color: var(--on-night-2); }
.tier li svg { width: 18px; height: 18px; color: var(--primary); margin-top: 2px; }
.tier--hot li svg { color: var(--mint); }
.tier li.base { color: var(--ink); font-weight: 600; }
.tier--hot li.base { color: var(--on-night); }

.tier .btn { margin-top: auto; }

.terms {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 18px; margin-top: 18px;
}
.term {
  border: 1px dashed var(--line); border-radius: var(--r-lg); padding: 24px 26px;
  display: flex; flex-direction: column; gap: 6px;
}
.term .big { font-family: var(--serif); font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.term .big small { font-family: var(--sans); font-size: var(--fs-sm); font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.term b { font-weight: 650; }
.term p { font-size: var(--fs-sm); color: var(--ink-2); }

.pricing-more { text-align: center; margin-top: 34px; font-size: var(--fs-sm); color: var(--ink-2); }
.pricing-more a { color: var(--primary); font-weight: 600; text-decoration: none; border-bottom: 1.5px solid rgba(15, 110, 99, .3); transition: border-color .2s; }
.pricing-more a:hover { border-color: var(--primary); }
.pricing-more a[href^="tel:"] { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Внедрение
   ========================================================================== */

.launch { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 88px); align-items: start; }
.launch-aside { position: sticky; top: calc(var(--header-h) + 32px); display: flex; flex-direction: column; gap: 20px; }
.launch-days { display: flex; align-items: baseline; gap: 12px; margin-top: 10px; }
.launch-days b { font-family: var(--serif); font-size: clamp(4rem, 8vw, 6.5rem); font-weight: 700; line-height: .9; color: var(--primary); letter-spacing: -.04em; }
.launch-days span { font-size: var(--fs-md); color: var(--ink-2); line-height: 1.35; }

.launch-steps { list-style: none; counter-reset: ls; display: flex; flex-direction: column; }
.launch-steps li {
  counter-increment: ls;
  display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 18px;
  padding: 26px 0; border-top: 1px solid var(--line);
}
.launch-steps li:last-child { border-bottom: 1px solid var(--line); }
.launch-steps li::before {
  content: counter(ls, decimal-leading-zero);
  font-family: var(--mono); font-size: var(--fs-sm); color: var(--primary); font-weight: 500;
  padding-top: 3px;
}
.launch-steps h3 { font-size: var(--fs-lg); font-weight: 650; margin-bottom: 6px; }
.launch-steps p { color: var(--ink-2); font-size: var(--fs-sm); }

/* ==========================================================================
   Вопросы
   ========================================================================== */

.faq { max-width: 860px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 24px 0; font-size: var(--fs-lg); font-weight: 600; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .pm {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid var(--line);
  position: relative; transition: transform .35s var(--ease), background-color .25s, border-color .25s;
}
.faq summary .pm::before, .faq summary .pm::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.8px; margin: -.9px 0 0 -6px;
  background: var(--ink); border-radius: 2px; transition: transform .35s var(--ease);
}
.faq summary .pm::after { transform: rotate(90deg); }
.faq details[open] summary .pm { background: var(--primary); border-color: var(--primary); transform: rotate(180deg); }
.faq details[open] summary .pm::before, .faq details[open] summary .pm::after { background: #fff; }
.faq details[open] summary .pm::after { transform: rotate(0); }
.faq summary:hover .pm { border-color: var(--ink); }
.faq .answer { padding: 0 56px 26px 0; color: var(--ink-2); max-width: 70ch; }

.faq details::details-content {
  block-size: 0; overflow: hidden;
  transition: block-size .4s var(--ease), content-visibility .4s allow-discrete;
}
.faq details[open]::details-content { block-size: auto; }

/* ==========================================================================
   Заявка
   ========================================================================== */

.cta { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(40px, 6vw, 88px); align-items: start; }
.cta-copy { display: flex; flex-direction: column; gap: 22px; }
.cta-list { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.cta-list li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; color: var(--on-night-2); font-size: var(--fs-md); }
.cta-list li svg { width: 22px; height: 22px; color: var(--mint); margin-top: 2px; }
.cta-list b { color: var(--on-night); font-weight: 600; }

.form {
  background: var(--surface); color: var(--ink); border-radius: var(--r-lg);
  padding: clamp(24px, 3.5vw, 40px); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .6);
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px 18px;
  align-items: end;
}
.form .full { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 7px; position: relative; }
.field label { font-size: var(--fs-sm); font-weight: 600; }
.field label .opt { font-weight: 400; color: var(--ink-3); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 13px 16px;
  background: var(--ground); border: 1.5px solid transparent; border-radius: 12px;
  font-size: var(--fs-md); color: var(--ink);
  transition: border-color .2s, background-color .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 104px; resize: vertical; line-height: 1.5; }
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%234A6360' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
  padding-right: 44px; cursor: pointer;
}
.field input::placeholder, .field textarea::placeholder { color: #93A6A3; }
.field input:hover, .field select:hover, .field textarea:hover { background: var(--surface-2); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); background: var(--surface);
  box-shadow: 0 0 0 4px rgba(15, 110, 99, .12);
}
.field.is-invalid input, .field.is-invalid select { border-color: var(--alert); background: var(--alert-soft); }
.field .err {
  position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px;
  font-size: 12.5px; line-height: 1.3; color: var(--alert); display: none;
}
.field.is-invalid .err { display: block; }

.consent { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; font-size: 13px; color: var(--ink-2); line-height: 1.5; cursor: pointer; }
.consent input {
  width: 22px; height: 22px; margin: 0; border-radius: 6px; border: 1.5px solid var(--line);
  -webkit-appearance: none; appearance: none; background: var(--surface); cursor: pointer; position: relative;
  transition: background-color .2s, border-color .2s;
}
.consent input:checked { background: var(--primary); border-color: var(--primary); }
.consent input:checked::after {
  content: ""; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.consent.is-invalid input { border-color: var(--alert); }
.consent a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }

.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.form-status { font-size: var(--fs-sm); min-height: 1.4em; }
.form-status.is-error { color: var(--alert); }

.form .btn[disabled] { opacity: .7; cursor: progress; transform: none; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: spin .8s linear infinite; display: none;
}
.is-sending .spinner { display: block; }
.is-sending .btn-label-arrow { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-done {
  background: var(--surface); color: var(--ink); border-radius: var(--r-lg);
  padding: clamp(32px, 5vw, 56px); text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .6);
}
.form-done .ok-ic {
  width: 64px; height: 64px; border-radius: 50%; background: var(--mint-soft); color: var(--primary);
  display: grid; place-items: center;
}
.form-done .ok-ic svg { width: 30px; height: 30px; }
.form-done h3 { font-family: var(--serif); font-size: 1.75rem; font-weight: 600; }
.form-done p { color: var(--ink-2); max-width: 40ch; }

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

.footer { background: var(--night-2); color: var(--on-night-2); padding: 56px 0 40px; font-size: var(--fs-sm); }
.footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer .brand { color: var(--on-night); }
.footer p { margin-top: 14px; max-width: 38ch; }
.footer h4 { font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; color: var(--on-night-2); margin-bottom: 14px; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer a { text-decoration: none; color: var(--on-night); opacity: .85; transition: opacity .2s; }
.footer a:hover { opacity: 1; }
.footer .footer-phone {
  display: inline-block; margin-top: 18px; font-size: 1.25rem; font-weight: 600; opacity: 1;
  font-variant-numeric: tabular-nums;
}
.footer .copy a { text-decoration: underline; text-underline-offset: 2px; }
.footer .copy { grid-column: 1 / -1; border-top: 1px solid var(--night-line); padding-top: 24px; margin-top: 8px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; }

/* ==========================================================================
   Страницы документов: политика обработки ПД и согласие.
   Корневой класс — .legal, а не .doc: .doc занят иллюстрацией в блоке возможностей
   ========================================================================== */

.doc-body .header { background: rgba(241, 245, 244, .92); box-shadow: 0 1px 0 var(--line); }
.legal { padding: calc(var(--header-h) + 40px) 0 80px; }
.legal .wrap { max-width: calc(780px + var(--gutter) * 2); }
.legal h1 {
  font-family: var(--serif); font-size: clamp(1.875rem, 3.6vw, 2.75rem); font-weight: 600;
  line-height: 1.15; letter-spacing: -.02em; margin: 6px 0 8px;
}
.legal h2 { font-size: var(--fs-lg); font-weight: 650; margin: 36px 0 12px; }
.legal p, .legal li { color: var(--ink-2); line-height: 1.7; }
.legal p + p { margin-top: 10px; }
.legal ul { margin: 10px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.legal a { color: var(--primary); text-underline-offset: 2px; }
.doc-crumbs { font-size: var(--fs-sm); color: var(--ink-3) !important; }
.doc-crumbs a { color: var(--ink-3); }
.doc-meta { font-family: var(--mono); font-size: var(--fs-xs); color: var(--ink-3) !important; margin-bottom: 18px !important; }
.doc-dl { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 20px; margin: 0; }
.doc-dl dt { color: var(--ink-3); }
.doc-dl dd { margin: 0; font-weight: 550; }

/* Плавающая кнопка заявки: появляется, когда первый экран ушёл вверх, и прячется
   у самой формы. На компьютере — в правом нижнем углу, на телефоне — во всю ширину. */
.dock {
  position: fixed; right: 28px; bottom: 28px; z-index: 40;
  transform: translateY(calc(100% + 40px)); transition: transform .4s var(--ease);
}
.dock.is-visible { transform: none; }
.dock .btn { box-shadow: 0 12px 30px -10px rgba(11, 40, 37, .6); }

/* ==========================================================================
   Появление при прокрутке — только для того, что ниже первого экрана
   ========================================================================== */

.js-reveal .pending { opacity: 0; transform: translateY(22px); }
.js-reveal .pending.shown {
  opacity: 1; transform: none;
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--d, 0s);
}

/* заполнение линии таймлайна при прокрутке — там, где браузер это умеет */
@supports (animation-timeline: view()) {
  .timeline::after {
    animation: grow linear both;
    animation-timeline: view();
    animation-range: entry 30% cover 55%;
  }
  @keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

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

@media (max-width: 1240px) {
  /* На главной меню, телефон и вход вместе занимают ~1120px — уже не помещаются,
     поэтому бургер здесь включается раньше, чем на страницах документов.
     Вход остаётся в шапке, номер — в кнопке звонка и в меню. */
  .header:not(.header--doc) .nav, .header:not(.header--doc) .header-phone { display: none; }
  .header:not(.header--doc) .wrap { gap: 10px; }
  .header:not(.header--doc) .header-login { margin-left: auto; }
  .header:not(.header--doc) .call { display: grid; margin-left: 0; }
  .header:not(.header--doc) .burger { display: block; margin-left: 0; }
}

@media (max-width: 1100px) {
  .nav a { padding: 8px 10px; }
  .chip--top { left: -10px; }
  .chip--bottom { right: -10px; }
  .tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  :root { --header-h: 64px; }
  .nav { display: none; }
  .header .wrap { gap: 10px; }
  .header-login { margin-left: auto; }
  .burger { display: block; margin-left: 0; }
  .call { display: grid; margin-left: 0; }
  .header--doc .header-phone { display: none; }

  .hero .wrap { grid-template-columns: 1fr; }
  .hero-copy { text-align: left; }
  .stage { margin-top: 12px; }
  .chip--top { left: 0; top: 40px; }
  .chip--bottom { right: 0; bottom: -6px; }

  .usp, .launch, .cta { grid-template-columns: 1fr; }
  .launch-aside { position: static; }

  .timeline { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
  .timeline::before, .timeline::after { display: none; }

  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cell, .cell--7, .cell--5 { grid-column: span 1; }
  .cell--wide { grid-column: 1 / -1; }

  .terms { grid-template-columns: 1fr; max-width: 560px; margin: 18px auto 0; }

  .footer .wrap { grid-template-columns: 1fr 1fr; }
  .footer .wrap > div:first-child { grid-column: 1 / -1; }

  .dock { left: 12px; right: 12px; bottom: 12px; }
  .dock .btn { width: 100%; }
  body { padding-bottom: 0; }
}

@media (max-width: 640px) {
  :root { --fs-md: 1rem; }
  .header-login { padding: 0 14px; min-height: 46px; border-radius: 12px; background: var(--surface); }
  .header-login .hl-full { display: none; }
  .header-login .hl-short { display: inline; }
  .hero { padding-top: calc(var(--header-h) + 28px); }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-facts { gap: 8px 16px; }

  .phone { width: min(330px, 100%); border-radius: 42px; }
  .screen { border-radius: 32px; min-height: 0; }
  .chip { display: none; }

  .timeline { grid-template-columns: 1fr; gap: 0; }
  .step { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 4px 16px; padding: 18px 0; border-top: 1px solid var(--line); }
  .step-time { grid-row: span 3; align-self: start; }
  .step h3 { margin-top: 0; }

  .anatomy-legend { grid-template-columns: 1fr; }

  .compare li { grid-template-columns: 1fr; gap: 6px; padding: 18px 0; }
  .compare .arrow { justify-content: start; transform: rotate(90deg); width: 26px; height: 20px; }

  .bento { grid-template-columns: 1fr; gap: 14px; }
  .cell, .cell--7, .cell--5, .cell--wide { grid-column: 1 / -1; padding: 22px; }
  .heat { grid-template-columns: 76px repeat(7, minmax(0, 1fr)); gap: 4px; }
  .heat .c { height: 26px; font-size: 10px; }

  .tiers { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .tier--hot { order: -1; }

  .billing { width: 100%; }
  .billing button { flex: 1; padding: 11px 10px; }

  .form { grid-template-columns: 1fr; }
  .faq summary { font-size: 1.0625rem; padding: 20px 0; }
  .faq .answer { padding-right: 0; }

  .footer .wrap { grid-template-columns: 1fr; }
  .doc-dl { grid-template-columns: 1fr; gap: 2px; }
  .doc-dl dd { margin-bottom: 10px; }
}

/* ==========================================================================
   Без движения — для тех, кто так настроил систему
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js-reveal .pending { opacity: 1; transform: none; }
  .timeline::after { transform: none; }
}

/* Совсем узкий экран: у входа остаётся только значок, подпись — для экранных дикторов */
@media (max-width: 374px) {
  .header-login { width: 46px; padding: 0; }
  .header-login .hl-short { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
