/* ==========================================================================
   Шрифты. Лежат у нас в static/fonts — не на Google Fonts.
   Причина не в скорости: загрузка шрифта с fonts.gstatic.com отправляет IP и
   User-Agent клиента в Google, то есть за границу. Наша Cookie-политика
   (п. 9.3) утверждает, что трансграничной передачи нет, а 152-ФЗ требует
   для неё отдельного основания. Файлы — те же woff2, подмножества cyrillic
   и latin; latin-ext/greek не берём, они на русском сайте не нужны.
   ========================================================================== */
/* cyrillic */
@font-face {
    font-family: 'Golos Text';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/golos-text-400-cyrillic.024646dc00da.woff2") format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
    font-family: 'Golos Text';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/golos-text-400-latin.3ba0fde64bcf.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
    font-family: 'Golos Text';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/golos-text-500-cyrillic.024646dc00da.woff2") format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
    font-family: 'Golos Text';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/golos-text-500-latin.3ba0fde64bcf.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
    font-family: 'Golos Text';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/golos-text-600-cyrillic.024646dc00da.woff2") format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
    font-family: 'Golos Text';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/golos-text-600-latin.3ba0fde64bcf.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
    font-family: 'Golos Text';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/golos-text-700-cyrillic.024646dc00da.woff2") format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
    font-family: 'Golos Text';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/golos-text-700-latin.3ba0fde64bcf.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
    font-family: 'PT Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/pt-mono-400-cyrillic.c8c12e3a71a4.woff2") format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
    font-family: 'PT Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/pt-mono-400-latin.9930f11c0239.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
    font-family: 'PT Serif';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/pt-serif-400-cyrillic.46b6045131ec.woff2") format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
    font-family: 'PT Serif';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/pt-serif-400-latin.35a2015f3869.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
    font-family: 'PT Serif';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/pt-serif-700-cyrillic.23948fbc0fdb.woff2") format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
    font-family: 'PT Serif';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/pt-serif-700-latin.44e40e4650f7.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   Дизайн-система v2.
   Палитра снята с референса znatclub.ru: сине-чёрный #11141b, слейт #222836,
   светлое золото #f8ce82 (на нём — чёрный текст), белые контентные поверхности.
   Идея: обменник как частный банк-реестр. Запоминающийся элемент один —
   «гильош» (муар из колец, как защитная сетка банкноты) за плашкой курса.
   Цвета «контекста» (--c-*) переключаются на тёмных поверхностях, поэтому
   компоненты (поля, ссылки, кнопки) не нуждаются в отдельных тёмных копиях.
   ========================================================================== */
:root {
    --night: #11141b;
    --night-2: #171b25;
    --slate: #222836;
    --slate-2: #2b3345;

    /* Поверхности страницы — единственное, что переключается темой */
    --bg: #f4f6fa;
    --surface: #ffffff;
    --surface-2: #fafbfd;

    --heading: #222836;
    --text: #3a3f4b;
    --muted: #667085;
    --line: #e4e8f0;
    --line-2: #d3d9e4;

    --gold: #f8ce82;
    --gold-bright: #fbd995;
    --gold-deep: #d4a446;
    --gold-text: #7d5a14;
    --gold-glow: rgba(248, 206, 130, .35);

    --stamp: #2f3f6b;
    --stamp-bright: #4a5f97;

    --danger: #a33a2f;
    --success: #256b42;

    --line-dark: rgba(255, 255, 255, .08);
    --line-dark-2: rgba(255, 255, 255, .14);

    /* Статусы и уведомления — тоже часть темы */
    --status-a-bg: #e8edf8; --status-a-fg: var(--stamp);
    --status-warn-bg: #fff3d9; --status-warn-fg: #8a5a1f;
    --status-ok-bg: #e4f3ea; --status-ok-fg: var(--success);
    --status-bad-bg: #fbe9e7; --status-bad-fg: var(--danger);
    --status-mute-bg: #eceff4; --status-mute-fg: #5b6474;

    --alert-bg: var(--surface); --alert-border: var(--line); --alert-fg: var(--text);
    --alert-ok-bg: #eaf6ee; --alert-ok-border: #c5e4d0; --alert-ok-fg: var(--success);
    --alert-bad-bg: #fcecea; --alert-bad-border: #f3c7c1; --alert-bad-fg: #9b2f25;
    --alert-info-bg: #eaf0fb; --alert-info-border: #c9d8f3; --alert-info-fg: #2a3d69;
    --alert-warn-bg: #fff5e1; --alert-warn-border: #f1dca8; --alert-warn-fg: #7d5a14;

    /* Плавающие панели (виджет, авторизация, гостевая карточка) */
    --panel-1: rgba(255, 255, 255, .92);
    --panel-2: rgba(255, 255, 255, .8);
    --panel-border: var(--line-2);
    --panel-shadow: var(--shadow-2);
    --panel-solid: var(--surface);
    /* Плашка курса — светлее панели, «подсвеченная пластина», а не карточка */
    --plate-1: rgba(17, 20, 27, .035);
    --plate-2: rgba(17, 20, 27, .012);
    /* Чипы и вкладки поверх панелей */
    --chip-bg: rgba(17, 20, 27, .045);
    --chip-bg-hover: rgba(17, 20, 27, .08);
    --chip-sunken-bg: rgba(17, 20, 27, .045);
    /* Выпадающие меню поверх панелей */
    --overlay-bg: var(--surface);
    --overlay-border: var(--line-2);
    --overlay-item-hover: var(--surface-2);
    /* Шапка/подвал/hero — сплошной и полупрозрачный (для блюра) фон */
    --chrome-bg: rgba(255, 255, 255, .82);
    --chrome-border: var(--line);
    --chrome-solid: var(--bg);
    /* Муар за hero/плашкой курса — золото на своей подложке */
    --pattern-c1: rgba(212, 164, 70, .1);
    --pattern-c2: rgba(212, 164, 70, .07);

    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 22px;

    --shadow-1: 0 1px 2px rgba(17, 20, 27, .06), 0 4px 14px rgba(17, 20, 27, .05);
    --shadow-2: 0 14px 34px -10px rgba(17, 20, 27, .22), 0 2px 6px rgba(17, 20, 27, .06);
    --shadow-dark: 0 32px 64px -24px rgba(0, 0, 0, .7), 0 0 0 1px var(--line-dark);
    --ease: cubic-bezier(.2, .7, .2, 1);

    /* Контекстные цвета: светлая поверхность по умолчанию */
    --c-text: var(--text);
    --c-muted: var(--muted);
    --c-heading: var(--heading);
    --c-line: var(--line);
    --c-link: var(--gold-text);
    --c-field-bg: var(--surface-2);
    --c-field-border: var(--line-2);
    --c-field-text: var(--heading);
    --c-placeholder: var(--muted);
    --c-focus: var(--gold-deep);
    --c-danger: var(--danger);
}

/* ==========================================================================
   Тёмная тема сайта. У znatclub-секций (hero/шапка/подвал/виджет/auth) фон и
   так тёмный — их отдельно трогать не нужно, они одинаковы в обеих темах.
   Меняются только «светлые» поверхности: bg/surface/heading/text/line и т.д.
   Один и тот же список токенов задан дважды: под явным выбором пользователя
   [data-theme="dark"] и под системной темой, если выбор не сделан явно.
   ========================================================================== */
:root[data-theme="dark"] {
    --bg: #0d0f15;
    --surface: #171b25;
    --surface-2: #1d2230;
    --heading: #f2f4f8;
    --text: #c3c9d4;
    --muted: #8a92a3;
    --line: rgba(255, 255, 255, .09);
    --line-2: rgba(255, 255, 255, .16);
    --gold-text: #f8ce82;

    --status-a-bg: rgba(74, 95, 151, .18); --status-a-fg: #9db1e0;
    --status-warn-bg: rgba(248, 206, 130, .16); --status-warn-fg: #f3c987;
    --status-ok-bg: rgba(37, 107, 66, .22); --status-ok-fg: #6fcf97;
    --status-bad-bg: rgba(163, 58, 47, .2); --status-bad-fg: #f2897c;
    --status-mute-bg: rgba(255, 255, 255, .08); --status-mute-fg: #a3abb9;

    --alert-bg: var(--surface); --alert-border: var(--line-2); --alert-fg: var(--text);
    --alert-ok-bg: rgba(37, 107, 66, .16); --alert-ok-border: rgba(111, 207, 151, .35); --alert-ok-fg: #8fe0ae;
    --alert-bad-bg: rgba(163, 58, 47, .16); --alert-bad-border: rgba(242, 137, 124, .35); --alert-bad-fg: #f6a99d;
    --alert-info-bg: rgba(47, 63, 107, .26); --alert-info-border: rgba(122, 148, 222, .4); --alert-info-fg: #b7c6f2;
    --alert-warn-bg: rgba(248, 206, 130, .14); --alert-warn-border: rgba(248, 206, 130, .35); --alert-warn-fg: #f3c987;

    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 14px rgba(0, 0, 0, .35);
    --shadow-2: 0 14px 34px -10px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .35);

    --panel-1: rgba(34, 40, 54, .9);
    --panel-2: rgba(23, 27, 37, .94);
    --panel-border: var(--line-dark-2);
    --panel-shadow: var(--shadow-dark);
    --panel-solid: var(--night-2);
    --plate-1: rgba(255, 255, 255, .07);
    --plate-2: rgba(255, 255, 255, .02);
    --chip-bg: rgba(255, 255, 255, .06);
    --chip-bg-hover: rgba(255, 255, 255, .12);
    --chip-sunken-bg: rgba(0, 0, 0, .3);
    --overlay-bg: var(--slate);
    --overlay-border: var(--line-dark-2);
    --overlay-item-hover: rgba(255, 255, 255, .07);
    --chrome-bg: rgba(34, 40, 54, .9);
    --chrome-border: var(--line-dark);
    --chrome-solid: var(--night);
    --pattern-c1: rgba(248, 206, 130, .16);
    --pattern-c2: rgba(248, 206, 130, .12);
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0d0f15;
        --surface: #171b25;
        --surface-2: #1d2230;
        --heading: #f2f4f8;
        --text: #c3c9d4;
        --muted: #8a92a3;
        --line: rgba(255, 255, 255, .09);
        --line-2: rgba(255, 255, 255, .16);
        --gold-text: #f8ce82;

        --status-a-bg: rgba(74, 95, 151, .18); --status-a-fg: #9db1e0;
        --status-warn-bg: rgba(248, 206, 130, .16); --status-warn-fg: #f3c987;
        --status-ok-bg: rgba(37, 107, 66, .22); --status-ok-fg: #6fcf97;
        --status-bad-bg: rgba(163, 58, 47, .2); --status-bad-fg: #f2897c;
        --status-mute-bg: rgba(255, 255, 255, .08); --status-mute-fg: #a3abb9;

        --alert-bg: var(--surface); --alert-border: var(--line-2); --alert-fg: var(--text);
        --alert-ok-bg: rgba(37, 107, 66, .16); --alert-ok-border: rgba(111, 207, 151, .35); --alert-ok-fg: #8fe0ae;
        --alert-bad-bg: rgba(163, 58, 47, .16); --alert-bad-border: rgba(242, 137, 124, .35); --alert-bad-fg: #f6a99d;
        --alert-info-bg: rgba(47, 63, 107, .26); --alert-info-border: rgba(122, 148, 222, .4); --alert-info-fg: #b7c6f2;
        --alert-warn-bg: rgba(248, 206, 130, .14); --alert-warn-border: rgba(248, 206, 130, .35); --alert-warn-fg: #f3c987;

        --shadow-1: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 14px rgba(0, 0, 0, .35);
        --shadow-2: 0 14px 34px -10px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .35);
            --panel-1: rgba(34, 40, 54, .9);
            --panel-2: rgba(23, 27, 37, .94);
            --panel-border: var(--line-dark-2);
            --panel-shadow: var(--shadow-dark);
            --panel-solid: var(--night-2);
            --plate-1: rgba(255, 255, 255, .07);
            --plate-2: rgba(255, 255, 255, .02);
            --chip-bg: rgba(255, 255, 255, .06);
            --chip-bg-hover: rgba(255, 255, 255, .12);
            --chip-sunken-bg: rgba(0, 0, 0, .3);
            --overlay-bg: var(--slate);
            --overlay-border: var(--line-dark-2);
            --overlay-item-hover: rgba(255, 255, 255, .07);
            --chrome-bg: rgba(34, 40, 54, .9);
            --chrome-border: var(--line-dark);
            --chrome-solid: var(--night);
            --pattern-c1: rgba(248, 206, 130, .16);
            --pattern-c2: rgba(248, 206, 130, .12);
    }
}

