/* ================================================================
   print.css — "any list out, any record on paper" (B1-0761, B4-0755).

   A report that can only leave as a CSV cannot be taken into a room
   where somebody is being asked to sign something. This makes every
   surface printable without a second rendering path: the same DOM,
   with the chrome that only means something on a screen removed.

   What survives onto paper, and why:
     · the page-head and its numbers — the sheet has to say what it is
     · the verdict band — the answer, first, as on screen
     · every chart, in full colour, because the marks ARE the meaning
       here (a hatch means "not assessed" and a dashed open gap means
       "nobody signed"; printing those as grey blocks would destroy
       the one thing this product is careful about)
     · every row of every table — never just the first page
     · what the file cannot say — the caveats travel with the numbers
       or the numbers are worth less than nothing

   What goes:
     · the rail, the topbar, the search, the seat switcher — navigation
       is meaningless on paper
     · hover-only affordances, and the drawer veil
   ================================================================ */

@media print {
  /* colour is meaning in this product, not decoration — ask for it */
  .tc { -webkit-print-color-adjust: exact; print-color-adjust: exact;
        background: #fff; font-size: 10.5pt; }

  /* navigation cannot be used on paper */
  .sb, .topbar, .tb, [data-toast], .drawer-veil, .pop-menu, .tip,
  .nav-more, .fix-chip, .cb-rail-zoom { display: none !important; }
  .shell { display: block !important; }
  #view { padding: 0 !important; }
  .wrap, .wrap.wide { max-width: none !important; padding: 0 !important; margin: 0 !important; }

  /* a drawer open on screen is what the reader is LOOKING at, so it is
     what they meant to print — promote it to the page rather than
     printing the surface behind it */
  .drawer.on { position: static !important; width: auto !important; height: auto !important;
    box-shadow: none !important; border: 0 !important; transform: none !important; }
  .drawer.on ~ #view, body:has(.drawer.on) #view { display: none !important; }

  /* the controls did their job before the print; the SENTENCE they
     produced is what has to survive */
  .rp-ctl, .dsh-ctl, .fchips, .kt-foot, .seg { display: none !important; }

  /* every row, never one page of them */
  .kt-wrap { overflow: visible !important; max-height: none !important; }
  .kt-tbl { width: 100% !important; }
  .kt-tbl thead { display: table-header-group; }   /* repeat headers across pages */
  .kt-tbl tr { break-inside: avoid; }

  /* a panel must not be split down the middle of its own chart */
  .rp-panel, .dsh-card, .dsh-hero, .fc-verdict, .stc { break-inside: avoid; }
  .rp-panel, .dsh-card, .dsh-hero { box-shadow: none !important; }

  /* charts keep their marks: the hatch and the dashed open gap are the
     difference between "not assessed" and "zero" */
  .cb-seg, .cb-prov, .cb-broken, .rb-bar, .rb-na, .ss-seg, .mx-cell,
  .rg-arc, .tl-line, .tl-area, .wf-bar, .rp-cert {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  /* entrance transitions never ran in a print context — force the end state,
     or every bar prints at zero width (the same failure the SETTLE SNAP in
     kit-viz.js guards against on screen) */
  .cb-seg, .rb-bar, .ss-seg, .wf-bar { transition: none !important; }
  .mx-cell { opacity: 1 !important; transform: none !important; }

  /* the caveats travel with the numbers */
  .rp-gap, .dsh-caveat, .rp-absent { break-inside: avoid; }

  a[href]::after { content: ""; }   /* no URL spam beside every link */

  @page { margin: 14mm 12mm; }
}
