/* RobotsDataset — "The Register". Paper, ink, one seal-red accent, stamps on every value. */

/* ---------- tokens ---------- */
:root {
  --paper: #f6f2ea;
  --paper-2: #efe9dd;
  --paper-3: #e7e0d1;
  --ink: #14120f;
  --ink-2: #5c564c;
  --rule: #d9d2c3;
  --seal: #b9321e;
  --seal-ink: #ffffff;
  --fresh: #1f6f5b;
  --stale: #b7791f;
  --lock: #8a8378;
  --shadow: 0 1px 0 rgba(20, 18, 15, 0.06), 0 12px 32px -20px rgba(20, 18, 15, 0.35);
  --font-display: "Piazzolla", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-body: "Golos Text", "Helvetica Neue", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --radius: 2px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --measure: 64ch;
  --ruling: rgba(20, 18, 15, 0.045);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #141311; --paper-2: #1c1a17; --paper-3: #24211d;
  --ink: #ece6da; --ink-2: #a9a196; --rule: #2c2925;
  --seal: #e2573f; --seal-ink: #141311; --fresh: #4fb39a; --stale: #e0a43a; --lock: #6e685e;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 12px 32px -20px rgba(0, 0, 0, 0.8);
  --ruling: rgba(236, 230, 218, 0.04);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141311; --paper-2: #1c1a17; --paper-3: #24211d;
    --ink: #ece6da; --ink-2: #a9a196; --rule: #2c2925;
    --seal: #e2573f; --seal-ink: #141311; --fresh: #4fb39a; --stale: #e0a43a; --lock: #6e685e;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 12px 32px -20px rgba(0, 0, 0, 0.8);
    --ruling: rgba(236, 230, 218, 0.04);
    color-scheme: dark;
  }
}

