/* =====================================================================================
   ByDex — публичный сайт (Landing): главная, /news, /news/{id}, /faq, /pages/{slug}, страницы ошибок.

   Цвета, типографика, радиусы, отступы, тени и движение берутся ТОЛЬКО из tokens.css — это копия токенов
   React-приложения (источник: react_new/react-app/src/styles/tokens.css, обновление: npm run tokens:sync).
   Здесь нет ни одного «своего» цвета: любые значения цвета — переменные var(--…) из tokens.css.
   Компоненты повторяют компоненты приложения (кнопка, поле, чип, бейдж, аккордеон, пагинация, панель),
   но собраны под маркетинговый сайт. Документация: docs/LANDING_REDESIGN_REPORT.md.

   Содержание: 1 производные сайта · 2 база · 3 шапка · 4 кнопки и поля · 5 чипы и бейджи · 6 секции
   7 первый экран · 8 карточки · 9 FAQ · 10 шапка страницы и крошки · 11 текст из редактора
   12 состояния и пагинация · 13 контакты, документы, призыв · 14 подвал · 15 ошибки · 16 движение · 17 печать
   ===================================================================================== */

/* ============================== 1. Производные сайта ============================== */
/* Только раскладка сайта; каждая величина выражена через токены приложения или не имеет аналога в приложении. */
:root {
    --site-wrap: 1200px;                 /* максимальная ширина содержимого — как у приложения на десктопе */
    --site-wrap-text: 760px;             /* колонка текста — как узкая страница приложения */
    --site-page-x: var(--s-4);
    --site-header-h: 64px;
    --site-section-y: clamp(var(--s-12), 8vw, 96px);
    --site-fs-hero: clamp(var(--fs-h1), 4.6vw + 12px, 54px);
    --site-fs-title: clamp(var(--fs-h2), 2vw + 16px, 34px);
    --site-fs-lead: clamp(var(--fs-body), .5vw + 14px, 18px);
}
@media (min-width: 480px) { :root { --site-page-x: var(--s-5); } }
@media (min-width: 1024px) { :root { --site-page-x: var(--s-8); } }

/* ============================== 2. База ============================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--site-header-h) + var(--s-4)); }
body {
    min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
    background: var(--bg); color: var(--text);
    font-family: var(--font); font-size: var(--fs-body); line-height: var(--lh-body); font-weight: var(--fw-regular);
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
    -webkit-tap-highlight-color: transparent; overflow-x: hidden; overflow-wrap: break-word;
}
main { flex: 1 0 auto; display: block; }
img, svg { max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { font-weight: var(--fw-semibold); color: var(--text); text-wrap: balance; }
p { text-wrap: pretty; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--accent-text); text-decoration: none; text-underline-offset: 3px; border-radius: var(--r-xs); transition: color var(--dur-fast) var(--ease); }
@media (hover: hover) { a:hover { text-decoration: underline; } }
button { -webkit-appearance: none; appearance: none; touch-action: manipulation; font: inherit; color: inherit; }
::selection { background: var(--accent-soft); color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.wrap { width: min(100% - 2 * var(--site-page-x), var(--site-wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--s-4); top: -100px; z-index: 100; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--accent); color: var(--accent-ink); font-weight: var(--fw-semibold); }
.skip:focus { top: var(--s-3); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* значки: одна система штриха, как в приложении (Lucide) */
svg.i { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.sm { width: 16px; height: 16px; stroke-width: 2; }
svg.i.lg { width: 24px; height: 24px; stroke-width: 1.6; }

/* ============================== 3. Шапка ============================== */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--glass); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--border); }
.site-header > .wrap { display: flex; align-items: center; gap: var(--s-4); min-height: var(--site-header-h); }
.brand { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--touch); color: var(--text); font-weight: var(--fw-bold); font-size: var(--fs-h3); letter-spacing: var(--ls-h3); flex: none; }
.brand:hover { text-decoration: none; }
/* логотип — как в React-приложении (src/styles/base.css, overlays-motion.css): шестерёнка вокруг «D» прокручивается при наведении */
.logo-svg { display: block; flex: none; overflow: visible; max-width: 100%; height: auto; }
.logo-svg .gear { transform-origin: 80.3px 23.85px; }
@keyframes logoGear { from { transform: scaleY(.767) rotate(0deg) scaleY(1.3038); } to { transform: scaleY(.767) rotate(360deg) scaleY(1.3038); } }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .logo-hover:hover .gear, .logo-hover:focus-visible .gear { animation: logoGear 1.4s var(--ease-out); } }

