:root {
  color-scheme: light;
  --ink: #182b2a;
  --muted: #667674;
  --line: #d8e3e1;
  --line-strong: #bdcfcc;
  --paper: #ffffff;
  --canvas: #f2f6f5;
  --teal: #0d6b67;
  --teal-dark: #0c4d4a;
  --teal-pale: #e9f4f2;
  --blue-pale: #edf3f8;
  --orange: #b45e2c;
  --orange-pale: #fff3e9;
  --green: #28795d;
  --green-pale: #edf7f1;
  --red: #a94237;
  --red-pale: #fff0ee;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--canvas);
}

button, select, input { font: inherit; }
button { color: inherit; }
button:focus-visible, select:focus-visible, input:focus-visible, a:focus-visible {
  outline: 3px solid #46a9a1;
  outline-offset: 2px;
}

.boot-state { padding: 48px 24px; text-align: center; color: var(--muted); }

.site-header {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 28px;
  color: #fff;
  background: var(--teal-dark);
  border-bottom: 3px solid #45a69d;
}

.brand-lockup { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  color: var(--teal-dark);
  background: #d8f0e9;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 800;
}
.brand-title { font-size: 18px; font-weight: 720; white-space: nowrap; }
.brand-subtitle { color: #c4dad7; font-size: 12px; white-space: nowrap; }
.header-local { color: #c4dad7; font-size: 12px; white-space: nowrap; }
.student-header-actions { display: flex; align-items: center; gap: 8px; }
.login-shell { min-height: 100vh; background: var(--canvas); }
.login-header { justify-content: space-between; }
.login-content { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 32px 18px; }
.login-panel { width: min(460px, 100%); padding: 29px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; }
.login-panel h1 { margin: 0; font-size: 27px; line-height: 1.25; }
.login-description { margin: 10px 0 24px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.login-form { display: grid; gap: 15px; }
.login-form label { display: grid; gap: 7px; font-size: 13px; font-weight: 650; }
.login-form input { width: 100%; min-height: 46px; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 4px; }
.login-submit { width: 100%; min-height: 46px; margin-top: 3px; }
.login-error { margin: 0; padding: 10px 12px; color: var(--red); background: var(--red-pale); border: 1px solid #edcbc6; border-radius: 4px; font-size: 13px; line-height: 1.5; }
.login-note { margin: 18px 0 0; padding-top: 14px; color: var(--muted); border-top: 1px solid var(--line); font-size: 12px; line-height: 1.6; }
.self-test-banner { display: flex; align-items: center; padding: 13px 15px; background: var(--teal-pale); border: 1px solid #b8d7d2; border-radius: 5px; }
.self-test-banner > div { display: grid; gap: 4px; }
.self-test-banner span { color: var(--muted); font-size: 13px; }
.assigned-empty { margin-top: 10px; }

.page-shell { width: min(1320px, 100%); margin: 0 auto; padding: 32px 28px 64px; }
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 23px;
}
.page-heading h1 { margin: 0; font-size: 29px; line-height: 1.2; font-weight: 720; }
.page-heading p { margin: 9px 0 0; color: var(--muted); font-size: 15px; }
.eyebrow { margin: 0 0 8px; color: var(--teal); font-size: 12px; font-weight: 750; text-transform: uppercase; }
.quiet-note { color: var(--muted); font-size: 13px; }

.overview-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 24px 0 30px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.overview-item { min-height: 83px; padding: 16px 19px; }
.overview-item + .overview-item { border-left: 1px solid var(--line); }
.overview-label { color: var(--muted); font-size: 12px; }
.overview-value { margin-top: 5px; font-size: 20px; font-weight: 720; }

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 30px 0 13px;
}
.section-heading h2 { margin: 0; font-size: 18px; font-weight: 720; }
.section-heading small { color: var(--muted); font-size: 13px; }
.set-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.set-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 122px;
  padding: 15px;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, transform 120ms ease;
}
.set-card:hover { border-color: #72aaa4; background: #fcfefd; transform: translateY(-1px); }
.set-card.selected { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }
.set-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.set-code { color: var(--teal-dark); font-size: 19px; font-weight: 760; }
.set-state { color: var(--muted); font-size: 11px; }
.set-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 17px; }
.mini-tag { padding: 3px 7px; color: #576866; background: #f0f5f4; border-radius: 3px; font-size: 11px; }
.mini-tag.done { color: #246c54; background: var(--green-pale); }

.setup-panel {
  margin: 10px 0 24px;
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.setup-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.setup-top h2 { margin: 0; font-size: 24px; }
.setup-top p { margin: 7px 0 0; color: var(--muted); }
.setup-close { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 22px; line-height: 1; }
.module-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 22px 0; }
.module-choice {
  min-height: 112px;
  padding: 16px;
  text-align: left;
  background: #fafcfb;
  border: 1px solid var(--line);
  border-radius: 5px;
  cursor: pointer;
}
.module-choice.active { background: var(--teal-pale); border: 2px solid var(--teal); padding: 15px; }
.module-choice strong { display: block; font-size: 17px; }
.module-choice span { display: block; margin-top: 7px; color: var(--muted); font-size: 13px; }
.setup-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.setup-saved { color: var(--muted); font-size: 13px; }

.btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  cursor: pointer;
  font-weight: 620;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.btn:hover { background: #f5faf9; border-color: #80aaa6; }
.btn.primary { color: #fff; background: var(--teal); border-color: var(--teal); }
.btn.primary:hover { background: #095955; }
.btn.subtle { color: #fff; background: transparent; border-color: rgba(255,255,255,.34); }
.btn.subtle:hover { background: rgba(255,255,255,.1); }
.btn.light { background: #f3f8f7; border-color: #bfd6d2; color: var(--teal-dark); }
.btn.is-active { color: var(--teal-dark); background: #d9efeb; border-color: #89bcb6; }
.btn.danger { color: var(--red); border-color: #e5bdb8; background: #fffafa; }
.btn[disabled] { opacity: .48; cursor: not-allowed; }

.reading-intro-shell { min-height: 100vh; color: #353a3a; background: #fff; }
.reading-intro-header {
  min-height: 100px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 29px 48px;
  align-content: center;
  column-gap: 24px;
  padding: 8px 26px;
  color: #fff;
  background: #116d6e;
}
.reading-intro-title { grid-column: 1; grid-row: 1; font-size: 21px; font-weight: 650; line-height: 1.25; }
.reading-intro-controls { grid-column: 1; grid-row: 2; display: flex; align-items: center; gap: 17px; font-size: 17px; font-weight: 600; }
.reading-intro-controls label { white-space: nowrap; }
.intro-module-label { color: rgba(255, 255, 255, .92); font-size: 15px; font-weight: 600; }
.intro-home {
  min-width: 122px;
  min-height: 42px;
  padding: 5px 16px;
  color: #fff;
  background: rgba(27, 135, 139, .8);
  border: 0;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.intro-home:hover { background: rgba(41, 151, 153, .9); }
.reading-intro-controls select {
  width: min(216px, 38vw);
  min-height: 42px;
  padding: 0 12px;
  color: #51595a;
  background: #fff;
  border: 1px solid #d5d9d9;
  border-radius: 5px;
  font-size: 14px;
}
.intro-begin {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  min-width: 146px;
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 19px;
  color: #187577;
  background: #fff;
  border: 1px solid #e3e8e8;
  border-radius: 13px;
  font-size: 17px;
  cursor: pointer;
}
.intro-begin:hover { background: #f2fbfa; }
.intro-begin span { font-size: 24px; line-height: 1; }
.reading-intro-page { min-height: calc(100vh - 100px); padding: 17px 32px 60px; background: #fff; }
.reading-label { color: #111; font-size: 16px; font-weight: 650; }
.reading-instructions { margin: 50px 3.5vw 0; }
.reading-instructions h1 {
  margin: 0;
  padding: 0 0 17px;
  color: #565b5c;
  border-bottom: 3px solid #d6d6d6;
  font-size: 19px;
  line-height: 1.35;
  font-weight: 400;
}
.reading-overview-copy {
  margin: 83px 0 15px;
  color: #5c6061;
  font-size: 16px;
  line-height: 1.5;
}
.task-types-table {
  width: min(575px, 100%);
  border: 2px solid #563a2d;
  border-collapse: collapse;
  color: #393d3e;
  font-size: 15px;
  line-height: 1.25;
}
.task-types-table th,
.task-types-table td { padding: 4px 12px; border: 1px solid #725448; text-align: left; vertical-align: top; }
.task-types-table th { color: #111; background: #0bd0b1; font-weight: 550; }
.task-types-table th:first-child,
.task-types-table td:first-child { width: 38%; }
.module-instructions { margin-top: 49px; }
.module-instructions h1 { padding-bottom: 17px; }
.module-intro-copy { margin-top: 57px; color: #5b5f60; font-size: 16px; line-height: 1.55; }
.module-intro-copy p { margin: 0 0 17px; }
.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; }

.history-list { display: grid; gap: 8px; }
.history-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.1fr) minmax(140px, .7fr) minmax(120px, .6fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
}
.history-title { font-weight: 650; }
.history-detail { color: var(--muted); font-size: 13px; }
.history-score { color: var(--teal-dark); font-size: 16px; font-weight: 730; }

.exam-shell { min-height: 100vh; display: flex; flex-direction: column; color: #303536; background: #fff; }
.exam-header {
  position: sticky;
  z-index: 5;
  top: 0;
  min-height: 102px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 29px 56px;
  align-content: center;
  gap: 0 24px;
  padding: 5px 26px 7px;
  color: #fff;
  background: #116d6e;
}
.exam-title { grid-column: 1; grid-row: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 21px; line-height: 1.2; font-weight: 650; }
.exam-navigation { grid-column: 1; grid-row: 2; display: flex; align-items: center; gap: 17px; font-size: 17px; font-weight: 600; }
.exam-navigation label { white-space: nowrap; }
.exam-focus-label { color: rgba(255, 255, 255, .92); font-size: 15px; font-weight: 600; }
.exam-home {
  min-width: 122px;
  min-height: 43px;
  padding: 5px 16px;
  color: #fff;
  background: rgba(27, 135, 139, .8);
  border: 0;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.exam-home:hover { background: rgba(41, 151, 153, .9); }
.exam-module-select {
  width: min(216px, 25vw);
  min-height: 43px;
  padding: 0 12px;
  color: #51595a;
  background: #fff;
  border: 1px solid #d5d9d9;
  border-radius: 5px;
  font-size: 14px;
}
.exam-actions { grid-column: 2; grid-row: 1 / 3; display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.exam-action {
  min-width: 150px;
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 20px;
  color: #eaf7f6;
  background: #168184;
  border: 0;
  border-radius: 12px;
  font-size: 17px;
  white-space: nowrap;
  cursor: pointer;
}
.exam-action:hover { background: #1b8d90; }
.exam-action:disabled { opacity: .78; cursor: not-allowed; }
.exam-action.is-active { background: #d9efeb; color: #125f61; }
.exam-action.next-action, .exam-action.nav-action { min-width: 136px; color: #187577; background: #fff; }
.exam-action.next-action:hover, .exam-action.nav-action:hover { background: #f2fbfa; }
.bookmark-icon { width: 12px; height: 17px; display: inline-block; background: currentColor; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 74%, 0 100%); }
.exam-status {
  min-height: 49px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 26px;
  color: #1b2323;
  background: #fff;
  font-size: 16px;
}
.exam-position, .exam-clock { display: flex; align-items: center; gap: 12px; }
.status-separator { width: 1px; height: 22px; background: #d4dada; }
.timer-box { min-width: 92px; color: #151b1b; font-variant-numeric: tabular-nums; letter-spacing: 2px; text-align: center; font-weight: 650; }
.timer-box.low-time { color: var(--red); }
.hide-time-action { display: inline-flex; align-items: center; gap: 8px; padding: 4px 0; color: #126c70; background: transparent; border: 0; font-size: 14px; cursor: pointer; white-space: nowrap; }
.eye-icon { font-size: 19px; line-height: 1; }
.exam-vocabulary { flex: 1; min-height: calc(100vh - 151px); padding: 20px 40px 50px; background: #fff; }
.exam-task-title { margin: 7px 0 0; color: #4f5556; text-align: center; font-size: 23px; line-height: 1.4; font-weight: 400; }
.exam-vocabulary .passage-copy { margin-top: 102px; white-space: normal; }
.exam-reading-body { flex: 1; min-height: calc(100vh - 151px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: #fff; }
.exam-passage, .exam-question { min-width: 0; overflow: auto; padding: 27px 34px 45px; }
.exam-passage { padding-left: 40px; border-right: 1px solid #e1e4e4; }
.passage-title { margin: 17px 0 24px; color: #303536; font-size: 22px; font-weight: 500; }
.passage-copy { color: #3d4142; font-size: 17px; line-height: 1.72; white-space: pre-wrap; overflow-wrap: anywhere; }
.passage-image-wrap { margin: 10px 0 16px; text-align: center; }
.passage-image { max-width: 100%; height: auto; object-fit: contain; border: 1px solid #e5e9e8; }
.source-missing {
  margin: 16px 0;
  padding: 15px;
  color: #74593c;
  background: var(--orange-pale);
  border-left: 3px solid #d28a4b;
  font-size: 14px;
  line-height: 1.55;
}
.blank-input {
  width: 1.2em;
  min-width: 1.2em;
  max-width: 1.2em;
  height: 1.55em;
  box-sizing: border-box;
  margin: 0 1px;
  padding: 0;
  vertical-align: baseline;
  text-align: center;
  color: #252929;
  background: #d7d7d7;
  border: 1px solid #c4cccc;
  border-radius: 2px;
  font-size: 17px;
  font-weight: 500;
}
.blank-input.current-blank { background: #d7d7d7; }
.blank-input.answer-correct { color: var(--green); background: var(--green-pale); border-color: var(--green); }
.blank-input.answer-wrong { color: var(--red); background: var(--red-pale); border-color: var(--red); }
.blank-wrap { display: inline-flex; align-items: baseline; gap: 2px; vertical-align: baseline; }
.insert-slot { min-width: 34px; min-height: 31px; margin: 0 4px; padding: 2px 7px; color: #333; background: #eee; border: 1px solid #999; border-radius: 2px; font-size: 13px; font-weight: 650; cursor: pointer; }
.insert-slot:hover, .insert-slot.selected { color: #fff; background: var(--teal); }
.insert-slot.inactive { color: #84918f; background: #f5f7f7; border-color: #cbd5d3; cursor: default; }
.insert-slot.answer-correct { color: #fff; background: var(--green); border-color: var(--green); }
.passage-sentence { display: inline; margin: 0; padding: 1px 0; color: inherit; text-align: left; line-height: inherit; background: transparent; border: 0; border-bottom: 1px dashed #9aafab; cursor: pointer; }
.passage-sentence:hover, .passage-sentence.selected { background: #e5f2f0; border-bottom-color: var(--teal); }
.passage-sentence:disabled { cursor: default; }
.passage-sentence-index { display: inline-block; margin-right: 4px; padding: 0 4px; color: var(--teal-dark); background: #edf4f3; border-radius: 2px; font-size: 0.72em; line-height: 1.5; vertical-align: 0.12em; }
.question-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.question-number { color: var(--teal-dark); font-size: 14px; font-weight: 740; }
.question-type { padding: 4px 7px; color: #526360; background: #f0f5f4; border-radius: 3px; font-size: 11px; }
.exam-question { display: flex; flex-direction: column; }
.question-prompt { margin: 20px 0 20px; color: #303536; font-size: 18px; line-height: 1.55; font-weight: 500; white-space: pre-wrap; }
.choice-list { display: grid; gap: 8px; margin-top: 12px; }
.choice-option {
  display: grid;
  grid-template-columns: 24px 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 5px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  line-height: 1.5;
}
.choice-option:hover { color: #126c70; }
.choice-option.selected { color: #126c70; }
.choice-option.correct-answer { color: var(--green); }
.choice-option.wrong-answer { color: var(--red); }
.choice-option input { width: 18px; height: 18px; margin: 0; accent-color: #126c70; }
.choice-key { color: #444; font-weight: 500; }
.answer-note { margin-top: 14px; padding: 10px 12px; border-radius: 4px; font-size: 13px; }
.answer-note.correct { color: #26674e; background: var(--green-pale); }
.answer-note.wrong { color: #913d35; background: var(--red-pale); }
.insertion-instruction { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.question-spacer { flex: 1; min-height: 20px; }
.exam-footer { display: none; }
.footer-progress { display: flex; align-items: center; gap: 13px; color: var(--muted); font-size: 13px; }
.progress-track { width: min(220px, 24vw); height: 5px; overflow: hidden; background: #e5ecea; border-radius: 5px; }
.progress-fill { height: 100%; background: var(--teal); }
.footer-buttons { display: flex; gap: 8px; }

.result-shell { width: min(1120px, 100%); margin: 34px auto 64px; padding: 0 24px; }
.result-heading { padding: 22px 24px; color: #fff; background: var(--teal-dark); border-radius: 6px 6px 0 0; }
.result-heading h1 { margin: 0; font-size: 24px; }
.result-heading p { margin: 7px 0 0; color: #cfe2df; }
.result-content { padding: 24px; background: #fff; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 6px 6px; }
.score-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.score-card { padding: 16px; background: #f7faf9; border: 1px solid var(--line); border-radius: 5px; }
.score-card span { display: block; color: var(--muted); font-size: 12px; }
.score-card strong { display: block; margin-top: 8px; color: var(--teal-dark); font-size: 25px; }
.score-card.emphasis { background: var(--teal-pale); border-color: #a2c8c2; }
.type-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 16px; }
.type-result { padding: 14px; border: 1px solid var(--line); border-radius: 5px; }
.type-result h3 { margin: 0; font-size: 14px; }
.type-result strong { display: block; margin-top: 8px; font-size: 19px; }
.type-result small { color: var(--muted); }
.focus-callout { margin: 18px 0; padding: 14px 16px; color: #684724; background: var(--orange-pale); border-left: 3px solid #d28a4b; line-height: 1.6; }
.review-entry-copy { margin: 14px 0 0; color: var(--muted); line-height: 1.6; }
.completed-answer-review { display: grid; gap: 0; margin-top: 19px; padding: 0 13px; background: #f8fbfa; border: 1px solid var(--line); border-radius: 5px; }
.review-question-context { padding: 11px 0 9px; color: var(--teal-dark); font-size: 13px; font-weight: 700; }
.completed-answer-row { display: grid; grid-template-columns: 105px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 54px; padding: 9px 0; line-height: 1.55; }
.completed-answer-row + .completed-answer-row { border-top: 1px solid var(--line); }
.completed-answer-row strong { color: var(--muted); font-size: 13px; }
.completed-answer-row > span { overflow-wrap: anywhere; }
.completed-answer-row .btn { justify-self: start; min-height: 36px; }
.review-entry-copy + .result-actions { margin-top: 16px; }
.answer-hidden-note { color: var(--muted); font-size: 12px; }
.missed-list { display: grid; gap: 10px; margin-top: 16px; }
.missed-item { padding: 14px; border: 1px solid var(--line); border-radius: 5px; }
.missed-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.missed-question { margin: 7px 0; font-weight: 650; line-height: 1.5; white-space: pre-wrap; }
.missed-choice { color: var(--muted); font-size: 13px; }
.revealed-answer { display: inline-block; margin: 0 3px; padding: 2px 6px; background: var(--green-pale); color: #265d49; border-radius: 3px; font-size: 12px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.empty-state { padding: 28px; color: var(--muted); text-align: center; background: #fbfdfc; border: 1px dashed var(--line-strong); border-radius: 5px; }

.modal-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(15, 30, 29, .45); }
.modal-card { width: min(540px, 100%); max-height: min(80vh, 720px); overflow: auto; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 16px 40px rgba(10, 35, 33, .22); }
.review-modal { width: min(760px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-close { width: 34px; height: 34px; border: 1px solid var(--line); background: #fff; border-radius: 4px; cursor: pointer; font-size: 20px; }
.question-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; margin-top: 16px; }
.review-question-list { display: grid; gap: 6px; margin-top: 14px; }
.review-question-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 8px; border: 1px solid var(--line); border-radius: 4px; }
.review-question-row.current { border-color: var(--teal); background: #f5faf9; }
.review-copy { display: grid; gap: 6px; min-width: 0; }
.review-stem, .review-answer { display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: start; gap: 8px; min-width: 0; font-size: 13px; line-height: 1.45; }
.review-stem strong, .review-answer strong { color: var(--muted); font-size: 12px; }
.review-stem span, .review-answer span { overflow-wrap: anywhere; }
.review-marked-label, .review-complete-label { color: #8a4f19; font-size: 12px; white-space: nowrap; }
.qnav-button { min-height: 39px; background: #fff; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; font-size: 13px; }
.qnav-button.answered { color: var(--teal-dark); background: var(--teal-pale); border-color: #acd0cb; }
.qnav-button.correct { color: #226449; background: var(--green-pale); border-color: #9ac5ac; }
.qnav-button.incorrect { color: #98392f; background: var(--red-pale); border-color: #dfa39c; }
.qnav-button.marked { color: #8a4f19; background: var(--orange-pale); border-color: #e1b582; }
.qnav-button.current { box-shadow: inset 0 0 0 2px var(--teal); }
.review-row-meta { display: grid; justify-items: end; gap: 4px; min-width: 74px; }
.review-result-label { font-size: 12px; font-weight: 700; white-space: nowrap; }
.review-result-label.correct { color: var(--green); }
.review-result-label.incorrect { color: var(--red); }
.modal-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; color: var(--muted); font-size: 12px; }
.legend-dot { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border: 1px solid var(--line-strong); vertical-align: middle; }
.legend-dot.done { background: var(--teal-pale); border-color: #acd0cb; }
.legend-dot.result-correct { background: var(--green-pale); border-color: #9ac5ac; }
.legend-dot.result-incorrect { background: var(--red-pale); border-color: #dfa39c; }
.legend-dot.marked { background: var(--orange-pale); border-color: #e1b582; }

@media (max-width: 900px) {
  .set-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .exam-header { position: static; grid-template-columns: 1fr; grid-template-rows: auto auto auto; gap: 7px; padding: 9px 16px 12px; }
  .exam-title { grid-column: 1; grid-row: 1; }
  .exam-navigation { grid-column: 1; grid-row: 2; }
  .exam-actions { grid-column: 1; grid-row: 3; justify-content: flex-start; flex-wrap: wrap; gap: 8px; }
  .exam-action { min-height: 44px; }
  .exam-reading-body { min-height: calc(100vh - 220px); }
}

@media (max-width: 680px) {
  .login-header { height: 58px; padding: 0 15px; }
  .login-content { min-height: calc(100vh - 58px); align-items: start; padding: 26px 14px; }
  .login-panel { padding: 22px 18px; }
  .student-header-actions { gap: 5px; }
  .student-header-actions .btn { min-height: 34px; padding: 5px 8px; font-size: 11px; }
  .header-local { overflow: hidden; text-overflow: ellipsis; }
  .site-header { height: 58px; padding: 0 15px; }
  .brand-subtitle, .header-local { display: none; }
  .page-shell { padding: 24px 15px 42px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading h1 { font-size: 25px; }
  .overview-strip { grid-template-columns: 1fr; }
  .overview-item { min-height: auto; }
  .overview-item + .overview-item { border-left: 0; border-top: 1px solid var(--line); }
  .set-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .set-card { min-height: 112px; padding: 12px; }
  .set-code { font-size: 16px; }
  .setup-panel { padding: 17px; }
  .module-choice-grid { grid-template-columns: 1fr; }
  .setup-actions { align-items: stretch; flex-direction: column; }
  .history-row { grid-template-columns: 1fr 1fr; }
  .history-row .btn { grid-column: 1 / -1; }
  .exam-header { gap: 6px; padding: 8px 12px 10px; }
  .exam-title { max-width: none; font-size: 18px; }
  .exam-navigation { flex-wrap: wrap; gap: 7px; font-size: 13px; }
  .exam-focus-label { font-size: 12px; }
  .exam-home { min-width: 64px; min-height: 36px; padding: 4px 10px; font-size: 14px; }
  .exam-module-select { width: min(162px, 42vw); min-height: 36px; padding: 0 7px; font-size: 12px; }
  .exam-actions { gap: 6px; }
  .exam-action { min-width: 0; min-height: 36px; padding: 5px 9px; border-radius: 7px; font-size: 12px; }
  .exam-action.next-action, .exam-action.nav-action { min-width: 72px; }
  .exam-status { min-height: 42px; gap: 7px; padding: 0 12px; font-size: 12px; }
  .exam-position, .exam-clock { gap: 7px; }
  .timer-box { min-width: 64px; letter-spacing: 1px; }
  .hide-time-action { gap: 4px; font-size: 12px; }
  .exam-vocabulary { min-height: calc(100vh - 196px); padding: 18px 16px 34px; }
  .exam-task-title { font-size: 18px; }
  .exam-vocabulary .passage-copy { margin-top: 60px; }
  .exam-reading-body { display: flex; flex-direction: column; min-height: calc(100vh - 196px); }
  .exam-passage, .exam-question { max-height: none; overflow: visible; padding: 18px 17px 25px; }
  .exam-passage { border-right: 0; border-bottom: 1px solid #e1e4e4; }
  .passage-title { margin: 5px 0 15px; font-size: 19px; }
  .passage-copy { font-size: 15px; line-height: 1.65; }
  .question-prompt { margin: 8px 0 12px; font-size: 16px; }
  .choice-option { min-height: 40px; padding: 5px 0; font-size: 14px; }
  .score-overview, .type-results { grid-template-columns: 1fr; }
  .result-shell { padding: 0 12px; margin-top: 18px; }
  .result-content { padding: 16px; }
  .question-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .result-question-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .result-question-chip { min-height: 40px; font-size: 12px; }
  .result-review-detail { padding: 14px; }
  .result-review-prompt { font-size: 15px; }
  .result-review-answer, .result-review-correct-answer { grid-template-columns: 78px minmax(0, 1fr); gap: 8px; }
  .review-question-row { grid-template-columns: 48px minmax(0, 1fr); gap: 7px; }
  .review-stem, .review-answer { grid-template-columns: 48px minmax(0, 1fr); gap: 5px; }
  .review-row-meta { grid-column: 2; display: flex; justify-content: flex-start; min-width: 0; }
  .review-marked-label { grid-column: 2; }
  .completed-answer-review { padding: 0 10px; }
  .completed-answer-row { grid-template-columns: 76px minmax(0, 1fr); gap: 8px; font-size: 13px; }
  .reading-intro-header {
    min-height: 112px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 27px 45px;
    gap: 0 8px;
    padding: 8px 12px;
  }
  .reading-intro-title { font-size: 18px; }
  .reading-intro-controls { gap: 8px; font-size: 13px; }
  .intro-module-label { font-size: 12px; }
  .intro-home { min-width: 64px; min-height: 38px; padding: 4px 10px; font-size: 14px; }
  .reading-intro-controls select { width: min(162px, 42vw); min-height: 38px; padding: 0 7px; font-size: 12px; }
  .intro-begin { grid-column: 2; grid-row: 1 / 3; min-width: 88px; min-height: 46px; padding: 6px 9px; border-radius: 9px; font-size: 14px; }
  .reading-intro-page { min-height: calc(100vh - 112px); padding: 16px 14px 40px; }
  .reading-label { font-size: 14px; }
  .reading-instructions, .module-instructions { margin: 38px 5px 0; }
  .reading-instructions h1 { padding-bottom: 13px; font-size: 17px; }
  .reading-overview-copy { margin-top: 46px; font-size: 14px; }
  .task-types-table { font-size: 13px; }
  .task-types-table th, .task-types-table td { padding: 6px 7px; }
  .module-intro-copy { margin-top: 37px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
