/* UAV Ground School showcase. Survey-chart palette: neutral light pages,
   night sections for aerial imagery, one hi-vis signal orange. */

:root {
  --bg: oklch(0.985 0 0);
  --surface: oklch(0.955 0.003 215);
  --ink: oklch(0.2 0.006 215);
  --ink-2: oklch(0.42 0.01 215);
  --line: oklch(0.87 0.005 215);

  --night: oklch(0.165 0.012 220);
  --night-2: oklch(0.215 0.014 220);
  --night-line: oklch(0.32 0.014 220);
  --night-ink: oklch(0.95 0.004 215);
  --night-ink-2: oklch(0.76 0.012 215);

  --steel: oklch(0.47 0.085 212);
  --steel-bright: oklch(0.8 0.075 212);
  --signal: oklch(0.72 0.16 52);
  --signal-ink: oklch(0.52 0.15 45);
  --signal-soft: oklch(0.72 0.16 52 / 0.16);

  --font-display: "Young Serif", "Iowan Old Style", Georgia, serif;
  --font-sans: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step--1: clamp(0.8rem, 0.78rem + 0.1vw, 0.86rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.6rem, 1.35rem + 1.1vw, 2.2rem);
  --step-3: clamp(2.2rem, 1.6rem + 2.6vw, 3.6rem);
  --step-4: clamp(2.7rem, 1.5rem + 5vw, 5.6rem);

  --gutter: clamp(1.25rem, 0.6rem + 3vw, 3.5rem);
  --max: 78rem;
  --radius: 10px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --z-sticky: 10;
  --z-overlay: 20;
  --z-toast: 30;

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}

img,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

code,
kbd,
.mono {
  font-family: var(--font-mono);
  font-size: 0.86em;
  letter-spacing: -0.01em;
}

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: var(--z-toast);
  background: var(--signal);
  color: var(--night);
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

.prose {
  max-width: 64ch;
}

.prose p + p {
  margin-top: 1em;
}

.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 58ch;
}

/* ------------------------------------------------------------ header -- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: color-mix(in oklch, var(--night) 94%, transparent);
  color: var(--night-ink);
  border-bottom: 1px solid var(--night-line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  text-decoration: none;
  white-space: nowrap;
}

.wordmark svg {
  width: 1.6rem;
  height: 1.6rem;
}

.site-nav ul {
  display: flex;
  gap: clamp(0.9rem, 2vw, 1.8rem);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--step--1);
}

.site-nav a {
  text-decoration: none;
  color: var(--night-ink-2);
  transition: color 0.2s;
}

.site-nav a:hover {
  color: var(--night-ink);
}

.site-nav .gh {
  color: var(--signal);
}

@media (max-width: 760px) {
  .site-nav li:not(.keep) {
    display: none;
  }
}

/* -------------------------------------------------------------- night -- */

.night {
  background: var(--night);
  color: var(--night-ink);
  line-height: 1.66;
}

.night .lede,
.night .muted {
  color: var(--night-ink-2);
}

/* --------------------------------------------------------------- hero -- */

.hero {
  padding-top: clamp(3.5rem, 2rem + 7vw, 8rem);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  align-items: end;
}

@media (min-width: 980px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 4rem;
  }
}

.hero h1 {
  font-size: var(--step-4);
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 13ch;
}

.hero h1 em {
  font-style: normal;
  color: var(--signal);
}

.hero .lede {
  margin-top: 1.6rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  margin-top: 2.2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  background: var(--signal);
  color: oklch(0.18 0.02 50);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.button:hover {
  background: oklch(0.78 0.15 55);
}

.button:active {
  transform: translateY(1px);
}

.button svg {
  width: 1.1rem;
  height: 1.1rem;
}

.text-link {
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.1rem;
}

.spec {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem 1.4rem;
  font-size: var(--step--1);
  border-top: 1px solid var(--night-line);
  padding-top: 1.2rem;
}

.spec dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--night-ink-2);
  padding-top: 0.2rem;
}

