/* Компоненты и раскладка публичного сайта.
 *
 * Классы названы так же, как в макетах (`.btn`, `.zone`, `.money`, `.cap`,
 * `.card`, `.code`, `.notice`): совпадение имён — единственный способ
 * сверить страницу с макетом чтением, не открывая браузер.
 *
 * Раскладка — grid и flex с `gap`. Ширины в процентах и `minmax(0, 1fr)`
 * вместо фиксированных: макетов два (1440 и 390), а ширин у посетителей
 * бесконечно много, и всё между ними обязано просто тянуться.
 *
 * Горизонтального скролла у страницы нет. Всё, что не сжимается, — таблицы,
 * код, график — скроллится внутри своего контейнера (`.scroll-x`, `.code`).
 */

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

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* Страница не ездит вбок ни при какой ширине. Именно `clip`, а не
     `hidden`: `hidden` делает body областью прокрутки, и `position:sticky`
     у шапки перестаёт прилипать — молча, только на телефоне. */
  overflow-x: clip;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accentH); }

h1, h2, h3, p { margin: 0; }
img, svg { max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 16px;
}

/* Классы, которые вешаются на `.wrap` вместе с ним (`class="wrap section"`),
   задают только вертикальные отступы — `padding-top`/`padding-bottom`, а не
   `padding`. Сокращённая запись здесь перебивала боковые поля самого `.wrap`
   (одинаковая специфичность, кто ниже — тот и прав), и на телефоне текст
   упирался в края экрана. Заметить это в вёрстке нечем: в макете 1440 поля
   всё равно есть, потому что страница уже в центре. */

/* Ссылка для клавиатуры: видна только когда до неё дошли табом. */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 40;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accentInk);
  font-size: 13px;
}
.skip:focus { left: 0; color: var(--accentInk); }

/* ── Атомы из макета ───────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accentInk); }
.btn-primary:hover { background: var(--accentH); border-color: var(--accentH); color: var(--accentInk); }
.btn-secondary { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn-secondary:hover { background: var(--hover); color: var(--text); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); }
.btn-lg { height: 48px; font-size: 15px; font-weight: 600; padding: 0 22px; }
/* Кнопка-«прозрачная вторичная» из hero. */
.btn-outline { background: transparent; border-color: var(--line); color: var(--text); }
.btn-outline:hover { background: var(--surface); color: var(--text); }

.zone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 8px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface2);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.zone-offpeak { border-color: var(--infoSoft); background: var(--infoSoft); }
.zone-peak { border-color: var(--warnSoft); background: var(--warnSoft); }

.money {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cap {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
}
.cap-accent { color: var(--accent); }

.h2 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.h3 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }

.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.card-accent { border-color: var(--accent); }

.notice {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface2);
  color: var(--muted);
  font-size: 13px;
}
.notice-sm { font-size: 12px; }

.code {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface2);
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.65;
  overflow-x: auto;
  tab-size: 2;
}

.scroll-x { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left;
  padding: 8px 16px;
  background: var(--surface2);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}
