/* pixfrog site — "régie" theme, shared by every page.
   Committed to a single look (no prefers-color-scheme switch): a dark
   control-room canvas with full-width paper bands for the reading-heavy
   sections, and DM Mono for every label, figure and number. */
:root {
  /* Dark canvas */
  --bg: #0b0c0b;
  --surface: #121412;
  --fg: #edeeea;
  --fg-soft: #a9aca4;
  --fg-dim: #8e9189;
  --fg-faint: #6f726c;
  --line: rgba(237, 238, 234, 0.1);
  --line-strong: rgba(237, 238, 234, 0.22);

  /* Paper bands */
  --paper: #f2f1ec;
  --paper-alt: #e7e6e0;
  --paper-fg: #14150f;
  --paper-soft: #4a4b42;
  --paper-dim: #8b8c82;
  --paper-line: rgba(20, 21, 15, 0.14);

  /* Signal colours — green is "live", amber is "attention" */
  --green: #3fd463;
  --green-ink: #2e9e52; /* same hue, legible on paper */
  --amber: #e8b23a;
  --amber-ink: #c98a12;
  --ink: #08170d; /* text on a green fill */

  --nav-h: 62px;
  --gutter: clamp(20px, 4vw, 44px);
  --maxw: 1280px;
  --sans: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── Nav ───────────────────────────────────────────────────────── */
header.nav {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(11, 12, 11, 0.72);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  height: var(--nav-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--fg);
  justify-self: start;
}
/* The mark is a lit ring, echoing the per-channel status LEDs on the device. */
.brand .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid var(--green);
  box-shadow: 0 0 12px rgba(63, 212, 99, 0.65);
}
.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--fg-dim);
}
.nav-util {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-self: end;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--fg-dim);
}
.nav-links a:hover {
  color: var(--fg);
}
.nav-links a.active {
  color: var(--green);
}
.nav-lang {
  color: var(--fg-faint);
  white-space: nowrap;
}
.nav-lang a {
  color: var(--fg-dim);
}
.nav-lang a:hover {
  color: var(--fg);
}
.nav-util .gh {
  background: rgba(237, 238, 234, 0.08);
  padding: 9px 15px;
  border-radius: 6px;
  color: var(--fg);
}
.nav-util .gh:hover {
  background: var(--green);
  color: var(--ink);
}
/* Collapsed-nav button — only ever visible below the breakpoint. */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 38px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: rgba(237, 238, 234, 0.06);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--fg);
  transition: transform 0.18s ease, opacity 0.18s ease;
}
header.nav.is-open .nav-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
header.nav.is-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}
header.nav.is-open .nav-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}
body.docs-page .nav-toggle {
  border-color: var(--paper-line);
  background: rgba(20, 21, 15, 0.06);
}
body.docs-page .nav-toggle span {
  background: var(--paper-fg);
}

@media (max-width: 820px) {
  /* The centre group leaves the bar and drops down behind the button. It is
     absolutely positioned, so the bar keeps its --nav-h and the full-height
     hero maths stays exact. */
  .nav-inner {
    grid-template-columns: 1fr auto auto;
  }
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 0 10px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  }
  header.nav.is-open .nav-links {
    display: flex;
  }
  .nav-links a {
    padding: 13px var(--gutter);
    font-size: 15px;
  }
  .nav-links a.active {
    box-shadow: inset 3px 0 0 var(--green);
  }
  body.docs-page .nav-links {
    background: var(--paper);
    border-bottom-color: var(--paper-line);
  }
}

