/* Monolith design system — cad/ARCHITECTURE.md section 8.
   Dark only: a light theme is an explicit non-goal there, so this commits to
   one visual world rather than half-designing a second. Shared by index,
   privacy and terms so the three cannot drift. */
:root {
  --bg: #09090b; --card: #111113; --elevated: #1b1b1f; --rail: #0c0c0e;
  --text: #f5f5f5; --muted: #8f8f98;
  --hairline: rgba(255,255,255,0.08); --ring: rgba(255,255,255,0.18);
  --ok: #3fb950; --warn: #d29922;
  --core: #7d8590; --moderation: #4d8df6; --cad: #d4af37; --community: #3fb0a8;
  --radius: 0.625rem;
  --sans: "Geist Variable","Geist",ui-sans-serif,system-ui,"Segoe UI Variable Text","Segoe UI",Roboto,sans-serif;
  --mono: var(--sans);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap.prose { max-width: 760px; }

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; border-radius: 4px; }

/* ---------- nav ---------- */
nav { border-bottom: 1px solid var(--hairline); background: var(--rail); position: sticky; top: 0; z-index: 10; }
nav .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; font-weight: 600; letter-spacing: -0.02em; text-decoration: none; }
/* Horizontal lockup (docs/brand/README.md): matches the old .mark height. */
.brand-lockup { height: 22px; width: auto; }
nav .spacer { flex: 1; }
nav a.navlink { color: var(--muted); text-decoration: none; font-size: 14px; }
nav a.navlink:hover { color: var(--text); }
@media (max-width: 640px) { nav a.navlink { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--radius);
  border: 1px solid var(--hairline); background: var(--elevated);
  color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500;
  transition: background 150ms ease, border-color 150ms ease;
}
.btn:hover { background: #24242a; border-color: var(--ring); }
.btn.primary { background: var(--text); color: #0a0a0c; border-color: var(--text); }
.btn.primary:hover { background: #e2e2e2; border-color: #e2e2e2; }

/* ---------- hero ---------- */
header.hero { padding: 96px 0 72px; border-bottom: 1px solid var(--hairline); }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
h1 { margin: 0 0 20px; font-size: clamp(34px, 6vw, 58px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.08; text-wrap: balance; max-width: 16ch; }
.lede { margin: 0 0 32px; font-size: 18px; color: var(--muted); max-width: 58ch; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.cta-note { font-size: 13px; color: var(--muted); }

/* ---------- sections ---------- */
section { padding: 72px 0; border-bottom: 1px solid var(--hairline); }
h2 { margin: 0 0 12px; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.section-lede { margin: 0 0 36px; color: var(--muted); max-width: 62ch; }

/* ---------- buckets ---------- */
.buckets { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 16px; }
.bucket {
  background: var(--card); border: 1px solid var(--hairline);
  border-left: 3px solid var(--stripe); border-radius: var(--radius); padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.bucket h3 { margin: 0; font-size: 15px; font-weight: 600; }
.bucket .count { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--stripe); }
.bucket p { margin: 0; font-size: 14px; color: var(--muted); }
.bucket ul { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 5px; }
.bucket li { font-family: var(--mono); font-size: 11px; color: var(--muted); border: 1px solid var(--hairline); border-radius: 4px; padding: 2px 6px; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; }
.step { background: var(--card); padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.step .n { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.step h3 { margin: 0; font-size: 16px; font-weight: 600; }
.step p { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- states ---------- */
.states { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.state { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 16px 18px; }
.state .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tone); display: block; margin-bottom: 6px; }
.state p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* ---------- prose (privacy / terms) ---------- */
.doc-head { padding: 64px 0 32px; border-bottom: 1px solid var(--hairline); }
.doc-head h1 { font-size: clamp(30px, 5vw, 42px); margin-bottom: 10px; max-width: 20ch; }
.doc-head .updated { font-family: var(--mono); font-size: 12px; color: var(--muted); }
article { padding: 40px 0 72px; }
article h2 { margin: 40px 0 12px; font-size: 20px; scroll-margin-top: 76px; }
article h2:first-child { margin-top: 0; }
article h3 { margin: 26px 0 8px; font-size: 16px; font-weight: 600; }
article p, article li { color: #d4d4d8; }
article p { margin: 0 0 14px; }
article ul { margin: 0 0 16px; padding-left: 22px; display: flex; flex-direction: column; gap: 7px; }
article strong { color: var(--text); font-weight: 600; }
article code { font-family: var(--mono); font-size: 13px; background: var(--elevated); border: 1px solid var(--hairline); border-radius: 4px; padding: 1px 5px; }
article a { color: var(--moderation); }
.callout {
  border: 1px solid var(--hairline); border-left: 3px solid var(--warn);
  border-radius: var(--radius); background: var(--card);
  padding: 16px 18px; margin: 0 0 20px;
}
.callout p { margin: 0; color: var(--muted); font-size: 14.5px; }
.tablewrap { overflow-x: auto; border: 1px solid var(--hairline); border-radius: var(--radius); margin: 0 0 20px; }
table { border-collapse: collapse; width: 100%; min-width: 480px; }
thead th {
  text-align: left; padding: 10px 14px; background: var(--rail);
  border-bottom: 1px solid var(--hairline);
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
tbody td { padding: 11px 14px; border-bottom: 1px solid var(--hairline); vertical-align: top; font-size: 14px; color: #d4d4d8; }
tbody tr:last-child td { border-bottom: none; }

/* ---------- footer ---------- */
footer { padding: 40px 0 64px; }
footer .wrap { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
footer a { color: var(--muted); text-decoration: none; font-size: 14px; }
footer a:hover { color: var(--text); }
footer .spacer { flex: 1; }
footer .fine { font-size: 13px; color: #5c5c66; }
@media (max-width: 640px) { footer .spacer { display: none; } }
