/**
 * exam.css — Modern SaaS Redesign for Exam Interface
 * Matches Tailwind classes from the design specification.
 */

/* ── Question Number & Exam Flag ─────────────────────────────────────────── */
.ep-question-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

/* ── Student identity badge (watermark) ──────────────────────────────────── */
.ep-identity-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(116, 95, 168, 0.08);
    border: 0.5px solid rgba(116, 95, 168, 0.2);
    border-radius: 20px;
    padding: 3px 10px 3px 5px;
    flex-shrink: 0;
    user-select: none;
    -webkit-user-select: none;
}

.ep-identity-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #745fa8;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ep-identity-name {
    font-size: 11px;
    font-weight: 500;
    color: #745fa8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.ep-question-number {
    font-size: inherit;
    font-weight: 700;
    color: #7c3aed;
}

.ep-exam-flag {
    font-size: 1.25rem;
    font-weight: 700;
    color: #dc2626;
    background-color: #fee2e2;
    padding: 0.15rem 0.5rem;
    border-radius: 0.25rem;
    letter-spacing: 0.02em;
}

:root {
    --ep-purple: #745fa8;
    --ep-purple-light: rgba(116, 95, 168, 0.1);
    --ep-purple-hover: rgba(116, 95, 168, 0.3);
    --ep-green: #9cca3b;
    --ep-green-hover: #8ab834;
    --ep-slate-50: #f8fafc;
    --ep-slate-100: #f1f5f9;
    --ep-slate-200: #e2e8f0;
    --ep-slate-300: #cbd5e1;
    --ep-slate-400: #94a3b8;
    --ep-slate-500: #64748b;
    --ep-slate-600: #475569;
    --ep-slate-700: #334155;
    --ep-slate-800: #1e293b;
    --ep-slate-900: #0f172a;
    --ep-amber-50: #fffbeb;
    --ep-amber-100: #fef3c7;
    --ep-amber-200: #fde68a;
    --ep-amber-400: #fbbf24;
    --ep-amber-700: #b45309;
    --ep-red-500: #ef4444;

    --ep-radius: 0.5rem;
    --ep-radius-lg: 0.75rem;
    --ep-radius-xl: 1rem;
    --ep-radius-2xl: 1.5rem;
    --ep-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --ep-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --ep-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);

    --ep-font: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Base Wrapper */
.ep-exam-wrapper {
    font-family: var(--ep-font);
    color: var(--ep-slate-800);
    max-width: 80rem;
    /* max-w-7xl */
    margin: 0 auto;
    padding: 2rem 1rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    background: var(--ep-slate-50);
    min-height: 100vh;
}

.ep-exam-wrapper * {
    box-sizing: border-box;
}

.ep-hidden {
    display: none !important;
}

.ep-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Sections */
#ep-exam-container {
    animation: epFadeInUp 0.4s ease-out;
}

@keyframes epFadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header Start specific to Exam Engine */
.ep-exam-header {
    background: white;
    border-bottom: 1px solid var(--ep-slate-200);
    padding: 0 1rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--ep-shadow-sm);
    position: sticky;
    top: 0;
    /* sticky top-0 */
    z-index: 10;
    margin: -2rem -1rem 0 -1rem;
    /* counteract wrapper padding for full bleed */
    max-width: none;
}

@media (min-width: 640px) {
    .ep-exam-header {
        padding: 0 1.5rem;
        margin: -2rem -2rem 0 -2rem;
    }
}

@media (min-width: 1024px) {
    .ep-exam-header {
        padding: 0 2rem;
    }
}

.ep-exam-header__left {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 80rem;
}

.ep-exam-badge {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 9999px;
    background: var(--ep-purple-light) !important;
    color: var(--ep-purple) !important;
}

.ep-exam-counter {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ep-slate-500);
}

.ep-exam-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ep-slate-700);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 1.125rem;
    font-weight: 700;
    background: var(--ep-slate-100);
    padding: 0.375rem 1rem;
    border-radius: var(--ep-radius-lg) !important;
    border: 1px solid var(--ep-slate-200);
}

.ep-timer-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--ep-purple);
}

.ep-exam-timer.is-warning {
    background: var(--ep-amber-100);
    color: var(--ep-amber-700);
    border-color: var(--ep-amber-200);
}

.ep-exam-timer.is-warning .ep-timer-icon {
    color: var(--ep-amber-700);
}

.ep-exam-timer.is-critical {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fecaca;
}

.ep-exam-timer.is-critical .ep-timer-icon {
    color: #ef4444;
}

/* Progress Bar */
.ep-exam-progress {
    height: 0.375rem;
    background: var(--ep-slate-100);
    width: 100%;
    margin-bottom: 2rem;
    margin-left: -1rem;
    margin-right: -1rem;
    width: calc(100% + 2rem);
}

@media (min-width: 640px) {
    .ep-exam-progress {
        margin-left: -2rem;
        width: calc(100% + 4rem);
    }
}

.ep-progress-bar {
    height: 100%;
    background: var(--ep-green);
    border-top-right-radius: 9999px;
    border-bottom-right-radius: 9999px;
    transition: width 0.5s ease-out;
}

/* Grid Layout */
.ep-exam-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 80rem;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .ep-exam-grid {
        flex-direction: row;
    }
}

.ep-exam-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 48rem;
    /* max-w-3xl */
}

/* Question Area */
.ep-question-box {
    background: white;
    border: 1px solid var(--ep-slate-200);
    border-radius: var(--ep-radius-2xl);
    padding: 2rem;
    box-shadow: var(--ep-shadow-sm);
    flex: 1;
}

@media (min-width: 640px) {
    .ep-question-box {
        padding: 2.5rem;
    }
}

.ep-question-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ep-slate-900);
    margin: 0 0 2rem;
    line-height: 1.25;
}

@media (min-width: 640px) {
    .ep-question-text {
        font-size: 1.875rem;
    }
}

.ep-options-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ep-option__btn {
    width: 100%;
    text-align: left;
    padding: 1rem 1.25rem !important;
    border: 2px solid var(--ep-slate-100) !important;
    border-radius: var(--ep-radius-xl) !important;
    background: white !important;
    font-family: inherit;
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: none !important;
}

.ep-option__btn:hover:not(.is-locked) {
    border-color: var(--ep-purple-hover);
    background: var(--ep-slate-50);
    box-shadow: var(--ep-shadow-sm);
}

.ep-option__btn:hover:not(.is-locked) .ep-option__label {
    background: var(--ep-purple-light);
    color: var(--ep-purple);
}

.ep-option__label {
    flex-shrink: 0;
    width: 2.5rem !important;
    height: 2.5rem !important;
    border-radius: var(--ep-radius-lg) !important;
    background: var(--ep-slate-100) !important;
    color: var(--ep-slate-500) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    transition: colors 0.2s;
}

.ep-option__text {
    font-size: 1.125rem !important;
    color: var(--ep-slate-700) !important;
    font-weight: 500 !important;
    text-transform: none !important;
}

.ep-option__check {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--ep-purple);
    margin-left: auto;
    flex-shrink: 0;
}

.ep-option__btn.is-selected {
    border-color: var(--ep-purple) !important;
    background: rgba(116, 95, 168, 0.05) !important;
    /* purple-50/50 approx */
    box-shadow: var(--ep-shadow-sm) !important;
}

.ep-option__btn.is-selected .ep-option__label {
    background: var(--ep-purple) !important;
    color: white !important;
    box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
    /* shadow-inner */
}

.ep-option__btn.is-selected .ep-option__text {
    color: var(--ep-purple) !important;
    font-weight: 600 !important;
}

/* Provide feedback state overrides */
.ep-option__btn.is-correct {
    border-color: var(--ep-green) !important;
    background: rgba(156, 202, 59, 0.05) !important;
}

.ep-option__btn.is-correct .ep-option__label {
    background: var(--ep-green) !important;
    color: white !important;
}

.ep-option__btn.is-correct .ep-option__text {
    color: var(--ep-green) !important;
}

.ep-option__btn.is-wrong {
    border-color: var(--ep-red-500) !important;
    background: #fef2f2 !important;
}

.ep-option__btn.is-wrong .ep-option__label {
    background: var(--ep-red-500) !important;
    color: white !important;
}

.ep-option__btn.is-wrong .ep-option__text {
    color: var(--ep-red-500) !important;
}

.ep-option__btn.is-locked {
    pointer-events: none;
    opacity: 0.9;
}

/* Feedback Panel */
.ep-feedback-panel {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: var(--ep-radius-lg);
}

.ep-feedback--correct {
    background: rgba(156, 202, 59, 0.1);
    color: #4d6819;
    border: 1px solid var(--ep-green);
}

.ep-feedback--incorrect {
    background: #fef2f2;
    color: var(--ep-red-500);
    border: 1px solid #fecaca;
}

