/* ============================================================
   SWARM PROTOCOL — ULTRA-MODERN FINTECH & CYBER DESIGN SYSTEM
   Base Mainnet (8453) · x402 v2 · Cloudflare Edge Tier
   ============================================================ */
:root {
  --bg:           #070a13;
  --bg-trans:     rgba(7, 10, 19, 0.85);
  --surface:      #0e1424;
  --surface-2:    #141d33;
  --surface-3:    #1a2642;
  --border:       rgba(255, 255, 255, 0.08);
  --border-hi:    rgba(0, 229, 200, 0.35);
  --border-glow:  rgba(59, 130, 246, 0.3);

  --text:         #f8fafc;
  --text-2:       #94a3b8;
  --text-3:       #64748b;

  --teal:         #00e5c8;
  --teal-dim:     rgba(0, 229, 200, 0.12);
  --teal-glow:    rgba(0, 229, 200, 0.25);
  --blue:         #3b82f6;
  --blue-dim:     rgba(59, 130, 246, 0.12);
  --blue-glow:    rgba(59, 130, 246, 0.25);
  --violet:       #8b5cf6;
  --violet-dim:   rgba(139, 92, 246, 0.12);
  --green:        #10b981;
  --green-dim:    rgba(16, 185, 129, 0.12);
  --amber:        #f59e0b;
  --rose:         #f43f5e;
  --cyan:         #06b6d4;

  --font-display: 'Space Grotesk', -apple-system, sans-serif;
  --font-sans:    'Inter', -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;
  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    16px;
  --radius-xl:    24px;
  --nav-h:        64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(0, 229, 200, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 85% 25%, rgba(59, 130, 246, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(139, 92, 246, 0.04) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-sans); border: none; background: none; }

/* ── NAV ─────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--bg-trans);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  transition: opacity 0.2s;
}
.nav-brand:hover { opacity: 0.85; }
.brand-mark {
  color: var(--teal);
  font-size: 20px;
  line-height: 1;
  text-shadow: 0 0 12px var(--teal-glow);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-link {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text-2);
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }

.status-link {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 5px 12px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green);
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.9); }
}

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  padding: calc(var(--nav-h) + 64px) 24px 80px;
  max-width: 1200px;
  margin: 0 auto;
}
.hero-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 36px;
}
.hero-center-inner {
  max-width: 780px;
  margin: 0 auto;
}
.endpoint-row-center,
.hero-cta-center {
  justify-content: center;
}
.hero-window-wrap {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  text-align: left;
}
.hero-title-display {
  letter-spacing: -0.03em;
}
.gp-split-body {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
}
@media (max-width: 820px) {
  .gp-split-body {
    grid-template-columns: 1fr;
  }
  .gp-preview-pane {
    border-left: none;
    border-top: 1px solid var(--border);
  }
}
@media (max-width: 480px) {
  .gp-header {
    flex-wrap: wrap;
    gap: 8px;
  }
  .gp-pg-controls {
    flex-direction: column;
  }
  .endpoint-chip {
    flex-wrap: wrap;
    max-width: 100%;
  }
  .ep-url {
    overflow-wrap: anywhere;
    font-size: 11.5px;
  }
}
.gp-preview-pane {
  padding: 24px;
  background: radial-gradient(circle at 50% 0%, rgba(0, 229, 200, 0.12), transparent 70%), var(--bg);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}
.gp-preview-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--teal);
  letter-spacing: 0.06em;
}
.gp-preview-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}
.gp-preview-desc {
  font-size: 13px;
  color: var(--text-2);
}
.gp-preview-meta {
  margin-top: 8px;
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-family: var(--font-mono);
}
.gp-preview-meta div {
  display: flex;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}
.gp-preview-meta span { color: var(--text-3); }
.gp-preview-meta strong { color: var(--text); }
.gp-window-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}
.gp-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.gp-dot-red { background: #ef4444; }
.gp-dot-yellow { background: #f59e0b; }
.gp-dot-green { background: #10b981; }
.hero-inner {
  max-width: 820px;
}
.gateway-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.gp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.gp-tabs {
  display: flex;
  gap: 6px;
}
.gp-tab {
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.15s, background 0.15s;
}
.gp-tab:hover { color: var(--text); }
.gp-tab.active {
  background: var(--teal-dim);
  color: var(--teal);
  border: 1px solid var(--border-hi);
}
.gp-copy-btn {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-2);
  border: 1px solid var(--border);
}
.gp-copy-btn:hover { color: var(--text); border-color: var(--border-hi); }
.gp-body {
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
}
.gp-code, .gp-playground { display: none; }
.gp-code.active, .gp-playground.active { display: block; }
.gp-code {
  overflow-x: auto;
  color: var(--text);
  white-space: pre;
}
.gp-pg-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.gp-select {
  flex: 1;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.gp-run-btn {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  background: var(--teal);
  color: #070a13;
  font-weight: 600;
  font-size: 12.5px;
}
.gp-pg-output {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  color: var(--text-2);
  font-size: 12px;
  max-height: 180px;
  overflow: auto;
  white-space: pre-wrap;
}
.hero-eyebrow {
  margin-bottom: 24px;
}
.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid rgba(0, 229, 200, 0.25);
  background: rgba(0, 229, 200, 0.06);
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--teal);
  letter-spacing: 0.02em;
}
.pulse-spark {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 6px var(--teal);
  animation: pulse-dot 1.8s infinite;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 6vw, 62px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin-bottom: 22px;
  color: var(--text);
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--teal) 0%, var(--blue) 50%, var(--violet) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 16.5px;
  color: var(--text-2);
  line-height: 1.65;
  max-width: 660px;
  margin-bottom: 34px;
  font-weight: 400;
}

/* Endpoint row */
.endpoint-row {
  margin-bottom: 32px;
}
.endpoint-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  max-width: 100%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.endpoint-chip:hover {
  border-color: var(--border-hi);
  box-shadow: 0 4px 24px var(--teal-glow);
}
.ep-method-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.ep-method-badge.post {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.ep-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.ep-url {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ep-copy {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  transition: all 0.2s;
}
.ep-copy:hover { background: var(--teal); color: #000; border-color: var(--teal); }
.ep-copy.copied { background: var(--green); color: #000; border-color: var(--green); }

/* CTA */
.hero-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 11px 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--teal) 0%, var(--blue) 100%);
  color: #050810;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px var(--teal-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 28px var(--teal-glow); }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 11px 22px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.btn-secondary:hover { background: var(--surface-3); border-color: var(--border-glow); transform: translateY(-1px); }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 11px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}
.btn-ghost:hover { border-color: var(--border-hi); color: var(--teal); background: rgba(0, 229, 200, 0.04); }

/* Stats strip */
.stats-strip {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 22px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.stat-item {
  flex: 1;
  text-align: center;
}
.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 2px;
}
.stat-label {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
}
.stat-divider {
  width: 1px;
  height: 38px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── SECTION COMMONS ─────────────────────────────────────── */
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.section-header {
  margin-bottom: 36px;
}
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.section-sub {
  font-size: 15px;
  color: var(--text-2);
  max-width: 580px;
}

/* ── CORE PROTOCOL ENDPOINTS ─────────────────────────────── */
.endpoints-section {
  padding: 80px 24px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(14, 20, 36, 0.4) 0%, transparent 100%);
}
.endpoints-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 18px;
}
.endpoint-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  transition: all 0.25s ease;
  overflow: hidden;
}
.endpoint-card:hover {
  border-color: var(--border-hi);
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), 0 0 20px var(--teal-glow);
}
.endpoint-card.featured {
  border-color: rgba(0, 229, 200, 0.3);
  background: linear-gradient(145deg, rgba(0, 229, 200, 0.04) 0%, var(--surface) 60%);
}
.endpoint-card.highlight {
  border-color: rgba(139, 92, 246, 0.3);
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.04) 0%, var(--surface) 60%);
}
.ep-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ep-badge-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.method-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.method-tag.post {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.method-tag.get {
  background: var(--blue-dim);
  color: var(--blue);
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.ep-path {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text);
  font-weight: 600;
}
.ep-gate-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 100px;
  white-space: nowrap;
}
.ep-gate-pill.gated      { background: var(--teal-dim); color: var(--teal); border: 1px solid rgba(0, 229, 200, 0.3); }
.ep-gate-pill.public     { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.ep-gate-pill.live       { background: rgba(16, 185, 129, 0.12); color: var(--green); border: 1px solid rgba(16, 185, 129, 0.3); }
.ep-gate-pill.financial  { background: rgba(59, 130, 246, 0.12); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.ep-gate-pill.audit      { background: rgba(245, 158, 11, 0.12); color: var(--amber); border: 1px solid rgba(245, 158, 11, 0.3); }
.ep-gate-pill.hitl       { background: var(--violet-dim); color: #c084fc; border: 1px solid rgba(139, 92, 246, 0.3); }

.ep-desc {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.6;
  flex: 1;
}
.ep-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}
.ep-meta-item {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ep-meta-item code { color: var(--teal); }
.ep-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-xs {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
}
.copy-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
}
.copy-btn:hover { color: var(--text); border-color: var(--border-hi); }
.primary-btn {
  background: var(--teal-dim);
  border: 1px solid rgba(0, 229, 200, 0.3);
  color: var(--teal);
}
.primary-btn:hover { background: var(--teal); color: #050810; }
.link-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
}
.link-btn:hover { color: var(--text); background: var(--surface-3); }

/* ── TOOLS SECTION ───────────────────────────────────────── */
.tools-section {
  padding: 80px 24px;
  border-top: 1px solid var(--border);
}
.catalogue-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.filter-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all 0.15s;
}
.filter-btn:hover { color: var(--text); border-color: var(--border-hi); }
.filter-btn.active {
  background: var(--teal-dim);
  color: var(--teal);
  border-color: var(--teal);
  box-shadow: 0 0 14px var(--teal-glow);
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-3);
  pointer-events: none;
}
.search-input {
  padding: 8px 14px 8px 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  width: 280px;
  outline: none;
  transition: all 0.2s;
  font-family: var(--font-sans);
}
.search-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 16px var(--teal-glow);
  width: 320px;
}
.search-input::placeholder { color: var(--text-3); }

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.grid-loading {
  grid-column: 1/-1;
  padding: 80px 24px;
  text-align: center;
  color: var(--text-3);
  font-size: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--border);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Tool card */
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.tool-card:hover {
  background: var(--surface-2);
  border-color: var(--border-hi);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 18px var(--teal-glow);
}
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.tool-name {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--teal);
  font-weight: 600;
  line-height: 1.4;
  flex: 1;
  word-break: break-all;
}
.price-tag {
  font-size: 11.5px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--green);
  background: var(--green-dim);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 3px 9px;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
}
.tags-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.cat-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cat-tag.intelligence   { background: rgba(168, 85, 247, 0.12); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.25); }
.cat-tag.security       { background: rgba(239, 68, 68, 0.12);  color: #f87171; border: 1px solid rgba(239, 68, 68, 0.25); }
.cat-tag.ai-agents      { background: rgba(245, 158, 11, 0.12); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.25); }
.cat-tag.finance        { background: rgba(34, 197, 94, 0.12);  color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.25); }
.cat-tag.infrastructure { background: rgba(59, 130, 246, 0.12); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.25); }

