:root {
    --navy:#1A2E44;
    --navy-deep:#142E6C;
    --heading:#2D465E;    
    --accent:#3F8FCB;
    --accent-dark:#2D6FA3;
    --accent-light:#E2EFFA;
    --teal:#4FB3AE;
    --success:#16A365;
    --success-bg:#E9F8F0;
    --error:#D64545;
    --error-bg:#FDECEC;
    --warning:#E8A63E;
    --bg:#F4F7FB;
}
.exam-title-bar {
    display:flex;
    align-items:center;
    gap:16px;
    background:white;
    border-bottom:1px solid #e5e7eb;
    padding:7px 20px;
}
.exam-topbar .exam-title-bar {
    background:transparent;
    border-bottom:none;
    padding:0;
}
.close-exam {
    width:36px;
    height:36px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:#f1f5f9;
    color:#475569;
    font-size:20px;
    font-weight:600;
    text-decoration:none;
    transition:.2s ease;
}
.close-exam:hover {
    background:#fee2e2;
    color:#dc2626;
}
.exam-meta h1 {
    margin:0;
    font-size:1.15rem;
    font-weight:700;
    color:#0f172a;
}
.exam-meta p {
    margin:3px 0 0;
    font-size:.85rem;
    color:#64748b;
}
/* ==========================
PAGE
========================== */
.exam-page {
    min-height:100vh;
    background:var(--bg);
    color:var(--heading);
}
/* ==========================
HEADER
========================== */
.exam-header {
    border-radius:18px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:20px;
}
.header-info {
    display:flex;
    align-items:center;
    gap:20px;
}
 .exam-container {
    display:grid;
    grid-template-columns:1fr 350px;
    gap:25px;
    align-items:start;
}
.subscription-sidebar {
    display:none;
    align-self:start;
    width:100%;
    max-width:340px;
    position:static;
    top:auto;
    right:auto;
}
.subscription-sidebar-wrap {
    display:none;
    position:sticky;
    top:calc(
        var(--exam-site-header-offset)
        + var(--exam-topbar-block-height)
        + var(--exam-subscribe-sticky-gap)
    );
    align-self:start;
    width:100%;
    max-width:340px;
    margin-top:4.5rem;
    height:fit-content;
    z-index:5;
}
.subscription-sidebar-wrap .subscription-sidebar {
    width:100%;
    max-height:none;
    overflow:visible;
}
.subscription-sidebar__stack {
   
    display:flex;
    flex-direction:column;
    gap:0.75rem;
}
.subscription-sidebar__panel {
    padding:1rem 1.1rem !important;
    text-align:center;
    border-radius:1rem;
    box-shadow:0 10px 25px rgba(0,0,0,.18);
}
.subscription-sidebar__panel .sidebar-icon {
    margin:0 auto 0.6rem;
    width:2rem;
    height:2rem;
}
.subscription-sidebar__panel h3 {
    font-size:1rem !important;
    line-height:1.3;
    margin:0 0 0.4rem !important;
    color:#fff;
    font-weight:700;
}
.subscription-sidebar__panel p {
    font-size:0.78rem !important;
    line-height:1.4;
    margin:0 0 0.75rem !important;
    color:#bfdbfe;
}
.subscription-sidebar__panel .subscribe-btn {
    display:block;
    width:100%;
    background:#E8A63E;
    color:#1A2E44;
    font-weight:700;
    font-size:0.85rem;
    padding:0.65rem 0.85rem;
    border-radius:0.75rem;
    margin-bottom:0.5rem;
    text-decoration:none;
}
.subscription-sidebar__panel .subscribe-btn:hover {
    background:#d49536;
}
.subscription-sidebar__panel .sidebar-login {
    margin:0 !important;
    font-size:0.75rem !important;
    color:#93c5fd;
}
.subscription-sidebar__panel .sidebar-login a {
    color:#E8A63E;
    font-weight:600;
    text-decoration:none;
}
.subscription-sidebar__panel--school {
    background:#000;
}
.subscription-sidebar__panel--course {
    background:#142E6C;
}
@media (min-width:1024px) {
    .subscription-sidebar-wrap {
        display:block;
        grid-column:span 3 / span 3;
    }
    .subscription-sidebar {
        display:block;
    }
}
.question-count {
    font-size:16px;
    color:var(--heading);
}
.subject-pill {
    display:inline-block;
    width:fit-content;
    background:var(--accent-light);
    color:var(--accent-dark);
    padding:8px 16px;
    border-radius:50px;
    font-weight:600;
    font-size:14px;
}
.question-pills {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    flex-wrap:wrap;
    margin-bottom:16px;
}
.subject-pill--end {
    margin-left:auto;
}

