/*
 * Публичный сайт ServiceCenterSoft.
 *
 * Свои стили, без сторонних библиотек.
 *
 * Вид (решения владельца 2026-09-21): светлая основа — как в первой версии витрины,
 * а не тёмная «как на действующем сайте». От тёмного варианта оставлены живые части:
 * появление блоков при прокрутке, подъём карточек и заливка иконки при наведении,
 * плотнеющая при прокрутке шапка, наезд на картинку. Большие картинки в первом экране
 * и в заголовках страниц, градиентный подвал — тёмно-синий, почти чёрный.
 *
 * Правки после второго просмотра владельцем:
 *   — две гарнитуры: Manrope (заголовки) и Inter (текст). Одна на всё выглядела безлико;
 *   — текст НИКОГДА не центрируется: заголовки разделов, пустые состояния, призыв
 *     к действию — всё по левому краю;
 *   — заголовок страницы и её текст лежат в одной сетке (--col-text / --col-side),
 *     иначе H1 и первый абзац начинались в разных местах;
 *   — в шапке ничего не скачет: шестерёнка больше не проворачивается;
 *   — правила меню больше не ломают кнопку «Демо» (была без отступов и с тёмным
 *     текстом на синем — выглядела пустым овалом).
 *
 * Правки после третьего просмотра:
 *   — шапка покрашена в тёмно-синий, в тон подвалу: логотип-шестерёнка белая, на светлой
 *     шапке её не было видно. Страница получила «рамку»: тёмный верх, светлая середина,
 *     тёмный низ;
 *   — узких центрированных блоков не осталось: класс .narrow убран совсем, контейнеры
 *     во всю ширину, ширину читаемой строки держит сам текст (.prose — 720px, слева);
 *   — шрифт подвала уменьшен.
 */

:root {
    --brand: #4a8fd4;
    --brand-dark: #2f6ea8;
    --brand-deep: #1d4b77;
    --brand-soft: #eaf2fb;
    --ink: #17202e;
    --ink-soft: #3b4658;
    --muted: #5d6877;
    --line: #e4e9f0;
    --bg-soft: #f5f8fc;
    --bg-tint: #eff5fc;

    /* Подвал: тёмно-синий, близкий к чёрному. Три оттенка — из них собран градиент */
    --night: #070b14;
    --night-mid: #101d33;
    --night-blue: #16294a;

    --radius: 14px;
    --radius-sm: 9px;
    --radius-lg: 22px;
    --shadow: 0 1px 2px rgba(23, 32, 46, .06), 0 8px 24px rgba(23, 32, 46, .06);
    --shadow-lg: 0 2px 6px rgba(23, 32, 46, .08), 0 18px 48px rgba(23, 32, 46, .12);
    --shadow-art: 0 30px 70px rgba(16, 29, 51, .22), 0 6px 18px rgba(16, 29, 51, .10);
    --header-h: 76px;
    --wrap: 1180px;
    /* Ширина текстовой колонки и оглавления — одни и те же числа для заголовка
       страницы и для её текста, иначе H1 и первый абзац начинаются в разных местах */
    /* 720 + 60 + 360 = 1140 — ровно ширина .wrap без боковых полей. Сетка занимает её
       целиком, поэтому заголовок страницы и текст под ним начинаются на одной линии,
       и правые края тоже совпадают */
    --col-text: 720px;
    --col-side: 360px;
    --col-gap: 60px;

    /* Две гарнитуры: заголовки — Manrope (плотный геометричный гротеск, у него
       заметный характер), текст — Inter (сделан для чтения с экрана). Одна гарнитура
       на всё выглядела безлико — именно это владелец и назвал «простецки» */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-head: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ------------------------------------------------------------------ основа */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink-soft);
    background: #fff;
    overflow-wrap: break-word;
    font-feature-settings: 'kern' 1, 'liga' 1;
    -webkit-font-smoothing: antialiased;
    /* Подвал прижат к низу окна на любой короткой странице (владелец 2026-09-26) */
    display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh;
}
body > #main { flex: 1 0 auto; }

h1, h2, h3, h4 {
    font-family: var(--font-head);
    color: var(--ink); line-height: 1.15; margin: 0 0 .6em; font-weight: 700;
}
h1 { font-size: clamp(34px, 3.6vw, 46px); letter-spacing: -.025em; }
h2 { font-size: clamp(26px, 2.8vw, 34px); letter-spacing: -.02em; }
h3 { font-size: clamp(19px, 1.6vw, 21px); letter-spacing: -.01em; }
h4 { font-size: 17px; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
strong, b { font-weight: 600; }

a { color: var(--brand-dark); text-decoration: none; transition: color .15s; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: .4em; }
code { background: var(--bg-soft); padding: .1em .35em; border-radius: 5px; font-size: .92em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding-block: 68px; }
.section-soft { background: var(--bg-soft); }
/* Только сверху и снизу: этот класс висит на самом .wrap, и `padding: 48px 0`
   стирал его боковые поля — текст уезжал на 20px левее заголовка страницы */
.section-tight { padding-block: 48px 56px; }
.lead { font-size: 19px; line-height: 1.6; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 15px; }

/* Текст выровнен по левому краю — всегда (просьба владельца). Центрированные абзацы
   читаются хуже: у каждой строки своё начало, и глазу приходится его искать */
.section-head { max-width: 720px; margin: 0 0 44px; }
/* Фирменная деталь: короткая двухцветная черта над заголовком раздела */
.section-head h2::before {
    content: ''; display: block; width: 46px; height: 3px; margin: 0 0 20px;
    border-radius: 2px; background: linear-gradient(90deg, var(--brand), var(--brand-deep));
}
.section-head .lead { margin-bottom: 0; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    margin-bottom: 18px; padding: 7px 16px 7px 12px;
    background: #fff; color: var(--brand-dark);
    border: 1px solid rgba(74, 143, 212, .28);
    border-radius: 999px; font-size: 13px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .06em;
    box-shadow: 0 2px 10px rgba(74, 143, 212, .12);
}
.eyebrow::before {
    content: ''; width: 7px; height: 7px; border-radius: 50%;
    background: var(--brand); box-shadow: 0 0 0 3px rgba(74, 143, 212, .18);
}

/* ------------------------------------------------------------------ кнопки */
.btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 28px; border: 1px solid transparent; border-radius: var(--radius-sm);
    font: inherit; font-weight: 500; line-height: 1.2; cursor: pointer; text-decoration: none;
    transition: background .2s, border-color .2s, color .2s, transform .15s, box-shadow .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(74, 143, 212, .35); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; box-shadow: 0 10px 26px rgba(47, 110, 168, .45); }
.btn-outline { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-outline:hover { border-color: var(--brand); color: var(--brand-dark); box-shadow: var(--shadow); }
.btn-lg { padding: 16px 34px; font-size: 18px; }
.btn-sm { padding: 9px 18px; font-size: 15px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ------------------------------------------------------------------ шапка */
/* Шапка тёмно-синяя, в тон подвалу: страница получает «рамку» — тёмный верх,
   светлая середина, тёмный низ. И главное, ради чего красили: логотип-шестерёнка
   белая, на светлой шапке её просто не было видно */
.site-header {
    position: sticky; top: 0; z-index: 99;
    background:
        radial-gradient(700px 200px at 18% 120%, rgba(74, 143, 212, .28), rgba(74, 143, 212, 0) 70%),
        linear-gradient(180deg, var(--night-blue), var(--night-mid));
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .07);
    transition: box-shadow .3s;
}
/* При прокрутке шапка отрывается от страницы тенью */
.site-header.scrolled { box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .07), 0 8px 26px rgba(7, 11, 20, .28); }
.header-row { display: flex; align-items: center; gap: 20px; height: var(--header-h); }

/* Логотип: фирменный, двухцветный — большая шестерёнка синяя, малая белая
   (logo-cogs.png, он же в админке). Монохромный logo-cogs-white.png остался
   в папке на случай, когда нужен один цвет. Ничего не крутится и не скачет */
.logo { position: relative; display: flex; align-items: center; padding-left: 48px; height: 40px; }
.logo:hover { text-decoration: none; }
.logo::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; margin: auto;
    width: 36px; height: 36px;
    background: url(/assets/img/logo-cogs.png) no-repeat center / contain;
    transition: opacity .2s;
}
.logo:hover::before { opacity: .8; }
.logo span {
    font-family: var(--font-head);
    font-size: 19px; font-weight: 800; color: #fff;
    letter-spacing: -.02em; white-space: nowrap;
}
.logo span i { font-style: normal; color: var(--brand-dark); font-weight: 700; }

.nav { display: flex; align-items: center; gap: 20px; margin-left: auto; }

/* Правила ниже — только для ссылок меню: кнопке «Демо» они ломали и отступы,
   и цвет текста (тёмный на синем), из-за чего она выглядела пустым овалом */
