:root {
  --ink: #000;
  --paper: #fff;
  --pixel: "Silkscreen", "Courier New", monospace;
  --body: "IBM Plex Mono", ui-monospace, monospace;
  --header-bottom: 116px;
  --rail: 68px;
  color-scheme: only light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

::selection {
  background: #000;
  color: #fff;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 40;
  background: #000;
  color: #fff;
  padding: 8px 12px;
  font-family: var(--pixel);
  font-size: 12px;
}

.skip:focus {
  top: 12px;
}

.frieze {
  height: 52px;
  overflow: hidden;
  background: #fff;
  border-bottom: 4px solid #000;
  display: flex;
  align-items: center;
}

.frieze-track {
  display: flex;
  width: max-content;
  animation: march 42s linear infinite;
}

.frieze-set {
  display: flex;
}

.frieze-track img {
  width: 64px;
  height: 48px;
  flex: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

@keyframes march {
  to {
    transform: translateX(-50%);
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  min-height: 64px;
  padding: 12px 20px;
  background: #000;
  color: #fff;
}

.brand {
  font-family: var(--pixel);
  font-size: 14px;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.04em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  justify-content: flex-end;
}

.nav a {
  font-family: var(--pixel);
  font-size: 11px;
  line-height: 1;
  color: #fff;
  text-decoration: none;
  padding: 6px 4px;
}

.nav a:hover,
.nav a:focus-visible {
  background: #fff;
  color: #000;
}

.rail {
  position: fixed;
  z-index: 4;
  left: 0;
  top: var(--header-bottom);
  bottom: 0;
  width: 64px;
  overflow: hidden;
  background: #fff url("mark.svg") repeat-y center top / 64px 48px;
  border-right: 4px solid #000;
}

.rail img {
  display: block;
  width: 64px;
  height: 48px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.shell {
  margin-left: var(--rail);
}

.pad {
  width: min(1120px, calc(100% - 56px));
  margin-left: 28px;
  margin-right: auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(280px, 480px) minmax(0, 1fr);
  gap: 48px 56px;
  align-items: center;
  padding-top: 56px;
  padding-bottom: 72px;
}

.hero-face {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.vert {
  margin: 0;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--pixel);
  font-size: 12px;
  letter-spacing: 0.12em;
  line-height: 1;
}

.face-frame {
  width: min(100%, 440px);
  border: 8px solid #000;
  background: #fff;
  box-shadow: 12px 12px 0 #000;
  margin: 0 14px 14px 0;
}

.face,
.sign-frame {
  aspect-ratio: 8 / 6;
  background: #fff;
  display: grid;
}

.face img,
.sign-frame img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.cells,
.stack-pixels {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(6, 1fr);
  width: 100%;
  height: 100%;
}

.cell,
.px {
  display: grid;
  place-items: center;
  background: #fff;
  color: transparent;
  font-family: var(--pixel);
  font-size: clamp(9px, 1.5vw, 14px);
  line-height: 1;
  user-select: none;
}

.cell.on,
.px.on {
  background: #000;
}

.face {
  cursor: crosshair;
}

.face.show-bits .cell {
  color: #000;
}

.face.show-bits .cell.on {
  color: #fff;
}

.status,
.readout,
.kicker,
.ticker-label {
  font-family: var(--pixel);
  line-height: 1.4;
}

.status {
  margin: 14px 0 0;
  font-size: 12px;
}

.readout {
  margin: 8px 0 0;
  min-height: 2.8em;
  font-size: 11px;
  max-width: 28em;
}

.kicker {
  margin: 0 0 14px;
  font-size: 12px;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1 {
  margin: 0;
}

.word,
.ticker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.word span,
.ticker span {
  font-family: var(--pixel);
  line-height: 1;
}

.word span {
  background: #000;
  color: #fff;
  font-size: clamp(32px, 5vw, 54px);
  padding: 12px 10px 10px;
}

.ticker-label {
  margin: 22px 0 8px;
  font-size: 11px;
}

.ticker span {
  border: 4px solid #000;
  font-size: clamp(18px, 2vw, 24px);
  padding: 8px 8px 6px;
}

.lead {
  margin: 28px 0 0;
  max-width: 34em;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.45;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 22px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 16px;
  border: 4px solid #000;
  background: #000;
  color: #fff;
  box-shadow: 6px 6px 0 #000;
  font-family: var(--pixel);
  font-size: 12px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover,
.btn:focus-visible {
  transform: translate(2px, 2px);
  box-shadow: 4px 4px 0 #000;
  background: #fff;
  color: #000;
}

.textlink {
  font-family: var(--pixel);
  font-size: 12px;
  line-height: 1.4;
}

.section {
  padding: 28px 0 80px;
  scroll-margin-top: 96px;
}

h2 {
  margin: 0 0 18px;
  max-width: 16em;
  font-family: var(--body);
  font-size: clamp(30px, 4.4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

h3 {
  margin: 0 0 14px;
  font-family: var(--pixel);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

.prose {
  max-width: 68ch;
  margin: 0 0 16px;
}

.prose:last-child {
  margin-bottom: 0;
}

.band {
  height: 48px;
  background: #fff url("logo.png") repeat-x left center / 64px 48px;
  border-top: 4px solid #000;
  border-bottom: 4px solid #000;
  image-rendering: pixelated;
}

.points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin: 36px 0 8px;
  padding: 0 10px 12px 0;
}

.point {
  border: 4px solid #000;
  background: #fff;
  box-shadow: 8px 8px 0 #000;
  padding: 16px 16px 20px;
}

.num {
  display: inline-block;
  margin-bottom: 18px;
  padding: 7px 8px 5px;
  background: #000;
  color: #fff;
  font-family: var(--pixel);
  font-size: 12px;
  line-height: 1;
}

.point h3 {
  margin-bottom: 10px;
  font-family: var(--body);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.point p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

.formula {
  display: inline-block;
  margin: 8px 0 18px;
  padding: 14px 14px 12px;
  border: 4px solid #000;
  box-shadow: 6px 6px 0 #000;
  font-family: var(--pixel);
  font-size: 13px;
  line-height: 1.5;
}

.table-wrap {
  overflow-x: auto;
  margin: 8px 0 28px;
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 15px;
}

caption {
  margin-bottom: 12px;
  text-align: left;
  font-family: var(--pixel);
  font-size: 12px;
  caption-side: top;
}

th,
td {
  padding: 9px 10px;
  border: 3px solid #000;
  text-align: left;
  white-space: nowrap;
}

th {
  font-family: var(--pixel);
  font-size: 11px;
  font-weight: 400;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
  border-top: 4px solid #000;
  border-left: 4px solid #000;
}

.facts div {
  padding: 16px;
  border-right: 4px solid #000;
  border-bottom: 4px solid #000;
}

.facts dt {
  margin-bottom: 8px;
  font-family: var(--pixel);
  font-size: 11px;
}

.facts dd {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.assemble {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 520px);
  gap: 40px 36px;
  align-items: start;
  margin-top: 32px;
}

.shots {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 4px solid #000;
}

.shot {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto auto;
  gap: 8px 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 4px solid #000;
}

.shot-idx,
.stack-side span,
.stack-side code {
  font-family: var(--pixel);
  font-size: 12px;
  line-height: 1;
}

.shot strong {
  font-size: 22px;
  letter-spacing: -0.04em;
}

.shot-role {
  font-size: 13px;
}

.bitrow {
  display: flex;
  grid-column: 1 / -1;
  width: fit-content;
  border: 3px solid #000;
}

.mini {
  width: 18px;
  height: 18px;
  background: #fff;
}

.mini.on {
  background: #000;
}

.stack {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: stretch;
  width: min(100%, 520px);
  margin: 0 0 8px;
}

.stack img {
  grid-column: 1 / -1;
  width: 100%;
  image-rendering: pixelated;
  border: 8px solid #000;
}

.stack-side,
.stack-sheet {
  display: grid;
  grid-template-rows: repeat(6, 1fr);
}

.stack-side span,
.stack-side code {
  display: flex;
  align-items: center;
}

.stack-sheet {
  aspect-ratio: 8 / 6;
  background: #fff;
  box-shadow: 0 0 0 8px #000;
}

.stack-line {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
}

.stack-line .px {
  width: 100%;
  height: 100%;
}

.dark-block {
  background: #000;
  color: #fff;
}

.dark-block .section {
  padding-top: 72px;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 28px 0 32px;
  padding: 0;
  list-style: none;
}

.pipeline li {
  min-height: 128px;
  padding: 14px 12px;
  border: 4px solid #fff;
}

.pipeline b {
  display: block;
  margin-bottom: 14px;
  font-family: var(--pixel);
  font-size: 12px;
  font-weight: 400;
}

.pipeline span {
  display: block;
  font-size: 15px;
  line-height: 1.35;
}

.sheet {
  margin: 12px 0 28px;
  padding: 6px 16px 16px;
  background: #fff;
  color: #000;
  box-shadow: 8px 8px 0 #fff;
}

.sheet summary {
  padding: 12px 0;
  font-family: var(--pixel);
  font-size: 12px;
  cursor: pointer;
}

pre {
  margin: 0;
  overflow-x: auto;
  font-family: var(--body);
  font-size: 13px;
  line-height: 1.5;
}

.meta {
  margin: 0;
  padding: 0;
  list-style: none;
}

.meta li {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-top: 2px solid #fff;
  font-size: 15px;
}

.meta span {
  font-family: var(--pixel);
  font-size: 11px;
  line-height: 1.4;
}

.mint {
  display: block;
  margin: 8px 0 0;
  padding: 14px;
  border: 4px solid #fff;
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.dark-block .btn {
  border-color: #fff;
  background: #fff;
  color: #000;
  box-shadow: 6px 6px 0 #fff;
}

.dark-block .btn:hover,
.dark-block .btn:focus-visible {
  background: #000;
  color: #fff;
  box-shadow: 4px 4px 0 #fff;
}

.signoff {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 40px;
  align-items: end;
  padding-bottom: 64px;
}

.sign-frame {
  width: min(100%, 280px);
  background: transparent;
}

.sign-frame .cell {
  background: #000;
}

.sign-frame .cell.on {
  background: #fff;
}

.tiny {
  margin: 0;
  max-width: 36em;
  font-family: var(--pixel);
  font-size: 12px;
  line-height: 1.7;
}

.footer-links {
  margin-top: 18px;
}

.footer-links a {
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid #000;
  outline-offset: 3px;
}

.dark-block :focus-visible,
.topbar :focus-visible {
  outline-color: #fff;
}

@media (max-width: 980px) {
  .hero,
  .assemble,
  .points,
  .pipeline {
    grid-template-columns: 1fr 1fr;
  }

  .pipeline li:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 800px) {
  .section {
    scroll-margin-top: 128px;
  }

  .topbar {
    flex-wrap: wrap;
    gap: 10px 16px;
  }

  .nav {
    flex: 1 0 100%;
    justify-content: flex-start;
  }

  .rail {
    display: none;
  }

  .shell {
    margin-left: 0;
  }

  .hero,
  .assemble,
  .points,
  .facts,
  .pipeline {
    grid-template-columns: 1fr;
  }

  .pipeline li:last-child {
    grid-column: auto;
  }

  .vert {
    display: none;
  }

  .hero-face {
    grid-template-columns: 1fr;
  }

  .assemble-face {
    order: -1;
  }

  .pad {
    width: min(1120px, calc(100% - 32px));
  }

  .shot {
    grid-template-columns: 32px minmax(0, 1fr) auto;
  }

  .shot-role {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .frieze-track {
    animation: none;
  }
}
