:root {
    --brand: #0f4b38;
    --deep: #093626;
    --mint: #e8f2ed;
    --ink: #14231d;
    --muted: #65736c;
    --line: #d8e1da;
    --danger: #b42318;
    --surface: #fff;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 0;
    min-height: 100vh;
    margin: 0;
    padding: clamp(20px, 5vw, 64px) 20px;
    color: var(--ink);
    background: radial-gradient(circle at 8% 0, #ddecdf 0, transparent 32rem), #f4f6f2;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

button,
input,
textarea {
    font: inherit;
}

.page-shell {
    width: min(100%, 760px);
    margin: auto;
}

.brand {
    display: inline-block;
    margin-bottom: clamp(28px, 5vw, 52px);
}

.brand-logo {
    display: block;
    width: auto;
    max-width: 180px;
    height: 44px;
    object-fit: contain;
    object-position: left;
}

.brand-fallback {
    font-weight: 800;
    color: var(--brand);
}

.quest-card {
    overflow: hidden;
    padding: clamp(22px, 6vw, 54px);
    border: 1px solid rgba(15, 75, 56, .12);
    border-radius: 28px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 24px 70px rgba(22, 51, 39, .12);
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--brand);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
}

h1 {
    margin: 0;
    font-size: clamp(2.25rem, 8vw, 4.25rem);
    line-height: .96;
    letter-spacing: -.06em;
}

.quest-heading>p:last-child {
    margin: 15px 0 0;
    color: var(--muted);
}

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

legend {
    margin: 0 0 16px;
    color: var(--brand);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 14px;
}

.field {
    min-width: 0;
}

.field-full {
    grid-column: 1 / -1;
}

label {
    display: block;
    margin-bottom: 7px;
    color: #34423c;
    font-size: .82rem;
    font-weight: 720;
}

label span {
    color: var(--muted);
    font-weight: 500;
}

input,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: 0;
    background: var(--surface);
    color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
}

input {
    min-height: 50px;
    padding: 0 14px;
}

textarea {
    min-height: 104px;
    padding: 13px 14px;
    resize: vertical;
}

input:focus,
textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(15, 75, 56, .1);
}

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

.field-error {
    margin: 6px 0 0;
    color: var(--danger);
    font-size: .74rem;
}

.field-error:empty {
    display: none;
}

.actions {
    display: flex;
    gap: 10px;
    margin-top: 28px;
}

.actions button {
    min-height: 52px;
    border-radius: 13px;
    padding: 0 20px;
    border: 0;
    font-weight: 800;
    cursor: pointer;
}

.next-button,
.submit-button {
    flex: 1;
    background: var(--brand);
    color: white;
    box-shadow: 0 12px 28px rgba(15, 75, 56, .18);
}

.next-button:hover,
.submit-button:hover {
    background: var(--deep);
}

.back-button {
    background: #edf1ee;
    color: var(--brand);
}

.button-loader {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .75s linear infinite;
}

.is-loading .button-text {
    display: none;
}

.is-loading .button-loader {
    display: inline-block;
}

.submit-button:disabled {
    opacity: .75;
    cursor: wait;
}

.form-status {
    margin: 14px 0 0;
    color: var(--danger);
    font-size: .82rem;
}

.form-status:empty {
    display: none;
}

.confirmation {
    padding: 32px 0 4px;
    text-align: center;
}

.confirmation-icon {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    margin: auto;
    border-radius: 50%;
    background: var(--mint);
    color: var(--brand);
    font-size: 1.8rem;
    font-weight: 800;
}

.confirmation h2 {
    margin: 18px 0 8px;
    font-size: 1.7rem;
    letter-spacing: -.04em;
}

.confirmation p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.botcheck {
    display: none !important;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width:520px) {
    body {
        padding: 18px 12px;
    }

    .quest-card {
        padding: 24px 18px;
        border-radius: 22px;
    }

    .brand-logo {
        max-width: 150px;
        height: 38px;
    }

    .fields-grid {
        grid-template-columns: 1fr;
    }

    .field-full {
        grid-column: auto;
    }

    .actions {
        flex-wrap: wrap;
    }

    .back-button {
        flex: 0 0 auto;
    }

    .next-button,
    .submit-button {
        min-width: 0;
    }
}

@media (prefers-reduced-motion:reduce) {
    * {
        transition: none !important;
        animation-duration: .01ms !important;
    }
}