/* ── Compatibility Quiz Section ── */
.cq-section {
    position: relative;
    overflow: hidden;
    padding: 2rem 0 2.25rem;
    background:
        linear-gradient(155deg, #020617 0%, #0c1929 28%, #134e4a 62%, #1e1b4b 100%);
    isolation: isolate;
}

/* Aurora mesh */
.cq-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 15% 40%, rgba(99, 102, 241, 0.28) 0%, transparent 55%),
        radial-gradient(ellipse 70% 55% at 85% 25%, rgba(16, 185, 129, 0.22) 0%, transparent 50%),
        radial-gradient(ellipse 60% 50% at 55% 90%, rgba(245, 158, 11, 0.16) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 70% 60%, rgba(244, 114, 182, 0.12) 0%, transparent 45%);
    pointer-events: none;
    animation: cqAuroraShift 14s ease-in-out infinite alternate;
    z-index: 0;
}

.cq-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(2, 6, 23, 0.35) 100%);
    pointer-events: none;
    z-index: 0;
}

@keyframes cqAuroraShift {
    0% { opacity: 0.75; transform: scale(1) translateX(0); }
    100% { opacity: 1; transform: scale(1.05) translateX(-1%); }
}

/* Dot grid overlay */
.cq-bg-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 75%);
    pointer-events: none;
    z-index: 1;
}

/* Floating orbs */
.cq-bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 1;
}

.cq-bg-orb--1 {
    width: 380px;
    height: 380px;
    background: rgba(99, 102, 241, 0.22);
    top: -120px;
    left: -80px;
    animation: cqFloatOrb 12s ease-in-out infinite;
}

.cq-bg-orb--2 {
    width: 300px;
    height: 300px;
    background: rgba(52, 211, 153, 0.18);
    bottom: -80px;
    right: -40px;
    animation: cqFloatOrb 10s ease-in-out infinite reverse 2s;
}

.cq-bg-orb--3 {
    width: 200px;
    height: 200px;
    background: rgba(251, 191, 36, 0.14);
    top: 40%;
    right: 15%;
    animation: cqFloatOrb 8s ease-in-out infinite 1s;
}

@keyframes cqFloatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(25px, -20px) scale(1.08); }
    66% { transform: translate(-15px, 15px) scale(0.95); }
}

/* Sparkle particles */
.cq-bg-sparkles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.cq-bg-sparkles span {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    left: calc(var(--i) * 5.5% + 2%);
    top: calc((var(--i) * 7 + 11) % 85 + 5%);
    animation: cqSparkle calc(3s + (var(--i) * 0.3s)) ease-in-out infinite;
    animation-delay: calc(var(--i) * -0.4s);
    box-shadow: 0 0 6px rgba(255,255,255,0.5);
}

@keyframes cqSparkle {
    0%, 100% { opacity: 0.15; transform: scale(0.8); }
    50% { opacity: 0.9; transform: scale(1.4); }
}

/* Glass shell container */
.cq-section-shell {
    position: relative;
    z-index: 2;
    max-width: 780px;
    margin: 0 auto;
    padding: 1.35rem 1.25rem 1.4rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.04) inset,
        0 25px 60px rgba(0, 0, 0, 0.35),
        0 0 80px rgba(99, 102, 241, 0.08);
    animation: cqShellGlow 5s ease-in-out infinite;
}

@keyframes cqShellGlow {
    0%, 100% {
        box-shadow:
            0 0 0 1px rgba(255,255,255,0.04) inset,
            0 25px 60px rgba(0, 0, 0, 0.35),
            0 0 60px rgba(99, 102, 241, 0.08);
        border-color: rgba(255, 255, 255, 0.08);
    }
    50% {
        box-shadow:
            0 0 0 1px rgba(255,255,255,0.07) inset,
            0 30px 70px rgba(0, 0, 0, 0.4),
            0 0 100px rgba(52, 211, 153, 0.12);
        border-color: rgba(255, 255, 255, 0.14);
    }
}

.cq-section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #a5f3fc;
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.25);
    margin-bottom: 0.5rem;
    animation: cqBadgePulse 3s ease-in-out infinite;
}

@keyframes cqBadgePulse {
    0%, 100% { box-shadow: 0 0 0 rgba(34, 211, 238, 0); }
    50% { box-shadow: 0 0 20px rgba(34, 211, 238, 0.2); }
}

.cq-section-eyebrow {
    color: #94a3b8;
    font-size: 0.88rem;
    margin-bottom: 0.9rem;
    line-height: 1.45;
}

.cq-trigger-wrap {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
}

.cq-trigger-card {
    position: relative;
    max-width: 100%;
    width: 100%;
    padding: 3px;
    border-radius: 24px;
    cursor: pointer;
    text-align: center;
    background: linear-gradient(135deg, #6366f1, #06b6d4, #34d399, #fbbf24, #a855f7, #6366f1);
    background-size: 400% 400%;
    animation: cqGradientShift 10s ease infinite, cqTriggerGlow 4s ease-in-out infinite, cqCardFloat 6s ease-in-out infinite;
    box-shadow: 0 12px 45px rgba(99, 102, 241, 0.35);
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.45s ease;
    overflow: visible;
}

@keyframes cqCardFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.cq-trigger-glow-ring {
    position: absolute;
    inset: -8px;
    border-radius: 30px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.06);
    animation: cqRingPulse 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes cqRingPulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.02); }
}

.cq-trigger-inner {
    position: relative;
    padding: 1.25rem 1.25rem 1.15rem;
    border-radius: 22px;
    background:
        linear-gradient(160deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.96) 50%, rgba(15, 23, 42, 0.98) 100%);
    overflow: hidden;
}

.cq-trigger-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
}

