:root {
  color-scheme: light;
  --canvas: #eff5fa;
  --paper: #fff;
  --ink: #112945;
  --subtle: #4b6279;
  --line: #d5e2ed;
  --frost: #f5f9fd;
  --cyan: #087d9b;
  --focus: #067a9c;
  --good: #14694f;
  --good-fill: #e8f7ef;
  --good-line: #7bbca6;
  --bad: #9b2f42;
  --bad-fill: #fff0f1;
  --bad-line: #dda0a8;
  --review: #80551b;
  --review-fill: #fff5e4;
  --review-line: #dfbb7d;
  --body: Manrope, 'Segoe UI', sans-serif;
  --display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --mono: 'Cascadia Mono', 'SFMono-Regular', Consolas, monospace;
  font-family: var(--body);
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-inline-size: 0; }
p, h1, h2, h3, dl, dd { margin: 0; }
button, input { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }
::selection { color: var(--ink); background: #c8edf8; }

.sr-only, .icon-library {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.icon {
  display: inline-block;
  width: 19px;
  height: 19px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 5; inset: 10px auto auto 10px; clip-path: inset(50%); background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 6px; }
.skip-link:focus { clip-path: none; }
.frame { width: min(1220px, calc(100% - 72px)); margin-inline: auto; }

.site-header { background: #f8fbfe; border-bottom: 1px solid #dce7ef; }
.header-content { display: flex; align-items: center; justify-content: space-between; min-height: 69px; gap: 16px; }
.identity, .header-actions { display: flex; align-items: center; }
.identity { gap: 11px; }
.brand-mark {
  width: 39px;
  height: 39px;
  border-radius: 10px;
  background: #16334f;
  border: 1px solid #254b68;
  color: #b4ebf8;
  display: grid;
  place-items: center;
  box-shadow: inset 0 1px 1px #ffffff26, 0 2px 3px #122b4120;
}
.brand-mark .icon { width: 24px; height: 24px; }
.identity-copy { display: grid; gap: 3px; line-height: 1; }
.identity-copy strong { font: 700 21px/1 var(--display); letter-spacing: -.045em; }
.identity-copy > span, .week-label { font: 600 10px/1.2 var(--mono); letter-spacing: .12em; color: var(--subtle); white-space: nowrap; }
.header-actions { gap: 16px; }
.week-label { display: inline-flex; align-items: center; gap: 7px; padding: 9px 11px; background: #eef6fb; border: 1px solid var(--line); border-radius: 6px; }
.week-label > span { width: 6px; height: 6px; border-radius: 1px; background: #3d94ac; box-shadow: 0 0 0 2px #d4ebf3; }

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, color 150ms ease, transform 150ms ease;
}
.button:active:not(:disabled) { transform: translateY(1px); }
.button:disabled { cursor: default; }
.restart-button { background: #fdfefe; border-color: var(--line); color: #314e68; padding-inline: 12px; }
.restart-button:hover { background: #eaf4fb; border-color: #accbdf; }
.restart-button .icon { width: 17px; height: 17px; }
.button-quiet { color: #24465f; background: #f9fcff; border-color: var(--line); }
.button-quiet:hover:not(:disabled) { background: #ebf6fc; border-color: #abcddf; }
.button-quiet:disabled { color: #61768a; background: #f7fafc; border-color: #e1eaf1; }
.button-primary {
  background: #16334f;
  border-color: #16334f;
  box-shadow: inset 0 -2px #081e36, 0 2px 3px #13304a20;
  color: #f9fdff;
  padding-inline: 17px;
}
.button-primary:hover:not(:disabled) { background: #204969; border-color: #204969; box-shadow: inset 0 -2px #0e304a, 0 2px 8px #1382ae28; }
.button-primary:disabled { background: #e5eef6; border-color: #d4e3ef; color: #466078; box-shadow: none; }

.hero {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  margin-top: 26px;
  min-height: 214px;
  display: flex;
  align-items: center;
  border: 1px solid #cadfec;
  border-radius: 17px;
  background: #e3f1fa;
  box-shadow: inset 0 1px 0 #ffffffb8, 0 7px 22px #193e6110;
}
.hero-art {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 auto;
  width: 65%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  mask-image: linear-gradient(90deg, transparent, #000 37%);
}
.hero-copy { padding: 29px 38px 33px; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #27566e;
  font: 600 11px/1.5 var(--mono);
  text-transform: uppercase;
  letter-spacing: .12em;
}
.eyebrow > span { width: 19px; height: 2px; background: #278caa; border-radius: 1px; flex: none; }
.hero h1 { font: 700 clamp(42px, 5.2vw, 69px)/.99 var(--display); letter-spacing: -.077em; margin-block: 12px 12px; }
.hero-copy > p:last-child { color: #334f68; font-size: clamp(14px, 1.5vw, 17px); font-weight: 650; line-height: 1.55; }
.edition {
  position: absolute;
  inset: 16px 17px auto auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #f7fcff;
  background: #e9f5fbd9;
  color: #254c69;
  border-radius: 6px;
  padding: 5px 8px;
  font: 600 9px/1.25 var(--mono);
  text-transform: uppercase;
  letter-spacing: .11em;
}
.edition .icon { width: 13px; height: 13px; }

.bank-message { margin-block: 25px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); font-weight: 650; }
.study-layout { display: grid; grid-template-columns: minmax(0, 1fr) 322px; align-items: start; gap: 20px; margin-top: 21px; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: 0 6px 20px #153d5f0a, 0 1px 2px #153d5f08; }
.quiz-panel { padding: 25px 28px 24px; scroll-margin-top: 16px; }
.question-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.question-number { display: flex; align-items: center; gap: 8px; color: #42617a; font: 600 11px/1.25 var(--mono); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.question-number strong { color: #183a57; font-weight: 700; }
.question-led { width: 8px; height: 8px; border-radius: 2px; border: 1px solid #10819f; background: #b8eaf6; box-shadow: 0 0 0 3px #e9f7fb; }
.source-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid var(--badge-line); border-radius: 999px; color: var(--badge-ink); background: var(--badge-fill); font-size: 11px; font-weight: 800; line-height: 1.25; white-space: nowrap; }
.source-badge::before { content: ''; width: 6px; height: 6px; flex: none; transform: rotate(45deg); border-radius: 1px; background: currentColor; opacity: .72; }
.source-badge[data-source='gpt'] { --badge-line: #c6e9f2; --badge-ink: #176078; --badge-fill: #e9f7fc; }
.source-badge[data-source='gemini'] { --badge-line: #e0d7f4; --badge-ink: #674795; --badge-fill: #f3eefb; }
.source-badge[data-source='claude'] { --badge-line: #f2d8bf; --badge-ink: #884817; --badge-fill: #fff3e6; }
.question-prompt {
  margin-block: 16px 21px;
  font: 700 clamp(22px, 2.25vw, 30px)/1.29 var(--display);
  letter-spacing: -.036em;
  white-space: pre-line;
  overflow-wrap: anywhere;
  scroll-margin-top: 16px;
}
.question-prompt:focus, .feedback-title:focus, .results h2:focus { outline: none; }

fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.choices { display: grid; gap: 9px; }
.choice {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 13px;
  min-height: 61px;
  padding: 10px 13px;
  color: #1a364f;
  background: #f7fbfe;
  border: 1px solid #ccdeeb;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.choice:hover:not(.locked) { border-color: #83b9d1; background: #eef8fd; }
.choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice-letter { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 6px; background: #eaf3fa; color: #2f516e; border: 1px solid #d0e2ef; font: 700 14px/1 var(--mono); }
.choice-text { font-size: clamp(15px, 1.35vw, 17px); line-height: 1.48; font-weight: 700; white-space: pre-line; overflow-wrap: anywhere; }
.choice-indicator { width: 19px; height: 19px; display: grid; place-items: center; justify-self: end; border-radius: 50%; border: 1px solid #98b2c7; color: #2e5372; }
.choice-indicator .icon { width: 15px; height: 15px; stroke-width: 2.1; }
.choice.selected { border-color: #358eac; background: #eaf7fd; box-shadow: inset 0 0 0 1px #358eac; }
.choice.selected .choice-letter { color: #0f5870; background: #d6edf7; border-color: #a9d5e5; }
.choice.selected .choice-indicator { background: #177c9b; border-color: #177c9b; box-shadow: inset 0 0 0 4px #eaf7fd; }
.choice.locked { cursor: default; }
.choice.correct { --state: var(--good); --state-fill: var(--good-fill); --state-line: var(--good-line); }
.choice.incorrect { --state: var(--bad); --state-fill: var(--bad-fill); --state-line: var(--bad-line); }
.choice.correct, .choice.incorrect { border-color: var(--state-line); background: var(--state-fill); box-shadow: inset 0 0 0 1px var(--state-line); color: var(--state); }
.choice.correct .choice-letter, .choice.incorrect .choice-letter { color: var(--state); background: #ffffff99; border-color: var(--state-line); }
.choice.correct .choice-indicator, .choice.incorrect .choice-indicator { border-color: var(--state); color: #fff; background: var(--state); box-shadow: none; }

.answer-tools { display: flex; justify-content: flex-end; margin-top: 8px; }
.clear-answer { min-height: 32px; padding: 4px 9px; font-size: 12px; }

.feedback { margin-top: 15px; border: 1px solid #d6e5ef; border-radius: 10px; overflow: hidden; }
.feedback-title { display: flex; align-items: center; gap: 8px; padding: 9px 13px; font-size: 14px; font-weight: 800; line-height: 1.5; scroll-margin-top: 12px; }
.feedback[data-outcome='correct'] .feedback-title { color: var(--good); background: var(--good-fill); }
.feedback[data-outcome='incorrect'] .feedback-title { color: var(--bad); background: var(--bad-fill); }
.feedback[data-outcome='review'] .feedback-title { color: var(--review); background: var(--review-fill); }
.why { border-top: 1px solid #d6e5ef; background: #f8fbfe; }
.why summary { display: flex; justify-content: space-between; gap: 8px; align-items: center; min-height: 45px; padding: 8px 13px; color: #224f6a; font-size: 14px; font-weight: 800; cursor: pointer; list-style: none; }
.why summary::-webkit-details-marker { display: none; }
.why summary span { display: inline-flex; align-items: center; gap: 7px; }
.why summary:hover { background: #edf6fc; }
.why summary:focus-visible { outline-offset: -3px; }
.why .disclosure { transition: transform 150ms ease; }
.why[open] .disclosure { transform: rotate(180deg); }
.why-content { padding: 1px 14px 14px; font-size: 15px; line-height: 1.65; color: #2a4862; }
.evidence-heading { margin-top: 11px; font: 600 10px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--subtle); }
.evidence { margin: 4px 0 0; padding-inline-start: 17px; font-size: 13px; line-height: 1.55; }
.evidence li + li { margin-top: 4px; }
.question-actions { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; border-top: 1px solid #e3ebf2; padding-top: 15px; margin-top: 17px; }
.previous { justify-self: start; }
.check { justify-self: center; }
.next { justify-self: end; }

.progress-panel { padding: 21px 21px 17px; }
.progress-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.progress-heading h2 { font: 700 24px/1.2 var(--display); letter-spacing: -.05em; }
.progress-flake { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid #d3e8f3; border-radius: 7px; background: #eff8fd; color: #326d8a; }
.progress-flake .icon { width: 17px; height: 17px; }
.progress-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-block: 14px 12px; }
.progress-stats div, .results-stats div { display: flex; flex-direction: column-reverse; justify-content: center; gap: 4px; padding: 10px 11px; border: 1px solid #dae7f1; border-radius: 9px; background: #f4f9fd; }
.progress-stats dt, .results-stats dt { color: #44637d; font: 600 10px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.progress-stats dd, .results-stats dd { font: 700 26px/1.04 var(--display); letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.progress-stats dd span { color: #4b6580; font-size: .71em; font-weight: 650; }
progress { display: block; width: 100%; height: 7px; appearance: none; overflow: hidden; border: 0; border-radius: 3px; background: #deebf4; color: var(--cyan); }
progress::-webkit-progress-bar { background: #deebf4; }
progress::-webkit-progress-value { background: #1485a2; border-radius: 3px; transition: width 220ms ease; }
progress::-moz-progress-bar { background: #1485a2; border-radius: 3px; }
.progress-caption { color: var(--subtle); font-size: 12px; font-weight: 800; margin-top: 6px; }
.question-nav { border-top: 1px solid #e2ebf2; margin-top: 14px; padding-top: 12px; }
.question-nav h3 { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; font: 700 18px/1.25 var(--display); letter-spacing: -.035em; }
.question-nav h3 .icon { width: 16px; height: 16px; color: #406d89; }
.question-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 5px; }
.map-cell {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 29px;
  padding: 3px 0;
  background: #f1f7fc;
  color: #3c5b76;
  border: 1px solid #d6e4ef;
  border-radius: 6px;
  font: 700 11px/1 var(--mono);
  letter-spacing: -.035em;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}
.map-cell:hover { border-color: #6e9ab4; }
.map-mark { position: absolute; top: 2px; right: 2px; font: 800 8px/1 var(--body); }
.map-cell.correct, .legend-dot.correct { background: var(--good-fill); color: var(--good); border-color: var(--good-line); }
.map-cell.incorrect, .legend-dot.incorrect { background: var(--bad-fill); color: var(--bad); border-color: var(--bad-line); }
.map-cell.review, .legend-dot.review { background: var(--review-fill); color: var(--review); border-color: var(--review-line); }
.map-cell[aria-current='step'] { box-shadow: inset 0 0 0 1px #205879; border-color: #205879; }
.map-cell.unanswered[aria-current='step'] { background: #d9f0fa; color: #104962; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 10px; list-style: none; padding: 0; margin: 11px 0 0; color: #45617a; font-size: 10px; font-weight: 800; }
.legend li { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.legend-dot { width: 8px; height: 8px; border: 1px solid #a6bfd2; border-radius: 2px; background: #edf5fb; }
.saved-status { display: flex; align-items: center; gap: 7px; border-top: 1px solid #e1ebf3; margin-top: 14px; padding-top: 11px; color: #4d6c84; font-size: 11px; font-weight: 750; line-height: 1.3; }
.saved-status .icon { width: 16px; height: 16px; color: #307688; }
.results-link { width: 100%; margin-top: 12px; }

.results { max-width: 670px; margin-inline: auto; padding: 10px 5px 6px; }
.results-mark { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 15px; border-radius: 11px; border: 1px solid #bad9e9; background: #e7f5fc; color: #276786; }
.results-mark .icon { width: 30px; height: 30px; }
.results h2 { margin-block: 7px 10px; font: 700 clamp(34px, 4.2vw, 53px)/1 var(--display); letter-spacing: -.07em; scroll-margin-top: 16px; }
.results > p:not(.eyebrow) { color: #38546d; font-size: 16px; line-height: 1.55; }
.results-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-block: 18px 12px; }
.results-stats div { min-height: 76px; }
.results-stats dd { font-size: clamp(24px, 4vw, 34px); }
.results .results-note { color: var(--review); font-size: 13px !important; }
.review-section { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 13px; }
.review-section h3 { font: 700 18px/1.2 var(--display); }
.missed { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.missed .map-cell { width: 34px; min-height: 34px; }
.results-actions { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 9px; margin-top: 18px; }

.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-block: 19px 24px; color: #536d84; font: 600 10px/1.5 var(--mono); text-transform: uppercase; letter-spacing: .09em; }

dialog { max-width: min(420px, calc(100% - 30px)); padding: 0; border: 1px solid #c6d9e8; border-radius: 14px; background: var(--paper); color: var(--ink); box-shadow: 0 20px 90px #112a4b40; }
dialog::backdrop { background: #132e4d66; }
.dialog-content { padding: 22px; }
.dialog-content h2 { font: 700 29px/1.2 var(--display); letter-spacing: -.045em; }
.dialog-content p { margin-top: 7px; color: var(--subtle); line-height: 1.55; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 19px; }

@media (max-width: 1080px) {
  .frame { width: calc(100% - 46px); }
  .study-layout { grid-template-columns: minmax(0, 1fr) 291px; gap: 15px; }
  .quiz-panel { padding-inline: 22px; }
  .progress-panel { padding-inline: 17px; }
  .hero-copy { padding-inline: 30px; }
}

@media (max-width: 835px) {
  .study-layout { grid-template-columns: minmax(0, 1fr); }
  .question-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 7px; }
  .map-cell { min-height: 36px; font-size: 12px; }
  .hero { min-height: 184px; }
  .hero-art { width: 72%; }
  .hero h1 { font-size: clamp(42px, 7vw, 60px); }
  .progress-panel { padding-inline: 22px; }
}

@media (max-width: 520px) {
  .frame { width: calc(100% - 26px); }
  .header-content { min-height: 60px; gap: 8px; }
  .header-actions { gap: 0; }
  .identity { gap: 8px; }
  .identity-copy strong { font-size: 20px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 8px; }
  .brand-mark .icon { width: 21px; height: 21px; }
  .week-label, .edition { display: none; }
  .restart-button { font-size: 12px; min-height: 40px; padding-inline: 9px; }
  .hero { margin-top: 13px; min-height: 169px; border-radius: 13px; }
  .hero-art { width: 88%; opacity: .58; mask-image: linear-gradient(90deg, transparent, #000 64%); }
  .hero-copy { padding: 20px 17px; }
  .hero h1 { font-size: clamp(36px, 9.5vw, 49px); margin-block: 8px; letter-spacing: -.07em; }
  .eyebrow { gap: 5px; font-size: 9px; letter-spacing: .055em; }
  .eyebrow > span { width: 11px; }
  .hero-copy > p:last-child { max-width: 29ch; font-size: 13px; }
  .study-layout { margin-top: 13px; gap: 13px; }
  .panel { border-radius: 13px; }
  .quiz-panel, .progress-panel { padding: 16px 13px; }
  .question-number { font-size: 10px; letter-spacing: .04em; gap: 6px; }
  .question-led { width: 6px; height: 6px; box-shadow: 0 0 0 2px #e9f7fb; }
  .source-badge { padding: 4px 7px; font-size: 10px; }
  .question-prompt { margin-block: 13px 16px; font-size: clamp(21px, 5.55vw, 25px); }
  .choices { gap: 8px; }
  .choice { min-height: 54px; padding: 8px 9px; grid-template-columns: 29px minmax(0, 1fr) 18px; gap: 8px; }
  .choice-letter { width: 29px; height: 29px; font-size: 12px; }
  .choice-indicator { width: 17px; height: 17px; }
  .question-actions { grid-template-columns: 1fr 1fr; grid-template-areas: 'check check' 'previous next'; margin-top: 13px; padding-top: 12px; gap: 8px; }
  .previous { grid-area: previous; }
  .check { grid-area: check; width: 100%; }
  .next { grid-area: next; }
  .question-actions .button-quiet { padding-inline: 9px; }
  .question-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 5px; }
  .map-cell { min-height: 34px; }
}

@media (max-width: 335px) {
  .question-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .source-badge { font-size: 9px; }
  .question-meta { gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media (forced-colors: active) {
  .choice.selected, .map-cell[aria-current='step'] { outline: 2px solid Highlight; outline-offset: -3px; }
}
