/*
 * AHUST Question Display Core
 * Lõi hiển thị nội dung câu hỏi dùng chung cho phòng thi, đề thi, khóa học,
 * bài viết và các màn hình admin có preview/xem câu hỏi.
 *
 * Chuẩn gốc hiện tại lấy từ giao diện phòng thi/đề thi.
 */

:where(
    .exam-question-content,
    .exam-option-text,
    .exam-option-body,
    .exam-binary-text,
    .exam-review-text-surface,
    #exam-server-answer,
    #exam-explanation,
    .cdq-rich,
    .cdq-question-text,
    .cdq-option-text,
    .cdq-solution-text,
    .cdq-option-fallback-raw,
    .article-content,
    .article-question-content,
    .article-question-option-text,
    .learning-copy,
    .learning-item-copy,
    .learning-resource-copy,
    .learning-help-text,
    .learning-mask-description,
    .course-question-result,
    .exam-topic,
    .exam-context-copy,
    .exam-scroll-section-copy,
    .exam-preview-section-copy,
    .ahust-section-description,
    .ahust-solution-body,
    .ahust-rich-content,
    .exam-instructions
) {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

:where(
    .exam-question-card,
    .exam-question-stage,
    .exam-review-panel,
    .exam-review-block,
    .exam-answer-box,
    .exam-solution-box,
    .exam-review-text-surface
) {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
}

:where(
    .exam-question-content,
    .exam-review-text-surface,
    #exam-server-answer,
    #exam-explanation,
    .cdq-rich,
    .ahust-rich-content
) {
    color: var(--text-main);
    white-space: pre-wrap;
}

:where(.exam-option-text, .exam-binary-text) {
    color: var(--text-main);
    white-space: normal;
}

:where(.exam-question-content, .cdq-question-text, .article-question-content, .article-content, .ahust-rich-content) {
    font-size: 17px;
    line-height: 1.74;
}

:where(.exam-option-text, .cdq-option-text, .exam-binary-text) {
    min-width: 0;
}

:where(
    .exam-question-content,
    .exam-option-body,
    .exam-review-text-surface,
    #exam-server-answer,
    #exam-explanation,
    .cdq-rich,
    .article-content,
    .ahust-rich-content
) p + p {
    margin-top: 10px;
}

:where(
    .exam-question-content,
    .exam-option-text,
    .exam-option-body,
    .exam-binary-text,
    .exam-review-text-surface,
    #exam-server-answer,
    #exam-explanation,
    .cdq-rich,
    .article-content,
    .learning-copy,
    .learning-item-copy,
    .learning-resource-copy,
    .learning-help-text,
    .learning-mask-description,
    .course-question-result,
    .exam-topic,
    .exam-context-copy,
    .exam-scroll-section-copy,
    .exam-preview-section-copy,
    .ahust-section-description,
    .ahust-solution-body,
    .ahust-rich-content,
    .exam-instructions
) .katex {
    max-width: 100%;
    overflow: visible;
    vertical-align: baseline;
}

:where(
    .exam-question-content,
    .exam-option-text,
    .exam-option-body,
    .exam-binary-text,
    .exam-review-text-surface,
    #exam-server-answer,
    #exam-explanation,
    .cdq-rich,
    .article-content,
    .learning-copy,
    .learning-item-copy,
    .learning-resource-copy,
    .learning-help-text,
    .learning-mask-description,
    .course-question-result,
    .exam-topic,
    .exam-context-copy,
    .exam-scroll-section-copy,
    .exam-preview-section-copy,
    .ahust-section-description,
    .ahust-solution-body,
    .ahust-rich-content,
    .exam-instructions
) .katex-display {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
    padding-bottom: 0;
}

.katex-display.is-math-overflow {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
    text-align: left;
    -webkit-overflow-scrolling: touch;
}

.ahust-inline-math-scroll-host {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
    white-space: normal;
    -webkit-overflow-scrolling: touch;
}

.katex-display.is-math-overflow,
.ahust-inline-math-scroll-host.is-math-overflow {
    scrollbar-width: none;
}

.katex-display.is-math-overflow::-webkit-scrollbar,
.ahust-inline-math-scroll-host.is-math-overflow::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.exam-option-text.is-math-overflow::-webkit-scrollbar,
.cdq-option-text.is-math-overflow::-webkit-scrollbar {
    height: 6px;
}

.exam-option-text.is-math-overflow::-webkit-scrollbar-track,
.cdq-option-text.is-math-overflow::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.2);
}

.exam-option-text.is-math-overflow::-webkit-scrollbar-thumb,
.cdq-option-text.is-math-overflow::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(71, 85, 105, 0.72);
}

.ahust-math-scrollbar {
    position: relative;
    display: block;
    width: 100%;
    height: 7px;
    margin: 2px 0 5px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.24);
    cursor: ew-resize;
    touch-action: none;
}

.ahust-math-scrollbar-thumb {
    position: absolute;
    top: 1px;
    bottom: 1px;
    min-width: 28px;
    border-radius: inherit;
    background: rgba(71, 85, 105, 0.76);
}

body.dark-mode .ahust-math-scrollbar,
.dark-mode .ahust-math-scrollbar {
    background: rgba(148, 163, 184, 0.3);
}

body.dark-mode .ahust-math-scrollbar-thumb,
.dark-mode .ahust-math-scrollbar-thumb {
    background: rgba(203, 213, 225, 0.72);
}

:where(
    .exam-question-content,
    .exam-option-text,
    .exam-option-body,
    .exam-binary-text,
    .exam-review-text-surface,
    #exam-server-answer,
    #exam-explanation,
    .cdq-rich,
    .article-content,
    .learning-copy,
    .learning-item-copy,
    .learning-resource-copy,
    .learning-help-text,
    .learning-mask-description,
    .course-question-result,
    .exam-topic,
    .exam-context-copy,
    .exam-scroll-section-copy,
    .exam-preview-section-copy,
    .ahust-section-description,
    .ahust-solution-body,
    .ahust-rich-content,
    .exam-instructions
) .katex-display > .katex {
    max-width: 100%;
    overflow: visible;
    white-space: normal;
}

