.docs-page {
  min-height: 100vh;
  min-height: 100dvh;
  color: #e0edfa;
  background: #000000;
}

.docs-page .shell {
  width: min(1440px, calc(100% - clamp(32px, 5vw, 80px)));
}

.docs-layout {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  grid-template-areas: "sidebar main";
  align-items: start;
  gap: clamp(28px, 4vw, 64px);
  padding: 28px 0 80px;
}

.docs-sidebar {
  grid-area: sidebar;
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 48px);
  height: calc(100dvh - 48px);
  min-height: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  background: #000000;
}

.docs-sidebar-header {
  flex: none;
  padding: 0 22px 16px 0;
}

.docs-sidebar-header p {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 640;
}

.docs-sidebar-header span {
  color: #a8d5ff;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
}

.docs-sidebar-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #374b60 transparent;
  padding: 0 18px 8px 0;
}

.docs-sidebar-group + .docs-sidebar-group {
  margin-top: 26px;
}

.docs-sidebar-group > p {
  margin: 0 0 9px;
  color: #a4bdd6;
  font-size: 0.82rem;
  font-weight: 500;
}

.docs-sidebar-group nav {
  display: grid;
  gap: 2px;
}

.docs-sidebar-group a {
  display: block;
  padding: 7px 10px;
  border-left: 2px solid transparent;
  color: #bfd4e8;
  font-size: 0.84rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.docs-sidebar-group a.is-sub {
  padding-left: 22px;
  color: #9ebbd7;
  font-size: 0.8rem;
}

.docs-sidebar-group nav[aria-label="On this page"] > a:not(.is-sub) {
  margin-top: 12px;
  color: #e0edfa;
  font-weight: 640;
}

.docs-sidebar-group nav[aria-label="On this page"] > a:first-child {
  margin-top: 0;
}

.docs-sidebar-group a.is-current {
  border-left-color: #a8d5ff;
  color: #fff;
  background: rgba(168, 213, 255, 0.10);
}

.docs-sidebar-group a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.docs-sidebar-group a:focus-visible,
.docs-sidebar-footer a:focus-visible {
  color: #fff;
  outline: 2px solid #a8d5ff;
  outline-offset: -2px;
}

.docs-sidebar-footer {
  flex: none;
  margin-right: 22px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
}

.docs-text-size {
  display: flex;
  align-items: center;
  gap: 8px;
}

.docs-text-size-btn {
  min-width: 36px;
  min-height: 36px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  color: #edf6ff;
  font-size: 0.82rem;
  background: transparent;
  cursor: pointer;
}

.docs-text-size-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
}

.docs-text-size-btn:focus-visible {
  outline: 2px solid #a8d5ff;
  outline-offset: 2px;
}

.docs-text-size-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.docs-text-size-label {
  color: #a4bdd6;
  font-family: var(--mono);
  font-size: 0.72rem;
}

.docs-source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 1.2rem;
  font-size: 0.85rem;
}

.docs-source-links a {
  color: #a8d5ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.docs-main {
  grid-area: main;
  min-width: 0;
  max-width: 58rem;
  font-size: var(--docs-font-size, 16px);
  line-height: 1.6;
}

/* Prose must inherit the main column size (not root rem from other sheets). */
.docs-page .docs-main .docs-prose {
  font-size: 1em;
}

.docs-main h1,
.docs-main h2,
.docs-main h3,
.docs-main h4 {
  color: #ffffff;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 640;
}

.docs-main h2,
.docs-main h3,
.docs-main h4 {
  scroll-margin-top: 5.5rem;
}

.docs-prose h1 {
  margin: 0 0 12px;
  font-size: clamp(1.75em, 4vw, 2.5em);
}

.docs-lede {
  max-width: none;
  margin: 0 0 28px;
  color: #d5e5f5;
  font-size: 1.05em;
  line-height: 1.55;
}

.docs-main section {
  margin: 0 0 28px;
}

.docs-main table {
  width: 100%;
  margin: 12px 0 8px;
  border-collapse: collapse;
  font-size: 1em;
}

.docs-table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.docs-main th,
.docs-main td {
  padding: 0.65em 0.75em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: top;
}

.docs-main th {
  color: #b5cde6;
  font-size: 0.78em;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.docs-main td:first-child,
.docs-prose td:first-child {
  width: 26%;
  min-width: 9rem;
}

.docs-main code,
.docs-prose code {
  font-family: var(--mono);
  color: #a8d5ff;
  font-size: 0.92em;
}

.docs-main pre,
.docs-prose pre {
  overflow: auto;
  padding: 0.9em 1em;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  font-size: 0.92em;
  line-height: 1.5;
  background: #050b12;
}

.docs-main pre code,
.docs-prose pre code {
  color: #edf6ff;
  font-size: 1em;
}

.docs-prose {
  display: grid;
  gap: 0.9em;
}

.docs-prose h2 {
  max-width: none;
  margin: 2em 0 0;
  padding-top: 0.85em;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 1.65em;
  line-height: 1.25;
}

.docs-prose h3 {
  max-width: none;
  margin: 1.8em 0 0;
  padding-top: 1.1em;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--mono);
  font-size: 1.18em;
  font-weight: 680;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.docs-prose h2 + h3 {
  margin-top: 0.45em;
  padding-top: 0;
  border-top: 0;
}

.docs-prose h4 {
  margin: 0.9em 0 -0.25em;
  color: #e0edfa;
  font-size: 1em;
  font-weight: 640;
  line-height: 1.4;
}

.docs-prose h3 code {
  color: inherit;
  font-size: 1em;
}

.docs-prose p,
.docs-prose li,
.docs-prose td,
.docs-prose th {
  max-width: none;
  color: #d5e5f5;
  font-size: 1em;
  line-height: 1.6;
}

.docs-prose a {
  color: #a8d5ff;
}

.docs-prose a:hover {
  text-decoration: underline;
}

.docs-prose blockquote {
  margin: 0;
  padding: 0.5em 1em;
  border-left: 3px solid #a8d5ff;
}

.docs-prose ul,
.docs-prose ol {
  margin: 0;
  padding-left: 1.2em;
}

@media (max-width: 960px) {
  .docs-layout {
    grid-template-columns: 228px minmax(0, 1fr);
    gap: 28px;
  }
}

@media (max-width: 760px) {
  .docs-layout {
    grid-template-areas: "sidebar" "main";
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding-top: 20px;
  }

  .docs-sidebar {
    position: static;
    height: 19rem;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 14px;
  }

  .docs-sidebar-body {
    padding-right: 8px;
  }

  .docs-sidebar-footer {
    margin-right: 0;
    padding-top: 10px;
  }
}
