.plan-quiz-page {
    min-height: 100vh;
    padding: 2.5rem 0 3.5rem;
    position: relative;
    border-radius: 34px;
    overflow: hidden;
    margin: 0.75rem;
    border: 1px solid color-mix(in srgb, var(--primary-color) 24%, transparent);
    box-shadow: 0 30px 64px rgba(2, 6, 23, 0.3);
}

.plan-quiz-page.brand-motion-host {
    border-radius: 34px;
    overflow: clip;
}

.plan-quiz-page.brand-motion-host .itr-brand-motion,
.plan-quiz-page.brand-motion-host .itr-brand-motion::after,
.plan-quiz-page.brand-motion-host .itr-sheen,
.plan-quiz-page.brand-motion-host .itr-grid {
    border-radius: inherit;
}

.plan-quiz-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
    padding: 1.4rem 1.5rem;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.74), rgba(15, 23, 42, 0.55));
    border: 1px solid rgba(148, 163, 184, 0.26);
    box-shadow: 0 22px 45px rgba(2, 6, 23, 0.24);
    backdrop-filter: blur(12px);
}

.plan-quiz-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.34rem 0.86rem;
    border-radius: 999px;
    background: rgba(94, 234, 212, 0.14);
    color: var(--primary-soft);
    font-weight: 700;
    letter-spacing: 0.06em;
    font-size: 0.72rem;
    text-transform: uppercase;
}

.plan-quiz-intro {
    color: rgba(226, 232, 240, 0.94) !important;
    max-width: 70ch;
}

.plan-quiz-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
}

.quiz-card {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    padding: 1.6rem;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.93), rgba(15, 23, 42, 0.78));
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 24px 54px rgba(2, 6, 23, 0.36);
    isolation: isolate;
}

.quiz-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(94, 234, 212, 0.14);
    pointer-events: none;
}

.quiz-card::after {
    content: "";
    position: absolute;
    inset: -20% -65%;
    background: linear-gradient(105deg, transparent 38%, rgba(94, 234, 212, 0.16) 50%, transparent 62%);
    transform: translateX(-58%) rotate(8deg);
    opacity: 0.34;
    transition: transform 860ms cubic-bezier(0.22, 1, 0.36, 1), opacity 320ms ease;
    pointer-events: none;
}

.quiz-card:hover::after,
.quiz-card:focus-within::after {
    transform: translateX(22%) rotate(8deg);
    opacity: 0.52;
}

.quiz-stepper {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.quiz-stepper small {
    color: var(--muted);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.quiz-progress {
    height: 0.54rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    overflow: hidden;
}

.quiz-progress .progress-bar {
    position: relative;
    background: linear-gradient(120deg, var(--primary-color), var(--accent));
    transition: width 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.quiz-progress .progress-bar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 28%, rgba(255, 255, 255, 0.42) 45%, transparent 62%);
    transform: translateX(-110%);
    animation: itr-quiz-progress-sheen 2.1s linear infinite;
}

.quiz-progress .progress-bar.is-pulse {
    animation: itr-quiz-progress-pulse 360ms ease;
}

.quiz-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.55rem;
}

.quiz-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.34);
    border: 1px solid rgba(148, 163, 184, 0.42);
    transition: transform 240ms ease, background-color 240ms ease, box-shadow 240ms ease;
}

.quiz-dot.is-done,
.quiz-dot.is-active {
    background: rgba(59, 130, 246, 0.95);
    border-color: rgba(125, 211, 252, 0.92);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22);
}

.quiz-dot.is-active {
    transform: scale(1.15);
}

