/* Print for APP screens: the document prints ALONE. The invoice document's own pagination
   rules live in invoice_print.css, so that invoice.css can stay media-agnostic and pagination
   remains the only difference between the on-screen preview and the PDF.

   What is hidden here is a confidentiality rule, not a layout preference. A browser prints an
   input's VALUE, so leaving the CTQ form on the sheet puts every Précision note -- internal,
   never printed on the client invoice -- onto paper that goes to the family. The exemption
   panel goes for the same reason: its checked state is an inference about the family, and the
   invoice states the relief in its own words. The prototype hides .pane.form for exactly this
   reason. */
@media print {
  .app-header, .app-nav,
  .case-nav,          /* the DOSSIER's own tabs. .app-nav was hidden and this was not, so
                         "Dossier · Journal du dossier · Facturation · Facture" printed across
                         the top of the sheet the family receives -- internal navigation on a
                         client document, and it names screens they have no business seeing.
                         Found 2026-08-27 in a browser print preview. */
  .flash, .actions, .skip-link,
  .pane--form,        /* the CTQ form: 33 Précision inputs, each printing its value */
  #exemption_panel,   /* the relief toggle: internal, and the invoice says it properly */
  .no-print           /* the invoice screen's own chrome: the deliveries list carries
                         recipient addresses, and the send form carries one too */
  { display: none !important; }

  body { background: #fff; }
  .pane { padding: 0; }
  .dossier-grid { display: block; }

  /* PROTOTYPE PARITY, dropped in the port: prototype/index.html:189 carries
     `.pane.preview{position:static;max-height:none;padding:0}` inside its own @media print and this
     file had no equivalent. A scroll container is MONOLITHIC in paged media -- it cannot fragment
     across pages -- so the pane printed the invoice clipped to roughly one page's worth with the
     rest silently absent. Nobody saw it because a grouped three-section invoice fits on one sheet;
     a 43-line itemized one does not. `.pane { padding: 0 }` above already covers the padding half.
     border-block-start too: in paged media the min-width query in layout.css does not match, so the
     base rule's 1px hairline applies and printed across the top of the family's sheet.
     PLACED AFTER the display: none rule, and that is load-bearing -- print_confidentiality_spec
     captures everything from `@media print {` to the FIRST display:none rule, so anything above it
     is read as part of the hidden-selector list. */
  .dossier-grid .pane--preview {
    position: static;
    max-height: none;
    overflow: visible;
    border-block-start: 0;
  }

  /* THE TAB SWITCH, UNDONE FOR PAPER. components.css carries no media attribute, so
     `.pane-tabs:has(#pane_tab_journal:checked) ~ #billing_totals { display: none }` applies in
     paged media too: printing while the Journal tab is selected would hand the family a BLANK
     SHEET, with every spec green. The strip and the journal panel are both .no-print, so the
     journal itself never reaches paper either way -- this is only about the invoice coming back.

     IT WINS ON !important, NOT ON SPECIFICITY, and the arithmetic is not what it looks like: the
     tab rule computes to (2,2,0) because :has() takes its most specific argument, against (1,0,0)
     for a bare id. Drop the !important here, or add one to the tab rules, and the sheet is blank
     again. The min-width query the tabs live in is a SECOND line of defence at common paper
     widths and must not be relied on -- wide paper matches it.

     Placed after the display: none rule for the reason the note below gives. */
  #billing_totals { display: block !important; }

  /* Same mechanism, four more screens that had it latently: an overflow-x container is monolithic
     too, so the audit log, the users list, the catalogue and the dossier list each printed one sheet
     and dropped the rest -- and the invoice preview would have joined them the moment it gained its
     wrapper. position: relative stays where it is; it is what contains the u-vh captions. */
  .table-scroll { overflow: visible; }
}