.ep-feedback-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.ep-feedback-explanation {
    color: var(--ep-slate-700);
    font-size: 0.95rem;
    line-height: 1.5;
}

.ep-feedback--saved {
    background: var(--ep-slate-100);
    color: var(--ep-slate-600);
    border: 1px solid var(--ep-slate-200);
}

.ep-feedback--loading {
    background: var(--ep-slate-50);
    color: var(--ep-slate-500);
    border: 1px solid var(--ep-slate-200);
    opacity: 0.8;
}

/* Highlight the correct option in green when the student answered wrong */
.ep-option__btn.is-correct-answer {
    border-color: var(--ep-green) !important;
    background: rgba(156, 202, 59, 0.08) !important;
    animation: epCorrectPulse 0.4s ease-out;
}

.ep-option__btn.is-correct-answer .ep-option__label {
    background: var(--ep-green) !important;
    color: white !important;
}

.ep-option__btn.is-correct-answer .ep-option__text {
    color: #4d6819 !important;
    font-weight: 600 !important;
}

@keyframes epCorrectPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(156, 202, 59, 0.5);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(156, 202, 59, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(156, 202, 59, 0);
    }
}

/* Nav */
.ep-exam-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Buttons */
.ep-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    background: transparent;
    font-family: inherit;
    font-weight: 600;
    padding: 0.75rem 1.5rem !important;
    border-radius: var(--ep-radius-xl) !important;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem !important;
    text-transform: none !important;
}

.ep-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ep-btn--outline {
    background: white !important;
    border: 1px solid var(--ep-slate-200) !important;
    color: var(--ep-slate-600) !important;
    box-shadow: var(--ep-shadow-sm) !important;
}

.ep-btn--outline:hover:not(:disabled) {
    border-color: var(--ep-slate-300) !important;
    background: var(--ep-slate-50) !important;
}

.ep-btn--mark {
    background: white !important;
    border: 1px solid var(--ep-slate-200) !important;
    color: var(--ep-slate-600) !important;
    box-shadow: var(--ep-shadow-sm) !important;
}

.ep-btn--mark:hover:not(:disabled) {
    border-color: var(--ep-slate-300) !important;
    background: var(--ep-slate-50) !important;
}

.ep-btn--mark.is-marked {
    background: var(--ep-amber-50) !important;
    color: var(--ep-amber-700) !important;
    border-color: var(--ep-amber-200) !important;
}

.ep-btn--mark.is-marked:hover:not(:disabled) {
    background: var(--ep-amber-100) !important;
}

.ep-btn--mark.is-marked svg {
    fill: currentColor;
}

.ep-btn--dark {
    background: var(--ep-purple) !important;
    color: white !important;
    box-shadow: var(--ep-shadow-md) !important;
    padding: 0.75rem 2rem;
    transform: translateY(0);
}

.ep-btn--dark:hover:not(:disabled) {
    box-shadow: var(--ep-shadow-lg) !important;
    transform: translateY(-2px);
}

#ep-nav-next {
    margin-left: auto;
    /* push to right */
}

/* Sidebar Box */
.ep-exam-sidebar {
    width: 100%;
}

@media (min-width: 1024px) {
    .ep-exam-sidebar {
        width: 20rem;
        /* w-80 */
        flex-shrink: 0;
    }
}

.ep-sidebar-box {
    background: white;
    border: 1px solid var(--ep-slate-200);
    border-radius: var(--ep-radius-2xl);
    padding: 1.5rem;
    box-shadow: var(--ep-shadow-sm);
    position: sticky;
    top: 6rem;
    /* top-24 */
}

.ep-sidebar-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ep-slate-400);
    margin: 0 0 1.5rem;
}

.ep-question-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 0.5rem !important;
    margin-bottom: 2rem !important;
}

@media (min-width: 640px) {
    .ep-question-grid {
        gap: 0.75rem;
    }
}

.ep-nav-dot {
    position: relative;
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    min-height: 0 !important;
    max-height: none !important;
    box-sizing: border-box !important;
    border-radius: var(--ep-radius-lg) !important;
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--ep-slate-100);
    color: var(--ep-slate-500);
    border: 1px solid var(--ep-slate-200) !important;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    padding: 0 !important;
    margin: 0 !important;
    text-transform: none !important;
    overflow: hidden !important;
}

.ep-nav-dot:hover {
    background: var(--ep-slate-200);
}

.ep-question-grid .ep-nav-dot--active {
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--ep-purple);
}

.ep-question-grid .ep-nav-dot--answered {
    background: var(--ep-green) !important;
    color: white !important;
    border-color: var(--ep-green) !important;
    box-shadow: var(--ep-shadow-sm);
}

.ep-question-grid .ep-nav-dot--answered:hover {
    background: var(--ep-green-hover) !important;
}

/* Marked Indicator Dot inside Nav Dot */
.ep-nav-dot--marked::after {
    content: '';
    position: absolute;
    top: -0.375rem;
    right: -0.375rem;
    width: 0.875rem;
    height: 0.875rem;
    background: var(--ep-amber-400);
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: var(--ep-shadow-sm);
}

.ep-sidebar-legend {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--ep-slate-100);
}

.ep-legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ep-slate-600);
}

.ep-legend-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.375rem;
}

.ep-legend-dot--answered {
    background: var(--ep-green);
    box-shadow: var(--ep-shadow-sm);
}

.ep-legend-dot--answered::after {
    content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>');
    display: block;
    width: 12px;
    height: 12px;
}

.ep-legend-dot--unanswered {
    background: var(--ep-slate-100);
    border: 1px solid var(--ep-slate-200);
}

.ep-legend-dot--marked {
    background: var(--ep-amber-400);
    border: 2px solid white;
    box-shadow: var(--ep-shadow-sm);
    border-radius: 50%;
}

.ep-legend-dot--marked::after {
    content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 24 24" fill="white" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z"></path><line x1="4" y1="22" x2="4" y2="15"></line></svg>');
    display: block;
    width: 10px;
    height: 10px;
}

.ep-btn--primary.ep-btn--submit {
    width: 100%;
    margin-top: 2rem;
    padding: 0.875rem;
    background: var(--ep-green) !important;
    border-radius: var(--ep-radius-xl);
    box-shadow: var(--ep-shadow-md) !important;
    transform: translateY(0);
}

.ep-btn--primary.ep-btn--submit:hover:not(:disabled) {
    box-shadow: var(--ep-shadow-lg) !important;
    transform: translateY(-2px);
}

/* Results & Mode Select Inherit High End Feel */
.ep-mode-cards {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 1.5rem !important;
    margin-bottom: 4rem !important;
    width: 100% !important;
}

@media (max-width: 768px) {
    .ep-mode-cards {
        grid-template-columns: 1fr;
    }
}

.ep-mode-card__btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    width: 100% !important;
    text-transform: none !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    width: 100%;
    text-align: left;
    padding: 1.5rem;
    background: white;
    border: 2px solid var(--ep-slate-200);
    border-radius: var(--ep-radius-lg);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    font-family: inherit;
}

.ep-mode-card__bg-glow {
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(116, 95, 168, 0.04);
    border-bottom-left-radius: 100px;
    opacity: 0;
    transition: opacity 0.2s;
}

.ep-mode-card__btn:hover {
    border-color: var(--ep-slate-300);
    box-shadow: var(--ep-shadow-sm);
}

.ep-mode-card__btn.is-selected {
    border-color: var(--ep-purple);
    background: var(--ep-purple-light);
    box-shadow: 0 4px 6px -1px rgba(116, 95, 168, 0.1), 0 2px 4px -2px rgba(116, 95, 168, 0.1);
}

.ep-mode-card__btn.is-selected .ep-mode-card__bg-glow {
    opacity: 1;
}

.ep-mode-card__icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--ep-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    background: var(--ep-slate-100);
    color: var(--ep-slate-600);
    transition: all 0.2s;
    position: relative;
    z-index: 10;
}

.ep-mode-card__btn:hover .ep-mode-card__icon {
    background: var(--ep-purple-light);
    color: var(--ep-purple);
}

.ep-mode-card__btn.is-selected .ep-mode-card__icon {
    background: var(--ep-purple);
    color: white;
    box-shadow: 0 2px 4px rgba(116, 95, 168, 0.4);
}

.ep-mode-card__name {
    text-transform: none !important;
    letter-spacing: normal !important;
    text-align: left !important;
    width: 100% !important;
    display: block !important;
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--ep-slate-900);
    position: relative;
    z-index: 10;
}

.ep-mode-card__desc {
    text-transform: none !important;
    text-align: left !important;
    width: 100% !important;
    display: block !important;
    font-size: 0.875rem;
    color: var(--ep-slate-500);
    margin: 0;
    position: relative;
    z-index: 10;
}

