:root {
  color-scheme: dark;
  --bg: #080a0f;
  --bg-soft: #0d1118;
  --panel: #111722;
  --panel-strong: #151d2a;
  --line: #283241;
  --line-soft: #1c2532;
  --text: #f2f5f8;
  --muted: #9ba7b5;
  --dim: #697586;
  --accent: #a78bfa;
  --accent-2: #f0abfc;
  --accent-soft: rgba(167, 139, 250, 0.15);
  --danger: #ff6b6b;
  --shadow: rgba(0, 0, 0, 0.35);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    radial-gradient(circle at 78% 12%, rgba(167, 139, 250, 0.16), transparent 30rem),
    radial-gradient(circle at 16% 22%, rgba(240, 171, 252, 0.1), transparent 26rem),
    var(--bg);
  background-size: 64px 64px, 64px 64px, auto, auto, auto;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(115deg, transparent, rgba(167, 139, 250, 0.06), transparent);
  animation: sweep 12s linear infinite;
}

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

pre,
code {
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, ui-monospace, monospace;
}

pre {
  margin: 0;
  overflow-x: auto;
  color: #d8e3ee;
  font-size: 0.88rem;
  line-height: 1.65;
  white-space: pre;
}

code {
  color: inherit;
}

.page-shell {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(8, 10, 15, 0.86);
  backdrop-filter: blur(18px);
}

.brand,
.site-nav,
.hero-actions,
.quick-facts,
.terminal-top,
.card-head,
.endpoint-row,
.status-band,
.status-card {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 700;
}

.brand-mark {
  display: inline-grid;
  width: 46px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  background: #101722;
  color: var(--accent);
  font-size: 0.82rem;
}

.site-nav {
  gap: 28px;
  color: var(--muted);
  font-size: 0.94rem;
}

.site-nav a {
  transition: color 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  gap: 54px;
  align-items: center;
}

.hero {
  min-height: calc(100vh - 76px);
  padding: 72px 0 88px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 24px;
  font-size: 5rem;
  line-height: 0.96;
}

h2 {
  margin-bottom: 0;
  font-size: 2.3rem;
  line-height: 1.08;
}

