@font-face {
  font-family: "Courier Prime";
  src: url("fonts/CourierPrime-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("fonts/CourierPrime-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "STIX Two Math";
  src: url("fonts/STIXTwoMath-Regular.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: light;
  --desk: #f6f2e7;
  --paper: #fffcf3;
  --margin: #eeeee2;
  --ink: #292b23;
  --muted: #54574a;
  --rule: #b9b8a8;
  --faint-rule: #d9d6c8;
  --green: #244638;
  --green-dark: #19372b;
  --green-tint: #e4eee2;
  --rust: #803a29;
  --rust-tint: #f8eae1;
  --focus: #286249;
  font-family: "Courier Prime", "Courier New", monospace;
  font-size: 16px;
  background: var(--desk);
  color: var(--ink);
  scrollbar-color: #797e6c var(--desk);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; line-height: 1.45; }
::selection { background: #cce0cd; color: var(--green-dark); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
a { color: var(--green-dark); text-underline-offset: .24em; }
button, input { font: inherit; }
.frame { width: min(1180px, calc(100% - 80px)); margin-inline: auto; }

.masthead {
  border-top: 5px solid var(--green);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.masthead-inner {
  min-height: 65px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.wordmark { display: flex; gap: 13px; align-items: center; font-weight: 700; }
.monogram {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--paper);
  background: var(--green);
  font-size: 22px;
  line-height: 1;
}
.exam-switcher { position: relative; }
.exam-switcher summary, .exam-menu a { -webkit-tap-highlight-color: #cce0cd; }
.exam-switcher summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 5px 11px;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--green-dark);
  cursor: pointer;
  list-style: none;
}
.exam-switcher summary::-webkit-details-marker { display: none; }
.exam-switcher summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 0 1px 1px 0;
  transform: translateY(-2px) rotate(45deg);
}
.exam-switcher[open] summary {
  background: var(--green-tint);
  border-color: var(--green);
}
.exam-switcher[open] summary::after { transform: translateY(2px) rotate(225deg); }
.exam-id { display: grid; font-size: .8rem; line-height: 1.15; white-space: nowrap; }
.exam-id span { color: var(--muted); }
.exam-menu {
  position: absolute;
  z-index: 2;
  inset: 100% 0 auto auto;
  width: max-content;
  min-width: 100%;
  border: 1px solid var(--green);
  background: var(--paper);
}
.exam-menu a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 11px;
  font-size: .85rem;
  text-decoration: none;
}
.exam-menu a + a { border-top: 1px solid var(--rule); }
.exam-menu a[aria-current] { background: var(--green-tint); }
.exam-menu a:hover, .exam-menu a:focus-visible { text-decoration: underline; }
.exam-menu a:focus-visible { outline-offset: -3px; }
.title-block { margin-block: 46px 31px; }
h1 {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4.1rem);
  line-height: 1;
  letter-spacing: -.037em;
}
h1 span { color: #8b412e; }
.title-block p { margin: 12px 0 0; color: var(--muted); }

.exam-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .42fr);
  align-items: start;
  gap: 24px;
}
.question-sheet, .review-sheet { border: 1px solid var(--rule); }
.question-sheet { min-width: 0; background: var(--paper); }
.question-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  padding: 15px 27px 13px;
  border-bottom: 1px solid var(--rule);
  background: #ecece0;
  color: var(--green-dark);
  font-size: .85rem;
}
.question-number { font-weight: 700; letter-spacing: .025em; }
.section-label { color: var(--muted); }
#answer-form { padding: 24px 27px 0; }
fieldset { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
legend {
  padding: 0;
  margin: 0 0 18px;
  max-width: 100%;
  font-size: clamp(1.24rem, 2.05vw, 1.65rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.018em;
  overflow-wrap: anywhere;
}
.code, .notebook-body pre {
  margin: 0 0 18px;
  padding: 13px 16px;
  background: #eeeee5;
  border-inline-start: 1px solid #7f8b77;
  color: #304637;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  font-size: .94rem;
  line-height: 1.32;
  tab-size: 4;
}
code { font: inherit; }
.notebook-body {
  overflow-wrap: anywhere;
}
.notebook-body p, .notebook-body ul, .notebook-body ol { margin: 0 0 .85em; }
.notebook-body ul, .notebook-body ol { padding-inline-start: 1.65em; }
.notebook-body li + li { margin-block-start: .3em; }
.notebook-body blockquote {
  margin: 0 0 .85em;
  padding-inline-start: .9em;
  border-inline-start: 1px solid var(--rule);
}
.notebook-body blockquote > :last-child { margin-block-end: 0; }
.notebook-body pre {
  background: #eceee5;
  line-height: 1.55;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
}
.notebook-body :not(pre) > code, .notebook-option > code, legend > code {
  padding: .08em .23em;
  border-radius: 2px;
  background: var(--margin);
  font-size: .96em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.notebook-body pre code :is(.k, .kc, .kd, .kn, .kp, .kr, .kt),
code.notebook-option :is(.k, .kc, .kd, .kn, .kp, .kr, .kt) { color: #673a62; font-weight: 700; }
.notebook-body pre code :is(.s, .s1, .s2, .sa, .sb, .sc, .sd, .se, .sh, .si),
code.notebook-option :is(.s, .s1, .s2, .sa, .sb, .sc, .sd, .se, .sh, .si) { color: #863e28; }
.notebook-body pre code :is(.c, .c1, .ch, .cm, .cp),
code.notebook-option :is(.c, .c1, .ch, .cm, .cp) { color: #505b4e; font-style: italic; }
.notebook-option { white-space: pre-wrap; }
.math math {
  font-family: "STIX Two Math", math;
  font-size: 1.14em;
  font-weight: 400;
}
.notebook-option math { math-style: normal; }
div.math { overflow-x: auto; margin-block: .75em; }
.notebook-option img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-block: 4px;
}
.options { display: grid; gap: 8px; }
.option { display: block; position: relative; cursor: pointer; }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.option-body {
  min-height: 50px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--faint-rule);
}
.letter {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--rule);
  background: var(--desk);
  color: var(--green-dark);
  font-weight: 700;
}
.option-text { overflow-wrap: anywhere; }
.option:hover .option-body { border-color: #879482; }
.option input:focus-visible + .option-body { outline: 2px solid var(--focus); outline-offset: 2px; }
.option input:checked + .option-body { border-color: var(--green); background: var(--green-tint); }
.option input:checked + .option-body .letter { background: var(--green); color: var(--paper); border-color: var(--green); }
fieldset:disabled .option { cursor: default; }
fieldset:disabled .option-body {
  background: #f0efe9;
  color: #595951;
  border-color: var(--faint-rule);
}
fieldset:disabled .letter,
fieldset:disabled input:checked + .option-body .letter {
  background: #e4e3da;
  border-color: #b4b4a8;
  color: #484942;
}
fieldset:disabled input:checked + .option-body { border-color: #838477; background: #e9e8e1; }
.pick-tag { color: #484942; font-size: .8rem; }
.submit-row { margin-top: 18px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
button {
  background: var(--green);
  color: var(--paper);
  padding: 12px 18px 10px;
  min-height: 44px;
  border: 1px solid var(--green);
  font-weight: 700;
  cursor: pointer;
}
button:hover { background: var(--green-dark); }
button:disabled { background: #e1e1d9; border-color: var(--faint-rule); color: #55564c; cursor: default; }
.form-error { color: var(--rust); }

.feedback {
  margin: 19px 27px 0;
  padding: 17px 18px 19px;
  border: 1px solid #acb9a6;
  background: var(--green-tint);
  color: var(--green-dark);
  scroll-margin-block: 20px;
  overflow-wrap: anywhere;
  animation: reveal .24s ease-out both;
}
.feedback.is-incorrect { border-color: #d4b6a7; background: var(--rust-tint); color: #682c20; }
.feedback.is-unscored { border-color: var(--rule); background: var(--margin); color: var(--ink); }
.feedback h2 { margin: 0 0 9px; font-size: 1.24rem; }
.feedback p { margin: 0 0 8px; max-width: 70ch; }
.feedback a { display: inline-block; margin-top: 4px; color: inherit; }
@keyframes reveal { from { opacity: .55; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .feedback { animation: none; } }
.pager {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 27px 0;
  padding: 9px 0;
  border-top: 1px dashed var(--rule);
}
.pager > * { display: inline-flex; align-items: center; gap: 6px; min-height: 39px; }
.pager .unavailable { color: #6b6c62; }
.pager a { font-weight: 700; }

.review-sheet { padding: 23px; background: var(--margin); }
.review-sheet h2 { margin: 0 0 13px; font-size: 1.22rem; line-height: 1.15; letter-spacing: -.025em; }
.metrics { margin: 0; }
.metrics div {
  display: flex;
  gap: 13px;
  justify-content: space-between;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid #cccebe;
}
.metrics dt { color: var(--muted); }
.metrics dd { margin: 0; white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; }
.metrics .score { border: 0; padding-bottom: 9px; }
.score dd { color: var(--green-dark); font-size: 1.5rem; line-height: 1; }
.score dd span { font-size: 1rem; }
.metrics .score--pass, .metrics .score--fail {
  margin: 9px 0;
  padding: 9px 10px;
}
.score--pass { background: #19372b; }
.score--pass dt, .score--pass dd { color: #91f88f; }
.score--fail { background: #f8e0df; }
.score--fail dt, .score--fail dd { color: #9b201c; }
.outcome { display: block; }
progress {
  appearance: none;
  display: block;
  width: 100%;
  height: 6px;
  border: 0;
  background: #d7d9c9;
  color: var(--green);
}
progress::-webkit-progress-bar { background: #d7d9c9; }
progress::-webkit-progress-value { background: var(--green); }
progress::-moz-progress-bar { background: var(--green); }
.new-attempt { margin-top: 15px; }
.question-index { padding-top: 21px; margin-top: 23px; border-top: 1px dashed #9da18e; }
.question-index ol {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.question-index a {
  display: grid;
  min-height: 34px;
  place-items: center;
  border: 1px solid var(--rule);
  background: var(--paper);
  font-size: .86rem;
  text-decoration: none;
}
.question-index a:hover { border-color: var(--green); text-decoration: underline; }
.question-index a.answered {
  position: relative;
  background: #c9dac8;
  border-color: #a2b49e;
}
.question-index a.answered::after {
  content: "";
  position: absolute;
  inset: 3px 3px auto auto;
}
.question-index a.answered::after, .key span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.question-index a[aria-current] { background: var(--green); color: var(--paper); border-color: var(--green); font-weight: 700; }
.key { display: flex; gap: 8px; align-items: center; margin-top: 13px; color: var(--muted); font-size: .82rem; }
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-block: 28px 23px;
  border-top: 1px solid var(--rule);
  padding-top: 12px;
  color: var(--muted);
  font-size: .83rem;
}
.clear-button { background: transparent; color: var(--green-dark); white-space: nowrap; }
.clear-button:hover { background: var(--green-tint); }

@media (max-width: 850px) {
  .frame { width: calc(100% - 40px); }
  .exam-layout { gap: 16px; }
  .review-sheet { padding: 16px; }
}
@media (max-width: 680px) {
  .frame { width: calc(100% - 28px); }
  .masthead-inner { min-height: 55px; gap: 10px; font-size: .92rem; }
  .wordmark { gap: 8px; }
  .monogram { width: 28px; height: 28px; }
  .title-block { margin-block: 26px 20px; }
  .title-block p { margin-top: 8px; font-size: .96rem; }
  .exam-layout { grid-template-columns: minmax(0, 1fr); }
  .question-meta { padding-inline: 15px; }
  #answer-form { padding: 18px 15px 0; }
  .feedback, .pager { margin-inline: 15px; }
  .option-body { gap: 8px; padding-inline: 8px; }
  .pick-tag { grid-column: 2; }
  .question-index a { min-height: 44px; }
}
