:root {
  color-scheme: light;
  --ink: #201d27;
  --muted: #6b6570;
  --line: #ddd9e2;
  --soft-line: #e8e5eb;
  --paper: #ffffff;
  --wash: #faf9fc;
  --cream: #fcfbfd;
  --indigo: #2f2477;
  --indigo-dark: #241a63;
  --indigo-light: #f5f1fa;
  --violet: #7351ad;
  --gold: #94620f;
  --green: #18755e;
  --green-soft: #e7f6ef;
  --red: #a63848;
  --red-soft: #fff0f2;
  --shadow-sm: 0 18px 42px rgba(35, 26, 48, 0.06);
  --shadow-lg: 0 12px 24px rgba(52, 36, 72, 0.07), 0 32px 72px rgba(42, 30, 56, 0.12);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --max: 1120px;
  font-family: Arial, Helvetica, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

button,
select,
input {
  font: inherit;
}

button,
a,
select,
input,
[contenteditable="true"],
[tabindex="0"] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
[contenteditable="true"]:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 3px solid #8d83e8;
  outline-offset: 3px;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.05;
  letter-spacing: -0.045em;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 999;
  top: 12px;
  left: 12px;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  background: var(--ink);
  color: white;
  border-radius: 8px;
}

.skip-link:focus-visible {
  width: auto;
  height: auto;
  padding: 12px 16px;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
  vertical-align: -0.18em;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-shell:not([data-screen="home"]) > .site-header,
.app-shell:not([data-screen="home"]) > .site-footer {
  display: none;
}

.site-header {
  width: min(1120px, calc(100% - 40px));
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  border-bottom: 1px solid var(--soft-line);
  background: white;
}

.brand,
.exam-brand,
.review-brand,
.result-brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  font-weight: 700;
}

.brand-logo {
  width: 136px;
  height: auto;
  display: block;
  object-fit: contain;
}

.brand-logo-compact {
  width: 76px;
}

.header-label {
  color: #6e6874;
  font-size: 0.69rem;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#main-content {
  flex: 1;
}

.hero {
  width: min(1120px, calc(100% - 40px));
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(270px, 0.7fr);
  align-items: end;
  gap: clamp(40px, 8vw, 100px);
  margin: 0 auto;
  padding: clamp(64px, 9vw, 106px) 0 clamp(58px, 7vw, 84px);
}

.eyebrow {
  margin-bottom: 0;
  color: var(--gold);
  font-size: 0.69rem;
  font-weight: 760;
  letter-spacing: 0.09em;
  line-height: 1.4;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 780px;
  margin: 14px 0 20px;
  color: #1d1924;
  font-size: clamp(2.5rem, 6.1vw, 4.5rem);
  font-weight: 560;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.hero-lede {
  max-width: 650px;
  margin: 0;
  color: #64606b;
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  line-height: 1.65;
}

.session-summary {
  border-top: 1px solid #d8d3dd;
  border-bottom: 1px solid #d8d3dd;
}

.session-summary > div {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 14px;
  padding: 17px 0;
}

.session-summary > div + div {
  border-top: 1px solid var(--soft-line);
}

.session-summary .icon {
  color: #6d4fb0;
}

.session-summary p {
  display: grid;
  gap: 3px;
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
}

.session-summary strong {
  color: #29242f;
}

.session-summary span {
  color: #706a76;
}

.mode-section,
.resume-card,
.preview-notice {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.mode-section {
  padding: clamp(55px, 7vw, 84px) 0;
  border-top: 1px solid var(--soft-line);
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr minmax(270px, 0.6fr);
  gap: 40px;
  align-items: end;
  margin-bottom: 30px;
}

.section-heading h2,
.preview-notice h2 {
  margin-bottom: 0;
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  font-weight: 570;
}

.section-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.mode-card {
  --accent: #2d7467;
  position: relative;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  padding: clamp(25px, 3.2vw, 36px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #fcfbfd 100%);
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.mode-card::before {
  position: absolute;
  top: -1px;
  right: 22px;
  left: 22px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--accent);
  content: "";
}

.mode-card-objective {
  --accent: #7351ad;
}

.mode-card:hover {
  border-color: #c9c1d2;
  box-shadow: 0 23px 50px rgba(35, 26, 48, 0.11);
  transform: translateY(-4px);
}

.mode-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 780;
  letter-spacing: 0.08em;
}

.synthetic-label {
  align-self: flex-start;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--indigo);
  background: var(--indigo-light);
  font-size: 0.72rem;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mode-card h3 {
  max-width: 410px;
  margin: 38px 0 13px;
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  font-weight: 590;
  line-height: 1.13;
}

.mode-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.58;
}

.feature-list {
  display: grid;
  gap: 0;
  margin: 24px 0 30px;
  padding: 0;
  list-style: none;
  color: #5c5661;
  font-size: 0.8rem;
}

.feature-list li {
  min-height: 38px;
  display: grid;
  grid-template-columns: 10px 1fr;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--soft-line);
}

