:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #090b0c;
  color: #f0f2f3;
  --bg: #090b0c;
  --surface: #0f1315;
  --surface-raised: #151a1d;
  --surface-soft: #0c1012;
  --line: #293136;
  --line-strong: #46535a;
  --text: #f0f2f3;
  --text-secondary: #c3cbcf;
  --muted: #96a3aa;
  --lime: #cbf43e;
  --lime-hover: #dcff61;
  --cyan: #55d6d2;
  --amber: #f2b84b;
  --red: #ff665f;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; letter-spacing: 0; }
button, select, input { color: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.hidden { display: none !important; }
.eyebrow, .section-label {
  margin: 0 0 8px;
  color: var(--lime);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { max-width: 820px; margin: 0; font-size: 42px; line-height: 1.08; letter-spacing: 0; }
h2 { margin: 0; font-size: 22px; line-height: 1.2; letter-spacing: 0; }
h3 { margin: 0; font-size: 16px; line-height: 1.3; }

.app-header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); background: rgba(9, 11, 12, 0.97); backdrop-filter: blur(14px); }
.header-inner { width: min(1280px, 100%); min-height: 68px; margin: 0 auto; padding: 10px 24px; display: grid; grid-template-columns: minmax(205px, 1fr) auto minmax(205px, 1fr); align-items: center; gap: 24px; }
.brand { width: fit-content; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: var(--radius); }
.brand span { display: grid; gap: 2px; }
.brand strong { font-size: 15px; }
.brand small { color: var(--muted); font-size: 12px; }
.primary-nav { display: flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); }
.primary-nav a { min-height: 40px; padding: 0 13px; display: grid; place-items: center; border-radius: 4px; color: var(--muted); font-size: 13px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.primary-nav a:hover { color: var(--text); background: var(--surface-raised); }
.primary-nav a.active { color: #0a0d0e; background: var(--lime); }
.service-status { justify-self: end; display: flex; gap: 8px; }
.status-chip { min-height: 30px; padding: 0 9px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--text-secondary); font-size: 11px; white-space: nowrap; }
.status-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px rgba(203, 244, 62, 0.1); }
.status-chip.muted i { background: #748087; box-shadow: none; }
.status-chip.warn i { background: var(--amber); box-shadow: 0 0 0 3px rgba(242, 184, 75, 0.1); }

.app-shell { width: min(1280px, 100%); margin: 0 auto; padding: 0 24px 54px; }
.narrow-shell { width: min(1060px, 100%); }
.page-heading { min-height: 228px; padding: 44px 0 34px; display: flex; align-items: end; justify-content: space-between; gap: 40px; border-bottom: 1px solid var(--line); }
.page-heading > div > p:last-child { max-width: 740px; margin: 16px 0 0; color: var(--muted); font-size: 16px; line-height: 1.55; }
.compact-heading { min-height: 190px; }
.compact-heading h1 { font-size: 38px; }
.primary-link, .secondary-link { min-height: 44px; padding: 0 15px; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 14px; border-radius: var(--radius); font-size: 13px; font-weight: 800; text-decoration: none; }
.primary-link { background: var(--lime); color: #090c0d; }
.primary-link:hover { background: var(--lime-hover); }
.secondary-link { border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-secondary); }
.secondary-link:hover { border-color: var(--cyan); color: var(--text); }
.endpoint-label, .decision-badge { padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; white-space: nowrap; }

.overview-block, .boundary-section, .integration-runbook, .code-section, .process-section { padding: 34px 0; border-bottom: 1px solid var(--line); }
.section-heading, .panel-title { display: flex; align-items: start; justify-content: space-between; gap: 28px; }
.section-heading { margin-bottom: 24px; }
.section-heading > p, .panel-title > p { max-width: 510px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.runbook-grid { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); list-style: none; background: var(--surface); }
.runbook-grid li { min-height: 190px; padding: 22px; border-right: 1px solid var(--line); }
.runbook-grid li:last-child { border-right: 0; }
.runbook-grid span, .task-list > a > span { display: block; margin-bottom: 28px; color: var(--lime); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.runbook-grid strong { font-size: 14px; }
.runbook-grid p { margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.overview-grid, .integration-grid { padding: 34px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; border-bottom: 1px solid var(--line); }
.tool-panel { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel-title { min-height: 50px; margin-bottom: 18px; }
.status-list { margin: 0; }
.status-list > div { min-height: 48px; display: grid; grid-template-columns: 155px minmax(0, 1fr); align-items: center; gap: 12px; border-top: 1px solid var(--line); }
.status-list > div:last-child { border-bottom: 1px solid var(--line); }
.status-list dt { color: var(--muted); font-size: 12px; }
.status-list dd { margin: 0; overflow: hidden; color: var(--text-secondary); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.status-list a { min-height: 40px; display: inline-flex; align-items: center; color: var(--cyan); }
.state-live { color: var(--lime) !important; }
.state-warn { color: var(--amber) !important; }
.task-list { display: grid; }
.task-list a { min-height: 77px; display: grid; grid-template-columns: 34px minmax(0, 1fr) 20px; align-items: center; gap: 12px; border-top: 1px solid var(--line); text-decoration: none; }
.task-list a:last-child { border-bottom: 1px solid var(--line); }
.task-list a:hover strong, .task-list a:hover > b { color: var(--lime); }
.task-list > a > span { margin: 0; color: var(--muted); }
.task-list strong { display: block; font-size: 13px; }
.task-list p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.task-list b { color: var(--muted); font-size: 18px; }
.boundary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); }
.boundary-grid > div { min-height: 138px; padding: 22px; border-right: 1px solid var(--line); }
.boundary-grid > div:last-child { border-right: 0; }
.boundary-grid strong { color: var(--cyan); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.boundary-grid p { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

.scenario-panel { padding: 24px 0; display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: center; gap: 24px; border-bottom: 1px solid var(--line); }
.scenario-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.scenario-tab { min-height: 52px; padding: 8px 11px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text-secondary); cursor: pointer; font-size: 12px; text-align: left; }
.scenario-tab:hover { border-color: var(--line-strong); background: var(--surface-raised); }
.scenario-tab.active { border-color: var(--lime); color: var(--text); box-shadow: inset 3px 0 0 var(--lime); }
.scenario-result { min-width: 47px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-weight: 900; }
.scenario-result.allow { color: var(--lime); }
.scenario-result.hold { color: var(--amber); }
.scenario-result.deny { color: var(--red); }
.wizard-stepper { margin: 26px 0 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); }
.wizard-step { min-height: 78px; padding: 12px 14px; display: grid; grid-template-columns: 28px minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; column-gap: 10px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; text-align: left; }
.wizard-step:last-child { border-right: 0; }
.wizard-step span { grid-row: 1 / 3; width: 28px; height: 28px; display: grid; place-items: center; align-self: center; border: 1px solid var(--line-strong); border-radius: 50%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.wizard-step strong { color: var(--text-secondary); font-size: 12px; }
.wizard-step small { margin-top: 3px; font-size: 11px; }
.wizard-step.active { background: var(--surface-raised); }
.wizard-step.active span { border-color: var(--lime); background: var(--lime); color: #090c0d; }
.wizard-step.active strong { color: var(--text); }
.wizard-step.complete span { border-color: rgba(203, 244, 62, 0.55); color: var(--lime); }
.wizard-step:disabled { cursor: not-allowed; opacity: 0.48; }
.wizard-shell { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.wizard-panel { display: none; min-height: 430px; padding: 28px; }
.wizard-panel.active { display: block; }
.wizard-panel .panel-title { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.form-section { padding-top: 24px; display: grid; gap: 18px; }
.field-grid { display: grid; gap: 14px; }
.field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
label { min-width: 0; display: grid; gap: 7px; color: var(--text-secondary); font-size: 12px; }
label > span small { color: var(--muted); }
input, select { width: 100%; min-width: 0; height: 44px; padding: 0 11px; border: 1px solid var(--line); border-radius: 4px; background: #090c0d; color: var(--text); }
input:hover, select:hover { border-color: var(--line-strong); }
input:focus, select:focus { border-color: var(--cyan); outline: 0; box-shadow: 0 0 0 2px rgba(85, 214, 210, 0.13); }
.unit-input { display: grid; grid-template-columns: minmax(0, 1fr) auto; border: 1px solid var(--line); border-radius: 4px; background: #090c0d; }
.unit-input:hover { border-color: var(--line-strong); }
.unit-input:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 2px rgba(85, 214, 210, 0.13); }
.unit-input input, .unit-input input:focus { border: 0; box-shadow: none; }
.unit-input b { padding: 0 11px; display: grid; place-items: center; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.toggle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.toggle { min-height: 54px; padding: 10px; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.toggle:hover { border-color: var(--line-strong); }
.toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.toggle > span { position: relative; width: 30px; height: 18px; border-radius: 12px; background: #354047; }
.toggle > span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: #9aa6ac; transition: transform 150ms ease; }
.toggle input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 3px; }
.toggle input:checked + span { background: var(--lime); }
.toggle input:checked + span::after { background: #090c0d; transform: translateX(12px); }
.toggle b { font-size: 11px; font-weight: 650; line-height: 1.3; }
.toggle.inline { width: fit-content; min-height: 44px; grid-template-columns: 30px auto; }
.evidence-note { padding: 16px; border-left: 3px solid var(--cyan); background: rgba(85, 214, 210, 0.06); }
.evidence-note strong { font-size: 12px; }
.evidence-note p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.wizard-actions { min-height: 76px; padding: 14px 18px; display: grid; grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr); align-items: center; gap: 12px; border-top: 1px solid var(--line); }
.wizard-actions > span { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; text-align: center; }
.secondary-command, .primary-command { min-height: 44px; padding: 0 14px; border-radius: 4px; cursor: pointer; font-size: 12px; font-weight: 800; }
.secondary-command { justify-self: start; border: 1px solid var(--line-strong); background: var(--surface-raised); color: var(--text-secondary); }
.secondary-command:hover { border-color: var(--cyan); color: var(--text); }
.secondary-command:disabled { cursor: not-allowed; opacity: 0.45; }
.primary-command { justify-self: end; min-width: 176px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--lime); background: var(--lime); color: #090c0d; }
.primary-command:hover { background: var(--lime-hover); }
.primary-command:disabled { cursor: wait; opacity: 0.7; }
.primary-command b { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.review-summary { margin: 22px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 4px; }
.review-summary > div { min-height: 62px; padding: 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.review-summary > div:nth-child(2n) { border-right: 0; }
.review-summary > div:nth-last-child(-n+2) { border-bottom: 0; }
.review-summary dt { color: var(--muted); font-size: 10px; }
.review-summary dd { margin: 7px 0 0; overflow: hidden; color: var(--text-secondary); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.empty-receipt { min-height: 330px; display: grid; place-content: center; justify-items: center; text-align: center; color: var(--muted); }
.compact-empty { min-height: 250px; }
.empty-receipt > span { width: 52px; height: 52px; display: grid; place-items: center; border: 1px dashed var(--line-strong); border-radius: 50%; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.empty-receipt h3 { margin: 16px 0 5px; color: var(--text-secondary); }
.empty-receipt p { max-width: 360px; margin: 0; font-size: 12px; line-height: 1.55; }
.decision-badge.allow { color: var(--lime); border-color: rgba(203, 244, 62, 0.45); background: rgba(203, 244, 62, 0.08); }
.decision-badge.hold { color: var(--amber); border-color: rgba(242, 184, 75, 0.45); background: rgba(242, 184, 75, 0.08); }
.decision-badge.deny { color: var(--red); border-color: rgba(255, 102, 95, 0.45); background: rgba(255, 102, 95, 0.08); }
.decision-summary { min-height: 94px; margin-top: 22px; padding: 16px 0; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric-label { display: block; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.decision-summary strong { font-size: 40px; line-height: 1; }
.decision-summary small { color: var(--muted); }
.risk-track { height: 8px; overflow: hidden; border-radius: 2px; background: #222a2e; }
.risk-track i { display: block; width: 0; height: 100%; background: var(--lime); transition: width 350ms ease; }
.receipt-facts { margin: 0; }
.receipt-facts > div { min-height: 46px; display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.receipt-facts dt { color: var(--muted); font-size: 11px; }
.receipt-facts dd { margin: 0; overflow: hidden; color: var(--text-secondary); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.reason-section { padding: 24px 0 16px; }
.reason-list { display: grid; }
.reason-row { padding: 13px 0; display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 11px; border-top: 1px solid var(--line); }
.reason-row:last-child { border-bottom: 1px solid var(--line); }
.reason-dot { width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: var(--lime); }
.reason-row.high .reason-dot, .reason-row.medium .reason-dot { background: var(--amber); }
.reason-row.critical .reason-dot { background: var(--red); }
.reason-row strong { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.reason-row p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.reason-row > em { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; font-style: normal; text-transform: uppercase; }
.receipt-actions { display: grid; grid-template-columns: 1fr 1fr 1.35fr; gap: 8px; }
.receipt-actions button, .receipt-actions a { min-height: 44px; padding: 0 12px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-raised); color: var(--text-secondary); cursor: pointer; font-size: 11px; text-align: center; text-decoration: none; }
.receipt-actions button:hover, .receipt-actions a:hover { border-color: var(--line-strong); color: var(--text); }
details { margin-top: 14px; border-top: 1px solid var(--line); }
summary { min-height: 44px; padding: 14px 0; color: var(--muted); cursor: pointer; font-size: 11px; }
pre { max-height: 390px; margin: 0; padding: 16px; overflow: auto; border: 1px solid var(--line); border-radius: 4px; background: #07090a; color: #b8c5ca; font-size: 11px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.error-panel { margin-top: 22px; padding: 16px; border: 1px solid rgba(255, 102, 95, 0.45); border-radius: 4px; background: rgba(255, 102, 95, 0.07); }
.error-panel strong { color: var(--red); }
.error-panel p { margin: 6px 0 0; color: #e1b6b4; font-size: 12px; }

.chain-status { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.chain-status > div { min-height: 84px; padding: 16px 20px; display: grid; align-content: center; gap: 7px; border-right: 1px solid var(--line); }
.chain-status > div:first-child { padding-left: 0; }
.chain-status > div:last-child { border-right: 0; }
.chain-status span { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.chain-status strong { overflow: hidden; color: var(--text-secondary); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.process-section { padding-bottom: 0; }
.per-action-section { background: transparent; }
.deployment-step { min-height: 142px; display: grid; grid-template-columns: 58px minmax(0, 1fr) minmax(160px, 200px); align-items: center; gap: 24px; border-top: 1px solid var(--line); }
.step-index { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--lime); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.step-copy { min-width: 0; padding: 22px 0; }
.step-copy > p { max-width: 760px; margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.step-command { min-height: 44px; padding: 0 14px; border: 1px solid var(--lime); border-radius: 4px; background: var(--lime); color: #090c0d; font-size: 12px; font-weight: 800; cursor: pointer; }
.step-command:hover { background: var(--lime-hover); }
.step-command.secondary { border-color: var(--line-strong); background: var(--surface-raised); color: var(--text-secondary); }
.command-link { display: grid; place-items: center; text-decoration: none; }
.command-link.disabled { pointer-events: none; opacity: 0.45; }
.step-command:disabled { border-color: var(--line); background: #181d20; color: #66737a; cursor: not-allowed; }
.step-actions { display: grid; gap: 8px; }
.compact-facts { max-width: 700px; margin: 14px 0 0; }
.compact-facts > div { min-height: 30px; display: grid; grid-template-columns: 100px minmax(0, 1fr); align-items: center; border-top: 1px solid var(--line); }
.compact-facts dt { color: var(--muted); font-size: 10px; }
.compact-facts dd { margin: 0; overflow: hidden; color: var(--text-secondary); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.anchor-preview { max-width: 760px; min-height: 54px; margin-top: 15px; padding: 12px; display: grid; gap: 7px; border: 1px solid var(--line); border-radius: 4px; background: #07090a; color: var(--muted); font-size: 11px; }
.anchor-preview > div { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 12px; }
.anchor-preview > div span { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; }
.anchor-preview code { overflow: hidden; color: var(--text-secondary); text-overflow: ellipsis; white-space: nowrap; }
.anchor-preview strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.anchor-preview strong.allow { color: var(--lime); }
.anchor-preview strong.hold { color: var(--amber); }
.anchor-preview strong.deny { color: var(--red); }
.transaction-panel { min-height: 100px; padding: 20px 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.transaction-panel strong { font-size: 13px; }
.transaction-panel p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.transaction-panel > a { flex: 0 0 auto; padding: 9px 11px; border: 1px solid var(--line); border-radius: 4px; color: var(--cyan); font-size: 11px; text-decoration: none; }
.transaction-panel.error strong { color: var(--red); }

.integration-grid { padding-top: 30px; }
.endpoint-panel code { display: block; margin: 10px 0 14px; color: var(--lime); font-size: 13px; }
.endpoint-panel > p { min-height: 40px; margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.endpoint-panel > a { min-height: 40px; display: inline-flex; align-items: center; color: var(--cyan); font-size: 12px; text-decoration: none; }
.endpoint-panel > a:hover { text-decoration: underline; }
.vertical-steps { margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); list-style: none; }
.vertical-steps li { min-height: 88px; padding: 16px 20px; display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.vertical-steps li:last-child { border-bottom: 0; }
.vertical-steps span { color: var(--lime); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.vertical-steps strong { font-size: 13px; }
.vertical-steps p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.code-section pre { max-height: none; }

.x402-payment-section { scroll-margin-top: 92px; }
.payment-lab-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr); gap: 16px; }
.payment-control-panel, .payment-proof-panel { min-height: 390px; }
.payment-progress { margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); list-style: none; }
.payment-progress li { min-height: 64px; padding: 10px 14px; display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 10px; border-bottom: 1px solid var(--line); color: var(--muted); }
.payment-progress li:last-child { border-bottom: 0; }
.payment-progress li > span { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; }
.payment-progress li strong, .payment-progress li small { display: block; }
.payment-progress li strong { color: var(--text-secondary); font-size: 12px; }
.payment-progress li small { margin-top: 3px; font-size: 10px; }
.payment-progress li.active { background: var(--surface-raised); color: var(--text-secondary); }
.payment-progress li.active > span { border-color: var(--lime); color: var(--lime); }
.payment-progress li.complete > span { border-color: var(--lime); background: var(--lime); color: #090c0d; }
.payment-terms-note { margin: 14px 0 0; padding: 11px 12px; border-left: 3px solid var(--amber); background: rgba(232, 180, 75, 0.06); color: var(--muted); font-size: 10px; line-height: 1.5; }
.payment-terms-note strong { color: var(--text-secondary); }
.payment-token-picker { margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border: 0; }
.payment-token-picker legend { width: 100%; margin-bottom: 8px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: 0; text-transform: uppercase; }
.payment-token-picker label { position: relative; min-width: 0; cursor: pointer; }
.payment-token-picker input { position: absolute; opacity: 0; pointer-events: none; }
.payment-token-picker span { min-height: 52px; padding: 8px 10px; display: flex; flex-direction: column; justify-content: center; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text-secondary); transition: border-color 150ms ease, background 150ms ease; }
.payment-token-picker b, .payment-token-picker small { overflow-wrap: anywhere; }
.payment-token-picker b { font-size: 11px; }
.payment-token-picker small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.payment-token-picker input:checked + span { border-color: var(--lime); background: rgba(203, 244, 62, 0.07); color: var(--text); }
.payment-token-picker input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }
.payment-token-picker input:disabled + span { cursor: not-allowed; opacity: 0.42; }
.payment-actions { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.payment-actions .secondary-command, .payment-actions .primary-command { width: 100%; min-width: 0; justify-self: stretch; justify-content: center; }
.payment-actions .primary-command { grid-column: 1 / 3; justify-content: space-between; }
.payment-message { min-height: 48px; margin-top: 14px; padding: 12px; border-left: 3px solid var(--cyan); background: rgba(85, 214, 210, 0.06); color: var(--text-secondary); font-size: 11px; line-height: 1.5; }
.payment-message.error { border-left-color: var(--red); background: rgba(255, 102, 95, 0.07); color: #e1b6b4; }
.payment-message.success { border-left-color: var(--lime); background: rgba(203, 244, 62, 0.07); color: var(--text); }
.payment-faucet { min-height: 40px; display: inline-flex; align-items: center; gap: 8px; color: var(--cyan); font-size: 11px; text-decoration: none; }
.payment-faucet:hover { text-decoration: underline; }
.payment-proof-panel .panel-title { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.payment-facts dd { text-align: right; }
.payment-explorer { width: 100%; margin-top: 18px; justify-content: space-between; }

footer { width: min(1280px, 100%); min-height: 64px; margin: 0 auto; padding: 20px 24px; display: flex; justify-content: space-between; gap: 18px; border-top: 1px solid var(--line); color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
footer a { min-height: 40px; display: inline-flex; align-items: center; color: var(--text-secondary); text-decoration: none; }
footer a:hover { color: var(--lime); }

@media (max-width: 1040px) {
  .header-inner { grid-template-columns: minmax(190px, 1fr) auto; }
  .service-status { display: none; }
  .runbook-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .runbook-grid li:nth-child(2) { border-right: 0; }
  .runbook-grid li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .chain-status { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chain-status > div:nth-child(2) { border-right: 0; }
  .chain-status > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .chain-status > div:nth-child(3) { padding-left: 0; }
}

@media (max-width: 760px) {
  .x402-payment-section { scroll-margin-top: 132px; }
  .header-inner { padding: 10px 16px 0; grid-template-columns: 1fr; gap: 8px; }
  .brand { justify-self: center; }
  .primary-nav { width: 100%; overflow-x: auto; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; }
  .primary-nav a { min-width: 25%; padding: 0 8px; }
  .app-shell { padding: 0 16px 40px; }
  .page-heading { min-height: 0; padding: 34px 0 28px; align-items: start; flex-direction: column; gap: 22px; }
  .page-heading h1, .compact-heading h1 { font-size: 32px; }
  .page-heading > div > p:last-child { font-size: 14px; }
  .primary-link, .secondary-link { width: 100%; justify-content: space-between; }
  .section-heading, .panel-title { flex-direction: column; gap: 12px; }
  .runbook-grid, .overview-grid, .integration-grid, .boundary-grid, .payment-lab-grid { grid-template-columns: 1fr; }
  .runbook-grid li { min-height: 150px; border-right: 0; border-bottom: 1px solid var(--line); }
  .runbook-grid li:nth-child(2) { border-right: 0; }
  .runbook-grid li:last-child { border-bottom: 0; }
  .runbook-grid span { margin-bottom: 18px; }
  .boundary-grid > div { min-height: 120px; border-right: 0; border-bottom: 1px solid var(--line); }
  .boundary-grid > div:last-child { border-bottom: 0; }
  .scenario-panel { grid-template-columns: 1fr; gap: 12px; }
  .scenario-tabs { grid-template-columns: 1fr; }
  .wizard-stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wizard-step:nth-child(2) { border-right: 0; }
  .wizard-step:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .wizard-panel { min-height: 0; padding: 22px 18px; }
  .field-grid.two, .field-grid.three, .toggle-grid { grid-template-columns: 1fr; }
  .review-summary { grid-template-columns: 1fr; }
  .review-summary > div { border-right: 0; border-bottom: 1px solid var(--line) !important; }
  .review-summary > div:last-child { border-bottom: 0 !important; }
  .receipt-actions { grid-template-columns: 1fr; }
  .deployment-step { padding: 22px 0; grid-template-columns: 42px minmax(0, 1fr); gap: 14px; }
  .step-copy { padding: 0; }
  .deployment-step > .step-command, .deployment-step > .step-actions { grid-column: 2; }
  .transaction-panel { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 480px) {
  .brand { justify-self: start; }
  .brand small { display: none; }
  .primary-nav a { min-width: auto; flex: 1 0 auto; font-size: 12px; }
  h1, .page-heading h1, .compact-heading h1 { font-size: 29px; }
  .tool-panel { padding: 18px; }
  .status-list > div { grid-template-columns: 118px minmax(0, 1fr); }
  .wizard-step { min-height: 68px; padding: 9px; }
  .wizard-step small { display: none; }
  .wizard-actions { grid-template-columns: 1fr 1fr; }
  .wizard-actions > span { grid-column: 1 / 3; grid-row: 1; }
  .wizard-actions > button { grid-row: 2; width: 100%; min-width: 0; justify-self: stretch; }
  .decision-summary { grid-template-columns: 1fr; }
  .receipt-facts > div { grid-template-columns: 90px minmax(0, 1fr); }
  .payment-control-panel, .payment-proof-panel { min-height: 0; }
  .payment-token-picker { grid-template-columns: 1fr; }
  .chain-status { grid-template-columns: 1fr; }
  .chain-status > div { padding-left: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .chain-status > div:last-child { border-bottom: 0; }
  .deployment-step { grid-template-columns: 36px minmax(0, 1fr); }
  .step-index { width: 34px; height: 34px; }
  footer { padding: 18px 16px; flex-direction: column; }
}

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