/* =====================================================================
   Квиз «Анализатор годности» — дизайн-система «Профессии в тылу», тёмная тема.
   Значения — из макетов design_work_files (Quiz-*.dc.html, Main.dc.html).
   Tailwind больше не используется: всё оформление здесь.
   ===================================================================== */

:root {
    /* Тёмная тема: три уровня поверхности + линия */
    --dark-bg: #1C1D1B;        /* уровень 0 — фон */
    --dark-surface: #2B2C2A;   /* уровень 1 — модалка */
    --dark-raised: #363735;    /* уровень 2 — карточки */
    --dark-line: #4A4B48;      /* рамки, разделители */

    /* Текст */
    --text-primary: #FFFFFF;
    --text-body: #E2E2E0;
    --text-muted: #B5B5B0;
    --text-faint: #8C8C88;
    --tick-mark: #6E6F6B;

    /* Бренд */
    --primary: #4D6658;        /* хаки-зелёный */
    --primary-hover: #5A7666;
    --accent: #A3C2B2;         /* шалфей — единственный яркий акцент */
    --on-primary-muted: #DCE5DF;

    /* Смысловые */
    --warning: #B85A47;
    --warning-text: #F0B5A7;
    --error: #D9826E;

    --font-text: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Rubik Dirt', 'Jost', system-ui, sans-serif;

    --radius-card: 20px;
    --radius-row: 14px;
    --radius-input: 12px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    min-height: 100vh;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    font-family: var(--font-text);
    font-size: 16px;
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: var(--accent); }
a:hover { color: var(--text-primary); }
[hidden] { display: none !important; }
ul { list-style: none; }