.feature-list li::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.mode-controls {
  display: grid;
  gap: 7px;
  margin-top: auto;
}

.mode-controls label {
  color: #4a444e;
  font-size: 0.75rem;
  font-weight: 650;
}

.mode-controls select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
}

.control-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: auto;
}

.control-pair .mode-controls {
  margin: 0;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: none;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.button-primary {
  color: white;
  background: var(--indigo);
}

.button-primary:hover:not(:disabled) {
  background: var(--indigo-dark);
}

.button-secondary {
  border-color: var(--line);
  background: white;
}

.button-secondary:hover:not(:disabled) {
  border-color: var(--indigo);
}

.button-quiet {
  color: var(--indigo);
  background: transparent;
}

.button-wide {
  width: 100%;
  margin-top: 18px;
}

.resume-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 42px;
  padding: 26px 30px;
  border: 1px solid #d9d3e1;
  border-radius: 12px;
  background: #faf9fc;
}

.resume-card h2 {
  margin-bottom: 8px;
  font-size: 1.6rem;
}

.resume-card p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.resume-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-notice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 25px;
  align-items: center;
  margin: 20px auto 80px;
  padding: 34px;
  border: 1px solid #d9d3e1;
  border-radius: 12px;
  background: #faf9fc;
  box-shadow: 0 16px 38px rgba(44, 31, 61, 0.05);
}

.preview-notice h2 {
  margin: 8px 0 0;
  font-size: 1.75rem;
  font-weight: 570;
}

.preview-notice p:last-child {
  max-width: 650px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.preview-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: #4e357c;
  font-family: Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
}