/* ---------- reset & ground ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 16px/1.55 var(--font-body);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    repeating-linear-gradient(to bottom, transparent 0 31px, var(--ruling) 31px 32px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--seal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; border-radius: var(--radius); }
::selection { background: var(--seal); color: var(--seal-ink); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.12; margin: 0 0 var(--s3); letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); font-variation-settings: "opsz" 30; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 var(--s4); }
small, .small { font-size: 0.875rem; }
code, pre, kbd, .mono { font-family: var(--font-mono); font-size: 0.875em; font-variant-numeric: tabular-nums; }
pre { background: var(--paper-2); border: 1px solid var(--rule); border-left: 3px solid var(--seal); padding: var(--s4); overflow-x: auto; margin: 0 0 var(--s4); line-height: 1.5; }
code { background: var(--paper-2); padding: 0.05em 0.35em; border-radius: var(--radius); }
pre code { background: none; padding: 0; }
hr { border: 0; border-top: 1px solid var(--rule); margin: var(--s6) 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
th, td { text-align: left; padding: var(--s2) var(--s3); border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-family: var(--font-mono); font-weight: 500; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
td.num, th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
caption { caption-side: top; text-align: left; color: var(--ink-2); padding: 0 0 var(--s2); font-size: 0.875rem; }
.scroll { overflow-x: auto; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
label { display: block; font-size: 0.8125rem; color: var(--ink-2); margin-bottom: var(--s1); font-family: var(--font-mono); letter-spacing: 0.03em; }
input, select, textarea {
  width: 100%; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 0.5rem 0.65rem; color: var(--ink); min-height: 2.5rem;
}
input:focus, select:focus, textarea:focus { border-color: var(--seal); outline: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--seal) 30%, transparent); }
input[type="checkbox"] { width: auto; min-height: 0; accent-color: var(--seal); }
.muted { color: var(--ink-2); }
.kicker { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--seal); margin-bottom: var(--s3); }
.lead { font-size: 1.2rem; line-height: 1.5; max-width: var(--measure); color: var(--ink-2); }
.display { font-family: var(--font-display); }
.prose { max-width: var(--measure); }
.prose h2 { margin-top: var(--s7); }
.prose h3 { margin-top: var(--s6); }
.prose table { margin: var(--s4) 0 var(--s5); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: var(--s2); background: var(--seal); color: var(--seal-ink); padding: var(--s2) var(--s3); z-index: 100; }
.skip:focus { left: var(--s2); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--s5); }
.narrow { max-width: 780px; }

/* ---------- header / footer ---------- */
.site-header { border-bottom: 1px solid var(--rule); background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; gap: var(--s5); min-height: 60px; }
.wordmark { font-family: var(--font-display); font-size: 1.45rem; font-style: italic; font-weight: 500; color: var(--ink); text-decoration: none; display: inline-flex; align-items: baseline; gap: var(--s2); }
.wordmark em { font-style: normal; color: var(--seal); }
.wordmark .tag { font: 500 0.6875rem var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); border: 1px solid var(--rule); padding: 1px 6px; border-radius: var(--radius); }
.nav { display: flex; gap: var(--s4); margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-size: 0.9375rem; padding: var(--s3) 0; min-height: 44px; display: inline-flex; align-items: center; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--seal); }
.nav .icon-btn { background: none; border: 1px solid var(--rule); border-radius: 50%; width: 34px; height: 34px; display: inline-grid; place-items: center; cursor: pointer; color: var(--ink); padding: 0; }
.nav .icon-btn:hover { border-color: var(--seal); color: var(--seal); }
.icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
:root[data-theme="dark"] .icon-sun, :root:not([data-theme="light"]) .icon-sun { display: block; }
.icon-moon { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
:root[data-theme="light"] .icon-sun { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .icon-moon { display: none; } }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .icon-sun { display: none; } }
main { padding: var(--s7) 0 var(--s8); }
.site-footer { border-top: 1px solid var(--rule); padding: var(--s6) 0; color: var(--ink-2); font-size: 0.875rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.6fr 1.4fr 1fr 0.8fr; gap: var(--s6); }
.site-footer h4 { font: 500 0.6875rem var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); margin-bottom: var(--s3); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: var(--s1); }
.site-footer a { color: var(--ink); }
@media (max-width: 900px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: var(--s2); padding: 0.6rem 1rem; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); text-decoration: none; border-radius: var(--radius); font-weight: 500; cursor: pointer; line-height: 1.2; font-size: 0.9375rem; }
.btn:hover { background: var(--seal); border-color: var(--seal); color: var(--seal-ink); }
.btn--seal { background: var(--seal); border-color: var(--seal); color: var(--seal-ink); }
.btn--seal:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--paper-2); color: var(--ink); border-color: var(--ink); }
.btn--sm { padding: 0.35rem 0.65rem; font-size: 0.8125rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.btn .price { font-family: var(--font-mono); opacity: 0.85; }
.copy { font: 500 0.75rem var(--font-mono); border: 1px solid var(--rule); background: var(--paper); color: var(--ink-2); padding: 2px 8px; border-radius: var(--radius); cursor: pointer; }
.copy:hover { border-color: var(--seal); color: var(--seal); }
.copy.is-done { color: var(--fresh); border-color: var(--fresh); }
.code-block { position: relative; }
.code-block .copy { position: absolute; top: var(--s2); right: var(--s2); }

/* ---------- cards & ledger ---------- */
.card { background: var(--paper-2); border: 1px solid var(--rule); border-top: 2px solid var(--ink); border-left: 3px solid var(--seal); padding: var(--s5); box-shadow: var(--shadow); border-radius: var(--radius); }
.card--plain { border-left-color: var(--rule); border-top-color: var(--rule); box-shadow: none; }
.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.ledger > li { border-bottom: 1px solid var(--rule); padding: var(--s4) 0 var(--s4) var(--s4); position: relative; }
.ledger > li::before { content: ""; position: absolute; left: 0; top: var(--s3); bottom: var(--s3); width: 2px; background: var(--rule); transition: width 150ms, background 150ms; }
.ledger > li:hover::before { width: 4px; background: var(--seal); }
.ledger__row { display: grid; grid-template-columns: 1fr auto; gap: var(--s4); align-items: baseline; }
.ledger__meta { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-2); display: flex; gap: var(--s4); flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); }
.grid-7-5 { display: grid; grid-template-columns: 7fr 5fr; gap: var(--s7); align-items: start; }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-7-5 { grid-template-columns: 1fr; } }
.stat { font-family: var(--font-display); font-size: 2rem; line-height: 1; font-variation-settings: "opsz" 30; }
.stat small { font: 400 0.75rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); display: block; margin-top: var(--s1); }
.stats { display: flex; gap: var(--s6); flex-wrap: wrap; margin: var(--s5) 0; }
.pill { display: inline-block; font: 500 0.6875rem var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 8px; border: 1px solid currentColor; border-radius: 999px; color: var(--ink-2); }
.pill.is-fresh { color: var(--fresh); }
.pill.is-stale { color: var(--stale); }
.pill.is-verified { color: var(--fresh); border-color: var(--fresh); background: color-mix(in srgb, var(--fresh) 10%, transparent); }
.pill.is-seal { color: var(--seal); }
.flash { border: 1px solid var(--rule); border-left: 3px solid var(--fresh); background: var(--paper-2); padding: var(--s3) var(--s4); margin-bottom: var(--s5); }
.flash.is-error { border-left-color: var(--seal); }
.flash.is-warn { border-left-color: var(--stale); }
.section-h { display: flex; align-items: baseline; gap: var(--s3); border-bottom: 1px solid var(--ink); padding-bottom: var(--s2); margin: var(--s6) 0 var(--s4); }
.section-h h2, .section-h h3 { margin: 0; }
.section-h .right { margin-left: auto; font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-2); display: flex; gap: var(--s3); align-items: center; }

