body.reading-test-mode {
    overflow: hidden;
    height: 100vh;
    background: #f4f6f8;
}

body.reading-test-mode .reading-test-wrap {
    height: 100vh;
    overflow: hidden;
    padding: 0 !important;
    max-width: none !important;
}

body.reading-test-mode .wrap-content,
body.reading-test-mode .wrap-home {
    padding: 0 !important;
    max-width: none !important;
}

.reading-test-page {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #f4f6f8;
    font-family: Inter, Arial, sans-serif;
    overflow: hidden;
}

.reading-start-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
}

.reading-start-overlay.is-hidden {
    display: none !important;
    pointer-events: none;
    visibility: hidden;
}

/* Bootstrap modals — override global .modal z-index:999 in style.css */
body.reading-test-mode .modal-backdrop {
    z-index: 10040 !important;
}

body.reading-test-mode .modal {
    z-index: 10050 !important;
    background: transparent;
}

.reading-start-btn {
    background: #fff;
    border: none;
    border-radius: 8px;
    padding: 18px 28px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
}

.reading-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background: linear-gradient(180deg, #337845 0%, #265a35 100%);
    color: #fff;
    z-index: 100;
}

.reading-header__brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reading-header__logo {
    height: 28px;
}

.reading-header__timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.reading-header__timer-val {
    font-size: 28px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.reading-header__controls {
    justify-self: end;
}

.reading-header__submit {
    background: #fff;
    color: #265a35;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 600;
    cursor: pointer;
}

.reading-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.reading-split {
    display: flex;
    height: 100%;
    min-height: 0;
}

.reading-passages-wrap,
.reading-questions-wrap {
    overflow-y: auto;
    min-width: 0;
}

.reading-passages-wrap {
    flex: 0 0 50%;
    max-width: 75%;
    border-right: 1px solid #e5e7eb;
    background: #f6fff9;
    padding: 0;
}

.reading-questions-wrap {
    flex: 1 1 auto;
    padding: 0;
    background: #fff;
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.75;
    color: #1f2937;
}

/* ── Questions typography (mirror IOT reading test-panel) ── */
.reading-questions-wrap .test-panel.is-active,
.reading-questions-wrap .reading-questions-pane.is-active {
    padding: 1.75rem 2rem 2.5rem;
}

.reading-questions-wrap .test-panel__header {
    margin: 0 0 1.5rem;
    padding: 0 0 0.85rem;
    border-bottom: 2px solid #37854d;
}

.reading-questions-wrap .test-panel__title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: #294563;
    line-height: 1.3;
}

.reading-questions-wrap .test-panel__item {
    margin: 0 0 2rem;
    padding: 1.25rem 1.35rem 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fafbfc;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.reading-questions-wrap .test-panel__item:last-child {
    margin-bottom: 0;
}

.reading-questions-wrap .test-panel__question-title {
    margin: 0 0 1rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid #d1fae5;
    font-size: 1.15rem;
    font-weight: 700;
    color: #37854d;
    line-height: 1.45;
}

.reading-questions-wrap .test-panel__question-desc,
.reading-questions-wrap .test-panel__answer,
.reading-questions-wrap .test-panel__answers-wrap,
.reading-questions-wrap .ckeditor-wrapper {
    font-size: 1rem;
    line-height: 1.75;
}

.reading-questions-wrap .test-panel__answer p,
.reading-questions-wrap .test-panel__answers-wrap p,
.reading-questions-wrap .test-panel__question-desc p,
.reading-questions-wrap .ckeditor-wrapper p {
    margin: 0 0 0.9rem;
    line-height: 1.75;
    color: #374151;
}

.reading-questions-wrap .test-panel__answer p:last-child,
.reading-questions-wrap .test-panel__answers-wrap p:last-child {
    margin-bottom: 0;
}

.reading-questions-wrap .test-panel__answer em,
.reading-questions-wrap .test-panel__answers-wrap em,
.reading-questions-wrap .test-panel__question-desc em {
    font-style: italic;
    color: #4b5563;
}

.reading-questions-wrap .test-panel__answer strong,
.reading-questions-wrap .test-panel__answers-wrap strong {
    color: #dc2626;
    font-weight: 700;
}

/* Fill-in-blank (NO MORE THAN … WORDS) */
.reading-questions-wrap .reading-fillblank-instruction {
    margin: 0 0 0.65rem;
    padding: 0.5rem 0.7rem;
    background: #fff7ed;
    border-left: 3px solid #ea580c;
    border-radius: 0 6px 6px 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #57534e;
}

.reading-questions-wrap .reading-fillblank-instruction em {
    font-style: italic;
    color: #57534e;
}

.reading-questions-wrap .reading-fillblank-instruction strong {
    color: #dc2626;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.reading-questions-wrap .reading-fillblank-list {
    margin: 0.35rem 0 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.reading-questions-wrap .reading-fillblank-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.35rem 0.6rem;
    margin: 0 0 0.45rem;
    padding: 0.45rem 0.65rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    line-height: 1.5;
}

.reading-questions-wrap .reading-fillblank-list .reading-fillblank-row {
    margin: 0;
    border: none;
    border-radius: 0;
    border-bottom: 1px solid #eef2f7;
    background: #fafbfc;
}

.reading-questions-wrap .reading-fillblank-list .reading-fillblank-row:last-child {
    border-bottom: none;
}

.reading-questions-wrap .reading-fillblank-row__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #37854d;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.reading-questions-wrap .reading-fillblank-row__text {
    min-width: 0;
    font-weight: 500;
    font-size: 0.9375rem;
    color: #1f2937;
    line-height: 1.5;
}

