/* SMSFlake · ui.css — оформление продукта (дизайн от 28.09.2026).
   Один файл на все экраны. Без style="" и инлайн-скриптов (строгий CSP). Внешних адресов нет:
   шрифты лежат рядом, в font/ (Onest и JetBrains Mono, лицензия OFL 1.1 — тексты там же).
   Порядок: шрифты → токены → база → примитивы → каркас кабинета → обзор → телефон → сообщения →
   API → главная → адаптив → служебные страницы. Исходник дизайна: .claude/design/smsflake/. */

/* ─── 0. Шрифты ───────────────────────────────────────────────────────── */
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("font/onest-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("font/onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("font/jetbrainsmono-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("font/jetbrainsmono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }


/* ─── 1. Токены ───────────────────────────────────────────────────────── */
:root {
  color-scheme: light;
  /* поверхности: тёплый «бумажный» холст, белый рабочий лист */
  --canvas: #F2F1EC;
  --surface: #FFFFFF;
  --surface-2: #F8F7F3;
  --surface-3: #E9E7E0;
  --ink: #131B1A;
  --ink-2: #3E4947;       /* 8.3:1 на холсте */
  --ink-3: #58625F;       /* ≥5.1:1 на всех светлых фонах */
  --line: #E3E0D8;        /* декоративные разделители */
  --line-2: #CDC9BE;      /* контуры второстепенных кнопок */
  --field: #7A8380;       /* рамки полей, 3.9:1 */
  /* бренд — бирюза приложения */
  --accent: #0E7C7B;
  --accent-hover: #0A6362;
  --accent-text: #0B6B6A;
  --accent-soft: #DDEFEC;
  --on-accent: #FFFFFF;
  /* устройство = глубокая бирюза (блок телефона-шлюза, сцена героя) */
  --deep: #0B2D2C; --deep-2: #123C3A; --deep-line: #245451;
  --on-deep: #EAF5F4; --on-deep-2: #A9CBC7; --on-deep-accent: #86DDD9; --on-deep-ok: #7FE0A5; --on-deep-warn: #F2C46B; --on-deep-err: #FFB0A6;
  /* тариф Про — тёмная плитка */
  --pro-bg: #15201F; --pro-line: #2C3B39; --on-pro: #EEF4F3; --on-pro-2: #A9C2BF; --pro-btn: #5CCBC6; --pro-btn-ink: #06201F; --pro-glow: rgba(92, 203, 198, .20);
  /* статусы */
  --ok: #1B7340;   --ok-soft: #E1F1E6;
  --warn: #845000; --warn-soft: #FAEED6; --warn-line: #D6A13F; --on-warn: #FFFFFF;
  --err: #B42318;  --err-soft: #FBE7E4;
  --marker: #F2B84B; --on-marker: #2A1C00;
  /* код — всегда тёмный блок */
  --code-bg: #101A19; --code-ink: #DDE7E6; --code-dim: #93A5A2; --code-str: #7FD3CE; --code-key: #F2C46B; --code-line: #263533;
  --logo-bg: #0E7C7B; --logo-fg: #FFFFFF;
  --qr-bg: #FFFFFF; --qr-fg: #131B1A;
  --bubble-in: #ECEEEA;
  --scrim: rgba(10, 20, 19, .45);
  --pop: 0 24px 48px -20px rgba(20, 32, 30, .32), 0 2px 8px rgba(20, 32, 30, .08);

  --sans: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  /* шкала: 12 · 13 · 14 · 15 · 16 · 18 · 20 · 24 · 28 · 36 · 48 · 56 */
  --t-2xs: .75rem; --t-xs: .8125rem; --t-sm: .875rem; --t-base: .9375rem; --t-md: 1rem; --t-lg: 1.125rem;
  --t-xl: 1.25rem; --t-2xl: 1.5rem; --t-3xl: 1.75rem;
  --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-pill: 999px;
  --side-w: 272px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --canvas: #0C1110; --surface: #141A19; --surface-2: #192120; --surface-3: #232C2B;
    --ink: #E8EEEC; --ink-2: #B7C3C0; --ink-3: #97A6A3;
    --line: #253130; --line-2: #364442; --field: #6A7C78;
    --accent: #3FB8B3; --accent-hover: #62CAC5; --accent-text: #5CCBC6; --accent-soft: #12302E; --on-accent: #04211F;
    --deep: #0E302E; --deep-2: #164240; --deep-line: #2A5B58;
    --on-deep: #E6F3F2; --on-deep-2: #A3C3C0;
    --pro-bg: #0F3331; --pro-line: #2E6360; --on-pro: #E6F3F2; --on-pro-2: #A9C9C6; --pro-btn: #6FD6D1; --pro-btn-ink: #04211F; --pro-glow: rgba(111, 214, 209, .16);
    --ok: #5CCB86; --ok-soft: #10291A; --warn: #F0B54A; --warn-soft: #2E230D; --warn-line: #8A6A2A; --on-warn: #1D1300;
    --err: #FF8B7F; --err-soft: #36171A;
    --code-bg: #080D0C; --code-line: #22302E;
    --bubble-in: #232C2B;
    --scrim: rgba(0, 0, 0, .62);
    --pop: 0 24px 48px -16px rgba(0, 0, 0, .7), 0 0 0 1px #253130;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #0C1110; --surface: #141A19; --surface-2: #192120; --surface-3: #232C2B;
  --ink: #E8EEEC; --ink-2: #B7C3C0; --ink-3: #97A6A3;
  --line: #253130; --line-2: #364442; --field: #6A7C78;
  --accent: #3FB8B3; --accent-hover: #62CAC5; --accent-text: #5CCBC6; --accent-soft: #12302E; --on-accent: #04211F;
  --deep: #0E302E; --deep-2: #164240; --deep-line: #2A5B58;
  --on-deep: #E6F3F2; --on-deep-2: #A3C3C0;
  --pro-bg: #0F3331; --pro-line: #2E6360; --on-pro: #E6F3F2; --on-pro-2: #A9C9C6; --pro-btn: #6FD6D1; --pro-btn-ink: #04211F; --pro-glow: rgba(111, 214, 209, .16);
  --ok: #5CCB86; --ok-soft: #10291A; --warn: #F0B54A; --warn-soft: #2E230D; --warn-line: #8A6A2A; --on-warn: #1D1300;
  --err: #FF8B7F; --err-soft: #36171A;
  --code-bg: #080D0C; --code-line: #22302E;
  --bubble-in: #232C2B;
  --scrim: rgba(0, 0, 0, .62);
  --pop: 0 24px 48px -16px rgba(0, 0, 0, .7), 0 0 0 1px #253130;
}

/* ─── 2. База ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font: 400 var(--t-md)/1.5 var(--sans); font-feature-settings: "kern", "calt";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.015em; font-weight: 700; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol, dl, dd { margin: 0; padding: 0; }
a { color: var(--accent-text); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
b, strong { font-weight: 650; }
q { quotes: "«" "»"; }
code, kbd, .mono { font-family: var(--mono); font-size: .92em; font-variant-ligatures: none; }
.num { font-variant-numeric: tabular-nums; }
.nowrap, .nw { white-space: nowrap; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--surface); padding: 10px 14px; border-radius: var(--r-sm); box-shadow: var(--pop); }
.skip:focus { top: 8px; }
/* тень спрятанной ссылки доставала до верхнего края страницы бледным пятном */
.skip:not(:focus) { box-shadow: none; }
[hidden] { display: none !important; }
.m-lab { display: none; }

/* иконки: stroke-набор 24×24 */
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.i .f { fill: currentColor; stroke: none; }
.i-sm { width: 16px; height: 16px; }
.i-lg { width: 24px; height: 24px; }

/* ─── 3. Примитивы ────────────────────────────────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.125rem; letter-spacing: -.03em; }
.brand:hover { text-decoration: none; }
.logo-mark { width: 30px; height: 30px; flex: none; }
.logo-mark .lm-bg { fill: var(--logo-bg); }
.logo-mark .lm-fg { fill: var(--logo-fg); }
.logo-mark .lm-dot { fill: var(--logo-bg); }

/* кнопки — одна система для <a> и <button> */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font: 600 var(--t-md)/1.2 var(--sans); letter-spacing: -.005em; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { border-color: var(--field); background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn-outline { border: 1.5px solid color-mix(in srgb, var(--ink) 72%, transparent); background: transparent; }
.btn-outline:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); border-color: var(--ink); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--accent-text); padding: 0 12px; }
.btn-quiet:hover { background: var(--accent-soft); border-color: transparent; }
.btn-danger { color: var(--err); border-color: var(--err); background: transparent; }
.btn-danger:hover { background: var(--err-soft); border-color: var(--err); }
.btn-warn { background: var(--warn); border-color: var(--warn); color: var(--on-warn); }
.btn-warn:hover { filter: brightness(1.08); background: var(--warn); border-color: var(--warn); color: var(--on-warn); }
.btn-pro { background: var(--pro-btn); border-color: var(--pro-btn); color: var(--pro-btn-ink); font-weight: 700; }
.btn-pro:hover { filter: brightness(1.07); background: var(--pro-btn); color: var(--pro-btn-ink); border-color: var(--pro-btn); }
.btn-sm { padding: 0 14px; font-size: var(--t-sm); }
.btn-lg { min-height: 52px; padding: 0 22px; font-size: 1.0625rem; border-radius: 12px; }
.btn-xl { min-height: 56px; padding: 0 22px; font-size: 1.0625rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--surface-2); border: 1px dashed var(--field); color: var(--ink-3); cursor: not-allowed; filter: none; }
.icon-btn { width: 44px; padding: 0; }
.link-btn { display: inline; background: none; border: 0; padding: 12px 0; margin: -12px 0; color: var(--accent-text); font-weight: 600; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; text-align: left; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* статусы */
.badge {
  display: inline-flex; align-items: center; gap: 7px; min-height: 26px; padding: 2px 10px;
  border-radius: var(--r-pill); background: var(--surface-3); color: var(--ink-2);
  font-size: var(--t-sm); font-weight: 600; line-height: 1.2; white-space: nowrap;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.err { background: var(--err-soft); color: var(--err); }
.badge.accent { background: var(--accent-soft); color: var(--accent-text); }
.badge.plain::before { display: none; }
.tag { display: inline-flex; align-items: center; min-height: 24px; padding: 1px 9px; border-radius: var(--r-pill); border: 1px solid var(--line-2); color: var(--ink-2); font-size: var(--t-2xs); font-weight: 600; white-space: nowrap; }

/* живая точка */
.live { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: var(--t-sm); font-weight: 500; }
.live::before, .live-dot { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: ping 2s ease-out infinite; flex: none; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 80%, 100% { box-shadow: 0 0 0 9px transparent; } }

/* поля */
.field { display: grid; gap: 6px; min-width: 0; }
.label { font-weight: 600; font-size: var(--t-sm); color: var(--ink); }
.hint { font-size: var(--t-sm); color: var(--ink-3); line-height: 1.45; }
.hint b { color: var(--ink-2); }
.input {
  width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid var(--field); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); font: 400 var(--t-md)/1.4 var(--sans);
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { resize: vertical; min-height: 108px; }
.input::placeholder { color: var(--ink-3); opacity: 1; }
.input:hover { border-color: var(--ink-3); }
/* обводка прозрачная, а не снятая: в контрастных темах Windows тень пропадает, и система рисует обводку своим цветом */
.input:focus-visible { outline: 2px solid transparent; outline-offset: 1px; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.input:disabled { background: var(--surface-2); border-style: dashed; color: var(--ink-3); cursor: not-allowed; }
.input.mono { font-family: var(--mono); font-size: .95rem; }
.input-code { min-height: 52px; font-family: var(--mono); font-size: 1.375rem; font-weight: 500; letter-spacing: .34em; padding: 8px 16px; }
.input-code::placeholder { letter-spacing: .06em; color: var(--ink-3); }

/* полосы: только <progress> */
progress.bar { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 6px; border: 0; border-radius: var(--r-pill); background: var(--surface-3); color: var(--accent); overflow: hidden; }
progress.bar::-webkit-progress-bar { background: var(--surface-3); border-radius: var(--r-pill); }
progress.bar::-webkit-progress-value { background: var(--accent); border-radius: var(--r-pill); }
progress.bar::-moz-progress-bar { background: var(--accent); border-radius: var(--r-pill); }
progress.bar.thick { height: 10px; }

/* панели: контур 1 px, без тени; тень — только у всплывающего */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; min-height: 28px; }
.panel-head h2 { font-size: var(--t-lg); font-weight: 750; letter-spacing: -.02em; }
.panel-head a { white-space: nowrap; font-size: var(--t-sm); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin: -8px 0; }
.panel-head a:hover { text-decoration: underline; }
.kicker { font-size: var(--t-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.muted { color: var(--ink-3); }
.small { font-size: var(--t-sm); }

/* вопрос → ответ (плитки обзора, полосы главной) */
.qa-q { display: flex; align-items: center; gap: 6px; font-size: var(--t-sm); font-weight: 500; color: var(--ink-3); }
.qa-a { margin-top: 4px; font: 800 1.625rem/1.12 var(--sans); letter-spacing: -.035em; font-variant-numeric: tabular-nums; color: var(--ink); text-wrap: balance; }
.qa-a.big { font-size: 3.25rem; line-height: 1; letter-spacing: -.05em; }
.qa-a.big span { font-size: 1.5rem; letter-spacing: -.02em; color: var(--ink-3); font-weight: 700; }
.qa-a.is-ok { display: flex; align-items: center; gap: 10px; color: var(--ok); }
.qa-a.is-ok::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); flex: none; }
.qa-d { margin-top: 8px; font-size: var(--t-base); color: var(--ink-2); line-height: 1.5; }
.qa-tile { display: grid; align-content: start; padding: 18px 20px 20px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.tile-link { justify-self: start; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin: 4px 0 -10px; font-size: var(--t-sm); font-weight: 600; text-decoration: none; }
.tile-meter { display: grid; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: var(--t-sm); color: var(--ink-2); }
.tile-meter b { color: var(--ink); font-weight: 800; }

/* ключ — значение */
.kv { display: grid; margin: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.kv dt { color: var(--ink-3); font-size: var(--t-sm); }
.kv dd { font-weight: 500; text-align: right; font-size: var(--t-sm); }

/* сегмент-переключатель на радио (работает без JS) */
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: max-content; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-3); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 9px; font-weight: 600; font-size: var(--t-sm); color: var(--ink-2); cursor: pointer; }
.seg input:checked + label { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(20, 32, 30, .12), 0 0 0 1px var(--line); }
.seg input:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 1px; }

/* чипы фильтра — одна полоса с прокруткой, без переноса */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; scroll-snap-type: x proximity; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; flex: none; scroll-snap-align: start;
  border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font-size: var(--t-sm); font-weight: 600; text-decoration: none; white-space: nowrap;
}
.chip:last-child { margin-right: 24px; }
.chip:hover { border-color: var(--field); text-decoration: none; }
.chip .n { min-width: 22px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: var(--r-pill); background: var(--surface-3); color: var(--ink-2); font-size: var(--t-2xs); font-variant-numeric: tabular-nums; }
.chip .n.warn { background: var(--warn-soft); color: var(--warn); }
.chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip[aria-current="true"] .n { background: color-mix(in srgb, var(--surface) 22%, transparent); color: var(--surface); }

/* заметки */
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink-2); font-size: var(--t-sm); }
.note .i { margin-top: 1px; color: var(--ink-3); }
.note.warn { background: var(--warn-soft); color: var(--ink); }
.note.warn .i { color: var(--warn); }

/* QR — всегда тёмное на белом, чтобы сканировалось и в тёмной теме */
.qr-card { display: grid; justify-items: center; gap: 8px; padding: 12px; border-radius: var(--r-md); background: var(--qr-bg); border: 1px solid var(--line); width: max-content; max-width: 100%; }
.qr { width: 164px; height: 164px; }
.qr .qr-bg { fill: var(--qr-bg); }
.qr .qr-fg { fill: var(--qr-fg); }
.qr-card small { color: #3E4947; font-size: var(--t-xs); text-align: center; max-width: 180px; line-height: 1.35; }

/* пузыри переписки */
.bubble { max-width: 86%; padding: 9px 12px 7px; border-radius: 16px; font-size: var(--t-base); line-height: 1.4; }
.bubble p { color: inherit; }
.bubble .bm { display: block; margin-top: 3px; font-size: var(--t-2xs); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.bubble.out { justify-self: end; background: var(--accent-soft); color: var(--ink); border-bottom-right-radius: 5px; }
.bubble.in { justify-self: start; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 5px; }

/* код */
.code { margin: 0; padding: 14px 18px 16px; background: var(--code-bg); color: var(--code-ink); font: 400 .8125rem/1.7 var(--mono); white-space: pre-wrap; overflow-wrap: normal; word-break: normal; overflow-x: auto; tab-size: 4; font-variant-ligatures: none; }
.code:focus-visible { outline-offset: -3px; }
.code .c { color: var(--code-dim); }
.code .s { color: var(--code-str); }
.code .k { color: var(--code-key); }

/* нумерованная выноска (сцена героя) */
.mk { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; flex: none; background: var(--marker); color: var(--on-marker); font: 800 .75rem/1 var(--sans); font-variant-numeric: tabular-nums; }

/* ─── 4. Каркас кабинета ──────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; min-height: 100vh; min-height: 100dvh; }
.side { display: none; }
.main { min-width: 0; }
.main-in { padding: 16px 16px 32px; max-width: 1120px; margin: 0 auto; }

/* верхняя полоска на телефоне: бренд + статус телефона-шлюза */
.mbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px;
  padding: 4px 8px 4px 14px; min-height: 58px;
  background: var(--canvas); border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(1px)) {
  .mbar { background: color-mix(in srgb, var(--canvas) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); }
}
.mbar .brand { font-size: 1.0625rem; }
.mbar .logo-mark { width: 28px; height: 28px; }
.m-menu-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--ink); background: var(--surface); font: inherit; font-weight: 650; text-decoration: none; white-space: nowrap; cursor: pointer; }
.m-menu-link:hover { text-decoration: none; background: var(--surface-2); }
.m-menu-link[aria-current="page"] { color: var(--accent-text); background: var(--accent-soft); }
.cab-menu-overlay { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 12px; background: rgba(0, 0, 0, .5); }
.cab-menu-overlay[hidden] { display: none; }
.cab-menu-panel { display: flex; flex-direction: column; width: 100%; max-width: 420px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); box-shadow: 0 16px 60px rgba(0, 0, 0, .25); }
.cab-menu-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px 8px 20px; border-bottom: 1px solid var(--line); }
.cab-menu-head .btn { width: 44px; min-height: 44px; padding: 0; }
.cab-menu-nav { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px; }
.cab-menu-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: var(--t-sm); }
.cab-menu-foot > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cab-menu-foot form { flex: none; margin: 0; }
body.cab-menu-open { overflow: hidden; }
.fs-navigating { cursor: progress; }
.fs-navigating::after { content: ""; position: fixed; z-index: 1100; top: 0; left: 0; right: 0; height: 3px; background: var(--accent); pointer-events: none; }
.status-link { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; min-height: 48px; padding: 0 2px 0 4px; color: var(--ink-3); text-decoration: none; border-radius: var(--r-pill); }
.status-link:hover { text-decoration: none; }
.dev-pill { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 14px 0 12px; border-radius: var(--r-pill); background: var(--deep); color: var(--on-deep); font-size: var(--t-sm); font-weight: 650; white-space: nowrap; }
.dev-pill .i { color: var(--on-deep-2); }
.dev-pill::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--on-deep-2); order: -1; }
.dev-pill.is-ok::after { background: var(--on-deep-ok); box-shadow: 0 0 0 3px rgba(127, 224, 165, .18); }
.dev-pill.is-silent::after { background: var(--on-deep-warn); }
.dev-pill.is-off::after { background: var(--on-deep-err); }

