/* ══════════════════════════════════════════════════════════════════════════
   print.css — the dashboard is the closing move; it must print as a clean
   one-piece record on white, with no chrome and no colour dependence.
   ══════════════════════════════════════════════════════════════════════════ */

@media print {
  @page {
    size: A4;
    margin: 14mm 12mm;
  }

  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #f6f5f1;
    --surface-3: #edece6;
    --line: #cfcbbf;
    --line-2: #b4b0a3;
    --ink: #14130f;
    --ink-2: #3d3a33;
    --ink-3: #5c584f;
    --sh-1: none;
    --sh-2: none;
    --sh-3: none;
  }

  html,
  body {
    block-size: auto;
    overflow: visible;
    background: #fff;
    font-size: 10.5pt;
  }

  .app {
    display: block;
    block-size: auto;
  }

  /* Chrome that means nothing on paper. */
  .topbar,
  .composer-wrap,
  .replay-bar,
  .dash-actions,
  .skip-link,
  .viewnav,
  .gate-options {
    display: none !important;
  }

  /* Print whichever view is on screen, at full height. */
  .view { display: none !important; }
  .view[data-active="true"] { display: block !important; block-size: auto; }

  .scroll,
  .dash-scroll,
  .transcript {
    overflow: visible !important;
    block-size: auto !important;
    /* @page supplies the real margin; this only keeps a heading's descender
       and the card borders off the trim edge. */
    padding-block: 0 !important;
    padding-inline: 2mm !important;
  }

  .dash,
  .thread {
    max-inline-size: none;
    gap: 10mm;
  }

  /* Never split a card, a table row, or a role group across pages. */
  .card,
  .tile,
  .rolecard,
  .gatecard,
  .toolrow,
  .report,
  .finding-callout,
  tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .report-section { break-inside: auto; }

  .dash-head,
  .section-title {
    break-after: avoid;
    page-break-after: avoid;
  }

  /* Borders survive; background fills often do not. Keep the ones that
     carry meaning and force them to render. */
  .tile,
  .rolecard,
  .gatecard,
  .toolrow,
  .report,
  .table-wrap {
    border: 1px solid var(--line) !important;
    box-shadow: none !important;
  }

  .finding-callout,
  tr.unverified td,
  .pill,
  .scorebar-fill,
  .dist-fill,
  .rolecard {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* The unverified finding must survive a black-and-white printer. */
  tr.unverified td:first-child { box-shadow: inset -3px 0 0 0 #000 !important; }

  tr.unverified td::after { content: ''; }

  thead th { position: static; }

  /* Animations have no meaning on paper — show the final state. */
  .scorebar-fill,
  .dist-fill,
  .rise,
  .fade,
  .step {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }

  a[href]::after { content: ''; }
}
