/*
  Orkestra site — visual system taken from the Glif reference
  (https://glif.framer.website/). Values below are measured from the
  reference: tokens, type scale, frame grid, buttons, cells.
  Breakpoints follow the reference: desktop >= 1200, tablet 810–1199,
  phone <= 809.
*/

/* ---------- Fonts (SIL OFL 1.1, see assets/fonts/FONTS.md) ---------- */
@font-face {
  font-family: "Apfel Grotezk";
  src: url("../fonts/apfel-grotezk-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Apfel Grotezk";
  src: url("../fonts/apfel-grotezk-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fragment Mono";
  src: url("../fonts/fragment-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* color */
  --c-bg: #fff;
  --c-surface: #f5f5f5;
  --c-black: #000;
  --c-ink: #0d0d0d;
  --c-ink-2: #1c1c1c;
  --c-text: #000;
  --c-text-80: rgba(0, 0, 0, 0.8);
  --c-text-muted: rgba(0, 0, 0, 0.6);
  --c-line: rgba(0, 0, 0, 0.1);
  --c-line-soft: rgba(0, 0, 0, 0.05);
  --c-accent: #47a7eb;
  --c-accent-13: rgba(70, 166, 235, 0.13);
  --c-dark: #000;
  --c-dark-card: #050505;
  --c-dark-raised: rgba(255, 255, 255, 0.1);
  --c-on-dark: #fff;
  --c-on-dark-80: rgba(255, 255, 255, 0.8);
  --c-on-dark-50: rgba(255, 255, 255, 0.5);
  --c-line-dark: rgba(255, 255, 255, 0.1);
  --c-fade-dark: rgba(255, 255, 255, 0.05);

  /* type */
  --font-sans: "Apfel Grotezk", "Apfel Grotezk Placeholder", sans-serif;
  --font-mono: "Fragment Mono", ui-monospace, monospace;

  /* shadow */
  --shadow-dark-btn: rgba(0, 0, 0, 0.15) 0 2px 5px 0, rgba(0, 0, 0, 0.13) 0 9px 9px 0,
    rgba(0, 0, 0, 0.08) 0 21px 13px 0, rgba(0, 0, 0, 0.02) 0 37px 15px 0, rgba(0, 0, 0, 0) 0 58px 16px 0;
  --shadow-light-btn: rgb(255, 255, 255) 0 0.5px 0.5px 0 inset;
  --shadow-soft-card: rgba(0, 0, 0, 0.02) 0 6px 12px 0, rgba(0, 0, 0, 0.02) 0 22px 22px 0,
    rgba(0, 0, 0, 0.01) 0 50px 30px 0;

  /* layout */
  --frame: 1280px;
  --gutter: 40px;
  --nav-h: 76px;
  --pad-y: 80px;
  --pad-x: 40px;
  --card-pad: 48px;

  /* type scale (desktop) */
  --fs-display: 64px;
  --lh-display: 64px;
  --ls-display: -0.04em;
  --fs-h2: 48px;
  --lh-h2: 52.8px;
  --ls-h2: -0.02em;
  --fs-h4: 24px;
  --lh-h4: 33.6px;
  --fs-sub: 20px;
  --lh-sub: 28px;
}

@media (max-width: 809px) {
  :root {
    --gutter: 16px;
    --nav-h: 72px;
    --pad-y: 40px;
    --pad-x: 16px;
    --card-pad: 24px;
    --fs-display: 40px;
    --lh-display: 40px;
    --fs-h2: 32px;
    --lh-h2: 35.2px;
    --fs-h4: 20px;
    --lh-h4: 28px;
  }
}

/* ---------- Base ---------- */
[hidden] {
  display: none !important;
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-weight: 400;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg,
video,
canvas {
  display: block;
}

button,
input {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

[id] {
  scroll-margin-top: var(--nav-h);
}

:focus-visible {
  outline: 2px solid var(--c-black);
  outline-offset: 2px;
}

.on-dark :focus-visible {
  outline-color: var(--c-on-dark);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 20px;
  border-radius: 100px;
  background: var(--c-black);
  color: var(--c-on-dark);
  font-size: 14px;
}

.skip-link:focus {
  top: 16px;
}

/* ---------- Frame grid ----------
   Full-bleed bands carry the horizontal hairlines; the centered frame
   carries the two vertical hairlines that run the length of the page. */
.band {
  position: relative;
  border-bottom: 1px solid var(--c-line);
}

.frame {
  position: relative;
  width: min(var(--frame), 100% - 2 * var(--gutter));
  margin-inline: auto;
  border-inline: 1px solid var(--c-line);
}

.band--dark {
  background: var(--c-dark);
  color: var(--c-on-dark);
  border-bottom-color: var(--c-line-dark);
}

.band--dark .frame {
  border-inline-color: var(--c-line-dark);
}

.band--flush {
  border-bottom: 0;
}

.spacer {
  height: 80px;
}

@media (max-width: 809px) {
  .spacer {
    height: 32px;
  }
}

/* Line stamps: short black ticks where hairlines meet (reference detail). */
.stamp {
  position: absolute;
  z-index: 3;
  background: var(--c-black);
  pointer-events: none;
}

.stamp--v {
  width: 1px;
  height: 16px;
}

.stamp--h {
  width: 16px;
  height: 1px;
}

.band--dark .stamp {
  background: var(--c-on-dark);
}

/* ---------- Typography ---------- */
.display {
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  color: var(--c-ink);
  font-weight: 400;
}

.h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  letter-spacing: var(--ls-h2);
  color: var(--c-ink);
}

.h4 {
  font-size: var(--fs-h4);
  line-height: var(--lh-h4);
  letter-spacing: -0.01em;
  color: var(--c-text);
}

.sub {
  font-size: var(--fs-sub);
  line-height: var(--lh-sub);
  letter-spacing: -0.01em;
  color: var(--c-text-80);
}

.body {
  font-size: 18px;
  line-height: 25.2px;
  letter-spacing: -0.01em;
  color: var(--c-text-80);
}

.small {
  font-size: 16px;
  line-height: 22.4px;
  letter-spacing: 0;
  color: var(--c-text-80);
}

.mono {
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 19.2px;
  letter-spacing: -0.04em;
  color: var(--c-text-80);
}

.num {
  color: var(--c-text-muted);
  flex: none;
}

.on-dark .display,
.on-dark .h2,
.on-dark .h4 {
  color: var(--c-on-dark);
}

.on-dark .sub,
.on-dark .body,
.on-dark .small {
  color: var(--c-on-dark-80);
}

.on-dark .mono {
  color: var(--c-on-dark-50);
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 20px;
  border: 0;
  border-radius: 100px;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 19.6px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn--black {
  background: var(--c-black);
  color: var(--c-on-dark);
}

.btn--dark-shadow {
  background: var(--c-black);
  color: var(--c-on-dark);
  box-shadow: var(--shadow-dark-btn);
}

.btn--white {
  background: var(--c-bg);
  color: var(--c-text);
}

.btn--light {
  background: var(--c-surface);
  color: var(--c-text);
  box-shadow: var(--shadow-light-btn);
}

.btn--fade-dark {
  background: var(--c-fade-dark);
  color: var(--c-on-dark);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  padding: 10px 20px;
}

.btn--fade-dark:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn--lg {
  padding: 15px 20px;
}

.btn--block {
  width: 100%;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn[aria-busy="true"] {
  cursor: progress;
  opacity: 0.7;
}

/* Letter blur-in on hover (reference "Main Button" effect). */
.btn .ch {
  display: inline-block;
  white-space: pre;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* ---------- Nav (B1) ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-line);
}

.nav__inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 20px;
}

/* Pixel "O" logo mark (from the 8765 reference) */
.logo-mark {
  width: 20px;
  height: 20px;
  flex: none;
  fill: currentColor;
}

.logo-mark__accent {
  fill: var(--c-accent);
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.06em;
  color: var(--c-black);
}

.nav__links {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 10px;
}

.nav__links a,
.nav__panel a {
  font-size: 16px;
  line-height: 22.4px;
  letter-spacing: -0.01em;
  color: var(--c-black);
  transition: opacity 0.2s ease;
}

.nav__links a:hover {
  opacity: 0.6;
}

.nav__links a[aria-current="page"] {
  opacity: 0.6;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav__menu {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.nav__menu span:not(.sr-only) {
  position: absolute;
  left: 2px;
  right: 2px;
  height: 1.5px;
  background: var(--c-black);
  transition: transform 0.3s ease, top 0.3s ease;
}

.nav__menu span:nth-child(2) {
  top: 15px;
}

.nav__menu span:nth-child(3) {
  top: 24px;
}

.nav__menu[aria-expanded="true"] span:nth-child(2) {
  top: 19.5px;
  transform: rotate(45deg);
}

.nav__menu[aria-expanded="true"] span:nth-child(3) {
  top: 19.5px;
  transform: rotate(-45deg);
}

.nav__panel {
  border-top: 1px solid var(--c-line);
}

.nav__panel ul {
  display: flex;
  flex-direction: column;
}

.nav__panel li + li {
  border-top: 1px solid var(--c-line);
}

.nav__panel a {
  display: block;
  padding: 16px 20px;
  font-size: 20px;
  line-height: 28px;
}

@media (max-width: 809px) {
  /* Without site.js the links stay inline; with it they fold behind the menu. */
  .nav__links {
    position: static;
    transform: none;
  }

  .site-ready .nav__links {
    display: none;
  }

  .site-ready .nav__menu {
    display: block;
  }

  .nav__inner {
    padding-inline: 16px;
  }
}

@media (min-width: 810px) {
  .nav__panel {
    display: none !important;
  }
}

/* ---------- Effects layers ---------- */
.fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.fx--mask-radial {
  -webkit-mask-image: radial-gradient(69% 50% at 50% 50%, transparent 29.6%, #000 100%);
  mask-image: radial-gradient(69% 50% at 50% 50%, transparent 29.6%, #000 100%);
}

.fx--mask-down {
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 100%);
}

.fx--mask-corner {
  -webkit-mask-image: radial-gradient(90% 140% at 0% 0%, #000 0%, rgba(0, 0, 0, 0.5) 40%, transparent 75%);
  mask-image: radial-gradient(90% 140% at 0% 0%, #000 0%, rgba(0, 0, 0, 0.5) 40%, transparent 75%);
}

.fx--mask-mid {
  -webkit-mask-image: linear-gradient(0deg, transparent 0%, #000 58.7%, transparent 100%);
  mask-image: linear-gradient(0deg, transparent 0%, #000 58.7%, transparent 100%);
}

/* ---------- Hero (B2) ---------- */
.hero {
  position: relative;
  min-height: 720px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #eef0f2;
  isolation: isolate;
}

.hero__gradient {
  z-index: 0;
}

.hero__dots {
  z-index: 1;
  opacity: 0.8;
}

.hero__grain {
  z-index: 0;
  opacity: 0.3;
  mix-blend-mode: multiply;
  background-size: 128px 128px;
}

/* Light fade toward the bottom edge, as in the reference hero. */
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  z-index: 1;
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
  pointer-events: none;
}

/* Static fallback when WebGL is not available. */
.fx-static {
  background:
    radial-gradient(40% 45% at 18% 20%, rgba(71, 167, 235, 0.55), transparent 70%),
    radial-gradient(35% 40% at 62% 12%, rgba(71, 167, 235, 0.5), transparent 70%),
    radial-gradient(30% 35% at 90% 55%, rgba(71, 167, 235, 0.35), transparent 70%),
    #f1f2f3;
}

.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 980px;
  padding: var(--pad-y) var(--pad-x);
  text-align: center;
}

.hero__deck {
  font-size: var(--fs-sub);
  line-height: var(--lh-sub);
  letter-spacing: -0.01em;
  color: var(--c-black);
  margin-top: 4px;
}

.hero__attention {
  max-width: 440px;
  font-size: 16px;
  line-height: 22.4px;
  letter-spacing: 0;
  color: var(--c-black);
  margin-top: -8px;
}

.hero .btn-row {
  margin-top: 4px;
}

/* Word blur-in (reference "RandomAppearText"). */
.fx-ready [data-words] .w {
  display: inline-block;
}

@media (max-width: 809px) {
  .hero {
    min-height: 640px;
  }

  .hero .btn-row {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 326px;
  }

  .hero .btn-row .btn {
    width: 100%;
  }
}

/* ---------- Cells with dot fields ---------- */
.dot-cell {
  position: relative;
  overflow: hidden;
  overflow: clip;
  isolation: isolate;
}

.dot-cell > .fx {
  z-index: 0;
  max-width: none;
}

.dot-cell > :not(.fx) {
  position: relative;
  z-index: 1;
}

.dot-cell > .orbit {
  position: absolute;
  z-index: 0;
}

.dot-cell > .stop__sticky {
  position: sticky;
}

/* ---------- Captures (placeholders until real recordings ship) ---------- */
.capture {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.capture__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--c-black);
}

.capture__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px;
  background: var(--c-surface);
  box-shadow: inset 0 0 0 1px var(--c-line);
}

.capture__id {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.capture__alt {
  max-width: 560px;
  font-size: 14px;
  line-height: 19.6px;
  color: var(--c-text-muted);
}

/* Crop-mark guides that extend past the frame (reference image frames). */
.capture::before,
.capture::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 2;
}

.capture::before {
  left: -20px;
  right: -20px;
  top: 0;
  bottom: 0;
  border-block: 1px solid var(--c-line);
}

.capture::after {
  top: -20px;
  bottom: -20px;
  left: 0;
  right: 0;
  border-inline: 1px solid var(--c-line);
}

.on-dark .capture__placeholder {
  background: #111;
  box-shadow: inset 0 0 0 1px var(--c-line-dark);
}

.on-dark .capture__alt {
  color: var(--c-on-dark-50);
}

.on-dark .capture::before,
.on-dark .capture::after {
  border-color: var(--c-line-dark);
}

.capture__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
}

.capture__media[controls] + .capture__play {
  display: none;
}

/* ---------- B3 Room ---------- */
.room__cell {
  padding: 40px;
}

@media (max-width: 809px) {
  .room__cell {
    padding: 24px 16px;
  }
}

/* ---------- B4 Harness strip ----------
   Centered pill chips with each harness's own mark (from the 4322 reference). */
.strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 56px 40px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px 10px 12px;
  border-radius: 10px;
  background: var(--c-bg);
  box-shadow: rgb(255, 255, 255) 0 0.5px 0.5px 0 inset, var(--c-line) 0 0 0 1px;
  font-size: 16px;
  line-height: 22.4px;
  color: var(--c-ink);
}

.chip__mark {
  width: 20px;
  height: 20px;
  flex: none;
  object-fit: contain;
}

.chip--ghost {
  padding-inline: 15px;
  box-shadow: none;
  outline: 1px dashed rgba(0, 0, 0, 0.22);
  outline-offset: -1px;
  color: var(--c-text-muted);
}

.strip__sentence {
  max-width: 620px;
  text-align: center;
  font-size: 16px;
  line-height: 24px;
  color: var(--c-text-80);
}

.strip__sentence a {
  text-decoration: underline;
  text-decoration-color: var(--c-line);
  text-underline-offset: 4px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.strip__sentence a:hover {
  color: var(--c-black);
  text-decoration-color: currentColor;
}

@media (max-width: 809px) {
  .strip {
    padding: 40px 16px;
  }
}

/* ---------- Section heads ---------- */
.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: var(--pad-y) var(--pad-x);
  text-align: center;
}

.section-head > * {
  max-width: 700px;
}

.section-head--wide > .h2,
.section-head--wide > .display {
  max-width: 1200px;
}

.section-head .sub + .body {
  margin-top: -8px;
}

/* ---------- B8: feature panels with capture slots (Glif features reference) ---------- */
.features__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.features__panel {
  min-width: 0;
  border-bottom: 1px solid var(--c-line);
}

.features__panel:nth-child(odd) {
  border-right: 1px solid var(--c-line);
}

.features__panel:last-child {
  border-bottom: 0;
}

.features__visual {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  height: 360px;
  padding: 32px;
  isolation: isolate;
}

.features__panel--illustrated {
  position: relative;
  isolation: isolate;
}

.features__panel--illustrated::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0, 0, 0, 0.16) 0.7px, transparent 0.9px);
  background-size: 8px 8px;
  -webkit-mask-image: radial-gradient(ellipse at center, transparent 20%, #000 100%);
  mask-image: radial-gradient(ellipse at center, transparent 20%, #000 100%);
  pointer-events: none;
}

.features__visual .capture {
  width: min(100%, 480px);
}

.features__visual .capture__placeholder {
  padding: 16px;
}

.features__visual .capture__id {
  font-size: 12px;
}

.features__copy {
  display: grid;
  gap: 28px;
  padding: 0 var(--card-pad) var(--card-pad);
}

.features__entry {
  display: grid;
  align-content: start;
  gap: 10px;
}

.features__entry p {
  max-width: 460px;
  color: var(--c-text-muted);
  text-wrap: pretty;
}

@media (max-width: 809px) {
  .features__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .features__panel:nth-child(odd) {
    border-right: 0;
  }

  .features__visual {
    height: 260px;
    padding: 24px;
  }

  .features__copy {
    gap: 24px;
  }
}

/* ---------- Grids of cards ----------
   Each column count lives in its own width range, so the edge rules
   (no right border on the last column, no bottom border on the last row)
   never leak between breakpoints. */
.grid {
  --grid-line: var(--c-line);
  display: grid;
  grid-template-columns: 1fr;
}

.on-dark .grid {
  --grid-line: var(--c-line-dark);
}

.grid > * {
  border-bottom: 1px solid var(--grid-line);
}

.grid > :last-child {
  border-bottom: 0;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px 16px;
}

.card__top {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.card .small,
.card .body {
  max-width: 400px;
}

/* 560–809: two columns for 4- and 5-up grids, three for 3-up */
@media (min-width: 560px) and (max-width: 809px) {
  .grid--4,
  .grid--5 {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .grid--4 > :nth-child(odd),
  .grid--5 > :nth-child(odd) {
    border-right: 1px solid var(--grid-line);
  }

  .grid--4 > :nth-last-child(-n + 2),
  .grid--5 > :nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .grid--3 > :not(:nth-child(3n)) {
    border-right: 1px solid var(--grid-line);
  }

  .grid--3 > :nth-last-child(-n + 3) {
    border-bottom: 0;
  }
}

/* 810–1199: 4-up → 2 columns, 5-up → 3 columns */
@media (min-width: 810px) and (max-width: 1199px) {
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .grid--4 > :nth-child(odd) {
    border-right: 1px solid var(--grid-line);
  }

  .grid--4 > :nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .grid--5 > :not(:nth-child(3n)),
  .grid--3 > :not(:nth-child(3n)) {
    border-right: 1px solid var(--grid-line);
  }

  .grid--3 > :nth-last-child(-n + 3) {
    border-bottom: 0;
  }

  .card {
    padding: 40px 32px;
  }
}

/* >= 1200: 4, 5 and 3 columns */
@media (min-width: 1200px) {
  .grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .grid--5 {
    grid-template-columns: repeat(5, 1fr);
  }

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

  .grid--4 > :not(:nth-child(4n)),
  .grid--5 > :not(:nth-child(5n)),
  .grid--3 > :not(:nth-child(3n)) {
    border-right: 1px solid var(--grid-line);
  }

  .grid--4 > :nth-last-child(-n + 4),
  .grid--5 > :nth-last-child(-n + 5),
  .grid--3 > :nth-last-child(-n + 3) {
    border-bottom: 0;
  }

  .card {
    padding: 40px 32px;
  }
}

/* ---------- B5 Reframe + dark quote ---------- */
.reframe {
  padding: var(--pad-y) var(--pad-x);
  display: flex;
  justify-content: center;
}

.reframe p {
  max-width: 700px;
  text-align: center;
}

.quote-band {
  overflow: hidden;
}

.quote-band__deco {
  position: relative;
  height: 160px;
  border-bottom: 1px solid var(--c-line-dark);
}

.quote-band__deco--bottom {
  border-bottom: 0;
  border-top: 1px solid var(--c-line-dark);
}

.quote-band__deco::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid var(--c-line-dark);
}

.orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 660px;
  height: 660px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.orbit circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
}

.orbit .hand {
  transform-origin: 330px 330px;
  animation: orbit-spin 24s linear infinite;
}

.orbit .hand line {
  stroke: rgba(255, 255, 255, 0.18);
}

.orbit .hand line.tip {
  stroke: #fff;
}

@keyframes orbit-spin {
  to {
    transform: rotate(360deg);
  }
}

.quote-card {
  position: relative;
  background: var(--c-dark-card);
  padding: 160px 40px;
}

.quote-card__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  padding-left: 48px;
  max-width: 1200px;
}

.quote-card blockquote p {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  letter-spacing: var(--ls-h2);
  color: var(--c-on-dark);
  max-width: 1040px;
}

@media (max-width: 809px) {
  .quote-band__deco {
    height: 64px;
  }

  .quote-card {
    padding: 64px 16px;
  }

  .quote-card__body {
    padding-left: 0;
  }

  .btn--wrap {
    white-space: normal;
    text-align: center;
  }
}

/* ---------- B6 Pipeline stops ---------- */
.stop {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "text media";
}

.stop__text {
  grid-area: text;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 96px 48px;
}

.stop__media {
  grid-area: media;
  border-left: 1px solid var(--c-line);
}

/* The capture box is at most 640 px tall and stays centered in the
   viewport while its row scrolls past. */
.stop__sticky {
  --sticky-h: min(calc(100vh - var(--nav-h)), 640px);
  position: sticky;
  top: calc(var(--nav-h) + (100vh - var(--nav-h) - var(--sticky-h)) / 2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
  min-height: var(--sticky-h);
  padding: 64px 48px;
}

.stop__sticky .capture {
  max-width: 544px;
  margin-inline: auto;
}

/* Keep the small capture notes clear against the full-column dot field. */
.stop__sticky .note {
  background: var(--c-bg);
  box-shadow: 0 0 0 8px var(--c-bg);
}

.stop__head {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.facts {
  border-top: 1px solid var(--c-line);
}

.facts li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 0;
  border-bottom: 1px solid var(--c-line);
}

.facts strong {
  font-weight: 500;
  font-size: 18px;
  line-height: 25.2px;
  letter-spacing: -0.01em;
  color: var(--c-black);
}

.facts span {
  font-size: 16px;
  line-height: 22.4px;
  color: var(--c-text-80);
}

.facts code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  letter-spacing: -0.02em;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--c-surface);
  color: var(--c-black);
  white-space: nowrap;
}

.note {
  font-size: 14px;
  line-height: 19.6px;
  letter-spacing: 0;
  color: var(--c-text-muted);
  max-width: 544px;
  margin-inline: auto;
  width: 100%;
}

@media (max-width: 1199px) {
  .stop__text {
    padding: 64px 32px;
  }

  .stop__sticky {
    padding: 48px 32px;
  }
}

@media (max-width: 809px) {
  .stop {
    grid-template-columns: 1fr;
    grid-template-areas:
      "text"
      "media";
  }

  .stop__text {
    padding: 40px 16px;
  }

  .stop__media {
    border: 0;
    border-top: 1px solid var(--c-line);
  }

  .dot-cell > .stop__sticky {
    position: relative;
    top: 0;
    min-height: 0;
    padding: 32px 16px;
  }
}

/* ---------- B7 Harness depth (dark integrations) ---------- */
.depth__head {
  padding: var(--pad-y) var(--pad-x);
}

.depth__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 24px 32px;
  background: #0a0a0a;
  border-top: 1px solid var(--c-line-dark);
  overflow: hidden;
}

.depth__stage .orbit {
  width: 1000px;
  height: 1000px;
}

.depth__stage .orbit circle {
  stroke: rgba(255, 255, 255, 0.06);
  stroke-dasharray: 2 4;
}

.depth__viewer {
  position: relative;
  z-index: 1;
  width: 100%;
}

.depth__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}