.reading-questions-wrap .reading-fillblank-row .test-panel__input-answer,
.reading-questions-wrap .reading-fillblank-row input.iot-question.iot-question__fill-blank {
    width: 112px;
    min-width: 96px;
    max-width: 140px;
    height: 28px;
    padding: 0 0.55rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    font-size: 0.875rem;
    text-align: left;
    box-shadow: none;
    justify-self: end;
}

.reading-questions-wrap .reading-fillblank-row .test-panel__input-answer:focus,
.reading-questions-wrap .reading-fillblank-row input.iot-question:focus {
    border-color: #37854d;
    box-shadow: 0 0 0 3px rgba(55, 133, 77, 0.12);
    outline: none;
}

.reading-questions-wrap td .reading-fillblank-list {
    margin: 0.25rem 0 0.5rem;
    border: none;
    border-radius: 0;
    background: transparent;
}

.reading-questions-wrap .reading-fillblank-row--table,
.reading-questions-wrap td .reading-fillblank-row {
    margin: 0;
    padding: 0.35rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px dashed #e5e7eb;
    border-radius: 0;
}

.reading-questions-wrap td .reading-fillblank-list .reading-fillblank-row:last-child,
.reading-questions-wrap .reading-fillblank-row--table:last-child {
    border-bottom: none;
}

.reading-questions-wrap table td > p:not(.reading-fillblank-instruction) {
    margin-bottom: 0.25rem;
    line-height: 1.45;
}

/* Fallback nếu HTML chưa được gom dòng */
.reading-questions-wrap .test-panel__answer p:has(+ p .test-panel__iotquestion),
.reading-questions-wrap .test-panel__answer p:has(+ p .test-panel__question-num) {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.45rem;
    line-height: 1.65;
}

.reading-questions-wrap p.reading-fillblank-inline {
    line-height: 1.65;
    margin-bottom: 0.75rem;
    color: #1f2937;
}

.reading-questions-wrap p.reading-fillblank-inline .test-panel__iotquestion {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    vertical-align: middle;
    margin: 0 0.1rem;
}

.reading-questions-wrap p.reading-fillblank-inline .test-panel__question-num {
    width: 22px;
    height: 22px;
    font-size: 0.7rem;
}

.reading-questions-wrap p.reading-fillblank-inline .test-panel__input-answer,
.reading-questions-wrap p.reading-fillblank-inline input.iot-question.iot-question__fill-blank {
    width: 108px;
    min-width: 88px;
    max-width: 130px;
    height: 28px;
    padding: 0 0.45rem;
    border-radius: 6px;
    font-size: 0.875rem;
    vertical-align: middle;
}

.reading-questions-wrap .test-panel__iotquestion {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.reading-questions-wrap .test-panel__question-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #37854d;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
}

.reading-questions-wrap .test-panel__input-answer,
.reading-questions-wrap input.iot-question.iot-question__fill-blank {
    min-width: 120px;
    max-width: 200px;
    height: 32px;
    padding: 0.35rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    font-size: 0.9375rem;
    line-height: 1.4;
    color: #1f2937;
    box-shadow: none;
}

.reading-questions-wrap .test-panel__input-answer:focus,
.reading-questions-wrap input.iot-question:focus,
.reading-questions-wrap select.iot-dropdown:focus {
    outline: none;
    border-color: #37854d;
    box-shadow: 0 0 0 3px rgba(55, 133, 77, 0.15);
}

/* Multiple choice từng câu */
.reading-questions-wrap .test-panel__question-sm-group {
    margin: 0 0 1.75rem;
    padding: 0 0 1.35rem;
    border-bottom: 1px solid #eef2f7;
}

