/* web/docs.css -- page-scoped styles for the docs layout.
 * Builds on tokens/components from brand.css (loaded first). Do not
 * redefine color/type tokens here -- only docs-specific layout. */

.docs-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding: 48px 0 96px;
}

.docs-sidebar {
  position: sticky;
  top: 86px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}

.docs-sidebar .docs-group + .docs-group { margin-top: 1.5rem; }

.docs-sidebar .docs-group-title {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-faint);
  margin: 0 0 0.6rem;
}

.docs-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.docs-sidebar a {
  display: block;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 500;
}

.docs-sidebar a:hover {
  color: var(--text);
  background: var(--bg-elev);
}

.docs-content {
  min-width: 0;
  max-width: 72ch;
}

.docs-content section {
  padding: 0 0 3rem;
  scroll-margin-top: 86px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 3rem;
}

.docs-content section:last-of-type {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.docs-content h2 { margin-top: 0; }
.docs-content h3 { margin-top: 2rem; color: var(--text); }

.docs-content ul, .docs-content ol {
  color: var(--text-dim);
  padding-left: 1.2rem;
}
.docs-content li { margin-bottom: 0.4rem; }

.docs-content pre { margin: 1rem 0 1.4rem; }

.docs-intro {
  max-width: 72ch;
  margin-bottom: 1rem;
}

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

.docs-faq dt {
  font-weight: 650;
  color: var(--text);
  margin-top: 1.2rem;
}
.docs-faq dd {
  margin: 0.3rem 0 0;
  color: var(--text-dim);
}

@media (max-width: 860px) {
  .docs-layout {
    grid-template-columns: 1fr;
    padding-top: 32px;
  }

  .docs-sidebar {
    display: none;
  }

  .docs-mobile-nav {
    display: block;
    position: relative;
    margin-bottom: 1.5rem;
  }

  .docs-mobile-nav select {
    width: 100%;
    font: inherit;
    font-weight: 600;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--bg-elev-2);
    color: var(--text);
  }
}

/* Inline note / caution callout within docs content (e.g. authorization). */
.docs-content .docs-note {
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--warn);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: var(--text-dim);
  font-size: 0.95rem;
}
