:root {
  color-scheme: light;
  --registry-blue: #173b7a;
  --registry-blue-dark: #102a56;
  --registry-ok: #1a7f37;
  --registry-amber: #855b00;
  --registry-ink: #161616;
  --registry-body: #3a3a3a;
  --registry-muted: #6a6a6a;
  --registry-rule: #e5e5e5;
  --registry-sidebar: #fafafa;
  --registry-active: #eef3ff;
  --registry-code-bg: #f3f4f6;
  --registry-ok-bg: #edf7f2;
  --registry-warn-bg: #fff7e8;
  --registry-bad-bg: #fff1f1;
  /* Civic-print palette shared with registrystack.org: ledger-green paper,
     an ink-black band, stamp red, brass. */
  --registry-paper: #eef2ec;
  --registry-ink-band-deep: #161616;
  --registry-stamp: #9d2c1d;
  --registry-brass: #d4af4e;
  --registry-max: 1080px;
  --registry-font: "Public Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --registry-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* One shared timing for the whole interaction layer; reduced motion
     disables it wholesale in shared.css. */
  --registry-ease: 150ms ease;
}
body, button { font: inherit; }
.hero-inner { margin: 0 auto; max-width: var(--registry-max); padding: clamp(34px, 6vw, 62px) clamp(16px, 4vw, 42px); }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { color: var(--registry-ink); font-size: clamp(34px, 5vw, 58px); letter-spacing: -0.01em; line-height: 1.04; margin: 0 0 18px; max-width: 920px; text-wrap: balance; }
h2 { color: var(--registry-ink); font-size: clamp(22px, 3vw, 32px); letter-spacing: -0.01em; line-height: 1.1; margin: 0 0 14px; text-wrap: balance; }
h3 { color: var(--registry-ink); font-size: 20px; line-height: 1.2; margin: 0; }
h4 { color: var(--registry-ink); font-size: 16px; margin: 0 0 6px; }
.subtitle { color: var(--registry-body); font-size: clamp(17px, 2vw, 21px); line-height: 1.45; max-width: 820px; }
.band { background: var(--registry-sidebar); }
.band-inner { margin: 0 auto; max-width: var(--registry-max); padding: clamp(30px, 5vw, 52px) clamp(16px, 4vw, 42px); }
.story-setup, .step, .receipt { background: #ffffff; border: 1px solid var(--registry-rule); }
.story-setup { display: grid; gap: 14px; margin-bottom: 18px; padding: 18px; }
.local-run { border-top: 2px solid var(--registry-amber); }
.local-run .eyebrow { color: var(--registry-amber); }
.local-run pre { margin-top: 10px; }
.local-run .meta { margin-top: 8px; }
.setup-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.setup-item, .fact { border: 1px solid var(--registry-rule); display: grid; gap: 4px; padding: 12px; }
.setup-item span, .fact span { color: var(--registry-muted); font-family: var(--registry-mono); font-size: 12px; text-transform: uppercase; }
.setup-item strong, .fact strong { color: var(--registry-ink); overflow-wrap: anywhere; }
.step-list { display: grid; gap: 14px; }
.step.locked { opacity: .62; }
.step-head { align-items: start; border-bottom: 1px solid var(--registry-rule); display: grid; gap: 14px; grid-template-columns: 42px minmax(0, 1fr) auto; padding: 18px; }
.step-number { align-items: center; background: var(--registry-blue); color: #ffffff; display: inline-flex; font-family: var(--registry-mono); font-weight: 700; height: 36px; justify-content: center; width: 36px; }
.status-pill { border: 1px solid var(--registry-rule); color: var(--registry-muted); display: inline-flex; font-family: var(--registry-mono); font-size: 12px; min-height: 30px; padding: 5px 8px; white-space: nowrap; }
.status-pill.done, .status-pill.denied_as_expected { background: var(--registry-ok-bg); border-color: #b7ddc9; color: var(--registry-ok); }
.status-pill.running { background: var(--registry-warn-bg); border-color: #e2b66c; color: var(--registry-amber); }
@media (prefers-reduced-motion: no-preference) {
  .status-pill.running::before { animation: pill-spin .7s linear infinite; border: 2px solid var(--registry-amber); border-top-color: transparent; border-radius: 50%; content: ""; display: inline-block; height: 10px; margin-right: 6px; width: 10px; }
  @keyframes pill-spin { to { transform: rotate(360deg); } }
}
.status-pill.local_only { background: var(--registry-warn-bg); border-color: #e2b66c; color: var(--registry-amber); }
.status-pill.needs_attention { background: var(--registry-bad-bg); border-color: #d9a1a1; color: #a22d2d; }
.step-body { display: grid; gap: 14px; padding: 18px; }
.request-text { background: var(--registry-code-bg); border: 1px solid var(--registry-rule); color: var(--registry-ink); padding: 12px; }
.reuse-box { background: #ffffff; border: 1px solid #b7c7dd; display: grid; gap: 10px; padding: 12px; }
.input-contract { background: #f8fbff; border: 1px solid #b7c7dd; display: grid; gap: 10px; padding: 12px; }
.input-contract h4 { margin: 0 0 4px; }
.input-contract p { color: var(--registry-body); font-size: 14px; line-height: 1.45; margin: 0; }
.input-contract-meta, .input-chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.contract-pill, .input-chip { align-items: center; border: 1px solid var(--registry-rule); display: inline-flex; min-height: 30px; }
.contract-pill { background: #ffffff; color: var(--registry-muted); font-family: var(--registry-mono); font-size: 12px; padding: 5px 8px; }
.contract-pill.metadata { background: var(--registry-ok-bg); border-color: #b7ddc9; color: var(--registry-ok); }
.contract-pill.fallback { background: var(--registry-warn-bg); border-color: #e2b66c; color: var(--registry-amber); }
.input-chip { background: #ffffff; gap: 8px; padding: 7px 9px; }
.input-chip strong { color: var(--registry-ink); font-size: 13px; }
.input-chip span { color: var(--registry-muted); font-family: var(--registry-mono); font-size: 11px; text-transform: uppercase; }
.friendly-response { background: var(--registry-ok-bg); border: 1px solid #b7ddc9; display: none; gap: 12px; padding: 14px; }
.friendly-response.visible { display: grid; }
.friendly-response.needs_attention { background: var(--registry-bad-bg); border-color: #d9a1a1; }
.facts { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fact { background: #ffffff; border-color: rgba(0, 0, 0, .08); padding: 10px; }
button, .button { align-items: center; background: #fff; border: 1px solid var(--registry-blue); color: var(--registry-blue); cursor: pointer; display: inline-flex; font-weight: 700; justify-content: center; min-height: 38px; padding: 8px 12px; white-space: nowrap; }
button:disabled, button[aria-disabled="true"] { border-color: var(--registry-rule); color: var(--registry-muted); cursor: not-allowed; }
details { border-top: 1px solid var(--registry-rule); }
summary { color: var(--registry-blue); cursor: pointer; font-weight: 700; padding: 12px 0 0; }
pre { background: var(--registry-code-bg); border: 1px solid var(--registry-rule); color: var(--registry-ink); margin: 10px 0 0; max-height: 300px; overflow: auto; padding: 12px; white-space: pre-wrap; word-break: break-word; }
.source-card { background: #ffffff; border: 1px solid var(--registry-rule); display: grid; gap: 12px; margin-top: 10px; padding: 12px; }
.source-line { background: var(--registry-code-bg); border: 1px solid var(--registry-rule); color: var(--registry-ink); font-family: var(--registry-mono); font-size: 12px; overflow-wrap: anywhere; padding: 10px; }
.source-section { display: grid; gap: 8px; }
.source-section h4 { color: var(--registry-muted); font-size: 12px; margin: 0; text-transform: uppercase; }
.source-table { border: 1px solid var(--registry-rule); display: grid; }
.source-row { display: grid; gap: 10px; grid-template-columns: minmax(118px, 180px) minmax(0, 1fr); padding: 9px 10px; }
.source-row + .source-row { border-top: 1px solid var(--registry-rule); }
.source-label, .source-value { font-family: var(--registry-mono); font-size: 12px; overflow-wrap: anywhere; }
.source-label { color: var(--registry-muted); }
.source-value { color: var(--registry-ink); }
.source-code { margin: 0; max-height: 360px; }
.source-note, .meta { color: var(--registry-muted); font-size: 13px; }
.source-toolbar { display: flex; justify-content: flex-end; }
.copy-curl { min-height: 32px; padding: 6px 10px; }
.preview-eyebrow { color: var(--registry-muted); font-family: var(--registry-mono); font-size: 11px; margin: 0 0 4px; text-transform: uppercase; }
.story-actions { margin-bottom: 10px; }
.receipt { display: none; gap: 14px; margin-top: 18px; padding: 18px; }
.receipt.visible { display: grid; }
@media (max-width: 760px) {
  .setup-grid, .facts { grid-template-columns: 1fr; }
  .step-head { grid-template-columns: 42px minmax(0, 1fr); }
  .status-pill { grid-column: 2; justify-self: start; }
  .source-row { grid-template-columns: 1fr; }
}
