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

::selection {
  background: var(--ink);
  color: var(--white);
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 16px;
  font-synthesis: none;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 var(--fs-body) / 1.53 var(--text);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2.5px;
}
a:hover {
  text-decoration-thickness: 2px;
}

code {
  font-family: var(--mono);
  font-size: max(var(--fs-min), 0.94em);
  font-variant-ligatures: none;
  overflow-wrap: anywhere;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 22px var(--m) 0;
  font-size: var(--fs-small);
}

.crumbs {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 14px;
}

.wordmark {
  margin-right: 14px;
  font: 900 var(--fs-claim) / 1 var(--display);
  letter-spacing: 0.015em;
  text-decoration: none;
}

.opening,
.ga {
  --fig: clamp(780px, (100vw - 2 * var(--m)) * 0.6, 1000px);
  --u: calc(var(--fig) / 780);
  display: grid;
  grid-template-columns: var(--fig) minmax(0, 1fr);
}
.lede,
.ga-tools {
  padding-left: 10px;
}

.opening {
  padding: 26px var(--m) 22px;
}
.opening h1 {
  margin-top: -0.055em;
  font-size: var(--fs-title);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.022em;
  white-space: nowrap;
}
.lede {
  max-width: 36em;
  line-height: 1.47;
}

.solo {
  display: block;
}
.solo h1 {
  white-space: normal;
}
.solo .lede {
  max-width: 640px;
  margin-top: calc(var(--fs-title) * 0.32);
  padding-left: 0;
}

.ga-tools {
  display: flex;
  flex-direction: column;
}
.ga {
  --t1: 60;
  --t2: 360;
  padding: 0 var(--m);
}
.fig {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  font-family: var(--text);
}
.fig-defs {
  position: absolute;
  width: 0;
  height: 0;
}
.only-narrow {
  display: none;
}
.tool h3 {
  font-size: var(--fs-tool);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.015em;
}
.tool h3 a {
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
}
.tool h3 a:hover {
  text-decoration-thickness: 3px;
}
.tool p {
  max-width: 34em;
  margin-top: 10px;
  font-size: var(--fs-claim);
  line-height: 1.44;
}
.t-a {
  min-height: calc((var(--t2) - var(--t1)) * var(--u));
  margin-top: calc(var(--t1) * var(--u) - var(--fs-tool) * 0.51);
}
.tn {
  display: none;
  font: 700 var(--fs-small) / 1 var(--display);
  letter-spacing: 0;
  vertical-align: 0.9em;
  margin-right: 2px;
}
.notes {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 10px;
  max-width: 34em;
  margin-top: auto;
  font-size: var(--fs-small);
  line-height: 1.4;
}
.notes h2 {
  font: italic 400 var(--fs-small) / 1.4 var(--text);
}
.notes ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.notes a {
  text-decoration-style: dotted;
}
.notes a:hover {
  text-decoration-style: solid;
}

.foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 24px;
  margin-top: 40px;
  padding: 14px var(--m) 26px;
  border-top: 2px solid var(--ink);
  font-size: var(--fs-small);
}
.foot p:nth-child(n + 3) {
  grid-column: 2;
  text-align: right;
}
.foot p:nth-child(3) {
  grid-row: 1;
}
.foot p:nth-child(4) {
  grid-row: 2;
  color: var(--ink-2);
  font-size: var(--fs-label);
}

.f-top {
  fill: var(--white);
}
.f-front,
.f-side {
  fill: var(--ground);
}
.f-hatch {
  stroke: var(--ink);
  stroke-width: 0.7;
}
.f-obj {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.f-edge {
  fill: none;
  stroke: var(--ink);
  stroke-width: 0.9;
}
.f-small .f-obj {
  stroke-width: 1;
}
.f-small .f-edge {
  stroke-width: 0.6;
}
.f-small .f-side-h {
  fill: var(--ink);
}
.f-slot {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.1;
  stroke-dasharray: 5 3;
}
.f-key {
  fill: var(--white);
  stroke: var(--ink);
  stroke-width: 1.15;
  stroke-linejoin: round;
}
.f-sig {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
}
.f-hid {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1;
  stroke-dasharray: 4 3;
}
.f-link {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.1;
}
.f-pin {
  fill: none;
  stroke: var(--ink);
  stroke-width: 0.8;
  stroke-dasharray: 10 3 2 3;
}
.f-land,
.f-dot,
.f-arrow {
  fill: var(--ink);
}
.f-node {
  fill: var(--white);
  stroke: var(--ink);
  stroke-width: 1.1;
}
.f-lead {
  fill: none;
  stroke: var(--ink);
  stroke-width: 0.7;
}
.f-bracket path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.2;
}
.f-num {
  font: 700 15px var(--display);
  fill: var(--ink);
}
.f-name {
  font: 400 var(--fs-label) var(--text);
  fill: var(--ink);
}
.f-note {
  font: italic 400 var(--fs-min) var(--text);
  fill: var(--ink-2);
}
.f-code,
.f-face {
  font-family: var(--mono);
  font-size: var(--fs-min);
  font-variant-ligatures: none;
}
.f-face {
  fill: var(--ink);
}

@media (max-width: 1240px) {
  .opening {
    display: block;
  }
  .ga {
    display: flex;
    flex-direction: column;
  }
  .opening h1 {
    margin-top: 0;
    white-space: normal;
  }
  .lede {
    max-width: 640px;
    margin-top: 14px;
  }
  .lede,
  .ga-tools {
    padding-left: 0;
  }
  .ga-fig .fig {
    max-width: 780px;
  }
  .ga-tools {
    order: -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 40px;
    margin-top: 24px;
    margin-bottom: 28px;
  }
  .tool {
    display: grid;
    grid-row: span 2;
    grid-template-rows: subgrid;
  }
  .t-a {
    min-height: 0;
    margin-top: 0;
  }
  .tn {
    display: inline;
  }
  .notes {
    grid-column: 1 / -1;
    margin-top: 22px;
  }
}

@media (max-width: 900px) {
  .only-wide {
    display: none;
  }
  .only-narrow {
    display: grid;
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
    column-gap: 32px;
    align-items: center;
  }
  .parts-l {
    margin: 10px 0 0;
    padding: 0 0 0 24px;
    list-style: none;
    font-size: var(--fs-small);
    line-height: 1.32;
  }
  .parts-l b {
    display: inline-block;
    width: 20px;
    margin-left: -24px;
    font: 700 var(--fs-min) / 1 var(--display);
  }
  .parts-l i,
  .parts-cap {
    color: var(--ink-2);
  }
  .parts-cap {
    margin-top: 10px;
    font-size: var(--fs-label);
    font-style: italic;
    line-height: 1.32;
  }
  .ga-tools {
    display: block;
  }
  .tool {
    display: block;
  }
  .t-b {
    margin-top: 24px;
  }
}

@media (max-width: 720px) {
  .top {
    padding-top: 14px;
  }
  .crumbs a,
  .notes a,
  .foot a {
    display: inline-block;
    padding: 4px 0;
  }
  .opening {
    padding-top: 20px;
    padding-bottom: 18px;
  }
  .only-narrow {
    display: block;
  }
  .only-narrow .fig {
    max-width: 420px;
  }
  .tn,
  .f-to-tool {
    display: none;
  }
  .notes {
    display: block;
  }
  .foot {
    display: block;
  }
  .foot p:nth-child(n + 3) {
    text-align: left;
  }
}

@media (min-width: 1241px) {
  .opening {
    align-items: last baseline;
  }
}
@media (min-width: 1849px) {
  body {
    --m: calc((100vw - 1760px) / 2);
  }
}
