.docs-body {
  min-height: 100vh;
}

.docs-site-header {
  position: fixed;
}

.docs-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  margin-bottom: 12px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.docs-search span {
  color: var(--muted);
  font-size: 0.88rem;
}

.docs-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.docs-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 820px) 220px;
  gap: 28px;
  width: min(1480px, calc(100% - 40px));
  margin: 0 auto;
  padding: 116px 0 70px;
}

.docs-sidebar,
.docs-toc {
  position: sticky;
  top: 116px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow: auto;
  padding: 12px;
}

.docs-section-label {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.docs-nav-button,
.docs-toc a {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.docs-nav-button {
  padding: 9px 10px;
  font-weight: 650;
  line-height: 1.35;
}

.docs-nav-button:hover,
.docs-nav-button.active,
.docs-toc a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.docs-toc a {
  padding: 7px 10px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.docs-toc a[data-depth="3"] {
  padding-left: 22px;
}

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

.docs-article-head,
.docs-content {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  box-shadow: var(--shadow);
}

.docs-article-head {
  padding: 34px;
  border-radius: 24px 24px 0 0;
}

.docs-article-head h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  letter-spacing: -0.055em;
}

.docs-summary {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.docs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 24px;
}

.docs-content {
  padding: 34px;
  border-top: 0;
  border-radius: 0 0 24px 24px;
}

.docs-content.loading,
.docs-content.error {
  color: var(--muted);
}

.docs-content h1,
.docs-content h2,
.docs-content h3 {
  scroll-margin-top: 100px;
  letter-spacing: 0;
}

.docs-content h1 {
  margin: 0 0 18px;
  font-size: 2.2rem;
  line-height: 1.12;
}

.docs-content h2 {
  margin: 34px 0 14px;
  font-size: 1.55rem;
}

.docs-content h3 {
  margin: 26px 0 10px;
  font-size: 1.18rem;
}

.docs-content p,
.docs-content li {
  color: var(--muted);
  line-height: 1.75;
}

.docs-content a {
  color: var(--accent-2);
}

.docs-content ul,
.docs-content ol {
  padding-left: 1.25rem;
}

.docs-content pre {
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.26);
}

.docs-content code {
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

.docs-content :not(pre) > code {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.docs-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.docs-content blockquote {
  margin: 18px 0;
  padding: 12px 16px;
  border-left: 3px solid var(--accent-2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

@media (max-width: 1120px) {
  .docs-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .docs-toc {
    display: none;
  }
}

@media (max-width: 760px) {
  .docs-shell {
    grid-template-columns: 1fr;
    width: min(100% - 24px, 760px);
    padding-top: 216px;
  }

  .docs-sidebar {
    position: static;
    max-height: 260px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
  }

  .docs-article-head,
  .docs-content {
    padding: 22px;
  }
}