.cf-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(249, 115, 22, 0.12);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.25);
  letter-spacing: 0.02em;
}

.card-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-arch-preview {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.5;
  background: var(--bg);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  gap: 8px;
}
.card-proto {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-3);
}
.card-actions {
  display: flex;
  gap: 6px;
}
.btn-sm {
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.15s;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
}
.btn-sm:hover { color: var(--text); border-color: var(--border-hi); }
.btn-sm.primary {
  background: var(--teal-dim);
  color: var(--teal);
  border-color: rgba(0, 229, 200, 0.3);
}
.btn-sm.primary:hover { background: var(--teal); color: #050810; }

/* ── TERMINAL / LIVE SETTLEMENT STREAM ───────────────────── */
.terminal-section {
  padding: 0 24px 80px;
}
.terminal-card {
  max-width: 1200px;
  margin: 0 auto;
  background: #050810;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.terminal-dots { display: flex; gap: 6px; }
.tdot { width: 11px; height: 11px; border-radius: 50%; }
.tdot-r { background: #ff5f57; }
.tdot-y { background: #febc2e; }
.tdot-g { background: #28c840; }
.terminal-title-text {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
}
.terminal-live {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
  animation: pulse-dot 2.4s ease-in-out infinite;
}
.terminal-body {
  padding: 18px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.8;
  max-height: 220px;
  overflow-y: auto;
}
.terminal-body::-webkit-scrollbar { width: 6px; }
.terminal-body::-webkit-scrollbar-track { background: transparent; }
.terminal-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.tlog { display: flex; gap: 10px; align-items: baseline; }
.tlog-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}
.tlog-tag.sys  { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }
.tlog-tag.ok   { background: var(--green-dim); color: var(--green); }
.tlog-tag.edge { background: rgba(249, 115, 22, 0.15); color: #fb923c; }
.tlog-tag.err  { background: rgba(244, 63, 94, 0.15); color: var(--rose); }
.tlog-msg { color: var(--text-2); }

/* ── FOOTER ──────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  background: var(--surface);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
}
.brand-tag {
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--font-mono);
}
.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 13.5px;
  color: var(--text-3);
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--teal); }
.footer-copy {
  font-size: 12px;
  color: var(--text-3);
  width: 100%;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
  font-family: var(--font-mono);
}

/* ── MODAL ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.active { display: flex; }
.modal-panel {
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 30px var(--teal-glow);
  animation: modal-in 0.25s ease;
}
.modal-panel::-webkit-scrollbar { width: 6px; }
.modal-panel::-webkit-scrollbar-track { background: transparent; }
.modal-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close-btn {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  z-index: 1;
}
.modal-close-btn:hover { background: var(--border-hi); color: var(--text); }
.modal-header {
  padding: 26px 26px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-tags-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.modal-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
  background: var(--teal-dim);
  border: 1px solid rgba(0, 229, 200, 0.3);
  padding: 3px 8px;
  border-radius: 100px;
}
.modal-tag.price {
  color: var(--green);
  background: var(--green-dim);
  border-color: rgba(16, 185, 129, 0.3);
}
.modal-tool-name {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 8px;
}
.modal-tool-desc {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.6;
}
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
}
.modal-block {
  background: var(--surface);
  padding: 18px 22px;
}
.modal-block-full {
  grid-column: 1/-1;
}
.modal-block-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 8px;
}
.modal-code-block {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.6;
}
.modal-pre {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-all;
  background: var(--bg);
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-top: 4px;
  max-height: 220px;
  overflow-y: auto;
}
.modal-test-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}
.modal-label-tight { margin: 0; }
.modal-test-hint { font-size: 11.5px; color: var(--text-3); }
.modal-curl-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.btn-test-action {
  padding: 6px 14px;
  cursor: pointer;
}
.modal-test-output {
  background: #050810;
  color: var(--teal);
  font-size: 11.5px;
  max-height: 180px;
  overflow-y: auto;
  border-color: rgba(0, 229, 200, 0.3);
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 800px) {
  .endpoints-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .stats-strip { flex-direction: column; gap: 16px; padding: 18px; }
  .stat-divider { width: 100%; height: 1px; }
  .catalogue-controls { flex-direction: column; align-items: flex-start; }
  .search-input { width: 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .modal-grid { grid-template-columns: 1fr; }
  .nav-links .nav-link:not(.status-link) { display: none; }
}
