/* Questionnaire */
.mdtr-hq-shell {
    --mdtr-hq-bg: #e8e8da;
    --mdtr-hq-card: #d8dac8;
    --mdtr-hq-accent: #747b66;
    --mdtr-hq-accent-dark: #626957;
    --mdtr-hq-text: #2d302a;
    --mdtr-hq-white: #fbfaf5;
    --mdtr-hq-line: rgba(45, 48, 42, 0.22);
    background: var(--mdtr-hq-bg);
    color: var(--mdtr-hq-text);
    min-height: 100vh;
    min-height: 100svh;
    width: 100vw;
    max-width: none;
    position: relative;
    left: 50%;
    margin-left: -50vw;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(44px, 7vw, 96px) 24px;
    box-sizing: border-box;
}

.mdtr-hq-shell *,
.mdtr-hq-shell *::before,
.mdtr-hq-shell *::after {
    box-sizing: border-box;
}

.mdtr-hq-form {
    width: min(100%, 1040px);
    margin: 0 auto;
}

.mdtr-hq-step {
    display: none;
}

.mdtr-hq-step.is-active {
    display: block;
    animation: mdtrHqFade 0.28s ease;
}

@keyframes mdtrHqFade {
    from { opacity: 0; transform: translateY(7px); }
    to { opacity: 1; transform: translateY(0); }
}

.mdtr-hq-step-content {
    width: 100%;
    text-align: center;
}

.mdtr-hq-step h2,
.mdtr-hq-success h2 {
    color: var(--mdtr-hq-text);
    font-size: clamp(28px, 3.1vw, 43px);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin: 0 auto clamp(28px, 3.2vw, 42px);
    max-width: 900px;
}

.mdtr-hq-hint {
    width: min(100%, 880px);
    margin: -14px auto 34px;
    padding: 22px 28px;
    border: 1px dashed var(--mdtr-hq-line);
    font-size: 16px;
    line-height: 1.5;
    text-align: left;
}

.mdtr-hq-field {
    text-align: left;
}

.mdtr-hq-field-wide {
    width: min(100%, 620px);
    margin: 0 auto;
}

.mdtr-hq-field label,
.mdtr-hq-upload label {
    display: block;
    font-size: 14px;
    margin: 0 0 8px;
}

.mdtr-hq-field input,
.mdtr-hq-field textarea,
.mdtr-hq-custom-area input[type="number"],
.mdtr-hq-contact-grid input,
.mdtr-hq-number-pair input {
    width: 100%;
    border: 1px solid rgba(45, 48, 42, 0.48);
    background: var(--mdtr-hq-white);
    color: var(--mdtr-hq-text);
    border-radius: 3px;
    padding: 14px 16px;
    min-height: 48px;
    font: inherit;
    outline: none;
}

.mdtr-hq-field textarea {
    resize: vertical;
    min-height: 150px;
}

.mdtr-hq-field input:focus,
.mdtr-hq-field textarea:focus,
.mdtr-hq-contact-grid input:focus,
.mdtr-hq-number-pair input:focus,
.mdtr-hq-custom-area input[type="number"]:focus {
    border-color: var(--mdtr-hq-accent-dark);
    box-shadow: 0 0 0 2px rgba(98, 105, 87, 0.12);
}

.mdtr-hq-grid {
    display: grid;
    gap: 12px;
    width: 100%;
}

.mdtr-hq-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mdtr-hq-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mdtr-hq-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mdtr-hq-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.mdtr-hq-choice {
    cursor: pointer;
    min-width: 0;
}

.mdtr-hq-choice > input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mdtr-hq-choice-inner {
    min-height: 106px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    padding: 20px 16px;
    background: var(--mdtr-hq-card);
    border: 2px solid transparent;
    border-radius: 3px;
    box-shadow: 0 3px 0 rgba(45, 48, 42, 0.12);
    color: var(--mdtr-hq-text);
    font-size: 15px;
    line-height: 1.28;
    text-align: center;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.mdtr-hq-choice:hover .mdtr-hq-choice-inner {
    transform: translateY(-1px);
    border-color: rgba(255,255,255,0.72);
}

.mdtr-hq-choice > input:focus-visible + .mdtr-hq-choice-inner {
    outline: 2px solid var(--mdtr-hq-accent-dark);
    outline-offset: 3px;
}

.mdtr-hq-choice > input:checked + .mdtr-hq-choice-inner {
    background: #cbd0b9;
    border-color: var(--mdtr-hq-white);
}

.mdtr-hq-icon {
    font-size: 28px;
    line-height: 1;
    color: var(--mdtr-hq-accent-dark);
}

.mdtr-hq-project-grid .mdtr-hq-choice-inner {
    min-height: 78px;
}

.mdtr-hq-goal-grid .mdtr-hq-choice-inner {
    min-height: 188px;
    font-size: 16px;
}

.mdtr-hq-inline-options {
    display: flex;
    align-items: stretch;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.mdtr-hq-inline-options .mdtr-hq-choice-inner {
    min-height: 52px;
    min-width: 150px;
    padding: 12px 18px;
}

.mdtr-hq-custom-area {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--mdtr-hq-card);
    padding: 6px 8px;
    min-width: 170px;
    border: 2px solid transparent;
}

.mdtr-hq-custom-area:has(input[type="radio"]:checked) {
    border-color: var(--mdtr-hq-white);
    background: #cbd0b9;
}

.mdtr-hq-custom-area input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--mdtr-hq-accent-dark);
}