/* ---------- the stamp ---------- */
.stamp { display: inline-block; vertical-align: middle; position: relative; --i: 0; }
.stamp > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  font: 500 0.6875rem/1 var(--font-mono); letter-spacing: 0.02em; color: var(--ink-2);
  border: 1px solid color-mix(in srgb, var(--seal) 55%, transparent); border-radius: 3px; padding: 3px 6px;
  transform: rotate(-1.5deg); background: color-mix(in srgb, var(--paper) 70%, transparent);
  animation: press 260ms cubic-bezier(.2,.9,.3,1.2) both; animation-delay: calc(var(--i) * 28ms);
}
.stamp > summary::-webkit-details-marker { display: none; }
.stamp > summary:hover, .stamp[open] > summary { color: var(--seal); border-color: var(--seal); transform: rotate(0); }
.stamp.is-owner > summary { border-color: var(--fresh); color: var(--fresh); }
.stamp__body {
  position: absolute; z-index: 10; left: 0; top: calc(100% + 6px); width: min(360px, 80vw);
  background: var(--paper); border: 1px solid var(--ink); box-shadow: var(--shadow); padding: var(--s3) var(--s4);
  font-size: 0.8125rem; line-height: 1.45; border-radius: var(--radius);
}
.stamp__body dl { display: grid; grid-template-columns: auto 1fr; gap: 2px var(--s3); margin: 0 0 var(--s2); }
.stamp__body dt { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.stamp__body dd { margin: 0; word-break: break-word; }
.stamp__body blockquote { margin: var(--s2) 0; padding-left: var(--s3); border-left: 2px solid var(--rule); color: var(--ink-2); font-style: italic; }
.ring { width: 11px; height: 11px; border-radius: 50%; flex: none; background: conic-gradient(currentColor calc(var(--c) * 360deg), color-mix(in srgb, currentColor 18%, transparent) 0); }
.ring.is-owner { background: var(--fresh); position: relative; }
.tick { display: inline-flex; gap: 2px; vertical-align: middle; }
.tick i { width: 6px; height: 9px; background: color-mix(in srgb, currentColor 18%, transparent); border-radius: 1px; }
.tick.is-fresh i.on { background: var(--fresh); }
.tick.is-stale i.on { background: var(--stale); }
@keyframes press { from { opacity: 0; transform: rotate(-4deg) scale(1.08); } to { opacity: 1; transform: rotate(-1.5deg) scale(1); } }

/* ---------- entity page ---------- */
.entity-head { display: grid; grid-template-columns: 1fr auto; gap: var(--s5); align-items: end; border-bottom: 2px solid var(--ink); padding-bottom: var(--s5); margin-bottom: var(--s5); }
.entity-head h1 { margin-bottom: var(--s2); }
.hero-line { display: flex; gap: var(--s4); flex-wrap: wrap; align-items: center; color: var(--ink-2); }
.tabs { display: flex; gap: var(--s2); border-bottom: 1px solid var(--rule); margin-bottom: var(--s5); }
.tabs a { text-decoration: none; color: var(--ink-2); padding: var(--s2) var(--s3); border-bottom: 2px solid transparent; margin-bottom: -1px; font-family: var(--font-mono); font-size: 0.8125rem; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--seal); }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s4) var(--s6); }
.field { padding: var(--s2) 0; border-bottom: 1px dashed var(--rule); }
.field dt { font: 500 0.6875rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); display: flex; gap: var(--s2); align-items: center; justify-content: space-between; }
.field dd { margin: var(--s1) 0 0; display: flex; gap: var(--s2); align-items: flex-start; flex-wrap: wrap; }
.field .val { font-family: var(--font-mono); font-size: 0.9375rem; word-break: break-word; }
.field .val.num { font-size: 1.25rem; font-family: var(--font-display); font-variation-settings: "opsz" 20; }
.field .unit { font: 500 0.6875rem var(--font-mono); color: var(--ink-2); }
.field .note { color: var(--ink-2); font-size: 0.8125rem; width: 100%; }
.field.is-absent .val { color: var(--lock); font-style: italic; font-family: var(--font-body); }
.field--wide { grid-column: 1 / -1; }
.absent-list { font-size: 0.8125rem; color: var(--lock); font-style: italic; margin: var(--s2) 0 0; line-height: 1.7; }
.absent-list span { white-space: nowrap; }
.md-raw { white-space: pre-wrap; font-size: 0.8125rem; }
.lock { color: var(--lock); }
.lock .val { display: inline-block; width: 7ch; height: 0.9em; background: repeating-linear-gradient(135deg, transparent 0 3px, color-mix(in srgb, var(--lock) 45%, transparent) 3px 4px); border-radius: 1px; vertical-align: middle; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chip { font: 500 0.75rem var(--font-mono); border: 1px solid var(--rule); background: var(--paper); padding: 3px 8px; border-radius: 999px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; width: 100%; }
.week > div { background: var(--paper); border: 1px solid var(--rule); padding: var(--s1) var(--s2); font-family: var(--font-mono); font-size: 0.75rem; text-align: center; }
.week b { display: block; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); font-size: 0.625rem; }
.week .closed { color: var(--lock); }
@media (max-width: 600px) { .week { grid-template-columns: repeat(4, 1fr); } }
.unlock { display: flex; gap: var(--s4); align-items: center; flex-wrap: wrap; background: var(--paper-2); border: 1px dashed var(--lock); padding: var(--s4) var(--s5); margin: var(--s5) 0; }
.unlock p { margin: 0; }
.biz-box { border: 1px solid var(--rule); border-left: 3px solid var(--fresh); padding: var(--s4) var(--s5); margin-top: var(--s7); background: var(--paper-2); display: grid; grid-template-columns: 1fr auto; gap: var(--s4); align-items: center; }
@media (max-width: 700px) { .biz-box, .entity-head { grid-template-columns: 1fr; } }
.machine { font-family: var(--font-mono); font-size: 0.8125rem; display: flex; flex-wrap: wrap; gap: var(--s3) var(--s4); }
.history { margin-top: var(--s3); }