.reading-questions-wrap .test-panel__question-sm-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.reading-questions-wrap .test-panel__question-sm-title {
    margin: 0 0 0.85rem;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.65;
    color: #111827;
}

.reading-questions-wrap .test-panel__answer-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 0 0 0.65rem;
    padding: 0.45rem 0.35rem;
    border-radius: 6px;
    transition: background 0.12s ease;
}

.reading-questions-wrap .test-panel__answer-item:hover {
    background: #f0fdf4;
}

.reading-questions-wrap .test-panel__answer-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #294563;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.reading-questions-wrap label.iot-radio {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin: 0;
    font-weight: 500;
    line-height: 1.65;
    cursor: pointer;
    color: #1f2937;
}

.reading-questions-wrap .iot-radio input[type="radio"] {
    appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin: 0.15rem 0 0;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
}

.reading-questions-wrap .iot-radio input[type="radio"]:checked {
    border-color: #37854d;
    background: radial-gradient(circle at center, #37854d 0 5px, #fff 6px);
}

/* TRUE/FALSE/NOT GIVEN & YES/NO/NOT GIVEN — dropdown inline với statement */
.reading-questions-wrap .test-panel__answers-wrap > p {
    display: block;
    margin-bottom: 0.65rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px dashed #e5e7eb;
    line-height: 1.65;
}

.reading-questions-wrap .test-panel__answers-wrap > p:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.reading-questions-wrap .test-panel__answers-wrap .iot-question-number {
    display: inline;
    min-width: 0;
    font-weight: 700;
    color: #37854d;
    margin-right: 0.2rem;
    white-space: nowrap;
}

.reading-questions-wrap .test-panel__answers-wrap select.iot-dropdown,
.reading-questions-wrap .test-panel__answers-wrap select.iot-question {
    display: inline-block;
    width: auto;
    min-width: 0;
    max-width: 118px;
    height: 28px;
    margin: 0 0.45rem 0 0;
    padding: 0 1.5rem 0 0.4rem;
    border: 1px solid #37854d;
    border-radius: 4px;
    background: #fff;
    font-size: 0.8125rem;
    line-height: 1.2;
    color: #1f2937;
    vertical-align: baseline;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2337854d' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.35rem center;
    background-size: 10px 6px;
}

/* Paragraph matching & word-bank dropdowns (ckeditor-wrapper) */
.reading-questions-wrap .ckeditor-wrapper > p {
    display: block;
    margin-bottom: 0.65rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px dashed #e5e7eb;
    line-height: 1.65;
}

.reading-questions-wrap .ckeditor-wrapper > p:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.reading-questions-wrap .ckeditor-wrapper .iot-question-number {
    display: inline;
    min-width: 0;
    font-weight: 700;
    color: #37854d;
    margin-right: 0.2rem;
    white-space: nowrap;
}

.reading-questions-wrap .ckeditor-wrapper select.iot-dropdown,
.reading-questions-wrap .ckeditor-wrapper select.iot-question {
    display: inline-block;
    width: auto;
    min-width: 0;
    max-width: 160px;
    height: 28px;
    margin: 0 0.45rem 0 0;
    padding: 0 1.5rem 0 0.4rem;
    border: 1px solid #37854d;
    border-radius: 4px;
    background: #fff;
    font-size: 0.8125rem;
    line-height: 1.2;
    color: #1f2937;
    vertical-align: baseline;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2337854d' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.35rem center;
    background-size: 10px 6px;
}

.reading-questions-wrap .ckeditor-wrapper select.iot-dropdown--letter {
    max-width: 56px;
    padding-right: 1.25rem;
}

/* Dropdown khác (matching table, v.v.) */
.reading-questions-wrap select.iot-dropdown,
.reading-questions-wrap select.iot-question {
    box-sizing: border-box;
    display: inline-block;
    min-width: 120px;
    height: 34px;
    margin: 0 0.5rem 0.5rem 0;
    padding: 0 0.65rem;
    border: 1px solid #37854d;
    border-radius: 6px;
    background-color: #fff;
    font-size: 0.9375rem;
    line-height: 1.4;
    color: #1f2937;
    vertical-align: middle;
}

.reading-questions-wrap .iot-question-number {
    display: inline-block;
    min-width: 1.75rem;
    font-weight: 700;
    color: #37854d;
    margin-right: 0.25rem;
}

/* Bảng hướng dẫn YES/NO/NOT GIVEN */
.reading-questions-wrap .table-responsive {
    margin: 0.75rem 0 1.25rem;
    overflow-x: auto;
}

.reading-questions-wrap table,
.reading-questions-wrap .iot-table-info {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.reading-questions-wrap table td,
.reading-questions-wrap table th {
    border: 1px solid #d1d5db;
    padding: 0.55rem 0.75rem;
    vertical-align: top;
}

.reading-questions-wrap table tr:nth-child(even) td {
    background: #f9fafb;
}

.reading-questions-wrap .field {
    margin: 0;
    padding: 0;
}

/* ── Passage typography (mirror IOT reading layout) ── */
.reading-passages-wrap .test-contents.is-active,
.reading-passages-wrap .reading-passage-pane.is-active {
    padding: 2rem 2.5rem 3rem;
    color: #1f2937;
    font-size: 16px;
    line-height: 1.75;
    letter-spacing: 0.01em;
}

.reading-passages-wrap .reading-passage-prose,
.reading-passages-wrap .reading-passage-pane {
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

.reading-passages-wrap .test-contents__title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #294563;
    margin: 0 0 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 2px solid #37854d;
    text-align: left;
}

.reading-passages-wrap .field--name-field-passage-desc h1 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #37854d;
    margin: 0 0 0.45rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.reading-passages-wrap .field--name-field-passage-desc p {
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    line-height: 1.65;
    color: #64748b;
}

.reading-passages-wrap .field--name-field-passage-desc em {
    font-style: italic;
}

.reading-passages-wrap .section-image {
    text-align: center;
    margin: 0.75rem 0 1.25rem;
}

.reading-passages-wrap .section-image img,
.reading-passages-wrap .reading-passage-img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 6px;
    box-shadow: 0 4px 18px rgba(41, 69, 99, 0.12);
}

.reading-passages-wrap h2.subtitle,
.reading-passages-wrap .subtitle {
    display: block;
    font-size: 1.45rem;
    font-weight: 700;
    color: #1e3a2f;
    text-align: center;
    margin: 1rem 0 1.35rem;
    line-height: 1.35;
    border: none;
    padding: 0;
}

.reading-passages-wrap h2.subtitle .field,
.reading-passages-wrap h2.subtitle .field--item {
    display: inline;
    margin: 0;
    padding: 0;
}

.reading-passages-wrap .field--name-field-passage p {
    margin: 0 0 1.125rem;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
}

.reading-passages-wrap .field--name-field-passage p:last-child {
    margin-bottom: 0;
}

.reading-passages-wrap .reading-passage-prose h1,
.reading-passages-wrap .reading-passage-prose h2,
.reading-passages-wrap .reading-passage-prose h3,
.reading-passages-wrap .reading-passage-pane h1,
.reading-passages-wrap .reading-passage-pane h2,
.reading-passages-wrap .reading-passage-pane h3 {
    margin-bottom: 0.75rem;
    line-height: 1.35;
}

.reading-passages-wrap .reading-passage-prose ul,
.reading-passages-wrap .reading-passage-prose ol,
.reading-passages-wrap .reading-passage-pane ul,
.reading-passages-wrap .reading-passage-pane ol {
    margin: 0 0 1.125rem 1.25rem;
    padding-left: 0.35rem;
    line-height: 1.7;
}

.reading-passages-wrap .reading-passage-prose li + li,
.reading-passages-wrap .reading-passage-pane li + li {
    margin-top: 0.35rem;
}

.reading-passages-wrap .field {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.reading-passages-wrap .field--item {
    display: block;
}

.reading-passages-wrap table {
    width: 100%;
    max-width: 100%;
    margin: 1rem 0 1.25rem;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.reading-passages-wrap table th,
.reading-passages-wrap table td {
    border: 1px solid #d1d5db;
    padding: 0.5rem 0.65rem;
    vertical-align: top;
}

.reading-passages-wrap table th {
    background: #ecfdf3;
    font-weight: 600;
}

.reading-gutter {
    width: 6px;
    background: #d1d5db;
    cursor: col-resize;
    flex-shrink: 0;
    position: relative;
    z-index: 5;
    touch-action: none;
    transition: background 0.15s ease;
}

.reading-gutter::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -5px;
    right: -5px;
}

.reading-gutter:hover,
.reading-gutter.is-dragging {
    background: #37854d;
}

body.reading-gutter-dragging {
    cursor: col-resize !important;
    user-select: none;
}

body.reading-gutter-dragging * {
    cursor: col-resize !important;
}

.reading-passages-wrap .test-contents,
.reading-questions-wrap .test-panel {
    display: none;
}

.reading-passages-wrap .test-contents.is-active,
.reading-questions-wrap .test-panel.is-active {
    display: block;
}

.reading-footer-zone {
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

.reading-footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 16px;
}

.reading-palette {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
}

#reading-test-app .question-palette {
    min-width: max-content;
}

#reading-test-app .question-palette__list-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 2px;
    min-width: max-content;
}