@media (max-width: 520px) {
  /* Brand + language + GitHub + button stops fitting; the repo link is the
     one item that is also reachable from the footer. */
  .nav-util .gh {
    display: none;
  }
}

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  padding: 15px 26px;
  border: 1px solid var(--line-strong);
  background: none;
  color: var(--fg);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover {
  border-color: var(--fg);
}
.btn.primary {
  background: var(--green);
  border-color: var(--green);
  color: var(--ink);
}
.btn.primary:hover {
  background: var(--amber);
  border-color: var(--amber);
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
esp-web-install-button {
  --esp-tools-button-color: var(--ink);
  --esp-tools-button-background-color: var(--green);
  --esp-tools-button-border-radius: 0;
}

/* ── Hero ──────────────────────────────────────────────────────── */
.hero {
  position: relative;
  /* Exactly one screen under the sticky bar when the content fits; it
     grows past that when the content does not. svh so mobile browser
     chrome cannot make it overflow. */
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: center;
  overflow: hidden;
  /* Base treatment, visible on its own when no photo is published yet. */
  background: radial-gradient(
      120% 90% at 78% 45%,
      rgba(63, 212, 99, 0.16) 0%,
      transparent 62%
    ),
    var(--bg);
}
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 56% 50%;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  /* Sideways scrim carries the headline; the top band settles the photo
     under the translucent sticky nav. */
  background: linear-gradient(
      180deg,
      rgba(11, 12, 11, 0.9) 0%,
      rgba(11, 12, 11, 0) 20%
    ),
    linear-gradient(
      90deg,
      rgba(11, 12, 11, 0.96) 0%,
      rgba(11, 12, 11, 0.85) 38%,
      rgba(11, 12, 11, 0.06) 76%
    );
}
.hero > .wrap {
  position: relative;
  width: 100%;
  padding-top: clamp(48px, 8vh, 96px);
  /* Bottom padding reserves the chevron's lane so it never sits on the copy. */
  padding-bottom: clamp(84px, 11vh, 124px);
}
.hero.has-statbar > .wrap {
  /* …and the spec strip's lane underneath it. */
  padding-bottom: clamp(140px, 18vh, 190px);
}

/* Elongated "V" inviting the first scroll. Anchored to the section, not
   the window, so it cannot collide with anything further down the page. */
.hero-chevron {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 3;
  display: block;
  padding: 12px 18px;
  color: var(--fg);
  opacity: 0.45;
  transition: opacity 0.35s ease;
}
.hero.has-statbar .hero-chevron {
  bottom: 72px;
}
.hero-chevron:hover {
  opacity: 1;
}
.hero-chevron.is-gone {
  opacity: 0;
  pointer-events: none;
}
.hero-copy {
  max-width: 800px;
}
.kicker {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 22px;
}
.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 800;
  text-wrap: balance;
}
.lead {
  margin: 0 0 32px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg-soft);
  max-width: 34rem;
}
.hint {
  margin: 20px 0 0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--fg-faint);
  max-width: 34rem;
}

/* Spec strip pinned under the hero — the numbers, read at a glance. */
.statbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  border-top: 1px solid rgba(237, 238, 234, 0.12);
  background: rgba(11, 12, 11, 0.6);
  backdrop-filter: blur(10px);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--fg-dim);
}
.statbar .wrap {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.statbar .wrap::-webkit-scrollbar {
  display: none;
}
.statbar b {
  font-weight: 500;
  color: var(--green);
}
.statbar b.amber {
  color: var(--amber);
}

/* ── Bands ─────────────────────────────────────────────────────── */
.band {
  padding: clamp(64px, 9vw, 104px) 0;
  border-top: 1px solid var(--line);
}
.band.paper {
  background: var(--paper);
  color: var(--paper-fg);
  border-top: none;
}
.band.paper .kicker,
.band.paper .sec-num {
  color: var(--green-ink);
}
.band.paper .lead,
.band.paper .sub {
  color: var(--paper-soft);
}

.sec-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.sec-num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--green);
  flex-shrink: 0;
}
.sec-head h2 {
  margin: 0;
  font-size: clamp(27px, 3vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 800;
  max-width: 860px;
  text-wrap: balance;
}
.sub {
  margin: -1.4rem 0 clamp(28px, 4vw, 44px) calc(13px + 18px);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg-soft);
  max-width: 44rem;
}

