/* SpotAgentIQ
   A dispatch ledger with a rubber stamp: white sheet, near-black ink, one
   red-oxide stamp colour used for things that were stopped. */

@font-face {
  font-family: "Archivo";
  src: url("/static/fonts/archivo-latin.woff2") format("woff2-variations"), url("/static/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Martian Mono";
  src: url("/static/fonts/martian-mono-latin.woff2") format("woff2-variations"), url("/static/fonts/martian-mono-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: oklch(1 0 0);
  --ink: oklch(0.18 0.012 29);
  --ink-2: oklch(0.38 0.014 29);
  --ink-3: oklch(0.5 0.012 29);
  --line: oklch(0.89 0.008 29);
  --line-strong: oklch(0.78 0.01 29);
  --wash: oklch(0.968 0.005 29);

  --red: oklch(0.564 0.231 29.1);
  --red-ink: oklch(0.49 0.2 29);
  --red-deep: oklch(0.38 0.15 29);
  --red-tint: oklch(0.564 0.231 29.1 / 0.12);

  --night: oklch(0.17 0.012 29);
  --night-2: oklch(0.215 0.014 29);
  --night-line: oklch(0.34 0.014 29);
  --on-night: oklch(0.95 0.005 29);
  --on-night-2: oklch(0.76 0.01 29);
  --red-on-night: oklch(0.7 0.19 29);

  --sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1240px;
  --radius: 3px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-quart: cubic-bezier(0.25, 1, 0.5, 1);

  --z-sticky: 10;
  --z-skip: 50;

  /* rubber-stamp ink texture */
  --stamp-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='60'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -4 3.4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-stretch: 100%;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (min-width: 900px) { body { font-size: 1.125rem; } }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; text-wrap: pretty; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; font-weight: 750; line-height: 1.08; }
code, pre, kbd { font-family: var(--mono); font-stretch: 87.5%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--red); color: #fff; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: var(--z-skip); background: var(--ink); color: #fff; padding: 10px 14px; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- header ---------- */
.site-head { border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px 28px; min-height: 68px; flex-wrap: wrap; }
.wordmark {
  display: inline-flex; align-items: center; gap: 0.42em;
  font-weight: 800; font-stretch: 116%; font-size: 1.2rem; letter-spacing: -0.01em;
  text-decoration: none; color: var(--ink);
}
.wordmark .dot { width: 0.62em; height: 0.62em; border-radius: 50%; background: var(--red); flex: none; transform: translateY(0.02em); }
.site-nav { display: flex; align-items: center; gap: 4px 22px; font-size: 0.96rem; overflow-x: auto; scrollbar-width: none; }
.site-nav a { text-decoration: none; color: var(--ink-2); padding: 8px 0; white-space: nowrap; text-underline-offset: 6px; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.nav-cloud { font-weight: 650; color: var(--ink) !important; }
.soon { font-size: 0.72em; font-weight: 700; font-stretch: 120%; color: var(--red-ink); border: 1.5px solid currentColor; border-radius: 2px; padding: 0.05em 0.35em; margin-left: 0.25em; letter-spacing: 0.04em; vertical-align: 0.1em; }
@media (max-width: 640px) {
  .head-row { padding-block: 10px 0; }
  .site-nav { width: calc(100% + var(--gutter) * 2); margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); gap: 20px; border-top: 1px solid var(--line); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 50px; padding: 0 1.25em; border-radius: var(--radius);
  font-weight: 650; font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent;
  transition: background-color 160ms var(--ease-quart), color 160ms var(--ease-quart), border-color 160ms var(--ease-quart);
}
.btn-solid { background: var(--red); color: #fff; border-color: var(--red); }
.btn-solid:hover { background: var(--red-deep); border-color: var(--red-deep); }
.btn-line { border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn:active { transform: translateY(1px); }

/* ---------- stamps ---------- */
.stamp {
  display: inline-block; justify-self: end; align-self: center;
  font-family: var(--sans); font-weight: 800; font-stretch: 125%; font-size: 0.7rem;
  letter-spacing: 0.1em; text-transform: uppercase; line-height: 1;
  padding: 0.42em 0.6em 0.38em; border: 2px solid currentColor; border-radius: 3px;
  transform: rotate(-3deg); white-space: nowrap;
  -webkit-mask-image: var(--stamp-mask); mask-image: var(--stamp-mask);
  -webkit-mask-size: 160px 60px; mask-size: 160px 60px;
}
.s-allow { color: var(--ink-3); transform: rotate(-1.5deg); }
.s-ok { color: var(--ink); transform: rotate(2deg); }
.s-hold { color: var(--red-ink); transform: rotate(-4deg); }
.s-deny { color: #fff; background: var(--red); border-color: var(--red); transform: rotate(3deg); }
.s-reject { color: var(--red-deep); border-style: double; border-width: 4px; transform: rotate(-2deg); }

/* ---------- hero ---------- */
.hero { padding-block: clamp(44px, 7vw, 104px) clamp(56px, 8vw, 120px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center; }
@media (min-width: 1000px) { .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 72px; } .hero h1 { grid-column: 1 / -1; } }
.hero-grid { align-items: start; }
.hero h1 {
  font-size: clamp(2.5rem, 1.2rem + 4.6vw, 5.4rem); max-width: 13.5em;
  font-weight: 800; font-stretch: 112%; letter-spacing: -0.03em; line-height: 0.98;
  margin: 0;
}
.hero h1 em { font-style: normal; color: var(--red); }
.hero-copy { padding-top: 0; }
@media (min-width: 1000px) { .hero-copy { padding-top: 44px; } }
.hero .ledger { margin-top: clamp(0px, 3vw, 52px); }
.lede { font-size: clamp(1.1rem, 1rem + 0.35vw, 1.28rem); color: var(--ink-2); max-width: 36em; line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 22px; }
.install { display: flex; align-items: stretch; max-width: 36em; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--wash); }
.install code { flex: 1; min-width: 0; padding: 13px 14px; font-size: 0.74rem; white-space: nowrap; overflow-x: auto; scrollbar-width: thin; }
.copy { flex: none; border: 0; border-left: 1px solid var(--line-strong); background: transparent; padding: 0 16px; cursor: pointer; font-size: 0.85rem; font-weight: 650; color: var(--ink-2); }
.copy:hover { color: var(--ink); background: oklch(0.94 0.006 29); }
.copy[data-done] { color: var(--red-ink); }
.hero-small { font-size: 0.92rem; color: var(--ink-3); margin-top: 14px; max-width: 36em; }
.hero-small a { color: var(--ink-2); }

/* the ledger */
.ledger { margin: 0; border: 1.5px solid var(--ink); border-radius: 4px; background: var(--bg); overflow: hidden; }
.ledger-head {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--ink); color: var(--on-night); padding: 11px 18px;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.02em;
}
.ledger-live { display: inline-flex; align-items: center; gap: 8px; color: var(--on-night-2); }
.ledger-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red-on-night); animation: pulse 2.4s var(--ease-quart) infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.ledger-rows { list-style: none; margin: 0; padding: 0; min-height: calc(6 * 64px); }
.row {
  display: grid; grid-template-columns: 4.6rem minmax(0, 1fr) auto; gap: 2px 14px; align-items: center;
  padding: 13px 18px; border-bottom: 1px solid var(--line); min-height: 64px;
  background-image: linear-gradient(var(--bg), var(--bg));
}
.row:last-child { border-bottom: 0; }
.row time { font-family: var(--mono); font-stretch: 87.5%; font-size: 0.68rem; color: var(--ink-3); }
.row code { font-size: 0.74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row code b { font-weight: 600; color: var(--ink-3); }
.row code i { font-style: normal; color: var(--ink-3); }
.row small { grid-column: 2; font-size: 0.8rem; color: var(--ink-2); line-height: 1.3; }
.row .stamp { grid-column: 3; grid-row: 1 / span 2; }
@media (max-width: 520px) {
  .row { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 14px; }
  .row time { grid-column: 1; }
  .row code { grid-column: 1; }
  .row small { grid-column: 1; }
  .row .stamp { grid-column: 2; grid-row: 1 / span 3; }
}
.row.enter { animation: row-in 520ms var(--ease-out) both; }
.row.enter .stamp { animation: thunk 420ms var(--ease-out) 380ms both; }
.row.leave { animation: row-out 380ms var(--ease-quart) both; }
@keyframes row-in { from { opacity: 0; transform: translateY(-14px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes row-out { to { opacity: 0; transform: translateY(10px); } }
@keyframes thunk {
  0% { opacity: 0; scale: 1.9; }
  60% { opacity: 1; scale: 0.94; }
  100% { opacity: 1; scale: 1; }
}

/* ---------- sections, shared ---------- */
section h2 { font-size: clamp(1.9rem, 1.15rem + 2.6vw, 3.1rem); font-weight: 800; font-stretch: 110%; letter-spacing: -0.025em; line-height: 1.02; }
.section-lede { font-size: 1.15rem; color: var(--ink-2); max-width: 40em; margin-top: 18px; }
.more { margin-top: 32px; font-weight: 650; }
.more a { text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.more a::after { content: " \2192"; }

/* story */
.story { padding-block: clamp(72px, 9vw, 136px); border-top: 1.5px solid var(--ink); }
.story-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
@media (min-width: 1000px) {
  .story-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 80px; }
  .story-intro { position: sticky; top: 32px; align-self: start; }
}
.story-intro p { color: var(--ink-2); max-width: 30em; margin-top: 18px; }
.story-intro code { font-size: 0.85em; background: var(--wash); padding: 0.15em 0.4em; border-radius: 3px; color: var(--ink); }
.story-steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.story-steps li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 24px;
  padding: 28px 0 32px; border-top: 1px solid var(--line-strong);
}
.story-steps li:first-child { border-top-color: var(--ink); }
.step-call { grid-column: 1 / -1; }
.step-call code { font-size: 0.78rem; color: var(--ink-3); }
.step-body h3 { font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem); font-stretch: 104%; margin-bottom: 10px; }
.step-body p { color: var(--ink-2); max-width: 36em; margin: 0; }
.story-steps .stamp { font-size: 0.82rem; align-self: start; margin-top: 4px; }

/* policy */
.policy { padding-block: clamp(72px, 9vw, 136px); background: var(--wash); }
.policy-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 44px; }
@media (min-width: 1000px) { .policy-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: 48px; align-items: start; } }
.notes { margin: 0; }
.notes div { padding: 16px 0 18px; border-top: 1px solid var(--line-strong); }
.notes div:first-child { border-top-color: var(--ink); }
.notes dt { font-family: var(--mono); font-stretch: 87.5%; font-size: 0.72rem; color: var(--red-ink); margin-bottom: 6px; }
.notes dd { margin: 0; font-size: 1rem; color: var(--ink-2); }
.notes code { font-size: 0.85em; color: var(--ink); }

/* code blocks */
.code {
  margin: 0; background: var(--night); color: var(--on-night); border-radius: 4px;
  padding: 18px 20px; font-size: 0.76rem; line-height: 1.75; overflow-x: auto;
  tab-size: 2; scrollbar-color: var(--night-line) transparent;
}
.code code { font-size: inherit; }
.code-num .ln { display: inline-block; width: 2.4em; color: var(--on-night-2); opacity: 0.55; user-select: none; }
.code-num .ln.hl { color: var(--red-on-night); opacity: 1; }
.code mark { background: oklch(0.564 0.231 29.1 / 0.28); color: inherit; }
.code .c { color: var(--on-night-2); }

/* hash chain */
.chain { padding-block: clamp(72px, 9vw, 136px); background: var(--night); color: var(--on-night); }
.chain h2 { color: var(--on-night); }
.chain-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 44px; }
@media (min-width: 1000px) { .chain-grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 80px; align-items: start; } }
.chain-copy p { color: var(--on-night-2); max-width: 32em; margin-top: 18px; line-height: 1.6; }
.chain-copy code { color: var(--on-night); font-size: 0.85em; }
.chain-try { color: var(--on-night) !important; font-weight: 650; }
.chain-try::before { content: "\2192\00a0"; color: var(--red-on-night); }
.chain-list { list-style: none; margin: 0; padding: 0; }
.link {
  position: relative; border: 1px solid var(--night-line); border-radius: 4px; background: var(--night-2);
  padding: 12px 16px; margin-bottom: 18px; font-size: 0.85rem;
  transition: border-color 240ms var(--ease-quart), background-color 240ms var(--ease-quart);
}
.link + .link::before { content: ""; position: absolute; left: 28px; top: -19px; width: 2px; height: 18px; background: var(--night-line); transition: background-color 240ms; }
.link-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.seq { font-weight: 800; font-stretch: 120%; color: var(--on-night-2); font-size: 0.8rem; }
.link-top code { font-size: 0.72rem; }
.link-top .tool { color: var(--on-night-2); }
.link-detail { margin: 6px 0 8px; color: var(--on-night); }
.link-detail label { color: var(--on-night-2); }
.chain-edit {
  width: 11ch; margin-left: 6px; padding: 2px 4px; background: transparent; color: var(--on-night);
  border: 0; border-bottom: 1.5px dashed var(--red-on-night); font-family: var(--mono); font-stretch: 87.5%; font-size: 0.8rem;
}
.chain-edit:focus { outline: 2px solid var(--red-on-night); outline-offset: 2px; border-radius: 2px; }
.link-hash { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 0.72rem; color: var(--on-night-2); }
.link-hash code { color: var(--on-night); transition: color 240ms; }
.link.bad { border-color: var(--red-on-night); background: oklch(0.564 0.231 29.1 / 0.12); }
.link.bad::before { background: var(--red-on-night) !important; }
.link.bad [data-hash] { color: var(--red-on-night); }
.link.changed [data-detail] { color: var(--red-on-night); }
.verify { margin: 26px 0 0; padding: 16px 18px; border: 1px solid var(--night-line); border-radius: 4px; font-size: 0.74rem; line-height: 1.8; white-space: pre-wrap; color: var(--on-night); background: oklch(0.13 0.01 29); }
.verify .prompt { color: var(--on-night-2); }
.verify .bad-out { color: var(--red-on-night); font-weight: 700; }

/* install steps (an actual sequence, so numbered) */
.install-steps { padding-block: clamp(72px, 9vw, 136px); }
.steps { list-style: none; margin: 44px 0 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step; display: grid; gap: 14px 32px; padding: 30px 0; border-top: 1px solid var(--line-strong);
  grid-template-columns: 3rem minmax(0, 1fr);
}
.steps li:first-child { border-top-color: var(--ink); }
.steps li::before {
  content: counter(step); grid-row: 1 / span 3;
  font-size: 2.6rem; font-weight: 800; font-stretch: 125%; line-height: 0.9; color: var(--red);
}
.steps h3 { font-size: 1.3rem; font-stretch: 104%; }
.steps p { color: var(--ink-2); margin: 0; max-width: 34em; }
.steps p code { font-size: 0.85em; background: var(--wash); padding: 0.1em 0.35em; border-radius: 3px; color: var(--ink); }
@media (min-width: 1000px) {
  .steps li { grid-template-columns: 4rem minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: start; }
  .steps li::before { grid-row: 1 / span 2; }
  .steps li .code { grid-column: 3; grid-row: 1 / span 2; }
}

/* cloud band: the one place the red takes over */
.cloud-band { background: var(--red); color: #fff; padding-block: clamp(72px, 9vw, 136px); }
.cloud-band h2 { color: #fff; font-size: clamp(2.2rem, 1.2rem + 3.4vw, 4rem); }
.cloud-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 44px; }
@media (min-width: 1000px) { .cloud-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: start; } }
.cloud-copy > p { font-size: 1.15rem; max-width: 32em; margin-top: 18px; }
.cloud-list { list-style: none; margin: 28px 0; padding: 0; }
.cloud-list li { padding: 14px 0; border-top: 1px solid oklch(1 0 0 / 0.35); max-width: 34em; }
.cloud-list b { font-weight: 750; }
.cloud-note { font-size: 0.98rem; max-width: 34em; padding-top: 14px; border-top: 1px solid oklch(1 0 0 / 0.35); }
.cloud-form { background: var(--bg); color: var(--ink); border-radius: 4px; padding: clamp(22px, 3vw, 36px); }
.cloud-form h3 { font-size: 1.6rem; font-stretch: 110%; font-weight: 800; letter-spacing: -0.015em; }
.cloud-form > p { color: var(--ink-2); margin: 10px 0 22px; }

/* faq */
.faq { padding-block: clamp(72px, 9vw, 120px); }
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
@media (min-width: 1000px) { .faq-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 80px; } }
.faq-list details { border-top: 1px solid var(--line-strong); }
.faq-list details:last-child { border-bottom: 1px solid var(--line-strong); }
.faq-list summary {
  list-style: none; cursor: pointer; position: relative; padding: 20px 44px 20px 0;
  font-weight: 650; font-size: 1.1rem; font-stretch: 102%;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  background: linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 2px 100% no-repeat;
  transition: transform 260ms var(--ease-out);
}
.faq-list details[open] summary::after { transform: rotate(45deg); background-image: linear-gradient(var(--red), var(--red)), linear-gradient(var(--red), var(--red)); }
.faq-list summary:hover { color: var(--red-ink); }
.faq-list details p { color: var(--ink-2); max-width: 40em; padding-bottom: 8px; }