/* MODE SWITCH */
.mode-switch {
    display:flex;
    background:#edf3fa;
    padding:5px;
    border-radius:12px;
}
.mode-button {
    border:0;
    background:none;
    padding:10px 25px;
    border-radius:10px;
    cursor:pointer;
    font-weight:700;
    color:var(--heading);
}
.mode-button.active {
    background:white;
    color:var(--accent-dark);
    box-shadow:
    0 4px 12px rgba(0,0,0,.1);
}
/* TIMER */
.timer {
    display:inline-flex;
    align-items:center;
    gap:8px;
    background:#f1f6fb;
    padding:10px 16px;
    border-radius:10px;
    font-weight:700;
    color:var(--accent-dark);
    transition:all .2s ease;
}
.timer.warning {
    background:#fff1f2;
    color:#b91c1c;
    box-shadow:0 0 0 1px rgba(185, 28, 28, 0.15);
}
.timeout-popup {
    position:fixed;
    inset:0;
    background:rgba(15, 23, 42, 0.55);
    display:none;
    align-items:center;
    justify-content:center;
    z-index:100;
    padding:20px;
}
.timeout-popup.active {
    display:flex;
}
.timeout-popup-card {
    background:white;
    border-radius:20px;
    padding:28px 24px;
    max-width:420px;
    width:100%;
    text-align:center;
    box-shadow:0 20px 60px rgba(0,0,0,0.25);
}
.timeout-popup-card h3 {
    margin:0 0 10px;
    color:var(--navy-deep);
    font-size:1.25rem;
}
.timeout-popup-card p {
    margin:0 0 18px;
    color:#475569;
    line-height:1.6;
}
.timeout-popup-card button {
    background:var(--accent);
    color:white;
    border:none;
    padding:10px 18px;
    border-radius:10px;
    font-weight:700;
    cursor:pointer;
}
.results-popup-card {
    max-width: 540px;
    width: 100%;
    padding: 42px 38px 34px;
    text-align: center;
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
    animation: resultsPopIn .45s cubic-bezier(.2,.8,.2,1);
}
@keyframes resultsPopIn {
    from { opacity: 0; transform: scale(.92) translateY(18px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.results-popup-badge {
    display: inline-block;
    margin-bottom: 12px;
    padding: 8px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fff7ed, #fef3c7);
    color: #b45309;
    font-size: .85rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.results-popup-title {
    margin: 0 0 24px;
    color: var(--navy-deep);
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
}
.results-ring-wrap {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 20px;
}
.results-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.results-ring-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 10;
}
.results-ring-progress {
    fill: none;
    stroke: var(--accent);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 326.73;
    stroke-dashoffset: 326.73;
    transition: stroke-dashoffset 1.1s cubic-bezier(.4, 0, .2, 1), stroke .35s ease;
}
.results-ring-progress.is-good { stroke: #16a34a; }
.results-ring-progress.is-ok { stroke: #d97706; }
.results-ring-progress.is-low { stroke: #e11d48; }
.results-ring-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}
.results-ring-label span {
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--navy-deep);
    line-height: 1;
}
.results-ring-label small {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #64748b;
}
.results-score-detail {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #334155;
}
.results-popup-card .results-message {
    margin: 0 0 28px;
    color: #64748b;
    font-size: 1rem;
    line-height: 1.5;
}
.results-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.results-btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: .95rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    background: white;
    color: var(--navy-deep);
    transition: transform .15s ease, box-shadow .15s ease;
}
.results-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}
.results-btn--primary {
    background: linear-gradient(135deg, var(--accent), var(--teal));
    border-color: transparent;
    color: white;
}
.results-btn--secondary {
    background: #f8fafc;
}

    .progress-wrapper {
        width:100%;
        height:4px;
        background:#e5edf5;
        overflow:hidden;
    }

    .progress-track {
        width:100%;
        height:100%;
    }

    .progress-value {
        height:100%;
        background:linear-gradient(
            90deg,
            var(--accent),
            var(--teal)
        );
        transition:width .35s ease;
    }

/* ==========================
NOTICES
========================== */
.notice {
    padding:15px 20px;
    border-radius:12px;
    margin-bottom:20px;
    font-size:14px;
}
.notice a {
    font-weight:700;
    color:var(--accent-dark);
}
.notice-info {
    background:var(--accent-light);
    border:1px solid var(--accent);
}
.notice-warning {
    background:#FFF6E8;
    border:1px solid var(--warning);
}
.notice-success {
    background:var(--success-bg);
    border:1px solid var(--success);
}

/* ==========================
QUESTION CARD
========================== */
.question-card {
    display:none;
    background:white;
    padding:35px;
    border-radius:20px;
    box-shadow:
    0 10px 35px rgba(20,46,108,.07);
}
.question-card.active {
    display:block;
    animation:
    slideIn .25s ease;
}
@keyframes slideIn {
from {
opacity:0;
transform:translateY(15px);
}
to {
opacity:1;
transform:none;
}
}
.question-title h1,
.question-title .question-heading,
.question-title h2 {
    font-size:26px;
    line-height:1.5;
    color:var(--heading);
    margin-bottom:30px;
}
.question-image {
    max-width:100%;
    border-radius:15px;
    margin-bottom:25px;
}
/* ==========================
ANSWERS
========================== */
.answers {
    display:flex;
    flex-direction:column;
    gap:14px;
}
.question-type-hint {
    margin: 0 0 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
}
.answer-submit-btn {
    margin-top: 6px;
    align-self: flex-start;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.answer-submit-btn:disabled {
    background: #dbe7f2;
    color: #718096;
    cursor: not-allowed;
}
.answer--multi.selected {
    border-color: var(--accent);
    background: var(--accent-light);
}
.answers--drag {
    gap: 10px;
}
.answer-drag-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid #e4edf7;
    border-radius: 14px;
    background: #fff;
    cursor: grab;
}
.answer-drag-item.is-dragging {
    opacity: 0.65;
}
.answer-drag-item.correct {
    border-color: var(--success);
    background: var(--success-bg);
}
.answer-drag-item.incorrect {
    border-color: var(--error);
    background: var(--error-bg);
}
.drag-handle {
    font-size: 1.1rem;
    color: #94a3b8;
    user-select: none;
}
.answer {
    display:flex;
    align-items:center;
    gap:18px;
    width:100%;
    background:#fff;
    border:2px solid #e4edf7;
    padding:18px 20px;
    border-radius:16px;
    cursor:pointer;
    text-align:left;
    font-size:16px;
    color:var(--heading);
    transition:.2s;
}
.answer-text {
    flex:1;
    color:#2D465E;
    font-weight:500;
    line-height:1.45;
}
.answer:hover {
    border-color:var(--accent);
    background:#f5faff;
    transform:translateY(-2px);
}
.answer-letter {
    width:40px;
    height:40px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:var(--accent-light);
    color:var(--accent-dark);
    font-weight:800;
}
.answer.selected {
    border-color:var(--accent);
    background:var(--accent-light);
}
.answer.correct {
    border-color:var(--success);
    background:var(--success-bg);
}
.answer.correct .answer-letter {
    background:var(--success);
    color:white;
}
.answer.incorrect {
    border-color:var(--error);
    background:var(--error-bg);
}
.answer.incorrect .answer-letter {
    background:var(--error);
    color:white;
}
/* ==========================
RATIONALE
========================== */
.rationale {
    display:none;
    margin-top:30px;
    padding:25px;
    border-radius:15px;
    background:#f8fbff;
    border-left:5px solid var(--accent);
}.rationale h3 {
    margin-top:0;    
    color:var(--heading);
}.correct-box {
    margin-top:20px;    
    padding:18px;    
    background:var(--success-bg);    
    border-radius:12px;
}
/* ==========================
TOOLS
========================== */
.question-tools {
    display:flex;
    align-items:center;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:12px;
    margin-top:30px;
    padding-top:20px;
    border-top:1px solid #edf1f6;
}
.question-tools__actions {
    display:flex;
    gap:12px;
    flex-wrap:wrap;
}
.question-tools__nav {
    margin-left:auto;
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}
.question-tools button {
    border:1px solid #dce7f2;    
    background:white;    
    padding:10px 18px;    
    border-radius:10px;    
    cursor:pointer;    
    font-weight:600;
}
.question-tools button.active {
    background:var(--accent-light);
    border-color:var(--accent);
    color:var(--accent-dark);
}
/* ==========================
SIDEBAR
========================== */
.question-sidebar {
    position: fixed;
    top: calc(var(--exam-site-header-offset) + var(--exam-topbar-block-height));
    right: -320px;
    width: 300px;
    height: calc(100vh - var(--exam-site-header-offset) - var(--exam-topbar-block-height));
    background:white;
    border-left:1px solid #e5e7eb;
    box-shadow:-4px 0 20px rgba(0,0,0,.08);
    padding:20px;
    transition:right .3s ease;
    z-index:185;
    overflow-y:auto;
}
.question-sidebar.active {
    right:0;
}
.question-nav-backdrop {
    display:none;
}
body.question-nav-open {
    overflow:hidden;
}
.sidebar-header {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:20px;
}
.question-grid {
    display:grid;
    grid-template-columns:repeat(5,1fr);
    gap:10px;
}
.question-number {
    width:40px;
    height:40px;
    border-radius:50%;
    background:#f1f5f9;
    color:#334155;
    border:none;
    cursor:pointer;
    transition:.2s;
}
.question-number:hover {
    background:#dbeafe;
}
.question-number.selected {
    background:var(--accent);
    color:white;
}
.question-sidebar h3 {
    margin-top:0;
}
.question-grid {
    display:grid;
    grid-template-columns:    repeat(5,1fr);
    gap:10px;
}.question-number {
    height:40px;    
    border-radius:50%;
    border:none;
    background:#edf3fa;
    color:var(--heading);
    cursor:pointer;
    font-weight:700;
}
.question-number.selected {
    background:var(--accent);    
    color:white;
}
/* ==========================
LOCK
========================== */
.question-card {
    position:relative;
}
.locked-layer {
    position:absolute;    inset:0;    
    background:rgba(255,255,255,.85);    
    display:flex;    
    align-items:center;    
    justify-content:center;    
    z-index:5;    
    border-radius:20px;
}
.locked-box {
    text-align:center;    
    background:white;    
    padding:35px;    
    border-radius:18px;    
    box-shadow:0 15px 40px rgba(0,0,0,.15);
}
.unlock-button {
    display:inline-block;    
    background:var(--accent);    
    color:white;    
    padding:12px 25px;    
    border-radius:10px;    
    text-decoration:none;    
    font-weight:700;
}
.blur-content {
    filter:blur(5px);    
    pointer-events:none;
}
/* ==========================
FOOTER
========================== */
.navigation {
    display:flex;    
    justify-content:space-between;
    margin-top:25px;
}
.navigation button {
    padding:14px 30px;    
    border:none;    
    background:var(--accent);    
    color:white;    
    border-radius:12px;    
    font-weight:700;    
    cursor:pointer;
}.navigation button:disabled {
    background:#dbe7f2;    
    color:#718096;
}
/* MOBILE */
@media (max-width: 900px) {
    .exam-container {
        grid-template-columns: 1fr;
    }

    .exam-main {
        width: 100%;
        padding: 12px 10px 28px;
    }

    .exam-page {
        font-size: 14px;
    }

    .exam-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .exam-topbar-inner {
        height: 3.25rem;
        padding: 0 0.65rem;
    }

    .exam-meta h1 {
        font-size: 0.95rem;
    }

    .exam-meta p {
        font-size: 0.72rem;
    }

    .question-count {
        font-size: 13px;
    }

    .mode-button {
        font-size: 0.78rem;
        padding: 8px 10px;
    }

    .subject-pill {
        font-size: 11px;
        padding: 6px 11px;
    }

    .question-title h1,
    .question-title .question-heading,
    .question-title h2 {
        font-size: 1.05rem;
        line-height: 1.4;
        margin-bottom: 18px;
    }

    .answer {
        padding: 12px 14px;
        gap: 12px;
        font-size: 0.875rem;
        border-radius: 12px;
    }

    .answer-text {
        font-size: 0.875rem;
        line-height: 1.35;
    }

    .answer-letter {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .question-tools button {
        font-size: 0.78rem;
        padding: 8px 12px;
    }

    .question-tools {
        flex-direction: column;
        align-items: stretch;
    }

    .question-tools__nav {
        margin-left: 0;
        width: 100%;
    }

    .question-tools__nav .previousButton,
    .question-tools__nav .nextButton,
    .question-tools__nav .finish-exam-button {
        flex: 1;
        min-width: 0;
        text-align: center;
    }

    .navigation button {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .question-nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 280;
        background: rgba(15, 23, 42, 0.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }

    .question-nav-backdrop.is-visible {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    .question-sidebar {
        position: fixed;
        top: 0;
        right: -105%;
        width: min(320px, 92vw);
        max-width: 320px;
        height: 100dvh;
        z-index: 300;
        padding: 16px;
        padding-top: calc(var(--exam-site-header-offset) + var(--exam-topbar-block-height) + 8px);
        border-left: 1px solid #e5e7eb;
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
        transition: right 0.3s ease;
    }

    .question-sidebar.active {
        right: 0;
    }
}
.answer-status{
    margin-left:auto;
    font-size:22px;
    font-weight:900;
    display:none;
    color:var(--success);
}
.answer.correct .answer-status{
    display:block;
}
.answer.correct{
    border-color:var(--success);
    background:#E9F8F0;
}
.answer.correct .answer-letter{
    background:var(--success);
    color:white;
}
.answer.incorrect{
    border-color:var(--error);
    background:#FDECEC;
}
.answer.incorrect .answer-letter{
    background:var(--error);
    color:white;
}
.correct-answer-display{
    background:#E9F8F0;
    border-left:
    5px solid var(--success);
    padding:16px 20px;
    border-radius:10px;
    margin-bottom:20px;
    color:#155724;
    font-size:16px;
}

/* Layout utilities (replaces Tailwind CDN on this page) */
.exam-shell {
    background: var(--bg);
    color: var(--heading);
    -webkit-font-smoothing: antialiased;
    font-family: Inter, "Roboto", sans-serif;
    --exam-site-header-offset: 76px;
    --exam-topbar-block-height: calc(4rem + 4px);
    --exam-subscribe-sticky-gap: 8px;
}
.exam-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;
}
.exam-main {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 15px 40px;
}
.exam-topbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: var(--exam-site-header-offset);
    z-index: 180;
}
.exam-topbar-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
    height: 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.exam-topbar nav {
    display: flex;
    gap: 2rem;
    min-width: 0;
    flex: 1;
}
.exam-topbar-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-shrink: 0;
}
.question-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .5rem;
    border-radius: .5rem;
    border: none;
    background: #f1f5f9;
    color: #334155;
    cursor: pointer;
    transition: background .15s ease;
}
.question-toggle:hover {
    background: #e2e8f0;
}
.question-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
}
.exam-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}
@media (min-width: 1024px) {
    .exam-layout {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }
    .question-area {
        grid-column: span 9 / span 9;
    }
}
.weak-areas-panel {
    margin: 1rem 0 1.25rem;
}
.weak-areas-panel h4 {
    font-size: .875rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: .5rem;
}
.weak-areas-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.weak-area-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    background: #fff1f2;
    padding: .25rem .75rem;
    font-size: .75rem;
    font-weight: 600;
    color: #be123c;
    border: none;
    cursor: pointer;
}
.weak-areas-empty {
    font-size: .875rem;
    color: #64748b;
}
.weak-areas-empty.hidden {
    display: none;
}
.finish-exam-button {
    border-radius: .5rem;
    background: #0f172a;
    color: #fff;
    font-weight: 600;
    padding: .5rem 1rem;
    border: none;
    cursor: pointer;
}
.finish-exam-button.hidden {
    display: none;
}

