/* Grove — Editorial Organic design system */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,SOFT@9..144,300..900,30..100&family=JetBrains+Mono:wght@400;500;600&family=Inter:wght@400;450;500;600&display=swap');

:root {
  --paper: #eef0e6;
  --paper-2: #e6e9dc;
  --paper-3: #dde2d0;
  --ink: #18241e;
  --ink-2: #334036;
  --ink-3: #5f6d5f;
  --ink-4: #8a9589;
  --moss: #2d4a2d;
  --moss-bright: #3f6b3f;
  --sage: #8fa687;
  --line: rgba(24, 36, 30, 0.12);
  --line-2: rgba(24, 36, 30, 0.22);
  --serif: 'Fraunces', 'Times New Roman', serif;
  --mono: 'JetBrains Mono', 'Menlo', monospace;
  --sans: 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

[data-theme="dark"] {
  --paper: #0f1410;
  --paper-2: #151c17;
  --paper-3: #1c241f;
  --ink: #e8e2d1;
  --ink-2: #bfc8bb;
  --ink-3: #8a9589;
  --ink-4: #5c6a5c;
  --moss: #7ee787;
  --moss-bright: #9fee9b;
  --sage: #5a7a5a;
  --line: rgba(232, 226, 209, 0.12);
  --line-2: rgba(232, 226, 209, 0.22);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 380;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body {
  background-image:
    radial-gradient(ellipse 900px 400px at 15% 0%, rgba(63, 107, 63, 0.18), transparent 60%),
    radial-gradient(ellipse 600px 400px at 95% 20%, rgba(143, 166, 135, 0.14), transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
}

[data-theme="dark"] body {
  background-image:
    radial-gradient(ellipse 900px 400px at 15% 0%, rgba(126, 231, 135, 0.06), transparent 60%),
    radial-gradient(ellipse 600px 400px at 95% 20%, rgba(143, 166, 135, 0.04), transparent 60%);
}

/* Paper noise overlay */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.28;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='4'/><feColorMatrix values='0 0 0 0 0.08 0 0 0 0 0.14 0 0 0 0 0.10 0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
[data-theme="dark"] body::before { mix-blend-mode: screen; opacity: 0.18; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 380;
  letter-spacing: -0.025em;
  line-height: 1.04;
  color: var(--ink);
  font-variation-settings: "opsz" 144, "SOFT" 30;
}

a { color: inherit; text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--moss-bright); }

.container {
  max-width: 1680px;
  margin: 0 auto;
  padding: 0 56px;
}

/* ── Typography ── */
.serif { font-family: var(--serif); }
.mono { font-family: var(--mono); }
.sans { font-family: var(--sans); }

.italic-soft {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 80;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--moss-bright);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '§';
  font-family: var(--serif);
  font-size: 15px;
  color: var(--moss-bright);
  font-weight: 500;
  font-variation-settings: "opsz" 144, "SOFT" 30;
}

.mono-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ── Signature moves ── */
.hl-moss {
  box-shadow: inset 0 -0.22em 0 var(--moss);
  padding: 0 0.04em;
}
[data-theme="dark"] .hl-moss {
  box-shadow: inset 0 -0.22em 0 var(--moss);
}

.br-moss {
  color: var(--moss);
  position: relative;
  padding: 0 0.12em;
  white-space: nowrap;
}
.br-moss::before,
.br-moss::after {
  color: var(--moss-bright);
  font-family: var(--serif);
  font-variation-settings: "opsz" 144, "SOFT" 60;
  font-style: italic;
  font-weight: 500;
  display: inline-block;
  margin: 0 0.08em;
  transform: translateY(-0.02em);
}
.br-moss::before { content: '{'; }
.br-moss::after { content: '}'; }

/* ── Nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  background: color-mix(in oklab, var(--paper) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1680px;
  margin: 0 auto;
  padding: 14px 56px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 420;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  text-decoration: none;
}
.nav-logo:hover { color: var(--ink); }
.nav-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: block;
}
.nav-wordmark {
  height: 20px;
  width: auto;
  flex-shrink: 0;
  display: block;
}
[data-theme="dark"] .nav-wordmark { filter: brightness(1.7); }
.nav-crumb {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  margin-left: 4px;
  letter-spacing: 0.06em;
}
.nav-links {
  display: flex;
  gap: 2px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  background: var(--paper-2);
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 2px;
}
.nav-links a {
  padding: 7px 12px;
  cursor: pointer;
  border-radius: 1px;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, color 0.15s;
}
.nav-links a:hover { background: var(--paper-3); color: var(--ink); }
.nav-links a.active {
  background: var(--ink);
  color: var(--paper);
}
.nav-links a.active:hover { background: var(--ink); }
.nav-right {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: transform 0.15s var(--ease);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); color: var(--paper); }
.btn.ghost {
  background: transparent;
  color: var(--ink);
}
.btn.ghost:hover {
  background: var(--ink);
  color: var(--paper);
}
.btn-lg { padding: 11px 20px; font-size: 13px; }

/* Compact variant for nav */
.nav .btn {
  padding: 6px 12px;
  font-size: 11px;
  letter-spacing: 0.05em;
}

/* ── Theme toggle ── */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
  font-family: var(--mono);
}
.theme-toggle button {
  background: transparent;
  border: 0;
  padding: 4px 9px;
  color: var(--ink-3);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  line-height: 1.4;
}
.theme-toggle button.on {
  background: var(--ink);
  color: var(--paper);
}

