* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --page-width: 800px;
    --content-width: 672px;
    --field-height: 44px;
    --label-size: 18px;
    --check-size: 17px;
    --consent-size: 14px;
    --btn-height: 46px;
    --btn-font-size: 20px;
    --body-font: "Arial Regular", Arial, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
    --heading-font: "Arial Bold", Arial, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
    font-family: var(--body-font);
    font-weight: 400;
    background: #ffffff;
    color: #000000;
}

.page {
    width: 100%;
    max-width: var(--page-width);
    min-height: 100vh;
    margin: 0 auto;
    background: #ffffff;
}

.hero {
    width: 100%;
    line-height: 0;
}

.hero img {
    display: block;
    width: 100%;
    height: auto;
}

.content {
    width: min(var(--content-width), calc(100% - 28px));
    margin: 0 auto;
    padding: 20px 0 32px;
}

.fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 28px;
}

.fields label {
    display: block;
}

.fields .wide {
    grid-column: 1 / -1;
}

label > span,
legend {
    display: block;
    margin-bottom: 6px;
    font-family: var(--heading-font);
    font-size: var(--label-size);
    font-weight: 700;
    line-height: 1.35;
    color: #000000;
}

label > span::before {
    content: "*";
    margin-right: 4px;
    color: #ff2c2c;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input:not([type]),
select {
    width: 100%;
    height: var(--field-height);
    padding: 0 20px;
    border: 1px solid #000000;
    border-radius: 0;
    outline: none;
    background: #ffffff;
    color: #000000;
    font-family: var(--body-font);
    font-size: 18px;
    font-weight: 400;
}

select {
    appearance: auto;
}

input:focus,
select:focus {
    border-color: #1b1293;
}

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

legend {
    width: 100%;
    margin-bottom: 8px;
}

.choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 24px;
    margin-bottom: 10px;
}

.choice {
    display: flex;
    align-items: center;
    color: #000000;
    font-family: var(--body-font);
    font-size: var(--check-size);
    font-weight: 400;
    line-height: 1.25;
    cursor: pointer;
}

.choice input,
.consent input {
    width: 16px;
    height: 16px;
    margin: 0 8px 0 0;
    flex-shrink: 0;
}

.choice span,
.consent span {
    margin: 0;
    font-family: var(--body-font);
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
}

.choice span::before,
.consent span::before {
    content: none;
}

.consent {
    display: flex;
    align-items: flex-start;
    margin-top: 40px;
    padding: 27px 50px;
    background: #f1f1f4;
    color: #000000;
    font-family: var(--body-font);
    font-size: var(--consent-size);
    font-weight: 500;
    line-height: 32px;
}

.consent input {
    margin-top: 7px;
}

.consent a {
    color: inherit;
    text-decoration: underline;
}

.consent a:hover,
.consent a:focus {
    text-decoration: underline;
}

.message {
    display: none;
    margin-top: 18px;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.4;
}

.message.error {
    display: block;
    background: #fff0f1;
    color: #a20e1b;
}

.message.success {
    display: block;
    background: #eaf7ef;
    color: #126b36;
}

button {
    width: 100%;
    max-width: var(--content-width);
    height: var(--btn-height);
    margin-top: 20px;
    border: 0;
    border-radius: 0;
    background: #D51E19;
    color: #ffffff;
    font-family: var(--body-font);
    font-size: var(--btn-font-size);
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0;
    text-align: center;
    cursor: pointer;
}

button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    :root {
        --content-width: calc(100vw - 32px);
        --field-height: 42px;
        --label-size: 16px;
        --check-size: 14px;
        --consent-size: 14px;
        --btn-height: 48px;
        --btn-font-size: 22px;
    }

    .content {
        width: var(--content-width);
        padding: 16px 0 22px;
    }

    .fields,
    .choices {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .fields .wide {
        grid-column: auto;
    }

    fieldset {
        margin-top: 26px;
    }

    .consent {
        padding: 18px 20px;
        line-height: 1.5;
    }

    .consent input {
        margin-top: 2px;
    }
}
