/* Receipt side drawer: one published receipt, read as sections. */
@media print {
  body:has(.report-print) {
    display: block;
    background: white;
    color: black;
  }
  body:has(.report-print) * {
    visibility: hidden;
  }
  body:has(.report-print) *:not(.report-print):not(.report-print *):not(:has(.report-print)) {
    display: none !important;
  }
  body:has(.report-print) .sidebar,
  body:has(.report-print) header,
  body:has(.report-print) .receipt-overlay {
    display: none;
  }
  body:has(.report-print) .shell,
  body:has(.report-print) main,
  body:has(.report-print) #content,
  body:has(.report-print) .proof-audit,
  body:has(.report-print) .report-controls,
  body:has(.report-print) .report-output {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    width: auto;
    max-width: none;
    overflow: visible;
  }
  body:has(.report-print) .report-print,
  body:has(.report-print) .report-print * {
    visibility: visible;
    color: black;
    background: white;
  }
  body:has(.report-print) .report-print {
    position: static;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 10pt;
  }
  .report-table tr {
    break-inside: avoid;
  }
}
.receipt-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
}
.receipt-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.receipt-drawer {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(520px, 100%);
  height: 100%;
  background: var(--surface-panel);
  border-left: 1px solid var(--border-subtle);
  box-shadow: -24px 0 48px rgba(0, 0, 0, 0.45);
  animation: receipt-in 220ms var(--ease-out);
}
@keyframes receipt-in {
  from {
    transform: translateX(24px);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .receipt-drawer {
    animation: none;
  }
}
.receipt-head,
.receipt-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
}
.receipt-head {
  border-bottom: 1px solid var(--border-subtle);
}
.receipt-head p {
  margin: 4px 0 0;
}
.receipt-foot {
  justify-content: flex-end;
  border-top: 1px solid var(--border-subtle);
}
.receipt-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 24px 24px;
}
.receipt-body > p {
  margin: 18px 0 8px;
}
.receipt-section {
  display: grid;
  gap: 10px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.receipt-section p {
  margin: 0;
}
.receipt-section > button {
  justify-self: start;
}
.receipt-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.receipt-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.receipt-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
  background: var(--surface-raised);
  font-size: 13px;
}
.receipt-list .hash {
  margin-left: auto;
}
.receipt-facts {
  display: grid;
  grid-template-columns: minmax(130px, auto) 1fr;
  gap: 8px 16px;
  margin: 0;
  font-size: 13px;
}
.receipt-facts dt {
  color: var(--text-muted);
}
.receipt-facts dd {
  margin: 0;
  color: var(--text-secondary);
  font: 12px/1.5 var(--font-mono);
  overflow-wrap: anywhere;
}
.receipt-body .detail pre {
  max-height: 360px;
  overflow: auto;
}
.proof-audit {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.proof-audit-result {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--text-secondary);
}
.proof-audit-result:empty {
  display: none;
}
.proof-audit-result .good {
  color: var(--good);
}
.proof-audit-result .warn {
  color: var(--warn);
}
.proof-audit-result .failed {
  color: var(--bad);
}