.ep-config-panel {
    background: white;
    border: 1px solid var(--ep-slate-200);
    border-radius: var(--ep-radius-xl);
    padding: 2.5rem;
    box-shadow: var(--ep-shadow-sm);
}

.ep-config-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 2rem;
}

.ep-config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 768px) {
    .ep-config-grid {
        grid-template-columns: 1fr;
    }
}

.ep-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ep-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ep-slate-700);
}

.ep-select {
    width: 100%;
    appearance: none;
    background: rgba(250, 250, 250, 0.5);
    border: 1px solid var(--ep-slate-300);
    border-radius: var(--ep-radius);
    padding: 0.875rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    color: var(--ep-slate-800);
    box-shadow: var(--ep-shadow-sm);
    transition: all 0.2s;
}

.ep-select:focus {
    outline: none;
    border-color: var(--ep-purple);
    box-shadow: 0 0 0 1px var(--ep-purple);
}

.ep-select-wrapper {
    position: relative;
}

.ep-select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--ep-slate-500);
}

.ep-config-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 2rem;
    border-top: 1px solid var(--ep-slate-100);
}

.ep-btn--primary:not(.ep-btn--submit) {
    background: var(--ep-purple) !important;
    color: white !important;
}

.ep-btn--primary:not(.ep-btn--submit):hover:not(:disabled) {
    background: #5a4b87 !important;
}

/* Resume Modal */
.ep-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.ep-modal__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
}

.ep-modal__box {
    background: white;
    border-radius: var(--ep-radius-xl);
    padding: 2.5rem;
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 28rem;
    box-shadow: var(--ep-shadow-lg);
    text-align: center;
}

.ep-modal__icon {
    width: 4rem;
    height: 4rem;
    background: var(--ep-indigo-50);
    color: var(--ep-indigo-600);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.ep-modal__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ep-slate-900);
    margin: 0 0 0.5rem;
}

.ep-modal__body {
    color: var(--ep-slate-500);
    margin: 0 0 2rem;
    line-height: 1.5;
}

.ep-modal__actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.ep-modal__actions .ep-btn {
    text-align: center !important;
    justify-content: center !important;
    align-items: center !important;
    display: flex !important;
    width: 100%;
}

@media (min-width: 640px) {
    .ep-modal__actions {
        flex-direction: row;
        justify-content: center;
    }

    .ep-modal__actions .ep-btn {
        width: 100%;
    }
}

.ep-results-box {
    background: white;
    border: 1px solid var(--ep-slate-200);
    border-radius: var(--ep-radius-xl);
    padding: 3rem;
    text-align: center;
    box-shadow: var(--ep-shadow-sm);
    position: relative;
    overflow: hidden;
}

.ep-results-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: var(--ep-green);
}

.ep-results-icon {
    width: 6rem;
    height: 6rem;
    background: rgba(156, 202, 59, 0.1);
    color: var(--ep-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    box-shadow: 0 0 0 8px rgba(156, 202, 59, 0.05);
}

.ep-results-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0 0 1rem;
    color: var(--ep-slate-900);
}

/* =======================================================
   RESULTS PAGE REDESIGN
   Matches React frontend layout and styling
======================================================== */

.ep-results-score-card__wrapper {
    background: white;
    border-radius: var(--ep-radius-2xl);
    box-shadow: var(--ep-shadow-sm);
    border: 1px solid var(--ep-slate-100);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .ep-results-score-card__wrapper {
        flex-direction: row;
        align-items: center;
        padding: 2.5rem;
    }
}

.ep-results-score-card__decor-1 {
    position: absolute;
    top: -6rem;
    right: -6rem;
    width: 16rem;
    height: 16rem;
    background: var(--ep-purple-light);
    border-radius: 50%;
    filter: blur(3rem);
    pointer-events: none;
}

.ep-results-score-card__decor-2 {
    position: absolute;
    bottom: -6rem;
    left: -6rem;
    width: 16rem;
    height: 16rem;
    background: rgba(156, 202, 59, 0.1);
    border-radius: 50%;
    filter: blur(3rem);
    pointer-events: none;
}

.ep-results-score-card__left {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    text-align: center;
}

@media (min-width: 768px) {
    .ep-results-score-card__left {
        text-align: left;
    }
}

.ep-results-score-card__badge-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .ep-results-score-card__badge-wrap {
        justify-content: flex-start;
    }
}

.ep-results-score-card__badge-label {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: var(--ep-purple-light);
    color: var(--ep-purple);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.ep-results-score-card__pass-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ep-results-score-card__pass-badge.ep-badge--pass {
    background: rgba(156, 202, 59, 0.15);
    color: #4d6819;
}

.ep-results-score-card__pass-badge.ep-badge--fail {
    background: #fee2e2;
    color: #dc2626;
}

.ep-results-score-card__title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--ep-slate-900);
    letter-spacing: -0.025em;
    margin: 0;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .ep-results-score-card__title {
        font-size: 3rem;
    }
}

.ep-results-score-card__time {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--ep-slate-500);
    font-weight: 500;
}

@media (min-width: 768px) {
    .ep-results-score-card__time {
        justify-content: flex-start;
    }
}

.ep-results-time-icon {
    color: var(--ep-purple);
}

.ep-results-score-card__right {
    position: relative;
    z-index: 10;
    background: var(--ep-slate-50);
    padding: 1.5rem;
    border-radius: var(--ep-radius-2xl);
    border: 1px solid var(--ep-slate-100);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.02);
    justify-content: center;
    width: auto;
}

.ep-results-score-card__right-text {
    text-align: right;
}

.ep-results-score-card__your-score {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--ep-slate-500);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 0.25rem 0;
}

.ep-results-score-card__percent {
    font-size: 3rem;
    font-weight: 900;
    color: var(--ep-purple);
    letter-spacing: -0.05em;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.ep-results-score-card__fraction {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ep-slate-500);
    background: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid var(--ep-slate-200);
    display: inline-block;
    white-space: nowrap;
}

.ep-results-score-card__circle-wrap {
    width: 7rem;
    height: 7rem;
    flex-shrink: 0;
    transform: rotate(-90deg);
    position: relative;
}

.ep-results-score-card__circle-svg {
    width: 100%;
    height: 100%;
}

.ep-results-score-card__circle-bg {
    color: var(--ep-slate-200);
}

.ep-results-score-card__circle-fg {
    color: var(--ep-purple);
    transition: stroke-dasharray 1.5s ease-out;
}

.ep-results-table-section {
    background: white;
    border-radius: var(--ep-radius-2xl);
    border: 1px solid var(--ep-slate-100);
    box-shadow: var(--ep-shadow-sm);
    overflow: hidden;
    margin-bottom: 2rem;
    width: 100%;
}

.ep-results-table-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--ep-slate-100);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(248, 250, 252, 0.5);
}

.ep-results-table-icon-wrap {
    padding: 0.5rem;
    background: var(--ep-purple-light);
    border-radius: var(--ep-radius-lg);
}

.ep-results-table-icon {
    color: var(--ep-purple);
    width: 1.5rem;
    height: 1.5rem;
}

.ep-results-table-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ep-slate-900);
    margin: 0;
    text-transform: none !important;
}

.ep-results-table-wrapper {
    overflow-x: auto;
    width: 100%;
}

.ep-results-table-wrapper table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
    margin: 0;
    border: none;
}

.ep-results-table-wrapper th {
    padding: 1.25rem 2rem;
    font-weight: 600;
    color: var(--ep-slate-400);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid var(--ep-slate-100);
    background: white;
}

.ep-results-tr {
    transition: background-color 0.2s;
    border-bottom: 1px solid var(--ep-slate-50);
}

.ep-results-tr:hover {
    background: rgba(248, 250, 252, 0.8);
}

.ep-results-td {
    padding: 1.5rem 2rem;
    color: var(--ep-slate-600);
    font-weight: 500;
    font-size: 1rem;
    border: none !important;
}

.ep-results-td strong {
    color: var(--ep-slate-900);
}

.ep-rt-score-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
}

.ep-rt-score-pill--low {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fee2e2;
}

.ep-rt-score-pill--good {
    background: var(--ep-slate-100);
    color: var(--ep-slate-700);
    border: 1px solid var(--ep-slate-200);
}

.ep-results-review-section {
    margin-bottom: 3rem;
}

.ep-results-review-header {
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

.ep-results-review-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ep-slate-900);
    margin: 0 0 0.5rem 0;
    text-transform: none !important;
}

.ep-results-review-subtitle {
    color: var(--ep-slate-500);
    margin: 0;
}

.ep-results-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ep-rt-accordion-item {
    border: 1px solid var(--ep-slate-200);
    border-radius: var(--ep-radius-xl);
    background: white;
    overflow: hidden;
    transition: all 0.3s;
}