/* ---------- search ---------- */
.search-layout { display: grid; grid-template-columns: 300px 1fr; gap: var(--s6); align-items: start; }
@media (max-width: 900px) { .search-layout { grid-template-columns: 1fr; } }
.filters { position: sticky; top: 76px; }
.filters .field-row { margin-bottom: var(--s3); }
.filters details { border-top: 1px solid var(--rule); margin-top: var(--s4); padding-top: var(--s3); }
.filters summary { cursor: pointer; font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-2); }
.filters .checks label { display: flex; align-items: center; gap: var(--s2); font-family: var(--font-body); font-size: 0.875rem; color: var(--ink); text-transform: none; letter-spacing: 0; }
.results-h { display: flex; align-items: baseline; gap: var(--s4); margin-bottom: var(--s3); font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-2); flex-wrap: wrap; }
.results-h .right { margin-left: auto; display: flex; gap: var(--s3); align-items: center; }
.results table td:first-child a { color: var(--ink); font-weight: 500; text-decoration: none; }
.results table td:first-child a:hover { color: var(--seal); }
.htmx-indicator { opacity: 0; transition: opacity 200ms; height: 2px; background: var(--seal); width: 0; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; width: 100%; animation: bar 900ms ease-in-out infinite; }
@keyframes bar { 0% { transform: scaleX(0); transform-origin: left; } 50% { transform: scaleX(1); transform-origin: left; } 51% { transform-origin: right; } 100% { transform: scaleX(0); transform-origin: right; } }
.htmx-settling .results, .htmx-settling.results { animation: fade 180ms ease-out; }
@keyframes fade { from { opacity: 0.3; } to { opacity: 1; } }