/* ── Hairline tile grid ────────────────────────────────────────── */
/* Rules are drawn per cell rather than as gaps over a coloured backdrop,
   so a row that does not fill up leaves no stray block of colour. */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.band.paper .grid {
  border-top-color: var(--paper-line);
  border-left-color: var(--paper-line);
}
.card {
  padding: clamp(20px, 2.4vw, 30px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.band.paper .card {
  border-right-color: var(--paper-line);
  border-bottom-color: var(--paper-line);
}
.card a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.band.paper .card a {
  color: var(--green-ink);
}
@media (max-width: 980px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.card .ic {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 12px;
}
.card .ic.amber {
  color: var(--amber);
}
.band.paper .card .ic {
  color: var(--green-ink);
}
.band.paper .card .ic.amber {
  color: var(--amber-ink);
}
.card h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.card p {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-dim);
}
.band.paper .card p {
  color: var(--paper-soft);
}
.card code {
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--fg-soft);
}
.band.paper .card code {
  color: var(--paper-fg);
}

/* ── Steps ─────────────────────────────────────────────────────── */
.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}
.step {
  border: 1px solid var(--paper-line);
  padding: clamp(20px, 2.4vw, 30px);
}
.band:not(.paper) .step {
  border-color: var(--line);
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--paper-dim);
  margin-bottom: 14px;
}
.step:last-child::before {
  color: var(--green-ink);
}
.step h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.step p {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--paper-soft);
}
.band:not(.paper) .step::before {
  color: var(--fg-dim);
}
.band:not(.paper) .step p {
  color: var(--fg-dim);
}

/* ── Figures ───────────────────────────────────────────────────── */
/* The media well keeps its shape even when a photo has not been
   published yet — the img hides itself on error and the hatch shows. */
.figure {
  /* figure carries a 40px UA inline margin — it would push the card out
     of its grid track. */
  margin: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.band.paper .figure {
  border-color: var(--paper-line);
  background: #0e0f0e;
}
.figure .well {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0e0f0e;
}
.figure .well img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.figure .well.contain {
  aspect-ratio: 18 / 11;
  padding: 18px;
}
.figure .well.contain img {
  object-fit: contain;
  /* The captures are dark-on-dark; a hairline keeps them off the card. */
  border: 1px solid var(--line);
}
/* Device framebuffer renders: integer-upscaled, keep the pixels crisp. */
.figure .well.pixel {
  aspect-ratio: 428 / 142;
}
.figure .well.pixel img {
  image-rendering: pixelated;
  object-fit: contain;
}
.figure figcaption {
  padding: clamp(16px, 2vw, 22px) 26px;
  color: #f2f1ec;
}
.figure figcaption b {
  display: block;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.figure figcaption p {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: #9ea098;
}
/* Two-up hardware renders: the wide shot leads, the detail sits beside it. */
.media-pair {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  /* Stretched, not start-aligned: both cards take the row height and the
     wells soak up the difference, so unequal captions cannot leave one
     card short of the other. */
}
.media-pair .well {
  aspect-ratio: auto;
  flex: 1;
  min-height: clamp(190px, 22vw, 340px);
}
@media (max-width: 860px) {
  .media-pair {
    grid-template-columns: minmax(0, 520px);
  }
}

/* Mono footnote strip closing a section. */
.metastrip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 48px;
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--fg-dim);
}
.band.paper .metastrip {
  color: var(--paper-soft);
}
.metastrip b {
  font-weight: 400;
  color: var(--green);
}
.metastrip b.amber {
  color: var(--amber);
}
.band.paper .metastrip b {
  color: var(--green-ink);
}
.band.paper .metastrip b.amber {
  color: var(--amber-ink);
}

/* Screenshot row. A figure removes itself when its shot is not published
   yet (see the img onerror), so the row must reflow rather than reserve a
   fixed slot for it. */
