:root {
  --bg: #0b0f17;
  --bg-alt: #101624;
  --surface: #141c2c;
  --surface-raised: #1a2438;
  --border: #26334d;
  --border-strong: #374b70;
  --text: #eef3fb;
  --text-muted: #9aa9c4;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code, pre {
  font-family: var(--mono);
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Zero Customer Trace Resale Guarantee Banner */
.trust-banner {
  background: linear-gradient(90deg, #064e3b 0%, #0f3d56 50%, #064e3b 100%);
  border-bottom: 1px solid #10b98166;
  padding: 10px 0;
}

.trust-banner-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.trust-badge {
  background: #10b981;
  color: #032219;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.trust-copy {
  margin: 0;
  font-size: 13px;
  color: #d1fae5;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 15, 23, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  color: #031525;
  font-weight: 800;
  font-size: 14px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text small {
  color: var(--text-muted);
  font-size: 11px;
  font-family: var(--mono);
}

.header-nav {
  display: flex;
  gap: 20px;
  font-size: 14px;
}

.header-nav a {
  color: var(--text-muted);
  font-weight: 500;
}

.header-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.health-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
  font-family: var(--mono);
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warning);
}

.status-dot.ok {
  background: var(--success);
}

.status-dot.err {
  background: var(--danger);
}

/* Hero */
.hero {
  padding: 44px 0 32px;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(circle at 20% 0%, rgba(56, 189, 248, 0.12), transparent 50%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 28px;
  align-items: start;
}

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: 36px;
  line-height: 1.18;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 15px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.metric-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.metric-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  font-family: var(--mono);
}

.metric-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.hero-guarantees {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.hero-guarantees h2 {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--accent);
}

.guardrail-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.guardrail-list strong {
  color: var(--text);
}

/* Sections */
.section {
  padding: 40px 0;
}

.alt-section {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.section-head h2 {
  margin: 0 0 4px;
  font-size: 24px;
}

.muted {
  color: var(--text-muted);
  margin: 0;
}

.small-copy {
  font-size: 13px;
  margin-bottom: 12px;
}

.pill-accent {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
}

/* Domain tabs */
.domain-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.domain-tab {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.domain-tab:hover {
  border-color: var(--border-strong);
  background: var(--surface-raised);
}

.domain-tab.active {
  border-color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
}

.tab-title {
  font-weight: 700;
  font-size: 14px;
}

.tab-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.domain-health-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.grade-chip {
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* Playground */
.playground-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 18px;
  align-items: start;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="url"],
select,
textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 13px;
  font-family: var(--sans);
}

textarea {
  font-family: var(--mono);
  font-size: 12px;
  resize: vertical;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.field-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.field-hint.error {
  color: #fca5a5;
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

.link-btn:hover {
  text-decoration: underline;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.switches-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.switch-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  cursor: pointer;
}

.switch-card input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--accent);
}

.switch-body {
  display: flex;
  flex-direction: column;
  font-size: 12px;
}

.switch-body small {
  color: var(--text-muted);
  font-weight: 400;
}

.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-primary {
  background: var(--accent);
  color: #041524;
}

.btn-primary:hover {
  background: #7dd3fc;
  text-decoration: none;
}

.btn-secondary {
  background: var(--surface-raised);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: #22304b;
  text-decoration: none;
}

/* Output Panel */
.output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.output-header h3 {
  margin: 0;
  font-size: 16px;
}

.http-badge {
  font-family: var(--mono);
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.http-badge.ok {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.1);
}

.http-badge.warn {
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.1);
}

.http-badge.err {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.1);
}

.receipt-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.receipt-stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
}

.receipt-stat.highlight-stat {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.08);
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
}

.receipt-stat strong {
  font-family: var(--mono);
  font-size: 15px;
  margin-top: 2px;
}

.selected-node-box,
.trace-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.box-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-small {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  font-family: var(--mono);
}

.node-kv-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  font-size: 12px;
  font-family: var(--mono);
}

.trace-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
}

.trace-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  flex-wrap: wrap;
}

.attestation-bar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11px;
  color: #86efac;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
}

.raw-json-details summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--text-muted);
  user-select: none;
}

.raw-json-details pre {
  margin: 8px 0 0;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 11px;
  overflow-x: auto;
  max-height: 260px;
}

/* BYOK Section */
.byok-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}

.status-msg {
  margin-top: 10px;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--text-muted);
}

.status-msg.ok {
  color: #86efac;
}

.status-msg.err {
  color: #fca5a5;
}

.key-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.key-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  font-family: var(--mono);
}

/* Pricing SKU Grid */
.sku-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.sku-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.sku-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35);
}

.sku-badge {
  position: absolute;
  top: -11px;
  left: 16px;
  background: var(--accent);
  color: #031525;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
}

.sku-tier {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.sku-card h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.sku-price {
  font-size: 30px;
  font-weight: 800;
  font-family: var(--mono);
}

.sku-price span {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

.sku-micros {
  font-family: var(--mono);
  font-size: 12px;
  color: #86efac;
  margin: 4px 0 14px;
}

.sku-features {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  color: var(--text-muted);
  flex: 1;
}

.sku-features li::before {
  content: "+ ";
  color: var(--success);
  font-weight: 700;
}

.sku-cta {
  width: 100%;
}

/* Developer Strip */
.dev-strip {
  background: #080c13;
  border-top: 1px solid var(--border);
  padding: 34px 0;
}

.dev-strip-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.dev-strip-head h2 {
  margin: 0;
  font-size: 20px;
}

.dev-links {
  display: flex;
  gap: 14px;
  font-family: var(--mono);
  font-size: 12px;
}

.snippet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.snippet-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.snippet-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--surface-raised);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.copy-btn {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 5px;
  cursor: pointer;
}

.copy-btn:hover {
  border-color: var(--accent);
}

.snippet-card pre {
  margin: 0;
  padding: 12px;
  font-size: 11px;
  overflow-x: auto;
  color: #cbd5e1;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  font-size: 12px;
  color: var(--text-muted);
}

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

@media (max-width: 960px) {
  .hero-grid,
  .playground-grid,
  .byok-grid,
  .snippet-grid {
    grid-template-columns: 1fr;
  }
  .domain-tabs {
    grid-template-columns: repeat(2, 1fr);
  }
  .sku-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .header-nav {
    display: none;
  }
  .domain-tabs,
  .sku-grid,
  .two-col,
  .switches-grid {
    grid-template-columns: 1fr;
  }
}
