
/* =========================================================================
   Дизайн-система сайта обменника
   -------------------------------------------------------------------------
   Тёмная тема — основная, светлая переключается кнопкой в шапке и
   запоминается в браузере. Все цвета живут в переменных: чтобы сменить
   акцент на весь сайт, достаточно одного значения в панели.

   Порядок разделов: переменные → сброс → типографика → примитивы →
   шапка и подвал → главная → обмен → заявка → служебные страницы.
   ========================================================================= */

:root {
    /*
     * Тёмная тема — основная. Палитра деловая: графит и тёмно-синий.
     * Цветом выделяется только то, что требует действия или сообщает
     * состояние; всё остальное — оттенки серого. Так интерфейс читается
     * как рабочий инструмент, а не как витрина.
     */
    --bg:        #0f1319;
    --bg-soft:   #131820;
    --surface:   #171b23;
    --surface-2: #1d222c;
    --line:      #272d38;
    --line-soft: #1f242e;
    --text:      #e7eaf0;
    --text-dim:  #b0b8c6;
    --muted:     #8b95a5;
    /*
     * Три роли акцента, а не одна. --accent используется как ЦВЕТ ТЕКСТА
     * на тёмном, поэтому он светлый. --accent-solid — ФОН залитых кнопок,
     * на нём стоит белый текст, поэтому он тёмный. Одним значением обе
     * роли не закрыть: что читается как текст, то проваливается как фон.
     */
    --accent:    #7ea6f2;
    --accent-bright: #7ea6f2;
    --accent-solid: #2a5bd7;
    --accent-2:  #1f4bbd;
    --accent-ink:#ffffff;
    --accent-dim: rgba(126, 166, 242, .14);
    --ok:        #3f9e6b;
    --warn:      #c99a3c;
    --bad:       #cf5a5a;
    --info:      #4d7fe8;

    /*
     * Поля ввода — своя пара цветов, не общий серый фон.
     *
     * Раньше поле красилось в --bg-soft, то есть было темнее карточки, на
     * которой лежит. Получалась вмятина: место, куда вводят номер карты,
     * выглядело выключенным. Поле, наоборот, должно быть самым светлым
     * пятном в карточке — это единственное, с чем человек здесь работает.
     *
     * Рамка тоже своя и заметнее общей --line: у поля границу нужно
     * видеть, у разделителя — нет.
     */
    --field:      #1c212b;
    --field-line: #333c4b;

    /* Скругления сдержанные: круглые углы читаются как «потребительский»
       продукт, у делового интерфейса они меньше. */
    --r-sm: 5px;
    --r:    7px;
    --r-lg: 10px;
    --r-xl: 12px;

    --shadow:    0 1px 2px rgba(0,0,0,.34), 0 6px 20px rgba(0,0,0,.24);
    --shadow-sm: 0 1px 2px rgba(0,0,0,.26);

    /* Системный гротеск, без единого внешнего запроса. На странице, где
       вводят номер карты, лишний домен в сети — плохая идея; Inter стоит
       первым и подхватится, если он установлен у человека. */
    --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI",
            Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

    --wrap: 1140px;
    --head: 64px;
    /* Шкала размеров: одна на весь сайт. Раньше они ставились по месту
       инлайном, и на странице встречались заголовки 1rem и 1.02rem —
       такая разница читается не как замысел, а как небрежность. */
    --t-hero:    clamp(1.65rem, 1.15rem + 1.7vw, 2.35rem);
    --t-page:    clamp(1.4rem, 1.2rem + .7vw, 1.7rem);
    --t-section: clamp(1.2rem, 1.05rem + .6vw, 1.45rem);
    --t-card:    1rem;
    --t-sub:     .92rem;
    --t-small:   .86rem;
    --t-eyebrow: .68rem;
}

[data-theme="light"] {
    --bg:        #f7f8fa;
    --bg-soft:   #eef0f4;
    --surface:   #ffffff;
    --surface-2: #f4f6f9;
    --line:      #e0e4ea;
    --line-soft: #ebeef2;
    --text:      #11151c;
    --text-dim:  #3c4453;
    --muted:     #656e7d;
    --accent:    #1f4bbd;
    --accent-bright: #2a5bd7;
    --accent-solid: #1f4bbd;
    --accent-2:  #17399a;
    --accent-ink:#ffffff;
    --accent-dim: rgba(31, 75, 189, .10);
    --ok:        #2b6f4c;
    --warn:      #7a5a10;
    --bad:       #b3444a;
    --info:      #1f4bbd;

    /* В светлой теме поле просто белое: чистый лист под ввод. */
    --field:      #ffffff;
    --field-line: #cfd6e0;

    --shadow:    0 1px 2px rgba(16,24,40,.06), 0 6px 18px rgba(16,24,40,.07);
    --shadow-sm: 0 1px 2px rgba(16,24,40,.07);
}

/* --------------------------------------------------------------- фон */

/*
 | Фон страницы. Вариант выбирается в панели и приезжает в data-bg.
 |
 | Всё нарисовано градиентами: ни одной картинки. Фон виден на каждой
 | странице, и картинка стала бы самым тяжёлым файлом сайта ради того, что
 | человек почти не замечает.
 |
 | Рисунок лежит на псевдоэлементе body с fixed: он не прокручивается, не
 | перерисовывается при скролле и не мешает ни одному клику.
 */
body::before {
    content: ''; position: fixed; inset: 0; z-index: -1;
    pointer-events: none;
}
/* Выключенный фон не рисуем вовсе, а не делаем прозрачным: лишний слой на
   весь экран стоит перерисовки даже пустым. */
[data-bg="none"] body::before { display: none; }

/*
 | Дальше — сами варианты. Каждый заметен, но не спорит с содержимым:
 | рисунок держится в верхней части экрана и гаснет к низу, где идут
 | таблицы и формы. Фон, который читается наравне с текстом, — это уже не
 | фон, а помеха.
 |
 | Цвета берутся из переменных темы, поэтому все варианты работают и в
 | тёмной, и в светлой одинаково.
 */