.media-grid {
  display: grid;
  gap: 18px;
  align-items: start;
  /* Stacked and capped by default; the cap keeps a lone survivor from
     ballooning if the others are absent. */
  grid-template-columns: minmax(0, 520px);
}
@media (min-width: 1000px) {
  /* The web UI shot is dense — it gets the wide column, the on-device
     screen and the patch page stack beside it. */
  .media-grid {
    grid-template-columns: 1.7fr 1fr;
  }
  .media-grid .figure:first-child {
    grid-row: span 2;
  }
}
/* ── Rows (troubleshooting / reference tables) ─────────────────── */
.rows {
  border: 1px solid var(--line);
}
.band.paper .rows {
  border-color: var(--paper-line);
}
.row {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  padding: 24px 26px;
  border-bottom: 1px solid var(--line);
}
.band.paper .row {
  border-bottom-color: var(--paper-line);
}
.row:last-child {
  border-bottom: none;
}
.row dt,
.row .k {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--amber);
}
.band.paper .row .k {
  color: var(--paper-fg);
}
.row p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-soft);
}
.band.paper .row p {
  color: var(--paper-soft);
}
@media (max-width: 700px) {
  .row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* ── Callout / terminal ────────────────────────────────────────── */
.callout {
  border: 1px solid rgba(63, 212, 99, 0.28);
  background: var(--surface);
  padding: clamp(22px, 3vw, 32px);
  font-size: 15px;
  line-height: 1.7;
  color: var(--fg-soft);
}
.band.paper .callout {
  background: var(--paper-fg);
  border-color: var(--paper-fg);
  color: #c9cbc3;
}
.callout strong {
  color: var(--fg);
}
.callout code,
.term code {
  font-family: var(--mono);
  color: var(--green);
}
.band.paper .callout code {
  color: var(--green);
}
.callout a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.term {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 2.1;
  color: #c9cbc3;
}
.term .muted {
  color: var(--fg-dim);
}
.term .ok {
  color: var(--green);
}
.term .wait {
  color: var(--amber);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}
.panel {
  background: var(--surface);
  border: 1px solid rgba(63, 212, 99, 0.28);
  padding: clamp(28px, 5vw, 56px) var(--gutter);
}
.panel h2 {
  margin: 0 0 14px;
  font-size: clamp(26px, 2.7vw, 38px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 800;
  text-wrap: balance;
}
.panel p {
  margin: 0 0 26px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--fg-soft);
}

/* ── Footer ────────────────────────────────────────────────────── */
@keyframes pf-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}
footer {
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--fg-dim);
}
.foot-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 22px;
  flex-wrap: wrap;
  padding: 28px 0;
}
.foot-inner a:hover {
  color: var(--fg);
}
.foot-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.foot-mark {
  display: flex;
  align-items: center;
  gap: 8px;
}
.foot-mark .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pf-pulse 3s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .foot-mark .dot {
    animation: none;
  }
}

/* ── Docs ──────────────────────────────────────────────────────── */
/* The documentation viewer is a paper page end to end: it is the one
   place on the site meant to be read for minutes rather than scanned. */
body.docs-page {
  background: var(--paper);
  color: var(--paper-fg);
}
body.docs-page header.nav {
  background: rgba(242, 241, 236, 0.86);
  border-bottom-color: var(--paper-line);
}
body.docs-page .brand {
  color: var(--paper-fg);
}
body.docs-page .brand .dot {
  border-color: var(--green-ink);
  box-shadow: none;
}
body.docs-page .nav-links {
  color: var(--paper-soft);
}
body.docs-page .nav-links a:hover {
  color: var(--paper-fg);
}
body.docs-page .nav-links a.active {
  color: var(--green-ink);
}
body.docs-page .nav-lang {
  color: var(--paper-dim);
}
body.docs-page .nav-lang a {
  color: var(--paper-soft);
}
body.docs-page .nav-util .gh {
  background: var(--paper-fg);
  color: var(--paper);
  border-radius: 0;
}
body.docs-page .nav-util .gh:hover {
  background: var(--green-ink);
  color: var(--ink);
}
body.docs-page footer {
  border-top-color: var(--paper-line);
  color: var(--paper-soft);
}
body.docs-page .foot-mark .dot {
  background: var(--green-ink);
  animation: none;
}
body.docs-page .foot-inner a:hover {
  color: var(--paper-fg);
}

.docs-head {
  padding: clamp(48px, 7vw, 72px) 0 clamp(36px, 5vw, 56px);
  border-bottom: 1px solid var(--paper-line);
}
.docs-head .kicker {
  color: var(--green-ink);
}
.docs-head h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 800;
  max-width: 820px;
  text-wrap: balance;
}
.docs-head p {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--paper-soft);
  max-width: 40rem;
}