.spec dd {
  margin: 0;
}

.hero-figure {
  margin: clamp(3rem, 2rem + 4vw, 5.5rem) 0 0;
  position: relative;
}

.hero-figure .frame {
  position: relative;
  border-top: 1px solid var(--night-line);
  border-bottom: 1px solid var(--night-line);
  background: #000;
}

.hero-figure img {
  width: 100%;
  aspect-ratio: var(--ratio, 3 / 1);
  object-fit: cover;
}

.scanline {
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--signal);
  box-shadow: 0 0 18px 2px oklch(0.72 0.16 52 / 0.7);
  opacity: 0;
  pointer-events: none;
}

.motion .hero-figure img {
  animation: assemble 2.6s var(--ease-out) 0.25s both;
}

.motion .scanline {
  animation: scan 2.6s var(--ease-out) 0.25s both;
}

@keyframes assemble {
  from {
    clip-path: inset(0 100% 0 0);
    filter: saturate(0.2) brightness(0.7);
  }
  to {
    clip-path: inset(0 0 0 0);
    filter: none;
  }
}

@keyframes scan {
  0% {
    left: 0;
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    left: calc(100% - 2px);
    opacity: 0;
  }
}

figcaption {
  font-size: var(--step--1);
  color: var(--ink-2);
  margin-top: 0.8rem;
  line-height: 1.5;
}

.night figcaption {
  color: var(--night-ink-2);
}

.hero-figure figcaption {
  padding: 0.9rem var(--gutter) 1.5rem;
  margin: 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ----------------------------------------------------------- sections -- */

.section {
  padding-block: clamp(4.5rem, 3rem + 6vw, 9rem);
}

.section-head {
  display: grid;
  gap: 1.25rem;
  margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}

.section-head h2 {
  font-size: var(--step-3);
  max-width: 18ch;
}

@media (min-width: 980px) {
  .section-head.split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: end;
    gap: 4rem;
  }
}

h3 {
  font-size: var(--step-2);
}

/* ------------------------------------------------------------ brief -- */

.brief {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ink);
}

.brief > li {
  display: grid;
  gap: 1rem 3rem;
  padding: 2.2rem 0;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 900px) {
  .brief > li {
    grid-template-columns: 11rem minmax(0, 1fr) minmax(0, 1.25fr);
  }
}

.brief .tag {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-2);
  padding-top: 0.45rem;
}

.brief h3 {
  font-size: var(--step-2);
}

.brief blockquote {
  margin: 0.8rem 0 0;
  color: var(--ink-2);
  max-width: 44ch;
}

.brief .shipped {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.brief .shipped li {
  display: grid;
  grid-template-columns: 0.9rem 1fr;
  gap: 0.6rem;
  line-height: 1.45;
}

.brief .shipped li::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  margin-top: 0.5rem;
  border: 1.5px solid var(--steel);
  transform: rotate(45deg);
}

.brief .shipped strong {
  font-weight: 600;
}

/* ------------------------------------------------------------- demo -- */

.demo {
  display: grid;
  gap: 1.5rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.toolbar [role="group"] {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font: inherit;
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.95rem 0.35rem 0.35rem;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}

.chip:hover {
  border-color: var(--ink-2);
}

.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.chip img {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  object-fit: cover;
}

.chip.upload {
  padding-left: 0.95rem;
  border-style: dashed;
}

.chip.upload svg {
  width: 1rem;
  height: 1rem;
}

.toolbar .status {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-2);
  min-height: 1.2em;
}

@media (max-width: 700px) {
  .toolbar .status {
    margin-left: 0;
    width: 100%;
  }
}

.bench {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 1080px) {
  .bench {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: start;
  }
}

.stage {
  position: relative;
  background: var(--night);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 12rem;
}

.stage canvas,
.stage svg.marks {
  width: 100%;
  height: auto;
}

