/* ──────────────────────────────────────────────────────────────────────────
   stackplay docs · editorial-terminal
   typography: Instrument Serif (display + prose) / JetBrains Mono (UI · code)
   themes: light "warm paper" / dark "terminal-native"
   ─────────────────────────────────────────────────────────────────────── */

:root {
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", "Menlo", "Consolas",
    "Liberation Mono", monospace;

  --radius: 4px;
  --rule-w: 1px;
  --container: 1200px;
  --gap: clamp(20px, 3.4vw, 48px);

  --easing: cubic-bezier(0.2, 0.7, 0.2, 1);
}

html[data-theme="light"] {
  color-scheme: light;
  --paper: #f4efe2;
  --paper-soft: #ece5d2;
  --ink: #141210;
  --ink-soft: #2c2823;
  --muted: #6b6256;
  --line: #c9bfa6;
  --line-soft: #ddd2b6;
  --code-bg: #181513;
  --code-ink: #f0e7cf;
  --code-line: #29241f;
  --code-muted: #a39882;
  --accent: #156b3a;
  --accent-ink: #f4efe2;
  --warn: #b25b15;
  --danger: #a4321e;
  --selection: rgba(21, 107, 58, 0.22);
  --shadow: 0 22px 60px -28px rgba(20, 18, 16, 0.45);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0d0e0c;
  --paper-soft: #14150f;
  --ink: #f0eada;
  --ink-soft: #ddd5bf;
  --muted: #8c8470;
  --line: #2a2a23;
  --line-soft: #1c1c17;
  --code-bg: #050605;
  --code-ink: #ebe4cf;
  --code-line: #1a1a14;
  --code-muted: #6f6852;
  --accent: #36d77a;
  --accent-ink: #06170d;
  --warn: #f1a653;
  --danger: #ee6e57;
  --selection: rgba(54, 215, 122, 0.22);
  --shadow: 0 30px 70px -32px rgba(0, 0, 0, 0.85);
}

* { box-sizing: border-box; }

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

::selection { background: var(--selection); color: var(--ink); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.55;
  font-feature-settings: "ss02", "ss03", "kern";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(
      circle at 20% -10%,
      color-mix(in oklab, var(--accent) 7%, transparent) 0%,
      transparent 45%
    ),
    radial-gradient(
      circle at 110% 110%,
      color-mix(in oklab, var(--ink) 6%, transparent) 0%,
      transparent 50%
    );
}

a { color: inherit; text-decoration: none; }
a:focus-visible,
button:focus-visible {
  outline: 2px dashed var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius);
}

/* ── grain overlay ──────────────────────────────────────────────────────── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  opacity: 0.07;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
html[data-theme="dark"] body::before { mix-blend-mode: screen; opacity: 0.06; }

/* ── topbar ─────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 48px);
  background: color-mix(in oklab, var(--paper) 86%, transparent);
  border-bottom: var(--rule-w) solid var(--line);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.brand-mark {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  width: 14px;
}
.brand-mark span {
  display: block;
  height: 2px;
  background: var(--ink);
  transform-origin: left;
}
.brand-mark span:nth-child(1) { width: 100%; }
.brand-mark span:nth-child(2) { width: 70%; background: var(--accent); }
.brand-mark span:nth-child(3) { width: 40%; }
.brand-name {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.brand-version {
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

nav[aria-label="Primary"] {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
nav[aria-label="Primary"] a {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 12px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
  border-radius: var(--radius);
  transition: color 0.15s var(--easing), background 0.15s var(--easing);
}
nav[aria-label="Primary"] a:hover {
  color: var(--ink);
  background: color-mix(in oklab, var(--ink) 7%, transparent);
}
.nav-num {
  font-size: 10.5px;
  color: var(--accent);
  letter-spacing: 0.1em;
}

/* theme toggle */
.theme-toggle {
  margin-left: 8px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  cursor: pointer;
  transition: border-color 0.15s var(--easing);
}
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 56px;
  height: 24px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--ink) 6%, transparent);
}
.theme-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--ink);
  transition: transform 0.25s var(--easing);
}
.theme-toggle[aria-pressed="true"] .theme-toggle-thumb {
  transform: translateX(32px);
  background: var(--accent);
}
.theme-toggle-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-family: var(--mono);
  color: var(--muted);
  pointer-events: none;
}
.theme-toggle-icon--sun  { left: 8px;  }
.theme-toggle-icon--moon { right: 8px; }

