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

/* Global reduced-motion guard. Individual elements (e.g. .sigil,
   .scroll-hint) also have explicit per-rule overrides for redundancy. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

:root {
  --bg:           #0A0A0F;
  --bg-raised:    #101015;
  --bg-surface:   #15151D;
  --text:         #ECECEE;
  --text-dim:     #A8A8B0;            /* body copy on dark cards */
  --text-muted:   #71717A;
  --text-subtle:  #52525B;            /* tertiary lines */
  --accent:       #7DF0FF;            /* softer cyan, reserved for primary action + accent moments */
  --accent-dim:   rgba(125, 240, 255, 0.10);
  --accent-glow:  rgba(125, 240, 255, 0.15);
  --accent-dimer: rgba(125, 240, 255, 0.04);
  --border:       rgba(255, 255, 255, 0.06);
  --border-hi:    rgba(255, 255, 255, 0.10);
  --border-accent: rgba(125, 240, 255, 0.20);
  --radius: 12px;
  --max-w: 1080px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-feature-settings: 'ss01', 'ss02', 'cv11';
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code, pre, .mono {
  font-family: 'Geist Mono', 'SF Mono', 'Fira Code', 'Roboto Mono', monospace;
  font-feature-settings: 'calt', 'liga';
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.15s;
}
a:hover { opacity: 0.8; }

/* ---- NAV ---- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.12em;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); opacity: 1; }
.nav-links a.active { color: var(--accent); }

/* B1: nav actions — GitHub + primary CTA, grouped right of the links */
.nav-inner { gap: 20px; }
.nav-links { margin-left: auto; }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.nav-github {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  transition: color 0.15s;
}
.nav-github:hover { color: var(--text); opacity: 1; }
.nav-cta {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  background: var(--accent);
  color: #0A0A0F;
  box-shadow: 0 0 0 1px var(--accent), 0 6px 18px rgba(125, 240, 255, 0.18);
  transition: transform 0.15s, box-shadow 0.15s;
}
.nav-cta:hover { opacity: 1; transform: translateY(-1px); }
@media (max-width: 480px) { .nav-cta { display: none; } }

/* B1: keep fixed-nav anchor targets clear of the 56px bar */
section[id] { scroll-margin-top: 72px; }

/* ---- HERO ---- */
.hero {
  position: relative;
  padding: 88px 24px 56px;     /* B4: tightened from 112/72 */
  text-align: center;
  max-width: var(--max-w);
  margin: 0 auto;
}

/* Soft radial glow behind the logo. Replaces the inline drop-shadow()
   on the <img> which blurred the asset edges. */
.hero::before {
  content: '';
  position: absolute;
  top: 60px;
  left: 50%;
  width: 720px;
  height: 480px;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(ellipse at center,
    rgba(125, 240, 255, 0.07),
    rgba(125, 240, 255, 0.02) 35%,
    transparent 65%);
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }

.hero .sigil {
  display: block;
  margin: 0 auto 20px;          /* B4: was 28 */
  width: 64px;
  height: 64px;
  animation: sigil-rotate 60s linear infinite;
}
@keyframes sigil-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .hero .sigil { animation: none; }
}

.hero .tagline-mono {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--text-subtle);
  letter-spacing: 0.02em;
  margin: 0 0 28px;             /* B4: was 36 */
}

.hero h1 {
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 16px;          /* B4: was 20 */
}

.hero h1 .accent {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.04em;
  color: var(--accent);
}

.hero .subtitle {
  font-size: clamp(16px, 2.5vw, 19px);
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 28px;          /* B4: was 36 */
  line-height: 1.6;
}

.cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;          /* B4: was 64 */
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #0A0A0F;
  box-shadow: 0 0 0 1px var(--accent), 0 8px 24px rgba(125, 240, 255, 0.20);
  transition: transform 150ms, box-shadow 150ms;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px var(--accent), 0 12px 32px rgba(125, 240, 255, 0.28);
  opacity: 1;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-hi);
}
.btn-secondary:hover {
  border-color: var(--text-muted);
}

/* Stats */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.stat {
  padding: 16px 12px;          /* B4: trim stat-bar height to lift the demo toward the fold */
  text-align: center;
  border-right: 1px solid var(--border);
}
.stat:last-child { border-right: none; }

.stat-value {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  white-space: nowrap;
}

/* Mono variant for the "REST + MCP + CLI" integrations stat — fits the
   longer label without breaking the 4-col grid. */
