/* SMMtogo. Светлый фон, дружелюбный синий для действий, фиолетовый MAX – только в иллюстрациях.
   Мягкие скругления и лёгкие тени. Шрифты лежат у нас (static/fonts, OFL): Golos Text – весь
   текст, JetBrains Mono – коды и ники. Со сторонних сервисов ничего не грузим. */

@font-face { font-family: "Golos Text"; font-weight: 400; font-display: swap; src: url("fonts/golos-text-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-weight: 400; font-display: swap; src: url("fonts/golos-text-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Golos Text"; font-weight: 500; font-display: swap; src: url("fonts/golos-text-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-weight: 500; font-display: swap; src: url("fonts/golos-text-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Golos Text"; font-weight: 600; font-display: swap; src: url("fonts/golos-text-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-weight: 600; font-display: swap; src: url("fonts/golos-text-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Golos Text"; font-weight: 700; font-display: swap; src: url("fonts/golos-text-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-weight: 700; font-display: swap; src: url("fonts/golos-text-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url("fonts/jetbrains-mono-cyrillic-500-normal.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-weight: 500; font-display: swap; src: url("fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20BD, U+2122, U+FEFF, U+FFFD; }

:target, #price { scroll-margin-top: 24px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

:root {
  --paper: #f5f7fb;
  --surface: #ffffff;
  --sunk: #eef2f8;
  --ink: #1b2231;
  --muted: #5d6879;
  --line: #e0e6ef;
  --accent: #2f7cf6;
  --accent-dark: #1d62d6;
  --accent-soft: #e4eeff;
  --tg: #2aa3e6;
  --max: #7a5cff;
  --max-soft: #eee9ff;
  --ok: #1d8455;
  --ok-soft: #e1f4ea;
  --warn: #946000;
  --warn-soft: #fff3d6;
  --danger: #cc3b35;
  --danger-soft: #fde8e6;
  --radius: 14px;
  --radius-small: 10px;
  --shadow: 0 1px 2px rgba(22, 34, 64, .05), 0 6px 20px rgba(22, 34, 64, .06);
  --text: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Golos Text", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
main:focus { outline: none; }

h1, h2, h3 { margin: 0 0 .6em; font-weight: 700; line-height: 1.2; }
h1 { font-family: var(--display); font-weight: 700; font-size: clamp(1.75rem, 3.8vw, 2.6rem); letter-spacing: -.015em; }
h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.25rem, 2.4vw, 1.6rem); letter-spacing: -.01em; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: var(--accent-dark); text-decoration-color: rgba(47, 124, 246, .35); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
code { font-family: var(--mono); font-weight: 500; font-size: .92em; }
strong { font-weight: 700; }

:focus-visible { outline: 3px solid rgba(47, 124, 246, .45); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.container-wide { max-width: 1360px; }
.narrow { max-width: 760px; }
.wizard-container { max-width: 840px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 10; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: var(--radius-small); }
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .9rem; margin: 4px 0 8px; }
[hidden] { display: none !important; }

/* ярлык над заголовком: мелко, капсом, с разрядкой */
.eyebrow { font: 600 .95rem/1.2 var(--text); color: var(--accent-dark); margin: 0 0 8px; }

/* --- шапка и подвал --- */

.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; min-height: 64px; padding-top: 8px; padding-bottom: 8px; }
.logo { display: inline-flex; align-items: baseline; gap: 1px; font: 700 1.2rem/1 var(--display); color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.logo-mark { color: var(--accent); font-family: var(--display); }
.site-nav { display: flex; align-items: center; gap: 20px; justify-content: flex-end; white-space: nowrap; margin-left: auto; }
.site-nav a:not(.button) { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav .link-button { text-decoration: none; color: var(--muted); }
.site-nav a:not(.button):hover { color: var(--accent); }

.site-footer { margin-top: 64px; padding: 28px 0 36px; border-top: 1px solid var(--line); background: var(--surface); font-size: .9rem; color: var(--muted); }
.footer-inner p { margin: 0 0 .35em; }
.footer-inner a { color: var(--muted); }

/* --- кнопки и формы --- */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px;
  border: 1.5px solid var(--accent); border-radius: var(--radius-small);
  background: var(--accent); color: #fff;
  font: 600 1rem/1.2 var(--text); text-decoration: none; cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.button:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.button:disabled { opacity: .5; cursor: progress; }
.button-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.button-secondary:hover { background: var(--sunk); border-color: #cdd6e3; color: var(--ink); }
.button-small { min-height: 38px; padding: 6px 14px; font-size: .92rem; }
.button-large { min-height: 54px; padding: 14px 28px; font-size: 1.06rem; box-shadow: 0 6px 16px rgba(47, 124, 246, .25); }
.button-large:hover { box-shadow: 0 8px 20px rgba(47, 124, 246, .3); }
.button-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.button-danger:hover { background: var(--danger); color: #fff; }
.link-button { background: none; border: 0; padding: 4px 0; font: inherit; font-weight: 500; color: var(--accent-dark); cursor: pointer; text-decoration: underline; text-decoration-color: rgba(47, 124, 246, .35); text-underline-offset: 3px; }
.link-button:hover { color: var(--accent); }

input[type="text"], input[type="email"], input[type="url"], input[type="number"], input[type="date"],
input[type="search"], input[type="password"], select, textarea {
  min-height: 46px; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-small);
  font: inherit; background: var(--surface); color: var(--ink); max-width: 100%;
}
input:hover, select:hover, textarea:hover { border-color: #c5cfdd; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { line-height: 1.5; }
input[type="number"] { width: 7em; }
input[type="radio"], input[type="checkbox"] { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); flex: none; }
input[type="file"] { font-size: .9rem; margin-top: 6px; }

fieldset { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
fieldset label { display: flex; align-items: center; gap: 12px; padding: 6px 0; cursor: pointer; }
fieldset label.with-input { flex-wrap: wrap; row-gap: 8px; }
.nowrap, .date-range { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }

.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 18px; }
.inline-form label { flex-basis: 100%; font-weight: 600; }
.inline-form input { flex: 1 1 240px; }

.password-field { display: flex; gap: 8px; align-items: stretch; width: 100%; }
.password-field input { flex: 1 1 0; min-width: 0; }
.password-field .button { flex: none; }

.form-error { color: var(--danger); font-weight: 600; margin: 12px 0 0; }
.form-error:empty, .form-status:empty, .status-line:empty { display: none; }
.form-status { margin: 10px 0 0; flex-basis: 100%; }
.status-line { font-weight: 600; margin-top: 16px; }

/* --- общие блоки --- */

.section { padding: 44px 0; }
.section + .section { border-top: 0; }
/* два блока подряд на одном фоне – без двойного отступа между ними */
.section:not(.section-alt) + .section:not(.section-alt) { padding-top: 4px; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 36em; }

.badge { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font: 600 .85rem/1 var(--text); margin-bottom: 16px; }
.badge-beta { background: var(--ok-soft); color: var(--ok); }
.badge-gift { background: #fff1d6; color: #8a5200; font-size: .92rem; padding: 7px 16px; line-height: 1.3; margin: 0; }

.notice { border-left: 4px solid var(--accent); padding: 12px 16px; background: var(--accent-soft); margin: 18px 0; border-radius: 0 var(--radius-small) var(--radius-small) 0; }
.notice p:last-child { margin-bottom: 0; }
.notice-warn { background: var(--warn-soft); border-left-color: var(--warn); }
.notice-error { background: var(--danger-soft); border-left-color: var(--danger); }
.notice-ok { background: var(--ok-soft); border-left-color: var(--ok); }
.notice:empty { display: none; }
.step-body [data-action] ~ [data-panel] { margin-top: 18px; }

.icon { width: 44px; height: 44px; flex: none; }

.check-list, .cross-list { list-style: none; padding: 0; margin: 0 0 1em; }
.check-list li, .cross-list li { position: relative; padding: 10px 0 10px 34px; border-top: 1px solid var(--line); }
.check-list li:last-child, .cross-list li:last-child { border-bottom: 1px solid var(--line); }
.check-list li::before, .cross-list li::before { position: absolute; left: 0; top: 11px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 700 .8rem/1 var(--text); }
.check-list li::before { content: "✓"; color: var(--ok); background: var(--ok-soft); }
.cross-list li::before { content: "×"; color: var(--danger); background: var(--danger-soft); font-size: 1rem; }

.progress { display: block; height: 10px; background: var(--sunk); overflow: hidden; margin: 12px 0; border-radius: 999px; }
.progress-large { height: 16px; }
.progress-bar { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .4s; }

.status { display: inline-block; font: 600 .85rem/1 var(--text); padding: 6px 10px; border-radius: 999px; color: var(--accent-dark); background: var(--accent-soft); }
.status-done { color: var(--ok); background: var(--ok-soft); }
.status-failed { color: var(--danger); background: var(--danger-soft); }
.status-paused { color: var(--warn); background: var(--warn-soft); }
.status-draft, .status-tg_ok, .status-max_ok, .status-cancelled { color: var(--muted); background: var(--sunk); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.text-danger { color: var(--danger); }
.text-ok { color: var(--ok); }

/* --- лендинг --- */

.hero { padding: 56px 0 20px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); max-width: 13em; }
.hero h1 em { font-style: normal; color: var(--max); }
.hero .lead { margin-bottom: 28px; }

/* схема на первом экране: канал Telegram → тот же канал в MAX */
.hero-art { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 14px; }
.mini-channel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 12px; display: grid; gap: 8px; min-width: 0; }
.mini-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mini-avatar { width: 30px; height: 30px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--tg); }
.mini-max .mini-avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--max); }
.mini-name { display: grid; min-width: 0; line-height: 1.2; }
.mini-name b { font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-name small { font-size: .68rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-tg .mini-name small { color: #1678b0; }
.mini-max .mini-name small { color: var(--max); }
.mini-post { background: var(--paper); border-radius: 12px; padding: 7px; display: grid; gap: 5px; }
.mini-line { height: 7px; border-radius: 4px; background: #d7deea; }
.mini-line.short { width: 60%; }
.mini-photo { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.mini-album { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.mini-album img { display: block; width: 100%; aspect-ratio: 1; border-radius: 6px; }
.hero-arrow { display: grid; place-items: center; gap: 6px; color: var(--accent); }
.hero-arrow::before { content: "→"; font: 700 1.8rem/1 var(--text); width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); }
.hero-arrow span { font-size: .75rem; font-weight: 600; color: var(--muted); white-space: nowrap; }

/* пример поста до и после */
.compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: center; margin-top: 12px; }
.post-demo { margin: 0; }
.post-demo figcaption { font-weight: 700; margin-bottom: 10px; }
.post-demo-tg figcaption { color: #1678b0; }
.post-demo-max figcaption { color: var(--max); }
.bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 10px 14px 12px; box-shadow: var(--shadow); font-size: .95rem; }
.bubble p { margin: 0 0 .5em; }
.bubble-photo { display: block; width: calc(100% + 8px); height: auto; aspect-ratio: 16 / 9; margin: 0 -4px 10px; border-radius: 12px; }
.bubble-head { display: flex; align-items: center; gap: 8px; margin: 2px 0 10px; font-size: .9rem; }
.bubble-head img { border-radius: 50%; }
.bubble-meta { text-align: right; font-size: .78rem; color: var(--muted); margin: 0 !important; }
.compare-arrow { font: 700 1.6rem/1 var(--text); color: var(--accent); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); }

.steps { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step-card { counter-increment: step; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

.step-card::before { content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font: 700 1rem/1 var(--text); margin-bottom: 14px; }
.step-card .icon { display: none; }

.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }

.price-card { display: grid; grid-template-columns: auto 1fr; gap: 12px 48px; align-items: start; }
.price { margin: 0; font-size: 1.15rem; }
.price strong { display: block; font: 700 clamp(2.6rem, 6vw, 4rem)/1 var(--display); letter-spacing: -.02em; color: var(--accent-dark); }
.price-card ul { list-style: none; padding: 0; margin: 6px 0 12px; }
.price-card li { padding: 8px 0; border-bottom: 1px solid var(--line); }

.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; padding: 16px 32px 16px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font: 500 1.4rem/1.2 var(--text); color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 16px; margin: 0; color: var(--muted); max-width: 44em; }

.soon-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.crosspost-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; padding: 28px; }
.crosspost-card > div { flex: 1 1 28em; }
.crosspost-card h2 { margin-top: 0; }
.crosspost-offer .check { margin: 10px 0; }
/* Кабинет: плитки каналов */
.channel-grid { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.channel-tile { display: flex; flex-direction: column; gap: 16px; padding: 22px; min-width: 0; }
.tile-title { font-size: 1.15rem; margin: 0; overflow-wrap: anywhere; }
.tile-sub { margin: 4px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.tile-body { display: flex; gap: 18px; align-items: center; }
.tile-facts { min-width: 0; }
.tile-facts p { margin: 0 0 6px; font-size: .92rem; }
.tile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.ring { --p: 100; --c: var(--accent); flex: none; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--sunk) 0); }
.ring > span { width: 72px; height: 72px; border-radius: 50%; background: var(--surface); display: grid; place-content: center; text-align: center; line-height: 1.1; }
.ring b { font-size: 1.2rem; }
.ring small { font-size: .62rem; color: var(--muted); }
.ring-done { --c: var(--ok); }
.ring-count { --c: var(--max); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--sunk); color: var(--ink); }
.pill-done, .pill-running { background: var(--ok-soft); color: var(--ok); }
.pill-paused, .pill-queued, .pill-setup { background: var(--warn-soft); color: var(--warn); }
.pill-failed { background: var(--danger-soft); color: var(--danger); }
.channel-add { border: 2px dashed var(--line); border-radius: var(--radius); background: transparent; justify-content: center; text-align: center; align-items: center; }
.channel-add .actions { justify-content: center; margin: 0; }
/* Плитка нажимается целиком: у главной ссылки – подложка на всю плитку, остальные кнопки – поверх */
.card-link { position: relative; transition: box-shadow .15s, border-color .15s, transform .15s; }
.card-link .tile-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card-link .tile-link { position: static; }
.card-link a:not(.tile-link), .card-link button { position: relative; z-index: 1; }
.card-link:hover { box-shadow: 0 2px 4px rgba(22, 34, 64, .06), 0 12px 28px rgba(22, 34, 64, .10); transform: translateY(-1px); }
.channel-add.card-link:hover { border-color: var(--accent); }
.add-plus { font-size: 2rem; line-height: 1; color: var(--accent); }
.button-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.button-dark:hover { background: #000; border-color: #000; color: #fff; }
/* Страница канала */
.channel-pair { color: var(--muted); overflow-wrap: anywhere; }
.channel-stats { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 16px 0 24px; }
.channel-stats dt { font-size: .85rem; color: var(--muted); }
.channel-stats dd { margin: 2px 0 0; font-weight: 700; font-size: 1.15rem; }
.channel-section { margin-bottom: 20px; }
.channel-section h2 { margin-top: 0; font-size: 1.25rem; }
.history { list-style: none; padding: 0; margin: 0; }
.history li { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.guide > h2, .seo-page > h2 { margin-top: 36px; }
.article-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.article-list h2 { font-size: 1.2rem; margin: 0 0 8px; }
.article-list h2 a { color: var(--ink); text-decoration: none; }
.article-list h2 a:hover { color: var(--accent); }
.article-list p { margin: 0 0 6px; }
.article-meta { margin-top: -4px; }
.article-body { font-size: 1.05rem; line-height: 1.65; }
.article-body h2 { margin-top: 1.6em; }
.article-body h3 { margin-top: 1.3em; }
.article-body img { max-width: 100%; height: auto; }
.article-body blockquote { margin: 1em 0; padding: 12px 16px; background: var(--accent-soft); border-radius: var(--radius-small); }
.article-body blockquote p { margin: 0; }
.article-body table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; font-size: .95rem; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.article-body th { background: var(--sunk); }
.article-cta { margin: 32px 0; }
.article-cta h2 { margin-top: 0; font-size: 1.25rem; }
.crumbs { font-size: .9rem; color: var(--muted); margin: 0 0 12px; }
.guide-steps { counter-reset: guide; list-style: none; padding: 0; margin: 24px 0 32px; }
.guide-steps > li { counter-increment: guide; position: relative; padding-left: 48px; margin-bottom: 24px; }
.guide-steps > li::before { content: counter(guide); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; display: grid; place-items: center; }
.guide-steps h2 { font-size: 1.15rem; margin: 4px 0 6px; }
.guide-steps .shot img { max-width: 100%; height: auto; }
.steps-plain { padding-left: 20px; }
.steps-plain li { margin-bottom: 10px; }
.soon-card { background: var(--max-soft); color: var(--ink); padding: 28px; margin-top: 24px; border-radius: var(--radius); }
.soon-grid .soon-card { margin-top: 0; }

.soon-card .badge { background: #fff; color: var(--max); }
.soon-card h3 { font-family: var(--display); font-weight: 700; font-size: 1.2rem; }
.soon-card p { color: var(--muted); }

.soon-card .button { background: var(--max); border-color: var(--max); }
.soon-card .button:hover { background: #6546f0; border-color: #6546f0; }
.lead-form { display: flex; flex-wrap: wrap; gap: 10px; }
.lead-form input[type="email"] { flex: 1 1 220px; }
.lead-form .consent-check, .lead-form .form-status { flex-basis: 100%; }

/* --- кабинет --- */

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin: 0; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.migration-card { display: grid; gap: 6px; color: var(--ink); text-decoration: none; transition: border-color .12s; }
.migration-card:hover { border-color: #c5cfdd; color: var(--ink); }
.migration-card .channels { font-weight: 700; font-size: 1.08rem; }
.migration-card .status { justify-self: start; }
.empty { text-align: left; }

.login-card { margin-top: 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.login-options { display: grid; gap: 18px; margin: 22px 0 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: stretch; }
/* карточки одной высоты, кнопки – на одной линии внизу */
.login-card > form { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; flex: 1; width: 100%; margin: 0; }
.login-card > form[hidden] { display: none; }
.login-card > form > .button[type="submit"] { margin-top: auto; }
.login-card > form > * { flex: none; max-width: 100%; min-width: 0; }
.login-card > form .consent-check { margin: 4px 0 6px; align-self: stretch; }
.login-card > * { max-width: 100%; }
.login-card > form input[type="email"], .login-card > form input[name="code"] { width: 100%; }
.login-card .form-error { margin: 0; }
.login-options .login-card { margin-top: 0; }
.login-card h2 { margin: 0; }
.login-card .inline-form { margin-top: 0; width: 100%; }
.login-panel { display: grid; gap: 12px; justify-items: start; }
.qr { margin: 12px 0 18px; }
.qr figcaption { margin: 0 0 10px; line-height: 1.4; }
.qr-hint { margin: 6px 0 0; font-weight: 600; font-size: .95rem; }
.cost-card { margin-top: 18px; }
.balance-line { font-size: 1.3rem; margin: 0 0 8px; }
.cost-card .balance-line ~ h2 { margin: 22px 0 8px; }
.cost-card + h2 { margin-top: 32px; }
.nav-balance { font-variant-numeric: tabular-nums; }
.cost-card h2 { margin: 0 0 12px; font-size: 1.25rem; }
.cost-card .muted { margin: 12px 0 0; }
.login-panel .howto-title, [data-panel="link"] .howto-title { margin: 6px 0 0; }
.qr svg { width: 200px; height: 200px; display: block; border: 1px solid var(--line); border-radius: var(--radius-small); }

/* --- мастер --- */

.wizard { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.wizard-step { padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.wizard-step.is-active { box-shadow: var(--shadow); border-color: #cdd9ee; }
.wizard-step h2 { display: flex; align-items: center; gap: 14px; font-size: 1.25rem; margin: 0; }
.step-number { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--sunk); color: var(--muted); font: 700 .95rem/1 var(--display); flex: none; }
.step-body { margin: 18px 0 0 50px; }
.step-summary { margin: 8px 0 0 50px; color: var(--muted); }
.wizard-step.is-locked { opacity: .55; background: transparent; box-shadow: none; }
.wizard-step.is-active .step-number { background: var(--accent); color: #fff; }
.wizard-step.is-done .step-number { background: var(--ok-soft); color: var(--ok); font-size: 0; }
.wizard-step.is-done .step-number::before {
  content: ""; width: 16px; height: 16px; background: currentColor;
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5 5L20 6.5' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  -webkit-mask: var(--check) center / contain no-repeat; mask: var(--check) center / contain no-repeat;
}

.bot-name { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bot-name code { font-size: 1.1rem; background: var(--sunk); padding: 6px 12px; border-radius: var(--radius-small); }
.bot-nick { font-size: .92rem; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.bot-nick code { font-size: .88rem; color: var(--ink); }
.howto { margin: 14px 0 18px; }
.howto summary { cursor: pointer; font-weight: 600; color: var(--accent-dark); }
.howto ol { margin: 8px 0 0; padding-left: 1.3em; }
.howto .bot-name { margin-top: 12px; }
.shot { margin: 12px 0 0; }
.shot img { display: block; width: 100%; max-width: 300px; height: auto; border: 1px solid var(--line); border-radius: 8px; }
.shot figcaption { margin-top: 8px; max-width: 42em; }
.howto-title { font: 600 .92rem/1.3 var(--text); color: var(--muted); margin: 18px 0 0; }
.choices { display: grid; gap: 6px; }
.choices label { border: 1.5px solid var(--line); border-radius: var(--radius-small); padding: 10px 14px; background: var(--surface); }
.choices label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.link-code { font: 500 2rem/1.2 var(--mono); letter-spacing: .25em; }
.schema { margin: 14px 0; }
.schema svg { width: 100%; max-width: 360px; height: auto; display: block; }
.schema figcaption { color: var(--muted); font-size: .92rem; margin-top: 6px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 0 0 22px; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--surface); overflow: hidden; }
.stats div { padding: 12px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats dt { color: var(--muted); font-size: .88rem; }
.stats dd { margin: 4px 0 0; font: 700 1.2rem/1.2 var(--display); }
.stats .wide { grid-column: span 2; }
.options { margin-top: 8px; }
.summary-line { font-size: 1.2rem; }

/* --- прогресс и отчёт --- */

.counters { font-weight: 600; }
.current { background: var(--sunk); border-radius: var(--radius-small); padding: 10px 14px; font-size: .92rem; overflow-wrap: anywhere; }
.report { margin-top: 36px; }
.table-wrap { overflow-x: auto; }
.report-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-small); overflow: hidden; }
.report-table th, .report-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.report-table th { font-size: .88rem; color: var(--muted); font-weight: 600; background: var(--sunk); }
.report-table td:first-child, .report-table td:nth-child(2) { white-space: nowrap; }

.legal-text h1 { margin-bottom: .8em; }
.legal-text h2 { margin-top: 1.4em; }
.legal-text table { width: 100%; border-collapse: collapse; margin: 0 0 1em; font-size: .95rem; display: block; overflow-x: auto; }
.legal-text th, .legal-text td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.legal-text th { background: var(--sunk); }

/* --- вход в админку, первичная настройка --- */

.auth-card { max-width: 460px; margin: 0 auto; }
.auth-card label { display: block; font-weight: 600; margin: 14px 0 4px; }
.auth-card input { width: 100%; }
.auth-card .password-field input { width: auto; }
.codes { columns: 2; font: 500 1.1rem/1.9 var(--mono); list-style: none; padding: 0; }

/* --- админка: боковое меню и рабочая область --- */

.admin-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: calc(100vh - 64px); font-size: 15.5px; }
.admin-side { border-right: 1px solid var(--line); padding: 24px 0; background: var(--surface); }
.admin-side nav { position: sticky; top: 16px; }
.admin-side h2 { font: 600 .85rem/1 var(--text); color: var(--muted); margin: 22px 20px 8px; }
.admin-side h2:first-child { margin-top: 0; }
.admin-side a { display: block; padding: 8px 20px; color: var(--ink); text-decoration: none; border-left: 3px solid transparent; }
.admin-side a:hover { background: var(--sunk); }
.admin-side a[aria-current="page"] { border-left-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; }
.admin-side .sub a { padding-left: 34px; font-size: .92rem; }
.admin-main { padding: 28px 32px 48px; min-width: 0; }
.admin h1, .admin-main h1 { font-size: 1.7rem; }
.admin-main h1 .status { font-size: .72rem; vertical-align: middle; margin-left: 8px; }
.admin-main h2 { font-size: 1.1rem; }
.admin .button-small, .admin-main .button-small { min-height: 36px; }

.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 20px 0; align-items: start; }
.admin-section { margin: 28px 0; }

/* сводка: период, карточки показателей, график, воронка, статусы */
.dash-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 18px; }
.dash-head h1 { margin-bottom: 4px; }
.dash-head p { margin: 0; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--sunk); border-radius: 12px; }
.segmented a, .segmented button { border: 0; background: transparent; padding: 7px 12px; border-radius: 9px; font: 600 .88rem/1.2 var(--text); color: var(--muted); text-decoration: none; cursor: pointer; }
.segmented a:hover, .segmented button:hover { color: var(--ink); }
.segmented [aria-current="page"], .segmented [aria-pressed="true"] { background: var(--surface); color: var(--accent-dark); box-shadow: 0 1px 3px rgba(20, 35, 70, .12); }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
a.kpi:hover { border-color: var(--accent); }
.kpi-title { font-size: .85rem; color: var(--muted); font-weight: 600; }
.kpi-value { font: 700 1.6rem/1.15 var(--text); letter-spacing: -.01em; }
.kpi-delta { font-size: .82rem; font-weight: 600; color: var(--muted); }
.kpi-delta.up { color: var(--ok); }
.kpi-delta.down { color: var(--danger); }
.kpi-hint { font-size: .78rem; color: var(--muted); }
.kpi-errors .kpi-value { color: var(--danger); }
.kpi-grid-small .kpi-value { font-size: 1.3rem; }
.chart-card { margin-bottom: 20px; }
.chart-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; }
.chart-head h2 { margin: 0; }
.chart-total { margin: 12px 0 4px; font-weight: 600; }
.chart { position: relative; }
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-axis { fill: var(--muted); font: 11px var(--text); }
.chart-bar { fill: var(--accent); opacity: .85; transition: opacity .15s; }
.chart-bar.active { opacity: 1; fill: var(--accent-dark); }
.chart-tip { position: absolute; top: 0; transform: translateX(-50%); background: var(--ink); color: #fff; font: 600 .82rem/1.2 var(--text); padding: 6px 10px; border-radius: 8px; pointer-events: none; white-space: nowrap; }
.funnel { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.funnel li { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 10px; background: var(--sunk); overflow: hidden; }
.funnel-bar { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #cfe0ff, var(--accent-soft)); border-radius: 10px; }
.funnel-title, .funnel-value { position: relative; }
.funnel-value { font-weight: 700; white-space: nowrap; }
.donut-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 12px; }
.donut-svg { width: 150px; height: 150px; display: block; }
.donut-total { font: 700 20px var(--text); fill: var(--ink); }
.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend-dot { width: 12px; height: 12px; border-radius: 4px; background: var(--muted); flex: none; }
.legend strong { margin-left: auto; padding-left: 12px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }

/* клиенты: поиск, фильтры, сортировка */
.table-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 20px; margin-bottom: 12px; }
.table-tools p { margin: 0; }
.table-search { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .88rem; }
.table-search input { min-width: 260px; }
.sort-button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.sort-button::after { content: "↕"; font-size: .8em; color: var(--muted); opacity: .6; }
th[aria-sort="ascending"] .sort-button::after { content: "↑"; opacity: 1; color: var(--accent); }
th[aria-sort="descending"] .sort-button::after { content: "↓"; opacity: 1; color: var(--accent); }
.sort-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.contacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.chip { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--sunk); color: var(--muted); font: 600 .72rem/1.4 var(--text); }
.chip-max { background: var(--max-soft); color: var(--max); }
.chip-tg { background: #e3f3fc; color: #1678b0; }
.table-wrap { overflow-x: auto; }
.admin-main .table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-small); }
.card .table-wrap { border: 0; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.admin-table th, .admin-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table thead th { font-size: .84rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.admin-table tbody tr:hover { background: var(--paper); }
.admin-table tbody tr:last-child > * { border-bottom: 0; }
.admin-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.admin-table .status { white-space: nowrap; font-size: .78rem; }
.nowrap-cell { white-space: nowrap; }
.text-cell { min-width: 16em; }

.error-cell { min-width: 22em; overflow-wrap: anywhere; }
.error-cell details { margin-top: 6px; }
.error-cell pre { white-space: pre-wrap; font: .8rem/1.4 var(--mono); background: var(--sunk); padding: 10px; border-radius: var(--radius-small); max-height: 24em; overflow: auto; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .88rem; }
.filters input[type="search"] { min-width: 18em; }
.filters input, .filters select { min-height: 38px; padding: 6px 10px; font-weight: 400; }

.facts { display: grid; grid-template-columns: minmax(9em, auto) 1fr; gap: 6px 16px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }

.action-form { margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.action-form > label { font-weight: 600; }
.action-form textarea { width: 100%; resize: vertical; }
.action-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.action-row input { min-height: 38px; }
.action-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
.action-buttons form { margin: 0; }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
form.inline { display: inline; margin: 0; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tabs a { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; font-size: .9rem; color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 16px 0; }
.plain-list { list-style: none; padding: 0; margin: 0 0 12px; }
.plain-list li { margin-bottom: 8px; }
.subhead { margin-top: 20px; }

/* настройки: одна страница – один раздел */
.settings-head { margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.settings-head p { margin: 6px 0 0; color: var(--muted); max-width: 44em; }
.settings-form { max-width: 720px; }
.settings-form label { display: block; font-weight: 600; margin: 16px 0 4px; }
.settings-form label.check { display: flex; margin-top: 16px; }
.settings-form input[type="text"], .settings-form input[type="number"], .settings-form input[type="password"], .settings-form textarea { width: 100%; }
.settings-form .password-field input { width: auto; }
.settings-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 20px; max-width: 760px; }
.settings-block > h2 { font-family: var(--text); font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.settings-block > .hint:first-of-type { margin-bottom: 4px; }
.secret-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 16px 0; border-top: 1px solid var(--line); }
.secret-row:first-of-type { border-top: 0; padding-top: 4px; }
.secret-status { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.secret-edit { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 4px; }
.secret-edit h3 { font-family: var(--text); font-weight: 700; font-size: 1rem; margin: 0 0 4px; }
.secret-edit .action-row { margin-top: 16px; }
.secret-value { font-family: var(--mono); overflow-wrap: anywhere; background: var(--sunk); padding: 8px 10px; border-radius: var(--radius-small); }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--sunk); font: 600 .8rem/1.2 var(--text); color: var(--muted); }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-bad { background: var(--danger-soft); color: var(--danger); }
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 760px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(20, 35, 70, .18); padding: 14px 18px; }
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; flex: 1 1 16em; font-size: .92rem; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.stuck-videos h3 { margin: 0 0 6px; font-size: 1rem; }
.stuck-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.stuck-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.stuck-list .actions { margin: 0; gap: 8px; }
.topup-form { display: grid; gap: 10px; margin-top: 8px; }
.topup-form label { font-weight: 600; }
.topup-row { display: flex; flex-wrap: wrap; gap: 10px; }
.topup-row input { flex: 1 1 160px; max-width: 240px; }
.topup-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.topup-form .hint { margin: 0; }
.bot-trap { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
label.consent-check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 12px; max-width: 46em; font-size: .88rem; font-weight: 500; line-height: 1.4; }
.consent-check input[type="checkbox"] { flex: 0 0 18px; width: 18px; height: 18px; min-height: 0; margin: 2px 0 0; padding: 0; }
.lead-form .consent-check { margin: 0; }
.group-help { color: var(--muted); margin: 0 0 8px; }
.reauth { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 16px; border: 1.5px dashed #c5cfdd; border-radius: var(--radius); background: var(--surface); margin-bottom: 20px; max-width: 760px; }
.reauth p { margin: 0; flex: 1 1 18em; }
.reauth input { width: 9em; min-height: 38px; }

/* --- планшет и телефон --- */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .admin-side nav { position: static; display: flex; flex-wrap: wrap; gap: 0 4px; padding: 0 12px; }
  .admin-side h2 { display: none; }
  .admin-side a, .admin-side .sub a { padding: 8px 10px; border-left: 0; border-bottom: 3px solid transparent; font-size: .92rem; }
  .admin-side a[aria-current="page"] { border-bottom-color: var(--accent); background: none; }
  .admin-side .sub { display: contents; }
  .admin-main { padding: 20px 16px 40px; }
}

@media (max-width: 800px) {
  .compare { grid-template-columns: 1fr; }
  .compare-arrow { transform: rotate(90deg); }
  .hero-art { gap: 6px; max-width: 460px; }
  .hero-arrow::before { width: 36px; height: 36px; font-size: 1.3rem; }
  .hero-arrow span { white-space: normal; text-align: center; font-size: .68rem; }
  .compare-arrow { justify-self: center; }
  /* Стрелка над подписью: рядом с ней подпись отнимала ширину у карточек каналов. */
  .hero-arrow { grid-template-columns: auto; justify-items: center; }
  .hero-arrow span { max-width: 4.5em; }
  .steps, .columns, .soon-grid { grid-template-columns: 1fr; }
  
  
  
  .admin-grid { grid-template-columns: minmax(0, 1fr); }
  .table-search input { min-width: 0; width: 100%; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-card { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 40px 0; }
  .hero { padding: 40px 0 36px; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .header-inner { gap: 10px; }
  .site-nav { gap: 14px; font-size: .95rem; }
  .step-body { margin-left: 0; }
  .step-summary { margin-left: 0; }
  .button-large { width: 100%; }
  .lead-form .button, .inline-form .button { width: 100%; }
  .report-table thead { display: none; }
  .report-table tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .report-table td { display: block; border: 0; padding: 4px 12px; }
  .report-table td::before { content: attr(data-label) ": "; font-weight: 700; }
  .link-code { font-size: 1.6rem; }
  .date-range { display: grid; grid-template-columns: auto 1fr; gap: 8px 10px; flex: 1 1 calc(100% - 32px); margin-left: 32px; }
  .date-range input { width: 100%; min-width: 0; }
  .nowrap input[type="number"] { width: 5em; }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dd { margin-bottom: 8px; }
  .filters label, .filters input[type="search"] { width: 100%; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
.topup-form input[type="email"] { max-width: 360px; }

/* Узкий телефон: карточки каналов в первом экране – мельче, чтобы название влезало. */
@media (max-width: 420px) {
  .mini-channel { padding: 9px; border-radius: 14px; }
  .mini-head { gap: 6px; }
  .mini-avatar { width: 24px; height: 24px; }
  .mini-name b { font-size: .74rem; }
  .mini-name small { font-size: .62rem; }
}

/* «Платежи»: бонус за пополнение – карточка ступеней, суммы бонуса зелёным. */
.bonus-card { background: var(--ok-soft); border-radius: var(--radius-small); padding: 12px 14px; display: grid; gap: 8px; }
.bonus-title { margin: 0; font-weight: 700; color: var(--ok); }
.bonus-tiers { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.bonus-tiers li { display: inline-flex; align-items: baseline; gap: 6px; background: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: .9rem; }
.bonus-tiers b, .preset-bonus, .bonus-amount { color: var(--ok); font-weight: 700; }
.bonus-example { margin: 0; font-size: .9rem; color: var(--muted); }
.bonus-example b { color: var(--ink); }
.preset { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; line-height: 1.15; min-width: 84px; }
.preset-sum { font-weight: 700; }
.preset-bonus { font-size: .78rem; }
.topup-total { margin: 0; }

/* Первый экран: бонус – плашка по ширине текста; кнопки – в один ряд, без синей тени у
   второстепенных; после первого экрана – без двойного отступа. */
.hero-bonus { width: fit-content; max-width: 100%; margin: 0; padding: 7px 16px; background: var(--ok-soft); border-radius: 999px; font-size: .92rem; }
.hero-bonus a { color: var(--ink); text-decoration: none; font-weight: 600; }
.hero-bonus a:hover { color: var(--ok); }
.hero-bonus b { color: var(--ok); }
.hero .actions { margin: 0; gap: 10px; }
.hero .actions .button-large { padding: 14px 22px; }
.hero .actions .button-secondary { box-shadow: none; }
.hero + .section { padding-top: 32px; }
@media (max-width: 480px) { .hero-bonus { border-radius: var(--radius-small); } }
@media (max-width: 480px) { .badge-gift { border-radius: var(--radius-small); } }
/* Подарок и бонус – рядом, под описанием, над кнопками. */
.hero-perks { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 0 0 20px; }
.hero-perks > p { margin: 0; }