/* reading */
.reading { padding-block: clamp(56px, 7vw, 100px) clamp(72px, 9vw, 120px); border-top: 1.5px solid var(--ink); }
.reading h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); }
.reading-list { list-style: none; margin: 28px 0 0; padding: 0; }
.reading-list li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 40px; padding: 18px 0; border-top: 1px solid var(--line); }
@media (min-width: 800px) { .reading-list li { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: baseline; } }
.reading-list a { font-weight: 650; font-size: 1.12rem; text-decoration: none; }
.reading-list a:hover { color: var(--red-ink); text-decoration: underline; text-underline-offset: 4px; }
.reading-list span { color: var(--ink-2); font-size: 1rem; }

/* ---------- waitlist form ---------- */
.wl { position: relative; }
.wl-label { display: block; font-weight: 650; font-size: 0.95rem; margin-bottom: 8px; }
.wl-row { display: flex; gap: 8px; flex-wrap: wrap; }
.wl-email {
  flex: 1 1 240px; min-width: 0; height: 52px; padding: 0 14px;
  border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--bg);
}
.wl-email::placeholder { color: var(--ink-3); }
.wl-email:focus { outline: 3px solid var(--red-tint); border-color: var(--red); outline-offset: 0; }
.wl-email[aria-invalid="true"] { border-color: var(--red); }
.wl .btn { flex: 0 0 auto; min-height: 52px; }
@media (max-width: 480px) { .wl .btn { flex: 1 1 100%; } }
.wl-opts { border: 0; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.check { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 0.95rem; line-height: 1.4; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--red); cursor: pointer; }
.wl-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.wl-more { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.wl-more summary { cursor: pointer; font-weight: 650; font-size: 0.95rem; }
.wl-more summary span { font-weight: 400; color: var(--ink-3); }
.wl-grid { display: grid; gap: 12px; margin-top: 14px; }
@media (min-width: 560px) { .wl-grid { grid-template-columns: 1fr 1fr; } .wl-grid .wide { grid-column: 1 / -1; } }
.wl-grid label { display: grid; gap: 6px; font-size: 0.88rem; font-weight: 600; }
.wl-grid input, .wl-grid select, .wl-grid textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg); font-weight: 400; font-size: 0.98rem;
}
.wl-grid textarea { resize: vertical; min-height: 84px; }
.wl-grid input:focus, .wl-grid select:focus, .wl-grid textarea:focus { outline: 3px solid var(--red-tint); border-color: var(--red); outline-offset: 0; }
.wl-fine { font-size: 0.84rem; color: var(--ink-3); margin: 14px 0 0; }
.wl-fine a { color: var(--ink-2); }
.wl-status { margin: 10px 0 0; font-weight: 600; font-size: 0.95rem; min-height: 1px; }
.wl-status:empty { display: none; }
.wl-status.err { color: var(--red-ink); }
.wl[aria-busy="true"] .btn { opacity: 0.7; pointer-events: none; }
.wl-done { padding: 8px 0; }
.wl-done .stamp { font-size: 1rem; margin-bottom: 18px; animation: thunk 460ms var(--ease-out) both; }
.wl-done h3, .wl-done p.big { font-size: 1.5rem; font-weight: 800; font-stretch: 110%; margin: 0 0 8px; }
.wl-done p { color: var(--ink-2); }