:where(
    .exam-question-content,
    .exam-option-text,
    .exam-option-body,
    .exam-binary-text,
    .exam-review-text-surface,
    #exam-server-answer,
    #exam-explanation,
    .cdq-rich,
    .article-content,
    .learning-copy,
    .learning-item-copy,
    .learning-resource-copy,
    .learning-help-text,
    .learning-mask-description,
    .course-question-result,
    .exam-topic,
    .exam-context-copy,
    .exam-scroll-section-copy,
    .exam-preview-section-copy,
    .ahust-section-description,
    .ahust-solution-body,
    .ahust-rich-content,
    .exam-instructions
) .katex-display > .katex > .katex-html > :is(.base, .katex-base) {
    margin-top: .18em;
    margin-bottom: .18em;
}

.ahust-table-scroll-host {
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
}

.ahust-table-scroll-host.is-table-overflow {
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

:where(
    .exam-question-content,
    .exam-option-text,
    .exam-option-body,
    .exam-binary-text,
    .exam-review-text-surface,
    #exam-server-answer,
    #exam-explanation,
    .cdq-rich,
    .article-content,
    .learning-copy,
    .learning-item-copy,
    .learning-resource-copy,
    .learning-help-text,
    .learning-mask-description,
    .course-question-result,
    .exam-topic,
    .exam-context-copy,
    .exam-scroll-section-copy,
    .exam-preview-section-copy,
    .ahust-section-description,
    .ahust-solution-body,
    .ahust-rich-content,
    .exam-instructions
) .katex .katex-mathml {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    white-space: nowrap;
}

:where(
    .exam-question-content,
    .exam-option-text,
    .exam-option-body,
    .exam-binary-text,
    .exam-review-text-surface,
    #exam-server-answer,
    #exam-explanation,
    .cdq-rich,
    .article-content,
    .learning-copy,
    .learning-item-copy,
    .learning-resource-copy,
    .learning-help-text,
    .learning-mask-description,
    .course-question-result,
    .exam-topic,
    .exam-context-copy,
    .exam-scroll-section-copy,
    .exam-preview-section-copy,
    .ahust-section-description,
    .ahust-solution-body,
    .exam-instructions
) table {
    width: fit-content;
    max-width: 100%;
    margin: 12px auto;
    border-collapse: collapse;
    text-align: center;
    vertical-align: middle;
    white-space: normal;
}

:where(
    .exam-question-content,
    .exam-option-text,
    .exam-option-body,
    .exam-binary-text,
    .exam-review-text-surface,
    #exam-server-answer,
    #exam-explanation,
    .cdq-rich,
    .article-content,
    .learning-copy,
    .learning-item-copy,
    .learning-resource-copy,
    .learning-help-text,
    .learning-mask-description,
    .course-question-result,
    .exam-topic,
    .exam-context-copy,
    .exam-scroll-section-copy,
    .exam-preview-section-copy,
    .ahust-section-description,
    .ahust-solution-body,
    .exam-instructions
) table[align="left"] {
    margin-left: 0;
    margin-right: auto;
}

:where(
    .exam-question-content,
    .exam-option-text,
    .exam-option-body,
    .exam-binary-text,
    .exam-review-text-surface,
    #exam-server-answer,
    #exam-explanation,
    .cdq-rich,
    .article-content,
    .learning-copy,
    .learning-item-copy,
    .learning-resource-copy,
    .learning-help-text,
    .learning-mask-description,
    .course-question-result,
    .exam-topic,
    .exam-context-copy,
    .exam-scroll-section-copy,
    .exam-preview-section-copy,
    .ahust-section-description,
    .ahust-solution-body,
    .exam-instructions
) table[align="right"] {
    margin-left: auto;
    margin-right: 0;
}

:where(
    .exam-question-content,
    .exam-option-text,
    .exam-option-body,
    .exam-binary-text,
    .exam-review-text-surface,
    #exam-server-answer,
    #exam-explanation,
    .cdq-rich,
    .article-content,
    .learning-copy,
    .learning-item-copy,
    .learning-resource-copy,
    .learning-help-text,
    .learning-mask-description,
    .course-question-result,
    .exam-topic,
    .exam-context-copy,
    .exam-scroll-section-copy,
    .exam-preview-section-copy,
    .ahust-section-description,
    .ahust-solution-body,
    .exam-instructions
) table[align="center"] {
    margin-left: auto;
    margin-right: auto;
}

:where(
    .exam-question-content,
    .exam-option-text,
    .exam-option-body,
    .exam-binary-text,
    .exam-review-text-surface,
    #exam-server-answer,
    #exam-explanation,
    .cdq-rich,
    .article-content,
    .learning-copy,
    .learning-item-copy,
    .learning-resource-copy,
    .learning-help-text,
    .learning-mask-description,
    .course-question-result,
    .exam-topic,
    .exam-context-copy,
    .exam-scroll-section-copy,
    .exam-preview-section-copy,
    .ahust-section-description,
    .ahust-solution-body,
    .exam-instructions
) :is(th, td) {
    padding: 10px 12px;
    border: 1px solid rgba(71, 85, 105, 0.38);
    text-align: center;
    vertical-align: middle;
    white-space: normal;
}

:where(
    .exam-question-content,
    .exam-option-text,
    .exam-option-body,
    .exam-binary-text,
    .exam-review-text-surface,
    #exam-server-answer,
    #exam-explanation,
    .cdq-rich,
    .article-content,
    .learning-copy,
    .learning-item-copy,
    .learning-resource-copy,
    .learning-help-text,
    .learning-mask-description,
    .course-question-result,
    .exam-topic,
    .exam-context-copy,
    .exam-scroll-section-copy,
    .exam-preview-section-copy,
    .ahust-section-description,
    .ahust-solution-body,
    .exam-instructions
) th {
    font-weight: 800;
}

:where(.exam-question-content, .exam-option-text, .exam-option-body, .exam-binary-text, .exam-review-text-surface, #exam-server-answer, #exam-explanation, .cdq-rich, .article-content, .learning-copy, .learning-item-copy, .learning-resource-copy, .learning-help-text, .learning-mask-description, .course-question-result, .exam-topic, .exam-context-copy, .exam-scroll-section-copy, .exam-preview-section-copy, .ahust-section-description, .ahust-solution-body, .exam-instructions) :is(th, td)[align="left"] {
    text-align: left;
}

:where(.exam-question-content, .exam-option-text, .exam-option-body, .exam-binary-text, .exam-review-text-surface, #exam-server-answer, #exam-explanation, .cdq-rich, .article-content, .learning-copy, .learning-item-copy, .learning-resource-copy, .learning-help-text, .learning-mask-description, .course-question-result, .exam-topic, .exam-context-copy, .exam-scroll-section-copy, .exam-preview-section-copy, .ahust-section-description, .ahust-solution-body, .exam-instructions) :is(th, td)[align="center"] {
    text-align: center;
}

:where(.exam-question-content, .exam-option-text, .exam-option-body, .exam-binary-text, .exam-review-text-surface, #exam-server-answer, #exam-explanation, .cdq-rich, .article-content, .learning-copy, .learning-item-copy, .learning-resource-copy, .learning-help-text, .learning-mask-description, .course-question-result, .exam-topic, .exam-context-copy, .exam-scroll-section-copy, .exam-preview-section-copy, .ahust-section-description, .ahust-solution-body, .exam-instructions) :is(th, td)[align="right"] {
    text-align: right;
}

:where(.exam-question-content, .exam-option-text, .exam-option-body, .exam-binary-text, .exam-review-text-surface, #exam-server-answer, #exam-explanation, .cdq-rich, .article-content, .learning-copy, .learning-item-copy, .learning-resource-copy, .learning-help-text, .learning-mask-description, .course-question-result, .exam-topic, .exam-context-copy, .exam-scroll-section-copy, .exam-preview-section-copy, .ahust-section-description, .ahust-solution-body, .exam-instructions) :is(th, td)[align="justify"] {
    text-align: justify;
}

:where(.exam-question-content, .exam-option-text, .exam-option-body, .exam-binary-text, .exam-review-text-surface, #exam-server-answer, #exam-explanation, .cdq-rich, .article-content, .learning-copy, .learning-item-copy, .learning-resource-copy, .learning-help-text, .learning-mask-description, .course-question-result, .exam-topic, .exam-context-copy, .exam-scroll-section-copy, .exam-preview-section-copy, .ahust-section-description, .ahust-solution-body, .exam-instructions) :is(th, td)[valign="top"] {
    vertical-align: top;
}

:where(.exam-question-content, .exam-option-text, .exam-option-body, .exam-binary-text, .exam-review-text-surface, #exam-server-answer, #exam-explanation, .cdq-rich, .article-content, .learning-copy, .learning-item-copy, .learning-resource-copy, .learning-help-text, .learning-mask-description, .course-question-result, .exam-topic, .exam-context-copy, .exam-scroll-section-copy, .exam-preview-section-copy, .ahust-section-description, .ahust-solution-body, .exam-instructions) :is(th, td)[valign="middle"] {
    vertical-align: middle;
}

:where(.exam-question-content, .exam-option-text, .exam-option-body, .exam-binary-text, .exam-review-text-surface, #exam-server-answer, #exam-explanation, .cdq-rich, .article-content, .learning-copy, .learning-item-copy, .learning-resource-copy, .learning-help-text, .learning-mask-description, .course-question-result, .exam-topic, .exam-context-copy, .exam-scroll-section-copy, .exam-preview-section-copy, .ahust-section-description, .ahust-solution-body, .exam-instructions) :is(th, td)[valign="bottom"] {
    vertical-align: bottom;
}

:where(.exam-question-content, .exam-option-text, .exam-option-body, .exam-binary-text, .exam-review-text-surface, #exam-server-answer, #exam-explanation, .cdq-rich, .article-content, .learning-copy, .learning-item-copy, .learning-resource-copy, .learning-help-text, .learning-mask-description, .course-question-result, .exam-topic, .exam-context-copy, .exam-scroll-section-copy, .exam-preview-section-copy, .ahust-section-description, .ahust-solution-body, .exam-instructions) :is(th, td)[valign="baseline"] {
    vertical-align: baseline;
}

:where(
    .exam-question-content,
    .exam-option-text,
    .exam-option-body,
    .exam-binary-text,
    .exam-review-text-surface,
    #exam-server-answer,
    #exam-explanation,
    .cdq-rich,
    .article-content,
    .article-question-content,
    .article-question-option-text,
    .learning-copy,
    .learning-item-copy,
    .learning-resource-copy,
    .learning-help-text,
    .learning-mask-description,
    .course-question-result,
    .exam-topic,
    .exam-context-copy,
    .exam-scroll-section-copy,
    .exam-preview-section-copy,
    .ahust-section-description,
    .ahust-solution-body,
    .exam-instructions,
    .duplicate-question-copy,
    .admin-live-preview,
    .admin-preview-modal-body,
    .admin-picker-question-preview,
    .admin-picker-preview-body,
    .admin-question-card
) :is(ul, ol) {
    margin: 0.7em 0 0.9em;
    padding-inline-start: 1.45em;
    list-style-position: outside;
}

:where(
    .exam-question-content,
    .exam-option-text,
    .exam-option-body,
    .exam-binary-text,
    .exam-review-text-surface,
    #exam-server-answer,
    #exam-explanation,
    .cdq-rich,
    .article-content,
    .article-question-content,
    .article-question-option-text,
    .learning-copy,
    .learning-item-copy,
    .learning-resource-copy,
    .learning-help-text,
    .learning-mask-description,
    .course-question-result,
    .exam-topic,
    .exam-context-copy,
    .exam-scroll-section-copy,
    .exam-preview-section-copy,
    .ahust-section-description,
    .ahust-solution-body,
    .exam-instructions,
    .duplicate-question-copy,
    .admin-live-preview,
    .admin-preview-modal-body,
    .admin-picker-question-preview,
    .admin-picker-preview-body,
    .admin-question-card
) li {
    margin: 0.34em 0;
    padding-inline-start: 0.18em;
}

:where(
    .exam-question-content,
    .exam-option-text,
    .exam-option-body,
    .exam-binary-text,
    .exam-review-text-surface,
    #exam-server-answer,
    #exam-explanation,
    .cdq-rich,
    .article-content,
    .article-question-content,
    .article-question-option-text,
    .learning-copy,
    .learning-item-copy,
    .learning-resource-copy,
    .learning-help-text,
    .learning-mask-description,
    .course-question-result,
    .exam-topic,
    .exam-context-copy,
    .exam-scroll-section-copy,
    .exam-preview-section-copy,
    .ahust-section-description,
    .ahust-solution-body,
    .exam-instructions,
    .duplicate-question-copy,
    .admin-live-preview,
    .admin-preview-modal-body,
    .admin-picker-question-preview,
    .admin-picker-preview-body,
    .admin-question-card
) li :is(p, ul, ol) {
    margin-top: 0.38em;
    margin-bottom: 0.38em;
}

:where(
    .exam-question-content,
    .exam-option-text,
    .exam-option-body,
    .exam-binary-text,
    .exam-review-text-surface,
    #exam-server-answer,
    #exam-explanation,
    .cdq-rich,
    .article-content,
    .learning-copy,
    .learning-item-copy,
    .learning-resource-copy,
    .learning-help-text,
    .learning-mask-description,
    .course-question-result,
    .exam-context-copy,
    .exam-scroll-section-copy,
    .exam-preview-section-copy,
    .ahust-section-description,
    .ahust-solution-body,
    .exam-instructions
) img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 10px 0;
    border-radius: 8px;
    object-fit: contain;
}

