.quiz-modal {
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity .35s ease;
    z-index: 100;
}

.quiz-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.quiz__backdrop {
    background: rgba(5, 24, 20, .74);
    inset: 0;
    position: absolute;
}

.quiz__panel {
    background: #f5f2e8;
    display: grid;
    grid-template-columns: minmax(22rem, .9fr) minmax(32rem, 1.1fr);
    inset: 0;
    min-height: 100dvh;
    overflow: hidden;
    position: absolute;
    transform: translateY(2rem);
    transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}

.quiz-modal.is-open .quiz__panel {
    transform: translateY(0);
}

.quiz__close {
    align-items: center;
    background: var(--sl-deep-green);
    border-radius: 50%;
    display: flex;
    height: 3rem;
    justify-content: center;
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    width: 3rem;
    z-index: 5;
}

.quiz__close span {
    background: var(--sl-gold);
    height: 1px;
    position: absolute;
    width: 1.25rem;
}

.quiz__close span:first-child { transform: rotate(45deg); }
.quiz__close span:last-child { transform: rotate(-45deg); }

.quiz__visual {
    background: linear-gradient(180deg, rgba(8, 39, 33, .01) 42%, rgba(8, 39, 33, .64)), url("../images/slide-gallery-4.webp") center / cover no-repeat;
    min-height: 100%;
    padding: clamp(1.5rem, 3vw, 3rem);
    position: relative;
}

.quiz__visual-logo {
    height: auto;
    width: clamp(7rem, 12vw, 10rem);
}

.quiz__visual-copy {
    bottom: clamp(2rem, 5vw, 4.5rem);
    color: #fff;
    left: clamp(1.5rem, 3vw, 3rem);
    position: absolute;
}