.nav > a:not(.btn) {
    position: relative; color: rgba(255, 255, 255, .78); font-size: 15px; padding: 4px 0;
    font-weight: 500;
}
.nav > a:not(.btn)::after {
    content: ''; position: absolute; left: 0; right: 100%; bottom: -4px; height: 2px;
    border-radius: 2px; background: var(--brand); transition: right .25s ease;
}
.nav > a:not(.btn):hover { color: #fff; text-decoration: none; }
.nav > a:not(.btn):hover::after, .nav > a:not(.btn).active::after { right: 0; }
.nav > a:not(.btn).active { color: #fff; }

/* Кнопка в шапке белая: синяя на тёмно-синем не читалась бы */
.site-header .btn-primary { background: #fff; color: var(--night-mid); box-shadow: none; }
.site-header .btn-primary:hover { background: var(--brand-soft); color: var(--night); box-shadow: 0 8px 20px rgba(7, 11, 20, .35); }

/* Языки отделены от меню тонкой чертой: это переключатель, а не раздел сайта */
.langs { display: flex; gap: 2px; padding-left: 16px; margin-left: -4px; border-left: 1px solid rgba(255, 255, 255, .16); }
.langs a {
    padding: 5px 8px; border-radius: 7px; font-size: 12px; font-weight: 600;
    color: rgba(255, 255, 255, .55); text-transform: uppercase; letter-spacing: .04em;
}
.langs a:hover { background: rgba(255, 255, 255, .1); color: #fff; text-decoration: none; }
.langs a.active { background: var(--brand); color: #fff; }

/* Языки в шапке — выпадающий список (просьба владельца 2026-09-21). Четыре кода
   в строку занимали в шапке 140 точек: с «Входом» и «Регистрацией» она перестала
   влезать на ноутбуках. Сделано на <details>, поэтому работает и без скриптов.
   В подвале языки остались строкой — там места хватает */
.lang-dd { position: relative; }
.lang-dd summary {
    display: flex; align-items: center; gap: 6px; list-style: none; cursor: pointer;
    padding: 6px 10px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 7px;
    color: rgba(255, 255, 255, .72); font-size: 13px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .04em; user-select: none;
    transition: color .2s, border-color .2s, background .2s;
}
.lang-dd summary::-webkit-details-marker { display: none; }
.lang-dd summary::after {
    content: ''; width: 6px; height: 6px; margin: -3px 0 0 1px;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg); transition: transform .2s;
}
.lang-dd summary:hover { color: #fff; border-color: rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .08); }
.lang-dd[open] summary { color: #fff; background: rgba(255, 255, 255, .1); }
.lang-dd[open] summary::after { margin-top: 3px; transform: rotate(-135deg); }
.lang-dd .langs {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 20;
    flex-direction: column; gap: 2px; min-width: 104px;
    margin: 0; padding: 8px; border: 0; border-radius: var(--radius-sm);
    background: var(--night-mid); box-shadow: 0 16px 34px rgba(7, 11, 20, .45);
}
.lang-dd .langs a { padding: 8px 12px; font-size: 13px; }

.nav-toggle { display: none; }
.nav-button {
    display: none; margin-left: auto; width: 42px; height: 42px; align-items: center; justify-content: center;
    border: 1px solid rgba(255, 255, 255, .28); border-radius: var(--radius-sm);
    background: transparent; cursor: pointer;
}
.nav-button span { display: block; width: 20px; height: 2px; background: #fff; position: relative; }
.nav-button span::before, .nav-button span::after {
    content: ''; position: absolute; left: 0; width: 20px; height: 2px; background: #fff; transition: transform .25s;
}
.nav-button span::before { top: -6px; }
.nav-button span::after { top: 6px; }

/* ------------------------------------------------------------------ первый экран */
/* Светлый: слева текст, справа картинка. Свечения — размытые пятна на фоне,
   нарисованные стилями: ничего не весят и тянутся под любой экран */
.hero {
    position: relative; overflow: hidden;
    padding: 60px 0 52px;
    background: linear-gradient(180deg, var(--bg-tint) 0%, #fff 78%);
}
.hero::before, .hero::after {
    content: ''; position: absolute; border-radius: 50%; pointer-events: none;
}
.hero::before {
    top: -220px; right: -160px; width: 620px; height: 620px;
    background: radial-gradient(circle, rgba(74, 143, 212, .22), rgba(74, 143, 212, 0) 70%);
}
.hero::after {
    bottom: -260px; left: -180px; width: 560px; height: 560px;
    background: radial-gradient(circle, rgba(29, 75, 119, .12), rgba(29, 75, 119, 0) 70%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero .lead { font-size: 19px; margin-bottom: 30px; max-width: 30em; }
.hero-note {
    margin-top: 22px; padding-left: 14px; font-size: 14px; line-height: 1.6;
    color: var(--muted); max-width: 32em; border-left: 2px solid var(--brand-soft);
}
/* Три факта в один ряд с разделителями: строчка цифр — это «визитка» продукта */
.hero-facts {
    display: grid; grid-template-columns: repeat(3, 1fr);
    margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line);
}
.hero-fact { padding-left: 20px; border-left: 1px solid var(--line); }
.hero-fact:first-child { padding-left: 0; border-left: 0; }
.hero-fact b {
    display: block; font-family: var(--font-head); font-size: 27px; font-weight: 800;
    color: var(--ink); line-height: 1.1; letter-spacing: -.02em;
}
.hero-fact span { display: block; margin-top: 4px; font-size: 13.5px; line-height: 1.45; color: var(--muted); }

/* Картинка первого экрана: наезд остался с тёмной версии — он оживляет страницу */
.hero-art {
    position: relative; border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-art);
}
.hero-art img {
    display: block; width: 100%; height: 100%; object-fit: cover;
    aspect-ratio: 3 / 2;
    animation: art-zoom 26s ease-in-out infinite alternate;
}
@keyframes art-zoom { from { transform: scale(1); } to { transform: scale(1.06); } }
/* Тонкая внутренняя кромка — чтобы светлая картинка не сливалась с белым фоном */
.hero-art::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(16, 29, 51, .10);
}

/* Заголовок внутренней страницы: светлый, с тем же свечением, что и первый экран.
   Справа — картинка, если для этой страницы она есть (engine/modules/site_art.php) */
.page-hero {
    position: relative; overflow: hidden;
    padding: 46px 0 40px;
    background: linear-gradient(180deg, var(--bg-tint), #fff);
    border-bottom: 1px solid var(--line);
}
.page-hero::after {
    content: ''; position: absolute; top: -260px; right: -140px; width: 560px; height: 560px;
    border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, rgba(74, 143, 212, .18), rgba(74, 143, 212, 0) 70%);
}
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1 { max-width: 22em; margin-bottom: 0; }
.page-hero .lead { margin-top: 14px; margin-bottom: 0; max-width: 46em; }

.page-hero-art { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.page-hero-art img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

.breadcrumbs { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--brand-dark); }
.breadcrumbs span { margin: 0 8px; opacity: .6; }

/* ------------------------------------------------------------------ сетки и карточки */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
    position: relative; background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
    transition: border-color .25s, box-shadow .25s, transform .25s;
}
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
/* Карточки-ссылки в сетке тянутся на одну высоту, «Подробнее» — к низу */
a.card { color: inherit; display: flex; flex-direction: column; }
a.card > .more { margin-top: auto; padding-top: 14px; }
a.card:hover, .card-hover:hover {
    border-color: rgba(74, 143, 212, .45); box-shadow: var(--shadow-lg);
    transform: translateY(-3px); text-decoration: none;
}
/* «Подробнее» со стрелкой, которая отъезжает при наведении. Стрелка рисуется стилями,
   а не пишется в тексте: это оформление, и в переводах его быть не должно */
.more {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 14px; color: var(--brand-dark); font-weight: 600;
}
.more::after { content: '→'; transition: transform .25s ease; }
a.card:hover .more { text-decoration: none; }
a.card:hover .more::after, .doc-card:hover .more::after { transform: translateX(4px); }

/* Иконка — скруглённый квадрат, как в первой версии витрины;
   заливка цветом при наведении осталась от тёмной версии */
.icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 52px; height: 52px; margin-bottom: 18px;
    background: var(--brand-soft); color: var(--brand-dark); border-radius: 14px;
    transition: background .25s, color .25s, transform .25s;
}
.icon svg { width: 26px; height: 26px; }
a.card:hover .icon, .card-hover:hover .icon { background: var(--brand); color: #fff; transform: scale(1.06); }

/* Карточка «для кого» с картинкой сверху. Картинка не выше 16:10 — иначе она
   съедает карточку, и текст под ней читается как подпись, а не как содержание */
.card-art { padding: 0; overflow: hidden; }
.card-art .card-art-pic { position: relative; overflow: hidden; }
.card-art img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .5s ease; }
.card-art:hover img { transform: scale(1.04); }
/* Снизу картинки — лёгкое затемнение: граница с белым телом карточки не «звенит» */
.card-art .card-art-pic::after {
    content: ''; position: absolute; inset: auto 0 0 0; height: 46px;
    background: linear-gradient(180deg, rgba(16, 29, 51, 0), rgba(16, 29, 51, .12));
}
/* Карточки в ряду разной высоты по тексту, поэтому «Подробнее» прижимается к низу:
   иначе ссылки стоят на разных уровнях и ряд выглядит рассыпанным */
.card-art { display: flex; flex-direction: column; }
.card-art .card-art-body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 22px 24px 24px; }
.card-art h3 { margin-bottom: .3em; }
.card-art .more { margin-top: auto; padding-top: 14px; }

/* Блок «преимущество»: иконка слева, текст справа */
.advantage { display: flex; gap: 20px; margin-bottom: 30px; }
.advantage .icon { flex: 0 0 64px; margin-bottom: 0; }
.advantage h3 { margin-bottom: .3em; }
.advantage p { margin-bottom: 0; color: var(--muted); }

/* Шаги «как начать» */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 74px; }
.step::before {
    counter-increment: step; content: counter(step);
    position: absolute; left: 0; top: -6px;
    width: 54px; height: 54px; border-radius: 50%;
    background: var(--brand); color: #fff; font-size: 22px; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 20px rgba(74, 143, 212, .35);
}

.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding-left: 32px; margin-bottom: .6em; }
.checks li::before {
    content: ''; position: absolute; left: 5px; top: .5em;
    width: 13px; height: 7px; border-left: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand);
    transform: rotate(-45deg);
}

/* Картинка в секции */
.shot { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.shot img { display: block; width: 100%; transition: transform .6s ease; }
.shot:hover img { transform: scale(1.03); }

/* ------------------------------------------------------------------ цены */
.price-card { display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--brand); box-shadow: var(--shadow-lg); }
/* Значок «выгодно» — в правый верхний угол, а не строкой над заголовком: строкой он
   сдвигал заголовок и цену вниз, и средняя карточка стояла не в ряд с двумя другими */
.price-card .eyebrow {
    position: absolute; top: 16px; right: 16px; margin: 0;
    padding: 5px 12px 5px 10px; font-size: 11px;
}
/* Цена: 42 точки были рассчитаны на главную, где карточек три на всю ширину (≈360 точек
   каждая). На странице «Цены» тот же блок стоит внутри текстовой колонки, карточка —
   223 точки, и «216,00 $» с «20 $ / час» ломались на две строки (замечание владельца
   2026-09-21). Теперь 34 точки и запрет переноса: сумма всегда одной строкой */
.price-tag {
    font-size: 34px; font-weight: 600; color: var(--ink); line-height: 1.15;
    margin-bottom: 6px; white-space: nowrap;
}
/* Единица под суммой («за час»): отдельной мелкой строкой. В строку с ценой она
   не влезает — в карточке на «Ценах» ширина 223 точки */
.price-tag small { display: block; font-size: 16px; font-weight: 400; color: var(--muted); }
/* Гривна справа от долларовой цены, в той же строке: «20 $  ≈ 900 ₴» — мельче
   и тише главной цены. Только на украинской версии (prices_block.php) */
.price-alt { margin-left: 12px; font-size: 18px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.price-card .btn { margin-top: auto; }
.price-note { font-size: 15px; color: var(--muted); }
/* Сноска о курсе — под рядом карточек, мелко и неброско */
.price-rate { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

/* ------------------------------------------------------------------ призыв к действию */
/* Призыв к действию — тот же тёмно-синий, что в подвале, только светлее:
   страница заканчивается двумя тёмными блоками подряд, и они должны быть родня.
   Текст слева, кнопки справа — по центру он бы снова «плавал» */
.cta {
    position: relative; overflow: hidden; border-radius: var(--radius-lg);
    display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center;
    background:
        radial-gradient(600px 300px at 80% 0%, rgba(120, 180, 240, .28), rgba(120, 180, 240, 0) 70%),
        linear-gradient(140deg, var(--night-blue) 0%, var(--brand-deep) 55%, var(--brand-dark) 100%);
    color: #fff; padding: 48px 52px;
    box-shadow: var(--shadow-art);
}
.cta h2::before { display: none; }
.cta .btn-row { flex-shrink: 0; }
.cta::after {
    content: ''; position: absolute; right: -80px; bottom: -120px; width: 380px; height: 380px;
    border-radius: 50%; background: rgba(255, 255, 255, .08);
}
.cta > * { position: relative; z-index: 1; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, .9); }
.cta .btn-primary { background: #fff; color: var(--brand-dark); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.cta .btn-primary:hover { background: #eef5fc; color: var(--brand-dark); }
.cta .btn-outline { background: transparent; border-color: rgba(255, 255, 255, .6); color: #fff; }
.cta .btn-outline:hover { border-color: #fff; background: rgba(255, 255, 255, .12); color: #fff; }

/* ------------------------------------------------------------------ подвал */
/* Тёмно-синий, почти чёрный (решение владельца). Градиент в три слоя:
   вертикальный переход от синего к ночному, мягкое синее свечение слева сверху
   и холодный отблеск справа — плоская заливка рядом с ним выглядит мёртвой */
.site-footer {
    position: relative; overflow: hidden;
    margin-top: 96px; padding: 64px 0 26px;
    font-size: 14px; line-height: 1.6;
    color: #8b99ae;
    background:
        radial-gradient(900px 420px at 12% 0%, rgba(74, 143, 212, .20), rgba(74, 143, 212, 0) 68%),
        radial-gradient(700px 380px at 92% 12%, rgba(56, 112, 178, .14), rgba(56, 112, 178, 0) 70%),
        linear-gradient(170deg, var(--night-blue) 0%, var(--night-mid) 42%, var(--night) 100%);
}
/* Светящаяся кромка сверху — подвал начинается линией, а не обрывом */
.site-footer::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, rgba(74, 143, 212, 0), rgba(74, 143, 212, .55), rgba(74, 143, 212, 0));
}
.site-footer .wrap { position: relative; z-index: 1; }
.site-footer h4 {
    color: #fff; font-size: 12px; text-transform: uppercase;
    letter-spacing: .09em; margin-bottom: 14px;
}
.site-footer a { color: #8b99ae; transition: color .2s; }
.site-footer .small { font-size: 14px; }
.site-footer a:hover { color: #fff; text-decoration: none; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5em; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
.footer-logo { position: relative; display: inline-flex; align-items: center; height: 32px; padding-left: 42px; margin-bottom: 14px; }
.footer-logo::before {
    content: ''; position: absolute; left: 0; top: 0; width: 32px; height: 32px;
    background: url(/assets/img/logo-cogs.png) no-repeat center; background-size: contain;
}
.footer-logo span {
    font-family: var(--font-head); color: #fff; font-weight: 800;
    font-size: 16px; letter-spacing: -.02em;
}
/* Telegram под текстом о компании: значок и ник одной строкой.
   Значок нарисован в разметке (SVG), картинки на это не заводим */
.footer-tg { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; }
.footer-tg svg { flex: none; }
.site-footer a.footer-tg:hover svg { color: var(--brand); }

.footer-bottom {
    display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
    margin-top: 44px; padding-top: 20px; font-size: 13px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}
.site-footer .langs a { color: rgba(255, 255, 255, .5); }
.site-footer .langs a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.site-footer .langs a.active { background: var(--brand); color: #fff; }

/* ------------------------------------------------------------------ текстовые страницы */
.prose { max-width: var(--col-text); font-size: 17px; line-height: 1.7; }
/* Заголовок в тексте отделён сверху воздухом и коротким штрихом слева —
   по нему видно, что начался новый раздел, даже при быстрой прокрутке */
.prose h2 { margin-top: 2em; }
/* Короткая черта над заголовком — тот же штрих, что у заголовков разделов.
   Не сбоку: слева она вылезала бы за край колонки на узком экране */
.prose h2::before {
    content: ''; display: block; width: 34px; height: 3px; margin-bottom: 16px;
    border-radius: 2px; background: linear-gradient(90deg, var(--brand), var(--brand-deep));
}
.prose h3 { margin-top: 1.6em; }
.prose p + ul, .prose p + ol { margin-top: -.4em; }
.prose a { font-weight: 500; text-decoration: underline; text-decoration-color: rgba(74, 143, 212, .4); text-underline-offset: 2px; }
.prose a:hover { text-decoration-color: var(--brand); }
.prose a.btn { text-decoration: none; font-weight: 600; }
.prose img { border-radius: var(--radius-sm); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.prose th, .prose td { padding: 12px 16px; border: 1px solid var(--line); text-align: left; }
.prose th { background: var(--bg-soft); font-weight: 500; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--brand); color: var(--muted); }
.page-body { padding-bottom: 20px; }

/* Страница с оглавлением: текст слева, оглавление справа и держится при прокрутке.
   На узком экране оглавление прячем — там проще пролистать саму страницу. */
/* Одна сетка на заголовок страницы и на её текст: иначе H1 начинается в одном месте,
   а первый абзац — в другом (было 632px против 474px, и это сразу видно) */
.page-layout {
    display: grid; grid-template-columns: minmax(0, var(--col-text)) var(--col-side);
    gap: var(--col-gap); align-items: start;
}
.page-hero .page-layout { align-items: center; }
.page-toc { position: sticky; top: calc(var(--header-h) + 20px); }
.page-toc-inner {
    max-width: 300px; padding: 22px 24px;
    background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
}
.page-toc h4 {
    margin: 0 0 12px; font-size: 13px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .06em; color: var(--muted);
}
.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-list li { margin: 0 0 2px; }
.toc-list a {
    display: block; padding: 6px 10px; border-left: 2px solid var(--line);
    color: var(--ink-soft); font-size: 15px; line-height: 1.4;
    transition: border-color .2s, color .2s, background .2s;
}
.toc-list a:hover { border-color: var(--brand); color: var(--brand-dark); background: #fff; text-decoration: none; }
.toc-list { position: relative; }
.toc-list a.is-active { color: var(--brand-dark); background: #fff; font-weight: 500; }
/* Полоска поверх серой линии слева: переезжает к текущему разделу (site.js) */
.toc-marker {
    position: absolute; left: 0; top: 0; width: 2px; height: 0; opacity: 0;
    background: var(--brand); border-radius: 2px; pointer-events: none;
    transition: top .25s ease, height .25s ease, opacity .2s;
}
/* Длинное оглавление не вылезает за экран: прокручивается внутри себя */
.page-toc-inner { max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; overscroll-behavior: contain; }
@media (prefers-reduced-motion: reduce) { .toc-marker { transition: none; } }
.prose h2[id] { scroll-margin-top: calc(var(--header-h) + 20px); }

/* --------------------------------------------- снимки экрана и заготовки под них */
/* Пока снимка нет, на его месте стоит схема нужного экрана: серые полосы, из которых
   он узнаётся. Это честнее пустой рамки и не выглядит недоделкой (engine/modules/shots.php) */
.shot-figure { margin: 2em 0; }
.shot-figure img { display: block; width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.shot-figure figcaption { margin-top: 12px; font-size: 15px; color: var(--muted); }
.shot-figure figcaption b { color: var(--ink-soft); font-weight: 500; }
.shot-soon { white-space: nowrap; }
.shot-soon::before { content: '· '; }

.shot-stub .shot-skel {
    padding: 18px; background: var(--bg-soft);
    border: 1px solid var(--line); border-radius: var(--radius);
}
.shot-skel span, .shot-skel-bar, .shot-skel-field, .shot-skel-btn {
    display: block; border-radius: 4px; background: #dde5ef;
}
.shot-skel-bar { height: 30px; margin-bottom: 14px; background: #cfdae8; }

.shot-skel-list .shot-skel-row {
    display: flex; gap: 14px; padding: 11px 0; border-top: 1px solid #e6ecf4;
}
.shot-skel-list .shot-skel-row span { height: 10px; }
.shot-skel-list .shot-skel-row:first-child { border-top: 0; }

.shot-skel-form .shot-skel-fields {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.shot-skel-form .shot-skel-field { height: 34px; background: #fff; border: 1px solid #dde5ef; }
.shot-skel-form .shot-skel-btn { width: 120px; height: 34px; margin-top: 16px; background: #b9d2ec; }

.shot-skel-doc { background: #fff; }
.shot-skel-doc .shot-skel-lines { display: grid; gap: 11px; }
.shot-skel-doc .shot-skel-lines span { height: 10px; }
.shot-skel-doc .shot-skel-lines span:first-child { height: 16px; background: #cfdae8; }

/* ------------------------------------------------------------------ документация */
.docs-layout { display: grid; grid-template-columns: 280px 1fr; gap: 48px; align-items: start; }
.docs-side { position: sticky; top: calc(var(--header-h) + 20px); }
.docs-menu, .docs-menu ul { list-style: none; margin: 0; padding: 0; }
.docs-menu li { margin: 2px 0; }
.docs-menu a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink-soft); font-size: 16px; transition: background .2s, color .2s; }
.docs-menu a:hover { background: var(--bg-soft); text-decoration: none; color: var(--brand-dark); }
.docs-menu li.active > a { background: var(--brand-soft); color: var(--brand-dark); font-weight: 500; }
.docs-menu ul { margin-left: 12px; padding-left: 10px; border-left: 1px solid var(--line); }
.docs-side-title {
    margin: 0 0 14px; font-size: 13px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .06em; color: var(--muted);
}
.docs-search { margin-bottom: 20px; }
.docs-search input {
    width: 100%; padding: 12px 16px; border: 1px solid var(--line);
    border-radius: var(--radius-sm); font: inherit; transition: border-color .2s, box-shadow .2s;
}
.docs-search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.docs-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 26px; border-top: 1px solid var(--line); }

/* Поиск с кнопкой — на оглавлении и на странице результатов */
.docs-search-wide { display: flex; gap: 10px; max-width: 620px; margin: 0 auto 36px; }
.docs-search-wide input { flex: 1 1 auto; }
.docs-search-wide button {
    flex: 0 0 auto; padding: 12px 26px; border: 0; border-radius: var(--radius-sm);
    background: var(--brand); color: #fff; font: inherit; font-weight: 500; cursor: pointer;
    transition: background .2s;
}
.docs-search-wide button:hover { background: var(--brand-dark); }

/* Карточки разделов в оглавлении документации */
.docs-cards .doc-card { padding-left: 84px; }
.doc-num {
    position: absolute; left: 26px; top: 28px;
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--brand-soft); color: var(--brand-dark);
    display: flex; align-items: center; justify-content: center; font-weight: 600;
    transition: background .25s, color .25s;
}
.doc-card:hover .doc-num { background: var(--brand); color: #fff; }
.doc-card h3 { margin-bottom: .35em; }
.doc-card h3 a { color: var(--ink); }
.doc-card h3 a:hover { color: var(--brand-dark); text-decoration: none; }
.doc-card-links { list-style: none; margin: 14px 0 0; padding: 0; }
.doc-card-links li { margin-bottom: .3em; }
.doc-card-links a { font-size: 15px; }
.doc-card .more { display: inline-block; margin-top: 16px; font-weight: 500; }

/* Найденные разделы */
.docs-results { display: grid; gap: 14px; }
.docs-found {
    display: block; padding: 22px 26px; background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius); color: inherit;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.docs-found:hover { border-color: rgba(74, 143, 212, .5); box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.docs-found h3 { margin-bottom: .3em; font-size: 19px; color: var(--brand-dark); }
.docs-found p { margin: 0; }

/* «Не нашли ответ» в конце раздела */
.docs-help { margin-top: 42px; padding: 26px 30px; background: var(--bg-soft); border-radius: var(--radius); }
.docs-help h3 { margin-bottom: .3em; }
.docs-help p { margin-bottom: 16px; }

/* ------------------------------------------------------------------ новости */
.news-card { display: block; }
.news-card h3 { margin-bottom: .35em; }
.news-date { display: block; color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.news-date.light { color: rgba(255, 255, 255, .7); margin-top: 14px; }
/* Автор новости — после даты через точку, должность мельче и бледнее */
.news-author::before { content: "·"; margin: 0 8px; opacity: .6; }
.news-author-pos { margin-left: 6px; opacity: .75; font-size: 13px; }

/* Постраничный переход: номера страниц частью адреса (/news/page/2/) */
.pager { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 44px; }
.pager a, .pager span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 42px; height: 42px; padding: 0 14px;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    color: var(--ink-soft); font-size: 16px; background: #fff;
    transition: border-color .2s, color .2s, background .2s;
}
.pager a:hover { border-color: var(--brand); color: var(--brand-dark); text-decoration: none; }
.pager .current { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 500; }
.pager .pager-gap { border: 0; background: transparent; color: var(--muted); min-width: 24px; padding: 0; }

/* Пусто: раздела ещё нет или в нём пока ничего не опубликовано */
.empty-state {
    max-width: 680px; padding: 40px 44px;
    background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
}
.empty-state .icon { width: 56px; height: 56px; }
.empty-state .icon svg { width: 28px; height: 28px; }
.empty-state h2 { font-size: 25px; }
.empty-state h2::before { display: none; }

/* ------------------------------------------------------------------ вопросы */
.faq-group { font-size: 23px; margin: 40px 0 8px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
    cursor: pointer; padding: 18px 34px 18px 0; font-weight: 500; color: var(--ink);
    list-style: none; position: relative; transition: color .2s;
}
.faq-item summary:hover { color: var(--brand-dark); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: ''; position: absolute; right: 8px; top: 26px;
    width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
    transform: rotate(45deg); transition: transform .25s;
}
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-answer { padding: 0 0 20px; color: var(--ink-soft); }

/* ------------------------------------------------------------------ отзывы */
.reviews-block { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 26px; margin: 26px 0; }
.review {
    margin: 0; padding: 30px; background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s;
}
.review:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.review blockquote { margin: 0 0 16px; padding: 0; border: 0; color: var(--ink-soft); font-size: 17px; }
.review figcaption { color: var(--muted); font-size: 15px; }
.review-stars { color: #f0a500; letter-spacing: 3px; margin-bottom: 12px; }
.review-photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; float: right; margin-left: 14px; }

/* ------------------------------------------------------------------ формы */
.feedback-form { max-width: 580px; }
.feedback-form .field { margin-bottom: 18px; }
.feedback-form label { display: block; margin-bottom: 7px; font-size: 15px; font-weight: 500; color: var(--ink); }
.feedback-form input, .feedback-form textarea, .feedback-form select {
    width: 100%; padding: 13px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm);
    font: inherit; color: var(--ink); background: #fff; transition: border-color .2s, box-shadow .2s;
}
/* select браузер рисует ниже поля ввода с теми же отступами — выравниваем по нему */
.feedback-form select { min-height: 56px; }
.feedback-form input:focus, .feedback-form textarea:focus, .feedback-form select:focus {
    outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.feedback-form .field-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* «Пишете как …» вместо полей имени и почты — у вошедшего они уже есть в аккаунте */
.feedback-as {
    margin: 0 0 20px; padding: 14px 16px; border-left: 3px solid var(--brand);
    border-radius: var(--radius-sm); background: var(--bg-tint); line-height: 1.5;
}
.feedback-as strong { color: var(--ink); }
/* Только кнопка отправки. Правило «любая button внутри формы» красило синим
   и кнопку капчи, и глазок у пароля, и их приходилось перебивать по весу
   (исправлено 2026-09-22 — капча всё равно вылезала синим прямоугольником) */
.feedback-form button[type="submit"] {
    padding: 15px 34px; border: 0; border-radius: var(--radius-sm); background: var(--brand);
    color: #fff; font: inherit; font-weight: 500; cursor: pointer;
    box-shadow: 0 6px 18px rgba(74, 143, 212, .35); transition: background .2s, transform .15s, box-shadow .2s;
}
.feedback-form button[type="submit"]:hover { background: var(--brand-dark); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(47, 110, 168, .45); }

/* Капча: картинка, кнопка «другой код» и поле ввода в одну строку */
.captcha-field { max-width: 580px; }
.captcha-row { display: flex; align-items: center; gap: 12px; }
.captcha-img {
    display: block; flex: 0 0 auto; width: 190px; height: 60px;
    border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-tint);
}
.captcha-refresh {
    flex: 0 0 auto; width: 40px; height: 40px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: #fff; color: var(--muted); cursor: pointer;
    transition: color .2s, border-color .2s, transform .3s;
}
.captcha-refresh:hover { color: var(--brand-dark); border-color: var(--brand); }
.captcha-refresh:active { transform: rotate(-90deg); }
.captcha-refresh[disabled] { opacity: .5; cursor: default; }
.captcha-input { flex: 1 1 auto; min-width: 0; text-transform: uppercase; letter-spacing: .12em; }
.captcha-note { margin: 10px 0 0; }


/* --------------------------------------------- уведомления и предупреждения */
/* Один вид на все сообщения: цветная полоса слева, мягкий фон, тот же радиус.
   Раньше .notice, .form-error и .form-ok были нарисованы каждый по-своему */
.notice, .form-error, .form-ok {
    margin-bottom: 22px; padding: 14px 18px 14px 16px;
    border-left: 3px solid; border-radius: var(--radius-sm);
    font-size: 16px; line-height: 1.55;
}
.notice { background: #fff8e6; border-color: #d99a06; color: #7d5406; }
.form-error { background: #fdecea; border-color: #d5372a; color: #8a1c13; }
.form-ok { background: #e7f6ec; border-color: #1f9254; color: #1a6b3f; }
.notice-info { background: var(--bg-tint); border-color: var(--brand); color: var(--brand-deep); }

/* ------------------------------------------------------------------ 404 */
.error-page { position: relative; padding: 64px 0 88px; overflow: hidden; }
/* Слева текст и частые разделы, справа шестерни во всю высоту.
   На телефоне всё складывается в одну колонку: текст, шестерни, разделы (см. ниже) */
.error-grid {
    position: relative; z-index: 1; display: grid;
    grid-template-columns: 1.15fr .85fr; gap: 24px 56px; align-items: center;
}
.error-text { grid-column: 1; grid-row: 1; }
.error-links { grid-column: 1; grid-row: 2; }
.error-art { grid-column: 2; grid-row: 1 / span 2; }
.error-text { animation: err-rise .6s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes err-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* Фон: два дышащих пятна и точечная сетка */
.error-decor { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.error-blob { position: absolute; border-radius: 50%; background: var(--brand); filter: blur(2px); }
.error-blob-1 { width: 320px; height: 320px; left: -120px; bottom: -60px; opacity: .09; animation: err-drift 15s ease-in-out infinite; }
.error-blob-2 { width: 220px; height: 220px; right: 4%; top: -80px; opacity: .10; animation: err-drift 12s ease-in-out infinite reverse; }
.error-dots {
    position: absolute; right: 6%; bottom: 8%; width: 180px; height: 180px; opacity: .55;
    background-image: radial-gradient(var(--line) 1.6px, transparent 1.6px); background-size: 18px 18px;
}
@keyframes err-drift {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50%      { transform: translate3d(16px, -20px, 0) scale(1.07); }
}

/* Цифры: градиент и бегущий по ним блик */
.error-code {
    display: block; margin-bottom: 10px;
    font-family: var(--font-head); font-size: 78px; font-weight: 800; line-height: 1;
    letter-spacing: -.05em;
    background: linear-gradient(100deg, var(--brand-deep) 0%, var(--brand) 35%, #a8cdf0 48%, var(--brand) 62%, var(--brand-deep) 100%);
    background-size: 260% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: err-shine 5s ease-in-out infinite;
}
@keyframes err-shine { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }

.error-page .lead { max-width: 30em; }
.error-links { margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--line); }
.error-links h4 {
    margin-bottom: 14px; font-size: 13px; text-transform: uppercase;
    letter-spacing: .06em; color: var(--muted);
}
.error-links ul { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.error-links li { margin: 0; }
/* Частые разделы — плитки: заметнее обычных ссылок и не сливаются в строку */
.error-links a {
    display: inline-block; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px;
    background: #fff; color: var(--brand-dark); text-decoration: none;
    transition: border-color .2s, transform .2s, box-shadow .2s, color .2s;
}
.error-links a:hover {
    border-color: var(--brand); color: var(--brand-deep);
    transform: translateY(-2px); box-shadow: 0 8px 20px rgba(47, 110, 168, .15);
}

/* Пара шестерён в зацеплении: 18 и 12 зубьев, общий модуль, межосевое расстояние —
   сумма делительных радиусов. Поэтому зубья идут во впадины, а не сквозь металл
   (зазор 0,125 модуля — зуб сделан вдвое ниже обычного). Скорости обратно пропорциональны числу зубьев:
   18 с и 12 с, в разные стороны. Контуры нарисованы генератором, см. architecture.md */
.error-art { display: flex; justify-content: flex-end; }
.error-gears { position: relative; width: 100%; max-width: 320px; color: var(--brand); }
.error-gears .gears-svg { display: block; width: 100%; }
/* Узкий экран: колонки складываются — текст во всю ширину и больше не жмётся,
   шестерни уезжают вниз, под кнопки (просьба владельца 2026-09-23: рядом
   с текстом им было тесно) */
@media (max-width: 900px) {
    .error-page { padding: 40px 0 64px; }
    .error-grid { grid-template-columns: 1fr; gap: 24px; }
    .error-text, .error-links, .error-art { grid-column: 1; grid-row: auto; }
    .error-text { order: 1; }
    .error-art { order: 2; justify-content: center; }
    .error-links { order: 3; margin-top: 4px; padding-top: 22px; }
    .error-gears { max-width: 250px; }
}
.gear { transform-box: view-box; transform-origin: var(--cx) var(--cy); }
.error-gears .gear-big { opacity: .5; animation: err-spin 18s linear infinite; }
.error-gears .gear-small { color: var(--brand-deep); opacity: .4; animation: err-spin 12s linear infinite reverse; }
@keyframes err-spin { to { transform: rotate(360deg); } }
/* Кольца расходятся от всей пары, а не от одной шестерни (просьба владельца 2026-09-23):
   круг описан вокруг обеих — центр в середине картинки, поперечник чуть больше её ширины */
.error-ring {
    position: absolute; left: 50%; top: 50%; width: 104%; padding-bottom: 104%;
    margin: -52% 0 0 -52%; border-radius: 50%;
    border: 1.5px solid rgba(74, 143, 212, .3); animation: err-ripple 3.4s ease-out infinite;
}
.error-ring-2 { animation-delay: 1.7s; }
@keyframes err-ripple {
    0%   { transform: scale(.82); opacity: .8; }
    100% { transform: scale(1.25); opacity: 0; }
}
.impersonation-banner { position: relative; z-index: 100; background: #fff4de; color: #7a5b00; padding: 10px 0; font-size: 15px; }

/* Появление блоков при прокрутке (включает assets/site/site.js) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .hero-art img { animation: none; }
    .logo::before, .card-art img, .shot img { transition: none; }
    /* 404: блик по цифрам, шестерёнки, кольца и пятна — всё замирает */
    .error-code, .error-gears .gear, .error-ring, .error-blob, .error-text { animation: none; }
    .error-code { background-position: 0 0; }
    html { scroll-behavior: auto; }
}

/* --------------------------------------------- вход, регистрация, кабинет */
/* Узкая карточка под формы входа и регистрации: поля во всю ширину экрана
   выглядят брошенными, а длинную строку в форме заполнять неудобно */
.auth-card {
    max-width: 520px; padding: 34px 36px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.auth-card .feedback-form { max-width: none; }
/* На всю ширину — только основная кнопка формы. Без уточнения правило ловило и
   кнопку «другой код» у капчи: она растягивалась синим блоком через всю строку */
.auth-card .feedback-form > button[type="submit"] { width: 100%; }
.auth-links { margin: 20px 0 0; color: var(--muted); }
.auth-links span { margin: 0 8px; opacity: .6; }

/* Галочка: «запомнить меня» на входе, подписка на рассылку в кабинете.
   Квадратик не прыгает по вертикали: выровнен по первой строке текста */
.checkbox {
    display: flex; align-items: flex-start; gap: 10px; margin: 0 0 20px;
    font-size: 16px; color: var(--ink-soft); cursor: pointer;
}
.checkbox input {
    flex: 0 0 auto; width: 18px; height: 18px; margin: 4px 0 0; accent-color: var(--brand);
}

/* Переключатель страниц кабинета; выход стоит справа и уходит POST-ом */
.cab-tabs {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    margin-bottom: 32px; border-bottom: 1px solid var(--line);
}
.cab-tabs > a { padding: 12px 16px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 500; }
.cab-tabs > a:hover { color: var(--brand-dark); text-decoration: none; }
.cab-tabs > a.active { color: var(--ink); border-bottom-color: var(--brand); }
.cab-logout { margin: 0 0 0 auto; }
.cab-logout button {
    padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: #fff; color: var(--muted); font: inherit; font-size: 15px; cursor: pointer;
    transition: color .2s, border-color .2s;
}
.cab-logout button:hover { color: #8a1c13; border-color: #d5372a; }

/* Аватар пользователя (Avatar::html): круг с фото или первой буквой. Размер — в разметке */
.site-ava { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 50%; object-fit: cover; vertical-align: middle; }
.site-ava-letter { background: #e6effc; color: var(--brand-dark); font-weight: 700; }
.nav-cabinet { display: inline-flex; align-items: center; gap: 7px; }
/* Фото профиля в кабинете: круг слева, кнопки справа */
.cab-avatar { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.cab-avatar-pic .site-ava { box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--line); }
/* Значки на аватаре, как в zugferd: белые кружки с тенью — убрать (сверху) и изменить (снизу) */
.cab-avatar-wrap { position: relative; display: inline-block; }
.cab-avatar-btn {
    position: absolute; right: 2px; display: grid; place-items: center;
    width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%;
    background: #fff; color: var(--muted); box-shadow: 0 2px 8px rgba(16, 29, 51, .22);
    cursor: pointer; transition: color .15s, transform .15s;
}
.cab-avatar-btn:hover { transform: scale(1.08); }
.cab-avatar-del { top: 2px; }
.cab-avatar-del:hover { color: #c0392b; }
.cab-avatar-edit { bottom: 2px; }
.cab-avatar-edit:hover { color: var(--brand); }
.cab-avatar-btn[hidden] { display: none; }

/* Услуги: карточка на каждый домен, слева цветная полоса по состоянию оплаты */
.cab-services { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; margin-bottom: 44px; }
.cab-empty { margin-bottom: 44px; }
.cab-service {
    padding: 24px 26px; background: #fff;
    border: 1px solid var(--line); border-left: 3px solid var(--muted);
    border-radius: var(--radius); box-shadow: var(--shadow);
}
.cab-status-active { border-left-color: #1f9254; }
.cab-status-grace { border-left-color: #d99a06; }
.cab-status-expired, .cab-status-suspended { border-left-color: #d5372a; }
.cab-status-free { border-left-color: var(--brand); }
.cab-service-head {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 10px; margin-bottom: 16px;
}
.cab-domain { font-family: var(--font-head); font-size: 18px; font-weight: 700; color: var(--ink); }
.cab-badge {
    padding: 4px 11px; border-radius: 20px; background: var(--bg-tint);
    color: var(--brand-deep); font-size: 13px; font-weight: 600;
}
.cab-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 14px; font-size: 15px; }
.cab-facts dt { color: var(--muted); }
.cab-facts dd { margin: 0; color: var(--ink); font-weight: 500; }
.cab-note { margin: 0 0 14px; color: var(--muted); }

/* Статистика оплат: сколько всего, сколько платежей, первый и последний */
.cab-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin-bottom: 26px; }
.cab-stat { padding: 18px 20px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); }
.cab-stat-title { margin-bottom: 6px; color: var(--muted); font-size: 14px; }
.cab-stat-value { font-family: var(--font-head); font-size: 20px; font-weight: 700; color: var(--ink); }
.cab-total + .cab-total { margin-left: 10px; }

/* Таблица оплат. На телефоне она прокручивается вбок, а не ломает страницу */
.cab-table-wrap { overflow-x: auto; margin-bottom: 14px; }
.cab-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.cab-table th, .cab-table td { padding: 12px 14px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
.cab-table th { color: var(--muted); font-size: 14px; font-weight: 600; }
.cab-table tbody tr:hover { background: var(--bg-soft); }
.cab-sum { font-weight: 600; color: var(--ink); }
/* Позиции счёта под номером в «Документах» кабинета */
.cab-items { margin-top: 4px; font-size: 13px; color: var(--muted); line-height: 1.4; }

/* Профиль: данные, рассылка и пароль — три отдельные формы рядом */
/* Профиль: слева короткое (фото, рассылки), справа формы; поля — по два в ряд */
.cab-profile { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 26px; align-items: start; }
.cab-side, .cab-main { display: grid; gap: 26px; min-width: 0; }
.cab-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; }
.cab-panel .field-note { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
/* На узком экране одна колонка, и главное — данные — идёт сразу после фото */
@media (max-width: 900px) {
    .cab-profile { grid-template-columns: 1fr; }
    .cab-side, .cab-main { display: contents; }
    .cab-avatar-panel { order: 1; }
    .cab-data-panel { order: 2; }
    .cab-pass-panel { order: 3; }
    .cab-mail-panel { order: 4; }
}
@media (max-width: 640px) {
    .cab-fields { grid-template-columns: 1fr; }
}
.cab-panel { padding: 28px 30px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.cab-panel h2 { font-size: 22px; }
.cab-panel .feedback-form { max-width: none; }
.cab-panel .feedback-form input[disabled] { background: var(--bg-soft); color: var(--muted); }

/* Вход и кабинет в шапке. Отделены чертой, как переключатель языков: это не
   разделы сайта. Кнопка «Демо» остаётся правее и остаётся единственной синей */
.nav-auth { display: flex; align-items: center; gap: 12px; padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, .16); }
.nav-auth a { color: rgba(255, 255, 255, .78); font-size: 14px; font-weight: 500; white-space: nowrap; }
.nav-auth a:hover { color: #fff; text-decoration: none; }
.nav-auth form { margin: 0; }
.nav-auth button {
    padding: 0; border: 0; background: none; color: rgba(255, 255, 255, .5);
    font: inherit; font-size: 14px; cursor: pointer; transition: color .2s;
}
.nav-auth button:hover { color: #fff; }

/* Вошедший: имя с аватаром, под ним список — кабинет, админка, выход (владелец 2026-09-24) */
.user-dd { position: relative; }
.user-dd summary {
    display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; user-select: none;
    color: rgba(255, 255, 255, .78); font-size: 14px; font-weight: 500; white-space: nowrap; transition: color .2s;
}
.user-dd summary::-webkit-details-marker { display: none; }
.user-dd summary::after {
    content: ''; width: 6px; height: 6px; margin: -3px 0 0 1px;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg); transition: transform .2s;
}
.user-dd summary:hover, .user-dd[open] summary { color: #fff; }
.user-dd[open] summary::after { margin-top: 3px; transform: rotate(-135deg); }
.user-dd-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.user-dd-menu {
    position: absolute; right: 0; top: calc(100% + 12px); z-index: 20;
    display: flex; flex-direction: column; gap: 2px; min-width: 170px;
    padding: 8px; border-radius: var(--radius-sm);
    background: var(--night-mid); box-shadow: 0 16px 34px rgba(7, 11, 20, .45);
}
.user-dd-menu a, .user-dd-menu button {
    display: block; width: 100%; padding: 8px 12px; border-radius: 6px; text-align: left;
    color: rgba(255, 255, 255, .78); font-size: 14px;
}
.user-dd-menu a:hover, .user-dd-menu button:hover { color: #fff; background: rgba(255, 255, 255, .08); }



/* ------------------------------------------- вход: модалка и страницы аккаунта */
/* Сделано по образцу zugferd (решение владельца 2026-09-22): вход — карточка поверх
   размытой страницы. Модалка открывается без скриптов, через :target, поэтому
   работает и при выключенном JS; скрипт добавляет только закрытие по Esc */
.auth-modal { position: fixed; inset: 0; z-index: 300; display: none; }
.auth-modal:target { display: grid; place-items: center; padding: 20px; }
.auth-modal-back {
    position: absolute; inset: 0; background: rgba(7, 11, 20, .5);
    animation: auth-fade .2s ease-out;
}
/* Размытие — сама суть «блюрной страницы»: под карточкой видно сайт, но читать его
   нельзя, взгляд остаётся на форме. Где backdrop-filter не поддержан (старый Safari),
   остаётся просто затемнение — так же сделано в zugferd */
@supports ((backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px))) {
    .auth-modal-back {
        background: rgba(7, 11, 20, .45);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        backdrop-filter: saturate(180%) blur(20px);
    }
}
.auth-modal-card {
    position: relative; width: 100%; max-width: 440px;
    max-height: calc(100vh - 40px); overflow-y: auto;
    padding: 32px 34px; background: #fff; border-radius: var(--radius);
    box-shadow: 0 30px 80px rgba(7, 11, 20, .45);
    animation: auth-rise .22s ease-out;
}
.auth-modal-card h2 { font-size: 26px; margin-bottom: 6px; }
.auth-modal-close {
    position: absolute; top: 10px; right: 14px;
    width: 34px; height: 34px; display: grid; place-items: center;
    border-radius: 50%; color: var(--muted); font-size: 26px; line-height: 1;
}
.auth-modal-close:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
@keyframes auth-fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes auth-rise { from { opacity: 0; transform: translateY(12px) scale(.98) } to { opacity: 1; transform: none } }

/* Страницы входа, регистрации и пароля: та же карточка, только страницей.
   Фон — картинка витрины, размытая и притемнённая: страница за карточкой узнаваема,
   но не отвлекает */
.auth-stage { position: relative; overflow: hidden; padding: 56px 20px 72px; display: grid; place-items: start center; }
.auth-stage-bg {
    position: absolute; inset: -30px;
    background: linear-gradient(180deg, rgba(16, 29, 51, .55), rgba(7, 11, 20, .75)),
        url(/assets/img/art/hero.webp) no-repeat center / cover;
    filter: blur(18px); transform: scale(1.06);
}
.auth-stage > .auth-card, .auth-stage > .auth-split { position: relative; z-index: 1; }
/* Размытый фон — на всю высоту от шапки до подвала, без белых полос сверху и снизу */
#main:has(> .auth-stage) { display: flex; flex-direction: column; }
#main > .auth-stage { flex: 1 0 auto; }
#main:has(> .auth-stage) ~ .site-footer { margin-top: 0; }
.auth-card-lifted { box-shadow: 0 30px 80px rgba(7, 11, 20, .45); }
.auth-stage h1 { font-size: clamp(26px, 3vw, 32px); margin-bottom: 8px; }
.auth-sub { color: var(--muted); margin-bottom: 22px; }

/* Регистрация: слева форма, справа короткий рассказ — как в zugferd */
.auth-split {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
    width: 100%; max-width: 1000px;
    background: #fff; border-radius: var(--radius); overflow: hidden;
}
.auth-split-form { padding: 34px 38px; }
.auth-split-promo {
    padding: 34px 38px; color: rgba(255, 255, 255, .82);
    background: linear-gradient(160deg, var(--night-blue), var(--night-mid) 60%, var(--night));
}
.auth-split-promo h2 { color: #fff; font-size: 22px; }
.auth-promo-list { list-style: none; margin: 0; padding: 0; }
.auth-promo-list li { display: flex; gap: 14px; margin-bottom: 22px; }
.auth-promo-list svg { flex: 0 0 auto; width: 22px; height: 22px; color: var(--brand); margin-top: 3px; }
.auth-promo-list strong { display: block; color: #fff; font-weight: 600; margin-bottom: 3px; }
.auth-promo-list span { font-size: 15px; line-height: 1.5; }

/* «или» между паролем и кнопкой Google */
.auth-or { display: flex; align-items: center; gap: 14px; margin: 22px 0 16px; color: var(--muted); font-size: 14px; }
.auth-or::before, .auth-or::after { content: ''; flex: 1 1 auto; height: 1px; background: var(--line); }

/* Кнопка «Войти через Google»: белая с рамкой — так её рисует сам Google
   в своих рекомендациях, и она не спорит с синей основной кнопкой */
.btn-google {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 13px 18px;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: #fff; color: var(--ink); font-weight: 500;
    transition: border-color .2s, box-shadow .2s, transform .15s;
}
.btn-google:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-1px); text-decoration: none; }

/* «Забыли пароль?» — прямо в подписи к полю, как в zugferd */
.feedback-form label .field-link { float: right; font-weight: 400; font-size: 14px; }

/* Пароль с глазком */
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 46px; }
.feedback-form .pass-eye, .pass-eye {
    position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
    width: 32px; height: 32px; padding: 0; display: grid; place-items: center;
    border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer;
    box-shadow: none;
}
.feedback-form .pass-eye:hover, .pass-eye:hover {
    color: var(--brand-dark); background: var(--bg-soft); transform: translateY(-50%); box-shadow: none;
}

/* ------------------------------------------------------------------ планшет и телефон */
@media (max-width: 1100px) {
    /* Оглавление страницы — помощник, а не содержание: на узком экране убираем */
    .page-layout { display: block; max-width: 800px; }
    .page-toc { display: none; }
}

@media (max-width: 980px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .docs-layout { grid-template-columns: 1fr; }
    .docs-side { position: static; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .docs-search-wide { margin-bottom: 28px; }
}

/* Меню убирается под кнопку раньше телефона: горизонтальной шапке нужно место, и без
   него она разъезжается — языки обрезаются, а кнопка «Демо» выезжает за тёмный фон
   шапки на белое поле. Замечание владельца: «от 761 до 1080» — этот диапазон и был сломан.

   Порог пересчитан 2026-09-21, когда в шапку добавились «Вход» и «Регистрация». Они
   просят ещё 120 точек; взамен языки переехали в выпадающий список (освободил 140),
   промежутки поджаты с 26 до 20 точек, а шрифт ссылок меню уменьшен с 16 до 15
   (в раскрытом меню телефона он остаётся 16 — там места хватает). Мерено в браузере
   во всех четырёх языках, для гостя и для вошедшего: самый широкий вариант — гость
   на русском, ему нужно 1075. Отсюда 1100 с запасом — почти как было до кабинета. */
@media (max-width: 1100px) {
    .nav-button { display: flex; }
    .nav {
        position: absolute; left: 0; right: 0; top: var(--header-h);
        display: none; flex-direction: column; align-items: stretch; gap: 0;
        margin: 0; padding: 14px 20px 22px;
        background: var(--night-mid); box-shadow: 0 16px 30px rgba(7, 11, 20, .4);
    }
    .nav > a:not(.btn) { padding: 13px 0; font-size: 16px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
    .nav-auth a, .nav-auth button { font-size: 16px; }
    .nav .btn { margin-top: 14px; align-self: flex-start; }
    .nav-toggle:checked ~ .nav { display: flex; }
    .langs { margin-top: 14px; padding-left: 0; border-left: 0; }
    /* В раскрытом меню языки не всплывают поверх пунктов, а раскрываются строкой
       под кнопкой: выпадающий список внутри выпадающего меню читается плохо */
    .lang-dd { margin-top: 14px; align-self: flex-start; }
    .lang-dd summary { display: inline-flex; }
    .lang-dd .langs {
        position: static; flex-direction: row; min-width: 0;
        margin-top: 10px; padding: 0; background: none; box-shadow: none;
    }
    /* Вход, регистрация и кабинет в раскрытом меню — в столбик, без черты слева */
    .nav-auth { margin-top: 14px; padding-left: 0; border-left: 0; flex-wrap: wrap; gap: 18px; }
    /* Список под именем в раскрытом меню — строкой под ним, не всплывает */
    .user-dd-menu { position: static; min-width: 0; margin-top: 10px; padding: 0; background: none; box-shadow: none; }
    .user-dd-menu a, .user-dd-menu button { padding: 8px 0; font-size: 16px; }
    .user-dd-menu a:hover, .user-dd-menu button:hover { background: none; }
}

@media (max-width: 760px) {
    body { font-size: 16px; }
    .section { padding-block: 52px; }
    .hero { padding: 40px 0 48px; }
    .hero-grid { grid-template-columns: 1fr; gap: 32px; }
    .hero-facts { grid-template-columns: 1fr; gap: 18px; }
    .hero-fact { padding-left: 0; border-left: 0; }
    .cta { grid-template-columns: 1fr; gap: 26px; padding: 32px 26px; }
    .empty-state { padding: 28px 24px; }
    .logo span { font-size: 18px; }

    .auth-card { padding: 26px 22px; }
    .auth-stage { padding: 28px 14px 40px; }
    .auth-split { grid-template-columns: 1fr; }
    .auth-split-promo { display: none; }
    .auth-split-form { padding: 26px 22px; }
    .auth-modal-card { padding: 26px 22px; }
    .cab-panel { padding: 22px 20px; }
    .cab-tabs > a { padding: 11px 12px; }
    .cab-logout { margin: 0; }

    .docs-search-wide { flex-wrap: wrap; }
    .docs-search-wide button { width: 100%; }
    .docs-cards .doc-card { padding-left: 26px; }
    .doc-num { position: static; margin-bottom: 14px; }

    /* Таблицы в тексте (реквизиты, сроки хранения, cookie) раздвигали страницу:
       при 390 px она уезжала в сторону на 14–56 px. Теперь по горизонтали
       прокручивается сама таблица, а поля в ячейках мельче. */
    .prose table { display: block; overflow-x: auto; }
    .prose th, .prose td { padding: 10px 12px; }
    .prose td { overflow-wrap: anywhere; }
}

@media (max-width: 460px) {
    .grid-4 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .btn, .btn-row .btn { width: 100%; }
    .step { padding-left: 0; padding-top: 66px; }
    .step::before { top: 0; }
}

/* ------------------------------------------------------------------
   Оплата счёта /pay/{token}/ (engine/modules/pay.php)
   ------------------------------------------------------------------ */
/* Страница оплаты берёт раскладку регистрации (.auth-split): слева дело, справа тёмная
   панель с объяснением. Раньше тут была узкая карточка у левого края и пустота справа
   (заметил владелец 2026-09-23). Отличия от регистрации: рамка и тень поспокойнее —
   страница светлая, а не на тёмной подложке; и колонки поуже, счёт короче формы. */
/* Во всю ширину полосы контента (у регистрации потолок 1000 точек — здесь он снят
   по просьбе владельца 2026-09-23) */
.pay-split {
    max-width: none; margin: 0 auto; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
    border: 1px solid var(--line); box-shadow: var(--shadow);
}
/* Счёт оплачен или отменён — панели нет, и растягивать карточку не на что */
.pay-split:not(:has(.pay-how)) { max-width: 560px; grid-template-columns: minmax(0, 1fr); }
.pay-split .auth-split-form { padding: 30px 32px; }
.pay-split .pay-table { margin-bottom: 24px; }
.pay-back { margin: 18px 0 0; }
.pay-how { padding: 30px 32px; }
.pay-how h2 { margin: 0 0 22px; }
.pay-how-note {
    margin: 26px 0 0; padding: 14px 16px; border-radius: 10px;
    background: rgba(255, 255, 255, .07); font-size: 14px; line-height: 1.55;
}
@media (max-width: 900px) {
    .pay-split, .pay-split:not(:has(.pay-how)) { max-width: 560px; grid-template-columns: minmax(0, 1fr); }
    .pay-split .auth-split-form, .pay-how { padding: 24px 20px; }
    /* На регистрации правая панель на телефоне скрывается — там это реклама. Здесь
       наоборот: человек платит с телефона, и объяснение ему нужнее всего. Оставляем. */
    .pay-how { display: block; }
}
.pay-table { width: 100%; border-collapse: collapse; margin: 0 0 22px; font-size: 16px; }
.pay-table th, .pay-table td { padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.pay-table th { width: 46%; padding-right: 16px; color: var(--muted); font-weight: 500; text-align: left; }
.pay-table tr:last-child th, .pay-table tr:last-child td { border-bottom: 0; }
.pay-sum { font-size: 22px; color: var(--ink); }
/* Позиции счёта (invoice_items): строка на позицию, количество и цена — серым */
.pay-item { line-height: 1.45; }
.pay-item + .pay-item { margin-top: 6px; }
.pay-form { margin: 0 0 14px; }
.pay-form .btn { width: 100%; }
@media (max-width: 560px) {
    .pay-box { padding: 20px 18px; }
    .pay-table th { width: auto; }
}
.nav-ava { display: inline-flex; }

/* Снимок с телефона ({shot:…|…|phone}): узкий, по центру, в рамке телефона */
.shot-figure.shot-phone { max-width: 320px; margin-left: auto; margin-right: auto; text-align: center; }
.shot-figure.shot-phone img { border: 10px solid #111827; border-radius: 34px; box-shadow: var(--shadow-lg); }
.shot-figure.shot-phone figcaption { text-align: center; }

/* Бланк для скачивания ({blank:…}, engine/modules/blanks.php): превью листа слева, кнопка справа */
.blank-card {
    display: flex; gap: 24px; align-items: center; margin: 2em 0; padding: 20px;
    background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
}
.blank-preview { flex: 0 0 170px; display: block; }
.blank-preview img {
    display: block; width: 100%; height: auto; background: #fff;
    border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow);
    transition: box-shadow .2s;
}
.blank-preview:hover img { box-shadow: var(--shadow-lg); }
.blank-card figcaption { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.blank-title { font-size: 18px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.blank-meta { font-size: 14px; color: var(--muted); }
.blank-other { font-size: 14px; color: var(--muted); }
@media (max-width: 560px) {
    .blank-card { flex-direction: column; align-items: stretch; text-align: left; }
    .blank-preview { flex-basis: auto; max-width: 220px; }
}

/* Главная: светлая и тёмная тема программы — один экран в двух темах, внахлёст */
.dark-band { background: linear-gradient(180deg, #fff 0%, var(--bg-tint) 100%); }
.dark-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; }
.dark-shots { position: relative; padding: 0 0 18% 0; }
.dark-shots img { display: block; width: 82%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.dark-shot-dark { position: absolute; right: 0; bottom: 0; box-shadow: var(--shadow-art) !important; }
@media (max-width: 900px) {
    .dark-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* Согласие на аналитику (assets/site/consent.js): плашка внизу, пока посетитель не выбрал.
   Показывается, только если в настройках задан GA4 */
.consent { position: fixed; left: 24px; bottom: 24px; z-index: 1000; max-width: 460px;
           padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
           box-shadow: var(--shadow-lg); font-size: 15px; line-height: 1.5; }
.consent[hidden] { display: none; }
.consent p { margin: 0 0 14px; }
.consent a { text-decoration: underline; }
.consent-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 600px) {
    .consent { left: 12px; right: 12px; bottom: 12px; max-width: none; }
    .consent-actions .btn { flex: 1; }
}

/* Подписка на новости (engine/modules/subscribe_form.php): под статьёй и в ленте */
.subscribe { margin: 48px 0 8px; padding: 28px 28px 22px; background: var(--bg-tint); border: 1px solid var(--line);
             border-radius: var(--radius); max-width: var(--col-text); }
.subscribe h3 { margin: 0 0 6px; }
.subscribe > p { margin: 0 0 14px; color: var(--ink-soft); }
.subscribe .form-ok, .subscribe .form-error { margin-bottom: 14px; }
.subscribe-form { display: flex; gap: 10px; flex-wrap: wrap; }
.subscribe-form input[type="email"] { flex: 1 1 240px; min-width: 0; padding: 13px 16px; border: 1px solid var(--line);
    border-radius: var(--radius-sm); font: inherit; background: #fff; }
.subscribe-form input[type="email"]:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.subscribe-form .field-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.subscribe .subscribe-note { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
@media (max-width: 600px) { .subscribe { padding: 22px 18px 18px; } .subscribe-form .btn { flex: 1 1 100%; } }
/* Подпись только для экранного диктора: поле понятно глазами по placeholder */
.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; }
/* Значок «войти как» в полосе «Вы смотрите сайт как …» (functions.php, icon_impersonate) */
.sc-icon-imp { display: inline-block; vertical-align: -0.125em; flex-shrink: 0; }

/* Пояснение значком (site_hint_icon, метка {hint:ключ}): «i», текст — при наведении, фокусе
   или касании на телефоне (класс is-open ставит site.js). Подсказка открывается вправо от
   значка; упрётся в правый край экрана — site.js ставит is-left и она открывается влево. */
.sc-hint { position: relative; display: inline-flex; align-items: center; margin-left: 6px; color: var(--muted); cursor: help; vertical-align: middle; line-height: 1; font-weight: 400; }
.sc-hint svg { display: block; }
.sc-hint:hover, .sc-hint:focus-visible, .sc-hint.is-open { color: var(--brand-dark); outline: none; }
.sc-hint::after {
    content: attr(data-sc-tip); position: absolute; bottom: calc(100% + 8px); left: -8px; z-index: 60;
    width: max-content; max-width: min(300px, calc(100vw - 32px));
    padding: 8px 11px; border-radius: var(--radius-sm); background: var(--ink); color: #fff;
    font-size: 14px; line-height: 1.45; font-weight: 400; letter-spacing: 0; text-align: left; white-space: normal; text-transform: none;
    box-shadow: var(--shadow); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .12s;
}
.sc-hint.is-left::after { left: auto; right: -8px; }
.sc-hint:hover::after, .sc-hint:focus-visible::after, .sc-hint.is-open::after { opacity: 1; visibility: visible; }

/* Форма обратной связи без перезагрузки (site.js): неверное поле и подпись под ним */
.feedback-form .is-invalid { border-color: #d5372a !important; box-shadow: 0 0 0 3px rgba(213, 55, 42, .12) !important; }
.feedback-form .field-error { margin-top: 6px; font-size: 14px; color: #b3261e; }

/* Окно-сообщение в духе SweetAlert (site.js → scAlert) */
.sc-alert {
    position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 20px;
    background: rgba(7, 11, 20, .55); animation: auth-fade .2s ease-out;
}
.sc-alert-card {
    width: 100%; max-width: 420px; padding: 34px 30px 28px; text-align: center;
    background: #fff; border-radius: var(--radius); box-shadow: 0 30px 80px rgba(7, 11, 20, .45);
    animation: auth-rise .22s ease-out;
}
.sc-alert-icon {
    width: 72px; height: 72px; margin: 0 auto 18px; display: grid; place-items: center;
    border-radius: 50%; color: #1f9d55; background: #e6f6ec; box-shadow: 0 0 0 8px #f2fbf5;
}
.sc-alert-card h3 { margin: 0 0 8px; font-size: 24px; color: var(--ink); }
.sc-alert-card p { margin: 0 0 24px; color: var(--muted); }
.sc-alert-card button {
    min-width: 140px; padding: 12px 28px; border: 0; border-radius: 10px; cursor: pointer;
    font: inherit; font-weight: 600; color: #fff; background: var(--brand);
}
.sc-alert-card button:hover { background: var(--brand-dark); }