.stage svg.marks {
  position: absolute;
  inset: 0;
  height: 100%;
  pointer-events: none;
}

.stage.dragging {
  outline: 2px dashed var(--signal);
  outline-offset: -8px;
}

.stage .busy {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: oklch(0.165 0.012 220 / 0.55);
  color: var(--night-ink);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.stage[aria-busy="true"] .busy {
  opacity: 1;
}

.marks .cross {
  stroke: #fff;
  stroke-linecap: round;
}

.marks .cross-shadow {
  stroke: #000;
  stroke-opacity: 0.75;
  stroke-linecap: round;
}

.marks .label-bg {
  fill: oklch(0.14 0.01 220 / 0.82);
}

.marks text {
  font-family: var(--font-mono);
  fill: #fff;
  dominant-baseline: central;
}

.view-note {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: var(--step--1);
  color: var(--ink-2);
  margin-top: 0.7rem;
}

.view-note button {
  font: inherit;
  color: var(--steel);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.results h3 {
  font-family: var(--font-sans);
  font-size: var(--step-0);
  font-weight: 600;
  letter-spacing: 0;
}

.results .hint {
  font-size: var(--step--1);
  color: var(--ink-2);
  margin-top: 0.3rem;
}

.table-scroll {
  overflow-x: auto;
  margin-top: 1rem;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
}

th,
td {
  text-align: left;
  padding: 0.55rem 0.7rem 0.55rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: baseline;
}

th {
  font-weight: 500;
  color: var(--ink-2);
  font-size: 0.78rem;
  white-space: nowrap;
}

td.num,
th.num {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.objects td:first-child {
  white-space: nowrap;
}

.swatch {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  margin-right: 0.45rem;
  vertical-align: -0.05rem;
  box-shadow: inset 0 0 0 1px oklch(0 0 0 / 0.25);
}

.delta-good {
  color: oklch(0.45 0.1 150);
}

.layers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr));
  gap: 1rem;
}

.layer-button {
  appearance: none;
  display: grid;
  gap: 0.55rem;
  width: 100%;
  padding: 0;
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.layer-button canvas {
  width: 100%;
  height: auto;
  border-radius: 8px;
  outline: 1px solid var(--line);
  transition: outline-color 0.2s, transform 0.35s var(--ease-out);
}

.layer-button:hover canvas {
  transform: translateY(-2px);
}

.layer-button[aria-pressed="true"] canvas {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

.layer-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: var(--step--1);
}

.layer-meta b {
  font-weight: 600;
}

.layer-meta span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-2);
}

.bands {
  display: grid;
  gap: 2rem;
  margin-top: clamp(3rem, 2rem + 3vw, 5rem);
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

@media (min-width: 900px) {
  .bands {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 4rem;
  }
}

.bands h3 {
  font-size: var(--step-2);
  margin-bottom: 1rem;
}

.band-maps {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 1.25fr);
  gap: 1rem;
}

.band-maps figure {
  margin: 0;
}

.band-maps canvas {
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  border-radius: 6px;
}

.band-legend {
  list-style: none;
  margin: 1.2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr));
  gap: 0.35rem 1.2rem;
  font-size: var(--step--1);
}

.band-legend code {
  font-size: 0.68rem;
  color: var(--ink-2);
}

.note {
  display: flex;
  gap: 0.9rem;
  margin-top: 1.5rem;
  padding: 1rem 1.2rem;
  background: var(--surface);
  border-radius: var(--radius);
  font-size: var(--step--1);
  color: var(--ink-2);
  max-width: 70ch;
}

.note svg {
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.15rem;
  color: var(--steel);
}

.note strong {
  color: var(--ink);
  font-weight: 600;
}

/* -------------------------------------------------------- stitching -- */

.duo {
  display: grid;
  gap: 1.5rem;
  margin: 0 0 clamp(4rem, 3rem + 4vw, 7rem);
}

@media (min-width: 900px) {
  .duo {
    grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
    align-items: end;
  }
}