:where(
    .exam-question-content,
    .exam-option-text,
    .exam-option-body,
    .exam-binary-text,
    .exam-review-text-surface,
    #exam-server-answer,
    #exam-explanation,
    .cdq-rich,
    .article-content,
    .article-question-content,
    .article-question-option-text,
    .learning-copy,
    .learning-item-copy,
    .learning-resource-copy,
    .learning-help-text,
    .learning-mask-description,
    .course-question-result,
    .exam-topic,
    .exam-context-copy,
    .exam-scroll-section-copy,
    .exam-preview-section-copy,
    .ahust-section-description,
    .ahust-solution-body,
    .exam-instructions
) .ahust-img-here {
    display: block;
    max-width: 100%;
    margin: 12px 0;
}

:where(
    .exam-question-content,
    .exam-option-text,
    .exam-option-body,
    .exam-binary-text,
    .exam-review-text-surface,
    #exam-server-answer,
    #exam-explanation,
    .cdq-rich,
    .article-content,
    .article-question-content,
    .article-question-option-text,
    .learning-copy,
    .learning-item-copy,
    .learning-resource-copy,
    .learning-help-text,
    .learning-mask-description,
    .course-question-result,
    .exam-topic,
    .exam-context-copy,
    .exam-scroll-section-copy,
    .exam-preview-section-copy,
    .ahust-section-description,
    .ahust-solution-body,
    .exam-instructions
) .ahust-img-here.ahust-img-left {
    text-align: left;
}

