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

:root {
  --bg: #03030a;
  --surface: #080812;
  --surface2: #0e0e1a;
  --surface3: #141428;
  --border: rgba(255,255,255,0.06);
  --border2: rgba(255,255,255,0.1);
  --accent: #4f46e5;
  --accent-glow: rgba(79,70,229,0.35);
  --cyan: #06b6d4;
  --cyan-glow: rgba(6,182,212,0.2);
  --green: #10b981;
  --green-glow: rgba(16,185,129,0.15);
  --orange: #f59e0b;
  --red: #ef4444;
  --text: #f8f7ff;
  --muted: #4b4b6b;
  --muted2: #8b8aaa;
  --muted3: #b8b7d4;
  --code-bg: #05050f;
  --mono: 'Space Mono', monospace;
  --display: 'Bebas Neue', sans-serif;
  --body: 'DM Sans', sans-serif;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ANIMATED GRID */
.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(79,70,229,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,70,229,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* RADIAL GLOW */
.hero-glow {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse at 50% 0%,
    rgba(79,70,229,0.15) 0%,
    rgba(6,182,212,0.05) 50%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── NAV ─── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(3,3,10,0.8);
  backdrop-filter: blur(24px);
  z-index: 100;
}

.logo {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.logo-badge {
  background: var(--accent);
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  box-shadow: 0 0 16px var(--accent-glow);
}

.logo-text span { color: var(--cyan); }

nav ul {
  list-style: none;
  display: flex;
  gap: 0.1rem;
  align-items: center;
}

nav ul li a {
  color: var(--muted2);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.45rem 0.8rem;
  border-radius: 6px;
  transition: all 0.18s;
  display: block;
}
nav ul li a:hover {
  color: var(--text);
  background: var(--surface2);
  text-decoration: none;
}

.nav-pill {
  background: var(--accent) !important;
  color: #fff !important;
  font-weight: 600 !important;
  padding: 0.45rem 1.1rem !important;
  box-shadow: 0 0 20px var(--accent-glow);
}
.nav-pill:hover {
  opacity: 0.9;
  background: var(--accent) !important;
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--green);
  background: var(--green-glow);
  border: 1px solid rgba(16,185,129,0.25);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  letter-spacing: 0.06em;
}
.live-dot::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--green);
  border-radius: 50%;
  animation: blink 1.4s ease-in-out infinite;
  box-shadow: 0 0 6px var(--green);
}

/* ─── HERO ─── */
.hero {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2.5rem 4rem;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--cyan);
  background: rgba(6,182,212,0.06);
  border: 1px solid rgba(6,182,212,0.18);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 2rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 0.5s ease 0.1s forwards;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(4.5rem, 9vw, 8rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 0.95;
  margin-bottom: 1.75rem;
  opacity: 0;
  animation: fadeUp 0.5s ease 0.2s forwards;
}

.hero h1 .line-accent {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1px rgba(79,70,229,0.5);
}

.hero h1 .line-grad {
  display: block;
  background: linear-gradient(100deg, var(--accent) 0%, var(--cyan) 60%, var(--green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--muted3);
  max-width: 500px;
  margin-bottom: 2.5rem;
  line-height: 1.75;
  font-weight: 300;
  opacity: 0;
  animation: fadeUp 0.5s ease 0.3s forwards;
}
.hero-desc strong { color: var(--text); font-weight: 500; }

.cta-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.5s ease 0.4s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--body);
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  letter-spacing: 0.01em;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 28px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 0 44px var(--accent-glow); }

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

/* ─── METRICS STRIP ─── */
.metrics-strip {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.metrics-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2.5rem;
  display: flex;
  gap: 0;
}

.metric {
  padding: 1.75rem 3rem 1.75rem 0;
  margin-right: 3rem;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
}
.metric:last-child { border-right: none; }