.depth__caption {
  display: flex;
  align-items: center;
  gap: 24px;
}

.depth__hint {
  font-size: 12px;
  color: var(--c-on-dark-80);
}

.depth__controls {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.depth__counter {
  font-size: 12px;
  color: var(--c-on-dark-80);
}

.depth__arrow {
  width: 42px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--c-on-dark-80);
  cursor: pointer;
}

.depth__arrow span {
  width: 8px;
  height: 8px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.depth__arrow[data-demo-prev] span {
  transform: rotate(-135deg);
}

.depth__arrow:hover {
  background: var(--c-dark-raised);
  color: var(--c-on-dark);
}

.depth__panel {
  scroll-margin-top: calc(var(--nav-h) + 24px);
}

.depth__panel + .depth__panel {
  margin-top: 64px;
}

.depth__demos[data-enhanced] .depth__panel {
  margin-top: 0;
}

.depth__choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--c-line-dark);
}

.depth__choice {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 32px;
  text-decoration: none;
  background: transparent;
  box-shadow: inset 0 2px transparent;
}

.depth__choice + .depth__choice {
  border-left: 1px solid var(--c-line-dark);
}

.depth__choice:hover {
  background: var(--c-fade-dark);
}

.depth__choice[aria-selected="true"] {
  background: var(--c-dark-raised);
  box-shadow: inset 0 2px var(--c-on-dark);
}