.site-footer {
  width: min(1120px, calc(100% - 40px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 0 auto;
  padding: 28px 0 34px;
  border-top: 1px solid var(--soft-line);
  color: #7b7580;
  background: white;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.4;
}

.site-footer p {
  max-width: 560px;
  margin: 0;
  text-align: right;
}

.brand-logo-footer {
  flex: 0 0 auto;
}

/* Shared timed environment */

.exam-frame,
.review-page {
  min-height: calc(100vh - 198px);
  background: linear-gradient(180deg, #ffffff 0%, #faf9fc 100%);
}

.exam-header,
.review-header {
  width: min(1120px, calc(100% - 40px));
  min-height: 82px;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(210px, 1fr);
  align-items: center;
  gap: 20px;
  margin: 0 auto;
  border-bottom: 1px solid var(--soft-line);
  background: white;
}

.exam-brand {
  width: fit-content;
  padding: 8px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.exam-meta {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--muted);
  font-size: 0.78rem;
}

.exam-mode {
  padding-right: 11px;
  border-right: 1px solid var(--line);
  color: var(--ink);
  font-weight: 650;
}

.exam-status {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
}

.save-status,
.timer {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.save-status .icon {
  color: var(--green);
}

.timer {
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.timer strong {
  color: var(--ink);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.timer.is-urgent {
  border-color: #e2aab3;
  color: var(--red);
  background: var(--red-soft);
}

.timer.is-urgent strong {
  color: var(--red);
}

.exam-progress-shell {
  width: min(1120px, calc(100% - 40px));
  display: grid;
  gap: 9px;
  margin: 20px auto 0;
}

.exam-progress-shell > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #756f7a;
  font-size: 0.69rem;
  font-weight: 720;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.exam-progress-shell progress {
  width: 100%;
  height: 4px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  appearance: none;
  background: #e8e3ec;
}

.exam-progress-shell progress::-webkit-progress-bar {
  border-radius: 999px;
  background: #e8e3ec;
}

.exam-progress-shell progress::-webkit-progress-value {
  border-radius: 999px;
  background: var(--indigo);
}

.exam-progress-shell progress::-moz-progress-bar {
  border-radius: 999px;
  background: var(--indigo);
}

.mobile-pane-switch {
  display: none;
}

.case-workspace {
  width: min(1440px, calc(100% - 40px));
  min-height: calc(100vh - 190px);
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(500px, 1.08fr);
  gap: 18px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 62px) 0 80px;
  background: transparent;
}

.case-material,
.response-pane {
  min-width: 0;
  padding: clamp(24px, 3vw, 44px);
  border: 1px solid #d9d3e1;
  border-radius: 16px;
  background: white;
  box-shadow: var(--shadow-sm);
}

.case-material {
  display: flex;
  flex-direction: column;
  background: #fcfbfd;
}

.pane-heading,
.task-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.pane-heading h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 560;
}

.synthetic-label {
  flex: 0 0 auto;
  background: white;
  border: 1px solid var(--line);
}

.resource-tabs {
  display: flex;
  gap: 4px;
  margin-top: 28px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.resource-tabs button {
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
}

.resource-tabs button[aria-pressed="true"] {
  border-color: var(--indigo);
  color: var(--indigo);
  font-weight: 700;
}

.resource-paper {
  min-height: 420px;
  max-height: calc(100vh - 430px);
  overflow: auto;
  margin-top: 22px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid #ded9e3;
  border-radius: 10px;
  background: white;
  box-shadow: 0 12px 28px rgba(44, 31, 61, 0.05);
}

.resource-paper h2 {
  margin-bottom: 22px;
  font-family: Georgia, serif;
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.resource-paper p,
.resource-paper blockquote {
  max-width: 68ch;
  color: #474759;
}

.resource-paper blockquote {
  margin: 20px 0;
  padding: 18px 20px;
  border-left: 3px solid var(--violet);
  background: var(--indigo-light);
  font-family: Georgia, serif;
  font-size: 1.08rem;
}

.resource-paper dl {
  display: grid;
  gap: 0;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.resource-paper dl div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.resource-paper dl div:last-child {
  border-bottom: 0;
}

.resource-paper dt {
  color: var(--muted);
}

.resource-paper dd {
  margin: 0;
  font-weight: 680;
  text-align: right;
}

.task-strip {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 20px;
}

.task-chip {
  position: relative;
  min-width: 44px;
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: pointer;
}

.task-chip.is-current {
  border-color: var(--indigo);
  color: white;
  background: var(--indigo);
}

.task-chip.is-answered:not(.is-current) {
  border-color: #83bba8;
  color: var(--green);
  background: var(--green-soft);
}

.task-chip .icon {
  position: absolute;
  width: 12px;
  height: 12px;
  top: -5px;
  right: -4px;
  color: var(--red);
  fill: var(--red-soft);
}

.response-pane {
  display: flex;
  flex-direction: column;
}

.task-header h1,
.task-header h2 {
  margin-bottom: 0;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 560;
}

.flag-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: white;
  cursor: pointer;
  white-space: nowrap;
}

.flag-button.is-flagged {
  border-color: #d8a7ae;
  color: var(--red);
  background: var(--red-soft);
}

.flag-button.is-flagged .icon {
  fill: #f3c2c8;
}

.requirement-card {
  margin: 28px 0 18px;
  padding: 20px 22px;
  border-left: 3px solid var(--indigo);
  background: var(--indigo-light);
}

.requirement-card > span {
  display: block;
  margin-bottom: 6px;
  color: var(--indigo);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.requirement-card p {
  margin: 0;
  color: #39384d;
}

.editor-shell {
  min-height: 350px;
  display: flex;
  flex: 1;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.editor-toolbar {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px 8px;
  border-bottom: 1px solid var(--line);
  background: #fafafd;
}

.editor-toolbar button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.editor-toolbar button:hover {
  background: var(--indigo-light);
}

.editor-toolbar span {
  margin-left: auto;
  padding: 0 7px;
  color: var(--muted);
  font-size: 0.76rem;
}

.case-editor {
  min-height: 300px;
  flex: 1;
  padding: 24px;
  overflow: auto;
  color: #272738;
  background: white;
}

.case-editor:empty::before {
  color: #9696a5;
  content: attr(data-placeholder);
  pointer-events: none;
}

.runner-actions {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
}

/* Objective-test environment */

.objective-workspace {
  width: min(1120px, calc(100% - 40px));
  min-height: calc(100vh - 190px);
  display: grid;
  grid-template-columns: minmax(250px, 0.64fr) minmax(0, 1.36fr);
  align-items: start;
  gap: clamp(38px, 7vw, 90px);
  margin: 0 auto;
  padding: clamp(38px, 6vw, 70px) 0 90px;
  background: transparent;
}

.objective-nav {
  position: sticky;
  top: 28px;
  padding: 0;
  background: transparent;
}

.progress-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.progress-header h2 {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 590;
  letter-spacing: -0.02em;
}

.progress-header > strong {
  color: var(--indigo);
  font-size: 1.15rem;
}

.progress-track {
  height: 4px;
  overflow: hidden;
  margin: 18px 0 20px;
  border-radius: 99px;
  background: #e6e1e9;
}

.progress-track span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--indigo);
  transition: width 200ms ease;
}

.nav-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.72rem;
}

.nav-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: #bdbdca;
}

.legend-dot.answered {
  background: var(--green);
}

.legend-dot.flagged {
  border-radius: 50%;
  background: var(--red);
}

.number-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 8px;
  max-height: 220px;
  margin: 24px 0;
  padding: 4px 4px 4px 0;
  overflow: auto;
}

.number-grid button {
  position: relative;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 680;
}

.number-grid button.is-answered {
  border-color: #83bba8;
  color: var(--green);
  background: var(--green-soft);
}

.number-grid button.is-current {
  border-color: var(--indigo);
  color: white;
  background: var(--indigo);
}

.number-grid button.is-flagged::after {
  position: absolute;
  width: 9px;
  height: 9px;
  top: -4px;
  right: -4px;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--red);
  content: "";
}

.progress-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.progress-summary span {
  color: var(--muted);
  font-size: 0.73rem;
}

.progress-summary strong {
  display: block;
  color: var(--ink);
  font-size: 1.1rem;
}

.objective-item {
  min-height: 560px;
  padding: clamp(30px, 5vw, 54px);
  border: 1px solid #d9d3e1;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #fcfbfd 100%);
  box-shadow: var(--shadow-lg);
}

.objective-item > * {
  max-width: 900px;
  margin-inline: auto;
}

.objective-task-header {
  margin-bottom: 44px;
}

.objective-task-header h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.option-set {
  margin: 0 auto;
  padding: 0;
  border: 0;
}

.option-set legend {
  width: 100%;
  margin-bottom: 12px;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 590;
  line-height: 1.45;
}

.response-instruction {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.88rem;
}

.option-card {
  position: relative;
  min-height: 62px;
  display: grid;
  grid-template-columns: 22px 30px 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  background: white;
  transition: border-color 140ms ease, background 140ms ease;
}

.option-card:hover {
  border-color: #aaa5d7;
  background: #fbfaff;
}

.option-card.is-selected {
  border-color: var(--indigo);
  background: var(--indigo-light);
  box-shadow: inset 3px 0 var(--indigo);
}

.option-card input {
  position: absolute;
  opacity: 0;
}

.option-control {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1.5px solid #9b9baa;
  border-radius: 50%;
  background: white;
}

input[type="checkbox"] + .option-control {
  border-radius: 5px;
}

.option-card input:focus-visible + .option-control {
  outline: 3px solid #8d83e8;
  outline-offset: 3px;
}

.option-card input:checked + .option-control {
  border-color: var(--indigo);
  box-shadow: inset 0 0 0 5px white;
  background: var(--indigo);
}

.option-card input[type="checkbox"]:checked + .option-control::after {
  color: white;
  content: "✓";
  font-size: 0.75rem;
  font-weight: 800;
}

.option-card input[type="checkbox"]:checked + .option-control {
  box-shadow: none;
}

.option-letter {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 6px;
  color: var(--muted);
  background: var(--wash);
  font-size: 0.72rem;
  font-weight: 760;
}

/* Review and results */

.review-header {
  grid-template-columns: 1fr auto 1fr;
}

.back-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  padding: 0;
  border: 0;
  color: var(--indigo);
  background: transparent;
  cursor: pointer;
  font-weight: 680;
}

.review-header .timer {
  justify-self: end;
}

.review-main,
.results-page {
  width: min(calc(100% - 40px), 1120px);
  margin-inline: auto;
  padding: 68px 0 90px;
}

.review-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 42px;
  margin-bottom: 34px;
}

