:root {
  --bg: #fbfbf9;
  --surface: #f2f2ee;
  --text: #1c1f23;
  --muted: #5b6470;
  --border: #d9dbd5;
  --accent: #1f5fa8;
  --accent-hover: #12427a;
  --ok-bg: #dff1e3;   --ok-fg: #17582b;
  --oom-bg: #f8dcd8;  --oom-fg: #8a1f12;
  --rejected-bg: #f1e0e0; --rejected-fg: #7a2a2a;
  --deployed-bg: #dbe8f8; --deployed-fg: #164a85;
  --inferred-bg: #f4ecd2; --inferred-fg: #6b5410;
  --unverified-bg: #f6e2cf; --unverified-fg: #7a4510;
  --font-text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171b;
    --surface: #1c2025;
    --text: #e3e6ea;
    --muted: #9aa3ae;
    --border: #2f353d;
    --accent: #7db4f0;
    --accent-hover: #a9cdf6;
    --ok-bg: #1b3a26;   --ok-fg: #9fdcb0;
    --oom-bg: #4a211c;  --oom-fg: #f3b3aa;
    --rejected-bg: #432a2a; --rejected-fg: #e8b4b4;
    --deployed-bg: #1c3555; --deployed-fg: #a9cdf6;
    --inferred-bg: #413819; --inferred-fg: #e6cf85;
    --unverified-bg: #47301a; --unverified-fg: #efc08f;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.6;
}

.wrap {
  max-width: 76rem;
  margin: 0 auto;
  padding: 0 16px;
}

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

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
a:focus-visible, .table-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 24px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.wordmark {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
}
nav { display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: 0.95rem; }
nav a { color: var(--muted); text-decoration: none; padding: 2px 0; }
nav a:hover, nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }

main { padding-top: 24px; padding-bottom: 48px; }

article > p, article > ul, article > dl, article > h1, article > h2, article > h3, article > h4, article > pre {
  max-width: 72ch;
}

h1 { font-size: 1.9rem; line-height: 1.2; margin: 0.5em 0 0.4em; }
h2 { font-size: 1.4rem; line-height: 1.3; margin: 2em 0 0.5em; padding-top: 0.5em; border-top: 1px solid var(--border); }
h3 { font-size: 1.15rem; line-height: 1.3; margin: 1.6em 0 0.4em; }
h4 { font-size: 1rem; line-height: 1.3; margin: 1.2em 0 0.3em; color: var(--muted); }
h2, h3, h4 { scroll-margin-top: 12px; }

p, ul, ol { margin: 0.7em 0; }
li { margin: 0.25em 0; }

code, pre, .num, time { font-family: var(--font-mono); font-size: 0.9em; }
pre {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 12px;
  overflow-x: auto;
  border-radius: 4px;
}
pre code { font-size: 0.85rem; }

.page-meta, .cite { color: var(--muted); font-size: 0.9rem; }
.cite { font-family: var(--font-mono); font-size: 0.85rem; overflow-wrap: anywhere; }

dl.kv {
  display: grid;
  grid-template-columns: minmax(8rem, 14rem) 1fr;
  gap: 4px 16px;
  margin: 0.8em 0;
}
dl.kv dt { color: var(--muted); font-size: 0.92rem; }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
article > dl.kv { max-width: 72ch; }

.table-wrap {
  overflow-x: auto;
  margin: 1em 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  max-width: 100%;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td.long { white-space: normal; min-width: 24ch; max-width: 48ch; }
th {
  background: var(--surface);
  font-weight: 600;
  position: sticky;
  top: 0;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface); }
td.num { text-align: right; font-family: var(--font-mono); }
table.sortable th { cursor: pointer; }
table.sortable th[aria-sort="ascending"]::after { content: " \25B2"; font-size: 0.7em; }
table.sortable th[aria-sort="descending"]::after { content: " \25BC"; font-size: 0.7em; }

.chip {
  display: inline-block;
  font-size: 0.72rem;
  line-height: 1.4;
  padding: 0 6px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  white-space: nowrap;
  vertical-align: baseline;
}
.chip-ok { background: var(--ok-bg); color: var(--ok-fg); }
.chip-oom { background: var(--oom-bg); color: var(--oom-fg); }
.chip-rejected { background: var(--rejected-bg); color: var(--rejected-fg); }
.chip-deployed { background: var(--deployed-bg); color: var(--deployed-fg); }
.chip-inferred { background: var(--inferred-bg); color: var(--inferred-fg); }
.chip-unverified { background: var(--unverified-bg); color: var(--unverified-fg); }
.chip-spilled { background: var(--oom-bg); color: var(--oom-fg); }

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 16px 0 32px;
}

@media (max-width: 560px) {
  h1 { font-size: 1.55rem; }
  dl.kv { grid-template-columns: 1fr; gap: 0; }
  dl.kv dt { margin-top: 8px; }
}
