/*
 * evermesh.org — "signal on carbon", composed as a broadcast monitor.
 *
 * Everything colour/type/shape comes from assets/tokens.css (the reference
 * look, spec 009 §7). This file only lays things out. Dark is the default
 * on a dark OS; both themes are AA-checked in assets/README.md.
 *
 * Layout idea: this is a video protocol's site, so the page borrows from
 * the vocabulary of video engineering rather than generic SaaS cards —
 * a vectorscope graticule fading behind the hero telemetry, a filmstrip
 * with sprocket holes for the "survival test" (things that die on film,
 * not in a bordered box), a signal chain with hop arrows for "how it
 * works", a staircase of rungs for the participation ladder, a monitor
 * panel with a title bar for the status tables, and a leader-dotted index
 * for the spec list. Repetition is in the *system* (mono tags, hairlines,
 * corner brackets) rather than in one card component copy-pasted six
 * times. Motion is limited to one thing — a signal travelling along the
 * hero's edges — and it stops entirely under prefers-reduced-motion.
 */

@import url("assets/fonts/fonts.css");
@import url("assets/tokens.css");

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bo-bg);
  color: var(--bo-fg);
  font-family: var(--bo-font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--bo-link);
  text-decoration-color: color-mix(in srgb, var(--bo-link) 40%, transparent);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--bo-link-hover);
  text-decoration-color: currentColor;
}

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

code,
kbd,
.mono {
  font-family: var(--bo-font-mono);
  font-size: 0.88em;
}

