:root {
  --bg: #ffffff;
  --bg-soft: #f4f4f4;
  --panel: #ffffff;
  --panel-2: #eeeeee;
  --border: #dddddd;
  --border-soft: #f0f0f0;
  --text: #000000;
  --muted: #666666;
  --muted-2: #999999;
  --accent: #000000;
  --accent-2: #000000;
  --warn: #d97706;
  --code-bg: #f4f4f4;
  --radius: 0px;
  --radius-sm: 0px;
  --maxw: 960px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 2px; }
a:hover { text-decoration-color: var(--text); }

code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--code-bg);
  padding: 0.2em 0.4em;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px;
  background: var(--bg);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.9rem;
  color: var(--muted);
}
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  padding: 6px 12px;
  border: 1px solid var(--text);
  color: var(--text) !important;
  background: var(--bg);
}
.nav-cta:hover { background: var(--text); color: var(--bg) !important; }

/* ---------- Layout ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 48px 0; border-top: 1px solid var(--border); }
.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 8px;
}
.section-sub {
  color: var(--muted);
  font-size: 1rem;
  margin: 0 0 32px;
}

/* ---------- Install options ---------- */
.install-container {
  border: 1px solid var(--border);
  padding: 24px;
  background: var(--bg-soft);
}
.install-note {
  color: var(--muted);
  margin: 0 0 16px;
}
.method-panel, .agent-panel { display: none; }
.method-panel.is-active, .agent-panel.is-active { display: block; }

/* ---------- Agent picker ---------- */
.agent-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.agent-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  appearance: none;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.85rem;
  line-height: 1;
  padding: 8px 12px;
}
.agent-chip:hover { color: var(--text); border-color: var(--text); }
.agent-chip.is-active {
  color: var(--text);
  border-color: var(--text);
  background: var(--bg-soft);
  font-weight: 500;
}
.agent-ico { display: inline-flex; width: 17px; height: 17px; flex-shrink: 0; }
.agent-ico svg { width: 100%; height: 100%; display: block; }
.agent-others { position: relative; }
.agent-others-btn .agent-chev { display: inline-flex; width: 13px; height: 13px; }
.agent-others-btn[aria-expanded="true"] .agent-chev { transform: rotate(180deg); }
.agent-others-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  min-width: 190px;
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--text);
  background: var(--bg);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}
.agent-others-menu[hidden] { display: none; }
.agent-opt {
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  padding: 9px 14px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.85rem;
}
.agent-opt:hover { color: var(--text); background: var(--bg-soft); }
.agent-opt.is-active { color: var(--text); font-weight: 500; }
.install-hint {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 12px 0 0;
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  align-items: center;
  padding: 64px 0;
  gap: 64px;
}
.hero-globe {
  position: relative;
  width: 400px;
  height: 400px;
  flex-shrink: 0;
  pointer-events: none;
}
.hero-content {
  flex: 1;
  min-width: 0;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  font-family: var(--mono);
}
.pill .dot {
  width: 6px; height: 6px;
  background: var(--text);
}

.hero h1 {
  font-size: 2.5rem;
  line-height: 1.1;
  font-weight: 600;
  margin: 24px 0 0;
}
.grad {
  color: var(--text);
}
.lede {
  margin: 16px 0 0;
  max-width: 600px;
  font-size: 1.1rem;
  color: var(--muted);
}
.lede strong { color: var(--text); font-weight: 500; }
.lede-sub {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--muted-2);
}

.hero-agents {
  display: flex;
  gap: 8px;
  margin-top: 28px;
}
.hero-agent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  appearance: none;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
}
.hero-agent svg { width: 20px; height: 20px; display: block; }
.hero-agent:hover { color: var(--text); border-color: var(--text); }
.hero-agent.is-active {
  color: var(--text);
  border-color: var(--text);
  background: var(--bg-soft);
}

.endpoint {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  flex-wrap: wrap;
}
.hero-agents + .endpoint { margin-top: 12px; }
.endpoint-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--muted);
}
.endpoint code { background: transparent; padding: 0; }