td { padding: 15px 16px; border-bottom: 1px solid var(--lineS); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Сетка «плитка в рамке»: фон-линия просвечивает в зазорах. */
.tiles {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.tiles > * { background: var(--surface); }

.dash { display: flex; gap: 10px; }
.dash::before { content: "—"; color: var(--accent); }

/* Иконки — тот же язык, что у рамок: штрих 1.6, без заливок и скруглений,
   цвет наследуется от строки заголовка (`currentColor`), поэтому иконка
   меняется вместе с текстом, а не отдельным правилом на каждый блок. */
.icon { display: block; flex: none; }
.step-head, .service-head, .trust-head, .point-head { display: flex; align-items: center; gap: 10px; }
.step-head, .service-head, .point-head { color: var(--accent); }
.trust-head { color: var(--dim); }
.trust-head .trust-title { color: var(--text); }

/* ── Language strip ────────────────────────────────────────────────────── */

/* The strip sits above the ticker, as the first child of the body, and is in
   the markup on every page — hidden. The script that decides whether to show
   it only removes the attribute, so the page never jumps: a strip inserted
   after the page is on the screen pushes everything below it down by its own
   height, and that is the one moment the reader is already reading.

   `[hidden]` needs saying out loud because `display: flex` on the row would
   otherwise win over the browser's `display: none` on the parent — the same
   trap `.menu[hidden]` sits in above. */
.langbar { border-bottom: 1px solid var(--line); background: var(--surface2); }
.langbar[hidden] { display: none; }
.langbar-row {
  padding-top: 8px;
  padding-bottom: 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 13px;
  color: var(--muted);
}
.langbar-link { color: var(--accent); }
.langbar-link:hover { color: var(--accentH); }
/* A button, not a link: it dismisses a suggestion, it does not go anywhere. */
.langbar-close {
  margin-left: auto;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 12px;
  color: var(--dim);
  cursor: pointer;
}
.langbar-close:hover { color: var(--text); }

/* ── Тикер ─────────────────────────────────────────────────────────────── */

.ticker { border-bottom: 1px solid var(--line); background: var(--surface); }
.ticker-row {
  padding-top: 8px;
  padding-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
}
.ticker-row .lit { color: var(--text); }
.ticker-row .accent { color: var(--accent); }
/* Источник данных: на широких экранах — в одну строку справа, на узких —
   своя строка слева. Прижатый вправо «повисший» хвост второй строки читается
   как сломанная вёрстка, а не как задумка. */
.ticker-src { flex-basis: 100%; }

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

.nav {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 20;
}
.nav-row { padding-top: 12px; padding-bottom: 12px; display: flex; align-items: center; gap: 12px; }
.logo { font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--text); }
.logo:hover { color: var(--text); }
.logo .dot { color: var(--accent); }
.nav-links { display: none; gap: 20px; font-size: 13px; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); }
/* Открытая страница подсвечена в меню — и подсвечена тем же признаком,
   который слышит озвучка, а не отдельным классом «на глаз». */
.nav-links a[aria-current="page"], .menu a[aria-current="page"] { color: var(--text); }
.nav-side { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-side .btn { height: 32px; font-size: 12px; padding: 0 12px; }
.nav-signin { display: none; font-size: 13px; color: var(--muted); }
.nav-signin:hover { color: var(--text); }

.health {
  display: none;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
}
.health .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.health[data-state="degraded"] .dot { background: var(--warn); }
.health[data-state="down"] .dot { background: var(--danger); }
.health[data-state="unknown"] .dot { background: var(--neutral); }

.burger {
  /* Знак рисуется `stroke="currentColor"`, как и остальные иконки: цвет живёт
     здесь, в токене, а не копией значения в разметке трёх страниц. */
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu {
  padding: 8px 0 16px;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--line);
}
.menu[hidden] { display: none; }
.menu a {
  color: var(--text);
  padding: 12px 0;
  border-bottom: 1px solid var(--lineS);
  font-size: 15px;
}
.menu .health { display: inline-flex; padding-top: 14px; }

/* ── 1 · Hero ──────────────────────────────────────────────────────────── */

.hero { padding-top: 40px; padding-bottom: 32px; display: grid; gap: 24px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 18px; }
.hero h1 {
  font-size: clamp(32px, 5.4vw, 64px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.hero-lede { color: var(--muted); font-size: clamp(15px, 1.4vw, 18px); line-height: 1.55; text-wrap: pretty; }
.hero-actions { display: flex; flex-direction: column; gap: 10px; }
.hero-actions .btn { width: 100%; }

.hero-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bar-row { display: flex; flex-direction: column; gap: 8px; }
.bar-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.bar { height: 14px; background: var(--lineS); overflow: hidden; }
.bar-fill { height: 100%; background: var(--barBurn); }
.bar-fill-accent { background: var(--accent); }
.hero-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
  border-top: 1px solid var(--lineS);
  padding-top: 16px;
}
.hero-card-head { display: flex; align-items: center; gap: 8px; }
.hero-card-head .zone { margin-left: auto; }

/* ── Стат-полоса ───────────────────────────────────────────────────────── */

.stats {
  margin: 24px 0 40px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.stats > div {
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-right: 1px solid var(--lineS);
}
/* Левая колонка прижата к краю страницы, правая — без линии справа:
   иначе сетка не встаёт в одну вертикаль с остальными блоками. */
.stats > div:nth-child(odd) { padding-left: 0; }
.stats > div:nth-child(even) { border-right: none; }
.stats .money { font-size: 22px; }

/* ── 2 · Калькулятор ───────────────────────────────────────────────────── */

.calc { padding-bottom: 40px; }
.calc-card { padding: 20px; display: grid; gap: 20px; align-items: center; }
.calc-copy { display: flex; flex-direction: column; gap: 14px; }
.calc-hint { color: var(--muted); font-size: 13px; max-width: 44ch; }
.calc-control { display: flex; flex-direction: column; gap: 10px; }
.calc-control-head { display: flex; justify-content: space-between; align-items: baseline; }
.calc-control-head .money { font-size: 20px; }
.calc-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--dim); font-family: var(--mono); }
.calc-out { display: flex; flex-direction: column; gap: 2px; }
.calc-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--lineS);
  font-size: 13px;
}
.calc-line-label { color: var(--muted); }
.calc-total { border-bottom: none; }
.calc-total .calc-line-label { color: var(--text); font-weight: 600; }
.calc-total .money { font-size: 20px; color: var(--ok); letter-spacing: -.02em; }
.calc-burn { color: var(--danger); font-size: 17px; }
.calc-ours { font-size: 17px; }