/* Сетка — тонкие линии, самый спокойный вариант. */
[data-bg="mesh"] body::before {
    background-image:
        linear-gradient(color-mix(in srgb, var(--accent) 26%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, color-mix(in srgb, var(--accent) 26%, transparent) 1px, transparent 1px);
    background-size: 44px 44px;
    /* К низу гаснет: иначе сетка спорит с таблицами внизу страницы. */
    mask-image: linear-gradient(#000 0%, transparent 65%);
    -webkit-mask-image: linear-gradient(#000 0%, transparent 65%);
}

[data-bg="grid"] body::before {
    background-image:
        linear-gradient(color-mix(in srgb, var(--accent) 34%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, color-mix(in srgb, var(--accent) 34%, transparent) 1px, transparent 1px);
    background-size: 92px 92px;
    mask-image: radial-gradient(130% 90% at 50% 0%, #000, transparent 72%);
    -webkit-mask-image: radial-gradient(130% 90% at 50% 0%, #000, transparent 72%);
}

[data-bg="dots"] body::before {
    background-image: radial-gradient(color-mix(in srgb, var(--accent) 40%, transparent) 1.4px, transparent 1.5px);
    background-size: 24px 24px;
    mask-image: linear-gradient(#000 0%, transparent 72%);
    -webkit-mask-image: linear-gradient(#000 0%, transparent 72%);
}

/* Свечение акцентом сверху — так делают почти все крипто-сервисы, и
   человек читает это как «здесь начало». */
[data-bg="glow"] body::before {
    background: radial-gradient(100% 62% at 50% -14%,
        color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%);
}

[data-bg="aurora"] body::before {
    background:
        radial-gradient(58% 42% at 12% -8%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 68%),
        radial-gradient(52% 38% at 88% 2%, color-mix(in srgb, var(--ok) 26%, transparent), transparent 68%),
        radial-gradient(70% 46% at 50% 34%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 72%);
}

[data-bg="beams"] body::before {
    background:
        linear-gradient(76deg, transparent 40%, color-mix(in srgb, var(--accent) 22%, transparent) 50%, transparent 60%),
        linear-gradient(104deg, transparent 42%, color-mix(in srgb, var(--accent) 16%, transparent) 50%, transparent 58%);
    mask-image: linear-gradient(#000 0%, transparent 80%);
    -webkit-mask-image: linear-gradient(#000 0%, transparent 80%);
}

[data-bg="rings"] body::before {
    background: repeating-radial-gradient(circle at 50% -16%,
        color-mix(in srgb, var(--accent) 30%, transparent) 0 1.2px, transparent 1.2px 84px);
    mask-image: radial-gradient(90% 70% at 50% 0%, #000, transparent 74%);
    -webkit-mask-image: radial-gradient(90% 70% at 50% 0%, #000, transparent 74%);
}

[data-bg="waves"] body::before {
    background: repeating-linear-gradient(-8deg,
        transparent 0 34px, color-mix(in srgb, var(--accent) 24%, transparent) 34px 35.4px);
    mask-image: linear-gradient(#000 0%, transparent 68%);
    -webkit-mask-image: linear-gradient(#000 0%, transparent 68%);
}

/* Шум — единственный вариант с картинкой, и та нарисована прямо в строке
   стилей: пара сотен байт вместо файла. */
[data-bg="noise"] body::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: .12;
}
[data-theme="light"][data-bg="noise"] body::before { opacity: .07; }

[data-bg="corner"] body::before {
    background:
        radial-gradient(48% 44% at 0% 0%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 72%),
        radial-gradient(48% 44% at 100% 100%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 72%);
}

/* --------------------------------------------------------------- сброс */

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

/* Обводка идёт по центру линии, поэтому у иконки, чей рисунок касается края
   поля, срезается половина штриха. Разрешаем SVG выходить за свою рамку —
   это ровно полпикселя и ничего не ломает в раскладке. */
svg { overflow: visible; }

/* Значок внутри круглой кнопки или плашки ставим блоком.
   Инлайновый svg стоит на базовой линии текста и получает под собой место
   под «хвосты» букв — из-за этого рисунок смещается вверх на пару пикселей
   даже при идеально симметричном контуре. Проще перечислить места, где
   значок центрируется, чем ловить перекос по одному.

   Сами держатели значков — flex, а не grid. В grid переносы строк вокруг
   PHP-условия становятся отдельной ячейкой, значок уезжает в первую строку
   и висит у верхнего края; flex пробельные узлы просто игнорирует. */
.pick-mark svg, .ex-arrow svg, .swap-turn svg, .tg-ico svg,
.promo-ico svg, .perk-ico svg, .perk-check svg, .feature-ico svg { display: block; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.58 var(--sans);
    /* Табличные цифры: суммы и курсы в колонках не «пляшут». */
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

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

::selection { background: var(--accent-solid); color: var(--accent-ink); }

/* Скроллбар в тон теме — иначе на тёмном фоне светлая полоса режет глаз. */
* { scrollbar-color: var(--line) transparent; scrollbar-width: thin; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }

/* --------------------------------------------------------- типографика */

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.015em; line-height: 1.24; }
h1 { font-size: var(--t-hero); }
h2 { font-size: var(--t-section); }
h3 { font-size: var(--t-card); }
p  { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.h-page    { font-size: var(--t-page); }
.h-section { font-size: var(--t-section); }
.h-card    { font-size: var(--t-card); }

.eyebrow {
    display: block; font-size: var(--t-eyebrow); font-weight: 600;
    letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
    margin-bottom: 8px;
}
.section-sub { color: var(--muted); font-size: var(--t-sub); margin: 7px 0 0; max-width: 62ch; }

.lead { font-size: 1rem; color: var(--text-dim); }
.text-sm { font-size: var(--t-small); }
.text-xs { font-size: .8rem; }

/* Денежная величина и её единица: раньше суммы на странице заявки и в
   резервах отличались на десятую доли рема без причины. */
.figure { font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.figure-unit { font-weight: 500; font-size: .85rem; color: var(--muted); }
.label-xs { font-size: .8rem; color: var(--muted); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .92em; }
.nowrap { white-space: nowrap; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section-sm { padding: 34px 0; }

.section-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 16px 24px; flex-wrap: wrap; margin-bottom: 22px;
}
.section-head > div { min-width: 0; }
.section-head p { color: var(--muted); margin: 7px 0 0; font-size: var(--t-sub); max-width: 62ch; }

/* ---------------------------------------------------------- примитивы */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 22px;
}
.card-soft { background: var(--surface-2); border-color: var(--line-soft); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; border: 1px solid transparent; border-radius: var(--r);
    background: var(--accent-solid); color: var(--accent-ink);
    font-weight: 600; font-size: .95rem; line-height: 1;
    transition: transform .12s ease, filter .12s ease, background .12s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 15px 28px; font-size: 1rem; width: 100%; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); filter: none; }
.btn-quiet { background: var(--surface-2); border-color: var(--line); color: var(--text-dim); }
.btn[disabled] { opacity: .5; pointer-events: none; }

.field { display: block; margin-bottom: 16px; }
.field > label,
.label {
    display: block; font-size: .8rem; font-weight: 500;
    color: var(--muted); margin-bottom: 6px; letter-spacing: .01em;
}

.input, input[type="text"], input[type="email"], input[type="tel"],
input[type="date"], input[type="password"], select, textarea {
    width: 100%; padding: 12px 14px;
    background: var(--field); color: var(--text);
    border: 1px solid var(--field-line); border-radius: var(--r);
    font: inherit; font-size: .96rem;
    /* Едва заметная внутренняя тень сверху: поле читается как углубление,
       в которое пишут, а не как ещё одна кнопка. */
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .06);
    transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
}
/* Подсветки рамки под курсором намеренно нет.
   Правило `input:hover` цепляло и флажки согласий, у которых своя вёрстка,
   и при проводке мышью по форме поля заметно дёргались. Показывать, где
   стоит курсор, поле и так умеет — фокусом. */
.input:focus, input:focus, select:focus, textarea:focus {
    /* Кольцо, а не только рамка: в длинной форме видно, где ты стоишь,
       даже боковым зрением. */
    /* Фон при фокусе НЕ меняем.
       Раньше поле подсвечивалось «своим светлым», но в светлой теме этот
       светлый совпадал с цветом карточки: поле сливалось с ней, и от него
       оставалась одна тонкая линия — выглядело так, будто разметка вокруг
       пропала. Фокус показывают цвет рамки и кольцо, фону меняться незачем. */
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .75; }
textarea { min-height: 92px; resize: vertical; line-height: 1.55; }
select { appearance: none; background-image: none; }

.hint { font-size: .8rem; color: var(--muted); margin-top: 6px; }

/* Заголовок, спрятанный от глаз, но не от читалок: странице нужен один
   h1, а рисовать его над подписанными колонками незачем. */
.vis-hidden {
    position: absolute; width: 1px; height: 1px; margin: -1px;
    padding: 0; border: 0; overflow: hidden; white-space: nowrap;
    clip: rect(0 0 0 0); clip-path: inset(50%);
}

/* --- форма заявки ------------------------------------------------------ */

/* Реквизиты и комментарий занимают строку целиком: в них длинные значения,
   и в половине колонки адрес кошелька пришлось бы прокручивать. */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.fields .field { margin-bottom: 0; }
.field-wide { grid-column: 1 / -1; }
@media (max-width: 700px) { .fields { grid-template-columns: 1fr; } }

.field > label { display: flex; align-items: baseline; gap: 8px; }
/* Пометка тише подписи: обязательных полей в форме больше, и «необязательно»
   не должно перетягивать взгляд на себя четыре раза подряд. */
.field-flag {
    font-size: .72rem; font-weight: 400; color: var(--muted); opacity: .75;
}
.field-flag::before { content: '· '; }

/* Значок слева — опора для глаза в длинной форме. Он именно подсказка,
   поэтому кликов не ловит: нажатие проходит сквозь него в поле. */
.field-box { position: relative; display: block; }
.field-ico {
    position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
    width: 17px; height: 17px; color: var(--muted); pointer-events: none;
    transition: color .12s ease;
}
.field-ico svg { width: 100%; height: 100%; display: block; }
.field-box-tall .field-ico { top: 15px; transform: none; }

.field-box input, .field-box select, .field-box textarea { padding-left: 40px; }
.field-box:focus-within .field-ico { color: var(--accent); }

/* Свою стрелку рисуем потому, что системная у select не поддаётся теме
   и в тёмной остаётся светлым пятном. */
.field-caret {
    position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
    color: var(--muted); pointer-events: none; display: block;
}
.field-box select { padding-right: 38px; }

.field-box input.mono, .field-box textarea.mono { font-size: .9rem; letter-spacing: .01em; }

.error-text { font-size: .8rem; color: var(--bad); margin-top: 6px; }

.tag {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 11px; border-radius: 99px;
    font-size: .78rem; font-weight: 600; letter-spacing: .01em;
    background: var(--surface-2); color: var(--text-dim); border: 1px solid var(--line);
}
.tag-ok   { background: rgba(63,158,107,.13);  color: var(--ok);   border-color: transparent; }
.tag-warn { background: rgba(201,154,60,.14); color: var(--warn); border-color: transparent; }
.tag-bad  { background: rgba(207,90,90,.13);  color: var(--bad);  border-color: transparent; }
.tag-info { background: rgba(77,127,232,.13); color: var(--info); border-color: transparent; }
.tag-accent { background: var(--accent-dim); color: var(--accent); border-color: transparent; }

.dot { width: 7px; height: 7px; border-radius: 99px; background: currentColor; flex: none; }
.dot-live { box-shadow: 0 0 0 0 currentColor; animation: pulse 2.4s infinite; }
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(63,158,107,.55); }
    70%  { box-shadow: 0 0 0 7px rgba(63,158,107,0); }
    100% { box-shadow: 0 0 0 0 rgba(63,158,107,0); }
}

.alert {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 16px; border-radius: var(--r); font-size: .93rem;
    border: 1px solid var(--line); background: var(--surface-2); margin-bottom: 14px;
}
.alert svg { flex: none; margin-top: 2px; }
.alert-bad  { border-color: rgba(207,90,90,.35);  background: rgba(207,90,90,.09);  color: var(--text); }
.alert-ok   { border-color: rgba(63,158,107,.35);  background: rgba(63,158,107,.09); }
.alert-warn { border-color: rgba(201,154,60,.35); background: rgba(201,154,60,.09); }

.ccy {
    width: 34px; height: 34px; flex: none; border-radius: 99px;
    background: var(--surface-2); border: 1px solid var(--line);
    display: grid; place-items: center; overflow: hidden;
}
/*
 | Значок занимает кружок целиком.
 |
 | Раньше картинка вписывалась в 22 из 34 точек: круглые монетные логотипы
 | от этого только теряли в размере, а квадратные — банковские — висели
 | маленьким квадратом посреди круглой рамки, и было видно, что это две
 | разные фигуры. Картинка растягивается на всю рамку и обрезается по её
 | форме: у круглых логотипов обрезать нечего, у квадратных срезаются углы,
 | и оба выглядят одинаково.
 */
.ccy img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
/* Значок без картинки: буквы кода на своём цвете. Оттенок считается из кода
   валюты, поэтому у BTC он всегда один и тот же, а список не выглядит серым. */
.ccy-text {
    font-size: .6rem; font-weight: 600; letter-spacing: -.02em; line-height: 1;
    /* Оттенок считается из кода валюты, но насыщенность низкая: значки
       должны различаться, а не пестрить. */
    color: hsl(var(--coin-h, 220) 26% 78%);
    border-color: hsl(var(--coin-h, 220) 22% 42% / .4);
    background: hsl(var(--coin-h, 220) 20% 24%);
}
[data-theme="light"] .ccy-text {
    color: hsl(var(--coin-h, 220) 30% 32%);
    border-color: hsl(var(--coin-h, 220) 22% 72%);
    background: hsl(var(--coin-h, 220) 30% 93%);
}
.ccy-sm.ccy-text { font-size: .5rem; }
.ccy-lg.ccy-text { font-size: .72rem; }
.ccy-sm { width: 26px; height: 26px; }
.ccy-lg { width: 46px; height: 46px; }

.divider { height: 1px; background: var(--line); border: 0; margin: 22px 0; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
@media (max-width: 420px) {
    .brand { font-size: .98rem; }
}

/* ------------------------------------------------------------- шапка */

.header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
}
@supports not (backdrop-filter: blur(1px)) { .header { background: var(--bg); } }

.header-bar { display: flex; align-items: center; gap: 20px; height: var(--head); }

.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: -.02em; font-size: 1.06rem; white-space: nowrap; }
/* Загруженный логотип: высоту задаём мы, ширину — картинка, иначе узкий
   или широкий файл ломает шапку. */
/* --- кабинет ------------------------------------------------------------ */

/* Ссылки кабинета отделены от разделов сайта: это вход в свою часть, а не
   ещё один пункт меню. */
.acc-links { display: flex; align-items: center; gap: 4px; }
.acc-links a {
    padding: 7px 11px; border-radius: var(--r); color: var(--muted);
    font-size: .86rem; font-weight: 500; white-space: nowrap;
    transition: color .14s ease, background .14s ease;
}
.acc-links a:hover { color: var(--text); background: var(--bg-soft); text-decoration: none; }
.acc-links a.on { color: var(--accent); }
.acc-links a.acc-cta {
    color: var(--accent-ink, #fff); background: var(--accent-solid);
}
.acc-links a.acc-cta:hover { filter: brightness(1.06); background: var(--accent-solid); }
@media (max-width: 1040px) { .acc-links a:not(.acc-cta):not(.on) { display: none; } }

.acc-grid { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 860px) { .acc-grid { grid-template-columns: 1fr; } }

.acc-menu { display: flex; flex-direction: column; gap: 2px; }
.acc-menu a {
    padding: 10px 13px; border-radius: var(--r); color: var(--text-dim); font-size: .92rem;
}
.acc-menu a:hover { background: var(--bg-soft); text-decoration: none; }
.acc-menu a.on { background: var(--accent-dim); color: var(--accent); font-weight: 600; }
@media (max-width: 860px) { .acc-menu { flex-direction: row; flex-wrap: wrap; } }

.acc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.acc-stat { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
.acc-stat b { display: block; font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; }
.acc-stat span { font-size: .8rem; color: var(--muted); }

.acc-auth { max-width: 420px; margin: 0 auto; }

/* --- переписка с оператором --------------------------------------------- */

.msg-list { display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 78%; padding: 12px 15px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--card); }
/* Свои сообщения справа, ответы оператора слева — переписка читается как
   переписка, без подписи к каждой реплике. */
.msg-mine { margin-left: auto; background: var(--accent-dim); border-color: transparent; }
.msg-who { font-size: .74rem; color: var(--muted); margin-bottom: 5px; }
.msg-body { white-space: pre-wrap; line-height: 1.55; }
@media (max-width: 600px) { .msg { max-width: 92%; } }

.brand-logo { height: 28px; width: auto; display: block; }
@media (max-width: 480px) { .brand-logo { height: 24px; } }

.brand-mark {
    width: 32px; height: 32px; border-radius: 10px; flex: none;
    background: linear-gradient(140deg, var(--accent), var(--accent-2));
    color: var(--accent-ink); display: grid; place-items: center;
    font-weight: 800; font-size: 1rem;
}

.nav { display: flex; align-items: center; gap: 2px; margin-left: 10px; }
.nav a {
    padding: 8px 12px; border-radius: var(--r-sm);
    color: var(--muted); font-size: .92rem; font-weight: 500;
    transition: color .12s ease, background .12s ease;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.on { color: var(--text); background: var(--surface-2); }

.header-side { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.icon-btn {
    width: 36px; height: 36px; border-radius: var(--r-sm);
    border: 1px solid var(--line); background: var(--surface);
    color: var(--text-dim); display: grid; place-items: center;
    transition: color .12s ease, border-color .12s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--muted); }

.lang { display: flex; gap: 1px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 2px; }
.lang a { padding: 5px 9px; border-radius: 6px; font-size: .76rem; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.lang a.on { background: var(--accent-solid); color: var(--accent-ink); }

.burger { display: none; }
@media (max-width: 900px) {
    .nav { display: none; }
    .burger { display: grid; }
    .nav.open {
        display: flex; flex-direction: column; align-items: stretch; gap: 2px;
        position: absolute; left: 12px; right: 12px; top: calc(var(--head) - 4px);
        background: var(--surface); border: 1px solid var(--line);
        border-radius: var(--r-lg); padding: 10px; box-shadow: var(--shadow); margin: 0;
    }
    .nav.open a { padding: 11px 14px; }

    /* Кабинет и языки уезжают в меню: в строке для них места нет, а
       выкидывать их совсем значит спрятать вход в кабинет на телефоне. */
    .header-side .acc-links,
    .header-side .lang { display: none; }
    .nav.open .nav-extra { display: flex; }
}

/* Второй экземпляр ссылок кабинета — только внутри раскрытого меню. */
.nav-extra {
    display: none; flex-wrap: wrap; align-items: center; gap: 4px;
    margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line-soft);
}
.nav-extra a { padding: 11px 14px; }
.nav-lang { display: flex; gap: 1px; margin-left: auto; background: var(--surface-2); border-radius: var(--r-sm); padding: 2px; }
.nav-lang a { padding: 7px 10px; border-radius: 6px; font-size: .76rem; font-weight: 600; text-transform: uppercase; }
.nav-lang a.on { background: var(--accent-solid); color: var(--accent-ink); }

/* --- акция и Telegram --------------------------------------------------- */

/* Блок акции стоит на главной там, где раньше был баннер. Всего одна
   строка: форма обмена должна остаться в первом экране, ради неё сюда и
   приходят. Разметка отдаётся скрытой и показывается скриптом — так она
   не мигает у того, кто акцию уже закрыл. */
.promo-wrap { padding: 22px 0 0; }
.promo {
    position: relative; overflow: hidden;
    display: flex; align-items: center; gap: 16px;
    padding: 18px 22px; border-radius: var(--r-xl);
    background: linear-gradient(105deg, var(--accent-2) 0%, var(--accent-solid) 62%, var(--accent-solid) 100%);
    color: var(--accent-ink, #fff);
    box-shadow: var(--shadow-sm);
}

/* Блик и сетка поверх заливки. Плоский прямоугольник цвета кнопки читался
   как системное уведомление; лёгкая фактура превращает его обратно в
   предложение. Рисуется двумя фонами, без единой картинки. */
.promo-glow {
    position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(120% 180% at 88% 0%, rgba(255,255,255,.22), transparent 60%),
        radial-gradient(90% 160% at 8% 110%, rgba(255,255,255,.12), transparent 55%);
}
.promo-glow::after {
    content: ''; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
    background-size: 34px 34px;
    /* Сетка гаснет к правому краю, чтобы не лезть под кнопку. */
    mask-image: linear-gradient(100deg, #000 0%, transparent 62%);
    -webkit-mask-image: linear-gradient(100deg, #000 0%, transparent 62%);
}

/* Значок в кружке: без него текст висел прямо на градиенте и выглядел
   недоделанным. */
.promo-ico {
    position: relative; flex: none;
    width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .16);
}
.promo-text { position: relative; display: grid; gap: 3px; min-width: 0; }
.promo-text b { font-size: 1.08rem; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; }
/* Уточнение тише самой акции: оно про условия, а не про предложение. */
.promo-note { font-size: .88rem; opacity: .85; }

.promo-cta {
    position: relative; margin-left: auto; flex: none;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 20px; border-radius: 99px;
    background: #fff; color: var(--accent-2);
    font-size: .92rem; font-weight: 700; white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .16);
    transition: transform .14s ease, box-shadow .14s ease;
}
.promo-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0, 0, 0, .22); text-decoration: none; }
.promo-cta svg { display: block; }

@media (max-width: 700px) {
    .promo { flex-wrap: wrap; gap: 12px; padding: 16px; }
    .promo-ico { width: 38px; height: 38px; }
    /* Кнопка уходит на свою строку и растягивается: прижатая к краю рядом
       с длинным текстом она сжималась до нечитаемой. */
    .promo-cta { margin-left: 0; width: 100%; justify-content: center; }
}

/* Карточка подписки в колонке страницы обмена. Спокойнее акции: это не
   предложение, а приглашение, и перебивать собой кнопку «Создать заявку»
   она не должна. */
.tg-card {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; border-radius: var(--r-lg);
    background: var(--surface); border: 1px solid var(--line);
    color: var(--text);
    transition: border-color .14s ease;
}
.tg-card:hover { border-color: var(--accent); text-decoration: none; }
.tg-ico {
    flex: none; width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-dim); color: var(--accent);
}
.tg-body { display: grid; gap: 2px; min-width: 0; }
.tg-body b { font-size: .94rem; font-weight: 600; }
.tg-body span { font-size: .8rem; color: var(--muted); line-height: 1.4; }
.tg-cta { margin-left: auto; flex: none; font-size: .84rem; font-weight: 600; color: var(--accent); white-space: nowrap; }

@media (max-width: 420px) { .tg-cta { display: none; } }

/* Тонкая строка статуса оператора над шапкой. */
.topline {
    background: var(--surface-2); border-bottom: 1px solid var(--line-soft);
    font-size: .82rem; color: var(--muted);
}
/* Высота минимальная, а не фиксированная: при переносе третий элемент
   вылезал за пределы строки и оказывался под шапкой — на телефоне из-под
   логотипа торчала половина ссылки. */
.topline .wrap { display: flex; align-items: center; gap: 6px 18px; min-height: 34px; padding-top: 5px; padding-bottom: 5px; flex-wrap: wrap; }
.topline b { color: var(--text-dim); font-weight: 600; }
/* На телефоне ссылка на Telegram из строки уходит: она есть и в подвале,
   и в меню, а здесь занимала целую вторую строку над шапкой. */
@media (max-width: 620px) { .topline a { display: none; } }

/* ------------------------------------------------------------- главная */

/* Значок кнопки темы: солнце в тёмной теме, месяц в светлой. */
.i-sun, .i-moon { display: block; }
.i-moon { display: none; }
[data-theme="light"] .i-sun { display: none; }
[data-theme="light"] .i-moon { display: block; }

/* Выбор пары теперь первый на странице, поэтому ему нужен воздух сверху:
   раньше отступ давал баннер над ним, и шести пикселей хватало. */
.picker-section { padding-top: 26px; }
@media (max-width: 560px) { .picker-section { padding-top: 16px; } }

.tag-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); }
.tag-link:hover { border-color: var(--accent); text-decoration: none; }

/* --- виджет обмена --- */

.swap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 20px; box-shadow: var(--shadow); }
.swap-row { position: relative; display: grid; gap: 10px; }

/* Панель суммы — то же поле ввода, только крупное: тот же фон и та же
   рамка, что у остальных полей формы, иначе форма выглядит собранной из
   двух разных наборов. */
.swap-panel {
    background: var(--field); border: 1px solid var(--field-line); border-radius: var(--r-lg);
    padding: 14px 16px; transition: border-color .12s ease, box-shadow .12s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .06);
}
.swap-panel:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}
.swap-panel .label { margin-bottom: 8px; }
.swap-line { display: flex; align-items: center; gap: 12px; }

/* Поле суммы — само по себе не поле: рамку и фон рисует панель вокруг
   него. Селектор с двумя классами взят не для красоты: общее правило для
   полей записано как `input[type="text"]`, и по весу оно перебивало один
   класс — внутри панели рисовалось второе поле со своей рамкой. */
.swap-line .swap-amount {
    flex: 1; min-width: 0; border: 0; background: transparent; padding: 0;
    font-size: 1.6rem; font-weight: 600; letter-spacing: -.02em; color: var(--text);
    box-shadow: none;
}
.swap-line .swap-amount:focus { outline: none; background: transparent; border: 0; box-shadow: none; }

/* Стрелка между панелями. Лежит поверх зазора и вырезана из подложки
   кольцом того же цвета, что фон карточки, — иначе она выглядела бы
   приклеенной к одной из панелей. */
.swap-turn {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    z-index: 1; width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface); border: 3px solid var(--card, var(--surface));
    color: var(--accent);
    box-shadow: 0 0 0 1px var(--field-line);
}

/* Границы направления: три равные ячейки, подпись над числом. */
.swap-facts {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1px; margin-top: 14px;
    background: var(--line); border: 1px solid var(--line);
    border-radius: var(--r); overflow: hidden;
}
.swap-facts .fact { display: grid; gap: 3px; padding: 10px 14px; background: var(--surface); }
.swap-facts span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.swap-facts b { font-size: .95rem; color: var(--text); font-weight: 700; letter-spacing: -.01em; }
/* Код валюты тише самого числа: сравнивают числа, а код у всей строки
   один и тот же. */
.swap-facts i { font-style: normal; font-weight: 600; color: var(--muted); font-size: .84rem; }

.swap-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 2px; font-size: .85rem; color: var(--muted); }
.swap-meta > span { white-space: nowrap; }
.swap-meta b { color: var(--text-dim); font-weight: 600; }

/* --- карточки направлений --- */

.pairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 14px; }

.pair {
    display: block; padding: 18px; border-radius: var(--r-lg);
    background: var(--surface); border: 1px solid var(--line);
    transition: border-color .14s ease, transform .14s ease, box-shadow .14s ease;
}
.pair:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.pair-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.pair-arrow { color: var(--muted); flex: none; }
.pair-name { font-size: var(--t-small); color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pair-rate { font-size: 1rem; font-weight: 600; letter-spacing: -.01em; margin-bottom: 10px; line-height: 1.35; }
.pair-meta { display: flex; justify-content: space-between; gap: 10px; font-size: .8rem; color: var(--muted); }
.pair-meta b { color: var(--text-dim); font-weight: 600; }

/* --- шаги и преимущества --- */


.feature { padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.feature-ico { width: 38px; height: 38px; border-radius: 11px; background: var(--accent-dim); color: var(--accent); display: grid; place-items: center; margin-bottom: 13px; }
.feature h3 { font-size: var(--t-card); margin-bottom: 6px; }
.feature p { font-size: var(--t-small); color: var(--muted); margin: 0; line-height: 1.55; }

/* --- отзывы --- */

.review { padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.review-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.review-name { font-weight: 600; }
.stars { color: var(--warn); font-size: .9rem; letter-spacing: 1px; }
.review p { font-size: var(--t-small); color: var(--text-dim); margin: 0; line-height: 1.6; }
.review-src { font-size: .76rem; color: var(--muted); margin-top: 10px; }

/* --- таблица курсов --- */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 640px; }
table.data th, table.data td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line-soft); }
table.data th { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: var(--surface-2); }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background .1s ease; }
table.data tbody tr:hover { background: var(--surface-2); }
/* Название валюты в строке курса не переносим: из-за переноса соседние
   строки получались разной высоты и таблица шла «лесенкой». Если места
   совсем нет, таблица прокручивается вбок — это честнее, чем рваная сетка. */
