:root {
  --paper: #f5f2ea;
  --panel: #fffdf8;
  --panel-2: #ece9df;
  --line: #e1ddd0;
  --line-soft: rgba(28, 26, 21, 0.08);
  --ink: #1e1c17;
  --ink-2: #45423a;
  --muted: #6e6a5e;
  --jade: #175e42;
  --jade-strong: #113f2d;
  --jade-soft: #e7efe8;
  --oxblood: #93362c;
  --oxblood-soft: #f3e6e2;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.035;
  background-image: 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='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
}

h1, h2, h3, p {
  margin: 0;
}

a {
  color: var(--jade);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--jade-strong);
}

.mono {
  font-family: var(--mono);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--panel-2);
  border-radius: 4px;
  padding: 1px 5px;
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 12px;
  z-index: 20;
  margin: 12px 12px 0;
  align-self: center;
  max-width: 1400px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 16px;
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(30, 28, 23, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.brand-mark {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.brand-mark:hover {
  text-decoration: none;
  color: var(--jade-strong);
}

.brand-mark .mark {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--jade);
  border-radius: 4px;
  display: inline-grid;
  place-items: center;
  color: var(--jade);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.topnav {
  display: flex;
  gap: 16px;
  flex: 1;
}

.topnav a {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.topnav a:hover {
  color: var(--jade-strong);
}

.network-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--jade);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(23, 94, 66, 0.35);
  background: var(--jade-soft);
  border-radius: 999px;
  padding: 5px 12px;
  white-space: nowrap;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--jade);
  display: inline-block;
}

.dot.small {
  width: 6px;
  height: 6px;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 56px 24px 72px;
  border-bottom: 1px solid var(--line);
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 27px,
      rgba(28, 26, 21, 0.045) 27px,
      rgba(28, 26, 21, 0.045) 28px
    ),
    var(--paper);
}

.kicker {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 46px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 20px;
}

.lead {
  font-size: 18px;
  color: var(--ink-2);
  max-width: 540px;
  margin-bottom: 28px;
}

.cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  font-weight: 600;
  font-size: 15px;
  border-radius: 12px;
  padding: 12px 22px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.button:hover {
  text-decoration: none;
}

.button.primary {
  background: var(--jade);
  color: #fbfdf9;
}

.button.primary:hover {
  background: var(--jade-strong);
}

.button.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.button.ghost:hover {
  border-color: var(--jade);
  color: var(--jade-strong);
}

.proof {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  max-width: 560px;
}

.proof li {
  position: relative;
  color: var(--ink-2);
  font-size: 14px;
  padding-left: 24px;
}

.proof li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 12px;
  height: 1.5px;
  background: var(--jade);
}

/* ---------- Wallet plate ---------- */

.hero-panel {
  display: flex;
  justify-content: center;
}

