@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-standard-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Red Hat Mono";
  src: url("fonts/red-hat-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #f7f8f8;
  --well: #eef0f1;
  --ink: #15171a;
  --ink-2: #4a4f57;
  --red: #c8102e;
  --on-red: #ffffff;
  --rule: color-mix(in oklab, var(--red) 34%, var(--paper));
  --rule-soft: color-mix(in oklab, var(--red) 16%, var(--paper));
  --hatch: color-mix(in oklab, var(--ink) 26%, transparent);
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Red Hat Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --measure: 46rem;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121416;
    --well: #1b1e21;
    --ink: #e8eaed;
    --ink-2: #a7adb5;
    --red: #ff5a6e;
    --on-red: #121416;
    --rule: color-mix(in oklab, var(--red) 40%, var(--paper));
    --rule-soft: color-mix(in oklab, var(--red) 20%, var(--paper));
    --hatch: color-mix(in oklab, var(--ink) 34%, transparent);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1.5rem;
  scrollbar-color: var(--rule) var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--red); color: var(--on-red); }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
}
a:hover { text-decoration-color: var(--red); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 1px; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--red);
  color: var(--on-red);
  padding: .5rem .75rem;
  z-index: 10;
}
.skip:focus { top: 1rem; }

code, pre, kbd, samp { font-family: var(--mono); font-size: .875em; }
:not(pre) > code {
  background: var(--well);
  padding: .08em .3em;
  border-radius: 2px;
  overflow-wrap: anywhere;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  padding: .9rem clamp(1rem, 3vw, 2rem);
  border-bottom: 2px solid var(--red);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--ink);
}
.mark { flex: none; }
.mark-box { fill: none; stroke: var(--red); stroke-width: 3; }
.mark-tick { fill: none; stroke: var(--red); stroke-width: 3.4; stroke-linecap: square; }
.wordmark {
  font-size: 1.6rem;
  line-height: 1;
  font-weight: 800;
  font-variation-settings: "wdth" 62;
  letter-spacing: -.01em;
}
.tagline {
  font-size: .8125rem;
  color: var(--ink-2);
  font-variation-settings: "wdth" 88;
  padding-left: .6rem;
  border-left: 1px solid var(--rule);
}
.toplinks { display: flex; gap: 1.25rem; font-size: .9375rem; }
.toplinks a { text-decoration: none; }
.toplinks a:hover { text-decoration: underline; text-decoration-color: var(--red); }

.frame {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 3rem;
  padding: 0 clamp(1rem, 3vw, 2rem);
  max-width: 88rem;
  margin: 0 auto;
}
main { min-width: 0; max-width: var(--measure); padding: 2rem 0 4rem; }
.pages, .toc { display: none; }

@media (min-width: 1000px) {
  .frame { grid-template-columns: 14rem minmax(0, var(--measure)); }
  .pages { display: block; }
  .pages-mobile { display: none; }
}
@media (min-width: 1300px) {
  .frame { grid-template-columns: 14rem minmax(0, var(--measure)) 13rem; }
  .toc { display: block; }
}

.zone {
  margin: 1.75rem 0 .4rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
  font-variation-settings: "wdth" 85;
}
.pages, .toc { padding-top: .5rem; font-size: .9375rem; }
.pages ul, .toc ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.pages li, .toc li { border-bottom: 1px solid var(--rule); }
.pages a {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .38rem 0;
  text-decoration: none;
  line-height: 1.3;
}
.pages a::before {
  content: "";
  flex: none;
  width: .8rem;
  height: .8rem;
  border: 1.5px solid var(--red);
  border-radius: 1px;
}
.pages a:hover::before { background: var(--rule-soft); }
.pages a[aria-current="page"] { font-weight: 650; }
.pages a[aria-current="page"]::before { background: var(--red); }
.toc { position: sticky; top: 0; align-self: start; max-height: 100vh; overflow-y: auto; }
.toc a { display: block; padding: .35rem 0; text-decoration: none; color: var(--ink-2); line-height: 1.3; }
.toc a:hover { color: var(--ink); }
.pages { position: sticky; top: 0; align-self: start; max-height: 100vh; overflow-y: auto; padding-bottom: 2rem; }

.pages-mobile { border-bottom: 1px solid var(--rule); padding: 0 clamp(1rem, 3vw, 2rem); }
.pages-mobile summary {
  cursor: pointer;
  padding: .7rem 0;
  font-weight: 650;
  font-size: .9375rem;
  list-style-position: inside;
}
.pages-mobile summary::marker { color: var(--red); }
.pages-mobile nav { padding-bottom: 1rem; }
.pages-mobile .zone:first-child { margin-top: .25rem; }