:where(
    .exam-question-content,
    .exam-option-text,
    .exam-option-body,
    .exam-binary-text,
    .exam-review-text-surface,
    #exam-server-answer,
    #exam-explanation,
    .cdq-rich,
    .article-content,
    .article-question-content,
    .article-question-option-text,
    .learning-copy,
    .learning-item-copy,
    .learning-resource-copy,
    .learning-help-text,
    .learning-mask-description,
    .course-question-result,
    .exam-topic,
    .exam-context-copy,
    .exam-scroll-section-copy,
    .exam-preview-section-copy,
    .ahust-section-description,
    .ahust-solution-body,
    .exam-instructions
) .ahust-img-here.ahust-img-center {
    text-align: center;
}

:where(
    .exam-question-content,
    .exam-option-text,
    .exam-option-body,
    .exam-binary-text,
    .exam-review-text-surface,
    #exam-server-answer,
    #exam-explanation,
    .cdq-rich,
    .article-content,
    .article-question-content,
    .article-question-option-text,
    .learning-copy,
    .learning-item-copy,
    .learning-resource-copy,
    .learning-help-text,
    .learning-mask-description,
    .course-question-result,
    .exam-topic,
    .exam-context-copy,
    .exam-scroll-section-copy,
    .exam-preview-section-copy,
    .ahust-section-description,
    .ahust-solution-body,
    .exam-instructions
) .ahust-img-here.ahust-img-right {
    text-align: right;
}

:where(
    .exam-question-content,
    .exam-option-text,
    .exam-option-body,
    .exam-binary-text,
    .exam-review-text-surface,
    #exam-server-answer,
    #exam-explanation,
    .cdq-rich,
    .article-content,
    .article-question-content,
    .article-question-option-text,
    .learning-copy,
    .learning-item-copy,
    .learning-resource-copy,
    .learning-help-text,
    .learning-mask-description,
    .course-question-result,
    .exam-topic,
    .exam-context-copy,
    .exam-scroll-section-copy,
    .exam-preview-section-copy,
    .ahust-section-description,
    .ahust-solution-body,
    .exam-instructions
) .ahust-img-here img {
    display: inline-block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0;
    max-height: none;
    object-fit: contain;
}

.exam-inline-blank,
.cdq-blank {
    display: inline-flex;
    width: min(180px, 100%);
    min-width: 84px;
    min-height: 34px;
    margin: 0 6px;
    vertical-align: middle;
    border-bottom: 2px solid rgba(15, 48, 71, 0.32);
}

.exam-inline-blank-input {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 0 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text-main);
    font: inherit;
    line-height: inherit;
    outline: none;
}

.exam-inline-blank-input::placeholder {
    color: rgba(100, 116, 139, 0.82);
}

.exam-text-answer-note {
    width: 100%;
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px dashed rgba(148, 163, 184, 0.7);
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.9);
    color: var(--text-sub);
    line-height: 1.6;
}

.exam-text-answer:disabled,
.exam-fill-blank-answer:disabled,
.exam-inline-blank-input:disabled {
    cursor: not-allowed;
    opacity: 1;
    -webkit-text-fill-color: currentColor;
}

body.dark-mode .exam-inline-blank,
.dark-mode .cdq-blank,
body.dark-mode .cdq-blank,
.dark-mode .exam-inline-blank {
    border-bottom-color: rgba(125, 211, 252, 0.86);
}

body.dark-mode .exam-inline-blank-input,
.dark-mode .exam-inline-blank-input {
    color: var(--text-main);
    caret-color: #38bdf8;
    -webkit-text-fill-color: currentColor;
}

body.dark-mode .exam-inline-blank-input::placeholder,
.dark-mode .exam-inline-blank-input::placeholder {
    color: rgba(203, 213, 225, 0.72);
}

body.dark-mode .exam-text-answer,
body.dark-mode .exam-fill-blank-answer,
.dark-mode .exam-text-answer,
.dark-mode .exam-fill-blank-answer {
    background: var(--bg-control);
    border-color: rgba(125, 211, 252, 0.58);
    color: var(--text-main);
    caret-color: #38bdf8;
    box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.18);
    -webkit-text-fill-color: currentColor;
}