.depth__choice-number {
  color: var(--c-on-dark-50);
  font-size: 12px;
}

.depth__choice strong {
  font-weight: 400;
  font-size: var(--fs-h4);
  line-height: var(--lh-h4);
  letter-spacing: -0.01em;
  color: var(--c-on-dark);
}

.depth__choice-copy {
  font-size: 16px;
  line-height: 22.4px;
  color: var(--c-on-dark-80);
}

.depth__choice:focus-visible,
.depth__arrow:focus-visible,
.depth__panel:focus-visible {
  outline: 2px solid var(--c-on-dark);
  outline-offset: -4px;
}

.depth__note {
  padding: 24px 32px;
  border-top: 1px solid var(--c-line-dark);
}

.on-dark .note {
  color: var(--c-on-dark-50);
  max-width: none;
}

@media (max-width: 809px) {
  .depth__stage {
    padding: 16px 8px 24px;
  }

  .depth__toolbar {
    gap: 8px;
    margin-top: 20px;
  }

  .depth__demos[data-enhanced] .depth__hint {
    display: none;
  }

  .depth__choices {
    grid-template-columns: 1fr;
  }

  .depth__choice {
    padding: 24px 16px;
    gap: 8px;
  }

  .depth__choice + .depth__choice {
    border-left: 0;
    border-top: 1px solid var(--c-line-dark);
  }

  .depth__note {
    padding: 24px 16px;
  }
}

