/* ===== Quiz modal — light popup over the dark page ===== */

.qz {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(6, 6, 9, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    font-family: var(--font-body);
}

.qz.is-open { display: flex; }

.qz__dialog {
    position: relative;
    width: 100%;
    max-width: 620px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: #fff;
    color: #14141a;
    border-radius: 22px;
    padding: 34px 38px 30px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.qz__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #f1f1f4;
    color: #55555f;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.qz__close:hover { background: #e6e6ea; color: #14141a; }

/* progress */

.qz__progress {
    display: flex;
    gap: 6px;
    margin-bottom: 24px;
}

.qz__progress span {
    flex: 1;
    height: 4px;
    border-radius: 100px;
    background: #e8e8ee;
    overflow: hidden;
}

.qz__progress span i {
    display: block;
    height: 100%;
    border-radius: 100px;
    background: #9bc700;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.35s ease;
}

.qz__progress span.is-done i { transform: scaleX(1); }

/* steps */

.qz__step { display: none; }
.qz__step.is-active { display: block; }

.qz__eyebrow {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #7a7a86;
    margin-bottom: 10px;
}

.qz__title {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0 0 10px;
}

.qz__lead {
    font-size: 16px;
    line-height: 1.5;
    color: #55555f;
    margin: 0 0 22px;
}

.qz__note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #f4f8e0;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 15px;
    line-height: 1.45;
    color: #3d4a12;
    margin-bottom: 24px;
}

.qz__note b { font-weight: 700; }

/* options */

.qz__options {
    display: grid;
    gap: 10px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.qz__opt {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
    border: 1px solid #e2e2e9;
    border-radius: 14px;
    font-size: 16px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.qz__opt:hover { border-color: #b9c98a; background: #fafcf1; }

.qz__opt input { position: absolute; opacity: 0; pointer-events: none; }

.qz__box {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border: 1.5px solid #cfcfd8;
    border-radius: 7px;
    display: grid;
    place-items: center;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.qz__opt input[type="radio"] + .qz__box { border-radius: 50%; }

.qz__box::after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: transparent;
    transition: background 0.15s ease;
}

.qz__opt input[type="radio"] + .qz__box::after { border-radius: 50%; }

/* shared by the answer options and the consent row — scoping these to
   .qz__opt alone left the consent box with no checked state at all */
.qz__opt input:checked + .qz__box,
.qz__consent input:checked + .qz__box { border-color: #9bc700; background: #9bc700; }

.qz__opt input:checked + .qz__box::after,
.qz__consent input:checked + .qz__box::after { background: #fff; }

.qz__opt:has(input:checked) { border-color: #9bc700; background: #f7fbe8; }

/* actions */

.qz__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.qz__btn {
    appearance: none;
    /* transparent border on the base keeps filled and outlined
       variants exactly the same height side by side */
    border: 1.5px solid transparent;
    border-radius: 100px;
    padding: 17px 28px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    /* button and a resolve `normal` differently — pin it so the filled
       and outlined variants match to the pixel */
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

/* two CTAs share the row, "recalculate" drops underneath.
   stretch keeps them level even when one label wraps to two lines */
.qz__step[data-role="result"] .qz__actions { align-items: stretch; }

.qz__step[data-role="result"] .qz__btn--accent,
.qz__step[data-role="result"] .qz__btn--outline {
    flex: 1 1 232px;
    justify-content: center;
}

.qz__step[data-role="result"] .qz__btn--ghost { flex: 1 0 100%; }

.qz__btn--primary { background: #14141a; color: #fff; }
.qz__btn--primary:hover { background: #2b2b36; }
.qz__btn--primary:disabled { opacity: 0.35; cursor: not-allowed; }

.qz__btn--ghost {
    background: transparent;
    color: #55555f;
    padding: 16px 8px;
    letter-spacing: 0.06em;
}

.qz__btn--ghost:hover { color: #14141a; }

.qz__btn--accent {
    background: #c8ff00;
    color: #14141a;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.qz__btn--accent:hover { background: #d6ff3d; }

.qz__btn--outline {
    background: transparent;
    color: #14141a;
    border: 1.5px solid #c8ff00;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.qz__btn--outline:hover { background: #f7fbe8; border-color: #b2e300; }

/* ===== lead form ===== */

.qz__form { display: grid; gap: 14px; margin-bottom: 22px; }

.qz__field { display: grid; gap: 6px; }

.qz__label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6e6e7a;
}

.qz__input {
    width: 100%;
    padding: 15px 18px;
    border: 1px solid #e2e2e9;
    border-radius: 14px;
    background: #fff;
    color: #14141a;
    font-family: inherit;
    font-size: 16px;
    transition: border-color 0.15s ease;
}

.qz__input::placeholder { color: #a8a8b2; }
.qz__input:focus { outline: none; border-color: #9bc700; }
.qz__input.is-invalid { border-color: #e0483c; }

.qz__consent {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    font-size: 14px;
    line-height: 1.45;
    color: #55555f;
    cursor: pointer;
}

.qz__consent input { position: absolute; opacity: 0; pointer-events: none; }

.qz__consent .qz__box { width: 20px; height: 20px; margin-top: 1px; }

.qz__consent a { color: #14141a; text-decoration: underline; text-underline-offset: 2px; }

.qz__consent.is-invalid .qz__box { border-color: #e0483c; }

.qz__error {
    font-size: 13px;
    color: #e0483c;
    min-height: 18px;
}

.qz__success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #eef7cc;
    color: #6f9200;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
}

.qz__success-icon svg { width: 28px; height: 28px; }

/* result */

.qz__result {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.qz__card {
    background: #f5f5f8;
    border-radius: 16px;
    padding: 18px 20px;
}

.qz__card--accent { background: #eef7cc; }

.qz__card-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6e6e7a;
    margin-bottom: 6px;
}

.qz__card-val {
    font-family: var(--font-display);
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: #14141a;
}

.qz__card-sub {
    font-size: 14px;
    color: #6e6e7a;
    margin-top: 5px;
    line-height: 1.4;
}

.qz__disclaimer {
    font-size: 13px;
    line-height: 1.5;
    color: #85858f;
    margin: 0 0 22px;
}

@media (max-width: 620px) {
    .qz { padding: 0; align-items: stretch; }

    .qz__dialog {
        max-width: none;
        max-height: none;
        min-height: 100%;
        border-radius: 0;
        padding: 26px 20px 24px;
    }

    .qz__title { font-size: 22px; }

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

    .qz__actions { flex-direction: column-reverse; align-items: stretch; }

    .qz__btn { width: 100%; }

    /* the result CTAs carry `flex: 1 1 232px` so they can share a row on
       desktop; once the container turns into a column that basis becomes a
       height and stretches them. Height must come from padding here. */
    .qz__step[data-role="result"] .qz__btn--accent,
    .qz__step[data-role="result"] .qz__btn--outline,
    .qz__step[data-role="result"] .qz__btn--ghost {
        flex: 0 0 auto;
    }
}
