/* Argus docs — implements the "Argus Docs Blocks" specification from the
   Claude Design project, v1. Every block on a page comes from that inventory.
   Rules of assembly: one anchor per screenful; two fills max per page
   (#F1F4F8 or #F7FAFC — dark #0D1224 is a register, not a fill); coral marks
   one thing per block; no shadows; radius only on avatars, chips and ⌘-keys;
   every division is a 1px hairline. */

/* Fonts — vendored locally from Fontsource (no CDN, offline-safe). */
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/geist-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/geist-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/geist-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/geist-sans-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/geist-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/geist-mono-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/instrument-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/instrument-sans-latin-600-normal.woff2') format('woff2'); }

:root {
  /* Colour roles (blocks spec 01) */
  --field: #0d1224;        /* code & chrome */
  --field-deep: #0a0f1e;   /* tab strip */
  --plate: #243a59;        /* mono keys, callout text */
  --link: #364f70;
  --keyline: #c79a45;      /* gold rule */
  --keyline-dim: #6b5628;
  --gold-type: #a98f58;    /* eyebrow, prompts, bullets */
  --ocellus: #da291c;      /* active, guardrail, don't — one per block */
  --glow: #ffd9d5;
  --callout-fill: #f1f4f8;
  --panel-fill: #f7fafc;
  --card-fill: #fcfcfd;
  --page: #ffffff;
  --ink: #09090b;
  --body: #3f3f46;
  --secondary: #52525b;
  --muted: #71717a;
  --faint: #a1a1aa;
  --hairline: #e4e4e7;     /* structure */
  --hairline-in: #ededf0;  /* rows inside a block */
  --hairline-strong: #d4d4d8;
  --fog: #e2e7ef;
  --nav-muted: #8fa0b8;
  --nav-dim: #7285a3;
  --code-text: #c3cedc;
  --code-key: #eb7070;
  --code-val: #d9be86;
  --warn-fill: #fff6db; --warn-rule: #f59e0b; --warn-ink: #7a4b00; --warn-body: #4a2e00;
  --tip-fill: #e8f8ef; --tip-rule: #22c55e; --tip-ink: #14532d;
  --err-fill: #fce9e9; --err-ink: #861616;
  --sans: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --display: 'Instrument Sans', var(--sans);
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--body);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--ocellus); }

/* ---- Top bar (blocks 08: avatar, wordmark, gold version, section links) -- */

header {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 60px;
  padding: 0 40px;
  background: var(--field);
  box-shadow: inset 0 -1px 0 0 var(--keyline-dim);
}
header .brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 500; font-size: 20px;
  letter-spacing: -0.03em; color: #fafafa;
}
header .brand:hover { color: #fafafa; }
header .avatar { position: relative; width: 26px; height: 26px; border-radius: 9999px; overflow: hidden; flex: 0 0 auto; }
header .avatar img { position: absolute; width: 240%; height: 240%; left: -70%; top: -40%; object-fit: cover; }
header .ver { font-family: var(--mono); font-size: 11px; color: var(--gold-type); }
header .topnav { display: flex; align-items: center; gap: 20px; font-size: 14px; letter-spacing: -0.01em; }
header .topnav a { color: var(--nav-muted); }
header .topnav a:hover { color: #fafafa; }
header .topnav a.active { color: #fafafa; }

/* ---- Shell: sidebar · content · rail (blocks 08) ------------------------ */

.wrap { display: flex; align-items: flex-start; max-width: 1440px; margin: 0 auto; }

nav[aria-label='Site'] {
  flex: 0 0 244px;
  display: flex; flex-direction: column; gap: 26px;
  padding: 40px 24px 96px 40px;
  background: var(--card-fill);
  box-shadow: inset -1px 0 0 0 var(--hairline-in);
  position: sticky; top: 0; max-height: 100vh; overflow-y: auto;
}
nav[aria-label='Site'] section { display: flex; flex-direction: column; gap: 9px; }
nav[aria-label='Site'] h2 {
  margin: 0;
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--faint);
}
nav[aria-label='Site'] ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
nav[aria-label='Site'] a { display: block; font-size: 13.5px; color: var(--secondary); padding-left: 10px; margin-left: -10px; }
nav[aria-label='Site'] a:hover { color: var(--ink); }
nav[aria-label='Site'] a[aria-current='page'] {
  color: var(--ink); font-weight: 500;
  box-shadow: inset 2px 0 0 0 var(--ocellus);
}

main { flex: 1 1 auto; min-width: 0; max-width: 768px; padding: 40px 64px 96px; }

aside.toc {
  flex: 0 0 216px;
  display: flex; flex-direction: column; gap: 11px;
  margin-left: auto;
  padding: 52px 40px 96px 0;
  position: sticky; top: 0;
}
aside.toc .toc-label {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--faint);
}
aside.toc a { font-size: 13px; color: var(--muted); }
aside.toc a:hover { color: var(--ink); }

/* ---- Page header (blocks 02: gold eyebrow · 42 title · 17.5 lede) ------- */

main .eyebrow {
  margin: 0 0 14px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--gold-type);
}
main h1 {
  margin: 0 0 14px;
  font-family: var(--display); font-weight: 500;
  font-size: 42px; line-height: 1.08; letter-spacing: -0.03em; color: var(--ink);
}
main h1 + p { font-size: 17.5px; line-height: 1.65; color: var(--secondary); max-width: 660px; }

