body .public-exam-page {
    --preview-blue: #c6e7ff;
    --preview-cyan: #d4f6ff;
    --preview-paper: #fbfbfb;
    --preview-border: #b8d8e6;
    --preview-ink: #173752;
    --preview-active: #145b83;
    background: var(--preview-paper);
}

body .public-exam-page .exam-preview-panel {
    background: var(--preview-paper);
    border-color: var(--preview-border);
    border-radius: 12px;
}

body .public-exam-page .exam-preview-heading {
    background: var(--preview-blue) !important;
    color: var(--preview-ink) !important;
}

body .public-exam-page .exam-preview-heading h1 {
    color: var(--preview-ink);
}

body .public-exam-page .exam-preview-back {
    background: #495057;
    border-color: #495057;
    color: #fff;
}

body .public-exam-page .exam-preview-back:is(:hover, :focus-visible, :active) {
    background: #343a40;
    border-color: #343a40;
    color: #fff;
}

body .public-exam-page .exam-preview-meta span {
    background: var(--preview-paper);
    border-color: var(--preview-border);
}

body .public-exam-page :is(.public-exam-progress, .exam-mobile-slide-controls, .public-match-bank) {
    background: var(--preview-cyan);
    border-color: var(--preview-border);
}

body .public-exam-page :is(.public-exam-progress-meta strong, .public-match-bank h2, .public-match-bank-kicker) {
    color: var(--preview-ink);
}

body .public-exam-page .public-exam-progress-track {
    background: #accfdf;
}

body .public-exam-page :is(.public-exam-progress-track span, .exam-mobile-slide-count, .public-exam-question-nav-btn.is-active:where(:not(.is-answered))) {
    background: var(--preview-active);
    border-color: var(--preview-active);
    color: #fff;
}

body .public-exam-page .exam-preview-question:not(.is-correct, .is-wrong) {
    border-color: var(--preview-border);
}

body .public-exam-page .exam-preview-question-head {
    background: transparent;
    color: var(--preview-ink);
}

body .public-exam-page .exam-preview-question-head h2 {
    color: var(--preview-ink) !important;
    font-weight: 400;
}

body .public-exam-page .exam-preview-option:hover {
    background: var(--preview-cyan);
}

body .public-exam-page .public-exam-submit-bar {
    background: var(--preview-paper);
    border-top: 1px solid var(--preview-border);
    padding-top: 12px;
}

body .public-exam-page .public-exam-submit {
    background: #15803d;
    color: #fff;
    box-shadow: none;
}

body .public-exam-page .public-exam-submit:is(:hover, :focus-visible, :active) {
    background: #166534;
}

body .public-exam-page :is(button, a, input, select):focus-visible {
    outline: 2px solid var(--preview-active) !important;
    outline-offset: 2px;
}

body.public-exam-display {
    background: #f2f7fb;
}

body.public-exam-display .public-exam-page {
    background: transparent;
}

.exam-display-breadcrumbs {
    margin-bottom: 16px;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--preview-border);
}

.exam-display-breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.exam-display-breadcrumbs a {
    color: var(--preview-ink);
}

.exam-display-breadcrumbs a .fa-home {
    color: #198754;
}

.exam-display-breadcrumbs li + li::before {
    content: '›';
    margin-right: 10px;
    color: #74889b;
}

/* Classroom exam history and controls that accompany the shared exam display. */
body.student-page-learn:has(.student-exam-pinned-header) .profile {
    background: #eef5ff;
    padding: 0 0 32px;
}

body.student-page-learn:has(.student-exam-pinned-header) .student-page-divider { display: none; }

body .student-classroom-exam-display {
    padding: 0;
    background: transparent;
}

.student-classroom-exam-display .exam-preview-heading h1 { overflow-wrap: anywhere; }

.student-exam-bank-context-line {
    margin: 0 0 4px;
    color: var(--preview-ink);
    font-size: 13px;
}

.student-exam-bank-history { margin: 0 0 14px; }

.student-exam-bank-history h3 {
    margin: 0 0 8px;
    color: var(--preview-ink);
    font-size: 16px;
    font-weight: 600;
}

.student-exam-bank-history-wrap {
    max-height: 230px;
    overflow: auto;
    border: 1px solid var(--preview-border);
    border-radius: 8px;
}

.student-exam-bank-history table {
    width: 100%;
    min-width: 480px;
    border-collapse: collapse;
    background: #fff;
}

.student-exam-bank-history :is(th, td) {
    padding: 8px 12px;
    border-bottom: 1px solid #e2edf4;
    font-size: 13px;
    text-align: left;
    white-space: nowrap;
}

.student-exam-bank-history th {
    position: sticky;
    top: 0;
    background: #f5f5f0;
    color: var(--preview-ink);
}

.student-exam-bank-history tr:last-child td { border-bottom: 0; }
.student-exam-bank-history .is-empty td { color: #526b81; text-align: center; }
.student-exam-bank-history .is-best-attempt td { background: #eef6ff; }

.student-exam-bank-history-status,
.student-exam-bank-best-label {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 700;
}

.student-exam-bank-best-label { margin-inline-start: 6px; background: #e0edff; color: #0b53c7; }
.student-exam-bank-history-status.is-pass { background: #dcfce7; color: #166534; }
.student-exam-bank-history-status.is-fail { background: #fef2f2; color: #991b1b; }

.student-exam-bank-result,
.student-exam-bank-alert {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid var(--preview-border);
    border-radius: 8px;
    background: #fff;
    color: var(--preview-ink);
}

.student-exam-bank-result.is-pass { border-color: #86efac; }
.student-exam-bank-result.is-fail { border-color: #fecaca; }
.student-exam-bank-alert.is-error { border-color: #fecaca; background: #fff1f2; color: #9f1239; }
.student-exam-bank-alert.is-limit { background: var(--preview-cyan); }
.student-exam-bank-save-note,
.student-exam-bank-review-note { margin: 0 0 8px; color: #526b81; }

.student-exam-bank-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.student-exam-bank-option-content { min-width: 0; overflow-wrap: anywhere; }
.student-exam-bank-option-content .public-exam-option-media { margin: 3px 0; }

.student-exam-bank-fill select {
    width: 100%;
    padding: 8px 9px;
    border: 1px solid var(--preview-border);
    border-radius: 6px;
    background: #fff;
    font: inherit;
}

