/* ==========================================================================
   Print / PDF output (loaded with media="print", so none of this affects the
   screen). Only the document in #print-root is printed — see lib/print.js.
   Page size and margins are set per print by lib/print.js (@page).
   ========================================================================== */
/* The app is dark; paper is always light (otherwise page margins can print dark) */
:root { color-scheme: light !important; }

html,
body {
  background: var(--doc-color-background) !important;
  color: var(--doc-color-text) !important;
  min-block-size: 0 !important;
}

/* Hide the whole app; show only the document */
body > :not(#print-root) { display: none !important; }
#print-root { display: block !important; }

/* Documents: colors print exactly, items and signatures never split across pages */
#print-root .doc { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
#print-root .doc-keep { break-inside: avoid; page-break-inside: avoid; }
#print-root :is(h1, h2, h3) { break-after: avoid; page-break-after: avoid; }
#print-root img { break-inside: avoid; }