.site-nav { display: flex; align-items: center; gap: var(--s-4); flex: 1 1 auto; min-width: 0; }
.site-nav ul { display: flex; align-items: center; gap: var(--s-1); margin-right: auto; }
.site-nav ul a { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: var(--touch); min-height: var(--touch); padding: 0 var(--s-3); border-radius: var(--r-sm); color: var(--text-2); font-size: var(--fs-body-sm); font-weight: var(--fw-medium); transition: color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease); }
.site-nav ul a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.site-nav ul a[aria-current="page"] { color: var(--text); }
.site-nav ul a[aria-current="page"]::after { content: ""; position: absolute; left: var(--s-3); right: var(--s-3); bottom: 6px; height: 2px; border-radius: 2px; background: var(--accent); }

/* переключатель языка — сегментированный переключатель приложения (.seg) */
.langs { display: inline-flex; align-items: center; gap: 3px; padding: 3px; border-radius: var(--r-md); background: var(--surface-2); flex: none; }
.langs > * { position: relative; display: inline-grid; place-items: center; min-width: 40px; height: 34px; padding: 0 var(--s-2); border-radius: 9px; font-size: var(--fs-caption); font-weight: var(--fw-semibold); letter-spacing: .04em; color: var(--text-2); }
.langs > *::before { content: ""; position: absolute; inset: -5px -2px; }
.langs a:hover { color: var(--text); text-decoration: none; }
.langs [aria-current] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }

.header-tools { display: flex; align-items: center; gap: var(--s-2); flex: none; margin-left: auto; }
.site-nav + .header-tools { margin-left: 0; }

.icon-btn { position: relative; width: 40px; height: 40px; display: inline-grid; place-items: center; flex: none; border-radius: var(--r-full); border: 1px solid transparent; background: var(--surface-2); color: var(--text); cursor: pointer; transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-micro) var(--ease), box-shadow var(--dur-fast) var(--ease); }
.icon-btn::before { content: ""; position: absolute; inset: -2px; border-radius: inherit; } /* область нажатия 44px */
.icon-btn:hover { background: var(--surface-3); }
.icon-btn:active { transform: scale(.94); }
.icon-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.icon-btn svg { transition: transform var(--dur-normal) var(--ease); }

/* значок темы: показывается тот, на который можно переключиться */

.menu-toggle { display: none; }
.menu-toggle .i-close, .menu-toggle[aria-expanded="true"] .i-open { display: none; }
.menu-toggle[aria-expanded="true"] .i-close { display: block; }

/* ============================== 4. Кнопки и поля ============================== */
.btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
    min-height: var(--h-control); padding: 0 var(--s-5); border-radius: var(--r-md); border: 1px solid transparent;
    font: inherit; font-weight: var(--fw-semibold); font-size: var(--fs-body); letter-spacing: -0.005em; line-height: 1.15;
    cursor: pointer; text-align: center; text-decoration: none; -webkit-user-select: none; user-select: none;
    transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), transform var(--dur-micro) var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: inset 0 1px 0 var(--hairline), 0 8px 24px -12px var(--accent-glow); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { background: var(--accent-press); }
.btn-primary:focus-visible { box-shadow: inset 0 1px 0 var(--hairline), var(--focus-ring); }
.btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-3); border-color: var(--border-strong); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { min-height: var(--h-control-sm); padding: 0 14px; font-size: var(--fs-body-sm); border-radius: 10px; gap: 6px; }
.btn-sm::before { content: ""; position: absolute; inset: -2px 0; }
.btn-lg { min-height: var(--h-control-lg); padding: 0 var(--s-6); font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn svg.i { width: 18px; height: 18px; stroke-width: 2; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* поле ввода приложения (.input) */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: 13px; color: var(--text-2); font-weight: var(--fw-medium); }
.input { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; min-width: 0; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-md); color: var(--text); transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease); }
.input:focus-within { border-color: var(--accent); box-shadow: var(--focus-ring); }
.input > svg.i { color: var(--text-3); }
.input input { flex: 1 1 auto; min-width: 0; height: 50px; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; -webkit-appearance: none; appearance: none; }
.input input::placeholder { color: var(--text-3); opacity: 1; }
.input input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-3); align-items: end;}
.search-form .btn { min-height: 52px; }