/* ---------- B9 Proof ---------- */
.proof .section-head {
  background: rgba(255, 255, 255, 0.05);
}

/* ---------- Split (title left, list right): B12 ---------- */
.split {
  display: grid;
  grid-template-columns: 430px 1fr;
}

.split__title {
  display: flex;
  flex-direction: column;
  gap: 17px;
  padding: 40px;
  border-right: 1px solid var(--c-line);
}

.split__title .h2 {
  color: var(--c-text-80);
}

.rows > li {
  border-bottom: 1px solid var(--c-line);
}

.rows > li:last-child {
  border-bottom: 0;
}

@media (max-width: 1199px) {
  .split {
    grid-template-columns: 1fr 1.6fr;
  }
}

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

  .split__title {
    padding: 40px 16px 32px;
    border-right: 0;
    border-bottom: 1px solid var(--c-line);
  }
}

/* ---------- FAQ accordion (B12) ---------- */
.faq__q {
  font-size: 20px;
  line-height: 28px;
  font-weight: 500;
  letter-spacing: 0;
}

.faq__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding: 24px;
  border: 0;
  background: var(--c-bg);
  text-align: left;
  font-weight: 500;
  cursor: pointer;
}

.faq__icon {
  position: relative;
  flex: none;
  width: 24px;
  height: 24px;
}

