body.exam-page-body {
    min-height: 100vh;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    background:
        radial-gradient(circle at top left, rgba(198, 58, 50, 0.08), transparent 30%),
        radial-gradient(circle at top right, rgba(15, 48, 71, 0.12), transparent 24%),
        var(--bg-body);
}

body.exam-page-body [hidden] {
    display: none !important;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 30px;
    z-index: 1600;
    max-width: min(520px, calc(100vw - 28px));
    padding: 12px 18px;
    border-radius: 999px;
    background: var(--secondary-color);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.45;
    text-align: center;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.2);
    opacity: 0;
    pointer-events: auto;
    cursor: copy;
    transform: translateX(-50%) translateY(20px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.is-copied {
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.22), 0 16px 38px rgba(15, 23, 42, 0.2);
}

.exam-hero {
    max-width: 1340px;
    margin: 0 auto;
    padding: 28px 20px 12px;
}

.exam-hero-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
}

.exam-eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(15, 48, 71, 0.08);
    color: var(--secondary-color);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

button.exam-eyebrow,
.exam-hero-chip-btn {
    cursor: pointer;
    font: inherit;
}

button.exam-eyebrow {
    border: 0;
}

.exam-title {
    margin-top: 16px;
    font-size: clamp(34px, 4vw, 46px);
    line-height: 1.05;
    color: var(--text-main);
}

.exam-topic {
    margin-top: 10px;
    color: var(--text-main);
    font-size: 18px;
    font-weight: 600;
}

.exam-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--secondary-color);
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.exam-hero-back-btn,
.exam-hero-chip-btn {
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.exam-eyebrow-back {
    gap: 8px;
    padding-left: 12px;
}

.exam-eyebrow-back svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.exam-hero-chip-btn {
    border: 1px solid var(--border-color);
}

.exam-hero-back-btn:hover,
.exam-hero-back-btn:focus-visible,
.exam-hero-chip-btn:hover,
.exam-hero-chip-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.exam-hero-back-btn:focus-visible,
.exam-hero-chip-btn:focus-visible {
    outline: 2px solid rgba(198, 58, 50, 0.24);
    outline-offset: 2px;
}

.exam-hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.exam-hero-mobile-timer {
    display: none;
}

.exam-shell {
    max-width: 1340px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) 360px;
    gap: 24px;
    padding: 14px 20px 42px;
    align-items: start;
}

.exam-main,
.exam-sidebar {
    display: grid;
    gap: 20px;
}

@media (min-width: 1121px) {
    .exam-sidebar {
        position: sticky;
        top: 86px;
        max-height: calc(100vh - 102px);
        overflow-y: auto;
        overscroll-behavior: contain;
        align-self: start;
        scrollbar-gutter: stable;
        padding: 1px 2px 12px;
        margin: -1px -2px 0;
        scroll-padding-bottom: 12px;
    }
}

.exam-overview-card,
.exam-question-card,
.exam-side-card {
    background: var(--bg-card);
    border: 1px solid rgba(229, 231, 235, 0.94);
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
}

.exam-overview-card {
    padding: 20px 22px;
}

body.dark-mode .exam-overview-card {
    background: var(--bg-card);
    border-color: rgba(148, 163, 184, 0.34);
    color: var(--text-main);
}

.exam-section-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.exam-section-card-meta {
    margin-top: 8px;
    color: var(--text-sub);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
}

body.dark-mode .exam-section-card-meta {
    color: var(--text-sub);
}

.exam-section-nav {
    display: inline-flex;
    gap: 10px;
    justify-content: flex-end;
}

.exam-section-nav-btn {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: #fff;
    color: var(--secondary-color);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
}

.exam-section-nav-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.15;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.exam-section-nav-btn:hover,
.exam-section-nav-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.exam-section-nav-btn:focus-visible {
    outline: 2px solid rgba(198, 58, 50, 0.24);
    outline-offset: 2px;
}

.exam-section-nav-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

body.dark-mode .exam-section-nav-btn {
    background: var(--bg-control);
    border-color: rgba(148, 163, 184, 0.42);
    color: #7dd3fc;
}

body.dark-mode .exam-section-nav-btn:disabled {
    background: var(--bg-elevated);
    color: rgba(203, 213, 225, 0.52);
}