/* ============================== 5. Чипы и бейджи ============================== */
/* чип-фильтр приложения (.chip): ссылка; выбранный — aria-current */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chips li { display: flex; }
a.chip { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: var(--r-full); background: var(--surface-2); border: 1px solid transparent; font-size: 13px; font-weight: var(--fw-medium); color: var(--text-2); white-space: nowrap; flex: none; transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-micro) var(--ease); }
a.chip::before { content: ""; position: absolute; inset: -5px 0; }
a.chip:hover { color: var(--text); border-color: var(--border-strong); text-decoration: none; }
a.chip:active { transform: scale(.97); }
a.chip:focus-visible { outline: none; box-shadow: var(--focus-ring); }
a.chip[aria-current] { background: var(--text); color: var(--bg); }
a.chip .n { font-variant-numeric: tabular-nums; opacity: .7; font-weight: var(--fw-regular); }
/* метка категории — бейдж приложения (.badge) без точки состояния */
span.chip, .badge { display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 2px 8px; border-radius: var(--r-full); font-size: var(--fs-caption); font-weight: var(--fw-medium); line-height: 1.2; color: var(--accent-text); background: var(--accent-soft); max-width: 100%; overflow-wrap: anywhere; }
.badge.neutral { color: var(--text-2); background: var(--neutral-soft); }

.filter-bar { display: grid; gap: var(--s-4); margin-bottom: var(--s-8); }
.filter-bar .chips-label { font-size: var(--fs-label); letter-spacing: var(--ls-label); text-transform: uppercase; font-weight: var(--fw-semibold); color: var(--text-2); margin-bottom: var(--s-2); }
.filter-note { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); color: var(--text-2); font-size: var(--fs-body-sm); }
.filter-note a { display: inline-flex; align-items: center; min-height: var(--touch); font-weight: var(--fw-medium); }

/* ============================== 6. Секции ============================== */
.section { padding-block: var(--site-section-y); }
.section--flush { padding-top: 0; }
.section--alt { background: var(--bg-elev); border-block: 1px solid var(--border); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4) var(--s-6); flex-wrap: wrap; margin-bottom: var(--s-8); }
.section-head h2 { font-size: var(--site-fs-title); line-height: var(--lh-h1); letter-spacing: var(--ls-h1); }
.section-head p { margin-top: var(--s-2); color: var(--text-2); font-size: var(--site-fs-lead); max-width: 60ch; }
.eyebrow { display: inline-flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-3); font-size: var(--fs-label); line-height: 1.3; letter-spacing: var(--ls-label); text-transform: uppercase; font-weight: var(--fw-semibold); color: var(--accent-text); }
.link-more { display: inline-flex; align-items: center; min-height: var(--touch); font-weight: var(--fw-medium); font-size: var(--fs-body-sm); white-space: nowrap; }
.grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }

/* ============================== 7. Первый экран ============================== */
.hero { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(var(--s-10), 7vw, 88px) clamp(var(--s-12), 8vw, 104px); border-bottom: 1px solid var(--border); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--hero-glow), radial-gradient(60% 80% at 0% 100%, var(--accent-soft), transparent 70%); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 56px 56px; opacity: .45; -webkit-mask-image: radial-gradient(70% 70% at 70% 30%, #000, transparent 75%); mask-image: radial-gradient(70% 70% at 70% 30%, #000, transparent 75%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(var(--s-8), 5vw, 72px); align-items: center; }
.hero h1 { font-size: var(--site-fs-hero); line-height: var(--lh-display); letter-spacing: var(--ls-display); }
.hero h1 span { color: var(--accent-text); }
.hero-lead { margin-top: var(--s-5); max-width: 54ch; color: var(--text-2); font-size: var(--site-fs-lead); line-height: 1.55; }
.hero .actions { margin-top: var(--s-8); }
.hero-points { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin-top: var(--s-8); color: var(--text-2); font-size: var(--fs-body-sm); }
.hero-points li { display: inline-flex; align-items: center; gap: var(--s-2); }
.hero-points svg { width: 16px; height: 16px; flex: none; color: var(--success); }

/* декоративная схема: карта и путь средств. Только подписи возможностей — без цифр и обещаний. */
.flow { position: relative; display: grid; gap: var(--s-3); padding: var(--s-5); border-radius: var(--r-2xl); background: var(--hero-grad); border: 1px solid var(--border); box-shadow: inset 0 1px 0 var(--hairline), var(--shadow-lg); }
.flow-card { position: relative; overflow: hidden; display: grid; align-content: space-between; gap: var(--s-8); min-height: 168px; padding: var(--s-5); border-radius: var(--r-lg); background: var(--brand-grad); color: var(--accent-ink); box-shadow: var(--shadow-md); }
.flow-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, var(--hairline) 50%, transparent 70%); transform: translateX(-100%); animation: sheen 6s var(--ease) 1.2s infinite; }
.flow-card-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); font-weight: var(--fw-bold); letter-spacing: var(--ls-h3); }
.flow-card-top svg.i { width: 26px; height: 26px; }
.flow-card-dots { display: flex; gap: var(--s-3); font-size: 20px; letter-spacing: .18em; line-height: 1; opacity: .8; }
.flow-card-label { font-size: var(--fs-caption); font-weight: var(--fw-semibold); letter-spacing: var(--ls-label); text-transform: uppercase; opacity: .85; }
.flow-title { font-size: var(--fs-label); letter-spacing: var(--ls-label); text-transform: uppercase; font-weight: var(--fw-semibold); color: var(--text-2); margin-top: var(--s-2); }
.flow-step { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); }
.flow-title { display: block; }
.flow-text { display: block; min-width: 0; }
.flow-text strong { display: block; font-size: var(--fs-body-sm); font-weight: var(--fw-semibold); }
.flow-text span { display: block; font-size: var(--fs-caption); color: var(--text-3); }
.flow-step .dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); flex: none; }
.icon { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-text); }
.icon.sm { width: 36px; height: 36px; border-radius: 10px; }
.icon.tone-success { background: var(--success-soft); color: var(--success); }
.icon.tone-info { background: var(--info-soft); color: var(--info); }
.icon.tone-neutral { background: var(--surface-2); color: var(--text-2); }

/* ============================== 8. Карточки ============================== */
/* карточка — панель приложения (.panel) */
.card { position: relative; display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; padding: var(--s-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: inset 0 1px 0 var(--hairline); transition: border-color var(--dur-fast) var(--ease), transform var(--dur-normal) var(--ease-out), box-shadow var(--dur-normal) var(--ease-out); }
.card h3, .card h2 { font-size: var(--fs-h3); line-height: var(--lh-h3); letter-spacing: var(--ls-h3); }
.card p { color: var(--text-2); font-size: var(--fs-body-sm); line-height: 1.55; }
.card .meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); color: var(--text-3); font-size: var(--fs-caption); }
.card-link { color: var(--text); }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* вся карточка — одна ссылка */
.card-link:hover { text-decoration: none; }
.card-link:focus-visible { outline: none; }
.card:has(.card-link:focus-visible) { border-color: var(--accent); box-shadow: var(--focus-ring); }
.card .more { margin-top: auto; padding-top: var(--s-2); display: inline-flex; align-items: center; gap: var(--s-1); color: var(--accent-text); font-size: var(--fs-body-sm); font-weight: var(--fw-medium); }
@media (hover: hover) {
    .card:has(.card-link):hover, .card.feature:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: inset 0 1px 0 var(--hairline), var(--shadow-md); }
}
.feature .icon { margin-bottom: var(--s-1); }

/* преимущества: строки с отметкой, без рамок — чтобы не повторять сетку карточек */
.benefits { display: grid; gap: var(--s-6) var(--s-8); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.benefit { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-4); align-items: start; }
.benefit h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); letter-spacing: var(--ls-h3); }
.benefit p { margin-top: var(--s-1); color: var(--text-2); font-size: var(--fs-body-sm); line-height: 1.55; }