.ep-rt-accordion-item:hover {
    border-color: var(--ep-slate-300);
}

.ep-rt-accordion-item[open] {
    border-color: var(--ep-purple) !important;
    box-shadow: var(--ep-shadow-md);
}

.ep-rt-accordion-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    cursor: pointer;
    list-style: none;
}

.ep-rt-accordion-summary::-webkit-details-marker {
    display: none;
}

.ep-rt-accordion-summary:focus {
    outline: none;
}

.ep-rt-accordion-summary-left {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1;
    padding-right: 2rem;
}

.ep-rt-accordion-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
}

.ep-rt-accordion-item.is-correct .ep-rt-accordion-num {
    background: rgba(156, 202, 59, 0.2) !important;
    color: #4d6819 !important;
}

.ep-rt-accordion-item.is-incorrect .ep-rt-accordion-num {
    background: #fee2e2 !important;
    color: #dc2626 !important;
}

.ep-rt-accordion-q {
    font-weight: 500;
    color: var(--ep-slate-900);
    line-height: 1.5;
    padding-top: 0.125rem;
}

.ep-rt-accordion-summary-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.ep-rt-icon-correct {
    color: var(--ep-green);
}

.ep-rt-icon-wrong {
    color: #ef4444;
}

.ep-rt-accordion-chevron {
    color: var(--ep-slate-400);
    transition: transform 0.3s;
    display: flex;
    align-items: center;
}

.ep-rt-accordion-item[open] .ep-rt-accordion-chevron {
    transform: rotate(180deg);
}

.ep-rt-accordion-body-wrap {
    animation: accordion-slide-down 0.3s ease-out;
}

@keyframes accordion-slide-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ep-rt-accordion-body {
    padding: 1.25rem;
    padding-top: 0;
    border-top: 1px solid var(--ep-slate-100);
}

.ep-rt-answers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .ep-rt-answers-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.ep-rt-answer-box {
    padding: 1rem;
    border-radius: var(--ep-radius-xl);
    border: 1px solid;
}

.rt-answer-user {
    background: var(--ep-slate-50);
    border-color: var(--ep-slate-100);
}

.rt-answer-correct {
    background: rgba(156, 202, 59, 0.1);
    border-color: rgba(156, 202, 59, 0.2);
}

.ep-rt-answer-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.rt-answer-user .ep-rt-answer-header {
    color: var(--ep-slate-500);
}

.rt-answer-correct .ep-rt-answer-header {
    color: #4d6819;
}

.ep-rt-answer-text {
    color: var(--ep-slate-900);
    font-weight: 500;
    font-size: 0.95rem;
}

.ep-rt-expl-box {
    margin-top: 1rem;
    padding: 1.25rem;
    background: rgba(116, 95, 168, 0.05);
    border: 1px solid rgba(116, 95, 168, 0.1);
    border-radius: var(--ep-radius-xl);
}

.ep-rt-expl-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--ep-purple);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ep-rt-expl-text {
    color: var(--ep-slate-800);
    line-height: 1.5;
    font-size: 0.95rem;
}

.ep-results__actions--final {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    padding-top: 2rem;
    padding-bottom: 3rem;
    margin-top: 1rem;
}

@media (min-width: 640px) {
    .ep-results__actions--final {
        flex-direction: row;
    }
}

/* =========================================================================
   Redesign CSS overrides (App.tsx derived) 
   ========================================================================= */

body.page-template-default .ep-exam-wrapper {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fcfcfc !important;
}

.ep-exam-wrapper {
    background: #fcfcfc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Mode Select Redesign */
#ep-mode-select {
    max-width: 72rem;
    margin: 0 auto;
    padding: 3rem 1rem;
    width: 100%;
}

@media (min-width: 768px) {
    #ep-mode-select {
        padding: 5rem 1rem;
    }
}

.ep-section-header {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    text-align: center;
    margin-bottom: 4rem;
}

.ep-section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .ep-section-title {
        font-size: 3rem;
    }
}

.ep-section-subtitle {
    color: #6b7280;
    font-size: 1.125rem;
    max-width: 42rem;
    margin: 0 auto;
}

.ep-mode-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

@media (min-width: 768px) {
    .ep-mode-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .ep-mode-cards {
        grid-template-columns: repeat(4, 1fr);
    }
}

.ep-mode-card {
    display: contents;
}

.ep-mode-card__btn {
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 2rem;
    border-radius: 1.5rem;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    transition: all 0.3s;
    height: 100%;
    align-items: flex-start;
    width: 100%;
}

.ep-mode-card__btn a {
    display: block;
    height: 100%;
    width: 100%;
    text-decoration: none;
}

.ep-mode-card__icon {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    color: #4b5563;
    border: 1px solid #f3f4f6;
    margin-bottom: 1.5rem;
    transition: all 0.3s;
}

.ep-mode-card__name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.ep-mode-card__desc {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.6;
}

