/**
 * WB Exam Manager — Professional Exam Styles
 *
 * @package WB_Exam_Manager
 */

/* ── Exam Layout ──────────────────────────────────────────────────────── */

.wb-exam-layout {
    max-width: clamp(800px, 70vw, 1100px);
    margin: 0 auto;
    font-family: var(--font-body, 'Inter', sans-serif);
}

/* ── Header ───────────────────────────────────────────────────────────── */

.wb-exam-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(12px, 1.2vw, 20px) clamp(16px, 1.5vw, 24px);
    background: var(--color-white, #fff);
    border: 1px solid #e5e2db;
    border-radius: clamp(8px, 0.6vw, 12px);
    margin-bottom: clamp(16px, 1.5vw, 24px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.wb-exam-header__left {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1vw, 20px);
    flex: 1;
}

.wb-exam-badge {
    display: inline-block;
    background: var(--color-gold, #D4AF37);
    color: var(--color-white, #fff);
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(10px, 0.7vw, 12px);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: clamp(4px, 0.3vw, 6px) clamp(10px, 0.8vw, 14px);
    border-radius: clamp(4px, 0.3vw, 6px);
    white-space: nowrap;
}

.wb-exam-progress-info {
    flex: 1;
    max-width: clamp(200px, 20vw, 350px);
}

.wb-exam-progress-info span {
    display: block;
    font-size: clamp(11px, 0.75vw, 13px);
    color: #6b7280;
    margin-bottom: clamp(4px, 0.3vw, 6px);
}

.wb-exam-progress-bar {
    width: 100%;
    height: clamp(4px, 0.35vw, 6px);
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.wb-exam-progress-fill {
    height: 100%;
    background: var(--color-gold, #D4AF37);
    border-radius: 999px;
    transition: width 0.4s ease;
    width: 0;
}

/* Timer */
.wb-exam-timer-box {
    display: flex;
    align-items: center;
    gap: clamp(6px, 0.4vw, 8px);
    background: #faf8f2;
    padding: clamp(6px, 0.5vw, 10px) clamp(12px, 1vw, 16px);
    border-radius: clamp(6px, 0.4vw, 8px);
    border: 1px solid #e5e2db;
}

.wb-exam-timer-box svg {
    color: var(--color-gold, #D4AF37);
    flex-shrink: 0;
}

.wb-exam-timer {
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(16px, 1.2vw, 22px);
    font-weight: 700;
    color: var(--color-heading, #3C2A14);
    letter-spacing: 0.05em;
}

.wb-exam-timer.wb-timer-warning {
    color: #f59e0b;
}

.wb-exam-timer.wb-timer-critical {
    color: #dc2626;
    animation: wb-pulse 1s infinite;
}

@keyframes wb-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ── Content Area ─────────────────────────────────────────────────────── */

.wb-exam-content {
    display: grid;
    grid-template-columns: 1fr clamp(180px, 16vw, 260px);
    gap: clamp(16px, 1.5vw, 24px);
    align-items: start;
}

.wb-exam-body {
    background: var(--color-white, #fff);
    border: 1px solid #e5e2db;
    border-radius: clamp(8px, 0.6vw, 12px);
    padding: clamp(20px, 2vw, 32px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    min-height: clamp(350px, 35vh, 500px);
    display: flex;
    flex-direction: column;
}

.wb-exam-question-wrap {
    flex: 1;
}

/* ── Question ─────────────────────────────────────────────────────────── */

.wb-exam-q-header {
    display: flex;
    align-items: center;
    gap: clamp(8px, 0.6vw, 12px);
    margin-bottom: clamp(12px, 1vw, 18px);
}

.wb-exam-q-number {
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(12px, 0.85vw, 14px);
    font-weight: 700;
    color: var(--color-gold, #D4AF37);
    background: #faf6ea;
    padding: clamp(3px, 0.25vw, 5px) clamp(8px, 0.6vw, 12px);
    border-radius: clamp(4px, 0.3vw, 6px);
    border: 1px solid #ebe3ca;
}

.wb-exam-q-badge {
    font-size: clamp(10px, 0.7vw, 12px);
    color: #6b7280;
    font-style: italic;
}

.wb-badge-multi {
    color: #7c3aed;
    font-weight: 500;
}

.wb-exam-q-text {
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: clamp(16px, 1.15vw, 20px);
    font-weight: 500;
    color: var(--color-heading, #3C2A14);
    line-height: 1.6;
    margin: 0 0 clamp(20px, 1.8vw, 28px);
}

/* ── Options ──────────────────────────────────────────────────────────── */

.wb-exam-options {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 0.7vw, 12px);
}

.wb-exam-option {
    display: flex;
    align-items: center;
    gap: clamp(10px, 0.8vw, 14px);
    padding: clamp(12px, 1vw, 18px) clamp(14px, 1.2vw, 20px);
    background: #faf8f2;
    border: 2px solid transparent;
    border-radius: clamp(8px, 0.6vw, 10px);
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.wb-exam-option:hover {
    background: #f5f0e4;
    border-color: #d4c5a0;
}

.wb-exam-option.wb-option-selected {
    background: #faf6ea;
    border-color: var(--color-gold, #D4AF37);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

/* Hide native input */
.wb-option-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Custom radio/checkbox indicator */
.wb-option-indicator {
    width: clamp(18px, 1.3vw, 22px);
    height: clamp(18px, 1.3vw, 22px);
    border: 2px solid #c4b998;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: all 0.25s ease;
}

/* Checkbox style for multiple */
.wb-exam-option input[type="checkbox"] ~ .wb-option-indicator {
    border-radius: clamp(4px, 0.3vw, 5px);
}

/* Selected state */
.wb-exam-option.wb-option-selected .wb-option-indicator {
    border-color: var(--color-gold, #D4AF37);
    background: var(--color-gold, #D4AF37);
}

.wb-exam-option.wb-option-selected .wb-option-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Radio dot */
.wb-exam-option input[type="radio"] ~ .wb-option-indicator::after {
    width: clamp(6px, 0.45vw, 8px);
    height: clamp(6px, 0.45vw, 8px);
    border-radius: 50%;
    background: var(--color-white, #fff);
}

.wb-exam-option:not(.wb-option-selected) .wb-option-indicator::after {
    display: none;
}

/* Checkbox checkmark */
.wb-exam-option input[type="checkbox"] ~ .wb-option-indicator::after {
    width: clamp(5px, 0.4vw, 7px);
    height: clamp(9px, 0.65vw, 11px);
    border: 2px solid var(--color-white, #fff);
    border-top: none;
    border-left: none;
    transform: translate(-50%, -60%) rotate(45deg);
}

.wb-option-letter {
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(13px, 0.9vw, 15px);
    font-weight: 700;
    color: var(--color-gold, #D4AF37);
    min-width: clamp(20px, 1.5vw, 26px);
}

.wb-option-text {
    font-size: clamp(14px, 0.95vw, 16px);
    color: var(--color-text, #4A3728);
    line-height: 1.5;
}

/* ── Navigation ───────────────────────────────────────────────────────── */

.wb-exam-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: clamp(20px, 1.8vw, 28px);
    padding-top: clamp(16px, 1.2vw, 20px);
    border-top: 1px solid #e5e2db;
}

.wb-exam-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: clamp(6px, 0.4vw, 8px);
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(13px, 0.85vw, 15px);
    font-weight: 600;
    padding: clamp(10px, 0.8vw, 14px) clamp(18px, 1.4vw, 24px);
    border-radius: clamp(6px, 0.45vw, 8px);
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

.wb-exam-nav-prev {
    background: #f3f0e8;
    color: var(--color-heading, #3C2A14);
}

.wb-exam-nav-prev:hover:not(:disabled) {
    background: #e8e2d4;
}

.wb-exam-nav-prev:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.wb-exam-nav-next {
    background: var(--color-heading, #3C2A14);
    color: var(--color-white, #fff);
}

.wb-exam-nav-next:hover {
    background: #2a1d0e;
}

.wb-exam-submit-btn {
    background: var(--color-cta-primary, #c2692d);
    color: var(--color-white, #fff);
}

.wb-exam-submit-btn:hover {
    background: var(--color-cta-hover, #a85624);
}

/* ── Sidebar — Question Map ───────────────────────────────────────────── */

.wb-exam-sidebar {
    position: sticky;
    top: clamp(80px, 8vw, 100px);
}

.wb-exam-map {
    background: var(--color-white, #fff);
    border: 1px solid #e5e2db;
    border-radius: clamp(8px, 0.6vw, 12px);
    padding: clamp(14px, 1.2vw, 20px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: clamp(12px, 1vw, 16px);
}

.wb-exam-map__title {
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(12px, 0.8vw, 14px);
    font-weight: 600;
    color: var(--color-heading, #3C2A14);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 clamp(10px, 0.8vw, 14px);
}

.wb-exam-map__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: clamp(4px, 0.35vw, 6px);
}

.wb-exam-dot {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(10px, 0.7vw, 12px);
    font-weight: 600;
    background: #f3f0e8;
    color: #9ca3af;
    border: 2px solid transparent;
    border-radius: clamp(4px, 0.3vw, 6px);
    cursor: pointer;
    transition: all 0.2s ease;
}

.wb-exam-dot:hover {
    background: #e8e2d4;
}

.wb-exam-dot.wb-dot-current {
    background: var(--color-heading, #3C2A14);
    color: var(--color-white, #fff);
    border-color: var(--color-heading, #3C2A14);
}

.wb-exam-dot.wb-dot-answered {
    background: #f0fdf4;
    color: #16a34a;
    border-color: #86efac;
}

.wb-exam-dot.wb-dot-answered.wb-dot-current {
    background: var(--color-heading, #3C2A14);
    color: var(--color-white, #fff);
    border-color: #16a34a;
}

.wb-exam-map__legend {
    display: flex;
    flex-direction: column;
    gap: clamp(4px, 0.3vw, 6px);
    margin-top: clamp(10px, 0.8vw, 14px);
    padding-top: clamp(10px, 0.8vw, 14px);
    border-top: 1px solid #e5e2db;
}

.wb-legend-item {
    display: flex;
    align-items: center;
    gap: clamp(6px, 0.4vw, 8px);
    font-size: clamp(10px, 0.7vw, 12px);
    color: #6b7280;
}

.wb-legend-dot {
    width: clamp(10px, 0.75vw, 14px);
    height: clamp(10px, 0.75vw, 14px);
    border-radius: clamp(3px, 0.2vw, 4px);
    background: #f3f0e8;
    border: 1px solid #d1cdc3;
    flex-shrink: 0;
}

.wb-legend-dot.wb-dot-current {
    background: var(--color-heading, #3C2A14);
    border-color: var(--color-heading, #3C2A14);
}

.wb-legend-dot.wb-dot-answered {
    background: #f0fdf4;
    border-color: #86efac;
}

/* Stats mini */
.wb-exam-stats-mini {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(8px, 0.6vw, 12px);
}

.wb-stat-mini {
    background: var(--color-white, #fff);
    border: 1px solid #e5e2db;
    border-radius: clamp(6px, 0.45vw, 8px);
    padding: clamp(10px, 0.8vw, 14px);
    text-align: center;
}

.wb-stat-mini__val {
    display: block;
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(18px, 1.3vw, 24px);
    font-weight: 700;
    color: var(--color-heading, #3C2A14);
}

.wb-stat-mini__label {
    display: block;
    font-size: clamp(10px, 0.7vw, 12px);
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: clamp(2px, 0.2vw, 4px);
}

/* ── Results ──────────────────────────────────────────────────────────── */

.wb-exam-results {
    max-width: clamp(500px, 40vw, 650px);
    margin: clamp(20px, 2vw, 40px) auto;
    text-align: center;
}

.wb-result-header {
    margin-bottom: clamp(20px, 1.8vw, 30px);
}

.wb-result-icon {
    margin-bottom: clamp(12px, 1vw, 16px);
}

.wb-result-title {
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(24px, 2vw, 36px);
    font-weight: 700;
    margin: 0 0 clamp(8px, 0.6vw, 12px);
}

.wb-result-pass .wb-result-title { color: #16a34a; }
.wb-result-fail .wb-result-title { color: #dc2626; }

.wb-result-message {
    font-size: clamp(14px, 1vw, 16px);
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

/* Score ring */
.wb-result-score-ring {
    position: relative;
    display: inline-block;
    margin: clamp(16px, 1.5vw, 24px) auto;
}

.wb-score-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.wb-score-pct {
    display: block;
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(28px, 2.2vw, 40px);
    font-weight: 700;
    color: var(--color-heading, #3C2A14);
}

.wb-score-label {
    display: block;
    font-size: clamp(11px, 0.75vw, 13px);
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Result details */
.wb-result-details {
    display: flex;
    justify-content: center;
    gap: clamp(20px, 2vw, 40px);
    margin: clamp(16px, 1.5vw, 24px) 0;
}

.wb-result-detail {
    text-align: center;
}

.wb-detail-val {
    display: block;
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(18px, 1.4vw, 24px);
    font-weight: 700;
    color: var(--color-heading, #3C2A14);
}

.wb-detail-label {
    display: block;
    font-size: clamp(11px, 0.75vw, 13px);
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: clamp(2px, 0.2vw, 4px);
}

.wb-result-actions {
    display: flex;
    justify-content: center;
    gap: clamp(10px, 0.8vw, 14px);
    margin-top: clamp(20px, 1.8vw, 28px);
}

/* ── Loading ──────────────────────────────────────────────────────────── */

.wb-exam-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(60px, 6vw, 100px) 0;
}

.wb-exam-loader {
    position: relative;
    width: clamp(48px, 3.5vw, 64px);
    height: clamp(48px, 3.5vw, 64px);
}

.wb-loader-ring {
    width: 100%;
    height: 100%;
    border: 3px solid #e5e2db;
    border-top-color: var(--color-gold, #D4AF37);
    border-radius: 50%;
    animation: wb-spin 0.8s linear infinite;
}

@keyframes wb-spin {
    to { transform: rotate(360deg); }
}

.wb-exam-loading-text {
    font-size: clamp(14px, 1vw, 16px);
    color: #6b7280;
    margin-top: clamp(14px, 1vw, 18px);
}

/* ── Error ────────────────────────────────────────────────────────────── */

.wb-exam-error {
    text-align: center;
    padding: clamp(40px, 4vw, 80px) clamp(20px, 2vw, 40px);
}

.wb-exam-error h3 {
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(18px, 1.4vw, 24px);
    color: #dc2626;
    margin: clamp(12px, 1vw, 16px) 0 clamp(8px, 0.6vw, 10px);
}

.wb-exam-error p {
    color: #6b7280;
    margin-bottom: clamp(16px, 1.2vw, 20px);
}

/* ── Confirm Dialog ───────────────────────────────────────────────────── */

.wb-exam-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    backdrop-filter: blur(4px);
}

.wb-exam-confirm-dialog {
    background: var(--color-white, #fff);
    border-radius: clamp(10px, 0.8vw, 16px);
    padding: clamp(24px, 2vw, 40px);
    max-width: clamp(340px, 30vw, 440px);
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.wb-exam-confirm-icon {
    margin-bottom: clamp(12px, 1vw, 16px);
}

.wb-exam-confirm-dialog h3 {
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(18px, 1.4vw, 24px);
    color: var(--color-heading, #3C2A14);
    margin: 0 0 clamp(8px, 0.6vw, 10px);
}

.wb-exam-confirm-dialog p {
    font-size: clamp(13px, 0.9vw, 15px);
    color: #6b7280;
    margin: 0 0 clamp(20px, 1.5vw, 24px);
}

.wb-exam-confirm-actions {
    display: flex;
    gap: clamp(8px, 0.6vw, 12px);
    justify-content: center;
}

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .wb-exam-content {
        grid-template-columns: 1fr;
    }

    .wb-exam-sidebar {
        position: static;
        order: -1;
    }

    .wb-exam-map__grid {
        grid-template-columns: repeat(8, 1fr);
    }

    .wb-exam-map__legend {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .wb-exam-header {
        flex-direction: column;
        gap: clamp(8px, 1vw, 12px);
    }

    .wb-exam-header__left {
        flex-direction: column;
        width: 100%;
    }

    .wb-exam-progress-info {
        max-width: 100%;
        width: 100%;
    }

    .wb-exam-timer-box {
        width: 100%;
        justify-content: center;
    }

    .wb-exam-nav {
        flex-wrap: wrap;
        gap: clamp(8px, 1vw, 10px);
    }

    .wb-exam-nav-btn {
        flex: 1;
        justify-content: center;
        min-width: clamp(100px, 30vw, 140px);
    }

    .wb-result-details {
        flex-direction: column;
        gap: clamp(12px, 1.5vw, 16px);
    }

    .wb-result-actions {
        flex-direction: column;
    }

    .wb-result-actions .wb-exam-nav-btn {
        width: 100%;
        justify-content: center;
    }

    .wb-exam-stats-mini {
        grid-template-columns: 1fr 1fr;
    }

    .wb-exam-confirm-actions {
        flex-direction: column;
    }
}

/* ── My Account — Exam Dashboard ──────────────────────────────────────── */

.wb-exam-dashboard h3 {
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(20px, 1.6vw, 28px);
    font-weight: 700;
    color: var(--color-heading, #3C2A14);
    margin: 0 0 clamp(16px, 1.4vw, 24px);
}

.wb-exam-dashboard h4 {
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(15px, 1.1vw, 18px);
    font-weight: 600;
    color: var(--color-heading, #3C2A14);
    margin: clamp(24px, 2vw, 32px) 0 clamp(12px, 1vw, 16px);
}

.wb-exam-dash-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: clamp(8px, 0.7vw, 12px);
    margin-bottom: clamp(16px, 1.4vw, 24px);
}

.wb-dash-stat {
    background: #faf8f2;
    border: 1px solid #e5e2db;
    border-radius: clamp(6px, 0.5vw, 10px);
    padding: clamp(14px, 1.2vw, 20px);
    text-align: center;
}

.wb-dash-stat__val {
    display: block;
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(20px, 1.5vw, 28px);
    font-weight: 700;
    color: var(--color-gold, #D4AF37);
}

.wb-dash-stat__label {
    display: block;
    font-size: clamp(10px, 0.7vw, 12px);
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: clamp(4px, 0.3vw, 6px);
}

.wb-exam-dash-cta {
    margin-bottom: clamp(16px, 1.4vw, 24px);
}

.wb-exam-dash-table {
    width: 100%;
    border-collapse: collapse;
}

.wb-exam-dash-table th {
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(11px, 0.75vw, 13px);
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: left;
    padding: clamp(8px, 0.7vw, 12px);
    border-bottom: 2px solid #e5e2db;
}

.wb-exam-dash-table td {
    padding: clamp(10px, 0.8vw, 14px) clamp(8px, 0.7vw, 12px);
    border-bottom: 1px solid #f0ede6;
    font-size: clamp(13px, 0.9vw, 15px);
    color: var(--color-text, #4A3728);
}

.wb-dash-badge {
    display: inline-block;
    font-size: clamp(10px, 0.7vw, 12px);
    font-weight: 600;
    padding: clamp(3px, 0.2vw, 4px) clamp(8px, 0.6vw, 10px);
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.wb-dash-badge--pass {
    background: #f0fdf4;
    color: #16a34a;
}

.wb-dash-badge--fail {
    background: #fef2f2;
    color: #dc2626;
}

.wb-exam-dash-empty {
    color: #9ca3af;
    font-style: italic;
    padding: clamp(20px, 2vw, 30px) 0;
}

.wb-exam-dash-certs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(clamp(260px, 22vw, 340px), 1fr));
    gap: clamp(10px, 0.8vw, 14px);
}

.wb-dash-cert {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 0.6vw, 12px);
    background: #faf8f2;
    border: 1px solid #e5e2db;
    border-radius: clamp(8px, 0.6vw, 10px);
    padding: clamp(16px, 1.2vw, 22px);
}

.wb-dash-cert__title {
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(14px, 1vw, 16px);
    font-weight: 600;
    color: var(--color-heading, #3C2A14);
}

.wb-dash-cert__number {
    font-family: monospace;
    font-size: clamp(11px, 0.8vw, 13px);
    color: #6b7280;
    word-break: break-all;
}

.wb-dash-cert__date {
    color: #9ca3af;
    font-size: clamp(12px, 0.8vw, 14px);
}

.wb-dash-cert .wb-btn {
    align-self: flex-start;
}

/* Exam dashboard actions */
.wb-exam-dash-actions {
    display: flex;
    gap: clamp(6px, 0.5vw, 8px);
}

.wb-text-muted {
    color: #9ca3af;
    font-size: clamp(12px, 0.8vw, 13px);
    font-style: italic;
}

/* Attempt history collapsible */
.wb-exam-history-details {
    margin-top: clamp(12px, 1vw, 16px);
    border: 1px solid #e5e2db;
    border-radius: clamp(6px, 0.5vw, 8px);
    overflow: hidden;
}

.wb-exam-history-details summary {
    cursor: pointer;
    padding: clamp(10px, 0.8vw, 14px) clamp(14px, 1.2vw, 18px);
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(12px, 0.85vw, 14px);
    font-weight: 600;
    color: var(--color-heading, #3C2A14);
    background: #faf8f2;
    user-select: none;
}

.wb-exam-history-details summary:hover {
    background: #f5f0e6;
}

.wb-exam-history-details[open] summary {
    border-bottom: 1px solid #e5e2db;
}

.wb-exam-history-details .wb-exam-dash-table {
    margin: 0;
}

@media (max-width: 768px) {
    .wb-exam-dash-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .wb-exam-dash-table {
        font-size: clamp(12px, 0.85vw, 13px);
    }

    .wb-exam-dash-actions {
        flex-direction: column;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
 * Choice Screen — Demo vs Real Exam
 * ═══════════════════════════════════════════════════════════════════════════ */
.wb-exam-choice {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FAF8F2;
    z-index: 9999;
    padding: clamp(16px, 2vw, 32px);
}

.wb-exam-choice__card {
    max-width: clamp(400px, 40vw, 600px);
    width: 100%;
    text-align: center;
}

.wb-exam-choice__icon {
    margin-bottom: clamp(16px, 1.5vw, 24px);
}

.wb-exam-choice__icon svg {
    width: clamp(48px, 4vw, 72px);
    height: clamp(48px, 4vw, 72px);
}

.wb-exam-choice__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(22px, 2.2vw, 36px);
    font-weight: 700;
    color: #3E2723;
    margin-bottom: clamp(6px, 0.5vw, 10px);
}

.wb-exam-choice__subtitle {
    font-size: clamp(13px, 1vw, 16px);
    color: #8d7b6e;
    margin-bottom: clamp(24px, 2.5vw, 40px);
}

.wb-exam-choice__options {
    display: flex;
    gap: clamp(12px, 1.2vw, 20px);
    margin-bottom: clamp(16px, 1.5vw, 24px);
}

.wb-exam-choice__btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(8px, 0.8vw, 12px);
    padding: clamp(20px, 2vw, 32px) clamp(16px, 1.5vw, 24px);
    border: clamp(2px, 0.15vw, 2px) solid #e5e1d8;
    border-radius: clamp(8px, 0.8vw, 12px);
    background: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}

.wb-exam-choice__btn:hover {
    transform: translateY(clamp(-2px, -0.2vw, -4px));
    box-shadow: 0 clamp(4px, 0.5vw, 8px) clamp(16px, 1.5vw, 24px) rgba(0, 0, 0, 0.08);
}

.wb-exam-choice__btn--demo:hover {
    border-color: #2563eb;
}

.wb-exam-choice__btn--real:hover {
    border-color: #D4AF37;
}

.wb-exam-choice__btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(36px, 3vw, 48px);
    height: clamp(36px, 3vw, 48px);
    border-radius: 50%;
}

.wb-exam-choice__btn--demo .wb-exam-choice__btn-icon {
    background: #dbeafe;
    color: #2563eb;
}

.wb-exam-choice__btn--real .wb-exam-choice__btn-icon {
    background: #fef3c7;
    color: #D4AF37;
}

.wb-exam-choice__btn-icon svg {
    width: clamp(20px, 1.5vw, 24px);
    height: clamp(20px, 1.5vw, 24px);
}

.wb-exam-choice__btn-label {
    font-weight: 700;
    font-size: clamp(14px, 1.1vw, 18px);
    color: #3E2723;
}

.wb-exam-choice__btn-desc {
    font-size: clamp(11px, 0.8vw, 13px);
    color: #8d7b6e;
    line-height: 1.4;
}

.wb-exam-choice__note {
    font-size: clamp(11px, 0.75vw, 12px);
    color: #a89f97;
    font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════════════
 * Consent / Instructions Screen
 * ═══════════════════════════════════════════════════════════════════════════ */

.wb-exam-consent {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FAF8F2;
    z-index: 9999;
    padding: clamp(16px, 2vw, 32px);
    overflow-y: auto;
}

.wb-exam-consent__card {
    max-width: clamp(480px, 42vw, 640px);
    width: 100%;
    background: var(--color-white, #fff);
    border-radius: clamp(12px, 1vw, 18px);
    box-shadow:
        0 clamp(4px, 0.5vw, 8px) clamp(16px, 1.5vw, 24px) rgba(0, 0, 0, 0.06),
        0 clamp(1px, 0.1vw, 2px) clamp(3px, 0.3vw, 4px) rgba(0, 0, 0, 0.04);
    padding: clamp(28px, 2.5vw, 44px);
    margin: auto;
}

/* Header */
.wb-exam-consent__header {
    text-align: center;
    margin-bottom: clamp(20px, 1.8vw, 30px);
}

.wb-exam-consent__badge {
    margin-bottom: clamp(10px, 0.8vw, 14px);
}

.wb-exam-consent__title {
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(22px, 1.8vw, 32px);
    font-weight: 700;
    color: var(--color-heading, #3C2A14);
    margin: 0 0 clamp(6px, 0.5vw, 10px);
}

.wb-exam-consent__subtitle {
    font-size: clamp(13px, 0.9vw, 15px);
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* Rules list */
.wb-exam-consent__rules {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 0.8vw, 14px);
    margin-bottom: clamp(20px, 1.8vw, 28px);
}

.wb-consent-rule {
    display: flex;
    gap: clamp(12px, 1vw, 16px);
    padding: clamp(12px, 1vw, 18px);
    background: #faf8f2;
    border-radius: clamp(8px, 0.6vw, 10px);
    border: 1px solid #f0ede6;
    transition: border-color 0.25s ease;
}

.wb-consent-rule:hover {
    border-color: #d4c5a0;
}

.wb-consent-rule__icon {
    flex-shrink: 0;
    width: clamp(36px, 2.8vw, 44px);
    height: clamp(36px, 2.8vw, 44px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-white, #fff);
    border-radius: clamp(6px, 0.5vw, 8px);
    border: 1px solid #e5e2db;
    color: var(--color-gold, #D4AF37);
}

.wb-consent-rule__body {
    flex: 1;
    min-width: 0;
}

.wb-consent-rule__title {
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(13px, 0.9vw, 15px);
    font-weight: 700;
    color: var(--color-heading, #3C2A14);
    margin: 0 0 clamp(2px, 0.2vw, 4px);
}

.wb-consent-rule__desc {
    font-size: clamp(12px, 0.8vw, 14px);
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
}

.wb-consent-rule__desc strong {
    color: var(--color-heading, #3C2A14);
    font-weight: 600;
}

/* Agreement checkbox */
.wb-exam-consent__agreement {
    padding: clamp(14px, 1.2vw, 20px);
    background: #faf6ea;
    border: 1px solid #ebe3ca;
    border-radius: clamp(8px, 0.6vw, 10px);
    margin-bottom: clamp(20px, 1.8vw, 28px);
}

.wb-exam-consent__check {
    display: flex;
    align-items: flex-start;
    gap: clamp(10px, 0.8vw, 14px);
    cursor: pointer;
    user-select: none;
}

.wb-exam-consent__check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.wb-consent-check__box {
    flex-shrink: 0;
    width: clamp(20px, 1.5vw, 24px);
    height: clamp(20px, 1.5vw, 24px);
    border: 2px solid #c4b998;
    border-radius: clamp(4px, 0.3vw, 5px);
    position: relative;
    transition: all 0.25s ease;
    margin-top: clamp(1px, 0.1vw, 2px);
}

.wb-exam-consent__check input:checked ~ .wb-consent-check__box {
    background: var(--color-gold, #D4AF37);
    border-color: var(--color-gold, #D4AF37);
}

.wb-exam-consent__check input:checked ~ .wb-consent-check__box::after {
    content: '';
    position: absolute;
    top: 45%;
    left: 50%;
    width: clamp(5px, 0.4vw, 7px);
    height: clamp(10px, 0.7vw, 12px);
    border: 2px solid var(--color-white, #fff);
    border-top: none;
    border-left: none;
    transform: translate(-50%, -60%) rotate(45deg);
}

.wb-consent-check__text {
    font-size: clamp(13px, 0.9vw, 15px);
    color: var(--color-heading, #3C2A14);
    font-weight: 500;
    line-height: 1.5;
}

/* Actions */
.wb-exam-consent__actions {
    display: flex;
    justify-content: space-between;
    gap: clamp(12px, 1vw, 16px);
}

.wb-exam-consent__start {
    display: inline-flex;
    align-items: center;
    gap: clamp(8px, 0.6vw, 10px);
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(14px, 1vw, 17px);
    font-weight: 700;
    padding: clamp(14px, 1.2vw, 20px) clamp(28px, 2.5vw, 40px);
    background: var(--color-cta-primary, #c2692d);
    color: var(--color-white, #fff);
    border: none;
    border-radius: clamp(8px, 0.6vw, 10px);
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}

.wb-exam-consent__start:hover:not(:disabled) {
    background: var(--color-cta-hover, #a85624);
    transform: translateY(clamp(-1px, -0.1vw, -2px));
    box-shadow: 0 clamp(4px, 0.4vw, 6px) clamp(12px, 1.2vw, 18px) rgba(194, 105, 45, 0.3);
}

.wb-exam-consent__start:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.wb-exam-consent__start svg {
    transition: transform 0.25s ease;
}

.wb-exam-consent__start:hover:not(:disabled) svg {
    transform: translateX(clamp(2px, 0.2vw, 4px));
}

/* Responsive */
@media (max-width: 600px) {
    .wb-exam-consent__card {
        padding: clamp(20px, 4vw, 28px);
    }

    .wb-exam-consent__actions {
        flex-direction: column-reverse;
    }

    .wb-exam-consent__start {
        width: 100%;
        justify-content: center;
    }
}

/* Demo badge variant */
.wb-exam-badge--demo {
    background: #dbeafe !important;
    color: #2563eb !important;
}

/* Responsive choice screen */
@media (max-width: 600px) {
    .wb-exam-choice__options {
        flex-direction: column;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
 * JS-Generated Class Aliases
 *
 * The exam-engine.js emits BEM-style classes (__  --). The rules below map
 * them to the canonical flat styles defined earlier in this file so that
 * every rendered element picks up proper styling.
 * ═══════════════════════════════════════════════════════════════════════════ */

/* ── Sidebar Stats (JS: .wb-exam-stats / .wb-exam-stat) ──────────────── */
.wb-exam-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(8px, 0.6vw, 12px);
}

.wb-exam-stat {
    background: var(--color-white, #fff);
    border: 1px solid #e5e2db;
    border-radius: clamp(6px, 0.45vw, 8px);
    padding: clamp(10px, 0.8vw, 14px);
    text-align: center;
}

.wb-exam-stat__val {
    display: block;
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(18px, 1.3vw, 24px);
    font-weight: 700;
    color: var(--color-heading, #3C2A14);
}

.wb-exam-stat__label {
    display: block;
    font-size: clamp(10px, 0.7vw, 12px);
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: clamp(2px, 0.2vw, 4px);
}

/* ── Legend Dot Aliases (JS uses -- for variants) ────────────────────── */
.wb-legend-dot--current {
    background: var(--color-heading, #3C2A14);
    border-color: var(--color-heading, #3C2A14);
}

.wb-legend-dot--answered {
    background: #f0fdf4;
    border-color: #86efac;
}

.wb-legend-dot--unanswered {
    background: #f3f0e8;
    border-color: #d1cdc3;
}

/* ── Submit Confirmation Modal ───────────────────────────────────────── */
.wb-exam-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    backdrop-filter: blur(4px);
}

.wb-exam-overlay--loading {
    background: rgba(250, 248, 242, 0.95);
}

.wb-exam-modal {
    background: var(--color-white, #fff);
    border-radius: clamp(10px, 0.8vw, 16px);
    padding: clamp(24px, 2vw, 40px);
    max-width: clamp(340px, 30vw, 440px);
    width: 90%;
    text-align: center;
    box-shadow: 0 clamp(10px, 1.5vw, 20px) clamp(40px, 4vw, 60px) rgba(0, 0, 0, 0.15);
}

.wb-exam-modal__title {
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(18px, 1.4vw, 24px);
    font-weight: 700;
    color: var(--color-heading, #3C2A14);
    margin: 0 0 clamp(16px, 1.2vw, 20px);
}

.wb-exam-modal__stats {
    display: flex;
    justify-content: center;
    gap: clamp(16px, 1.5vw, 28px);
    margin-bottom: clamp(16px, 1.2vw, 20px);
}

.wb-exam-modal__stat {
    text-align: center;
}

.wb-exam-modal__stat-val {
    display: block;
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(22px, 1.8vw, 32px);
    font-weight: 700;
    color: var(--color-heading, #3C2A14);
}

.wb-exam-modal__stat-label {
    display: block;
    font-size: clamp(10px, 0.7vw, 12px);
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: clamp(2px, 0.15vw, 4px);
}

.wb-exam-modal__warning {
    font-size: clamp(13px, 0.9vw, 15px);
    color: #dc2626;
    background: #fef2f2;
    padding: clamp(10px, 0.8vw, 14px);
    border-radius: clamp(6px, 0.45vw, 8px);
    margin: 0 0 clamp(16px, 1.2vw, 20px);
    line-height: 1.5;
}

.wb-exam-modal__info {
    font-size: clamp(13px, 0.9vw, 15px);
    color: #16a34a;
    background: #f0fdf4;
    padding: clamp(10px, 0.8vw, 14px);
    border-radius: clamp(6px, 0.45vw, 8px);
    margin: 0 0 clamp(16px, 1.2vw, 20px);
    line-height: 1.5;
}

.wb-exam-modal__actions {
    display: flex;
    gap: clamp(8px, 0.6vw, 12px);
    justify-content: center;
}

.wb-exam-modal__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(13px, 0.85vw, 15px);
    font-weight: 600;
    padding: clamp(10px, 0.8vw, 14px) clamp(20px, 1.6vw, 28px);
    border-radius: clamp(6px, 0.45vw, 8px);
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
}

.wb-exam-modal__btn--cancel {
    background: #f3f0e8;
    color: var(--color-heading, #3C2A14);
}

.wb-exam-modal__btn--cancel:hover {
    background: #e8e2d4;
}

.wb-exam-modal__btn--submit {
    background: var(--color-cta-primary, #c2692d);
    color: var(--color-white, #fff);
}

.wb-exam-modal__btn--submit:hover {
    background: var(--color-cta-hover, #a85624);
}

/* ── Results Page ────────────────────────────────────────────────────── */
.wb-exam-results__header {
    margin-bottom: clamp(20px, 1.8vw, 30px);
}

.wb-exam-results__icon {
    margin-bottom: clamp(12px, 1vw, 16px);
}

.wb-exam-results__circle {
    position: relative;
    display: inline-block;
    margin: clamp(8px, 0.8vw, 16px) auto;
}

.wb-exam-results__svg {
    width: clamp(100px, 10vw, 140px);
    height: clamp(100px, 10vw, 140px);
}

.wb-exam-results__percent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(28px, 2.2vw, 40px);
    font-weight: 700;
}

.wb-exam-results__status {
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(20px, 1.8vw, 32px);
    font-weight: 700;
    margin: clamp(8px, 0.6vw, 12px) 0;
}

.wb-exam-results__status--pass { color: #16a34a; }
.wb-exam-results__status--fail { color: #dc2626; }

.wb-exam-results__subtext {
    font-size: clamp(14px, 1vw, 16px);
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

.wb-exam-results__stats {
    display: flex;
    justify-content: center;
    gap: clamp(20px, 2vw, 40px);
    margin: clamp(16px, 1.5vw, 24px) 0;
    flex-wrap: wrap;
}

.wb-exam-results__stat {
    text-align: center;
}

.wb-exam-results__stat-label {
    display: block;
    font-size: clamp(11px, 0.75vw, 13px);
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: clamp(2px, 0.2vw, 4px);
}

.wb-exam-results__stat strong {
    display: block;
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(18px, 1.4vw, 24px);
    font-weight: 700;
    color: var(--color-heading, #3C2A14);
}

.wb-exam-results__actions {
    display: flex;
    justify-content: center;
    gap: clamp(10px, 0.8vw, 14px);
    margin-top: clamp(20px, 1.8vw, 28px);
    flex-wrap: wrap;
}

.wb-exam-results__certificate {
    margin: clamp(16px, 1.2vw, 20px) 0;
}

/* ── Answer Review ───────────────────────────────────────────────────── */
.wb-exam-results__review {
    margin-top: clamp(24px, 2vw, 36px);
    text-align: left;
}

.wb-exam-results__review-title {
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(16px, 1.2vw, 22px);
    font-weight: 700;
    color: var(--color-heading, #3C2A14);
    margin: 0 0 clamp(14px, 1.2vw, 20px);
    padding-bottom: clamp(8px, 0.6vw, 12px);
    border-bottom: 2px solid #e5e2db;
}

.wb-exam-review__item {
    background: var(--color-white, #fff);
    border: 1px solid #e5e2db;
    border-radius: clamp(8px, 0.6vw, 12px);
    padding: clamp(16px, 1.2vw, 22px);
    margin-bottom: clamp(12px, 1vw, 16px);
    border-left: 4px solid #e5e2db;
}

.wb-exam-review__item--correct {
    border-left-color: #16a34a;
    background: #fafff5;
}

.wb-exam-review__item--incorrect {
    border-left-color: #dc2626;
    background: #fffafa;
}

.wb-exam-review__header {
    display: flex;
    align-items: center;
    gap: clamp(8px, 0.6vw, 12px);
    margin-bottom: clamp(8px, 0.6vw, 12px);
}

.wb-exam-review__num {
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(13px, 0.9vw, 15px);
    font-weight: 700;
    color: var(--color-heading, #3C2A14);
}

.wb-exam-review__icon {
    display: flex;
    align-items: center;
}

.wb-exam-review__points {
    font-size: clamp(12px, 0.8vw, 14px);
    color: #6b7280;
    margin-left: auto;
}

.wb-exam-review__question {
    font-size: clamp(14px, 1vw, 17px);
    font-weight: 500;
    color: var(--color-heading, #3C2A14);
    line-height: 1.6;
    margin: 0 0 clamp(10px, 0.8vw, 14px);
}

.wb-exam-review__answers {
    font-size: clamp(13px, 0.9vw, 15px);
    color: var(--color-text, #4A3728);
    margin-bottom: clamp(4px, 0.3vw, 6px);
}

.wb-exam-review__label {
    color: #6b7280;
}

.wb-exam-review__value {
    font-weight: 600;
}

.wb-exam-review__explanation {
    font-size: clamp(13px, 0.9vw, 15px);
    color: #6b7280;
    font-style: italic;
    line-height: 1.6;
    margin-top: clamp(8px, 0.6vw, 12px);
    padding-top: clamp(8px, 0.6vw, 12px);
    border-top: 1px solid #f0ede6;
}

/* ── Result Action Buttons ───────────────────────────────────────────── */
.wb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: clamp(6px, 0.4vw, 8px);
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(13px, 0.85vw, 15px);
    font-weight: 600;
    padding: clamp(10px, 0.8vw, 14px) clamp(20px, 1.6vw, 28px);
    border-radius: clamp(6px, 0.45vw, 8px);
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    background: var(--color-heading, #3C2A14);
    color: var(--color-white, #fff);
}

.wb-btn:hover {
    background: #2a1d0e;
    color: var(--color-white, #fff);
}

.wb-btn--primary {
    background: var(--color-cta-primary, #c2692d);
    color: var(--color-white, #fff);
}

.wb-btn--primary:hover {
    background: var(--color-cta-hover, #a85624);
}

.wb-btn--secondary {
    background: #f3f0e8;
    color: var(--color-heading, #3C2A14);
}

.wb-btn--secondary:hover {
    background: #e8e2d4;
}

/* ── Warning / Alert Bar ─────────────────────────────────────────────── */
.wb-exam-warning {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 0.8vw, 14px);
    padding: clamp(10px, 0.8vw, 14px) clamp(16px, 1.2vw, 20px);
    border-radius: clamp(6px, 0.45vw, 8px);
    font-size: clamp(13px, 0.9vw, 15px);
    margin-bottom: clamp(12px, 1vw, 16px);
    text-align: center;
    position: fixed;
    top: clamp(12px, 1.2vw, 20px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 100000;
    min-width: clamp(280px, 30vw, 500px);
    max-width: 90vw;
    box-shadow: 0 clamp(4px, 0.4vw, 8px) clamp(16px, 1.5vw, 24px) rgba(0, 0, 0, 0.12);
}

.wb-exam-warning__text {
    flex: 1;
}

.wb-exam-warning__close {
    flex-shrink: 0;
    width: clamp(24px, 1.8vw, 30px);
    height: clamp(24px, 1.8vw, 30px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.08);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: clamp(16px, 1.2vw, 20px);
    line-height: 1;
    color: inherit;
    transition: background 0.2s ease;
}

.wb-exam-warning__close:hover {
    background: rgba(0, 0, 0, 0.15);
}

.wb-exam-warning--danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.wb-exam-warning--warning {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

.wb-exam-warning--info {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

/* ── Responsive Additions ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .wb-exam-modal__actions {
        flex-direction: column;
    }

    .wb-exam-results__actions {
        flex-direction: column;
    }

    .wb-exam-results__stats {
        gap: clamp(12px, 1.5vw, 16px);
    }

    .wb-exam-stats {
        grid-template-columns: 1fr 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
 * Consent / Instructions Page (server-rendered template)
 * ═══════════════════════════════════════════════════════════════════════════ */

.wb-consent-page {
    width: 100%;
    max-width: clamp(520px, 44vw, 680px);
    margin: 0 auto;
}

.wb-consent-card {
    background: var(--color-white, #fff);
    border-radius: clamp(12px, 1vw, 18px);
    box-shadow:
        0 clamp(4px, 0.5vw, 8px) clamp(20px, 2vw, 32px) rgba(0, 0, 0, 0.07),
        0 clamp(1px, 0.1vw, 2px) clamp(3px, 0.3vw, 4px) rgba(0, 0, 0, 0.04);
    padding: clamp(28px, 2.5vw, 44px);
}

/* Header */
.wb-consent-header {
    text-align: center;
    margin-bottom: clamp(20px, 1.8vw, 30px);
}

.wb-consent-title {
    font-family: var(--font-heading, 'Lora', serif);
    font-size: clamp(22px, 1.8vw, 32px);
    font-weight: 700;
    color: var(--color-heading, #3C2A14);
    margin: clamp(10px, 0.8vw, 14px) 0 clamp(6px, 0.5vw, 10px);
}

.wb-consent-subtitle {
    font-size: clamp(13px, 0.9vw, 15px);
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* Overview stats */
.wb-consent-overview {
    display: flex;
    justify-content: center;
    gap: clamp(8px, 0.8vw, 14px);
    margin-bottom: clamp(22px, 2vw, 32px);
}

.wb-consent-stat {
    flex: 1;
    text-align: center;
    background: var(--color-bg-subtle, #faf8f2);
    border: 1px solid var(--color-border, #e5e2db);
    border-radius: clamp(8px, 0.6vw, 10px);
    padding: clamp(12px, 1vw, 18px) clamp(8px, 0.6vw, 12px);
}

.wb-consent-stat__val {
    display: block;
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(20px, 1.6vw, 28px);
    font-weight: 700;
    color: var(--color-heading, #3C2A14);
}

.wb-consent-stat__label {
    display: block;
    font-size: clamp(10px, 0.7vw, 12px);
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: clamp(2px, 0.2vw, 4px);
}

/* Rules */
.wb-consent-rules {
    margin-bottom: clamp(22px, 2vw, 30px);
}

.wb-consent-rules__heading {
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(14px, 1vw, 17px);
    font-weight: 700;
    color: var(--color-heading, #3C2A14);
    margin: 0 0 clamp(12px, 1vw, 16px);
    padding-bottom: clamp(8px, 0.6vw, 10px);
    border-bottom: 2px solid var(--color-border, #e5e2db);
}

.wb-consent-rule {
    display: flex;
    gap: clamp(12px, 1vw, 16px);
    padding: clamp(12px, 1vw, 16px);
    background: var(--color-bg-subtle, #faf8f2);
    border-radius: clamp(8px, 0.6vw, 10px);
    border: 1px solid #f0ede6;
    margin-bottom: clamp(8px, 0.6vw, 10px);
    transition: border-color 0.25s ease;
}

.wb-consent-rule:hover {
    border-color: #d4c5a0;
}

.wb-consent-rule--warning {
    background: #fef7ed;
    border-color: #fde0b0;
}

.wb-consent-rule--warning .wb-consent-rule__icon {
    color: var(--color-cta-primary, #c2692d);
    border-color: #fde0b0;
}

.wb-consent-rule__icon {
    flex-shrink: 0;
    width: clamp(38px, 3vw, 46px);
    height: clamp(38px, 3vw, 46px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-white, #fff);
    border-radius: clamp(6px, 0.5vw, 8px);
    border: 1px solid var(--color-border, #e5e2db);
    color: var(--color-gold, #D4AF37);
}

.wb-consent-rule__body {
    flex: 1;
    min-width: 0;
}

.wb-consent-rule__title {
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(13px, 0.9vw, 15px);
    font-weight: 700;
    color: var(--color-heading, #3C2A14);
    margin: 0 0 clamp(2px, 0.2vw, 4px);
}

.wb-consent-rule__desc {
    font-size: clamp(12px, 0.82vw, 14px);
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
}

.wb-consent-rule__desc strong {
    color: var(--color-heading, #3C2A14);
    font-weight: 600;
}

/* Agreement checkbox */
.wb-consent-agreement {
    padding: clamp(14px, 1.2vw, 20px);
    background: #faf6ea;
    border: 1px solid #ebe3ca;
    border-radius: clamp(8px, 0.6vw, 10px);
    margin-bottom: clamp(22px, 2vw, 28px);
}

.wb-consent-check {
    display: flex;
    align-items: flex-start;
    gap: clamp(10px, 0.8vw, 14px);
    cursor: pointer;
    user-select: none;
}

.wb-consent-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.wb-consent-check__box {
    flex-shrink: 0;
    width: clamp(20px, 1.5vw, 24px);
    height: clamp(20px, 1.5vw, 24px);
    border: 2px solid #c4b998;
    border-radius: clamp(4px, 0.3vw, 5px);
    position: relative;
    transition: all 0.25s ease;
    margin-top: clamp(1px, 0.1vw, 2px);
}

.wb-consent-check input:checked ~ .wb-consent-check__box {
    background: var(--color-gold, #D4AF37);
    border-color: var(--color-gold, #D4AF37);
}

.wb-consent-check input:checked ~ .wb-consent-check__box::after {
    content: '';
    position: absolute;
    top: 45%;
    left: 50%;
    width: clamp(5px, 0.4vw, 7px);
    height: clamp(10px, 0.7vw, 12px);
    border: 2px solid var(--color-white, #fff);
    border-top: none;
    border-left: none;
    transform: translate(-50%, -60%) rotate(45deg);
}

.wb-consent-check__text {
    font-size: clamp(13px, 0.9vw, 15px);
    color: var(--color-heading, #3C2A14);
    font-weight: 500;
    line-height: 1.5;
}

/* Actions */
.wb-consent-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: clamp(12px, 1vw, 16px);
}

.wb-consent-back {
    display: inline-flex;
    align-items: center;
    gap: clamp(4px, 0.3vw, 6px);
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(13px, 0.85vw, 15px);
    font-weight: 600;
    padding: clamp(10px, 0.8vw, 14px) clamp(18px, 1.4vw, 24px);
    background: #f3f0e8;
    color: var(--color-heading, #3C2A14);
    border: none;
    border-radius: clamp(6px, 0.45vw, 8px);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.25s ease;
}

.wb-consent-back:hover {
    background: #e8e2d4;
    color: var(--color-heading, #3C2A14);
}

.wb-consent-start {
    display: inline-flex;
    align-items: center;
    gap: clamp(8px, 0.6vw, 10px);
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(14px, 1vw, 17px);
    font-weight: 700;
    padding: clamp(14px, 1.2vw, 20px) clamp(28px, 2.5vw, 40px);
    background: var(--color-cta-primary, #c2692d);
    color: var(--color-white, #fff);
    border: none;
    border-radius: clamp(8px, 0.6vw, 10px);
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}

.wb-consent-start:hover:not(:disabled) {
    background: var(--color-cta-hover, #a85624);
    transform: translateY(clamp(-1px, -0.1vw, -2px));
    box-shadow: 0 clamp(4px, 0.4vw, 6px) clamp(12px, 1.2vw, 18px) rgba(194, 105, 45, 0.3);
}

.wb-consent-start:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.wb-consent-start svg {
    transition: transform 0.25s ease;
}

.wb-consent-start:hover:not(:disabled) svg {
    transform: translateX(clamp(2px, 0.2vw, 4px));
}

/* Responsive */
@media (max-width: 600px) {
    .wb-consent-overview {
        flex-wrap: wrap;
    }

    .wb-consent-stat {
        min-width: 40%;
    }

    .wb-consent-actions {
        flex-direction: column-reverse;
    }

    .wb-consent-start {
        width: 100%;
        justify-content: center;
    }

    .wb-consent-back {
        width: 100%;
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
 * Profile Collection Popup
 * ═══════════════════════════════════════════════════════════════════════════ */
.wb-profile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    backdrop-filter: blur(4px);
    padding: clamp(16px, 2vw, 32px);
}

.wb-profile-modal {
    background: #fff;
    border-radius: clamp(10px, 0.8vw, 16px);
    padding: clamp(24px, 2vw, 40px);
    max-width: clamp(420px, 36vw, 520px);
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 clamp(10px, 1.5vw, 20px) clamp(40px, 4vw, 60px) rgba(0, 0, 0, 0.15);
}

.wb-profile-modal__title {
    font-family: var(--font-heading, 'Lora', serif);
    font-size: clamp(20px, 1.6vw, 28px);
    font-weight: 700;
    color: #3C2A14;
    margin: 0 0 clamp(6px, 0.4vw, 8px);
}

.wb-profile-modal__desc {
    font-size: clamp(13px, 0.9vw, 15px);
    color: #6b7280;
    margin: 0 0 clamp(18px, 1.5vw, 24px);
    line-height: 1.5;
}

.wb-profile-field {
    margin-bottom: clamp(12px, 1vw, 16px);
}

.wb-profile-field label {
    display: block;
    font-size: clamp(12px, 0.85vw, 14px);
    font-weight: 600;
    color: #3C2A14;
    margin-bottom: clamp(3px, 0.2vw, 5px);
}

.wb-profile-field label .required {
    color: #dc2626;
}

.wb-profile-field input {
    width: 100%;
    padding: clamp(8px, 0.6vw, 12px);
    border: 1px solid #d1cdc3;
    border-radius: clamp(5px, 0.4vw, 7px);
    font-size: clamp(13px, 0.9vw, 15px);
    color: #3C2A14;
    transition: border-color 0.2s;
}

.wb-profile-field input:focus {
    outline: none;
    border-color: #D4AF37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.wb-profile-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(8px, 0.6vw, 12px);
}

.wb-profile-modal__error {
    color: #dc2626;
    background: #fef2f2;
    padding: clamp(8px, 0.6vw, 12px);
    border-radius: clamp(4px, 0.3vw, 6px);
    font-size: clamp(12px, 0.85vw, 14px);
    margin-bottom: clamp(12px, 1vw, 16px);
}

.wb-profile-modal__actions {
    display: flex;
    gap: clamp(8px, 0.6vw, 12px);
    justify-content: flex-end;
    margin-top: clamp(16px, 1.2vw, 20px);
}

.wb-profile-btn {
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: clamp(13px, 0.9vw, 15px);
    font-weight: 600;
    padding: clamp(10px, 0.8vw, 14px) clamp(20px, 1.6vw, 28px);
    border: none;
    border-radius: clamp(6px, 0.45vw, 8px);
    cursor: pointer;
    transition: all 0.2s;
}

.wb-profile-btn--cancel {
    background: #f3f0e8;
    color: #3C2A14;
}

.wb-profile-btn--cancel:hover {
    background: #e8e2d4;
}

.wb-profile-btn--submit {
    background: #c2692d;
    color: #fff;
}

.wb-profile-btn--submit:hover {
    background: #a85624;
}

.wb-profile-btn--submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