/* compact CTA used at the end of articles and docs */
.cta-band { margin-top: clamp(56px, 7vw, 88px); border: 1.5px solid var(--ink); border-radius: 4px; padding: clamp(22px, 4vw, 40px); position: relative; }
.cta-band::before {
  content: "Early access"; position: absolute; right: 18px; top: -14px; background: var(--bg);
  font-weight: 800; font-stretch: 125%; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--red-ink); border: 2px solid currentColor; border-radius: 3px; padding: 0.4em 0.6em; transform: rotate(3deg);
}
.cta-band h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-stretch: 108%; margin-bottom: 10px; }
.cta-band p { color: var(--ink-2); max-width: 40em; }
.cta-inner > .wl { margin-top: 20px; max-width: 40em; }

/* ---------- docs, guides, articles ---------- */
.page-pad { padding-block: clamp(28px, 4vw, 48px) clamp(72px, 9vw, 120px); }
.crumbs ol { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 0.88rem; color: var(--ink-3); }
.crumbs li + li::before { content: "/"; margin: 0 0.6em; color: var(--line-strong); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
@media (min-width: 960px) { .doc-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 64px; } }
.doc-nav { font-size: 0.95rem; }
@media (min-width: 960px) { .doc-nav { position: sticky; top: 28px; align-self: start; } }
.doc-nav h2 { font-size: 0.95rem; font-weight: 700; margin: 0 0 10px; }
.doc-nav ul { list-style: none; margin: 0 0 24px; padding: 0; border-left: 1px solid var(--line); }
.doc-nav a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; text-decoration: none; color: var(--ink-2); }
.doc-nav a:hover { color: var(--ink); }
.doc-nav a[aria-current="page"] { color: var(--ink); font-weight: 650; border-left-color: var(--red); }
@media (max-width: 959px) {
  .doc-nav ul { display: flex; flex-wrap: wrap; gap: 4px 18px; border-left: 0; }
  .doc-nav a { padding: 4px 0; border-left: 0; margin: 0; }
  .doc-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 5px; }
}