.ep-mode-card__btn:hover:not(.is-selected) {
    border-color: #d1d5db;
    transform: translateY(-4px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.ep-mode-card__btn.is-selected {
    border-color: var(--ep-purple);
    background: rgba(116, 95, 168, 0.05);
    box-shadow: 0 10px 15px -3px rgba(116, 95, 168, 0.1), 0 0 0 1px var(--ep-purple);
    transform: scale(1.02);
}

.ep-mode-card__btn.is-selected .ep-mode-card__icon {
    background: var(--ep-purple);
    color: #ffffff;
    border-color: var(--ep-purple);
    box-shadow: 0 4px 6px -1px rgba(116, 95, 168, 0.2);
}

/* Exam Container Layout */
#ep-exam-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-height: 100vh;
    background: #fcfcfc;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    /* Overlay entire WordPress */
    animation: none;
}

.ep-exam-header {
    background: #ffffff;
    border-bottom: 1px solid #f3f4f6;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    max-width: none;
    margin: 0;
    height: auto;
    position: relative;
    z-index: 10;
    box-shadow: none;
}

.ep-exam-header__left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.ep-btn-exit {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1.1rem 0.5rem 0.85rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, var(--ep-purple, #745fa8) 0%, #5b4a91 100%);
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(116, 95, 168, 0.35), inset 0 1px 0 rgba(255,255,255,0.15);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.ep-btn-exit svg {
    flex-shrink: 0;
    opacity: 0.9;
    transition: transform 0.18s ease;
}

.ep-btn-exit:hover {
    background: linear-gradient(135deg, #5b4a91 0%, #4a3c7a 100%);
    box-shadow: 0 4px 16px rgba(116, 95, 168, 0.45), inset 0 1px 0 rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.ep-btn-exit:hover svg {
    transform: translateX(-2px);
}

.ep-btn-exit:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(116, 95, 168, 0.3);
}

.ep-header-divider {
    width: 1px;
    height: 1.5rem;
    background: #e5e7eb;
}

.ep-header-info {
    display: flex;
    flex-direction: column;
}

.ep-header-mode {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ep-purple);
    margin-bottom: 0.125rem;
}

.ep-header-counter {
    display: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
}

.ep-exam-timer {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: #374151;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem !important;
    font-size: 0.875rem;
    font-family: ui-monospace, monospace;
    font-weight: 500;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.ep-exam-timer .ep-timer-icon {
    color: var(--ep-purple);
    width: 1rem;
    height: 1rem;
}

.ep-exam-progress {
    height: 0.25rem;
    background: #f3f4f6;
    width: 100%;
    margin: 0;
    flex-shrink: 0;
}

.ep-progress-bar {
    height: 100%;
    background: var(--ep-green);
    transition: width 0.5s ease-out;
}

.ep-exam-layout {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .ep-exam-layout {
        flex-direction: row;
    }
}

.ep-exam-main {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    position: relative;
    max-width: none;
}

@media (min-width: 768px) {
    .ep-exam-main {
        padding: 3rem;
    }
}

.ep-question-box {
    max-width: 48rem;
    margin: 0 auto;
    width: 100%;
    flex: 1;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.ep-domain-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #f3f4f6;
    color: #4b5563;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.ep-question-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.625;
    letter-spacing: -0.025em;
    margin: 0 0 2.5rem;
}

@media (min-width: 768px) {
    .ep-question-text {
        font-size: 1.875rem;
    }
}

.ep-options-list {
    gap: 1rem;
    display: flex;
    flex-direction: column;
    margin-bottom: 3rem;
}

.ep-option__btn {
    padding: 1.25rem !important;
    border-radius: 1rem !important;
    border: 2px solid #f3f4f6 !important;
    background: #ffffff !important;
    transition: all 0.2s !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 1.25rem !important;
}

.ep-option__btn:hover:not(.is-locked) {
    border-color: #e5e7eb !important;
    background: #ffffff !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.ep-option__label {
    width: 1.5rem !important;
    height: 1.5rem !important;
    border-radius: 9999px !important;
    border: 2px solid #d1d5db !important;
    background: transparent !important;
    color: transparent !important;
    margin-top: 0.125rem !important;
    flex-shrink: 0 !important;
    font-size: 0 !important;
}

.ep-option__btn:hover:not(.is-locked) .ep-option__label {
    border-color: #9ca3af !important;
    background: transparent !important;
}

.ep-option__text {
    text-align: left !important;
    font-size: 1.125rem !important;
    color: #4b5563 !important;
    font-weight: 400 !important;
    line-height: 1.625 !important;
}

.ep-option__btn.is-selected {
    border-color: var(--ep-purple) !important;
    background: rgba(116, 95, 168, 0.03) !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.ep-option__btn.is-selected .ep-option__text {
    color: #111827 !important;
    font-weight: 500 !important;
}

.ep-option__btn.is-selected .ep-option__label {
    border-color: var(--ep-purple) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
}

.ep-option__btn.is-selected .ep-option__label::after {
    content: '';
    width: 0.625rem;
    height: 0.625rem;
    background: var(--ep-purple);
    border-radius: 9999px;
}

.ep-option__check {
    display: none !important;
}

/* Status overrides */
.ep-option__btn.is-correct-answer {
    border-color: var(--ep-green) !important;
    background: rgba(156, 202, 59, 0.08) !important;
}

.ep-option__btn.is-correct-answer .ep-option__label {
    border-color: var(--ep-green) !important;
}

.ep-option__btn.is-correct-answer .ep-option__label::after {
    background: var(--ep-green);
}

.ep-option__btn.is-correct-answer .ep-option__text {
    color: #3f6212 !important;
    font-weight: 500 !important;
}

.ep-option__btn.is-wrong {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
}

.ep-option__btn.is-wrong .ep-option__label {
    border-color: #ef4444 !important;
}

.ep-option__btn.is-wrong .ep-option__label::after {
    background: #ef4444;
}

.ep-exam-nav-footer {
    max-width: 48rem;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 2rem;
    border-top: 1px solid #f3f4f6;
    margin-top: auto;
    flex-shrink: 0;
    background: #fcfcfc;
}

.ep-btn-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 1rem !important;
    padding: 0.625rem 1.25rem !important;
    border-radius: 0.75rem !important;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: transparent;
    text-transform: none !important;
}

.ep-btn-nav-prev {
    color: #6b7280 !important;
}

.ep-btn-nav-prev:hover:not(:disabled) {
    color: #111827 !important;
    background: #f3f4f6 !important;
}

.ep-btn-nav-prev:disabled {
    opacity: 0.5;
}

/* Spacer pushes utility buttons to centre */
.ep-nav-spacer {
    flex: 1;
}

.ep-btn-nav-mark {
    color: #6b7280 !important;
    border: 0.5px solid #e5e7eb !important;
    padding: 0.5rem 0.875rem !important;
    font-size: 0.875rem !important;
}

.ep-btn-nav-mark:hover:not(:disabled) {
    background: #f3f4f6 !important;
    border-color: #d1d5db !important;
}

.ep-btn-nav-mark.is-marked {
    color: #ea580c !important;
    background: #fff7ed !important;
    border-color: #fed7aa !important;
    box-shadow: none !important;
}

.ep-btn-nav-mark.is-marked svg {
    fill: currentColor;
}

/* Report Question — compact, red tint */
.ep-btn-nav-report {
    color: #b32d2e !important;
    border: 0.5px solid rgba(179, 45, 46, 0.25) !important;
    padding: 0.5rem 0.875rem !important;
    font-size: 0.875rem !important;
    background: transparent !important;
}

.ep-btn-nav-report:hover:not(:disabled) {
    background: #fff5f5 !important;
    border-color: rgba(179, 45, 46, 0.45) !important;
}

.ep-btn-nav-next {
    color: #ffffff !important;
    background: #111827 !important;
    padding: 0.75rem 2rem !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

.ep-btn-nav-next:hover {
    background: #1f2937 !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

.ep-btn-nav-submit {
    color: #ffffff !important;
    background: var(--ep-secondary, #9cca3b) !important;
    padding: 0.75rem 2rem !important;
    box-shadow: 0 4px 6px -1px rgba(156, 202, 59, 0.3) !important;
}

.ep-btn-nav-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(156, 202, 59, 0.4) !important;
}

/* Sidebar */
.ep-exam-sidebar {
    width: 100%;
    border-top: 1px solid #f3f4f6;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 18rem;
    z-index: 10;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.02);
}

@media (min-width: 768px) {
    .ep-exam-sidebar {
        width: 20rem;
        border-top: none;
        border-left: 1px solid #f3f4f6;
        height: auto;
    }
}

.ep-sidebar-box {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    position: static;
}

.ep-sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.ep-sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    text-transform: none;
    letter-spacing: normal;
}

.ep-sidebar-content {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.ep-question-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 0.625rem !important;
    margin: 0 !important;
}

.ep-nav-dot {
    width: 100% !important;
    aspect-ratio: 1/1 !important;
    border-radius: 0.75rem !important;
    border: 1px solid #e5e7eb !important;
    background: #ffffff !important;
    color: #4b5563 !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
}

.ep-nav-dot:hover {
    border-color: #d1d5db !important;
    background: #f9fafb !important;
}

.ep-nav-dot--answered {
    background: #f9fafb !important;
    border-color: #e5e7eb !important;
    color: #9ca3af !important;
    box-shadow: none !important;
}

.ep-nav-dot--answered:hover {
    background: #f3f4f6 !important;
}

.ep-nav-dot--active {
    background: var(--ep-purple) !important;
    color: #ffffff !important;
    border-color: var(--ep-purple) !important;
    box-shadow: 0 4px 6px -1px rgba(116, 95, 168, 0.2) !important;
    transform: scale(1.1);
    z-index: 10;
}

.ep-nav-dot--marked {
    background: #fff7ed !important;
    border-color: #fed7aa !important;
    color: #c2410c !important;
    box-shadow: none !important;
}

.ep-nav-dot--marked::after {
    top: -0.25rem;
    right: -0.25rem;
    width: 0.75rem;
    height: 0.75rem;
    background: #ffffff;
    border: none;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    content: '';
}

.ep-nav-dot::before {
    content: '';
    position: absolute;
    top: -0.125rem;
    right: -0.125rem;
    width: 0.5rem;
    height: 0.5rem;
    background: #f97316;
    border-radius: 9999px;
    display: none;
    z-index: 2;
}

.ep-nav-dot--marked::before {
    display: block;
}

.ep-sidebar-footer {
    padding: 1.5rem;
    background: rgba(249, 250, 251, 0.5);
    border-top: 1px solid #f3f4f6;
}

.ep-sidebar-legend {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0;
    border: none;
}

.ep-legend-item {
    font-size: 0.875rem;
    color: #4b5563;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ep-legend-dot {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ep-legend-dot--answered {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.ep-legend-dot--answered::after {
    display: none;
}

.ep-legend-dot--unanswered {
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

.ep-legend-dot--marked {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    position: relative;
    border-radius: 0.25rem;
    box-shadow: none;
}

.ep-legend-dot--marked::after {
    display: none;
}

.ep-legend-dot-inner {
    width: 0.375rem;
    height: 0.375rem;
    background: #f97316;
    border-radius: 9999px;
}

/* Remove previous checkmarks/radios entirely */
.ep-option__check {
    display: none !important;
}

/* Config Panel / Start Screen upgrades */
.ep-config-panel {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
    .ep-config-panel {
        padding: 2.5rem;
    }
}

.ep-config-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2rem;
    margin-top: 0;
}

#ep-start-btn {
    background: var(--ep-purple) !important;
    color: #ffffff !important;
    padding: 1rem 2.5rem !important;
    border-radius: 1rem !important;
    font-weight: 600 !important;
    transition: all 0.3s !important;
    box-shadow: 0 10px 15px -3px rgba(116, 95, 168, 0.25) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    font-size: 1.125rem !important;
    margin-left: auto;
}

#ep-start-btn:hover:not(:disabled) {
    background: rgba(116, 95, 168, 0.9) !important;
    transform: translateY(-2px);
    padding-right: 2.25rem !important;
    gap: 0.75rem;
}

#ep-start-btn:disabled {
    opacity: 0.5;
    box-shadow: none !important;
    transform: none;
}

/* VERY HIGH SPECIFICITY OVERRIDES FOR THEME CONFLICTS */

#ep-mode-select .ep-section-header {
    display: block !important;
    text-align: center !important;
    width: 100% !important;
}

#ep-mode-select .ep-mode-cards {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 1.5rem !important;
    margin: 0 auto 4rem auto !important;
    max-width: 680px !important;
    width: 100% !important;
}

