.contact-decode-page {
    padding: clamp(2rem, 4vw, 3.5rem) 0 clamp(3rem, 6vw, 5rem);
}

.contact-decode-page__stack {
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    width: 100%;
    max-width: 72rem;
    margin-inline: auto;
}

.contact-decode-page__header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-decode-page__intro {
    max-width: 60rem;
}

.contact-decode-page__intro p {
    margin: 0 0 0.75rem;
    color: var(--arpm-color-text-secondary, #3a3a3a);
    line-height: 1.55;
}

.contact-decode-page__intro p:last-child {
    margin-bottom: 0;
}

.contact-decode-page__estimate {
    font-size: 0.95rem;
    color: var(--arpm-color-text-primary, #111);
}

/* Progress bar */
.decode-eoi-form__progress {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    position: sticky;
    top: 0.5rem;
    z-index: 2;
    background: var(--arpm-color-surface, #fff);
    padding: 0.5rem 0;
}

.decode-eoi-form__progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    font-family: var(--arpm-font-mono, "IBM Plex Mono", monospace);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--arpm-color-text-secondary, #555);
}

.decode-eoi-form__progress-track {
    height: 0.35rem;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.decode-eoi-form__progress-fill {
    height: 100%;
    background: var(--arpm-color-blue, #1a5cff);
    border-radius: 999px;
    transition: width 0.25s ease;
}

/* Form layout */
.decode-eoi-form {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 2vw, 1.5rem);
}

.decode-eoi-form__section {
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 0.6rem;
    padding: clamp(0.85rem, 2vw, 1.5rem);
    margin: 0;
    min-width: 0;
}

.decode-eoi-form__legend {
    font-family: var(--arpm-font-sans, "IBM Plex Sans", sans-serif);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0 0.4rem;
    color: var(--arpm-color-text-primary, #111);
}

/* Section A: dense, fills wide screens via auto-fit columns */
.decode-eoi-form__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 0.75rem 1.25rem;
    margin-top: 0.85rem;
}

.decode-eoi-form__stack {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    margin-top: 0.85rem;
}

.decode-eoi-form__field--full {
    grid-column: 1 / -1;
}

.decode-eoi-form__field--narrow {
    max-width: 16rem;
}

.decode-eoi-form__req {
    color: var(--arpm-color-orange, #e85d04);
}

/* Choice option groups */
.decode-eoi-form__options {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.decode-eoi-form__options--multi {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 0.4rem 1.25rem;
}

.decode-eoi-form__radio,
.decode-eoi-form__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
    cursor: pointer;
}

.decode-eoi-form__radio input,
.decode-eoi-form__checkbox input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.decode-eoi-form__other-input {
    margin-top: 0.5rem;
    max-width: 28rem;
}

.decode-eoi-form__consents {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.85rem;
}

.decode-eoi-form__consents .contact-form__field {
    margin: 0;
}

.decode-eoi-form__textarea {
    min-height: 5.5rem;
}

.decode-eoi-form__legal-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--arpm-color-blue, #1a5cff);
    text-decoration: underline;
    cursor: pointer;
}

.decode-eoi-form__legal-link:hover {
    color: var(--arpm-color-orange, #e85d04);
}

.decode-eoi-form__success {
    max-width: 48rem;
}

/* Legal modal */
.decode-eoi-legal-modal.tool-modal__panel {
    max-width: 44rem;
    width: min(94vw, 44rem);
    max-height: 86vh;
}

.decode-eoi-legal-modal__content {
    max-height: 62vh;
    overflow-y: auto;
    padding-right: 0.4rem;
}

.decode-eoi-legal-modal__para {
    margin: 0 0 0.65rem;
    font-size: 0.88rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

.decode-eoi-legal-modal__footer {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 540px) {
    .decode-eoi-form__field--narrow {
        max-width: none;
    }

    .decode-eoi-form__progress {
        position: static;
    }
}
