/* Docs section. Left topic menu, wide reading column.
   Colors match the site header: dark gray, gold for the open page, green on hover. */

.docs-shell {
  padding-top: calc(var(--spacing) * 12);
  background: #fff;
  color: #1a1a1a;
}

.docs-layout {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
  width: 100%;
  max-width: 90rem;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 3.5rem;
  box-sizing: border-box;
}

.docs-nav {
  flex: 0 0 17.5rem;
  position: sticky;
  top: calc(var(--spacing) * 12 + 0.75rem);
  max-height: calc(100vh - var(--spacing) * 12 - 1.5rem);
  overflow: auto;
  padding-right: 0.75rem;
  border-right: 1px solid #e4e4e7;
}

.docs-nav-title {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #333;
}

.docs-nav-title a {
  color: inherit;
  text-decoration: none;
}

.docs-nav-title a[aria-current="page"] {
  color: #C9A227;
}

.docs-tree,
.docs-sub {
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs-sub {
  display: none;
  margin: 0.15rem 0 0.35rem;
  padding-left: 0.85rem;
  border-left: 1px solid #e4e4e7;
}

.docs-item.is-open > .docs-sub {
  display: block;
}

.docs-row {
  display: flex;
  align-items: stretch;
}

.docs-link {
  flex: 1 1 auto;
  display: block;
  padding: 0.4rem 0.35rem;
  color: #1a1a1a;
  text-decoration: none;
  line-height: 1.35;
}

.docs-link:hover {
  color: #178025;
}

.docs-item.is-current > .docs-row > .docs-link {
  color: #C9A227;
  font-weight: 700;
}

.docs-chevron {
  flex: 0 0 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: transparent;
  color: #333;
  cursor: pointer;
}

.docs-chevron:hover {
  color: #178025;
}

.docs-chevron-icon {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.docs-chevron-icon.is-open {
  transform: rotate(45deg);
}

.docs-content {
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 0.15rem;
}

.docs-content h1 {
  margin-top: 0;
  color: #1a1a1a;
}

.docs-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: #52525b;
}

.docs-crumb a {
  color: #178025;
  text-decoration: none;
}

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

@media (max-width: 800px) {
  .docs-layout {
    flex-direction: column;
    gap: 0.75rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .docs-nav-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid #d4d4d8;
    background: #f4f4f5;
    color: #1a1a1a;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
  }

  .docs-nav {
    position: static;
    flex-basis: auto;
    width: 100%;
    max-height: 50vh;
    border-right: 0;
    border-bottom: 1px solid #e4e4e7;
    padding-right: 0;
    padding-bottom: 0.5rem;
  }

  .docs-nav.is-collapsed {
    display: none;
  }
}

html.dark .docs-shell,
html.dark .docs-link,
html.dark .docs-content h1,
html.dark .docs-nav-toggle {
  background: #1a1a1a;
  color: #f4f4f5;
}

html.dark .docs-nav,
html.dark .docs-sub,
html.dark .docs-nav-toggle {
  border-color: #3a3a3a;
}

html.dark .docs-nav-title,
html.dark .docs-chevron,
html.dark .docs-crumb {
  color: #c4c4c4;
}

html.dark .docs-link:hover,
html.dark .docs-chevron:hover,
html.dark .docs-crumb a {
  color: #3dce55;
}