h1,
h2,
h3 {
  font-family: var(--bo-font-display);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.wrap {
  width: min(1180px, 100% - 48px);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--bo-signal);
  color: var(--bo-bg);
  padding: 12px 18px;
  font-weight: 600;
  border-radius: 0 0 var(--bo-radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

/* ------------------------------------------------------- corner brackets
   A reusable "monitor frame" mark: four L-shaped ticks at the corners of
   an element, built from eight small gradients rather than an image or
   extra markup. Used sparingly — the hero telemetry panel and the
   architecture diagram — so it reads as a system, not a texture. */

.corner-frame {
  position: relative;
  --site-tick: 20px;
  --site-tickw: 2px;
  background-image:
    linear-gradient(var(--bo-border-strong), var(--bo-border-strong)),
    linear-gradient(var(--bo-border-strong), var(--bo-border-strong)),
    linear-gradient(var(--bo-border-strong), var(--bo-border-strong)),
    linear-gradient(var(--bo-border-strong), var(--bo-border-strong)),
    linear-gradient(var(--bo-border-strong), var(--bo-border-strong)),
    linear-gradient(var(--bo-border-strong), var(--bo-border-strong)),
    linear-gradient(var(--bo-border-strong), var(--bo-border-strong)),
    linear-gradient(var(--bo-border-strong), var(--bo-border-strong));
  background-repeat: no-repeat;
  background-size:
    var(--site-tickw) var(--site-tick), var(--site-tick) var(--site-tickw),
    var(--site-tickw) var(--site-tick), var(--site-tick) var(--site-tickw),
    var(--site-tickw) var(--site-tick), var(--site-tick) var(--site-tickw),
    var(--site-tickw) var(--site-tick), var(--site-tick) var(--site-tickw);
  background-position:
    top left, top left,
    top right, top right,
    bottom left, bottom left,
    bottom right, bottom right;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bo-bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--bo-border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}

.brand img {
  display: block;
  height: 26px;
  width: auto;
}

.site-header nav {
  margin-left: auto;
}

.site-header nav ul {
  display: flex;
  align-items: center;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header nav a {
  color: var(--bo-muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

.site-header nav a:hover {
  color: var(--bo-fg);
}

.site-header nav a.nav-cta {
  color: var(--bo-fg);
  border: 1px solid var(--bo-border-strong);
  border-radius: var(--bo-radius-pill);
  padding: 7px 15px;
}

.site-header nav a.nav-cta:hover {
  border-color: var(--bo-signal);
}

@media (max-width: 900px) {
  .site-header nav ul li:not(:last-child) {
    display: none;
  }
}

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

.hero {
  position: relative;
  padding: 76px 0 68px;
  overflow: hidden;
  border-bottom: 1px solid var(--bo-border);
}

/* a vectorscope graticule fading toward the telemetry panel — texture,
   not decoration for its own sake; asymmetric so it reads as a readout
   in a corner rather than a wallpaper pattern. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(var(--bo-border) 1px, transparent 1.4px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 55% 60% at 82% 30%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 55% 60% at 82% 30%, #000 0%, transparent 72%);
  pointer-events: none;
}

.hero-lattice {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero-lattice .edge {
  stroke: var(--bo-border);
  stroke-width: 1.5;
  fill: none;
}

.hero-lattice .node {
  fill: var(--bo-border-strong);
}

/* the one piece of motion on the page: a packet crossing the mesh */
.hero-lattice .signal {
  fill: var(--bo-signal);
  opacity: 0;
  animation: vm-travel 9s linear infinite;
}

.hero-lattice .signal.b {
  animation-delay: 3s;
}

.hero-lattice .signal.c {
  animation-delay: 6s;
}

@keyframes vm-travel {
  0% {
    opacity: 0;
    offset-distance: 0%;
  }
  6% {
    opacity: 1;
  }
  60% {
    opacity: 1;
  }
  70%,
  100% {
    opacity: 0;
    offset-distance: 100%;
  }
}

.hero .wrap {
  position: relative;
  z-index: 2;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 20px 56px;
  align-items: start;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--bo-font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bo-muted);
  border: 1px solid var(--bo-border);
  border-radius: var(--bo-radius-pill);
  padding: 6px 14px;
  background: var(--bo-surface);
  margin: 0;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bo-signal);
  flex: none;
}

.hero h1 {
  font-size: clamp(38px, 5.4vw, 64px);
  margin: 26px 0 0;
  max-width: 15ch;
  font-weight: 800;
}

.hero h1 em {
  font-style: normal;
  color: var(--bo-signal);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 3px;
  background-repeat: no-repeat;
  background-position: 0 96%;
}

.hero-sub {
  margin: 26px 0 0;
  max-width: 60ch;
  font-size: 19px;
  color: var(--bo-muted);
}

.hero-sub strong {
  color: var(--bo-fg);
  font-weight: 600;
}

.hero-sub em.hero-and {
  font-style: normal;
  color: var(--bo-signal);
  font-weight: 700;
}

/* a small chip row naming the two media kinds and the two clients —
   a fact list, styled like the eyebrow pill rather than a feature-icon
   row, so it reads as one more instrument reading, not a marketing grid */
.hero-kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.hero-kinds li {
  font-family: var(--bo-font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--bo-muted);
  border: 1px solid var(--bo-border);
  border-radius: var(--bo-radius-pill);
  padding: 5px 12px;
  background: var(--bo-surface);
}

.hero-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
}

.pill a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 2px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: var(--bo-radius-sm);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.15s, border-color 0.15s, color 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
}

/* --bo-bg is the right label colour in both themes: paper on the deep
   signal (5.2:1) in light, carbon on acid lime (12.5:1) in dark. */
.btn-primary {
  background: var(--bo-signal);
  color: var(--bo-bg);
}

.btn-primary:hover {
  background: var(--bo-brand-600);
}

/* On carbon the signal is already the bright end of the ramp, so hover
   goes brighter rather than deeper. */
@media (prefers-color-scheme: dark) {
  :root:not(.light) .btn-primary:hover {
    background: var(--bo-brand-300);
  }
}

:root.dark .btn-primary:hover {
  background: var(--bo-brand-300);
}

.btn-secondary {
  border-color: var(--bo-border-strong);
  color: var(--bo-fg);
  background: var(--bo-surface);
}

.btn-secondary:hover {
  border-color: var(--bo-signal);
  color: var(--bo-fg);
}

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

.hero-telemetry {
  padding: 26px 28px 24px;
  /* background-color, not the `background` shorthand: the shorthand
     resets background-image, which would erase .corner-frame's ticks */
  background-color: color-mix(in srgb, var(--bo-surface) 88%, transparent);
}

.telemetry-head {
  margin: 0 0 16px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  /* --bo-faint fails 4.5:1 at this size against --bo-bg (4.33:1); --bo-muted
     clears it in both themes without changing the token system. */
  color: var(--bo-muted);
}

.telemetry-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 18px;
  margin: 0;
}