.exam-overview-label,
.exam-side-label {
    color: var(--text-sub);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.exam-instructions {
    margin-top: 14px;
    padding: 18px 20px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(198, 58, 50, 0.06), rgba(15, 48, 71, 0.03));
    color: var(--text-main);
    line-height: 1.78;
}

.exam-instructions p + p {
    margin-top: 12px;
}

.exam-question-card {
    overflow: hidden;
}

.exam-scroll-layout {
    display: grid;
    gap: 20px;
}

.exam-scroll-layout[hidden] {
    display: none;
}

.exam-scroll-section {
    display: grid;
    gap: 16px;
}

.exam-scroll-section-page {
    gap: 18px;
}

.exam-scroll-section-head,
.exam-scroll-question-card {
    background: var(--bg-card);
    border: 1px solid rgba(229, 231, 235, 0.94);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.exam-scroll-section-head {
    padding: 18px 22px;
}

.exam-scroll-section-head h2 {
    margin: 0;
    color: var(--text-main);
    font-size: 18px;
    line-height: 1.35;
}

.exam-scroll-section-copy {
    margin-top: 10px;
    color: var(--text-main);
    line-height: 1.72;
}

.exam-scroll-question-card {
    scroll-margin-top: 88px;
}

.exam-question-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 22px 14px;
    border-bottom: 1px solid rgba(229, 231, 235, 0.92);
    background: linear-gradient(90deg, rgba(198, 58, 50, 0.08), rgba(15, 48, 71, 0.04));
}

.exam-question-kicker {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.exam-question-point-note {
    margin-top: 6px;
    color: var(--text-sub);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.exam-progress-copy {
    display: none;
    margin-top: 8px;
    color: var(--text-main);
    font-size: 18px;
    font-weight: 850;
    line-height: 1.1;
}

.exam-question-head > .exam-progress-copy {
    margin-top: 0;
    align-self: center;
}

.exam-question-report-btn {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(198, 58, 50, 0.24);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--primary-color);
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.exam-question-report-btn:hover:not(:disabled) {
    border-color: rgba(198, 58, 50, 0.48);
    background: rgba(198, 58, 50, 0.08);
}

.exam-question-report-btn:disabled {
    cursor: default;
    opacity: 0.58;
}

.exam-question-report-btn.is-done {
    color: #047857;
    border-color: rgba(4, 120, 87, 0.28);
    background: rgba(4, 120, 87, 0.08);
}

.learning-question-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.exam-report-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483500;
    display: grid;
    place-items: center;
    padding: 18px;
    background: var(--scrim-color);
}

.exam-report-dialog {
    width: min(440px, 100%);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
    padding: 20px;
}

.exam-report-title {
    color: var(--text-main);
    font-size: 18px;
    font-weight: 850;
}

.exam-report-field {
    display: grid;
    gap: 8px;
    margin-top: 16px;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 800;
}

.exam-report-select,
.exam-report-textarea {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-main);
    font: inherit;
}

.exam-report-select {
    min-height: 42px;
    padding: 0 12px;
}

.exam-report-textarea {
    min-height: 112px;
    padding: 12px;
    resize: vertical;
    line-height: 1.55;
}