#reading-test-app .question-palette__part {
    flex: 0 0 auto;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 6px 10px;
    background: #fff;
    border: 1px solid #d6e4da;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}

#reading-test-app .question-palette__part.is-active {
    border-color: #37854d;
    box-shadow: 0 0 0 1px rgba(55, 133, 77, 0.15);
}

#reading-test-app .question-palette__part-header {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin-bottom: 0;
}

#reading-test-app .question-palette__part-title {
    font-size: 14px;
    font-weight: 700;
    color: #294563;
    line-height: 1;
}

#reading-test-app .question-palette__part.is-active .question-palette__part-title {
    color: #37854d;
}

#reading-test-app .question-palette__items-group {
    display: none;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 3px;
}

#reading-test-app .question-palette__part.is-active .question-palette__items-group {
    display: inline-flex;
}

#reading-test-app .question-palette__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    min-width: 26px;
    margin: 0;
    border: 1px solid #eaecef;
    border-radius: 5px;
    background: #fff;
    font-size: 12px;
    font-weight: 500;
    color: #282828;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    user-select: none;
}

#reading-test-app .question-palette__item:hover {
    border-color: #37854d;
    color: #1a4d2e;
}

#reading-test-app .question-palette__item.is-answered {
    background: #d6e4da;
    border-color: #b8d4c0;
    color: #37854d;
    font-weight: 600;
}