/* ── Sections ── */
section { padding: 80px 0; position: relative; }

.section-label {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 40px;
  border-top: 1px solid var(--line-2);
  padding-top: 18px;
}
.section-label .num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--moss-bright);
  letter-spacing: 0.14em;
  font-weight: 500;
}
.section-label .title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 500;
}

.section-head {
  margin-bottom: 48px;
}
.section-head h2 {
  font-size: clamp(32px, 3.2vw, 48px);
  max-width: 18ch;
  margin-bottom: 16px;
}
.section-head .lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 52ch;
  font-weight: 450;
}

.rule { height: 1px; background: var(--line-2); width: 100%; margin: 40px 0; }

/* ── Page hero ── */
.page-hero {
  padding: 72px 0 60px;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 {
  font-size: clamp(40px, 4.8vw, 64px);
  line-height: 1.03;
  letter-spacing: -0.028em;
  margin: 18px 0 24px;
  max-width: 18ch;
}
.page-hero .lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 56ch;
  margin-bottom: 28px;
  font-weight: 450;
}
.page-hero-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Hero grid (home) ── */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 60px;
  align-items: start;
  padding: 56px 0 80px;
}
.hero-grid h1 {
  font-size: clamp(40px, 4.8vw, 62px);
  line-height: 1.03;
  letter-spacing: -0.028em;
  margin: 22px 0 28px;
}
.hero-grid .lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 48ch;
  margin-bottom: 24px;
  font-weight: 450;
}
.hero-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--ink-3);
  font-size: 11px;
  font-family: var(--mono);
  letter-spacing: 0.06em;
  margin-top: 24px;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta .bullet { color: var(--moss); }

