/* ── TokenMarkdown.com: $1M Swiss-Grade Developer Infrastructure Design System ── */
:root {
  /* Surfaces & Canvas */
  --bg: #ffffff;
  --bg-subtle: #f9fafb;
  --bg-surface: #f3f4f6;
  --bg-card: #ffffff;
  --bg-code: #0b0f17;         /* Deep slate IDE canvas */
  --bg-code-header: #070a10;
  
  /* Precision Hairline Borders */
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --border-focus: #111827;
  
  /* High-Caliber Typography */
  --text: #111827;            /* Deep Graphite */
  --text-secondary: #374151;  /* Slate text */
  --text-muted: #6b7280;      /* Muted slate */
  --text-dim: #9ca3af;        /* Dim text */
  
  /* Accents */
  --primary: #111827;
  --primary-hover: #000000;
  --accent: #2563eb;          /* Enterprise Blue */
  --accent-light: #eff6ff;
  --accent-glow: rgba(37, 99, 235, 0.12);
  
  --emerald: #10b981;
  --emerald-bg: rgba(16, 185, 129, 0.1);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);

  /* Geometry & Elevation */
  --radius-xs: 5px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 10px 25px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.08), 0 4px 16px -2px rgba(0, 0, 0, 0.03);
  --shadow-window: 0 25px 60px -15px rgba(11, 15, 23, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.08);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Geist Mono", Menlo, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  overflow-x: hidden;
  background-color: var(--bg);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  color: var(--text);
  letter-spacing: -0.04em;
  font-weight: 700;
  line-height: 1.12;
}

.mono {
  font-family: var(--font-mono);
}

.container {
  width: 100%;
  max-width: 1540px;
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 56px);
}

/* ── Navigation Bar ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.2s ease;
}

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

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
}

.brand-title {
  display: inline-flex;
  align-items: baseline;
  font-size: 18px;
  letter-spacing: -0.035em;
}

.brand-name {
  font-weight: 700;
  color: #09090b;
}

.brand-tld {
  font-weight: 500;
  color: #64748b;
  font-size: 16.5px;
}

.logo-badge {
  width: 28px;
  height: 28px;
  background: #09090b;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

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

.nav-links a {
  text-decoration: none;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: #000000;
}

/* ── Buttons (Ultra High-Contrast) ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  white-space: nowrap;
}

.btn-primary {
  background: #09090b !important;
  color: #ffffff !important;
  border: 1px solid #09090b !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
  background: #27272a !important;
  border-color: #27272a !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  color: #111827;
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: #9ca3af;
  color: #000000;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 7px 16px;
  font-size: 13px;
}

.btn-lg {
  padding: 12px 26px;
  font-size: 14.5px;
}

/* ── Hero Section ── */
.hero {
  padding: 48px 0 28px;
  text-align: center;
  position: relative;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 5px 15px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.hero h1 {
  font-size: clamp(38px, 4.5vw, 56px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.038em;
  color: var(--text);
  max-width: 1200px;
  margin: 0 auto 18px;
  text-wrap: balance;
}

.hero-line {
  display: block;
}

.hero-line-gradient {
  color: var(--accent);
  display: block;
}

.hero p.lead {
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 28px;
  text-wrap: balance;
}

.pill-presets {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.preset-btn {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 3px 11px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}

.preset-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

/* ── Live Arena Split Terminal ── */
.arena-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  margin: 24px auto 56px;
  width: 100%;
  text-align: left;
}

.arena-input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
}

.arena-input {
  flex: 1;
  padding: 13px 20px;
  background: #ffffff;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 14.5px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.arena-input:focus {
  border-color: #111827;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.arena-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .arena-grid {
    grid-template-columns: 1fr;
  }
}

.arena-panel {
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 480px;
  box-shadow: var(--shadow-window);
}

.arena-panel-red {
  background: #111319;
}

.arena-panel-green {
  background: #090d16;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  background: var(--bg-code-header);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 12px;
  color: #9ca3af;
}