h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.lead {
  max-width: 560px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1.7;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.button {
  min-height: 46px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  font-weight: 700;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.button.primary {
  background: var(--accent);
  color: #07100d;
  border-color: var(--accent);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.02);
}

.quick-facts {
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid var(--line-soft);
  background: rgba(17, 23, 34, 0.72);
}

.quick-facts div {
  min-width: 170px;
  padding: 16px 18px;
  border-right: 1px solid var(--line-soft);
}

.quick-facts div:last-child {
  border-right: 0;
}

.quick-facts dt {
  margin-bottom: 6px;
  color: var(--dim);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.quick-facts dd {
  margin: 0;
  color: var(--text);
  font-size: 0.92rem;
}

.terminal-panel,
.example-card,
.endpoint-list,
.status-band {
  border: 1px solid var(--line);
  background: rgba(17, 23, 34, 0.78);
  box-shadow: 0 26px 70px var(--shadow);
}

.terminal-panel {
  min-width: 0;
  transform: translateZ(0);
}

.terminal-top {
  justify-content: space-between;
  min-height: 48px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--dim);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.terminal-top span:first-child {
  width: 10px;
  height: 10px;
  background: var(--accent);
  box-shadow:
    18px 0 0 var(--accent-2),
    36px 0 0 var(--danger);
}

.terminal-panel pre {
  padding: 28px;
}

.content-section {
  padding: 64px 0 40px;
}

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

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

.example-card {
  min-width: 0;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.example-card:hover {
  transform: translateY(-4px);
  border-color: rgba(167, 139, 250, 0.72);
  background: rgba(21, 29, 42, 0.92);
}

.card-head {
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.card-head span {
  color: var(--accent);
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, ui-monospace, monospace;
  font-size: 0.82rem;
}

.example-card pre {
  padding: 18px;
  min-height: 220px;
}

.endpoints {
  padding-top: 88px;
}

.endpoint-list {
  display: grid;
}

.endpoint-row {
  display: grid;
  grid-template-columns: 74px minmax(180px, 1fr) minmax(220px, 1.2fr);
  gap: 20px;
  padding: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.endpoint-row:last-child {
  border-bottom: 0;
}

.method {
  color: var(--accent);
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, ui-monospace, monospace;
  font-size: 0.82rem;
  font-weight: 700;
}

.endpoint-row p {
  margin: 0;
  color: var(--muted);
}

.status-band {
  justify-content: space-between;
  gap: 28px;
  margin: 72px 0 92px;
  padding: 30px;
}

.status-card {
  gap: 12px;
  min-width: 190px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  font-weight: 700;
}

.pulse {
  width: 10px;
  height: 10px;
  background: var(--accent);
  box-shadow: 0 0 0 rgba(167, 139, 250, 0.52);
  animation: pulse 1.8s ease-out infinite;
}

.docs-shell {
  --docs-sidebar: 220px;
}

.docs-layout {
  display: grid;
  grid-template-columns: var(--docs-sidebar) minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  padding: 34px 0 86px;
}

.docs-sidebar {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  background: rgba(17, 23, 34, 0.68);
}

.docs-sidebar a {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.92rem;
  transition:
    color 180ms ease,
    background 180ms ease;
}

.docs-sidebar a:hover,
.docs-sidebar a:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

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

.docs-hero {
  padding: 34px 0 28px;
}

.docs-hero h1 {
  font-size: 4.35rem;
}

.docs-facts {
  width: fit-content;
}

.docs-section {
  padding: 44px 0 20px;
}

.docs-search-band {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 190px auto;
  gap: 14px;
  align-items: end;
  padding: 16px;
  border: 1px solid var(--line);
  background: rgba(17, 23, 34, 0.84);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.section-head.compact {
  align-items: center;
  margin-bottom: 18px;
}

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

.doc-card,
.playground-panel,
.docs-code-block,
.docs-copy,
.check-list {
  border: 1px solid var(--line);
  background: rgba(17, 23, 34, 0.78);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.doc-card {
  min-width: 0;
  padding: 18px;
}

.doc-card-head,
.doc-card-meta,
.doc-card-actions,
.result-head,
.playground-actions,
.result-links,
.check-row {
  display: flex;
  align-items: center;
}

.doc-card-head {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.doc-card-meta {
  flex-wrap: wrap;
  gap: 8px;
}

.doc-card-head code {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #d8e3ee;
  font-size: 0.82rem;
}

.doc-chip,
.docs-count,
.docs-search-count {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 5px 9px;
  border: 1px solid rgba(167, 139, 250, 0.28);
  background: var(--accent-soft);
  color: #d9ccff;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.docs-count,
.docs-search-count {
  white-space: nowrap;
}

.doc-card h3 {
  margin-bottom: 8px;
}

.doc-card p,
.docs-copy p {
  color: var(--muted);
  line-height: 1.65;
}

.doc-card pre {
  min-height: 138px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line-soft);
  background: rgba(8, 10, 15, 0.46);
  font-size: 0.78rem;
}

.doc-card-actions {
  flex-wrap: wrap;
  gap: 10px;
}

.compact-button {
  min-height: 38px;
  padding: 9px 13px;
  font-size: 0.86rem;
}

.docs-code-block {
  position: relative;
  padding: 18px;
}

.docs-code-block pre {
  padding-right: 110px;
}

.docs-code-block .button {
  position: absolute;
  top: 16px;
  right: 16px;
}

.docs-copy {
  padding: 20px;
}

.docs-copy p:last-child {
  margin-bottom: 0;
}

.docs-copy pre {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  background: rgba(8, 10, 15, 0.46);
}

.docs-search,
.docs-filter {
  display: grid;
  gap: 7px;
  color: var(--dim);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

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

.docs-filter {
  min-width: 190px;
}

.docs-search-count {
  justify-content: center;
  min-height: 42px;
}

.docs-search input,
.docs-filter input,
.docs-filter select,
.playground-panel input,
.playground-panel select,
.playground-panel textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(8, 10, 15, 0.7);
  color: var(--text);
  font: inherit;
}

.docs-search input,
.docs-filter input {
  min-height: 40px;
  padding: 9px 11px;
}

.docs-filter select {
  min-height: 40px;
  padding: 9px 11px;
}

.playground-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 16px;
  align-items: stretch;
}

.playground-panel {
  min-width: 0;
  padding: 18px;
}

.playground-panel label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--dim);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.playground-panel input,
.playground-panel select {
  min-height: 42px;
  padding: 10px 12px;
}

.playground-panel textarea {
  min-height: 290px;
  resize: vertical;
  padding: 12px;
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, ui-monospace, monospace;
  font-size: 0.86rem;
  line-height: 1.55;
}

.playground-actions {
  flex-wrap: wrap;
  gap: 10px;
}

.result-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  color: var(--dim);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.result-head span:last-child {
  color: var(--accent);
  text-align: right;
}

.result-output {
  min-height: 342px;
  max-height: 520px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  background: rgba(8, 10, 15, 0.46);
  font-size: 0.78rem;
}

.result-preview {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.copy-state {
  min-height: 22px;
  margin-top: 10px;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 700;
}

.result-preview img,
.result-preview iframe {
  width: 100%;
  min-height: 280px;
  border: 1px solid var(--line-soft);
  background: #fff;
}

.result-preview img {
  height: auto;
  min-height: 0;
}

.result-preview iframe {
  aspect-ratio: 16 / 11;
}

.result-links {
  flex-wrap: wrap;
  gap: 10px;
}

.check-list {
  display: grid;
}

.check-row {
  justify-content: space-between;
  gap: 16px;
  min-height: 54px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.check-row:last-child {
  border-bottom: 0;
}

.check-row span {
  font-weight: 700;
}

.check-row code {
  color: var(--muted);
  text-align: right;
  overflow-wrap: anywhere;
}

.check-row.running code {
  color: var(--accent-2);
}

.check-row.passed code {
  color: var(--accent);
}

.check-row.failed code {
  color: var(--danger);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed var(--line);
  color: var(--muted);
  background: rgba(17, 23, 34, 0.52);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 620ms ease,
    transform 620ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 100ms;
}

.delay-2 {
  transition-delay: 190ms;
}

@keyframes sweep {
  0% {
    transform: translateX(-28%) skewX(-12deg);
  }

  100% {
    transform: translateX(28%) skewX(-12deg);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.52);
  }

  70%,
  100% {
    box-shadow: 0 0 0 14px rgba(167, 139, 250, 0);
  }
}

@media (max-width: 980px) {
  .section-grid,
  .example-grid,
  .docs-layout,
  .playground-grid {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    display: flex;
    overflow-x: auto;
  }

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

  .docs-search-band {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  h1 {
    font-size: 4rem;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 24px, var(--max));
  }

  .site-header {
    height: auto;
    min-height: 70px;
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding: 16px 0;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .hero {
    padding-top: 48px;
  }

  h1 {
    font-size: 3.15rem;
  }

  h2 {
    font-size: 1.85rem;
  }

  .lead {
    font-size: 1.04rem;
  }

  .quick-facts {
    display: grid;
    width: 100%;
  }

  .quick-facts div {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .quick-facts div:last-child {
    border-bottom: 0;
  }

  .terminal-panel pre,
  .example-card pre {
    padding: 16px;
    font-size: 0.78rem;
  }

  .section-head,
  .status-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-head.compact {
    align-items: flex-start;
  }

  .docs-hero h1 {
    font-size: 3.15rem;
  }

  .docs-facts {
    width: 100%;
  }

  .docs-code-block pre {
    padding-right: 0;
  }

  .docs-code-block .button {
    position: static;
    margin-top: 14px;
  }

  .docs-filter {
    width: 100%;
    min-width: 0;
  }

  .endpoint-row {
    grid-template-columns: 64px 1fr;
  }

  .endpoint-row p {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