body.dark-mode .exam-text-answer:focus,
body.dark-mode .exam-fill-blank-answer:focus,
.dark-mode .exam-text-answer:focus,
.dark-mode .exam-fill-blank-answer:focus {
    border-color: rgba(56, 189, 248, 0.9);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18), inset 0 0 0 1px rgba(56, 189, 248, 0.36);
    outline: none;
}

body.dark-mode .exam-text-answer::placeholder,
body.dark-mode .exam-fill-blank-answer::placeholder,
.dark-mode .exam-text-answer::placeholder,
.dark-mode .exam-fill-blank-answer::placeholder {
    color: rgba(203, 213, 225, 0.72);
    -webkit-text-fill-color: rgba(203, 213, 225, 0.72);
}

body.dark-mode .exam-text-answer-note,
.dark-mode .exam-text-answer-note {
    border-color: rgba(125, 211, 252, 0.38);
    background: var(--bg-elevated);
    color: var(--text-sub);
}

.exam-question-card,
.cdq-card {
    border: 1px solid rgba(226, 232, 240, 0.94);
    border-radius: 18px;
    background: var(--bg-card);
    color: var(--text-main);
    overflow: hidden;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

.exam-question-head,
.cdq-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.92);
    background: linear-gradient(90deg, rgba(254, 242, 242, 0.74), rgba(255, 255, 255, 0.72));
}

.exam-question-kicker,
.cdq-question-kicker {
    color: var(--primary-color);
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.exam-question-head-actions {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.exam-essay-info {
    position: relative;
}

.exam-essay-info > summary {
    list-style: none;
}

.exam-essay-info > summary::-webkit-details-marker {
    display: none;
}

.exam-essay-info-btn {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(198, 58, 50, 0.24);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--primary-color);
    cursor: pointer;
}

.exam-essay-info-btn:hover,
.exam-essay-info-btn:focus-visible,
.exam-essay-info.is-open .exam-essay-info-btn,
.exam-essay-info[open] .exam-essay-info-btn {
    border-color: rgba(198, 58, 50, 0.48);
    background: rgba(198, 58, 50, 0.08);
    outline: none;
}

.exam-essay-info-copy {
    position: absolute;
    z-index: 20;
    top: calc(100% + 8px);
    right: 0;
    width: max-content;
    max-width: min(220px, calc(100vw - 32px));
    padding: 8px 11px;
    border: 1px solid rgba(198, 58, 50, 0.22);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text-main);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: none;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.exam-essay-info-copy[hidden] {
    display: none !important;
}

body.dark-mode .exam-essay-info-btn,
.dark-mode .exam-essay-info-btn {
    border-color: rgba(248, 113, 113, 0.34);
    background: var(--bg-control);
    color: #fca5a5;
}

body.dark-mode .exam-essay-info-copy,
.dark-mode .exam-essay-info-copy {
    border-color: rgba(248, 113, 113, 0.28);
    background: var(--bg-elevated);
    color: var(--text-main);
}

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

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

.exam-question-figure img,
.exam-answer-figure img,
.exam-solution-figure img,
.cdq-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,
.cdq-options {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.exam-options.is-adaptive-layout,
.cdq-options.is-adaptive-layout {
    grid-template-columns: repeat(var(--adaptive-option-columns, 1), minmax(0, 1fr));
    gap: 10px;
}

.exam-option,
.cdq-option {
    display: grid;
    grid-template-columns: 26px 34px minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    min-inline-size: 0;
    padding: 12px 10px;
    border: 0;
    margin: 0;
    border-radius: 16px;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    color: var(--text-main);
    font: inherit;
    white-space: normal;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

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

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

.exam-options.is-adaptive-layout .exam-option,
.cdq-options.is-adaptive-layout .cdq-option {
    align-items: center;
    border-radius: 14px;
}

body.dark-mode :where(
    .exam-question-content,
    .exam-option-text,
    .exam-option-body,
    .exam-binary-text,
    .exam-review-text-surface,
    #exam-server-answer,
    #exam-explanation,
    .cdq-rich,
    .article-content,
    .learning-copy,
    .learning-item-copy,
    .learning-resource-copy,
    .learning-help-text,
    .learning-mask-description,
    .course-question-result,
    .exam-topic,
    .exam-context-copy,
    .exam-scroll-section-copy,
    .exam-preview-section-copy,
    .ahust-section-description,
    .ahust-solution-body,
    .exam-instructions
) :is(th, td),
.dark-mode :where(
    .exam-question-content,
    .exam-option-text,
    .exam-option-body,
    .exam-binary-text,
    .exam-review-text-surface,
    #exam-server-answer,
    #exam-explanation,
    .cdq-rich,
    .article-content,
    .learning-copy,
    .learning-item-copy,
    .learning-resource-copy,
    .learning-help-text,
    .learning-mask-description,
    .course-question-result,
    .exam-topic,
    .exam-context-copy,
    .exam-scroll-section-copy,
    .exam-preview-section-copy,
    .ahust-section-description,
    .ahust-solution-body,
    .exam-instructions
) :is(th, td) {
    border-color: rgba(148, 163, 184, 0.42);
}

.exam-option.is-option-compact,
.cdq-option.is-option-compact,
.exam-options.is-adaptive-layout .exam-option.is-option-compact,
.cdq-options.is-adaptive-layout .cdq-option.is-option-compact {
    align-items: center;
}

.exam-option-marker,
.cdq-option-marker {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    margin-top: 0;
}

.exam-marker-radio,
.exam-marker-check,
.cdq-marker-radio,
.cdq-marker-check {
    width: 20px;
    height: 20px;
    position: relative;
    display: inline-block;
    box-sizing: border-box;
    border: 2px solid #8b95a5;
    background: #fff;
}

.exam-marker-radio,
.cdq-marker-radio {
    border-radius: 999px;
}

.exam-marker-check,
.cdq-marker-check {
    border-radius: 6px;
}

.exam-option-label,
.cdq-option-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    min-height: 26px;
    margin-top: 0;
    text-align: center;
    font-size: 16px;
    font-weight: 850;
    line-height: 1.1;
    color: var(--text-main);
    align-self: center;
}

.exam-option.is-option-compact .exam-option-marker,
.cdq-option.is-option-compact .cdq-option-marker,
.exam-option.is-option-compact .exam-option-label,
.cdq-option.is-option-compact .cdq-option-label {
    align-self: center;
    margin-top: 0;
}

.exam-option-body,
.cdq-option-text {
    min-width: 0;
    align-self: center;
    font-size: 17px;
    line-height: 1.72;
}

.exam-option-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 26px;
}

.exam-option.is-option-compact .exam-option-body,
.cdq-option.is-option-compact .cdq-option-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-self: center;
    min-height: 26px;
}