.quiz__visual-copy p,
.quiz__eyebrow {
    color: var(--sl-gold);
    font-family: "Gearz", TTHoves, Arial, sans-serif;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.quiz__visual-copy span {
    display: block;
    font-family: "Manege", TTHoves, serif;
    font-size: clamp(2rem, 3.1vw, 3.5rem);
    font-weight: 300;
    line-height: .96;
    margin-top: .8rem;
}

.quiz__content {
    align-items: center;
    display: flex;
    justify-content: center;
    overflow-y: auto;
    padding: clamp(4.5rem, 8vw, 8rem) clamp(2rem, 7vw, 7rem) clamp(3rem, 6vw, 6rem);
    position: relative;
}

.quiz__progress {
    display: flex;
    gap: .5rem;
    left: clamp(2rem, 7vw, 7rem);
    position: absolute;
    top: clamp(2rem, 4vw, 3rem);
}

.quiz__progress span {
    background: rgba(23, 63, 53, .18);
    border-radius: 1rem;
    height: .25rem;
    transition: background .25s ease, width .25s ease;
    width: 2.5rem;
}

.quiz__progress span.is-active {
    background: var(--sl-deep-green);
    width: 4rem;
}

.quiz__step {
    display: none;
    max-width: 45rem;
    width: 100%;
}

.quiz__step.is-active {
    animation: quiz-step-in .4s ease both;
    display: block;
}

@keyframes quiz-step-in {
    from { opacity: 0; transform: translateY(1rem); }
    to { opacity: 1; transform: translateY(0); }
}

.quiz__eyebrow {
    margin-bottom: 1rem;
}

.quiz__title {
    color: var(--sl-deep-green);
    font-family: "Manege", TTHoves, serif;
    font-size: clamp(2.25rem, 4.25vw, 4.75rem);
    font-weight: 300;
    line-height: .98;
    text-wrap: balance;
}

.quiz__lead {
    color: rgba(23, 63, 53, .68);
    font-size: clamp(.95rem, 1.3vw, 1.15rem);
    line-height: 1.45;
    margin-top: 1.25rem;
    max-width: 39rem;
}

.quiz__question,
.quiz__form-label {
    color: var(--sl-deep-green);
    font-family: "Gearz", TTHoves, Arial, sans-serif;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .08em;
    margin-top: 2rem;
    text-transform: uppercase;
}

.quiz__answers {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1rem;
}

.quiz__answers button,
.quiz__messengers button {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(23, 63, 53, .16);
    border-radius: .65rem;
    color: var(--sl-deep-green);
    display: flex;
    font-size: 1rem;
    justify-content: space-between;
    min-height: 4rem;
    padding: 1rem 1.25rem;
    text-align: left;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.quiz__answers button:after {
    color: var(--sl-gold);
    content: "→";
    font-size: 1.3rem;
}

.quiz__answers button:hover,
.quiz__answers button.is-selected,
.quiz__messengers button:hover,
.quiz__messengers button.is-selected {
    background: var(--sl-deep-green);
    border-color: var(--sl-deep-green);
    color: #fff;
    transform: translateY(-2px);
}

.quiz__form {
    margin-top: 1.75rem;
}

.quiz__form-label {
    margin-top: 0;
}

.quiz__messengers {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: .8rem;
}

.quiz__messengers button {
    justify-content: center;
    min-height: 3.5rem;
    text-align: center;
}

.quiz__phone {
    color: var(--sl-deep-green);
    display: grid;
    font-size: .8rem;
    gap: .5rem;
    margin-top: 1rem;
}

.quiz__phone input {
    background: #fff;
    border: 1px solid rgba(23, 63, 53, .22);
    border-radius: .65rem;
    color: var(--sl-deep-green);
    font-size: 1.1rem;
    min-height: 3.8rem;
    padding: 1rem 1.25rem;
    width: 100%;
}

.quiz__consent {
    align-items: center;
    color: rgba(23, 63, 53, .65);
    display: flex;
    font-size: .7rem;
    gap: .6rem;
    line-height: 1.3;
    margin-top: .85rem;
}

.quiz__consent input {
    accent-color: var(--sl-deep-green);
    flex: 0 0 auto;
    height: 1rem;
    width: 1rem;
}

.quiz__consent a { color: inherit; text-decoration: underline; }

.quiz__submit {
    background: var(--sl-gold);
    border-radius: .65rem;
    color: var(--sl-deep-green);
    font-family: "Gearz", TTHoves, Arial, sans-serif;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    margin-top: 1.25rem;
    min-height: 3.8rem;
    padding: 1rem 1.5rem;
    text-transform: uppercase;
    transition: background .2s ease;
    width: 100%;
}

.quiz__submit:hover { background: var(--sl-gold-hover); }
.quiz__form-error {
    color: #8f3d32;
    font-size: .65rem;
    line-height: 1.35;
    margin-top: .55rem;
    text-align: center;
}
body.quiz-open { overflow: hidden; }

.quiz-fab {
    align-items: center;
    aspect-ratio: 1;
    background: var(--sl-gold);
    border: 1px solid rgba(255, 255, 255, .65);
    border-radius: 50%;
    bottom: 1.5rem;
    box-shadow: 0 .75rem 2rem rgba(7, 34, 29, .32);
    color: var(--sl-deep-green);
    display: flex;
    font-family: "Gearz", TTHoves, Arial, sans-serif;
    font-size: .66rem;
    font-weight: 600;
    justify-content: center;
    letter-spacing: .08em;
    line-height: 1.15;
    position: fixed;
    right: 1.5rem;
    text-align: center;
    text-transform: uppercase;
    transition: transform .25s ease, box-shadow .25s ease, opacity .2s ease;
    width: 6.25rem;
    z-index: 35;
}

.quiz-fab:hover {
    box-shadow: 0 1rem 2.5rem rgba(7, 34, 29, .45);
    transform: translateY(-.2rem) scale(1.03);
}

.quiz-fab__ring {
    animation: quiz-fab-pulse 2.4s ease-out infinite;
    border: 1px solid rgba(213, 203, 159, .8);
    border-radius: inherit;
    inset: -.35rem;
    pointer-events: none;
    position: absolute;
}

body.quiz-open .quiz-fab {
    opacity: 0;
    pointer-events: none;
}

@keyframes quiz-fab-pulse {
    0%, 35% { opacity: .75; transform: scale(1); }
    75%, 100% { opacity: 0; transform: scale(1.22); }
}

@media (max-width: 800px) {
    .quiz__panel {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: clamp(15rem, 36dvh, 20rem) minmax(0, 1fr);
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
    }

    .quiz__visual {
        background-image: linear-gradient(90deg, rgba(8, 39, 33, .28), rgba(8, 39, 33, 0) 68%), linear-gradient(180deg, rgba(8, 39, 33, 0) 48%, rgba(8, 39, 33, .58)), url("../images/slide-gallery-4.webp");
        background-position: 50% 56%;
        height: 100%;
        min-height: 0;
        padding: 1rem 1.25rem;
    }

    .quiz__visual-logo { width: 6.5rem; }
    .quiz__visual-copy { bottom: 1rem; left: 1.25rem; }
    .quiz__visual-copy p { font-size: .5rem; }
    .quiz__visual-copy span {
        font-size: clamp(1.2rem, 5.2vw, 1.5rem);
        line-height: .98;
        margin-top: .35rem;
        max-width: calc(100vw - 2.5rem);
        text-wrap: balance;
    }
    .quiz__content {
        align-items: flex-start;
        min-height: 0;
        overflow: hidden;
        padding: 2.9rem .9rem .75rem;
    }
    .quiz__progress { gap: .3rem; left: .9rem; top: 1.15rem; }
    .quiz__progress span { height: .2rem; width: 2rem; }
    .quiz__progress span.is-active { width: 3rem; }
    .quiz__close { height: 2.4rem; right: .8rem; top: .8rem; width: 2.4rem; }
    .quiz__close span { width: 1rem; }
    .quiz__eyebrow { font-size: .52rem; margin-bottom: .45rem; }
    .quiz__title { font-size: clamp(1.65rem, 8vw, 2.2rem); line-height: .96; }
    .quiz__lead { font-size: .76rem; line-height: 1.3; margin-top: .65rem; }
    .quiz__question,
    .quiz__form-label { font-size: .62rem; margin-top: .85rem; }
    .quiz__answers { gap: .4rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: .55rem; }
    .quiz__answers button {
        font-size: .76rem;
        line-height: 1.15;
        min-height: 3rem;
        padding: .65rem .7rem;
    }
    .quiz__answers button:after { font-size: 1rem; }
    .quiz__form { margin-top: .8rem; }
    .quiz__messengers { gap: .4rem; margin-top: .45rem; }
    .quiz__messengers button { font-size: .75rem; min-height: 2.8rem; padding: .6rem; }
    .quiz__phone { font-size: .65rem; margin-top: .55rem; }
    .quiz__phone input { font-size: .9rem; min-height: 3rem; padding: .7rem .85rem; }
    .quiz__consent { font-size: .55rem; margin-top: .5rem; }
    .quiz__submit { font-size: .62rem; margin-top: .65rem; min-height: 3rem; padding: .7rem; }

    .quiz-fab {
        bottom: 4.75rem;
        font-size: .56rem;
        right: 1rem;
        width: 4.75rem;
    }
}
