/* docs.usebeam.sh — generated by scripts/build-docs-site.mjs (edit scripts/docs-site.css, not docs-site/styles.css) */
/* Palette + accent discipline copied from the canonical token sheet —
   docs/design/beam-tokens.css (#782). The app (src/index.css @theme) is the
   reference surface; cyan = brand/links/active, blue = inline code/info,
   green = success only, amber = warning only. Update the sheet first. */
:root {
  --bg: #06090f;
  --surface: #0d1117;
  --panel: #111820;
  --line: #1b2433;
  --line-bright: #2a3a50;
  --text: #d1d9e1;
  --bright: #e6edf3;
  --dim: #6e7681;
  --dimmer: #484f58;
  --cyan: #39d4e0;
  --blue: #58a6ff;
  --green: #3fb950;
  --amber: #d29922;
  --red: #f85149;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Instrument Sans', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(88, 166, 255, 0.3); }

/* ── Top bar — mirrors the app's AppHeader: slim strip, surface tint,
      mono wordmark in brand cyan, hairline bottom border ─────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1rem;
  height: 48px; padding: 0 1.25rem;
  background: rgba(13, 17, 23, 0.75);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font-family: var(--mono); font-weight: 700; font-size: 0.95rem;
  letter-spacing: 0.08em; color: var(--cyan); text-decoration: none;
}
.wordmark span { color: var(--dim); font-weight: 400; letter-spacing: 0.02em; margin-left: 0.45rem; }
.app-link {
  margin-left: auto; font-family: var(--mono); font-size: 0.8rem;
  color: var(--dim); text-decoration: none;
}
.app-link:hover { color: var(--cyan); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  color: var(--text); font-size: 1rem; border-radius: 4px;
  width: 36px; height: 36px; cursor: pointer;
}

/* ── Layout ──────────────────────────────────────────── */
.layout { display: flex; max-width: 1200px; margin: 0 auto; }
.sidebar {
  width: 240px; flex-shrink: 0;
  position: sticky; top: 48px; align-self: flex-start;
  max-height: calc(100vh - 48px); overflow-y: auto;
  padding: 1.75rem 1rem 3rem 1.25rem;
}
.nav-section { margin-bottom: 1.6rem; }
.nav-section h3 {
  font-family: var(--mono); font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--dimmer); margin-bottom: 0.5rem;
}
.nav-section ul { list-style: none; }
.nav-section li a {
  display: block; padding: 0.28rem 0.6rem; margin: 1px 0;
  font-size: 0.88rem; color: var(--dim);
  text-decoration: none; border-radius: 4px; border-left: 2px solid transparent;
}
.nav-section li a:hover { color: var(--bright); background: var(--surface); }
.nav-section li a.active {
  color: var(--cyan); border-left-color: var(--cyan);
  background: var(--surface); border-radius: 0 4px 4px 0;
}
.content { flex: 1; min-width: 0; padding: 2.5rem 2.5rem 4rem; }
article { max-width: 46rem; }

/* ── Typography — headings are bright text, not accent-colored
      (accent discipline: color is reserved for state + interaction) ── */
article h1 {
  font-family: var(--mono); font-weight: 700; font-size: 1.9rem;
  letter-spacing: -0.02em; color: var(--bright);
  margin-bottom: 1.25rem; line-height: 1.25;
}
article h2 {
  font-family: var(--mono); font-weight: 700; font-size: 1.25rem;
  color: var(--bright); margin: 2.25rem 0 0.75rem;
  padding-top: 1.25rem; border-top: 1px solid var(--line);
}
article h1 + h2, article h2:first-child { border-top: none; padding-top: 0; }
article h3 {
  font-family: var(--mono); font-weight: 700; font-size: 1rem;
  color: var(--bright); margin: 2rem 0 0.5rem;
}
article h4 { font-size: 0.95rem; color: var(--bright); margin: 1.25rem 0 0.4rem; }
article p { margin-bottom: 0.9rem; }
article ul, article ol { margin: 0 0 0.9rem 1.4rem; }
article li { margin-bottom: 0.3rem; }
article a {
  color: var(--cyan); text-decoration: underline;
  text-decoration-color: rgba(57, 212, 224, 0.3); text-underline-offset: 2px;
}
article a:hover { text-decoration-color: var(--cyan); }
article strong { color: var(--bright); }
article em { color: var(--text); }
article hr { border: none; border-top: 1px solid var(--line); margin: 2rem 0; }
article blockquote {
  border-left: 2px solid var(--line); padding-left: 1rem;
  color: var(--dim); margin-bottom: 0.9rem;
}

/* ── Code — reads as the app terminal: same background, cyan prompt,
      mono face (matches .beam-prose pre/code in src/index.css) ───── */
article code {
  font-family: var(--mono); font-size: 0.84em;
  background: rgba(6, 9, 15, 0.6); border: 1px solid var(--line);
  border-radius: 4px; padding: 0.1em 0.35em; color: var(--blue);
}
article pre {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 6px; padding: 0.9rem 1.1rem; margin: 0 0 1rem;
  overflow-x: auto;
}
article pre code {
  background: none; border: none; padding: 0;
  color: var(--text); font-size: 0.83rem; line-height: 1.55;
}
/* Cyan terminal prompt — injected per line by build-docs-site.mjs; not
   selectable, so copied commands stay clean. */
article pre .prompt {
  color: var(--cyan); user-select: none; -webkit-user-select: none;
  margin-right: 0.55em; font-weight: 700;
}

/* ── Tables ──────────────────────────────────────────── */
article table {
  width: 100%; border-collapse: collapse; margin: 0 0 1.1rem;
  font-size: 0.88rem; display: block; overflow-x: auto;
}
article th, article td {
  text-align: left; padding: 0.45rem 0.75rem;
  border: 1px solid var(--line); vertical-align: top;
}
article th {
  font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--dim); background: var(--panel);
}
article td code { white-space: nowrap; }

/* ── Pager + footer ──────────────────────────────────── */
.pager {
  display: flex; justify-content: space-between; gap: 1rem;
  max-width: 46rem; margin-top: 3rem;
}
.pager a {
  display: block; padding: 0.7rem 1rem; border: 1px solid var(--line);
  border-radius: 6px; text-decoration: none; color: var(--bright);
  font-size: 0.9rem; min-width: 10rem;
}
.pager a span {
  display: block; font-family: var(--mono); font-size: 0.65rem;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--dimmer);
  margin-bottom: 0.15rem;
}
.pager a:hover { border-color: var(--cyan); }
.pager-next { text-align: right; margin-left: auto; }
.page-footer {
  max-width: 46rem; margin-top: 2.5rem; padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 0.72rem; color: var(--dimmer);
}

/* ── Mobile ──────────────────────────────────────────── */
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .layout { display: block; }
  .sidebar {
    display: none; position: fixed; top: 48px; left: 0; right: 0; z-index: 15;
    width: 100%; max-height: calc(100vh - 48px);
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  body.nav-open .sidebar { display: block; }
  .content { padding: 1.5rem 1.25rem 3rem; }
  article h1 { font-size: 1.5rem; }
}