.telemetry-list dt {
  font-size: 11.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  /* --bo-faint fails 4.5:1 at this size (4.33:1 against --bo-bg) */
  color: var(--bo-muted);
  font-family: var(--bo-font-mono);
}

.telemetry-list dd {
  margin: 8px 0 0;
  font-family: var(--bo-font-display);
  font-weight: 700;
  font-size: 25px;
  letter-spacing: -0.03em;
}

.telemetry-list dd span {
  font-size: 13px;
  color: var(--bo-faint);
  font-family: var(--bo-font-mono);
  font-weight: 400;
  letter-spacing: 0;
}

.telemetry-foot {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--bo-border);
  font-size: 12.5px;
  color: var(--bo-signal);
}

@media (max-width: 500px) {
  .telemetry-list {
    grid-template-columns: 1fr 1fr;
  }
}

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

.section {
  padding: 84px 0;
  border-bottom: 1px solid var(--bo-border);
}

.section-head {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 900px) {
  .section-head {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.section-head h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  margin: 0;
}

/* the "slate" tag: a timecode-style label with a trailing rule, echoed at
   the top of every section so the numbering reads as one running system */
.section-num {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--bo-font-mono);
  font-size: 12.5px;
  color: var(--bo-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
  white-space: nowrap;
}

.section-num::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--bo-border);
  min-width: 12px;
}

.lede {
  margin: 0;
  color: var(--bo-muted);
  font-size: 18px;
  max-width: 62ch;
}

.lede + .lede {
  margin-top: 14px;
}

.section-body {
  margin-top: 44px;
}

/* --------------------------------------------------------- survival test
   Framed as a filmstrip: sprocket-hole strips top and bottom, dashed tear
   lines between frames instead of bordered cards, and the "cause of
   death" set as literal struck-through type rather than a decorative
   rule. */

.filmstrip {
  border-top: 1px solid var(--bo-border);
  border-bottom: 1px solid var(--bo-border);
}

.sprocket {
  height: 13px;
  background-image: radial-gradient(circle, var(--bo-border-strong) 2.2px, transparent 2.4px);
  background-size: 24px 100%;
  background-position: 12px center;
  background-repeat: repeat-x;
}

.filmstrip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

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

.reel {
  padding: 30px 28px;
  border-left: 1px dashed var(--bo-border-strong);
}

.filmstrip-grid > .reel:first-child {
  border-left: 0;
}

@media (max-width: 900px) {
  .reel {
    border-left: 0;
    border-top: 1px dashed var(--bo-border-strong);
  }
  .filmstrip-grid > .reel:first-child {
    border-top: 0;
  }
}

.reel h3 {
  margin: 0 0 14px;
  font-size: 20px;
}

.reel .strike {
  display: block;
  font-family: var(--bo-font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bo-live);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--bo-live);
  margin: 0 0 14px;
}

.reel p {
  margin: 0 0 18px;
  color: var(--bo-muted);
  font-size: 15.5px;
}

.reel .survives {
  border-top: 1px solid var(--bo-border);
  padding-top: 16px;
  margin: 0;
  color: var(--bo-fg);
  font-size: 15.5px;
}

.reel .survives b {
  display: block;
  font-family: var(--bo-font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bo-signal);
  margin-bottom: 8px;
  font-weight: 500;
}

.pull {
  margin: 44px 0 0;
  border-left: 3px solid var(--bo-signal);
  padding: 6px 0 6px 24px;
  font-family: var(--bo-font-display);
  font-weight: 700;
  font-size: clamp(20px, 2.6vw, 27px);
  letter-spacing: -0.03em;
  max-width: 42ch;
  line-height: 1.25;
}

/* ---------------------------------------------------------- how it works
   A signal chain rather than three identical cards: stages connected by
   a hop arrow, each stage marked only by a hairline top rule. */

.chain {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: start;
  gap: 0 22px;
}

