/* ================================================================
   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; }

  /* ⚠ A CLOSED DRAWER IS PARKED JUST OFF THE RIGHT EDGE OF THE PAGE AND ITS
     SHADOW FALLS BACK ONTO IT. `.drawer` is `position:fixed; right:0` with
     `box-shadow:-12px 0 40px -12px`, a shadow cast LEFTWARDS, and print
     layout makes the viewport exactly one page wide, so the parked drawer
     sits at the page's right edge and greys the last 12 mm of every sheet.
     Measured on the label sheet at 300 dpi: ink ran to 209.8 mm on a 210 mm
     page instead of stopping at the die cut, which is what "the right side
     is cut off" looks like in a print preview. The palette is the same
     shape of thing and goes with it. `.drawer.on` is excluded: an open
     drawer is what the reader is looking at, and the rule below promotes it
     onto the page. */
  .drawer:not(.on), .pal, .pal-veil { 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; }
}