.metric-val {
  font-family: var(--mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.3rem;
}
.metric-val .c { color: var(--cyan); }
.metric-val .g { color: var(--green); }

.metric-label {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ─── SECTIONS ─── */
section {
  position: relative;
  z-index: 1;
  padding: 5rem 2.5rem;
}

.container { max-width: 1200px; margin: 0 auto; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.eyebrow::before {
  content: '';
  width: 16px;
  height: 1px;
  background: var(--accent);
}

h2 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 400;
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
  line-height: 1.05;
}

.lead {
  color: var(--muted2);
  max-width: 500px;
  margin-bottom: 3rem;
  font-size: 0.95rem;
  line-height: 1.7;
  font-weight: 300;
}

/* ─── HOW IT WORKS ─── */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.step {
  padding: 1.75rem;
  border-right: 1px solid var(--border);
  position: relative;
  transition: background 0.25s;
}
.step:last-child { border-right: none; }
.step:hover { background: var(--surface2); }

.step-bar {
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  margin-bottom: 1.5rem;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}
.step:hover .step-bar { transform: scaleX(1); }

.step-num {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  letter-spacing: 0.12em;
}

.step-icon {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  display: block;
}

.step h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.step p {
  font-size: 0.8rem;
  color: var(--muted2);
  line-height: 1.6;
  font-weight: 300;
  overflow-wrap: anywhere;
}

/* ─── PAYMENT INFO ─── */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.info-card {
  background: var(--surface);
  padding: 2rem;
  position: relative;
}
.info-card:hover { background: var(--surface2); }

.info-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-card > p {
  font-size: 0.83rem;
  color: var(--muted2);
  margin-bottom: 1.5rem;
  line-height: 1.65;
  font-weight: 300;
}

.detail-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.detail-list li {
  display: block;
  font-size: 0.8rem;
  color: var(--muted2);
  font-family: var(--mono);
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
  min-width: 0;
  padding-left: 1.1rem;
  position: relative;
}
.detail-list li > span,
.detail-list li > a {
  word-break: break-word;
}
.detail-list li > code {
  white-space: nowrap;
  word-break: normal;
}
.detail-list li::before {
  content: '›';
  color: var(--cyan);
  font-size: 0.9rem;
  position: absolute;
  left: 0;
  top: 0;
}

/* ─── API CARDS ─── */
.filter-bar {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  font-family: var(--mono);
  font-size: 0.68rem;
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--muted2);
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s;
  letter-spacing: 0.04em;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.apis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.api-card {
  background: var(--surface);
  padding: 1.5rem;
  transition: background 0.2s;
}
.api-card:hover { background: var(--surface2); }

.api-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.6rem;
}

.api-name {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: -0.02em;
}

.api-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.price-badge {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  color: var(--green);
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
}

.category-badge {
  font-family: var(--mono);
  font-size: 0.6rem;
  background: rgba(79,70,229,0.1);
  border: 1px solid rgba(79,70,229,0.2);
  color: #a78bfa;
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.soon-badge {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.25);
  color: var(--orange);
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.category-badge.travel { background: rgba(6,182,212,0.08); border-color: rgba(6,182,212,0.2); color: var(--cyan); }
.category-badge.search { background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.2); color: var(--orange); }
.category-badge.data { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.2); color: var(--green); }
.category-badge.finance { background: rgba(167,139,250,0.08); border-color: rgba(167,139,250,0.2); color: var(--accent); }
.category-badge.action { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.2); color: var(--red); }

.api-card p {
  font-size: 0.79rem;
  color: var(--muted2);
  margin-bottom: 1.1rem;
  line-height: 1.6;
  font-weight: 300;
}