@media (min-width: 768px) {
    #ep-mode-select .ep-mode-cards {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

#ep-mode-select .ep-mode-card__btn {
    display: flex !important;
    flex-direction: column !important;
    text-align: left !important;
    padding: 2rem !important;
    border-radius: 1.5rem !important;
    border: 1px solid #e5e7eb !important;
    background: #ffffff !important;
    transition: all 0.3s !important;
    height: 100% !important;
    align-items: flex-start !important;
    width: 100% !important;
    text-transform: none !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    justify-content: flex-start !important;
}

#ep-mode-select .ep-mode-card__icon {
    width: 3rem !important;
    height: 3rem !important;
    border-radius: 1rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f9fafb !important;
    color: #4b5563 !important;
    border: 1px solid #f3f4f6 !important;
    margin-bottom: 1.5rem !important;
    transition: all 0.3s !important;
    flex-shrink: 0 !important;
}

#ep-mode-select .ep-mode-card__icon svg {
    width: 24px !important;
    height: 24px !important;
    display: block !important;
    margin: 0 !important;
}

#ep-mode-select .ep-mode-card__name {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: #111827 !important;
    margin-bottom: 0.5rem !important;
    text-transform: none !important;
    text-align: left !important;
    line-height: 1.3 !important;
    width: 100% !important;
    display: block !important;
}

#ep-mode-select .ep-mode-card__desc {
    font-size: 0.875rem !important;
    color: #6b7280 !important;
    line-height: 1.6 !important;
    text-transform: none !important;
    text-align: left !important;
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
}

#ep-mode-select .ep-mode-card__btn a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    text-decoration: none !important;
}

/* =========================================================================
   SweetAlert2 — Brand theme overrides
   ========================================================================= */

.swal2-container {
    z-index: 9999999 !important;
}

.ep-swal-popup.swal2-popup {
    font-family: var(--ep-font, 'Inter', system-ui, sans-serif) !important;
    border-radius: 1.25rem !important;
    padding: 2rem !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2) !important;
    max-width: 26rem !important;
}

.ep-swal-popup .swal2-title {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #111827 !important;
    padding: 0 !important;
    margin-bottom: 0.5rem !important;
}

.ep-swal-popup .swal2-html-container,
.ep-swal-popup .swal2-content {
    font-size: 0.9375rem !important;
    color: #4b5563 !important;
    line-height: 1.6 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ep-swal-popup .swal2-icon {
    margin: 0 auto 1.25rem !important;
    width: 4rem !important;
    height: 4rem !important;
}

.ep-swal-popup .swal2-icon .swal2-icon-content {
    font-size: 2rem !important;
}

.ep-swal-popup .swal2-actions {
    margin-top: 1.75rem !important;
    gap: 0.75rem !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    padding: 0 !important;
}

.ep-swal-popup .swal2-styled {
    border-radius: 0.75rem !important;
    font-weight: 600 !important;
    font-size: 0.9375rem !important;
    padding: 0.75rem 1.5rem !important;
    transition: all 0.2s !important;
    box-shadow: none !important;
    flex: 1 !important;
}

.ep-swal-popup .swal2-styled:focus {
    box-shadow: 0 0 0 3px rgba(116, 95, 168, 0.25) !important;
}

/* Cancel button neutral styling */
.ep-swal-popup .swal2-cancel,
.swal2-styled.ep-swal-cancel {
    background: #f3f4f6 !important;
    color: #374151 !important;
}

.ep-swal-popup .swal2-cancel:hover,
.swal2-styled.ep-swal-cancel:hover {
    background: #e5e7eb !important;
}

/* Confirm button — inherit its own color from JS call */
.ep-swal-popup .swal2-confirm:hover {
    filter: brightness(1.08) !important;
    transform: translateY(-1px) !important;
}

/* ══════════════════════════════════════════════════════════════════
   Chapter Quiz Table (ep-cqt-*)
   ══════════════════════════════════════════════════════════════════ */

.ep-cqt-panel {
    animation: epFadeInUp 0.4s ease-out;
}

/* Header */
.ep-cqt-header {
    margin-bottom: 1.5rem;
}

.ep-cqt-header__left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    color: var(--ep-purple);
}

.ep-cqt-heading {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--ep-slate-900);
    margin: 0;
}

.ep-cqt-subheading {
    font-size: 0.9rem;
    color: var(--ep-slate-500);
    margin: 0;
    line-height: 1.5;
}

/* Loading spinner */
.ep-cqt-loading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem;
    color: var(--ep-slate-500);
    font-size: 0.9rem;
}

.ep-cqt-spinner {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--ep-slate-200);
    border-top-color: var(--ep-purple);
    border-radius: 50%;
    animation: ep-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes ep-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Subject Tabs */
.ep-cqt-subject-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.ep-cqt-tab {
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    border: 1.5px solid var(--ep-slate-200);
    background: white;
    color: var(--ep-slate-600);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
}

.ep-cqt-tab:hover {
    border-color: var(--ep-purple-hover);
    color: var(--ep-purple);
    background: var(--ep-purple-light);
}

.ep-cqt-tab.is-active {
    background: var(--ep-purple);
    border-color: var(--ep-purple);
    color: white;
    box-shadow: 0 2px 8px rgba(116, 95, 168, 0.25);
}

/* Subject label rows inside chapter table */
.ep-cqt-subject-row {
    background: transparent;
}
.ep-cqt-subject-collapsible {
    cursor: pointer;
    user-select: none;
}
.ep-cqt-subject-collapsible:hover .ep-cqt-subject-label,
.ep-cqt-subject-collapsible:hover .ep-cqt-subject-stat {
    color: var(--ep-purple-dark, #3C3489);
}
.ep-cqt-subject-label {
    padding: 14px 1rem !important;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--ep-purple);
    border-bottom: none !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

/* Stat cells in the subject summary row */
.ep-cqt-subject-stat {
    padding: 14px 1.25rem !important;
    vertical-align: middle;
    border-bottom: none !important;
}

/* "N chapters · X done" badge in the Action column of a subject row */
.ep-cqt-subject-ch-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--ep-purple);
    background: rgba(116, 95, 168, 0.08);
    border: 1px solid rgba(116, 95, 168, 0.18);
    border-radius: 20px;
    padding: 3px 10px;
    white-space: nowrap;
}
.ep-cqt-subject-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(116, 95, 168, 0.08);
    border: 1.5px solid rgba(116, 95, 168, 0.15);
    flex-shrink: 0;
    line-height: 1;
    transition: transform 0.22s ease, background 0.18s ease, border-color 0.18s ease;
    margin-left: 8px;
    color: var(--ep-purple);
}
.ep-cqt-subject-collapsible:hover .ep-cqt-subject-chevron {
    background: rgba(116, 95, 168, 0.16);
    border-color: rgba(116, 95, 168, 0.3);
}
.ep-cqt-subject-collapsed .ep-cqt-subject-chevron {
    transform: rotate(-90deg);
}
.ep-cqt-subject-row + .ep-cqt-row td {
    border-top: none;
}

/* Table Wrapper */
.ep-cqt-table-wrapper {
    overflow-x: auto;
    border-radius: var(--ep-radius-xl);
    border: 1px solid var(--ep-slate-200);
    box-shadow: var(--ep-shadow-sm);
}

.ep-cqt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: white;
}

/* Table Head */
.ep-cqt-th {
    padding: 0.875rem 1.25rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ep-slate-500);
    background: var(--ep-slate-50);
    border-bottom: 1px solid var(--ep-slate-200);
    white-space: nowrap;
}

.ep-cqt-th--progress {
    min-width: 180px;
}

.ep-cqt-th--questions {
    min-width: 100px;
}

.ep-cqt-th--status {
    min-width: 120px;
}

.ep-cqt-th--action {
    min-width: 110px;
    text-align: right;
}

/* Table Rows */
.ep-cqt-row {
    border-bottom: 1px solid var(--ep-slate-100);
    transition: background 0.18s ease, box-shadow 0.18s ease, opacity 0.2s ease, transform 0.2s ease;
}

.ep-cqt-row:last-child {
    border-bottom: none;
}

.ep-cqt-row:hover {
    background: #f5f2ff;
    box-shadow: inset 3px 0 0 var(--ep-purple);
}

.ep-cqt-row:hover .ep-cqt-action--start {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 6px 14px rgba(116, 95, 168, 0.4);
}

.ep-cqt-row--complete {
    background: rgba(156, 202, 59, 0.02);
}

.ep-cqt-row--complete:hover {
    background: rgba(156, 202, 59, 0.06);
}

.ep-cqt-td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
}

.ep-cqt-td--action {
    text-align: right;
}

/* Chapter Name Cell */
.ep-cqt-chapter-name {
    font-weight: 600;
    color: var(--ep-slate-800);
    margin-bottom: 0.125rem;
}