/* шаги «как начать» */
.steps { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); counter-reset: step; }
.step { position: relative; counter-increment: step; padding: var(--s-5); padding-top: calc(var(--s-5) + 44px + var(--s-4)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: inset 0 1px 0 var(--hairline); }
.step::before { content: counter(step); position: absolute; top: var(--s-5); left: var(--s-5); display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-text); font-weight: var(--fw-bold); font-size: var(--fs-h3); font-variant-numeric: tabular-nums; }
.step h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); letter-spacing: var(--ls-h3); }
.step p { margin-top: var(--s-2); color: var(--text-2); font-size: var(--fs-body-sm); line-height: 1.55; }

/* ============================== 9. FAQ ============================== */
/* аккордеон приложения (.acc): кнопка-вопрос управляет блоком ответа; без скрипта ответы раскрыты */
.faq-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 0 var(--s-4); box-shadow: inset 0 1px 0 var(--hairline);}
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: 0; }
.faq-item > :is(h2, h3, h4) { font-size: inherit; font-weight: inherit; letter-spacing: 0; }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); width: 100%; min-height: 56px; padding: var(--s-4) 0; background: none; border: 0; border-radius: var(--r-sm); text-align: left; font-size: var(--fs-body); font-weight: var(--fw-medium); color: var(--text); cursor: default; }
.js .faq-q { cursor: pointer; }
.faq-q:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.faq-q svg { width: 26px; height: 26px; padding: 6px; flex: none; border-radius: 50%; background: var(--surface-2); color: var(--text-2); transition: transform var(--dur-normal) var(--ease), background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
html:not(.js) .faq-q svg { display: none; }
.faq-q[aria-expanded="true"] svg { transform: rotate(180deg); background: var(--text); color: var(--bg); }
.faq-a { padding-bottom: var(--s-4); }
.js .faq-a:not([hidden]) { animation: rise var(--dur-normal) var(--ease-out) both; }
.faq-group + .faq-group { margin-top: var(--s-10); }
.faq-group > h2 { margin-bottom: var(--s-4); font-size: var(--fs-h2); line-height: var(--lh-h2); letter-spacing: var(--ls-h2); }

/* ============================== 10. Шапка страницы и крошки ============================== */
.page-head { position: relative; isolation: isolate; overflow: hidden; padding-block: var(--s-8) var(--s-10); margin-bottom: var(--s-10); border-bottom: 1px solid var(--border); background: var(--bg-elev); }
.page-head::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--hero-glow); }
.page-head h1 { font-size: var(--site-fs-title); line-height: var(--lh-h1); letter-spacing: var(--ls-h1); max-width: 26ch; }
.page-head h1.page-title { max-width: 32ch; }
.page-head p { margin-top: var(--s-3); color: var(--text-2); font-size: var(--site-fs-lead); max-width: 60ch; }
.page-head .meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); margin-top: var(--s-4); font-size: var(--fs-body-sm); color: var(--text-3); }
.page-head .meta a.chip { z-index: 0; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s-2); margin-bottom: var(--s-4); font-size: var(--fs-body-sm); color: var(--text-3); }
.crumbs li { display: inline-flex; align-items: center; gap: var(--s-2); min-width: 0; }
.crumbs li + li::before { content: "/"; color: var(--text-3); }
.crumbs li[aria-current]::before { margin-right: var(--s-2); }
.crumbs a { display: inline-flex; align-items: center; min-width: var(--touch); min-height: var(--touch); color: var(--text-2); }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current] { display: inline-block; max-width: min(60vw, 420px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: var(--fw-medium); line-height: var(--touch); }

/* ============================== 11. Текст из редактора ============================== */
/* разметка приходит с сервера (HtmlSanitizer): страницы раздела «Страницы», текст новости, ответы FAQ */
:is(.prose, .article > article) { color: var(--text-2); font-size: var(--fs-body); line-height: 1.7; overflow-wrap: anywhere; }
:is(.prose, .article > article) > * + * { margin-top: 1em; }
:is(.prose, .article > article) > :first-child { margin-top: 0; }
:is(.prose, .article > article) :is(h1, h2, h3, h4, h5, h6) { color: var(--text); margin-top: 1.8em; text-wrap: balance; }
:is(.prose, .article > article) h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); letter-spacing: var(--ls-h1); }
:is(.prose, .article > article) h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); letter-spacing: var(--ls-h2); }
:is(.prose, .article > article) :is(h3, h4, h5, h6) { font-size: var(--fs-h3); line-height: var(--lh-h3); letter-spacing: var(--ls-h3); }
:is(.prose, .article > article) :is(strong, b) { color: var(--text); font-weight: var(--fw-semibold); }
:is(.prose, .article > article) a { text-decoration: underline; text-decoration-color: var(--accent-ring); }
:is(.prose, .article > article) a:hover { text-decoration-color: currentColor; }
:is(.prose, .article > article) :is(ul, ol) { padding-left: 1.4em; }
:is(.prose, .article > article) ul { list-style: disc; }
:is(.prose, .article > article) ol { list-style: decimal; }
:is(.prose, .article > article) li + li { margin-top: .4em; }
:is(.prose, .article > article) li::marker { color: var(--text-3); }
:is(.prose, .article > article) blockquote { margin-left: 0; padding: var(--s-3) var(--s-4); border-left: 3px solid var(--accent); border-radius: 0 var(--r-md) var(--r-md) 0; background: var(--surface-2); color: var(--text); }
:is(.prose, .article > article) hr { border: 0; border-top: 1px solid var(--border); margin-block: 2em; }
:is(.prose, .article > article) img { border-radius: var(--r-md); }
/* таблицы в тексте: прокрутка внутри таблицы, страница не расширяется */
:is(.prose, .article > article) table { display: block; width: 100%; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: var(--fs-body-sm); font-variant-numeric: tabular-nums; -webkit-overflow-scrolling: touch; }
:is(.prose, .article > article) :is(th, td) { border-bottom: 1px solid var(--border); padding: 10px 14px; text-align: left; vertical-align: top; }
:is(.prose, .article > article) th { color: var(--text-2); font-size: var(--fs-label); font-weight: var(--fw-semibold); letter-spacing: var(--ls-label); text-transform: uppercase; white-space: nowrap; background: var(--surface-2); }
:is(.prose, .article > article) pre { overflow-x: auto; padding: var(--s-4); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); }
:is(.prose, .article > article) :is(code, pre) { font-family: var(--mono); font-size: .9em; }
.article {padding: clamp(var(--s-5), 3.5vw, var(--s-10)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: inset 0 1px 0 var(--hairline); }
.article .lead { font-size: var(--site-fs-lead); color: var(--text); }
.article .lead + .body { margin-top: var(--s-6); padding-top: var(--s-6); border-top: 1px solid var(--border); }
.article-foot { max-width: var(--site-wrap-text); margin-top: var(--s-6); }
.faq-a.prose { font-size: var(--fs-body-sm); line-height: 1.6; }

/* ============================== 12. Состояния и пагинация ============================== */
/* сообщение — callout приложения */
.notice { display: flex; gap: 10px; align-items: flex-start; margin-bottom: var(--s-4); padding: var(--s-3) 14px; border-radius: var(--r-md); background: var(--info-soft); color: var(--text); font-size: var(--fs-body-sm); line-height: 1.45; }
.notice svg.i { color: var(--info); margin-top: 1px; }
.notice--after { margin-top: var(--s-5); margin-bottom: 0; background: var(--neutral-soft); }
.notice--after svg.i { color: var(--text-2); }

/* пустое состояние приложения (EmptyState) */
.empty { display: grid; justify-items: center; gap: var(--s-2); max-width: 520px; margin-inline: auto; padding: var(--s-12) var(--s-5); text-align: center; border: 1px dashed var(--border-strong); border-radius: var(--r-lg); color: var(--text-2); }
.empty .icon { margin-bottom: var(--s-2); width: 56px; height: 56px; border-radius: var(--r-lg); }
.empty-title { font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: var(--fw-semibold); color: var(--text); }
.empty-text { font-size: var(--fs-body-sm); }
.empty .btn { margin-top: var(--s-3); }

/* пагинация приложения (.pager / .pg) */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s-1); margin-top: var(--s-10); }
.pager > * { position: relative; display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 var(--s-2); border-radius: 10px; border: 1px solid transparent; font-size: var(--fs-body-sm); font-weight: var(--fw-medium); color: var(--text-2); font-variant-numeric: tabular-nums; transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-micro) var(--ease); }
.pager a::before { content: ""; position: absolute; inset: -2px; }
.pager a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.pager a:active { transform: scale(.94); }
.pager a:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.pager a[rel] { padding: 0 var(--s-3); border-color: var(--border); background: var(--surface); color: var(--text); }
.pager [aria-current] { background: var(--text); color: var(--bg); font-weight: var(--fw-semibold); }
.pager .gap { min-width: 24px; padding: 0; color: var(--text-3); }

