@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
  --bg:          #08090e;
  --surface-1:   #0f1117;
  --surface-2:   #151820;
  --surface-3:   #1d2030;

  --border:      rgba(255,255,255,0.07);
  --border-md:   rgba(255,255,255,0.12);

  --text:        #eef1f8;
  --text-muted:  rgba(238,241,248,0.55);
  --text-faint:  rgba(238,241,248,0.28);

  --brand:       #00dc82;
  --brand-dim:   rgba(0,220,130,0.10);
  --brand-glow:  rgba(0,220,130,0.18);

  --negative:    #ff4757;

  --r-sm:   8px;
  --r-md:   14px;
  --r-lg:   20px;
  --r-xl:   28px;
  --r-pill: 999px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --ease: cubic-bezier(0.25,0.46,0.45,0.94);
  --tx:   160ms var(--ease);

  --content-w: 1040px;
  --content-pad: clamp(20px, 5vw, 60px);
}

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

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body { min-height: 100vh; }
img, svg { display: block; }
a { color: inherit; text-decoration: none; }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 var(--content-pad);
}

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8,9,14,0.85);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-mark {
  width: 30px;
  height: 30px;
  background: var(--brand);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  color: #08090e;
  box-shadow: 0 0 0 1px rgba(0,220,130,0.3), 0 4px 14px rgba(0,220,130,0.2);
}

.nav-logo-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 7px 14px;
  border-radius: var(--r-pill);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--tx), background var(--tx);
}

.nav-link:hover { color: var(--text); background: var(--surface-2); }

.nav-cta {
  padding: 8px 18px;
  border-radius: var(--r-pill);
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--brand);
  color: #08090e;
  transition: opacity var(--tx), transform var(--tx);
  box-shadow: 0 4px 16px rgba(0,220,130,0.22);
}

.nav-cta:hover { opacity: 0.88; transform: translateY(-1px); }

/* ── Nav dropdown ────────────────────────────────────────────────────────── */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
}

.nav-dropdown-caret {
  transition: transform var(--tx);
  flex-shrink: 0;
}
.nav-dropdown.open .nav-dropdown-caret { transform: rotate(180deg); }

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  min-width: 240px;
  background: var(--surface-2);
  border: 1px solid var(--border-md);
  border-radius: var(--r-lg);
  padding: 6px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--tx), transform var(--tx);
}
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  transition: background var(--tx);
}
.nav-dropdown-item:hover { background: var(--surface-3); }

.nav-dropdown-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: var(--brand-dim);
  border: 1px solid rgba(0,220,130,0.18);
  display: grid;
  place-items: center;
  font-size: 14px;
  flex-shrink: 0;
  color: var(--brand);
}

.nav-dropdown-item strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1px;
}
.nav-dropdown-item span span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-faint);
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  padding: clamp(80px, 14vw, 140px) 0 clamp(60px, 10vw, 100px);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% -10%, rgba(0,220,130,0.10), transparent),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(0,220,130,0.04), transparent);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(0,220,130,0.25);
  background: var(--brand-dim);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 6px var(--brand);
}

.hero-headline {
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 22px;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.hero-headline em {
  font-style: normal;
  color: var(--brand);
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 560px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary {
  padding: 14px 28px;
  border-radius: var(--r-pill);
  font-size: 0.95rem;
  font-weight: 700;
  background: var(--brand);
  color: #08090e;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0,220,130,0.28);
  transition: opacity var(--tx), transform var(--tx);
  display: inline-block;
}

.btn-primary:hover { opacity: 0.88; transform: translateY(-2px); }

.btn-ghost {
  padding: 14px 28px;
  border-radius: var(--r-pill);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border-md);
  background: transparent;
  cursor: pointer;
  transition: color var(--tx), border-color var(--tx), background var(--tx);
  display: inline-block;
}

.btn-ghost:hover { color: var(--text); border-color: var(--border-md); background: var(--surface-2); }

/* ── Address demo ────────────────────────────────────────────────────────── */
.address-demo {
  margin: 56px auto 0;
  max-width: 520px;
  background: var(--surface-1);
  border: 1px solid var(--border-md);
  border-radius: var(--r-xl);
  padding: 28px;
  text-align: left;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

.address-demo-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--text-faint);
  margin-bottom: 10px;
}

.address-demo-addr {
  font-family: 'Menlo', 'Fira Code', 'Courier New', monospace;
  font-size: 0.85rem;
  color: var(--brand);
  letter-spacing: 0.04em;
  word-break: break-all;
  line-height: 1.55;
  margin-bottom: 18px;
}

.address-demo-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.addr-stat {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
}

.addr-stat-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 4px;
}

.addr-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--brand);
}

/* ── Section shared ──────────────────────────────────────────────────────── */
section { padding: clamp(70px, 10vw, 120px) 0; }

.section-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 16px;
}