/* ---------- home ---------- */
.hero { padding: var(--s6) 0 var(--s7); }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 400; letter-spacing: -0.02em; max-width: 12ch; }
.hero h1 em { font-style: italic; color: var(--seal); }
.hero .actions { display: flex; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s5); }
.sample-card { transform: rotate(0.6deg); }
.sample-card .card { padding: var(--s4) var(--s5); }
.sample-card h3 { font-size: 1.35rem; margin-bottom: var(--s1); }
.doors { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.doors li { padding: var(--s5) var(--s4) var(--s5) 0; border-right: 1px solid var(--rule); }
.doors li:last-child { border-right: 0; }
.doors li + li { padding-left: var(--s4); }
.doors h3 { margin-bottom: var(--s2); }
.doors .n { font: 400 0.75rem var(--font-mono); color: var(--seal); letter-spacing: 0.1em; margin-bottom: var(--s2); }
@media (max-width: 800px) { .doors { grid-template-columns: 1fr; } .doors li { border-right: 0; border-bottom: 1px solid var(--rule); padding-left: 0; } }
.how { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s4); counter-reset: step; }
.how > div { position: relative; padding-top: var(--s4); border-top: 2px solid var(--rule); }
.how > div::before { counter-increment: step; content: counter(step, decimal-leading-zero); font: 400 0.75rem var(--font-mono); color: var(--seal); position: absolute; top: -0.85em; left: 0; background: var(--paper); padding-right: var(--s2); }
.how h3 { font-size: 1.05rem; }
.how p { font-size: 0.875rem; color: var(--ink-2); }
@media (max-width: 900px) { .how { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .how { grid-template-columns: 1fr; } }
.section { margin-top: var(--s8); }

/* ---------- catalog / dataset ---------- */
.ds-row .title { font-family: var(--font-display); font-size: 1.5rem; }
.ds-row .desc { color: var(--ink-2); max-width: var(--measure); margin: var(--s1) 0 var(--s2); }
.toc { position: sticky; top: 76px; font-size: 0.875rem; }
.toc ul { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--rule); }
.toc li a { display: block; padding: var(--s1) var(--s3); color: var(--ink-2); text-decoration: none; border-left: 2px solid transparent; margin-left: -1px; }
.toc li a:hover { color: var(--seal); border-left-color: var(--seal); }
.doc-layout { display: grid; grid-template-columns: 220px 1fr; gap: var(--s7); align-items: start; }
@media (max-width: 900px) { .doc-layout { grid-template-columns: 1fr; } .toc { position: static; } }
.schema-table td:first-child { font-family: var(--font-mono); font-size: 0.8125rem; }
.schema-filter { max-width: 320px; margin-bottom: var(--s3); }
.schema-table tr[hidden] { display: none; }
.price-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--s4); }
.price-tiles .card h3 { margin-bottom: var(--s2); }
.price-tiles .big { font-family: var(--font-display); font-size: 2rem; line-height: 1; margin: var(--s2) 0; }

/* ---------- account / forms ---------- */
.form { display: grid; gap: var(--s4); }
.form .row { display: flex; gap: var(--s3); align-items: end; flex-wrap: wrap; }
.form .row > * { flex: 1 1 200px; }
.form .row > .btn { flex: 0 0 auto; }
.key-reveal { font-family: var(--font-mono); font-size: 1rem; padding: var(--s3); background: var(--paper); border: 1px dashed var(--seal); word-break: break-all; }
.ledger-table td:nth-child(2) { font-family: var(--font-mono); }
.topups { display: flex; gap: var(--s3); flex-wrap: wrap; }

