.coffee-quiz-page {
    background:
        radial-gradient(circle at 10% 10%, rgba(178, 47, 102, 0.08), transparent 30rem),
        radial-gradient(circle at 90% 90%, rgba(107, 61, 46, 0.09), transparent 32rem),
        var(--nespresso-foam-white);
}

.coffee-quiz-page [hidden],
.coffee-quiz-teaser[hidden],
.coffee-quiz-lead-summary[hidden] {
    display: none !important;
}

.coffee-quiz-section {
    min-height: min(820px, calc(100vh - 8rem));
    display: grid;
    align-items: center;
}

.coffee-quiz-container {
    max-width: 1180px;
}

.coffee-quiz-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(107, 61, 46, 0.14);
    border-radius: clamp(18px, 2vw, 28px);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 34px 90px rgba(35, 25, 20, 0.1);
}

.coffee-quiz-shell::before {
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, var(--nespresso-dark-brown), var(--nespresso-dark-berry), var(--nespresso-dark-gold));
    content: '';
}

.coffee-quiz-intro,
.coffee-quiz-question-view,
.coffee-quiz-result {
    animation: coffee-quiz-enter 0.35s ease both;
}

.coffee-quiz-intro {
    display: grid;
    justify-items: start;
    gap: 1.35rem;
    max-width: 820px;
    padding: clamp(2rem, 7vw, 6rem);
}

.coffee-quiz-intro h1,
.coffee-quiz-result-header h1 {
    max-width: 15ch;
    font-size: clamp(2.65rem, 7vw, 6rem);
    line-height: 0.88;
}

.coffee-quiz-intro .lead,
.coffee-quiz-result-header .lead {
    max-width: 68ch;
    font-size: clamp(1.05rem, 1.7vw, 1.3rem);
    line-height: 1.5;
}

.coffee-quiz-duration {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--nespresso-dark-brown);
    font-weight: 700;
}

.coffee-quiz-duration::before {
    width: 0.75rem;
    height: 0.75rem;
    border: 2px solid currentColor;
    border-radius: 50%;
    content: '';
}

.coffee-quiz-question-view {
    padding: clamp(1.5rem, 5vw, 4.5rem);
}

.coffee-quiz-progress-wrap {
    display: grid;
    gap: 0.65rem;
    margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.coffee-quiz-progress-text {
    color: var(--nespresso-dark-brown);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.coffee-quiz-progress-track {
    overflow: hidden;
    width: 100%;
    height: 5px;
    border-radius: 999px;
    background: rgba(107, 61, 46, 0.12);
}

.coffee-quiz-progress-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--nespresso-dark-berry);
    transition: width 0.35s ease;
}

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

.coffee-quiz-question-heading {
    max-width: 20ch;
    margin: 0 0 clamp(1.5rem, 3vw, 2.5rem);
    padding: 0;
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.8vw, 4.25rem);
    font-weight: 700;
    line-height: 0.95;
    text-transform: uppercase;
}

.coffee-quiz-question-heading:focus,
.coffee-quiz-result-header h1:focus {
    outline: none;
}

