/* Values copied from packages/web-ui/tokens.css (the design tokens, docs/img/stage-01.png).
   Plain CSS: this site is outside the pnpm workspace and has no build step. */
:root {
  --bg: #f8f7f4;
  --surface: #ffffff;
  --surface-2: #f1efeb;
  --text: #151412;
  --text-2: #6b675f;
  --border: #e6e3dd;
  --brand: #2e6bff;
  --link: #2860e6; /* Primary on bg is 4.2:1; link text uses this 5.0:1 shade (DECISIONS.md 2026-10-06) */
  --danger: #c93636;
  --radius-md: 12px;
  --radius-card: 20px;
  --font: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  color-scheme: light dark;
}
/* The reference pages are light only: Redoc has no dark theme. */
@media (prefers-color-scheme: dark) {
  :root:not(.light) {
    --bg: #0d0d0f;
    --surface: #161619;
    --surface-2: #1e1e22;
    --text: #f6f6f7;
    --text-2: #9b9ba3;
    --border: #2a2a2f;
    --brand: #4c82ff;
    --link: #4c82ff;
  }
}
:root.light { color-scheme: light; }

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
}
a { color: var(--link); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  padding: 12px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; font-size: 17px; color: var(--text); text-decoration: none; }
.site-header nav ul { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; list-style: none; }
.site-header nav a { display: inline-block; padding: 6px 0; font-weight: 600; text-decoration: none; }
.site-header nav a:hover { text-decoration: underline; }
.site-header nav a[aria-current="page"] { color: var(--text); text-decoration: underline; text-underline-offset: 6px; }

main.doc { max-width: 760px; margin: 0 auto; padding: 32px 20px 64px; }
h1 { font-size: 26px; line-height: 1.25; margin: 0 0 12px; }
h2 { font-size: 20px; margin: 32px 0 8px; }
h3 { font-size: 17px; font-weight: 600; margin: 24px 0 8px; }
.lead { color: var(--text-2); font-size: 17px; margin-top: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; padding: 0; list-style: none; }
.cards li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 16px; }
.cards a { font-weight: 700; }
.cards p { margin: 4px 0 0; color: var(--text-2); }

code, pre { font-family: var(--mono); font-size: 13px; }
code { background: var(--surface-2); padding: 1px 4px; border-radius: 4px; overflow-wrap: anywhere; }
pre { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px 16px; overflow-x: auto; }
pre code { background: none; padding: 0; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { text-align: left; vertical-align: top; padding: 8px 12px; border: 1px solid var(--border); }
th { background: var(--surface-2); font-weight: 600; }

.ref-status { max-width: 760px; margin: 32px auto; padding: 0 20px; }
.ref-status.error { color: var(--danger); font-weight: 600; }
.ref-status.error a { font-weight: 600; }