.ep-cqt-chapter-subject {
    font-size: 0.8rem;
    color: var(--ep-slate-400);
}

/* Progress Bar */
.ep-cqt-progress-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ep-cqt-progress-bar {
    flex: 1;
    height: 0.5rem;
    background: var(--ep-slate-100);
    border-radius: 9999px;
    overflow: hidden;
    min-width: 80px;
}

.ep-cqt-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ep-purple), var(--ep-green));
    border-radius: 9999px;
    transition: width 0.6s ease;
}

.ep-cqt-progress-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ep-slate-600);
    flex-shrink: 0;
    min-width: 2.5rem;
    text-align: right;
}

/* Questions count */
.ep-cqt-q-count {
    font-size: 0.875rem;
    color: var(--ep-slate-600);
    font-weight: 500;
}

/* Status Pill */
.ep-cqt-status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.ep-cqt-status--new {
    background: var(--ep-slate-100);
    color: var(--ep-slate-500);
}

.ep-cqt-status--inprogress {
    background: #fef3c7;
    color: #92400e;
}

.ep-cqt-status--complete {
    background: rgba(156, 202, 59, 0.1);
    color: #3b6002;
}

/* Action Buttons */
.ep-cqt-action-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    padding: 0.5rem 1.2rem !important;
    border-radius: 24px !important;
    font-size: 0.8125rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    font-family: inherit !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    white-space: nowrap !important;
}

.ep-cqt-action-btn:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

/* Option D — white card, purple outline, circle arrow, forced rounded corners */
.ep-cqt-action--start {
    background: #fff !important;
    color: #534AB7 !important;
    border: 1.5px solid #c4baf5 !important;
    border-radius: 24px !important;
    box-shadow: 0 1px 3px rgba(83, 74, 183, 0.1) !important;
}

.ep-cqt-action--start:hover:not(:disabled) {
    border-color: #534AB7 !important;
    background: #f5f2ff !important;
    box-shadow: 0 6px 14px rgba(83, 74, 183, 0.18) !important;
    transform: translateY(-2px) scale(1.04) !important;
}

.ep-cqt-action--start:active:not(:disabled) {
    transform: scale(0.97) !important;
    box-shadow: 0 1px 3px rgba(83, 74, 183, 0.1) !important;
}

/* Circle that wraps the arrow icon inside the Start button */
.ep-cqt-action-circle {
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    border: 1.5px solid #bbb5f0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    transition: border-color 0.2s, background 0.2s !important;
    color: #534AB7 !important;
}

.ep-cqt-action--start:hover:not(:disabled) .ep-cqt-action-circle {
    border-color: #534AB7 !important;
    background: #534AB7 !important;
    color: #fff !important;
}

.ep-cqt-action--start:hover:not(:disabled) .ep-cqt-action-circle {
    border-color: #534AB7;
    background: #534AB7;
    color: #fff;
}

.ep-cqt-action--continue {
    background: #5b4886;
    color: white;
    box-shadow:  0 4px 12px rgba(116, 95, 168, 0.4);
}

.ep-cqt-action--continue:hover:not(:disabled) {
    background: #d97706;
    box-shadow: 0 4px 12px rgba(116, 95, 168, 0.4);
    transform: translateY(-1px);
    color:white;
}

.ep-cqt-action--review {
    background: var(--ep-green);
    color: white;
    box-shadow: 0 2px 6px rgba(156, 202, 59, 0.3);
}

.ep-cqt-action--review:hover:not(:disabled) {
    background: var(--ep-green-hover);
    box-shadow: 0 4px 12px rgba(156, 202, 59, 0.4);
    transform: translateY(-1px);
}

/* Empty state */
.ep-cqt-empty {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--ep-slate-400);
    font-size: 0.9rem;
}

/* Error state */
.ep-cqt-error {
    padding: 2rem;
    text-align: center;
    color: var(--ep-red-500);
    background: #fef2f2;
    border-radius: var(--ep-radius-xl);
    border: 1px solid #fecaca;
    font-size: 0.9rem;
}

/* Responsive: hide Progress column on mobile */
@media (max-width: 640px) {

    .ep-cqt-th--progress,
    .ep-cqt-td--progress {
        display: none;
    }

    .ep-cqt-th--chapter {
        min-width: 140px;
    }
}

/* Mode card - single chapter quiz stays always selected */
.ep-mode-card--chapter-quiz.is-selected .ep-mode-card__icon {
    background: var(--ep-purple-light);
    color: var(--ep-purple);
}

/* ══════════════════════════════════════════════════════════════════════════════
   Mock Exam List (ep-mock-*)
   ══════════════════════════════════════════════════════════════════════════════ */

.ep-mock-list {
    margin-top: 1.5rem;
}

