/* _kit/print.css — turns the #doc element into a clean A4/Letter PDF via the browser's
   "Save as PDF". No library, no server. Copy verbatim per venture.
   Contract: the printable document lives in #doc. Everything else gets .no-print. */
@media print {
  /* No `size` here, on purpose. Every buyer in this portfolio is in the United States and
     prints US Letter (216x279mm); this file used to declare `size: A4` (210x297mm), which
     forces the browser to scale the page down to fit Letter and surrounds the document with
     dead margin. The printable document IS the product in every one of these ventures, so a
     shrunken one is a real defect, not a cosmetic one.
     Omitting `size` lets the paper the user actually loaded win, which is correct on both
     sides of the Atlantic. A venture that needs a specific orientation declares ONLY that —
     `@page { size: landscape }` — and still inherits the user's paper size. WageProof does
     exactly this, because WH-347 is a landscape form. Margins stay here. */
  @page { margin: 14mm 13mm; }
  /* ---- THE TWO RULES THAT KEEP A PRINTED DOCUMENT LEGIBLE -------------------
     Both were broken across the portfolio on 2026-09-11 and are the reason this
     note exists. Neither can be enforced from CSS alone, so they are enforced by
     test: see the `typography floor` section of _kit/test.cjs, which renders every
     #doc under emulated print media and fails on a violation.

     1. WIDTH. The document must FIT the printable width so the browser never
        shrinks the whole page to make it fit. Letter at the margins above gives
        816 - 2x49.1 = 717px of content; a user on 16mm gets 695px. Budget <=690px.
        Hence `width:100%` below and never a fixed `width`/`min-width` on #doc or
        on a table inside it — a `min-width` is precisely what forces the
        shrink-to-fit, and it shrinks every glyph on the page, not just the table.
        A table that genuinely cannot fit gets redesigned for paper: fewer
        columns, a continuation block, or `@page{size:landscape}` (orientation
        ONLY — never a paper size, per the note above).

     2. SIZE. Printed body text is >= 9pt (12px) and NOTHING a human reads goes
        below 8pt (10.7px) — table cells, column headers and footnotes included.
        Shrinking type to make content fit is the defect, not the fix. ------- */
  :root { --bg:#fff; --surface:#fff; --surface-2:#fff; --text:#000; --text-2:#333;
          --text-3:#555; --border:#bbb; --border-2:#999; --shadow-1:none; --shadow-2:none; }
  html,body { background:#fff !important; color:#000 !important; }
  .no-print, #toast, nav, header.app-header, .btn, footer.app-footer { display:none !important; }
  #doc, #doc * { visibility:visible }
  body > *:not(#doc-host) { display:none !important }
  #doc-host { display:block !important }
  #doc { box-shadow:none !important; border:0 !important; border-radius:0 !important;
         margin:0 !important; padding:0 !important; max-width:none !important; width:100% !important }
  .card { border:1px solid #ccc !important; box-shadow:none !important; break-inside:avoid }
  table { break-inside:auto }
  tr, .kpi, .avoid-break { break-inside:avoid }
  h1,h2,h3 { break-after:avoid }
  .page-break { break-before:page }
  a { color:#000 !important; text-decoration:none }
  /* The URL is appended so a reader holding paper can type it. At 10px (7.5pt) it
     was the one sub-floor size in the kit and it was the one that most needed to
     be transcribable character by character. 11px. */
  a[href^="http"]::after { content:" (" attr(href) ")"; font-size:11px; color:#555 }
}
