.docs-page {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(255, 106, 0, 0.12), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(29, 32, 115, 0.35), transparent 50%),
    var(--bg);
}

.site-primary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.site-primary a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  padding: 8px 10px;
  border-bottom: 2px solid transparent;
}

.site-primary a[aria-current="page"] {
  border-bottom-color: var(--coral);
  color: var(--coral);
}

.site-primary a:hover {
  color: var(--coral);
}

.docs-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 28px;
  padding: 28px 0 64px;
  align-items: start;
}

.docs-nav-mobile {
  display: none;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  background: rgba(22, 22, 24, 0.72);
  padding: 10px 14px;
}

.docs-nav-mobile > summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ember);
  list-style: none;
}

.docs-nav-mobile > summary::-webkit-details-marker {
  display: none;
}

.docs-nav-desktop,
.docs-nav-mobile .docs-nav {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 16px 14px 20px;
  border: 1px solid var(--line);
  background: rgba(22, 22, 24, 0.72);
  backdrop-filter: blur(8px);
}

.docs-nav-root {
  display: block;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 560;
  color: var(--ink);
  margin-bottom: 12px;
}

.docs-nav-root:hover {
  color: var(--ember);
}

.docs-tree {
  list-style: none;
  margin: 0;
  padding: 0 0 0 0.75rem;
  border-left: 1px solid var(--line);
}

.docs-tree-item {
  margin: 0;
}

.docs-tree-item > a {
  display: block;
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  padding: 6px 0 6px 10px;
}

.docs-tree-item > a:hover {
  color: var(--ink);
}

.docs-tree-item.is-active > a,
.docs-tree-item > a[aria-current="page"] {
  color: var(--ember);
}

.docs-tree .docs-tree {
  margin-top: 2px;
  margin-bottom: 6px;
}

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

.docs-body {
  padding: 8px 4px 40px;
  color: var(--ink);
}

.docs-body > *:first-child {
  margin-top: 0;
}

.docs-body h1,
.docs-body h2,
.docs-body h3 {
  font-family: var(--serif);
  font-weight: 560;
  line-height: 1.2;
  color: #fff7ef;
}

.docs-body h1 {
  font-size: clamp(1.8rem, 2.4vw, 2.4rem);
  margin: 0 0 1rem;
}

.docs-body h2 {
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--line);
}

.docs-body h3 {
  font-size: 1.05rem;
  margin: 1.4rem 0 0.5rem;
}

.docs-body p,
.docs-body li {
  color: #d8d0c6;
}

.docs-body a {
  color: var(--ember);
}

.docs-body ul {
  padding-left: 1.2rem;
}

.docs-body img {
  margin: 1rem 0 1.25rem;
  max-width: 100%;
  height: auto;
  background: #f7f5f1;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.docs-body pre {
  overflow-x: auto;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: #101012;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.45;
  color: #efe6da;
}

.docs-body code {
  font-family: var(--mono);
  font-size: 0.92em;
}

.docs-body p code,
.docs-body li code {
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1em 0.35em;
}

@media (max-width: 900px) {
  .docs-shell {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .docs-nav-desktop {
    display: none;
  }

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

  .docs-nav-mobile .docs-nav {
    position: static;
    max-height: none;
    margin-top: 12px;
    border: 0;
    padding: 0;
    background: transparent;
  }

  .site-header-inner {
    flex-wrap: wrap;
  }

  .site-primary {
    order: 3;
    width: 100%;
    margin-left: 0;
  }
}