.exam-report-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.exam-progress-bar {
    margin: 18px 22px 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

.exam-progress-segments {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 18px;
    min-width: 100%;
}

.exam-progress-segment {
    flex: 1 1 0;
    min-width: 8px;
    height: 16px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 48, 71, 0.08);
    cursor: pointer;
    opacity: 0.32;
    transition: opacity 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.exam-progress-segment:hover,
.exam-progress-segment:focus-visible {
    opacity: 0.8;
    outline: none;
    box-shadow: 0 0 0 3px rgba(207, 61, 51, 0.16);
}

.exam-progress-segment.is-answered {
    background: rgba(207, 61, 51, 0.34);
    opacity: 0.48;
}

.exam-progress-segment.is-current {
    background: linear-gradient(90deg, var(--primary-color), #ee7f63);
    box-shadow: 0 4px 12px rgba(207, 61, 51, 0.24);
    opacity: 1;
    transform: translateY(-1px);
}

.exam-progress-segment.is-current.is-unanswered {
    background: linear-gradient(90deg, #d7a04b, #ee7f63);
}

.exam-progress-segment.is-correct {
    background: rgba(33, 150, 83, 0.34);
}

.exam-progress-segment.is-wrong {
    background: rgba(207, 61, 51, 0.34);
}

.exam-progress-segment.is-neutral {
    background: rgba(15, 48, 71, 0.14);
}

.exam-progress-segment.is-current.is-correct {
    background: linear-gradient(90deg, #1f9d57, #6fcf97);
}

.exam-progress-segment.is-current.is-wrong {
    background: linear-gradient(90deg, var(--primary-color), #ee7f63);
}

.exam-progress-segment.is-current.is-neutral {
    background: linear-gradient(90deg, #6c7884, #a0aab4);
}

body.dark-mode .exam-progress-segment {
    background: rgba(226, 232, 240, 0.28);
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.22);
    opacity: 0.56;
}

body.dark-mode .exam-progress-segment:hover,
body.dark-mode .exam-progress-segment:focus-visible {
    opacity: 0.88;
    box-shadow:
        inset 0 0 0 1px rgba(226, 232, 240, 0.34),
        0 0 0 3px rgba(56, 189, 248, 0.18);
}

body.dark-mode .exam-progress-segment.is-answered {
    background: rgba(248, 113, 113, 0.5);
    box-shadow: inset 0 0 0 1px rgba(252, 165, 165, 0.36);
    opacity: 0.72;
}

body.dark-mode .exam-progress-segment.is-current {
    background: linear-gradient(90deg, #f87171, #fb923c);
    box-shadow: 0 5px 16px rgba(248, 113, 113, 0.3);
    opacity: 1;
}

body.dark-mode .exam-progress-segment.is-current.is-unanswered {
    background: linear-gradient(90deg, #f59e0b, #fb7185);
}

body.dark-mode .exam-progress-segment.is-correct {
    background: rgba(52, 211, 153, 0.5);
    box-shadow: inset 0 0 0 1px rgba(110, 231, 183, 0.36);
}

body.dark-mode .exam-progress-segment.is-wrong {
    background: rgba(248, 113, 113, 0.5);
    box-shadow: inset 0 0 0 1px rgba(252, 165, 165, 0.36);
}

body.dark-mode .exam-progress-segment.is-neutral {
    background: rgba(203, 213, 225, 0.34);
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.28);
}

.exam-question-stage {
    --exam-question-inline-padding: 22px;
    padding: 20px 22px 0;
}

.exam-question-content,
#exam-server-answer,
#exam-explanation {
    color: var(--text-main);
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.exam-option-text,
.exam-binary-text {
    color: var(--text-main);
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
}

.ahust-otp-answer {
    color: #7c3aed;
    font-weight: 800;
}

.exam-question-content {
    font-size: 17px;
    line-height: 1.74;
}

/* Style KaTeX của nội dung câu hỏi nằm ở /general/question-display.css. */

.exam-question-context {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.exam-context-block {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(147, 197, 253, 0.58);
    background: #eff6ff;
}

.exam-context-section {
    border-color: rgba(203, 213, 225, 0.9);
    background: #f8fafc;
}

body.dark-mode .exam-context-block {
    border-color: rgba(147, 197, 253, 0.34);
    background: var(--bg-card);
}

body.dark-mode .exam-context-section {
    border-color: rgba(148, 163, 184, 0.3);
    background: var(--bg-elevated);
}

body.dark-mode .exam-context-block h2,
body.dark-mode .exam-context-section h2 {
    color: var(--text-main);
}

.exam-context-label {
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.exam-context-copy {
    margin-top: 8px;
    color: var(--text-main);
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.exam-context-figure {
    margin: 12px 0 0;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(229, 231, 235, 0.94);
    background: #fff;
    text-align: center;
}

.exam-context-figure img {
    display: inline-block;
    width: auto;
    height: auto;
    max-width: min(100%, 920px);
    max-height: none;
    object-fit: contain;
}

.exam-question-content p + p,
.exam-option-body p + p,
#exam-server-answer p + p,
#exam-explanation p + p {
    margin-top: 10px;
}

/* Style bảng HTML của nội dung câu hỏi nằm ở /general/question-display.css. */

.exam-question-content img,
.exam-option-text img,
#exam-server-answer img,
#exam-explanation img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(100%, 920px);
    max-height: none;
    margin: 12px 0;
    border-radius: 10px;
    object-fit: contain;
}

.exam-question-figure,
.exam-answer-figure,
.exam-solution-figure {
    margin-top: 14px;
    padding: 14px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(229, 231, 235, 0.94);
    text-align: center;
}

.exam-question-figure img,
.exam-answer-figure img,
.exam-solution-figure img {
    display: inline-block;
    width: auto;
    height: auto;
    max-width: min(100%, 920px);
    max-height: none;
    border-radius: 10px;
    object-fit: contain;
}

.exam-options {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.exam-answer-sheet {
    gap: 0;
    overflow: hidden;
    border: 2px solid rgba(15, 48, 71, 0.72);
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.exam-binary-row {
    display: grid;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(15, 48, 71, 0.03);
    border: 1px solid rgba(229, 231, 235, 0.94);
}

.exam-binary-sheet-head {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 56px 56px;
    min-height: 44px;
    align-items: center;
    font-size: 13px;
    font-weight: 900;
    text-align: center;
    border-bottom: 1px solid rgba(198, 58, 50, 0.28);
    background: rgba(198, 58, 50, 0.1);
    color: var(--text-main);
}

.exam-binary-sheet-head span {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    padding: 0 8px;
}

.exam-binary-sheet-head span + span {
    border-left: 1px solid rgba(15, 48, 71, 0.24);
}

.exam-answer-sheet--matrix .exam-binary-row {
    grid-template-columns: 48px minmax(0, 1fr) 112px;
    gap: 0;
    min-height: 58px;
    padding: 0;
    border: 0;
    border-top: 1px solid rgba(15, 48, 71, 0.22);
    border-radius: 0;
}

.exam-answer-sheet--matrix .exam-binary-statement {
    display: contents;
}

.exam-answer-sheet--matrix .exam-binary-label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    border-right: 1px solid rgba(15, 48, 71, 0.18);
    font-size: 17px;
    font-weight: 900;
}

.exam-answer-sheet--matrix .exam-binary-text {
    display: block;
    align-content: center;
    min-width: 0;
    min-height: 58px;
    padding: 10px 14px;
    border-right: 1px solid rgba(15, 48, 71, 0.18);
    line-height: 1.72;
    text-align: left;
    overflow-wrap: break-word;
}

.exam-question-stage > .exam-answer-sheet--matrix {
    width: calc(100% + (2 * var(--exam-question-inline-padding)));
    max-width: none;
    margin-right: calc(-1 * var(--exam-question-inline-padding));
    margin-left: calc(-1 * var(--exam-question-inline-padding));
    border-right: 0;
    border-left: 0;
    border-radius: 0;
}

.exam-question-stage > .exam-answer-sheet--matrix.is-card-tail {
    border-radius: 0 0 17px 17px;
}

.exam-answer-sheet--matrix .exam-binary-choices {
    grid-template-columns: repeat(2, 56px);
    gap: 0;
}

.exam-answer-sheet--matrix .exam-binary-choice {
    min-height: 58px;
    gap: 0;
    border: 0;
    border-radius: 0;
}

.exam-answer-sheet--matrix .exam-binary-choice + .exam-binary-choice {
    border-left: 1px solid rgba(15, 48, 71, 0.18);
}

.exam-answer-sheet--matrix .exam-binary-choice span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.exam-answer-sheet--matrix .exam-binary-marker {
    width: 20px;
    height: 20px;
}

.exam-binary-statement {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    color: var(--text-main);
    line-height: 1.72;
}

.exam-binary-label {
    font-size: 16px;
    font-weight: 850;
    text-align: center;
}

.exam-binary-choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.exam-binary-choice {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.42);
    background: #fff;
    color: var(--text-main);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    position: relative;
}

.exam-binary-marker {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid #8b95a5;
    background: #fff;
    position: relative;
}

.exam-binary-choice.is-selected {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.42);
    color: #92400e;
}

.exam-binary-choice.is-selected .exam-binary-marker,
.exam-binary-choice.is-correct .exam-binary-marker,
.exam-binary-choice.is-wrong .exam-binary-marker {
    background: currentColor;
    border-color: currentColor;
}

.exam-binary-choice.is-selected .exam-binary-marker::after,
.exam-binary-choice.is-correct .exam-binary-marker::after,
.exam-binary-choice.is-wrong .exam-binary-marker::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #fff;
    transform: translate(-50%, -50%);
}

.exam-binary-choice.is-correct {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.34);
    color: #047857;
}

.exam-binary-choice.is-wrong {
    background: rgba(198, 58, 50, 0.12);
    border-color: rgba(198, 58, 50, 0.3);
    color: #9f1239;
}

.exam-option.is-disabled {
    cursor: default;
}

@media (hover: hover) and (pointer: fine) {
    .exam-option.is-disabled:not(.is-selected):not(.is-correct):not(.is-wrong):hover {
        background: rgba(15, 48, 71, 0.035);
    }
}

.exam-option.is-selected {
    background: rgba(245, 158, 11, 0.14);
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.28);
}

.exam-option.is-selected .exam-marker-radio,
.exam-option.is-selected .exam-marker-check {
    border-color: #d97706;
    background: #d97706;
}

.exam-option.is-selected .exam-option-label,
.exam-option.is-selected .exam-option-body {
    color: #92400e;
}

.exam-option.is-correct {
    background: rgba(16, 185, 129, 0.12);
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.28);
}

.exam-option.is-correct .exam-option-label,
.exam-option.is-correct .exam-option-body {
    color: #047857;
}

.exam-option.is-correct .exam-marker-radio,
.exam-option.is-correct .exam-marker-check {
    border-color: #16a34a;
    background: #16a34a;
}

.exam-option.is-wrong {
    background: rgba(198, 58, 50, 0.12);
    box-shadow: inset 0 0 0 1px rgba(198, 58, 50, 0.22);
}

.exam-option.is-wrong .exam-option-label,
.exam-option.is-wrong .exam-option-body {
    color: #9f1239;
}

.exam-option.is-wrong .exam-marker-radio,
.exam-option.is-wrong .exam-marker-check {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.exam-option.is-missed {
    background: rgba(245, 158, 11, 0.12);
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.24);
}

.exam-option.is-missed .exam-option-label,
.exam-option.is-missed .exam-option-body {
    color: #b45309;
}

.exam-option.is-missed .exam-marker-radio,
.exam-option.is-missed .exam-marker-check {
    border-color: #d97706;
    background: #d97706;
}

.exam-option.is-selected .exam-marker-radio::after,
.exam-option.is-correct .exam-marker-radio::after,
.exam-option.is-wrong .exam-marker-radio::after,
.exam-option.is-missed .exam-marker-radio::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #fff;
    transform: translate(-50%, -50%);
}

.exam-option.is-selected .exam-marker-check::after,
.exam-option.is-correct .exam-marker-check::after,
.exam-option.is-wrong .exam-marker-check::after,
.exam-option.is-missed .exam-marker-check::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.exam-review-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 18px 22px 0;
}

