:root {
  color-scheme: light;
  --exam-navy: #224c71;
  --exam-deep: #193e60;
  --exam-band: #376b94;
  --exam-light: #e8f0f6;
  --exam-line: #b9c9d6;
  --exam-text: #172431;
  --exam-muted: #4c5f70;
  font: 100%/1.55 Arial, Helvetica, sans-serif;
  color: var(--exam-text);
  background: white;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: #164e78; }
button, input, textarea, select { font: inherit; color: inherit; }
button, summary, select { cursor: pointer; }
button { background: white; border: 1px solid var(--exam-line); }
button:disabled { cursor: default; opacity: .52; }
:focus-visible { outline: 3px solid #c77512; outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
h1,h2,h3,h4,p { margin: 0; }
h1,h2,h3,h4 { line-height: 1.25; }
button svg, .legend-note svg, .nav-cell svg { width: 1.05rem; height: 1.05rem; flex: none; vertical-align: middle; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.exam-frame { --question-font: 1.0625rem; display: flex; flex-direction: column; height: 100vh; height: 100dvh; min-height: 17rem; background: white; }
.exam-frame.large-type { --question-font: 1.3125rem; }
.exam-head, .exam-foot { flex: 0 0 auto; color: white; background: var(--exam-navy); }
.exam-head { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; padding: .58rem clamp(.9rem,2vw,2rem); min-height: 3.5rem; border-top: 3px solid var(--exam-deep); border-bottom: 1px solid #11354e; }
.exam-title { font-weight: 600; line-height: 1.35; font-size: 1.075rem; }
.exam-test-name { font-weight: 750; }
.head-sep { color: #c7dced; margin: 0 .2rem; }
.head-status,.clock { display: flex; align-items: center; gap: .58rem; }
.head-status { gap: 1.2rem; flex-shrink: 0; }
.head-count { border-left: 1px solid #8aa6bc; padding-left: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.clock { border: none; padding: .28rem; color: white; background: transparent; }
.clock strong { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.clock.low-time { color: #ffe0ac; }
.exam-tools { display: flex; justify-content: space-between; align-items: stretch; border-bottom: 1px solid #a2bacd; background: var(--exam-light); padding-inline: clamp(.3rem,1.5vw,1.4rem); min-height: 2.8rem; flex: 0 0 auto; }
.tools-start { display: flex; flex-wrap: wrap; }
.tool { display: inline-flex; gap: .4rem; align-items: center; border: 0; border-radius: 0; background: transparent; padding: .5rem .68rem; font-size: .92rem; color: #1c405e; font-weight: 600; }
.tool:is(:hover,.active) { background: #d0e0ed; }
.tool[data-action="flag"].active svg { fill: #f6bd60; stroke: #573f24; }
#work-area { min-height: 0; }
.work-area { flex: 1; }
.work-area.single, .plain-panel { overflow: auto; }
.work-area.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.source-pane, .question-pane { padding: clamp(1.4rem,3.4vw,3.6rem); min-width: 0; }
.source-pane, .split .question-pane { overflow: auto; overscroll-behavior: contain; }
.source-pane { position: relative; border-right: 5px double #98aec0; padding-inline-end: clamp(1.35rem,3vw,2.8rem); }
.single .question-pane { max-width: 58rem; margin-inline: auto; padding-top: clamp(1.6rem,5vh,4.3rem); }
.question-meta { color: var(--exam-muted); font-size: .91rem; line-height: 1.4; margin-bottom: 1.25rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1rem; }
.question-meta b { color: var(--exam-navy); }
.source-title { font: 700 1.19em/1.35 Arial,sans-serif; margin-bottom: 1.25rem; }
.source-pane, .question-pane, .review-source { font-size: var(--question-font); }
.question-text { font: 600 1.14em/1.53 Arial,sans-serif; margin: 0 0 1.45rem; white-space: pre-line; overflow-wrap: anywhere; }
.passage-line { display: flex; align-items: baseline; gap: .7rem; margin: 0 0 1.1rem; line-height: 1.63; white-space: pre-line; overflow-wrap: anywhere; }
.para-num { min-width: 1.15rem; flex: none; color: #5c6975; font-size: .82em; font-weight: 700; }
mark { background: #ffe197; color: inherit; }
.table-scroll { overflow-x: auto; margin: 1.3rem 0 .5rem; }
table { border-collapse: collapse; width: 100%; font-size: .93em; font-variant-numeric: tabular-nums; }
caption { text-align: left; margin-bottom: .45rem; font-weight: 700; }
th,td { border: 1px solid #aebbc5; padding: .48rem .65rem; text-align: left; }
thead { background: #e6eef4; } tbody th { font-weight: 500; }
.choices { margin: 0; padding: 0; border: 0; min-width: 0; }
.choices legend, .field-label { display: block; margin-bottom: .65rem; font-size: .94em; color: var(--exam-muted); }
.choice { display: grid; grid-template-columns: 1.1rem auto 1fr; gap: .55rem; align-items: baseline; padding: .58rem .54rem; margin: .13rem 0; line-height: 1.5; border-radius: .18rem; border: 1px solid transparent; cursor: pointer; }
.choice:hover { background: #f3f6f9; }
.choice:has(input:checked) { background: #e9f1f8; border-color: #abc2d4; }
.choice input { align-self: start; inline-size: 1.05rem; block-size: 1.05rem; margin: .29em 0 0; accent-color: var(--exam-navy); }
.letter { font-weight: 600; color: #32495c; }
input[type=text],textarea,select { border: 1px solid #8398a8; border-radius: 3px; background: #fff; padding: .62rem .75rem; max-width: 100%; }
input[aria-invalid=true] { border-color: #a33d1b; }
select { width: auto; max-width: 100%; }
.number-row { display: flex; gap: .65rem; align-items: baseline; flex-wrap: wrap; }
.number-row input { width: 11rem; }
.field-hint, .dialog-note { margin-top: .6rem; color: var(--exam-muted); font-size: .9rem; }
.essay-area { display: block; width: 100%; min-height: clamp(15rem,37vh,30rem); line-height: 1.55; }
textarea { resize: vertical; }
.exam-foot { display: flex; gap: 1rem; align-items: stretch; justify-content: space-between; padding: .35rem clamp(.5rem,1.8vw,1.6rem) max(.35rem,env(safe-area-inset-bottom)); border-top: 2px solid #183d5f; }
.foot-set { display: flex; gap: .36rem; align-items: center; }
.exam-foot button,.exam-foot a { display: inline-flex; gap: .45rem; align-items: center; justify-content: center; min-height: 2.65rem; line-height: 1.2; color: white; background: transparent; text-decoration: none; padding: .44rem .72rem; border: 1px solid transparent; border-radius: .18rem; font-weight: 600; }
.exam-foot button:hover:not(:disabled),.exam-foot a:hover { border-color: #9bbbd1; background: #32638a; }
.exam-foot .primary-foot { border-color: #a9c4d8; background: var(--exam-band); }
.exam-foot [data-action=next], .exam-foot [data-action=resume-part] { flex-direction: row-reverse; }
.plain-panel { flex: 1; }
.panel-inner { width: min(51rem,100%); margin: 0 auto; padding: clamp(2rem,5.5vh,4.75rem) clamp(1.2rem,4vw,3.2rem); }
.panel-inner h1 { font-size: clamp(1.8rem,3vw,2.35rem); margin-bottom: .8rem; letter-spacing: -.025em; }
.panel-inner h2 { font-size: 1.3rem; margin: 1.6rem 0 .75rem; }
.panel-inner > p { max-width: 67ch; margin: .55rem 0 1rem; }
.intro-kicker { color: var(--exam-navy); font-weight: 700; font-size: .95rem; margin-bottom: .5rem; }
.intro-facts, .review-counts { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; padding: .85rem 0; margin: 1.25rem 0; border-block: 1px solid var(--exam-line); }
.intro-facts span,.review-counts span { color: #2c4459; }
.intro-list { padding-left: 1.25rem; max-width: 65ch; }
.intro-list li { margin: .45rem 0; }
.review-filters { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin: 1.2rem 0; }
.review-filters button, .dialog-actions button, .dialog-contents>button, [data-loading] button { border-radius: .2rem; padding: .4rem .7rem; background: white; }
.review-filters button[aria-pressed=true], .action-main { background: var(--exam-navy)!important; color: white; border-color: var(--exam-navy); }
.nav-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(4.2rem,1fr)); gap: .42rem; }
.nav-cell { min-height: 2.8rem; display: inline-flex; gap: .35rem; align-items: center; justify-content: center; border-radius: .2rem; }
.nav-cell:hover { border-color: #4a6d88; }
.nav-cell.answered { background: #e6eff7; color: #1e4563; }
.nav-cell.flagged svg { fill: #efb963; color: #603f1b; }
.legend-note { display: flex; align-items: center; gap: .4rem; font-size: .88rem; color: var(--exam-muted); }
.legend-note svg:not(:first-child),.legend-note .unanswered-icon { margin-left: .55rem; }
.unanswered-icon { display: inline-block; border: 1px solid #8499aa; height: .7rem; width: .7rem; border-radius: 50%; }
.empty-filter { grid-column: 1/-1; color: var(--exam-muted); }
.tool-dialog { width: min(35rem,calc(100vw - 1.5rem)); padding: 0; border: 1px solid #688399; border-radius: .26rem; max-height: min(83dvh,50rem); box-shadow: 0 .6rem 2.3rem #0c233e38; color: var(--exam-text); }
.tool-dialog::backdrop { background: #172d414f; }
.tool-dialog.floating { position: fixed; z-index: 5; inset: 7rem 1.2rem auto auto; margin: 0; width: min(26rem,calc(100vw - 2rem)); max-height: calc(100dvh - 11rem); }
.dialog-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem .9rem; color: white; background: var(--exam-navy); position: sticky; top: 0; z-index: 1; }
.dialog-title h2 { font-size: 1.05rem; }
.dialog-title button { color: white; background: transparent; border: 0; padding: .3rem; display: grid; place-items: center; }
.dialog-contents { padding: 1.1rem; }
.dialog-contents > p { margin-bottom: .8rem; }
.dialog-contents textarea, .calc-display { width: 100%; margin-top: .6rem; }
.calc-display { font-size: 1.2rem; text-align: right; font-variant-numeric: tabular-nums; }
.calc-keys { display: grid; grid-template-columns: repeat(5,1fr); gap: .35rem; margin-top: .7rem; }
.calc-keys button { font-weight: 600; min-height: 2.5rem; border-radius: .18rem; }
.calc-equals { color: white; background: var(--exam-navy); }
.formula-list { margin: 0; }.formula-list dt,.answer-facts dt { font-weight: 700; }.formula-list dd { margin: .28rem 0 .9rem; }
.dialog-actions { display: flex; gap: .55rem; justify-content: flex-end; margin-top: 1.1rem; }
.results-inner { max-width: 54rem; }
.score-row { display: flex; gap: clamp(1.5rem,5vw,4rem); align-items: center; padding: 1rem 0; border-block: 1px solid var(--exam-line); margin: 1.25rem 0 .7rem; }
.score-row>div:first-child { display: grid; }.score-number { font-size: 2.6rem; line-height: 1.15; color: var(--exam-navy); }.score-number small { font-size: 1.3rem; }
.answer-review { border-bottom: 1px solid var(--exam-line); }
.answer-review > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem .2rem; }
.answer-review summary small { display: block; color: var(--exam-muted); font-size: .9rem; }.answer-review summary:hover { background: #f1f6f9; }
.result-tag { color: #34536a; font-size: .9rem; }.status-incorrect,.status-unanswered { color: #8e4925; }
.answer-content { padding: .4rem .45rem 1.25rem; }.answer-content h3 { font-size: 1.08rem; margin-bottom: .8rem; white-space: pre-line; }.answer-content h4 { margin: 1rem 0 .2rem; }
.answer-facts dd { margin: .1rem 0 .7rem; white-space: pre-line; }.written-text { white-space: pre-wrap; }
.review-source { background: #f3f6f8; padding: .65rem .8rem; margin: .8rem 0; }.review-source .source-title { margin-top: .75rem; }
.storage-warning { color: #853e17; padding: .3rem 1rem; }.mobile-panes { display: none; }
@media (max-width:760px) {
  .exam-head { gap: .3rem; padding: .45rem .7rem; flex-wrap: wrap; min-height: auto; }
  .exam-title { font-size: .96rem; }.head-status { gap: .65rem; margin-left: auto; font-size: .89rem; }
  .time-label { display: none; }.head-count { padding-left: .55rem; }
  .exam-tools { padding-inline: .2rem; align-items: center; }.tool { padding: .43rem .4rem; font-size: .82rem; min-height: 2.5rem; gap: .25rem; }
  .tools-start { flex: 1; flex-wrap: nowrap; overflow-x: auto; }.tool span { white-space: nowrap; }.tool svg { width: .92rem; height: .92rem; }
  .work-area.split { display: flex; flex-direction: column; }
  .source-pane,.question-pane,.single .question-pane { padding: 1.1rem 1rem; }
  .source-pane { border: 0; }.split .source-pane,.split .question-pane { flex: 1; min-height: 0; }
  .split[data-pane="question"] .source-pane,.split[data-pane="passage"] .question-pane { display: none; }
  .mobile-panes { display: flex; flex: 0 0 auto; gap: .15rem; padding: .35rem .65rem 0; border-bottom: 1px solid var(--exam-line); background: #f7f9fb; }
  .mobile-panes button { padding: .35rem .7rem; background: transparent; border: 0; border-bottom: 3px solid transparent; font-size: .9rem; }
  .mobile-panes button[aria-pressed=true] { border-color: var(--exam-navy); color: var(--exam-navy); font-weight: 700; }
  .exam-foot { padding-inline: .25rem; gap: .15rem; }.foot-set { gap: .1rem; }
  .exam-foot button,.exam-foot a { min-height: 2.7rem; gap: .2rem; padding: .36rem .45rem; font-size: .86rem; }.exam-foot button svg { width: .94rem; }
  .tool-dialog.floating { inset: auto .5rem 3.8rem auto; width: min(26rem,calc(100vw - 1rem)); max-height: 68dvh; }
}
@media (max-width:390px) {
  .exam-head { align-items: flex-start; }.exam-title { flex-basis: 100%; }.head-status { width: 100%; justify-content: space-between; }
  .exam-foot [data-action=review] svg, .exam-foot [data-action=navigator] svg { display: none; }
}
@media (max-height:440px) { .exam-frame { min-height: 0; }.exam-head,.exam-tools,.exam-foot { min-height: 0; } }

.data-figure { margin: 1.25rem auto .5rem; max-width: 30rem; }
.data-figure figcaption { font-size: .98em; font-weight: 700; margin-bottom: .3rem; }
.data-figure svg,.plot-box svg { display: block; width: 100%; height: auto; color: #294358; }
.data-figure text,.plot-box text { fill: currentColor; font: 12px Arial,sans-serif; }
.graph-grid { fill: none; stroke: #d4dfe6; stroke-width: 1; }
.graph-axis { fill: none; stroke: #526f83; stroke-width: 1.4; }
.chart-keys { padding: 0; margin: .25rem 0; display: flex; flex-wrap: wrap; gap: 1rem; list-style: none; font-size: .85em; }
.chart-keys i { display: inline-block; width: 1.15rem; border-top: 3px solid var(--series); vertical-align: middle; margin-right: .3rem; }
.plot-box { max-width: 21rem; margin: 0 0 1rem; }
.plot-point { cursor: pointer; }.point-dot { stroke: #19476c; fill: #e1edf5; stroke-width: 2; }.selected .point-dot,.plot-point:hover .point-dot { fill: #244e72; }
.plot-point text { font-weight: bold; }
.order-bank { display: flex; flex-wrap: wrap; gap: .5rem; min-height: 2.3rem; }
.order-bank button,.order-drop button { border-radius: .2rem; padding: .25rem .6rem; }
.order-bank button { cursor: grab; border-color: #64839a; background: #eaf1f6; }
.order-drop { border: 1px dashed #68859a; border-radius: .2rem; padding: .65rem .85rem; margin-top: .7rem; }
.order-drop>p { font-size: .9em; color: var(--exam-muted); }.order-drop ol { padding-left: 1.5rem; margin: .4rem 0; }
.order-drop li { padding: .35rem 0; }.order-drop li div { display: inline-flex; flex-wrap: wrap; gap: .2rem; margin-left: .6rem; font-size: .82em; }

