@font-face {
  font-family: "Ubuntu Mono";
  src: url("UbuntuMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Ubuntu Mono";
  src: url("UbuntuMono-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --screen: #000;
  --ink: #eee;
  --dim: #b8b8b8;
  /* The reference terminal uses 10px cells on 19px rows at default zoom. */
  --indent: 7ch;
  --gutter: 1ch;
  --manual-width: min(78ch, calc(100% - 2 * var(--gutter)));
  font: 400 125%/.95 "Ubuntu Mono", "Cascadia Mono", Consolas, monospace;
  background: var(--screen);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; }
body *, ::before, ::after, ::marker { font-family: inherit; }
main, .pager { width: var(--manual-width); margin-inline: auto; }
main { padding: 0 0 3lh; }
html { scroll-padding-bottom: 2.4lh; }
h1, h2, h3, p, pre, dl, dd { margin: 0; }
h1, h2, button, summary, code, pre, kbd, samp, var, input { font: inherit; }
h2, b, strong, dt { font-weight: 700; }
a, button, var { color: inherit; text-decoration: underline; text-underline-offset: .13em; }
button { background: transparent; border: 0; padding: 0; }
button, summary { cursor: pointer; }
a:hover, button:hover, summary:hover { background: var(--ink); color: var(--screen); }
:focus-visible { outline: 1px dashed currentColor; outline-offset: 2px; }
::selection { background: #fff; color: #000; }
[hidden] { display: none !important; }
.skip { position: fixed; z-index: 4; top: 0; left: 0; padding: .3em; background: var(--ink); color: var(--screen); }
.skip:not(:focus), .sr-only { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
.running-head, .colophon { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1ch; }
.running-head h1 { font-weight: 400; }
.repeat-title, .colophon > :last-child { text-align: right; }
section { margin-top: 1lh; scroll-margin-block: 1lh; }
section > :is(p, dl, pre, details, .indented, .related) { margin-left: var(--indent); }
section > :is(p, pre, dl, details) + :is(p, pre, dl, details), dt:not(:first-child) { margin-top: 1lh; }
dd { margin-left: var(--indent); }
p, dd, code, li, summary { overflow-wrap: anywhere; }
pre { white-space: pre-wrap; tab-size: 4; }
section > details.client + details.client { margin-top: 0; }
.entry { max-width: 100%; }
.entry > summary { display: list-item; list-style: disclosure-closed; width: fit-content; }
.entry[open] > summary { list-style: disclosure-open; }
.client summary strong { display: inline-block; width: 8ch; vertical-align: top; }
.client summary span { display: inline-block; max-width: calc(100% - 8ch); vertical-align: top; color: var(--dim); }
.client summary:hover span { color: inherit; }
.entry > :not(summary) { margin-left: var(--indent); }
.entry > p, .entry > pre, .entry > .listing { margin-top: 1lh; }
.entry.client[open] { padding-bottom: 1lh; }
.listing { display: grid; }
.listing button { justify-self: start; color: var(--dim); }
.listing button:hover { color: var(--screen); }
.expected { color: var(--dim); }
.expected samp { color: var(--ink); }
table { border-collapse: collapse; font: inherit; font-variant-numeric: tabular-nums; }
.indented { margin-block: 1lh; }
caption { text-align: left; padding-bottom: 1lh; }
th, td { padding: 0 0 0 3ch; text-align: right; font-weight: 400; }
thead th { font-weight: 700; }
th:first-child, td:first-child { text-align: left; padding-left: 0; }
.related { display: flex; flex-wrap: wrap; column-gap: 2ch; }
.colophon { color: var(--dim); margin-top: 1lh; }
.pager { position: fixed; inset: auto 0 0; z-index: 2; background: var(--screen); }
.pager-inner { display: flex; width: fit-content; max-width: 100%; flex-wrap: wrap; align-items: baseline; column-gap: 1ch; padding-inline: 1ch; background: var(--ink); color: var(--screen); }
.pager summary, .pager .quit { display: inline-block; min-height: 1lh; text-decoration: none; }
.pager summary { list-style: none; }
.pager summary::-webkit-details-marker { display: none; }
.pager kbd { font-weight: 700; }
.pager summary:hover, .pager .quit:hover { color: var(--screen); text-decoration: underline; }
.help-sheet {
  position: absolute; bottom: 100%; inset-inline-start: 0; width: min(70ch, 100%); max-height: 74vh;
  overflow: auto; border: 1px solid var(--ink); background: var(--screen); color: var(--ink); padding: .8lh 1.5ch;
}
.help-sheet nav { display: flex; flex-wrap: wrap; gap: .35lh 2ch; margin-top: .6lh; }
.help-sheet p, .help-sheet label { display: block; margin-top: .65lh; }
.help-sheet input { accent-color: #eee; }
@media (max-width: 600px) {
  :root { --indent: 2ch; --gutter: 16px; font-size: 106.25%; line-height: 1.38; }
  .running-head { grid-template-columns: 1fr auto; }
  .repeat-title { display: none; }
  .entry > :not(summary) { margin-left: 0; }
  dd { margin-left: 1ch; }
  .entry > summary, .pager summary, .pager .quit { min-height: 30px; }
  .pager summary, .pager .quit { padding-block: .2lh; }
  th, td { padding-left: 1ch; }
}
@media (max-width: 380px) {
  .colophon { grid-template-columns: 1fr auto; }
  .colophon > :nth-child(2) { display: none; }
}
@media print {
  :root { --screen: #fff; --ink: #000; --dim: #333; font-size: 10pt; }
  body { padding: 0; }
  main { width: 100%; padding: 0; }
  .skip, .pager, .listing button { display: none !important; }
  dd, tr { break-inside: avoid; }
}