/* нижняя область на телефоне: контекстная кнопка + вкладки; sticky, не fixed */
.dock {
  position: sticky; bottom: 0; z-index: 20;
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@supports (backdrop-filter: blur(1px)) {
  .dock { background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: saturate(1.4) blur(16px); }
}
.ctx { display: none; padding: 8px 12px 0; }
.ctx.is-on { display: block; }
/* нижняя панель (дизайн 30.09): четыре вкладки слева, широкая «Написать» справа — под большим пальцем */
.tabbar { display: grid; grid-template-columns: repeat(4, auto) minmax(0, 1fr); column-gap: 2px; align-items: center; padding: 6px max(6px, env(safe-area-inset-right, 0px)) 6px max(6px, env(safe-area-inset-left, 0px)); }
.tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: 50px; min-height: 56px; padding: 0 3px; border: 0; border-radius: 14px; background: none; cursor: pointer;
  color: var(--ink-3); font: 600 var(--t-2xs)/1.15 var(--sans); text-decoration: none; letter-spacing: -.01em; white-space: nowrap;
}
.tab:hover { text-decoration: none; color: var(--ink); }
.tab-ico { position: relative; display: grid; place-items: center; width: 44px; height: 30px; border-radius: var(--r-pill); transition: background-color .15s; }
.tab-ico .i { width: 22px; height: 22px; }
.tab[aria-current="page"] { color: var(--accent-text); }
.tab[aria-current="page"] .tab-ico { background: var(--accent-soft); }
/* точка состояния телефона — на правом верхнем углу иконки; словами — в .sr и в пилюле */
.tab-dot { position: absolute; top: 2px; right: 9px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--surface); background: var(--ink-3); box-sizing: content-box; }
.tab-dot.ok { background: var(--ok); }
.tab-dot.silent { background: var(--warn); }
.tab-dot.off { background: var(--err); }
/* счётчик «ждёт решения» — на правом верхнем углу иконки, цифра не мельче 12 px */
.tab-count { position: absolute; top: -4px; left: calc(50% + 5px); min-width: 18px; height: 18px; padding: 0 4px; border-radius: var(--r-pill); display: grid; place-items: center; background: var(--warn); color: var(--on-warn); font-size: 12px; font-weight: 700; line-height: 1; border: 2px solid var(--surface); box-sizing: content-box; }
.tab-write {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 52px; margin-left: 6px; padding: 0 10px; border-radius: 16px;
  background: var(--accent); color: var(--on-accent); text-decoration: none;
  font-weight: 700; font-size: var(--t-base); letter-spacing: -.01em; white-space: nowrap;
}
.tab-write:hover { text-decoration: none; background: var(--accent-hover); color: var(--on-accent); }
/* запертая «Написать» — одна строка с замком; причина — для экранного диктора, в заголовке обзора и на шаге, куда ведёт ссылка */
.tab-write.is-locked { background: var(--surface-2); border: 1.5px dashed var(--field); color: var(--ink-2); gap: 6px; padding: 0 8px; }
.tab-write.is-locked:hover { background: var(--surface-2); color: var(--ink-2); }
.tab-write.is-locked .i { width: 18px; height: 18px; }
@media (max-width: 379px) {
  .tab { min-width: 48px; padding: 0 2px; }
  .tab-ico { width: 42px; }
  .tab-write, .tab-write.is-locked { flex-direction: column; gap: 2px; padding: 4px; font-size: var(--t-2xs); }
}

.sp-row { display: flex; justify-content: space-between; gap: 8px; font-size: var(--t-sm); color: var(--ink-2); }
.sp-row b { color: var(--ink); font-weight: 750; }

/* сайдбар (компьютер): устройство сверху, разделы, расход и выход снизу */
.device-card {
  position: relative; overflow: hidden; display: grid; gap: 2px; padding: 14px 16px 16px; border-radius: var(--r-md);
  background-color: var(--deep); color: var(--on-deep); text-decoration: none;
  background-image: radial-gradient(160px 90px at 100% 0%, rgba(134, 221, 217, .20), transparent 70%);
}
.device-card:hover { text-decoration: none; background-color: var(--deep-2); }
.device-card:focus-visible { outline-offset: 3px; }
/* состояние — крупный «ответ» блока, одинаково во всех четырёх состояниях; имя и время — под ним */
.dc-label { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: var(--t-xs); font-weight: 600; color: var(--on-deep-2); }
.dc-state { display: flex; align-items: center; gap: 9px; font: 800 1.25rem/1.2 var(--sans); letter-spacing: -.025em; color: var(--on-deep-2); }
.dc-state::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.device-card.is-ok .dc-state { color: var(--on-deep-ok); }
.device-card.is-ok .dc-state::before { box-shadow: 0 0 0 3px rgba(127, 224, 165, .2); }
.device-card.is-silent .dc-state { color: var(--on-deep-warn); }
.device-card.is-off .dc-state { color: var(--on-deep-err); }
.dc-name { margin-top: 6px; font: 650 var(--t-base)/1.3 var(--sans); color: var(--on-deep); }
.dc-state + .dc-sub { margin-top: 4px; }
.dc-sub { font-size: var(--t-xs); color: var(--on-deep-2); }
.dc-extra { display: flex; align-items: center; gap: 7px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--deep-line); font-size: var(--t-xs); font-weight: 650; color: var(--on-deep-warn); }

.side-nav ul { list-style: none; display: grid; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: var(--r-sm);
  color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: var(--t-base);
}
.nav-item:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); text-decoration: none; }
.nav-item[aria-current="page"] { background: var(--surface); color: var(--ink); font-weight: 650; box-shadow: 0 0 0 1px var(--line); }
.nav-item[aria-current="page"] .i { color: var(--accent-text); }
.nav-item .i { color: var(--ink-3); }
.nav-count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--r-pill); display: grid; place-items: center; background: var(--warn-soft); color: var(--warn); font-size: var(--t-2xs); font-weight: 700; }
.nav-dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.nav-dot.ok { background: var(--ok); }
.nav-dot.silent { background: var(--warn); }
.nav-dot.off { background: var(--err); }
.side-sep { height: 1px; background: var(--line); margin: 10px 12px; }
.side-plan { display: grid; gap: 8px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
a.side-plan:hover { border-color: var(--line-2); text-decoration: none; }
.side-plan .sp-row b { font-size: var(--t-md); }
.sp-sub { font-size: var(--t-xs); color: var(--ink-3); }
.side-acct { display: flex; align-items: center; gap: 8px; padding: 4px 0 0 12px; }
.side-acct > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-sm); color: var(--ink-2); }
.side-acct form { margin: 0; }
.side-acct .btn { min-height: 44px; padding: 0 12px; font-size: var(--t-sm); color: var(--ink-2); gap: 6px; }

/* заголовок страницы */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-bottom: 16px; }
.page-head h1 { font-size: 1.875rem; line-height: 1.08; font-weight: 800; letter-spacing: -.04em; }
.ph-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.page-sub { color: var(--ink-2); margin-top: 6px; font-size: var(--t-base); max-width: 62ch; }
.page-state { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: var(--t-sm); color: var(--ink-3); }
.page-state b { color: var(--ok); }
.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.locked-act { display: grid; justify-items: end; gap: 4px; }
.lock-why { font-size: var(--t-xs); color: var(--ink-3); }

/* ─── 5. Обзор ────────────────────────────────────────────────────────── */
.ov-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.ov-side { display: grid; gap: 14px; align-content: start; min-width: 0; }
.ov-grid.work { grid-template-areas: "attn" "main" "phone" "recent" "offer"; }
.ov-grid.work .ov-col { display: contents; }
.ov-grid.work .ov-main { grid-area: main; }
.ov-grid.work .ov-attn { grid-area: attn; }
.ov-grid.work .ov-phone { grid-area: phone; }
.ov-grid.work .ov-recent { grid-area: recent; }
.ov-grid.work .ov-offer { grid-area: offer; }

/* первый запуск: текущий шаг раскрыт, остальные — одна строка */
.setup { padding: 0; overflow: hidden; }
.setup-head { display: grid; gap: 10px; padding: 16px 18px 14px; }
.setup-head .panel-head { margin: 0; }
.setup-count { font-size: var(--t-sm); color: var(--ink-3); font-weight: 500; }
.steps { list-style: none; }
.step { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 10px 18px; min-height: 50px; border-top: 1px solid var(--line); }
.step-mark { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: var(--t-sm); font-weight: 750; font-variant-numeric: tabular-nums; border: 1.5px solid var(--line-2); color: var(--ink-3); background: var(--surface); position: relative; z-index: 1; }
.step-mark .i { width: 16px; height: 16px; stroke-width: 2.4; }
.step-title { font-weight: 600; font-size: var(--t-base); min-width: 0; }
.step-meta { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; font-size: var(--t-sm); color: var(--ink-3); text-align: right; min-width: 0; }
.step.is-done .step-mark { background: var(--ok); border-color: var(--ok); color: var(--surface); }
/* Сделанный шаг: подпись занимает свою ширину и не переносится, а значение справа (адрес почты,
   имя телефона) сжимается с многоточием — длинный адрес не должен ломать строку. */
.step.is-done { grid-template-columns: 28px auto minmax(0, 1fr); }
.step.is-done .step-meta { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step.is-done .step-title { color: var(--ink-2); font-weight: 500; }
.step.is-todo .step-title { color: var(--ink-3); font-weight: 500; }
.step.is-current { align-items: start; background: linear-gradient(90deg, var(--accent) 0 3px, color-mix(in srgb, var(--accent-soft) 70%, var(--surface)) 3px); padding-top: 16px; padding-bottom: 18px; }
.step.is-current .step-mark { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.step.is-current .step-body { grid-column: 2 / -1; display: grid; gap: 12px; min-width: 0; }
.step.is-current .step-title { font-size: 1.3125rem; font-weight: 800; letter-spacing: -.025em; line-height: 1.3; }
.step-body > p { color: var(--ink-2); font-size: var(--t-base); }
.code-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.code-form .field { flex: 0 1 240px; }
.code-form .btn { min-height: 52px; }
.resend { font-size: var(--t-sm); color: var(--ink-2); line-height: 1.5; margin-top: -4px; }
.step-body > .step-hint { display: flex; gap: 8px; align-items: flex-start; margin-top: -4px; font-size: var(--t-sm); color: var(--ink-2); }
.step-hint .i { margin-top: 2px; color: var(--accent-text); }
.step-body > .resend.is-wait { font-size: var(--t-sm); color: var(--ink-3); }
.step-optional { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-top: 1px dashed var(--line-2); color: var(--ink); text-decoration: none; min-height: 56px; }
.step-optional:hover { background: var(--surface-2); text-decoration: none; }
.step-optional .i { color: var(--ink-3); }
.step-optional .i:last-child { margin-left: auto; }
.step-optional > span { display: grid; font-size: var(--t-sm); color: var(--ink-3); }
.step-optional b { color: var(--ink); font-size: var(--t-base); font-weight: 600; }

/* рабочий день */
.all-set { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: 48px; padding: 4px 6px 4px 14px; margin-bottom: 14px; border-radius: var(--r-md); background: var(--ok-soft); color: var(--ink); font-size: var(--t-base); }
.all-set > .i { color: var(--ok); stroke-width: 2.4; }
.all-set > span { flex: 1 1 220px; }
.all-set a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 8px; font-size: var(--t-sm); font-weight: 600; text-decoration: none; }
.today-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; margin-bottom: 14px; }
.today-of { color: var(--ink-2); font-size: var(--t-base); padding-bottom: 4px; }
.today-of b { color: var(--ink); font-weight: 800; }
.stats { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.stats li { display: grid; gap: 2px; padding: 12px 14px; background: var(--surface); }
.stats li:nth-child(odd) { border-right: 1px solid var(--line); }
.stats li:nth-child(n+3) { border-top: 1px solid var(--line); }
.stats b { font-size: var(--t-2xl); font-weight: 800; line-height: 1.1; letter-spacing: -.03em; }
.stats li > span { font-size: var(--t-sm); color: var(--ink-3); line-height: 1.3; }
.stats li.is-warn { background: var(--warn-soft); }
.stats li.is-warn b { color: var(--warn); }
.stats li.is-warn > span { color: var(--ink-2); }
.attn-tile { display: grid; align-content: start; background: color-mix(in srgb, var(--warn-soft) 72%, var(--surface)); border-color: var(--warn-line); }
.attn-tile .qa-q { color: var(--warn); font-weight: 650; }
.attn-tile .qa-a { font-size: 1.375rem; letter-spacing: -.025em; }
.attn-tile .btn { justify-self: start; margin-top: 14px; }
.rows { list-style: none; }
.rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "to when" "text text" "badge badge"; gap: 3px 12px; padding: 11px 0; border-top: 1px solid var(--line); align-items: center; }
.rows li.is-warn .r-to { color: var(--warn); }
.r-to { grid-area: to; font-weight: 500; font-size: var(--t-base); white-space: nowrap; }
.r-text { grid-area: text; color: var(--ink-2); font-size: var(--t-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rows .badge { grid-area: badge; justify-self: start; }
.r-when { grid-area: when; font-size: var(--t-sm); color: var(--ink-3); }
.offer { display: grid; align-content: start; background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.offer .qa-a { font-size: 1.5rem; }
.offer-list { list-style: none; display: grid; gap: 6px; margin-top: 12px; }
.offer-list li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; font-size: var(--t-base); color: var(--ink); }
.offer-list .i { width: 18px; height: 18px; margin-top: 2px; color: var(--accent-text); stroke-width: 2.4; }
.offer .qa-d { margin-top: 10px; font-size: var(--t-sm); }
.offer .btn-row { margin-top: 14px; }

/* ─── 6. Телефон ──────────────────────────────────────────────────────── */
.live-status { display: grid; gap: 12px; padding: 16px 18px; margin-bottom: 16px; border-radius: var(--r-md); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); }
.ls-main { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 14px; }
.ls-main .live-dot { width: 12px; height: 12px; margin-top: 34px; }
.ls-a { margin-top: 2px; font: 800 1.75rem/1.1 var(--sans); letter-spacing: -.035em; }
.ls-d { margin-top: 4px; font-size: var(--t-sm); color: var(--ink-2); }
.ls-tip { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--surface) 72%, transparent); font-size: var(--t-sm); color: var(--ink-2); }
.ls-tip .i { color: var(--accent-text); margin-top: 1px; }
.track-body .ls-tip { background: var(--surface); border: 1px solid var(--line); }

.gw-pick { border: 0; margin: 0 0 12px; padding: 0; min-width: 0; }
.gw-pick legend { padding: 0; margin-bottom: 8px; font-weight: 650; font-size: var(--t-sm); }
.pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick label { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; line-height: 1.25; }
.pick label .i { color: var(--ink-3); }
.pick label b { display: block; font-size: var(--t-base); font-weight: 650; }
.pick label small { display: block; font-size: var(--t-xs); color: var(--ink-3); margin-top: 2px; }
.pick input:checked + label { border: 2px solid var(--accent); padding: 9px 11px; background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); }
.pick input:checked + label .i { color: var(--accent-text); }
.pick input:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; }

.need-details { margin-bottom: 20px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.need-details summary { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 16px; cursor: pointer; list-style: none; }
.need-details summary::-webkit-details-marker { display: none; }
.need-details summary > .i:first-child { color: var(--accent-text); }
.need-details summary > span { flex: 1; display: grid; min-width: 0; }
.need-details summary b { font-size: var(--t-base); }
.need-details summary small { font-size: var(--t-xs); color: var(--ink-3); }
.need-details summary > .i:last-child { color: var(--ink-3); transition: transform .2s; }
.need-details[open] summary > .i:last-child { transform: rotate(90deg); }
.need { list-style: none; display: grid; gap: 10px; padding: 2px 16px 16px 48px; }
.need li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; font-size: var(--t-sm); color: var(--ink-2); }
.need li .i { width: 18px; height: 18px; color: var(--ok); margin-top: 1px; stroke-width: 2.2; }
.need li.no .i { color: var(--err); }

.phone-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.track { list-style: none; display: grid; }
.track-step { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 0 14px; padding-bottom: 28px; }
.track-step::before { content: ""; position: absolute; left: 15px; top: 38px; bottom: 6px; width: 2px; border-radius: 1px; background: var(--line); }
.track-step:last-child { padding-bottom: 0; }
.track-step:last-child::before { display: none; }
.track-no { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--surface); font-weight: 800; font-size: var(--t-sm); font-variant-numeric: tabular-nums; }
.track-step.is-locked .track-no { background: var(--surface); color: var(--ink-3); border: 1.5px dashed var(--field); }
.track-body { min-width: 0; display: grid; gap: 12px; align-content: start; }
.track-body h2 { font-size: 1.3125rem; font-weight: 800; letter-spacing: -.025em; padding-top: 3px; }
.track-body > p { color: var(--ink-2); max-width: 64ch; font-size: var(--t-base); }
.track-card { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; padding: 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.track-card .qr-card { width: 220px; border-color: var(--line); }
.file-meta { display: grid; gap: 4px; min-width: 0; flex: 1 1 220px; justify-items: start; }
.file-meta b { font-size: var(--t-md); font-weight: 700; }
.file-meta > span { font-size: var(--t-sm); color: var(--ink-3); }
.file-meta .btn { margin-top: 8px; }
.expire { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-sm); color: var(--ink-2) !important; font-weight: 600; font-variant-numeric: tabular-nums; }
.expire .i { color: var(--ink-3); width: 16px; height: 16px; }