.mdtr-hq-custom-area input[type="number"] {
    min-height: 38px;
    padding: 8px 10px;
}

.mdtr-hq-number-pair {
    width: min(100%, 620px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.mdtr-hq-number-pair label {
    display: grid;
    grid-template-columns: 1fr 100px;
    align-items: center;
    gap: 12px;
    background: var(--mdtr-hq-card);
    padding: 12px 14px;
    text-align: left;
}

.mdtr-hq-money {
    width: min(100%, 360px);
    margin: 0 auto;
    position: relative;
}

.mdtr-hq-money input {
    text-align: center;
    padding-right: 78px;
}

.mdtr-hq-money span {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    opacity: 0.74;
}

.mdtr-hq-upload {
    display: none;
    width: min(100%, 620px);
    margin: 20px auto 0;
    background: rgba(251, 250, 245, 0.56);
    border: 1px dashed var(--mdtr-hq-line);
    padding: 18px;
    text-align: left;
}

.mdtr-hq-upload.is-visible {
    display: block;
}

.mdtr-hq-upload input[type="file"] {
    display: block;
    margin-top: 8px;
    width: 100%;
}

.mdtr-hq-upload small {
    display: block;
    opacity: 0.68;
    margin-top: 8px;
}

.mdtr-hq-contact-grid {
    width: min(100%, 680px);
    margin: 0 auto;
    display: grid;
    gap: 18px;
}

.mdtr-hq-actions {
    width: min(100%, 900px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: clamp(34px, 4vw, 52px) auto 0;
}

.mdtr-hq-btn {
    min-height: 54px;
    border: 0;
    border-radius: 999px;
    padding: 14px 24px;
    font: inherit;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.mdtr-hq-btn:hover {
    transform: translateY(-1px);
}

.mdtr-hq-btn-back {
    background: var(--mdtr-hq-white);
    color: var(--mdtr-hq-text);
}

.mdtr-hq-btn-next,
.mdtr-hq-btn-submit {
    background: var(--mdtr-hq-accent);
    color: #fff;
}

.mdtr-hq-btn-next:hover,
.mdtr-hq-btn-submit:hover {
    background: var(--mdtr-hq-accent-dark);
}

.mdtr-hq-btn-submit {
    display: none;
}

.mdtr-hq-home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: min(100%, 360px);
    margin-top: 28px;
    background: var(--mdtr-hq-accent);
    color: #fff;
    text-decoration: none;
}

.mdtr-hq-home-btn:hover {
    background: var(--mdtr-hq-accent-dark);
    color: #fff;
    text-decoration: none;
}

.mdtr-hq-actions.is-last .mdtr-hq-btn-next {
    display: none;
}

.mdtr-hq-actions.is-last .mdtr-hq-btn-submit {
    display: block;
}

.mdtr-hq-actions.is-first .mdtr-hq-btn-back {
    visibility: hidden;
}

.mdtr-hq-error {
    min-height: 22px;
    margin: 16px auto 0;
    color: #7c2e21;
    font-size: 14px;
    text-align: center;
}

.mdtr-hq-success {
    display: none;
    text-align: center;
    padding: 30px 0;
}

.mdtr-hq-form.is-sent .mdtr-hq-step,
.mdtr-hq-form.is-sent .mdtr-hq-actions,
.mdtr-hq-form.is-sent .mdtr-hq-error {
    display: none !important;
}

.mdtr-hq-form.is-sent .mdtr-hq-success {
    display: block;
}

.mdtr-hq-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.mdtr-hq-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Tablet */
@media (max-width: 980px) {
    .mdtr-hq-grid-5,
    .mdtr-hq-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .mdtr-hq-goal-grid .mdtr-hq-choice-inner {
        min-height: 150px;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .mdtr-hq-shell {
        min-height: 100vh;
        min-height: 100svh;
        padding: 36px 16px;
        align-items: flex-start;
    }

    .mdtr-hq-step h2,
    .mdtr-hq-success h2 {
        font-size: 29px;
        margin-bottom: 26px;
    }

    .mdtr-hq-hint {
        padding: 16px;
        margin: -10px auto 22px;
        font-size: 14px;
    }

    .mdtr-hq-grid-2,
    .mdtr-hq-grid-3,
    .mdtr-hq-grid-4,
    .mdtr-hq-grid-5 {
        grid-template-columns: 1fr;
    }

    .mdtr-hq-choice-inner,
    .mdtr-hq-goal-grid .mdtr-hq-choice-inner {
        min-height: 72px;
        padding: 14px 16px;
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
    }

    .mdtr-hq-project-grid .mdtr-hq-choice-inner {
        min-height: 66px;
    }

    .mdtr-hq-inline-options {
        flex-direction: column;
    }

    .mdtr-hq-inline-options .mdtr-hq-choice-inner,
    .mdtr-hq-custom-area {
        width: 100%;
        min-width: 0;
    }

    .mdtr-hq-number-pair {
        grid-template-columns: 1fr;
    }

    .mdtr-hq-number-pair label {
        grid-template-columns: 1fr 90px;
    }

    .mdtr-hq-actions {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 28px;
    }

    .mdtr-hq-btn {
        min-height: 50px;
        padding: 12px 14px;
        font-size: 14px;
    }
}
