.reading-viewport { position: fixed; inset: 0; z-index: 10000; overflow: auto; background: white; }
.reading-player { min-width: 1280px; display: flex; flex-direction: column; background: #fff; color: #000; font: 16px/1.45 Arial, Helvetica, sans-serif; --reading-navy: #002664; }
.reading-player * { box-sizing: border-box; }
.reading-player h1, .reading-player h2, .reading-player h3, .reading-player h4 { font-family: Arial, Helvetica, sans-serif; letter-spacing: normal; }
.reading-player button { cursor: pointer; font-family: inherit; }
.reading-player button:disabled { cursor: default; opacity: .5; }
.reading-player button:focus, .reading-player input:focus { outline: 4px double #000; outline-offset: -5px; }
.reading-header { height: 60px; flex: 0 0 60px; display: flex; align-items: center; justify-content: space-between; position: relative; box-shadow: 0 2px 4px #00000029; z-index: 20; background: white; }
.reading-header-left { display: flex; align-items: center; height: 60px; }
.reading-header-cell { width: 62px; height: 60px; display: grid; place-items: center; color: var(--reading-navy); border-right: 1px solid #d9d9d9; background: white; }
.reading-logo { height: 48px; width: auto; object-fit: contain; margin: 0 28px; }
.reading-player--start .reading-header { border-bottom: 6px solid var(--reading-navy); height: 66px; flex-basis: 66px; }
.reading-question-tab { position: absolute; left: 50%; transform: translateX(-50%); width: 358px; height: 60px; background: #dde4ec; color: #3c4043; display: flex; align-items: center; justify-content: center; gap: 25px; font-size: 24px; font-weight: bold; }
.reading-question-tab svg { color: var(--reading-navy); }
.reading-question-tab.active::after { content: ''; position: absolute; bottom: -12px; border-top: 12px solid #dde4ec; border-left: 12px solid transparent; border-right: 12px solid transparent; }
.reading-zoom { position: relative; }
.reading-zoom-menu { position: absolute; top: 60px; left: 11px; display: flex; flex-direction: column; }
.reading-zoom-menu button { width: 40px; height: 40px; background: #0a1f4d; color: white; font-size: 12px; font-weight: bold; display: grid; place-items: center; }
.reading-zoom-menu button.active { color: black; background: white; }
.reading-timer { display: flex; align-items: center; gap: 12px; padding-left: 24px; color: #0a1f4d; }
.reading-timer-cluster { min-width: 105px; height: 56px; display: flex; flex-direction: column; justify-content: center; }
.reading-timer-cluster strong { font: bold 30px/1.1 monospace; }
.reading-timer-cluster div { display: flex; justify-content: space-around; font-size: 12px; }
.reading-timer-toggle { background: #0a1f4d; color: white; border-radius: 50%; width: 40px; height: 40px; font-size: 11px; font-weight: bold; line-height: 12px; }
.reading-timer.exam-timer--warning { color: #b45309; }
.reading-timer.exam-timer--critical { color: #c62828; }
.reading-main { flex: 1; min-height: 0; overflow: hidden; position: relative; }
.reading-main--card { display: grid; place-items: center; overflow: auto; }
.reading-entry-card { width: 480px; min-height: 350px; border: 4px solid #1e88ff; padding: 34px 22px 16px; text-align: center; display: flex; align-items: center; flex-direction: column; justify-content: space-between; }
.reading-entry-card h1 { font-size: 18px; font-weight: bold; }
.reading-student-name { font-size: 20px; font-weight: bold; }
.reading-entry-card button { width: 285px; height: 58px; background: var(--reading-navy); color: white; font-size: 18px; font-weight: bold; }
.reading-resume-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.reading-entry-card .reading-resume-exit { width: auto; height: 44px; padding: 0 16px; border: 0; background: none; color: var(--reading-navy); font-size: 16px; font-weight: 400; }
.reading-resume-exit:hover { text-decoration: underline; }
.reading-entry-card--confirm { width: 680px; min-height: 390px; padding: 28px 30px; gap: 26px; }
.reading-entry-card--confirm h1 { font-size: 26px; }
.reading-entry-card--confirm h2, .reading-entry-card--confirm .reading-student-name { font-size: 21px; font-weight: bold; }
.reading-entry-card--confirm p:not(.reading-student-name) { font-size: 15px; }
.reading-entry-actions { display: flex; gap: 24px; }
.reading-entry-actions button { width: 140px; }
.reading-footer { flex: 0 0 60px; height: 60px; display: flex; background: #dde4ec; }
.reading-footer > button { font-weight: bold; font-size: 20px; border-radius: 0; display: flex; align-items: center; justify-content: center; gap: 18px; }
.reading-back, .reading-next { width: 185px; flex: 0 0 185px; background: var(--reading-navy); color: white; }
.reading-back-empty { width: 185px; background: white; }
.reading-footer-spacer { flex: 1; background: white; display: flex; align-items: center; justify-content: flex-end; padding: 0 24px; gap: 18px; }
.reading-footer-spacer button { background: none; color: #6b7280; text-decoration: underline; padding: 0; border: 0; font-size: 12px; box-shadow: none; }
.reading-footer-spacer button svg { display: none; }
.reading-flag { width: 210px; flex: 0 0 210px; background: #d0d5db; color: #3c4043; }
.reading-flag svg { color: var(--reading-navy); fill: none; }
.reading-flag.active svg { color: #e0624a; }
.reading-instructions { height: 100%; overflow: auto; padding: 28px 30px; }
.reading-instructions h1 { font-size: 24px; font-weight: bold; margin-bottom: 22px; }
.reading-navigation-table { width: 100%; border-collapse: collapse; }
.reading-navigation-table td { border: 1px solid black; padding: 26px 30px; width: 58%; vertical-align: middle; }
.reading-navigation-table td + td { width: 42%; }
.reading-navigation-table h2 { font-size: 16px; font-weight: bold; margin-bottom: 16px; }
.reading-navigation-table p { margin: 12px 0; }
.reading-demo-nav { display: flex; justify-content: space-around; }
.reading-demo-nav span { background: #002664; color: white; padding: 18px 35px; font-weight: bold; }
.reading-demo-flag { display: flex; align-items: center; justify-content: center; gap: 20px; background: #d0d5db; color: #3c4043; padding: 16px; width: 210px; margin: auto; font-size: 20px; font-weight: bold; }
.reading-demo-summary { width: 340px; margin: auto; text-align: center; }
.reading-demo-summary strong, .reading-demo-summary p { background: #dde4ec; display: block; padding: 10px; }
.reading-demo-summary div { display: grid; grid-template-columns: repeat(10,1fr); gap: 8px; }
.reading-demo-summary div span { border: 2px solid #c8c8c8; padding: 2px; }
.reading-demo-zoom { margin: auto; width: 62px; color: #002664; display: flex; flex-direction: column; align-items: center; }
.reading-demo-zoom span { width: 40px; height: 40px; background: #0a1f4d; color: white; display: grid; place-items: center; font-size: 12px; }
.reading-demo-zoom span:first-of-type { color: black; background: white; }
.reading-demo-timer { position: relative; width: 220px; margin: auto; color: #0a1f4d; }
.reading-demo-timer strong { font: bold 30px monospace; }
.reading-demo-timer small { display: block; }
.reading-demo-timer > span { position: absolute; right: 0; top: 0; background: #0a1f4d; color: white; border-radius: 50%; width: 40px; height: 40px; text-align: center; font: bold 11px/12px Arial; padding-top: 8px; }
.reading-demo-panes { display: flex; justify-content: center; }
.reading-demo-panes span { padding: 15px; border: 1px solid #c8c8c8; width: 150px; font-size: 13px; }
.reading-demo-panes b { align-self: center; color: #002664; }
.reading-rules h1 { font-size: 24px; margin-bottom: 10px; }
.reading-rules h2 { font-size: 22px; font-weight: normal; margin-bottom: 40px; }
.reading-rules h3 { font-weight: bold; }
.reading-rules > p, .reading-rules > div { margin-bottom: 24px; }
.reading-rules div p { margin-bottom: 8px; }
.reading-summary { height: 100%; overflow: auto; padding: 36px 0; }
.reading-summary > h1 { width: 860px; height: 60px; background: #dde4ec; color: #3c4043; font-size: 24px; font-weight: bold; text-align: center; padding: 12px; margin: 0 auto; }
.reading-summary-subtitle { text-align: center; margin: 22px auto; }
.reading-summary-legend { display: flex; justify-content: space-between; width: 860px; margin: 38px auto; }
.reading-summary-legend button { display: flex; align-items: center; gap: 10px; border-bottom: 2px solid transparent; padding-bottom: 5px; }
.reading-summary-legend button.active { border-bottom-color: black; }
.reading-status-icon { width: 32px; height: 32px; display: grid; place-items: center; font-weight: bold; }
.reading-status-icon--answered { background: #002664; color: white; }
.reading-status-icon--not_answered { background: #c8c8c8; }
.reading-status-icon--not_read { border: 3px solid #c8c8c8; }
.reading-status-icon--flagged { background: #c8693f; color: white; clip-path: polygon(0 0,100% 0,100% 100%); }
.reading-summary-grid { width: 860px; display: grid; grid-template-columns: repeat(10,60px); gap: 26px; margin: auto; }
.reading-chip { height: 60px; width: 60px; position: relative; font-size: 26px; font-weight: bold; border: 3px solid transparent; }
.reading-chip--answered { background: #002664; color: white; }
.reading-chip--not_answered { background: #c8c8c8; color: #000; }
.reading-chip--not_read { background: white; border-color: #c8c8c8; }
.reading-chip.filtered { opacity: .18; }
.reading-flag-corner { position: absolute; left: -3px; top: -3px; width: 34px; height: 34px; background: #c8693f; color: white; clip-path: polygon(0 0,100% 0,0 100%); }
.reading-flag-corner svg { margin: 3px; fill: white; }
.reading-player .exam-split-layout { display: grid; grid-template-columns: 58% 42%; height: 100%; position: relative; gap: 0; }
.reading-player .reading-sentence-layout { grid-template-columns: 48% 52%; }
.reading-player .exam-split-layout--left-only { grid-template-columns: 100%; }
.reading-player .exam-split-pane { min-width: 0; min-height: 0; height: 100%; padding: 0; overflow: auto; }
.reading-player .exam-split-pane--left { border-right: 1px solid #c8c8c8; }
.reading-player .exam-stimulus-scroll, .reading-player .exam-right-scroll { padding: 28px 30px; overflow: visible; }
.reading-player .exam-extract-tabs { display: flex; gap: 4px; padding: 20px 30px 0; }
.reading-player .exam-extract-tab { height: 44px; padding: 0 16px; font-weight: bold; font-size: 16px; color: #002664; background: #dde4ec; border: 1px solid transparent; border-radius: 0; }
.reading-player .exam-extract-tab.active { border-color: #c8c8c8; color: #000; background: white; }
.reading-player .exam-pane-toggle { position: absolute; left: 58%; top: 50%; transform: translateY(-50%); width: 30px; height: 60px; border: 1px solid #c8c8c8; background: white; color: #002664; border-radius: 0; display: grid; place-items: center; padding: 0; }
.reading-player .reading-sentence-layout .exam-pane-toggle { left: 48%; }
.reading-player .exam-split-layout--left-only .exam-pane-toggle { left: auto; right: 0; }
.reading-player .exam-pane-toggle span { font-size: 14px; }
.reading-passage-instruction { font-weight: bold; margin-bottom: 22px; }
.reading-extract-heading { font-size: 18px; font-weight: bold; margin-bottom: 26px; }
.reading-passage-title { font-size: 18px; margin-bottom: 26px; }
.reading-prose p { margin: 0 0 30px; font-size: 16px; line-height: 1.45; }
.reading-poem-title { font-size: 24px; font-weight: bold; font-style: italic; margin-bottom: 24px; white-space: pre-line; }
.reading-poem > div { min-height: 33px; line-height: 33px; }
.reading-question-stem { font-size: 16px; font-weight: normal; margin-bottom: 24px; }
.reading-player .exam-mcq-option { align-items: center; background: white; border: 0; border-radius: 0; padding: 0; font-size: 16px; }
.reading-player .exam-mcq-option input { appearance: none; width: 40px; height: 40px; flex: 0 0 40px; border: 2px solid #c8c8c8; border-radius: 50%; box-shadow: inset 0 1px 4px #00000012; position: relative; margin: 0; }
.reading-player .exam-mcq-option input:checked { outline: 3px solid #000; outline-offset: 2px; }
.reading-player .exam-mcq-option input:checked::after { content: ''; width: 20px; height: 20px; border-radius: 50%; background: #002664; position: absolute; left: 8px; top: 8px; }
.reading-player .exam-single-pane-scroll { height: 100%; overflow: auto; padding: 28px 30px; }
.reading-cloze-title { font-size: 18px; text-align: center; margin: 20px 0 30px; }
.reading-cloze-passage { font-size: 16px; line-height: 42px; white-space: pre-wrap; }
.reading-dropdown { position: relative; display: inline-block; vertical-align: middle; width: 100px; height: 42px; margin: 0 4px; line-height: normal; white-space: normal; }
.reading-dropdown > button { display: flex; justify-content: space-between; align-items: center; padding: 0 10px; width: 100%; height: 100%; background: white; border: 1px solid #c8c8c8; color: #002664; font-size: 14px; }
.reading-dropdown > button span:first-child { color: black; overflow: hidden; text-overflow: ellipsis; }
.reading-dropdown--open { z-index: 10; }
.reading-dropdown--open > button { border: 4px solid #3a6fc4; padding: 0 7px; }
.reading-dropdown-list { position: absolute; top: 38px; left: 0; min-width: 100%; width: max-content; max-width: 280px; background: white; border: 4px solid #3a6fc4; display: flex; flex-direction: column; }
.reading-dropdown-list--up { top: auto; bottom: 38px; }
.reading-dropdown-list [role=option] { padding: 7px 10px; min-height: 33px; border-bottom: 1px solid #c8c8c8; font-size: 14px; font-weight: bold; cursor: pointer; }
.reading-dropdown-list [role=option].active { background: #002664; color: white; outline: 2px solid white; outline-offset: -4px; }
.reading-player .exam-theme-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 18px; }
.reading-player .exam-theme-prompt { flex: 1; font-size: 16px; }
.reading-player .exam-theme-row .reading-dropdown { flex: 0 0 100px; }
.reading-player .sentence-bank-list { background: #6f8fbf; border: 2px solid #5b7cae; border-radius: 0; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 44px; margin: 0 0 22px; }
.reading-player .sentence-choice { min-height: 72px; width: 100%; padding: 14px; background: linear-gradient(#f7f8fa,#e3e6ea); border: 1px solid #b5bfcc; border-radius: 0; font-size: 16px; font-weight: bold; color: #4a4a4a; text-align: center; display: flex; align-items: center; justify-content: center; }
.reading-player .sentence-choice--selected { background: white; border: 4px double black; box-shadow: 0 0 0 3px #5f9c7f; }
.reading-player .sentence-choice--dimmed { opacity: .5; }
.reading-player .sentence-gap-list { background: #6f8fbf; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.reading-player .sentence-gap-row { display: grid; grid-template-columns: 190px minmax(0,1fr); align-items: stretch; gap: 12px; }
.reading-player .sentence-gap-label { display: flex; align-items: center; justify-content: center; text-align: center; white-space: normal; color: white; font-size: 16px; font-weight: normal; padding: 4px; }
.reading-player .sentence-gap-target { min-width: 0; min-height: 44px; background: white; border: 1px solid #c8c8c8; padding: 4px; border-radius: 0; overflow-wrap: anywhere; }
.reading-player .sentence-gap-target--empty { height: 44px; }
.reading-player .sentence-gap-target .sentence-choice { height: auto; min-height: 0; padding: 4px 6px; }

.reading-player .exam-mcq-option--selected { animation: none; background: white; }
.reading-player .exam-mcq-option input:checked { background: white; box-shadow: inset 0 1px 4px #00000012; }
.reading-info-icon { display: inline-block; background: white; color: #002664; border-radius: 50%; width: 24px; height: 24px; font: bold 23px/25px Georgia, serif; }

.reading-player .reading-passage-title { font-weight: normal; }

.reading-player .exam-right-scroll { container-type: inline-size; }
@container (max-width: 360px) {
  .reading-player .sentence-gap-row { grid-template-columns: 44px minmax(0, 1fr); }
}
.reading-status-icon--flagged { clip-path: none; position: relative; background: white; color: black; border: 1px solid #c8c8c8; }
.reading-status-icon--flagged .reading-flag-corner { left: 0; top: 0; width: 20px; height: 20px; }

.reading-player .reading-sentence-layout .reading-passage-title { text-align: center; font-size: 16px; font-weight: bold; }
.reading-main--card { width: calc(100vw / var(--reading-zoom)); align-self: flex-start; }
.reading-entry-card--resume { min-height: 370px; gap: 24px; }
.reading-exit-backdrop { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.45); display: grid; place-items: center; overflow: auto; font: 16px/1.45 Arial, Helvetica, sans-serif; }
.reading-exit-card { width: 472px; border: 4px solid #1e88ff; background: white; color: black; padding: 28px 20px 16px; text-align: center; }
.reading-exit-card h2 { font: bold 26px/1.3 Arial, Helvetica, sans-serif; margin: 10px 0 32px; }
.reading-exit-card p { margin-bottom: 48px; }
.reading-exit-card .reading-entry-actions { gap: 10px; }
.reading-exit-card button { flex: 1; height: 58px; background: #002664; color: white; font: bold 18px Arial, Helvetica, sans-serif; cursor: pointer; }
.reading-exit-card button:focus { outline: 4px double black; outline-offset: -5px; }

/* The official shell is shared; only the reasoning question split differs. */
.reading-timer-toggle { display: grid; place-items: center; }
.reading-player .exam-reasoning-layout { grid-template-columns: 48% 52%; }
.reading-player .exam-reasoning-layout.exam-split-layout--left-only { grid-template-columns: 100%; }
.reading-player .exam-reasoning-layout .exam-pane-toggle { left: 48%; }
.reading-player .exam-reasoning-layout.exam-split-layout--left-only .exam-pane-toggle { left: auto; right: 0; }
.reading-player .exam-reasoning-layout .exam-stimulus-scroll,
.reading-player .exam-reasoning-layout .exam-right-scroll { padding: 26px; }
.reading-player .exam-reasoning-layout p,
.reading-player .exam-reasoning-layout .katex,
.reading-player .exam-reasoning-layout .exam-stimulus-list { font-size: 16px; font-weight: normal; }
.reading-player .exam-reasoning-layout .exam-thinking-question,
.reading-player .exam-reasoning-layout .exam-maths-question { margin-bottom: 12px; }
.reading-player .exam-reasoning-layout img,
.reading-player .exam-reasoning-layout svg { max-width: 100%; height: auto; }
.reading-player .exam-reasoning-layout figure { max-width: 100%; }
/* QuestionMediaRenderer caps a diagram's frame at 70vh and scrolls inside it, but draws the diagram at
   the pane's full width, so a square one in a wide pane is cut off. Shrink the drawing into the frame. */
.reading-player .exam-reasoning-layout figure { display: flex; flex-direction: column; }
.reading-player .exam-reasoning-layout figure > :is(svg, img) { min-height: 0; object-fit: contain; }
.exam-radio-options .exam-mcq-option { display: flex; gap: 18px; margin-bottom: 18px; }
.reading-player .exam-radio-options .exam-mcq-option { min-height: 48px; margin-bottom: 0; }

.exam-writing-task-count { display: inline-block; margin-top: 8px; }
.reading-player .exam-writing-official { grid-template-columns: 48% 52%; }
.reading-player .exam-writing-official.exam-split-layout--left-only { grid-template-columns: 100%; }
.reading-player .exam-writing-official .exam-pane-toggle { left: 48%; }
.reading-player .exam-writing-official.exam-split-layout--left-only .exam-pane-toggle { left: auto; right: 0; }
.exam-writing-official [hidden] { display: none; }
.exam-writing-task { padding: 28px; font-size: 16px; line-height: 1.45; color: black; white-space: pre-line; }
.exam-writing-task h2 { font-size: 18px; font-weight: bold; margin: 0 0 38px; }
.exam-writing-task p { margin: 0 0 38px; }
.exam-writing-editor-inset { padding: 50px; }
.exam-writing-box { border: 1px solid #c8c8c8; height: 720px; background: white; display: flex; flex-direction: column; }
.exam-writing-official-toolbar { flex: 0 0 36px; display: flex; align-items: center; flex-wrap: nowrap; overflow-x: auto; background: #f0f0f0; border-bottom: 1px solid #c8c8c8; color: #555; padding: 0 4px; }
.exam-writing-official-toolbar button { flex: 0 0 30px; height: 30px; display: grid; place-items: center; background: transparent; padding: 0; border: 0; border-radius: 0; color: inherit; }
.exam-writing-official-toolbar select { flex: 0 0 110px; height: 30px; font: 14px Arial, sans-serif; background: transparent; border: 0; border-radius: 0; padding: 0 8px; color: #333; }
.exam-writing-separator { flex: 0 0 1px; height: 26px; background: #c8c8c8; margin: 0 3px; }
.exam-writing-official-editor { flex: 1; min-height: 0; overflow: auto; padding: 12px; font: 16px/1.45 Arial, sans-serif; color: black; overflow-wrap: anywhere; white-space: pre-wrap; }
.exam-writing-official-editor ul { list-style: disc; padding-left: 24px; }
.exam-writing-official-editor ol { list-style: decimal; padding-left: 24px; }