/* Override global button reset inside exam page */
.exam-page button.answer {
    background: #fff;
    border: 2px solid #e4edf7;
    color: var(--heading);
}
.exam-page .answer-text {
    color: #2D465E;
}
.exam-page .answer:hover {
    border-color: var(--accent);
    background: #f5faff;
}
.exam-page .answer.selected {
    border-color: var(--accent);
    background: var(--accent-light);
}
.exam-page .question-number {
    background: #fff;
    border: 2px solid #dbe7f2;
    color: var(--heading);
    box-shadow: none;
}
.exam-page .question-number.is-correct {
    border-color: var(--success);
    background: var(--success-bg);
    color: #155724;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--success) 28%, transparent);
}
.exam-page .question-number.is-incorrect {
    border-color: var(--error);
    background: var(--error-bg);
    color: #9b1c1c;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--error) 24%, transparent);
}
.exam-page .question-number.selected {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 40%, transparent);
}
.exam-page .question-number.selected.is-correct {
    box-shadow:
        0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent),
        0 0 0 5px color-mix(in srgb, var(--success) 35%, transparent);
}
.exam-page .question-number.selected.is-incorrect {
    box-shadow:
        0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent),
        0 0 0 5px color-mix(in srgb, var(--error) 30%, transparent);
}
.question-nav-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin: 0 0 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
}
.question-nav-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.question-nav-legend__item::before {
    content: '';
    width: 0.875rem;
    height: 0.875rem;
    border-radius: 50%;
    border: 2px solid #dbe7f2;
    background: #fff;
    flex-shrink: 0;
}
.question-nav-legend__item--current::before {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent);
}
.question-nav-legend__item--correct::before {
    border-color: var(--success);
    background: var(--success-bg);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--success) 28%, transparent);
}
.question-nav-legend__item--incorrect::before {
    border-color: var(--error);
    background: var(--error-bg);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--error) 24%, transparent);
}
.exam-page .mode-button.active {
    background: #fff;
    color: var(--accent-dark);
}

[data-theme="dark"] .exam-shell {
    background: var(--bg);
    color: var(--heading);
}
[data-theme="dark"] .exam-topbar {
    background: var(--surface);
    border-bottom-color: var(--border);
}
[data-theme="dark"] .exam-page button.answer,
[data-theme="dark"] .exam-page .answer {
    background: var(--surface);
    border-color: var(--border);
    color: var(--heading);
}
[data-theme="dark"] .exam-page .answer-text {
    color: var(--heading);
}
[data-theme="dark"] .exam-page .answer:hover {
    background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}
[data-theme="dark"] .exam-page .answer-letter {
    background: var(--accent-light);
    color: var(--accent);
}
[data-theme="dark"] .exam-meta h1 {
    color: var(--heading);
}
[data-theme="dark"] .exam-meta p {
    color: var(--text-muted);
}
