/* Static docs pages (guides, AI & MCP). Tokens, fonts and the header come from theme.css.
   Sizes copy the Scalar API reference (index.html) so all three sections read as one site. */
:root { font: 16px/1.625 var(--docs-font); scroll-padding-top: 80px; }
body { margin: 0; background: var(--docs-surface); color: var(--docs-text); }
.docs-header { position: sticky; top: 0; z-index: 10; }
a { color: var(--docs-link); text-underline-offset: 3px; }
a:hover { color: var(--docs-accent); }
a:focus-visible { outline: 2px solid var(--docs-accent); outline-offset: 4px; }
.skip { position: absolute; left: 16px; top: -100px; padding: 8px; background: var(--docs-surface); }
.skip:focus { top: 8px; z-index: 20; }

.docs-shell { display: grid; grid-template-columns: 288px minmax(0, 1fr); }
.docs-sidebar {
  position: sticky; top: 64px; align-self: start; box-sizing: border-box;
  height: calc(100vh - 64px); overflow-y: auto; padding: 12px;
  border-right: 1px solid var(--docs-border); font-size: 14px; line-height: 16px;
}
.docs-sidebar p { margin: 16px 8px 8px; color: var(--docs-muted); font-size: 13px; font-weight: 600; }
.docs-sidebar p:first-child { margin-top: 8px; }
.docs-sidebar ul { margin: 0; padding: 0; list-style: none; }
.docs-sidebar li { margin: 0; }
.docs-sidebar a { display: block; padding: 8px; border-radius: 3px; color: var(--docs-muted); text-decoration: none; }
.docs-sidebar a:hover { background: var(--docs-tint); color: var(--docs-text); }
.docs-sidebar [aria-current] { color: var(--docs-link); font-weight: 500; }
main { box-sizing: border-box; max-width: 940px; padding: 48px 60px 64px; }

.breadcrumb { margin: 0 0 8px; color: var(--docs-muted); font-size: 14px; }
h1, h2, h3 { font-family: var(--docs-font-heading); font-weight: 600; letter-spacing: -.01em; }
h1 { margin: 0 0 16px; font-size: 24px; line-height: 1.45; }
h2 { margin: 40px 0 12px; font-size: 20px; line-height: 1.3; }
h3 { margin: 28px 0 8px; font-size: 16px; line-height: 1.4; }
p { margin: 0 0 16px; }
li { margin: 6px 0; }
p, li { overflow-wrap: anywhere; }
code, pre { font-family: var(--docs-font-mono); }
code { padding: 0 3px; border-radius: 3px; background: var(--docs-code-bg); font-size: 12px; }
pre { overflow: auto; padding: 16px; border: 1px solid var(--docs-border); border-radius: 3px; background: var(--docs-code-bg); font-size: 13px; line-height: 1.5; }
pre code { padding: 0; background: none; font-size: inherit; overflow-wrap: normal; }
.table-wrap { overflow-x: auto; margin: 0 0 16px; }
table { border-collapse: separate; border-spacing: 0; border: 1px solid var(--docs-border); border-radius: 3px; font-size: 14px; }
th, td { min-width: 7rem; padding: 8.5px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--docs-border); }
th + th, td + td { border-left: 1px solid var(--docs-border); }
tr:last-child td { border-bottom: 0; }
th { background: var(--docs-code-bg); font-weight: 600; white-space: nowrap; }
/* Neutral boxes, the same treatment as Scalar's tables and code panels. */
.box { margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--docs-border); border-radius: 3px; background: var(--docs-code-bg); }
.reference { margin-top: 48px; }
.reference h2 { margin-top: 4px; font-size: 16px; }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; font-size: 14px; }

/* Scalar drops its sidebar at the same width. */
@media (max-width: 1000px) {
  .docs-shell { grid-template-columns: minmax(0, 1fr); }
  .docs-sidebar { position: static; order: 2; height: auto; border-right: 0; border-top: 1px solid var(--docs-border); padding: 16px; }
  main { padding: 32px 16px 48px; }
}
/* The header wraps onto two rows (98px) here; keep anchor targets clear of it. */
@media (max-width: 520px) { :root { scroll-padding-top: 114px; } }