/* Ползунок. Стилизуем нативный input: клавиатура и озвучка достаются
   даром, а div с обработчиком pointer-событий им ничего не должен. */
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 16px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.slider::-webkit-slider-runnable-track {
  height: 6px;
  background: linear-gradient(to right, var(--accent) var(--fill, 50%), var(--surface2) var(--fill, 50%));
}
.slider::-moz-range-track { height: 6px; background: var(--surface2); }
.slider::-moz-range-progress { height: 6px; background: var(--accent); }
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}
.slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--accent);
}

/* ── 3 · Как это работает ──────────────────────────────────────────────── */

.section { padding-bottom: 40px; display: flex; flex-direction: column; gap: 14px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; }
.section-head-note { font-size: 13px; color: var(--dim); }
.section-head-link { font-size: 13px; white-space: nowrap; }

.steps { list-style: none; margin: 0; padding: 0; grid-template-columns: minmax(0, 1fr); }
.steps > li {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.step-no { font-family: var(--mono); font-size: 11px; color: var(--accent); }
.step-title { font-size: 15px; font-weight: 500; }
.step-text { font-size: 13px; color: var(--muted); text-wrap: pretty; }

/* ── 4 · Три сервиса ───────────────────────────────────────────────────── */

.services { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.service { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.service-title { font-size: 15px; font-weight: 500; text-wrap: pretty; }
.service-text { font-size: 13px; color: var(--muted); }
.service a { font-size: 13px; margin-top: auto; }

/* ── 5 · Auto-refill ───────────────────────────────────────────────────── */

.feature {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  margin-bottom: 40px;
}
.feature-grid { padding-top: 32px; padding-bottom: 32px; display: grid; gap: 24px; align-items: center; }
.feature-copy { display: flex; flex-direction: column; gap: 14px; }
.feature-copy h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 600; letter-spacing: -.02em; text-wrap: pretty; }
.feature-lede { color: var(--muted); font-size: 14px; max-width: 50ch; text-wrap: pretty; }
.feature-list { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.feature-actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 6px; }
.feature-day { background: var(--bg); padding: 20px; display: flex; flex-direction: column; }
.day-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--lineS);
  font-size: 13px;
}
.day-row:last-of-type { border-bottom: none; }
.day-foot { font-size: 11px; color: var(--dim); font-family: var(--mono); padding-top: 10px; }

/* ── 6 · Цены ──────────────────────────────────────────────────────────── */

/* Карточки цен и графика — одной высоты: рваная нижняя кромка читается как
   недовёрстка. Таблица тянется, её подвал прижат к низу. */
.pricing-grid { display: grid; gap: 14px; align-items: stretch; }
.pricing-grid > .card { display: flex; flex-direction: column; }
.pricing-grid > .card > .scroll-x { flex: 1; }
.table-foot {
  padding: 12px 16px;
  background: var(--surface2);
  border-top: 1px solid var(--lineS);
  font-size: 12px;
  color: var(--dim);
}
.chart-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.chart-head { display: flex; align-items: center; gap: 8px; }
.chart-ranges { margin-left: auto; display: flex; gap: 4px; }
/* Кнопки, а не подписи: диапазон переключается по-настоящему. Кнопка,
   которая ничего не делает, врёт молча — поэтому раньше здесь стояли
   `span` с `aria-hidden`, а теперь их место занял `chart.js`. */