.prose { max-width: 72ch; }
.prose h1 { font-size: clamp(2.1rem, 1.3rem + 2.8vw, 3.4rem); font-weight: 800; font-stretch: 110%; letter-spacing: -0.025em; line-height: 1.02; margin-bottom: 18px; }
.prose .dek { font-size: clamp(1.12rem, 1rem + 0.35vw, 1.3rem); color: var(--ink-2); line-height: 1.5; margin-bottom: 28px; }
.prose .meta { font-size: 0.9rem; color: var(--ink-3); margin: -8px 0 32px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.prose h2 { font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.85rem); font-weight: 780; font-stretch: 106%; letter-spacing: -0.015em; margin: 2.2em 0 0.6em; scroll-margin-top: 24px; }
.prose h3 { font-size: 1.18rem; font-weight: 720; margin: 1.8em 0 0.5em; scroll-margin-top: 24px; }
.prose p, .prose li { line-height: 1.68; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.35em; }
.prose li::marker { color: var(--ink-3); }
.prose a { color: var(--red-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose :not(pre) > code { font-size: 0.84em; background: var(--wash); border: 1px solid var(--line); padding: 0.08em 0.35em; border-radius: 3px; overflow-wrap: anywhere; }
.prose .code { margin: 1.4em 0 1.6em; }
.prose strong { font-weight: 700; }
.prose hr { border: 0; border-top: 1px solid var(--line-strong); margin: 2.4em 0; }
.callout { background: var(--wash); border: 1px solid var(--line); border-radius: 4px; padding: 16px 20px; margin: 1.6em 0; }
.callout p:last-child { margin: 0; }
.callout-warn { background: var(--red-tint); border-color: oklch(0.564 0.231 29.1 / 0.35); }
.table-wrap { overflow-x: auto; margin: 1.4em 0 1.8em; border: 1px solid var(--line); border-radius: 4px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 700; background: var(--wash); white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.prose td:first-child code { white-space: nowrap; }
.toc { border: 1px solid var(--line); border-radius: 4px; padding: 16px 20px 6px; margin: 0 0 32px; font-size: 0.95rem; }
.toc p { font-weight: 700; margin: 0 0 6px; }
.toc ol { margin: 0 0 10px; }
.next-prev { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line-strong); flex-wrap: wrap; }
.next-prev a { text-decoration: none; font-weight: 650; color: var(--ink); }
.next-prev a span { display: block; font-weight: 400; font-size: 0.85rem; color: var(--ink-3); }
.next-prev a:hover { color: var(--red-ink); }

.article { max-width: 760px; margin-inline: auto; }

.blog-list { list-style: none; margin: 32px 0 0; padding: 0; max-width: 820px; }
.blog-list li { padding: 26px 0; border-top: 1px solid var(--line-strong); }
.blog-list li:first-child { border-top-color: var(--ink); }
.blog-list time { font-size: 0.88rem; color: var(--ink-3); }
.blog-list h2 { font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.75rem); font-stretch: 104%; margin: 6px 0 8px; }
.blog-list h2 a { text-decoration: none; }
.blog-list h2 a:hover { color: var(--red-ink); }
.blog-list p { color: var(--ink-2); margin: 0; max-width: 40em; }

/* standalone pages: cloud, thanks, 404 */
.cloud-hero { padding-block: clamp(44px, 7vw, 104px) clamp(48px, 6vw, 88px); }
.cloud-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
@media (min-width: 1000px) { .cloud-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 72px; align-items: start; } }
.cloud-hero h1 { font-size: clamp(2.4rem, 1.3rem + 4vw, 4.6rem); font-weight: 800; font-stretch: 112%; letter-spacing: -0.03em; line-height: 0.98; margin-bottom: 0.4em; }
.cloud-hero h1 em { font-style: normal; color: var(--red); }
.cloud-panel { border: 1.5px solid var(--ink); border-radius: 4px; padding: clamp(22px, 3vw, 34px); }
.cloud-panel h2 { font-size: 1.5rem; font-stretch: 108%; margin-bottom: 8px; }
.cloud-panel > p { color: var(--ink-2); margin-bottom: 20px; }
.plan { padding-block: clamp(56px, 7vw, 104px); border-top: 1.5px solid var(--ink); }
.plan-table { width: 100%; border-collapse: collapse; margin-top: 32px; font-size: 1rem; }
.plan-table th, .plan-table td { text-align: left; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.plan-table thead th { font-size: 0.95rem; border-bottom: 1.5px solid var(--ink); }
.plan-table tbody th { font-weight: 650; width: 34%; }
.plan-table td { color: var(--ink-2); }
.plan-table .yes { color: var(--ink); font-weight: 650; }
.flow { padding-block: clamp(56px, 7vw, 104px); background: var(--wash); }
.flow-figure { margin: 36px 0 0; }
.flow-scroll { overflow-x: auto; }
.flow-figure svg { width: 100%; min-width: 760px; height: auto; max-width: 980px; }
.flow-figure figcaption { font-size: 0.92rem; color: var(--ink-3); margin-top: 14px; max-width: 46em; }

.simple { padding-block: clamp(64px, 10vw, 144px); }
.simple-inner { max-width: 640px; }
.simple h1 { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.6rem); font-weight: 800; font-stretch: 112%; letter-spacing: -0.03em; line-height: 1; margin: 18px 0 18px; }
.simple p { color: var(--ink-2); font-size: 1.12rem; }
.simple .stamp { font-size: 1rem; animation: thunk 460ms var(--ease-out) 120ms both; }
.simple ul { padding-left: 1.2em; color: var(--ink-2); }
.simple form { margin-top: 24px; }