.params {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.param {
  font-family: var(--mono);
  font-size: 0.63rem;
  background: var(--code-bg);
  border: 1px solid var(--border2);
  color: var(--muted2);
  padding: 0.12rem 0.45rem;
  border-radius: 3px;
}
.param.req {
  border-color: rgba(79,70,229,0.3);
  color: #a78bfa;
}

/* ─── CARD EXAMPLE TABS ─── */
.card-example {
  margin-top: 1rem;
  border: 1px solid var(--border2);
  border-radius: 8px;
  overflow: hidden;
}

.card-tabs {
  display: flex;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.card-tab {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  user-select: none;
}
.card-tab.active { color: var(--cyan); border-bottom-color: var(--cyan); }
.card-tab:hover:not(.active) { color: var(--muted2); }

.card-panel {
  display: none;
  background: rgba(0,0,0,0.35);
  padding: 0.7rem 0.9rem;
  font-family: var(--mono);
  font-size: 0.59rem;
  line-height: 1.65;
  color: var(--muted2);
  white-space: pre;
  overflow-x: auto;
}
.card-panel.active { display: block; }

.card-panel .ck { color: #7dd3fc; }
.card-panel .cv { color: #86efac; }
.card-panel .cn { color: #fca5a5; }
.card-panel .cb { color: #c084fc; }
.card-panel .cm { color: var(--muted); }

/* ─── ENDPOINT TABLE ─── */
.table-wrap {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

table { width: 100%; border-collapse: collapse; }

thead { background: var(--surface2); }
th {
  text-align: left;
  padding: 0.85rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 0.9rem 1.5rem;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--muted3);
  font-weight: 300;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.015); }

.method {
  font-family: var(--mono);
  font-size: 0.63rem;
  font-weight: 700;
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.06em;
}
.get { background: rgba(16,185,129,0.08); color: var(--green); border: 1px solid rgba(16,185,129,0.2); }
.post { background: rgba(79,70,229,0.1); color: #a78bfa; border: 1px solid rgba(79,70,229,0.25); }

.auth-x402 {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--cyan);
  background: rgba(6,182,212,0.06);
  border: 1px solid rgba(6,182,212,0.15);
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
}

/* ─── INLINE CODE ─── */
code {
  font-family: var(--mono);
  font-size: 0.78em;
  background: rgba(79,70,229,0.1);
  border: 1px solid rgba(79,70,229,0.18);
  padding: 0.08rem 0.32rem;
  border-radius: 4px;
  color: #a78bfa;
  white-space: nowrap;
}

/* ─── CODE BLOCK ─── */
.code-block {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.tab-bar {
  display: flex;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 1rem;
  gap: 0;
  overflow-x: auto;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 400;
  padding: 0.85rem 0.9rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.18s, border-color 0.18s;
  white-space: nowrap;
  letter-spacing: 0.03em;
}
.tab-btn.active { color: var(--cyan); border-bottom-color: var(--cyan); }
.tab-btn:hover:not(.active) { color: var(--muted3); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

pre {
  background: var(--code-bg);
  padding: 1.75rem;
  white-space: pre;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-family: var(--mono);
  font-size: 0.77rem;
  line-height: 1.85;
}

.kw { color: #c084fc; }
.str { color: #6ee7b7; }
.num { color: #fbbf24; }
.cm { color: #2d2d4e; font-style: italic; }
.fn { color: #60a5fa; }
.key { color: #93c5fd; }
.op { color: var(--muted2); }

/* ─── ERRORS / WARNINGS ─── */
.notice-box {
  background: rgba(245,158,11,0.05);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}
.notice-icon { font-size: 1rem; flex-shrink: 0; margin-top: 0.1rem; }
.notice-text { font-size: 0.82rem; color: var(--muted3); line-height: 1.6; font-weight: 300; }
.notice-text strong { color: #fbbf24; font-weight: 600; }

/* ─── ERROR CODES TABLE ─── */
.error-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.error-card {
  background: var(--surface);
  padding: 1.25rem 1.5rem;
}

.error-code {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.error-code.e402 { color: var(--cyan); }
.error-code.e200 { color: var(--green); }
.error-code.e400 { color: var(--orange); }
.error-code.e402b { color: #a78bfa; }
.error-code.e500 { color: var(--red); }

.error-title {
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.error-desc {
  font-size: 0.76rem;
  color: var(--muted2);
  line-height: 1.55;
  font-weight: 300;
}

/* ─── FOOTER ─── */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted2);
}
.footer-logo span { color: var(--cyan); }

.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  font-size: 0.78rem;
  color: var(--muted);
  transition: color 0.18s;
}
.footer-links a:hover { color: var(--muted3); text-decoration: none; }

.footer-copy {
  font-size: 0.72rem;
  color: var(--muted);
  font-family: var(--mono);
}

/* ─── ACCORDION ─── */
.accordion-list {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.acc-item { border-bottom: 1px solid var(--border); }
.acc-item:last-child { border-bottom: none; }
.acc-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  background: var(--surface);
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s;
}
.acc-header:hover,
.acc-item.open .acc-header { background: var(--surface2); }
.acc-label {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}
.acc-num { color: var(--accent); font-size: 0.65rem; }
.acc-desc {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 300;
  flex: 1;
}
.acc-arrow {
  font-size: 1.1rem;
  color: var(--muted);
  transition: transform 0.2s;
  flex-shrink: 0;
  line-height: 1;
}
.acc-item.open .acc-arrow { transform: rotate(90deg); color: var(--cyan); }
.acc-body { display: none; border-top: 1px solid var(--border); }
.acc-item.open .acc-body { display: block; }
.acc-body pre { border-radius: 0; border: none; }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ─── NAV RIGHT / HAMBURGER ─── */
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--muted3);
  border-radius: 2px;
  transition: all 0.2s;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  nav { padding: 1rem 1.5rem; }
  .hero, section { padding-left: 1.5rem; padding-right: 1.5rem; }
  .metrics-inner { padding: 0 1.5rem; }
  .steps { grid-template-columns: 1fr 1fr; }
  .info-grid { grid-template-columns: 1fr; }

  code { white-space: normal; word-break: break-word; }
  .detail-list li > code { white-space: nowrap; word-break: normal; }
  .info-card { padding: 1.25rem; }
  .info-card h3 { font-size: 0.9rem; }
  .info-card > p { font-size: 0.78rem; margin-bottom: 1rem; }
  .detail-list { gap: 0.4rem; }
  .detail-list li { font-size: 0.74rem; }
  .api-card { padding: 1.25rem; }

  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  pre { white-space: pre; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .card-panel { white-space: pre; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 600px) {
  .hero-glow { width: 100vw; }

  nav { position: relative; }
  .nav-toggle { display: flex; }
  .live-dot { display: none; }

  nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(3,3,10,0.97);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem 1rem;
    gap: 0.15rem;
    z-index: 99;
  }
  nav ul.mobile-open { display: flex; }
  nav ul li a { font-size: 0.9rem; padding: 0.6rem 0.5rem; }

  .steps { grid-template-columns: 1fr; }
  .step { border-right: none; border-bottom: 1px solid var(--border); }

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

  .api-card-header { flex-wrap: wrap; gap: 0.4rem; }
  .api-card { padding: 1rem; min-width: 0; }
  .info-card { padding: 1rem; }
  .info-card h3 { font-size: 0.85rem; }
  .info-card > p { font-size: 0.75rem; margin-bottom: 0.85rem; }
  .detail-list { gap: 0.35rem; }
  .detail-list li { font-size: 0.72rem; }

  code { white-space: normal; word-break: break-word; }
  .detail-list li > code { white-space: nowrap; word-break: normal; }

  .card-panel { white-space: pre; overflow-x: auto; -webkit-overflow-scrolling: touch; min-width: 0; }
  pre { white-space: pre; overflow-x: auto; -webkit-overflow-scrolling: touch; min-width: 0; font-size: 0.7rem; }

  footer { flex-direction: column; gap: 0.75rem; }
  .footer-links { flex-wrap: wrap; gap: 1rem; }

  .metrics-inner { display: grid; grid-template-columns: 1fr 1fr; padding: 0; }
  .metric {
    padding: 1rem 1.25rem;
    margin-right: 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .metric:nth-child(odd) { border-right: 1px solid var(--border); }
  .metric:last-child { grid-column: 1 / -1; border-bottom: none; text-align: center; }
  .metric-val { font-size: 1.3rem; }
  .metric-label { font-size: 0.62rem; }

  th, td { padding: 0.65rem 0.75rem; }
  td { font-size: 0.78rem; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  td code { white-space: nowrap; word-break: normal; }
}

@media (max-width: 400px) {
  .hero h1 { font-size: clamp(3rem, 16vw, 4.5rem); }
  .api-card { padding: 0.875rem; }
  .info-card { padding: 1.25rem; }
}

/* ─── MCP SECTION ─── */
.mcp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.mcp-setup { display: flex; flex-direction: column; gap: 2rem; min-width: 0; }

/* ── Client toggle (Desktop / Code) ── */
.mcp-client-toggle {
  display: flex;
  gap: 0.35rem;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.2rem;
  width: fit-content;
  margin-bottom: -0.5rem;
}
.mcp-client-btn {
  padding: 0.35rem 0.9rem;
  border: none;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  background: none;
  color: var(--muted2);
  transition: background 0.15s, color 0.15s;
}
.mcp-client-btn.active {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border2);
}
.mcp-client-btn:not(.active):hover { color: var(--text); }
.mcp-client-btn--magic { color: var(--cyan); }
.mcp-client-btn--magic.active { color: var(--cyan); border-color: var(--cyan); background: color-mix(in srgb, var(--cyan) 10%, var(--surface2)); }
.mcp-client-steps { display: flex; flex-direction: column; gap: 2rem; }
.mcp-client-steps[hidden] { display: none; }

/* Magic prompt panel inner tabs */
.magic-prompt-tabs {
  display: flex;
  gap: 0.35rem;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.2rem;
  width: fit-content;
  margin-bottom: 0.85rem;
}
.magic-prompt-tab {
  padding: 0.3rem 0.8rem;
  border: none;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  background: none;
  color: var(--muted2);
  transition: background 0.15s, color 0.15s;
}
.magic-prompt-tab.active { background: var(--surface2); color: var(--text); border: 1px solid var(--border2); }
.magic-prompt-tab:not(.active):hover { color: var(--text); }

/* ── Magic panel (compact card) ── */
.mpanel {
  position: relative;
  border-radius: 12px;
  border: 1px solid var(--border2);
  background: linear-gradient(135deg, var(--surface3) 0%, var(--surface2) 100%);
  overflow: hidden;
}
.mpanel::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  opacity: 0.55;
}
.mpanel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.mpanel-top-left { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.mpanel-title {
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, var(--accent) 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}
.mpanel-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.mpanel-badge {
  font-family: var(--mono);
  font-size: 0.6rem;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  border: 1px solid var(--border2);
  color: var(--muted3);
  background: var(--surface);
  letter-spacing: 0.02em;
}
.mpanel-badge:first-child {
  border-color: rgba(79,70,229,0.4);
  color: #a5b4fc;
  background: rgba(79,70,229,0.08);
}
.mpanel-badge:nth-child(2) {
  border-color: rgba(6,182,212,0.35);
  color: var(--cyan);
  background: rgba(6,182,212,0.06);
}
/* inner tabs inside mpanel */
.mpanel .magic-prompt-tabs {
  margin-bottom: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
}
.mpanel #magic-panel-cd,
.mpanel #magic-panel-cc { padding: 0.85rem 1rem 1rem; }
.mpanel .magic-prompt-text { margin-bottom: 0.6rem; }
.mpanel .magic-copy-btn { }

.mcp-step  { display: flex; gap: 1.25rem; align-items: flex-start; }

.mcp-step-num {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  background: rgba(79,70,229,0.12);
  border: 1px solid rgba(79,70,229,0.25);
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  flex-shrink: 0;
  margin-top: 0.2rem;
}
.mcp-step-body h4 { font-size: 0.95rem; font-weight: 600; color: var(--text); margin-bottom: 0.4rem; }
.mcp-step-body p  { font-size: 0.85rem; color: var(--muted2); line-height: 1.6; }
.mcp-step-body p a { color: var(--cyan); text-decoration: none; }
.mcp-step-body p a:hover { text-decoration: underline; }

.mcp-code-block {
  background: var(--code-bg);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.8;
  margin-top: 0.75rem;
  white-space: pre;
  overflow-x: auto;
}
.mcp-config-path { font-size: 0.72rem; color: var(--muted); margin-top: 0.6rem; line-height: 1.9; }
.mcp-os {
  display: inline-block;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 0.4rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted2);
  margin-right: 0.35rem;
}

/* ── Magic / Manual collapsible blocks ── */
.magic-block {
  margin-top: 1rem;
  border: 1px solid var(--border2);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface2);
}
.magic-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  background: none;
  border: none;
  cursor: pointer;
  gap: 0.75rem;
  text-align: left;
  transition: background 0.15s;
}
.magic-trigger:hover { background: var(--surface3); }
.magic-trigger-left { display: flex; align-items: center; gap: 0.6rem; flex: 1; min-width: 0; }
.magic-trigger-icon { font-size: 0.9rem; color: var(--cyan); flex-shrink: 0; }
.magic-trigger-label { font-size: 0.85rem; font-weight: 600; color: var(--text); white-space: nowrap; }
.magic-trigger-sub { font-size: 0.72rem; color: var(--muted2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.magic-trigger-arrow {
  font-size: 1.1rem;
  color: var(--muted2);
  transform: rotate(0deg);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.magic-trigger[aria-expanded="true"] .magic-trigger-arrow { transform: rotate(90deg); }
.magic-body {
  border-top: 1px solid var(--border);
  padding: 1.1rem;
}
.magic-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.25rem;
}
.magic-tab {
  flex: 1;
  padding: 0.4rem 0.75rem;
  border: none;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  background: none;
  color: var(--muted2);
  transition: background 0.15s, color 0.15s;
}
.magic-tab.active { background: var(--surface2); color: var(--text); border: 1px solid var(--border2); }
.magic-tab:not(.active):hover { color: var(--text); }
.magic-desc {
  font-size: 0.8rem;
  color: var(--muted2);
  margin-bottom: 0.75rem;
  line-height: 1.6;
}
.magic-desc strong { color: var(--text); }
.magic-prompt-text {
  font-family: var(--mono);
  font-size: 0.71rem;
  line-height: 1.75;
  color: var(--muted2);
  background: var(--code-bg);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 0.75rem;
  user-select: all;
}
.magic-copy-btn {
  display: block;
  width: 100%;
  background: var(--cyan);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.magic-copy-btn:hover { opacity: 0.85; }
.magic-note { font-size: 0.75rem; color: var(--muted2); margin-top: 0.6rem; }

/* ── Claude Desktop dark mode window ── */
.mcp-demo {
  background: #1e1b18;
  border: 1px solid #333;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 56px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.3);
  min-width: 0;
}

/* macOS title bar */
.mcp-demo-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.9rem;
  background: #272420;
  border-bottom: 1px solid #333;
  position: relative;
}
.mcp-demo-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.mcp-demo-dot.red    { background: #ff5f57; }
.mcp-demo-dot.yellow { background: #febc2e; }
.mcp-demo-dot.green  { background: #28c840; }
.mcp-demo-title {
  font-size: 0.72rem;
  color: #666;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  letter-spacing: 0.01em;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

/* Chat area — grows to fit content, no scroll */
.mcp-chat {
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  background: #1e1b18;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes mcpFadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
@keyframes pillPulse {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1; }
}

/* Typing cursor */
.demo-typing::after {
  content: '▋';
  font-size: 0.75em;
  animation: blink 0.8s step-end infinite;
  color: #8a8076;
  margin-left: 1px;
}
.demo-typing.done::after { display: none; }

/* pill "running" state */
.tool-pill-status {
  color: #6b6560;
  font-size: 0.65rem;
  font-style: italic;
  animation: pillPulse 1s ease-in-out infinite;
}
.tool-pill-status.done {
  color: #4a9e6f;
  font-style: normal;
  animation: none;
}
.tool-pill-status.done::before { content: '✓ '; }

/* Row wrapper — no avatar gap, Claude messages are full width */
.mcp-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.mcp-row.user-row { align-items: flex-end; }

/* No avatars */
.mcp-avatar { display: none; }

/* All messages */
.mcp-msg {
  font-size: 0.83rem;
  line-height: 1.65;
  animation: fadeSlideIn 0.35s ease forwards;
}
.mcp-msg.hidden { opacity: 0; display: none !important; }

/* User bubble — right side dark pill */
.mcp-msg.user {
  background: #2e2a26;
  border: 1px solid #3d3830;
  color: #e8e0d5;
  border-radius: 16px 16px 4px 16px;
  padding: 0.6rem 0.95rem;
  max-width: 76%;
}

/* Claude — plain text, no bubble, full width */
.mcp-msg.assistant {
  color: #d6cfc7;
  padding: 0;
  max-width: 100%;
}
.mcp-msg.assistant strong { color: #f0e8e0; }

/* Tool call — like real Claude: intro text + pill inline */
.mcp-msg.tool {
  color: #d6cfc7;
  padding: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.83rem;
  line-height: 1.65;
}
.mcp-msg.tool.hidden { display: none !important; }

/* The "Flight search ›" pill */
.tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #2a2520;
  border: 1px solid #3a3530;
  border-radius: 6px;
  padding: 0.3rem 0.65rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: #9a8e84;
  align-self: flex-start;
  cursor: default;
}
.tool-pill-icon {
  width: 14px; height: 14px;
  background: #cc785c;
  border-radius: 3px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.tool-pill-icon svg { width: 9px; height: 9px; fill: white; }
.tool-pill-name { color: #c8bfb5; font-weight: 500; }
.tool-pill-arrow { color: #5a5550; font-size: 0.65rem; }
.tool-charge { color: #4a9e6f; font-size: 0.65rem; font-weight: 600; font-family: var(--mono); }

/* NO old tool-badge dot */
.tool-badge::before { display: none; }
.tool-badge { display: none; }
.tool-detail { display: none; }

/* Inline table */
.demo-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.69rem;
  margin: 0.5rem 0 0.2rem;
}
.demo-table th {
  text-align: left;
  padding: 0.22rem 0.5rem;
  color: #5a5550;
  border-bottom: 1px solid #333;
  font-weight: 500;
}
.demo-table td {
  padding: 0.26rem 0.5rem;
  color: #b0a89e;
  border-bottom: 1px solid #2a2722;
}
.demo-table tr:last-child td { border-bottom: none; }
.demo-table tbody tr:first-child td { color: #cc8855; font-weight: 600; }

/* Replay */
.mcp-replay-btn {
  display: block;
  width: 100%;
  padding: 0.55rem;
  background: transparent;
  border: none;
  border-top: 1px solid #2e2a26;
  color: #4a4540;
  font-family: var(--mono);
  font-size: 0.68rem;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.mcp-replay-btn:hover { color: #998880; background: #252220; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .mcp-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 0 0.25rem;
  }

  /* Code block — scrollable if content overflows */
  .mcp-code-block {
    font-size: 0.68rem;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: pre;
  }

  /* Config path — wrap long paths */
  .mcp-config-path code {
    word-break: break-all;
    white-space: normal;
  }

  /* Demo: restore rounded corners, stay inside padding */
  .mcp-demo {
    border-radius: 10px;
    overflow: hidden;
  }

  /* More breathing room in chat */
  .mcp-chat {
    padding: 1.25rem 1.1rem;
    gap: 1.2rem;
    font-size: 0.9rem;
  }

  /* Bubbles */
  .mcp-msg.user {
    font-size: 0.88rem;
    padding: 0.7rem 1rem;
    max-width: 90%;
    border-radius: 14px 14px 4px 14px;
  }
  .mcp-msg.assistant { font-size: 0.88rem; line-height: 1.7; }
  .mcp-msg.tool { font-size: 0.85rem; }

  /* Tool pill */
  .tool-pill {
    padding: 0.4rem 0.75rem;
    font-size: 0.78rem;
    gap: 0.5rem;
  }

  /* Table — scroll horizontally if too wide */
  .demo-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .demo-table {
    font-size: 0.78rem;
    min-width: 280px;
  }
  .demo-table th, .demo-table td {
    padding: 0.35rem 0.55rem;
  }

  /* Client toggle — allow wrapping on small screens */
  .mcp-client-toggle {
    width: 100%;
    flex-wrap: wrap;
  }
  .mcp-client-btn {
    flex: 1;
    text-align: center;
  }

  /* Magic panel top — stack on small screens */
  .mpanel-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }
  .mpanel-title {
    white-space: normal;
  }
  .magic-prompt-tabs {
    width: 100%;
  }
  .magic-prompt-tab {
    flex: 1;
    text-align: center;
  }
}

@media (max-width: 600px) {
  /* Tighten client toggle on very small screens */
  .mcp-client-toggle {
    padding: 0.15rem;
    gap: 0.2rem;
  }
  .mcp-client-btn {
    font-size: 0.72rem;
    padding: 0.3rem 0.5rem;
  }

  /* Ensure mpanel doesn't overflow */
  .mpanel {
    min-width: 0;
    overflow: hidden;
  }
  .mpanel-top {
    padding: 0.7rem 0.75rem;
  }
  .mpanel-badges {
    gap: 0.25rem;
  }
  .mpanel-badge {
    font-size: 0.55rem;
    padding: 0.12rem 0.4rem;
  }
  .mpanel #magic-panel-cd,
  .mpanel #magic-panel-cc {
    padding: 0.7rem 0.75rem 0.85rem;
  }

  /* Prevent mcp-step from overflowing */
  .mcp-step {
    gap: 0.75rem;
  }
  .mcp-step-body {
    min-width: 0;
    overflow-wrap: break-word;
  }
}

/* ─── SDK section ─── */
.sdk-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-top: 2.5rem;
}
.sdk-step-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.sdk-pre {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--text);
  overflow-x: auto;
  margin: 0;
}
.sdk-info-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.sdk-feature {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.sdk-feature-icon {
  font-size: 1.25rem;
  line-height: 1;
  margin-top: 0.1rem;
  flex-shrink: 0;
}
.sdk-feature strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.sdk-feature p {
  font-size: 0.82rem;
  color: var(--muted2);
  margin: 0;
  line-height: 1.6;
}
.sdk-feature code {
  font-size: 0.78rem;
}
@media (max-width: 768px) {
  .sdk-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .sdk-pre {
    max-width: 100%;
    overflow-x: auto;
    font-size: 0.72rem;
    white-space: pre;
    word-break: normal;
  }
  .sdk-code-col {
    min-width: 0;
    max-width: 100%;
  }
}
