/* ============================================================
   Print sheet for evidence-full.html, the source the downloadable
   evidence PDF is rendered from:

     msedge --headless=new --no-pdf-header-footer
            --print-to-pdf=ebamed-clinical-evidence.pdf
            file:///.../evidence-full.html

   On screen the site alternates black console bays with white
   sheets. Paper does not want that: a console bay prints as a
   solid black slab. Every component reads --hd / --fg / --rule /
   --accent, so re-pointing those four variables re-themes the
   whole console to ink on white without touching one component.

   Nothing here is loaded on screen: the stylesheet is linked
   media="print" and the whole file is wrapped in @media print.
   ============================================================ */

@media print {

  @page { size: A4; margin: 16mm 15mm 18mm; }

  /* ---- chrome that carries no meaning on paper ---- */
  .topbar, .progress, .skip, .actions { display: none !important; }
  /* the hero's two route tiles are navigation into the page, not content */
  .hero .tracks { display: none !important; }
  /* keep the address column, drop the site map and the contact links */
  .footer .cols > *:nth-child(n+2) { display: none !important; }

  /* ---- ink on white, everywhere ---- */
  html, body { background: #fff !important; color: #333 !important; }
  .console, .console.lift, .hero, .hero.deck {
    --hd: #000;
    --fg: #333;
    --rule: #bbb;
    --accent: #24467e;
    background: #fff !important;
    color: #333 !important;
  }
  .sheet, .sheet.lift, .tile { background: #fff !important; }
  /* the hero lede is --mist, a grey chosen to sit on black. On white it
     all but disappears, so it takes the body ink like everything else. */
  .hero .lede, .hero p { color: #333 !important; }
  /* fills that are the meaning, not decoration: the lane pill says which
     body of evidence a section belongs to, the tinted row says EBAMed */
  .lane, .trail > li.ours, .band.mine {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* ---- one column: a rail beside a flow does not fit A4 ---- */
  .split { display: block !important; }
  .rail { position: static !important; margin-bottom: 1.1rem; }
  .wrap { width: 100% !important; max-width: none; }
  .bay { padding: 1.2rem 0 !important; }
  .bay.thin { padding-block: 0.9rem !important; }
  .hero { padding: 0 0 1rem !important; min-height: 0 !important; }
  .hero::before { display: none !important; }

  /* ---- nothing moves on paper ---- */
  .rise { animation: none !important; opacity: 1 !important; translate: none !important; }

  /* ---- keep entries whole across page breaks ---- */
  .trail > li, .tile, .who, figure, .band { break-inside: avoid; }
  h1, h2, h3, .idx { break-after: avoid; }

  /* ---- a reference list is only useful on paper if it carries the URLs ---- */
  a { color: inherit; text-decoration: none; }
  .trail .src a::after, .links a::after {
    content: " " attr(href);
    font-size: 0.8em;
    word-break: break-all;
    color: #666;
  }
  /* the ↗ marks an outbound link on screen; next to a printed URL it is noise */
  .trail .src, .links { font-variant-ligatures: none; }
}
