/* v112-print.css — night build phase 3 (plan H, "clean print"). Tokens only. Linked with media="print" (index.html); the rules sit inside
   @media print as well, so the file means the same wherever it is read.
   Any page prints as a document: the page alone (no sidebar, top bar, panels, toasts or tooltips), every fold open, the light colours in either
   theme (the print token set in v103-tokens.css), chips and verdict colours kept, and no card or row cut across two sheets (one taller than a
   whole sheet is the browser's to break). The page prints at 86% so a sheet holds about a screen's worth. A line on top names the page and
   when it was printed (body[data-print], set by ui/lshell.js). Reports keep their own print view and @page (v91-reports.css · pages/lreports.js). */
@media print{
  @page{margin:12mm 12mm 14mm}
  :root[data-theme="dark"] .app.v89{--canvas:var(--surface-1)}   /* the shell's own dark canvas, back to the print surface */
  html,body{background:var(--surface-1)!important;color:var(--text-1)}

  /* ---- only the page prints ---- */
  .app.v89 > .sb,.app.v89 > .sb-bd,.app.v89 > .skip,.main > .sys-offline,.app.v89 > .sys-offline,#scroll > .topbar,#dp-toasts,#dp-leaving,#tip-pop,.hs-sheet,.dg-scrim,.sys-boot,.sys-session{display:none!important}
  .app.v89,.app.v89 > .main,#scroll{display:block!important;position:static!important;height:auto!important;min-height:0!important;overflow:visible!important;background:var(--surface-1)!important}
  #scroll > .page,#scroll .page.stg{max-width:none!important;margin:0!important;padding-left:0!important;padding-right:0!important;padding-top:0!important}
  #scroll{zoom:.86}   /* a sheet holds about a screen's worth: the page lays out a little wider, its text prints at about 9 pt */
  body:has(.rp-page) #scroll{zoom:1}   /* P5v2: a report prints in its own type set at full size — its frames are the paper's own size (at .86 each filled 86% of a sheet) */
  .em-list,.stg-nav,.stg-navm{display:none!important}   /* a settings page and the emails list: the content, not the navigation */
  .stg-wrap,.stg.is-wide .stg-wrap,.em{display:block!important}
  /* identity v1.0: the line starts with the dP mark — 23px tall (6.1 mm on paper; the identity's print minimum is 6 mm), 19.2px wide, black (print
     is the light set), 9px before the words. The box is border-box: 32px = the mark 23 + the 8px the words keep above the hairline + the 1px line;
     the 18px line of words sits 2.5px down, centred on the mark */
  body[data-print]::before{content:attr(data-print);display:block;margin:0 0 14px;padding:2.5px 0 8px 28px;min-height:32px;border-bottom:1px solid var(--line-strong);font-size:var(--t-meta);line-height:var(--lh-meta);color:var(--text-3);
    background:url("../brand/dp-mark-black.svg") no-repeat 0 0/auto 23px;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  body[data-print]:has(.rp-page)::before{content:none;display:none}

  /* ---- controls that do nothing on paper ---- */
  button.ib,.btn-icon,.sb-toggle,.pl-s-more,.bulkbar,.em-tools,.em-foot,.fb-spin,.sys-ss-a,.toast-stack{display:none!important}
  /* P5v2: every action button and menu, the page's search, filter and sort row (Findings, Home), selection checkboxes and the Dashboard's touch
     "Why?" buttons (hover:none in print put them over the sparklines). Chips, status words and links stay. */
  button.btn,a.btn,.menu-btn.btn,.pl-bar,.hs-bar-t,label.pl-q,.db-why,.db-know,.db-tools > a.prop,.ch-mk-b{display:none!important}
  .apq-ck,.kb-ck,.apq-chev{visibility:hidden!important}   /* a cell of a row's grid: hidden in place, so the columns stay put */
  /* a menu that shows a value (the window, the market) prints as its words — no box, no chevron */
  .menu-btn.prop{border-color:transparent!important;background:none!important;box-shadow:none!important;padding-left:0!important;padding-right:0!important}
  .menu-btn.prop .mb-cv{display:none!important}
  /* a board lane's "Show 3 more" says the rest is in Dottpace, as plain words */
  .kb-more{border:0!important;background:none!important;box-shadow:none!important;padding:6px 0 0!important;height:auto!important;justify-content:flex-start!important;color:var(--text-3)!important}
  .kb-more > svg{display:none!important}
  .kb-more::after{content:" — in Dottpace, not on this page"}
  .pl-s.is-clamp{overflow:visible!important;max-height:none!important;-webkit-line-clamp:unset!important}

  /* ---- every fold open (Chrome and Safari draw a closed <details> through ::details-content; ui/lshell.js opens them where that isn't supported) ---- */
  /* P5v2: v110-motion.css fades a closed fold's content to opacity 0 — on paper it stayed invisible, so every opened fold printed as blank space */
  details::details-content{content-visibility:visible!important;display:block!important;opacity:1!important;translate:none!important;transition:none!important}
  details.pt-more > summary{display:none!important}
  details > summary{list-style:none}
  details > summary::-webkit-details-marker{display:none}
  details > summary::after{content:none!important}

  /* ---- colours that carry meaning stay: chips, verdicts, meters, dots, charts ---- */
  #scroll,#scroll *{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .panel,.pt-card,.db-card,.stg-card,.card,.sys-ss{box-shadow:none!important}

  /* ---- page breaks: never inside a card or a row; a heading stays with what follows ---- */
  /* a card stays whole; a panel that holds a table or a long list (a page's main column, a table) breaks between its rows instead */
  .pt-card,.db-card,.stg-card,.card,.sec.panel:not(:has(table,.db-list,.stg-rows)),.sys-ss,.hm-mf,.ap-facts,.apv-sum,.hx-clkb,.kp,.hl,.metric-card,figure,.em-meta,.sf-ctx,.hs-card,.kb-card{break-inside:avoid;page-break-inside:avoid}
  tr,li,.db-rr,.db-kr,.ap-facts > div,.stg-row,svg,img,canvas{break-inside:avoid;page-break-inside:avoid}
  /* P5v2: a long list panel (Actions › Approvals, a table-like card) and the emails preview break between their rows — kept whole, they jumped to
     the next sheet and left the first one blank (the H1 is kept with what follows) */
  .sec.panel.pt-card.sv-tbl,.em .em-view.sec.panel,.em .em-frame{break-inside:auto;page-break-inside:auto}
  h1,h2,h3,h4,.sec-hd,.pl-hd,.db-lh,.stg-head{break-after:avoid;page-break-after:avoid}
  thead{display:table-header-group}
  p,li{orphans:3;widows:3}

  /* ---- boards and grids fit the sheet ---- */
  /* Findings' board: four 272px lanes ran off the right edge — on paper the lanes sit two by two */
  .kb-board{grid-template-columns:repeat(2,minmax(0,1fr))!important;overflow:visible!important;min-width:0!important}
  .kb-col{break-inside:auto;page-break-inside:auto}
  /* Home's project cards: as compact as on a phone — no site drawing (it printed washed out) and the card's own detail fold stays closed */
  .hs-card > .hs-tw,.hs-card details.hs-det{display:none!important}
  .hs-grid{align-items:start!important}
}