.exam-review-panel {
    display: grid;
    gap: 0;
    padding: 16px 0 0;
}

.exam-review-block {
    width: 100%;
    margin: 0;
    padding: 16px 22px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
}

.exam-review-text-surface {
    margin-top: 10px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    line-height: 1.72;
}

.exam-review-block h3 {
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 850;
}

.exam-answer-box {
    background: rgba(16, 185, 129, 0.11);
    border: 1px solid rgba(16, 185, 129, 0.24);
    color: #14532d;
}

.exam-solution-box {
    background: rgba(15, 48, 71, 0.045);
    border: 1px solid rgba(15, 48, 71, 0.12);
    color: var(--text-main);
}

.exam-answer-box,
.exam-solution-box {
    border-right: 0;
    border-left: 0;
}

body.dark-mode .exam-answer-box {
    background: rgba(16, 185, 129, 0.13);
    border-color: rgba(16, 185, 129, 0.3);
    color: #d1fae5;
}

body.dark-mode .exam-solution-box {
    background: var(--bg-elevated);
    border-color: rgba(148, 163, 184, 0.14);
    color: var(--text-main);
}

body.dark-mode .exam-review-text-surface {
    background: transparent;
    color: inherit;
}

.exam-review-media-surface {
    margin-top: 14px;
}