.exam-option-text,
.exam-binary-text,
.cdq-option-text {
    display: block;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: normal;
}

.exam-option-text.is-math-overflow,
.cdq-option-text.is-math-overflow {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.ahust-inline-math-tail {
    display: inline-block;
    white-space: nowrap;
}

.exam-option-text > :first-child,
.exam-binary-text > :first-child,
.cdq-option-text > :first-child {
    margin-top: 0;
}

.exam-option-text > :last-child,
.exam-binary-text > :last-child,
.cdq-option-text > :last-child {
    margin-bottom: 0;
}

.exam-option-figure {
    display: block;
    margin-top: 12px;
}

.exam-option-figure img {
    width: auto;
    height: auto;
    max-width: min(100%, 420px);
    max-height: none;
    border-radius: 10px;
    object-fit: contain;
}

.exam-option.is-selected,
.cdq-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,
.cdq-option.is-selected .cdq-marker-radio,
.cdq-option.is-selected .cdq-marker-check {
    border-color: #d97706;
    background: #d97706;
}

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

.exam-option.is-correct,
.cdq-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,
.cdq-option.is-correct .cdq-option-label,
.cdq-option.is-correct .cdq-option-text {
    color: #047857;
}

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

.exam-option.is-wrong,
.cdq-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,
.cdq-option.is-wrong .cdq-option-label,
.cdq-option.is-wrong .cdq-option-text {
    color: #9f1239;
}

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

.exam-option.is-missed,
.cdq-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,
.cdq-option.is-missed .cdq-option-label,
.cdq-option.is-missed .cdq-option-text {
    color: #b45309;
}

.exam-option.is-missed .exam-marker-radio,
.exam-option.is-missed .exam-marker-check,
.cdq-option.is-missed .cdq-marker-radio,
.cdq-option.is-missed .cdq-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,
.cdq-option.is-selected .cdq-marker-radio::after,
.cdq-option.is-correct .cdq-marker-radio::after,
.cdq-option.is-wrong .cdq-marker-radio::after,
.cdq-option.is-missed .cdq-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,
.cdq-option.is-selected .cdq-marker-check::after,
.cdq-option.is-correct .cdq-marker-check::after,
.cdq-option.is-wrong .cdq-marker-check::after,
.cdq-option.is-missed .cdq-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: 18px 0 0;
}

.exam-review-block,
.exam-answer-box,
.exam-solution-box {
    width: 100%;
    margin: 0;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    background: rgba(248, 250, 252, 0.92);
    padding: 16px 22px;
}

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

.exam-text-answer-wrap {
    margin-top: 18px;
}

.exam-text-answer,
.exam-fill-blank-answer {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.5);
    border-radius: 16px;
    background: #fff;
    color: var(--text-main);
    font: inherit;
    line-height: 1.7;
}

.exam-text-answer {
    min-height: 180px;
    padding: 14px 16px;
    resize: vertical;
}

.exam-fill-blank-answer {
    min-height: 52px;
    padding: 0 16px;
}

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

.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-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-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-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;
    background: var(--bg-card);
}

.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);
    background: rgba(15, 48, 71, 0.04);
    color: var(--secondary-color);
    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);
    color: var(--text-main);
    line-height: 1.72;
    text-align: left;
    overflow-wrap: break-word;
}

.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-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;
    background: var(--bg-card);
    color: var(--text-main);
}

.exam-binary-choice {
    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;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

.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;
    border-color: rgba(15, 48, 71, 0.82);
    background: var(--bg-card);
}

.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-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-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%);
}

body.dark-mode .exam-question-card,
body.dark-mode .cdq-card,
.dark-mode .exam-question-card,
.dark-mode .cdq-card {
    border-color: rgba(148, 163, 184, 0.34);
    background: var(--bg-card);
    color: var(--text-main);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

body.dark-mode .exam-question-head,
body.dark-mode .cdq-card-head,
.dark-mode .exam-question-head,
.dark-mode .cdq-card-head {
    border-bottom-color: rgba(148, 163, 184, 0.32);
    background: var(--bg-elevated);
}

body.dark-mode .exam-option,
body.dark-mode .cdq-option,
body.dark-mode .exam-binary-row,
body.dark-mode .exam-binary-choice,
.dark-mode .exam-option,
.dark-mode .cdq-option,
.dark-mode .exam-binary-row,
.dark-mode .exam-binary-choice {
    color: var(--text-main);
}

@media (hover: hover) and (pointer: fine) {
    body.dark-mode .exam-option:not(.is-disabled):not(.is-selected):not(.is-correct):not(.is-wrong):hover,
    body.dark-mode .cdq-option:not(.is-disabled):not(.is-selected):not(.is-correct):not(.is-wrong):hover,
    .dark-mode .exam-option:not(.is-disabled):not(.is-selected):not(.is-correct):not(.is-wrong):hover,
    .dark-mode .cdq-option:not(.is-disabled):not(.is-selected):not(.is-correct):not(.is-wrong):hover {
        background: rgba(148, 163, 184, 0.12);
    }
}

body.dark-mode .exam-marker-radio,
body.dark-mode .exam-marker-check,
body.dark-mode .cdq-marker-radio,
body.dark-mode .cdq-marker-check,
body.dark-mode .exam-binary-marker,
.dark-mode .exam-marker-radio,
.dark-mode .exam-marker-check,
.dark-mode .cdq-marker-radio,
.dark-mode .cdq-marker-check,
.dark-mode .exam-binary-marker {
    border-color: rgba(226, 232, 240, 0.82);
    background: var(--bg-body);
}

body.dark-mode .exam-binary-choice,
.dark-mode .exam-binary-choice {
    border-color: rgba(148, 163, 184, 0.28);
    background: var(--bg-card);
    color: var(--text-main);
    opacity: 1;
    -webkit-text-fill-color: currentColor;
}

body.dark-mode .exam-binary-choice.is-selected,
.dark-mode .exam-binary-choice.is-selected {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.62);
    color: #fbbf24;
}