/* шаги в приложении — не кнопки, а подсказка «в приложении нажмите …» */
.inapp { list-style: none; counter-reset: ia; display: grid; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.inapp li { counter-increment: ia; display: grid; grid-template-columns: 22px minmax(0, 1fr); grid-template-areas: "n what" "n say"; gap: 6px 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.inapp li:first-child { border-top: 0; }
.inapp li::before { grid-area: n; content: counter(ia); font-weight: 750; color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: var(--t-sm); padding-top: 1px; }
.inapp .what { grid-area: what; font-weight: 600; font-size: var(--t-base); }
.inapp .what small { display: block; font-weight: 400; color: var(--ink-3); font-size: var(--t-sm); margin-top: 2px; }
.inapp .what small a { font-weight: 600; }
.inapp li.key { background: color-mix(in srgb, var(--warn-soft) 60%, var(--surface)); }
.app-say { grid-area: say; display: flex; align-items: flex-start; gap: 7px; font-size: var(--t-sm); color: var(--ink-2); font-style: normal; }
.app-say .i { color: var(--ink-3); margin-top: 2px; }
.app-say q { font-weight: 700; color: var(--ink); }

/* проверка номера SIM: три подписанных подблока */
.sim { display: grid; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.sim-part { display: grid; gap: 12px; padding: 16px; border-top: 1px solid var(--line); min-width: 0; }
.sim-part:first-child { border-top: 0; }
.sim-part h3 { display: flex; align-items: center; gap: 10px; font-size: var(--t-md); font-weight: 700; }
.sim-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); flex: none; }
.field-row { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.lock-note { display: flex; align-items: center; gap: 7px; font-size: var(--t-sm); color: var(--ink-3); }

.phone-aside { display: grid; gap: 14px; align-content: start; }
.help-box h2 { font-size: var(--t-md); font-weight: 750; margin-bottom: 4px; }
.link-list { list-style: none; display: grid; }
.link-list a { display: flex; align-items: center; gap: 12px; min-height: 48px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: var(--t-base); font-weight: 500; }
.link-list li:last-child a { border-bottom: 0; }
.link-list a .i { color: var(--ink-3); }
.link-list a .i:last-child { margin-left: auto; width: 16px; height: 16px; }
.danger summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; cursor: pointer; list-style: none; font-weight: 650; }
.danger summary::-webkit-details-marker { display: none; }
.danger summary .i { transition: transform .2s; color: var(--ink-3); }
.danger[open] summary .i { transform: rotate(90deg); }
.danger-body { display: grid; gap: 12px; padding-top: 8px; }
.danger-body p { font-size: var(--t-sm); color: var(--ink-2); }

/* ─── 7. Сообщения ────────────────────────────────────────────────────── */
.msg-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.msg-side { display: grid; gap: 16px; align-content: start; min-width: 0; }
.composer { display: grid; gap: 14px; }
.composer h2 { font-size: var(--t-lg); font-weight: 750; letter-spacing: -.02em; }
.composer-head { display: grid; gap: 2px; min-width: 0; }
.composer-sum, .composer-open { display: none; }
.composer form { display: grid; gap: 14px; }
.sms-count { display: grid; gap: 8px; margin-top: 2px; }
.sms-count-row { display: flex; justify-content: space-between; gap: 12px; font-size: var(--t-sm); color: var(--ink-2); }
.sms-count-row b { font-weight: 750; color: var(--ink); }
.parts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.parts i { height: 6px; border-radius: 3px; background: var(--surface-3); }
.parts i.on { background: var(--accent); }
.sms-count.is-over .parts i { background: var(--err); }
.sms-count.is-over .sms-count-row b { color: var(--err); }
.sms-over { display: flex; align-items: center; gap: 6px; font-size: var(--t-sm); font-weight: 600; color: var(--err); }
.send-hint { display: flex; gap: 8px; align-items: center; font-size: var(--t-sm); color: var(--ink-3); }
.send-hint .i { width: 16px; height: 16px; }

.list-wrap { display: grid; gap: 4px; min-width: 0; align-content: start; }
.journal { min-width: 0; }
.day { display: flex; align-items: center; gap: 12px; margin: 16px 0 8px; font-size: var(--t-xs); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.msgs { list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.msg { position: relative; display: grid; gap: 5px; padding: 12px 16px; border-top: 1px solid var(--line); }
.msg:first-child { border-top: 0; }
.msg-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.msg-to { font-family: var(--mono); font-weight: 500; font-size: var(--t-base); white-space: nowrap; color: var(--ink); text-decoration: none; }
a.msg-to { display: inline-flex; align-items: center; min-height: 44px; margin: -12px 0; }
.msg-when { font-size: var(--t-sm); color: var(--ink-3); white-space: nowrap; }
.msg-text { color: var(--ink-2); font-size: var(--t-base); }
.msg-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.msg-id { font-size: var(--t-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.msg-foot .btn { margin-left: auto; }
.msg-why { font-size: var(--t-sm); color: var(--ink-2); }
.msg.is-warn { background: color-mix(in srgb, var(--warn-soft) 45%, var(--surface)); }
.msg.is-selected { background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); box-shadow: inset 4px 0 0 var(--accent); }
.msg:target { box-shadow: inset 4px 0 0 var(--warn); outline: none; }
.msg.is-cancelled .msg-text { text-decoration: line-through; text-decoration-color: var(--ink-3); color: var(--ink-3); }
.reply-flag { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; margin: -10px 0; font-size: var(--t-xs); font-weight: 650; color: var(--accent-text); text-decoration: none; }
.reply-flag .i { width: 14px; height: 14px; }

/* повторная отправка: подтверждение с последствием */
.retry > summary { list-style: none; cursor: pointer; }
.retry > summary::-webkit-details-marker { display: none; }
.retry:not([open]) > summary { justify-self: start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); font-weight: 600; font-size: var(--t-sm); }
.retry .r-open { display: none; }
.retry[open] .r-closed { display: none; }
.retry[open] .r-open { display: inline; }
.retry[open] { margin-top: 4px; padding: 12px 14px 14px; border: 1px solid var(--warn-line); border-radius: var(--r-sm); background: var(--surface); }
.retry[open] > summary { font-weight: 700; font-size: var(--t-base); min-height: 44px; margin-top: -6px; display: flex; align-items: center; }
.retry-body { display: grid; gap: 12px; margin-top: 2px; }
.retry-body p { font-size: var(--t-sm); color: var(--ink-2); }

.thread { display: grid; gap: 8px; margin-top: 6px; padding: 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.thread-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: var(--t-xs); color: var(--ink-3); font-weight: 650; }
.thread-note { font-size: var(--t-xs); color: var(--ink-3); }
.thread-panel { display: grid; gap: 12px; }
.thread-panel .panel-head { margin-bottom: 0; }
.th-num { font-size: var(--t-lg); font-weight: 500; }
.thread-body { display: grid; gap: 8px; padding: 14px; border-radius: var(--r-md); background: var(--surface-2); }

/* ─── 8. API ──────────────────────────────────────────────────────────── */
.api-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.onekey { display: grid; gap: 10px; padding: 18px 18px 20px; border-radius: var(--r-md); background: var(--warn-soft); border: 1px solid var(--warn-line); }
.onekey-k { display: inline-flex; align-items: center; gap: 7px; font-size: var(--t-xs); font-weight: 750; letter-spacing: .07em; text-transform: uppercase; color: var(--warn); }
.onekey h2 { font-size: 1.375rem; font-weight: 800; letter-spacing: -.025em; }
.onekey-d { font-size: var(--t-base); color: var(--ink-2); max-width: 72ch; }
.secret { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; padding: 10px 10px 10px 14px; border-radius: var(--r-sm); background: var(--surface); border: 1.5px dashed color-mix(in srgb, var(--warn) 72%, var(--surface)); }
.secret code { flex: 1 1 260px; min-width: 0; font-size: .95rem; overflow-wrap: anywhere; line-height: 1.5; }
.keys { width: 100%; border-collapse: collapse; }
.keys th { text-align: left; font-size: var(--t-xs); font-weight: 600; color: var(--ink-3); padding: 0 12px 8px 0; border-bottom: 1px solid var(--line); }
.keys td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: var(--t-sm); }
.keys td:last-child, .keys th:last-child { padding-right: 0; text-align: right; }
.keys .k-name { font-weight: 650; font-size: var(--t-md); }
.keys .k-name .badge { margin-left: 6px; font-size: var(--t-2xs); min-height: 22px; }
.keys .k-tail { font-family: var(--mono); color: var(--ink-2); }
.keys .k-meta { color: var(--ink-3); }
.create-key { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 16px; }
.create-key .field { flex: 1 1 240px; max-width: 340px; }
.api-facts { list-style: none; display: grid; gap: 10px; }
.api-facts li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; font-size: var(--t-sm); color: var(--ink-2); }
.api-facts .i { width: 18px; height: 18px; color: var(--ink-3); margin-top: 1px; }

.codetabs { display: grid; gap: 14px; }
.codetabs .panel-head { margin-bottom: 0; }
.codetabs .seg { justify-self: start; }
.codetabs .seg label { font-family: var(--mono); font-size: var(--t-xs); }
.code-pair { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.code-req, .resp { min-width: 0; }
.code-pane { display: none; border-radius: var(--r-md); background: var(--code-bg); overflow: hidden; }
.code-pane.is-resp { display: block; }
/* 🔴 Два пути — отдельными правилами: в одном списке браузер без :has() отбросил бы правило целиком,
   и со скриптом не было бы видно ни одного примера. */
.codetabs:has(#lang-curl:checked) .pane-curl,
.codetabs:has(#lang-php:checked) .pane-php,
.codetabs:has(#lang-py:checked) .pane-py { display: block; }
.codetabs[data-lang="curl"] .pane-curl,
.codetabs[data-lang="php"] .pane-php,
.codetabs[data-lang="py"] .pane-py { display: block; }
.code-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 0 4px 0 16px; border-bottom: 1px solid var(--code-line); color: var(--code-dim); font: 500 var(--t-2xs)/1.2 var(--mono); }
.code-bar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.code-copy { min-height: 44px; padding: 0 12px; font-size: var(--t-xs); background: transparent; color: var(--code-ink); border-color: transparent; }
.code-copy:hover { background: color-mix(in srgb, var(--code-ink) 16%, transparent); border-color: transparent; color: var(--code-ink); }

/* ─── 9. Главная ──────────────────────────────────────────────────────── */
.site { background: var(--canvas); }
.wrap { max-width: 1200px; margin: 0 auto; padding-inline: 16px; }
.site-header { position: sticky; top: 0; z-index: 30; background: var(--canvas); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(1px)) {
  .site-header { background: color-mix(in srgb, var(--canvas) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); }
}
.site-header-in { display: flex; align-items: center; gap: 8px; min-height: 64px; }
.site-nav { display: none; }
.site-nav a, .top-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 12px; border-radius: var(--r-sm); color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: var(--t-base); }
.site-nav a:hover, .top-link:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.site-actions { margin-left: auto; display: flex; gap: 2px; align-items: center; }
.site-actions .btn { margin-left: 6px; }
.hdr-cta { border-width: 1.5px; transition: background-color .2s, border-color .2s, color .2s; }
.site-header.is-quiet .hdr-cta { background: transparent; color: var(--ink); border-color: color-mix(in srgb, var(--ink) 72%, transparent); }
.site-header.is-quiet .hdr-cta:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); border-color: var(--ink); color: var(--ink); }
.only-d { display: none !important; }

/* герой */
.hero { padding: 24px 0 36px; }
.hero-in { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); align-items: center; }
.hero-copy { display: grid; gap: 18px; justify-items: start; min-width: 0; }
.hero h1 { font-size: clamp(2.25rem, 1.45rem + 3vw, 3.5rem); line-height: 1.02; letter-spacing: -.045em; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--accent-text); display: block; }
.lead { font-size: 1.0625rem; line-height: 1.55; color: var(--ink-2); max-width: 54ch; }
.hero-cta { display: grid; gap: 10px; width: 100%; }
.hero-note { font-size: var(--t-sm); color: var(--ink-3); max-width: 52ch; }
.hero-note b { color: var(--ink); }

/* сцена: телефон клиента на глубокой бирюзе, выноски 1-2-3, карточка кабинета поверх */
.scene { position: relative; min-width: 0; }
.stage {
  position: relative; isolation: isolate; overflow: hidden; display: grid; justify-items: center; align-content: end;
  min-height: 440px; padding: 36px 16px 0; border-radius: 24px; background: var(--deep);
}
.stage::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(circle, rgba(234, 245, 244, .16) 1px, transparent 1.6px); background-size: 20px 20px;
  -webkit-mask-image: linear-gradient(180deg, #000 10%, transparent 85%); mask-image: linear-gradient(180deg, #000 10%, transparent 85%);
}
.stage::after { content: ""; position: absolute; z-index: -1; left: 50%; top: 14%; width: 440px; height: 440px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(46, 170, 166, .5), transparent); }
.handset { width: min(292px, 100%); padding: 10px 10px 0; border-radius: 46px 46px 0 0; background: #080C0C; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 40px 80px -30px rgba(0, 0, 0, .7); }
.hs { display: flex; flex-direction: column; height: 404px; overflow: hidden; border-radius: 37px 37px 0 0; background: var(--surface); color: var(--ink); font-size: var(--t-sm); line-height: 1.38; }
.hs-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 11px 22px 2px; font-size: var(--t-xs); font-weight: 650; }
.hs-cam { width: 11px; height: 11px; border-radius: 50%; background: #080C0C; box-shadow: 0 0 0 2px color-mix(in srgb, #080C0C 30%, transparent); }
.hs-sys { justify-self: end; display: flex; align-items: flex-end; gap: 2px; }
.hs-sys i { width: 3px; border-radius: 1px; background: currentColor; }
.hs-sys i:nth-child(1) { height: 5px; } .hs-sys i:nth-child(2) { height: 7px; } .hs-sys i:nth-child(3) { height: 9px; }
.hs-sys b { width: 20px; height: 10px; margin-left: 6px; border-radius: 3px; border: 1.5px solid currentColor; padding: 1px; background: linear-gradient(90deg, currentColor 70%, transparent 70%) content-box; }
.hs-head { display: grid; justify-items: center; gap: 2px; padding: 8px 16px 10px; border-bottom: 1px solid var(--line); }
.hs-ava { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 4px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); }
.hs-num { position: relative; display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-weight: 500; font-size: var(--t-sm); }
.hs-sub { font-size: var(--t-2xs); color: var(--ink-3); }
.hs-thread { flex: 1; display: flex; flex-direction: column; gap: 9px; padding: 14px 14px; }
.hs-in, .hs-out { position: relative; display: block; max-width: 84%; padding: 8px 12px; margin: 0; }
.hs-in { align-self: flex-start; border-radius: 18px 18px 18px 6px; background: var(--bubble-in); }
.hs-out { align-self: flex-end; border-radius: 18px 18px 6px 18px; background: var(--accent); color: var(--on-accent); }
.hs-t { display: block; margin-top: 1px; font-size: 11px; opacity: .8; text-align: right; font-variant-numeric: tabular-nums; }
.hs-in .mk, .hs-out .mk { position: absolute; top: -9px; box-shadow: 0 0 0 3px var(--surface); }
.hs-in .mk { right: -10px; }
.hs-out .mk { left: -11px; }
.hs-num .mk { box-shadow: 0 0 0 3px var(--surface); }
.hs-compose { display: flex; align-items: center; gap: 8px; margin: 0 12px 14px; padding: 5px 5px 5px 14px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-3); font-size: var(--t-xs); }
.hs-send { display: grid; place-items: center; width: 30px; height: 30px; margin-left: auto; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.hs-send .i { width: 15px; height: 15px; }

.pv-card { position: relative; z-index: 2; display: grid; gap: 12px; margin: -64px 14px 0; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--pop); }
.pv-card-top { display: flex; align-items: center; gap: 8px; font-size: var(--t-xs); color: var(--ink-3); font-weight: 650; }
.pv-card-top .logo-mark { width: 20px; height: 20px; }
.pv-dev { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--deep); color: var(--on-deep); }
.pv-dev-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--deep-2); color: var(--on-deep-accent); }
.pv-dev b { display: block; font-size: var(--t-sm); font-weight: 700; }
.pv-dev > span > span { display: block; font-size: var(--t-2xs); color: var(--on-deep-ok); font-weight: 600; }
.pv-usage { display: grid; gap: 6px; }
.pv-usage-row { display: flex; justify-content: space-between; font-size: var(--t-xs); color: var(--ink-3); }
.pv-usage-row b { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 800; }
.pv-list { list-style: none; display: grid; border-top: 1px solid var(--line); }
.pv-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; padding: 8px 0 0; }
.pv-list li + li { border-top: 1px solid var(--line); margin-top: 8px; }
.pv-list .mono { font-size: var(--t-xs); }
.pv-list .badge { font-size: 11px; min-height: 20px; padding: 1px 8px; gap: 5px; }
.pv-list .badge::before { width: 6px; height: 6px; }

.legend { list-style: none; display: grid; gap: 14px; margin-top: 28px; }
.legend li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; }
.legend b { display: block; font-weight: 700; }
.legend div > span { display: block; margin-top: 2px; font-size: var(--t-sm); color: var(--ink-2); }

/* полоса «вопрос → ответ» под героем */
.answers { background: var(--surface); border-block: 1px solid var(--line); }
.qa-strip { list-style: none; display: grid; }
/* align-content: start — иначе в трёх колонках лишняя высота раздаётся строкам, и ответы встают на разной высоте */
.qa-strip li { display: grid; align-content: start; gap: 2px; padding: 22px 0; border-top: 1px solid var(--line); }
.qa-strip li:first-child { border-top: 0; }
.qa-strip .qa-q { font-size: var(--t-sm); }
.qa-strip .qa-a { font-size: 1.75rem; margin-top: 2px; }
.qa-strip .qa-d { margin-top: 6px; font-size: var(--t-sm); max-width: 40ch; }

.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 10px; margin-bottom: 28px; max-width: 760px; }
.section-head h2 { font-size: clamp(1.875rem, 1.3rem + 2.3vw, 3rem); line-height: 1.04; letter-spacing: -.042em; font-weight: 800; }
.section-head p { color: var(--ink-2); font-size: var(--t-lg); }

