@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');

:root {
    --nimr-green: #159568;
    --nimr-green-dark: #0d7652;
    --nimr-mint: #e6f6ef;
    --nimr-ink: #18251f;
    --nimr-muted: #64746d;
    --nimr-border: #dce7df;
}

/* Landing card in the existing Qudrat tests list */
.sub-buttons a.nimr-launch-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 84px;
    margin: 0 0 20px;
    padding: 14px 20px;
    overflow: hidden;
    color: #fff !important;
    text-decoration: none !important;
    background: linear-gradient(100deg, rgba(12, 107, 76, .98), rgba(20, 151, 99, .97)) !important;
    border: 1px solid rgba(113, 245, 181, .65);
    border-radius: 12px;
    box-shadow: 0 12px 26px rgba(4, 95, 63, .27) !important;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.sub-buttons a.nimr-launch-card::before {
    z-index: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .15), transparent);
}

.sub-buttons a.nimr-launch-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(4, 95, 63, .32) !important;
    filter: brightness(1.03);
}

.nimr-launch-copy,
.nimr-launch-cta {
    position: relative;
    z-index: 1;
}

.nimr-launch-copy {
    display: block;
    text-align: right;
}

.nimr-launch-copy strong {
    display: block;
    color: #fff;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.55;
}

.nimr-launch-copy small {
    display: block;
    margin-top: 3px;
    color: #d5f5e6;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
}

.nimr-launch-cta {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    color: #08734e;
    background: #f4fff9;
    border-radius: 9px;
    box-shadow: 0 2px 0 rgba(0, 0, 0, .06);
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
}

/* Green computer-based exam interface */
body.nimr-exam-mode {
    min-height: 100vh;
    padding: 28px 16px 42px !important;
    color: var(--nimr-ink) !important;
    background: #f2f6f3 !important;
    font-family: 'Cairo', 'Noto Sans Arabic', sans-serif !important;
}

body.nimr-exam-mode .container {
    width: min(1440px, 100%);
    max-width: 1440px !important;
    margin: 0 auto;
    overflow: visible !important;
    color: var(--nimr-ink);
    background: transparent !important;
    border-radius: 20px;
    box-shadow: none !important;
}

body.nimr-exam-mode .container > header {
    display: block;
    padding: 18px 22px 16px !important;
    color: var(--nimr-ink) !important;
    text-align: right;
    background: #fff !important;
    border: 1px solid var(--nimr-border);
    border-top: 5px solid var(--nimr-green);
    border-radius: 14px;
    box-shadow: 0 5px 18px rgba(16, 62, 42, .05);
}

body.nimr-exam-mode .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0;
}

body.nimr-exam-mode .logo-section {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    text-align: right;
}

body.nimr-exam-mode .logo-image {
    width: 48px;
    height: 48px;
    margin: 0;
    overflow: hidden;
    color: var(--nimr-green-dark) !important;
    background: var(--nimr-mint) !important;
    box-shadow: none;
}

body.nimr-exam-mode .logo-image img {
    width: 44px;
    max-width: 44px !important;
    height: 44px;
    object-fit: contain;
}

body.nimr-exam-mode .logo-section h1 {
    margin: 0 !important;
    padding: 0 !important;
    color: #145f45 !important;
    font-size: 22px !important;
    font-weight: 800;
    line-height: 1.45;
}

body.nimr-exam-mode .logo-section p {
    margin: 3px 0 0 !important;
    padding: 0 !important;
    color: #6c7a72 !important;
    font-size: 13px !important;
    line-height: 1.6;
}

body.nimr-exam-mode .contact-info,
body.nimr-exam-mode .header-info {
    display: none !important;
}

body.nimr-exam-mode .timer-container {
    flex: none;
    min-width: 160px;
    margin: 0 !important;
    padding: 7px 14px !important;
    text-align: center;
    background: #effaf4 !important;
    border: 1px solid #b6e4cf;
    border-radius: 12px;
    box-shadow: none !important;
}

body.nimr-exam-mode .timer-container > small {
    display: block;
    color: #577665;
    font-size: 11px;
    font-weight: 700;
}

body.nimr-exam-mode .timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #087a50 !important;
    font-size: 23px !important;
    font-weight: 800;
    line-height: 1.35;
}

