/* Клиентские страницы в дизайн-системе ADELIS: кремовый фон, чёрные акценты, розовый как сигнал,
   радиусы 10-14, мягкие тени, Inter. Мобильная версия в приоритете. */

:root {
    --bg: #FAF7F9;                 /* кремово-белый фон ADELIS */
    --surface: #FFFFFF;
    --surface-2: #F6F1F4;          /* нейтральная подложка для ховеров: между фоном и белым */
    --ink: #111114;                /* чёрные акценты */
    --ink-2: #4A4550;              /* ink-soft */
    --ink-3: #6E6575;              /* muted, AA на белом */
    --placeholder: #8E8694;
    --line: #E9E1E7;
    --line-strong: #CFC5CD;
    --accent: #FF3D8F;             /* розовый сигнал ADELIS */
    --accent-ink: #D91C74;         /* тёмный розовый для текста и ховеров */
    --accent-soft: #FFBED7;        /* градиентные пятна */
    --accent-tint: #FDEFF5;        /* подложки, зебра */
    --focus: #FF3D8F;
    --focus-halo: rgba(255, 61, 143, 0.22);
    --danger: #C4452B;             /* terra: риски */
    --danger-line: #E6B1A6;
    --danger-soft: #FBE9E4;
    --ok: #1B7A44;                 /* green ADELIS */
    --ok-soft: #E5F4EC;
    --mark: #FBF3DC;               /* amber ADELIS: места, которые ещё предстоит заполнить */
    --mark-ink: #8C6000;

    --radius-lg: 14px;
    --radius: 12px;
    --radius-sm: 10px;
    --shadow-card: 0 1px 2px rgba(23, 10, 18, 0.05), 0 2px 8px rgba(23, 10, 18, 0.04);
    --shadow-pop: 0 4px 14px rgba(23, 10, 18, 0.08), 0 1px 3px rgba(23, 10, 18, 0.06);
    --shadow-lg: 0 12px 40px rgba(23, 10, 18, 0.14);

    /* Как у ADELIS: Inter, если установлен, иначе системные; внешние шрифты не грузим */
    --font-display: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-body: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "Cascadia Code", "JetBrains Mono", Consolas, monospace;

    --gutter: 16px;
    --card-pad: 20px;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* База */

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: 16px;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--ink);
    text-underline-offset: 0.18em;
    text-decoration-thickness: 1px;
}

a:hover {
    color: var(--accent-ink);
    text-decoration-thickness: 2px;
}

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

[x-cloak] {
    display: none !important;
}

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

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    background: var(--ink);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: 12px;
}