article { overflow-wrap: break-word; }
article > :first-child { margin-top: 0; }
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.15;
  text-wrap: balance;
  letter-spacing: -.005em;
}
h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.4rem);
  font-weight: 800;
  font-variation-settings: "wdth" 70;
  letter-spacing: -.015em;
  line-height: 1.02;
  margin: .5rem 0 1.25rem;
}
h2 {
  font-size: 1.6rem;
  font-variation-settings: "wdth" 78;
  margin: 3rem 0 1rem;
  padding-top: .9rem;
  border-top: 1px solid var(--rule);
}
h3 { font-size: 1.2rem; font-variation-settings: "wdth" 84; margin: 2.2rem 0 .6rem; }
h4 { font-size: 1.02rem; margin: 1.6rem 0 .4rem; }
h2 code, h3 code, h4 code { font-size: .86em; background: none; padding: 0; }
a.self { text-decoration: none; }
a.self:hover { text-decoration: underline; text-decoration-color: var(--red); }

p, ul, ol { margin: 0 0 1.1rem; }
article p, article li { max-width: 70ch; }
article > p:first-of-type { font-size: 1.1875rem; line-height: 1.55; }
ul, ol { padding-left: 1.3rem; }
li { margin: .3rem 0; }
li::marker { color: var(--red); }
strong { font-weight: 680; }

:target { outline: 2px solid var(--red); outline-offset: 6px; }
@media (prefers-reduced-motion: no-preference) {
  :target { animation: ring 450ms var(--ease-out); }
}
@keyframes ring {
  from { outline-offset: 18px; outline-color: transparent; }
  to { outline-offset: 6px; outline-color: var(--red); }
}
tr:target { outline-offset: -2px; background: var(--rule-soft); }
@media (prefers-reduced-motion: no-preference) {
  tr:target { animation: ring-row 450ms var(--ease-out); }
}
@keyframes ring-row {
  from { outline-color: transparent; background: transparent; }
  to { outline-color: var(--red); background: var(--rule-soft); }
}

pre {
  margin: 0 0 1.3rem;
  overflow-x: auto;
  line-height: 1.5;
  tab-size: 4;
}
pre.code {
  background: var(--well);
  padding: .9rem 1rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: .875rem;
}
pre code { font-size: inherit; }

figure { margin: 0 0 1.5rem; }
.log { border: 1.5px solid var(--red); background: var(--paper); }
.log-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border-bottom: 1px solid var(--red);
}
.log-cell { padding: .45rem .75rem .55rem; min-width: 0; }
.log-exit { border-left: 1px solid var(--red); text-align: right; min-width: 5rem; }
.log-label {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
  font-variation-settings: "wdth" 85;
}
.log-cmd code { display: block; font-size: .875rem; background: none; padding: 0; overflow-wrap: anywhere; }
.log-cmd code::before { content: "$ "; color: var(--ink-2); }
.exit-code { font-family: var(--mono); font-size: 1.35rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.log-broken .log-exit { background: var(--red); color: var(--on-red); }
.log-broken .log-exit .log-label { color: var(--on-red); }
.log-error .log-exit { background: repeating-linear-gradient(135deg, var(--hatch) 0 1.5px, transparent 1.5px 5px); }
.log-error .exit-code { color: var(--red); }
.log-out, .log-err { margin: 0; padding: .75rem; font-size: .8125rem; }
.log-err { color: var(--ink-2); border-bottom: 1px dashed var(--rule); }
.log-err::before {
  content: "stderr";
  display: block;
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: .2rem;
}
.log-out::before {
  content: "stdout";
  display: block;
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: .2rem;
}
.v-caught { font-weight: 600; }
.v-missed { background: var(--red); color: var(--on-red); font-weight: 700; }
.v-unreached {
  font-weight: 600;
  background: repeating-linear-gradient(135deg, var(--hatch) 0 1.5px, transparent 1.5px 5px);
}
.v-broken { background: var(--red); color: var(--on-red); font-weight: 700; }
.totals { font-weight: 700; }
.log-out .tick { width: 2ch; height: 1em; vertical-align: -.15em; }
tr.v-missed > th code { background: var(--red); color: var(--on-red); font-weight: 700; }
tr.v-unreached > th code { background: repeating-linear-gradient(135deg, var(--hatch) 0 1.5px, transparent 1.5px 5px); font-weight: 600; }
tr.v-caught > th code { font-weight: 600; }
tr.v-missed, tr.v-unreached, tr.v-caught { background: none; color: inherit; font-weight: inherit; }

.table { overflow-x: auto; margin: 0 0 1.5rem; }
table { border-collapse: collapse; width: 100%; font-size: .9375rem; line-height: 1.45; font-variant-numeric: tabular-nums; }
thead th {
  text-align: left;
  vertical-align: bottom;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--red);
  font-variation-settings: "wdth" 85;
  padding: .3rem .75rem .4rem 0;
  border-bottom: 1.5px solid var(--red);
}
tbody th, tbody td {
  text-align: left;
  vertical-align: top;
  padding: .55rem .75rem .55rem 0;
  border-bottom: 1px solid var(--rule);
}
tbody th { font-weight: 600; min-width: 7rem; }
tbody th code { white-space: nowrap; }
td code { overflow-wrap: anywhere; }

