:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f5f7fa;
  line-height: 1.55;
}
* { box-sizing: border-box; }
body { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
main { width: min(100% - 2rem, 960px); margin: 0 auto; padding: 1.25rem 0 3rem; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(1.55rem, 4vw, 2rem); line-height: 1.2; margin-bottom: .35rem; }
h2 { font-size: clamp(1.2rem, 3vw, 1.45rem); line-height: 1.45; }
.eyebrow { margin-bottom: .2rem; color: #536178; font-size: .78rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.rules, .start-panel, .question-panel, .done-panel {
  background: #fff;
  border: 1px solid #cbd3df;
  border-radius: .55rem;
  padding: clamp(1rem, 3vw, 1.5rem);
}
.rules { margin-top: 1rem; }
.maintenance {
  max-width: 42rem;
  margin: clamp(3rem, 14vh, 9rem) auto 0;
  padding: clamp(1.5rem, 5vw, 3rem);
  border-top: .45rem solid #1959b8;
  background: #fff;
  box-shadow: 0 1.25rem 3rem #17203314;
}
.maintenance h1 { font-size: clamp(2rem, 6vw, 3.4rem); }
.maintenance-lead { max-width: 32rem; color: #40506a; font-size: 1.1rem; }
.maintenance-hours {
  display: grid;
  gap: .2rem;
  margin: 2rem 0;
  padding: 1rem 1.1rem;
  border-left: .35rem solid #f59e0b;
  background: #fff8e7;
}
.maintenance-hours-label { color: #7c2d12; font-size: .82rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.maintenance-hours strong { color: #172033; font-size: 1.45rem; }
.maintenance-hours span:last-child, .maintenance-note { color: #536178; }
.strategy-notice {
  margin: 1.2rem 0;
  border-left: .4rem solid #b45309;
  background: #fff4cc;
  padding: 1rem 1.1rem;
  color: #442600;
}
.strategy-notice h2 { margin-bottom: .55rem; color: #7c2d12; font-size: 1.2rem; }
.strategy-notice ol { margin: 0; padding-left: 1.35rem; }
.strategy-notice li + li { margin-top: .55rem; }
.strategy-notice strong { color: #7c2d12; }
.rule-list { padding-left: 1.25rem; }
.rule-list li + li { margin-top: .4rem; }
table { width: 100%; margin: 1.25rem 0; border-collapse: collapse; background: #fff; }
caption { text-align: left; font-size: 1.15rem; font-weight: 750; margin-bottom: .45rem; }
th, td { padding: .65rem .75rem; border: 1px solid #ccd4df; text-align: left; }
thead th { background: #eef2f7; }
.confirmation { display: flex; gap: .65rem; align-items: flex-start; margin: 1rem 0; }
.confirmation input { width: 1.2rem; height: 1.2rem; margin-top: .15rem; }
.exam-shell { position: relative; }
.exam-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem 0 1rem; }
.exam-status { display: flex; align-items: center; gap: .8rem; color: #40506a; }
#connection-status { font-size: .9rem; }
#connection-status.offline { color: #9f1239; font-weight: 700; }
#timer { min-width: 8.5rem; font-variant-numeric: tabular-nums; font-size: 1.15rem; font-weight: 750; text-align: right; }
#timer.warning { color: #9a3412; }
#timer.urgent { color: #9f1239; }
.modules { display: flex; gap: .45rem; margin-bottom: .75rem; overflow-x: auto; padding: .2rem .1rem .45rem; scrollbar-width: thin; }
.modules [role="tab"] { flex: 0 0 auto; max-width: min(24rem, 85vw); background: #e6ebf2; color: #28364d; text-align: left; white-space: normal; }
.modules [role="tab"][aria-selected="true"] { background: #1959b8; color: #fff; box-shadow: inset 0 -3px 0 #93c5fd; }
button { min-height: 44px; min-width: 44px; border: 0; border-radius: .4rem; background: #1959b8; color: #fff; padding: .65rem 1rem; font: inherit; font-weight: 680; cursor: pointer; }
button:hover { filter: brightness(.95); }
button:focus-visible, input:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }
button[disabled] { opacity: .52; cursor: not-allowed; }
.question-panel { min-height: 22rem; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { margin-bottom: .55rem; color: #40506a; font-weight: 680; }
.option { display: flex; align-items: flex-start; gap: .5rem; min-height: 48px; border: 1px solid #9ca9bb; border-radius: .4rem; padding: .7rem .8rem; margin: .55rem 0; background: #fff; cursor: pointer; }
.option:hover { border-color: #4671aa; background: #f6f9fd; }
.option.selected { border: 2px solid #1959b8; background: #eaf2ff; padding: calc(.7rem - 1px) calc(.8rem - 1px); }
.option input { flex: 0 0 auto; width: 1.15rem; height: 1.15rem; margin-top: .18rem; }
.option-letter { font-weight: 800; }
.actions, .dialog-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }
.secondary { background: #4b5d73; }
.finish-link { margin-top: .9rem; background: transparent; color: #4b5d73; text-decoration: underline; }
.danger-secondary { background: #fff; color: #9f1239; border: 1px solid #be123c; }
.notice { min-height: 1.75rem; margin-bottom: .35rem; color: #8b1538; font-weight: 650; }
.tab-coordination { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 .75rem; padding: .75rem; border: 1px solid #c77700; background: #fff7e6; }
.tab-coordination[hidden] { display: none; }
.tab-coordination p { margin: 0; }
.watermark { position: fixed; inset: 45% auto auto 12%; transform: rotate(-24deg); color: #1e293b12; font-size: clamp(1.1rem, 4vw, 2.8rem); pointer-events: none; z-index: 3; max-width: 75vw; overflow-wrap: anywhere; }
.restricted-content { user-select: none; -webkit-user-select: none; }
code, pre { white-space: pre-wrap; overflow-wrap: anywhere; }
pre { max-width: 100%; overflow-x: auto; padding: .75rem; background: #f2f4f7; }
.math { display: inline-block; max-width: 100%; overflow-x: auto; font-family: "STIX Two Math", "Cambria Math", serif; background: #f8fafc; padding: 0 .2rem; vertical-align: middle; }
dialog { width: min(92vw, 38rem); max-height: 85vh; border: 1px solid #9ca9bb; border-radius: .6rem; padding: 0; color: inherit; }
dialog::backdrop { background: #17203399; }
.finish-dialog-content { padding: 1.25rem; overflow-y: auto; }
.finish-summary ul { padding-left: 1.2rem; }
.error { color: #9f1239; font-weight: 700; }
@media (max-width: 600px) {
  main { width: min(100% - 1rem, 960px); padding-top: .5rem; }
  .exam-header { align-items: flex-start; }
  .exam-status { align-items: flex-end; flex-direction: column-reverse; gap: .15rem; }
  .question-panel { min-height: 25rem; padding: 1rem; }
  .strategy-notice { padding: .85rem .9rem; }
  .actions button { flex: 1 1 9rem; }
  th, td { padding: .55rem; }
}
@media (prefers-contrast: more) {
  :root { background: #fff; }
  .rules, .start-panel, .question-panel, .done-panel, .option { border-width: 2px; border-color: #172033; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