.cell-pair { display: flex; align-items: center; gap: 9px; white-space: nowrap; }

/* -------------------------------------------------------------- обмен */

/* Шапка направления: две равные плашки и стрелка ровно между ними.
   Стороны обмена симметричны по смыслу, поэтому и по вёрстке они
   одинаковые — колонки равной ширины, а не строка, где стрелка стоит
   там, куда её вытолкнули длинные названия. */
.ex-head {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch;
    gap: 12px; margin: 0 0 24px; font-size: 1rem; font-weight: 400;
}
.ex-leg {
    display: flex; align-items: center; justify-content: center; gap: 12px; min-width: 0;
    padding: 16px 18px; border-radius: var(--r-xl);
    background: var(--surface); border: 1px solid var(--line);
}
/* Вторая плашка зеркальна первой: значки смотрят наружу, названия — к
   стрелке. Так пара читается как одно движение слева направо. */
.ex-leg:last-child { flex-direction: row-reverse; text-align: right; }
.ex-leg-body { display: grid; gap: 2px; min-width: 0; }
.ex-leg-name {
    font-size: 1.08rem; font-weight: 700; letter-spacing: -.015em; line-height: 1.25;
    overflow-wrap: anywhere;
}
/* Подпись «Отдаёте» снимает вопрос, какая сторона какая: одной стрелки
   для этого мало, особенно когда пара из двух незнакомых имён. */