/* Section rule H2: 13/600/0.09em uppercase + hairline filling the remainder */
main h2 {
  display: flex; align-items: baseline; gap: 14px;
  margin: 32px 0 20px;
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink);
}
main h2::after { content: ''; flex: 1 1 auto; height: 1px; background: var(--hairline); transform: translateY(-4px); }
main h3 { margin: 24px 0 10px; font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--ink); }

main p { margin: 0 0 18px; max-width: 680px; text-wrap: pretty; }
main strong { color: var(--ink); font-weight: 600; }
main hr { border: 0; height: 1px; background: var(--hairline); margin: 32px 0; }
main img { max-width: 100%; }

/* Pull quote (blocks 02): Instrument Sans 19 navy, 2px fog left rule */
main blockquote {
  margin: 0 0 18px; padding-left: 18px;
  box-shadow: inset 2px 0 0 0 var(--fog);
}
main blockquote p {
  font-family: var(--display); font-size: 19px; line-height: 1.5;
  letter-spacing: -0.02em; color: var(--plate); margin: 0 0 8px;
}
main blockquote p:last-child { margin: 0; }

main small, main .small-print { font-size: 12.5px; line-height: 1.6; color: var(--faint); }

/* ---- Lists (blocks 04) --------------------------------------------------- */

/* Bulleted: 4px gold dot, 12 gap, no nesting */
main ul { margin: 0 0 18px; padding: 0; list-style: none; max-width: 680px; }
main ul > li { position: relative; padding-left: 16px; margin: 9px 0; font-size: 15px; line-height: 1.7; }
main ul > li::before {
  content: ''; position: absolute; left: 0; top: 11px;
  width: 4px; height: 4px; border-radius: 9999px; background: var(--gold-type);
}
main ul ul { margin: 9px 0 0; } /* tolerated, but the spec says don't nest */

/* Numbered sequence: fog spine + navy numeral discs, terminal step coral */
main ol {
  margin: 0 0 18px; padding: 0 0 0 11px; list-style: none;
  counter-reset: seq; max-width: 680px;
  box-shadow: inset 1px 0 0 0 var(--fog);
}
main ol > li {
  counter-increment: seq;
  position: relative; padding: 0 0 22px 26px;
  font-size: 14.5px; line-height: 1.7; color: var(--secondary);
}
main ol > li:last-child { padding-bottom: 0; }
main ol > li::before {
  content: counter(seq);
  position: absolute; left: -11px; top: 1px;
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 9999px;
  background: var(--plate); color: #fff;
  font-family: var(--mono); font-size: 11px;
}
main ol > li:last-child::before { background: var(--ocellus); }
main ol > li strong { color: var(--ink); font-size: 14.5px; }

/* ---- Callouts (blocks 03) ------------------------------------------------ */

