/* One contrast palette for transaction details and their nested document viewer.
   Keep source text, scanned records, layout and the existing green/paper surfaces intact. */
.compact-transactions :is(.project-dialog, .proof-dialog) {
  --detail-ink: #202b25;
  --detail-muted: #3b4e41;
  --detail-accent: #664827;
  --detail-link: #19372e;
  --detail-hover: #5b3d21;
  --detail-focus: #664827;
  color: var(--detail-ink);
}

/* The source-record chapter and closing bar retain their dark surfaces. */
.compact-transactions .project-dialog :is(.records, .ending) {
  --detail-ink: #fffdf7;
  --detail-muted: #e3e9df;
  --detail-accent: #ead4a8;
  --detail-link: #fffdf7;
  --detail-hover: #ead4a8;
  --detail-focus: #ead4a8;
}

/* Override legacy per-property and per-section colors without changing typography. */
.compact-transactions :is(.project-dialog, .proof-dialog) * {
  color: var(--detail-ink) !important;
}
.compact-transactions :is(.project-dialog, .proof-dialog)
:is(.eyebrow, .date, small, .role-line, .source-kind, .fact-note, .detail-intro,
    .source-wording, .gallery-caption, .photo-note, .record-note, .doc-type,
    .document-more, .proof-subtitle, .proof-note, .proof-page figcaption,
    .brief-metric > span) {
  color: var(--detail-muted) !important;
}
.compact-transactions .project-dialog .chapter-number {
  color: var(--detail-accent) !important;
}
.compact-transactions :is(.project-dialog, .proof-dialog) :is(a, .text-proof) {
  color: var(--detail-link) !important;
}
.compact-transactions :is(.project-dialog, .proof-dialog) :is(a, .text-proof):hover {
  color: var(--detail-hover) !important;
}
.compact-transactions .project-dialog .close-top {
  color: #fffdf7 !important;
}
.compact-transactions :is(.project-dialog, .proof-dialog)
:is(button, a, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--detail-focus);
  outline-offset: 4px;
}
.compact-transactions :is(.project-dialog, .proof-dialog) :is(.doc-thumbnail img, .proof-page img) {
  opacity: 1;
  filter: none;
}