/* как устроено */
.flow { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); counter-reset: fl; }
.flow li { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 16px; row-gap: 4px; padding-bottom: 24px; }
.flow li::before { content: ""; position: absolute; left: 25px; top: 58px; bottom: 6px; width: 2px; background: var(--line-2); }
.flow li:last-child::before { display: none; }
.flow-ico { grid-row: 1 / span 2; width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line-2); color: var(--ink); }
.flow li.is-us .flow-ico { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.flow li.is-dev .flow-ico { background: var(--deep); border-color: var(--deep); color: var(--on-deep-accent); }
.flow b { font-size: var(--t-lg); font-weight: 750; letter-spacing: -.015em; align-self: end; line-height: 1.3; padding-top: 4px; }
.flow p { font-size: var(--t-sm); color: var(--ink-2); max-width: 36ch; }

.usecase { display: grid; gap: 20px; margin-top: 36px; padding: 22px 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.usecase-copy { display: grid; gap: 10px; align-content: start; }
.usecase-copy h3 { font-size: var(--t-2xl); font-weight: 800; letter-spacing: -.03em; }
.usecase-copy > p:not(.note) { color: var(--ink-2); }
.usecase .note { justify-self: start; }
.examples { display: grid; gap: 10px; align-content: start; }
.ex { justify-self: start; max-width: 44ch; padding: 10px 14px 8px; border-radius: 16px 16px 16px 5px; background: var(--bubble-in); font-size: var(--t-base); }
.ex small { display: block; font-size: var(--t-2xs); font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin-top: 3px; }

/* как подключиться */
.start { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
.start-steps { list-style: none; counter-reset: st; display: grid; border-top: 1px solid var(--line); }
.start-steps li { counter-increment: st; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.start-steps li::before { content: counter(st, decimal-leading-zero); grid-row: span 3; font: 500 var(--t-sm)/1.9 var(--mono); color: var(--accent-text); }
.start-steps b { font-size: var(--t-lg); font-weight: 750; letter-spacing: -.015em; }
.start-steps p { color: var(--ink-2); font-size: var(--t-base); max-width: 60ch; }
.code-demo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.code-demo span { display: grid; place-items: center; width: 30px; height: 38px; border-radius: 8px; background: var(--surface-3); font: 500 1.125rem/1 var(--mono); color: var(--ink); }
.code-demo small { margin-left: 8px; font-size: var(--t-xs); color: var(--ink-3); }
.start-aside { display: grid; gap: 16px; align-content: start; }
.apk { display: grid; gap: 12px; padding: 18px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
.apk-top { display: flex; gap: 12px; align-items: center; }
.apk-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--deep); color: var(--on-deep-accent); flex: none; }
.apk-top b { display: block; font-weight: 750; }
.apk-top div > span { display: block; font-size: var(--t-sm); color: var(--ink-3); }
.need-box { padding: 18px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
.sub-h { font-size: var(--t-lg); font-weight: 750; margin-bottom: 8px; }
.checks { list-style: none; display: grid; }
.checks li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); color: var(--ink); font-size: var(--t-base); }
.checks li:first-child { border-top: 0; }
.checks .i { width: 18px; height: 18px; color: var(--ok); stroke-width: 2.2; margin-top: 2px; }
.checks li.no .i { color: var(--err); }

/* тарифы */
.plans { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.plan { position: relative; display: grid; align-content: start; padding: 22px 20px 20px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); min-width: 0; }
.plan-q { font-size: var(--t-sm); font-weight: 500; color: var(--ink-3); }
.plan-name { margin-top: 4px; font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; }
.plan-heading { min-width: 0; }
.plan-favorites { font-size: var(--t-sm); color: var(--ink-2); }
.plan-unit { margin-bottom: 14px; }
.plan-unit strong { display: block; font-size: var(--t-base); font-weight: 700; }
.plan-unit small { display: block; font-size: var(--t-sm); color: var(--ink-3); }
.plan.is-pro .plan-favorites, .plan.is-pro .plan-unit small { color: var(--on-pro-2); }
.plan-estimate-note { grid-column: 1 / -1; margin-top: 30px; font-size: var(--t-sm); color: var(--ink-2); }
.plan-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 10px 0 14px; }
.plan-price b { font-size: 2.75rem; line-height: 1; font-weight: 800; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.plan-price span { color: var(--ink-3); font-size: var(--t-sm); }
.spec { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 2px 12px; align-items: baseline; padding: 11px 0; border-top: 1px solid var(--line); }
.spec dt { font-size: var(--t-sm); color: var(--ink-3); }
.spec dd { font-size: var(--t-base); font-weight: 650; line-height: 1.35; color: var(--ink); }
.spec dd small { display: block; margin-top: 2px; font-size: var(--t-sm); font-weight: 400; color: var(--ink-2); }
.plan-btn { margin-top: 16px; }
.plan.is-pro { background-color: var(--pro-bg); color: var(--on-pro); border-color: var(--pro-line); background-image: radial-gradient(420px 240px at 100% 0%, var(--pro-glow), transparent 70%); }
.plan.is-pro .plan-q, .plan.is-pro .plan-price span, .plan.is-pro .spec dt, .plan.is-pro .spec dd small { color: var(--on-pro-2); }
.plan.is-pro .spec { border-color: var(--pro-line); }
.plan.is-pro .spec dd { color: var(--on-pro); }
.plan.is-pro .plan-price b { color: var(--on-pro); }
.plans-note { margin-top: 16px; }
.plans-note b { color: var(--ink); font-weight: 700; }
.plans-after { display: grid; gap: 14px; margin-top: 20px; }
.reply-demo, .reply-rule { padding: 20px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.rd-thread { display: grid; gap: 8px; margin-top: 12px; padding: 14px; border-radius: var(--r-md); background: var(--surface-2); }
.rr-a { margin-top: 4px; font-size: 1.375rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.2; text-wrap: balance; }
.reply-rule p:last-child { margin-top: 10px; color: var(--ink-2); font-size: var(--t-base); }

/* полоса правил крупными числами */
.rules-sec { padding: 36px 0 40px; background: var(--surface); border-block: 1px solid var(--line); }
.rules-h { font-size: var(--t-md); font-weight: 650; color: var(--ink-2); letter-spacing: 0; margin-bottom: 18px; }
.rules { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
.rules li { display: grid; gap: 4px; align-content: start; min-width: 0; }
.rules li:last-child { grid-column: 1 / -1; }
.rules b { font-size: 2.25rem; line-height: 1; font-weight: 800; letter-spacing: -.05em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rules li > span { font-size: var(--t-sm); color: var(--ink-2); line-height: 1.4; }

/* вопросы */
.faq-grid { display: grid; gap: 8px; }
.faq { display: grid; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 12px 0; cursor: pointer; list-style: none; font-weight: 650; font-size: var(--t-lg); letter-spacing: -.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { flex: none; color: var(--ink-3); transition: transform .2s; }
.faq details[open] summary .i { transform: rotate(45deg); color: var(--accent-text); }
.faq details p { padding: 0 40px 18px 0; color: var(--ink-2); max-width: 70ch; }

/* кто отвечает за сервис */
.trust { display: grid; gap: 14px; }
.support-card { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: center; padding: 20px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.support-card:hover { border-color: var(--line-2); text-decoration: none; }
.sc-ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.sc-k { display: block; font-size: var(--t-sm); color: var(--ink-3); font-weight: 500; }
.sc-v { display: block; font-size: 1.375rem; font-weight: 800; letter-spacing: -.025em; color: var(--accent-text); overflow-wrap: anywhere; }
.sc-d { display: block; margin-top: 2px; font-size: var(--t-sm); color: var(--ink-2); }
.req-card { display: grid; gap: 10px; align-content: start; padding: 20px; border-radius: var(--r-md); border: 1.5px dashed var(--field); background: transparent; }
.req { display: grid; }
.req div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 12px; align-items: end; padding: 8px 0; }
.req dt { font-size: var(--t-sm); color: var(--ink-3); }
.req dd { height: 1.2em; border-bottom: 1px dashed var(--line-2); }
/* реквизиты заполнены: обычная карточка, а не место под них */
.req-card.is-filled { border: 1px solid var(--line); background: var(--surface); }
.req-card.is-filled .req div { align-items: baseline; }
.req-card.is-filled .req dd { height: auto; border-bottom: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }

/* финальный призыв — светлая бирюзовая плашка (в тёмной теме — тёмная бирюзовая) */
.final-sec { padding-top: 40px; }
.cta-band { display: grid; gap: 20px; padding: 28px 22px; border-radius: var(--r-lg); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); }
.cta-band h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.625rem); line-height: 1.05; letter-spacing: -.04em; font-weight: 800; }
.cta-band p { margin-top: 8px; color: var(--ink-2); font-size: var(--t-lg); }
.cta-actions { display: grid; gap: 10px; }
.site-footer { border-top: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: var(--t-sm); }
.foot-in { display: grid; gap: 16px; padding-block: 32px 44px; }
.foot-legal { display: grid; gap: 6px; justify-items: start; color: var(--ink-3); }
.foot-legal .ph { display: inline-block; padding: 3px 10px; border: 1px dashed var(--field); border-radius: var(--r-xs); color: var(--ink-2); }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 4px; margin-left: -10px; min-width: 0; }
.foot-links a { color: var(--ink-2); text-decoration: none; min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }

/* закреплённая полоса регистрации на телефоне */
.site-dock {
  position: sticky; bottom: 0; z-index: 30; display: flex; gap: 12px; align-items: center;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -12px 32px -22px rgba(20, 32, 30, .5);
  transition: transform .2s, opacity .2s;
}
@supports (backdrop-filter: blur(1px)) {
  .site-dock { background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(14px); }
}
.site-dock .btn { flex: 1 1 auto; }
.site-dock .dock-sub { flex: 0 1 9.5rem; font-size: var(--t-xs); color: var(--ink-2); line-height: 1.3; }
.site-dock.is-away { transform: translateY(110%); opacity: 0; visibility: hidden; }
/* спрятанная кнопка выходит из потока: иначе под подвалом остаётся её место и сдвиг */
.site-dock.is-away { position: fixed; left: 0; right: 0; bottom: 0; }

/* ─── 10. Адаптив ─────────────────────────────────────────────────────── */
@media (min-width: 560px) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats li { border-right: 1px solid var(--line); border-top: 0 !important; }
  .stats li:last-child { border-right: 0; }
  .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-cta { display: flex; flex-wrap: wrap; width: auto; }
  .cta-actions { display: flex; flex-wrap: wrap; }
  .rules { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rules li:last-child { grid-column: auto; }
  .stage { justify-items: end; padding-right: max(24px, 8%); }
  .pv-card { position: absolute; left: 16px; bottom: 24px; width: 252px; margin: 0; }
}

@media (min-width: 720px) {
  .only-d { display: inline-flex !important; }
  .site-dock { display: none; }
}

@media (min-width: 760px) {
  .main-in { padding: 24px 28px 40px; }
  .wrap { padding-inline: 28px; }
  .qa-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .qa-strip li { border-top: 0; padding: 28px 28px 28px 0; }
  .qa-strip li + li { border-left: 1px solid var(--line); padding-left: 28px; }
  .legend { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 32px; }
  .flow { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  .flow li { grid-template-columns: minmax(0, 1fr); grid-template-rows: 52px auto 1fr; row-gap: 8px; padding-bottom: 0; }
  .flow li::before { left: 64px; right: -12px; top: 25px; bottom: auto; width: auto; height: 2px; }
  .flow-ico { grid-row: 1; margin-bottom: 8px; }
  .flow b { align-self: start; padding-top: 8px; }
  .usecase { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 40px; padding: 28px; }
  .plans-after { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta-band { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 40px 44px; }
  .foot-in { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .section { padding: 80px 0; }
  .rules { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; }
  .rules li { padding: 0 20px; border-left: 1px solid var(--line); }
  .rules li:first-child { padding-left: 0; border-left: 0; }
  .rules b { font-size: 2.5rem; }
  .inapp li { grid-template-columns: 22px minmax(0, 1fr) minmax(0, .9fr); grid-template-areas: "n what say"; align-items: center; column-gap: 16px; }
}

@media (min-width: 900px) {
  /* тарифы: строки выровнены между карточками через subgrid; Про шире и выше соседей */
  /* Six shared rows: heading, four specifications, action. Heading content can grow freely. */
  .plans { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr); grid-template-rows: repeat(6, auto); gap: 0 16px; margin-block: 18px; }
  .plan { grid-row: span 6; grid-template-rows: subgrid; align-content: stretch; padding: 26px 24px 24px; }
  .plan.is-pro { margin-block: -18px; padding: 44px 30px 42px; border-radius: 24px; }
  .spec { grid-template-columns: minmax(0, 1fr); gap: 2px; align-content: start; }
  .plan-btn { align-self: end; }
  .plans-after { margin-top: 36px; }
}

@media (max-width: 1023px) {
  .only-desk { display: none !important; }
  /* «этот / другой телефон» — только там, где кабинет открыт с телефона; работает и через :has, и через ui.js.
     🔴 Два пути — отдельными правилами. В одном списке через запятую браузер без :has() отбрасывает правило
     целиком, вместе с запасным путём через data-gw, и на экране оказываются оба варианта сразу. */
  .gw-root:has(#gw-this:checked) .gw-other-only { display: none !important; }
  .gw-root[data-gw="this"] .gw-other-only { display: none !important; }
  .gw-root:has(#gw-other:checked) .gw-this-only { display: none !important; }
  .gw-root[data-gw="other"] .gw-this-only { display: none !important; }
  /* композер на телефоне свёрнут в строку; «Написать» (#new) раскрывает его без JS */
  .composer:not(:target) { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 14px 14px 14px 18px; }
  .composer:not(:target) form { display: none; }
  .composer:not(:target) .composer-sum { display: block; }
  .composer:not(:target) .composer-open { display: inline-flex; }
  .only-m { display: inline-flex; }
  /* «Ждём телефон» на телефоне — одна строка, чтобы в первый экран вошли выбор телефона и шаг 1 */
  .live-status { padding: 12px 16px; margin-bottom: 14px; gap: 10px; }
  .ls-main { align-items: start; gap: 12px; }
  .ls-main .live-dot { margin-top: 7px; }
  .live-status .qa-q { display: none; }
  .ls-a { margin-top: 0; font-size: 1.25rem; letter-spacing: -.025em; }
  .ls-d { margin-top: 2px; font-size: var(--t-xs); }
}
@media (max-width: 599px) {
  /* шаги «Телефона»: номер слева от заголовка, содержимое на всю ширину, без направляющей */
  .track-step { grid-template-columns: 32px minmax(0, 1fr); padding-bottom: 0; }
  .track-step + .track-step { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
  .track-step::before { display: none; }
  .track-no { grid-row: 1; grid-column: 1; }
  .track-body { grid-row: 1; grid-column: 1 / -1; }
  .track-body h2 { padding-left: 46px; min-height: 32px; }
  .track-card { padding: 14px; }
  .track-card .qr-card { margin-inline: auto; }
}
@media (max-width: 559px) {
  .page-head h1 { font-size: 1.75rem; }
  .step { padding-inline: 16px; }
  .step.is-todo { grid-template-columns: 28px minmax(0, 1fr); }
  .step.is-todo .step-meta { grid-column: 2; justify-content: flex-start; text-align: left; }
  .step.is-done .step-meta { font-size: var(--t-xs); }
  /* текущий шаг: тело на всю ширину, номер — слева от заголовка */
  .step.is-current { grid-template-columns: 28px minmax(0, 1fr); }
  .step.is-current .step-mark { grid-row: 1; grid-column: 1; }
  .step.is-current .step-body { grid-row: 1; grid-column: 1 / -1; }
  .step.is-current .step-title { padding-left: 42px; min-height: 28px; font-size: 1.1875rem; }
  .code-form { display: grid; }
  .code-form .field, .code-form .btn { width: 100%; }
  .file-meta .btn, .gw-this-only.btn-lg, .track-body > .gw-this-only .btn { width: 100%; }
  .keys thead { display: none; }
  .keys, .keys tbody, .keys tr, .keys td { display: block; }
  .keys tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .keys td { padding: 0; border: 0; }
  .keys td:last-child { grid-column: 2; grid-row: 1 / span 4; align-self: center; }
  .hide-s { display: none !important; }
  .m-lab { display: inline; }
  .msg-foot .btn { margin-left: 0; }
  .qa-a.big { font-size: 2.75rem; }
  .secret .btn { width: 100%; }
  .sim-part .btn { width: 100%; }
  /* первый экран главной: кикер в строку, лид 4 строки — шапка телефона и пузыри входят в 844 px */
  .hero { padding: 16px 0 32px; }
  .hero-in { gap: 24px; }
  .hero-copy { gap: 14px; }
  .hero-kicker { font-size: var(--t-sm); font-weight: 650; letter-spacing: 0; text-transform: none; }
  .lead { font-size: var(--t-md); }
  /* сцена: в телефоне два пузыря (СМС и ответ клиента), карточка кабинета заходит только на пустой низ экрана */
  .stage { min-height: 0; padding-top: 24px; }
  .hs { height: auto; padding-bottom: 44px; }
  .hs-extra { display: none; }
  .pv-card { margin-top: -44px; }
}

@media (min-width: 1024px) {
  .app { grid-template-columns: var(--side-w) minmax(0, 1fr); grid-template-rows: auto; }
  .mbar, .dock, .only-mob, .only-m { display: none !important; }
  .side {
    display: flex; flex-direction: column; gap: 16px; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto;
    padding: 14px 12px 14px 14px; grid-row: 1; grid-column: 1;
  }
  .side .brand { padding: 0 10px; }
  /* minmax(0, 1fr): без него колонка растёт под длинный адрес почты, и блок тарифа с кнопкой
     «Выйти» уезжает за край боковой панели. */
  .side-foot { margin-top: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .main { grid-row: 1; grid-column: 2; padding: 8px 8px 8px 0; }
  .main-in { max-width: none; margin: 0; min-height: calc(100dvh - 16px); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 30px 40px 48px; }
  .main-in > * { max-width: 1080px; }
  .page-head { margin-bottom: 22px; }
  .page-head h1 { font-size: 2.25rem; }
  .main-in .qa-tile, .main-in .panel:not(.offer):not(.attn-tile) { background: var(--surface); }

  .ov-grid.first { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; }
  .ov-grid.work { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); grid-template-areas: none; gap: 18px; }
  .ov-grid.work .ov-col { display: grid; gap: 18px; align-content: start; min-width: 0; }
  .ov-grid.work .ov-col > * { grid-area: auto; }
  .rows li { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "to badge when" "text text text"; gap: 4px 12px; }
  .rows .badge { justify-self: start; }
  .r-when { text-align: right; }

  .gw-pick { display: none; }
  .gw-this-only { display: none !important; }
  .live-status { padding: 18px 22px; }
  .live-status.has-tip { grid-template-columns: minmax(0, 1fr) minmax(0, 380px); align-items: center; gap: 24px; }
  .phone-grid { grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; }
  /* колонка справки закреплена, но не выше окна: раскрытая «Отвязать телефон» иначе уходит за край */
  .phone-aside { position: sticky; top: 24px; max-height: calc(100dvh - 48px); overflow-y: auto; }

  .msg-layout { grid-template-columns: minmax(0, 1fr) 360px; grid-template-areas: "list side"; align-items: start; gap: 24px; }
  .msg-layout .msg-side { grid-area: side; }
  .msg-layout .list-wrap { grid-area: list; }
  .chips { flex-wrap: wrap; overflow: visible; scroll-snap-type: none; -webkit-mask-image: none; mask-image: none; }
  .chip:last-child { margin-right: 0; }

  .code-pair { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }

  .site-nav { display: flex; margin-left: 28px; }
  .hero { padding: 56px 0 40px; }
  .hero-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; }
  .stage { min-height: 560px; padding-top: 52px; padding-right: 28px; border-radius: 28px; }
  .handset { width: 300px; }
  .hs { height: 500px; font-size: var(--t-base); }
  .pv-card { left: -30px; bottom: 40px; width: 250px; }
  .start { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 56px; }
  .faq-grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); gap: 56px; }
  .faq-head { align-self: start; position: sticky; top: 96px; }
}

@media (min-width: 1200px) {
  .wrap { padding-inline: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .side, .mbar, .dock, .site-header, .site-dock { display: none !important; }
}

/* Старые браузеры без :has() и без JS — показываем все примеры кода. */
@supports not selector(:has(*)) {
  .codetabs:not([data-js]) .code-pane { display: block; margin-bottom: 12px; }
}

/* ─── 12. Служебные страницы: вход, документы, сообщения продукта ─────── */
/* узкая колонка для одной формы (вход, регистрация, сброс пароля, подключение) */
.narrow { max-width: 440px; margin: 0 auto; }
.narrow .panel { padding: 24px; }
.stack { display: grid; gap: 14px; min-width: 0; }
.stack-lg { display: grid; gap: 20px; min-width: 0; }
/* колонка текста (условия, политика, помощь, документация) */
.prose { max-width: 70ch; display: grid; gap: 14px; color: var(--ink-2); font-size: var(--t-md); line-height: 1.6; }
.prose h2 { margin-top: 14px; font-size: 1.3125rem; font-weight: 800; letter-spacing: -.025em; color: var(--ink); }
.prose h3 { margin-top: 6px; font-size: var(--t-lg); font-weight: 700; color: var(--ink); }
.prose ul, .prose ol { padding-left: 22px; display: grid; gap: 8px; }
.prose code { background: var(--surface-3); padding: 1px 6px; border-radius: var(--r-xs); overflow-wrap: anywhere; }
/* сообщение продукта пользователю: role="status" или role="alert" ставит шаблон */
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin: 0 0 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: var(--t-base); }
.flash .i { margin-top: 2px; color: var(--ink-3); }
.flash.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.flash.ok .i { color: var(--ok); }
.flash.warn { background: var(--warn-soft); border-color: var(--warn-line); }
.flash.warn .i { color: var(--warn); }
.flash.err { background: var(--err-soft); border-color: color-mix(in srgb, var(--err) 45%, transparent); }
.flash.err .i { color: var(--err); }
.note.ok { background: var(--ok-soft); color: var(--ink); }
.note.ok .i { color: var(--ok); }
.note.err { background: var(--err-soft); color: var(--ink); }
.note.err .i { color: var(--err); }
.field-err { font-size: var(--t-sm); font-weight: 600; color: var(--err); }
.input[aria-invalid="true"] { border-color: var(--err); box-shadow: 0 0 0 3px color-mix(in srgb, var(--err) 22%, transparent); }
/* строка с флажком: согласие, уведомления */
.check { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; align-items: start; min-height: 44px; padding: 10px 0; font-size: var(--t-base); color: var(--ink-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
/* простая таблица с прокруткой внутри своей рамки */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.table th, .table td { padding: 10px 14px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.table thead th { border-top: 0; color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.table .num { text-align: right; }
.captcha { min-height: 102px; }

/* ─── 13. Каркасы без кабинета ───────────────────────────────────────── */
/* короткая страница (вход, сообщение продукта): подвал стоит у нижнего края окна, а не посреди него */
.site { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.site > main { flex: 1 0 auto; }
/* обычная публичная страница (вход, документы, условия): отступы вместо полос главной */
.page-plain { padding: 32px 0 56px; }
.page-plain .page-head { margin-bottom: 20px; }
/* урезанный каркас (аккаунт заблокирован или удаляется): шапка видна на любой ширине */
@media (min-width: 1024px) {
  /* боковой панели нет: одна колонка и шапка сверху во всю ширину — иначе она садится в пустую
     колонку панели и растягивается на всю высоту страницы */
  .app.is-reduced { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .mbar.is-always { display: flex !important; grid-row: 1; grid-column: 1; }
  .mbar.is-always + .main { grid-row: 2; grid-column: 1; padding: 0 8px 8px; }
  .mbar.is-always + .main .main-in { max-width: 760px; margin: 24px auto; min-height: 0; }
}
.mbar.is-always .status-link { gap: 8px; }
.mbar.is-always form { margin: 0; }
/* ссылка «Обновить» рядом с заголовком страницы */
.live-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: var(--t-sm); font-weight: 600; color: var(--ink-3); text-decoration: none; }
.live-link:hover { color: var(--accent-text); text-decoration: none; }
form.resend { display: block; }

/* ── 14. Помощь ─────────────────────────────────────────────────────────────
   Одна страница в двух каркасах (сайт и кабинет), поэтому ширину держит сама. */
.help { max-width: 860px; }
.help .panel-head h2 { font-size: 1.3125rem; font-weight: 800; letter-spacing: -.025em; }
.help .prose { font-size: var(--t-base); }
.help-after { margin-top: 16px; }
.help-faq { margin-top: 16px; }
.help-faq summary { min-height: 52px; font-size: var(--t-base); }
.help-faq details p { padding-right: 0; font-size: var(--t-base); }
/* Шаги внутри свёрнутого блока: пути в настройках телефона по маркам. */
.help-faq details ol { display: grid; gap: 8px; padding: 0 0 16px 22px; color: var(--ink-2); font-size: var(--t-base); line-height: 1.6; max-width: 70ch; }
.help-faq details ol + p { color: var(--ink-3); }
.help .kv dt { flex: none; max-width: 46%; }
.st-list { list-style: none; display: grid; }
.st-list li { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); }
.st-list li:first-child { border-top: 0; padding-top: 0; }
.st-list p { color: var(--ink-2); font-size: var(--t-base); max-width: 70ch; }
.st-list + .hint, .hint + .hint { margin-top: 10px; }
@media (min-width: 720px) {
  .st-list li { grid-template-columns: 13.5rem minmax(0, 1fr); gap: 16px; align-items: start; }
}

/* ── 15. Вход и регистрация ─────────────────────────────────────────────────
   Главное на странице — форма. Рядом сцена на глубокой бирюзе (тот же мотив, что у героя главной):
   на регистрации — что будет дальше, на входе — что покажет кабинет. На телефоне сцена уходит под
   форму: кнопка формы должна быть в первом экране. */
.auth { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.auth-main { display: grid; gap: 18px; min-width: 0; width: 100%; max-width: 520px; margin-inline: auto; }
.auth-head { display: grid; gap: 10px; }
.auth-head h1 { font-size: clamp(2rem, 1.45rem + 2.4vw, 2.875rem); line-height: 1.03; letter-spacing: -.044em; font-weight: 800; }
.auth-head h1 em { font-style: normal; color: var(--accent-text); display: block; }
.auth-head .lead { font-size: var(--t-md); max-width: 46ch; }
.auth-closed { padding: 20px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }
.auth-closed p { margin: 0; }
.auth-closed p + p { margin-top: 12px; }
.auth-form { display: grid; gap: 16px; padding: 22px 20px 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.auth-form .flash { margin: 0; }
.auth-form .check { padding: 2px 0; min-height: 0; font-size: var(--t-sm); line-height: 1.5; }
.auth-form .btn-lg { width: 100%; }
.auth-form .input { min-height: 52px; }
.auth-alt { font-size: var(--t-base); color: var(--ink-2); text-align: center; }
/* ссылка в строке: сама строка не раздвигается, а место нажатия — 44 px */
.auth-alt a { display: inline-block; padding-block: 11px; margin-block: -11px; font-weight: 650; }
/* «Забыли пароль?» на экране стоит над полем пароля, а в разметке — после него (порядок клавиши Tab) */
.field-pass { grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: center; }
.field-pass > .label { grid-area: 1 / 1; }
.field-pass > .pass { grid-area: 2 / 1 / 3 / 3; }
.field-pass > .field-link { grid-area: 1 / 2; display: inline-flex; align-items: center; min-height: 44px; margin-block: -11px; font-size: var(--t-sm); font-weight: 650; }
/* пароль: кнопка «Показать» внутри поля; появляется только со скриптом, с ним же поле уступает ей место */
.pass { position: relative; display: block; }
.pass.is-on .input { padding-right: 112px; }
.pass.is-on .input::-ms-reveal { display: none; }
.pass-toggle { position: absolute; right: 4px; top: 4px; bottom: 4px; min-width: 96px; padding: 0 12px; border: 0; border-radius: 7px; background: var(--surface-2); color: var(--ink-2); font: 600 var(--t-sm)/1 var(--sans); cursor: pointer; }
.pass-toggle:hover { background: var(--surface-3); color: var(--ink); }
.auth-facts { list-style: none; display: grid; gap: 9px; padding: 2px 0 0; }
.auth-facts li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; font-size: var(--t-sm); color: var(--ink-2); line-height: 1.45; }
.auth-facts .i { width: 18px; height: 18px; margin-top: 1px; color: var(--ok); stroke-width: 2.2; }
.auth-facts b { color: var(--ink); font-weight: 650; }

/* сцена */
.auth-scene { min-width: 0; width: 100%; max-width: 520px; margin-inline: auto; }
.auth-stage {
  position: relative; isolation: isolate; overflow: hidden; display: grid; gap: 22px; align-content: start;
  padding: 28px 22px 26px; border-radius: 24px; background: var(--deep); color: var(--on-deep);
}
.auth-stage::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(circle, rgba(234, 245, 244, .16) 1px, transparent 1.6px); background-size: 20px 20px;
  -webkit-mask-image: linear-gradient(200deg, #000 5%, transparent 70%); mask-image: linear-gradient(200deg, #000 5%, transparent 70%);
}
.auth-stage::after { content: ""; position: absolute; z-index: -1; right: -120px; bottom: -160px; width: 440px; height: 440px; border-radius: 50%; background: radial-gradient(closest-side, rgba(46, 170, 166, .30), transparent); }
.as-head { display: grid; gap: 8px; }
.as-kicker { font-size: var(--t-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--on-deep-accent); }
.auth-stage h2 { font-size: clamp(1.5rem, 1.25rem + 1.1vw, 2rem); line-height: 1.08; letter-spacing: -.036em; font-weight: 800; color: var(--on-deep); }
.as-steps { list-style: none; display: grid; }
.as-steps li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; padding-bottom: 18px; }
.as-steps li:last-child { padding-bottom: 0; }
.as-steps li::before { content: ""; position: absolute; left: 13px; top: 32px; bottom: 4px; width: 2px; border-radius: 1px; background: var(--deep-line); }
.as-steps li:last-child::before { display: none; }
.as-steps .mk { width: 28px; height: 28px; font-size: .8125rem; }
.as-steps b { display: block; padding-top: 3px; font-size: var(--t-md); font-weight: 700; color: var(--on-deep); }
.as-steps div > span { display: block; margin-top: 2px; font-size: var(--t-sm); line-height: 1.45; color: var(--on-deep-2); }
/* «вопрос → ответ» на бирюзе — те же три вопроса, что на обзоре кабинета */
.as-qa { list-style: none; display: grid; }
.as-qa li { display: grid; gap: 2px; padding: 14px 0; border-top: 1px solid var(--deep-line); }
.as-qa li:first-child { border-top: 0; padding-top: 0; }
.as-q { font-size: var(--t-sm); font-weight: 500; color: var(--on-deep-2); }
.as-a { font: 800 1.625rem/1.12 var(--sans); letter-spacing: -.035em; font-variant-numeric: tabular-nums; color: var(--on-deep); }
.as-a.is-ok { display: flex; align-items: center; gap: 10px; color: var(--on-deep-ok); }
.as-a.is-ok::before { content: ""; width: 11px; height: 11px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(127, 224, 165, .18); flex: none; }
.as-d { font-size: var(--t-sm); color: var(--on-deep-2); }
/* карточка кабинета на сцене — белая, с тенью, как в герое главной */
.as-card { position: relative; z-index: 2; display: grid; gap: 12px; width: min(300px, calc(100% - 32px)); margin: -44px 16px 0 auto; padding: 14px; border-radius: 18px; background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); box-shadow: var(--pop); }
/* место под карточку задаёт класс, а не :has(): в браузере без него карточка легла бы на последний шаг */
.auth-stage.has-card { padding-bottom: 72px; }
.as-note { font-size: var(--t-xs); color: var(--on-deep-2); }

/* одна колонка по центру: сброс пароля, подтверждение почты, сообщения продукта, «страницы нет» */
.solo { display: grid; gap: 16px; justify-items: start; width: 100%; max-width: 480px; margin: 8px auto 0; }
.solo > * { min-width: 0; max-width: 100%; }
.solo .auth-form { width: 100%; }
.solo-ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-text); }
.solo-ico .i { width: 26px; height: 26px; }
.solo-ico.is-warn { background: var(--warn-soft); color: var(--warn); }
.solo-ico.is-ok { background: var(--ok-soft); color: var(--ok); }
.solo h1 { font-size: clamp(1.875rem, 1.5rem + 1.6vw, 2.5rem); line-height: 1.05; letter-spacing: -.04em; font-weight: 800; }
.solo .lead { font-size: var(--t-md); }
.solo-next { list-style: none; display: grid; width: 100%; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.solo-next li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 16px; border-top: 1px solid var(--line); font-size: var(--t-base); color: var(--ink-2); }
.solo-next li:first-child { border-top: 0; }
.solo-next b { color: var(--ink); font-weight: 650; }

@media (min-width: 1024px) {
  /* левый край формы — на одной линии с логотипом шапки, правый край сцены — с правым краем шапки */
  .auth { grid-template-columns: minmax(0, 480px) minmax(0, 560px); justify-content: space-between; gap: 64px; align-items: start; padding-block: 24px 16px; }
  .auth-main { margin-inline: 0; justify-self: stretch; max-width: 480px; }
  .auth-scene { margin-inline: 0; justify-self: stretch; max-width: none; }
  .auth-form { padding: 28px 28px 24px; }
  .auth-stage { padding: 40px 40px 36px; gap: 26px; min-height: 520px; align-content: center; }
  /* карточка кабинета стоит внутри сцены, под шагами, а не свисает с её края */
  .auth-stage.has-card { padding-bottom: 224px; align-content: start; }
  .as-card { margin: -196px 40px 0 auto; }
  .solo { margin-top: 40px; }
}

/* ── 16. Документы: условия и политика ──────────────────────────────────────
   Юридический текст одной колонкой удобной для чтения ширины. */
.doc { display: grid; gap: 16px; max-width: 860px; }
.doc-body { max-width: none; padding: 22px 20px 24px; gap: 12px; }
.doc-body > * { max-width: 72ch; }
.doc-body > h2:first-child { margin-top: 0; }
.doc-body li::marker { color: var(--ink-3); }
.doc-body a[href^="mailto:"] { white-space: nowrap; }
.doc-also { font-size: var(--t-sm); color: var(--ink-3); }
@media (min-width: 760px) {
  .doc-body { padding: 32px 36px 36px; }
}

/* ── 17. Телефон: состояния, свёрнутые шаги, место под QR ───────────────────
   Точка состояния не пульсирует: страница сама не обновляется, рядом с заголовком — «Обновить». */
.live-status .live-dot { animation: none; box-shadow: none; }
.live-status.is-ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.live-status.is-ok .live-dot { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent); }
.live-status.is-silent { background: var(--warn-soft); border-color: var(--warn-line); }
.live-status.is-silent .live-dot { background: var(--warn); }
.live-status.is-off { background: var(--err-soft); border-color: color-mix(in srgb, var(--err) 35%, transparent); }
.live-status.is-off .live-dot { background: var(--err); }
.live-status.is-none { background: var(--surface-2); border-color: var(--line); }
.live-status.is-none .live-dot { background: var(--ink-3); }

/* дорожка не растягивается под высоту колонки справки: шаги идут сверху подряд */
.phone-grid { align-items: start; }
.track { align-content: start; }

/* сделанный шаг: галочка вместо номера, содержимое свёрнуто под заголовком */
.track-step.is-done { padding-bottom: 16px; }
.track-step.is-done .track-no { background: var(--ok-soft); color: var(--ok); }
.track-step.is-done .track-no .i { width: 18px; height: 18px; stroke-width: 2.6; }
.track-step.is-done .track-body { gap: 0; }
.track-step.is-done .track-body h2 { font-size: var(--t-lg); font-weight: 700; letter-spacing: -.015em; padding-top: 5px; }
.track-fold > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; min-height: 44px; cursor: pointer; list-style: none; font-size: var(--t-sm); color: var(--ink-3); border-radius: var(--r-sm); }
.track-fold > summary::-webkit-details-marker { display: none; }
.fold-meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.fold-meta + .fold-more::before { content: "· "; color: var(--ink-3); font-weight: 400; }
.fold-more { font-weight: 600; color: var(--accent-text); }
.track-fold > summary > .i { color: var(--ink-3); transition: transform .2s; }
.track-fold[open] > summary > .i { transform: rotate(90deg); }
.fold-in { display: grid; gap: 12px; padding: 4px 0 8px; min-width: 0; }
.fold-in > p:not([class]), .track-body > p:not([class]) { color: var(--ink-2); max-width: 64ch; }
.track-body form { margin: 0; }
.track-body .note { max-width: 64ch; }
.track-body > .hint, .fold-in > .hint { max-width: 64ch; }
.track-body > .step-hint, .fold-in > .step-hint { display: flex; gap: 8px; align-items: flex-start; font-size: var(--t-sm); color: var(--ink-2); }

/* место под QR: размер держим заранее, страница не прыгает, пока рисунок собирается.
   Карточка QR всегда белая (иначе не сканируется), поэтому и цвет запасного текста — жёсткий. */
.qr-box { width: 164px; min-height: 164px; display: grid; place-items: center; }
.qr-box .qr { display: block; }
.qr-alt { padding: 8px; font-size: var(--t-xs); line-height: 1.35; color: #3E4947; text-align: center; overflow-wrap: anywhere; }
.copy-row { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); align-items: end; max-width: 64ch; }
.copy-row .btn { min-height: 48px; }
.file-meta a { font-weight: 600; }
.now-box h2 { font-size: var(--t-md); font-weight: 750; margin-bottom: 4px; }
.now-box .kv > div:first-child { border-top: 0; }
.now-box .kv dd { min-width: 0; overflow-wrap: anywhere; }
.danger summary > span { min-width: 0; }
.danger form { margin: 0; }
@media (min-width: 560px) {
  .copy-row { grid-template-columns: minmax(0, 1fr) auto; }
}
@media (max-width: 599px) {
  .track-step.is-done { padding-bottom: 0; }
  .track-step.is-done .track-body h2 { padding-top: 5px; }
  .track-step.is-done + .track-step, .track-step + .track-step.is-done { margin-top: 14px; padding-top: 14px; }
  .track-fold > summary { padding-left: 46px; flex-wrap: nowrap; gap: 0 6px; }
  .track-fold > summary > .fold-more, .track-fold > summary > .i { flex: none; }
  .track-fold > summary > .fold-meta { white-space: normal; overflow-wrap: anywhere; padding-block: 6px; }
  .track-body .btn-row .btn { width: 100%; }
  .track-body .btn-row, .track-body .btn-row form { width: 100%; }
}

/* ── 18. Страница подключения — её открывает телефон-шлюз по QR-коду ─────── */
.connect .page-head { margin-bottom: 0; }
.note-big { font-size: var(--t-base); line-height: 1.5; padding: 14px 16px; }
.note-big b { font-weight: 700; }
.connect-steps { list-style: none; counter-reset: cs; display: grid; gap: 12px; }
.connect-steps li { counter-increment: cs; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; color: var(--ink-2); font-size: var(--t-base); }
.connect-steps li::before { content: counter(cs); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); font-weight: 750; font-size: var(--t-sm); font-variant-numeric: tabular-nums; }
.connect-next { margin-top: 4px; font-size: var(--t-md); font-weight: 700; }
.connect-faq summary { min-height: 48px; font-size: var(--t-base); }
.connect-faq details p { padding-right: 0; font-size: var(--t-sm); }

/* ── 19. Сообщения: то, чего не было в макете ──────────────────────────────
   Запертая форма, действия по строке формами, пустой журнал, «Показать раньше». */
.composer.is-locked .composer-sum { display: none !important; }
@media (max-width: 1023px) {
  /* запертая форма и форма с отказом сервера на телефоне не сворачиваются в строку */
  .composer.is-locked:not(:target), .composer.is-open:not(:target) { grid-template-columns: minmax(0, 1fr); align-items: start; padding: 20px; }
  .composer.is-open:not(:target) form { display: grid; }
  .composer.is-open:not(:target) .composer-sum, .composer.is-open:not(:target) .composer-open { display: none; }
}
.retry .r-closed { display: inline-flex; align-items: center; gap: 8px; }
.msg-acts { display: inline-flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.msg-acts form, .retry-body form { margin: 0; }
.msg-foot .msg-acts .btn, .retry-body .btn { margin-left: 0; }
.msg-foot > .btn-sm { margin-left: auto; }
.msg-text { overflow-wrap: anywhere; white-space: pre-line; }
.msg-id { overflow-wrap: anywhere; min-width: 0; }
.empty-box { display: grid; gap: 6px; padding: 24px; }
.more-row { margin-top: 12px; }
.journal-note { margin-top: 14px; max-width: 72ch; }
.composer .flash { margin: 0; }

/* ── 20. API и тариф: то, чего не было в макете ────────────────────────────
   Запертое состояние под заголовком, строка нового ключа, отозванные ключи, страница тарифа. */
.page-state { align-items: flex-start; max-width: 72ch; }
.page-state .i { flex: none; margin-top: 2px; }
.page-state.is-locked .i { color: var(--warn); }
.keys tr.is-new td { background: color-mix(in srgb, var(--warn-soft) 55%, transparent); }
.keys tr.is-new td:first-child { box-shadow: inset 3px 0 0 var(--warn); padding-left: 10px; }
.keys form { margin: 0; }
.keys .k-tail { white-space: nowrap; }
@media (min-width: 900px) { .keys .k-meta { white-space: nowrap; } }
.keys + .lock-note, .muted + .lock-note { margin-top: 14px; }
@media (max-width: 559px) {
  /* на телефоне строка ключа — карточка: отметка нового ключа на всей строке, а не по ячейкам */
  .keys tr.is-new { padding-inline: 12px 8px; background: color-mix(in srgb, var(--warn-soft) 55%, transparent); box-shadow: inset 3px 0 0 var(--warn); }
  .keys tr.is-new td, .keys tr.is-new td:first-child { background: none; box-shadow: none; padding-left: 0; }
}
.keys-old { margin-top: 16px; font-size: var(--t-sm); color: var(--ink-3); }
.keys-old > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; list-style: none; font-weight: 600; color: var(--ink-2); }
.keys-old > summary::-webkit-details-marker { display: none; }
.keys-old > summary .i { transition: transform .15s; }
.keys-old[open] > summary .i { transform: rotate(90deg); }
.keys-old ul { list-style: none; display: grid; gap: 6px; margin-top: 4px; }
.keys-old li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.keys-old .k-tail { font-family: var(--mono); }
.codetabs > .hint { max-width: 72ch; }
.api-facts code, .codetabs > .hint code { font-family: var(--mono); font-size: .92em; }

.plan-page { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.plan-list { container-type: inline-size; min-width: 0; }
.plan-list > h2 { font-size: var(--t-lg); font-weight: 750; letter-spacing: -.02em; margin-bottom: 14px; }
@container (max-width: 900px) {
  .plans { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; gap: 16px; margin-block: 0; }
  .plan { grid-row: auto; grid-template-rows: none; }
  .plan.is-pro { margin-block: 0; padding: 26px 24px 24px; border-radius: var(--r-lg); }
  .spec { grid-template-columns: 8.5rem minmax(0, 1fr); }
  .plan-estimate-note { margin-top: 0; }
}
.plan.is-current { box-shadow: 0 0 0 2px var(--accent); }
.plan-cur { display: flex; align-items: flex-start; gap: 8px; min-height: 44px; padding-top: 10px; font-weight: 700; font-size: var(--t-base); }
.plan-cur .i { flex: none; margin-top: 2px; color: var(--ok); stroke-width: 2.4; }
.plan-cur small { display: block; margin-top: 2px; font-size: var(--t-sm); font-weight: 400; color: var(--ink-3); }
.plan-cur.is-quiet { font-weight: 500; font-size: var(--t-sm); color: var(--ink-3); }
.plan.is-pro .plan-cur .i, .plan.is-pro .plan-cur { color: var(--on-pro); }
.plan.is-pro .plan-cur small { color: var(--on-pro-2); }
.pay { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); scroll-margin-top: 84px; }
.pay h2 { font-size: 1.375rem; font-weight: 800; letter-spacing: -.025em; }
.pay-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-top: -6px; }
.pay-price b { font-size: 1.75rem; line-height: 1.1; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.pay-price span { color: var(--ink-3); font-size: var(--t-sm); }
.pay-d { color: var(--ink-2); max-width: 72ch; }
.pay form { margin: 0; }
.plan-now dd { display: grid; justify-items: end; gap: 6px; }
.plan-now dd small { font-size: var(--t-sm); font-weight: 400; color: var(--ink-3); }
.plan-now progress.bar { width: min(180px, 40vw); }
.plan-now-d { margin-top: 12px; max-width: 72ch; }
.plan-now + .lock-note { margin-top: 12px; }

/* ── 21. Настройки, удаление аккаунта, отчёты, документация: то, чего не было в макете ── */
.settings { max-width: 720px; }
.form-col { display: grid; gap: 14px; margin: 0; }
.form-col .field { max-width: 420px; }
.form-col .pass .input { min-height: 52px; }
.form-col .flash { margin: 0; }
.form-after { margin-top: 14px; max-width: 70ch; }
.settings .panel > .flash { margin: 0 0 14px; }
.plain-list { list-style: none; display: grid; gap: 6px; font-size: var(--t-sm); color: var(--ink-2); }
.plain-list b { color: var(--ink); font-weight: 650; }
.settings .kv dd a { font-weight: 650; }
.danger-body .flash { margin: 0; }
.narrow-page { max-width: 640px; }
.panel-text { color: var(--ink-2); max-width: 70ch; margin-bottom: 14px; }
/* свёрнутый блок без опасного действия — тот же вид, что у .danger */
.fold summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; cursor: pointer; list-style: none; font-weight: 650; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary > span { min-width: 0; }
.fold summary .i { transition: transform .2s; color: var(--ink-3); }
.fold[open] summary .i { transform: rotate(90deg); }
.fold-body { padding-top: 8px; }
.prose-steps { padding-left: 22px; display: grid; gap: 8px; }
.reports { max-width: 860px; }
.report-list a { min-height: 64px; align-items: center; }
.report-list .rl-main { display: grid; gap: 2px; min-width: 0; padding: 8px 0; }
.report-list .rl-main b { font-weight: 650; }
.report-list .rl-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: var(--t-sm); font-weight: 400; color: var(--ink-3); }
.report-list .rl-meta span { min-width: 0; overflow-wrap: anywhere; }
.report-text { display: grid; gap: 12px; min-width: 0; }
.report-body { max-height: 70vh; overflow: auto; overflow-wrap: anywhere; }
.docs .docs-h3 { margin: 20px 0 10px; font-size: var(--t-lg); font-weight: 700; color: var(--ink); }
.docs .panel > .prose + .docs-h3 { margin-top: 22px; }
.docs .codetabs { margin-bottom: 14px; }
.docs-code { border-radius: var(--r-md); margin: 0 0 14px; overflow-wrap: anywhere; }
.docs .panel > .prose + .docs-code, .docs .panel > .docs-code + .prose, .docs .panel > .codes + .docs-h3 { margin-top: 14px; }
.codes { display: grid; margin: 0; }
.codes > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); }
.codes dt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: var(--t-sm); min-width: 0; }
.codes code { font-family: var(--mono); font-size: .92em; background: var(--surface-3); padding: 1px 6px; border-radius: var(--r-xs); overflow-wrap: anywhere; }
.codes .http { min-width: 2.2em; font-size: var(--t-xs); font-weight: 650; color: var(--ink-3); }
.codes dd { font-size: var(--t-base); line-height: 1.5; color: var(--ink-2); min-width: 0; }
.codes-retry { display: block; margin-top: 2px; font-size: var(--t-sm); color: var(--ink-3); }
@media (min-width: 720px) {
  .codes > div { grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: baseline; }
}

