:root {
  --bg: #0b1020;
  --bg-soft: #10182d;
  --panel: #121b31;
  --panel-soft: #0f172a;
  --text: #e7ecf5;
  --muted: #9aa7bd;
  --line: rgba(154, 167, 189, 0.18);
  --line-strong: rgba(154, 167, 189, 0.28);
  --accent: #8ea2ff;
  --accent-soft: rgba(142, 162, 255, 0.12);
  --container: 1120px;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

.narrow {
  max-width: 760px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(8, 12, 20, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding: 10px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.brand span {
  color: var(--muted);
  font-weight: 600;
}

.brand-text {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.brand-icon {
  width: 1.15rem;
  height: 1.15rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
}

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

/* Hero */

.hero {
  padding: 96px 0 84px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 860px;
  font-size: clamp(2.2rem, 4vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.lead {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.9;
}

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

.hero-grid--with-visual {
  align-items: center;
}

.hero-grid--with-visual .hero-copy {
  max-width: 640px;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-screenshot {
  width: 100%;
  max-width: 640px;
  margin: 0;
}

.hero-demo-strip {
  padding-top: 0;
}

/* Buttons */

.button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    filter 0.2s ease;
}

.button:hover,
.btn:hover {
  transform: translateY(-1px);
}

.button {
  background: var(--accent-soft);
  border-color: var(--line-strong);
  color: var(--text);
}

.button:hover {
  background: rgba(142, 162, 255, 0.2);
}

.button-secondary {
  background: transparent;
}

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

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-secondary {
  background: rgba(142, 162, 255, 0.12);
  color: var(--text);
  border-color: rgba(142, 162, 255, 0.26);
}

.btn-secondary:hover {
  background: rgba(142, 162, 255, 0.18);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.14);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* Sections */

.section {
  padding: 72px 0;
}

.section-alt {
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-tight {
  padding-top: 24px;
}

.section h2 {
  margin: 0 0 14px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.2;
}

.section p {
  margin: 0 0 14px;
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0 0 12px;
}

.section-text,
.section-note {
  max-width: 760px;
  color: var(--muted);
}

.section-text {
  margin: 0;
  line-height: 1.8;
}

.section-note {
  margin-top: 18px;
}

/* Grid / cards */

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.card {
  height: 100%;
  padding: 22px 20px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.02)
  );
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.card a {
  color: inherit;
}

.card a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Workflow */

.workflow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.workflow-step {
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel-soft);
  font-weight: 700;
}

.workflow-arrow {
  color: var(--muted);
}

/* Architecture */

.architecture-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 22px;
}

.architecture-item {
  padding: 18px 20px;
  border-left: 3px solid rgba(142, 162, 255, 0.7);
  border-radius: 0 14px 14px 0;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.architecture-item h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.architecture-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

/* Screenshot */

.screenshot {
  margin-top: 20px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.screenshot img {
  border-radius: 8px;
}

/* Lists */

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.plain-list {
  margin: 0;
  padding-left: 18px;
}

.plain-list li {
  margin: 8px 0;
  color: var(--muted);
}

.ordered {
  padding-left: 22px;
}

/* Docs */

.docs-page {
  padding: 32px 0 56px;
}

.docs-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: 20px;
  align-self: start;
}

.docs-sidebar-inner {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.docs-sidebar-eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.docs-sidebar-title {
  margin: 0 0 14px;
  font-size: 1.2rem;
  line-height: 1.2;
}

.docs-nav {
  display: grid;
  gap: 6px;
}

.docs-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.docs-nav a:hover {
  color: var(--text);
  background: rgba(154, 167, 189, 0.08);
}

.docs-nav a.is-active,
.docs-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--accent-soft);
  border: 1px solid var(--line-strong);
}

.docs-nav-group {
  display: block;
}

.docs-nav-sub {
  margin-top: 0.35rem;
  margin-left: 0.9rem;
  padding-left: 0.65rem;
  border-left: 1px solid rgba(142, 162, 255, 0.2);
}

.docs-nav-sub a {
  font-size: 0.95em;
}

.docs-content {
  min-width: 0;
}

.docs-hero {
  padding: 8px 0;
}

.docs-lead {
  max-width: 780px;
}

.docs-section {
  padding-top: 28px;
  padding-bottom: 28px;
}

.docs-grid .card h3 a {
  color: inherit;
}

.docs-grid .card h3 a:hover {
  color: var(--accent);
}

/* Docs pagination */

.docs-pagination {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.docs-pagination-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.docs-prev,
.docs-next {
  flex: 1;
  display: block;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.docs-prev:hover,
.docs-next:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.docs-prev {
  text-align: left;
}

.docs-next {
  text-align: right;
}

.docs-pagination-label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--muted);
}

.docs-pagination-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* Code blocks */

pre {
  overflow-x: auto;
  padding: 16px;
  border-radius: 8px;
  background: #0f172a;
  color: #e5e7eb;
  font-size: 13px;
}

.copy-block {
  position: relative;
  margin: 16px 0;
}

.copy-block pre {
  margin: 0;
  padding-top: 48px;
}

.copy-button {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font: inherit;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.copy-button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.copy-button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.copy-button.is-copied {
  opacity: 0.9;
}

.param {
  display: inline-block;
  padding: 0 4px;
  border-radius: 4px;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}

/* Demo */

.demo-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.demo-card--featured {
  position: relative;
  border-color: rgba(59, 130, 246, 0.22);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.demo-card--featured::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.demo-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.demo-card-header h2 {
  margin: 4px 0 8px;
}

.demo-title-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.35rem;
}

.demo-title-row .eyebrow {
  margin: 0;
}

.demo-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.demo-open-button {
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.demo-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0 0.9rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.demo-meta-label {
  font-weight: 600;
}

.demo-meta-separator {
  opacity: 0.55;
}

.demo-credentials {
  display: grid;
  gap: 12px;
  max-width: 420px;
  margin-top: 0.4rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.04);
}

.demo-credential-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: center;
  gap: 12px;
}

.demo-credential-row + .demo-credential-row {
  margin-top: 0.75rem;
}

.demo-credential-label {
  font-size: 13px;
  color: var(--muted);
}

.code-inline {
  display: inline-block;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  font-family: monospace;
  font-size: 14px;
}

.demo-note {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.035);
  color: var(--muted);
  font-size: 14px;
}

/* Hero detailed list */

.hero-card-list--detailed li {
  margin-bottom: 12px;
}

.hero-card-list--detailed strong {
  display: block;
  font-weight: 600;
}

.hero-card-list--detailed span {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
}

/* Footer */

.site-footer {
  margin-top: 48px;
  padding: 28px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* Responsive */

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

  .header-inner,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-grid--with-visual {
    gap: 32px;
  }

  .hero-screenshot {
    max-width: 100%;
  }
}

@media (max-width: 860px) {
  .two-column,
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-layout {
    gap: 20px;
  }

  .docs-sidebar {
    position: static;
  }

  .docs-sidebar-inner {
    padding: 16px;
  }

  .docs-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .demo-meta {
    flex-wrap: wrap;
  }
}

@media (max-width: 680px) {
  .section {
    padding: 56px 0;
  }

  .hero {
    padding: 72px 0 60px;
  }

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

  .nav {
    gap: 12px;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn,
  .button {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(var(--container), calc(100% - 24px));
  }

  .docs-page {
    padding: 24px 0 44px;
  }

  .docs-nav,
  .docs-pagination-inner {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .docs-next {
    text-align: left;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 10px 14px;
  }

  .workflow-arrow {
    display: none;
  }

  .section-tight {
    padding-top: 16px;
  }
}

.table-wrap {
  overflow-x: auto;
}

.mapping-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.mapping-table th,
.mapping-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mapping-table thead th {
  border-top: none;
}

.mapping-table th:first-child,
.mapping-table td:first-child {
  width: 42%;
}

.mapping-table th:last-child,
.mapping-table td:last-child {
  width: 58%;
}

.mapping-table code {
  white-space: nowrap;
}

@media (max-width: 720px) {
  .mapping-table code {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

.field-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.field-chip-list code {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.field-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.field-chip-list code {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.docs-content .card > h3 + p {
  margin-bottom: 14px;
}

.docs-content pre {
  overflow-x: auto;
  max-width: 100%;
}

.docs-content pre code {
  white-space: pre;
}