/* Шапка ADELIS: липкое «стекло», логотип-«Λ» и навигация по инструментам */

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(250, 247, 249, 0.88);
    border-bottom: 1px solid var(--line);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.topbar__inner {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: calc(760px + var(--gutter) * 2);
    height: 58px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.logo {
    display: flex;
    flex: none;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
}

.logo:hover {
    color: var(--ink);
}

.logo-mark {
    display: block;
    flex: none;
}

.logo-text {
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.34em;
}

/* «tools» после разрядки ADELIS: обычным начертанием, приглушённо, как в подвале */
.logo-sub {
    margin-left: 2px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0;
    text-transform: lowercase;
    color: var(--ink-3);
}

/* Пункты не рвутся на строки; что не влезло - прокручивается внутри навигации, не ломая ширину страницы */
.topnav {
    display: flex;
    flex: 0 1 auto;
    gap: 4px;
    min-width: 0;
    margin-left: auto;
    padding: 8px 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

.topnav::-webkit-scrollbar {
    display: none;
}

.topnav a {
    flex: none;
    padding: 7px 12px;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink-2);
    text-decoration: none;
    white-space: nowrap;
    border-radius: var(--radius-sm);
    transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.topnav a:hover {
    color: var(--ink);
    background: var(--surface);
}

.topnav a.active {
    color: var(--ink);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

/* До планшетной ширины подписи короткие, иначе шапка не помещается вместе с логотипом «ADELIS tools»
   (полные подписи с логотипом требуют ~470px, а поля страницы растут только с 560px) */
.topnav__short {
    display: none;
}

@media (max-width: 559px) {
    .topnav a {
        padding: 7px 10px;
    }

    .topnav__full {
        display: none;
    }

    .topnav__short {
        display: inline;
    }
}

/* Узкие телефоны: плотнее разрядка логотипа и пункты, чтобы всё осталось в одну строку */
@media (max-width: 379px) {
    .topbar__inner {
        gap: 10px;
    }

    .logo-text {
        font-size: 14px;
        letter-spacing: 0.22em;
    }

    .logo-sub {
        font-size: 13px;
    }

    .topnav a {
        padding: 7px 8px;
        font-size: 0.8125rem;
    }
}

/* Совсем узкие экраны: навигация своей строкой, как шапка ADELIS на тесных ширинах */
@media (max-width: 339px) {
    .topbar__inner {
        flex-wrap: wrap;
        height: auto;
        padding-top: 10px;
    }

    .topnav {
        flex: 1 0 100%;
        margin-left: 0;
        padding: 4px 0 8px;
    }
}

/* Каркас страницы */

.page {
    width: 100%;
    max-width: calc(760px + var(--gutter) * 2);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.brief__head {
    padding-top: 32px;
}

.brief__title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.5rem, 1.05rem + 2.1vw, 2.25rem);
    line-height: 1.18;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

.brief__lead {
    margin: 12px 0 0;
    max-width: 38em;
    font-size: 1.0625rem;
    color: var(--ink-2);
    text-wrap: pretty;
}

.brief__note {
    margin: 20px 0 0;
    text-align: center;
    font-size: 0.875rem;
    color: var(--ink-2);
}

.card {
    position: relative;
    margin-top: 24px;
    padding: var(--card-pad);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

/* Индикатор шагов: сегменты, как полоски сторис */

.progress__list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.progress__link {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    padding: 6px 0 4px;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    text-align: left;
}

button.progress__link {
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.progress__bar {
    position: relative;
    display: block;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--accent-tint);
}

.progress__bar::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.5s var(--ease), opacity 0.3s;
}

.is-done .progress__bar::after,
.is-current .progress__bar::after {
    transform: scaleX(1);
}

.is-visited .progress__bar::after {
    transform: scaleX(1);
    opacity: 0.3;
}

.progress__label {
    min-width: 0;
    font-size: 0.8125rem;
    line-height: 1.25;
    color: var(--ink-3);
}

/* Подписи шагов переносятся только по словам: на узком экране показываем короткие */
.progress__full,
.progress__short {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.progress__short {
    font-size: 0.75rem;
}

.progress__full {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    clip: rect(0 0 0 0);
}

@media (min-width: 480px) {
    .progress__full {
        position: static !important;
        width: auto;
        height: auto;
        margin: 0;
        clip: auto;
        white-space: normal;
    }

    .progress__short {
        display: none;
    }
}

.is-done .progress__label,
.is-visited .progress__label {
    color: var(--ink-2);
}

.is-current .progress__label {
    color: var(--ink);
    font-weight: 600;
}

button.progress__link:hover .progress__label {
    color: var(--accent-ink);
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

/* Заголовок шага */

.step-head {
    margin: 24px 0 24px;
}

.step-head__count {
    margin: 0 0 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent-ink);
}

.step-head__title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.375rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.step-head__title:focus,
.done__title:focus {
    outline: none;
}

.step-head__lead {
    margin: 6px 0 0;
    color: var(--ink-2);
}

/* Поля */

.step > * + * {
    margin-top: 28px;
}

fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.field > legend {
    float: left;
    width: 100%;
    padding: 0;
}

.field > legend + * {
    clear: both;
}

.field__label {
    display: block;
    margin: 0 0 8px;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.35;
    color: var(--ink);
}

.field__label--sm {
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--ink-2);
}

.req {
    color: var(--accent-ink);
    font-weight: 600;
}

.opt {
    margin-left: 6px;
    font-weight: 400;
    font-size: 0.875rem;
    color: var(--ink-3);
}

.field__hint {
    clear: both;
    margin: 0 0 12px;
    font-size: 0.9375rem;
    color: var(--ink-2);
    text-wrap: pretty;
}

.field__error {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin: 8px 0 0;
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--danger);
}

.field__error::before {
    content: "";
    flex: none;
    width: 16px;
    height: 16px;
    margin-top: 1px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1zm-.75 3.5h1.5v5h-1.5v-5zm0 6.25h1.5v1.5h-1.5v-1.5z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1zm-.75 3.5h1.5v5h-1.5v-5zm0 6.25h1.5v1.5h-1.5v-1.5z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.input {
    display: block;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 12px 14px;
    font: inherit;
    font-size: 16px;
    line-height: 1.4;
    color: var(--ink);
    background: var(--surface);
    border: 1.5px solid var(--line-strong);
    border-radius: var(--radius);
    transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

.input::placeholder {
    color: var(--placeholder);
    opacity: 1;
}

.input:hover {
    border-color: #B9ADB6;
}

.input:focus,
.input:focus-visible {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--focus-halo);
}

.input[aria-invalid="true"] {
    border-color: var(--danger);
    background: #FDF7F5;
}

.input[aria-invalid="true"]:focus {
    box-shadow: 0 0 0 4px rgba(196, 69, 43, 0.16);
}

.input--area {
    min-height: 104px;
    resize: vertical;
    line-height: 1.5;
}

input[type="number"].input {
    -moz-appearance: textfield;
    appearance: textfield;
}

input[type="number"].input::-webkit-inner-spin-button,
input[type="number"].input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="date"].input {
    min-width: 0;
}

.select {
    position: relative;
}

.select .input {
    padding-right: 44px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%234A4550' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
}

.row-2 {
    display: grid;
    gap: 24px 16px;
    grid-template-columns: minmax(0, 1fr);
}

.row-2--keep {
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Даты кампании: на узком экране в одну колонку, иначе дата не помещается в поле */
.row-2--dates {
    gap: 12px;
}

@media (min-width: 480px) {
    .row-2--dates {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Поле с подписью внутри: «от», «до», «с», «по», «₽» */

.affix {
    position: relative;
}

.affix__label {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    font-size: 0.9375rem;
    color: var(--ink-3);
    cursor: text;
}

.affix .input {
    padding-left: 38px;
}

.affix--end .affix__label {
    left: auto;
    right: 16px;
}

.affix--end .input {
    padding-left: 14px;
    padding-right: 40px;
}

/* Варианты-радио: строки и карточки */

.choices {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr);
}

/* На узком экране варианты в одну колонку, чтобы слова не рвались */
@media (min-width: 400px) {
    .choices--2,
    .choices--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.choice {
    position: relative;
    display: block;
}

.choice__input,
.tag__input,
.check__input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.choice__body {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
    min-height: 52px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
    line-height: 1.35;
    transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

.choice__body:hover {
    border-color: var(--line-strong);
    background: var(--surface-2);
}

.choice__dot {
    position: relative;
    flex: none;
    width: 20px;
    height: 20px;
    border: 1.5px solid var(--line-strong);
    border-radius: 50%;
    background: var(--surface);
    transition: border-color 0.15s;
}

.choice__dot::after {
    content: "";
    position: absolute;
    inset: 3.5px;
    border-radius: 50%;
    background: var(--accent);
    transform: scale(0);
    transition: transform 0.18s var(--ease);
}

.choice__text {
    min-width: 0;
    overflow-wrap: break-word;
    hyphens: manual;
}

.choice__input:checked + .choice__body {
    border-color: var(--accent);
    background: var(--accent-tint);
    box-shadow: inset 0 0 0 1px var(--accent);
}

.choice__input:checked + .choice__body .choice__dot {
    border-color: var(--accent);
}

.choice__input:checked + .choice__body .choice__dot::after {
    transform: scale(1);
}

.choice__input:focus-visible + .choice__body {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.has-error .choice__body,
.has-error .tag__body {
    border-color: var(--danger-line);
}

.choice--card .choice__body {
    min-height: 60px;
    align-items: flex-start;
}

.choice--card .choice__dot {
    margin-top: 1px;
}

/* Блок «Задача кампании» */

.goal {
    padding: 24px 0 0;
    border-top: 1px solid var(--line);
}

.goal__title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.125rem;
    line-height: 1.3;
}

.goal__lead {
    margin: 6px 0 0;
    color: var(--ink-2);
}

.goal .question {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px dashed var(--line);
}

.goal .question:first-of-type {
    border-top: 0;
    padding-top: 0;
}

/* Тематики: чекбоксы-метки */

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    position: relative;
    display: inline-flex;
}

.tag__body {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 10px 16px;
    font-size: 0.9375rem;
    line-height: 1.2;
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}

.tag__body:hover {
    border-color: var(--line-strong);
    background: var(--surface-2);
}

.tag__input:checked + .tag__body {
    padding-left: 12px;
    color: var(--ink);
    font-weight: 600;
    background: var(--accent-tint);
    border-color: var(--accent);
}

.tag__input:checked + .tag__body::before {
    content: "";
    width: 14px;
    height: 14px;
    background: var(--accent-ink);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.tag__input:focus-visible + .tag__body {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

/* География: выбранные регионы и поиск */

.geo__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 10px;
    padding: 0;
    list-style: none;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    min-height: 40px;
    padding: 4px 4px 4px 14px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ink);
    background: var(--accent-tint);
    border-radius: 999px;
}

.chip__remove {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: inherit;
    background: transparent;
    cursor: pointer;
}

.chip__remove::before {
    content: "";
    position: absolute;
    inset: -6px;
}

.chip__remove:hover {
    background: rgba(255, 61, 143, 0.16);
}

.geo__empty {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    color: var(--ink-2);
}

.geo__box {
    position: relative;
}

.input--search {
    padding-left: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='7' cy='7' r='4.75' fill='none' stroke='%236E6575' stroke-width='1.6'/%3E%3Cpath d='M10.5 10.5L14 14' stroke='%236E6575' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 14px center;
    background-size: 18px;
}

.geo__list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 30;
    max-height: min(320px, 50vh);
    margin: 0;
    padding: 6px;
    overflow-y: auto;
    overscroll-behavior: contain;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-pop);
}

.geo__option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.geo__option.is-active {
    background: var(--surface-2);
}

.geo__name small {
    display: block;
    font-size: 0.8125rem;
    color: var(--ink-3);
}

.geo__check {
    flex: none;
    color: var(--accent);
    visibility: hidden;
}

.geo__option.is-selected {
    color: var(--accent-ink);
    font-weight: 500;
}

.geo__option.is-selected .geo__check {
    visibility: visible;
}

.geo__status {
    padding: 12px;
    color: var(--ink-2);
}

/* Контакты */

.contacts__grid {
    display: grid;
    gap: 14px 16px;
    grid-template-columns: minmax(0, 1fr);
}

.contacts.has-error .input:not([aria-invalid="true"]) {
    border-color: var(--danger-line);
}

.hp {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Согласие */

.check {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    min-height: 44px;
    padding: 14px 16px;
    background: var(--surface-2);
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
}

.check__box {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    color: transparent;
    background: var(--surface);
    border: 1.5px solid var(--line-strong);
    border-radius: 6px;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.check__input:checked + .check__box {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
}

.check__input:focus-visible + .check__box {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.check__text {
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--ink-2);
}

.consent.has-error .check {
    border-color: var(--danger-line);
    background: var(--danger-soft);
}

.alert {
    padding: 12px 14px;
    font-weight: 500;
    color: var(--danger);
    background: var(--danger-soft);
    border: 1px solid var(--danger-line);
    border-radius: var(--radius);
}

/* Кнопки */

.actions {
    position: sticky;
    bottom: 0;
    z-index: 10;
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 32px calc(var(--card-pad) * -1) calc(var(--card-pad) * -1);
    padding: 12px var(--card-pad) calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgba(250, 247, 249, 0.92);
    border-top: 1px solid var(--line);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    -webkit-backdrop-filter: saturate(1.4) blur(8px);
    backdrop-filter: saturate(1.4) blur(8px);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    padding: 0 22px;
    font: inherit;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    text-decoration: none;
    border: 1.5px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.btn:active {
    transform: translateY(1px);
}

.btn:disabled {
    opacity: 0.7;
    cursor: progress;
}

.btn--primary {
    flex: 1 1 auto;
    color: #fff;
    background: var(--ink);
}

.btn--primary:hover:not(:disabled) {
    background: #2A2530;
}

.btn--ghost {
    flex: none;
    padding: 0 16px;
    color: var(--ink);
    background: var(--surface);
    border-color: var(--line);
}

.btn--ghost:hover:not(:disabled) {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-card);
}

/* Розовая кнопка ADELIS: второе действие, которое всё же должно быть заметно */
.btn--secondary {
    color: #fff;
    background: var(--accent);
}

.btn--secondary:hover:not(:disabled) {
    background: var(--accent-ink);
}

/* Экран «Спасибо» */

.card--done {
    padding: 44px 24px;
    text-align: center;
}

.done__mark {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    color: #fff;
    background: linear-gradient(135deg, #FF2E92, #FF8A6B);
    border-radius: 50%;
    box-shadow: 0 12px 24px -12px rgba(255, 61, 143, 0.7);
}

.done__title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.25rem, 1rem + 1.2vw, 1.625rem);
    line-height: 1.25;
}

.done__text {
    margin: 10px auto 28px;
    max-width: 30em;
    color: var(--ink-2);
}

/* Подвал */

.site-footer {
    margin-top: 56px;
    border-top: 1px solid var(--line);
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    max-width: calc(760px + var(--gutter) * 2);
    margin: 0 auto;
    padding: 20px var(--gutter) calc(24px + env(safe-area-inset-bottom, 0px));
    font-size: 0.875rem;
}

.site-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--ink-2);
}

.site-footer__brand {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-right: auto;
    font-weight: 800;
    font-size: 0.8125rem;
    letter-spacing: 0.34em;
    color: var(--ink);
}

/* «tools» после разрядки ADELIS: обычным начертанием, приглушённо */
.site-footer__brand-sub {
    margin-left: 2px;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0;
    text-transform: lowercase;
    color: var(--ink-3);
}

/* Политика обработки ПД */

.doc {
    max-width: 720px;
    padding-top: 24px;
}

.doc__back {
    margin: 0;
}

.doc__back a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.doc__title {
    margin: 8px 0 0;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.375rem, 1.05rem + 1.6vw, 2rem);
    line-height: 1.2;
    letter-spacing: -0.015em;
    text-wrap: balance;
}

.doc__meta {
    margin: 10px 0 0;
    color: var(--ink-2);
}

.doc__section {
    margin-top: 32px;
}

.doc__section h2 {
    margin: 0 0 10px;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.35;
}

.doc__section p,
.doc__section li {
    line-height: 1.65;
}

.doc__section p {
    margin: 0 0 12px;
}

.doc__section ul {
    margin: 0 0 12px;
    padding-left: 1.25em;
}

.doc__section li + li {
    margin-top: 6px;
}

.doc .doc__facts {
    display: grid;
    gap: 10px;
    margin: 16px 0 0;
    padding: 16px;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.doc .doc__facts li {
    display: grid;
    gap: 2px;
    margin: 0;
}

.doc__facts span {
    font-size: 0.875rem;
    color: var(--ink-2);
}

.doc__facts mark {
    justify-self: start;
}

.nowrap {
    white-space: nowrap;
}

mark.ph {
    padding: 1px 5px;
    font-weight: 600;
    color: var(--mark-ink);
    background: var(--mark);
    border-radius: 4px;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

/* Главная: хиро-карточка с розовыми градиентными пятнами ADELIS */

.start-hero {
    position: relative;
    overflow: hidden;
    margin-top: 24px;
    padding: 28px var(--card-pad) 30px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.start-hero::before,
.start-hero::after {
    content: "";
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
}

.start-hero::before {
    top: -140px;
    right: -80px;
    width: 420px;
    height: 320px;
    background: radial-gradient(circle, var(--accent-soft) 0%, rgba(255, 61, 143, 0.35) 60%, transparent 75%);
}

.start-hero::after {
    bottom: -150px;
    left: -90px;
    width: 300px;
    height: 260px;
    background: radial-gradient(circle, rgba(255, 190, 215, 0.8) 0%, transparent 70%);
}

.start-hero > * {
    position: relative;
    z-index: 1;
}

/* На телефоне карточка узкая: большое пятно заливало бы её целиком */
@media (max-width: 559px) {
    .start-hero::before {
        top: -120px;
        right: -120px;
        width: 300px;
        height: 240px;
    }

    .start-hero::after {
        left: -120px;
        bottom: -140px;
        width: 220px;
        height: 200px;
    }
}

.start-hero .brief__head {
    padding-top: 0;
}

.start-hero__eyebrow {
    margin: 0 0 10px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent-ink);
}

/* Выбор инструмента на главной */

.tools {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr);
    margin-top: 28px;
}

.tool-card {
    position: relative;
    display: grid;
    gap: 10px;
    align-content: start;
    min-height: 220px;
    padding: 24px var(--card-pad) 22px;
    color: var(--ink);
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.tool-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-pop);
    transform: translateY(-2px);
}

.tool-card__tag {
    width: max-content;
    padding: 3px 9px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--ink-2);
    background: var(--accent-tint);
    border-radius: 999px;
}