.exam-all-answers-box {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.22);
    color: var(--text-main);
}

.exam-all-answers-list {
    display: grid;
    gap: 10px;
}

.exam-all-answer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(245, 158, 11, 0.16);
}

.exam-all-answer-item.is-current {
    border-color: rgba(198, 58, 50, 0.28);
    box-shadow: inset 0 0 0 1px rgba(198, 58, 50, 0.16);
}

.exam-all-answer-number {
    color: var(--text-sub);
    font-size: 14px;
    font-weight: 700;
}

.exam-all-answer-value {
    color: var(--text-main);
    font-size: 15px;
    font-weight: 800;
}

.exam-all-answer-empty {
    color: var(--text-sub);
    line-height: 1.7;
}

body.dark-mode .exam-all-answers-box {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.28);
    color: var(--text-main);
}

body.dark-mode .exam-all-answer-item {
    background: var(--bg-elevated);
    border-color: rgba(148, 163, 184, 0.22);
}

body.dark-mode .exam-all-answer-item.is-current {
    border-color: rgba(248, 113, 113, 0.48);
    box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.22);
}

body.dark-mode .exam-all-answer-number {
    color: var(--text-sub);
}

body.dark-mode .exam-all-answer-value {
    color: var(--text-main);
}

body.dark-mode .exam-all-answer-empty {
    color: var(--text-sub);
}