.review-intro h1,
.result-hero h1 {
  max-width: 780px;
  margin-bottom: 16px;
  font-size: clamp(2.35rem, 5vw, 4.4rem);
  font-weight: 520;
}

.review-intro p:last-child,
.result-hero > p:last-child {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
}

.review-scorecard {
  display: grid;
  grid-template-columns: repeat(3, 105px);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--line);
}

.review-scorecard span {
  padding: 16px 12px;
  color: var(--muted);
  background: white;
  font-size: 0.7rem;
  text-align: center;
}

.review-scorecard strong {
  display: block;
  color: var(--ink);
  font-size: 1.35rem;
}

.review-scorecard .needs-attention,
.review-scorecard .needs-attention strong {
  color: var(--red);
  background: var(--red-soft);
}

.warning-banner,
.success-banner {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
  padding: 15px 18px;
  border: 1px solid #e7bcc2;
  border-radius: 9px;
  color: #75313b;
  background: var(--red-soft);
  font-size: 0.86rem;
}

.success-banner {
  border-color: #a6d0c1;
  color: #245e4f;
  background: var(--green-soft);
}

.warning-banner.compact {
  width: fit-content;
  margin-top: 26px;
  margin-bottom: 0;
}

.attempt-storage-warning {
  width: min(calc(100% - 32px), 1180px);
  margin: 14px auto;
}