/* ── 22. Админка ─────────────────────────────────────────────────────────── */
.admin { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.admin > .page-head { margin-bottom: 0; }
.admin > .flash { margin: 0; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.admin-top form { margin: 0; flex: none; }
.admin-nav { flex: 1 1 auto; min-width: 0; }
.admin-tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.admin-tiles .qa-a span { font-size: 1rem; font-weight: 600; letter-spacing: 0; color: var(--ink-3); }
.admin-search { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 0; }
.admin-search .field { flex: 1 1 260px; max-width: 420px; }
.admin-after { max-width: 80ch; }
.admin-back { font-size: var(--t-sm); font-weight: 600; margin-bottom: -8px; }
.admin-back a { display: inline-flex; align-items: center; min-height: 44px; }
.admin-set { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 2px; }
.admin-set legend { padding: 0; margin-bottom: 4px; }
.admin-plan { max-width: 640px; }
.admin-close { margin: 8px 0 0; }
.admin .kv dd small { display: block; margin-top: 2px; font-size: var(--t-sm); font-weight: 400; color: var(--ink-3); overflow-wrap: anywhere; }
.admin .kv dd { overflow-wrap: anywhere; min-width: 0; }
.admin .panel-head h2 { overflow-wrap: anywhere; min-width: 0; }
.admin .panel > .note { margin-bottom: 14px; }
/* скрытая подпись столбца стоит в таблице абсолютно: без своей точки отсчёта она растягивала бы страницу */
.admin .table-wrap { position: relative; }
.admin .table .badge, .admin .table .nowrap, .admin .table .num { white-space: nowrap; }
/* на узком экране таблица прокручивается вбок, слова в ней не рвутся; рвётся только чужой длинный текст */
.admin .table .t-wide { min-width: 200px; overflow-wrap: anywhere; }
.admin .table .btn-sm { white-space: nowrap; }

/* ─── 23. Телефон: дизайн 30.09.2026 (основа B «Лента состояния» + находки A и C) ──────────────────────
   Всё новое для телефона живёт здесь и включается ниже 1024 px; компьютерная версия не меняется. Классы
   с приставкой m- — только у новых страниц и у телефонных дублей (.only-mob) старых. Исходник — .claude/design/smsflake/mobile/final. */

/* общее для страниц телефона: заголовок-итог, подписи, группы, списки-меню, экран-задача. Вне @media —
   только то, что нужно новым страницам («Меню», «Новое сообщение») и на компьютере, где они обычные страницы кабинета. */
.m-head { display: grid; gap: 6px; margin: 0 0 4px; }
.m-sum { font: 800 1.75rem/1.12 var(--sans); letter-spacing: -.035em; text-wrap: balance; }
.m-acct { color: var(--ink-3); font-size: var(--t-md); overflow-wrap: anywhere; }
.m-acct b { color: var(--ink-2); font-weight: 600; }
.m-grp { display: flex; align-items: center; gap: 8px; margin: 20px 2px 10px; max-width: 600px; font-size: var(--t-sm); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.m-grp::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.m-grp-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--warn); color: var(--on-warn); letter-spacing: 0; font-size: var(--t-xs); }
.m-grp-c { letter-spacing: 0; text-transform: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.m-list { list-style: none; max-width: 600px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0 14px; }
.m-head + .m-list { margin-top: 16px; }
.m-list li + li { border-top: 1px solid var(--line); }
.m-list a { display: grid; grid-template-columns: 40px minmax(0, 1fr) 16px; gap: 12px; align-items: center; min-height: 60px; padding: 8px 0; color: var(--ink); text-decoration: none; }
.m-list a:hover { text-decoration: none; }
.m-list a > span:nth-child(2) { display: grid; }
.m-list b { font-weight: 650; }
.m-list small { font-size: var(--t-sm); color: var(--ink-3); line-height: 1.35; }
.m-list a > .i:last-child { color: var(--ink-3); }
.m-opt-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); }
.m-logout { margin-top: 18px; max-width: 600px; }
.m-logout .btn { min-height: 52px; }
.m-legal { display: flex; justify-content: center; gap: 4px 20px; flex-wrap: wrap; margin-top: 6px; max-width: 600px; }
.m-legal a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-3); font-size: var(--t-sm); }
.m-headrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; margin-top: 4px; }
.m-headrow .m-refresh { margin-right: -8px; }
.m-meta { margin-top: -6px; font-size: var(--t-sm); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.m-tip { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); font-size: var(--t-sm); color: var(--ink-2); }
.m-tip .i { margin-top: 2px; flex: none; color: var(--accent-text); }