/* ── Terminal showcase (CSS-native) ── */
.terminal {
  background: #0f1611;
  border: 1px solid #1e2820;
  border-radius: 4px;
  overflow: hidden;
  font-family: var(--mono);
  color: #d5ddd3;
  box-shadow: 0 40px 80px -30px rgba(24, 36, 30, 0.4),
    0 12px 24px -12px rgba(24, 36, 30, 0.3);
}
.term-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #16201a;
  border-bottom: 1px solid #1e2820;
  font-size: 11px;
}
.term-chrome .d {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.d.red { background: #d35646; }
.d.yel { background: #d3a53e; }
.d.grn { background: #5b9b40; }
.term-title {
  color: #7a8a7a;
  font-size: 11px;
  margin-left: 8px;
  letter-spacing: 0.04em;
}
.term-branch {
  color: #7ee787;
  font-family: var(--mono);
  font-size: 11px;
  margin-left: 6px;
}
.term-badge {
  margin-left: auto;
  background: #223226;
  color: #7ee787;
  padding: 2px 8px;
  font-size: 10px;
  border-radius: 2px;
  letter-spacing: 0.1em;
}
.term-body {
  padding: 22px 24px;
  font-size: 13px;
  line-height: 1.8;
  min-height: 340px;
}
.t-prompt { color: #7ee787; }
.t-dim { color: #5a6b5a; }
.t-caret {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: #7ee787;
  vertical-align: middle;
  margin-left: 3px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.tree-head {
  color: #7a877a;
  font-size: 11px;
  letter-spacing: 0.1em;
  margin: 14px 0 6px;
}
.tree-row {
  display: grid;
  grid-template-columns: 24px 118px 16px 64px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 5px 0;
  font-size: 12.5px;
}
.tr-gly { color: #5a6b5a; font-family: var(--mono); }
.tr-br { color: #d5ddd3; }
.tr-ar { color: #5a6b5a; }
.a-cl { color: #e3b94b; font-weight: 500; }
.a-cx { color: #7ee787; font-weight: 500; }
.a-gm { color: #e07a4a; font-weight: 500; }
.a-cu { color: #a78bfa; font-weight: 500; }
.tr-task {
  color: #8ea38e;
  font-style: italic;
  font-family: var(--serif);
  font-size: 13px;
  font-variation-settings: "opsz" 144, "SOFT" 80;
}
.tr-st {
  font-size: 11px;
  color: #8ea38e;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.st-ok { color: #7ee787; }
.spin {
  display: inline-block;
  width: 8px;
  height: 8px;
  border: 1.5px solid #3a4a3f;
  border-top-color: #7ee787;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Figure + asset placeholder ── */
figure { margin: 0; }
figcaption {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  align-items: baseline;
  color: var(--ink-3);
  font-size: 13px;
}
figcaption .cap-num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  flex-shrink: 0;
}
figcaption .cap-text {
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 80;
  color: var(--ink-2);
}

.asset-shot {
  position: relative;
  margin: 0;
}
.asset-shot > img,
.asset-shot > video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 var(--line-2), 0 24px 48px -24px rgba(24, 36, 30, 0.18);
  background: var(--paper-2);
  overflow: hidden;
}
.asset-shot.asset-diagram > img {
  border: none;
  box-shadow: none;
  background: transparent;
  border-radius: 0;
}

/* ── Device shells (hero collage) ── */
.surfaces-collage {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 28px 32px;
  margin: 32px 0 12px;
  align-items: start;
}
.shell {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 var(--line-2), 0 24px 48px -28px rgba(24, 36, 30, 0.18);
}
.shell .chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: var(--paper-3);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
}
.shell .chrome .tl {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}
.shell .chrome .tl:nth-child(1) { background: #e06c5c; }
.shell .chrome .tl:nth-child(2) { background: #e5b441; }
.shell .chrome .tl:nth-child(3) { background: #3f6b3f; }
.shell .chrome .url {
  flex: 1;
  text-align: center;
  letter-spacing: 0.4px;
}
.shell img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--paper-2);
}
.shell-browser {
  grid-column: 1;
  grid-row: 1 / 3;
}
.shell-phone {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  max-width: 320px;
  border: 2px solid var(--ink);
  border-radius: 34px;
  padding: 0;
  overflow: hidden;
}
.shell-phone img {
  border-radius: 30px;
}
.shell-terminal {
  grid-column: 2;
  grid-row: 2;
  background: #0f1611;
  border-color: #1e2820;
}
.shell-terminal .chrome {
  background: #18241e;
  border-bottom-color: #1e2820;
  color: #c8d3bf;
}
.shell-terminal img {
  background: #0f1611;
}
.collage-caption {
  margin-top: 18px;
  color: var(--ink-3);
  font-size: 13px;
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.collage-caption .num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  flex-shrink: 0;
}
.collage-caption .text {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-2);
}

@media (max-width: 900px) {
  .surfaces-collage {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .shell-browser { grid-column: 1; grid-row: 1; }
  .shell-phone { grid-column: 1; grid-row: 2; }
  .shell-terminal { grid-column: 1; grid-row: 3; }
}

.asset-placeholder {
  position: relative;
}
.asset-placeholder .ap-frame {
  position: relative;
  background: var(--paper-2);
  border: 1.5px dashed var(--line-2);
  border-radius: 4px;
  padding: 24px;
  aspect-ratio: var(--ap-ratio, 3 / 2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.asset-placeholder .ap-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent 0,
      transparent 20px,
      rgba(24, 36, 30, 0.04) 20px,
      rgba(24, 36, 30, 0.04) 21px
    );
  pointer-events: none;
}
.asset-placeholder .ap-label {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  position: relative;
  z-index: 1;
}
.asset-placeholder .ap-id {
  color: var(--ink);
  background: var(--paper);
  padding: 3px 8px;
  border-radius: 2px;
  border: 1px solid var(--line);
}
.asset-placeholder .ap-dims {
  color: var(--ink-3);
}
.asset-placeholder .ap-kind {
  color: var(--moss-bright);
  font-weight: 600;
}
.asset-placeholder .ap-hint {
  color: var(--ink-3);
  font-style: italic;
  font-family: var(--serif);
  font-variation-settings: "opsz" 144, "SOFT" 80;
  font-size: 15px;
  line-height: 1.4;
  max-width: 50ch;
  position: relative;
  z-index: 1;
}

/* Screenshot frame (for real images or placeholders that want chrome) */
.shot {
  border: 1px solid var(--line-2);
  border-radius: 4px;
  overflow: hidden;
  background: var(--paper-2);
}
.shot-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--paper-3);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}
.shot-chrome .d {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-2);
}

/* ── Cards ── */
.cards {
  display: grid;
  gap: 24px;
}
.cards.c-2 { grid-template-columns: repeat(2, 1fr); }
.cards.c-3 { grid-template-columns: repeat(3, 1fr); }
.cards.c-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 24px;
  transition: border-color 0.2s var(--ease);
}
.card:hover { border-color: var(--line-2); }
.card h3 {
  font-size: 20px;
  margin-bottom: 8px;
  line-height: 1.2;
}
.card .card-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--moss-bright);
  margin-bottom: 14px;
  display: block;
}
.card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
}

/* ── Persona card ── */
.persona {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.persona .p-mark {
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1;
  color: var(--moss-bright);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.persona h3 {
  font-size: 22px;
  line-height: 1.15;
}
.persona .p-role {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.persona p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
  flex-grow: 1;
}
.persona .p-example {
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 80;
  font-size: 14px;
  color: var(--ink-3);
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* ── Feature detail block (image + text side by side) ── */
.feature {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: center;
  padding: 60px 0;
}
.feature.reverse { grid-template-columns: 1.1fr 1fr; }
.feature.reverse .feat-copy { order: 2; }
.feature.reverse .feat-visual { order: 1; }
.feat-copy h3 {
  font-size: clamp(26px, 2.4vw, 32px);
  margin: 14px 0 18px;
  max-width: 16ch;
}
.feat-copy .feat-lede {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  margin-bottom: 18px;
  font-weight: 450;
}
.feat-copy ul {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
}
.feat-copy ul li {
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-2);
  display: flex;
  gap: 10px;
}
.feat-copy ul li::before {
  content: '▸';
  color: var(--moss-bright);
  flex-shrink: 0;
  font-family: var(--mono);
}

/* ── Agent grid ── */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.agent-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 28px 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  transition: border-color 0.2s var(--ease);
}
.agent-card:hover { border-color: var(--line-2); }
.agent-card .agent-icon {
  grid-row: 1 / 3;
  width: 28px;
  height: 28px;
  display: block;
  align-self: center;
}
.agent-name {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 420;
  line-height: 1.2;
  font-variation-settings: "opsz" 144, "SOFT" 30;
}
.agent-meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.agent-card.custom {
  background: transparent;
  border-style: dashed;
}
.agent-card.custom .agent-name { color: var(--moss-bright); }
.agent-card .custom-mark {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--moss-bright);
  text-align: center;
  line-height: 28px;
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 60;
}

/* ── Footer / prev-next ── */
.page-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 48px 0;
  border-top: 1px solid var(--line-2);
}
.page-nav a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-2);
  transition: border-color 0.2s var(--ease);
}
.page-nav a:hover { border-color: var(--line-2); color: var(--ink); }
.page-nav a .pn-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.page-nav a .pn-title {
  font-family: var(--serif);
  font-size: 22px;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  font-weight: 420;
  line-height: 1.1;
}
.page-nav a .pn-sub {
  font-size: 13px;
  color: var(--ink-3);
  font-style: italic;
  font-family: var(--serif);
  font-variation-settings: "opsz" 144, "SOFT" 80;
}
.page-nav a.next { text-align: right; align-items: flex-end; }

.footer {
  padding: 40px 0 60px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 13px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-links {
  display: flex;
  gap: 20px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}
.footer-copy {
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 80;
}

/* ── Marquee (trust strip) ── */
.marquee {
  overflow: hidden;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex;
  gap: 48px;
  animation: marquee 40s linear infinite;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}
.marquee-track span { display: inline-flex; align-items: center; gap: 8px; }
.marquee-track span img { display: block; flex-shrink: 0; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ── Manifesto closer ── */
.manifesto {
  padding: 120px 0 100px;
  text-align: left;
  border-top: 1px solid var(--line-2);
}
.manifesto h2 {
  font-size: clamp(64px, 9vw, 128px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 360;
  margin-bottom: 32px;
  max-width: 16ch;
  font-variation-settings: "opsz" 144, "SOFT" 30;
}
.manifesto .m-caption {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--ink-3);
  font-variation-settings: "opsz" 144, "SOFT" 80;
  max-width: 50ch;
  margin-bottom: 32px;
}

/* ── Motion ── */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

[data-animate] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-animate].in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ── Selection ── */
::selection { background: var(--moss); color: var(--paper); }
[data-theme="dark"] ::selection { background: var(--moss); color: var(--paper); }

/* ── Code inline ── */
code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--paper-3);
  padding: 1px 6px;
  border-radius: 2px;
  color: var(--ink);
}
pre {
  font-family: var(--mono);
  background: var(--paper-3);
  color: var(--ink);
  padding: 14px 16px;
  border-radius: 4px;
  overflow-x: auto;
  max-width: 100%;
  font-size: 12px;
  line-height: 1.6;
  border: 1px solid var(--line);
  white-space: pre;
  word-break: normal;
}
pre code {
  background: transparent;
  padding: 0;
  color: inherit;
  white-space: pre;
  display: block;
}
/* Cards containing pre should clamp the pre to card width */
.card pre { font-size: 11px; padding: 12px 14px; }
.card pre code { word-break: break-all; white-space: pre-wrap; }

/* ── Responsive ── */
@media (max-width: 960px) {
  .container { padding: 0 24px; }
  .nav-inner { padding: 12px 24px; gap: 16px; }
  .nav-links { font-size: 11px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .feature, .feature.reverse {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 40px 0;
  }
  .feature.reverse .feat-copy,
  .feature.reverse .feat-visual { order: initial; }
  .cards.c-3, .cards.c-4 { grid-template-columns: 1fr; }
  .cards.c-2 { grid-template-columns: 1fr; }
  .page-nav { grid-template-columns: 1fr; }
  .page-nav a.next { text-align: left; align-items: flex-start; }
  section { padding: 56px 0; }
}

@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-crumb { display: none; }
  .hero-grid h1, .page-hero h1 { font-size: clamp(36px, 8vw, 48px); }
  .manifesto h2 { font-size: clamp(52px, 12vw, 88px); }
  .tree-row { grid-template-columns: 18px 1fr; gap: 6px; font-size: 11px; }
  .tree-row .tr-ar, .tree-row .tr-st { display: none; }
}
