/* QuietBill — print styles. What the saved PDF / printed page looks like.
   Rules of the road (see CLAUDE.md): rely on borders and text color only —
   never background colors — so output is correct even when the browser's
   "background graphics" option is off. Page size + margins come from the
   dynamically injected @page rule (app.js applyPaperSize). */

@media print {
  html, body { background: #fff !important; }

  /* Hide everything that isn't the document. */
  .site-header, .site-footer, .hero, .mkt, .cta-band,
  .editor, .no-print, .toast, .modal { display: none !important; }

  .wrap { max-width: none; padding: 0; margin: 0; }
  .workbench { display: block; margin: 0; }
  .preview { position: static; }

  .paper {
    box-shadow: none !important;
    border-radius: 0;
    width: auto; max-width: none; min-height: 0;
    margin: 0; padding: 0;
    font-size: 13px;
    color: #111 !important;
  }

  /* Keep key blocks from splitting across pages. */
  .p-top, .p-billto, .p-totals, .p-block { break-inside: avoid; }
  .p-items tr { break-inside: avoid; }
  .p-items thead { display: table-header-group; } /* repeat header on page 2+ */

  .p-paid { print-color-adjust: exact; -webkit-print-color-adjust: exact; }

  a { color: inherit; text-decoration: none; }
}