.exam-question-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 24px 22px 22px;
    flex-wrap: nowrap;
}

.exam-question-actions-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.exam-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.exam-btn.icon {
    width: 46px;
    min-width: 46px;
    padding: 0;
}

.exam-btn.icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.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-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.exam-btn.primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.exam-btn.secondary {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #fff;
}

.exam-btn.subtle {
    background: rgba(15, 48, 71, 0.05);
}

.exam-btn.ghost {
    background: transparent;
}

.exam-btn.wide {
    width: 100%;
}

.exam-btn.is-disabled,
.exam-btn:disabled {
    opacity: 0.76;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    background: #e5e7eb;
    border-color: #e5e7eb;
    color: #94a3b8;
}

.exam-side-card {
    padding: 20px;
}

.exam-side-top {
    display: grid;
    gap: 4px;
}

.exam-status {
    margin-top: 10px;
    font-size: 22px;
    font-weight: 850;
    color: var(--text-main);
}

.exam-status.is-submitted {
    color: #047857;
}

.exam-timer {
    margin-top: 14px;
    font-size: clamp(18px, 2.8vw, 24px);
    font-weight: 900;
    line-height: 1;
    color: var(--secondary-color);
}

.exam-timer.is-warning {
    color: var(--primary-color);
}

.exam-timer-sub {
    margin: 10px 0 18px;
    color: var(--text-sub);
    line-height: 1.65;
}

.exam-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.exam-nav-grid.is-sectioned {
    grid-template-columns: 1fr;
    gap: 16px;
}

.exam-nav-section {
    display: grid;
    gap: 10px;
}

.exam-nav-section-title {
    color: var(--text-sub);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.exam-nav-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
    gap: 10px;
}

.exam-nav-btn {
    min-height: 44px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.exam-nav-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(198, 58, 50, 0.3);
}

.exam-nav-btn.is-current {
    background: rgba(198, 58, 50, 0.12);
    border-color: rgba(198, 58, 50, 0.34);
    color: var(--primary-color);
    box-shadow: inset 0 0 0 2px rgba(198, 58, 50, 0.18);
}

.exam-nav-btn.is-answered {
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.42);
    color: #92400e;
}

.exam-nav-btn.is-current.is-answered {
    background: rgba(245, 158, 11, 0.2);
    color: #92400e;
}

.exam-nav-btn.is-correct {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.32);
    color: #047857;
}

.exam-nav-btn.is-wrong {
    background: rgba(198, 58, 50, 0.12);
    border-color: rgba(198, 58, 50, 0.28);
    color: #9f1239;
}

.exam-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.exam-summary-box {
    padding: 16px;
    border-radius: 16px;
    background: rgba(15, 48, 71, 0.04);
    border: 1px solid rgba(15, 48, 71, 0.08);
}

.exam-summary-number {
    font-size: 30px;
    font-weight: 900;
    color: var(--secondary-color);
}

.exam-summary-text {
    margin-top: 6px;
    color: var(--text-sub);
    font-size: 14px;
}

.exam-result-box {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}

.exam-result-score {
    margin-top: 10px;
    font-size: 25px;
    font-weight: 900;
    color: var(--primary-color);
    line-height: 1.2;
}

.exam-submit-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--scrim-color);
    backdrop-filter: blur(6px);
}

.exam-submit-dialog {
    width: min(100%, 420px);
    padding: 24px;
    border: 1px solid rgba(229, 231, 235, 0.94);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
}

.exam-submit-title {
    color: var(--text-main);
    font-size: 24px;
    font-weight: 900;
    line-height: 1.1;
}