.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 11.25px;
  height: 1.5px;
  background: var(--c-black);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
}

.faq__icon::after {
  transform: rotate(90deg);
}

.faq__btn[aria-expanded="true"] .faq__icon::after {
  transform: rotate(0deg);
  opacity: 0;
}

.faq__a {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.site-ready .faq__a {
  grid-template-rows: 0fr;
}

.site-ready .faq__a.is-open {
  grid-template-rows: 1fr;
}

.faq__a > div {
  overflow: hidden;
}

/* Collapsed answers leave the accessibility tree after the close animation. */
.site-ready .faq__a:not(.is-open) > div {
  visibility: hidden;
  transition: visibility 0s linear 0.35s;
}

.faq__a p {
  max-width: 640px;
  padding: 0 24px 24px;
}

@media (max-width: 809px) {
  .faq__btn {
    padding: 20px 16px;
  }

  .faq__a p {
    padding: 0 16px 20px;
  }
}

/* ---------- B11 Get Orkestra (pricing columns) ----------
   Status label with a dot, big platform name, hairline, then the action. */
.get-cols > li {
  display: flex;
  flex-direction: column;
  padding: 56px 40px 48px;
}

.get-col__status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-text-80);
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--c-text-muted);
}

.status-dot--live {
  background: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-13);
}

