@font-face {
  font-family: "Plex Sans";
  src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Sans";
  src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #ffffff;
  --ink: #15181c;
  --muted: #56606b;
  --rule: #d3d8de;
  --copper: #a84a08;
  --canvas: #0c0c0d;
  --canvas-ink: #f1f1ee;
  --silk: #f2c200;
  --gutter: clamp(16px, 5vw, 48px);
  --measure: 68ch;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #101214;
    --ink: #e7e9ec;
    --muted: #9aa3ad;
    --rule: #2b3138;
    --copper: #f0a04b;
    --canvas: #000000;
  }
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 "Plex Sans", system-ui, "Segoe UI", sans-serif;
}
a {
  color: var(--copper);
  text-underline-offset: 0.18em;
}
:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
}

.top,
main,
footer {
  width: min(100%, 1120px);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.top nav {
  display: flex;
  gap: 1.5rem;
}
.top nav a {
  color: var(--ink);
  text-decoration: none;
}
.top nav a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0;
}
h1 {
  font-size: clamp(2rem, 1.2rem + 3.4vw, 3.5rem);
  max-width: 18ch;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  margin-bottom: 1.25rem;
}
h3 {
  font-size: 1.125rem;
  letter-spacing: 0;
  margin-bottom: 0.5rem;
}
p {
  margin: 0 0 1rem;
  max-width: var(--measure);
}

.hero {
  padding-block: clamp(2.5rem, 7vw, 5rem) 0;
}
.lead {
  font-size: 1.25rem;
  line-height: 1.5;
  margin-block: 1.5rem 2rem;
  max-width: 56ch;
}
.note {
  color: var(--muted);
  font-size: 0.9375rem;
  margin-top: 0.75rem;
}

main > section + section {
  margin-top: clamp(3.5rem, 8vw, 6rem);
}

/* A command reads like silkscreen on the editor's canvas. */
.command {
  position: relative;
  max-width: 44rem;
  background: var(--canvas);
  color: var(--canvas-ink);
  border-radius: 4px;
  margin-block: 0.75rem 1rem;
}
.command pre {
  margin: 0;
  padding: 1rem 5.5rem 1rem 1.125rem;
  overflow-x: auto;
  font: 400 0.9375rem/1.7 "Plex Mono", ui-monospace, Consolas, monospace;
}
.command .prompt {
  color: var(--silk);
  user-select: none;
}
.command button {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  min-width: 4.25rem;
  padding: 0.3rem 0.6rem;
  font: inherit;
  font-size: 0.8125rem;
  color: var(--canvas-ink);
  background: transparent;
  border: 1px solid #55595f;
  border-radius: 3px;
  cursor: pointer;
}
.command button:hover {
  border-color: var(--silk);
}
code {
  font-family: "Plex Mono", ui-monospace, Consolas, monospace;
  font-size: 0.92em;
}

.shot {
  margin: clamp(2rem, 5vw, 3.5rem) 0 0;
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 4px;
}
.shot figcaption {
  color: var(--muted);
  font-size: 0.9375rem;
  margin-top: 0.75rem;
  max-width: var(--measure);
}

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.25rem;
}
.steps > li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  column-gap: 0.75rem;
}
.steps > li::before {
  content: counter(step);
  grid-row: 1 / span 20;
  font: 400 1.125rem/1.25 "Plex Mono", ui-monospace, monospace;
  color: var(--copper);
}
.steps > li > * {
  grid-column: 2;
}
blockquote {
  margin: 0.25rem 0 1rem;
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 3px solid var(--copper);
  max-width: 60ch;
  font-size: 1.125rem;
}

.pairs {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 0 3rem;
}
.pairs > div {
  padding-block: 1.125rem;
  border-top: 1px solid var(--rule);
}
.pairs dt {
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.pairs dd {
  margin: 0;
  color: var(--muted);
}

.plain {
  margin: 0 0 1.5rem;
  padding-left: 1.125rem;
  max-width: var(--measure);
}
.plain li {
  margin-bottom: 0.5rem;
}
.plain li::marker {
  color: var(--copper);
}
.status {
  color: var(--muted);
}

footer {
  margin-top: clamp(4rem, 9vw, 7rem);
  padding-bottom: 3rem;
}
/* The title block of a drawing sheet: what this is, which revision, under what terms. */
.titleblock {
  margin: 0 0 0 auto;
  max-width: 34rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1.5px solid var(--ink);
  font-size: 0.875rem;
}
.titleblock > div {
  padding: 0.5rem 0.75rem;
  border: 0.5px solid var(--ink);
  min-width: 0;
}
.titleblock .wide {
  grid-column: span 2;
}
.titleblock .wider {
  grid-column: span 3;
}
.titleblock dt {
  color: var(--muted);
  font-size: 0.75rem;
}
.titleblock dd {
  margin: 0;
  font-family: "Plex Mono", ui-monospace, monospace;
  overflow-wrap: anywhere;
}
.titleblock a {
  color: inherit;
}

@media (max-width: 34rem) {
  .titleblock {
    grid-template-columns: repeat(2, 1fr);
  }
  .titleblock .wider,
  .titleblock .last {
    grid-column: span 2;
  }
  /* No room beside the command: the button goes under it. */
  .command pre {
    padding-right: 1.125rem;
  }
  .command button {
    position: static;
    display: block;
    margin: 0 0.625rem 0.625rem auto;
  }
  .steps > li {
    grid-template-columns: 1.75rem minmax(0, 1fr);
  }
}
