@font-face {
  font-family: Source;
  font-display: swap;
  src: url(assets/fonts/serif.woff2);
}
@font-face {
  font-family: Mono;
  font-display: swap;
  src: url(assets/fonts/mono.woff2);
}
:root {
  --paper: #fcfcfb;
  --ink: #1c1c1a;
  --dim: #5c5c57;
  --rule: #e3e3de;
  --red: #9e2b25;
  --stage: #f4f4f1;
  --visual: #e8e8e2;
  --terminal: #222421;
  --terminal-ink: #e8e8de;
  --terminal-dim: #a7b4a3;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    18px/1.7 Source,
    Georgia,
    serif;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
a:hover {
  color: var(--red);
}
header,
footer {
  max-width: 1200px;
  margin: auto;
  padding: 28px 24px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule);
  gap: 20px;
}
header a:first-child {
  font-weight: bold;
  text-decoration: none;
}
.intro {
  max-width: 760px;
  margin: 90px auto 65px;
  padding: 0 24px;
}
.eyebrow,
.stage-label,
.controls,
.disclosure,
small,
footer,
.links {
  font:
    12px/1.6 Mono,
    monospace;
}
.eyebrow {
  color: var(--red);
  letter-spacing: 0.12em;
}
h1 {
  font-size: clamp(40px, 6vw, 70px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin: 28px 0;
}
h2 {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 500;
}
h3 {
  font-size: 30px;
  font-weight: 500;
}
.lead {
  font-size: 25px;
}
.intro p:not(.eyebrow) {
  color: var(--dim);
}
.links {
  margin-top: 30px;
}
.stage {
  max-width: 1152px;
  margin: auto;
  border: 1px solid var(--rule);
  padding: 24px;
  background: var(--stage);
}
.stage-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  color: var(--dim);
}
.visual {
  min-height: 470px;
  overflow: hidden;
  background: var(--visual);
  display: flex;
  align-items: center;
  justify-content: center;
}
.board {
  position: relative;
  width: 100%;
  height: 470px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.board img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.marker {
  position: absolute;
  left: 17.8%;
  top: 82%;
  background: var(--paper);
  border-left: 3px solid var(--red);
  padding: 10px;
  font:
    14px Mono,
    monospace;
}
.caption {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  min-height: 145px;
  align-items: center;
}
.caption p {
  color: var(--dim);
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  height: 100%;
}
.split img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.evidence {
  padding: 40px;
  width: 100%;
}
dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  font:
    16px/2 Mono,
    monospace;
}
dd {
  color: var(--red);
}
.terminal {
  background: var(--terminal);
  color: var(--terminal-ink);
  width: 100%;
  height: 100%;
  padding: 40px;
}
.terminal small {
  color: var(--terminal-dim);
}
pre {
  font:
    22px/1.8 Mono,
    monospace;
}
pre span {
  color: var(--terminal-dim);
  font-size: 14px;
}
svg {
  width: 100%;
  margin: 30px 0;
}
svg path {
  stroke: var(--red);
  stroke-width: 3;
  fill: none;
}
.comparison {
  display: flex;
  gap: 60px;
  font:
    15px/2 Mono,
    monospace;
}
.report {
  background: var(--paper);
  width: 70%;
  padding: 25px 50px;
  border-top: 3px solid var(--red);
}
.report p {
  border-bottom: 1px solid var(--rule);
  margin: 10px 0;
}
.report span {
  font:
    12px Mono,
    monospace;
  color: var(--dim);
}
.controls {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  border-top: 1px solid var(--rule);
  padding-top: 15px;
}
button {
  font: inherit;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
  color: var(--dim);
}
button[aria-pressed="true"] {
  color: var(--red);
  box-shadow: inset 0 -2px var(--red);
}
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}
.disclosure {
  color: var(--dim);
  margin-bottom: 0;
}
.prose {
  max-width: 720px;
  margin: 80px auto;
  padding: 0 24px;
}
.prose section {
  padding: 35px 0;
  border-top: 1px solid var(--rule);
}
.prose p {
  color: var(--dim);
}
footer {
  border-top: 1px solid var(--rule);
  border-bottom: 0;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 10px;
  top: 10px;
}
[hidden] {
  display: none !important;
}
.scene .visual {
  animation: reveal 0.65s ease-out;
}
@keyframes reveal {
  from {
    opacity: 0.4;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 650px) {
  header {
    font-size: 14px;
  }
  .intro {
    margin-top: 50px;
  }
  .stage {
    padding: 14px;
  }
  .visual {
    min-height: 400px;
  }
  .caption {
    display: block;
    min-height: 180px;
  }
  .caption h2 {
    font-size: 25px;
  }
  .split {
    grid-template-columns: 1fr;
    grid-template-rows: 140px 1fr;
  }
  .evidence {
    padding: 20px;
  }
  .evidence h3 {
    font-size: 23px;
    margin: 10px 0;
  }
  dl {
    font-size: 14px;
    margin: 0;
  }
  .controls {
    flex-wrap: wrap;
  }
  .controls button {
    padding: 8px;
  }
  .comparison {
    display: block;
    font-size: 13px;
  }
  .report {
    width: 90%;
    padding: 20px;
  }
  .terminal {
    padding: 22px;
  }
  pre {
    font-size: 17px;
  }
  .stage-label {
    font-size: 10px;
  }
  .marker {
    left: 17.8%;
  }
  footer {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
  }
}

.board-image {
  position: relative;
  width: min(100%, 752px);
  aspect-ratio: 8 / 5;
}
.board-image img {
  display: block;
}
.terminal {
  min-height: 470px;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.controls > div {
  display: flex;
  flex-wrap: wrap;
}
button {
  min-height: 44px;
}
progress {
  width: 100%;
  height: 3px;
  accent-color: var(--red);
  display: block;
  margin-bottom: 16px;
}
.stage[data-playing="true"] .scene:not([hidden]) .evidence,
.stage[data-playing="true"] .scene:not([hidden]) .report,
.stage[data-playing="true"] .scene:not([hidden]) .marker {
  animation: reveal 0.8s ease-out both;
}
@media (max-width: 650px) {
  .board {
    height: 400px;
  }
  .marker {
    font-size: 11px;
    padding: 5px;
  }
  .terminal {
    min-height: 400px;
  }
  .stage-label {
    gap: 12px;
  }
  #count {
    white-space: nowrap;
  }
}

pre .boot-line {
  color: inherit;
  font: inherit;
}
@media (prefers-reduced-motion: no-preference) {
  .stage[data-playing="true"] .boot-line,
  .stage[data-playing="true"] .report p,
  .stage[data-playing="true"] .comparison p {
    animation: reveal 0.6s ease-out both;
  }
  .stage[data-playing="true"] .boot-line:nth-of-type(2),
  .stage[data-playing="true"] .report p:nth-of-type(2) {
    animation-delay: 0.8s;
  }
  .stage[data-playing="true"] .boot-line:nth-of-type(3),
  .stage[data-playing="true"] .report p:nth-of-type(3),
  .stage[data-playing="true"] .comparison p:nth-of-type(2) {
    animation-delay: 1.6s;
  }
  .stage[data-playing="true"] .report p:nth-of-type(4) {
    animation-delay: 2.4s;
  }
}

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