.ex-leg-code { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }

.ex-arrow {
    align-self: center; flex: none;
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-solid); color: var(--accent-ink, #fff);
}

/* Плашка курса — первая строка «Расчёта заявки». */
.ex-rate {
    display: grid; gap: 2px; justify-items: center; text-align: center;
    margin-bottom: 18px; padding: 12px 14px; border-radius: var(--r);
    background: var(--accent-dim); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.ex-rate-label { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); }
.ex-rate-line { display: flex; align-items: baseline; justify-content: center; gap: 6px; flex-wrap: wrap; font-size: 1.2rem; }
.ex-rate-line b { font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ex-rate-code { font-size: .82rem; font-weight: 600; color: var(--text-dim); }
/* Приглушённый серый берём на тон темнее обычного: подложка плашки
   подкрашена акцентом, и на ней --muted не дотягивает до 4.5:1. */
.ex-rate-eq { color: var(--text-dim); }

/* На телефоне плашки встают друг под друга, и стрелка разворачивается
   вниз — иначе она указывала бы вбок, в пустоту. Зеркальность второй
   плашки при этом снимается: в столбик обе читаются одинаково. */
@media (max-width: 700px) {
    .ex-head { grid-template-columns: 1fr; gap: 8px; }
    .ex-leg { padding: 14px 16px; }
    .ex-leg:last-child { flex-direction: row; text-align: left; }
    .ex-arrow { transform: rotate(90deg); width: 30px; height: 30px; justify-self: center; }
}

.ex-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 980px) { .ex-grid { grid-template-columns: 1fr; } }