.stat-value.mono {
  font-family: 'Geist Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* B3: "works with" compatibility strip — restrained, monochrome */
.compat {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 8px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.compat__label {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-subtle);
}
.compat__logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.compat__logos > * {
  font-family: 'Geist', sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: var(--text-muted);
  opacity: 0.7;
  transition: opacity 0.15s, color 0.15s;
}
.compat__logos > *:hover { opacity: 1; color: var(--text); }
@media (max-width: 480px) { .compat__logos { gap: 24px; } }

/* ---- SECTIONS ---- */
section {
  padding: 88px 32px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-label {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 500;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
  line-height: 1.15;
}

.section-desc {
  color: var(--text-dim);
  font-size: 16px;
  max-width: 640px;
  margin-bottom: 40px;
  line-height: 1.65;
}

/* C1: change-of-pace — center one section's intro block (applied to Pricing) */
.section--centered .section-label,
.section--centered .section-title,
.section--centered .section-desc { text-align: center; }
.section--centered .section-desc { margin-left: auto; margin-right: auto; }

/* ---- TERMINAL ---- */
.terminal {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 24px 48px -16px rgba(0, 0, 0, 0.5);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* Copy button anchored to the right of the terminal bar (Browserbase-style
   curl-as-CTA). Sits inline with the dots + title; doesn't disrupt vertical
   rhythm. */
.terminal-copy-btn {
  margin-left: auto;
}

/* Page summary at the top of every doc page. Mirrors the canonical
   x402.org pattern: one-line `> ` blockquote summary directly under the
   h1 so agents (and humans) get the page's purpose in a single read. */
.docs-page blockquote.page-summary {
  margin: 0 0 32px;
  padding: 14px 18px;
  border-left: 2px solid var(--border-accent);
  background: var(--accent-dimer);
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
  border-radius: 0 6px 6px 0;
}
.docs-page blockquote.page-summary p {
  margin: 0;
}

.terminal-body {
  padding: 20px 24px;
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
}

.terminal-body pre {
  white-space: pre;
  color: var(--text-muted);
}

.t-prompt  { color: var(--accent); }
.t-cmd     { color: var(--text); }
.t-flag    { color: #C4B5FD; }
.t-str     { color: #86EFAC; }
.t-key     { color: #93C5FD; }
.t-num     { color: #FBBF24; }
.t-brace   { color: var(--text-muted); }
.t-comment { color: var(--text-subtle); font-style: italic; }

/* ---- HERO SPLIT ----
   Two-pane request → response artifact for the "Search once. One ranked
   list." section. Pure CSS-grid + static markup; the connector arrow
   sits in the column gap with a page-bg fill ring so the seam breaks
   cleanly around it. Reuses .t-* token classes inside the request body
   for visual continuity with the rest of the page. */
.hero-split {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 24px;
}

.hero-split__pane {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 24px 48px -16px rgba(0, 0, 0, 0.5);
}

.hero-split__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
}
.hero-split__bar .copy-btn { margin-left: auto; }

.hero-split__method,
.hero-split__status {
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.hero-split__method {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--border-accent);
}
.hero-split__status {
  background: rgba(134, 239, 172, 0.10);
  color: #86EFAC;
  border: 1px solid rgba(134, 239, 172, 0.20);
}
.hero-split__path {
  color: var(--text-muted);
}

.hero-split__body {
  padding: 18px 22px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
  font-family: 'Geist Mono', monospace;
  flex: 1;
  margin: 0;
  white-space: pre;
  overflow-x: auto;
}

.hero-split__results {
  list-style: none;
  margin: 0;
  padding: 14px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-split__row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: baseline;
  padding: 8px 12px;
  border-radius: 6px;
  font-family: 'Geist Mono', monospace;
  font-size: 12.5px;
  color: var(--text-dim);
}
.hero-split__row--top {
  background: var(--accent-dimer);
  border: 1px solid var(--border-accent);
  color: var(--text);
}

.hero-split__rank {
  color: var(--accent);
  font-weight: 600;
}
.hero-split__name {
  color: var(--text);
  font-weight: 500;
}
.hero-split__row:not(.hero-split__row--top) .hero-split__name {
  color: var(--text-dim);
}
.hero-split__pub {
  color: var(--text-muted);
  font-size: 11px;
  margin-left: 6px;
}
.hero-split__score {
  color: var(--accent);
  font-feature-settings: 'tnum';
  text-align: right;
}
.hero-split__row:not(.hero-split__row--top) .hero-split__score {
  color: var(--text-muted);
}

/* Annotation block — 2 keys per pane, bottom of each. */
.hero-split__notes {
  list-style: none;
  margin: 0;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hero-split__notes li {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: baseline;
  font-size: 12.5px;
}
.hero-split__notes code {
  background: transparent;
  padding: 0;
  color: var(--accent);
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
}
.hero-split__notes span {
  color: var(--text-dim);
  line-height: 1.5;
}

/* Connector arrow — circular, sits over the column gap.
   The 0 0 0 6px page-bg ring fully breaks the seam line around it. */
.hero-split__arrow {
  position: absolute;
  left: calc(50% - 18px);
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border-hi);
  box-shadow: 0 0 0 6px var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-family: 'Geist Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  z-index: 2;
  pointer-events: none;
}

@media (max-width: 720px) {
  .hero-split { grid-template-columns: 1fr; }
  .hero-split__arrow {
    position: static;
    transform: rotate(90deg);
    margin: -10px auto;
    box-shadow: 0 0 0 6px var(--bg);
  }
}

/* ---- INTEGRATION GRID ---- */
.integration-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

/* Unified card treatment — shared radius + transition
   across faq, integration, file, pricing, and docs-card. Bg + border
   apply to all except .pricing-card (which uses .featured's gradient).
   Hover (border-hi + 1px lift) on docs/file/integration only. */
.faq-item,
.integration-card,
.file-card,
.pricing-card,
.docs-card {
  border-radius: var(--radius);
  transition: border-color 200ms, box-shadow 200ms, transform 200ms;
}
.faq-item,
.integration-card,
.file-card,
.docs-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
}
.docs-card:hover,
.file-card:hover,
.integration-card:hover {
  border-color: var(--border-hi);
  transform: translateY(-1px);
}

.integration-card {
  overflow: hidden;
  display: flex;               /* A2: column flex so descriptions pin to the bottom */
  flex-direction: column;
}

.integration-card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;            /* A2: one- and two-line titles occupy the same band */
}
.integration-card-header > span { white-space: nowrap; }  /* A2: keep "REST API" on one line */

.integration-card-body {
  flex: 1;                     /* A2: code region absorbs slack; descriptions align */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.integration-card-body pre {
  padding: 16px 20px;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;       /* A1: wrap long curl/npx lines instead of clipping */
  word-break: break-word;
  overflow-x: visible;         /* no clipped scroll box */
  color: var(--text);
}

.integration-card-desc {
  padding: 14px 20px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  border-top: 1px solid var(--border);
  margin-top: auto;            /* A2: pin description to card bottom */
}

.code-block {
  position: relative;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.code-block-label {
  font-size: 12px;
  color: var(--text-muted);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
}
.copy-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
}
.copy-btn.copied {
  color: var(--accent);
  border-color: var(--border-accent);
}

.code-block pre {
  padding: 20px 24px;
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
  color: var(--text);
}

/* ---- PRICING ---- */
.pricing-single {
  max-width: 560px;
}

/* Pricing base layout. Visual treatment on the featured variant below. */
.pricing-card {
  padding: 32px;
}

.pricing-card.featured {
  background: linear-gradient(180deg, var(--accent-dimer), transparent 70%), var(--bg-raised);
  border: 1px solid var(--border-accent);
  box-shadow: 0 0 32px var(--accent-dim);
}

.pricing-tier {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.pricing-price {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.pricing-price .unit {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
}

.pricing-desc {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.5;
}

.pricing-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pricing-list li {
  font-size: 14px;
  color: var(--text-muted);
  position: relative;
  padding-left: 16px;
  line-height: 1.5;
}

.pricing-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---- AGENT FILES ---- */
.files-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.file-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  text-decoration: none;
  color: var(--text);
}
.file-card:hover { opacity: 1; }

.file-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--accent);
  flex-shrink: 0;
}

.file-name {
  font-size: 14px;
  font-weight: 600;
}

.file-path {
  font-size: 12px;
  color: var(--text-muted);
}

/* A3: single .file-card text column (OpenAPI/x402/MCP) — give the bare <div>
   the same wrapping behavior as the dual cards' .file-card-info so the name
   no longer overlaps the path. Scoped away from the dual cards' .file-card-head
   and .file-card-actions: those are also direct <div> children of .file-card,
   but must keep their own row layout — otherwise this rule's flex-direction:column
   (which outranks .file-card-head on specificity) center-stacks the icon + name. */
.file-card > div:not(.file-icon):not(.file-card-head):not(.file-card-actions) {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.file-card .file-name { line-height: 1.3; }
.file-card .file-path {
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-card-info {
  flex: 1;
  min-width: 0;
}

.file-card-dual {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

.file-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.file-card-primary {
  border-color: var(--border-accent);
  box-shadow: 0 0 28px var(--accent-dim);
}

/* ---- /docs/payments audience callout ---- */
.docs-audience-note {
  padding: 16px 20px;
  margin: 16px 0 32px;
  background: var(--bg-raised);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  font-size: 14px;
  color: var(--text-muted);
}

/* ---- Tabbed code blocks (used in Quickstart) ---- */
.tabs {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 16px 0 24px;
  overflow: hidden;
}

.tab-list {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  padding: 0 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-list button {
  flex-shrink: 0;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 150ms, border-color 150ms;
}

.tab-list button:hover { color: var(--text); }

.tab-list button[aria-selected="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-panel {
  padding: 0;
}

.tab-panel[hidden] {
  display: none;
}

.tab-panel pre {
  margin: 0;
  padding: 18px 22px;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 13px;
  line-height: 1.7;
}

/* ---- /docs/payments x402 sequence diagram (rendered by mermaid) ---- */
.x402-flow-wrapper {
  margin: 24px 0 32px;
  padding: 20px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.x402-flow-wrapper pre.mermaid {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  text-align: center;
  font-family: inherit;
}

.x402-flow-wrapper svg {
  max-width: 100%;
  height: auto;
}

/* ---- FAQ ---- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 700px;
}

.faq-item {
  padding: 24px;
}

.faq-item h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.faq-item p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}

/* ---- FOOTER (B2: multi-column) ---- */
footer {
  border-top: 1px solid var(--border);
  padding: 56px 32px 40px;
  text-align: left;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 40px 24px;
  align-items: start;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 240px;
}
.footer-brand .tagline-mono {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--text-subtle);
  letter-spacing: 0.02em;
  margin: 0;
}

.footer-col h4 {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-subtle);
  margin-bottom: 14px;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.footer-col a {
  color: var(--text-muted);
  font-size: 13px;
}
.footer-col a:hover { color: var(--text); opacity: 1; }

.footer-bottom {
  max-width: var(--max-w);
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-subtle);
}

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* ---- DIVIDER ---- */
.divider {
  height: 1px;
  max-width: var(--max-w);
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ---- DOCS ---- */
.docs-page {
  padding: 88px 24px 80px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.docs-page h1 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.docs-page h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 56px;
  margin-bottom: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.docs-page h3 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 36px;
  margin-bottom: 12px;
}

.docs-page p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 16px;
  max-width: 680px;
}

.docs-page ul, .docs-page ol {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 16px;
  padding-left: 24px;
}

.docs-page li {
  margin-bottom: 6px;
}

.docs-page table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 32px;
  font-size: 14px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.docs-page th {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.docs-page td {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  vertical-align: top;
  line-height: 1.55;
}
.docs-page tr:first-child td { border-top: none; }
.docs-page td:first-child { color: var(--text); font-weight: 600; }

@media (max-width: 720px) {
  .docs-page table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
  .docs-page table td,
  .docs-page table th {
    white-space: normal;
  }
}

.docs-page td code {
  background: var(--bg-surface);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--text);
}

/* Unified inline-code — applies to bare <code>, any
   .inline-code on the homepage, and .docs-page .inline-code alike. */
code,
.inline-code,
.docs-page .inline-code {
  background: var(--bg-surface);
  padding: 1.5px 6px;
  border-radius: 4px;
  font-size: 0.92em;
  color: var(--accent);
  font-family: 'Geist Mono', monospace;
}

.docs-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.docs-nav a {
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: color 150ms, border-color 150ms, background 150ms;
}

.docs-nav a:hover {
  color: var(--text);
  border-color: var(--border-hi);
  opacity: 1;
}

.docs-nav a.active {
  color: var(--accent);
  border-color: var(--border-accent);
  background: var(--accent-dim);
}

.docs-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.docs-card {
  padding: 24px;
  text-decoration: none;
  display: block;
}
.docs-card:hover { opacity: 1; }

.docs-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px;
}

.docs-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.docs-card .card-icon {
  font-size: 20px;
  margin-bottom: 12px;
  display: block;
  color: var(--accent);
  font-family: 'Geist Mono', 'SF Mono', 'Fira Code', monospace;
  font-weight: 700;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .hero { padding: 88px 20px 56px; }

  .stats-bar {
    grid-template-columns: 1fr 1fr;
    max-width: 480px;
  }

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

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

  section { padding: 64px 20px; }

  .nav-links { gap: 16px; }
  .nav-links a { font-size: 13px; }

  .docs-cards {
    grid-template-columns: 1fr;
  }
  .docs-page h2 {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .nav-inner { padding: 0 16px; }
  .nav-links { gap: 12px; }
  .cta-row { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 280px; justify-content: center; }
  .terminal-body { padding: 16px; font-size: 12px; }
  .footer-inner { flex-direction: column; gap: 8px; }
}
