/* Octralis AI Workforce — print stylesheet
   Load after tokens.css. One file for the whole product: the dashboard is not the
   only thing printed, a person's record goes into an appraisal file too.

   Proved in handover/Print Proof.dc.html. Six semantic marks survive greyscale
   because fill, texture and edge carry the meaning. The header does not survive
   and is dropped: two tenant colours can print as the same grey.               */

@media print {

  /* 01 · Print the hatch, not a grey box ---------------------------------- *
   * Browsers drop background fills and images by default to save ink, which  *
   * would take the gap state with it. The 45° hatch is the one mark that     *
   * cannot be allowed to disappear.                                          */
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* 02 · Drop the tenant colour entirely ---------------------------------- *
   * #0B2C5A prints as 24% grey and #006B3C as 34%: two different brands, one *
   * indistinguishable grey. Nothing on paper may depend on the header, so the *
   * organisation's name prints as text — which is what a board pack needs     *
   * anyway, because a page has to say which organisation it describes.        */
  .app-header {
    background: none !important;
    color: #000 !important;
    border-bottom: 1px solid #000;
    padding: 0 0 8pt;
  }
  .app-header .logo-plate { border: 1px solid #000; }
  .app-header a { color: #000 !important; }

  /* 03 · Never break a row across pages ---------------------------------- *
   * A competency row split over a page break separates the label from its    *
   * track, which is the one pairing the component depends on.                */
  .comp-row, .matrix-row, .ranked-row, .lesson-row { break-inside: avoid; }
  h1, h2, h3 { break-after: avoid; }
  thead { display: table-header-group; }
  tfoot { display: table-footer-group; }

  /* 04 · Print what the screen only implies ------------------------------ *
   * A link is a colour on screen and nothing on paper. The stamp says what   *
   * the page describes and when it was produced — a board pack read three     *
   * weeks later must not be mistaken for current.                            */
  a[href^="http"]::after,
  a[href^="/"]::after {
    content: " (" attr(href) ")";
    font: 500 9pt/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  }
  .print-stamp { display: block !important; font-size: 9pt; color: #000; }

  /* 05 · Drop the interface, keep the record ----------------------------- *
   * Navigation, controls and tabs cost paper and say nothing. The legend is   *
   * the opposite: on paper it is the only place the glyphs are explained, so  *
   * it is forced visible even where the screen collapses it.                  */
  nav, .btn, .tabs, .thumb-rail, .skip-link, .tweaks { display: none !important; }
  .legend { display: block !important; }

  /* Text and page geometry ----------------------------------------------- *
   * 10pt floor: below that a board pack is unreadable under office lighting. */
  body {
    background: #fff;
    color: #000;
    font-size: 10.5pt;
    line-height: 1.45;
  }
  .card, .surface {
    background: #fff;
    border: 1px solid #000;
    box-shadow: none;
  }

  @page {
    size: A4 landscape;   /* the matrix is five departments wide */
    margin: 14mm;
  }
  @page :first { margin-top: 18mm; }
}