/* ---------- Flow ---------- */
.how-demo {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 24px;
  align-items: start;
}
.flow {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.flow-step {
  padding: 20px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}
.flow-num {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}
.flow-step h3 { margin: 8px 0; font-size: 1.1rem; font-weight: 600; }
.flow-step p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.flow-arrow { display: none; }
.demo-video {
  background: transparent;
}
.demo-video video {
  display: block;
  width: 100%;
  background: #000000;
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
.tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.9rem;
  padding: 4px 8px;
  cursor: pointer;
}
.tab:hover { color: var(--text); }
.tab.is-active {
  color: var(--text);
  font-weight: 500;
  border-bottom: 2px solid var(--text);
}

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

.steps {
  margin: 0 0 16px;
  padding-left: 20px;
  color: var(--muted);
}
.steps li { margin: 8px 0; }
.steps em { color: var(--text); font-style: normal; }

/* ---------- Code block ---------- */
.code {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  overflow: hidden;
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}
.code pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text);
}
.code pre code { background: transparent; padding: 0; }
.copy-btn, .more-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 4px 8px;
  cursor: pointer;
  text-decoration: none;
}
.copy-btn:hover, .more-btn:hover { color: var(--text); border-color: var(--text); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  text-decoration: none;
}
.btn:hover { border-color: var(--text); text-decoration: none; }
.btn-primary {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--bg);
  color: var(--text);
}
.btn-ghost {
  color: var(--muted);
}
.btn-ghost:hover {
  color: var(--text);
}

/* ---------- Tools ---------- */
.tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.tool-card {
  padding: 16px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}
.tool-card--charge { border-color: var(--text); border-left: 4px solid var(--text); }
.tool-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.tool-top code { font-weight: 500; background: transparent; padding: 0; }
.tool-card h3 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 600; }
.tool-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  padding: 2px 6px;
  border: 1px solid var(--border);
}
.tag-free { color: var(--muted); }
.tag-charge { color: var(--text); border-color: var(--text); }

.resources {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 12px;
  border: 1px solid var(--border);
  flex-wrap: wrap;
}
.resources-label { color: var(--muted); font-size: 0.8rem; }
.resources code { background: var(--bg-soft); }

/* ---------- Payment ---------- */
.payment-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.payment-copy p { color: var(--muted); }
.payment-copy strong { color: var(--text); }
.check-list { list-style: none; padding: 0; margin: 16px 0 0; }
.check-list li {
  margin: 12px 0;
  color: var(--muted);
}
.payment-spec {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 0 16px;
}
.spec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.spec-row:last-child { border-bottom: none; }
.spec-row span { color: var(--muted); font-size: 0.9rem; }
.spec-row code { background: transparent; padding: 0; }
.pay-demo-label { color: var(--muted); margin: 0 0 12px; font-size: 0.9rem; }

/* ---------- Footer ---------- */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 500; text-decoration: none; }
.footer-links { display: flex; gap: 16px; color: var(--muted); font-size: 0.9rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-note { color: var(--muted-2); font-size: 0.8rem; margin: 0; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  padding: 8px 16px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ---------- */
@media (min-width: 600px) {
  .tool-grid { grid-template-columns: 1fr 1fr; }
  .payment-inner { grid-template-columns: 1fr 1fr; }
  .footer { flex-direction: row; justify-content: space-between; align-items: center; }
}
@media (max-width: 768px) {
  .how-demo {
    grid-template-columns: 1fr;
  }
  .hero {
    flex-direction: column;
    text-align: center;
    gap: 24px;
    padding: 32px 0;
  }
  .hero-globe {
    margin-left: 0;
    margin-top: -32px;
    width: min(440px, 96%);
    height: auto;
    aspect-ratio: 1 / 1;
  }
  .hero-cta {
    justify-content: center;
  }
  .endpoint {
    justify-content: center;
  }
}