.review-grid {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.review-row {
  width: 100%;
  min-height: 82px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto auto 20px;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border: 0;
  border-bottom: 1px solid var(--soft-line);
  background: white;
  cursor: pointer;
  text-align: left;
}

.review-row:last-child {
  border-bottom: 0;
}

.review-row:hover {
  background: #fbfbfd;
}

.review-number {
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 1.12rem;
}

.review-row strong,
.review-row small {
  display: block;
}

.review-row small {
  margin-top: 3px;
  color: var(--muted);
}

.review-state,
.review-flag,
.result-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 720;
}

.review-state.complete,
.result-status.correct {
  color: var(--green);
  background: var(--green-soft);
}

.review-state.blank,
.result-status.incorrect {
  color: var(--red);
  background: var(--red-soft);
}

.review-flag {
  color: var(--red);
  background: var(--red-soft);
}

.submission-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-top: 24px;
  padding: 28px 30px;
  border-radius: var(--radius);
  color: white;
  background: var(--indigo);
}

.submission-panel .eyebrow {
  color: #c4beff;
}

.submission-panel h2 {
  margin-bottom: 6px;
  font-size: 1.55rem;
}

.submission-panel p:last-child {
  margin: 0;
  color: #d8d6ec;
  font-size: 0.86rem;
}

.submission-panel .button-primary {
  flex: 0 0 auto;
  color: var(--indigo);
  background: white;
}

.confirm-dialog {
  width: min(calc(100% - 32px), 520px);
  padding: 36px;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.confirm-dialog::backdrop {
  background: rgba(20, 19, 40, 0.62);
  backdrop-filter: blur(3px);
}

.dialog-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  border-radius: 50%;
  color: white;
  background: var(--indigo);
  font-weight: 800;
}

.confirm-dialog h2 {
  margin-bottom: 12px;
  font-size: 2rem;
}

.confirm-dialog p:not(.eyebrow) {
  color: var(--muted);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 28px;
}

.results-page {
  max-width: 1120px;
}

.result-hero {
  position: relative;
  margin-bottom: 48px;
  padding-top: 26px;
}

.result-brand {
  position: absolute;
  top: 26px;
  right: 0;
}

.result-hero > .eyebrow {
  margin-top: 72px;
}