.section-sub {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 540px;
}

/* ── Features grid ───────────────────────────────────────────────────────── */
.features { border-top: 1px solid var(--border); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 56px;
}

.feature-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: border-color var(--tx), transform var(--tx);
}

.feature-card:hover { border-color: var(--border-md); transform: translateY(-2px); }

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--brand-dim);
  border: 1px solid rgba(0,220,130,0.18);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  color: var(--brand);
  font-size: 1.2rem;
}

.feature-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── How it works ────────────────────────────────────────────────────────── */
.how { background: var(--surface-1); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  margin-top: 56px;
}

.how-step {
  padding: 32px;
  border-right: 1px solid var(--border);
  position: relative;
}

.how-step:last-child { border-right: none; }

.how-num {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-md);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.how-title { font-size: 0.95rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.how-desc  { font-size: 0.84rem; color: var(--text-muted); line-height: 1.65; }

/* ── Security section ────────────────────────────────────────────────────── */
.security-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-top: 56px;
}

.security-list { display: grid; gap: 14px; }

.security-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.security-check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--brand-dim);
  border: 1px solid rgba(0,220,130,0.2);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 11px;
  color: var(--brand);
}

.security-item-text strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.security-item-text span {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.security-card {
  background: var(--surface-1);
  border: 1px solid var(--border-md);
  border-radius: var(--r-xl);
  padding: 32px;
}

.security-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.84rem;
}

.security-card-row:last-child { border-bottom: none; }
.security-card-row span:first-child { color: var(--text-muted); }
.security-card-row span:last-child  { font-weight: 600; color: var(--text); }
.pill-green { background: var(--brand-dim); color: var(--brand); padding: 3px 10px; border-radius: var(--r-pill); font-size: 0.72rem; font-weight: 600; border: 1px solid rgba(0,220,130,0.2); }

/* ── CTA ─────────────────────────────────────────────────────────────────── */
.cta-section {
  border-top: 1px solid var(--border);
  text-align: center;
}

.cta-card {
  background: linear-gradient(135deg, rgba(0,220,130,0.08), rgba(0,220,130,0.02));
  border: 1px solid rgba(0,220,130,0.14);
  border-radius: var(--r-xl);
  padding: clamp(48px, 8vw, 80px) clamp(24px, 6vw, 72px);
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy { font-size: 0.8rem; color: var(--text-faint); }

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--text-faint);
  transition: color var(--tx);
}

.footer-links a:hover { color: var(--text-muted); }

/* ── Privacy page ────────────────────────────────────────────────────────── */
.privacy-hero {
  padding: clamp(60px, 10vw, 100px) 0 48px;
  border-bottom: 1px solid var(--border);
}

.privacy-body {
  padding: clamp(48px, 8vw, 80px) 0;
  max-width: 720px;
}

.privacy-body h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 40px 0 12px;
}

.privacy-body h2:first-child { margin-top: 0; }

.privacy-body p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 14px;
}

.privacy-body ul {
  padding-left: 20px;
  margin-bottom: 14px;
}

.privacy-body ul li {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 6px;
}

.privacy-body a { color: var(--brand); transition: opacity var(--tx); }
.privacy-body a:hover { opacity: 0.75; }

.privacy-body strong { color: var(--text); font-weight: 600; }

.privacy-meta {
  font-size: 0.82rem;
  color: var(--text-faint);
  padding: 14px 18px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 40px;
}

/* ── Scroll reveal animations ────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.62s var(--ease), transform 0.62s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Hero entrance animations (fire on load, not scroll) */
@keyframes hero-fade-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

.hero-anim {
  opacity: 0;
  animation: hero-fade-up 0.7s var(--ease) forwards;
  animation-delay: var(--d, 0ms);
}

/* ── Hero demo card ──────────────────────────────────────────────────────── */
.demo-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.demo-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--brand);
  color: #08090e;
  font-size: 0.95rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.demo-header-info { flex: 1; min-width: 0; }

.demo-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1px;
}

.demo-balance {
  font-size: 0.78rem;
  color: var(--brand);
  font-weight: 600;
}

.demo-agents-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-dim);
  border: 1px solid rgba(0,220,130,0.2);
  border-radius: var(--r-pill);
  padding: 4px 10px;
  flex-shrink: 0;
}

.demo-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 5px var(--brand);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.demo-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 16px;
}

.demo-activity { display: grid; gap: 12px; margin-bottom: 16px; }

.demo-activity-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.demo-activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  flex-shrink: 0;
  background: var(--surface-3);
  color: var(--text-muted);
}

.demo-icon--agent { background: var(--brand-dim); color: var(--brand); }
.demo-icon--in    { background: rgba(0,220,130,0.08); color: var(--brand); }

.demo-activity-info { flex: 1; min-width: 0; }