/* ============================== 13. Контакты, документы, призыв ============================== */
.contact-list { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.contact { gap: var(--s-2); }
.contact dt { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-label); letter-spacing: var(--ls-label); text-transform: uppercase; font-weight: var(--fw-semibold); color: var(--text-3); }
.contact dt svg.i { width: 16px; height: 16px; stroke-width: 2; color: var(--accent-text); }
.contact dd { font-size: var(--fs-body); font-weight: var(--fw-medium); color: var(--text); overflow-wrap: anywhere; }
.contact dd a { display: inline-flex; align-items: center; min-height: 32px; }
.contact dd small { display: block; margin-top: var(--s-1); font-size: var(--fs-caption); font-weight: var(--fw-regular); color: var(--text-3); }
.contact dd.inline-list { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); }

/* документы — список приложения (.list) */
.doc-list { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.doc-list a { display: flex; align-items: center; gap: var(--s-3); min-height: 60px; padding: var(--s-3) var(--s-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); color: var(--text); font-weight: var(--fw-medium); transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease); }
.doc-list a:hover { border-color: var(--border-strong); background: var(--surface-2); text-decoration: none; }
.doc-list a > span:not(.icon) { flex: 1 1 auto; min-width: 0; }
.doc-list a > svg { width: 18px; height: 18px; flex: none; color: var(--text-3); transition: transform var(--dur-fast) var(--ease); }
@media (hover: hover) { .doc-list a:hover > svg { transform: translateX(3px); } }