.ex-side { position: sticky; top: calc(var(--head) + 18px); display: grid; gap: 14px; }

/* Расчёт заявки — как чек: строка на каждое списание, итог отбит линией.
   Так клиент видит, из чего сложилась сумма, а не одну цифру «итого». */
.receipt { padding-top: 18px; }
.receipt-h {
    margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}

.sum { display: grid; gap: 0; margin: 0; }
.sum-row {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 14px; padding: 7px 0; font-size: .9rem;
}
.sum-row dt { color: var(--muted); min-width: 0; }
.sum-row dt small { display: block; font-size: .76rem; opacity: .8; }
.sum-row dd { margin: 0; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sum-row dd i { font-style: normal; font-weight: 500; color: var(--muted); font-size: .86em; }
.sum-minus dd { color: var(--text-dim); }

.sum-total {
    margin-top: 6px; padding-top: 13px; border-top: 1px solid var(--line);
    align-items: baseline;
}
.sum-total dt { color: var(--text); font-weight: 600; font-size: 1rem; }
.sum-total dd { font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; color: var(--accent); }
.sum-total dd i { color: var(--accent); opacity: .7; }

/* --- опции заявки --- */

/* Услуги — сетка одинаковых кнопок в две колонки. Раньше они были чипами
   по ширине текста, и из-за разной длины названий («Квитанция» против
   «Разбить выплату на 2-3 платежа») ряд получался рваным. Одинаковая
   ширина важнее компактности: блок с выбором должен читаться как список
   равнозначных вариантов, а не как облако тегов.

   Названия длинные, поэтому переносятся, а не обрезаются: обрезанная
   услуга — это услуга, которую не выберут. */
.perks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (max-width: 560px) { .perks { grid-template-columns: 1fr; } }

.perk {
    display: flex; align-items: center; gap: 10px; cursor: pointer;
    padding: 11px 14px; border-radius: var(--r); position: relative;
    background: var(--bg-soft); border: 1px solid var(--line);
    font-size: .86rem; line-height: 1.3;
    transition: border-color .12s ease, background .12s ease;
}
.perk input { position: absolute; opacity: 0; width: 0; height: 0; }
.perk-ico { flex: none; display: flex; align-items: center; justify-content: center; color: var(--muted); transition: color .12s; }
.perk-body { display: grid; gap: 2px; min-width: 0; }
.perk-name { font-weight: 600; overflow-wrap: anywhere; }
/* Надбавка отдельной строкой под названием. Сбоку она вставала посреди
   перенесённого в две строки названия и читалась как его продолжение. */
.perk-fee { font-size: .8rem; color: var(--muted); font-weight: 600; }
/* Живая цена услуги рядом со ставкой: «+2% ≈ 82 UAH». */
.perk-fee b { font-weight: 500; }
.perk-fee b:not(:empty)::before { content: ' '; }
.perk-check {
    width: 18px; height: 18px; flex: none; border-radius: 6px;
    border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center;
    color: transparent; transition: all .12s ease;
}
.perk input:checked ~ .perk-check { background: var(--accent-solid); border-color: var(--accent-solid); color: var(--accent-ink); }
.perk:has(input:checked) { border-color: var(--accent); background: var(--accent-dim); }
.perk:has(input:checked) .perk-ico,
.perk:has(input:checked) .perk-fee { color: var(--accent); }
.perk input:focus-visible ~ .perk-check { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Запасной вариант для браузеров без :has() — подсветку ставит JS. */
.perk.is-on { border-color: var(--accent); background: var(--accent-dim); }
.perk.is-on .perk-ico, .perk.is-on .perk-fee { color: var(--accent); }

/* -------------------------------------------------------------- заявка */

.order-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.order-id { font-family: var(--mono); font-size: .9rem; color: var(--muted); }

.stepper { display: flex; align-items: center; margin: 26px 0 30px; }
.stepper .st { flex: 1; text-align: center; position: relative; font-size: .84rem; color: var(--muted); }
.stepper .st::before {
    content: ''; display: block; width: 26px; height: 26px; margin: 0 auto 8px;
    border-radius: 99px; background: var(--surface-2); border: 2px solid var(--line);
}
.stepper .st::after {
    content: ''; position: absolute; top: 13px; left: calc(50% + 20px); right: calc(-50% + 20px);
    height: 2px; background: var(--line);
}
.stepper .st:last-child::after { display: none; }
.stepper .st.done { color: var(--text-dim); }
.stepper .st.done::before { background: var(--accent); border-color: var(--accent); }
.stepper .st.done::after { background: var(--accent); }
.stepper .st.now { color: var(--text); font-weight: 600; }
.stepper .st.now::before { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-dim); }

.pay-amount {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 16px 18px; border-radius: var(--r); background: var(--bg-soft); border: 1px solid var(--line);
}
.pay-amount .v { font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em; }

/* Оплата: адрес слева, QR справа, на узком экране — друг под другом. */
.pay-split { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; }
@media (max-width: 620px) { .pay-split { grid-template-columns: 1fr; } }
.pay-split-main { min-width: 0; }
.pay-qr { margin: 0; text-align: center; }
.pay-qr svg { width: 132px; height: 132px; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.pay-qr figcaption { font-size: .74rem; color: var(--muted); margin-top: 7px; }

.copy-row {
    display: flex; align-items: center; gap: 10px; padding: 12px 14px;
    background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r);
}
.copy-row .v { flex: 1; min-width: 0; font-family: var(--mono); font-size: .88rem; word-break: break-all; }
.copy-btn { flex: none; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); display: grid; place-items: center; }
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.copy-btn.done { color: var(--ok); border-color: var(--ok); }

