/* docs.css -- documentation and long-form prose.
   Everything is scoped under .doc-layout or .prose so marketing.css
   keeps the landing page unchanged. */

:root {
  --doc-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --doc-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --doc-ink: #2a2a2a;
  --doc-muted: #6b6b6b;
  --doc-rule: #d8d8d8;
  --doc-code-bg: #f4f4f2;
  --doc-accent: #1d4ed8;
}

/* -- shell ---------------------------------------------------------------- */

.doc-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 3rem; }

@media (max-width: 860px) {
  .doc-layout { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* min-width:0 stops a long line inside <pre> from expanding the column
   past the container instead of scrolling. */
.doc-content, .prose { min-width: 0; }

/* -- sidebar -------------------------------------------------------------- */

.doc-nav {
  background: none;
  font-family: var(--doc-sans);
  font-size: 0.875rem;
  align-self: start;
  position: sticky;
  top: 1.5rem;
}

.doc-nav__title {
  font-family: var(--doc-sans);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--doc-muted);
  margin: 0 0 0.75rem;
}

.doc-nav ul { list-style: none; margin: 0; padding: 0; }
.doc-nav li { margin: 0; }

.doc-nav a {
  display: block;
  padding: 0.35rem 0 0.35rem 0.75rem;
  border-left: 2px solid var(--doc-rule);
  color: var(--doc-ink);
  text-decoration: none;
  line-height: 1.35;
}

.doc-nav a:hover { color: var(--doc-accent); border-left-color: var(--doc-muted); }

.doc-nav a[aria-current="page"] {
  font-weight: 600;
  color: var(--doc-accent);
  border-left-color: var(--doc-accent);
}

/* -- prose ---------------------------------------------------------------- */

.doc-content, .prose {
  font-family: var(--doc-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--doc-ink);
  max-width: 46rem;
}

/* headings keep the serif identity, body text does not */
.doc-content h1, .prose h1,
.doc-content h2, .prose h2,
.doc-content h3, .prose h3 {
  font-family: "Felix Titling", "Bookman Old Style", Serif;
  color: var(--doc-ink);
  line-height: 1.2;
}

.doc-content h1, .prose h1 { font-size: 2.25rem; margin: 0 0 1rem; }

.doc-content h2, .prose h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--doc-rule);
}

.doc-content h3, .prose h3 { font-size: 1.15rem; margin: 1.75rem 0 0.5rem; }

.doc-content p, .prose p { margin: 0 0 1rem; }
.doc-content ul, .doc-content ol,
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.35rem; }
.doc-content li, .prose li { margin-bottom: 0.35rem; }

.doc-content a, .prose a { color: var(--doc-accent); text-decoration: underline; }
.doc-content a:hover, .prose a:hover { text-decoration: none; }

/* -- code ----------------------------------------------------------------- */

.doc-content code, .prose code {
  font-family: var(--doc-mono);
  font-size: 0.85em;
  background: var(--doc-code-bg);
  border: 1px solid var(--doc-rule);
  border-radius: 3px;
  padding: 0.1em 0.35em;
  white-space: nowrap;
}

.doc-content pre, .prose pre {
  font-family: var(--doc-mono);
  font-size: 0.82rem;
  line-height: 1.5;
  background: var(--doc-code-bg);
  border: 1px solid var(--doc-rule);
  border-radius: 4px;
  padding: 0.9rem 1rem;
  margin: 0 0 1.25rem;
  overflow-x: auto;
}

/* inline styling must not apply to code inside a block */
.doc-content pre code, .prose pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  white-space: pre;
}

/* -- tables --------------------------------------------------------------- */

.doc-content table, .prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 0 0 1.5rem;
  display: block;
  overflow-x: auto;
}

.doc-content th, .prose th {
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--doc-muted);
  border-bottom: 2px solid var(--doc-ink);
  padding: 0.4rem 0.75rem 0.4rem 0;
  white-space: nowrap;
}

.doc-content td, .prose td {
  padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 1px solid var(--doc-rule);
  vertical-align: top;
}

.doc-content td code, .prose td code { white-space: nowrap; }

/* -- post meta ------------------------------------------------------------ */

.prose__meta {
  font-family: var(--doc-sans);
  font-size: 0.8rem;
  color: var(--doc-muted);
  margin: 0 0 2rem;
}

.doc-content > :last-child, .prose > :last-child { margin-bottom: 0; }


/* -- post list ------------------------------------------------------------ */

.post-list { list-style: none; margin: 2rem 0 0; padding: 0; }

.post-list__item {
  margin: 0 0 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--doc-rule);
}

.post-list__item:last-child { border-bottom: none; }

.post-list__title {
  font-family: "Felix Titling", "Bookman Old Style", Serif;
  font-size: 1.35rem;
  color: var(--doc-ink);
  text-decoration: none;
  line-height: 1.25;
}

.post-list__title:hover { color: var(--doc-accent); }

.post-list__meta {
  font-size: 0.8rem;
  color: var(--doc-muted);
  margin: 0.35rem 0 0.6rem;
}

.post-list__excerpt { margin: 0; color: var(--doc-ink); }