body.nimr-exam-mode .timer i {
    color: var(--nimr-green);
    font-size: 17px;
    animation: none;
}

body.nimr-exam-mode .timer.timer-warning {
    color: #a86c00 !important;
}

body.nimr-exam-mode .timer.timer-danger {
    color: #b42318 !important;
    animation: none;
}

body.nimr-exam-mode .nimr-step-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 18px 0 20px;
    padding: 14px 18px;
    background: #e4f4eb;
    border: 1px solid #c5e5d2;
    border-radius: 12px;
}

body.nimr-exam-mode .nimr-step-title {
    color: #125b41;
    font-size: 17px;
    font-weight: 800;
}

body.nimr-exam-mode .nimr-step-meta {
    margin-top: 2px;
    color: #507461;
    font-size: 13px;
}

body.nimr-exam-mode .nimr-section-progress {
    width: min(245px, 34%);
    height: 9px;
    overflow: hidden;
    background: #cbded2;
    border-radius: 20px;
}

body.nimr-exam-mode .nimr-section-progress i {
    display: block;
    height: 100%;
    background: #169668;
    border-radius: inherit;
    transition: width .25s ease;
}

body.nimr-exam-mode .nimr-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    align-items: start;
    gap: 20px;
}

body.nimr-exam-mode .nimr-question-panel,
body.nimr-exam-mode .nimr-sidebar {
    min-width: 0;
    background: #fff !important;
    border: 1px solid #e0e8e2;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(19, 53, 38, .045);
}

body.nimr-exam-mode .nimr-question-panel {
    min-height: 540px;
    padding: 20px 24px 22px;
}

body.nimr-exam-mode .nimr-question-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    color: #51675a;
    border-bottom: 1px solid #edf1ee;
    font-size: 14px;
}

body.nimr-exam-mode .nimr-question-counter {
    color: #0b7950;
    font-weight: 800;
}

body.nimr-exam-mode .nimr-review-button {
    padding: 6px 10px !important;
    color: #526a5b !important;
    background: #fff !important;
    border: 1px solid #d5e0d8 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    font: 700 12px 'Cairo', sans-serif !important;
}

body.nimr-exam-mode .nimr-review-button.is-marked {
    color: #765000 !important;
    background: #fff6db !important;
    border-color: #efd27b !important;
}

body.nimr-exam-mode .questions-container {
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
}

body.nimr-exam-mode .questions-container .question {
    margin: 0 !important;
    padding: 23px 26px 21px !important;
    color: #1c2b23 !important;
    background: #fff !important;
    border: 1px solid #e0e8e2 !important;
    border-right: 4px solid var(--nimr-green) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    transform: none !important;
}

body.nimr-exam-mode .questions-container .question[hidden] {
    display: none !important;
}

body.nimr-exam-mode .verbal-section-context {
    margin: 0 0 18px;
}

body.nimr-exam-mode .verbal-section-context .section-title {
    margin: 0 0 14px;
}

body.nimr-exam-mode .verbal-section-context .reading-passage {
    margin: 0 0 18px;
}

body.nimr-exam-mode .verbal-section-context .reading-passage[hidden] {
    display: none !important;
}

body.nimr-exam-mode .questions-container .question h3 {
    margin: 0 0 18px !important;
    color: #1c2b23 !important;
    font-size: 22px !important;
    font-weight: 700;
    line-height: 1.9;
}

body.nimr-exam-mode .questions-container .options {
    display: grid;
    gap: 11px;
    margin-top: 18px;
}

body.nimr-exam-mode .questions-container .option {
    display: flex;
    align-items: center;
    min-height: 58px;
    margin: 0 !important;
    padding: 10px 15px !important;
    color: #2d4036 !important;
    background: #fff !important;
    border: 1px solid #dce5df !important;
    border-radius: 11px !important;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

body.nimr-exam-mode .questions-container .option:hover {
    background: #f8fcf9 !important;
    border-color: #48aa7b !important;
    transform: none !important;
}

body.nimr-exam-mode .questions-container .option.selected {
    color: #244a37 !important;
    background: #eef9f3 !important;
    border-color: #36a676 !important;
    box-shadow: 0 0 0 2px rgba(22, 150, 104, .08);
}

body.nimr-exam-mode .questions-container .option.correct {
    color: #155724 !important;
    background: #e8f6ed !important;
    border-color: #80c99e !important;
}

body.nimr-exam-mode .questions-container .option.incorrect {
    color: #842029 !important;
    background: #fff0f0 !important;
    border-color: #e5a4a4 !important;
}

body.nimr-exam-mode .option-prefix {
    display: inline-grid;
    flex: none;
    width: 27px;
    height: 27px;
    place-items: center;
    margin-left: 10px;
    color: #63776a !important;
    background: #fff;
    border: 1px solid #a9bbb0;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
}

body.nimr-exam-mode .option.selected .option-prefix {
    color: #fff !important;
    background: #149464;
    border-color: #149464;
}

body.nimr-exam-mode .nimr-question-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
}