.note {
  margin: 0 0 1.4rem;
  padding: .8rem 1rem;
  background: var(--well);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.note p { margin: 0; }

.diagram { margin: 1.25rem 0 1.75rem; }
.diagram figcaption { font-size: .875rem; color: var(--ink-2); margin-top: .6rem; max-width: 70ch; }
.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; counter-reset: none; }
.flow > li {
  margin: 0;
  max-width: none;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  position: relative;
}
.flow > li + li::before {
  content: "";
  position: absolute;
  left: 1.25rem;
  top: calc(-.6rem - 1.5px);
  height: .6rem;
  border-left: 1.5px solid var(--ink);
}
.flow .step { padding: .55rem .8rem; }
.flow .step b { display: block; font-weight: 700; font-variation-settings: "wdth" 80; font-size: 1rem; }
.flow .step span { display: block; font-size: .875rem; color: var(--ink-2); }
.flow .fail {
  padding: .45rem .8rem;
  border-top: 1px solid var(--red);
  font-size: .8125rem;
  color: var(--red);
  font-weight: 600;
}
.flow .loop { border-style: dashed; }
@media (min-width: 640px) {
  .flow > li { grid-template-columns: minmax(0, 1fr) 15rem; }
  .flow .fail { border-top: 0; border-left: 1px solid var(--red); }
}

.grid-diagram { display: grid; gap: .5rem; }
.lane {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: .5rem;
  align-items: stretch;
}
.lane-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--red);
  font-variation-settings: "wdth" 85;
  padding-top: .45rem;
}
.cells { display: flex; flex-wrap: wrap; gap: .35rem; }
.cell {
  font-family: var(--mono);
  font-size: .8125rem;
  min-width: 2.4rem;
  padding: .35rem .5rem;
  border: 1.5px solid var(--ink);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.cell.own { background: var(--ink); color: var(--paper); }
.cell.all { border-style: dashed; color: var(--ink-2); }
.box {
  border: 1.5px solid var(--ink);
  padding: .55rem .8rem;
  font-size: .875rem;
  min-width: 0;
}
.box b { display: block; font-weight: 700; font-variation-settings: "wdth" 80; font-size: .95rem; }
.box code { font-size: .8125rem; }
.box.origin { border-color: var(--red); border-width: 2px; }
.workers { display: grid; gap: .5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .workers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.link-down {
  height: 1rem;
  margin-left: 1.25rem;
  border-left: 1.5px solid var(--ink);
}

.pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 3.5rem;
  border-top: 2px solid var(--red);
  padding-top: 1rem;
}
.pager a { text-decoration: none; font-weight: 650; line-height: 1.3; }
.pager a:hover { text-decoration: underline; text-decoration-color: var(--red); }
.pager .next { grid-column: 2; text-align: right; }
.pager-dir {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: .2rem;
}
.colophon {
  border-top: 1px solid var(--rule);
  padding: 1.25rem clamp(1rem, 3vw, 2rem) 2rem;
  font-size: .875rem;
  color: var(--ink-2);
}
.colophon p { margin: 0 0 .4rem; max-width: 80ch; }

.page-index h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); max-width: 14ch; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 2rem; }
.actions a {
  display: inline-block;
  padding: .6rem 1.1rem;
  border: 1.5px solid var(--red);
  font-weight: 650;
  text-decoration: none;
  line-height: 1.2;
}
.actions a:first-child { background: var(--red); color: var(--on-red); }
.actions a:hover { background: var(--rule-soft); color: var(--ink); }
.actions a:first-child:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

@media (max-width: 520px) {
  body { font-size: 1rem; }
  .tagline { display: none; }
  .toplinks { gap: 1rem; font-size: .875rem; }
  .log-exit { min-width: 3.75rem; }
  .log-out { white-space: pre-wrap; }
  .log-out .ln.v { display: block; padding-left: 19ch; text-indent: -19ch; }
  .table table { min-width: 34rem; }
  article > p:first-of-type { font-size: 1.0625rem; }
}

@media print {
  .pages, .pages-mobile, .toc, .pager, .skip { display: none; }
  .frame { display: block; }
}
