/* Print, or the browser's Save as PDF (17 Oct, parity row R4). The page prints as a plain report: no app frame, no
   buttons or forms, every Show the math panel open (print.js opens them for the print and closes them after), and
   tables wrapping to the page instead of scrolling. Shading and flags keep their colours. */
@media print {
  @page { margin: 14mm 12mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  html, body { height: auto; background: #FFFFFF !important; color: #14161B; font-size: 11pt; }
  .side, .tabbar, .mhead, .pbar, .skip, .toast, #live, .noprint, form.ask, .tform, .head-ic, button.btn, a.btn,
  .brandmenu, form[action^="/check/join"] { display: none !important; }
  .shell { display: block; height: auto; background: none; }
  .pwrap, .pscroll { height: auto !important; overflow: visible !important; padding: 0 !important; box-shadow: none !important; border-radius: 0; background: none; }
  main.work, .onb { padding: 0 !important; max-width: none; display: block; min-height: 0; }
  main.work > *, .onb-card > * { margin-bottom: 12px; }
  .onb-card, .onb-card.wide { width: 100%; display: block; }
  .print-only { display: block; margin: 0 0 8px; }
  .panel, .kpis, dl.basis { border-color: #C9CDD4; box-shadow: none; break-inside: auto; }
  .kpis, dl.basis, .hero, .note-off, .settle { break-inside: avoid; }
  tr, .howto li { break-inside: avoid; }
  thead { display: table-header-group; }
  details > summary { list-style: none; }
  details > summary::-webkit-details-marker { display: none; }
  .tscroll { overflow: visible !important; contain: none !important; }
  .tbl.dense td, .tbl.dense thead th { white-space: normal; }
  .tbl.dense tbody th { min-width: 0; }
  .tbl { font-size: 9pt; }
  a { color: inherit; text-decoration: none; }
  .chip { border-color: #9AA0AA; }

  /* Briefs, in the app and from a share link (folded in from print-briefs.css, 17 Oct): only the brief itself, black on
     white whatever the theme, one column, the beat table kept whole where it fits. Scoped to pages with a brief on
     them, so the Angles report prints as before. */
  :root:has(article.brief), :root[data-theme="dark"]:has(article.brief) { --bg: #fff; --surface: #fff; --ink: #111;
    --muted: #444; --line: #ccc; --tile: #eee; color-scheme: light; }
  body:has(article.brief) { color: #111 !important; }
  body:has(article.brief) .head, .no-print, .brief-bar, .brief-tools, .shared .chip { display: none !important; }
  .brief, .shared .brief { border: 0 !important; padding: 0 !important; box-shadow: none !important; background: #fff !important; gap: 8px; }
  .brief h3, .brief .h3 { margin-top: 10px; break-after: avoid; page-break-after: avoid; }
  .brief p, .brief li { orphans: 3; widows: 3; }
  .brief .tbl { break-inside: auto; }
  .brief .tbl th, .brief .tbl td { border-bottom: 1px solid #bbb; }
  .insp li { grid-template-columns: 56px minmax(0, 1fr) !important; break-inside: avoid; }
  .insp img, .insp-noimg { width: 56px; height: 70px; }
  .brief a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 10px; color: #444; word-break: break-all; }
}