@media (max-width: 900px) {
  .chain {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.stage {
  border-top: 2px solid var(--bo-border-strong);
  padding-top: 20px;
}

@media (max-width: 900px) {
  .stage {
    padding: 26px 0;
  }
  .stage:first-child {
    padding-top: 0;
  }
}

.chain-hop {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--bo-faint);
  font-family: var(--bo-font-mono);
  font-size: 20px;
  padding-top: 14px;
}

.chain-hop::before {
  content: "→";
}

@media (max-width: 900px) {
  .chain-hop {
    justify-content: flex-start;
    padding: 0 0 0 2px;
    height: auto;
  }
  .chain-hop::before {
    content: "↓";
  }
}

.stage .tag {
  font-family: var(--bo-font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bo-faint);
  margin: 0;
}

.stage h3 {
  margin: 10px 0 8px;
  font-size: 21px;
}

.stage p.body {
  margin: 0;
  color: var(--bo-muted);
  font-size: 15.5px;
}

.stage ul {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--bo-muted);
  font-size: 15px;
}

.stage li {
  margin-bottom: 4px;
}

.stage li::marker {
  color: var(--bo-signal);
}

.diagram {
  margin-top: 40px;
  /* background-color, not the shorthand: see .hero-telemetry above */
  background-color: var(--bo-surface);
  padding: 22px;
}

.diagram img {
  display: block;
  width: 100%;
  border-radius: var(--bo-radius-sm);
}

/* ------------------------------------------------------------- staircase
   Three rungs, each indented a little further than the last so the list
   itself climbs — a literal staircase rather than a boxed row list. */

.staircase {
  list-style: none;
  margin: 0;
  padding: 0;
}

.step {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 20px 24px;
  padding: 26px 0;
  border-top: 1px solid var(--bo-border);
  align-items: start;
}

.step:first-child {
  border-top: 0;
}

.step:nth-child(2) {
  padding-left: 24px;
}

.step:nth-child(3) {
  padding-left: 48px;
}

@media (max-width: 720px) {
  .step:nth-child(2),
  .step:nth-child(3) {
    padding-left: 0;
  }
  .step {
    grid-template-columns: 40px 1fr;
  }
}

.step-num {
  font-family: var(--bo-font-display);
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -0.02em;
  color: var(--bo-border-strong);
  line-height: 1.15;
}

.step-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.step-head h3 {
  margin: 0;
  font-size: 22px;
}

.step .runs {
  font-family: var(--bo-font-mono);
  font-size: 12.5px;
  color: var(--bo-faint);
}

.step p {
  margin: 0;
  color: var(--bo-muted);
  font-size: 16px;
  max-width: 68ch;
}

.roles-note {
  margin-top: 28px;
}

/* ----------------------------------------------------------------- status
   A "monitor" panel — title bar + table — rather than a plain bordered
   box, so the status readout reads as instrumentation. */

.status-note {
  border: 1px solid var(--bo-border-strong);
  border-left: 3px solid var(--bo-live);
  border-radius: var(--bo-radius-sm);
  background: var(--bo-surface);
  padding: 18px 22px;
  margin: 0 0 28px;
  font-size: 16px;
  max-width: 80ch;
}

.monitor {
  border: 1px solid var(--bo-border);
  border-radius: var(--bo-radius);
  overflow: hidden;
}

.monitor + .monitor {
  margin-top: 40px;
}

.monitor-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--bo-surface);
  border-bottom: 1px solid var(--bo-border);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  /* --bo-faint fails 4.5:1 against --bo-surface at this size (3.99:1) */
  color: var(--bo-muted);
}

.monitor-bar::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bo-signal);
  flex: none;
}

.table-scroll {
  overflow-x: auto;
}

table.status {
  border-collapse: collapse;
  width: 100%;
  font-size: 15.5px;
  min-width: 660px;
}

table.status th,
table.status td {
  text-align: left;
  padding: 14px 20px;
  border-bottom: 1px solid var(--bo-border);
  vertical-align: top;
}

table.status thead th {
  font-family: var(--bo-font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bo-faint);
  font-weight: 500;
}

table.status tbody tr:last-child td {
  border-bottom: 0;
}

table.status td.path {
  font-family: var(--bo-font-mono);
  font-size: 13.5px;
  white-space: nowrap;
}

table.status td.num,
table.status th.num {
  font-family: var(--bo-font-mono);
  text-align: right;
}

.pill {
  display: inline-block;
  font-family: var(--bo-font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--bo-radius-sm);
  border: 1px solid var(--bo-border-strong);
  color: var(--bo-muted);
  white-space: nowrap;
}