/* ---------- footer ---------- */
.site-foot { border-top: 1.5px solid var(--ink); padding-top: 56px; }
.foot-grid { display: grid; gap: 36px 24px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
@media (min-width: 900px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.foot-brand p { color: var(--ink-2); font-size: 0.95rem; max-width: 22em; margin-top: 12px; }
.site-foot nav h2 { font-size: 0.95rem; font-weight: 700; margin-bottom: 10px; }
.site-foot nav a { display: block; padding: 5px 0; text-decoration: none; color: var(--ink-2); font-size: 0.95rem; }
.site-foot nav a:hover { color: var(--ink); text-decoration: underline; }
.foot-small { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-block: 40px 32px; margin-top: 40px; border-top: 1px solid var(--line); font-size: 0.86rem; color: var(--ink-3); }
.foot-small a { color: var(--ink-3); }

/* ---------- admin ---------- */
.admin { background: var(--bg); }
.admin-head { display: flex; align-items: center; gap: 12px; padding: 16px var(--gutter); border-bottom: 1px solid var(--line); }
.admin-head > span { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-3); }
.admin-main { padding: 28px var(--gutter) 64px; max-width: 1400px; }
.admin-flash { background: var(--wash); border: 1px solid var(--line); padding: 10px 14px; border-radius: 4px; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); border: 1px solid var(--line-strong); border-radius: 4px; }
.admin-stats div { padding: 16px 18px; border-right: 1px solid var(--line); font-size: 0.9rem; color: var(--ink-2); }
.admin-stats b { display: block; font-size: 1.9rem; font-stretch: 112%; font-weight: 800; color: var(--ink); line-height: 1.1; }
.admin-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin: 32px 0; }
@media (min-width: 900px) { .admin-split { grid-template-columns: 1.4fr 1fr; } }
.admin-split h2 { font-size: 1rem; margin-bottom: 12px; }
.admin-bars { list-style: none; margin: 0; padding: 0; }
.admin-bars li { display: grid; grid-template-columns: 4.5em 1fr 2.5em; gap: 10px; align-items: center; font-size: 0.8rem; padding: 2px 0; }
.admin-bars span { color: var(--ink-3); font-family: var(--mono); font-size: 0.7rem; }
.admin-bars i { display: block; height: 12px; background: var(--red); width: calc(min(var(--n), 40) * 2.5%); min-width: 2px; border-radius: 1px; }
.admin-bars i[data-n="0"] { background: var(--line); }
.admin-bars b { text-align: right; font-variant-numeric: tabular-nums; }
.admin-segs { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 14px; align-items: center; }
.admin-segs a { padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 3px; text-decoration: none; font-size: 0.9rem; }
.admin-segs a[aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); }
.admin-segs a.admin-export { margin-left: auto; border-color: var(--red); color: var(--red-ink); font-weight: 650; }
.admin-scroll { overflow-x: auto; border: 1px solid var(--line-strong); border-radius: 4px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.admin-table th, .admin-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
.admin-table th { background: var(--wash); font-weight: 700; position: sticky; top: 0; }
.admin-table td.wrap { white-space: normal; min-width: 240px; max-width: 420px; }
.admin-table small { color: var(--ink-3); }
.admin-table button { font-size: 0.8rem; padding: 5px 9px; border: 1px solid var(--ink); background: var(--bg); border-radius: 3px; cursor: pointer; }
.admin-table button:hover { background: var(--ink); color: #fff; }
.admin-table.compact td { padding: 6px 10px; }
.admin-note { font-size: 0.86rem; color: var(--ink-3); margin-top: 14px; }

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .ledger-live::before { animation: none; }
}

@media print {
  .site-head, .site-foot, .cta-band, .cloud-band, .wl { display: none; }
  .code { background: #fff; color: #000; border: 1px solid #999; }
}