.duo figure,
.plate {
  margin: 0;
}

.duo img,
.plate img {
  width: 100%;
  border-radius: 6px;
  background: #000;
}

.pipeline {
  list-style: none;
  counter-reset: stage;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}

@media (min-width: 1000px) {
  .pipeline {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.pipeline li {
  counter-increment: stage;
  position: relative;
  padding: 0 0 2rem 2.6rem;
}

.pipeline li::before {
  content: counter(stage);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--signal);
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: var(--night);
  z-index: 1;
}

.pipeline li::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 1.7rem;
  bottom: 0;
  width: 1px;
  background: var(--night-line);
}

.pipeline li:last-child::after {
  display: none;
}

@media (min-width: 1000px) {
  .pipeline li {
    padding: 2.6rem 1.4rem 0 0;
  }

  .pipeline li::after {
    left: 1.7rem;
    right: 0;
    top: 0.85rem;
    bottom: auto;
    width: auto;
    height: 1px;
  }

  .pipeline li:last-child::after {
    display: block;
    right: 1.4rem;
    background: linear-gradient(90deg, var(--night-line), transparent);
  }
}

.pipeline h4 {
  margin: 0 0 0.45rem;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  font-weight: 600;
  color: var(--night-ink);
}

.pipeline p {
  font-size: var(--step--1);
  color: var(--night-ink-2);
  line-height: 1.5;
}

.pipeline code {
  display: block;
  margin-top: 0.7rem;
  color: var(--steel-bright);
  font-size: 0.66rem;
  line-height: 1.6;
}

.loop-note {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.5rem;
  font-size: var(--step--1);
  color: var(--night-ink-2);
}

.loop-note svg {
  flex: none;
  width: 4.5rem;
  height: 1.6rem;
  color: var(--signal);
}

.block {
  margin-top: clamp(4.5rem, 3rem + 5vw, 8rem);
}

.block-head {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 900px) {
  .block-head {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 4rem;
    align-items: end;
  }
}

.block-head p {
  color: var(--night-ink-2);
  max-width: 60ch;
}

/* compare slider */

.compare {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  aspect-ratio: var(--ratio, 3 / 1);
  touch-action: pan-y;
  --pos: 50%;
}

.compare img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}

.compare .after {
  clip-path: inset(0 0 0 var(--pos));
}

.compare .divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: var(--signal);
  pointer-events: none;
}

.compare .knob {
  position: absolute;
  top: 50%;
  left: var(--pos);
  width: 2.6rem;
  height: 2.6rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--signal);
  color: oklch(0.18 0.02 50);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 18px oklch(0 0 0 / 0.45);
  pointer-events: none;
  transition: transform 0.25s var(--ease-out);
}

.compare .knob svg {
  width: 1.3rem;
  height: 1.3rem;
}

.compare input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

.compare:has(input:focus-visible) .knob {
  outline: 2px solid var(--night-ink);
  outline-offset: 3px;
}

.compare:has(input:active) .knob {
  transform: translate(-50%, -50%) scale(1.08);
}

.compare .tag {
  position: absolute;
  top: 0.8rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  background: oklch(0.14 0.01 220 / 0.8);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--night-ink);
  pointer-events: none;
}

.compare .tag.left {
  left: 0.8rem;
}

.compare .tag.right {
  right: 0.8rem;
}

.figures-2 {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .figures-2 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.figures-2 figure {
  margin: 0;
}

.figures-2 img {
  width: 100%;
  border-radius: 6px;
  background: #000;
}

.figures-2 .label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
  font-size: var(--step--1);
}

.figures-2 .label b {
  font-weight: 600;
}

.figures-2 .label span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--night-ink-2);
}

.figures-2 .label span.bad {
  color: var(--signal);
}

.callout {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--night-line);
}

