* {
    box-sizing: border-box;
}

:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-muted: #f8fbff;
    --text: #172033;
    --text-soft: #5f6c86;
    --primary: #2553d8;
    --primary-dark: #1e44b2;
    --border: #d8e0ee;
    --success-bg: #ecfdf3;
    --success-border: #9fe4b4;
    --success-text: #11663a;
    --error-bg: #fff5f5;
    --error-border: #f3b4b8;
    --error-text: #a1232a;
    --shadow: 0 20px 45px rgba(23, 32, 51, 0.08);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(37, 83, 216, 0.08), transparent 32%),
        linear-gradient(180deg, #f9fbff 0%, var(--bg) 100%);
    line-height: 1.55;
}

img {
    max-width: 100%;
}

.page-shell {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

.hero {
    padding: 1rem 0 2rem;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(37, 83, 216, 0.1);
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
}

.hero h1 {
    margin: 1rem 0 0.65rem;
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.1;
}

.hero__text {
    max-width: 760px;
    margin: 0;
    font-size: 1.05rem;
    color: var(--text-soft);
}

.hero__hint {
    margin-top: 1rem;
    color: var(--text-soft);
    font-size: 0.96rem;
}

.hero__hint span,
.field label span,
.checkbox-row strong {
    color: #d11f34;
}

main {
    display: grid;
    gap: 1.25rem;
}

.alert,
.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.alert {
    padding: 1.25rem 1.4rem;
}

.alert h2 {
    margin: 0 0 0.45rem;
    font-size: 1.2rem;
}

.alert p {
    margin: 0;
}

.alert--success {
    border-color: var(--success-border);
    background: linear-gradient(180deg, #f7fffa 0%, var(--success-bg) 100%);
}

.alert--success h2,
.alert--success p {
    color: var(--success-text);
}

.alert--error {
    border-color: var(--error-border);
    background: linear-gradient(180deg, #fffdfd 0%, var(--error-bg) 100%);
}

.alert--error h2,
.alert--error p,
.alert--error li {
    color: var(--error-text);
}

.error-list {
    margin: 0.65rem 0 0;
    padding-left: 1.25rem;
}

.summary-card {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.2rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(17, 102, 58, 0.12);
    background: rgba(255, 255, 255, 0.7);
}

.summary-card__label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--text-soft);
    font-size: 0.85rem;
}

.form-card {
    padding: 1.5rem;
}

.form-section + .form-section {
    margin-top: 1.75rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border);
}

.section-heading {
    margin-bottom: 1rem;
}

.section-heading__eyebrow {
    display: inline-block;
    margin-bottom: 0.35rem;
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.section-heading h2 {
    margin: 0;
    font-size: 1.35rem;
}

.form-grid {
    display: grid;
    gap: 1rem;
}

.form-grid--2col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field,
.choice-group,
.checkbox-stack {
    min-width: 0;
}

.field--full {
    grid-column: 1 / -1;
}

.field label,
.field small,
.field-error,
.checkbox-row,
.choice-card span {
    display: block;
}

.field label {
    margin-bottom: 0.45rem;
    font-weight: 700;
}

.field small {
    margin-top: 0.4rem;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.choice-detail-grid {
    margin-top: 1rem;
}

input,
textarea {
    width: 100%;
    padding: 0.95rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font: inherit;
    color: var(--text);
    background: #fff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

input[readonly],
input:disabled {
    background: var(--surface-muted);
    color: #41506f;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: rgba(37, 83, 216, 0.65);
    box-shadow: 0 0 0 4px rgba(37, 83, 216, 0.12);
}

.field--error input,
.field--error textarea,
.checkbox-row--error,
.form-section.field--error {
    border-color: var(--error-border);
}

.field-error {
    margin: 0.45rem 0 0;
    color: var(--error-text);
    font-size: 0.92rem;
}

.choice-group {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.choice-card {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    padding: 1rem 1.05rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.choice-card:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 83, 216, 0.35);
    box-shadow: 0 10px 25px rgba(37, 83, 216, 0.08);
}

.choice-card input {
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.15rem;
    accent-color: var(--primary);
}

.checkbox-stack {
    display: grid;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.checkbox-row {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    padding: 1rem 1.05rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #fff;
}

.checkbox-row input {
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.15rem;
    accent-color: var(--primary);
}

.checkbox-row--error {
    background: #fff9f9;
}

.form-footer {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.form-note {
    max-width: 720px;
    margin: 0;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.95rem 1.35rem;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary) 0%, #355fe0 100%);
    color: #fff;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(37, 83, 216, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(37, 83, 216, 0.26);
}

.button:disabled {
    opacity: 0.72;
    cursor: progress;
}

.button--secondary {
    margin-top: 1rem;
    background: #fff;
    color: var(--primary-dark);
    border: 1px solid rgba(37, 83, 216, 0.2);
    box-shadow: none;
}

.hp-field {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

@media (max-width: 900px) {
    .summary-card,
    .form-grid--2col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .page-shell {
        width: min(100% - 1rem, 1120px);
        padding: 1rem 0 2rem;
    }

    .form-card,
    .alert {
        border-radius: 20px;
        padding: 1rem;
    }

    .hero__badge {
        font-size: 0.84rem;
    }

    .hero__text,
    .form-note {
        font-size: 0.96rem;
    }

    .button {
        width: 100%;
    }

    .form-footer {
        align-items: stretch;
    }
}