main .callout {
  display: flex; flex-direction: column; gap: 5px;
  margin: 0 0 18px; padding: 18px 20px;
  background: var(--callout-fill);
  max-width: 680px;
}
main .callout p { margin: 0; font-size: 14.5px; line-height: 1.7; color: var(--plate); }
main .callout .callout-label {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.09em; text-transform: uppercase;
}
main .callout-guardrail { box-shadow: inset 3px 0 0 0 var(--ocellus); }
main .callout-guardrail .callout-label { color: var(--ocellus); }
main .callout-note { box-shadow: inset 3px 0 0 0 var(--link); }
main .callout-note .callout-label { color: var(--link); }
main .callout-warning { background: var(--warn-fill); box-shadow: inset 3px 0 0 0 var(--warn-rule); }
main .callout-warning .callout-label { color: var(--warn-ink); }
main .callout-warning p { color: var(--warn-body); }
main .callout-tip { background: var(--tip-fill); box-shadow: inset 3px 0 0 0 var(--tip-rule); }
main .callout-tip .callout-label { color: var(--tip-ink); }
main .callout-tip p { color: var(--tip-ink); }

/* ---- Data (blocks 05): parameter tables, chips --------------------------- */

main table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 13.5px; line-height: 1.6; }
main th {
  text-align: left;
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted);
  padding: 0 16px 10px 0;
  box-shadow: inset 0 -1px 0 0 var(--hairline-strong);
}
main td {
  padding: 13px 16px 13px 0;
  box-shadow: inset 0 -1px 0 0 var(--hairline-in);
  color: var(--secondary); vertical-align: top;
}
main tr:last-child td { box-shadow: none; }
main td:first-child { font-weight: 600; color: var(--ink); font-size: 14px; }
main td:first-child code { font-weight: 400; }
main table code { white-space: nowrap; }