/* Тёмные поверхности — этот текстовый контекст нужен только когда сама
   секция реально тёмная: явная тёмная тема, либо системная тёмная при
   отсутствии явного выбора. В светлой теме эти же секции становятся
   светлыми (см. --panel-*/--chrome-* ниже), и текст на них уже тёмный
   по умолчанию — переопределять здесь нечего. */
[data-theme="dark"] .widget, [data-theme="dark"] .auth-card, [data-theme="dark"] .registry-card,
[data-theme="dark"] .hero, [data-theme="dark"] .site-footer, [data-theme="dark"] .site-header, [data-theme="dark"] .plaque {
    --c-text: #dfe3ea;
    --c-muted: #98a0ae;
    --c-heading: #ffffff;
    --c-line: var(--line-dark);
    --c-link: var(--gold);
    --c-field-bg: rgba(0, 0, 0, .28);
    --c-field-border: var(--line-dark-2);
    --c-field-text: #ffffff;
    --c-placeholder: #6f7787;
    --c-focus: var(--gold);
    --c-danger: #ff9c8f;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .widget, :root:not([data-theme="light"]) .auth-card, :root:not([data-theme="light"]) .registry-card,
:root:not([data-theme="light"]) .hero, :root:not([data-theme="light"]) .site-footer, :root:not([data-theme="light"]) .site-header, :root:not([data-theme="light"]) .plaque {
    --c-text: #dfe3ea;
    --c-muted: #98a0ae;
    --c-heading: #ffffff;
    --c-line: var(--line-dark);
    --c-link: var(--gold);
    --c-field-bg: rgba(0, 0, 0, .28);
    --c-field-border: var(--line-dark-2);
    --c-field-text: #ffffff;
    --c-placeholder: #6f7787;
    --c-focus: var(--gold);
    --c-danger: #ff9c8f;
    }
}

