:root {
  --brand: #142A4C;
  --brand-deep: #182C4D;
  --canvas: #FDFFFE;
  --surface: #F6F8FB;
  --surface-muted: #EEF2F6;
  --text-strong: #0F1728;
  --text: #223248;
  --text-muted: #5D6B7C;
  --border: #D7DEE8;
  --border-strong: #BCC7D5;
  --success: #1F7A5A;
  --danger: #B24040;
  --mono: "JetBrains Mono", "Courier New", monospace;
  --sans: "Geist", Arial, Helvetica, sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(215, 222, 232, 0.5) 1px, transparent 1px),
    linear-gradient(180deg, rgba(215, 222, 232, 0.45) 1px, transparent 1px),
    var(--canvas);
  background-size: 72px 72px;
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

.shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 255, 254, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.nav-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 28px;
}

.brand-logo {
  width: 176px;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--text-muted);
  font-size: 14px;
}

.nav-links a,
.site-footer a {
  text-decoration: none;
}

.nav-links a:hover,
.site-footer a:hover {
  color: var(--brand);
}

.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.nav-cta,
.button-primary {
  background: var(--brand);
  color: #fff;
}

.button-secondary {
  background: transparent;
  color: var(--brand);
}

.button:hover,
.nav-cta:hover {
  background: var(--brand-deep);
  color: #fff;
}

.hero-section {
  padding: 72px 0 64px;
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 500px);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--brand);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 18px;
  color: var(--text-strong);
  font-size: 58px;
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  color: var(--text-strong);
  font-size: 38px;
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  color: var(--text-strong);
  font-size: 20px;
  line-height: 1.25;
}

.hero-text {
  max-width: 640px;
  color: var(--text-muted);
  font-size: 19px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.proof-panel,
.demo-surface,
.output-panel,
.doc-section pre {
  background: rgba(246, 248, 251, 0.92);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 18px 42px rgba(15, 23, 40, 0.06);
}

.proof-panel {
  overflow: hidden;
}

.proof-header,
.output-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 12px;
}

pre {
  margin: 0;
  overflow-x: auto;
}

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

.proof-panel pre,
.output-panel pre,
.doc-section pre {
  padding: 20px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.65;
}

.section-band {
  padding: 88px 0;
  background: rgba(246, 248, 251, 0.82);
  border-bottom: 1px solid var(--border);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(420px, 1fr);
  gap: 64px;
  align-items: start;
}

.section-copy p,
.section-heading p,
.final-cta p,
.doc-hero p,
.doc-section p,
.legal-copy p {
  color: var(--text-muted);
  font-size: 17px;
}

.demo-surface {
  padding: 24px;
}

.demo-input-group input,
.demo-controls select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.demo-input-group input {
  padding: 0 16px;
  font-family: var(--mono);
}

.demo-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin: 12px 0 20px;
}

.demo-controls select {
  padding: 0 14px;
}

.demo-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cf-turnstile-wrapper {
  min-height: 70px;
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.demo-status {
  min-height: 24px;
  margin-bottom: 14px;
  color: var(--text-muted);
  font-size: 14px;
}

.demo-status.success {
  color: var(--success);
}

.demo-status.error {
  color: var(--danger);
}

.output-panel {
  overflow: hidden;
  box-shadow: none;
}

.output-panel pre {
  max-height: 420px;
}

.trust-grid,
.format-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 88px 0;
}

.trust-grid article,
.format-grid article {
  min-height: 220px;
  padding: 28px;
  background: rgba(253, 255, 254, 0.94);
  border: 1px solid var(--border);
}

.trust-grid {
  grid-template-columns: repeat(4, 1fr);
}

.metric {
  color: var(--brand);
  font-family: var(--mono);
  font-weight: 600;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 32px;
}

.format-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0;
  gap: 20px;
}

.agent-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.8fr);
  gap: 48px;
  align-items: center;
}

.agent-card {
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(231, 237, 246, 0.88));
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 22px 54px rgba(20, 42, 76, 0.1);
}

.agent-card pre {
  margin: 0;
  padding: 24px;
  overflow-x: auto;
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
}

.compact-grid {
  padding: 28px 0 0;
}

.final-cta {
  padding: 96px 0;
  text-align: center;
}

.final-cta h2,
.final-cta p {
  margin-left: auto;
  margin-right: auto;
  max-width: 680px;
}

.final-cta .hero-actions {
  justify-content: center;
}

.site-footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  background: var(--canvas);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 64px;
  align-items: start;
}

.footer-logo {
  width: 150px;
}

.site-footer h4 {
  margin: 0 0 12px;
  color: var(--text-strong);
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: var(--text-muted);
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.compact-footer {
  padding: 0 0 32px;
  border-top: 0;
}

.doc-layout {
  padding: 96px 0;
}

.doc-hero {
  max-width: 780px;
  margin-bottom: 56px;
}

.doc-hero h1 {
  font-size: 52px;
}

.doc-section {
  padding: 38px 0;
  border-top: 1px solid var(--border);
}

.pricing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 48px;
  align-items: start;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0 10px;
}

.plan-grid article {
  min-height: 180px;
  padding: 24px;
  background: rgba(253, 255, 254, 0.94);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.plan-grid h3 {
  margin: 10px 0 8px;
}

.plan-grid p {
  margin: 0;
  font-size: 15px;
}

.pricing-panel {
  padding: 32px;
  background: rgba(253, 255, 254, 0.94);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 18px 42px rgba(15, 23, 40, 0.06);
}

.pricing-panel .metric {
  display: block;
  margin-bottom: 14px;
}

.pricing-list {
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
}

.pricing-list li {
  padding: 14px 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}

.pricing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.endpoint-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin: 20px 0;
}

.endpoint-row span {
  padding: 4px 9px;
  background: var(--brand);
  color: #fff;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 12px;
}

table {
  width: 100%;
  margin: 22px 0;
  border-collapse: collapse;
  background: rgba(253, 255, 254, 0.94);
  border: 1px solid var(--border);
}

th,
td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--text-strong);
  font-size: 13px;
}

td {
  color: var(--text-muted);
}

.legal-copy h2 {
  margin-top: 36px;
}

.error-layout {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px 0;
}

.error-card {
  max-width: 720px;
  padding: 48px;
  background: rgba(253, 255, 254, 0.94);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 18px 42px rgba(15, 23, 40, 0.06);
}

.error-card img {
  width: 156px;
  margin-bottom: 40px;
}

.error-code {
  color: var(--brand);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .nav-inner {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px 0;
  }

  .nav-links {
    flex-wrap: wrap;
  }

  .nav-cta {
    width: fit-content;
  }

  .hero-grid,
  .split-section,
  .agent-grid,
  .pricing-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  h1,
  .doc-hero h1 {
    font-size: 44px;
  }

  .trust-grid,
  .format-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 28px, 1120px);
  }

  .brand-logo {
    width: 148px;
  }

  h1,
  .doc-hero h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 30px;
  }

  .hero-section,
  .section-band,
  .doc-layout {
    padding: 54px 0;
  }

  .demo-controls {
    grid-template-columns: 1fr;
  }

  .button,
  .nav-cta {
    width: 100%;
  }

  .trust-grid,
  .format-grid {
    grid-template-columns: 1fr;
  }

  .proof-panel pre,
  .output-panel pre,
  .doc-section pre {
    font-size: 12px;
  }
}