.docs {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  padding: clamp(32px, 4vw, 48px) var(--gutter) clamp(56px, 7vw, 80px);
  max-width: var(--maxw);
  margin: 0 auto;
}
.sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  align-self: start;
  font-family: var(--mono);
  font-size: 13px;
}
.sidebar h4 {
  margin: 1.6rem 0 0.6rem;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-dim);
}
.sidebar h4:first-child {
  margin-top: 0;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
}
.sidebar a {
  display: block;
  padding: 7px 0 7px 12px;
  border-left: 1px solid var(--paper-line);
  color: var(--paper-soft);
}
.sidebar a:hover {
  color: var(--green-ink);
}
.sidebar a.active {
  color: var(--green-ink);
  border-left-color: var(--green-ink);
}
.toc a.lvl3 {
  padding-left: 26px;
  font-size: 12px;
}

/* Markdown prose — rendered from docs/*.md, styling only. */
.prose {
  min-width: 0;
  font-size: 16px;
  line-height: 1.75;
  color: var(--paper-fg);
  /* Docs prose carries long identifiers and paths; let them break rather
     than push the page sideways. Blocks and tables scroll instead. */
  overflow-wrap: break-word;
}
.prose :not(pre) > code {
  overflow-wrap: anywhere;
}
.prose > *:first-child {
  margin-top: 0;
}
.prose h1 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0 0 1rem;
}
.prose h2 {
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 2.8rem 0 0.9rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--paper-line);
  scroll-margin-top: calc(var(--nav-h) + 24px);
}
.prose h3 {
  font-size: 19px;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 2rem 0 0.6rem;
  scroll-margin-top: calc(var(--nav-h) + 24px);
}
.prose p,
.prose li {
  color: var(--paper-soft);
}
.prose strong {
  color: var(--paper-fg);
}
.prose a {
  color: var(--green-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.prose code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(20, 21, 15, 0.06);
  border: 1px solid var(--paper-line);
  color: var(--paper-fg);
  padding: 0.1rem 0.35rem;
}
.prose pre {
  font-family: var(--mono);
  background: var(--paper-alt);
  border: 1px solid var(--paper-line);
  padding: 1.1rem 1.2rem;
  overflow-x: auto;
  line-height: 1.6;
  font-size: 13px;
}
.prose pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}
.prose table {
  border-collapse: collapse;
  width: 100%;
  display: block;
  overflow-x: auto;
  margin: 1.4rem 0;
  font-size: 14px;
}
.prose th,
.prose td {
  border: 1px solid var(--paper-line);
  padding: 0.55rem 0.8rem;
  text-align: left;
}
.prose th {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--paper-dim);
  background: var(--paper-alt);
}
.prose blockquote {
  margin: 1.4rem 0;
  padding: 0.2rem 0 0.2rem 1.1rem;
  border-left: 2px solid var(--green-ink);
  color: var(--paper-soft);
}
.prose img {
  display: block;
  max-width: 100%;
  border: 1px solid var(--paper-line);
  margin: 1.4rem 0;
}
.prose hr {
  border: none;
  border-top: 1px solid var(--paper-line);
  margin: 2.4rem 0;
}
@media (max-width: 860px) {
  .docs {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
  }
}

/* ── About: the collective's animated mark ─────────────────────── */
.logo-hero {
  display: grid;
  place-items: center;
  padding: clamp(40px, 6vw, 72px);
  border: 1px solid var(--line);
  background: radial-gradient(
    110% 90% at 50% 40%,
    rgba(63, 212, 99, 0.12) 0%,
    transparent 62%
  );
}
.logo-hero img {
  width: min(100%, 340px);
  height: auto;
  display: block;
}

/* ── Hero variants ─────────────────────────────────────────────── */
/* Two-column heroes give the headline half the width, so it steps down
   a size from the full-bleed landing hero. */
.hero .split {
  align-items: center;
}
.hero .split h1 {
  font-size: clamp(34px, 4.4vw, 58px);
}

/* Neutral surface block — the terminal transcripts sit in one. */
.slab {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: clamp(22px, 3vw, 30px) 26px;
}
.hint a {
  color: var(--green);
}