/* ── main ───────────────────────────────────────────────────────────────── */
main {
  width: min(var(--container), calc(100% - clamp(24px, 5vw, 64px)));
  margin: 0 auto;
}

/* ── hero ───────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: clamp(40px, 8vh, 96px) 0 clamp(36px, 6vh, 72px);
  border-bottom: var(--rule-w) solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 60px minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: var(--gap);
  align-items: start;
}

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  align-self: stretch;
  border-right: 1px dashed var(--line);
  padding-right: 10px;
}
.meta-line { white-space: nowrap; }

.hero-copy { min-width: 0; padding-top: 4px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  padding: 4px 10px 4px 4px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-soft);
}
.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent);
  animation: pulse 2.4s var(--easing) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent); }
  50%      { box-shadow: 0 0 0 6px color-mix(in oklab, var(--accent) 0%,  transparent); }
}

h1 {
  margin: 0;
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(46px, 7vw, 100px);
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--ink);
}
h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.lede {
  max-width: 58ch;
  margin: 26px 0 30px;
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--ink-soft);
  letter-spacing: -0.005em;
}
.lede code {
  font-family: var(--mono);
  font-size: 0.78em;
  padding: 1px 6px;
  background: var(--paper-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

/* install strip */
.install-strip {
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex-wrap: wrap;
  margin: 26px 0 18px;
}

.support {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 18%, transparent);
}

/* ── copy buttons ───────────────────────────────────────────────────────── */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--code-bg);
  color: var(--code-ink);
  border: 1px solid var(--code-line);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 13.5px;
  letter-spacing: 0.005em;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition:
    transform 0.15s var(--easing),
    border-color 0.15s var(--easing),
    background 0.15s var(--easing);
  max-width: 100%;
}
.copy-btn code {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--mono);
  color: var(--code-ink);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.copy-btn code::-webkit-scrollbar { display: none; }
.copy-btn .prompt {
  flex-shrink: 0;
  color: var(--accent);
  font-weight: 500;
  user-select: none;
}
.copy-btn .copy-state {
  flex-shrink: 0;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--code-line);
  border-radius: 999px;
  color: var(--code-muted);
  background: color-mix(in oklab, var(--code-ink) 4%, transparent);
  transition: color 0.2s var(--easing), border-color 0.2s var(--easing);
}
.copy-btn:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.copy-btn:hover .copy-state {
  color: var(--accent);
  border-color: var(--accent);
}
.copy-btn[data-state="copied"] .copy-state {
  color: var(--accent);
  border-color: var(--accent);
}
.copy-btn[data-state="err"] .copy-state {
  color: var(--danger);
  border-color: var(--danger);
}

.install-copy {
  flex: 1 1 380px;
  min-width: 0;
  font-size: 14.5px;
  padding: 14px 16px;
}

.copy-btn--xl {
  flex: 1 1 420px;
  font-size: 16px;
  padding: 18px 20px;
}

/* ghost buttons */
.ghost-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--paper-soft);
  transition: background 0.15s var(--easing), border-color 0.15s var(--easing), transform 0.15s var(--easing);
}
.ghost-btn:hover {
  border-color: var(--ink);
  background: var(--paper);
  transform: translateY(-1px);
}
.ghost-btn--xl {
  padding: 18px 24px;
  font-size: 14px;
  letter-spacing: 0.06em;
}