/* ---------- Основа ---------- */
* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    display: flex; flex-direction: column;
}
main { display: flex; flex-direction: column; flex: 1 0 auto; }
/* Короткая страница: последний тёмный блок растягивается, подвал прижат к низу */
main > .hero:last-child, main > .auth-page:last-child { flex: 1 0 auto; }
main > .hero:last-child { display: flex; align-items: center; }
.site-footer { flex-shrink: 0; }

h1, h2, h3, h4 {
    font-family: 'PT Serif', Georgia, serif;
    font-weight: 700;
    margin: 0;
    color: var(--c-heading);
    letter-spacing: -.01em;
}

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }

a { color: var(--c-link); text-decoration: none; transition: color .15s; }
a:hover { color: var(--gold-deep); }
.muted { color: var(--c-muted); }
::selection { background: var(--gold); color: #000; }

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

.num { font-variant-numeric: tabular-nums; }
/* Моноширинный шрифт — только для адресов, хэшей и номеров (то, что копируют и сверяют) */
.mono, .requisites, .order-num, .timer {
    font-family: 'PT Mono', ui-monospace, monospace;
}

/* ---------- Шапка ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--chrome-bg);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
    backdrop-filter: saturate(160%) blur(16px);
    border-bottom: 1px solid var(--chrome-border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }

.logo { display: flex; align-items: center; gap: 12px; color: var(--c-heading); flex-shrink: 0; white-space: nowrap; }
.logo:hover { color: var(--c-heading); }
.logo-mark {
    width: 42px; height: 42px; flex-shrink: 0;
    display: grid; place-items: center;
}
.logo-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-name { font-family: 'PT Serif', serif; font-size: 1.08rem; font-weight: 700; letter-spacing: .01em; }
/* Кольцевая надпись эмблемы — гравировка, поэтому капслок здесь оправдан */
.logo-sub { font-size: .6rem; letter-spacing: .3em; color: var(--gold); font-weight: 500; }

.nav { display: flex; gap: 4px; }
.nav a { color: var(--c-text); font-size: .92rem; padding: 8px 14px; border-radius: 999px; white-space: nowrap; transition: background .15s, color .15s; }
.nav a:hover { color: var(--c-heading); background: var(--chip-bg-hover); }

.header-right { display: flex; align-items: center; gap: 14px; }
.header-contact { display: inline-flex; align-items: center; gap: 8px; color: var(--c-text); font-size: .86rem; white-space: nowrap; }
.header-contact:hover { color: var(--gold); }
.hc-ic {
    display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
    background: var(--chip-bg); border: 1px solid var(--c-field-border); color: var(--gold); font-size: .82rem;
}

/* Переключатель светлой/тёмной темы */
.theme-toggle {
    display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
    background: var(--chip-bg); border: 1px solid var(--c-field-border); color: var(--gold); cursor: pointer;
    transition: background .15s, border-color .15s;
}
.theme-toggle:hover { background: var(--chip-bg-hover); border-color: var(--gold-deep); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
    :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}
.nav-cta {
    padding: 9px 20px; border-radius: 999px; font-weight: 600; font-size: .92rem;
    color: #000 !important; background: var(--gold); transition: background .15s, transform .15s;
}
.nav-cta:hover { background: var(--gold-bright); transform: translateY(-1px); }

.user-menu { position: relative; }
.user-btn {
    display: flex; align-items: center; gap: 10px; cursor: pointer;
    background: var(--chip-bg); border: 1px solid var(--c-field-border); color: var(--c-heading);
    padding: 5px 12px 5px 5px; border-radius: 999px; font: 500 .86rem 'Golos Text', sans-serif;
    transition: background .15s, border-color .15s;
}
.user-btn:hover { background: var(--chip-bg-hover); border-color: var(--gold-deep); }
.user-avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #000; }
.user-avatar svg { width: 16px; height: 16px; }
.user-label { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cur-caret { color: var(--gold); font-size: .7rem; }
.user-dropdown {
    position: absolute; right: 0; top: calc(100% + 10px); min-width: 210px; padding: 6px;
    background: var(--overlay-bg); border: 1px solid var(--overlay-border); border-radius: var(--r-md);
    list-style: none; margin: 0; box-shadow: var(--panel-shadow); display: none; z-index: 40;
}
.user-menu:hover .user-dropdown, .user-menu:focus-within .user-dropdown { display: block; }
.user-dropdown li a { display: block; padding: 10px 14px; border-radius: var(--r-sm); color: var(--c-text); font-size: .9rem; }
.user-dropdown li a:hover { background: var(--overlay-item-hover); color: var(--gold); }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 24px; border-radius: var(--r-md); border: 1px solid transparent;
    font: 600 1rem/1.2 'Golos Text', sans-serif; cursor: pointer;
    transition: transform .15s var(--ease), box-shadow .2s, background .2s, border-color .2s, color .2s;
}
.btn-primary {
    background: linear-gradient(180deg, #fad793, #f8ce82); color: #000;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 10px 24px -10px rgba(248, 206, 130, .6);
}
.btn-primary:hover { transform: translateY(-1px); background: linear-gradient(180deg, #fde0a6, #fad38a); color: #000; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 14px 30px -10px rgba(248, 206, 130, .75); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-secondary { background: transparent; color: var(--c-heading); border-color: var(--c-field-border); }
.btn-secondary:hover { border-color: var(--gold-deep); color: var(--c-link); }
.btn-danger { color: var(--danger); border-color: #ecc9c4; }
.btn-danger:hover { background: #fcecea; border-color: var(--danger); color: var(--danger); }
.btn-on-dark { background: var(--chip-bg); }
.btn-block { width: 100%; }

/* ---------- Формы ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .86rem; color: var(--c-muted); margin-bottom: 7px; font-weight: 500; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

input[type=text], input[type=email], input[type=number], select {
    width: 100%; padding: 13px 14px; border-radius: var(--r-md);
    background: var(--c-field-bg); border: 1px solid var(--c-field-border); color: var(--c-field-text);
    font: 400 1rem 'Golos Text', sans-serif;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder { color: var(--c-placeholder); }
input:focus, select:focus { outline: none; border-color: var(--c-focus); box-shadow: 0 0 0 4px rgba(212, 164, 70, .2); }
select option { background: var(--overlay-bg); color: var(--c-heading); }

.checkbox { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; font-size: .88rem; color: var(--c-text); cursor: pointer; line-height: 1.5; }
.checkbox input {
    appearance: none; -webkit-appearance: none; flex-shrink: 0; width: 20px; height: 20px; margin: 1px 0 0;
    border-radius: 6px; border: 1.5px solid var(--c-field-border); background: var(--c-field-bg); cursor: pointer;
    display: grid; place-items: center; transition: background .15s, border-color .15s;
}
.checkbox input:checked {
    background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center / 13px no-repeat;
    border-color: var(--gold);
}
.checkbox input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.error { color: var(--c-danger); font-size: .8rem; margin-top: 6px; }
.error:empty { margin: 0; }
.link-btn { background: none; border: none; color: var(--c-link); cursor: pointer; font: 500 .9rem 'Golos Text', sans-serif; text-decoration: underline; text-underline-offset: 3px; }
.fineprint { font-size: .8rem; text-align: center; margin: 16px 0 0; }

/* Загрузка файлов — зона, а не системная кнопка */
.dropzone {
    position: relative; display: grid; place-items: center; gap: 4px; text-align: center;
    padding: 22px 16px; border: 1.5px dashed var(--c-field-border); border-radius: var(--r-md);
    background: var(--c-field-bg); color: var(--c-muted); transition: border-color .2s, color .2s, background .2s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--gold); color: var(--c-text); }
.dropzone.has-file { border-style: solid; border-color: var(--gold); }
.dropzone input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; padding: 0; border: 0; }
.dz-title { font-weight: 600; color: var(--c-text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-hint { font-size: .82rem; }
.dz-preview { display: none; max-height: 110px; max-width: 100%; border-radius: var(--r-sm); margin-top: 6px; }
.has-file .dz-preview { display: block; }

/* ---------- Уведомления ---------- */
.alert { padding: 13px 16px; border-radius: var(--r-md); border: 1px solid var(--alert-border); background: var(--alert-bg); color: var(--alert-fg); font-size: .94rem; margin-bottom: 12px; }
.alert-success { background: var(--alert-ok-bg); border-color: var(--alert-ok-border); color: var(--alert-ok-fg); }
.alert-error { background: var(--alert-bad-bg); border-color: var(--alert-bad-border); color: var(--alert-bad-fg); }
.alert-info { background: var(--alert-info-bg); border-color: var(--alert-info-border); color: var(--alert-info-fg); }
.alert-warning { background: var(--alert-warn-bg); border-color: var(--alert-warn-border); color: var(--alert-warn-fg); }

/* Сообщения фреймворка — всплывающие, поверх страницы */
.messages { position: fixed; top: 86px; right: 20px; z-index: 80; width: min(420px, calc(100vw - 32px)); display: grid; gap: 10px; pointer-events: none; }
.messages .alert { position: relative; margin: 0; padding-right: 42px; pointer-events: auto; box-shadow: var(--shadow-2); animation: toast-in .4s var(--ease) both; }
.alert-close { position: absolute; top: 8px; right: 10px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 1.15rem; line-height: 1; cursor: pointer; opacity: .6; }
.alert-close:hover { opacity: 1; background: rgba(0, 0, 0, .06); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Заголовки секций и общие блоки ---------- */
.doc-heading { margin-bottom: 30px; }
.doc-heading h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.doc-heading p { margin: 10px 0 0; color: var(--muted); max-width: 60ch; }
.doc-heading .rule { display: none; }
.section { padding: 64px 24px 20px; }
.section-last { padding-bottom: 88px; }

/* Разделённые факты */
.fact-strip { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.fact-strip > div { flex: 1 1 100px; padding: 0 20px; border-left: 1px solid var(--c-field-border); }
.fact-strip > div:first-child { padding-left: 0; border-left: none; }
.fact-strip dt { font-size: .8rem; color: var(--c-muted); margin: 0 0 6px; }
.fact-strip dd { margin: 0; font-weight: 600; font-size: 1.05rem; color: var(--c-heading); font-variant-numeric: tabular-nums; }

/* ---------- Тёмный hero + гильош ---------- */
.hero { position: relative; overflow: hidden; background: var(--chrome-solid); color: var(--c-text); padding: 76px 0 72px; }
.hero::before, .auth-page::before, .plaque::before {
    content: ''; position: absolute; pointer-events: none;
    background:
        repeating-radial-gradient(circle at 32% 46%, transparent 0 14px, var(--pattern-c1) 14px 15px),
        repeating-radial-gradient(circle at 64% 54%, transparent 0 14px, var(--pattern-c2) 14px 15px);
}
.hero::before { inset: -30% -8% -30% 34%; -webkit-mask-image: radial-gradient(closest-side, #000 22%, transparent 78%); mask-image: radial-gradient(closest-side, #000 22%, transparent 78%); }
.hero-inner {
    position: relative; width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
}
.hero-text h1 { color: var(--c-heading); font-size: clamp(2.1rem, 4.4vw, 3.25rem); line-height: 1.1; max-width: 20ch; }
.hero-text > p { color: var(--c-text); font-size: 1.08rem; max-width: 46ch; margin: 20px 0 0; }
.hero-actions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-text .fact-strip { margin-top: 40px; }

/* Единственный «оркестрованный» момент — появление hero при загрузке */
@media (prefers-reduced-motion: no-preference) {
    .hero-inner > * { animation: rise .8s var(--ease) both; }
    .hero-inner > *:nth-child(2) { animation-delay: .12s; }
    @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* Карточка регистрации (гость) */
.registry-card {
    position: relative; padding: 34px; border-radius: var(--r-xl);
    background: linear-gradient(180deg, var(--panel-1), var(--panel-2));
    border: 1px solid var(--panel-border); box-shadow: var(--panel-shadow);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.registry-card::after { content: ''; position: absolute; top: 0; left: 12%; right: 12%; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .7; }
.registry-card h3 { font-size: 1.35rem; margin-bottom: 10px; }
.registry-card p { color: var(--c-text); margin-bottom: 22px; }

/* Шаги обмена: последовательность — оправданная нумерация */
.step-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; gap: 0; }
.step-item { position: relative; padding: 48px 20px 0 0; }
.step-item::after { content: ''; position: absolute; top: 17px; left: 46px; right: 8px; height: 2px; background: var(--line-2); }
.step-item:last-child::after { display: none; }
.step-num {
    position: absolute; top: 0; left: 0; width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center; z-index: 1; background: var(--gold); color: #000;
    font: 700 .95rem 'Golos Text', sans-serif; box-shadow: 0 0 0 5px rgba(248, 206, 130, .28);
}
.step-item p { margin: 0; font-size: .95rem; color: var(--text); max-width: 22ch; }

/* Плитки-пояснения: разные размеры, а не сетка одинаковых карточек */
.tiles { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; }
.tile { padding: 26px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.tile-wide { background: var(--slate); border-color: transparent; color: #dfe3ea; box-shadow: var(--shadow-2); }
.tile-wide h3 { color: #fff; }
.tile svg { width: 26px; height: 26px; margin-bottom: 18px; fill: none; stroke: var(--gold-deep); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tile-wide svg { stroke: var(--gold); }
.tile h3 { font-size: 1.12rem; margin-bottom: 8px; }
.tile p { margin: 0; font-size: .94rem; color: var(--muted); }
.tile-wide p { color: #b7bfcc; }

/* ---------- Вход и регистрация ---------- */
.auth-page { position: relative; overflow: hidden; background: var(--chrome-solid); padding: 64px 24px 96px; display: flex; justify-content: center; align-items: flex-start; }
.auth-page::before { inset: -20% -10% -20% 20%; -webkit-mask-image: radial-gradient(closest-side, #000 20%, transparent 75%); mask-image: radial-gradient(closest-side, #000 20%, transparent 75%); }
.auth-card {
    position: relative; width: 100%; max-width: 460px; border-radius: var(--r-xl);
    background: linear-gradient(180deg, var(--panel-1), var(--panel-2));
    border: 1px solid var(--panel-border); box-shadow: var(--panel-shadow);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.auth-card.wide { max-width: 620px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 18px 18px 0; padding: 4px; border-radius: 14px; background: var(--chip-sunken-bg); border: 1px solid var(--c-line); }
.auth-tab { text-align: center; padding: 10px; border-radius: 10px; color: var(--c-muted); font-weight: 600; font-size: .95rem; transition: background .2s, color .2s; }
.auth-tab:hover { color: var(--c-heading); }
.auth-tab.active { background: var(--gold); color: #000; }
.auth-body { padding: 30px 32px 34px; }
.auth-title { font-size: 1.5rem; margin-bottom: 8px; }
.auth-form { margin-top: 22px; }
.auth-form .btn-block { margin-top: 10px; }
.resend-form { text-align: center; margin-top: 16px; }

/* ---------- Виджет обмена ---------- */
.exchange-hero .hero-inner { align-items: start; grid-template-columns: 450px 1fr; }
.widget {
    position: relative; overflow: hidden; border-radius: var(--r-xl);
    background: linear-gradient(180deg, var(--panel-1), var(--panel-2));
    border: 1px solid var(--panel-border); box-shadow: var(--panel-shadow);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.widget::before { content: ''; position: absolute; top: 0; left: 12%; right: 12%; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .75; }

.widget-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; margin: 18px 18px 0; padding: 4px; border-radius: 14px; background: var(--chip-sunken-bg); border: 1px solid var(--c-line); }
.widget-tabs[hidden] { display: none; }
.widget-tabs::before {
    content: ''; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 10px;
    background: var(--gold); box-shadow: 0 8px 18px -8px var(--gold-glow); transition: transform .32s var(--ease);
}
.widget-tabs[data-mode="sell"]::before { transform: translateX(100%); }
.widget-tab { position: relative; z-index: 1; padding: 11px; background: none; border: 0; color: var(--c-muted); font: 600 .98rem 'Golos Text', sans-serif; cursor: pointer; transition: color .2s; }
.widget-tab:hover { color: var(--c-heading); }
.widget-tab.active { color: #000; }

.widget-form { padding: 22px 22px 26px; }
.money-field { padding: 14px 16px; border-radius: var(--r-lg); background: var(--c-field-bg); border: 1px solid var(--c-line); transition: border-color .2s, box-shadow .2s; }
.money-field:focus-within { border-color: rgba(248, 206, 130, .6); box-shadow: 0 0 0 4px rgba(248, 206, 130, .12); }
.money-label { display: block; font-size: .8rem; color: var(--c-muted); margin-bottom: 6px; font-weight: 500; }
.money-row { display: flex; align-items: center; gap: 12px; }
.money-input {
    flex: 1; min-width: 0; padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important;
    color: var(--c-field-text); font: 600 1.75rem/1.15 'Golos Text', sans-serif !important; letter-spacing: -.01em; font-variant-numeric: tabular-nums;
}
.money-input::placeholder { color: var(--c-placeholder); }
#amount-to { color: var(--gold); }
#amount-to.tick { animation: tick .55s var(--ease); }
@keyframes tick { 0% { color: var(--gold-bright); text-shadow: 0 0 20px rgba(248, 206, 130, .7); } 100% { color: var(--gold); text-shadow: none; } }

/* Валюта: чип с монетой */
.coin {
    display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
    background: var(--stamp); color: #fff; font: 700 .85rem/1 'Golos Text', sans-serif;
}
.coin::before { content: attr(data-g); }
.coin-btc { background: #f7931a; }
.coin-eth { background: #627eea; }
.coin-usdt { background: #26a17b; }
.coin-rub { background: var(--stamp); color: var(--gold); }

.cur-select { position: relative; flex-shrink: 0; }
.cur-button {
    display: flex; align-items: center; gap: 9px; padding: 6px 12px 6px 6px; border-radius: 999px; cursor: pointer;
    background: var(--chip-bg); border: 1px solid var(--c-field-border); color: var(--c-heading);
    font: 600 .95rem 'Golos Text', sans-serif; transition: background .15s, border-color .15s;
}
.cur-button:hover { background: var(--chip-bg-hover); border-color: var(--gold-deep); }
.cur-menu {
    position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; max-height: 260px; overflow-y: auto; z-index: 30;
    list-style: none; margin: 0; padding: 6px; display: none; border-radius: var(--r-md);
    background: var(--overlay-bg); border: 1px solid var(--overlay-border); box-shadow: var(--panel-shadow);
}
.cur-menu.open { display: block; }
.cur-menu li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm); cursor: pointer; color: var(--c-text); font-size: .92rem; }
.cur-menu li:hover, .cur-menu li[aria-selected="true"] { background: var(--overlay-item-hover); color: var(--gold); }

.swap-line { display: flex; justify-content: center; margin: -8px 0; position: relative; z-index: 5; }
.swap-btn {
    width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1.05rem;
    background: var(--overlay-bg); border: 1px solid var(--gold-deep); color: var(--gold);
    box-shadow: 0 0 0 5px var(--panel-solid); transition: transform .3s var(--ease), background .2s, color .2s;
}
.swap-btn:hover { transform: rotate(180deg); background: var(--gold); color: #000; }

.rate-note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin: 16px 2px 2px; padding-top: 14px; border-top: 1px solid var(--c-line); }
.rate-line-main { font-size: .88rem; color: var(--c-text); font-variant-numeric: tabular-nums; }
.rate-line-sub { font-size: .8rem; color: var(--c-muted); }
.rate-bad { color: var(--c-danger); font-size: .88rem; }

.widget-form .field { margin: 18px 0 0; }
.widget-form .field .money-label { margin-bottom: 8px; }
.req-hint { font-size: .78rem; color: var(--c-muted); margin: 8px 2px 0; }
.widget-form .checkbox { margin: 16px 0 0; }
.widget-form .btn-block { margin-top: 22px; padding: 16px; font-size: 1.05rem; }
.widget-form .error { margin: 8px 2px 4px; }
.widget-empty-title { font-size: 1.2rem; margin-bottom: 10px; }
.widget-empty { color: var(--c-muted); margin: 0; }

/* Правая колонка: плашка курса — единственный запоминающийся элемент */
.exchange-intro h1 { font-size: clamp(1.6rem, 2.7vw, 2.1rem); line-height: 1.2; max-width: 24ch; }
.exchange-intro h1 .hl { color: var(--gold-text); white-space: nowrap; }
.plaque {
    position: relative; overflow: hidden; max-width: 520px; margin: 30px 0 0; padding: 30px 32px; border-radius: var(--r-xl);
    background: linear-gradient(160deg, var(--plate-1), var(--plate-2));
    border: 1px solid var(--panel-border); box-shadow: var(--panel-shadow);
}
.plaque::before { inset: -40%; -webkit-mask-image: radial-gradient(closest-side, #000 22%, transparent 76%); mask-image: radial-gradient(closest-side, #000 22%, transparent 76%); background-size: auto; }
.plaque > * { position: relative; }
.plaque-pair { font-size: .92rem; color: var(--c-muted); margin-bottom: 8px; }
.plaque-value { font: 700 clamp(2.3rem, 4.6vw, 3.4rem)/1.05 'PT Serif', Georgia, serif; color: var(--gold); letter-spacing: -.01em; font-variant-numeric: lining-nums tabular-nums; }
.plaque-foot { margin-top: 14px; font-size: .88rem; color: var(--c-muted); }
.exchange-intro .fact-strip { max-width: 520px; margin-top: 30px; }
.rate-terms {
    display: flex; gap: 14px; align-items: flex-start; max-width: 520px; margin: 18px 0 0; padding: 16px 20px 16px 18px;
    border-radius: var(--r-lg); border: 1px solid color-mix(in srgb, var(--gold-deep) 35%, transparent);
    border-left: 4px solid var(--gold-deep);
    background: color-mix(in srgb, var(--gold) 14%, transparent);
}
.rate-terms-icon { flex: none; margin-top: 2px; color: var(--gold-text); }
.rate-terms strong { display: block; margin-bottom: 4px; color: var(--c-heading); font-size: .95rem; letter-spacing: .01em; }
.rate-terms p { margin: 0; font-size: .88rem; line-height: 1.55; color: var(--c-text); }
.notice-block { max-width: 480px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--c-line); }
.notice-block p { color: var(--c-muted); font-size: .9rem; margin: 0 0 12px; }

/* Шлюз верификации */
.gate-steps { list-style: none; counter-reset: gate; margin: 18px 0 0; padding: 0; display: grid; gap: 16px; }
.gate-steps li { counter-increment: gate; position: relative; padding-left: 50px; min-height: 36px; display: flex; align-items: center; color: var(--c-muted); }
.gate-steps li::before {
    content: counter(gate); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center; border: 1.5px solid var(--c-field-border); font-weight: 600;
}
.gate-steps li.is-current { color: var(--c-heading); }
.gate-steps li.is-current::before { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 0 4px rgba(248, 206, 130, .16); }
.gate-steps li.is-done::before { content: '✓'; background: var(--gold); border-color: var(--gold); color: #000; }
.video-request-form { max-width: 380px; }

/* Выбор слота видеозвонка */
.slot-picker { max-width: 560px; }
.slot-hint { color: var(--c-muted); margin: 0 0 12px; font-size: .95rem; }
.slot-days { display: grid; gap: 14px; margin-bottom: 22px; max-height: 340px; overflow-y: auto; padding-right: 4px; }
.slot-day-title { display: block; font-weight: 600; color: var(--c-heading); margin-bottom: 8px; font-size: .9rem; }
.slot-list { display: flex; flex-wrap: wrap; gap: 8px; }
.slot-chip { position: relative; cursor: pointer; }
.slot-chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.slot-chip span {
    display: inline-block; padding: 8px 14px; border-radius: 999px; font-size: .92rem;
    border: 1.5px solid var(--c-field-border); color: var(--c-text); background: var(--c-field-bg);
    transition: border-color .15s, background .15s, color .15s;
}
.slot-chip:hover span { border-color: var(--gold); }
.slot-chip input:checked + span { border-color: var(--gold); background: var(--gold); color: #000; font-weight: 600; }
.slot-chip input:focus-visible + span { box-shadow: 0 0 0 4px rgba(248, 206, 130, .22); }

/* Лимит обмена + ИПДС */
.limit-panel { margin-top: 22px; padding: 18px 20px; border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-surface-2, rgba(255,255,255,.03)); }
.limit-panel-row { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0; color: var(--c-text); }
.limit-panel-row span { color: var(--c-muted); font-size: .92rem; }
.limit-panel-row strong { font-variant-numeric: tabular-nums; }
.limit-panel-accent strong { color: var(--gold); font-size: 1.15rem; }
.limit-panel-note { margin: 12px 0 0; font-size: .9rem; color: var(--c-muted); }
.ipds-link { background: none; border: 0; padding: 0; margin-left: 4px; color: var(--gold); cursor: pointer; text-decoration: underline; font-size: .9rem; font: inherit; }
.ipds-link:hover { color: var(--gold-bright); }

.limit-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 10px 0 18px; }
.limit-summary > div { padding: 12px 14px; border: 1px solid var(--c-line); border-radius: var(--r-sm); text-align: center; }
.limit-summary .limit-k { display: block; font-size: .8rem; color: var(--c-muted); }
.limit-summary .limit-v { display: block; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }

.ipds-memo { margin: 14px 0; }
.ipds-memo summary { cursor: pointer; color: var(--gold); font-weight: 600; }
.ipds-memo-body { margin-top: 10px; color: var(--c-text); font-size: .92rem; }
.ipds-memo-body ul { margin: 8px 0 0 18px; }

/* Модалка памятки ИПДС */
.ipds-modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; }
.ipds-modal[hidden] { display: none; }
.ipds-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.ipds-modal-box { position: relative; z-index: 1; max-width: 520px; width: calc(100% - 40px); max-height: 85vh; overflow-y: auto; background: var(--surface); color: var(--text); border-radius: var(--r-md); padding: 28px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.ipds-modal-box h3 { margin-top: 0; }
.ipds-modal-box ul { margin: 8px 0 18px 18px; }
.ipds-modal-close { position: absolute; top: 12px; right: 16px; background: none; border: 0; font-size: 1.6rem; line-height: 1; color: var(--muted); cursor: pointer; }

/* ---------- Кабинет ---------- */
.dashboard { padding: 52px 24px 88px; }
.dash-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; margin-bottom: 36px; }
.dash-card { padding: 26px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.dash-card h4 { font-size: 1.05rem; margin-bottom: 18px; }
.dl-plain { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 12px 22px; }
.dl-plain dt { color: var(--muted); font-size: .88rem; }
.dl-plain dd { margin: 0; font-variant-numeric: tabular-nums; }
.kyc-row { display: flex; align-items: center; gap: 20px; }
.kyc-info { flex: 1; min-width: 0; }
.kyc-info p { margin: 0 0 14px; }
.verify-checklist { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.verify-checklist li { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .92rem; color: var(--text); }

.dash-orders-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.dash-orders-head h4 { font-size: 1.35rem; }
.orders-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow: hidden; }
.orders-table { width: 100%; border-collapse: collapse; }
.orders-table th { text-align: left; padding: 12px 18px; font-weight: 500; font-size: .82rem; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.orders-table td { padding: 15px 18px; border-bottom: 1px solid var(--line); font-size: .93rem; }
.orders-table tbody tr:last-child td { border-bottom: 0; }
.orders-table tbody tr { cursor: pointer; transition: background .12s; }
.orders-table tbody tr:hover { background: var(--surface-2); }
.orders-table td.num-cell { text-align: right; font-variant-numeric: tabular-nums; }
.orders-table th:nth-child(3), .orders-table th:nth-child(4) { text-align: right; }

/* Статус: мягкие тонированные метки */
.status { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-new, .status-paid, .status-processing { background: var(--status-a-bg); color: var(--status-a-fg); }
.status-waiting_payment { background: var(--status-warn-bg); color: var(--status-warn-fg); }
.status-done { background: var(--status-ok-bg); color: var(--status-ok-fg); }
.status-cancelled { background: var(--status-bad-bg); color: var(--status-bad-fg); }
.status-expired { background: var(--status-mute-bg); color: var(--status-mute-fg); }

/* Печать подтверждения */
.seal { flex-shrink: 0; color: var(--stamp); opacity: .92; transform: rotate(-9deg); }
.seal .ring { fill: none; stroke: var(--stamp); }
.seal .ring-outer { stroke-width: 1.4; }
.seal .ring-inner { stroke-width: 1; }
.seal text { fill: var(--stamp); font-family: 'PT Serif', serif; letter-spacing: .12em; }
.seal .seal-arc { font-size: 9.5px; }
.seal .seal-center { font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.seal.seal-muted { opacity: .5; }
.seal.seal-muted .ring { stroke: #98a2b3; }
.seal.seal-muted text { fill: #98a2b3; }

/* ---------- Заявка ---------- */
.order-page { padding: 52px 24px 88px; }
.certificate { max-width: 680px; margin: 0 auto; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-2); }
.certificate-band { height: 4px; background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-deep)); }
.certificate-body { padding: 36px; }
.cert-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.cert-head h1 { font-size: 1.55rem; }
.order-num { display: block; margin-top: 6px; color: var(--muted); font-size: .92rem; }

/* Ход заявки: последовательность — нумерация оправдана */
.stepper { list-style: none; counter-reset: step; margin: 0 0 26px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.stepper li { counter-increment: step; position: relative; padding-top: 38px; font-size: .82rem; color: var(--muted); padding-right: 8px; }
.stepper li::before {
    content: counter(step); position: absolute; top: 0; left: 0; width: 28px; height: 28px; border-radius: 50%; z-index: 1;
    display: grid; place-items: center; background: var(--surface); border: 1.5px solid var(--line-2); color: var(--muted); font-weight: 600;
}
.stepper li::after { content: ''; position: absolute; top: 13px; left: 36px; right: 6px; height: 2px; background: var(--line); }
.stepper li:last-child::after { display: none; }
.stepper li.done::before { content: '✓'; background: var(--gold); border-color: var(--gold); color: #000; }
.stepper li.done::after { background: var(--gold); }
.stepper li.current { color: var(--heading); font-weight: 600; }
.stepper li.current::before { border-color: var(--gold-deep); color: var(--gold-text); box-shadow: 0 0 0 4px rgba(248, 206, 130, .3); }

/* Компактная замена степпера на узких экранах — 4 подписи туда не помещаются без переносов */
.stepper-compact { display: none; margin: 0 0 26px; }
.stepper-compact-bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.stepper-compact-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); transition: width .3s var(--ease); }
.stepper-compact p { margin: 10px 0 0; font-size: .86rem; color: var(--muted); }
.stepper-compact strong { color: var(--heading); }

.order-amounts {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px; margin-bottom: 26px; border-radius: var(--r-lg); color: #fff;
    background: linear-gradient(160deg, var(--slate), var(--night));
}
.order-amounts div { display: flex; flex-direction: column; gap: 6px; }
.order-amounts .muted { color: #98a0ae; font-size: .8rem; }
.order-amounts strong { font-size: 1.25rem; color: var(--gold); font-variant-numeric: tabular-nums; }
.order-amounts .arrow { color: var(--gold); font-size: 1.3rem; }

.pay-box { padding: 24px; margin-bottom: 26px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); }
.pay-box h3 { font-size: 1.1rem; margin-bottom: 10px; }
.requisites-row { display: flex; gap: 10px; align-items: stretch; margin: 14px 0; }
.requisites { flex: 1; min-width: 0; padding: 15px 16px; border-radius: var(--r-md); background: var(--night); color: var(--gold); font-size: 1rem; word-break: break-all; }
.copy-btn { flex-shrink: 0; padding: 0 18px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--surface); color: var(--heading); font: 600 .9rem 'Golos Text', sans-serif; cursor: pointer; transition: border-color .15s, background .15s; }
.copy-btn:hover { border-color: var(--gold-deep); }
.copy-btn.is-done { background: var(--gold); border-color: var(--gold); color: #000; }
.timebar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 12px 0 6px; }
.timebar span { display: block; height: 100%; width: 100%; background: var(--gold-deep); transition: width 1s linear, background .3s; }
.timebar.low span { background: var(--danger); }
/* Профиль: формы смены данных внутри карточек кабинета. */
.profile-form { margin: 14px 0 0; }
.profile-form .field { margin-bottom: 14px; }
.profile-form .field small { display: block; margin-top: 6px; font-size: .82rem; line-height: 1.35; }
.profile-divider { height: 1px; background: var(--line); margin: 22px 0 18px; }
.profile-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Страницы ошибок 404/403. */
.error-page { text-align: center; padding: 80px 16px; }
.error-page .error-code { font-size: 5rem; font-weight: 800; color: var(--gold); line-height: 1; }
.error-page h1 { margin: 10px 0 12px; }
.error-page .btn { margin-top: 20px; }

.pay-form { margin-top: 18px; }
/* Выбор скриншота перевода — под стиль остальных полей формы оплаты. */
.file-input { width: 100%; padding: 10px 12px; border-radius: var(--r-md); border: 1px dashed var(--line-2); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; }
.file-input:hover { border-color: var(--gold-deep); }
.file-input::file-selector-button { margin-right: 12px; padding: 6px 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface-2); color: var(--heading); font: 600 .85rem 'Golos Text', sans-serif; cursor: pointer; }
.pay-form .field small { display: block; margin-top: 6px; font-size: .82rem; line-height: 1.35; }
.timer { color: var(--heading); }

/* Оплата по реквизитам: QR + расшифровка реквизитов рядом. */
.pay-grid { display: flex; gap: 20px; align-items: flex-start; margin: 14px 0; }
.pay-qr { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.pay-qr img { width: 180px; height: 180px; border-radius: var(--r-md); background: #fff; padding: 10px; border: 1px solid var(--line-2); }
.pay-qr .muted { font-size: .8rem; line-height: 1.3; }
.pay-req { flex: 1; min-width: 0; }
.req-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 16px; }
.req-list dt { color: var(--muted); font-size: .9rem; }
/* Реквизиты переносим по словам, а посреди слова — только если оно само не
   помещается (длинный номер счёта). break-all рвал «обще/ство» и «от 1/4.10». */
.req-list dd { margin: 0; color: var(--heading); font-size: .8rem;
    overflow-wrap: anywhere; word-break: normal; }
.req-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.order-details { display: grid; grid-template-columns: 170px 1fr; gap: 12px 18px; margin: 0 0 26px; }
.order-details dt { color: var(--muted); font-size: .86rem; }
.order-details dd { margin: 0; word-break: break-word; color: var(--heading); font-variant-numeric: tabular-nums; }
.order-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.order-actions form { margin: 0; }

/* ---------- Юридические страницы ---------- */
.legal-page { max-width: 780px; margin: 0 auto; padding: 52px 24px 88px; }
.legal-card { padding: 40px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.legal-title { font-size: clamp(1.7rem, 3vw, 2.2rem); margin-bottom: 8px; }
.legal-updated { color: var(--muted); font-size: .86rem; margin: 0 0 28px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.legal-content p { margin: 0 0 16px; max-width: 68ch; line-height: 1.75; }
/* Заголовки разделов в офертах и согласиях — иначе документ на 8 тысяч знаков
   читается одной простынёй. */
.legal-content h2 { margin: 30px 0 14px; font-size: 1.05rem; letter-spacing: .02em;
    color: var(--c-heading); }
.legal-content h2:first-child { margin-top: 0; }

/* ---------- Подвал ---------- */
.site-footer { margin-top: 0; padding: 52px 0 30px; background: var(--chrome-solid); border-top: 1px solid var(--chrome-border); font-size: .9rem; color: var(--c-muted); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 32px; padding-bottom: 28px; border-bottom: 1px solid var(--c-line); }
.footer-col h4 { color: var(--c-heading); margin: 0 0 12px; font-size: 1rem; }
.footer-col p { margin: 4px 0; }
.footer-legal { padding-top: 22px; }
.footer-legal p { margin: 8px 0; font-size: .82rem; line-height: 1.65; max-width: 74ch; }
.legal-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 18px 0; }
.legal-links a { color: var(--c-muted); font-size: .8rem; }
.legal-links a:hover { color: var(--gold); }
.copyright { margin-top: 16px !important; }

/* ---------- Адаптив ---------- */
@media (max-width: 1240px) {
    .header-contact + .header-contact { display: none; }
}

@media (max-width: 900px) {
    .hero { padding: 44px 0 52px; }
    .hero-inner, .exchange-hero .hero-inner { grid-template-columns: 1fr; gap: 36px; }
    .hero::before { inset: -10% -30% auto -30%; height: 70%; }
    .widget { order: -1; }
    .nav, .header-contact { display: none; }
    .header-right { gap: 8px; }
    .header-inner { height: 64px; }
    .user-label { max-width: 110px; }
    .fact-strip { flex-direction: column; gap: 14px; }
    .fact-strip > div { border-left: 0; padding-left: 0; padding-top: 12px; border-top: 1px solid var(--line-dark); }
    .fact-strip > div:first-child { border-top: 0; padding-top: 0; }
    .step-strip { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
    .step-item::after { display: none; }
    .tiles { grid-template-columns: 1fr; }
    .dash-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .certificate-body { padding: 24px 20px; }
    .legal-card { padding: 26px 20px; }
    .messages { top: 74px; right: 16px; left: 16px; width: auto; }
}

/* Планшет/крупный телефон: шапка сертификата и суммы заявки начинают жаться —
   даём заголовку полную ширину и переносим значок/статус под него. */
@media (max-width: 640px) {
    .cert-head { flex-wrap: wrap; }
    .cert-head h1 { font-size: 1.3rem; }
    .cert-head > div:first-child { flex: 1 1 100%; }
    .cert-head .status, .cert-head .seal { margin-top: 2px; }
}

@media (max-width: 560px) {
    .user-label { display: none; }
    .user-btn { padding-right: 10px; }
    .header-right { gap: 6px; }

    /* Личные данные и цифры сумм — вертикально, иначе значения переносятся посреди строки */
    .dl-plain { grid-template-columns: 1fr; gap: 2px; }
    .dl-plain dt { margin-top: 10px; }
    .dl-plain dt:first-child { margin-top: 0; }

    .field-row { grid-template-columns: 1fr; }

    /* Степпер из 4 подписей не помещается без переносов — на телефоне
       показываем короткую строку с прогресс-баром вместо него. */
    .stepper { display: none; }
    .stepper-compact { display: block; }

    .order-amounts { flex-direction: column; align-items: stretch; gap: 14px; text-align: left; }
    .order-amounts .arrow { align-self: center; transform: rotate(90deg); }

    /* Таблица заявок: горизонтальный скролл на телефоне прятал статус и дату —
       превращаем строки в карточки, заголовки колонок — в мелкие подписи. */
    .orders-wrap { overflow: visible; box-shadow: none; border: none; background: none; }
    .orders-table, .orders-table tbody { display: block; width: 100%; }
    .orders-table thead { display: none; }
    .orders-table tr {
        display: flex; flex-wrap: wrap; align-items: center; column-gap: 14px; row-gap: 6px;
        padding: 16px; margin-bottom: 12px; border-radius: var(--r-lg);
        background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1);
    }
    .orders-table tbody tr:last-child { margin-bottom: 0; }
    .orders-table td { display: block; padding: 0; border: 0; font-size: .92rem; }
    .orders-table td::before { content: attr(data-label); display: block; font-size: .72rem; color: var(--muted); margin-bottom: 2px; font-weight: 500; }
    .orders-table td:nth-child(1) { order: 1; flex: 1 1 auto; }
    .orders-table td:nth-child(5) { order: 2; flex: 0 0 auto; }
    .orders-table td:nth-child(5)::before { display: none; }
    .orders-table td:nth-child(2) { order: 3; flex: 1 1 100%; }
    .orders-table td:nth-child(3) { order: 4; flex: 1 1 45%; }
    .orders-table td:nth-child(4) { order: 5; flex: 1 1 45%; }
    .orders-table td.num-cell { text-align: left; }
    .orders-table td:nth-child(6) { order: 6; flex: 1 1 100%; color: var(--muted); font-size: .82rem; margin-top: 2px; }
}

@media (max-width: 520px) {
    .requisites-row { flex-direction: column; }
    .pay-grid { flex-direction: column; align-items: center; }
    .copy-btn { padding: 12px; }
    .auth-body { padding: 24px 20px 28px; }
}

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

/* Страница видеозвонка: правая колонка с двумя карточками */
.hero-side { display: grid; gap: 20px; align-content: start; }
.call-rules { border-left: 4px solid var(--gold-deep); }
.call-rules h3 { margin-bottom: 14px; }
.call-rules-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.call-rules-list li { display: flex; gap: 14px; align-items: flex-start; color: var(--c-text); line-height: 1.5; }
.call-rules-list svg { flex: none; margin-top: 2px; color: var(--gold-text); }
.call-rules-list strong { color: var(--c-heading); }