/* ---------- errors ---------- */
.error-page { text-align: left; max-width: 640px; }
.error-page .code { font-family: var(--font-display); font-size: 7rem; line-height: 0.9; color: var(--seal); font-weight: 300; margin-bottom: var(--s4); }

/* ---------- ops ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s3); margin-bottom: var(--s6); }
.tile { background: var(--paper-2); border: 1px solid var(--rule); border-top: 2px solid var(--ink); padding: var(--s3) var(--s4); }
.tile .v { font-family: var(--font-display); font-size: 1.75rem; line-height: 1.1; }
.tile .k { font: 500 0.625rem var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.bar { height: 6px; background: var(--paper-3); border-radius: 3px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--fresh); }
.bar.is-stale > i { background: var(--stale); }
.bar > i[data-w="0"] { width: 0%; }
.bar > i[data-w="1"] { width: 10%; }
.bar > i[data-w="2"] { width: 20%; }
.bar > i[data-w="3"] { width: 30%; }
.bar > i[data-w="4"] { width: 40%; }
.bar > i[data-w="5"] { width: 50%; }
.bar > i[data-w="6"] { width: 60%; }
.bar > i[data-w="7"] { width: 70%; }
.bar > i[data-w="8"] { width: 80%; }
.bar > i[data-w="9"] { width: 90%; }
.bar > i[data-w="10"] { width: 100%; }
.inline { display: inline; }
.report table { font-size: 0.875rem; }
.ops-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: var(--s5); }
.ops-grid h2 { font-size: 1.15rem; border-bottom: 1px solid var(--ink); padding-bottom: var(--s1); }
.ops-grid table { font-size: 0.8125rem; }
.review-row .btn { margin-right: var(--s1); }

/* ---------- utilities (no inline styles: CSP) ---------- */
.m-0 { margin: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--s1) !important; }
.mb-5 { margin-bottom: var(--s5) !important; }
.mt-2 { margin-top: var(--s2) !important; }
.mt-3 { margin-top: var(--s3) !important; }
.mt-4 { margin-top: var(--s4) !important; }
.mt-5 { margin-top: var(--s5) !important; }
.mt-6 { margin-top: var(--s6) !important; }
.ta-right { text-align: right; }
.body-font { font-family: var(--font-body); }
.quiet-link { color: inherit; text-decoration: none; }
.quiet-link:hover { color: var(--seal); }
.h-sm { font-size: 1.25rem !important; }
.stat--sm { font-size: 1.25rem; padding-top: 6px; }
.per-month { font-size: 0.8rem; }
.fields--1 { grid-template-columns: 1fr; }
.row-actions { display: flex; gap: var(--s2); margin-top: var(--s4); flex-wrap: wrap; }
.ring[data-c="0"] { --c: 0; } .ring[data-c="1"] { --c: .1; } .ring[data-c="2"] { --c: .2; } .ring[data-c="3"] { --c: .3; }
.ring[data-c="4"] { --c: .4; } .ring[data-c="5"] { --c: .5; } .ring[data-c="6"] { --c: .6; } .ring[data-c="7"] { --c: .7; }
.ring[data-c="8"] { --c: .8; } .ring[data-c="9"] { --c: .9; } .ring[data-c="10"] { --c: 1; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

.pill.is-sample{border-color:var(--seal);color:var(--seal);background:transparent}
.unlock.is-sample{border-style:solid;border-color:var(--seal)}

/* landing pages: the sibling-value link cloud */
.tags { display: flex; flex-wrap: wrap; gap: var(--s2); }
.tags .pill { text-decoration: none; text-transform: none; letter-spacing: 0; }
.tags .pill:hover { color: var(--ink); border-color: var(--ink); }
.tags .pill small { color: var(--ink-2); margin-left: 4px; }

/* reports: inline SVG chart */
.chart { width: 100%; height: auto; display: block; margin: var(--s4) 0 var(--s2); }
.chart .grid { stroke: var(--rule); stroke-width: 1; }
.chart .base { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 4 4; }
.chart .line { stroke: var(--ink); stroke-width: 1.5; }
.chart .dot { fill: var(--seal); }
.chart .tick { font: 500 10px var(--font-mono); fill: var(--ink-2); }
.num.is-up { color: var(--seal); }
.num.is-down { color: var(--fresh); }