/* экран-задача «Новое сообщение»: на компьютере — обычная страница кабинета (шапка задачи спрятана классом only-mob) */
.m-task { display: grid; gap: 18px; max-width: 600px; }
.m-task-main { display: grid; align-content: start; gap: 18px; }
.m-task-foot { display: grid; gap: 8px; }
.m-cnt.sms-count { margin-top: 0; gap: 6px; }
.m-back-ico { transform: rotate(180deg); }

@media (max-width: 1023px) {
  /* поля на телефоне не мельче 16 px: iPhone приближает страницу к полю с текстом мельче */
  .input { min-height: 52px; font-size: 1.0625rem; }
  .input.mono { font-size: 1.0625rem; }
  textarea.input { min-height: 150px; }
  /* обычная кнопка на белой карточке — рамка цвета --field: 3,9:1 и 4,0:1, видна в обеих темах */
  .btn:not(.btn-primary):not(.btn-outline):not(.btn-quiet):not(.btn-danger):not(.btn-warn):not(.btn-pro):not([disabled]):not([aria-disabled="true"]) { border-color: var(--field); }

  /* экран-задача: без верхней полоски и нижней панели кабинета; свои закреплённые верх и низ */
  body.is-task .mbar, body.is-task .dock { display: none; }
  body.is-task .main-in { padding: 0; max-width: none; }
  body.is-task .app { grid-template-rows: 1fr; }
  .m-task { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; max-width: none; gap: 0; }
  .m-task-top {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 8px;
    min-height: calc(56px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) max(8px, env(safe-area-inset-right, 0px)) 0 max(6px, env(safe-area-inset-left, 0px));
    background: var(--canvas); border-bottom: 1px solid var(--line);
  }
  @supports (backdrop-filter: blur(1px)) {
    .m-task-top { background: color-mix(in srgb, var(--canvas) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); }
  }
  .m-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 12px 0 6px; color: var(--accent-text); font-weight: 650; text-decoration: none; }
  .m-pill-link { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 4px; color: var(--ink-3); text-decoration: none; }
  .m-task-main { flex: 1; padding: 16px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); max-width: 600px; width: 100%; margin: 0 auto; }
  .m-task-main .m-sum { margin-bottom: 2px; }
  .m-task-foot {
    position: sticky; bottom: 0; z-index: 30;
    padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    border-top: 1px solid var(--line); background: var(--surface);
  }
  .m-task-foot > * { max-width: 600px; margin-inline: auto; width: 100%; }
  /* счётчик в закреплённом низу: крупные числа, как в макете */
  .m-cnt .sms-count-row { align-items: baseline; font-size: var(--t-md); }
  .m-cnt .sms-count-row b { font: 800 1.25rem/1.1 var(--sans); letter-spacing: -.02em; }
  /* поле в фокусе не уходит под закреплённый низ и под нижнюю панель */
  html { scroll-padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
}