.score-panel {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 6vw, 72px);
  margin-bottom: 70px;
  padding: clamp(30px, 6vw, 64px);
  border: 1px solid #d9d3e1;
  border-radius: var(--radius-lg);
  color: var(--ink);
  background: linear-gradient(180deg, #fff 0%, #faf9fc 100%);
  box-shadow: var(--shadow-lg);
}

.score-panel .eyebrow {
  color: var(--gold);
}

.score-panel h2 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 540;
}

.score-panel p:last-child {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
}

.score-ring {
  --angle: calc(var(--score) * 3.6deg);
  position: relative;
  width: 180px;
  height: 180px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--indigo) var(--angle), #e8e3ec 0);
}

.score-ring::before {
  position: absolute;
  inset: 11px;
  border-radius: inherit;
  background: white;
  content: "";
}

.score-ring span {
  position: relative;
  text-align: center;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
}

.score-ring strong {
  display: block;
  margin-bottom: 3px;
  font-size: 2.5rem;
  letter-spacing: -0.05em;
}

.completion-mark {
  width: 180px;
  height: 180px;
  display: grid;
  place-content: center;
  border: 1px solid #cfc6d8;
  color: var(--indigo);
  background: white;
  border-radius: 50%;
  text-align: center;
}

.completion-mark strong {
  display: block;
  font-size: 2.5rem;
}

.completion-mark span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.compact-heading {
  grid-template-columns: 1fr;
  margin-bottom: 26px;
}

.compact-heading h2 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.result-list {
  margin-bottom: 36px;
}

