:root {
  --doc-bg: #0d161b;
  --doc-bg-top: #162129;
  --doc-panel: rgba(17, 25, 32, 0.9);
  --doc-panel-soft: rgba(23, 34, 43, 0.92);
  --doc-line: rgba(157, 184, 204, 0.16);
  --doc-line-strong: rgba(74, 178, 255, 0.28);
  --doc-text: #edf6ff;
  --doc-soft: #9db3c8;
  --doc-accent: #58b7ff;
  --doc-accent-2: #25d0b4;
  --doc-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--doc-text);
  background:
    radial-gradient(circle at top left, rgba(88, 183, 255, 0.18), transparent 24%),
    radial-gradient(circle at bottom right, rgba(37, 208, 180, 0.16), transparent 22%),
    linear-gradient(180deg, var(--doc-bg-top) 0%, var(--doc-bg) 100%);
  text-rendering: optimizeLegibility;
}

a,
button {
  font: inherit;
}

code,
pre {
  font-family: "Consolas", "Courier New", monospace;
}

.documentation-glow {
  position: fixed;
  width: 18rem;
  height: 18rem;
  border-radius: 999px;
  filter: blur(48px);
  opacity: 0.3;
  pointer-events: none;
}

.documentation-glow-left {
  top: -4rem;
  left: -6rem;
  background: rgba(88, 183, 255, 0.56);
}

.documentation-glow-right {
  right: -6rem;
  bottom: -5rem;
  background: rgba(37, 208, 180, 0.4);
}

.documentation-shell {
  position: relative;
  width: min(1240px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 1rem 0 2.4rem;
}

.documentation-hero,
.documentation-card,
.documentation-toc-card {
  border: 1px solid var(--doc-line);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
    var(--doc-panel);
  box-shadow: var(--doc-shadow);
  backdrop-filter: blur(18px);
}

.documentation-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.1rem;
  padding: 1.45rem 1.55rem;
}

.documentation-copy {
  display: grid;
  gap: 0.35rem;
  max-width: 42rem;
}

.documentation-eyebrow,
.documentation-kicker {
  margin: 0;
  color: #8ad9ff;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.documentation-hero h1,
.documentation-section-head h2,
.documentation-body h1,
.documentation-body h2,
.documentation-body h3 {
  margin: 0;
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  letter-spacing: -0.04em;
}

.documentation-hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.96;
}

.documentation-subcopy,
.documentation-placeholder,
.documentation-body p,
.documentation-body li {
  color: var(--doc-soft);
  line-height: 1.8;
}

.documentation-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.documentation-meta-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(138, 217, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: #d6ecff;
  font-size: 0.82rem;
  font-weight: 700;
}

.documentation-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

.documentation-lang {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.2rem;
  border-radius: 999px;
  border: 1px solid rgba(138, 217, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

.documentation-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--doc-line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--doc-text);
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.documentation-link.is-active {
  border-color: rgba(88, 183, 255, 0.38);
  background: rgba(88, 183, 255, 0.18);
}

.documentation-link:hover,
.documentation-toc a:hover {
  transform: translateY(-1px);
  border-color: var(--doc-line-strong);
}

.documentation-link-primary {
  border-color: rgba(88, 183, 255, 0.32);
  background: rgba(88, 183, 255, 0.12);
}

.documentation-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.documentation-card,
.documentation-toc-card {
  padding: 1.3rem;
}

.documentation-toc-card {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow: auto;
}

.documentation-section-head {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1.1rem;
}

.documentation-toc {
  display: grid;
  gap: 0.35rem;
}

.documentation-toc a {
  display: block;
  padding: 0.78rem 0.9rem;
  border: 1px solid var(--doc-line);
  border-radius: 16px;
  color: var(--doc-text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.documentation-toc a[data-level="3"] {
  margin-left: 0.85rem;
  color: var(--doc-soft);
}

.documentation-body {
  display: grid;
  gap: 1.15rem;
  max-width: 780px;
  font-size: 1.02rem;
}

.documentation-body > * {
  margin: 0;
}

.documentation-body h1 {
  font-size: 2.2rem;
}

.documentation-body h2 {
  padding-top: 1rem;
  border-top: 1px solid rgba(157, 184, 204, 0.12);
  font-size: 1.7rem;
  scroll-margin-top: 1rem;
}

.documentation-body h3 {
  font-size: 1.25rem;
  scroll-margin-top: 1rem;
}

.documentation-body p code,
.documentation-body li code {
  padding: 0.12rem 0.42rem;
  border-radius: 8px;
  background: rgba(88, 183, 255, 0.12);
  color: #d3eeff;
}

.documentation-body pre {
  overflow: auto;
  margin: 0;
  padding: 1.05rem 1.1rem;
  border: 1px solid var(--doc-line);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    rgba(7, 12, 18, 0.96);
  color: #d4f2ff;
  line-height: 1.6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.documentation-body ul,
.documentation-body ol {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding-left: 1.45rem;
}

.documentation-body a {
  color: #8ad9ff;
  text-underline-offset: 0.18em;
}

.documentation-body hr {
  border: 0;
  border-top: 1px solid var(--doc-line);
}

@media (max-width: 960px) {
  .documentation-hero,
  .documentation-layout {
    grid-template-columns: 1fr;
    display: grid;
  }

  .documentation-toc-card {
    position: static;
    max-height: none;
  }

  .documentation-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .documentation-shell {
    width: min(100%, calc(100% - 0.8rem));
  }

  .documentation-hero,
  .documentation-card,
  .documentation-toc-card {
    padding: 1rem;
    border-radius: 24px;
  }

  .documentation-toc a[data-level="3"] {
    margin-left: 0;
  }
}