.pill-built {
  color: var(--bo-signal);
  border-color: color-mix(in srgb, var(--bo-signal) 55%, var(--bo-border));
  background: color-mix(in srgb, var(--bo-signal) 10%, transparent);
}

.pill-spec {
  color: var(--bo-verified);
  border-color: color-mix(in srgb, var(--bo-verified) 55%, var(--bo-border));
  background: color-mix(in srgb, var(--bo-verified) 10%, transparent);
}

.pill-none {
  color: var(--bo-live);
  border-color: color-mix(in srgb, var(--bo-live) 55%, var(--bo-border));
  background: color-mix(in srgb, var(--bo-live) 8%, transparent);
}

.subhead {
  font-family: var(--bo-font-display);
  font-weight: 700;
  font-size: 21px;
  margin: 40px 0 14px;
  letter-spacing: -0.02em;
}

/* -------------------------------------------------------------- spec list
   An index with leader dots, like a book's table of contents, instead of
   another bordered card list. */

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

.index-list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--bo-border);
}

.index-list a {
  font-family: var(--bo-font-mono);
  font-size: 14px;
  text-decoration: none;
  flex: none;
}

.index-leader {
  flex: 1;
  min-width: 16px;
  border-bottom: 1px dotted var(--bo-border-strong);
  margin-bottom: 5px;
}

.index-desc {
  color: var(--bo-muted);
  font-size: 15px;
  flex: none;
  max-width: 44ch;
  text-align: right;
}

@media (max-width: 680px) {
  .index-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .index-leader {
    display: none;
  }
  .index-desc {
    text-align: left;
    max-width: none;
  }
}

/* -------------------------------------------------------------------- faq
   Native <details>/<summary>: collapsed by default, keyboard operable
   with zero JS, and it stops the page from being one long wall of
   always-open text. */

.faq-list {
  border-top: 1px solid var(--bo-border);
}