.window-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.badge-red {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
}

.badge-green {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
}

.panel-stats {
  display: flex;
  gap: 20px;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.3);
  font-family: var(--font-mono);
  font-size: 11.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.panel-code {
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  color: #cbd5e1;
  overflow-x: hidden;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 380px;
  flex: 1;
}

.panel-code, pre {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.savings-banner {
  margin-top: 20px;
  padding: 14px 22px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--text);
  flex-wrap: wrap;
  gap: 12px;
}

/* ── Section Headers ── */
.section-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  display: inline-block;
}

.section-title {
  font-size: clamp(32px, 3.6vw, 44px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 14px;
}

/* ── Developer Workspace ── */
.dev-workspace-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 48px;
  align-items: stretch;
}

@media (max-width: 1024px) {
  .dev-workspace-grid {
    grid-template-columns: 1fr;
  }
}

.dev-feature-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dev-feature-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.dev-feature-btn:hover {
  border-color: var(--border-strong);
  background: var(--bg-subtle);
  transform: translateY(-1px);
}

.dev-feature-btn.active {
  border-color: #09090b;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.dev-feature-btn .btn-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.dev-feature-btn .btn-desc {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}

.dev-feature-btn .btn-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-surface);
  color: var(--text-secondary);
}

.dev-feature-btn.active .btn-badge {
  background: #09090b;
  color: #ffffff;
}

.dev-ide-window {
  background: var(--bg-code);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow-window);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.dev-ide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--bg-code-header);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dev-ide-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #94a3b8;
}

.dev-ide-body {
  padding: 20px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  color: #e2e8f0;
  overflow-y: auto;
  flex: 1;
}

/* ── Protocol & Ecosystem Grid ── */
.proto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.proto-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.proto-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.proto-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.proto-icon-box {
  width: 40px;
  height: 40px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.proto-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.proto-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.proto-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 18px;
}

.proto-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

/* ── Pricing Grid ── */
.pricing-section {
  padding: 96px 0;
  background: #ffffff;
  border-top: 1px solid var(--border);
}

.pricing-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.pricing-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.pricing-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.pricing-card.featured {
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-lg);
}

.plan-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.plan-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.plan-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  background: #2563eb;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.plan-price-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 10px;
}

.plan-price {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.period {
  font-size: 14px;
  color: var(--text-muted);
}

.plan-quota {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.plan-features {
  list-style: none;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.check-icon {
  width: 16px;
  height: 16px;
  color: #10b981;
  flex-shrink: 0;
  margin-top: 3px;
}

/* ── Split FAQ Section ($1M Linear / Stripe Standard with Sticky Sidebar) ── */
.faq-split {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 64px;
  align-items: start;
}

.faq-left {
  position: sticky;
  top: 100px;
  align-self: start;
}

.faq-left h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  margin-bottom: 14px;
  letter-spacing: -0.035em;
  line-height: 1.18;
}

@media (max-width: 900px) {
  .faq-split {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .faq-left {
    position: static;
  }
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.faq-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.faq-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 2px 7px;
  border-radius: 4px;
  margin-bottom: 10px;
  display: inline-block;
}

.faq-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.faq-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.faq-card p code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--text);
}

/* ── Documentation Center ($1M Split Layout) ── */
.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 16px;
  border-right: 1px solid var(--border);
}

.docs-sidebar-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  padding-left: 10px;
}

.docs-nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.15s ease;
}

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

.docs-nav-link.active {
  color: var(--accent);
  background: #eff6ff;
  font-weight: 600;
}

.docs-content section {
  scroll-margin-top: 100px;
  margin-bottom: 64px;
}

.docs-endpoint-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 13px;
  margin-bottom: 16px;
  width: 100%;
}

@media (max-width: 1024px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }
  .docs-sidebar {
    display: none;
  }
}

/* ── Global Footer ── */
footer {
  background: #ffffff;
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 48px;
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 13.5px;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 10px;
  transition: color 0.15s ease;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}