.ep-mock-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.ep-mock-card {
    background: var(--ep-surface, #1e2130);
    border: 1px solid var(--ep-border, rgba(255,255,255,0.08));
    border-radius: var(--ep-radius-xl, 14px);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ep-mock-card:hover:not(.ep-mock-card--locked) {
    border-color: var(--ep-purple, #745fa8);
    box-shadow: 0 4px 20px rgba(116, 95, 168, 0.15);
}

.ep-mock-card--locked {
    opacity: 0.65;
}

.ep-mock-card__header {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
}

.ep-mock-card__icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: var(--ep-radius-lg, 10px);
    background: var(--ep-purple-light, rgba(116,95,168,0.12));
    color: var(--ep-purple, #745fa8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ep-mock-card__title-wrap {
    flex: 1;
    min-width: 0;
}

.ep-mock-card__name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ep-text-primary, #f1f5f9);
    margin: 0 0 0.25rem;
    line-height: 1.4;
}

.ep-mock-card__desc {
    font-size: 0.825rem;
    color: var(--ep-slate-400, #94a3b8);
    margin: 0;
    line-height: 1.5;
}

.ep-mock-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.ep-mock-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    color: var(--ep-slate-400, #94a3b8);
    background: var(--ep-surface-2, rgba(255,255,255,0.04));
    border: 1px solid var(--ep-border, rgba(255,255,255,0.08));
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
}

.ep-mock-meta-item--score {
    color: var(--ep-purple, #745fa8);
    border-color: var(--ep-purple, #745fa8);
    background: var(--ep-purple-light, rgba(116,95,168,0.12));
}

.ep-mock-card__footer {
    margin-top: auto;
    padding-top: 0.25rem;
}

.ep-mock-card__locked-msg {
    font-size: 0.82rem;
    color: var(--ep-slate-400, #94a3b8);
    font-style: italic;
}

.ep-mock-start-btn {
    width: 100%;
    justify-content: center;
}

.ep-mock-empty {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--ep-slate-400, #94a3b8);
    font-size: 0.9rem;
}

@media (max-width: 640px) {
    .ep-mock-cards {
        grid-template-columns: 1fr;
    }
}
/* ── My Reported Questions — collapsible list ─────────────────────────── */
.ep-rpt-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}
.ep-rpt-summary__count--pending  { color: #b45309; }
.ep-rpt-summary__count--resolved { color: #15803d; }
.ep-rpt-summary__dot             { color: #d1d5db; }

.ep-rpt-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ep-rpt-item {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    transition: box-shadow 0.15s;
}
.ep-rpt-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

.ep-rpt-item--resolved {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.ep-rpt-item__summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.ep-rpt-item__summary::-webkit-details-marker { display: none; }

.ep-rpt-item__type {
    font-size: 11px;
    font-weight: 700;
    color: #7c3aed;
    background: #f3f0ff;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.ep-rpt-item__preview {
    flex: 1;
    font-size: 13px;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.ep-rpt-item__right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.ep-rpt-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
    white-space: nowrap;
}
.ep-rpt-badge--pending  { background: #fef3c7; color: #92400e; }
.ep-rpt-badge--reviewed { background: #dbeafe; color: #1e40af; }
.ep-rpt-badge--resolved { background: #dcfce7; color: #15803d; }

.ep-rpt-item__date {
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
}

.ep-rpt-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 6px;
    background: #EEEDFE;
    color: #534AB7;
    transition: transform 0.2s ease, background 0.15s ease;
    flex-shrink: 0;
}
.ep-rpt-item:hover .ep-rpt-chevron { background: #CECBF6; }
details[open] .ep-rpt-chevron { transform: rotate(180deg); }

.ep-rpt-item__body {
    padding: 0 16px 16px;
    border-top: 1px solid #f3f4f6;
    margin-top: 0;
}
.ep-rpt-item--resolved .ep-rpt-item__body { border-top-color: #bbf7d0; }

.ep-rpt-item__full-q {
    font-size: 13px;
    color: #374151;
    margin: 12px 0 8px;
    line-height: 1.55;
}

.ep-rpt-item__desc {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 10px;
}

/* Resolution card inside resolved items */
.ep-rpt-resolution-card {
    background: #fff;
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 12px 14px;
    margin-top: 10px;
}
.ep-rpt-resolution-card__header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #15803d;
    margin-bottom: 4px;
}
.ep-rpt-resolution-card__header svg { flex-shrink: 0; stroke: #15803d; }
.ep-rpt-resolution__note {
    font-size: 13px;
    color: #374151;
    margin: 6px 0 0;
    padding-left: 24px;
}

/* ── Collapsible dashboard sections ────────────────────────────────────────── */
.ep-section-header,
.ep-section-header_alt {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap;
}

/* Collapse toggle button */
.ep-coll-btn {
    flex-shrink: 0;
    margin-left: auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(116, 95, 168, 0.1);
    border: none;
    cursor: pointer;
    padding: 0;
    color: #745fa8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
    line-height: 1;
}
.ep-coll-btn:hover {
    background: #745fa8;
    color: #fff;
}

/* Chevron rotation when collapsed */
.ep-coll-chevron {
    display: block;
    transition: transform 0.25s ease;
}
.ep-section-collapsed .ep-coll-chevron {
    transform: rotate(-90deg);
}

/* Hide all section content when collapsed, keep only the header visible */
.ep-section-collapsed > *:not(.ep-section-header):not(.ep-section-header_alt) {
    display: none !important;
}

/* Dark panel header (Start Exam) — button colour override */
.ep-start-panel .ep-coll-btn {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}
.ep-start-panel .ep-coll-btn:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* ── Subject / Chapter Navigator ─────────────────────────────────────────── */
.ep-subject-nav {
    background: #fff;
    border: 1px solid #e8e4f8;
    border-radius: 14px;
    padding: 20px 22px;
}

/* Subject card — matches resume card style */
.ep-nav-subject {
    background: #fff;
    border-radius: 1rem;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: border-color 0.2s;
}
.ep-nav-subject:last-child {
    margin-bottom: 0;
}
.ep-nav-subject:hover {
    border-color: rgba(116, 95, 168, 0.3);
}

/* The clickable subject header row */
.ep-nav-subject__toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    background: transparent !important;
    border: none !important;
    padding: 1.25rem !important;
    min-height: 0 !important;
    cursor: pointer !important;
    text-align: left !important;
    user-select: none;
    gap: 1rem !important;
    box-sizing: border-box !important;
    text-transform: none !important;
    font-weight: inherit !important;
    box-shadow: none !important;
}

/* Subject name + meta info block */
.ep-nav-subject__info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}
.ep-nav-subject__name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ep-nav-subject__meta {
    font-size: 0.875rem;
    color: #64748b;
}

/* Circular button — same as ep-resume-card__play */
.ep-nav-subject__btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(116, 95, 168, 0.1);
    color: #745fa8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}
.ep-nav-subject:hover .ep-nav-subject__btn {
    background: #745fa8;
    color: #fff;
}

/* Chevron inside the circle — rotates when collapsed */
.ep-nav-subject__chevron {
    width: 1rem;
    height: 1rem;
    transition: transform 0.22s ease;
}
.ep-nav-subject--collapsed .ep-nav-subject__chevron {
    transform: rotate(-90deg);
}

/* Chapter list sits inside the card, indented */
.ep-nav-subject .ep-nav-chapter-list {
    padding: 0 0.75rem 0.75rem;
}

/* Hide chapter list when subject is collapsed */
.ep-nav-subject--collapsed .ep-nav-chapter-list {
    display: none !important;
}

/* Chapter list */
.ep-nav-chapter-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Each chapter is a full-width clickable row */
.ep-nav-chapter__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 9px;
    background: #f5f3ff;
    color: #3c3489;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
    border: 1px solid transparent;
}
.ep-nav-chapter__link:hover {
    background: #ede9ff;
    border-color: #c4b5f7;
    color: #534ab7;
    transform: translateX(2px);
}
.ep-nav-chapter__icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.6;
}
.ep-nav-chapter__name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ep-nav-chapter__arrow {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.4;
}

/* ── EMI (Extended Matching Item) block styles ──────────────────────────── */

.ep-emi-block {
    border: 1.5px solid var(--ep-purple-light, #c4b9f0);
    border-radius: 12px;
    overflow: hidden;
    background: var(--ep-white, #fff);
}

.ep-emi-block__header {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    padding: 12px 18px;
    border-bottom: 1px solid var(--ep-purple-light, #c4b9f0);
}

.ep-emi-block__badge {
    background: var(--ep-purple, #745fa8);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    padding: 2px 8px;
    border-radius: 20px;
    flex-shrink: 0;
}

.ep-emi-block__theme {
    font-size: 14px;
    font-weight: 700;
    color: var(--ep-purple-dark, #3C3489);
}

.ep-emi-block__lead-in {
    padding: 10px 18px;
    font-size: 13px;
    color: #4b5563;
    font-style: italic;
    background: #fafafa;
    border-bottom: 1px solid #f1f5f9;
}

/* Shared options pool */
.ep-emi-pool {
    list-style: none;
    margin: 0;
    padding: 10px 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
    background: #f8f5ff;
    border-bottom: 1.5px solid var(--ep-purple-light, #c4b9f0);
}

.ep-emi-pool-item {
    display: flex;
    align-items: baseline;
    gap: 5px;
    font-size: 13px;
    color: #374151;
    min-width: 160px;
}

.ep-emi-pool-key {
    font-weight: 700;
    color: var(--ep-purple, #745fa8);
    min-width: 18px;
}

/* Stem rows */
.ep-emi-stems {
    padding: 10px 18px;
}

.ep-emi-stem {
    border-bottom: 1px dashed #e5e7eb;
    padding: 10px 0;
}

.ep-emi-stem:last-child {
    border-bottom: none;
}

.ep-emi-stem__header {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 8px;
}

.ep-emi-stem__num {
    font-weight: 700;
    color: var(--ep-purple, #745fa8);
    font-size: 13px;
    min-width: 22px;
    flex-shrink: 0;
    padding-top: 2px;
}

.ep-emi-stem__text {
    font-size: 14px;
    color: #1f2937;
    line-height: 1.5;
}

.ep-emi-stem__answer-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 30px;
}

.ep-emi-select {
    appearance: auto;
    padding: 5px 10px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 13px;
    color: #374151;
    background: #fff;
    cursor: pointer;
    min-width: 120px;
    transition: border-color 0.15s;
}

.ep-emi-select:focus {
    outline: none;
    border-color: var(--ep-purple, #745fa8);
    box-shadow: 0 0 0 3px rgba(116, 95, 168, 0.15);
}

.ep-emi-stem__result {
    font-size: 13px;
    font-weight: 700;
    display: block;
    margin-top: 4px;
}

.ep-emi-stem__result--correct { color: #0f6e56; }
.ep-emi-stem__result--wrong   { color: #b32d2e; }
.ep-emi-stem__result--saved   { color: #6b7280; }

/* Correct answer badge shown after checking a wrong stem */
.ep-emi-correct-answer {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 4px;
    background: #0f6e5618;
    color: #0f6e56;
    font-size: 12px;
    font-weight: 700;
}

/* Rationale/explanation text shown beneath stem result */
.ep-emi-explanation {
    margin-top: 6px;
    padding: 6px 10px;
    background: #fafafa;
    border-left: 3px solid #c0b6f2;
    border-radius: 0 4px 4px 0;
    font-size: 12px;
    font-weight: 400;
    color: #374151;
    line-height: 1.5;
}

/* Check button + score */
.ep-emi-block__actions {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    background: #f8f5ff;
    border-top: 1px solid var(--ep-purple-light, #c4b9f0);
}

.ep-emi-check-btn {
    padding: 7px 20px;
    background: var(--ep-purple, #745fa8);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}

.ep-emi-check-btn:hover  { opacity: 0.88; }
.ep-emi-check-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.ep-emi-block__score {
    font-size: 13px;
    font-weight: 600;
}

.ep-emi-block__score--full    { color: #0f6e56; }
.ep-emi-block__score--partial { color: #92400e; }
.ep-emi-block__score--zero    { color: #b32d2e; }

/* ── Print protection ────────────────────────────────────────────────────── */
@media print {
    #ep-exam-wrapper,
    #ep-exam-header,
    #ep-question-box,
    .ep-options-list,
    .ep-exam-nav,
    .ep-chapter-quiz-table,
    #ep-dashboard,
    #ep-study-wrapper,
    #ep-results-wrapper,
    .ep-identity-badge {
        display: none !important;
    }

    body::after {
        content: 'Printing is not permitted on this page.';
        display: block;
        text-align: center;
        padding: 4rem 2rem;
        font-size: 1.3rem;
        font-weight: 600;
        color: #444;
    }
}