.wallet-card {
  width: 100%;
  max-width: 384px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px 24px 20px;
  box-shadow: 0 12px 44px rgba(30, 28, 23, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.wallet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.wallet-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.chip {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  border-radius: 999px;
  padding: 3px 10px;
}

.chip.green {
  color: var(--jade);
  background: var(--jade-soft);
  border: 1px solid rgba(23, 94, 66, 0.3);
}

.wallet-name {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.wallet-amount {
  font-family: var(--mono);
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.wallet-budget-note {
  color: var(--muted);
  font-size: 12px;
  margin: 8px 0 14px;
}

.budget-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--panel-2);
  overflow: hidden;
  margin-bottom: 18px;
}

.budget-fill {
  height: 100%;
  width: 100%;
  background: var(--jade);
  border-radius: inherit;
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.wallet-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.meta-label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 4px;
}

.meta-value {
  display: block;
  font-family: var(--mono);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.wallet-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

/* ---------- Sections ---------- */

.section {
  padding: 56px 24px;
  border-bottom: 1px solid var(--line);
}

.section-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.section-title::before {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background: var(--jade);
  margin-bottom: 12px;
}

h2.section-title {
  margin-bottom: 18px;
}

.section-lead {
  color: var(--ink-2);
  max-width: 720px;
  font-size: 16px;
  margin-bottom: 26px;
}

/* ---------- Personas ---------- */

.personas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.persona {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 10px 36px rgba(30, 28, 23, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.persona h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.persona p {
  color: var(--ink-2);
  font-size: 14px;
}

.persona p strong {
  color: var(--ink);
}

.persona-footer {
  border-left: 2px solid var(--jade);
  padding-left: 14px;
  color: var(--ink-2);
  font-size: 14px;
  max-width: 760px;
}

/* ---------- Live numbers ---------- */

.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.panel-head h2.section-title {
  margin-bottom: 0;
}

.panel-head h2.section-title::before {
  margin-bottom: 10px;
}

.controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

button {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 44px;
  padding: 9px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

button:hover {
  border-color: var(--jade);
  color: var(--jade-strong);
}

button:disabled {
  opacity: 0.55;
  cursor: default;
}

.stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  min-width: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.stat:first-child {
  grid-column: span 2;
}

.stat-label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.stat-value {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 600;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: normal;
  word-break: keep-all;
}

.stat:first-child .stat-value {
  font-size: 26px;
}

.stat-note {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}

.governed {
  grid-column: 1 / -1;
  color: var(--jade-strong);
  font-size: 12px;
  font-family: var(--mono);
  padding: 8px 2px 0;
}

/* ---------- Feed and side column ---------- */

.split {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 24px;
  align-items: start;
}

.side-col {
  display: grid;
  gap: 16px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  min-width: 0;
  box-shadow: 0 10px 36px rgba(30, 28, 23, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.panel-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}

.panel-title + .bars {
  margin-bottom: 16px;
}

.feed {
  display: flex;
  flex-direction: column;
}

.count {
  color: var(--muted);
  font-family: var(--mono);
  font-weight: 400;
  font-size: 12px;
}

.decision {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 14px 2px;
}

.decision:first-child {
  border-top: 0;
  padding-top: 4px;
}

.decision-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.pill {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  border-radius: 4px;
  padding: 3px 8px;
  border: 1px solid transparent;
}

.pill.approved {
  color: var(--jade);
  background: var(--jade-soft);
  border-color: rgba(23, 94, 66, 0.3);
}

.pill.denied {
  color: var(--oxblood);
  background: var(--oxblood-soft);
  border-color: rgba(147, 54, 44, 0.3);
}

.decision-id {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.decision-vendor {
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.decision-amount {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.decision-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

.memo {
  font-style: normal;
  color: var(--ink-2);
}

.receipt {
  margin-top: 10px;
}

.receipt summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--jade);
  padding: 4px 0;
}

.receipt summary::-webkit-details-marker {
  display: none;
}

.receipt summary::before {
  content: "›";
  display: inline-block;
  transition: transform 0.15s ease;
}

.receipt[open] summary::before {
  transform: rotate(90deg);
}

.receipt-body {
  padding: 10px 0 4px;
  border-top: 1px dashed var(--line);
  margin-top: 6px;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(28, 26, 21, 0.06);
}

.row:last-child {
  border-bottom: 0;
}

.row-label {
  color: var(--muted);
  font-size: 12px;
}

.row-value {
  text-align: right;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.evidence {
  margin: 6px 0 8px;
  padding-left: 18px;
  color: var(--ink-2);
  font-size: 12px;
}

.evidence li {
  margin: 2px 0;
}

/* ---------- Charts ---------- */

.bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 32px;
  gap: 10px;
  align-items: center;
}

.bar-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  height: 12px;
  background: var(--panel-2);
  border-radius: 3px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--jade);
  border-radius: inherit;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.bars[data-tone="blocked"] .bar-fill {
  background: var(--oxblood);
}

.bar-value {
  font-family: var(--mono);
  font-size: 12px;
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.empty-state {
  color: var(--muted);
  font-size: 13px;
  padding: 12px 0;
}

/* ---------- Refusal list ---------- */

.protocol-item {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.protocol-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.protocol-intent {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.protocol-error {
  color: var(--oxblood);
  font-size: 11px;
  overflow-wrap: anywhere;
}

/* ---------- Enable steps ---------- */

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
  max-width: 940px;
}

.step {
  display: flex;
  gap: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 36px rgba(30, 28, 23, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.step-num {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--jade);
  background: var(--jade-soft);
  color: var(--jade-strong);
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.step-body {
  min-width: 0;
  flex: 1;
}

.step-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.step-body p {
  color: var(--ink-2);
  font-size: 14px;
  margin-bottom: 10px;
}

.step-code {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  overflow-x: auto;
  white-space: pre;
  margin: 0 0 10px;
  color: var(--ink-2);
}

.code-block {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  overflow-x: auto;
  white-space: pre;
  margin: 0 0 14px;
  color: var(--ink-2);
  -webkit-overflow-scrolling: touch;
}

.copy-button {
  font-size: 12px;
  padding: 7px 12px;
}

/* ---------- Judge details ---------- */

.judge-details {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 12px 44px rgba(30, 28, 23, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.judge-toggle {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
}

.judge-toggle::-webkit-details-marker {
  display: none;
}

.judge-toggle::before {
  content: "›";
  color: var(--jade);
  font-family: var(--mono);
  font-size: 18px;
  line-height: 1;
}

.judge-details[open] .judge-toggle::before {
  transform: rotate(90deg);
  display: inline-block;
}

.judge-body {
  padding: 4px 20px 20px;
  border-top: 1px solid var(--line);
}

.judge-body .panel-title {
  margin-top: 16px;
}

.evidence-notes {
  color: var(--ink-2);
  font-size: 13px;
  padding-left: 18px;
}

/* ---------- Error ---------- */

.error {
  border: 1px solid rgba(147, 54, 44, 0.4);
  background: var(--oxblood-soft);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 14px;
}

.error-bar {
  background: var(--oxblood-soft);
  color: var(--oxblood);
  padding: 8px 20px;
  font-size: 13px;
  border-bottom: 1px solid var(--oxblood);
}

/* ---------- Footer ---------- */

footer {
  padding: 36px 24px 48px;
  display: flex;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.footer-brand {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  color: var(--ink);
  font-size: 15px;
  margin-bottom: 6px;
}

.footer-top {
  max-width: 340px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: var(--ink-2);
}

.footer-note {
  width: 100%;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- Focus ---------- */

:focus-visible {
  outline: 3px solid var(--jade);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  h1 {
    font-size: 40px;
  }

  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stat:first-child {
    grid-column: span 3;
  }

  .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 40px 18px 52px;
  }

  h1 {
    font-size: 33px;
    letter-spacing: -0.01em;
  }

  .lead {
    font-size: 16px;
  }

  .personas {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-wrap: wrap;
    gap: 10px 14px;
    padding: 12px 18px;
  }

  .topnav {
    order: 3;
    flex-basis: 100%;
    overflow-x: auto;
    gap: 18px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .topnav::-webkit-scrollbar {
    display: none;
  }

  .section {
    padding: 44px 16px;
  }

  .wallet-amount {
    font-size: 34px;
  }

  .bar-row {
    grid-template-columns: 96px 1fr 28px;
  }
}

@media (max-width: 640px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .stat:first-child {
    grid-column: span 2;
  }

  .stat:first-child .stat-value {
    font-size: 22px;
  }

  .stat-value {
    font-size: 16px;
  }

  .cta .button {
    width: 100%;
    justify-content: center;
  }

  .decision-amount {
    margin-left: 0;
    flex-basis: 100%;
    font-size: 13px;
  }

  .step {
    flex-direction: column;
    gap: 10px;
  }

  .wallet-meta {
    grid-template-columns: 1fr 1fr;
  }

  .footer-note {
    flex-direction: column;
    gap: 8px;
  }

  .panel-head {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}


:root {
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

.button:active,
button:active:not(:disabled) {
  transform: translateY(1px);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--jade);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 8px 16px;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  z-index: 60;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}
