/* B1 - print.css. Linked with media="print", so it costs a screen reader nothing and a
   screen visitor nothing: the browser fetches it at low priority and it never applies to
   the rendered page.

   WHAT PRINTS. The Field Report header with its number and date, the main value, the signal
   rows, the verdict stamp, the disclaimer, and the evidence behind the folds. What a sheet
   of paper cannot use goes away: navigation, the footer's link farm, every button, the scan
   form, and the promotional cards.

   WRITTEN AFTER THE FOLDS, NOT BEFORE. A print sheet written before the page collapsed its
   sections would have been checked against a page that no longer exists - the rule is in
   CLAUDE.md and this file is the reason it is there. Every <details> is expanded here, both
   the old way (children of a closed fold) and the new one (::details-content, which is how
   current Chrome hides them).

   THE FOOTER IS THE BROWSER'S. CSS @page margin boxes - @bottom-left and friends - are not
   implemented in Chrome, so a "myipscan.net + date" footer written that way would print
   nothing and look correct in the source. The site name is printed from body::after, which
   does work; the date and page numbers come from the browser's own print footer, which is on
   by default. Claiming a CSS footer here would be claiming a feature the engine does not
   have. */

@page {
  size: auto;
  margin: 14mm 12mm 16mm;
}

html,
body {
  background: #fff !important;
  color: #000 !important;
}

body {
  font-size: 11pt;
  line-height: 1.4;
}

/* Ink, not paint. Fills that carry meaning on screen become invisible on a mono printer and
   waste toner on a colour one; the borders stay, because they are what separates a card from
   the next card once the fill is gone. */
*,
*::before,
*::after {
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

.per-route-card,
.per-module-card,
.per-limit-card,
.mips-result-card,
.per-estimate-v2-card,
.per-section,
.fr-stamp,
.per-status,
.per-route-status,
.mips-result-badge {
  background: #fff !important;
  color: #000 !important;
  border-color: #666 !important;
}

/* Gone: nothing here can be acted on from paper. */
.topnav,
.primary-nav,
.breadcrumbs,
.site-footer,
.btn,
.per-copy-actions,
.per-mode-form,
.per-mode-card,
.per-scan-progress,
.per-advanced-group,
.mips-result-actions,
.per-card-actions,
/* The whole guidance fold, not its cards. Hiding only .phase3-tool-card left the
   <summary> "About this check - what it checks, what it cannot" printing above 1853
   characters of body that was itself invisible: a heading over nothing, which is the
   defect this project already rolled back once on §"What this report can and cannot
   prove". Measured, not guessed - the fold was the one container on PER whose height did
   not exceed its own summary in print. */
.tool-fold,
.phase3-tool-card,
.per-hero-receipt,
[data-copy-fallback],
[data-route-retry],
[data-scan-panel] form {
  display: none !important;
}

/* Kept, and said out loud so a later hand does not sweep them into the list above: these
   four are the report. */
.fr-head,
.fr-stamp,
.fr-note,
[data-fr-number],
[data-fr-date],
[data-fr-value],
[data-fr-summary] {
  display: revert !important;
}

/* Every fold open. The first rule covers the children of a closed <details>; the second is
   how current Chrome hides that content, and without it the first one prints an empty
   summary line and nothing else. */
details > *:not(summary) {
  display: block !important;
}

details::details-content {
  content-visibility: visible !important;
  block-size: auto !important;
}

summary {
  list-style: none;
  font-weight: 500;
}

/* Evidence is JSON and it has to be readable on paper, where nothing scrolls: the one place
   the screen's horizontal scroll has to become a wrap. */
.mips-evidence-pre {
  white-space: pre-wrap !important;
  overflow: visible !important;
  font-size: 8pt;
  border-color: #999 !important;
}

/* A card split across a page break loses the pairing between its pill and its label, which
   is the whole content of a signal row. */
.per-route-card,
.per-module-card,
.per-limit-card,
.mips-result-card,
.mips-technical-detail,
.per-estimate-v2-card,
.fr-head {
  break-inside: avoid;
  page-break-inside: avoid;
}

h1,
h2,
h3 {
  break-after: avoid;
  page-break-after: avoid;
}

/* A link on paper is a dead end unless the address comes with it. Internal links get the
   site prefix so a printed page can be typed back in. */
a[href^="http"]::after {
  content: " (" attr(href) ")";
  font-size: 9pt;
  word-break: break-all;
}

a[href^="/"]::after {
  content: " (myipscan.net" attr(href) ")";
  font-size: 9pt;
  word-break: break-all;
}

a {
  color: #000 !important;
  text-decoration: underline;
}

body::after {
  content: "myipscan.net";
  display: block;
  margin-top: 8mm;
  padding-top: 3mm;
  border-top: 1px solid #999;
  font-size: 9pt;
}