.cq-trigger-inner::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -80%;
    width: 50%;
    height: 200%;
    background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.06) 50%, transparent 65%);
    transform: skewX(-18deg);
    animation: cqShineSweep 6s ease-in-out infinite;
}

.cq-trigger-top {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0.55rem;
}

.cq-trigger-icon-ring {
    position: relative;
    width: 56px;
    height: 56px;
    margin-bottom: 0.4rem;
}

.cq-trigger-icon-orbit {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px dashed rgba(99, 102, 241, 0.35);
    animation: cqOrbitSpin 12s linear infinite;
}

.cq-trigger-icon-orbit::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 10px #34d399;
    transform: translateX(-50%);
}

@keyframes cqOrbitSpin {
    to { transform: rotate(360deg); }
}

.cq-trigger-icon {
    position: absolute;
    inset: 6px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.35rem;
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45);
    animation: cqPulse 3s ease-in-out infinite;
}

.cq-trigger-tag {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

@keyframes cqTriggerGlow {
    0%, 100% {
        box-shadow: 0 12px 45px rgba(99, 102, 241, 0.35), 0 0 0 rgba(52, 211, 153, 0);
    }
    50% {
        box-shadow: 0 18px 60px rgba(99, 102, 241, 0.55), 0 0 40px rgba(52, 211, 153, 0.2);
    }
}

.cq-trigger-card:hover {
    animation-play-state: paused;
    transform: translateY(-10px) scale(1.015);
    box-shadow: 0 28px 80px rgba(99, 102, 241, 0.5), 0 0 50px rgba(6, 182, 212, 0.2);
}

.cq-trigger-card:hover .cq-trigger-inner::after {
    animation-duration: 2s;
}

.cq-trigger-card:hover .cq-trigger-btn-arrow {
    transform: translateX(4px);
}

@keyframes cqPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45); }
    50% { transform: scale(1.05); box-shadow: 0 10px 30px rgba(139, 92, 246, 0.55); }
}

.cq-trigger-title {
    position: relative;
    z-index: 1;
    color: #f1f5f9;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.55;
    margin-bottom: 0.4rem;
}

.cq-trigger-highlight {
    background: linear-gradient(135deg, #a5b4fc, #6ee7b7, #fde68a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.cq-trigger-sub {
    position: relative;
    z-index: 1;
    color: #94a3b8;
    font-size: 0.84rem;
    margin-bottom: 0.7rem;
    line-height: 1.5;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.cq-trigger-features {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.85rem;
}

.cq-trigger-features span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cq-trigger-features span i {
    color: #818cf8;
    font-size: 0.72rem;
}

.cq-trigger-btn {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 1.5rem;
    border-radius: 50px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    background-size: 200% 200%;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    pointer-events: none;
    box-shadow: 0 6px 28px rgba(99, 102, 241, 0.5);
    animation: cqBtnPulse 2.5s ease-in-out infinite, cqGradientShift 6s ease infinite;
    overflow: hidden;
}

.cq-trigger-btn-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.25) 50%, transparent 60%);
    animation: cqBtnShine 3s ease-in-out infinite;
}

@keyframes cqBtnShine {
    0%, 70% { transform: translateX(-120%); }
    100% { transform: translateX(120%); }
}

.cq-trigger-btn-arrow {
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

@keyframes cqBtnPulse {
    0%, 100% { box-shadow: 0 6px 28px rgba(99, 102, 241, 0.5); }
    50% { box-shadow: 0 8px 38px rgba(139, 92, 246, 0.65), 0 0 24px rgba(6, 182, 212, 0.25); }
}

/* ── Modal Overlay ── */
.cq-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.45s ease, visibility 0.45s ease, background 0.45s ease;
}

.cq-overlay.cq-active {
    visibility: visible;
    opacity: 1;
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.cq-overlay.cq-flash .cq-modal {
    animation: cqFlashIn 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.cq-overlay.cq-flash .cq-path-card {
    animation: cqCardFlashIn 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

@keyframes cqFlashIn {
    0% {
        opacity: 0;
        transform: scale(0.45) rotate(-5deg);
        filter: brightness(4) blur(6px);
    }
    30% {
        filter: brightness(2.5) blur(1px);
    }
    55% {
        filter: brightness(1.6) blur(0);
        transform: scale(1.04) rotate(1deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
        filter: brightness(1);
    }
}

.cq-modal {
    position: relative;
    width: 100%;
    max-width: 980px;
    max-height: 92vh;
    overflow: hidden;
    border-radius: 30px;
    background: linear-gradient(155deg, #0a0f1e 0%, #111827 40%, #0f172a 100%);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(255,255,255,0.04) inset,
        0 0 120px rgba(99, 102, 241, 0.1);
    padding: 0;
    transform: scale(0.85);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.45s ease;
}

.cq-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #06b6d4, #34d399, #fbbf24, #f472b6, #6366f1);
    background-size: 200% 100%;
    animation: cqGradientShift 4s linear infinite;
    z-index: 5;
}

.cq-modal::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 10% 20%, rgba(99,102,241,0.12) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(52,211,153,0.08) 0%, transparent 35%);
    pointer-events: none;
    z-index: 0;
}

#cq-modal-body {
    position: relative;
    z-index: 2;
    max-height: calc(92vh - 4px);
    overflow-y: auto;
    padding: 1rem 1rem 1.15rem;
    -webkit-overflow-scrolling: touch;
}

#cq-modal-body::-webkit-scrollbar { width: 5px; }
#cq-modal-body::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
}

.cq-overlay.cq-active .cq-modal {
    transform: scale(1);
    opacity: 1;
}

.cq-close {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    color: #e2e8f0;
    font-size: 1.15rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
    z-index: 20;
    backdrop-filter: blur(8px);
}

.cq-close:hover {
    background: rgba(239, 68, 68, 0.35);
    border-color: rgba(248, 113, 113, 0.4);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
    transform: rotate(90deg);
}

