/* Documentation layout */
.docs-layout {
  background-color: #f8fafc;
  min-height: calc(100vh - 4rem);
}

.docs-shell {
  display: grid;
  gap: 2rem;
  margin: 0 auto;
  max-width: 1200px;
  padding: 2rem 1.5rem 3rem;
  grid-template-columns: 260px minmax(0, 1fr);
}

.docs-shell.docs-shell--with-toc {
  grid-template-columns: 260px minmax(0, 1fr) 220px;
}

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

.docs-sidebar {
  position: sticky;
  top: 5.5rem;
  align-self: start;
  height: calc(100vh - 5.5rem);
  overflow-y: auto;
  padding-right: 1rem;
}

.docs-sidebar__accordion {
  background: transparent;
  border: none;
  padding: 0;
}

.docs-sidebar__summary {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #1e293b;
  cursor: pointer;
  font-weight: 600;
  padding: 0.75rem 1rem;
}

.docs-sidebar__summary::-webkit-details-marker {
  display: none;
}

.docs-sidebar__summary::after {
  content: "";
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #475569;
  transition: transform 0.2s ease;
}

.docs-sidebar__accordion[open] .docs-sidebar__summary::after {
  transform: rotate(180deg);
}

.docs-sidebar__nav {
  margin: 0;
  padding: 0;
}

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

.docs-nav--nested {
  margin-top: 0.5rem;
  padding-left: 1rem;
  border-left: 1px solid #e2e8f0;
}

.docs-nav__item {
  margin-bottom: 0.25rem;
}

.docs-nav__link {
  display: block;
  border-radius: 0.75rem;
  color: #475569;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.docs-nav__link:hover {
  background: #eef2ff;
  color: #1e293b;
}

.docs-nav__link.is-active,
.docs-nav__item.is-active > .docs-nav__link {
  background: #4338ca;
  color: #ffffff;
}

.docs-prose {
  color: #0f172a;
  line-height: 1.7;
  margin: 0 auto;
  max-width: 720px;
  padding-bottom: 3rem;
}

.docs-prose h1,
.docs-prose h2,
.docs-prose h3 {
  color: #111827;
  font-weight: 700;
  line-height: 1.2;
}

.docs-prose h1 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.docs-prose h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.docs-prose h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.docs-prose p {
  margin-bottom: 1rem;
}

.docs-prose ul,
.docs-prose ol {
  margin-bottom: 1.25rem;
  padding-left: 1.25rem;
}

.docs-prose li {
  margin-bottom: 0.35rem;
}

.docs-prose code {
  background: #f1f5f9;
  border-radius: 0.375rem;
  font-size: 0.95em;
  padding: 0.1rem 0.4rem;
}

.docs-prose pre {
  background: #0f172a;
  border-radius: 0.75rem;
  color: #f8fafc;
  font-size: 0.875rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  padding: 1rem 1.25rem;
}

.docs-prose pre code {
  background: transparent;
  padding: 0;
}

.docs-header {
  margin-bottom: 2.5rem;
}

.docs-eyebrow {
  color: #6366f1;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.docs-section + .docs-section {
  margin-top: 2.5rem;
}

.docs-toc {
  position: sticky;
  top: 5.5rem;
  align-self: start;
  max-height: calc(100vh - 5.5rem);
  overflow-y: auto;
  padding-left: 0.5rem;
}

.docs-toc .toc-nav {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
}

.docs-toc .toc-title {
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

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

.docs-toc .toc-list li {
  margin-bottom: 0.5rem;
}

.docs-toc .toc-list a {
  color: #475569;
  font-size: 0.875rem;
  text-decoration: none;
}

.docs-toc .toc-list a:hover {
  color: #1e293b;
}

@media (max-width: 1023px) {
  .docs-shell {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem 1rem 2.5rem;
  }

  .docs-shell.docs-shell--with-toc {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    height: auto;
    overflow: visible;
    padding-right: 0;
  }

  .docs-sidebar__summary {
    display: flex;
  }

  .docs-sidebar__accordion {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.25rem 0.75rem 0.75rem;
    background: #ffffff;
  }

  .docs-sidebar__accordion:not([open]) .docs-sidebar__nav {
    display: none;
  }

  .docs-toc {
    position: static;
    max-height: none;
    padding-left: 0;
  }
}
