:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-subtle: #eeede9;
  --border: #dddcd7;
  --border-strong: #c9c8c2;
  --text: #141413;
  --text-secondary: #5e5e5a;
  --text-tertiary: #888883;
  --accent: #1e3a5f;
  --accent-hover: #152a45;
  --accent-subtle: #eef2f6;
  --success: #166534;
  --success-bg: #e8f5ec;
  --warning: #92400e;
  --warning-bg: #fef6e8;
  --danger: #991b1b;
  --danger-bg: #fef2f2;
  --font: "IBM Plex Sans", system-ui, sans-serif;
  --font-serif: "Source Serif 4", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 6px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 2px rgba(20, 20, 19, 0.04);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9375rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Ambient background for a more polished feel */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 32rem at 50% -8rem, rgba(30, 58, 95, 0.10), transparent 70%),
    radial-gradient(40rem 26rem at 88% 4rem, rgba(30, 58, 95, 0.05), transparent 65%);
}

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

a:hover {
  color: var(--accent-hover);
}

code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--surface-subtle);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(246, 245, 242, 0.92);
  backdrop-filter: blur(8px);
}

.navInner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--text);
}

.brandLogo {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: block;
}

.navLinks {
  display: flex;
  align-items: center;
  gap: 4px;
}

.navLinks a:not(.btn) {
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}

.navLinks a:not(.btn):hover,
.navLinks a:not(.btn).active {
  color: var(--text);
  background: var(--surface-subtle);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.875rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

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

.btnPrimary {
  background: var(--accent);
  color: #fff;
}

.btnPrimary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btnSecondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btnSecondary:hover {
  border-color: var(--border-strong);
  background: var(--surface-subtle);
}

.btnGhost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}

.btnGhost:hover {
  color: var(--text);
  background: var(--surface);
}

.btnLg {
  padding: 10px 20px;
  font-size: 0.9375rem;
}

.btnBlock {
  width: 100%;
}

/* Hero — centered on desktop */
.hero {
  max-width: 780px;
  margin: 0 auto;
  padding: 88px 24px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.eyebrow {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  max-width: 720px;
}

.lead {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 0 32px;
  line-height: 1.65;
}

.heroActions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* MCP pill announcement */
.mcpPill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  margin: 0 0 28px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  transition: border-color 0.12s, transform 0.12s;
}

.mcpPill:hover {
  border-color: var(--accent);
  color: var(--text-secondary);
  transform: translateY(-1px);
}

.mcpPill strong {
  color: var(--text);
  font-weight: 600;
}

.mcpPillDot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-bg);
}

.mcpPillSep {
  width: 1px;
  height: 14px;
  background: var(--border-strong);
}

.mcpPillText {
  color: var(--accent);
  font-weight: 500;
}

/* Hero code block with tabs */
.heroCode {
  margin-top: 48px;
  width: 100%;
  max-width: 620px;
  text-align: left;
}

.codeTabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.codeTab {
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.codeTab:hover {
  color: var(--text);
  background: var(--surface-subtle);
}

.codeTab.active {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.heroCode pre {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.heroCode pre code {
  background: none;
  padding: 0;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre;
}

/* Shared section header */
.sectionHead {
  max-width: 620px;
  margin: 0 auto 32px;
  text-align: center;
}

.sectionHead h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 600;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}

.sectionLead {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0;
  line-height: 1.6;
}

/* Agents / MCP section */
.agents {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 24px 64px;
  scroll-margin-top: 72px;
}

.mcpPanel {
  max-width: 720px;
  margin: 0 auto 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.mcpEndpoint {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.mcpEndpointLabel {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  font-weight: 600;
}

.mcpEndpoint code {
  flex: 1;
  min-width: 200px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 0.875rem;
  color: var(--text);
  word-break: break-all;
}

.mcpPanelHint {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.55;
  margin: 16px 0 0;
}

.mcpTools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.toolChip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--accent-subtle);
  border-radius: 999px;
}

.toolChip code {
  background: none;
  padding: 0;
  font-size: 0.75rem;
  color: var(--accent);
}

.btnSm {
  padding: 6px 12px;
  font-size: 0.8125rem;
}

/* Steps */
.steps {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.steps h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.stepsLead {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin: 0 0 28px;
  max-width: 560px;
  line-height: 1.55;
}

.stepList {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stepCard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.stepNum {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-subtle);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 4px;
}

.stepCard h3 {
  margin: 0 0 6px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.stepCard p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.55;
}

/* Features */
.features {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 64px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.featureCard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.featureCard h3 {
  margin: 0 0 8px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.featureCard p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.55;
}

.ctaBand {
  max-width: 1080px;
  margin: 0 auto 64px;
  padding: 40px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.ctaBand h2 {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 500;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.ctaBand p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.875rem;
}

.ctaActions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* FAQ */
.faq {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 64px;
  scroll-margin-top: 72px;
}

.faqList {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faqItem {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}

.faqItem summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9375rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faqItem summary::-webkit-details-marker {
  display: none;
}

.faqItem summary::after {
  content: "+";
  color: var(--text-tertiary);
  font-size: 1.125rem;
  line-height: 1;
  flex-shrink: 0;
}

.faqItem[open] summary::after {
  content: "−";
}

.faqItem p {
  margin: 12px 0 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.footer {
  margin-top: auto;
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
  gap: 24px;
  color: var(--text-tertiary);
  font-size: 0.8125rem;
}

/* Auth */
.authPage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.authCard {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.authCard h1 {
  margin: 0 0 6px;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.muted {
  color: var(--text-secondary);
  margin: 0 0 24px;
  font-size: 0.875rem;
  line-height: 1.55;
}

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

.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
}

.form input,
.form select {
  padding: 9px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
}

.form input:focus,
.form select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

.optional {
  font-weight: 400;
  color: var(--text-tertiary);
}

.finePrint {
  margin: 20px 0 0;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.error {
  color: var(--danger);
  margin: 0;
  font-size: 0.875rem;
}

.successBadge {
  display: inline-block;
  background: var(--success-bg);
  color: var(--success);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.keyGroup {
  margin-bottom: 18px;
}

.keyLabel {
  font-size: 0.8125rem;
  font-weight: 600;
  margin: 0 0 4px;
}

.keyHint {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  margin: 0 0 8px;
}

.keyBox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 0;
}

.signupInstructions {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 24px;
  line-height: 1.55;
}

.signupInstructions p {
  margin: 0 0 12px;
}

.signupInstructions ol {
  margin: 0;
  padding-left: 1.25rem;
}

.signupInstructions li {
  margin-bottom: 8px;
}

.signupInstructions li ol {
  margin-top: 8px;
}

.visuallyHidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.keyBox code {
  flex: 1;
  min-width: 0;
  background: none;
  padding: 0;
  word-break: break-all;
  font-size: 0.8125rem;
}

.keyBox .btn {
  flex-shrink: 0;
}

/* Docs layout */
.docsLayout {
  display: grid;
  grid-template-columns: 200px 1fr;
  max-width: 1080px;
  margin: 0 auto;
  flex: 1;
  width: 100%;
  gap: 48px;
  padding: 40px 24px 80px;
}

.docsSidebar {
  position: sticky;
  top: 80px;
  align-self: start;
  height: fit-content;
}

.sidebarTitle {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin: 0 0 10px;
  font-weight: 600;
}

.docsSidebar nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.docsSidebar nav a {
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  text-decoration: none;
  font-weight: 500;
}

.docsSidebar nav a:hover {
  color: var(--text);
  background: var(--surface-subtle);
}

.docsContent h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 500;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.docsContent .lead {
  margin-bottom: 0;
}

.docsContent section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.docsContent section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.docsContent h2 {
  margin: 0 0 12px;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.docsContent pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  overflow-x: auto;
  margin: 12px 0;
  box-shadow: var(--shadow-sm);
}

.docsContent pre code {
  background: none;
  padding: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
}

.docsTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.docsTable th,
.docsTable td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.docsTable th {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.8125rem;
}

@media (max-width: 768px) {
  .hero {
    padding: 56px 24px 48px;
  }

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

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

  .ctaBand {
    flex-direction: column;
    align-items: flex-start;
  }

  .mcpPillText {
    display: none;
  }

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

  .docsSidebar {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .docsSidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .navLinks a:not(.btn) {
    display: none;
  }
}