.cta { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-6) var(--s-8); padding: clamp(var(--s-6), 5vw, 56px); border-radius: var(--r-2xl); background: var(--hero-grad); border: 1px solid var(--border); box-shadow: inset 0 1px 0 var(--hairline), var(--shadow-md); }
.cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--hero-glow), radial-gradient(50% 120% at 0% 100%, var(--accent-soft), transparent 70%); }
.cta h2 { font-size: var(--site-fs-title); line-height: var(--lh-h1); letter-spacing: var(--ls-h1); }
.cta p { margin-top: var(--s-2); color: var(--text-2); font-size: var(--site-fs-lead); max-width: 52ch; }

/* ============================== 14. Подвал ============================== */
.site-footer { flex: none; margin-top: auto; padding-block: var(--s-12) var(--s-6); background: var(--canvas); border-top: 1px solid var(--border); color: var(--text-2); font-size: var(--fs-body-sm); }
.footer-grid { display: grid; gap: var(--s-8); grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); }
.footer-about p { margin-top: var(--s-3); max-width: 36ch; }
.site-footer h2 { margin-bottom: var(--s-2); font-size: var(--fs-label); letter-spacing: var(--ls-label); text-transform: uppercase; font-weight: var(--fw-semibold); color: var(--text-2); }
.footer-links a { display: inline-flex; align-items: center; min-width: var(--touch); min-height: var(--touch); color: var(--text-2); overflow-wrap: anywhere; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2) var(--s-6); margin-top: var(--s-10); padding-top: var(--s-5); border-top: 1px solid var(--border); color: var(--text-2); font-size: var(--fs-caption); }

