/* Documentation pages (/docs). Loaded after styles.css. */

.docs-layout {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
@media (min-width: 60rem) {
  .docs-layout { grid-template-columns: 16.5rem minmax(0, 1fr); gap: 3rem; }
  .docs-side { position: sticky; top: 5.5rem; max-height: calc(100vh - 6.5rem); overflow-y: auto; }
}

.docs-nav {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  font-size: .9375rem;
}
.docs-nav h2 {
  font-size: .8125rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin: 0 0 .6rem;
}
.docs-nav ul { list-style: none; padding: 0; margin: 0 0 1rem; }
.docs-nav li { margin: 0 0 .2rem; }
.docs-nav a {
  display: block;
  padding: .25rem .5rem;
  margin-inline: -.5rem;
  border-radius: 6px;
  color: var(--text-muted);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.docs-nav a:hover { color: var(--accent); background: var(--surface-2); }
.docs-nav a[aria-current="page"] { color: var(--text); background: var(--accent-soft); font-weight: 620; }

.docs-onpage { margin: 0 0 1rem; border-top: 1px solid var(--border); padding-top: .75rem; }
.docs-onpage summary {
  cursor: pointer;
  font-size: .8125rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  font-weight: 650;
  margin-bottom: .5rem;
}
.docs-onpage ul { margin: 0; }
.docs-onpage .lvl3 a { padding-left: 1.25rem; font-size: .875rem; }

.docs-content { min-width: 0; }
.docs-prose { max-width: 52rem; }
.docs-prose h2 { scroll-margin-top: 1rem; }
.docs-prose h3, .docs-prose h4 { scroll-margin-top: 1rem; margin-top: 1.75rem; }
.docs-prose h4 { font-size: 1rem; }
.docs-prose .anchor {
  margin-left: .35em;
  font-weight: 400;
  text-decoration: none;
  color: var(--text-muted);
  opacity: 0;
}
.docs-prose :is(h2, h3, h4):hover .anchor,
.docs-prose .anchor:focus { opacity: 1; }
@media (hover: none) { .docs-prose .anchor { opacity: .5; } }

.docs-prose pre { font-size: .8125rem; line-height: 1.5; }
.docs-prose table { font-size: .875rem; }
.docs-prose td code, .docs-prose th code { white-space: nowrap; }
.docs-prose td, .docs-prose th { min-width: 7rem; }
.docs-prose blockquote {
  margin: 0 0 1rem;
  padding: .1rem 1rem;
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.table-scroll:focus-visible, pre:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.docs-cards { list-style: none; padding: 0; display: grid; gap: .75rem; }
.docs-cards li {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  margin: 0;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.docs-cards span { color: var(--text-muted); font-size: .9375rem; }

.docs-foot { margin-top: 3rem; color: var(--text-muted); font-size: .875rem; max-width: 52rem; }