.demo-row-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-row-sub {
  font-size: 0.72rem;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-amount {
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.demo-amount--out { color: var(--text-muted); }
.demo-amount--in  { color: var(--brand); }

.demo-footer {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.demo-addr {
  font-family: 'Menlo', 'Fira Code', monospace;
  font-size: 0.72rem;
  color: var(--text-faint);
  letter-spacing: 0.03em;
}

/* ── Feature card highlight ──────────────────────────────────────────────── */
.feature-card--highlight {
  background: linear-gradient(135deg, rgba(0,220,130,0.08), rgba(0,220,130,0.02));
  border-color: rgba(0,220,130,0.2);
}

.feature-card--highlight:hover { border-color: rgba(0,220,130,0.38); }

.inline-code {
  font-size: 0.82em;
  color: var(--brand);
  background: var(--brand-dim);
  padding: 1px 5px;
  border-radius: 4px;
}

.feature-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand);
  transition: opacity var(--tx);
}

.feature-link:hover { opacity: 0.7; }

/* ── A2A Agent Commerce section ──────────────────────────────────────────── */
.a2a-section {
  padding: clamp(70px, 10vw, 120px) 0;
  background: var(--surface-1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.a2a-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
  margin-top: 56px;
}

.a2a-cards { display: grid; gap: 16px; }

.agent-card {
  background: var(--surface-2);
  border: 1px solid var(--border-md);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: border-color var(--tx), transform var(--tx);
}

.agent-card:hover { border-color: rgba(0,220,130,0.25); transform: translateY(-2px); }

.agent-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.agent-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 7px var(--brand);
  flex-shrink: 0;
  animation: pulse 2.5s ease-in-out infinite;
}

.agent-name {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  font-family: 'Menlo', 'Fira Code', monospace;
}

.agent-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--r-pill);
}

.agent-badge--active {
  background: var(--brand-dim);
  color: var(--brand);
  border: 1px solid rgba(0,220,130,0.22);
}

.agent-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 16px;
}

.agent-policy { display: grid; gap: 0; }

.agent-policy-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.agent-policy-row:last-child { border-bottom: none; padding-bottom: 0; }
.agent-policy-row span:first-child { color: var(--text-muted); }
.agent-policy-row span:last-child  { font-weight: 600; color: var(--text); }

/* A2A right column */
.a2a-list { display: grid; gap: 20px; list-style: none; }

.a2a-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.a2a-check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--brand-dim);
  border: 1px solid rgba(0,220,130,0.2);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 11px;
  color: var(--brand);
}

.a2a-item strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.a2a-item span {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .security-grid { grid-template-columns: 1fr; }
  .security-card { display: none; }
  .how-step { border-right: none; border-bottom: 1px solid var(--border); padding: 24px 0; }
  .how-step:last-child { border-bottom: none; }
  .how-grid { gap: 0; }
  .nav-links { display: none; }
  .a2a-layout { grid-template-columns: 1fr; gap: 40px; }
}

/* ── Tool pages ───────────────────────────────────────────────────────────── */

.tool-hero {
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

/* Single-column tool layout (pay request) */
.tool-wrap {
  max-width: 560px;
  margin: 56px auto 80px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Tool cards */
.tool-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 28px 24px;
}

.tool-field { margin-bottom: 18px; }
.tool-field:last-child { margin-bottom: 0; }

.tool-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
}

.tool-optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.78rem;
  color: var(--text-faint);
  opacity: 0.7;
}

.tool-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-md);
  border-radius: var(--r-md);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.93rem;
  padding: 11px 15px;
  outline: none;
  transition: border-color var(--tx), box-shadow var(--tx);
}
.tool-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-dim);
}
.tool-input::placeholder { color: var(--text-faint); }

.tool-input-prefix-wrap {
  display: flex;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border-md);
  border-radius: var(--r-md);
  transition: border-color var(--tx), box-shadow var(--tx);
}
.tool-input-prefix-wrap:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-dim);
}
.tool-input-prefix {
  padding: 11px 0 11px 15px;
  color: var(--text-faint);
  font-size: 0.93rem;
  user-select: none;
}
.tool-input--prefixed {
  background: transparent;
  border: none;
  flex: 1;
  padding-left: 5px;
  box-shadow: none !important;
}
.tool-input--prefixed:focus { border: none; box-shadow: none; }

.tool-textarea {
  resize: vertical;
  min-height: 90px;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.82rem;
  line-height: 1.6;
}

.tool-hint {
  display: block;
  font-size: 0.76rem;
  color: var(--text-faint);
  margin-top: 6px;
  line-height: 1.5;
}
.tool-hint-row {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}

.tool-btn { width: 100%; margin-top: 4px; }