body.dark-mode .exam-binary-choice.is-correct,
.dark-mode .exam-binary-choice.is-correct {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(52, 211, 153, 0.56);
    color: #6ee7b7;
}

body.dark-mode .exam-binary-choice.is-wrong,
.dark-mode .exam-binary-choice.is-wrong {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(248, 113, 113, 0.56);
    color: #fca5a5;
}

body.dark-mode .exam-answer-sheet {
    background: var(--bg-card);
    border-color: rgba(147, 197, 253, 0.45);
}

body.dark-mode .exam-binary-sheet-head {
    border-bottom-color: rgba(248, 113, 113, 0.38);
    background: rgba(198, 58, 50, 0.18);
    color: var(--text-main);
}

body.dark-mode .exam-binary-sheet-head span + span {
    border-left-color: rgba(148, 163, 184, 0.42);
}

body.dark-mode .exam-answer-sheet--matrix .exam-binary-row {
    border-top-color: rgba(148, 163, 184, 0.32);
    background: var(--bg-card);
}

body.dark-mode .exam-answer-sheet--matrix .exam-binary-label {
    border-right-color: rgba(148, 163, 184, 0.32);
    background: var(--bg-elevated);
    color: var(--text-main);
}

body.dark-mode .exam-answer-sheet--matrix .exam-binary-text {
    border-right-color: rgba(148, 163, 184, 0.32);
    color: var(--text-main);
}

body.dark-mode .exam-answer-sheet--matrix .exam-binary-choice {
    background: var(--bg-card);
    color: var(--text-main);
}

body.dark-mode .exam-answer-sheet--matrix .exam-binary-choice + .exam-binary-choice {
    border-left-color: rgba(148, 163, 184, 0.32);
}

body.dark-mode .exam-answer-sheet--matrix .exam-binary-marker {
    border-color: rgba(226, 232, 240, 0.86);
    background: transparent;
}

.dark-mode .exam-answer-sheet {
    background: var(--bg-card);
    border-color: rgba(147, 197, 253, 0.45);
}

.dark-mode .exam-binary-sheet-head {
    border-bottom-color: rgba(248, 113, 113, 0.38);
    background: rgba(198, 58, 50, 0.18);
    color: var(--text-main);
}

.dark-mode .exam-binary-sheet-head span + span {
    border-left-color: rgba(148, 163, 184, 0.42);
}

.dark-mode .exam-answer-sheet--matrix .exam-binary-row {
    border-top-color: rgba(148, 163, 184, 0.32);
    background: var(--bg-card);
}

.dark-mode .exam-answer-sheet--matrix .exam-binary-label {
    border-right-color: rgba(148, 163, 184, 0.32);
    background: var(--bg-elevated);
    color: var(--text-main);
}

.dark-mode .exam-answer-sheet--matrix .exam-binary-text {
    border-right-color: rgba(148, 163, 184, 0.32);
    color: var(--text-main);
}

.dark-mode .exam-answer-sheet--matrix .exam-binary-choice {
    background: var(--bg-card);
    color: var(--text-main);
    opacity: 1;
    -webkit-text-fill-color: currentColor;
}

.dark-mode .exam-answer-sheet--matrix .exam-binary-choice:disabled {
    color: var(--text-main);
    opacity: 1;
    -webkit-text-fill-color: currentColor;
}

.dark-mode .exam-answer-sheet--matrix .exam-binary-choice + .exam-binary-choice {
    border-left-color: rgba(148, 163, 184, 0.32);
}

.dark-mode .exam-answer-sheet--matrix .exam-binary-marker {
    border-color: rgba(226, 232, 240, 0.86);
    background: transparent;
}

.dark-mode .exam-answer-sheet--matrix .exam-binary-choice.is-selected {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.62);
    color: #fbbf24;
}

.dark-mode .exam-answer-sheet--matrix .exam-binary-choice.is-correct {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(52, 211, 153, 0.56);
    color: #6ee7b7;
}

.dark-mode .exam-answer-sheet--matrix .exam-binary-choice.is-wrong {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(248, 113, 113, 0.56);
    color: #fca5a5;
}

:where(
    .duplicate-question-copy,
    .admin-live-preview,
    .admin-preview-modal-body,
    .admin-picker-question-preview,
    .admin-picker-preview-body,
    .admin-question-card
) {
    overflow-wrap: anywhere;
    word-break: break-word;
}

:where(
    .duplicate-question-copy,
    .admin-live-preview,
    .admin-preview-modal-body,
    .admin-picker-question-preview,
    .admin-picker-preview-body,
    .admin-question-card
) table {
    width: fit-content;
    max-width: 100%;
    margin: 12px auto;
    border-collapse: collapse;
    text-align: center;
    vertical-align: middle;
    white-space: normal;
}

:where(
    .duplicate-question-copy,
    .admin-live-preview,
    .admin-preview-modal-body,
    .admin-picker-question-preview,
    .admin-picker-preview-body,
    .admin-question-card
) table[align="left"] {
    margin-left: 0;
    margin-right: auto;
}

:where(
    .duplicate-question-copy,
    .admin-live-preview,
    .admin-preview-modal-body,
    .admin-picker-question-preview,
    .admin-picker-preview-body,
    .admin-question-card
) table[align="right"] {
    margin-left: auto;
    margin-right: 0;
}

:where(
    .duplicate-question-copy,
    .admin-live-preview,
    .admin-preview-modal-body,
    .admin-picker-question-preview,
    .admin-picker-preview-body,
    .admin-question-card
) table[align="center"] {
    margin-left: auto;
    margin-right: auto;
}

:where(
    .duplicate-question-copy,
    .admin-live-preview,
    .admin-preview-modal-body,
    .admin-picker-question-preview,
    .admin-picker-preview-body,
    .admin-question-card
) :is(th, td) {
    padding: 10px 12px;
    border: 1px solid rgba(71, 85, 105, 0.38);
    text-align: center;
    vertical-align: middle;
    white-space: normal;
}

:where(
    .duplicate-question-copy,
    .admin-live-preview,
    .admin-preview-modal-body,
    .admin-picker-question-preview,
    .admin-picker-preview-body,
    .admin-question-card
) th {
    font-weight: 800;
}