.result-item {
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.result-item summary {
  min-height: 92px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 24px;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
}

.result-item summary::-webkit-details-marker {
  display: none;
}

.result-item summary small,
.result-item summary strong {
  display: block;
}

.result-item summary small {
  margin-bottom: 5px;
  color: var(--muted);
}

.result-item summary strong {
  line-height: 1.4;
}

.result-item[open] summary > span:last-child {
  transform: rotate(45deg);
}

.result-detail {
  display: grid;
  gap: 18px;
  padding: 22px;
  border-top: 1px solid var(--soft-line);
  background: #fafafd;
}

.result-detail > div {
  padding-left: 16px;
  border-left: 2px solid var(--line);
}

.result-detail > div.rationale,
.result-detail > div.review-prompts {
  border-color: var(--indigo);
}

.result-detail span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-detail p,
.result-detail ul {
  margin: 0;
}

.submitted-response {
  max-width: 78ch;
  padding: 18px;
  border: 1px solid var(--line);
  background: white;
}

.review-prompts ul {
  padding-left: 18px;
}

.review-prompts li + li {
  margin-top: 6px;
}

.results-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .session-summary {
    max-width: 650px;
  }

  .mode-grid {
    grid-template-columns: 1fr;
  }

  .mode-card {
    min-height: auto;
  }

  .mode-controls,
  .control-pair {
    margin-top: 24px;
  }

  .exam-header {
    grid-template-columns: 1fr auto;
  }

  .exam-meta {
    display: none;
  }

  .case-workspace {
    grid-template-columns: 1fr;
    padding-top: 24px;
  }

  .mobile-pane-switch {
    width: min(1120px, calc(100% - 40px));
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin: 18px auto 0;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #f4f1f6;
  }

  .mobile-pane-switch button {
    min-height: 44px;
    border: 0;
    border-radius: 7px;
    color: var(--muted);
    background: transparent;
  }

  .mobile-pane-switch button[aria-pressed="true"] {
    color: var(--indigo);
    background: var(--indigo-light);
    font-weight: 700;
  }

  .case-workspace[data-mobile-pane="material"] .response-pane,
  .case-workspace[data-mobile-pane="response"] .case-material {
    display: none;
  }

  .resource-paper {
    max-height: none;
  }

  .objective-workspace {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .objective-nav {
    position: static;
    padding: 0;
  }

  .number-grid {
    grid-template-columns: repeat(auto-fill, 44px);
  }

  .objective-nav .button-wide {
    width: auto;
  }

  .review-intro {
    grid-template-columns: 1fr;
  }

  .review-scorecard {
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 680px) {
  .site-header {
    width: min(calc(100% - 32px), 1120px);
    min-height: 72px;
  }

  .brand-logo {
    width: 106px;
  }

  .brand-logo-compact {
    width: 67px;
  }

  .product-label {
    display: none;
  }

  .hero {
    width: min(calc(100% - 32px), var(--max));
    gap: 34px;
    padding-top: 48px;
    padding-bottom: 44px;
  }

  .hero h1 {
    margin: 12px 0 16px;
    font-size: clamp(2.55rem, 13vw, 3.6rem);
  }

  .session-summary > div {
    padding: 13px 0;
  }

  .session-summary span {
    display: none;
  }

  .mode-section,
  .resume-card,
  .preview-notice {
    width: min(calc(100% - 32px), var(--max));
  }

  .mode-section {
    padding: 48px 0;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .mode-card {
    padding: 28px 22px;
    border-radius: 12px;
  }

  .mode-card h3 {
    max-width: 85%;
    font-size: 2.1rem;
  }

  .control-pair {
    grid-template-columns: 1fr;
  }

  .resume-card {
    align-items: stretch;
    flex-direction: column;
    padding: 24px;
  }

  .resume-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .preview-notice {
    grid-template-columns: 1fr;
    margin-bottom: 56px;
    padding: 28px 24px;
  }

  .preview-icon {
    width: 46px;
    height: 46px;
  }

  .site-footer {
    width: min(calc(100% - 32px), var(--max));
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .site-footer p {
    text-align: left;
  }

  .exam-header,
  .review-header {
    width: min(calc(100% - 32px), 1120px);
    min-height: 64px;
  }

  .exam-brand {
    font-size: 0.82rem;
  }

  .save-status {
    display: none;
  }

  .exam-status {
    gap: 0;
  }

  .timer {
    min-height: 40px;
    padding: 0 9px;
  }

  .exam-progress-shell {
    width: min(calc(100% - 32px), 1120px);
    margin-top: 14px;
  }

  .mobile-pane-switch,
  .case-workspace,
  .objective-workspace {
    width: min(calc(100% - 32px), 1120px);
  }

  .case-material,
  .response-pane,
  .objective-item {
    padding: 24px 16px;
    border-radius: 12px;
  }

  .pane-heading,
  .task-header {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
  }

  .synthetic-label,
  .flag-button {
    align-self: flex-start;
  }

  .resource-paper {
    min-height: 390px;
    padding: 24px 18px;
  }

  .editor-toolbar {
    flex-wrap: wrap;
  }

  .editor-toolbar span {
    width: 100%;
    margin: 0;
    padding: 2px 8px;
  }

  .case-editor {
    min-height: 360px;
    padding: 20px 16px;
  }

  .runner-actions {
    grid-template-columns: 1fr 1fr;
  }

  .runner-actions .button-quiet {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .objective-nav {
    padding: 0;
  }

  .objective-task-header {
    margin-bottom: 30px;
  }

  .option-card {
    grid-template-columns: 22px 26px 1fr;
    padding: 13px 12px;
  }

  .review-header {
    grid-template-columns: 1fr auto;
  }

  .review-brand {
    display: none;
  }

  .review-main,
  .results-page {
    width: min(calc(100% - 32px), 1080px);
    padding: 48px 0 72px;
  }

  .review-intro h1,
  .result-hero h1 {
    font-size: 2.65rem;
  }

  .warning-banner,
  .success-banner {
    flex-direction: column;
    gap: 4px;
  }

  .review-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 14px 12px;
  }

  .review-row > span:last-child {
    display: none;
  }

  .review-flag {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
  }

  .submission-panel {
    align-items: stretch;
    flex-direction: column;
    padding: 24px;
  }

  .dialog-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .result-brand {
    display: none;
  }

  .result-hero > .eyebrow {
    margin-top: 52px;
  }

  .score-panel {
    grid-template-columns: 1fr;
    padding: 32px 24px;
  }

  .score-ring,
  .completion-mark {
    width: 140px;
    height: 140px;
  }

  .result-item summary {
    grid-template-columns: 1fr 22px;
    gap: 12px;
    padding: 16px;
  }

  .result-status {
    width: fit-content;
    grid-column: 1 / -1;
  }

  .result-detail {
    padding: 18px 14px;
  }

  .results-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

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

@media (forced-colors: active) {
  .progress-track span,
  .legend-dot,
  .number-grid button.is-current,
  .button-primary {
    forced-color-adjust: none;
  }
}