#reading-test-app .question-palette__item.is-selected {
    border-color: #37854d;
    box-shadow: 0 0 0 1px #37854d;
    font-weight: 700;
    background: #ecfdf3;
}

.reading-part-nav__btn {
    border: 1px solid #cbd5e1;
    background: #fff;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
}

.reading-part-nav__btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.reading-correct-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: #dcfce7;
    color: #166534;
    border-radius: 4px;
    font-size: 12px;
}

.reading-frozen-answer {
    background: #f0fdf4 !important;
}

.reading-correct-choice {
    background: #dcfce7;
}

.reading-admin-preview-bar {
    background: #1f2937;
    color: #fff;
    padding: 10px 16px;
}

.reading-admin-preview-bar__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.reading-preview-mode-label {
    font-weight: 600;
}

body.reading-answer-preview-mode .reading-test-wrap {
    height: calc(100vh - 52px);
}

@media (max-width: 991px) {
    .reading-split {
        flex-direction: column;
    }
    .reading-passages-wrap,
    .reading-questions-wrap {
        flex: 1 1 auto;
        max-height: 45vh;
    }
    .reading-passages-wrap .test-contents.is-active,
    .reading-passages-wrap .reading-passage-pane.is-active {
        padding: 1.25rem 1rem 1.75rem;
        font-size: 15px;
    }
    .reading-passages-wrap h2.subtitle,
    .reading-passages-wrap .subtitle {
        font-size: 1.2rem;
    }
    .reading-questions-wrap .test-panel.is-active,
    .reading-questions-wrap .reading-questions-pane.is-active {
        padding: 1.15rem 1rem 1.75rem;
        font-size: 16px;
    }
    .reading-questions-wrap .test-panel__item {
        padding: 1rem;
    }
    .reading-questions-wrap .test-panel__question-title {
        font-size: 1.05rem;
    }
    .reading-questions-wrap .test-panel__answers-wrap select.iot-dropdown,
    .reading-questions-wrap .test-panel__answers-wrap select.iot-question {
        max-width: 108px;
        height: 26px;
        font-size: 0.75rem;
    }
    .reading-questions-wrap .ckeditor-wrapper select.iot-dropdown,
    .reading-questions-wrap .ckeditor-wrapper select.iot-question {
        max-width: 140px;
        height: 26px;
        font-size: 0.75rem;
    }
    .reading-questions-wrap .ckeditor-wrapper select.iot-dropdown--letter {
        max-width: 50px;
    }
    .reading-questions-wrap .reading-fillblank-row {
        grid-template-columns: auto 1fr;
        gap: 0.3rem 0.5rem;
    }
    .reading-questions-wrap .reading-fillblank-row__num {
        grid-row: 1 / span 2;
        align-self: start;
        margin-top: 0.1rem;
    }
    .reading-questions-wrap .reading-fillblank-row .test-panel__input-answer,
    .reading-questions-wrap .reading-fillblank-row input.iot-question.iot-question__fill-blank {
        grid-column: 2;
        width: 100%;
        max-width: none;
        justify-self: stretch;
    }
    .reading-gutter {
        display: none;
    }
}