/* ============================== 15. Страницы ошибок ============================== */
.error-page { position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding-block: var(--s-12); text-align: center; }
.error-page::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--hero-glow), radial-gradient(60% 60% at 50% 100%, var(--accent-soft), transparent 70%); }
.error-page .wrap { display: grid; justify-items: center; gap: var(--s-3); max-width: 560px; }
.error-page .brand { margin-bottom: var(--s-6); }
.error-code { font-size: clamp(72px, 22vw, 144px); line-height: 1; font-weight: var(--fw-bold); letter-spacing: var(--ls-display); font-variant-numeric: tabular-nums; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page h1 { font-size: var(--site-fs-title); line-height: var(--lh-h1); letter-spacing: var(--ls-h1); }
.error-page p:not(.error-code) { color: var(--text-2); font-size: var(--site-fs-lead); max-width: 44ch; }
.error-page .actions { justify-content: center; margin-top: var(--s-5); }

/* ============================== 16. Адаптивность ============================== */
@media (max-width: 1023px) {
    .hero-grid { grid-template-columns: minmax(0, 1fr); }
    .flow { max-width: 520px; }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    /* мобильное меню: со скриптом — выпадающая панель под шапкой, без скрипта — навигация всегда раскрыта */
    .js .menu-toggle { display: inline-grid; }
    .js .site-nav + .header-tools { margin-left: auto; }
    .js .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: var(--s-4); max-height: calc(100dvh - var(--site-header-h)); overflow-y: auto; padding: var(--s-3) var(--site-page-x) var(--s-6); background: var(--bg-elev); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); }
    .js .site-nav.is-open { display: flex; animation: rise var(--dur-normal) var(--ease-out) both; }
    .js .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; margin: 0; }
    .js .site-nav ul a { display: flex; justify-content: flex-start; min-height: 52px; padding: 0 var(--s-2); font-size: var(--fs-body); border-bottom: 1px solid var(--border); border-radius: 0; }
    .js .site-nav ul a[aria-current="page"]::after { left: 0; right: auto; top: 14px; bottom: 14px; width: 3px; height: auto; }
    .js .site-nav ul a[aria-current="page"] { padding-left: var(--s-4); }
    .js .site-nav .langs { align-self: flex-start; }
    .js .site-nav .langs > * { min-width: 52px; height: 40px; }
    .js .site-nav .btn { min-height: var(--h-control); font-size: var(--fs-body); border-radius: var(--r-md); }
    html:not(.js) .site-header > .wrap { flex-wrap: wrap; padding-block: var(--s-2); gap: 0 var(--s-4); }
    html:not(.js) .site-nav { flex-wrap: wrap; gap: var(--s-2) var(--s-3); padding-bottom: var(--s-2); }
    html:not(.js) .site-nav ul { flex-wrap: wrap; margin-left: calc(-1 * var(--s-3)); }
}
@media (max-width: 639px) {
    .footer-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
    .hero .actions .btn, .cta .actions, .cta .actions .btn, .error-page .actions .btn { width: 100%; }
    .search-form { grid-template-columns: minmax(0, 1fr); }
    .section-head { margin-bottom: var(--s-6); }
    .page-head { padding-block: var(--s-5) var(--s-8); margin-bottom: var(--s-8); }
    .flow { padding: var(--s-4); }
    /* ряд чипов — горизонтальная прокрутка, как .chips.scroll в приложении: страница не расширяется */
    .chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--site-page-x)); padding: 6px var(--site-page-x); scroll-padding-inline: var(--site-page-x); }
    .chips.scroll::-webkit-scrollbar { display: none; }
}

/* ============================== 17. Движение ============================== */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes sheen { 0% { transform: translateX(-100%); } 35%, 100% { transform: translateX(100%); } }
/* появление блоков при прокрутке: класс .reveal-wait ставит site.js только блокам ниже первого экрана */
.reveal-wait { opacity: 0; transform: translateY(14px); }
.reveal-in { opacity: 1; transform: none; transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.hero-grid > * { animation: rise var(--dur-slow) var(--ease-out) both; }
.hero-grid > .flow { animation-delay: 90ms; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
    .reveal-wait { opacity: 1; transform: none; }
    .flow-card::after { display: none; }
}

/* ============================== 18. Печать ============================== */
@media print {
    .reveal-wait { opacity: 1; transform: none; }
    .site-header, .site-footer, .skip, .actions, .pager, .filter-bar, .crumbs, .flow { display: none !important; }
    body { background: none; }
    .card, .article, .faq-list, .step { box-shadow: none; }
    .faq-a[hidden] { display: block !important; }
}
