/* ============================================================
   Documentation section
   Theme-aware (uses theme.css tokens). Not reusing
   .markdown-content (its white-space:pre-wrap is for raw
   client-side markdown and mis-renders server HTML).
   ============================================================ */

/* ---- Sidebar ---- */
.docs-sidebar-link.active {
  background-color: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

/* ---- Prose / rendered markdown ---- */
.docs-prose {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 52rem;
}
.docs-prose > :first-child { margin-top: 0; }

.docs-prose h1,
.docs-prose h2,
.docs-prose h3,
.docs-prose h4 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
  scroll-margin-top: 5rem; /* clear the sticky header when jumping to an anchor */
}
.docs-prose h1 { font-size: 2rem; margin: 0 0 1rem; }
.docs-prose h2 { font-size: 1.5rem; margin: 2.25rem 0 1rem; padding-bottom: .35rem; border-bottom: 1px solid var(--border-subtle); }
.docs-prose h3 { font-size: 1.2rem; margin: 1.75rem 0 .6rem; }
.docs-prose h4 { font-size: 1.05rem; margin: 1.4rem 0 .5rem; }

.docs-prose p { margin: 0 0 1.1rem; }

.docs-prose a { color: var(--accent); font-weight: 500; text-decoration: none; }
.docs-prose a:hover { text-decoration: underline; }

.docs-prose ul,
.docs-prose ol { margin: 0 0 1.1rem; padding-left: 1.5rem; }
.docs-prose li { margin: 0.3rem 0; }
.docs-prose li::marker { color: var(--text-muted); }

.docs-prose strong { color: var(--text-primary); font-weight: 600; }

/* Inline code */
.docs-prose :not(pre) > code {
  background-color: var(--surface-2);
  color: var(--accent);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.875em;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

/* Code blocks — kept dark in both themes for consistent, readable snippets */
.docs-prose pre {
  background-color: #0d1117;
  border: 1px solid #1f2630;
  border-radius: 0.6rem;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  margin: 0 0 1.3rem;
  font-size: 0.875rem;
  line-height: 1.55;
}
.docs-prose pre code {
  background: none;
  padding: 0;
  color: #e6edf3;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

/* Blockquote / callout */
.docs-prose blockquote {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  padding: 0.75rem 1rem;
  margin: 0 0 1.2rem;
  border-radius: 0 0.4rem 0.4rem 0;
  color: var(--text-secondary);
}
.docs-prose blockquote p:last-child { margin-bottom: 0; }

/* Tables */
.docs-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.4rem;
  font-size: 0.925rem;
}
.docs-prose th,
.docs-prose td {
  border: 1px solid var(--border-subtle);
  padding: 0.6rem 0.8rem;
  text-align: left;
}
.docs-prose th { background: var(--surface-2); color: var(--text-primary); font-weight: 600; }

/* Images / screenshots */
.docs-prose img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border-subtle);
  border-radius: 0.6rem;
  box-shadow: var(--shadow);
  margin: 0.5rem 0 1.4rem;
}

.docs-prose hr { border: 0; border-top: 1px solid var(--border-subtle); margin: 2rem 0; }

.docs-prose kbd {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 0.1em 0.4em;
  font-size: 0.8em;
  font-family: 'SFMono-Regular', Consolas, monospace;
}
