.docs {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  padding-top: 40px;
  padding-bottom: 80px;
}

.docs__toc-toggle {
  display: none;
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: #161b28;
  color: #f4f7ff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.docs__sidebar {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: #6b6f80 #161b28;
}
.docs__sidebar::-webkit-scrollbar {
  width: 8px;
}
.docs__sidebar::-webkit-scrollbar-track {
  background: #161b28;
  border-radius: 6px;
}
.docs__sidebar::-webkit-scrollbar-thumb {
  background: #6b6f80;
  border-radius: 6px;
}
.docs__sidebar::-webkit-scrollbar-thumb:hover {
  background: #97a5c2;
}

.docs__search {
  margin: 0 0 20px;
}

.docs__search-input {
  width: 100%;
}

.docs__search-hint {
  margin: 6px 2px 0;
  font-size: 12px;
  color: #6b6f80;
}

.docs__nav-list,
.docs__subnav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs__nav-list {
  counter-reset: docs-chapter;
}

.docs__nav-item {
  margin-bottom: 2px;
}

.docs__nav-link {
  counter-increment: docs-chapter;
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: #97a5c2;
  font-size: 14px;
  line-height: 1.35;
}
.docs__nav-link::before {
  content: counter(docs-chapter) ". ";
  color: #6b6f80;
}
.docs__nav-link:hover {
  background: #161b28;
  color: #f4f7ff;
}

.docs__nav-item.is-current > .docs__nav-link {
  color: #f4f7ff;
  font-weight: 700;
  background: #161b28;
}

.docs__subnav {
  margin: 4px 0 10px;
  padding-left: 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.docs__subnav-link {
  display: block;
  padding: 5px 10px;
  border-radius: 6px;
  color: #97a5c2;
  font-size: 13px;
}
.docs__subnav-link:hover {
  color: #f4f7ff;
  background: #161b28;
}

.docs__results-count {
  margin: 0 2px 10px;
  font-size: 12px;
  color: #6b6f80;
}

.docs__results-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs__result {
  margin-bottom: 4px;
}

.docs__result-link {
  display: block;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid transparent;
}
.docs__result-link:hover {
  background: #161b28;
  border-color: rgba(255, 255, 255, 0.08);
}

.docs__result-heading {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #f4f7ff;
  margin-bottom: 4px;
}

.docs__result-snippet {
  display: block;
  font-size: 12px;
  line-height: 1.5;
  color: #97a5c2;
}
.docs__result-snippet mark {
  background: transparent;
  color: #1a4dff;
  font-weight: 700;
}

.docs__main {
  min-width: 0;
}

.docs__title {
  font-size: clamp(28px, 4vw, 38px);
  margin-bottom: 28px;
}

.docs__content section {
  margin-bottom: 40px;
  scroll-margin-top: 24px;
}
.docs__content h2 {
  font-size: 22px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.docs__content h3 {
  font-size: 17px;
  margin: 24px 0 10px;
}
.docs__content p {
  color: #97a5c2;
  margin-bottom: 14px;
}
.docs__content ul,
.docs__content ol {
  color: #97a5c2;
  margin: 0 0 16px;
  padding-left: 24px;
}
.docs__content li {
  margin-bottom: 8px;
}
.docs__content li::marker {
  color: #6b6f80;
}
.docs__content strong {
  color: #f4f7ff;
  font-weight: 650;
}
.docs__content code {
  font-family: ui-monospace, "SFMono-Regular", "Menlo", monospace;
  font-size: 0.9em;
  padding: 2px 6px;
  border-radius: 4px;
  background: #0f131c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f4f7ff;
}

.docs-shot {
  margin: 20px 0 24px;
}

.docs-shot__img {
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: #0f131c;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
}

.docs-shot__caption {
  margin-top: 8px;
  font-size: 12px;
  color: #6b6f80;
}

.docs-shot--missing .docs-shot__img {
  display: none;
}

.docs-shot--missing .docs-shot__caption::before {
  content: "";
  display: block;
  height: 120px;
  margin-bottom: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: #0f131c;
}

.docs__trademark {
  margin-top: 32px;
  font-size: 12px;
  color: #6b6f80;
}

.docs__pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.docs__pager-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 45%;
}

.docs__pager-link--next {
  text-align: right;
  margin-left: auto;
}

.docs__pager-dir {
  font-size: 12px;
  color: #6b6f80;
}

.docs__pager-title {
  font-weight: 700;
  color: #f4f7ff;
}

@media (max-width: 900px) {
  .docs {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .docs__toc-toggle {
    display: block;
  }
  .docs__sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    display: none;
    margin-bottom: 32px;
  }
  .docs__sidebar.is-open {
    display: block;
  }
}