.countdown { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.countdown .t { font-family: var(--mono); font-size: 1.1rem; font-weight: 600; color: var(--text); }
.countdown.low .t { color: var(--bad); }

.kv { display: grid; gap: 1px; background: var(--line-soft); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.kv-row { display: flex; gap: 14px; padding: 12px 15px; background: var(--surface); font-size: .92rem; }
.kv-row .k { flex: none; width: 40%; color: var(--muted); }
.kv-row .v { flex: 1; min-width: 0; word-break: break-word; }

/* ------------------------------------------------------------- подвал */

.footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 44px 0 30px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 30px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; font-weight: 600; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a { color: var(--text-dim); font-size: .9rem; }
.footer a:hover { color: var(--accent); }
/* Значки соцсетей: ряд ровных кружков над нижней строкой подвала.
   Размер 40px — не меньше, чем палец попадает без прицеливания. */
.footer-social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }

.social {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 999px;
    border: 1px solid var(--line); color: var(--text-dim);
    background: var(--card); transition: color .15s, border-color .15s, transform .15s;
}

.social:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.social:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) { .social { transition: none; } .social:hover { transform: none; } }

/* Ряд значков уже отделяет подвал от нижней строки — двойного отступа не нужно. */
.footer-social + .footer-bottom { margin-top: 18px; }

.footer-bottom { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }

/* -------------------------------------------------------- статьи и 404 */

.article { max-width: 74ch; }
.article h2 { margin: 32px 0 12px; }
.article h3 { margin: 24px 0 8px; }
.article ul, .article ol { padding-left: 22px; margin: 0 0 1em; }
.article li { margin-bottom: 6px; }
.article a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: .92rem; }
.article th, .article td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; }

.empty { text-align: center; padding: 64px 20px; }
.empty-code { font-size: clamp(3.5rem, 12vw, 6rem); font-weight: 750; letter-spacing: -.04em; color: var(--accent); line-height: 1; }

/* Печать: клиенту иногда нужно распечатать реквизиты. */
@media print {
    .header, .footer, .topline, .btn, .copy-btn { display: none !important; }
    body { background: #fff; color: #000; }
    .card { border-color: #ccc; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    html { scroll-behavior: auto; }
}

/* =========================================================================
   Графика и движение
   ========================================================================= */

/* --- появление при прокрутке ----------------------------------------- */

/* Прячем только там, где скрипт точно оживит блок обратно: класс js ставит
   инлайн-скрипт в шапке. Без него содержимое видно сразу. */
@media (prefers-reduced-motion: no-preference) {
    .js [data-reveal] {
        opacity: 0; transform: translateY(12px);
        transition: opacity .42s ease var(--d, 0ms), transform .42s cubic-bezier(.2,.7,.3,1) var(--d, 0ms);
    }
    .js [data-reveal].in { opacity: 1; transform: none; }

    /* Страховка: скрипт не пришёл за 700 мс — показываем без него.
       Пустая страница хуже, чем страница без анимации. */
    .js.reveal-all [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* --- мелкая моторика -------------------------------------------------- */

.pair { transition: transform .18s cubic-bezier(.2,.7,.3,1), border-color .18s, box-shadow .18s; }
.pair:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pair .pair-arrow { transition: transform .18s; }
.pair:hover .pair-arrow { transform: translateX(3px); }

.feature-ico { transition: transform .2s cubic-bezier(.2,.7,.3,1); }
.feature:hover .feature-ico { transform: rotate(-6deg) scale(1.07); }


/* Блик по кнопке: короткий, только на наведение, без слоя-обёртки. */
.btn-lg { position: relative; overflow: hidden; }
.btn-lg::after {
    content: ''; position: absolute; inset: 0 auto 0 -60%; width: 45%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent);
    transform: skewX(-18deg); transition: left .55s ease;
}
.btn-lg:hover::after { left: 115%; }

@media (prefers-reduced-motion: reduce) {
    .art-orbit, .art-core { animation: none; }
    .btn-lg::after { display: none; }
}

/* =========================================================================
   Выбор пары
   ========================================================================= */

/* display у .pick-item сильнее атрибута hidden — без этой строки скрытые
   элементы остаются на экране, и фильтр «работает», но не виден. */
[hidden] { display: none !important; }

.picker { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 860px) { .picker { grid-template-columns: 1fr; } }

.pick-col {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-xl); padding: 16px; display: flex; flex-direction: column;
    /* Без этого длинное название валюты растягивает колонку шире экрана:
       у элементов сетки min-width по умолчанию auto, а не ноль. */
    min-width: 0;
}

.pick-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }

.pick-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pick-title > span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pick-title b { font-size: 1rem; font-weight: 600; letter-spacing: -.01em; }
.pick-title small { font-size: .76rem; color: var(--muted); }
/* Значок роли колонки вместо номера шага: стрелка вверх — что уходит от
   вас, стрелка вниз — что приходит к вам. */
.pick-mark {
    display: flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 28px;
    border-radius: 99px; background: var(--accent-dim); color: var(--accent);
}

.pick-search { position: relative; display: flex; align-items: center; flex: 1; min-width: 150px; }
.pick-search svg { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.pick-search input {
    width: 100%; height: 38px; padding: 0 12px 0 34px; font: inherit; font-size: .88rem;
    border: 1px solid var(--field-line); border-radius: 10px;
    background: var(--field); color: var(--text);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .06);
    transition: border-color .14s ease, box-shadow .14s ease;
}
/* Тот же принцип, что у остальных полей: фокус — рамка и кольцо, фон на
   месте. */
.pick-search input:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}
.pick-search input::-webkit-search-cancel-button { filter: grayscale(1) opacity(.6); }