.faq-item {
  border-bottom: 1px solid var(--bo-border);
  padding: 20px 0;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-family: var(--bo-font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::before {
  content: "+";
  flex: none;
  width: 18px;
  font-family: var(--bo-font-mono);
  font-weight: 400;
  font-size: 18px;
  color: var(--bo-signal);
}

.faq-item[open] summary::before {
  content: "\2212";
}

.faq-item summary:hover {
  color: var(--bo-muted);
}

.faq-body {
  margin: 16px 0 0 34px;
  color: var(--bo-muted);
  font-size: 16px;
  max-width: 70ch;
}

.faq-body strong {
  color: var(--bo-fg);
}

.faq-body p {
  margin: 0 0 12px;
}

.faq-body p:last-child {
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .faq-body {
    margin-left: 0;
  }
}

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

.site-footer {
  padding: 56px 0 72px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 48px;
}

@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.footer-inner img {
  height: 24px;
  width: auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  font-size: 15px;
}

.footer-note {
  margin: 0;
  color: var(--bo-faint);
  font-size: 14.5px;
  max-width: 72ch;
}

.footer-note + .footer-note {
  margin-top: 10px;
}

/* ----------------------------------------------------------- docs viewer */

.docs-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: start;
  padding: 40px 0 88px;
}

@media (max-width: 940px) {
  .docs-shell {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.docs-nav {
  position: sticky;
  top: 92px;
  border: 1px solid var(--bo-border);
  border-radius: var(--bo-radius);
  padding: 8px 14px 16px;
  background: var(--bo-surface);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

@media (max-width: 940px) {
  .docs-nav {
    position: static;
    max-height: none;
  }
}

.docs-nav .group {
  font-family: var(--bo-font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  /* --bo-faint fails 4.5:1 against --bo-surface at this size (3.99:1) */
  color: var(--bo-muted);
  padding: 16px 10px 6px;
  margin: 0;
}

.docs-nav a {
  display: block;
  padding: 7px 11px;
  border-radius: var(--bo-radius-sm);
  color: var(--bo-muted);
  font-size: 15px;
  text-decoration: none;
  border-left: 2px solid transparent;
}

.docs-nav a:hover {
  background: var(--bo-surface-2);
  color: var(--bo-fg);
}

.docs-nav a.active {
  background: color-mix(in srgb, var(--bo-signal) 14%, transparent);
  color: var(--bo-fg);
  font-weight: 600;
  border-left-color: var(--bo-signal);
}

.docs-main {
  min-width: 0;
}

.docs-crumb {
  font-family: var(--bo-font-mono);
  font-size: 12px;
  color: var(--bo-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.markdown {
  font-size: 16.5px;
  max-width: 72ch;
}

.markdown > *:first-child {
  margin-top: 0;
}

.markdown h1 {
  font-size: clamp(30px, 4vw, 40px);
  margin: 0.2em 0 0.5em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--bo-border);
}

.markdown h2 {
  font-size: 26px;
  margin: 1.7em 0 0.6em;
  padding-bottom: 0.25em;
  border-bottom: 1px solid var(--bo-border);
  scroll-margin-top: 92px;
}

.markdown h3 {
  font-size: 20px;
  margin: 1.5em 0 0.5em;
  scroll-margin-top: 92px;
}

.markdown h4 {
  font-family: var(--bo-font-mono);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bo-muted);
  margin: 1.4em 0 0.5em;
}

.markdown p,
.markdown li {
  color: color-mix(in srgb, var(--bo-fg) 88%, var(--bo-muted));
  overflow-wrap: break-word;
}

.markdown code {
  background: var(--bo-surface-2);
  border-radius: 5px;
  padding: 2px 6px;
  overflow-wrap: anywhere;
}

.markdown pre {
  background: var(--bo-surface);
  border: 1px solid var(--bo-border);
  border-radius: var(--bo-radius-sm);
  padding: 16px 18px;
  overflow: auto;
  max-width: 100%;
}

.markdown pre code {
  background: none;
  padding: 0;
  font-size: 13.5px;
  line-height: 1.7;
  overflow-wrap: normal;
  white-space: pre;
}

.markdown blockquote {
  margin: 1.2em 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--bo-signal);
  color: var(--bo-muted);
}

.markdown .table-scroll {
  margin: 1.4em 0;
  border: 1px solid var(--bo-border);
  border-radius: var(--bo-radius-sm);
}

.markdown table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14.5px;
}

.markdown th,
.markdown td {
  border-bottom: 1px solid var(--bo-border);
  border-right: 1px solid var(--bo-border);
  padding: 9px 13px;
  text-align: left;
}

.markdown th:last-child,
.markdown td:last-child {
  border-right: 0;
}

.markdown tr:last-child td {
  border-bottom: 0;
}

.markdown th {
  background: var(--bo-surface);
  font-weight: 600;
}

.markdown hr {
  border: 0;
  border-top: 1px solid var(--bo-border);
  margin: 2.2em 0;
}

/* on-page table of contents, built from the current document's own
   headings (docs.html script) — collapsed behind <details> when a doc
   has enough headings to need it */
.docs-toc {
  margin: 0 0 2em;
  padding: 14px 18px;
  border: 1px solid var(--bo-border);
  border-radius: var(--bo-radius-sm);
  background: var(--bo-surface);
}

.docs-toc summary {
  cursor: pointer;
  font-family: var(--bo-font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  /* --bo-faint fails 4.5:1 against --bo-surface at this size (3.99:1) */
  color: var(--bo-muted);
  list-style: none;
}

.docs-toc summary::-webkit-details-marker {
  display: none;
}

.docs-toc[open] summary {
  margin-bottom: 12px;
}

.docs-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 24px;
}

@media (max-width: 640px) {
  .docs-toc ol {
    columns: 1;
  }
}

.docs-toc li {
  break-inside: avoid;
  font-size: 14px;
  margin-bottom: 6px;
}

.docs-toc a {
  text-decoration: none;
  color: var(--bo-muted);
}

.docs-toc a:hover {
  color: var(--bo-link);
}

.docs-toc .toc-sub {
  margin-left: 16px;
  color: var(--bo-faint);
}

.docs-error {
  border: 1px solid color-mix(in srgb, var(--bo-live) 45%, var(--bo-border));
  background: color-mix(in srgb, var(--bo-live) 8%, transparent);
  border-radius: var(--bo-radius-sm);
  padding: 16px 18px;
}

.docs-license {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--bo-border);
  color: var(--bo-faint);
  font-size: 14px;
  max-width: 80ch;
}

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

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

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

  .hero-lattice .signal {
    display: none;
  }
}