.coffee-quiz-answers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.coffee-quiz-answer {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    min-height: 78px;
    border: 1px solid rgba(107, 61, 46, 0.16);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.coffee-quiz-answer:hover {
    border-color: rgba(107, 61, 46, 0.42);
    transform: translateY(-2px);
}

.coffee-quiz-answer:focus-within {
    outline: 3px solid rgba(178, 47, 102, 0.28);
    outline-offset: 3px;
}

.coffee-quiz-answer.is-selected {
    border-color: var(--nespresso-dark-berry);
    background: rgba(228, 174, 177, 0.16);
    box-shadow: inset 4px 0 0 var(--nespresso-dark-berry);
}

.coffee-quiz-answer input {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.coffee-quiz-answer-number {
    color: rgba(107, 61, 46, 0.64);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.coffee-quiz-answer-label {
    font-size: clamp(1rem, 1.4vw, 1.13rem);
    line-height: 1.35;
}

.coffee-quiz-answer-check {
    display: grid;
    width: 1.6rem;
    height: 1.6rem;
    place-items: center;
    border: 1px solid rgba(107, 61, 46, 0.32);
    border-radius: 50%;
    color: transparent;
    font-weight: 700;
}

.coffee-quiz-answer.is-selected .coffee-quiz-answer-check {
    border-color: var(--nespresso-dark-berry);
    color: #fff;
    background: var(--nespresso-dark-berry);
}

.coffee-quiz-error {
    min-height: 1.5em;
    margin-top: 1rem;
    color: var(--nespresso-dark-red);
    font-weight: 700;
}

.coffee-quiz-navigation {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: clamp(1rem, 3vw, 2rem);
}

.coffee-quiz-navigation .button[hidden] + .button {
    margin-left: auto;
}

.coffee-quiz-result {
    padding: clamp(1.5rem, 5vw, 4.5rem);
}

.coffee-quiz-result-header {
    display: grid;
    justify-items: start;
    gap: 1.3rem;
    max-width: 920px;
    margin-bottom: clamp(3rem, 7vw, 6rem);
}

.coffee-quiz-intensity {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem;
    border-radius: 999px;
    padding: 0.65rem 0.9rem;
    background: rgba(107, 61, 46, 0.08);
}

.coffee-quiz-intensity > span:first-child {
    font-size: 0.9rem;
    font-weight: 700;
}

.coffee-quiz-intensity-dots {
    display: flex;
    gap: 0.28rem;
}

.coffee-quiz-intensity-dots span {
    width: 0.65rem;
    height: 0.65rem;
    border: 1px solid var(--nespresso-dark-brown);
    border-radius: 50%;
}

.coffee-quiz-intensity-dots .is-filled {
    background: var(--nespresso-dark-brown);
}

.coffee-quiz-profile-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.coffee-quiz-profile-labels li {
    border: 1px solid rgba(107, 61, 46, 0.2);
    border-radius: 999px;
    padding: 0.55rem 0.8rem;
    background: #fff;
    font-size: 0.9rem;
}

.coffee-quiz-recommendations {
    border-top: 1px solid rgba(107, 61, 46, 0.14);
    padding-top: clamp(2rem, 5vw, 4rem);
}

.coffee-quiz-recommendations > h2 {
    max-width: 16ch;
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
    font-size: clamp(2rem, 4vw, 3.5rem);
}

.coffee-quiz-product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.coffee-quiz-product {
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
    min-width: 0;
    border: 1px solid rgba(107, 61, 46, 0.13);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 45px rgba(35, 25, 20, 0.06);
}

.coffee-quiz-product-image {
    display: grid;
    min-height: 230px;
    place-items: center;
    padding: 1.5rem;
    background: linear-gradient(145deg, #fffefa, #f3eee7);
}

.coffee-quiz-product-image img {
    width: 100%;
    height: 210px;
    object-fit: contain;
}

.coffee-quiz-product-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 1.3rem;
}

.coffee-quiz-product-body h3 {
    font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.coffee-quiz-product-meta {
    color: var(--nespresso-dark-brown);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
}

.coffee-quiz-product-notes,
.coffee-quiz-product-reason {
    font-size: 0.95rem;
    line-height: 1.5;
}

.coffee-quiz-product-reason {
    color: rgba(0, 0, 0, 0.7);
}

.coffee-quiz-product-body .button {
    margin-top: auto;
}

.coffee-quiz-result-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: clamp(2.5rem, 5vw, 4rem);
    border-top: 1px solid rgba(107, 61, 46, 0.14);
    padding-top: clamp(2rem, 4vw, 3rem);
}

.coffee-quiz-restart {
    border: 0;
    padding: 0.75rem;
    color: var(--nespresso-dark-brown);
    background: transparent;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.25em;
    cursor: pointer;
}

.coffee-quiz-restart:hover,
.coffee-quiz-restart:focus-visible {
    color: var(--nespresso-dark-berry);
}

.coffee-quiz-restart:focus-visible {
    outline: 3px solid rgba(178, 47, 102, 0.28);
    outline-offset: 3px;
}

.coffee-quiz-noscript {
    display: grid;
    justify-items: start;
    gap: 1rem;
    padding: 2rem;
}

body.home-page .coffee-lifestyle-grid .coffee-quiz-teaser {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.35rem 1rem;
    margin-top: 0.35rem;
    border: 0;
    border-top: 1px solid rgba(246, 241, 234, 0.16);
    border-radius: 0;
    padding: 1.15rem 0 0;
    background: transparent;
}

body.home-page .coffee-lifestyle-grid .coffee-quiz-teaser h3 {
    max-width: 20ch;
    color: var(--nespresso-foam-white);
    font-size: clamp(1.25rem, 1.65vw, 1.55rem);
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

body.home-page .coffee-lifestyle-grid .coffee-quiz-teaser p:not(.kicker) {
    grid-column: 1;
    max-width: 42ch;
    color: rgba(246, 241, 234, 0.68);
    font-size: 0.9rem;
    line-height: 1.42;
}

body.home-page main > section.coffee-lifestyle-section .coffee-lifestyle-grid .coffee-quiz-teaser .button-secondary {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    min-height: 40px;
    border-color: rgba(240, 216, 136, 0.38);
    padding-inline: 1rem;
    background: rgba(240, 216, 136, 0.1);
    color: #f0d888;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.home-page main > section.coffee-lifestyle-section .coffee-lifestyle-grid .coffee-quiz-teaser .button-secondary:hover,
body.home-page main > section.coffee-lifestyle-section .coffee-lifestyle-grid .coffee-quiz-teaser .button-secondary:focus-visible {
    border-color: rgba(240, 216, 136, 0.68);
    background: rgba(240, 216, 136, 0.18);
    color: #fff3c7;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.16);
}

@media (max-width: 1100px) {
    body.home-page .coffee-lifestyle-grid .coffee-quiz-teaser {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    body.home-page main > section.coffee-lifestyle-section .coffee-lifestyle-grid .coffee-quiz-teaser .button-secondary {
        grid-column: 1;
        grid-row: auto;
        margin-top: 0.45rem;
    }
}

.coffee-quiz-lead-summary {
    grid-column: 1 / -1;
    display: grid;
    gap: 0.55rem;
    border: 1px solid rgba(107, 61, 46, 0.18);
    border-left: 4px solid var(--nespresso-dark-berry);
    border-radius: 10px;
    padding: 1rem 1.1rem;
    background: rgba(228, 174, 177, 0.12);
}

.coffee-quiz-lead-summary .kicker {
    margin-bottom: 0.15rem;
}

.machine-quiz-selection-help {
    margin: -1rem 0 1rem;
    color: rgba(0, 0, 0, 0.68);
    font-size: 0.95rem;
    font-weight: 700;
}

.machine-quiz-product-grid {
    align-items: stretch;
}

.machine-quiz-product {
    position: relative;
}

.machine-quiz-product.is-best-match {
    border-color: rgba(178, 47, 102, 0.45);
    box-shadow: 0 24px 55px rgba(71, 36, 38, 0.12);
}

.machine-quiz-product-image {
    position: relative;
}

.machine-quiz-product-image img {
    height: 260px;
}

.machine-quiz-match-badge {
    position: absolute;
    z-index: 1;
    top: 1rem;
    left: 1rem;
    border-radius: 999px;
    padding: 0.45rem 0.7rem;
    background: var(--nespresso-dark-roast);
    color: var(--nespresso-foam-white);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.machine-quiz-product.is-best-match .machine-quiz-match-badge {
    background: var(--nespresso-dark-berry);
}

.machine-quiz-purchase-status {
    color: var(--nespresso-dark-green);
}

.machine-quiz-specifications {
    display: grid;
    width: 100%;
    border-top: 1px solid rgba(107, 61, 46, 0.12);
}

.machine-quiz-specifications div {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 0.75rem;
    border-bottom: 1px solid rgba(107, 61, 46, 0.12);
    padding-block: 0.65rem;
}

.machine-quiz-specifications dt {
    color: rgba(0, 0, 0, 0.62);
    font-size: 0.82rem;
    font-weight: 700;
}

.machine-quiz-specifications dd {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.4;
}

.machine-quiz-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    margin-top: auto;
    padding-top: 0.4rem;
}

.machine-quiz-product-body .machine-quiz-card-actions .button {
    flex: 1 1 10rem;
    margin-top: 0;
    text-align: center;
}

.machine-quiz-talk-link {
    width: 100%;
    color: var(--nespresso-dark-brown);
    font-weight: 700;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 0.25em;
}

.machine-quiz-talk-link:focus-visible,
.machine-quiz-talk-link:hover {
    color: var(--nespresso-dark-berry);
}

.machine-quiz-empty {
    display: grid;
    justify-items: start;
    gap: 1rem;
    max-width: 760px;
    border: 1px solid rgba(107, 61, 46, 0.16);
    border-radius: 14px;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    background: rgba(255, 255, 255, 0.76);
}

.machine-quiz-empty h3 {
    font-size: clamp(1.5rem, 3vw, 2.15rem);
}

.machine-quiz-coffee-journey {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem 2rem;
    margin-top: clamp(2rem, 5vw, 4rem);
    border-radius: 16px;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    background: var(--nespresso-dark-roast);
    color: var(--nespresso-foam-white);
}

.machine-quiz-coffee-journey h2 {
    max-width: 20ch;
    color: inherit;
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
}

.machine-quiz-coffee-journey p {
    grid-column: 1;
    color: rgba(246, 241, 234, 0.78);
}

.machine-quiz-coffee-journey .button {
    grid-column: 2;
    grid-row: 1 / span 2;
    border-color: rgba(246, 241, 234, 0.5);
    color: var(--nespresso-foam-white);
}

.machine-quiz-entry-section {
    padding-block: clamp(1rem, 3vw, 2rem);
}

.machine-quiz-entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.5rem 3rem;
    border: 1px solid rgba(107, 61, 46, 0.16);
    border-radius: 18px;
    padding: clamp(1.4rem, 4vw, 2.8rem);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(228, 174, 177, 0.13));
}

.machine-quiz-entry h2 {
    max-width: 20ch;
    margin-block: 0.35rem 0.7rem;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
}

.machine-quiz-entry p:not(.kicker) {
    max-width: 72ch;
}

.home-machine-quiz-teaser {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem 2rem;
    margin-top: clamp(1.5rem, 4vw, 3rem);
    border: 1px solid rgba(107, 61, 46, 0.14);
    border-radius: 16px;
    padding: clamp(1.2rem, 3vw, 2rem);
    background: rgba(255, 255, 255, 0.72);
}

.home-machine-quiz-teaser h3 {
    margin-block: 0.25rem 0.45rem;
    font-size: clamp(1.45rem, 2.5vw, 2.15rem);
}

.home-machine-quiz-teaser p:not(.kicker) {
    max-width: 62ch;
}

@keyframes coffee-quiz-enter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 880px) {
    .coffee-quiz-answers,
    .coffee-quiz-product-grid {
        grid-template-columns: 1fr;
    }

    .coffee-quiz-product {
        grid-template-columns: minmax(180px, 0.75fr) minmax(0, 1.25fr);
        grid-template-rows: 1fr;
    }

    .coffee-quiz-product-image {
        min-height: 100%;
    }

    .machine-quiz-coffee-journey,
    .machine-quiz-entry,
    .home-machine-quiz-teaser {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .machine-quiz-coffee-journey .button,
    .machine-quiz-coffee-journey p {
        grid-column: 1;
        grid-row: auto;
    }
}

@media (max-width: 620px) {
    .coffee-quiz-section {
        align-items: start;
        min-height: 0;
        padding-block: 1rem 2rem;
    }

    .coffee-quiz-container {
        width: calc(100vw - 1.25rem);
    }

    .coffee-quiz-intro,
    .coffee-quiz-question-view,
    .coffee-quiz-result {
        padding: 1.35rem;
    }

    .coffee-quiz-intro h1,
    .coffee-quiz-result-header h1 {
        font-size: clamp(2.5rem, 14vw, 4rem);
    }

    .coffee-quiz-question-heading {
        font-size: clamp(2rem, 11vw, 3.25rem);
    }

    .coffee-quiz-answer {
        min-height: 68px;
    }

    .coffee-quiz-navigation .button,
    .coffee-quiz-result-actions .button {
        flex: 1 1 auto;
    }

    .coffee-quiz-product {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .coffee-quiz-product-image {
        min-height: 210px;
    }

    .machine-quiz-product-image img {
        height: 230px;
    }

    .coffee-quiz-result-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .coffee-quiz-result-actions .button,
    .coffee-quiz-restart {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .coffee-quiz-intro,
    .coffee-quiz-question-view,
    .coffee-quiz-result {
        animation: none;
    }

    .coffee-quiz-progress-track span,
    .coffee-quiz-answer {
        transition: none;
    }

    .coffee-quiz-answer:hover {
        transform: none;
    }
}