.chip {
  display: inline-block;
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 2px;
}
.chip-get { color: var(--link); background: var(--callout-fill); box-shadow: inset 0 0 0 1px var(--fog); }
.chip-post, .chip-ok { color: var(--tip-ink); background: var(--tip-fill); }
.chip-delete, .chip-err { color: var(--err-ink); background: var(--err-fill); }
.chip-beta, .chip-warn { color: var(--warn-ink); background: var(--warn-fill); }
.chip-version { color: var(--gold-type); box-shadow: inset 0 0 0 1px var(--keyline-dim); }
.chip-deprecated { color: var(--muted); background: #f4f4f5; }

/* ---- Code (blocks 06) ---------------------------------------------------- */

code { font-family: var(--mono); font-size: 13px; color: var(--plate); }
kbd {
  font-family: var(--mono); font-size: 12px; color: var(--secondary);
  background: #f4f4f5; padding: 1px 5px; border-radius: 3px;
}

main pre.code {
  margin: 0 0 18px; padding: 20px 22px;
  background: var(--field);
  overflow-x: auto; line-height: 1.75;
}
main pre.code code { color: var(--code-text); font-size: 13px; }

/* Command line: single row, gold prompt glyph */
main pre.cmd { display: flex; align-items: center; gap: 12px; padding: 14px 18px; }
main pre.cmd::before { content: '$'; font-family: var(--mono); font-size: 13px; color: var(--gold-type); }
main pre.cmd code { color: #e8eef6; }

/* Diff block: removed coral register, added green register */
main pre.diff code { display: block; }
main pre.diff .diff-del { display: block; background: #2a1416; box-shadow: inset 3px 0 0 0 var(--ocellus); padding-left: 6px; margin-left: -6px; }
main pre.diff .diff-add { display: block; background: #12291c; box-shadow: inset 3px 0 0 0 var(--tip-rule); padding-left: 6px; margin-left: -6px; }

/* Diagram frame (blocks 07): dark register, caption below */
main pre.mermaid {
  margin: 0 0 8px; padding: 12px;
  background: var(--page);
  box-shadow: inset 0 0 0 1px var(--hairline);
  text-align: center; overflow: hidden;
}
main pre.mermaid svg { cursor: grab; }
main pre.mermaid svg:active { cursor: grabbing; }
/* svg-pan-zoom control buttons: keep them subtle */
main pre.mermaid #svg-pan-zoom-controls { opacity: 0.55; }
main pre.mermaid:hover #svg-pan-zoom-controls { opacity: 1; }
main pre.mermaid + p em, main .figure-caption {
  font-size: 12.5px; line-height: 1.6; color: var(--faint); font-style: normal;
}

/* ---- Product & media (blocks 07) ----------------------------------------- */

main .panel { margin: 0 0 18px; background: var(--panel-fill); box-shadow: inset 0 0 0 1px var(--fog); }
main .panel-caption {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  box-shadow: inset 0 -1px 0 0 var(--fog);
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted);
}
main .panel-state { margin-left: auto; color: var(--ocellus); letter-spacing: 0.06em; }
main .panel-body { padding: 18px; }
main .panel-body p { margin: 0 0 10px; font-size: 14.5px; line-height: 1.75; }
main .panel-body p:last-child { margin: 0; }

main .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 0 0 18px; max-width: 680px; }
main .dd { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; background: var(--card-fill); }
main .dd p { margin: 0; font-size: 13.5px; line-height: 1.7; }
main .dd-label { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.09em; text-transform: uppercase; }
main .dd-do { box-shadow: inset 0 2px 0 0 var(--tip-rule), inset 0 0 0 1px var(--hairline-in); }
main .dd-do .dd-label { color: #157f3c; }
main .dd-dont { box-shadow: inset 0 2px 0 0 var(--ocellus), inset 0 0 0 1px var(--hairline-in); }
main .dd-dont .dd-label { color: #c72221; }

/* Disclosure rows (blocks 07): end-of-page FAQ only */
main details { box-shadow: inset 0 -1px 0 0 var(--hairline-in); }
main details summary {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0; cursor: pointer; list-style: none;
  font-size: 14.5px; font-weight: 500; color: var(--ink);
}
main details summary::-webkit-details-marker { display: none; }
main details summary::after {
  content: ''; margin-left: auto; width: 8px; height: 8px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform 0.15s;
}
main details[open] summary::after { transform: rotate(-135deg); }
main details > *:not(summary) { margin-right: 26px; }
main details p { font-size: 14.5px; }

/* ---- Navigation & chrome (blocks 08) ------------------------------------- */

main .prev-next {
  display: flex; justify-content: space-between; gap: 24px;
  margin-top: 32px; padding-top: 20px;
  box-shadow: inset 0 1px 0 0 var(--hairline);
  font-size: 14px;
}
main .prev-next .pn-prev { color: var(--muted); }
main .prev-next .pn-next { color: var(--plate); }
main .prev-next a:hover { color: var(--ocellus); }

footer {
  display: flex; align-items: center; gap: 16px;
  max-width: 1440px; margin: 0 auto; padding: 22px 40px;
  box-shadow: inset 0 1px 0 0 var(--hairline);
}
footer .brand { font-family: var(--display); font-weight: 500; font-size: 15px; letter-spacing: -0.03em; color: var(--ink); }
footer .positioning { font-size: 12.5px; color: var(--faint); }
footer .footlinks { display: flex; gap: 20px; margin-left: auto; font-size: 12.5px; }
footer .footlinks a { color: var(--muted); }
footer .footlinks a:hover { color: var(--ocellus); }

/* ---- Responsive ---------------------------------------------------------- */

@media (max-width: 1180px) { aside.toc { display: none; } }
@media (max-width: 860px) {
  .wrap { flex-direction: column; }
  nav[aria-label='Site'] {
    position: static; max-height: none;
    flex-direction: row; flex-wrap: wrap; gap: 28px;
    width: 100%; padding: 24px 24px 12px;
    box-shadow: inset 0 -1px 0 0 var(--hairline-in);
  }
  main { padding: 32px 24px 64px; }
  header { padding: 0 24px; gap: 16px; }
  header .topnav { display: none; }
  footer { padding: 22px 24px; flex-wrap: wrap; }
  main .pair { grid-template-columns: 1fr; }
}