@media (min-width: 760px) {
  .callout {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.callout p {
  font-size: var(--step--1);
  color: var(--night-ink-2);
}

.callout b {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-2);
  color: var(--night-ink);
  line-height: 1.1;
  margin-bottom: 0.3rem;
}

/* -------------------------------------------------------- benchmark -- */

.benchmark-table {
  margin-top: 0.5rem;
}

.benchmark-table caption {
  text-align: left;
  font-size: var(--step--1);
  color: var(--ink-2);
  padding-bottom: 1rem;
}

.benchmark-table tbody th {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-1);
  color: var(--ink);
  padding-top: 2rem;
  white-space: normal;
  border-bottom: 1px solid var(--ink);
}

.benchmark-table tbody th small {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--step--1);
  color: var(--ink-2);
  margin-top: 0.3rem;
}

.benchmark-table td.variant {
  min-width: 16rem;
}

.benchmark-table tr.best td {
  background: var(--signal-soft);
}

.benchmark-table tr.best td.variant::after {
  content: "best";
  margin-left: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--signal-ink);
}

.benchmark-table tr.baseline td {
  color: var(--ink-2);
}

.metrics {
  display: grid;
  gap: 1rem 3rem;
  margin: 2.5rem 0 0;
  font-size: var(--step--1);
  color: var(--ink-2);
}

@media (min-width: 900px) {
  .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.metrics dt {
  color: var(--ink);
  font-weight: 600;
}

.metrics dd {
  margin: 0.2rem 0 0;
}

/* -------------------------------------------------------------- code -- */

.cpp-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 980px) {
  .cpp-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    gap: 4rem;
    align-items: start;
  }
}

.cpp-grid ul {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.8rem;
}

.cpp-grid li {
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.terminal {
  margin: 0;
  background: var(--night);
  color: var(--night-ink);
  border-radius: var(--radius);
  overflow: hidden;
}

.terminal + .terminal {
  margin-top: 1rem;
}

.terminal header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid var(--night-line);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--night-ink-2);
}

.terminal pre {
  margin: 0;
  padding: 1.1rem 1.2rem 1.3rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  line-height: 1.85;
}

.terminal .c {
  color: oklch(0.62 0.012 215);
}

.terminal .p {
  color: var(--signal);
  user-select: none;
}

/* ------------------------------------------------------------ footer -- */

.site-footer {
  padding-block: 4rem 3rem;
}

.site-footer .wrap {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .site-footer .wrap {
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  }
}

.site-footer .big {
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.15;
  max-width: 20ch;
}

.site-footer h2 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--night-ink-2);
  margin-bottom: 0.9rem;
  letter-spacing: 0;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  font-size: var(--step--1);
}

.site-footer a {
  text-decoration: none;
  color: var(--night-ink);
}

.site-footer a:hover {
  color: var(--signal);
}

.site-footer .fine {
  grid-column: 1 / -1;
  padding-top: 1.5rem;
  border-top: 1px solid var(--night-line);
  font-size: 0.78rem;
  color: var(--night-ink-2);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

/* -------------------------------------------------------------- motion -- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .motion .hero-figure img,
  .motion .scanline {
    animation: none;
  }
}

@media (min-width: 900px) {
  .figures-2.versus {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr);
    align-items: start;
  }
}

.objects small.shape {
  margin-left: 0.4rem;
  font-size: 0.72rem;
  color: var(--ink-2);
}

.band-maps {
  align-items: start;
}

.band-maps canvas {
  height: clamp(9rem, 16vw, 13rem);
}

.lede code {
  overflow-wrap: anywhere;
}

/* Grid items default to min-width: auto; long code or tables would widen the page. */
.section-head > *,
.cpp-grid > *,
.bench > *,
.bands > *,
.block-head > *,
.demo > * {
  min-width: 0;
}

@media (max-width: 700px) {
  .hero-figure img {
    aspect-ratio: 5 / 4;
  }
}

@media (max-width: 560px) {
  .objects .py {
    display: none;
  }

  .benchmark-table td.variant {
    min-width: 11rem;
  }
}