.exam-submit-copy {
    margin-top: 12px;
    color: var(--text-sub);
    line-height: 1.7;
}

.exam-submit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

body.dark-mode .exam-submit-overlay {
    background: var(--scrim-color);
}

body.dark-mode .exam-submit-dialog {
    border-color: rgba(148, 163, 184, 0.32);
    background: var(--bg-elevated);
    box-shadow: 0 24px 80px rgba(2, 6, 23, 0.55);
}

body.dark-mode .exam-submit-title {
    color: var(--text-main);
}

body.dark-mode .exam-submit-copy {
    color: var(--text-sub);
}

body.dark-mode .exam-submit-actions .exam-btn.ghost {
    border-color: rgba(226, 232, 240, 0.36);
    background: var(--bg-control);
    color: var(--text-main);
}

body.dark-mode .exam-submit-actions .exam-btn.ghost:hover:not(:disabled),
body.dark-mode .exam-submit-actions .exam-btn.ghost:focus-visible:not(:disabled) {
    border-color: rgba(226, 232, 240, 0.56);
    background: var(--bg-elevated);
}

body.dark-mode .exam-submit-actions .exam-btn.ghost:disabled {
    border-color: rgba(148, 163, 184, 0.2);
    background: var(--bg-card);
    color: var(--text-sub);
}

.exam-result-copy {
    margin-top: 10px;
    color: var(--text-main);
    line-height: 1.7;
}

.exam-result-box > #exam-toggle-all-answers-btn {
    margin-top: 14px;
}

.exam-result-box .exam-all-answers-box {
    margin-top: 14px;
}

.exam-learning-promo-card {
    order: -1;
}

.exam-learning-promo-copy {
    margin-top: 14px;
    color: var(--text-main);
    line-height: 1.7;
}

.exam-learning-promo-list {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.exam-learning-promo-item {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(15, 48, 71, 0.08);
    background: linear-gradient(180deg, rgba(198, 58, 50, 0.06), rgba(15, 48, 71, 0.03));
}

.exam-learning-promo-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.exam-learning-promo-pills,
.exam-learning-promo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.exam-learning-promo-pill,
.exam-learning-promo-tag {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(15, 48, 71, 0.1);
    background: rgba(255, 255, 255, 0.7);
    color: var(--secondary-color);
    font-size: 12px;
    font-weight: 800;
}

.exam-learning-promo-pill.is-muted {
    color: var(--text-sub);
}

.exam-learning-promo-pill.is-sale {
    background: rgba(198, 58, 50, 0.1);
    border-color: rgba(198, 58, 50, 0.18);
    color: var(--primary-color);
    text-transform: uppercase;
}

.exam-learning-promo-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(15, 48, 71, 0.08);
    overflow: hidden;
}

.exam-learning-promo-logo img {
    width: 74%;
    height: 74%;
    object-fit: contain;
}

.exam-learning-promo-item h3 {
    margin-top: 14px;
    color: var(--text-main);
    font-size: 20px;
    line-height: 1.3;
}

.exam-learning-promo-summary {
    margin-top: 8px;
    color: var(--text-sub);
    line-height: 1.68;
}

.exam-learning-promo-price {
    margin-top: 10px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}

.exam-learning-promo-price-current {
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 900;
}

.exam-learning-promo-price-original {
    color: var(--text-sub);
    font-size: 13px;
    font-weight: 700;
    text-decoration: line-through;
}

.exam-learning-promo-tags {
    margin-top: 12px;
}

.exam-learning-promo-action {
    margin-top: 14px;
    text-decoration: none;
}

@media (max-width: 1120px) {
    .exam-shell {
        grid-template-columns: 1fr;
    }

    .exam-sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
}

