/* Shared screen and print presentation; questions stay in the Markdown Sources. */
:root {
  --pmx-document-measure: 8.5in;
  --pmx-font-body: Arial, Helvetica, sans-serif;
  --pmx-font-heading: Arial, Helvetica, sans-serif;
}

body {
  margin: 0;
  background: #ededed;
  color: #171717;
}
.exam-document {
  max-width: 8.5in;
  margin: 0 auto;
}
.exam-document .pmx-document {
  padding: 0;
}
.exam-document {
  --pmx-prose-flow: 0;
}
.exam-controls {
  padding: 1rem;
  font:
    15px/1.5 Arial,
    sans-serif;
}
.exam-sheet {
  box-sizing: border-box;
  background: white;
  color: #171717;
  padding: 0.5in 0.58in;
  margin: 1rem 0;
  min-height: 11in;
  position: relative;
  font:
    10.5pt/1.32 Arial,
    Helvetica,
    sans-serif;
}
.exam-sheet h1 {
  font-size: 18pt;
  line-height: 1.2;
  margin: 0 0 8pt;
}
.exam-sheet h2 {
  font-size: 12pt;
  line-height: 1.3;
  margin: 12pt 0 5pt;
}
.exam-sheet p {
  margin: 0 0 8pt;
}
/* Each side's ID strip: the student's name, then the exam and side. A class set adds the scan code. */
.exam-id {
  display: flex;
  margin-bottom: 14pt;
  border: 1pt solid #171717;
}
.exam-sheet .exam-id p {
  flex: 1;
  display: grid;
  align-content: center;
  gap: 3pt;
  margin: 0;
  padding: 8pt 12pt;
  color: #555;
  font-size: 9pt;
}
.exam-name {
  display: flex;
  align-items: baseline;
  gap: 6pt;
  color: #171717;
  font-size: 14pt;
  line-height: 1.6;
}
.exam-name span {
  flex: 1;
  border-bottom: 0.5pt solid #777;
}
.exam-instructions {
  font-size: 9pt;
}
.exam-writing-space {
  margin-top: 8pt;
}
.exam-writing-line {
  height: 18pt;
  border-bottom: 0.5pt solid #bbb;
}
.exam-question {
  margin: 0 0 10pt;
  break-inside: avoid;
}
.exam-question p {
  margin-bottom: 3pt;
}
.exam-question ol {
  list-style-type: upper-alpha;
  margin: 0;
  padding-left: 24pt;
}
.exam-question li {
  margin: 0;
  padding: 0;
}
.exam-concepts {
  font-size: 9.5pt;
  line-height: 1.25;
}
.exam-concepts .exam-blank {
  margin-bottom: 11pt;
}
.exam-key {
  font-size: 10pt;
}
.exam-key pre {
  font:
    9pt/1.4 "Courier New",
    monospace;
  padding: 8pt;
  white-space: pre-wrap;
  background: #f5f5f5;
  border: none;
}
.exam-key code {
  font: inherit;
}

@media screen and (max-width: 650px) {
  .exam-sheet {
    min-height: auto;
    padding: 1.25rem;
    overflow-wrap: anywhere;
  }
  .exam-sheet h1 {
    font-size: 1.6rem;
  }
}

@page {
  size: Letter;
  margin: 0.5in 0.58in;
}
@media print {
  html,
  body {
    /* The theme paints the page canvas, which shows below a short last side. */
    background: white !important;
    margin: 0;
    padding: 0;
  }
  body > :not(.exam-document):not(:has(.exam-document)) {
    display: none;
  }
  .exam-document,
  .exam-document * {
    background-color: transparent !important;
    box-shadow: none !important;
  }
  .exam-document button {
    display: none;
  }
  .exam-key pre,
  .exam-key code,
  .exam-key code span {
    color: #171717;
  }
  .exam-document {
    max-width: none;
    margin: 0;
    padding: 0;
  }
  .exam-controls {
    display: none;
  }
  .exam-document .pmx-document {
    max-width: none;
  }
  .exam-document [data-pmx-block] {
    border: 0;
  }
  .exam-sheet {
    margin: 0;
    padding: 0;
    min-height: 0;
  }
  .exam-concepts,
  .exam-key:has(pre) {
    break-before: page;
  }
  .exam-sheet a {
    color: inherit;
    text-decoration: none;
  }
}