body.nimr-exam-mode .nimr-question-actions button,
body.nimr-exam-mode .controls #submit-btn,
body.nimr-exam-mode .nimr-dialog button {
    min-height: 44px;
    padding: 10px 18px !important;
    border: 1px solid #cbd9d0 !important;
    border-radius: 9px !important;
    box-shadow: none !important;
    font: 700 15px 'Cairo', sans-serif !important;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

body.nimr-exam-mode .nimr-question-actions button {
    color: #406251 !important;
    background: #fff !important;
}

body.nimr-exam-mode .nimr-question-actions button:hover:not(:disabled) {
    color: #0d7652 !important;
    background: #f4faf6 !important;
    border-color: #77bd96 !important;
    transform: translateY(-1px);
}

body.nimr-exam-mode .nimr-question-actions button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

body.nimr-exam-mode .nimr-question-actions button.nimr-next-question,
body.nimr-exam-mode .controls #submit-btn {
    color: #fff !important;
    background: #13885d !important;
    border-color: #13885d !important;
}

body.nimr-exam-mode .controls #submit-btn {
    width: 100%;
    margin: 0 !important;
}

body.nimr-exam-mode .controls #submit-btn:hover {
    background: #0d7652 !important;
    border-color: #0d7652 !important;
    transform: translateY(-1px);
}

body.nimr-exam-mode .nimr-sidebar {
    padding: 18px;
}

body.nimr-exam-mode .nimr-sidebar h2 {
    margin: 0 0 4px;
    color: #264535;
    font-size: 17px;
    font-weight: 800;
}

body.nimr-exam-mode .nimr-sidebar-hint {
    margin: 0 0 14px;
    color: #6f8075;
    font-size: 12px;
    line-height: 1.7;
}

body.nimr-exam-mode .progress-container {
    margin: 0 0 14px !important;
    padding: 0 !important;
}

body.nimr-exam-mode .progress-bar {
    height: 9px !important;
    margin-bottom: 7px !important;
    background: #cbded2 !important;
    border: 0 !important;
    border-radius: 20px !important;
}

body.nimr-exam-mode .progress-fill {
    background: #169668 !important;
    border-radius: 20px !important;
}

body.nimr-exam-mode .progress-text {
    color: #64746d !important;
    font-size: 12px;
    font-weight: 700;
}

body.nimr-exam-mode .question-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-content: initial;
    gap: 5px;
    max-height: 340px;
    overflow: auto;
    margin: 0;
    padding: 0;
    background: transparent !important;
    border-radius: 0;
}