.sr-only {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* Сетка-планшет: линии шалфея 4%, шаг 48px (40px на мобильном) */
.grid-bg {
    background-color: var(--dark-bg);
    background-image:
        linear-gradient(rgba(163,194,178,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(163,194,178,0.04) 1px, transparent 1px);
    background-size: 48px 48px;
}

/* ===== Типографика ===== */
.display {
    font-family: var(--font-display);
    font-weight: 400;
    text-transform: uppercase;
    color: var(--text-primary);
}
.display .hl { color: var(--accent); }

/* Нумерация «как в документах»: Jost 500, разрядка, верхний регистр, шалфей */
.eyebrow {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}
.eyebrow--sm { font-size: 12px; letter-spacing: 0.18em; }
.meta { font-size: 13px; font-weight: 500; letter-spacing: 0.08em; color: var(--text-muted); }
.muted { color: var(--text-muted); font-size: 16px; line-height: 1.55; }
.body-text { color: var(--text-body); font-size: 16px; line-height: 1.55; }

.h-step { font-size: 36px; font-weight: 600; line-height: 1.15; }
.h-offer { font-size: 28px; font-weight: 600; line-height: 1.2; }
.h-form { font-size: 24px; font-weight: 600; line-height: 1.25; }
.h-done { font-size: 26px; font-weight: 600; line-height: 1.25; }

/* Квадратный маркер вместо точек */
.sq { width: 7px; height: 7px; flex-shrink: 0; background: var(--accent); }

/* ===== Кнопки-пилюли ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    height: 52px; padding: 0 26px;
    border-radius: 999px;
    font-family: var(--font-text); font-size: 16px; font-weight: 500;
    text-decoration: none; white-space: nowrap;
    transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), opacity .2s;
}
.btn-primary { background: var(--primary); color: #FFFFFF; border: none; }
.btn-primary:hover { background: var(--primary-hover); color: #FFFFFF; }
.btn-primary:disabled { opacity: .45; cursor: default; }
.btn-ghost { border: 1px solid var(--dark-line); background: transparent; color: var(--text-body); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text-primary); }
.btn-link { border: none; background: transparent; color: var(--accent); }
.btn-link:hover { color: var(--text-primary); }
.btn-lg { height: 60px; padding: 0 40px; font-size: 18px; gap: 12px; }
.btn-sm { height: 48px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; height: 56px; font-size: 17px; }

.icon-btn {
    width: 44px; height: 44px; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--dark-line); background: var(--dark-surface); color: var(--text-body);
    transition: border-color .2s, color .2s;
}
.icon-btn:hover { border-color: var(--accent); color: var(--text-primary); }
.icon-btn--raised { background: var(--dark-raised); }

/* Видимый фокус с клавиатуры */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.input:focus-visible { outline-offset: 2px; }

/* ===== Плашки ===== */
.pill {
    align-self: flex-start;
    display: inline-flex; align-items: center; gap: 10px;
    height: 32px; padding: 0 14px; border-radius: 999px;
    font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
}
.pill--primary { border: 1px solid var(--primary); background: rgba(77,102,88,0.2); color: var(--on-primary-muted); }
.pill--warn { border: 1px solid var(--warning); background: rgba(184,90,71,0.16); color: var(--warning-text); }

/* ===== Уголки прицела ===== */
.corners { position: relative; }
.corner { position: absolute; width: 28px; height: 28px; pointer-events: none; border: 0 solid var(--accent); }
.corner--tl { top: -10px; left: -10px; border-top-width: 2px; border-left-width: 2px; }
.corner--tr { top: -10px; right: -10px; border-top-width: 2px; border-right-width: 2px; }
.corner--bl { bottom: -10px; left: -10px; border-bottom-width: 2px; border-left-width: 2px; }
.corner--br { bottom: -10px; right: -10px; border-bottom-width: 2px; border-right-width: 2px; }
/* На фото — 64px внутри рамки */
.corners--photo { padding: 18px; }
.corners--photo .corner { width: 64px; height: 64px; }
.corners--photo .corner--tl { top: 0; left: 0; }
.corners--photo .corner--tr { top: 0; right: 0; }
.corners--photo .corner--bl { bottom: 0; left: 0; }
.corners--photo .corner--br { bottom: 0; right: 0; }

/* ===== Кнопка «Поделиться» ===== */
.share-btn { position: fixed; top: 20px; right: 20px; z-index: 40; }

/* =====================================================================
   ПЕРВЫЙ ЭКРАН
   ===================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    padding: 96px 32px;
    display: flex; align-items: center; justify-content: center;
}
.hero__inner {
    width: 100%; max-width: 1240px;
    display: flex; flex-wrap: wrap; align-items: center; gap: 72px;
}
.hero__topline { display: none; }
.hero__media { flex: 1 1 460px; min-width: 0; }
.hero__photo {
    position: relative;
    aspect-ratio: 1 / 0.95;
    border-radius: var(--radius-card);
    overflow: hidden;
    background: var(--dark-raised);
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
/* Затемнение снизу — подписи на фото читаются на любом снимке */
.hero__photo::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(to bottom, rgba(28,29,27,.7), rgba(28,29,27,.25) 14%, transparent 26%, transparent 68%, rgba(28,29,27,.7));
}
.hero__placeholder { position: absolute; inset: 0; }
.hero__tag { position: absolute; z-index: 1; font-size: 12px; letter-spacing: 0.18em; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.hero__tag--top { top: 16px; left: 20px; }
.hero__tag--bottom { bottom: 16px; right: 20px; }

.hero__content { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero__content .pill { height: 36px; padding: 0 16px; font-size: 13px; }
.hero__title { font-size: 68px; line-height: 1.02; }
.hero__subtitle { font-size: 21px; line-height: 1.5; color: var(--text-body); max-width: 560px; }
.hero__description { font-size: 16px; line-height: 1.6; color: var(--text-muted); max-width: 520px; }
.hero__cta { align-self: flex-start; }
.hero__stats {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px;
    margin-top: 8px; padding-top: 28px; border-top: 1px solid var(--dark-line);
}
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat__value { font-size: 40px; font-weight: 600; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat__label { font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }

/* Появление первого экрана */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero__media, .hero__content > * { animation: fadeUp .7s var(--ease) both; }
.hero__content > :nth-child(2) { animation-delay: .06s; }
.hero__content > :nth-child(3) { animation-delay: .12s; }
.hero__content > :nth-child(4) { animation-delay: .16s; }
.hero__content > :nth-child(5) { animation-delay: .2s; }
.hero__content > :nth-child(6) { animation-delay: .24s; }

/* =====================================================================
   МОДАЛЬНОЕ ОКНО КВИЗА
   ===================================================================== */
.modal-overlay {
    position: fixed; inset: 0; z-index: 50;
    display: flex; justify-content: center; align-items: flex-start;
    padding: 56px 20px;
    overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
    opacity: 0; visibility: hidden;
    transition: opacity .35s var(--ease), visibility .35s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
body.modal-open { overflow: hidden; }

.dialog {
    width: 100%; max-width: 640px;
    margin: auto 0;                         /* по центру, но прокручивается, если выше экрана */
    padding: 44px 48px 40px;
    background: var(--dark-surface);
    border: 1px solid var(--dark-line);
    border-radius: var(--radius-card);
    display: flex; flex-direction: column; gap: 28px;
    transform: translateY(16px) scale(.98); opacity: 0;
    transition: transform .4s var(--ease), opacity .4s var(--ease), max-width .3s var(--ease);
}
.modal-overlay.active .dialog { transform: none; opacity: 1; }
.dialog[data-size="narrow"] { max-width: 560px; }
.dialog[data-size="wide"] { max-width: 1360px; padding: 36px 48px 40px; gap: 28px; }
.dialog[data-size="wide"] .corner { width: 32px; height: 32px; }
.dialog__close { position: absolute; top: 16px; right: 16px; z-index: 2; }

.dialog__head { display: flex; flex-direction: column; gap: 12px; padding-right: 56px; }
.dialog__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }

/* Прогресс — деления по числу шагов */
.ticks { display: flex; gap: 4px; }
.tick { flex: 1 1 0; height: 6px; border-radius: 2px; background: var(--dark-line); transition: background-color .3s var(--ease); }
.tick.on { background: var(--accent); }

.dialog__nav {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
    padding-top: 28px; border-top: 1px solid var(--dark-line);
    min-height: 81px;
}
.dialog__nav .meta { font-size: 14px; letter-spacing: 0; font-weight: 400; margin-left: auto; }
.dialog__nav .meta.go { color: var(--accent); }

/* ===== Шаги и переходы ===== */
.quiz-step { display: none; }
.quiz-step.active { display: flex; flex-direction: column; animation: stepIn .4s var(--ease) both; }
.quiz-step.enter-from-left { animation-name: stepInBack; }
.quiz-step.exit-left, .quiz-step.exit-right { display: flex; flex-direction: column; animation: stepOutLeft .3s var(--ease) both; }
.quiz-step.exit-right { animation-name: stepOutRight; }
@keyframes stepIn { from { opacity: 0; transform: translateX(32px); } to { opacity: 1; transform: none; } }
@keyframes stepInBack { from { opacity: 0; transform: translateX(-32px); } to { opacity: 1; transform: none; } }
@keyframes stepOutLeft { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(-32px); } }
@keyframes stepOutRight { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(32px); } }

/* ===== Шаг-вопрос ===== */
.question { gap: 28px; }
.question__head { display: flex; flex-direction: column; gap: 14px; }
.icon-tile {
    width: 52px; height: 52px; border-radius: 14px;
    background: var(--primary); color: #FFFFFF;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.icon-tile svg { width: 24px; height: 24px; }
.icon-tile--lg { width: 56px; height: 56px; }
.options { display: flex; flex-direction: column; gap: 12px; border: 0; }

.option-card {
    min-height: 64px; padding: 12px 22px;
    border-radius: var(--radius-row);
    border: 1px solid var(--dark-line); background: var(--dark-raised);
    display: flex; align-items: center; gap: 16px;
    text-align: left; width: 100%;
    transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.option-card:hover { border-color: #6E6F6B; }
.option-card.selected { border-color: var(--accent); background: rgba(77,102,88,0.35); }
.option-radio {
    width: 22px; height: 22px; flex-shrink: 0; border-radius: 999px;
    border: 2px solid var(--text-faint);
    transition: border-color .2s, background .2s;
}
.option-card.selected .option-radio {
    border-color: var(--accent);
    background: radial-gradient(circle, var(--accent) 0 4px, transparent 5px);
}
.option-num { width: 22px; flex-shrink: 0; font-size: 13px; font-weight: 500; letter-spacing: 0.14em; color: var(--text-muted); }
.option-card.selected .option-num { color: var(--accent); }
.option-label { font-size: 18px; font-weight: 500; color: var(--text-primary); font-variant-numeric: tabular-nums; }

/* ===== Подсчёт результата ===== */
.loading { align-items: center; gap: 28px; text-align: center; }
.loading.active { display: flex; }
.loading__text { display: flex; flex-direction: column; gap: 8px; }
.loading__text .eyebrow { letter-spacing: 0.18em; }
.loading .h-step { font-size: 30px; }
.spin { animation: qspin 1.4s linear infinite; transform-origin: 50% 50%; }
@keyframes qspin { to { transform: rotate(360deg); } }
.checks { align-self: stretch; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.check-row {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px; border-radius: 12px;
    background: var(--dark-raised); border: 1px solid var(--dark-line);
    color: var(--text-muted);
}
.check-row__dot { width: 10px; height: 10px; flex-shrink: 0; border: 1px solid var(--accent); transition: background .2s; }
.check-row__label { flex: 1; font-size: 16px; }
.check-row__status { font-size: 12px; font-weight: 500; letter-spacing: 0.14em; }
.check-row.is-active, .check-row.is-done { color: var(--text-primary); }
.check-row.is-done .check-row__dot { background: var(--accent); }

/* ===== Итог ===== */
.result { gap: 36px; }
.result__grid { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.result__main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.result__side { flex: 1 1 380px; max-width: 460px; min-width: 0; }
/* Форма «едет» вместе с прокруткой, пока человек читает условия контракта.
   Только при двух колонках и окне, в которое форма (~620px) помещается целиком.
   Липнет к .modal-overlay — он и есть прокручиваемый контейнер. */
/* Порог 860px: форма с полем VK/Max и ошибками ≈ 800px — на окнах ниже кнопка «Отправить» уходила бы за край */
@media (min-width: 1000px) and (min-height: 860px) {
    .result__side { position: sticky; top: 24px; align-self: flex-start; }
}

/* Липкая кнопка «Оставить заявку» — только на телефоне (на десктопе форма и так рядом) */
.form-jump { display: none; }
@media (max-width: 640px) {
    /* Место под липкую кнопку, чтобы она не перекрывала «Пройти заново» / «Поделиться» */
    #quiz-dialog[data-size="wide"] { padding-bottom: 96px; }
    .form-jump:not([hidden]) {
        display: inline-flex;
        position: fixed; left: 20px; right: 20px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 55;
        height: 56px; box-shadow: 0 8px 24px rgba(0,0,0,.45);
    }
}

.verdict { display: flex; flex-wrap: wrap; align-items: center; gap: 36px; }
.ring { position: relative; width: 200px; height: 200px; flex-shrink: 0; }
.ring svg { width: 100%; height: 100%; }
.ring__value { transition: stroke-dasharray 1s var(--ease); }
.ring__label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.ring__num { font-size: 56px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.ring__cap { font-size: 11px; font-weight: 500; letter-spacing: 0.16em; color: var(--text-muted); }
.verdict__text { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.verdict__title { font-size: 46px; line-height: 1.02; }
.verdict__desc { max-width: 480px; }

/* Плашка уровня: высокий — предупреждение, низкий — хаки */
.pill--level .pill__sq { display: none; }
.result[data-variant="high"] .pill--level { border: 1px solid var(--warning); background: rgba(184,90,71,0.16); color: var(--warning-text); }
.result[data-variant="low"] .pill--level { border: 1px solid var(--primary); background: rgba(77,102,88,0.25); color: var(--on-primary-muted); }
.result[data-variant="low"] .pill__warn { display: none; }
.result[data-variant="low"] .pill--level .pill__sq { display: block; }

.section { display: flex; flex-direction: column; gap: 14px; }

/* «На оценку повлияли» — компактные чипы (макет «Высокий шанс»).
   Маркер: снижает шанс — шалфей, повышает — предупреждение, не влияет — приглушённый. */
.factors { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    display: inline-flex; align-items: center; gap: 10px;
    min-height: 40px; padding: 6px 16px;
    border-radius: 10px; background: var(--dark-raised); border: 1px solid var(--dark-line);
    font-size: 15px; line-height: 1.3; color: var(--text-primary);
}
.chip .sq { background: var(--accent); }
/* Направление влияния: ↑ повышает (предупреждение), ↓ снижает (шалфей) — не только цветом */
.chip__dir { font-size: 14px; font-weight: 600; line-height: 1; width: 10px; text-align: center; flex-shrink: 0; }
.chip--bad .chip__dir { color: var(--warning-text); }
.chip--good .chip__dir { color: var(--accent); }
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip--bad .sq { background: var(--warning-text); }
.chip--neutral .sq { background: var(--text-faint); }
.chip--more {
    background: transparent; border-style: dashed; color: var(--accent); font-weight: 500;
    transition: border-color .2s, color .2s;
}
.chip--more:hover { border-color: var(--accent); color: var(--text-primary); }

/* Блок «Контракт» */
.offer {
    padding: 32px; border-radius: var(--radius-card);
    background: var(--dark-raised); border: 1px solid var(--dark-line);
    display: flex; flex-direction: column; gap: 24px;
}
.offer__head { display: flex; flex-direction: column; gap: 8px; }
.amounts { display: flex; flex-direction: column; gap: 10px; }
.amount {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 32px;
    padding: 20px 24px; border-radius: var(--radius-row);
    background: var(--dark-surface); border: 1px solid var(--dark-line);
}
.amount__value { flex: 0 0 260px; font-size: 32px; font-weight: 600; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }
.amount__text { flex: 1 1 220px; font-size: 16px; color: var(--text-body); }
.amount:first-child { background: var(--primary); border-color: var(--primary); }
.amount:first-child .amount__value { color: #FFFFFF; }
.amount:first-child .amount__text { color: var(--on-primary-muted); }
.offer__note { padding-top: 16px; border-top: 1px solid var(--dark-line); font-size: 13px; line-height: 1.5; color: var(--text-muted); }

/* Списки с квадратным маркером */
.list-sq { display: flex; flex-direction: column; gap: 10px; }
.list-sq li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.5; color: var(--text-body); }
.list-sq li::before { content: ''; width: 8px; height: 8px; margin-top: 8px; flex-shrink: 0; background: var(--accent); }
.list-sq--body li { font-size: 16px; }
.perks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px; }

.result__actions {
    display: flex; gap: 12px; flex-wrap: wrap;
    padding-top: 36px; border-top: 1px solid var(--dark-line);
}

/* ===== Форма заявки ===== */
.form-card {
    padding: 32px; border-radius: var(--radius-card);
    background: var(--dark-raised); border: 1px solid var(--dark-line);
}
.lead-form { display: flex; flex-direction: column; gap: 20px; }
.lead-form__head { display: flex; flex-direction: column; gap: 6px; }
.lead-form__head .muted { font-size: 15px; line-height: 1.5; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label { font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-body); }
.input {
    height: 52px; width: 100%; padding: 0 18px;
    border-radius: var(--radius-input);
    border: 1px solid var(--dark-line); background: var(--dark-bg); color: var(--text-primary);
    font-size: 17px;
    transition: border-color .2s;
}
.input::placeholder { color: var(--text-faint); }
.input:focus { border-color: var(--accent); outline: none; }
.input[aria-invalid="true"] { border-color: var(--error); }
.field__error { font-size: 13px; color: var(--warning-text); }
.field__error--indent { padding-left: 32px; }

.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.contact-tab {
    height: 48px; border-radius: var(--radius-input);
    border: 1px solid var(--dark-line); background: var(--dark-bg); color: var(--text-body);
    font-size: 15px; font-weight: 500;
    transition: border-color .2s, background-color .2s, color .2s;
}
.contact-tab:hover { border-color: #6E6F6B; }
.contact-tab.active { border-color: var(--accent); background: rgba(77,102,88,0.45); color: #FFFFFF; }

.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--text-muted); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--primary); }

.btn__spinner { display: none; }
/* Нажатие на иконку — нажатие на саму кнопку (перехватчик Callibri не принимает SVG-элемент как цель) */
#btn-submit svg { pointer-events: none; }
.lead-form.is-sending .btn__icon { display: none; }
.lead-form.is-sending .btn__spinner { display: block; }
.lead-form__foot { font-size: 13px; line-height: 1.5; color: var(--text-muted); }

.form-done { display: flex; flex-direction: column; gap: 18px; padding: 8px 0; }
.form-done .btn { align-self: flex-start; }
@keyframes draw-check { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
.success-check { stroke-dasharray: 24; animation: draw-check .5s .15s ease both; }

/* Honeypot — поле-ловушка для ботов (человек его не видит) */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

/* ===== Стоп-экран ===== */
.stop { display: flex; flex-direction: column; gap: 18px; }
.stop__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

/* ===== Уведомления ===== */
.toasts { position: fixed; top: 76px; right: 20px; z-index: 60; display: flex; flex-direction: column; gap: 10px; max-width: calc(100vw - 40px); }
.toast {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 18px; border-radius: var(--radius-input);
    background: var(--dark-surface); border: 1px solid var(--dark-line); color: var(--text-body);
    font-size: 15px; font-weight: 500;
    animation: toastIn .35s var(--ease) both;
}
.toast::before { content: ''; width: 8px; height: 8px; flex-shrink: 0; background: var(--accent); }
.toast--error { border-color: var(--warning); }
.toast--error::before { background: var(--warning-text); }
.toast.out { animation: toastOut .3s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px); } }

/* =====================================================================
   АДАПТИВ
   ===================================================================== */
@media (max-width: 1100px) {
    .hero__title { font-size: 56px; }
}

@media (max-width: 900px) {
    .hero { padding: 80px 24px 64px; }
    .hero__inner { gap: 48px; }
    .perks { grid-template-columns: 1fr; }
    .amount__value { flex-basis: auto; }
}

/* Мобильный (макеты 390): вопрос и итог — на весь экран, без уголков */
@media (max-width: 640px) {
    .grid-bg { background-size: 40px 40px; }

    .hero { padding: 20px 20px 48px; align-items: flex-start; }
    .hero__inner { flex-direction: column; align-items: stretch; gap: 24px; }
    .hero__topline { display: flex; align-items: center; min-height: 44px; padding-right: 56px; font-size: 12px; letter-spacing: 0.18em; }
    .share-btn { top: 20px; right: 20px; }
    .hero__media { flex: none; }
    .corners--photo { padding: 12px; }
    .corners--photo .corner { width: 40px; height: 40px; }
    .hero__photo { aspect-ratio: auto; height: 300px; border-radius: 16px; }
    .hero__tag { display: none; }
    .hero__content { flex: none; gap: 24px; }
    .hero__content .pill { height: 34px; padding: 0 14px; font-size: 12px; }
    .hero__title { font-size: 40px; line-height: 1.04; }
    .hero__subtitle { font-size: 18px; }
    .hero__description { font-size: 15px; line-height: 1.55; }
    .hero__cta { align-self: stretch; height: 58px; }
    .hero__stats { gap: 12px; margin-top: 0; padding-top: 24px; }
    .stat__value { font-size: 28px; }
    .stat__label { font-size: 11px; letter-spacing: 0.12em; }

    .modal-overlay { padding: 0; background-image: none; background-color: var(--dark-surface); }
    .dialog, .dialog[data-size] {
        max-width: none; min-height: 100%;
        margin: 0;
        padding: 16px 20px 24px;
        border: 0; border-radius: 0;
        gap: 24px;
    }
    .dialog .corner { display: none; }
    /* Крестик — в строке с нумерацией, деления прогресса — на всю ширину под ней */
    .dialog__close { top: 16px; right: 20px; }
    .dialog__head { padding-right: 0; }
    .dialog__meta { flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; min-height: 44px; padding-right: 56px; }
    .dialog:not(:has(#progress-wrap:not([hidden]))) .dialog__body { padding-top: 52px; }
    .eyebrow { font-size: 12px; }
    .ticks { gap: 3px; }
    .tick { height: 5px; }
    .dialog__nav { position: sticky; bottom: 0; background: var(--dark-surface); padding: 16px 0 calc(8px + env(safe-area-inset-bottom)); min-height: 0; }
    .dialog__nav .meta { font-size: 13px; }

    .h-step { font-size: 30px; }
    .question { gap: 24px; }
    .question__head { gap: 12px; }
    .question__head .muted { font-size: 15px; line-height: 1.45; }
    .icon-tile { width: 48px; height: 48px; border-radius: 12px; }
    .options { gap: 10px; }
    .option-card { min-height: 60px; padding: 10px 18px; gap: 14px; }
    .option-num { width: 20px; font-size: 12px; }
    .option-label { font-size: 17px; }

    .loading { padding-top: 24px; }
    .loading .h-step { font-size: 26px; }

    .result { gap: 28px; }
    .result__grid, .result__main { gap: 28px; }
    .result__main, .result__side { flex: 1 1 100%; max-width: none; }
    .verdict { flex-direction: column; text-align: center; gap: 18px; }
    .verdict__text { align-items: center; flex-basis: auto; }
    .pill--level { align-self: center; }
    .ring { width: 168px; height: 168px; }
    .ring__num { font-size: 46px; }
    .ring__cap { font-size: 10px; }
    .verdict__title { font-size: 34px; line-height: 1.04; }
    .verdict__desc { font-size: 15px; line-height: 1.5; }
    .eyebrow--sm, .section .eyebrow { font-size: 12px; }
    .chip { min-height: 38px; padding: 6px 14px; gap: 8px; font-size: 14px; }
    .offer { padding: 22px 18px; border-radius: 18px; gap: 20px; }
    .offer .eyebrow { font-size: 11px; }
    .h-offer { font-size: 23px; line-height: 1.25; }
    .offer .muted { font-size: 15px; line-height: 1.45; }
    .amounts { gap: 8px; }
    .amount { flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px; }
    .amount__value { font-size: 28px; flex: none; }
    .amount__text { flex: none; font-size: 15px; line-height: 1.4; }
    .offer__note { font-size: 12px; padding-top: 14px; }
    .form-card { padding: 24px; }
    .result__actions { flex-direction: column; gap: 8px; padding-top: 16px; }
    .result__actions .btn { width: 100%; }
    .stop__actions .btn { flex: 1 1 100%; }
    .toasts { top: 72px; right: 16px; left: 16px; max-width: none; }
}

/* Уважать системную настройку «уменьшить движение» */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .spin { animation: none !important; }
}