/* ── terminal ───────────────────────────────────────────────────────────── */
.terminal {
  margin: 0;
  border: 1px solid var(--code-line);
  border-radius: 6px;
  background: var(--code-bg);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.terminal::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    transparent 0,
    transparent 3px,
    rgba(255, 255, 255, 0.018) 3px,
    rgba(255, 255, 255, 0.018) 4px
  );
  mix-blend-mode: overlay;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  background: #1f1c18;
  border-bottom: 1px solid var(--code-line);
}
html[data-theme="dark"] .terminal-bar { background: #0f100c; }

.dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  display: inline-block;
}
.dot--r { background: #d36050; }
.dot--y { background: #d8a23a; }
.dot--g { background: #58a564; }

.terminal-title {
  margin-left: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: #a39682;
  letter-spacing: 0.04em;
}

.terminal-body {
  margin: 0;
  padding: 22px;
  min-height: 360px;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--code-ink);
  overflow: auto;
  white-space: pre;
  position: relative;
}
.terminal-body code { font-family: inherit; color: inherit; }
.terminal-body .ln          { display: inline; }
.terminal-body .ln--cmd     { color: var(--code-ink); }
.terminal-body .ln-prompt   { color: var(--accent); margin-right: 10px; }
.terminal-body .ln--json    { color: #cfc4a8; }
.terminal-body .ln--ok      { color: var(--accent); }
.terminal-body .ln--dim     { color: var(--code-muted); }

.cursor {
  display: inline-block;
  vertical-align: -2px;
  width: 8px;
  height: 16px;
  margin-left: 2px;
  background: var(--accent);
  animation: blink 1.05s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

/* hero rule */
.hero-rule {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: clamp(48px, 8vh, 96px);
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-rule-line {
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}

/* ── section heads ──────────────────────────────────────────────────────── */
.band {
  position: relative;
  padding: clamp(48px, 9vh, 96px) 0;
  border-bottom: 1px solid var(--line);
}
.band:last-of-type { border-bottom: 0; }

.section-head {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  column-gap: var(--gap);
  row-gap: 14px;
  margin-bottom: clamp(28px, 4vh, 56px);
  align-items: start;
}
.section-num {
  grid-row: 1 / span 3;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
  padding-top: 10px;
  border-right: 1px dashed var(--line);
  padding-right: 10px;
  text-align: right;
  height: 100%;
}
.section-head .eyebrow {
  margin: 0;
  align-self: start;
}
.section-head h2 {
  grid-column: 2;
  margin: 0;
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.04;
  letter-spacing: -0.03em;
}
.section-head h2 em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.section-blurb {
  grid-column: 2;
  max-width: 62ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.005em;
}
.section-blurb code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 1px 6px;
  background: var(--paper-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}
.section-blurb a {
  border-bottom: 1px solid var(--line);
  transition: border-color 0.15s var(--easing);
}
.section-blurb a:hover { border-color: var(--accent); color: var(--accent); }

/* ── steps ──────────────────────────────────────────────────────────────── */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}
.step {
  position: relative;
  padding: 28px 28px 28px 0;
  border-bottom: 1px solid var(--line);
}
.step + .step {
  padding-left: clamp(20px, 2.4vw, 36px);
  border-left: 1px dashed var(--line);
}

.step-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.step-num {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--accent);
  padding: 4px 8px;
  background: color-mix(in oklab, var(--accent) 12%, transparent);
  border-radius: var(--radius);
}
.step-rule {
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}

.step h3 {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.step p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
  max-width: 36ch;
}
.step .copy-btn { width: 100%; }

/* ── commands layout ────────────────────────────────────────────────────── */
.commands-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.cli-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13.5px;
}
.cli-table tr { transition: background 0.15s var(--easing); }
.cli-table tr:hover {
  background: color-mix(in oklab, var(--accent) 5%, transparent);
}
.cli-table td {
  padding: 16px 12px 16px 0;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.cli-cmd {
  width: 48%;
  font-family: var(--mono);
  color: var(--ink);
  white-space: normal;
}
.cli-cmd code {
  font-family: var(--mono);
  font-weight: 500;
  background: transparent;
}
.cli-cmd em {
  font-style: normal;
  color: var(--accent);
  font-weight: 400;
}
.cli-desc {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink-soft);
  padding-left: 24px;
  border-left: 1px dashed var(--line);
  line-height: 1.5;
  letter-spacing: -0.005em;
}

/* install aside */
.install-aside {
  position: sticky;
  top: 90px;
  padding: 28px 24px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.install-aside header {
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--line);
}
.aside-tag {
  display: inline-block;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.install-aside h3 {
  margin: 0;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.copy-block + .copy-block { margin-top: 16px; }
.copy-label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.copy-block .copy-btn {
  width: 100%;
  font-size: 12.5px;
  padding: 10px 12px;
}

.aside-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s var(--easing), color 0.15s var(--easing);
}
.aside-link:hover { border-color: var(--accent); color: var(--accent); }

/* ── config ─────────────────────────────────────────────────────────────── */
.code-figure {
  margin: 0;
  border: 1px solid var(--code-line);
  border-radius: 6px;
  background: var(--code-bg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.code-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 11.5px;
  background: #1f1c18;
  border-bottom: 1px solid var(--code-line);
  color: #a39682;
}
html[data-theme="dark"] .code-caption { background: #0f100c; }
.code-file { color: var(--code-ink); letter-spacing: 0.02em; }
.code-meta { letter-spacing: 0.16em; text-transform: uppercase; }

.code-figure pre {
  margin: 0;
  padding: 26px 28px;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.75;
  color: var(--code-ink);
  overflow-x: auto;
}
.tk-key { color: #d6b772; }
.tk-str { color: var(--accent); }
.tk-val { color: #c66e5b; }
.tk-num { color: #d8a23a; }
html[data-theme="light"] .tk-str { color: #5fc587; }

/* ── duo (agents · replaces) ────────────────────────────────────────────── */
.duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}
.duo-card {
  padding: 36px clamp(24px, 3vw, 44px);
  border-bottom: 1px solid var(--line);
}
.duo-card + .duo-card { border-left: 1px dashed var(--line); }

.duo-card header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 20px;
}
.duo-num {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 4px 8px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
}
.duo-card h3 {
  margin: 0;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.duo-card p {
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.55;
  max-width: 42ch;
}

.agent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.agent-list .copy-btn {
  width: 100%;
  font-size: 12.5px;
  padding: 10px 12px;
}

.replaces-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 24px;
}
.replaces-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 0;
  font-family: var(--mono);
  font-size: 13.5px;
  border-bottom: 1px dashed var(--line-soft);
}
.replaces-list li span {
  color: var(--accent);
  font-family: var(--mono);
}

/* ── closer ─────────────────────────────────────────────────────────────── */
.closer {
  text-align: left;
}
.closer .section-head h2 {
  font-size: clamp(36px, 4.8vw, 68px);
  letter-spacing: -0.035em;
}
.closer-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  padding-left: calc(60px + var(--gap));
}

/* ── footer ─────────────────────────────────────────────────────────────── */
footer {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 36px clamp(24px, 5vw, 64px) 56px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
  background: color-mix(in oklab, var(--paper-soft) 80%, transparent);
}
.footer-row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.footer-mark {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.06em;
}
.footer-rule {
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
}
.footer-links a {
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 0.15s var(--easing), border-color 0.15s var(--easing);
}
.footer-links a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── stagger reveal ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .eyebrow,
  h1,
  .lede,
  .install-strip,
  .support,
  .terminal,
  .hero-meta {
    animation: rise 0.7s var(--easing) both;
  }
  h1            { animation-delay: 0.04s; }
  .lede         { animation-delay: 0.10s; }
  .install-strip{ animation-delay: 0.14s; }
  .support      { animation-delay: 0.18s; }
  .terminal     { animation-delay: 0.22s; }
  .hero-meta    { animation-delay: 0.26s; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.95fr);
  }
  .hero-meta { display: none; }
  .commands-layout { grid-template-columns: 1fr; }
  .install-aside { position: static; }
}

@media (max-width: 880px) {
  .topbar {
    padding: 12px clamp(16px, 4vw, 28px);
  }
  nav[aria-label="Primary"] { gap: 0; }
  nav[aria-label="Primary"] a { padding: 6px 10px; }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .section-head {
    grid-template-columns: 1fr;
    row-gap: 12px;
  }
  .section-num {
    grid-row: auto;
    border-right: 0;
    border-bottom: 1px dashed var(--line);
    padding: 0 0 8px;
    text-align: left;
  }
  .section-head h2,
  .section-blurb { grid-column: 1; }

  .steps { grid-template-columns: 1fr; }
  .step + .step {
    padding-left: 0;
    border-left: 0;
    border-top: 1px dashed var(--line);
  }

  .duo { grid-template-columns: 1fr; }
  .duo-card + .duo-card {
    border-left: 0;
    border-top: 1px dashed var(--line);
  }

  .closer-cta { padding-left: 0; }
}

@media (max-width: 560px) {
  body { font-size: 17px; }
  .terminal-body { font-size: 12px; padding: 16px; }
  .copy-btn { font-size: 12.5px; padding: 10px 12px; }
  .install-copy { font-size: 13px; padding: 12px 14px; }
  .copy-btn--xl { font-size: 14px; padding: 14px 16px; }
  .replaces-list { grid-template-columns: 1fr; }
  .cli-cmd, .cli-desc {
    display: block;
    width: 100%;
    padding-left: 0;
    border-left: 0;
  }
  .cli-cmd  { padding-bottom: 4px; }
  .cli-desc { padding-bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .cursor { animation: none; opacity: 1; }
}