/* ── Premium Step Panel (paths + questions wrapper) ── */
.cq-step-panel {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
}

.cq-step-panel-bg {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.03) inset,
        0 20px 50px rgba(0, 0, 0, 0.25);
    animation: cqPanelGlow 5s ease-in-out infinite;
}

.cq-step-panel--paths .cq-step-panel-bg {
    background:
        linear-gradient(145deg, rgba(99,102,241,0.08) 0%, rgba(255,255,255,0.02) 50%, rgba(52,211,153,0.06) 100%);
}

.cq-step-panel--question .cq-step-panel-bg {
    background:
        linear-gradient(145deg, rgba(6,182,212,0.07) 0%, rgba(255,255,255,0.02) 50%, rgba(139,92,246,0.07) 100%);
}

.cq-step-panel-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, black 10%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, black 10%, transparent 70%);
}

@keyframes cqPanelGlow {
    0%, 100% {
        border-color: rgba(255, 255, 255, 0.08);
        box-shadow: 0 0 0 1px rgba(255,255,255,0.03) inset, 0 20px 50px rgba(0,0,0,0.25);
    }
    50% {
        border-color: rgba(255, 255, 255, 0.16);
        box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset, 0 25px 60px rgba(0,0,0,0.3), 0 0 60px rgba(99,102,241,0.08);
    }
}

.cq-step-panel-inner {
    position: relative;
    z-index: 1;
    padding: 1rem 1rem 1.05rem;
}

.cq-step-panel--paths .cq-path-grid {
    margin-top: 0.65rem;
}

/* ── Step Header ── */
.cq-step-header {
    text-align: center;
    color: #fff;
    margin-bottom: 0;
    padding-top: 0.25rem;
}

.cq-step-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(129, 140, 248, 0.25);
    margin-bottom: 0.45rem;
}

.cq-step-panel--question .cq-step-badge {
    color: #67e8f9;
    background: rgba(6, 182, 212, 0.12);
    border-color: rgba(34, 211, 238, 0.25);
}

.cq-step-header h4 {
    font-weight: 800;
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
    color: #f8fafc;
    line-height: 1.35;
}

.cq-step-header p {
    color: #94a3b8 !important;
    font-size: 0.8rem;
    margin-bottom: 0.55rem;
    line-height: 1.45;
}

.cq-step-dots {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 0.45rem;
}

.cq-step-dots span,
.cq-step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    transition: all 0.35s ease;
}

.cq-step-dots span.active,
.cq-step-dot.active {
    width: 24px;
    border-radius: 50px;
    background: linear-gradient(90deg, #6366f1, #34d399);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.5);
}

.cq-step-dot.done {
    background: #34d399;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.4);
}

.cq-progress-wrap {
    position: relative;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50px;
    height: 7px;
    overflow: hidden;
    margin: 0.45rem auto 0;
    max-width: 420px;
}

.cq-progress-bar {
    height: 100%;
    border-radius: 50px;
    background: linear-gradient(90deg, #6366f1, #06b6d4, #34d399, #fbbf24);
    background-size: 200% 100%;
    animation: cqGradientShift 3s linear infinite;
    transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 0%;
    box-shadow: 0 0 14px rgba(52, 211, 153, 0.45);
}

.cq-progress-label {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.03em;
}

/* ── Question Shell ── */
.cq-question-shell {
    position: relative;
    margin-top: 0.65rem;
    padding: 3px;
    border-radius: 22px;
    animation: cqQuestionIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes cqQuestionIn {
    from { opacity: 0; transform: translateY(20px) scale(0.96); filter: brightness(1.6); }
    to { opacity: 1; transform: translateY(0) scale(1); filter: brightness(1); }
}

.cq-question-glow {
    position: absolute;
    inset: 0;
    border-radius: 22px;
    background: linear-gradient(135deg, #6366f1, #06b6d4, #34d399, #a855f7, #6366f1);
    background-size: 300% 300%;
    animation: cqBorderGlow 3.5s ease-in-out infinite, cqGradientShift 8s ease infinite;
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.35);
}

.cq-question-shine {
    position: absolute;
    inset: 3px;
    border-radius: 19px;
    overflow: hidden;
    z-index: 2;
    pointer-events: none;
}

.cq-question-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -80%;
    width: 50%;
    height: 200%;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.07) 50%, transparent 60%);
    transform: skewX(-18deg);
    animation: cqShineSweep 5s ease-in-out infinite;
}

.cq-question-card {
    position: relative;
    z-index: 1;
    margin: 3px;
    background: linear-gradient(165deg, #ffffff 0%, #f8fafc 55%, #f1f5f9 100%);
    border-radius: 19px;
    padding: 1.15rem 1rem 1.05rem;
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,1);
}

.cq-question-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
    margin-bottom: 0.65rem;
}

.cq-question-text {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.55;
    margin-bottom: 1rem;
}

.cq-answer-btns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    justify-content: center;
}

.cq-answer-btns--count-3 .cq-answer-btn:last-child {
    grid-column: 1 / -1;
}