.get-col__name {
  margin-top: 12px;
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  color: var(--c-ink);
}

.get-col__actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--c-line);
  flex: 1;
}

.get-col__foot {
  min-height: 19.6px;
  padding-left: 20px;
  font-size: 14px;
  line-height: 19.6px;
  color: var(--c-text-muted);
}

.get-col__foot--center {
  padding-left: 0;
  text-align: center;
}

.get-col__foot a {
  color: var(--c-text);
  text-decoration: underline;
  text-decoration-color: var(--c-line);
  text-underline-offset: 3px;
}

.notify__row {
  display: flex;
  gap: 10px;
}

.notify__row .field {
  flex: 1;
  min-width: 0;
  border-color: var(--c-line);
}

.notify__row .btn {
  flex: none;
}

.notify {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field {
  width: 100%;
  padding: 15px 20px;
  border: 1px solid transparent;
  border-radius: 100px;
  background: var(--c-surface);
  box-shadow: var(--shadow-light-btn);
  font-size: 14px;
  line-height: 19.6px;
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.field::placeholder {
  color: var(--c-text-muted);
}

.field:hover {
  border-color: var(--c-line);
}

.field:focus-visible {
  border-color: var(--c-black);
  background: var(--c-bg);
  outline: 2px solid var(--c-black);
  outline-offset: 2px;
}

.field[aria-invalid="true"] {
  border-color: #e31414;
}

.form-msg {
  min-height: 19.6px;
  font-size: 14px;
  line-height: 19.6px;
  color: #e31414;
  text-align: center;
}

.form-msg:empty {
  display: none;
}

.notify-done {
  padding: 15px 20px;
  border-radius: 20px;
  background: var(--c-accent-13);
  font-size: 16px;
  line-height: 22.4px;
  text-align: center;
  color: var(--c-black);
}

.closing {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 120px var(--pad-x);
  text-align: center;
  border-top: 1px solid var(--c-line);
}

/* Closing block (4322 reference): live blue field that fades in from white. */
.closing {
  background: #f7f8f9;
}

.closing .hero__grain {
  opacity: 0.12;
}

.closing__dots {
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.6) 35%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.6) 35%, #000 100%);
}

/* WebGL fallback for the closing block: soft blue weighted to the bottom. */
.closing.fx-static {
  background:
    radial-gradient(40% 55% at 85% 90%, rgba(71, 167, 235, 0.45), transparent 70%),
    radial-gradient(35% 50% at 15% 95%, rgba(71, 167, 235, 0.35), transparent 70%),
    radial-gradient(30% 40% at 55% 100%, rgba(71, 167, 235, 0.25), transparent 70%),
    #f7f8f9;
}

.closing::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 45%;
  z-index: 0;
  background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.closing__lead {
  max-width: 820px;
}

.closing .sub {
  max-width: 700px;
  color: var(--c-ink-2);
}

@media (max-width: 1199px) {
  .get-cols > li {
    padding: 48px 28px 40px;
  }
}

@media (max-width: 809px) {
  .get-cols {
    grid-template-columns: 1fr;
  }

  .get-cols > li {
    border-right: 0 !important;
    border-bottom: 1px solid var(--grid-line) !important;
  }

  .get-cols > li:last-child {
    border-bottom: 0 !important;
  }

  .get-cols > li {
    padding: 40px 16px 32px;
  }

  .closing {
    padding: 64px 16px;
  }
}

/* ---------- Footer (B13) ----------
   Top row (brand, links, Connect) → big pixel wordmark → legal row,
   all on the dark background. */
.footer {
  background: var(--c-dark);
  color: var(--c-on-dark);
}

.footer__inner {
  width: min(var(--frame), 100% - 2 * var(--gutter));
  margin-inline: auto;
  padding-top: 96px;
}

.footer__top {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 24px;
  padding-top: 28px;
  border-top: 1px solid var(--c-line-dark);
}

.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--c-on-dark);
}

.footer__brand .logo-mark {
  width: 18px;
  height: 18px;
}

.footer__links,
.footer__social {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__links a,
.footer__social a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  line-height: 22.4px;
  letter-spacing: -0.01em;
  color: var(--c-on-dark-80);
  transition: color 0.2s ease;
}

.footer__links a:hover,
.footer__social a:hover {
  color: var(--c-on-dark);
}

.footer__connect {
  grid-column: span 2;
}

.footer__label,
.footer__legal {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-on-dark-80);
}

.footer__label {
  margin-bottom: 16px;
}

.footer__social {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 24px;
}

.footer__social svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex: none;
}

/* Pixel wordmark (8765 / Vennick reference), between the links and the legal row */
.footer__mark {
  position: relative;
  margin: 96px 0;
  cursor: crosshair;
  touch-action: pan-y pinch-zoom;
}

.footer__mark canvas {
  display: block;
  margin-inline: auto;
}

.footer__legal {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0 28px;
  border-top: 1px solid var(--c-line-dark);
}

.footer__legal ul {
  display: flex;
  gap: 24px;
}

.footer__legal a {
  transition: color 0.2s ease;
}

.footer__legal a:hover {
  color: var(--c-on-dark);
}