.tool-card__title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.25rem;
    line-height: 1.3;
}

.tool-card__text {
    margin: 0;
    color: var(--ink-2);
}

.tool-card__cta {
    margin-top: auto;
    padding-top: 6px;
    font-weight: 600;
    color: var(--accent-ink);
}

.tool-card__cta::after {
    content: " →";
}

/* Заявка на анализ ролика */

.back-link {
    margin: 0 0 8px;
}

.back-link a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    text-decoration: none;
}

.form-section + .form-section {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}

.form-section__title {
    margin: 0 0 20px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.25rem;
    line-height: 1.3;
}

.or-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    color: var(--ink-3);
}

.or-divider::before,
.or-divider::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: var(--line);
}

.input--file {
    padding: 10px 12px;
    cursor: pointer;
}

.file-chosen {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    padding: 10px 14px;
    background: var(--accent-tint);
    border: 1.5px solid var(--accent-soft);
    border-radius: var(--radius);
}

.file-chosen__name {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: break-word;
    font-weight: 500;
}

.btn--small {
    min-height: 40px;
    padding: 0 14px;
    font-size: 0.9375rem;
}

.upload-progress {
    display: grid;
    gap: 6px;
    margin-top: 10px;
    font-size: 0.875rem;
    color: var(--ink-2);
}