/* ── 23б. Телефон: обзор лентой — фраза-итог, «Нужно решить», табло, «Сегодня» ────────────────── */
@media (min-width: 1024px) {
  /* компьютерная разметка обзора завёрнута в .only-desk-c: обёртка не создаёт блока, дети — прежние дети .main-in */
  .only-desk-c { display: contents; }
  .main-in > .only-desk-c > * { max-width: 1080px; }
}
@media (max-width: 1023px) {
  .only-desk-c { display: none !important; }
  .m-ov { display: grid; gap: 0; max-width: 600px; margin: 0 auto; }
  .m-ov .m-head > .m-sum:first-child { margin-top: 8px; }
  .m-refresh { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 8px; color: var(--accent-text); font-weight: 600; font-size: var(--t-base); text-decoration: none; }
  .m-stamp { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; margin-top: -2px; font-size: var(--t-sm); color: var(--ink-3); font-variant-numeric: tabular-nums; }
  .m-stamp .m-refresh { margin-right: -8px; }
  .m-ov .flash { margin: 8px 0 0; }

  /* табло (из A): «Телефон на связи?» и «Осталось на сегодня?» рядом; глубокая бирюза = устройство */
  .m-board {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin: 12px 0 0; border-radius: var(--r-lg); overflow: hidden;
    background-color: var(--deep); background-image: radial-gradient(260px 160px at 100% 0%, rgba(134, 221, 217, .14), transparent 70%); color: var(--on-deep);
  }
  section + .m-board { margin-top: 16px; }
  .m-bcell { display: grid; align-content: start; gap: 2px; min-width: 0; padding: 14px 12px 12px 16px; color: inherit; text-decoration: none; }
  .m-bcell + .m-bcell { border-left: 1px solid var(--deep-line); padding: 14px 16px 12px 14px; }
  .m-bdev:hover { text-decoration: none; }
  .m-bdev:active { background: var(--deep-2); }
  .m-board .m-q { color: var(--on-deep-2); font-size: var(--t-xs); font-weight: 500; }
  .m-bdev .m-q { justify-content: space-between; }
  .m-bdev .m-q .i { color: var(--on-deep-2); }
  .m-ba { display: flex; align-items: center; gap: 8px; margin-top: 2px; font: 800 1.5rem/1.15 var(--sans); letter-spacing: -.035em; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .m-ba small { font-size: var(--t-md); font-weight: 700; letter-spacing: -.01em; color: var(--on-deep-2); }
  .m-ba.is-ok::before, .m-ba.is-silent::before, .m-ba.is-off::before, .m-ba.is-none::before { content: ""; width: 10px; height: 10px; border-radius: 50%; flex: none; }
  .m-ba.is-ok::before { background: var(--on-deep-ok); box-shadow: 0 0 0 4px rgba(127, 224, 165, .18); }
  .m-ba.is-silent::before { background: var(--on-deep-warn); }
  .m-ba.is-off::before { background: var(--on-deep-err); }
  .m-ba.is-none::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--on-deep-2); }
  .m-bd { font-size: var(--t-xs); line-height: 1.35; color: var(--on-deep-2); }
  .m-bd b { color: var(--on-deep); font-weight: 650; }
  .m-board progress.bar { margin-top: 8px; background: var(--deep-line); }
  .m-board progress.bar::-webkit-progress-bar { background: var(--deep-line); }
  .m-board progress.bar::-webkit-progress-value { background: var(--on-deep-accent); }
  .m-board progress.bar::-moz-progress-bar { background: var(--on-deep-accent); }
  .m-bfoot { grid-column: 1 / -1; padding: 9px 16px 11px; border-top: 1px solid var(--deep-line); font-size: var(--t-xs); color: var(--on-deep-2); font-variant-numeric: tabular-nums; }
  .m-brow { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 12px; padding: 12px 16px; border-top: 1px solid var(--deep-line); }
  .m-ba2 { font-weight: 750; font-size: 1.0625rem; letter-spacing: -.015em; white-space: nowrap; }
  .m-brow .m-bd { grid-column: 1 / -1; }

  /* карточки ленты */
  .m-card { display: grid; gap: 12px; min-width: 0; padding: 18px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--ink); }
  .m-card + .m-card { margin-top: 12px; }
  .m-card.m-act { gap: 10px; background: var(--warn-soft); border-color: var(--warn-line); }
  .m-card.m-step { border: 2px solid var(--accent); padding: 17px 15px; margin-top: 14px; }
  .m-card.m-offer { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
  .m-qa { display: grid; gap: 2px; }
  .m-q { display: flex; align-items: center; gap: 6px; font-size: var(--t-sm); font-weight: 500; color: var(--ink-3); }
  .m-act .m-q { color: var(--warn); font-weight: 650; }
  .m-step .m-q { color: var(--accent-text); font-weight: 650; }
  .m-a { font: 800 1.5rem/1.15 var(--sans); letter-spacing: -.03em; text-wrap: balance; font-variant-numeric: tabular-nums; }
  .m-d { font-size: var(--t-base); color: var(--ink-2); }
  .m-act .m-d { color: var(--ink); }
  .m-more { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; justify-self: start; font-weight: 650; color: var(--accent-text); text-decoration: none; margin: -6px 0 -8px; }
  .m-rowlink { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 52px; margin: -4px -16px -18px; border-top: 1px solid var(--line); color: var(--accent-text); font-weight: 650; text-decoration: none; }
  /* тело текущего шага (общее с компьютером): форма кода — на всю ширину */
  .m-step-body { display: grid; gap: 12px; }
  .m-step-body > p { font-size: var(--t-base); color: var(--ink-2); }
  .m-step-body .code-form { display: grid; }
  .m-step-body .code-form .field, .m-step-body .code-form .btn { width: 100%; }
  .m-step-body .btn-row .btn { width: 100%; }
  .m-step-body .resend { margin-top: 0; }
  .m-step-body .step-hint { padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); font-size: var(--t-sm); color: var(--ink-2); }

  /* СМС в карточке — пузырём: что именно ушло клиенту */
  .m-bub { display: grid; gap: 4px; padding: 11px 14px 12px; border-radius: 16px 16px 16px 6px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--warn-line) 55%, transparent); }
  .m-bub-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: var(--t-xs); color: var(--ink-3); }
  .m-bub-top .mono { color: var(--ink); font-size: var(--t-sm); font-weight: 500; }
  .m-bub p { font-size: var(--t-base); }

  /* решение прямо в карточке: повтор — только через подтверждение; безопасная кнопка — нижняя */
  .m-decide > summary { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: var(--r-sm); border: 1.5px solid color-mix(in srgb, var(--ink) 72%, transparent); background: var(--surface); font-weight: 650; list-style: none; cursor: pointer; }
  .m-decide > summary::-webkit-details-marker { display: none; }
  .m-decide .r-open { display: none; }
  .m-decide[open] > summary { justify-content: flex-start; min-height: 44px; padding: 0; border: 0; background: transparent; font-size: 1.0625rem; font-weight: 750; }
  .m-decide[open] .r-closed { display: none; }
  .m-decide[open] .r-open { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; }
  .m-decide[open] .r-open > .i { width: 20px; height: 20px; color: var(--ink-3); }
  .m-decide .r-closed { display: inline-flex; align-items: center; gap: 8px; }
  .m-decide-body { display: grid; gap: 10px; padding-top: 2px; }
  .m-decide-body > p { font-size: var(--t-base); color: var(--ink-2); }
  .btn-col { display: grid; gap: 8px; }
  .m-leave { display: flex; gap: 8px; align-items: flex-start; font-size: var(--t-sm); color: var(--ink-2); }
  .m-leave .i { margin-top: 2px; flex: none; color: var(--ok); }

  /* «Сегодня»: четыре числа и последние сообщения лентой */
  .m-stats { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
  .m-stats li { display: grid; gap: 2px; align-content: start; padding: 10px 12px; background: var(--surface); }
  .m-stats b { font: 800 1.375rem/1.1 var(--sans); font-variant-numeric: tabular-nums; }
  .m-stats span { font-size: var(--t-xs); line-height: 1.3; color: var(--ink-3); }
  .m-stats li.warn { background: var(--warn-soft); }
  .m-stats li.warn b, .m-stats li.warn span { color: var(--warn); }
  .m-tl { list-style: none; display: grid; }
  .m-tl li { position: relative; display: grid; grid-template-columns: 12px minmax(0, 1fr); column-gap: 12px; padding: 9px 0; }
  .m-tl li::before { content: ""; position: absolute; left: 5px; top: 26px; bottom: -8px; width: 2px; background: var(--line); }
  .m-tl li:last-child::before { display: none; }
  .m-dot { width: 12px; height: 12px; margin-top: 5px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--field); position: relative; z-index: 1; }
  .s-sent .m-dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
  .s-unknown .m-dot, .s-failed .m-dot { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
  .s-rejected .m-dot { background: var(--err); box-shadow: 0 0 0 3px var(--err-soft); }
  .s-handed .m-dot { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  .s-cancelled .m-dot { background: var(--surface-3); box-shadow: inset 0 0 0 2px var(--line-2); }
  .m-tlb { display: grid; gap: 4px; min-width: 0; }
  .m-tltop { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px; min-height: 22px; }
  .m-tltop .mono { font-size: var(--t-sm); font-weight: 500; }
  .m-tltop time { font: 500 var(--t-xs)/1.5 var(--mono); color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
  /* текст СМС — до двух строк: одной не хватало для смысла */
  .m-tlx { font-size: var(--t-base); color: var(--ink-2); overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
  .m-tlfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
  .m-ticks { list-style: none; display: grid; gap: 8px; }
  .m-ticks li { display: flex; gap: 8px; align-items: flex-start; font-size: var(--t-base); }
  .m-ticks .i { margin-top: 3px; flex: none; color: var(--accent-text); }
  .m-offer .btn-row { gap: 8px; }

  /* первый запуск: шаги строками */
  .m-checks { list-style: none; display: grid; }
  .m-checks li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .m-checks li:first-child { padding-top: 0; }
  .m-checks li > span:last-child { display: grid; }
  .m-checks small { font-size: var(--t-sm); color: var(--ink-3); overflow-wrap: anywhere; }
  .m-mk { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-weight: 750; font-size: var(--t-sm); }
  .m-checks .done .m-mk { background: var(--ok-soft); color: var(--ok); }
  .m-checks .cur .m-mk { background: var(--accent); color: var(--on-accent); }
  .m-checks .cur b { color: var(--accent-text); }
  .m-checks .todo .m-mk { background: var(--surface-2); color: var(--ink-3); border: 1.5px dashed var(--field); }
  .m-checks .todo b { color: var(--ink-3); font-weight: 600; }
  .m-opt { display: grid; grid-template-columns: 40px minmax(0, 1fr) 16px; gap: 12px; align-items: center; min-height: 60px; padding: 8px 0; color: var(--ink); text-decoration: none; }
  .m-opt:hover { text-decoration: none; }
  .m-opt > span:nth-child(2) { display: grid; }
  .m-opt small { font-size: var(--t-sm); color: var(--ink-3); line-height: 1.35; }
  .m-opt > .i:last-child { color: var(--ink-3); }
}

/* ── 23в. Телефон: журнал сообщений лентой; форма ушла на экран «Новое сообщение» ──────────────── */
@media (max-width: 1023px) {
  .msg-layout { display: block; }
  .list-wrap { max-width: 600px; margin: 0 auto; }
  /* фильтр (из C): одна строка «Показать: Все», список всех статусов по нажатию; рядом — «ждёт решения» в одно нажатие */
  .m-filter-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin: 10px 0 0; }
  .m-filter { flex: 1 1 auto; min-width: 0; }
  .m-filter[open] { flex-basis: 100%; }
  .m-filter > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px 0 16px; border-radius: var(--r-pill); border: 1px solid var(--field); background: var(--surface); font-size: var(--t-base); white-space: nowrap; list-style: none; cursor: pointer; }
  .m-filter > summary::-webkit-details-marker { display: none; }
  .m-filter > summary .k { color: var(--ink-3); }
  .m-filter > summary b { font-weight: 700; }
  .m-filter > summary > .i { color: var(--ink-3); transform: rotate(90deg); transition: transform .15s; }
  .m-filter[open] > summary > .i { transform: rotate(-90deg); }
  .m-filter ul { list-style: none; margin-top: 8px; padding: 2px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
  .m-filter li + li { border-top: 1px solid var(--line); }
  .m-filter li a { display: flex; align-items: center; gap: 10px; min-height: 48px; color: var(--ink); font-weight: 600; text-decoration: none; }
  .m-filter li a > span:first-child { flex: 1; }
  .m-filter li a[aria-current] { color: var(--accent-text); }
  .m-filter li a[aria-current]::after { content: ""; width: 12px; height: 7px; margin: -3px 4px 0 0; border: solid currentColor; border-width: 0 0 2px 2px; transform: rotate(-45deg); }
  .m-filter .n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); background: var(--surface-3); color: var(--ink-2); font-size: var(--t-2xs); font-weight: 700; font-variant-numeric: tabular-nums; }
  .m-filter .n.warn { background: var(--warn-soft); color: var(--warn); }
  .m-quick { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: var(--r-pill); background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--warn); font-size: var(--t-base); font-weight: 650; text-decoration: none; white-space: nowrap; }
  .m-quick[aria-current] { background: var(--warn); color: var(--on-warn); }
  .m-filter-row:has(.m-filter[open]) .m-quick { display: none; }
  @media (max-width: 379px) {
    .m-filter > summary { padding: 0 8px 0 12px; font-size: var(--t-sm); }
    .m-quick { padding: 0 10px; gap: 5px; font-size: var(--t-sm); }
  }

  /* лента: точка статуса на линии, событие справа */
  .day { margin: 20px 2px 10px; font-size: var(--t-xs); letter-spacing: .06em; }
  .msgs { padding: 4px 14px; border-radius: var(--r-lg); overflow: visible; }
  .msg { grid-template-columns: 12px minmax(0, 1fr); column-gap: 12px; row-gap: 0; padding: 14px 0; }
  .msg::before { content: ""; grid-column: 1; grid-row: 1; width: 12px; height: 12px; margin-top: 5px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--field); position: relative; z-index: 1; }
  .msg::after { content: ""; position: absolute; left: 5px; top: 40px; bottom: -14px; width: 2px; background: var(--line); }
  .msg:last-child::after { display: none; }
  .msg.s-sent::before { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
  .msg.s-unknown::before, .msg.s-failed::before { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
  .msg.s-rejected::before { background: var(--err); box-shadow: 0 0 0 3px var(--err-soft); }
  .msg.s-handed::before { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  .msg.s-cancelled::before { background: var(--surface-3); box-shadow: inset 0 0 0 2px var(--line-2); }
  .msg > * { grid-column: 2; }
  .msg-top { flex-wrap: wrap; gap: 2px 8px; min-height: 22px; }
  .msg-to { font-size: var(--t-sm); }
  .msg-when { font: 500 var(--t-xs)/1.5 var(--mono); font-variant-numeric: tabular-nums; }
  .msg-text { margin-top: 4px; font-size: var(--t-md); color: var(--ink); }
  .msg-foot { margin-top: 4px; gap: 6px 10px; }
  .msg-foot .btn, .msg-foot > .btn-sm, .msg-foot .msg-acts { margin-left: 0; }
  .msg-foot .msg-acts { flex-basis: 100%; margin-top: 4px; }
  .msg-why { margin-top: 4px; }
  .msg.is-warn { margin: 0 -14px; padding-left: 14px; padding-right: 14px; background: var(--warn-soft); }
  .msg.is-warn::after { left: 19px; }
  .msg.is-warn .badge.warn { background: var(--surface); box-shadow: inset 0 0 0 1px var(--warn-line); }
  .msg.is-warn .badge.err { background: var(--surface); box-shadow: inset 0 0 0 1px var(--err); }
  /* повтор «неизвестно»: подтверждение как на обзоре — «Да» сверху, безопасная «Не отправлять» внизу, полноценная кнопка */
  .retry { margin-top: 6px; }
  .retry:not([open]) > summary { display: flex; justify-content: center; width: 100%; min-height: 48px; border: 1.5px solid color-mix(in srgb, var(--ink) 72%, transparent); font-weight: 650; }
  .retry[open] { padding: 0; border: 0; background: transparent; }
  .retry-body .btn-row { display: grid; gap: 8px; }
  .retry-body .btn-row form { display: contents; }
  .retry-body .btn { width: 100%; }
  .retry-body .btn-quiet { border: 1px solid var(--field); color: var(--ink); background: var(--surface); order: 2; }
  .more-row { margin-top: 14px; }
  .more-row .btn { width: 100%; }
  .journal-note { margin-top: 14px; }
  .list-wrap > .hint:first-of-type { margin-top: 10px; }
}

/* ── 23г. Телефон: страница «Телефон» карточками шагов; заголовок страниц кабинета ─────────────── */
@media (max-width: 1023px) {
  /* заголовок страницы кабинета: крупно, «Обновить» справа в той же строке */
  .page-head { margin-bottom: 10px; }
  .page-head .ph-title { flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; margin-top: 4px; }
  .page-head h1 { font: 800 1.75rem/1.12 var(--sans); letter-spacing: -.035em; }
  .page-head .live-link { flex: none; margin-right: -8px; min-height: 44px; padding: 0 8px; font-weight: 600; font-size: var(--t-base); }
  .page-sub { margin-top: 0; font-size: var(--t-base); }

  /* страница «Телефон»: состояние показывает пилюля в шапке, блок «Телефон на связи?» и «Сейчас» не нужны */
  .gw-root { max-width: 600px; margin: 0 auto; }
  .gw-pick { margin: 12px 0 0; }
  .gw-pick legend { font-size: var(--t-base); }
  .pick label { align-items: flex-start; min-height: 72px; padding: 12px; border-color: var(--field); }
  .pick label .i { width: 22px; height: 22px; margin-top: 1px; }
  .pick input:checked + label { padding: 11px; background: var(--accent-soft); }
  .need-details { margin: 12px 0 0; }
  .fold-in .gw-pick { margin-top: 0; }
  .phone-grid { gap: 12px; margin-top: 12px; }
  .track { display: grid; gap: 12px; }
  .track-step { grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
  .track-step + .track-step { margin-top: 0; padding-top: 16px; border-top: 1px solid var(--line); }
  .track-step::before { display: none; }
  .track-step.is-current { border: 2px solid var(--accent); padding: 15px; }
  .track-step.is-current + .track-step { border-top: 1px solid var(--line); }
  .track-step.is-locked { background: transparent; border: 1.5px dashed var(--line-2); }
  .track-no { grid-row: 1; grid-column: 1; width: 32px; height: 32px; background: var(--surface-3); color: var(--ink-2); font-size: var(--t-base); }
  .track-step.is-current .track-no { background: var(--accent); color: var(--on-accent); }
  .track-step.is-locked .track-no { background: var(--surface-2); }
  .track-body { grid-row: 1; grid-column: 1 / -1; gap: 12px; }
  .track-body h2 { display: block; min-height: 32px; padding: 4px 0 0 44px; font-size: var(--t-lg); font-weight: 750; letter-spacing: -.02em; }
  .track-step.is-locked .track-body h2 { color: var(--ink-2); }
  .track-body > p, .fold-in > p:not([class]) { font-size: var(--t-base); }
  /* сделанный шаг — строка «✓ что сделано / подробность», раскрывается нажатием */
  .track-step.is-done { padding: 0 14px; gap: 0; }
  .track-step.is-done .track-no { margin-top: 16px; }
  .track-step.is-done .track-body { gap: 0; }
  .track-step.is-done .track-body h2 { min-height: 0; padding: 14px 24px 0 44px; font-size: var(--t-md); font-weight: 700; letter-spacing: -.01em; }
  .track-fold > summary { min-height: 0; padding: 0 0 14px 44px; gap: 0 8px; }
  .fold-more { display: none; }
  .track-fold > summary > .i { position: absolute; right: 14px; top: 22px; }
  .track-step.is-done { position: relative; }
  .fold-in { padding: 2px 0 16px; }
  .track-card { display: grid; gap: 12px; padding: 0; border: 0; background: transparent; }
  .track-card .qr-card { width: min(240px, 100%); margin-inline: auto; }
  .file-meta { display: grid; gap: 4px; justify-items: stretch; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
  .file-meta .btn { margin-top: 8px; width: 100%; }
  .file-meta > span { justify-self: start; }
  .track-body .btn-row { display: grid; gap: 8px; }
  .track-body .btn-row form { display: contents; }
  .track-body .btn-row .btn, .track-body > .gw-this-only .btn, .gw-this-only.btn-lg { width: 100%; }
  .copy-row .btn { width: 100%; }
  .inapp li { padding: 12px 14px; }
  .app-say { justify-self: start; align-items: center; min-height: 28px; padding: 2px 10px 2px 8px; border-radius: 8px; border: 1.5px dashed var(--line-2); font-size: var(--t-xs); font-weight: 600; }
  .app-say .i { margin-top: 0; }
  /* шаг 4: код (главное сейчас) → тестовое СМС → номер и имя; на компьютере порядок прежний */
  .sim { border: 0; background: transparent; gap: 0; }
  .sim-part { padding: 14px 0 0; border-top: 1px solid var(--line); gap: 10px; }
  .sim-part[aria-labelledby="sim-c"] { order: -2; }
  .sim-part[aria-labelledby="sim-b"] { order: -1; }
  .sim-part .btn, .sim-part .code-form .btn { width: 100%; }
  .code-form { display: grid; }
  .code-form .field { width: 100%; }
  /* справка внизу: список и «Телефон потерян или заменён?» карточками */
  .phone-aside { gap: 10px; margin-top: 8px; }
  .phone-aside .help-box { padding: 0; background: transparent; border: 0; }
  .phone-aside .help-box h2 { display: flex; align-items: center; gap: 8px; margin: 12px 2px 10px; font-size: var(--t-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
  .phone-aside .help-box h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
  .phone-aside .link-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0 14px; }
  .phone-aside .link-list a { display: grid; grid-template-columns: 40px minmax(0, 1fr) 16px; gap: 12px; align-items: center; min-height: 60px; padding: 8px 0; font-weight: 650; border-bottom: 1px solid var(--line); }
  .phone-aside .link-list li:last-child a { border-bottom: 0; }
  .phone-aside .link-list a > .i:first-child { display: grid; place-items: center; width: 40px; height: 40px; padding: 10px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); box-sizing: border-box; }
  .phone-aside .link-list a > span { display: grid; min-width: 0; }
  .phone-aside .link-list small.only-m { display: block; font-size: var(--t-sm); font-weight: 400; color: var(--ink-3); line-height: 1.35; }
  .phone-aside .link-list a .i:last-child { margin-left: 0; }
  .phone-aside .danger { padding: 0 16px; }
  .phone-aside .danger summary { min-height: 60px; }
  .phone-aside .danger-body { padding-bottom: 16px; }
  .phone-aside .danger-body .btn { width: 100%; }
}

/* ── 23д. Телефон: главная одной колонкой и карточки тарифов короче ─────────────────────────────── */
@media (max-width: 1023px) {
  /* содержимое главной — колонка не шире 600 px, как в кабинете; шапка и подвал — во всю ширину */
  .site main:not(.page-plain) .wrap { max-width: 632px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .site .section-head .kicker, .site .hero-kicker { font-size: var(--t-sm); font-weight: 650; letter-spacing: 0; text-transform: none; color: var(--accent-text); }

  /* первый экран: заголовок, кнопки во всю ширину, под ними «Так клиент видит СМС» (сцена с карточкой кабинета — для компьютера) */
  .hero { padding: 8px 0 28px; }
  .hero-in { gap: 20px; }
  .hero-copy { gap: 12px; justify-items: stretch; }
  .hero h1 { font-size: 2.25rem; line-height: 1.04; }
  .lead { max-width: none; font-size: 1.0625rem; }
  .hero-cta { display: grid; gap: 10px; width: 100%; margin-top: 8px; }
  .hero-cta .btn { width: 100%; }
  .hero-cta .btn-primary { min-height: 56px; border-radius: 14px; }
  .hero-note { max-width: none; font-size: var(--t-base); color: var(--ink-2); }
  .m-demo { display: grid; gap: 12px; padding: 14px 14px 16px; border-radius: 22px; color: var(--on-deep); background-color: var(--deep); background-image: radial-gradient(260px 160px at 100% 0%, rgba(134, 221, 217, .18), transparent 70%); }
  .m-demo-k { margin: 0 2px -2px; font-size: var(--t-xs); font-weight: 600; color: var(--on-deep-2); }
  /* уведомление на телефоне клиента: всегда светлое, это «снимок» чужого экрана */
  .m-note { padding: 12px 14px 14px; border-radius: 18px; background: #FFFFFF; color: #131B1A; box-shadow: 0 12px 28px -14px rgba(0, 0, 0, .55); }
  .mn-top { display: flex; justify-content: space-between; font-size: var(--t-2xs); color: #58625F; }
  .mn-app { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
  .mn-app .i { color: #0E7C7B; }
  .mn-from { display: flex; align-items: center; gap: 8px; margin-top: 6px; font: 600 1rem/1.3 var(--mono); }
  .mn-text, .mn-reply { margin-top: 2px; font-size: 1rem; line-height: 1.4; }
  .mn-reply { color: #58625F; }
  .mn-reply > span:first-child { font-weight: 600; }
  .m-note .mk, .m-legend .mk { width: 22px; height: 22px; }
  .mn-text .mk, .mn-reply .mk { margin-left: 6px; vertical-align: -5px; }
  .m-legend { list-style: none; display: grid; gap: 8px; font-size: var(--t-sm); color: var(--on-deep-2); }
  .m-legend li { display: flex; gap: 10px; align-items: flex-start; }
  .m-legend .mk { margin-top: 1px; }
  .m-legend b { color: var(--on-deep); font-weight: 650; }

  /* «Коротко о главном» — списком */
  .qa-strip { grid-template-columns: minmax(0, 1fr); }
  .qa-strip li { padding: 16px 0; border-top: 1px solid var(--line); }
  .qa-strip li:first-child { border-top: 0; }
  .qa-strip li + li { border-left: 0; padding-left: 0; }
  .qa-strip .qa-a { font-size: 1.625rem; }
  .qa-strip .qa-d { max-width: none; }

  .section { padding: 32px 0; }
  .section-head { gap: 6px; margin-bottom: 18px; }
  .section-head h2 { font-size: 1.75rem; line-height: 1.1; letter-spacing: -.035em; }
  .section-head p:not(.kicker) { font-size: var(--t-base); }

  /* «Как устроено»: шаги в столбик, примеры карточками с подписью сверху, предупреждение — под ними */
  .flow { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .flow li { grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 14px; row-gap: 2px; padding-bottom: 18px; }
  .flow li::before { left: 21px; right: auto; top: 46px; bottom: 2px; width: 2px; height: auto; }
  .flow li:last-child { padding-bottom: 0; }
  .flow-ico { grid-row: 1 / span 2; width: 44px; height: 44px; margin-bottom: 0; border-radius: 14px; color: var(--accent-text); }
  .flow b { align-self: start; padding-top: 2px; font-size: var(--t-md); }
  .flow p { max-width: none; font-size: var(--t-base); }
  .usecase { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 26px; padding: 0; border: 0; background: transparent; }
  .usecase-copy { display: contents; }
  .usecase-copy h3 { font-size: var(--t-lg); }
  .usecase-copy > p:not(.note) { margin-top: 4px; font-size: var(--t-base); }
  .usecase .note { order: 2; justify-self: stretch; margin-top: 12px; padding: 14px; border-radius: var(--r-md); border: 1px solid var(--warn-line); font-size: var(--t-sm); }
  .examples { order: 1; gap: 8px; margin-top: 14px; }
  .ex { display: flex; flex-direction: column-reverse; gap: 2px; justify-self: stretch; max-width: none; padding: 10px 14px 11px; border-radius: 16px 16px 16px 6px; background: var(--surface); border: 1px solid var(--line); }
  .ex small { margin-top: 0; font-size: var(--t-xs); font-weight: 600; letter-spacing: 0; text-transform: none; }

  /* «Как подключиться»: шаги плотнее, «Что понадобится» — внутри карточки приложения, по нажатию */
  .start { gap: 12px; }
  .start-steps li { grid-template-columns: 32px minmax(0, 1fr); gap: 2px 12px; padding: 14px 0; }
  .start-steps li::before { line-height: 1.6; }
  .start-steps b { font-size: var(--t-md); }
  .start-steps p { max-width: none; }
  .start-aside { gap: 12px; }
  .apk { padding: 16px; border-radius: var(--r-lg); }
  .apk-ico { width: 48px; height: 48px; border-radius: 14px; }
  .apk .need-details { margin: 0; background: var(--surface-2); }

  /* тарифы: имя и цена в строку, главная строка, вторая строка, остальное — «Подробнее»; таблица свойств — для компьютера */
  .plans { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; gap: 12px; margin-block: 0; }
  .plan { grid-row: auto; grid-template-rows: none; align-content: start; gap: 4px; padding: 18px 16px; }
  .plan.is-pro { margin-block: 0; padding: 18px 16px; border-radius: var(--r-lg); box-shadow: 0 18px 40px -24px var(--pro-glow); }
  .plan-heading > .plan-name, .plan-heading > .plan-price, .plan > .spec { display: none; }
  .plan-heading { display: grid; gap: 4px; }
  .plan-unit { margin: 8px 0 0; }
  .plan-estimate-note { margin-top: 4px; }
  .plan-q { font-size: var(--t-sm); }
  .m-plan-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
  .m-plan-name { font-size: 1.375rem; font-weight: 800; letter-spacing: -.03em; }
  .m-plan-price { display: grid; justify-items: end; line-height: 1.1; }
  .m-plan-price b { font-size: 1.75rem; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
  .m-plan-price span { font-size: var(--t-sm); color: var(--ink-3); }
  .plan.is-pro .m-plan-price span { color: var(--on-pro-2); }
  .m-plan-main { margin-top: 6px; font-size: 1.0625rem; font-weight: 750; letter-spacing: -.015em; }
  .m-plan-sub { font-size: var(--t-sm); color: var(--ink-3); }
  .plan.is-pro .m-plan-sub { color: var(--on-pro-2); }
  .plan-more { margin-top: 8px; border-top: 1px solid var(--line); }
  .plan.is-pro .plan-more { border-color: var(--pro-line); }
  .plan-more > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; font-size: var(--t-base); font-weight: 650; color: var(--accent-text); cursor: pointer; list-style: none; }
  .plan-more > summary::-webkit-details-marker { display: none; }
  .plan.is-pro .plan-more > summary { color: var(--on-deep-accent); }
  .plan-more > summary .i { flex: none; transition: transform .15s; }
  .plan-more[open] > summary .i { transform: rotate(90deg); }
  .plan-more p { padding-bottom: 8px; font-size: var(--t-sm); color: var(--ink-2); }
  .plan.is-pro .plan-more p { color: var(--on-pro-2); }
  .plan .plan-btn { margin-top: 12px; }
  .plans-note { margin-top: 14px; }
  .plans-after { gap: 12px; margin-top: 16px; }
  .reply-demo, .reply-rule { padding: 16px; }

  /* правила — карточка-список: число слева, правило справа */
  .rules-sec { padding: 28px 0 30px; background: transparent; }
  .rules-h { margin-bottom: 16px; font-size: 1.375rem; font-weight: 800; letter-spacing: -.025em; color: var(--ink); }
  .rules { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
  .rules li { grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 11px 0; border-left: 0; }
  .rules li + li { border-top: 1px solid var(--line); }
  .rules li:last-child { grid-column: auto; }
  .rules b { font-size: 1.375rem; line-height: 1.1; color: var(--accent-text); }

  /* вопросы: заголовок, список, «не нашли ответ» — внизу */
  .faq-grid { gap: 0; }
  .faq-head { display: contents; }
  .faq-head .kicker { display: none; }
  .faq-grid .faq-head > p { order: 2; margin-top: 14px; font-size: var(--t-sm); color: var(--ink-3); }
  .faq { order: 1; margin-top: 18px; }
  .faq summary { min-height: 56px; padding: 10px 0; font-size: var(--t-md); }
  .faq summary .i { color: var(--accent-text); }
  .faq details p { padding: 0 0 16px; font-size: var(--t-base); }
  .trust { gap: 12px; }

  /* итоговый призыв — тёмная плашка, кнопки во всю ширину */
  .final-sec { padding-top: 32px; }
  .cta-band { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 24px 18px; border-radius: 24px; background: var(--deep); border-color: var(--deep); color: var(--on-deep); }
  .cta-band h2 { font-size: 1.625rem; line-height: 1.1; letter-spacing: -.035em; }
  .cta-band p { margin-top: 8px; font-size: var(--t-base); color: var(--on-deep-2); }
  .cta-actions { display: grid; gap: 10px; }
  .cta-actions .btn { width: 100%; }
  .cta-actions .btn-primary { min-height: 56px; border-radius: 14px; background: var(--pro-btn); border-color: var(--pro-btn); color: var(--pro-btn-ink); font-weight: 700; }
  .cta-actions .btn:not(.btn-primary) { background: transparent; border-color: color-mix(in srgb, var(--on-deep) 40%, transparent); color: var(--on-deep); }
  .foot-in { grid-template-columns: minmax(0, 1fr); gap: 8px; padding-block: 24px; }
  .foot-links { display: grid; grid-template-columns: 1fr 1fr; margin-left: 0; }
  .foot-links a { justify-content: flex-start; padding: 0; }
}

/* ── 24. Номера у аккаунта (тариф с несколькими телефонами): блок «Номера» на странице «Телефон» ──────────── */
.numbers { margin-bottom: 20px; }
.num-list { list-style: none; display: grid; }
.num-list li { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); }
.num-list li:first-child { border-top: 0; }
.num-link { flex: 1 1 auto; display: grid; grid-template-columns: 32px minmax(0, 1fr) 16px; gap: 12px; align-items: center; min-height: 60px; padding: 8px 0; color: var(--ink); text-decoration: none; min-width: 0; }
.num-link:hover { text-decoration: none; }
.num-link:hover b { text-decoration: underline; }
.num-no { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-3); color: var(--ink-2); font: 700 var(--t-sm)/1 var(--mono); }
.num-list li.is-cur .num-no { background: var(--accent); color: var(--on-accent); }
.num-list li.is-out .num-no { background: var(--warn-soft); color: var(--warn); }
.num-main { display: grid; min-width: 0; }
.num-main b { font-weight: 700; overflow-wrap: anywhere; }
.num-main small { font-size: var(--t-sm); color: var(--ink-3); }
.num-link > .i:last-child { color: var(--ink-3); }
.num-list form { flex: none; }
.num-add { margin-top: 12px; }
.numbers > .note, .numbers > .hint { margin-top: 12px; }
@media (max-width: 1023px) {
  .numbers { padding: 0 14px; }
  .num-add .btn { width: 100%; }
  .numbers > .note { margin-bottom: 14px; }
  .numbers > .hint { padding-bottom: 14px; }
}

/* ── 25. Ответы клиентов в журнале ─────────────────────────────────────────────────────────────────── */
.msg-reply { display: flex; align-items: flex-start; gap: 6px; margin-top: 6px; padding: 8px 12px; border-radius: 12px 12px 12px 4px; background: var(--accent-soft); color: var(--ink); font-size: var(--t-sm); }
.msg-reply .i { flex: none; margin-top: 2px; color: var(--accent-text); }
.msg-reply a { white-space: nowrap; }
.msg.is-reply { border-left: 3px solid var(--accent); padding-left: 12px; }
@media (max-width: 1023px) {
  .msg.s-reply::before { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  .msg.is-reply { border-left: 0; padding-left: 0; }
  .m-stats li.is-replies { grid-column: 1 / -1; }
}

/* ── Загрузка очереди: отдельный пользовательский путь ───────────────── */
.queue-import { min-width: 0; }
.queue-import-intro { max-width: 850px; margin: 0 0 24px; color: var(--ink-2); }
.queue-import-grid { display: grid; grid-template-columns: minmax(280px, .85fr) minmax(0, 1.15fr); gap: 20px; align-items: start; }
.queue-import-box { padding: 24px; min-width: 0; margin-bottom: 20px; }
.queue-import-box h2 { margin: 0 0 12px; }
.queue-import-box h3 { margin: 20px 0 8px; }
.queue-import-box p { margin: 0 0 16px; }
.queue-import-box form > .hint { margin-top: 12px; }
.queue-import-box .field { margin: 20px 0; }
.queue-import-box input[type=file] { width: 100%; padding: 12px; font-size: 16px; }
.queue-import-box input[type=file]::file-selector-button { min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink); padding: 8px 12px; margin-right: 10px; cursor: pointer; }
.queue-import-step { display: block; color: var(--accent-text); font-size: var(--t-sm); font-weight: 700; margin-bottom: 8px; }
.queue-import-example { white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/1.65 var(--mono); background: var(--surface-2); padding: 16px; border-radius: 12px; margin: 12px 0 20px; }
.queue-import-example-table { overflow-x: auto; margin: 12px 0 16px; }
.queue-import-example-table table { width: 100%; border-collapse: collapse; text-align: left; font-size: var(--t-sm); }
.queue-import-example-table th, .queue-import-example-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.queue-import-example-table td:first-child { white-space: nowrap; font-size: 13px; }
.queue-import-downloads { display: flex; flex-wrap: wrap; gap: 8px; }
.queue-import-preview { scroll-margin-top: 80px; }
.queue-import-rows { list-style: none; padding: 0; margin: 20px 0; max-height: 640px; overflow-y: auto; }
.queue-import-row { padding: 18px 0; border-top: 1px solid var(--line); }
.queue-import-row.has-error { border-left: 3px solid var(--err); padding-left: 12px; }
.queue-import-row-head { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: baseline; margin-bottom: 8px; }
.queue-import-row-head span { font-size: var(--t-sm); color: var(--ink-3); }
.queue-import-row-head strong { font-family: var(--mono); overflow-wrap: anywhere; }
.queue-import-box .queue-import-text { white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 8px; }
.queue-import-warning { color: var(--err); font-weight: 600; }
.queue-import-footer { color: var(--ink-3); font-size: var(--t-sm); }
.queue-import-entry { display: flex; justify-content: flex-end; margin: 0 0 16px; }
/* Личная адресная книга и второй вид журнала. */
.queue-import-entry { flex-wrap: wrap; gap: 10px; }
.recipient-views { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.recipient-views [aria-current="page"] { background: var(--accent); color: var(--on-accent, #fff); border-color: var(--accent); }
.recipient-id { display: flex; flex-direction: column; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.recipient-id .msg-to { overflow-wrap: anywhere; white-space: normal; font-family: var(--sans); margin: 0; }
.recipient-id small { font-size: var(--t-sm); color: var(--ink-3); }
.recipient-focus, .recipient-group-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.recipient-focus { padding: 14px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 12px; }
.recipient-group-head { padding: 16px 0 10px; border-top: 1px solid var(--line); }
.recipient-group-head > .recipient-id { flex: 1 1 180px; }
.contacts-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; align-items: start; }
.contact-editor { padding: 24px; }
.contact-editor form { margin-top: 14px; }
.contact-editor .btn-row { margin-top: 16px; }
.contact-editor > .hint { margin-top: 16px; }
.contact-delete { margin-top: 20px; }
.contact-delete summary { cursor: pointer; min-height: 44px; padding: 10px 0; }
.contact-search { display: flex; gap: 12px; align-items: flex-end; margin: 16px 0; }
.contact-search .field { flex: 1; margin: 0; min-width: 0; }
.contact-search > .btn { flex: 0 0 auto; }
.contact-search-status { display: flex; align-items: center; gap: 8px; height: 24px; margin: 16px 0; white-space: nowrap; }
.contact-search-status > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.contact-search-status > a { flex: 0 0 auto; }
.contact-cards { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 12px; }
.contact-card { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.contact-card > div:first-child { flex: 1 1 160px; min-width: 0; }
.contact-remove { width: 44px; height: 44px; padding: 0; color: var(--warn); }
.contact-dialog { padding: 0; width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); }
.contact-dialog::backdrop { background: rgb(0 0 0 / 45%); }
.contact-dialog .contact-editor { border: 0; margin: 0; padding-top: 52px; }
.contact-dialog-close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; padding: 0; font-size: 24px; }
.contact-dialog-loading { padding: 52px 24px 24px; }
.recipient-name { display: block; min-height: 24px; }
.contact-picker-dialog { padding: 52px 20px 20px; }
.contact-picker-dialog h2 { margin-bottom: 16px; }
.contact-picker-status { height: 24px; margin: 8px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-picker-list { height: min(360px, 45vh); overflow-y: auto; }
.contact-picker-row { display: flex; flex-direction: column; gap: 2px; width: 100%; min-height: 54px; padding: 8px 10px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.contact-picker-row b { font-weight: 600; }
.contact-picker-row b, .contact-picker-row small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-picker-row small { font-size: 13px; color: var(--ink-3); }
.contact-picker-row:hover, .contact-picker-row:focus-visible { background: var(--accent-soft); }
.contact-picker-row:disabled { opacity: .5; cursor: wait; }
.contacts-page .btn-row { flex-wrap: wrap; }
@media (max-width: 1023px) {
  .contacts-page { padding: 0 14px 24px; }
  .contacts-page .page-head { display: block; margin: 20px 0 16px; }
  .contacts-page h1 { font-size: 28px; }
  .contacts-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .contact-list { order: -1; }
  .contacts-page .page-head > .btn { margin-top: 12px; }
  .contact-editor { padding: 20px 16px; }
  .contact-card { padding: 16px; }
  .contacts-page .input { font-size: 16px; }
  .contacts-page .btn, .recipient-views .btn, .recipient-group-head .btn, .recipient-focus .btn { min-height: 44px; }
  .recipient-views { padding: 0 14px; }
  .recipient-focus, .recipient-group-head { margin-left: 14px; margin-right: 14px; }
  .recipient-group-head > .recipient-id { flex-basis: 100%; }
  .recipient-group-head > .hint { flex: 1; }
  .msg-top .recipient-id { flex: 1; }
}
@media (max-width: 1023px) {
  .queue-import { padding: 0 14px 24px; }
  .queue-import .page-head { display: block; margin: 20px 0 16px; }
  .queue-import h1 { font-size: 28px; }
  .queue-import-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .queue-import-box { padding: 20px 16px; }
  .queue-import-box form > .btn { width: 100%; white-space: normal; }
  .queue-import-downloads .btn { flex: 1 1 130px; }
  .queue-import-entry { padding: 0 14px; justify-content: flex-start; }
}