.pick-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin-bottom: 10px; }
.pick-tabs::-webkit-scrollbar { display: none; }
.pick-tab {
    flex: none; height: 30px; padding: 0 13px; border-radius: 99px; cursor: pointer;
    border: 1px solid var(--line); background: transparent; color: var(--muted);
    font: inherit; font-size: .8rem; font-weight: 600; white-space: nowrap;
    transition: color .14s ease, background .14s ease, border-color .14s ease;
}
.pick-tab:hover { color: var(--text); border-color: var(--muted); }
.pick-tab.on { background: var(--accent-solid); border-color: var(--accent-solid); color: var(--accent-ink); }

/* Список фиксированной высоты: обе колонки одинаковые, страница не прыгает
   при переключении вкладок. */
.pick-list {
    display: flex; flex-direction: column; gap: 2px;
    min-height: 300px; max-height: 336px; overflow-y: auto; overscroll-behavior: contain;
    scrollbar-width: thin; margin: 0 -6px; padding: 0 6px;
}
.pick-list::-webkit-scrollbar { width: 6px; }
.pick-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }

/* Сетка, а не строка: на узком экране курс переезжает под название,
   вместо того чтобы обрезаться многоточием вместе с ним. */
.pick-item {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center; gap: 0 11px; width: 100%; min-width: 0;
    padding: 9px 11px; border: 1px solid transparent; border-radius: 11px;
    background: transparent; color: var(--text); cursor: pointer;
    font: inherit; font-size: .9rem; text-align: left;
    transition: background .12s ease, border-color .12s ease;
}
.pick-item:hover { background: var(--surface-2); }
.pick-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pick-item.on { background: var(--accent-dim); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }

.pick-body { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.pick-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.3; }
.pick-code {
    font-size: .72rem; color: var(--muted); font-family: var(--mono);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pick-item.on .pick-code { color: var(--accent); }

.pick-rate {
    font-size: .76rem; color: var(--text-dim);
    font-variant-numeric: tabular-nums; text-align: right; line-height: 1.3;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.pick-check { flex: none; color: var(--accent); opacity: 0; transition: opacity .14s ease; }
.pick-item.on .pick-check { opacity: 1; }

.pick-go { flex: none; color: var(--muted); opacity: 0; transform: translateX(-4px); transition: opacity .14s ease, transform .14s ease; }
.pick-item:hover .pick-go, .pick-item:focus-visible .pick-go { opacity: 1; transform: none; color: var(--accent); }

/* Клик по правой колонке уводит на заявку — показываем, что уже уходим. */
.pick-item.going { background: var(--accent-dim); border-color: var(--accent); }
.pick-item.going .pick-go { opacity: 1; transform: translateX(3px); color: var(--accent); }

@media (max-width: 560px) {
    .pick-item { grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 3px; }
    .pick-rate { grid-column: 2; grid-row: 2; max-width: none; text-align: left; }
    .pick-go, .pick-check { grid-column: 3; grid-row: 1 / span 2; }
}

.pick-empty { color: var(--muted); font-size: .85rem; text-align: center; padding: 18px 0 4px; margin: 0; }

/* =========================================================================
   Правовые документы
   ========================================================================= */

.doc-hero {
    position: relative; padding: 40px 0 26px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(70% 120% at 12% 0%, var(--accent-dim), transparent 62%),
        radial-gradient(60% 120% at 88% 0%, rgba(77,127,232,.09), transparent 62%);
}
.doc-hero h1 { margin: 0 0 14px; max-width: 22ch; }
.doc-pills { display: flex; gap: 9px; flex-wrap: wrap; }

.doc-grid { display: grid; grid-template-columns: 244px minmax(0, 1fr); gap: 34px; align-items: start; }
@media (max-width: 940px) { .doc-grid { grid-template-columns: 1fr; gap: 20px; } }

/* --- оглавление --- */

.doc-toc {
    position: sticky; top: 84px; display: flex; flex-direction: column; gap: 1px;
    max-height: calc(100vh - 110px); overflow-y: auto; scrollbar-width: thin;
    padding-right: 4px;
}
@media (max-width: 940px) {
    .doc-toc {
        position: static; max-height: 260px;
        background: var(--surface); border: 1px solid var(--line);
        border-radius: var(--r-lg); padding: 12px;
    }
}
.doc-toc-h {
    font-size: .68rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 9px;
}
.doc-toc a {
    display: flex; gap: 9px; align-items: baseline;
    padding: 7px 10px; border-radius: 9px; border-left: 2px solid transparent;
    font-size: .84rem; line-height: 1.4; color: var(--muted);
    transition: color .14s, background .14s, border-color .14s;
}
.doc-toc a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.doc-toc a.on { color: var(--accent); border-left-color: var(--accent); background: var(--accent-dim); }
.doc-toc .n { font-size: .74rem; font-weight: 700; opacity: .7; flex: none; min-width: 14px; }

/* --- тело документа --- */

.doc-body { max-width: 74ch; }
.doc-body h2 {
    display: flex; align-items: baseline; gap: 12px;
    font-size: 1.16rem; margin: 34px 0 12px; scroll-margin-top: 90px;
}
.doc-body h2:first-child { margin-top: 0; }
.doc-num {
    display: inline-grid; place-items: center; flex: none;
    width: 27px; height: 27px; border-radius: 9px;
    background: var(--accent-dim); color: var(--accent);
    font-size: .78rem; font-weight: 700; align-self: center;
}
.doc-body h3 {
    font-size: .78rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
    color: var(--muted); margin: 22px 0 10px;
}
.doc-body p { margin: 0 0 12px; line-height: 1.68; }
.doc-body ul { margin: 0 0 14px; padding-left: 20px; }
.doc-body li { margin-bottom: 7px; line-height: 1.6; }

.doc-lead {
    background: var(--surface); border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: var(--r-lg); padding: 18px 20px; margin-bottom: 26px;
}
.doc-lead p:last-child { margin-bottom: 0; }

/* Список-галочки: маркер рисуем сами, чтобы он был в цвете акцента. */
.doc-checks { list-style: none; padding-left: 0; }
.doc-checks li { position: relative; padding-left: 26px; }
.doc-checks li::before {
    content: ''; position: absolute; left: 4px; top: .52em;
    width: 8px; height: 4px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
    transform: rotate(-45deg);
}

.doc-callout {
    padding: 12px 15px; border-radius: var(--r); border: 1px solid var(--line);
    border-left-width: 3px; font-size: .9rem; margin: 4px 0 14px !important;
}
.doc-callout.info { border-left-color: var(--info, #4d7fe8); background: rgba(77,127,232,.08); }
.doc-callout.warn { border-left-color: var(--warn, #c99a3c); background: rgba(201,154,60,.08); }
.doc-callout.bad  { border-left-color: var(--bad,  #cf5a5a); background: rgba(207,90,90,.08); }
.doc-callout.ok   { border-left-color: var(--ok,   #3f9e6b); background: rgba(63,158,107,.08); }

/* Нумерованные пункты соглашения: номер слева, текст колонкой. */
.doc-clauses { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; margin: 0 0 16px; }
.doc-clauses dt {
    font-family: var(--mono, ui-monospace, monospace); font-size: .8rem; font-weight: 700;
    color: var(--accent); padding-top: 3px; white-space: nowrap;
}
.doc-clauses dd { margin: 0 0 8px; line-height: 1.62; }

.doc-scale { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.doc-labels { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 16px; }
@media (max-width: 640px) { .doc-scale, .doc-labels { grid-template-columns: 1fr 1fr; } }

.doc-scale-cell, .doc-label {
    display: flex; flex-direction: column; gap: 3px;
    padding: 11px 13px; border-radius: var(--r);
    border: 1px solid var(--line); border-top-width: 3px;
    background: var(--surface-2); font-size: .8rem;
}
.doc-scale-cell b, .doc-label b { font-size: .92rem; }
.doc-scale-cell span, .doc-label span { color: var(--muted); line-height: 1.4; }
.doc-scale-cell.ok,   .doc-label.ok   { border-top-color: var(--ok,   #3f9e6b); }
.doc-scale-cell.warn, .doc-label.warn { border-top-color: var(--warn, #c99a3c); }
.doc-scale-cell.high, .doc-label.high { border-top-color: #f97316; }
.doc-scale-cell.bad,  .doc-label.bad  { border-top-color: var(--bad,  #cf5a5a); }

.doc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px !important; }
.doc-chips span {
    padding: 4px 11px; border-radius: 99px; font-size: .77rem;
    background: var(--surface-2); border: 1px solid var(--line); color: var(--text-dim);
}
.doc-group { margin-bottom: 6px !important; }

.doc-link { font-weight: 600; }
.doc-updated { color: var(--muted); font-size: .84rem; text-align: center; margin-top: 30px !important; }

/* =========================================================================
   Блок AML и согласия на странице обмена
   ========================================================================= */

.aml { border-left: 3px solid var(--warn, #c99a3c); }
.aml-head { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 10px; }
.aml-ico {
    display: grid; place-items: center; flex: none;
    width: 38px; height: 38px; border-radius: 11px;
    background: rgba(201,154,60,.13); color: var(--warn, #c99a3c);
}
.aml-badge {
    display: inline-block; padding: 2px 9px; border-radius: 99px; margin-bottom: 4px;
    background: rgba(201,154,60,.16); color: var(--warn, #c99a3c);
    font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}
.aml-head h2 { font-size: 1.05rem; margin: 0; }
.aml-desc { font-size: .9rem; color: var(--text-dim); margin: 0 0 16px; line-height: 1.6; }

.aml-how { background: var(--surface-2); border-radius: var(--r-lg); padding: 15px 17px; margin-bottom: 18px; }
.aml-how-h { font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 11px; }
.aml-steps { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 9px; }
.aml-steps li { display: flex; gap: 11px; align-items: flex-start; font-size: .88rem; line-height: 1.5; }
.aml-step-n {
    display: grid; place-items: center; flex: none; width: 21px; height: 21px; margin-top: 1px;
    border-radius: 99px; background: var(--accent-dim); color: var(--accent);
    font-size: .72rem; font-weight: 700;
}
.aml-cta { font-size: .87rem; }
.aml-note { font-size: .78rem; color: var(--muted); line-height: 1.5; margin: 12px 0 0; }

.aml-choose { font-size: .82rem; font-weight: 600; color: var(--text-dim); margin-bottom: 9px; }
.aml-radios { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
@media (max-width: 620px) { .aml-radios { grid-template-columns: 1fr; } }

/* Радио и чекбоксы рисуем сами: системные не красятся и на телефонах
   выглядят по-разному в каждом браузере. */
.aml-radio, .aml-confirm { position: relative; cursor: pointer; }
.aml-radio input, .aml-confirm input { position: absolute; opacity: 0; width: 0; height: 0; }

.aml-radio {
    display: flex; gap: 11px; align-items: flex-start;
    padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-lg);
    background: var(--surface-2); transition: border-color .14s, background .14s;
}
.aml-radio:hover { border-color: var(--muted); }
.aml-radio-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.aml-radio-body b { font-size: .89rem; font-weight: 600; }
.aml-radio-body span { font-size: .78rem; color: var(--muted); line-height: 1.4; }

.aml-mark {
    display: grid; place-items: center; flex: none;
    width: 21px; height: 21px; margin-top: 1px; border-radius: 7px;
    border: 1.5px solid var(--line); background: var(--surface);
    color: transparent; transition: border-color .14s, background .14s, color .14s;
}
.aml-radio .aml-mark { border-radius: 99px; }
.aml-radio input:checked ~ .aml-mark,
.aml-confirm input:checked ~ .aml-mark {
    background: var(--accent-solid); border-color: var(--accent-solid); color: var(--accent-ink, #ffffff);
}
.aml-radio.warn input:checked ~ .aml-mark { background: var(--warn, #c99a3c); border-color: var(--warn, #c99a3c); color: #1b1405; }
.aml-radio:has(input:checked) { border-color: var(--accent); background: var(--accent-dim); }
.aml-radio.warn:has(input:checked) { border-color: var(--warn, #c99a3c); background: rgba(201,154,60,.09); }
.aml-radio input:focus-visible ~ .aml-mark,
.aml-confirm input:focus-visible ~ .aml-mark { outline: 2px solid var(--accent); outline-offset: 2px; }

.aml-confirms { display: grid; gap: 11px; padding-top: 15px; border-top: 1px solid var(--line); }
.aml-confirm { display: flex; gap: 11px; align-items: flex-start; font-size: .85rem; line-height: 1.5; color: var(--text-dim); }
.aml-confirm a { color: var(--accent); }

/* Незаполненное согласие подсвечиваем только после того, как человек попробовал
   отправить форму: :user-invalid, а не :invalid — иначе всё красное с порога. */
.aml-confirm input:user-invalid ~ .aml-mark,
.aml-radio input:user-invalid ~ .aml-mark { border-color: var(--bad, #cf5a5a); }

/* =========================================================================
   «Как проходит обмен»: шаги на одной линии
   ========================================================================= */

/* --- живой чат ---------------------------------------------------------- */

/* Кнопка держится угла экрана и не уезжает вместе со страницей: вопрос
   возникает не там, где начали читать. */
.chat { position: fixed; right: 18px; bottom: 18px; z-index: 60; }

.chat-open {
    width: 54px; height: 54px; border-radius: 50%;
    background: var(--accent-solid); color: var(--accent-ink, #fff);
    border: 0; display: flex; align-items: center; justify-content: center; cursor: pointer;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
    transition: transform .15s ease, filter .15s ease;
}
/* display:block обязателен: инлайновый svg стоит на базовой линии текста,
   и кнопка получает под ним лишние пару пикселей — значок съезжает вверх
   даже при идеально симметричном контуре. */
.chat-open svg { width: 24px; height: 24px; display: block; }
.chat-open:hover { filter: brightness(1.07); }
.chat-open:active { transform: scale(.96); }

/* Точка о новом ответе: окно закрыто, а ответ уже пришёл. */
.chat-open-dot {
    position: absolute; top: 2px; right: 2px; width: 12px; height: 12px;
    border-radius: 50%; background: var(--bad); border: 2px solid var(--bg);
}

.chat-box {
    position: absolute; right: 0; bottom: 66px; width: min(360px, calc(100vw - 36px));
    display: flex; flex-direction: column; max-height: min(70vh, 560px);
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden;
}

.chat-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 13px 15px; border-bottom: 1px solid var(--line-soft); background: var(--surface-2);
}
.chat-head b { display: block; font-size: .95rem; }
.chat-state { font-size: .76rem; color: var(--muted); }
.chat-close {
    width: 30px; height: 30px; border: 0; background: none; color: var(--muted);
    cursor: pointer; border-radius: var(--r-sm); display: grid; place-items: center;
}
.chat-close svg { width: 16px; height: 16px; }
.chat-close:hover { color: var(--text); background: var(--bg-soft); }

.chat-log {
    flex: 1; overflow-y: auto; padding: 14px;
    display: flex; flex-direction: column; gap: 9px; min-height: 140px;
}

.chat-msg {
    max-width: 84%; padding: 9px 12px; border-radius: 12px;
    background: var(--bg-soft); font-size: .88rem; line-height: 1.5;
    white-space: pre-wrap; word-break: break-word;
}
/* Ответ оператора слева, своё справа — привычная сторона в любом мессенджере. */
.chat-msg.mine { margin-left: auto; background: var(--accent-dim); }
.chat-msg-at { display: block; margin-top: 3px; font-size: .68rem; color: var(--muted); }

.chat-form { display: flex; gap: 8px; padding: 11px; border-top: 1px solid var(--line-soft); }
.chat-form textarea {
    flex: 1; resize: none; min-height: 40px; max-height: 120px; padding: 10px 12px;
    border: 1px solid var(--line); border-radius: var(--r); background: var(--bg);
    color: var(--text); font: inherit; font-size: .88rem;
}
.chat-form textarea:focus { outline: none; border-color: var(--accent); }
.chat-form button {
    width: 40px; border: 0; border-radius: var(--r); cursor: pointer;
    background: var(--accent-solid); color: var(--accent-ink, #fff);
    display: grid; place-items: center;
}
.chat-form button svg { width: 18px; height: 18px; }
.chat-form button:hover { filter: brightness(1.07); }

@media (max-width: 480px) {
    .chat { right: 12px; bottom: 12px; }
    .chat-box { bottom: 62px; }
}



/*
 | Поле, на которое ругнулся сервер.
 |
 | Красная рамка нужна не для красоты: в форме на два экрана человек ищет
 | глазами, где именно ошибся, и подпись под полем он найдёт только после
 | того, как найдёт само поле.
 */
.field-bad .field-box { border-color: var(--bad); }
.field-bad label > span:first-child { color: var(--bad); }