@media (max-width: 760px) {
    .exam-section-card-head {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        gap: 12px;
    }

    .exam-section-nav {
        justify-content: flex-end;
    }

    .exam-hero-row {
        flex-direction: column;
        align-items: stretch;
    }

    body.phongthi-exam-page .exam-hero {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(150px, 46%);
        column-gap: 14px;
        row-gap: 10px;
        align-items: center;
    }

    body.phongthi-exam-page .exam-hero > .exam-hero-back-btn {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
    }

    body.phongthi-exam-page .exam-hero > .exam-hero-row {
        display: contents;
    }

    body.phongthi-exam-page .exam-hero > .exam-hero-row > :first-child {
        grid-column: 1;
        grid-row: 2;
        min-width: 0;
    }

    body.phongthi-exam-page .exam-hero > .exam-hero-row > .exam-hero-actions {
        grid-column: 2;
        grid-row: 1 / span 2;
        align-self: stretch;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        min-width: 0;
    }

    body.phongthi-exam-page .exam-hero > .exam-hero-row > .exam-hero-actions .exam-chip {
        max-width: 100%;
        min-height: 44px;
        padding: 8px 14px;
        text-align: center;
        line-height: 1.35;
        white-space: normal;
    }

    body.phongthi-exam-page .exam-hero-mobile-timer {
        display: grid;
        justify-items: center;
        gap: 4px;
        max-width: 100%;
        min-width: min(142px, 100%);
        padding: 10px 14px;
        border: 1px solid rgba(198, 58, 50, 0.14);
        border-radius: 999px;
        background: var(--bg-card);
        color: var(--text-main);
        box-shadow: var(--shadow-sm);
    }

    body.phongthi-exam-page .exam-hero-mobile-timer-label {
        color: var(--text-sub);
        font-size: 11px;
        font-weight: 850;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    body.phongthi-exam-page .exam-hero-mobile-timer-value {
        color: var(--secondary-color);
        font-family: 'Sora', 'Be Vietnam Pro', sans-serif;
        font-size: 14pt;
        font-weight: 900;
        line-height: 1.1;
        font-variant-numeric: tabular-nums;
        letter-spacing: 0;
    }

    body.phongthi-exam-page .exam-hero-mobile-timer-value.is-warning {
        color: var(--primary-color);
    }

    .exam-question-actions {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    .exam-question-actions-right {
        gap: 8px;
        justify-content: flex-end;
    }

    .exam-sidebar,
    .exam-summary-grid {
        grid-template-columns: 1fr;
    }

    .exam-overview-card,
    .exam-question-card,
    .exam-side-card {
        border-radius: 20px;
    }

    .exam-question-content,
    .exam-option-body,
    .exam-binary-statement {
        font-size: 16px;
        line-height: 1.68;
    }

    .exam-review-actions,
    .exam-question-actions {
        padding-left: 18px;
        padding-right: 18px;
    }

    .exam-question-stage {
        --exam-question-inline-padding: 18px;
        padding-left: 18px;
        padding-right: 18px;
    }

    .exam-review-panel {
        padding-left: 0;
        padding-right: 0;
    }

    .exam-review-block {
        padding-left: 18px;
        padding-right: 18px;
    }

    .exam-progress-bar {
        margin-left: 18px;
        margin-right: 18px;
    }

    .exam-binary-choices {
        grid-template-columns: 1fr;
    }

    .exam-binary-sheet-head {
        grid-template-columns: 42px minmax(0, 1fr) 48px 48px;
    }

    .exam-answer-sheet--matrix .exam-binary-row {
        grid-template-columns: 42px minmax(0, 1fr) 96px;
    }

    .exam-answer-sheet--matrix .exam-binary-choices {
        grid-template-columns: repeat(2, 48px);
    }

    .exam-answer-sheet--matrix .exam-binary-label,
    .exam-answer-sheet--matrix .exam-binary-text,
    .exam-answer-sheet--matrix .exam-binary-choice {
        min-height: 58px;
    }

    .exam-answer-sheet--matrix .exam-binary-marker {
        width: 18px;
        height: 18px;
    }

    .exam-submit-actions {
        flex-direction: column-reverse;
    }

    .exam-submit-actions .exam-btn {
        width: 100%;
    }
}

@media print {
    body.exam-page-body * {
        display: none !important;
    }

    body.exam-page-body::before {
        content: "Printing is disabled for this exam.";
        display: block !important;
        padding: 24px;
        color: #111827;
        font: 700 18px/1.5 'Be Vietnam Pro', sans-serif;
    }
}

.exam-question-content .ahust-img-here img,
.exam-review-text-surface .ahust-img-here img {
    display: inline-block;
    margin: 0;
}

.exam-question-content .ahust-img-left,
.exam-review-text-surface .ahust-img-left {
    text-align: left;
}

.exam-question-content .ahust-img-center,
.exam-review-text-surface .ahust-img-center {
    text-align: center;
}

.exam-question-content .ahust-img-right,
.exam-review-text-surface .ahust-img-right {
    text-align: right;
}
