:root {
  --bg: #fff;
  --fg: #0b0b0b;
  --mut: #5b5b57;
  --inv: 0;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99;
  opacity: 0.34;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='w'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' seed='9' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 2.6 0 0 0 -1.1'/></filter><rect width='100%' height='100%' filter='url(%23w)'/></svg>");
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.13;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='2.2 0 0 0 -.6 2.2 0 0 0 -.6 2.2 0 0 0 -.6 0 0 0 0 1'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font:
    15px/1.6 "Space Mono",
    ui-monospace,
    Menlo,
    monospace;
}

main {
  max-width: 820px;
  margin: 0 auto;
  padding: 56px 24px 110px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 0px;
  align-items: end;
}

.hero > div:first-child {
  align-self: center;
  padding-bottom: 30px;
}

.pix {
  font-family: "Instrument Serif", "Space Mono", monospace;
}

h1 {
  text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.257);
  font:
    400 clamp(60px, 11vw, 100px)/0.95 "Instrument Serif",
    serif;
  margin: 0 0 22px;
  letter-spacing: -0.01em;
}

.tag {
  font-size: 12px;
  color: var(--mut);
  margin-bottom: 22px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.lede {
  font-size: 16px;
  max-width: 440px;
  margin: 0 0 22px;
}

.links {
  display: flex;
  gap: 10px 18px;
  flex-wrap: wrap;
  font-size: 14px;
}

.links a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 2px solid var(--fg);
}

.links a:hover {
  background: var(--fg);
  color: var(--bg);
}

.ph {
  order: 1;
  width: 100%;
  max-width: 400px;
  justify-self: start;
  line-height: 0;
  position: relative;
}

.ph canvas {
  position: absolute;
  left: -18%;
  width: 122%;
  top: -16%;
  height: 116%;
  z-index: 0;
  image-rendering: pixelated;
}

.ph img {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 1;
}

#ramp {
  display: block;
  width: 100%;
  height: 20px;
  margin: 0 0 22px;
  pointer-events: none;
  image-rendering: pixelated;
}

#crumb {
  font-size: 12px;
  color: var(--mut);
  margin: 30px 0 8px;
  min-height: 18px;
}

#crumb a {
  color: var(--mut);
  cursor: pointer;
}

#crumb a:hover {
  color: var(--fg);
}

#zt {
  font:
    600 36px/1.15 "Instrument Serif",
    monospace;
  margin: 0 0 10px;
  display: none;
}

.n {
  position: relative;
}

.r {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 5px 8px 5px 26px;
  margin-left: -26px;
  cursor: default;
  outline: none;
  position: relative;
}

.r:hover,
.r:focus-visible {
  background: var(--fg);
  color: var(--bg);
}

.r:hover .m,
.r:focus-visible .m,
.r:hover .s,
.r:focus-visible .s {
  color: inherit;
  opacity: 0.8;
}

.r:hover .h::before,
.r:focus-visible .h::before {
  background: var(--bg);
}

.h {
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.h::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--fg);
}

.h:hover::before {
  transform: scale(1.6);
}

.has.c > .r > .h::after {
  content: "";
  position: absolute;
  inset: 1px;
  border: 2px solid currentColor;
  opacity: 0.55;
}

.has > .r {
  cursor: pointer;
}

.t {
  font-size: 15px;
}

.m {
  margin-left: auto;
  font-size: 12px;
  color: var(--mut);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.d0 {
  margin-top: 10px;
}

.d0 > .r .t {
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.126);
  font:
    600 28px/1.25 "Instrument Serif",
    "Space Mono",
    monospace;
}

.d1 > .r .t {
  font-weight: 700;
  font-size: 16px;
}

.s {
  color: var(--mut);
  font-size: 14px;
  display: block;
  font-weight: 400;
}

.leaf > .r .t {
  font-weight: 400;
  font-size: 15px;
}

.leaf > .r .h::before {
  width: 4px;
  height: 4px;
  opacity: 0.55;
}

.b {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.26s steps(6);
}

.c > .b {
  grid-template-rows: 0fr;
}

.bi {
  overflow: hidden;
  margin-left: -17px;
  padding-left: 25px;
  border-left: 2px dotted var(--fg);
}

.c > .b > .bi {
  border-color: transparent;
}

.t a {
  color: inherit;
  border-bottom: 2px solid currentColor;
  text-decoration: none;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 0 8px;
}

.chips span {
  font-size: 11px;
  padding: 1px 8px;
  border: 2px solid var(--fg);
}

.hero > div:first-child,
#crumb,
#zt,
#tree,
footer {
  filter: url(#dz);
  background: var(--bg);
}

footer {
  margin-top: 60px;
  font-size: 11px;
  color: var(--mut);
}

kbd {
  font:
    11px "Space Mono",
    monospace;
  border: 1px solid var(--mut);
  padding: 0 5px;
}

@media (max-width: 700px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .ph {
    justify-self: center;
    max-width: 340px;
    margin-top: 44px;
  }

  .hero > div:first-child {
    padding-bottom: 0;
  }

  .m {
    display: none;
  }

  .r {
    margin-left: -22px;
    padding-left: 22px;
  }

  main {
    padding-top: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .b {
    transition: none;
  }
}
