/* Constellation Studio docs site (scripts/build-docs.mjs), styled like the studio (direction D: Geist, hairlines, one
   blue). One small script (docs.js) marks the section being read; light and dark follow the system. */
@font-face { font-family: 'Geist'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(geist-latin-wght-normal.woff2) format('woff2'); }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(geist-mono-latin-wght-normal.woff2) format('woff2'); }
/* The studio's tokens (src/chrome.css): Hairline neutrals, one ink, one blue. */
:root {
  --bg: #fafafa; --surface: #ffffff; --text: #171717; --body: #333333; --muted: #666666; --border: #ebebeb; --hover: #f2f2f2;
  --accent: #0761d1; --accent-line: #0070f3; --accent-soft: #f0f6ff; --code: #f2f2f2; --ink: #171717; --on-ink: #ffffff;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0a0a0a; --surface: #111111; --text: #ededed; --body: #c7c7c7; --muted: #a1a1a1; --border: #262626; --hover: #1f1f1f; --accent: #52a8ff; --accent-line: #3291ff; --accent-soft: #0a1a2e; --code: #1a1a1a; --ink: #ededed; --on-ink: #0a0a0a; color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.65 'Geist', system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 1px; }
.top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 48px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; }
.brand span:last-child { color: var(--muted); font-weight: 400; }
.logo { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--ink); color: var(--on-ink); font-size: 12px; }
.open { height: 30px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 6px; background: var(--ink); color: var(--on-ink); text-decoration: none; font-weight: 500; font-size: 13px; white-space: nowrap; }
.open:hover { opacity: .88; }
.wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr) 230px; max-width: 1480px; margin: 0 auto; }
.side { position: sticky; top: 48px; align-self: start; max-height: calc(100vh - 48px); overflow: auto; padding: 20px 12px 24px 16px; display: grid; gap: 0; border-right: 1px solid var(--border); min-height: calc(100vh - 48px); }
.side a { padding: 5px 8px; border-radius: 6px; color: var(--body); text-decoration: none; font-size: 13px; line-height: 18px; }
.side a:hover { background: var(--hover); color: var(--text); }
.side a[aria-current="page"] { background: var(--hover); color: var(--text); font-weight: 600; }
.page { min-width: 0; padding: 32px 40px 80px; max-width: 860px; color: var(--body); }
/* On this page: the sections of the current page, beside it on wide screens, a fold-out list above it otherwise. */
.toc { position: sticky; top: 48px; align-self: start; max-height: calc(100vh - 48px); overflow: auto; padding: 32px 24px 24px 8px; font-size: 13px; }
.toc p { margin: 0 0 8px; font-weight: 500; color: var(--muted); font-size: 12px; }
.toc nav, .toc-inline nav { display: grid; gap: 1px; border-left: 1px solid var(--border); }
.toc a, .toc-inline a { display: block; padding: 4px 10px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.4; }
.toc a:hover, .toc-inline a:hover { color: var(--text); border-left-color: var(--muted); }
.toc a.active, .toc-inline a.active { color: var(--text); border-left-color: var(--accent-line); font-weight: 600; }
.toc a.toc-3, .toc-inline a.toc-3 { padding-left: 22px; font-size: 12.5px; }
.toc-inline { display: none; margin: 0 0 20px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.toc-inline summary { cursor: pointer; font-weight: 600; }
.toc-inline nav { margin-top: 8px; }
@media (max-width: 1180px) { .wrap { grid-template-columns: 240px minmax(0, 1fr); } .toc { display: none; } .toc-inline { display: block; } }
.page h1 { font-size: 32px; line-height: 1.2; letter-spacing: -.02em; font-weight: 600; color: var(--text); margin: 0 0 16px; }
.page h2 { font-size: 22px; line-height: 1.3; letter-spacing: -.01em; font-weight: 600; color: var(--text); margin: 44px 0 12px; padding-top: 20px; border-top: 1px solid var(--border); }
.page h3 { font-size: 16px; font-weight: 600; color: var(--text); margin: 28px 0 8px; }
.page strong, .page b { color: inherit; font-weight: 600; }
/* Links look the same everywhere: same colour and weight, also when the Markdown made them bold. */
.page a, .page a strong, .page strong a { color: var(--accent); font-weight: 500; }
.page img { max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 6px; }
.page figure.video { margin: 0 0 24px; }
.page figure.video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--border); border-radius: 6px; }
.page figure.video figcaption { margin-top: 6px; font-size: 13px; color: var(--muted, #666); }
.page code { font-family: 'Geist Mono', ui-monospace, Menlo, Consolas, monospace; background: var(--code); padding: 1px 5px; border-radius: 4px; font-size: .86em; color: var(--text); overflow-wrap: anywhere; }
.page pre { background: var(--code); padding: 14px 16px; border: 1px solid var(--border); border-radius: 6px; overflow: auto; line-height: 1.55; }
.page a code { color: inherit; }
.page pre code { padding: 0; background: none; overflow-wrap: normal; }
.page table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; font-size: inherit; line-height: 1.55; }
.page th, .page td { border: 0; border-bottom: 1px solid var(--border); padding: 8px 12px 8px 0; text-align: left; vertical-align: top; }
.page th { font-weight: 600; color: var(--text); font-size: 13px; }
.page blockquote { margin: 16px 0; padding: 4px 16px; border-left: 2px solid var(--accent-line); color: var(--body); }
@media (max-width: 820px) {
  .top { padding: 0 12px; }
  .wrap { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; min-height: 0; display: flex; gap: 4px; overflow-x: auto; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--border); }
  .side a { white-space: nowrap; }
  .page { padding: 24px 16px 64px; }
  .page h1 { font-size: 25px; }
}