@media (max-width: 1199px) {
  .footer__top {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer__connect {
    grid-column: span 1;
  }
}

@media (max-width: 809px) {
  .footer__inner {
    padding-top: 48px;
  }

  .footer__top {
    grid-template-columns: 1fr 1fr;
  }

  .footer__brand-wrap {
    grid-column: 1 / -1;
  }

  .footer__mark {
    margin: 56px 0;
  }

  .footer__legal {
    flex-direction: column;
  }
}

/* ---------- Stub pages ---------- */
.page-head {
  position: relative;
  padding: 120px var(--pad-x) 80px;
}

.page-head .display {
  max-width: 900px;
}

.page-head .sub {
  max-width: 700px;
}

.steps a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 24px;
  font-size: 20px;
  line-height: 28px;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.steps a:hover {
  background: var(--c-surface);
}

.steps .num {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 400;
}

.pending {
  padding: 20px 24px;
  border-radius: 10px;
  background: var(--c-surface);
  box-shadow: inset 0 0 0 1px var(--c-line);
}

.empty-state {
  padding: 64px 40px;
  text-align: center;
}

.roadmap-cols li {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 64px 32px;
}

.roadmap-cols li ul {
  border-top: 1px solid var(--c-line);
}

.roadmap-cols li ul li {
  padding: 12px 0;
  border-bottom: 1px solid var(--c-line);
  font-size: 18px;
  line-height: 25.2px;
  color: var(--c-text-80);
}

@media (max-width: 809px) {
  .page-head {
    padding: 64px 16px 40px;
  }

  .steps a {
    padding: 20px 16px;
  }

  .empty-state {
    padding: 48px 16px;
  }

  .roadmap-cols li {
    padding: 40px 16px;
  }
}

/* ---------- Documentation ---------- */
.docs-page {
  --docs-sticky-gap: 24px;
  --docs-ink: var(--c-text-80);
}

.docs-page [id] {
  scroll-margin-top: calc(var(--nav-h) + var(--docs-sticky-gap));
}

.docs-layout {
  display: grid;
  grid-template-columns: minmax(0, 14rem) minmax(0, 1fr) minmax(0, 14rem);
  gap: 32px;
  align-items: start;
  padding: 36px 20px 96px;
}

.docs-sidebar {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.docs-sidebar__inner,
.docs-toc__inner {
  position: sticky;
  top: calc(var(--nav-h) + var(--docs-sticky-gap));
  max-height: calc(100vh - var(--nav-h) - 2 * var(--docs-sticky-gap));
  overflow-y: auto;
  scrollbar-width: thin;
}

.docs-mobile-toc > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 12px;
  color: var(--c-ink);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

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

.docs-mobile-toc > summary::after {
  content: "+";
  font-family: var(--font-sans);
  font-size: 19px;
  line-height: 1;
}

.docs-mobile-toc[open] > summary::after {
  content: "−";
}

.docs-search {
  display: grid;
  gap: 6px;
  margin: 0 0 16px;
}

.docs-search label {
  color: var(--c-text-muted);
  font-size: 13px;
  line-height: 1.35;
}

.docs-search input {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--c-line);
  border-radius: 6px;
  background: var(--c-bg);
  font-size: 14px;
  line-height: 1.4;
}

.docs-search input:focus-visible {
  outline-color: var(--c-accent);
}

.docs-search__status {
  color: var(--c-text-muted);
  font-size: 13px;
}

.docs-nav-list,
.docs-nav-group ol {
  display: grid;
  gap: 3px;
}

.docs-nav-list > li[data-doc-item] > a,
.docs-nav-group ol a {
  display: block;
  padding: 5px 8px;
  border-radius: 5px;
  color: var(--c-text-80);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.docs-nav-list a:hover {
  background: var(--c-surface);
  color: var(--c-ink);
}

.docs-nav-list a[aria-current="page"] {
  background: var(--c-accent-13);
  color: var(--c-ink);
  font-weight: 500;
}

.docs-nav-group {
  margin-top: 16px;
}

.docs-nav-group > p,
.docs-rail-title {
  padding: 0 8px 5px;
  color: var(--c-text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.docs-main {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.docs-article {
  min-width: 0;
  color: var(--docs-ink);
}

.docs-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 28px;
  color: var(--c-text-muted);
  font-size: 14px;
  line-height: 1.4;
}

.docs-breadcrumbs a:hover,
.docs-content a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.docs-breadcrumbs [aria-current="page"] {
  color: var(--c-ink);
}

.docs-article__header {
  display: grid;
  gap: 14px;
  margin-bottom: 42px;
}

.docs-article__header > .mono {
  color: var(--c-text-muted);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.docs-article__header h1 {
  max-width: 19ch;
  color: var(--c-ink);
  font-size: clamp(40px, 4vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.docs-summary {
  max-width: 62ch;
  color: var(--c-text-80);
  font-size: 20px;
  line-height: 1.45;
}

.docs-quickstart {
  margin: 0 0 32px;
  padding: 19px 0 18px;
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
}

.docs-quickstart h2 {
  margin-bottom: 10px;
  color: var(--c-ink);
  font-size: 20px;
  line-height: 1.3;
}

.docs-quickstart ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 16px;
}

.docs-quickstart a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  color: var(--c-text-80);
  font-size: 15px;
  line-height: 1.4;
}

.docs-quickstart a:hover {
  color: var(--c-ink);
}

.docs-quickstart a span {
  flex: none;
  color: var(--c-text-muted);
}

.docs-mobile-toc {
  display: none;
}

.docs-content {
  min-width: 0;
  color: var(--docs-ink);
  font-size: 17px;
  line-height: 1.62;
  overflow-wrap: anywhere;
}

.docs-content > * + * {
  margin-top: 1.15em;
}

.docs-content h2,
.docs-content h3,
.docs-content h4 {
  color: var(--c-ink);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.docs-content h2 {
  margin-top: 2.2em;
  font-size: 30px;
}

.docs-content h3 {
  margin-top: 1.8em;
  font-size: 23px;
}

.docs-content h4 {
  margin-top: 1.5em;
  font-size: 19px;
}

.docs-content p + p {
  margin-top: 0.9em;
}

.docs-content a {
  color: var(--c-ink);
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.32);
  text-underline-offset: 3px;
}

.docs-content strong {
  color: var(--c-ink);
  font-weight: 500;
}

.docs-content ul,
.docs-content ol {
  display: block;
  padding-left: 1.45em;
}

.docs-content ul {
  list-style: disc;
}

.docs-content ol {
  list-style: decimal;
}

.docs-content li {
  padding-left: 0.22em;
}

.docs-content li + li {
  margin-top: 0.32em;
}

.docs-content li::marker {
  color: var(--c-text-muted);
  font-family: var(--font-mono);
  font-size: 0.86em;
}

.docs-content li > ul,
.docs-content li > ol {
  margin-top: 0.35em;
}

.docs-content blockquote {
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--c-accent);
  color: var(--c-text-80);
}

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

.docs-content :not(pre) > code,
.docs-content kbd {
  padding: 0.1em 0.3em;
  border-radius: 4px;
  background: var(--c-surface);
  overflow-wrap: anywhere;
}

.docs-content pre {
  max-width: 100%;
  padding: 16px;
  overflow: auto;
  border: 1px solid var(--c-line);
  border-radius: 7px;
  background: var(--c-surface);
  color: var(--c-ink);
  font-size: 14px;
  line-height: 1.6;
  -webkit-overflow-scrolling: touch;
}

.docs-content pre code {
  overflow-wrap: normal;
  white-space: pre;
}

.docs-content table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.45;
  -webkit-overflow-scrolling: touch;
}

.docs-content th,
.docs-content td {
  min-width: 9rem;
  padding: 9px 12px;
  border: 1px solid var(--c-line);
  text-align: left;
  vertical-align: top;
}

.docs-content th {
  background: var(--c-surface);
  color: var(--c-ink);
  font-weight: 500;
}

.docs-content hr {
  height: 1px;
  border: 0;
  background: var(--c-line);
}

.docs-content img {
  max-width: 100%;
  height: auto;
}

.docs-toc {
  grid-column: 3;
  grid-row: 1;
  min-width: 0;
}

.docs-toc__inner {
  padding-top: 2px;
}

.docs-toc__inner .docs-rail-title {
  padding-left: 0;
}

.docs-toc nav {
  margin-top: 4px;
}

.docs-toc ol,
.docs-mobile-toc ol {
  display: grid;
  gap: 3px;
}

.docs-toc a,
.docs-mobile-toc a {
  display: block;
  padding: 4px 0;
  color: var(--c-text-muted);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.docs-toc a:hover,
.docs-mobile-toc a:hover {
  color: var(--c-ink);
}

.docs-toc__item--h3 {
  padding-left: 10px;
}

.docs-pagination {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 56px;
  padding-top: 16px;
  border-top: 1px solid var(--c-line);
}

.docs-pagination__link {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--c-line);
  border-radius: 7px;
}

.docs-pagination__link:hover {
  background: var(--c-surface);
}

.docs-pagination__link > span {
  color: var(--c-text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
}

.docs-pagination__link strong {
  color: var(--c-ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
}

.docs-pagination__link--next {
  grid-column: 2;
  text-align: right;
}

@media (max-width: 1199px) {
  .docs-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 740px) minmax(0, 1fr);
    gap: 0 24px;
    padding: 28px 20px 72px;
  }

  .docs-sidebar {
    grid-column: 2;
    grid-row: 1;
    margin-bottom: 26px;
  }

  .docs-sidebar__inner {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .docs-chapters nav {
    max-height: 52vh;
    overflow-y: auto;
    padding: 12px;
    border: 1px solid var(--c-line);
    border-radius: 7px;
  }

  .docs-main {
    grid-column: 2;
    grid-row: 2;
  }

  .docs-toc {
    display: none;
  }

  .docs-mobile-toc {
    display: block;
    margin: -16px 0 30px;
    border-bottom: 1px solid var(--c-line);
  }

  .docs-mobile-toc > summary {
    padding: 12px 0;
    border-top: 1px solid var(--c-line);
  }

  .docs-mobile-toc nav {
    max-height: 45vh;
    overflow-y: auto;
    padding: 0 0 14px;
  }

  .docs-mobile-toc a {
    font-size: 14px;
  }
}

@media (max-width: 809px) {
  .docs-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 18px 16px 56px;
  }

  .docs-sidebar,
  .docs-main {
    grid-column: 1;
  }

  .docs-sidebar {
    margin-bottom: 23px;
  }

  .docs-article__header {
    gap: 10px;
    margin-bottom: 30px;
  }

  .docs-breadcrumbs {
    margin-bottom: 21px;
    font-size: 13px;
  }

  .docs-article__header h1 {
    max-width: 22ch;
    font-size: 42px;
  }

  .docs-summary {
    font-size: 18px;
  }

  .docs-quickstart ul {
    grid-template-columns: 1fr;
  }

  .docs-content {
    font-size: 16px;
    line-height: 1.6;
  }

  .docs-content h2 {
    font-size: 26px;
  }

  .docs-content h3 {
    font-size: 21px;
  }

  .docs-content pre {
    margin-inline: -4px;
    padding: 13px 12px;
    font-size: 13px;
  }

  .docs-pagination {
    gap: 8px;
  }

  .docs-pagination__link {
    padding: 10px;
  }
}

/* ---------- Manifesto ---------- */
.manifesto {
  padding: 64px var(--pad-x) 80px;
}

.manifesto > * {
  max-width: 760px;
  margin-inline: auto;
}

.manifesto__intro,
.manifesto__closing {
  display: grid;
  gap: 24px;
}

.manifesto__principles {
  margin-block: 48px;
}

.manifesto__principle {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 20px;
  padding: 32px 0;
  border-top: 1px solid var(--c-line);
}

.manifesto__principle > .mono {
  padding-top: 7px;
}

.manifesto__principle .h4 {
  margin-bottom: 16px;
}

.manifesto__closing {
  padding-top: 32px;
  border-top: 1px solid var(--c-line);
}

@media (max-width: 809px) {
  .manifesto {
    padding: 40px 16px;
  }

  .manifesto__principles {
    margin-block: 32px;
  }

  .manifesto__principle {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 12px;
    padding: 24px 0;
  }

  .manifesto__principle > .mono {
    padding-top: 4px;
  }
}

/* ---------- Appear on scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  .fx-ready [data-appear] {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(6px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
      filter 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .fx-ready [data-appear].is-in {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .orbit .hand {
    animation: none;
  }
}