body.nimr-exam-mode .question-nav .question-btn {
    display: grid;
    width: 100%;
    min-width: 0;
    max-width: 44px;
    justify-self: center;
    height: 33px;
    padding: 0 !important;
    place-items: center;
    color: #526a5b !important;
    background: #fff !important;
    border: 1px solid #dbe4dd !important;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

body.nimr-exam-mode .question-nav .question-btn.answered:not(.current) {
    color: #0d7652 !important;
    background: #eef9f3 !important;
    border-color: #7bc49b !important;
}

body.nimr-exam-mode .question-nav .question-btn.current {
    color: #fff !important;
    background: #118c5f !important;
    border-color: #118c5f !important;
}

body.nimr-exam-mode .question-nav .question-btn.marked:not(.current) {
    color: #765000 !important;
    background: #fff6db !important;
    border-color: #efd27b !important;
}

body.nimr-exam-mode .nimr-legend {
    display: grid;
    gap: 9px;
    margin-top: 16px;
    padding-top: 14px;
    color: #6c7d72;
    border-top: 1px solid #edf1ee;
    font-size: 12px;
}

body.nimr-exam-mode .nimr-legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

body.nimr-exam-mode .nimr-dot {
    width: 11px;
    height: 11px;
    flex: none;
    background: #118c5f;
    border-radius: 3px;
}

body.nimr-exam-mode .nimr-dot.gray {
    background: #fff;
    border: 1px solid #c8d5cc;
}

body.nimr-exam-mode .nimr-dot.amber {
    background: #f1b73b;
}

body.nimr-exam-mode .nimr-submit-note {
    margin-top: 16px;
    padding: 11px 12px;
    color: #62796a;
    background: #f4faf6;
    border: 1px solid #e0eee5;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.75;
}

body.nimr-exam-mode .controls {
    margin-top: 12px;
    padding: 0 !important;
    text-align: initial;
    background: transparent !important;
    border: 0 !important;
}

/* Stack explanation and submit actions in both shared and legacy exam layouts. */
.controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

body.nimr-exam-mode .controls > button:not(#submit-btn) {
    display: none !important;
}

body.nimr-exam-mode .result.nimr-final-result {
    margin-top: 20px;
    padding: 24px;
    color: #20392c;
    background: #fff;
    border: 1px solid #d7e8dc;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(19, 53, 38, .05);
    text-align: right;
    font-size: 16px;
    font-weight: 500;
}

body.nimr-exam-mode .nimr-final-result h2 {
    margin: 0 0 14px;
    color: #145f45;
    font-size: 23px;
    font-weight: 800;
}

body.nimr-exam-mode .nimr-final-score {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0;
    padding: 14px 16px;
    background: #effaf4;
    border: 1px solid #c5e5d2;
    border-radius: 10px;
    color: #145f45;
    font-size: 20px;
    font-weight: 800;
}

body.nimr-exam-mode .nimr-section-results {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

body.nimr-exam-mode .nimr-section-result {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: #f8fbf9;
    border: 1px solid #e2ece5;
    border-radius: 8px;
}

body.nimr-exam-mode .nimr-save-status {
    margin: 14px 0 0;
    color: #64746d;
    font-size: 12px;
}

body.nimr-exam-mode .nimr-home-button {
    margin-top: 16px;
    padding: 10px 18px;
    color: #fff;
    background: #13885d;
    border: 0;
    border-radius: 9px;
    font: 700 14px 'Cairo', sans-serif;
    cursor: pointer;
}

.nimr-dialog-overlay {
    position: fixed;
    z-index: 10050;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 31, 23, .52);
    backdrop-filter: blur(3px);
}

.nimr-dialog-overlay[hidden],
body.nimr-exam-mode .nimr-step-row[hidden],
body.nimr-exam-mode .nimr-layout[hidden] {
    display: none !important;
}

.nimr-storage-warning {
    position: fixed;
    z-index: 10060;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    direction: rtl;
    color: #24372d;
    background: #f2f6f3;
    font-family: 'Cairo', 'Noto Sans Arabic', sans-serif;
}

.nimr-storage-warning > div {
    width: min(520px, 100%);
    padding: 24px;
    background: #fff;
    border: 1px solid #dce7df;
    border-radius: 14px;
    box-shadow: 0 12px 38px rgba(8, 44, 28, .12);
}

.nimr-storage-warning h1 {
    margin: 0 0 10px;
    color: #145f45;
    font-size: 21px;
}

.nimr-storage-warning p {
    color: #596b60;
    line-height: 1.9;
}

.nimr-storage-warning button {
    margin-top: 10px;
    padding: 10px 18px;
    color: #fff;
    background: #13885d;
    border: 0;
    border-radius: 9px;
    font: 700 14px 'Cairo', sans-serif;
    cursor: pointer;
}

.nimr-dialog {
    width: min(480px, 100%);
    padding: 24px;
    color: #24372d;
    background: #fff;
    border: 1px solid #dce7df;
    border-radius: 15px;
    box-shadow: 0 20px 55px rgba(8, 44, 28, .22);
    text-align: right;
}

.nimr-dialog h2 {
    margin: 0 0 8px;
    color: #145f45;
    font-size: 20px;
    font-weight: 800;
}

.nimr-dialog p {
    margin: 0;
    color: #596b60;
    font-size: 14px;
    line-height: 1.9;
}

.nimr-dialog-actions {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 20px;
}

.nimr-dialog button {
    color: #406251 !important;
    background: #fff !important;
}

.nimr-dialog button.nimr-dialog-primary {
    color: #fff !important;
    background: #13885d !important;
    border-color: #13885d !important;
}

@media (max-width: 760px) {
    .sub-buttons a.nimr-launch-card {
        align-items: stretch;
        flex-direction: column;
        padding: 14px 16px;
    }

    .nimr-launch-copy strong {
        font-size: 17px;
    }

    .nimr-launch-cta {
        width: 100%;
    }

    body.nimr-exam-mode {
        padding: 14px 10px 28px !important;
    }

    body.nimr-exam-mode .container > header {
        padding: 14px !important;
    }

    body.nimr-exam-mode .header-content {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    body.nimr-exam-mode .logo-section h1 {
        font-size: 18px !important;
    }

    body.nimr-exam-mode .timer-container {
        width: 100%;
    }

    body.nimr-exam-mode .nimr-step-row {
        align-items: flex-start;
        flex-direction: column;
    }

    body.nimr-exam-mode .nimr-section-progress {
        width: 100%;
    }

    body.nimr-exam-mode .nimr-layout {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    body.nimr-exam-mode .nimr-sidebar {
        order: -1;
        padding: 14px;
    }

    body.nimr-exam-mode .question-nav {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        max-height: 210px;
    }

    body.nimr-exam-mode .nimr-question-panel {
        min-height: 0;
        padding: 15px;
    }

    body.nimr-exam-mode .questions-container .question {
        padding: 16px !important;
    }

    body.nimr-exam-mode .questions-container .question h3 {
        font-size: 18px !important;
    }

    body.nimr-exam-mode .nimr-question-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    body.nimr-exam-mode .nimr-final-score,
    body.nimr-exam-mode .nimr-section-result {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* Section 1 figures: keep angle labels and graph ticks legible at every viewport. */
body.nimr-exam-mode .section-one-figure {
    box-sizing: border-box;
    overflow: visible;
}

body.nimr-exam-mode .section-one-figure svg {
    display: block;
    height: auto;
    max-width: 100%;
    overflow: visible;
    text-rendering: geometricPrecision;
}

body.nimr-exam-mode .q6-angle-labels,
body.nimr-exam-mode .q15-angle-labels {
    font-size: 22px !important;
}

body.nimr-exam-mode .q9-chart-frame {
    box-sizing: border-box;
}

body.nimr-exam-mode .q9-chart-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

body.nimr-exam-mode .q9-chart-svg {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

body.nimr-exam-mode .q9-axis-labels,
body.nimr-exam-mode .q9-category-labels {
    font-size: 18px !important;
}

@media (max-width: 760px) {
    body.nimr-exam-mode .geometry-figure {
        margin: 8px auto !important;
        padding: 8px !important;
    }

    body.nimr-exam-mode .q6-angle-labels {
        font-size: 26px !important;
    }

    body.nimr-exam-mode .q9-chart-frame {
        margin: 10px auto !important;
        padding: 8px !important;
    }

    body.nimr-exam-mode .q9-axis-labels,
    body.nimr-exam-mode .q9-category-labels {
        font-size: 30px !important;
    }
}


/* Dark theme for the complete sequential exam interface. */
body.nimr-exam-mode.dark-mode {
    --nimr-green: #34d399;
    --nimr-green-dark: #10b981;
    --nimr-mint: #15372b;
    --nimr-ink: #e2e8f0;
    --nimr-muted: #a6b4c4;
    --nimr-border: #334155;
    color: #e2e8f0 !important;
    background: #0b1220 !important;
}

body.nimr-exam-mode.dark-mode .container > header,
body.nimr-exam-mode.dark-mode .timer-container,
body.nimr-exam-mode.dark-mode .nimr-step-row,
body.nimr-exam-mode.dark-mode .nimr-question-panel,
body.nimr-exam-mode.dark-mode .nimr-sidebar,
body.nimr-exam-mode.dark-mode .result.nimr-final-result {
    color: #e2e8f0 !important;
    background: #142033 !important;
    border-color: #334155 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .22) !important;
}

body.nimr-exam-mode.dark-mode .logo-image {
    color: #6ee7b7 !important;
    background: #15372b !important;
}

body.nimr-exam-mode.dark-mode .logo-section h1,
body.nimr-exam-mode.dark-mode .nimr-final-result h2,
body.nimr-exam-mode.dark-mode .nimr-final-score,
body.nimr-exam-mode.dark-mode .nimr-question-counter {
    color: #a7f3d0 !important;
}

body.nimr-exam-mode.dark-mode .logo-section p,
body.nimr-exam-mode.dark-mode .timer-container > small,
body.nimr-exam-mode.dark-mode .nimr-step-meta,
body.nimr-exam-mode.dark-mode .nimr-question-meta,
body.nimr-exam-mode.dark-mode .nimr-sidebar-hint,
body.nimr-exam-mode.dark-mode .nimr-legend,
body.nimr-exam-mode.dark-mode .nimr-save-status {
    color: #a6b4c4 !important;
}

body.nimr-exam-mode.dark-mode .timer {
    color: #6ee7b7 !important;
}

body.nimr-exam-mode.dark-mode .timer.timer-warning {
    color: #fbbf24 !important;
}

body.nimr-exam-mode.dark-mode .timer.timer-danger {
    color: #fca5a5 !important;
}

body.nimr-exam-mode.dark-mode .nimr-step-row {
    background: #102a22 !important;
}

body.nimr-exam-mode.dark-mode .nimr-step-title,
body.nimr-exam-mode.dark-mode .nimr-sidebar h2 {
    color: #a7f3d0 !important;
}

body.nimr-exam-mode.dark-mode .nimr-section-progress,
body.nimr-exam-mode.dark-mode .progress-bar {
    background: #334155 !important;
}

body.nimr-exam-mode.dark-mode .nimr-question-meta,
body.nimr-exam-mode.dark-mode .nimr-legend {
    border-color: #334155 !important;
}

body.nimr-exam-mode.dark-mode .questions-container .question,
body.nimr-exam-mode.dark-mode .questions-container .option,
body.nimr-exam-mode.dark-mode .nimr-review-button,
body.nimr-exam-mode.dark-mode .nimr-question-actions button:not(.nimr-next-question),
body.nimr-exam-mode.dark-mode .question-nav .question-btn {
    color: #e2e8f0 !important;
    background: #1e293b !important;
    border-color: #475569 !important;
}

body.nimr-exam-mode.dark-mode .questions-container .question h3 {
    color: #f1f5f9 !important;
}

body.nimr-exam-mode.dark-mode .questions-container .option:hover,
body.nimr-exam-mode.dark-mode .questions-container .option.selected {
    color: #ecfdf5 !important;
    background: #174332 !important;
    border-color: #34d399 !important;
}

body.nimr-exam-mode.dark-mode .questions-container .option.correct {
    color: #d1fae5 !important;
    background: #064e3b !important;
    border-color: #10b981 !important;
}

body.nimr-exam-mode.dark-mode .questions-container .option.incorrect {
    color: #fee2e2 !important;
    background: #7f1d1d !important;
    border-color: #ef4444 !important;
}

body.nimr-exam-mode.dark-mode .option-prefix {
    color: #cbd5e1 !important;
    background: #0f172a !important;
    border-color: #64748b !important;
}

body.nimr-exam-mode.dark-mode .option.selected .option-prefix {
    color: #052e1b !important;
    background: #6ee7b7 !important;
    border-color: #6ee7b7 !important;
}

body.nimr-exam-mode.dark-mode .nimr-review-button.is-marked,
body.nimr-exam-mode.dark-mode .question-nav .question-btn.marked:not(.current) {
    color: #fde68a !important;
    background: #422006 !important;
    border-color: #a16207 !important;
}

body.nimr-exam-mode.dark-mode .question-nav .question-btn.answered:not(.current) {
    color: #a7f3d0 !important;
    background: #12372b !important;
    border-color: #16835b !important;
}

body.nimr-exam-mode.dark-mode .question-nav .question-btn.current,
body.nimr-exam-mode.dark-mode .nimr-question-actions button.nimr-next-question,
body.nimr-exam-mode.dark-mode .controls #submit-btn,
body.nimr-exam-mode.dark-mode .nimr-home-button {
    color: #fff !important;
    background: #087a50 !important;
    border-color: #10b981 !important;
}

body.nimr-exam-mode.dark-mode .nimr-dot.gray {
    background: #1e293b;
    border-color: #64748b;
}

body.nimr-exam-mode.dark-mode .nimr-submit-note,
body.nimr-exam-mode.dark-mode .nimr-section-result,
body.nimr-exam-mode.dark-mode .nimr-final-score {
    color: #dbeafe !important;
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.nimr-exam-mode.dark-mode .nimr-dialog,
body.nimr-exam-mode.dark-mode .nimr-storage-warning > div {
    color: #e2e8f0 !important;
    background: #142033 !important;
    border-color: #334155 !important;
}

body.nimr-exam-mode.dark-mode .nimr-dialog h2,
body.nimr-exam-mode.dark-mode .nimr-storage-warning h1 {
    color: #a7f3d0 !important;
}

body.nimr-exam-mode.dark-mode .nimr-dialog p,
body.nimr-exam-mode.dark-mode .nimr-storage-warning p {
    color: #cbd5e1 !important;
}

body.nimr-exam-mode.dark-mode .nimr-storage-warning {
    color: #e2e8f0 !important;
    background: #0b1220 !important;
}


/* Shared, content-preserving question media and final answer review styles. */
body.nimr-exam-mode .questions-container .question img,
body.nimr-exam-mode .questions-container .question svg,
body.nimr-exam-mode .questions-container .question canvas,
body.nimr-exam-mode .questions-container .question video,
body.nimr-exam-mode .nimr-answer-review .question img,
body.nimr-exam-mode .nimr-answer-review .question svg,
body.nimr-exam-mode .nimr-answer-review .question canvas,
body.nimr-exam-mode .nimr-answer-review .question video {
    max-width: 100%;
    height: auto;
}

body.nimr-exam-mode .questions-container .question table,
body.nimr-exam-mode .nimr-answer-review .question table {
    max-width: 100%;
    border-collapse: collapse;
}

body.nimr-exam-mode .result.nimr-final-result {
    display: block !important;
}

body.nimr-exam-mode .nimr-answer-review {
    display: grid;
    gap: 14px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #dce7df;
}

body.nimr-exam-mode .nimr-answer-review h2 {
    margin: 0;
    color: #145f45;
    font-size: 20px;
    font-weight: 800;
}

body.nimr-exam-mode .nimr-answer-review-summary {
    margin: 0;
    color: #526a5b;
    font-weight: 700;
}

body.nimr-exam-mode .nimr-answer-review-card {
    padding: 12px;
    background: #f8fbf9;
    border: 1px solid #dce7df;
    border-radius: 12px;
}

body.nimr-exam-mode .nimr-answer-review-status {
    margin-bottom: 9px;
    color: #617267;
    font-size: 13px;
    font-weight: 800;
}

body.nimr-exam-mode .nimr-answer-review-card[data-status="correct"] .nimr-answer-review-status {
    color: #117346;
}

body.nimr-exam-mode .nimr-answer-review-card[data-status="incorrect"] .nimr-answer-review-status {
    color: #a32929;
}

body.nimr-exam-mode .nimr-answer-review-card[data-status="unanswered"] .nimr-answer-review-status {
    color: #8a6415;
}

body.nimr-exam-mode .nimr-answer-review .question {
    margin: 0 !important;
    padding: 12px !important;
}

body.nimr-exam-mode .nimr-review-question-container {
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}

body.nimr-exam-mode .nimr-answer-review-correct-caption {
    margin-top: 9px;
    padding: 9px 11px;
    color: #155724;
    background: #e8f6ed;
    border: 1px solid #b7dfc4;
    border-radius: 8px;
    line-height: 1.8;
}

body.nimr-exam-mode.dark-mode .nimr-answer-review {
    border-color: #345642;
}

body.nimr-exam-mode.dark-mode .nimr-answer-review h2 {
    color: #b8ebcf;
}

body.nimr-exam-mode.dark-mode .nimr-answer-review-summary,
body.nimr-exam-mode.dark-mode .nimr-answer-review-status {
    color: #c9d8ce;
}

body.nimr-exam-mode.dark-mode .nimr-answer-review-card {
    background: #15271d;
    border-color: #345642;
}

body.nimr-exam-mode.dark-mode .nimr-answer-review-correct-caption {
    color: #d5f1df;
    background: #1b392b;
    border-color: #37684c;
}