.quiz-stage {
    position: relative;
    overflow: hidden;
    min-height: 280px;
    transition: height 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.quiz-stage-track {
    position: relative;
    min-height: 280px;
}

.quiz-step-panel {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateX(0);
}

.quiz-step-panel.is-current {
    opacity: 1;
    pointer-events: auto;
}

.quiz-step-panel.is-incoming {
    pointer-events: none;
}

.quiz-stage-track.is-animating.dir-next .quiz-step-panel.is-current {
    animation: itr-quiz-exit-next 330ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.quiz-stage-track.is-animating.dir-next .quiz-step-panel.is-incoming {
    animation: itr-quiz-enter-next 330ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.quiz-stage-track.is-animating.dir-prev .quiz-step-panel.is-current {
    animation: itr-quiz-exit-prev 330ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.quiz-stage-track.is-animating.dir-prev .quiz-step-panel.is-incoming {
    animation: itr-quiz-enter-prev 330ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.quiz-question-title {
    font-size: clamp(1.38rem, 2vw, 1.62rem);
    line-height: 1.2;
    margin-bottom: 0.45rem;
    font-weight: 800;
}

.quiz-question-hint {
    color: var(--muted);
    margin-bottom: 1rem;
}

.quiz-options {
    display: grid;
    gap: 0.7rem;
}

.quiz-option {
    position: relative;
    overflow: hidden;
    text-align: left;
    width: 100%;
    border-radius: 16px;
    padding: 0.85rem 1.05rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.46);
    color: var(--text-color);
    transition: transform 190ms ease, border-color 220ms ease, box-shadow 240ms ease, background-color 220ms ease;
}

.quiz-option::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    left: var(--x, 50%);
    top: var(--y, 50%);
    transform: translate(-50%, -50%) scale(0.2);
    border-radius: 999px;
    background: radial-gradient(circle, rgba(125, 211, 252, 0.45), rgba(56, 189, 248, 0.02) 68%);
    opacity: 0;
    pointer-events: none;
}

.quiz-option.is-rippling::before {
    animation: itr-quiz-ripple 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.quiz-option-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    position: relative;
    z-index: 1;
}

.quiz-option-label {
    font-weight: 600;
}

.quiz-option-check {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.55);
    background: rgba(15, 23, 42, 0.72);
    color: rgba(226, 232, 240, 0.84);
    font-size: 0.72rem;
    opacity: 0.68;
    transform: scale(0.96);
    transition: transform 180ms ease, opacity 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.quiz-option:hover,
.quiz-option:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(94, 234, 212, 0.68);
    box-shadow: 0 16px 30px rgba(2, 6, 23, 0.26);
    outline: none;
}

.quiz-option.is-selected {
    border-color: rgba(94, 234, 212, 0.95);
    background: linear-gradient(130deg, rgba(15, 118, 110, 0.18), rgba(30, 64, 175, 0.2));
    box-shadow: 0 18px 34px rgba(15, 118, 110, 0.34);
    transform: translateY(-1px) scale(1.005);
}

.quiz-option.is-selected .quiz-option-check {
    opacity: 1;
    transform: scale(1);
    border-color: rgba(94, 234, 212, 0.95);
    background: rgba(15, 118, 110, 0.6);
}

.quiz-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.quiz-actions .btn {
    min-width: 128px;
}

.quiz-result {
    display: none;
    margin-top: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(94, 234, 212, 0.3);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.56));
    padding: 1rem;
}

.quiz-result.is-visible {
    display: block;
    animation: itr-quiz-result-in 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.quiz-result-badge {
    animation: itr-quiz-badge-pop 320ms ease both;
}

.quiz-result-list {
    margin: 0;
    padding-left: 1.05rem;
}

.quiz-result-list li {
    opacity: 0;
    transform: translateY(8px);
    animation: itr-quiz-result-item 320ms ease forwards;
}

.quiz-result-list li:nth-child(1) { animation-delay: 90ms; }
.quiz-result-list li:nth-child(2) { animation-delay: 140ms; }
.quiz-result-list li:nth-child(3) { animation-delay: 190ms; }
.quiz-result-list li:nth-child(4) { animation-delay: 240ms; }
.quiz-result-list li:nth-child(5) { animation-delay: 290ms; }

.quiz-side {
    border-radius: 24px;
    padding: 1.4rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.66), rgba(15, 23, 42, 0.52));
    box-shadow: 0 16px 38px rgba(2, 6, 23, 0.26);
}

.quiz-side ul {
    margin: 0;
    padding-left: 1rem;
    display: grid;
    gap: 0.55rem;
    color: var(--muted);
}

.quiz-cta-btn {
    position: relative;
    overflow: hidden;
    transition: transform 160ms ease, box-shadow 200ms ease;
}

.quiz-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(37, 99, 235, 0.34);
}

.quiz-cta-btn.is-press {
    transform: translateY(1px) scale(0.985);
}

[data-bs-theme="light"] .plan-quiz-hero,
[data-bs-theme="light"] .quiz-card,
[data-bs-theme="light"] .quiz-side,
[data-bs-theme="light"] .quiz-result {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 252, 0.95));
    border-color: rgba(15, 23, 42, 0.14);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1);
}

[data-bs-theme="light"] .plan-quiz-page .quiz-result,
[data-bs-theme="light"] .plan-quiz-page .quiz-result .text-secondary,
[data-bs-theme="light"] .plan-quiz-page .quiz-result-list li,
[data-bs-theme="light"] .plan-quiz-page .quiz-result p {
    color: #1e293b !important;
}