.chart-ranges button {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 8px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--dim);
  cursor: pointer;
}
.chart-ranges button:hover { color: var(--text); }
.chart-ranges button[aria-pressed="true"] { background: var(--accentSoft); color: var(--accent); }
.chart svg { width: 100%; height: auto; display: block; }
.chart-plot { min-width: 0; }

/* Цвета графика — здесь, а не атрибутами в SVG: палитра одна на страницу,
   и график меняется вместе с ней, а не отдельно от неё. */
.chart-grid { stroke: var(--lineS); stroke-width: 1; }
.chart-line { stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
/* Вторая линия — приглушённый тон, а не второй акцент: акцент на графике
   один, иначе обе линии «главные» и читать нечего. Пунктир занят прогнозом. */
.chart-line-alt { stroke: var(--muted); stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart-forecast { stroke: var(--dim); stroke-width: 2; stroke-dasharray: 5 5; vector-effect: non-scaling-stroke; }
.chart-band { fill: var(--dim); opacity: .06; }
.chart-label { fill: var(--dim); font-family: var(--mono); font-size: 11px; }

/* Легенда лежит в разметке, а не рисуется скриптом: без JS график остаётся
   контуром, и подпись «какая линия чья» нужна ровно так же. Цвет мазка —
   тот же класс, что у линии, поэтому разъехаться им негде. */
.chart-legend { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.chart-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
}
.chart-key::before {
  content: "";
  width: 14px;
  height: 0;
  border-top: 2px solid currentColor;
}
.chart-key-line { color: var(--accent); }
.chart-key-alt { color: var(--muted); }
/* Легенда и переключатель диапазона оба просятся вправо; когда они в одной
   шапке, вправо уходит только переключатель. */
.chart-legend + .chart-ranges { margin-left: 12px; }

.chart-src {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
}
.chart-span { color: var(--muted); }

/* ── 8 · Доверие ───────────────────────────────────────────────────────── */

.trust { grid-template-columns: minmax(0, 1fr); }
.trust > div { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.trust-title { font-size: 14px; font-weight: 500; }
.trust-text { font-size: 13px; color: var(--muted); }

/* ── 9 · Быстрый старт ─────────────────────────────────────────────────── */

.quickstart { display: grid; gap: 24px; align-items: start; }
.quickstart-copy { display: flex; flex-direction: column; gap: 14px; }
.quickstart-copy p { color: var(--muted); font-size: 13px; max-width: 50ch; text-wrap: pretty; }
.quickstart-copy code, .inline-mono { font-family: var(--mono); font-size: .95em; }
.quickstart-panel { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); }
.tab {
  padding: 12px 0;
  font-size: 13px;
  font-family: var(--sans);
  color: var(--dim);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tab-panel[hidden] { display: none; }

/* ── 10 · FAQ ──────────────────────────────────────────────────────────── */

.faq { grid-template-columns: minmax(0, 1fr); }
.faq > div { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.faq-q { font-size: 14px; font-weight: 500; }
.faq-a { font-size: 13px; color: var(--muted); text-wrap: pretty; }

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

.cta { border-top: 1px solid var(--line); background: var(--surface); }
.cta-inner {
  padding-top: 40px;
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.cta h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 600; letter-spacing: -.02em; text-wrap: pretty; }
.cta-sub { font-size: 14px; color: var(--muted); }
.cta-fine { font-size: 12px; color: var(--dim); }
.cta .btn { align-self: stretch; }

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

.footer { border-top: 1px solid var(--line); background: var(--bg); }
.footer-grid {
  padding-top: 32px;
  padding-bottom: 32px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  font-size: 13px;
}
.footer-brand { display: flex; flex-direction: column; gap: 12px; grid-column: 1 / -1; }
.footer-tagline { font-size: 12px; color: var(--dim); max-width: 26ch; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: var(--muted); }
.footer-col a:hover { color: var(--text); }
/* Юридические пункты — не ссылки, пока страниц нет. Серый текст здесь
   честнее ссылки на «скоро»: мёртвая ссылка в подвале выглядит ровно как
   живая, пока по ней не щёлкнут. */
.footer-col .flat { color: var(--dim); }
.footer-col .company { color: var(--muted); }
.footer-col .company-line { color: var(--dim); font-size: 12px; }
.footer-bottom { border-top: 1px solid var(--lineS); }
.footer-bottom-row {
  padding-top: 16px;
  padding-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
  font-size: 12px;
  color: var(--dim);
}
.footer-domains { font-family: var(--mono); }
/* Languages of the page. Every name is written in its own language, so the
   line is set in the body font rather than the mono one — Devanagari and
   Vietnamese have no mono face here and would fall back mid-line. The current
   language is marked by `aria-current`, the same signal a screen reader
   reads, not by a class of its own. */
.lang-switch { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.lang-switch a { color: var(--dim); }
.lang-switch a:hover { color: var(--text); }
.lang-switch a[aria-current="true"] { color: var(--text); }

/* ── Страницы /pricing и /auto-refill ──────────────────────────────────── */

/* Заголовок внутренней страницы. Не hero главной: там продают, здесь
   объясняют, и картинки справа нет. */
.page-head { padding-top: 32px; padding-bottom: 24px; display: flex; flex-direction: column; gap: 12px; }
.page-head h1 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.page-lede { color: var(--muted); max-width: 64ch; text-wrap: pretty; }

/* Hero внутренней страницы: заголовок скромнее главного — на главной он
   единственный экран, здесь за ним идёт объяснение. */
.hero-even h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 600; letter-spacing: -.025em; }

/* Колонка блоков: сайдбар цен, тексты второй колонки на /auto-refill. */
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-lg { gap: 24px; }

/* Полоса на фоне поверхности — тот же приём, что у `.feature` на главной. */
.band { border-top: 1px solid var(--line); background: var(--surface); }
.band-inner { padding-top: 32px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 16px; }
.band-split { padding-top: 32px; padding-bottom: 32px; display: grid; gap: 24px; align-items: center; }
.band .card, .band .tiles > * { background: var(--bg); }

/* Ставки поддержания: строка «за что» — «сколько». */
.rates { display: flex; flex-direction: column; }
.rate-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--lineS);
  font-size: 13px;
}
.rate-row:last-child { border-bottom: none; }
.rate-row .money { font-size: 17px; }
.rate-row-label { color: var(--muted); }
.rate-note { font-size: 12px; color: var(--dim); text-wrap: pretty; }

/* Пять пунктов правила: та же плитка в рамке, что у шагов главной. */
.points { grid-template-columns: minmax(0, 1fr); }
.points > div { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.point-no { font-family: var(--mono); font-size: 11px; color: var(--accent); }
.point-title { font-size: 15px; font-weight: 500; }
.point-text { font-size: 13px; color: var(--muted); text-wrap: pretty; }
.point-rates { justify-content: center; gap: 8px; }

/* Цитата боли. Тот же `.notice`, но жёлтым: это чужая реплика, а не наша
   сноска, и выглядеть одинаково они не должны. */
.quote {
  align-self: flex-start;
  border-color: var(--warnSoft);
  background: var(--warnSoft);
  color: var(--warn);
}

.rule-card { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.rule-foot { font-size: 12px; color: var(--dim); }

.budget-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.budget-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
.budget-reset { font-size: 13px; color: var(--dim); }
.budget-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.budget-total .money { font-size: 24px; letter-spacing: -.02em; }
.budget-of { font-size: 13px; color: var(--dim); }
.meter { height: 8px; background: var(--surface2); overflow: hidden; }
.meter-fill { height: 100%; background: var(--accent); }
.budget-rows { display: flex; flex-direction: column; }
.budget-foot { font-family: var(--mono); font-size: 11px; color: var(--dim); }

/* ── 404 ───────────────────────────────────────────────────────────────── */

.oops {
  min-height: 60vh;
  padding-top: 64px;
  padding-bottom: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  max-width: 46ch;
}
.oops h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 700; letter-spacing: -.03em; }
.oops p { color: var(--muted); }
.oops-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ══ ≥560px: две колонки там, где их держит содержимое ══════════════════ */

@media (min-width: 560px) {
  .hero-actions { flex-direction: row; }
  .hero-actions .btn { width: auto; }
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta .btn { align-self: center; }
}

/* ══ ≥720px: шапка раскрывается, плитки становятся карточками ═══════════ */

@media (min-width: 720px) {
  .wrap { padding: 0 24px; }
  .nav-links { display: flex; }
  .nav-signin { display: inline; }
  .burger { display: none; }
  .menu { display: none !important; }

  .hero { padding-top: 64px; padding-bottom: 24px; }
  .hero-copy { gap: 24px; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats > div,
  .stats > div:nth-child(odd) { padding: 24px; }
  .stats > div:nth-child(even) { border-right: 1px solid var(--lineS); }
  .stats > div:first-child { padding-left: 0; }
  .stats > div:last-child { border-right: none; }

  .section { padding-bottom: 56px; gap: 20px; }
  .section-head-link { margin-left: auto; }
  .h2 { font-size: 24px; }
  .calc { padding-bottom: 56px; }
  .calc-card { padding: 32px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }

  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .steps > li { padding: 24px; }
  .step-title { font-size: 17px; }

  .services { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .service { padding: 24px; gap: 14px; }
  .service-title { font-size: 17px; }

  .feature-grid { padding-top: 64px; padding-bottom: 64px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
  .feature-copy { gap: 18px; }
  .feature-lede { font-size: 15px; }
  .feature-day { padding: 24px; }

  /* Шесть плиток 3×2. Растянутой плитки больше нет: ряд из двух с дырой
     справа читался как «сюда что-то не доехало». */
  .trust { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .quickstart { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
  .code { padding: 16px; font-size: 12px; }

  .faq > div { padding: 20px; gap: 8px; }
  .faq-q { font-size: 15px; }

  .page-head { padding-top: 56px; padding-bottom: 40px; }
  .band-inner { padding-top: 56px; padding-bottom: 56px; gap: 20px; }
  .band-split { padding-top: 56px; padding-bottom: 56px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
  .points { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .points > div { padding: 24px; }
  .rule-card, .budget-card { padding: 24px; }

  .cta-inner { padding-top: 64px; padding-bottom: 64px; gap: 18px; }
  .cta .btn { align-self: center; }

  .footer-grid { padding-top: 48px; padding-bottom: 40px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
  .footer-brand { grid-column: auto; }
  .footer-col { gap: 10px; }
}

/* ══ ≥1024px: раскладка десктопного макета ══════════════════════════════ */

@media (min-width: 1024px) {
  .nav-row { padding-top: 14px; padding-bottom: 14px; gap: 24px; }
  .nav-side { gap: 14px; }
  .nav-side .btn { height: 36px; font-size: 13px; padding: 0 16px; }
  .nav-links { gap: 24px; font-size: 14px; }
  .nav-signin { font-size: 14px; }
  .logo { font-size: 15px; }
  .health { display: inline-flex; }

  .hero { padding-top: 96px; padding-bottom: 24px; grid-template-columns: 7fr 5fr; gap: 64px; }
  .hero-copy { gap: 28px; }
  .hero h1 { max-width: 14ch; line-height: 1.04; }
  .hero-lede { max-width: 46ch; }
  .hero-actions .btn { height: 48px; font-size: 15px; font-weight: 600; padding: 0 22px; }
  .hero-card { padding: 28px; gap: 24px; }
  .hero-card .bar-head .money { font-size: 17px; }
  .hero-card .bar-head .money.lead { font-size: 24px; }

  .stats { margin: 40px 0 64px; }
  .section { padding-bottom: 72px; }
  .calc { padding-bottom: 72px; }
  .calc-card { gap: 48px; }
  .calc-line { padding: 14px 0; }
  .calc-burn, .calc-ours { font-size: 17px; }
  .calc-total .money { font-size: 24px; }

  .pricing-grid { grid-template-columns: 7fr 5fr; gap: 24px; }
  .feature { margin-bottom: 0; }
  .feature-grid { gap: 48px; }

  /* Hero внутренней страницы: две равные колонки, а не 7fr/5fr главной —
     справа не карточка-иллюстрация, а содержательный блок. */
  .hero-even { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
  .hero-even h1 { max-width: 18ch; }
}

@media (min-width: 1280px) {
  .ticker-src { flex-basis: auto; margin-left: auto; }
}

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