:where(.duplicate-question-copy, .admin-live-preview, .admin-preview-modal-body, .admin-picker-question-preview, .admin-picker-preview-body, .admin-question-card) :is(th, td)[align="left"] {
    text-align: left;
}

:where(.duplicate-question-copy, .admin-live-preview, .admin-preview-modal-body, .admin-picker-question-preview, .admin-picker-preview-body, .admin-question-card) :is(th, td)[align="center"] {
    text-align: center;
}

:where(.duplicate-question-copy, .admin-live-preview, .admin-preview-modal-body, .admin-picker-question-preview, .admin-picker-preview-body, .admin-question-card) :is(th, td)[align="right"] {
    text-align: right;
}

:where(.duplicate-question-copy, .admin-live-preview, .admin-preview-modal-body, .admin-picker-question-preview, .admin-picker-preview-body, .admin-question-card) :is(th, td)[align="justify"] {
    text-align: justify;
}

:where(.duplicate-question-copy, .admin-live-preview, .admin-preview-modal-body, .admin-picker-question-preview, .admin-picker-preview-body, .admin-question-card) :is(th, td)[valign="top"] {
    vertical-align: top;
}

:where(.duplicate-question-copy, .admin-live-preview, .admin-preview-modal-body, .admin-picker-question-preview, .admin-picker-preview-body, .admin-question-card) :is(th, td)[valign="middle"] {
    vertical-align: middle;
}

:where(.duplicate-question-copy, .admin-live-preview, .admin-preview-modal-body, .admin-picker-question-preview, .admin-picker-preview-body, .admin-question-card) :is(th, td)[valign="bottom"] {
    vertical-align: bottom;
}

:where(.duplicate-question-copy, .admin-live-preview, .admin-preview-modal-body, .admin-picker-question-preview, .admin-picker-preview-body, .admin-question-card) :is(th, td)[valign="baseline"] {
    vertical-align: baseline;
}

:where(.admin-live-preview, .duplicate-question-copy, .admin-preview-modal-body, .admin-picker-question-preview, .admin-picker-preview-body, .admin-question-card) img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 10px 0;
    border-radius: 8px;
    object-fit: contain;
}

:where(.admin-live-preview, .duplicate-question-copy, .admin-preview-modal-body, .admin-picker-question-preview, .admin-picker-preview-body, .admin-question-card) .ahust-img-here {
    display: block;
    max-width: 100%;
    margin: 12px 0;
}

:where(.admin-live-preview, .duplicate-question-copy, .admin-preview-modal-body, .admin-picker-question-preview, .admin-picker-preview-body, .admin-question-card) .ahust-img-here.ahust-img-left {
    text-align: left;
}

:where(.admin-live-preview, .duplicate-question-copy, .admin-preview-modal-body, .admin-picker-question-preview, .admin-picker-preview-body, .admin-question-card) .ahust-img-here.ahust-img-center {
    text-align: center;
}

:where(.admin-live-preview, .duplicate-question-copy, .admin-preview-modal-body, .admin-picker-question-preview, .admin-picker-preview-body, .admin-question-card) .ahust-img-here.ahust-img-right {
    text-align: right;
}

:where(.admin-live-preview, .duplicate-question-copy, .admin-preview-modal-body, .admin-picker-question-preview, .admin-picker-preview-body, .admin-question-card) .ahust-img-here img {
    display: inline-block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0;
    object-fit: contain;
}

/*
 * Rich content shell dùng chung cho các vùng mô tả HTML an toàn không thuộc
 * riêng câu hỏi, ví dụ mô tả chương trình truy cập, ghi chú hoặc nội dung CMS.
 */
.ahust-rich-content {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.ahust-rich-content p + p {
    margin-top: 10px;
}

.ahust-rich-content :is(ul, ol) {
    margin: 0.7em 0 0.9em;
    padding-inline-start: 1.45em;
    list-style-position: outside;
}

.ahust-rich-content li {
    margin: 0.34em 0;
    padding-inline-start: 0.18em;
}

.ahust-rich-content li :is(p, ul, ol) {
    margin-top: 0.38em;
    margin-bottom: 0.38em;
}

.ahust-rich-content table {
    width: fit-content;
    max-width: 100%;
    margin: 12px auto;
    border-collapse: collapse;
    text-align: center;
    vertical-align: middle;
    white-space: normal;
}

.ahust-rich-content table[align="left"] {
    margin-left: 0;
    margin-right: auto;
}

.ahust-rich-content table[align="right"] {
    margin-left: auto;
    margin-right: 0;
}

.ahust-rich-content table[align="center"] {
    margin-left: auto;
    margin-right: auto;
}

.ahust-rich-content :is(th, td) {
    padding: 10px 12px;
    border: 1px solid rgba(71, 85, 105, 0.38);
    text-align: center;
    vertical-align: middle;
    white-space: normal;
}

.ahust-rich-content th {
    font-weight: 800;
}

.ahust-rich-content :is(th, td)[align="left"] {
    text-align: left;
}

.ahust-rich-content :is(th, td)[align="center"] {
    text-align: center;
}

.ahust-rich-content :is(th, td)[align="right"] {
    text-align: right;
}

.ahust-rich-content :is(th, td)[align="justify"] {
    text-align: justify;
}

.ahust-rich-content :is(th, td)[valign="top"] {
    vertical-align: top;
}

.ahust-rich-content :is(th, td)[valign="middle"] {
    vertical-align: middle;
}

.ahust-rich-content :is(th, td)[valign="bottom"] {
    vertical-align: bottom;
}

.ahust-rich-content :is(th, td)[valign="baseline"] {
    vertical-align: baseline;
}

.ahust-rich-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 10px 0;
    border-radius: 8px;
    object-fit: contain;
}

.ahust-rich-content .ahust-img-here {
    display: block;
    max-width: 100%;
    margin: 12px 0;
}

.ahust-rich-content .ahust-img-here.ahust-img-left {
    text-align: left;
}

.ahust-rich-content .ahust-img-here.ahust-img-center {
    text-align: center;
}

.ahust-rich-content .ahust-img-here.ahust-img-right {
    text-align: right;
}

.ahust-rich-content .ahust-img-here img {
    display: inline-block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0;
    object-fit: contain;
}