.upload-progress__bar {
    display: block;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--accent-tint);
}

.upload-progress__bar span {
    display: block;
    height: 100%;
    background: var(--accent);
    transition: width 0.2s;
}

.form-note {
    margin: 12px 0 0;
    font-size: 0.875rem;
    color: var(--ink-2);
}

/* Планшет и компьютер */

@media (min-width: 560px) {
    :root {
        --gutter: 24px;
        --card-pad: 32px;
    }

    .brief__head {
        padding-top: 48px;
    }

    .start-hero {
        margin-top: 40px;
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .row-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contacts__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contacts__grid .field--wide {
        grid-column: 1 / -1;
    }

    .actions {
        position: static;
        margin: 36px 0 0;
        padding: 24px 0 0;
        background: none;
        border-radius: 0;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .btn--primary {
        flex: none;
        min-width: 200px;
        margin-left: auto;
    }

    .doc .doc__facts li {
        grid-template-columns: 180px minmax(0, 1fr);
        gap: 16px;
        align-items: baseline;
    }

    .progress__label {
        font-size: 0.875rem;
    }
}

/* Три варианта в ряд только там, где самые длинные слова помещаются целиком */
@media (min-width: 640px) {
    .choices--3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tools {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 680px) {
    .choices--cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 800px) {
    :root {
        --card-pad: 44px;
    }

    .brief__head {
        padding-top: 64px;
    }

    .step-head__title {
        font-size: 1.5rem;
    }
}

/* Меньше движения по желанию пользователя */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}