/* Resolve status (pay page handle lookup) */
.resolve-status {
  font-size: 0.8rem;
  margin-top: 6px;
  min-height: 16px;
  line-height: 1.4;
}
.resolve-ok      { color: var(--brand); }
.resolve-err     { color: var(--negative); }
.resolve-loading { color: var(--text-faint); font-style: italic; }

/* Output card */
.tool-output {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
}

.tool-output-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
}

.tool-url-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.tool-url-input {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border-md);
  border-radius: var(--r-md);
  color: var(--text-muted);
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.75rem;
  padding: 10px 13px;
  outline: none;
  min-width: 0;
}

.tool-copy-btn {
  background: var(--brand-dim);
  border: 1px solid rgba(0,220,130,0.25);
  border-radius: var(--r-md);
  color: var(--brand);
  font-family: var(--font);
  font-size: 0.83rem;
  font-weight: 600;
  padding: 10px 18px;
  cursor: pointer;
  transition: background var(--tx), border-color var(--tx), color var(--tx);
  white-space: nowrap;
}
.tool-copy-btn:hover { background: rgba(0,220,130,0.18); }
.tool-copy-btn.copied {
  background: var(--brand);
  color: #0d1117;
  border-color: var(--brand);
}

.tool-open-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.83rem;
  color: var(--text-muted);
  transition: color var(--tx);
}
.tool-open-link:hover { color: var(--text); }

/* ── Agent builder ─────────────────────────────────────────────────────────── */

.builder-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 28px;
  padding: 56px 0 80px;
  align-items: start;
}

.builder-section {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px 24px 20px;
  margin-bottom: 16px;
}
.builder-section:last-child { margin-bottom: 0; }

.builder-section-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.builder-radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 0;
}
.builder-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: border-color var(--tx), background var(--tx);
}
.builder-radio:has(input:checked) {
  border-color: rgba(0,220,130,0.3);
  background: var(--brand-dim);
  color: var(--text);
}
.builder-radio input[type="radio"] {
  accent-color: var(--brand);
  width: 15px;
  height: 15px;
  cursor: pointer;
  flex-shrink: 0;
}

.addr-line-ok      { color: var(--brand); }
.addr-line-err     { color: var(--negative); }
.addr-summary      { font-size: 0.76rem; margin-top: 6px; line-height: 1.5; }

/* Preview panel */
.builder-preview { position: sticky; top: 80px; }

.builder-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.json-preview {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  font-family: "SF Mono", "Fira Code", "JetBrains Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.8;
  color: var(--text-muted);
  white-space: pre;
  overflow-x: auto;
  margin-bottom: 14px;
  min-height: 200px;
}
.json-key   { color: var(--brand); }
.json-num   { color: #79c0ff; }
.json-str   { color: #a5d6ff; }
.json-bool  { color: #ff9a3c; }

.builder-deploy-btn { width: 100%; text-align: center; }

/* ── Responsive (tools) ───────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .builder-layout {
    grid-template-columns: 1fr;
  }
  .builder-preview { position: static; }
}
@media (max-width: 600px) {
  .tool-wrap { margin: 32px auto 60px; }
  .tool-hero { padding: 56px 0 40px; }
  .tool-card, .builder-section { padding: 20px; }
  .tool-url-row { flex-direction: column; }
  .tool-copy-btn { width: 100%; }
}

/* ── Mobile hamburger menu ────────────────────────────────────────────────── */

/* Hamburger button — hidden on desktop */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: background var(--tx);
  flex-shrink: 0;
  z-index: 110;
}

.nav-hamburger:hover { background: var(--surface-2); }

.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 280ms var(--ease), opacity 200ms var(--ease), width 200ms var(--ease);
  transform-origin: center;
}

/* Animated X when open */
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; width: 0; }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile dropdown panel — positioned below nav, full width */
.nav-mobile-menu {
  display: none; /* shown via JS on mobile */
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border-md);
  padding: 12px 0 20px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 240ms var(--ease), transform 240ms var(--ease);
  z-index: 105;
}

.nav-mobile-menu.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-mobile-link {
  display: block;
  padding: 13px var(--content-pad);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--tx), background var(--tx);
}

.nav-mobile-link:hover,
.nav-mobile-link:focus { color: var(--text); background: var(--surface-2); }

.nav-mobile-cta {
  display: block;
  margin: 16px var(--content-pad) 0;
  padding: 13px 20px;
  border-radius: var(--r-pill);
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  background: var(--brand);
  color: #08090e;
  box-shadow: 0 4px 16px rgba(0,220,130,0.22);
  transition: opacity var(--tx), transform var(--tx);
}

.nav-mobile-cta:hover { opacity: 0.88; transform: translateY(-1px); }

/* Show hamburger on mobile; hide desktop nav and cta */
@media (max-width: 768px) {
  .nav-hamburger { display: flex; }
  .nav-mobile-menu { display: block; }
}

/* Keep nav positioned relative so the dropdown anchors correctly */
.nav { position: sticky; }
