:root {
  /* Brand palette (see home.css): warm grey canvas, white cards, black ink, lime accent. */
  --bg: #ececea;
  --panel: #ffffff;
  --ink: #111111;
  --muted: #5f5f5a;
  --line: #d9d9d4;
  --lime: #d9f250;
  --orange: #f28a4b;
  --allow: #3b6b00;
  --ask: #8a5f00;
  --block: #b3261e;
  --round:
    ui-rounded, 'SF Pro Rounded', 'Hiragino Maru Gothic ProN', 'Nunito', system-ui, sans-serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141a16;
    --panel: #1c241e;
    --ink: #e4ebe4;
    --muted: #9fada3;
    --line: #2f3a32;
    --allow: #7cc79f;
    --ask: #e2b33c;
    --block: #f08a80;
  }
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
}
a {
  color: var(--allow);
  text-underline-offset: 0.18em;
}
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--ask);
  outline-offset: 2px;
  border-radius: 4px;
}
.wrap {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1rem;
}
header.site {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
  font-size: 0.95rem;
}
.mark {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font: 600 1.05rem var(--round);
  color: var(--ink);
  text-decoration: none;
}
.mark svg {
  width: 28px;
  height: 28px;
}
header.site nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1.1rem;
}

/* Hero: the pitch on the left, the gate at work on the right. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  padding: 2.5rem 0 3.5rem;
}
@media (min-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    padding-top: 4rem;
  }
}
h1 {
  font: 700 clamp(2.3rem, 6vw, 3.6rem) / 1.05 var(--round);
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  max-width: 14ch;
}
.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 38ch;
  margin: 0 0 2rem;
}
.try {
  display: flex;
  align-items: stretch;
  max-width: 26rem;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel);
}
.try code {
  flex: 1;
  padding: 0.8rem 1rem;
  font: 600 1rem var(--mono);
  white-space: nowrap;
  overflow-x: auto;
}
.try button {
  border: 0;
  border-left: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  font: 600 0.95rem var(--sans);
  padding: 0 1.1rem;
  cursor: pointer;
}
.try-note {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0.75rem 0 0;
  max-width: 42ch;
}

/* The checkpoint lane: three calls from the demo, each stamped by the gate. */
.lane {
  position: relative;
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px 18px 18px 4px;
  padding: 1.25rem 1.25rem 1rem;
}
.lane-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  padding-bottom: 0.9rem;
  border-bottom: 2px dashed var(--line);
  margin-bottom: 0.4rem;
}
.call {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 1rem;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.call:last-child {
  border-bottom: 0;
}
.call .what {
  font: 600 0.9rem var(--mono);
  overflow-wrap: anywhere;
}
.call .addr {
  white-space: nowrap;
}
.call .why {
  grid-column: 1 / -1;
  font-size: 0.9rem;
  color: var(--muted);
}
.stamp {
  font: 800 0.85rem var(--round);
  padding: 0.25rem 0.7rem;
  border: 2px solid currentColor;
  background: color-mix(in srgb, currentColor 10%, transparent);
  border-radius: 999px;
  white-space: nowrap;
  transform: rotate(-4deg);
}
.stamp.allow {
  color: var(--allow);
}
.stamp.ask {
  color: var(--ask);
}
.stamp.block {
  color: var(--block);
}
@media (prefers-reduced-motion: no-preference) {
  .js .call {
    opacity: 0;
  }
  .js .call.shown {
    opacity: 1;
    transition: opacity 0.35s ease;
  }
  .js .call .stamp {
    opacity: 0;
    transform: rotate(-4deg) scale(1.6);
  }
  .js .call.stamped .stamp {
    opacity: 1;
    transform: rotate(-4deg) scale(1);
    transition:
      transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.3),
      opacity 0.15s ease;
  }
}

section {
  padding: 3rem 0;
  border-top: 1px solid var(--line);
}
h2 {
  font: 700 1.75rem/1.2 var(--round);
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}
.prose {
  max-width: 40rem;
}
.prose p {
  margin: 0 0 1rem;
}
ol.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 760px) {
  ol.steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
ol.steps li {
  counter-increment: step;
}
ol.steps li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font: 700 1rem var(--round);
  margin-bottom: 0.6rem;
}
ol.steps h3 {
  font: 700 1.1rem var(--round);
  margin: 0 0 0.35rem;
}
ol.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
}
.table-scroll {
  overflow-x: auto;
  margin-top: 1.25rem;
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 32rem;
  max-width: 52rem;
  font-size: 0.97rem;
}
th,
td {
  text-align: left;
  padding: 0.7rem 0.9rem 0.7rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-weight: 600;
  color: var(--muted);
}
td.v {
  font-weight: 700;
  white-space: nowrap;
}
td.v.allow {
  color: var(--allow);
}
td.v.ask {
  color: var(--ask);
}
td.v.block {
  color: var(--block);
}
pre {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem;
  overflow-x: auto;
  font: 0.92rem/1.55 var(--mono);
  max-width: 46rem;
}
.limits li {
  margin-bottom: 0.6rem;
}
footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 3rem;
  color: var(--muted);
  font-size: 0.92rem;
}
footer p {
  margin: 0 0 0.5rem;
}
.video {
  aspect-ratio: 16 / 9;
  width: 100%;
  max-width: 46rem;
  border: 0;
  border-radius: 12px;
}

/* Shared by every page: navigation, page headers, figures, steps with code. */
header.site nav a[aria-current='page'] {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.page-head {
  padding: 2.5rem 0 1.5rem;
}
.page-head h1 {
  max-width: 22ch;
}
figure.shot {
  margin: 1.25rem 0 0;
  max-width: 50rem;
}
figure.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
figure.shot figcaption {
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 0.5rem;
}
.quote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--line);
  background: var(--panel);
  border-radius: 0 8px 8px 0;
  max-width: 46rem;
}
.quote p {
  margin: 0;
}
.quote .who {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
ol.howto {
  padding-left: 1.25rem;
  max-width: 46rem;
}
ol.howto > li {
  margin-bottom: 1.5rem;
}
ol.howto h3 {
  font: 700 1.1rem var(--round);
  margin: 0 0 0.4rem;
}
.next {
  margin-top: 1rem;
}

/* Long addresses and hashes must wrap instead of widening the page on phones. */
p,
li,
figcaption {
  overflow-wrap: anywhere;
}

@media (max-width: 560px) {
  header.site {
    flex-wrap: wrap;
  }
  header.site nav {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Brand header: mark + wordmark. */
.mark img {
  display: block;
  height: 30px;
  width: auto;
}
.mark img.wordmark {
  height: 20px;
}
.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
@media (prefers-color-scheme: dark) {
  .mark img {
    filter: invert(1);
  }
}