[data-bs-theme="light"] .plan-quiz-page .quiz-result h3,
[data-bs-theme="light"] .plan-quiz-page .quiz-result h4,
[data-bs-theme="light"] .plan-quiz-page .quiz-result h5,
[data-bs-theme="light"] .plan-quiz-page .quiz-result strong {
    color: #0b1220 !important;
}

[data-bs-theme="light"] .plan-quiz-intro,
[data-bs-theme="light"] .quiz-question-hint,
[data-bs-theme="light"] .quiz-side ul,
[data-bs-theme="light"] .quiz-side .text-secondary,
[data-bs-theme="light"] .quiz-result .text-secondary,
[data-bs-theme="light"] .quiz-result-list li {
    color: #334155 !important;
}

[data-bs-theme="light"] .quiz-question-title,
[data-bs-theme="light"] .quiz-result h3,
[data-bs-theme="light"] .quiz-result h4,
[data-bs-theme="light"] .quiz-result h5,
[data-bs-theme="light"] .quiz-side h3,
[data-bs-theme="light"] .quiz-option-label {
    color: #0f172a !important;
}

[data-bs-theme="light"] .quiz-option {
    background: rgba(248, 250, 252, 0.94);
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.2);
}

[data-bs-theme="light"] .quiz-option-check {
    color: #1e293b;
    border-color: rgba(51, 65, 85, 0.4);
    background: rgba(226, 232, 240, 0.9);
}

[data-bs-theme="light"] .quiz-option:hover,
[data-bs-theme="light"] .quiz-option:focus-visible {
    border-color: rgba(14, 116, 144, 0.62);
    box-shadow: 0 12px 24px rgba(14, 116, 144, 0.18);
}

[data-bs-theme="light"] .quiz-option.is-selected {
    background: linear-gradient(130deg, rgba(16, 185, 129, 0.14), rgba(59, 130, 246, 0.12));
    border-color: rgba(15, 118, 110, 0.58);
    box-shadow: 0 14px 28px rgba(14, 116, 144, 0.2);
}

[data-bs-theme="light"] .quiz-result-badge {
    color: #0f172a !important;
}

@keyframes itr-quiz-enter-next {
    0% { opacity: 0; transform: translateX(24px) scale(0.988); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes itr-quiz-exit-next {
    0% { opacity: 1; transform: translateX(0) scale(1); }
    100% { opacity: 0; transform: translateX(-24px) scale(0.988); }
}

@keyframes itr-quiz-enter-prev {
    0% { opacity: 0; transform: translateX(-24px) scale(0.988); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes itr-quiz-exit-prev {
    0% { opacity: 1; transform: translateX(0) scale(1); }
    100% { opacity: 0; transform: translateX(24px) scale(0.988); }
}

@keyframes itr-quiz-ripple {
    0% { opacity: 0.58; transform: translate(-50%, -50%) scale(0.25); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(19); }
}

@keyframes itr-quiz-progress-sheen {
    0% { transform: translateX(-110%); }
    100% { transform: translateX(130%); }
}

@keyframes itr-quiz-progress-pulse {
    0% { filter: brightness(1); }
    40% { filter: brightness(1.18); }
    100% { filter: brightness(1); }
}

@keyframes itr-quiz-result-in {
    0% { opacity: 0; transform: translateY(10px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes itr-quiz-result-item {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes itr-quiz-badge-pop {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

@media (max-width: 992px) {
    .plan-quiz-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .plan-quiz-page {
        padding-top: 1.75rem;
        border-radius: 22px;
        margin: 0.4rem;
    }

    .quiz-card,
    .quiz-side,
    .plan-quiz-hero {
        border-radius: 20px;
    }

    .quiz-card {
        padding: 1.2rem;
    }

    .quiz-actions {
        flex-direction: column;
    }

    .quiz-actions .btn {
        width: 100%;
    }

    .quiz-stage {
        min-height: 320px;
    }

    .quiz-stage-track {
        min-height: 320px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .quiz-stage,
    .quiz-progress .progress-bar,
    .quiz-progress .progress-bar::after,
    .quiz-dot,
    .quiz-option,
    .quiz-option::before,
    .quiz-result,
    .quiz-result-list li,
    .quiz-result-badge,
    .quiz-cta-btn {
        animation: none !important;
        transition: none !important;
    }

    .quiz-stage-track.is-animating .quiz-step-panel {
        animation: none !important;
    }
}