.cq-answer-btn {
    min-width: 0;
    width: 100%;
    padding: 0.6rem 0.55rem;
    border-radius: 12px;
    border: 2px solid transparent;
    font-weight: 600;
    font-size: 0.82rem;
    line-height: 1.35;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.cq-answer-btn span {
    display: block;
}

.cq-answer-best {
    background: linear-gradient(145deg, #ecfdf5, #d1fae5);
    border-color: #6ee7b7;
    color: #047857;
    box-shadow: 0 3px 12px rgba(16, 185, 129, 0.12);
}

.cq-answer-good {
    background: linear-gradient(145deg, #ecfeff, #cffafe);
    border-color: #67e8f9;
    color: #0e7490;
    box-shadow: 0 3px 12px rgba(6, 182, 212, 0.1);
}

.cq-answer-neutral {
    background: linear-gradient(145deg, #fffbeb, #fef3c7);
    border-color: #fcd34d;
    color: #b45309;
    box-shadow: 0 3px 12px rgba(245, 158, 11, 0.1);
}

.cq-answer-low {
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
    border-color: #cbd5e1;
    color: #475569;
    box-shadow: 0 3px 12px rgba(100, 116, 139, 0.08);
}

.cq-answer-best:hover {
    transform: translateY(-2px) scale(1.02);
    background: linear-gradient(145deg, #10b981, #059669);
    border-color: #059669;
    color: #fff;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.cq-answer-good:hover {
    transform: translateY(-2px) scale(1.02);
    background: linear-gradient(145deg, #06b6d4, #0891b2);
    border-color: #0891b2;
    color: #fff;
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.3);
}

.cq-answer-neutral:hover {
    transform: translateY(-2px) scale(1.02);
    background: linear-gradient(145deg, #f59e0b, #d97706);
    border-color: #d97706;
    color: #fff;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

.cq-answer-low:hover {
    transform: translateY(-2px) scale(1.02);
    background: linear-gradient(145deg, #64748b, #475569);
    border-color: #475569;
    color: #fff;
    box-shadow: 0 6px 18px rgba(100, 116, 139, 0.3);
}

.cq-answer-btn.cq-selected {
    pointer-events: none;
    transform: scale(1.02);
}

.cq-answer-best.cq-selected {
    background: linear-gradient(145deg, #059669, #047857);
    border-color: #047857;
    color: #fff;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.cq-answer-good.cq-selected {
    background: linear-gradient(145deg, #0891b2, #0e7490);
    border-color: #0e7490;
    color: #fff;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.35);
}

.cq-answer-neutral.cq-selected {
    background: linear-gradient(145deg, #d97706, #b45309);
    border-color: #b45309;
    color: #fff;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.35);
}

.cq-answer-low.cq-selected {
    background: linear-gradient(145deg, #475569, #334155);
    border-color: #334155;
    color: #fff;
    box-shadow: 0 0 16px rgba(100, 116, 139, 0.3);
}

/* ── Path Selection Cards ── */
.cq-path-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
    margin-top: 0.65rem;
    perspective: 900px;
}

.cq-path-card {
    position: relative;
    padding: 3px;
    border-radius: 22px;
    cursor: pointer;
    text-align: center;
    background: transparent;
    border: none;
    overflow: visible;
    animation: cqCardFlashIn 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
    transform-style: preserve-3d;
}

.cq-path-card:nth-child(1) { animation-delay: 0.08s; }
.cq-path-card:nth-child(2) { animation-delay: 0.22s; }
.cq-path-card:nth-child(3) { animation-delay: 0.36s; }

/* Slow glowing animated border ring */
.cq-path-glow {
    position: absolute;
    inset: 0;
    border-radius: 22px;
    z-index: 0;
    animation: cqBorderGlow 3.5s ease-in-out infinite;
}

.cq-path-card[data-path="hafiz_full"] .cq-path-glow {
    background: linear-gradient(135deg, #667eea, #764ba2, #a78bfa, #667eea);
    background-size: 300% 300%;
    animation: cqBorderGlow 3.2s ease-in-out infinite, cqGradientShift 6s ease infinite;
    box-shadow:
        0 0 18px rgba(102, 126, 234, 0.45),
        0 0 40px rgba(118, 75, 162, 0.25);
}

.cq-path-card[data-path="hafiz_partial"] .cq-path-glow {
    background: linear-gradient(135deg, #059669, #34d399, #6ee7b7, #059669);
    background-size: 300% 300%;
    animation: cqBorderGlow 3.6s ease-in-out infinite 0.4s, cqGradientShift 6s ease infinite;
    box-shadow:
        0 0 18px rgba(52, 211, 153, 0.45),
        0 0 40px rgba(16, 185, 129, 0.25);
}

.cq-path-card[data-path="modern_only"] .cq-path-glow {
    background: linear-gradient(135deg, #f59e0b, #f472b6, #fb7185, #f59e0b);
    background-size: 300% 300%;
    animation: cqBorderGlow 3.4s ease-in-out infinite 0.8s, cqGradientShift 6s ease infinite;
    box-shadow:
        0 0 18px rgba(244, 114, 182, 0.45),
        0 0 40px rgba(245, 158, 11, 0.25);
}

@keyframes cqBorderGlow {
    0%, 100% {
        filter: brightness(1) blur(0);
        opacity: 0.85;
    }
    50% {
        filter: brightness(1.35) blur(0);
        opacity: 1;
    }
}

@keyframes cqGradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes cqCardFlashIn {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.75) rotateX(12deg);
        filter: brightness(3);
    }
    35% {
        filter: brightness(2);
    }
    65% {
        filter: brightness(1.3);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0);
        filter: brightness(1);
    }
}

/* Sweeping flash shine */
.cq-path-shine {
    position: absolute;
    inset: 3px;
    border-radius: 19px;
    overflow: hidden;
    z-index: 2;
    pointer-events: none;
}

.cq-path-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -80%;
    width: 55%;
    height: 200%;
    background: linear-gradient(
        105deg,
        transparent 30%,
        rgba(255, 255, 255, 0.55) 48%,
        rgba(255, 255, 255, 0.75) 50%,
        rgba(255, 255, 255, 0.55) 52%,
        transparent 70%
    );
    transform: skewX(-18deg);
    animation: cqShineSweep 4s ease-in-out infinite;
}

.cq-path-card:nth-child(2) .cq-path-shine::after { animation-delay: 1.3s; }
.cq-path-card:nth-child(3) .cq-path-shine::after { animation-delay: 2.6s; }

@keyframes cqShineSweep {
    0%, 72% { left: -80%; opacity: 0; }
    78% { opacity: 1; }
    100% { left: 140%; opacity: 0; }
}

.cq-path-card-inner {
    position: relative;
    z-index: 1;
    margin: 3px;
    padding: 1.1rem 0.9rem 0.95rem;
    border-radius: 19px;
    background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.35s ease;
}

.cq-path-card:hover .cq-path-card-inner {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,1),
        0 12px 30px rgba(0, 0, 0, 0.18);
}

.cq-path-card:hover {
    transform: translateY(-6px);
}

.cq-path-card[data-path="hafiz_full"]:hover .cq-path-glow {
    box-shadow:
        0 0 28px rgba(102, 126, 234, 0.75),
        0 0 55px rgba(118, 75, 162, 0.45),
        0 0 80px rgba(167, 139, 250, 0.25);
}

.cq-path-card[data-path="hafiz_partial"]:hover .cq-path-glow {
    box-shadow:
        0 0 28px rgba(52, 211, 153, 0.75),
        0 0 55px rgba(16, 185, 129, 0.45),
        0 0 80px rgba(110, 231, 183, 0.25);
}

.cq-path-card[data-path="modern_only"]:hover .cq-path-glow {
    box-shadow:
        0 0 28px rgba(244, 114, 182, 0.75),
        0 0 55px rgba(245, 158, 11, 0.45),
        0 0 80px rgba(251, 113, 133, 0.25);
}

.cq-path-card:active .cq-path-card-inner {
    transform: scale(0.98);
}

.cq-path-icon-wrap {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.6rem;
    font-size: 1.25rem;
    color: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.cq-path-card[data-path="hafiz_full"] .cq-path-icon-wrap {
    background: linear-gradient(135deg, #667eea, #764ba2);
}
.cq-path-card[data-path="hafiz_partial"] .cq-path-icon-wrap {
    background: linear-gradient(135deg, #059669, #34d399);
}
.cq-path-card[data-path="modern_only"] .cq-path-icon-wrap {
    background: linear-gradient(135deg, #f59e0b, #f472b6);
}

.cq-path-icon {
    display: block;
    line-height: 1;
}

.cq-path-label {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.5;
    color: #0f172a;
    margin: 0;
    letter-spacing: 0.01em;
    text-shadow: none;
}

.cq-path-hint {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.72rem;
    font-weight: 500;
    color: #64748b;
    line-height: 1.4;
}

.cq-path-num {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e293b, #334155);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 800;
    border: 2px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.cq-path-select-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.55rem;
    padding: 0.25rem 0.7rem;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.cq-path-card:hover .cq-path-select-badge {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
}

.cq-path-card[data-path="hafiz_full"]:hover .cq-path-select-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: transparent;
}
.cq-path-card[data-path="hafiz_partial"]:hover .cq-path-select-badge {
    background: linear-gradient(135deg, #059669, #34d399);
    border-color: transparent;
}
.cq-path-card[data-path="modern_only"]:hover .cq-path-select-badge {
    background: linear-gradient(135deg, #f59e0b, #f472b6);
    border-color: transparent;
}

.cq-path-card.cq-path-selected {
    pointer-events: none;
    animation: cqCardSelectFlash 0.45s ease forwards !important;
}

.cq-path-card.cq-path-selected .cq-path-glow {
    animation: cqSelectGlow 0.45s ease forwards !important;
    filter: brightness(1.8);
}

@keyframes cqCardSelectFlash {
    0% { transform: scale(1); filter: brightness(1); }
    40% { transform: scale(1.06); filter: brightness(2.2); }
    100% { transform: scale(1.02); filter: brightness(1.3); opacity: 0.85; }
}

@keyframes cqSelectGlow {
    0% { opacity: 0.85; }
    50% { opacity: 1; box-shadow: 0 0 50px rgba(255,255,255,0.5); }
    100% { opacity: 1; }
}

.cq-loading {
    text-align: center;
    padding: 3rem;
    color: rgba(255,255,255,0.7);
}

.cq-loading .spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    border-color: rgba(255,255,255,0.2);
    border-top-color: #6366f1;
}

/* ── Result / Celebration ── */
.cq-step-panel--result {
    overflow: hidden;
}

.cq-step-panel--result .cq-step-panel-inner {
    position: relative;
    z-index: 2;
}

.cq-step-panel--result .cq-step-panel-bg {
    background:
        linear-gradient(145deg, rgba(99,102,241,0.12) 0%, rgba(244,114,182,0.08) 40%, rgba(52,211,153,0.1) 100%);
    animation: cqResultPanelGlow 3s ease-in-out infinite;
}

@keyframes cqResultPanelGlow {
    0%, 100% {
        box-shadow: 0 0 0 1px rgba(255,255,255,0.04) inset, 0 20px 50px rgba(0,0,0,0.25), 0 0 40px rgba(99,102,241,0.1);
        border-color: rgba(255,255,255,0.1);
    }
    50% {
        box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset, 0 25px 60px rgba(0,0,0,0.3), 0 0 80px rgba(244,114,182,0.15), 0 0 60px rgba(52,211,153,0.12);
        border-color: rgba(251, 191, 36, 0.25);
    }
}

.cq-step-badge--celebrate {
    color: #fde68a !important;
    background: rgba(245, 158, 11, 0.15) !important;
    border-color: rgba(251, 191, 36, 0.35) !important;
    animation: cqBadgeCelebrate 2s ease-in-out infinite;
}

@keyframes cqBadgeCelebrate {
    0%, 100% { box-shadow: 0 0 0 rgba(251,191,36,0); transform: scale(1); }
    50% { box-shadow: 0 0 24px rgba(251,191,36,0.35); transform: scale(1.04); }
}

.cq-result-reveal {
    animation: cqResultReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes cqResultReveal {
    0% { opacity: 0; transform: scale(0.85); filter: brightness(2); }
    60% { filter: brightness(1.4); }
    100% { opacity: 1; transform: scale(1); filter: brightness(1); }
}

.cq-result-rays {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 280px;
    height: 280px;
    transform: translate(-50%, -55%);
    background: conic-gradient(from 0deg, transparent, rgba(99,102,241,0.06), transparent, rgba(52,211,153,0.06), transparent, rgba(251,191,36,0.06), transparent);
    border-radius: 50%;
    animation: cqRaysSpin 20s linear infinite;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

.cq-celebrate-active .cq-result-rays {
    opacity: 1;
}

@keyframes cqRaysSpin {
    to { transform: translate(-50%, -55%) rotate(360deg); }
}

.cq-result-shell {
    position: relative;
    margin-top: 0.65rem;
    padding: 3px;
    border-radius: 24px;
}

.cq-result-glow {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: linear-gradient(135deg, #6366f1, #06b6d4, #34d399, #fbbf24, #f472b6, #a855f7, #6366f1);
    background-size: 400% 400%;
    animation: cqBorderGlow 2.5s ease-in-out infinite, cqGradientShift 5s ease infinite;
    box-shadow:
        0 0 30px rgba(99, 102, 241, 0.5),
        0 0 60px rgba(52, 211, 153, 0.25),
        0 0 90px rgba(244, 114, 182, 0.2);
}

.cq-result-shine {
    position: absolute;
    inset: 3px;
    border-radius: 21px;
    overflow: hidden;
    z-index: 2;
    pointer-events: none;
}

.cq-result-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -80%;
    width: 50%;
    height: 200%;
    background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.12) 50%, transparent 65%);
    transform: skewX(-18deg);
    animation: cqShineSweep 3s ease-in-out infinite;
}

.cq-result-card {
    position: relative;
    z-index: 1;
    margin: 3px;
    padding: 1.15rem 1rem 1rem;
    border-radius: 21px;
    background: linear-gradient(165deg, #ffffff 0%, #faf5ff 30%, #ecfdf5 60%, #fffbeb 100%);
    text-align: center;
    overflow: hidden;
}

.cq-result-trophy {
    font-size: 1.5rem;
    margin-bottom: 0.15rem;
    animation: cqTrophyBounce 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s backwards, cqTrophyGlow 2.5s ease-in-out 1.4s infinite;
}

.cq-result-trophy i {
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #fde68a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 12px rgba(245, 158, 11, 0.4));
}

@keyframes cqTrophyBounce {
    0% { opacity: 0; transform: scale(0) rotate(-20deg); }
    70% { transform: scale(1.2) rotate(5deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes cqTrophyGlow {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(251,191,36,0.4)); }
    50% { filter: drop-shadow(0 0 20px rgba(251,191,36,0.7)); transform: scale(1.08); }
}

.cq-score-ring-wrap {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 0.65rem;
}

.cq-score-ring-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99,102,241,0.2) 0%, transparent 70%);
    animation: cqScorePulse 2s ease-in-out infinite;
}

@keyframes cqScorePulse {
    0%, 100% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 1; }
}

.cq-score-ring {
    position: relative;
    width: 100%;
    height: 100%;
}

.cq-score-ring svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 8px rgba(99,102,241,0.3));
}

.cq-score-ring circle {
    fill: none;
    stroke-width: 11;
    stroke-linecap: round;
}

.cq-score-ring .cq-ring-bg {
    stroke: rgba(99, 102, 241, 0.12);
}

.cq-score-ring .cq-ring-fill {
    stroke: url(#cqScoreGradient);
    stroke-dasharray: 440;
    stroke-dashoffset: 440;
    transition: stroke-dashoffset 2s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 0 6px rgba(52, 211, 153, 0.5));
}

.cq-score-value {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cq-score-num {
    font-size: 2.1rem;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, #6366f1, #06b6d4, #34d399, #fbbf24);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: cqGradientShift 4s ease infinite;
}

.cq-score-num.cq-score-pop {
    animation: cqScorePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), cqGradientShift 4s ease infinite;
}

@keyframes cqScorePop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.cq-score-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #64748b;
    margin-top: 0.3rem;
    letter-spacing: 0.04em;
}

.cq-result-match-strip {
    display: inline-flex;
    margin-bottom: 0.65rem;
    animation: cqStripIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.8s backwards;
}

.cq-result-match-strip span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
    background-size: 200% 200%;
    animation: cqGradientShift 4s ease infinite;
    box-shadow: 0 6px 24px rgba(139, 92, 246, 0.4);
}

@keyframes cqStripIn {
    from { opacity: 0; transform: translateY(15px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.cq-result-msg {
    color: #334155;
    font-size: 0.86rem;
    line-height: 1.55;
    max-width: 480px;
    margin: 0 auto 0.85rem;
    animation: cqStripIn 0.6s ease 1s backwards;
}

.cq-result-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: cqStripIn 0.6s ease 1.2s backwards;
}

/* Result card sits on light bg — outline btn needs dark contrast */
.cq-result-actions .cq-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: #ffffff;
    color: #334155;
    border: 2px solid #94a3b8;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
    font-weight: 700;
}

.cq-result-actions .cq-btn-outline:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #6366f1;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.2);
}

.cq-result-actions .cq-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.cq-btn-celebrate {
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899) !important;
    background-size: 200% 200% !important;
    animation: cqGradientShift 4s ease infinite, cqBtnPulse 2.5s ease-in-out infinite !important;
    box-shadow: 0 6px 28px rgba(139, 92, 246, 0.5) !important;
}

/* Celebration bursts */
.cq-celebration-bursts {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}

.cq-burst {
    position: absolute;
    width: 0;
    height: 0;
}

.cq-burst--0 { top: 20%; left: 15%; }
.cq-burst--1 { top: 15%; right: 20%; }
.cq-burst--2 { top: 45%; left: 8%; }
.cq-burst--3 { top: 40%; right: 10%; }
.cq-burst--4 { bottom: 25%; left: 25%; }
.cq-burst--5 { bottom: 20%; right: 22%; }

.cq-burst-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--burst-color);
    animation: cqBurstFly 1.2s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
    animation-delay: calc(var(--pi) * 0.05s + 0.3s);
    opacity: 0;
}

.cq-celebrate-active .cq-burst-particle {
    opacity: 1;
}

/* Fallback burst — 8 directions */
.cq-burst-particle:nth-child(1) { animation-name: cqBurst1; }
.cq-burst-particle:nth-child(2) { animation-name: cqBurst2; }
.cq-burst-particle:nth-child(3) { animation-name: cqBurst3; }
.cq-burst-particle:nth-child(4) { animation-name: cqBurst4; }
.cq-burst-particle:nth-child(5) { animation-name: cqBurst5; }
.cq-burst-particle:nth-child(6) { animation-name: cqBurst6; }
.cq-burst-particle:nth-child(7) { animation-name: cqBurst7; }
.cq-burst-particle:nth-child(8) { animation-name: cqBurst8; }

@keyframes cqBurst1 { 0% { transform: translate(0,0) scale(0); opacity:1; } 100% { transform: translate(0,-55px) scale(1); opacity:0; } }
@keyframes cqBurst2 { 0% { transform: translate(0,0) scale(0); opacity:1; } 100% { transform: translate(40px,-40px) scale(1); opacity:0; } }
@keyframes cqBurst3 { 0% { transform: translate(0,0) scale(0); opacity:1; } 100% { transform: translate(55px,0) scale(1); opacity:0; } }
@keyframes cqBurst4 { 0% { transform: translate(0,0) scale(0); opacity:1; } 100% { transform: translate(40px,40px) scale(1); opacity:0; } }
@keyframes cqBurst5 { 0% { transform: translate(0,0) scale(0); opacity:1; } 100% { transform: translate(0,55px) scale(1); opacity:0; } }
@keyframes cqBurst6 { 0% { transform: translate(0,0) scale(0); opacity:1; } 100% { transform: translate(-40px,40px) scale(1); opacity:0; } }
@keyframes cqBurst7 { 0% { transform: translate(0,0) scale(0); opacity:1; } 100% { transform: translate(-55px,0) scale(1); opacity:0; } }
@keyframes cqBurst8 { 0% { transform: translate(0,0) scale(0); opacity:1; } 100% { transform: translate(-40px,-40px) scale(1); opacity:0; } }

/* Confetti */
.cq-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 4;
    border-radius: inherit;
}

.cq-confetti span {
    position: absolute;
    top: -10px;
    animation: cqConfettiFall linear forwards;
    opacity: 0;
}

.cq-celebrate-active .cq-confetti span {
    opacity: 1;
}

.cq-confetti--circle { border-radius: 50%; }
.cq-confetti--rect { border-radius: 2px; }
.cq-confetti--star {
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

@keyframes cqConfettiFall {
    0% {
        transform: translateY(-20px) rotate(0deg) translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateY(450px) rotate(720deg) translateX(calc(-30px + 60px * var(--drift, 0.5)));
        opacity: 0;
    }
}

.cq-btn-primary {
    padding: 0.7rem 1.75rem;
    border-radius: 50px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cq-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.45);
    color: #fff;
}

.cq-btn-outline {
    padding: 0.7rem 1.75rem;
    border-radius: 50px;
    background: transparent;
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.3);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.cq-btn-outline:hover {
    background: rgba(255,255,255,0.1);
}

@media (max-width: 767px) {
    /* ── Homepage trigger: compact ── */
    .cq-section { padding: 1.25rem 0 1.5rem; }
    .cq-section-shell {
        padding: 0.85rem 0.75rem 0.9rem;
        border-radius: 18px;
    }
    .cq-section-eyebrow { display: none; }
    .cq-section-badge {
        font-size: 0.68rem;
        padding: 0.28rem 0.65rem;
        margin-bottom: 0.4rem;
    }
    .cq-bg-sparkles { display: none; }
    .cq-bg-orb--1 { width: 180px; height: 180px; }
    .cq-bg-orb--2 { width: 140px; height: 140px; }
    .cq-bg-orb--3 { display: none; }

    .cq-trigger-card {
        animation: cqGradientShift 10s ease infinite, cqTriggerGlow 4s ease-in-out infinite;
    }
    .cq-trigger-inner { padding: 0.85rem 0.75rem 0.8rem; }
    .cq-trigger-top {
        flex-direction: row;
        justify-content: center;
        gap: 0.45rem;
        margin-bottom: 0.4rem;
    }
    .cq-trigger-icon-ring {
        width: 42px;
        height: 42px;
        margin-bottom: 0;
    }
    .cq-trigger-icon { font-size: 1.1rem; inset: 5px; }
    .cq-trigger-tag {
        align-self: center;
        font-size: 0.62rem;
        padding: 0.22rem 0.55rem;
    }
    .cq-trigger-title {
        font-size: 0.95rem;
        line-height: 1.45;
        margin-bottom: 0.3rem;
    }
    .cq-trigger-sub {
        font-size: 0.76rem;
        margin-bottom: 0.5rem;
        line-height: 1.4;
    }
    .cq-trigger-features {
        gap: 0.25rem;
        margin-bottom: 0.6rem;
    }
    .cq-trigger-features span {
        font-size: 0.65rem;
        padding: 0.22rem 0.45rem;
    }
    .cq-trigger-btn {
        width: 100%;
        justify-content: center;
        padding: 0.6rem 1rem;
        font-size: 0.84rem;
    }

    /* ── Modal: fit screen ── */
    .cq-overlay {
        padding: 0.4rem;
        align-items: center;
    }
    .cq-modal {
        max-height: calc(100dvh - 0.75rem);
        border-radius: 18px;
        max-width: 100%;
    }
    .cq-close {
        top: 0.55rem;
        right: 0.55rem;
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }
    #cq-modal-body {
        padding: 0.65rem 0.65rem max(0.85rem, env(safe-area-inset-bottom));
        max-height: calc(100dvh - 2.5rem);
    }

    /* ── Step panels ── */
    .cq-step-panel { border-radius: 16px; }
    .cq-step-panel-bg { border-radius: 16px; }
    .cq-step-panel-inner { padding: 0.65rem 0.6rem 0.7rem; }
    .cq-step-badge {
        font-size: 0.62rem;
        padding: 0.22rem 0.6rem;
        margin-bottom: 0.35rem;
    }
    .cq-step-header h4 {
        font-size: 0.95rem;
        margin-bottom: 0.2rem;
        line-height: 1.3;
    }
    .cq-step-header p {
        font-size: 0.72rem;
        margin-bottom: 0.4rem;
        line-height: 1.35;
    }
    .cq-step-panel--result .cq-step-header p { display: none; }
    .cq-step-panel--result .cq-step-header h4 { font-size: 0.9rem; }
    .cq-step-dots { margin-top: 0.35rem; gap: 0.3rem; }
    .cq-step-dots span,
    .cq-step-dot { width: 6px; height: 6px; }
    .cq-step-dots span.active,
    .cq-step-dot.active { width: 18px; }
    .cq-progress-wrap { height: 6px; margin-top: 0.35rem; }
    .cq-progress-label { font-size: 0.65rem; margin-top: 0.25rem; }

    /* ── Path cards: horizontal compact rows ── */
    .cq-path-grid {
        grid-template-columns: 1fr;
        gap: 0.55rem;
        margin-top: 0.45rem;
    }
    .cq-path-card { border-radius: 16px; }
    .cq-path-glow { border-radius: 16px; }
    .cq-path-card-inner {
        display: grid;
        grid-template-columns: 40px 1fr;
        column-gap: 0.6rem;
        row-gap: 0.1rem;
        text-align: left;
        align-items: center;
        padding: 0.65rem 0.75rem;
        border-radius: 14px;
        margin: 2px;
    }
    .cq-path-icon-wrap {
        grid-row: 1 / 3;
        margin: 0;
        width: 40px;
        height: 40px;
        font-size: 1rem;
        border-radius: 11px;
    }
    .cq-path-label {
        grid-column: 2;
        font-size: 0.84rem;
        line-height: 1.35;
    }
    .cq-path-hint {
        grid-column: 2;
        margin-top: 0;
        font-size: 0.65rem;
    }
    .cq-path-select-badge { display: none; }
    .cq-path-num {
        top: -7px;
        width: 24px;
        height: 24px;
        font-size: 0.72rem;
    }

    /* ── Question step ── */
    .cq-question-shell {
        margin-top: 0.45rem;
        border-radius: 16px;
    }
    .cq-question-glow { border-radius: 16px; }
    .cq-question-card {
        padding: 0.85rem 0.75rem 0.8rem;
        border-radius: 14px;
        margin: 2px;
    }
    .cq-question-num {
        width: 26px;
        height: 26px;
        font-size: 0.78rem;
        border-radius: 8px;
        margin-bottom: 0.45rem;
    }
    .cq-question-text {
        font-size: 0.88rem;
        line-height: 1.45;
        margin-bottom: 0.75rem;
    }
    .cq-answer-btns {
        gap: 0.4rem;
        grid-template-columns: repeat(2, 1fr);
    }
    .cq-answer-btn {
        min-height: 42px;
        padding: 0.5rem 0.4rem;
        font-size: 0.76rem;
        line-height: 1.3;
        border-radius: 10px;
    }
    .cq-answer-btns--count-3 .cq-answer-btn:last-child,
    .cq-answer-btns--count-4 .cq-answer-btn {
        grid-column: auto;
    }

    /* ── Result step ── */
    .cq-result-shell { margin-top: 0.45rem; border-radius: 16px; }
    .cq-result-glow { border-radius: 16px; }
    .cq-result-card {
        padding: 0.85rem 0.75rem 0.75rem;
        border-radius: 14px;
        margin: 2px;
    }
    .cq-result-trophy { font-size: 1.25rem; margin-bottom: 0; }
    .cq-score-ring-wrap {
        width: 115px;
        height: 115px;
        margin-bottom: 0.45rem;
    }
    .cq-score-ring circle { stroke-width: 9; }
    .cq-score-num { font-size: 1.75rem; }
    .cq-score-label { font-size: 0.68rem; }
    .cq-result-match-strip { margin-bottom: 0.45rem; }
    .cq-result-match-strip span {
        font-size: 0.75rem;
        padding: 0.28rem 0.65rem;
    }
    .cq-result-msg {
        font-size: 0.78rem;
        line-height: 1.45;
        margin-bottom: 0.65rem;
    }
    .cq-result-actions {
        flex-direction: column;
        gap: 0.45rem;
    }
    .cq-result-actions .cq-btn-primary,
    .cq-result-actions .cq-btn-outline {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        padding: 0.65rem 1rem;
        font-size: 0.88rem;
    }
    .cq-result-actions .cq-btn-outline {
        background: #f8fafc;
        color: #1e293b;
        border: 2px solid #64748b;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    .cq-result-rays { width: 200px; height: 200px; }
    .cq-celebration-bursts { opacity: 0.7; }
}

@media (max-width: 380px) {
    .cq-trigger-title { font-size: 0.88rem; }
    .cq-path-label { font-size: 0.8rem; }
    .cq-question-text { font-size: 0.84rem; }
}
