/* The printable one-page report (static/js/printReport.js).
 *
 * The block is built into <body> only while printing and hidden on screen, so
 * the browser's own "Save as PDF" is the whole PDF pipeline — no library, no
 * build step. Ink-cheap on purpose: rules and type carry the layout, no filled
 * panels, so it prints the same with background graphics off.
 */

.print-report {
  display: none;
}

@media print {
  @page {
    margin: 12mm;
  }

  /* Only the report prints. Everything else on the page — nav, workspace,
     footer, consent banner — is a direct child of <body>. */
  body.printing-report > *:not(.print-report) {
    display: none !important;
  }

  body.printing-report {
    margin: 0;
    background: #fff;
  }

  .print-report {
    display: block;
    color: #000;
    background: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 9pt;
    line-height: 1.35;
  }

  .print-report h1 {
    font-size: 15pt;
    margin: 1pt 0 2pt;
  }

  .print-report h2 {
    font-size: 9.5pt;
    margin: 0 0 2pt;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .print-report p,
  .print-report ul,
  .print-report ol {
    margin: 0 0 4pt;
  }

  .print-report li {
    margin-bottom: 2pt;
  }

  .print-report-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8mm;
    border-bottom: 1pt solid #000;
    padding-bottom: 3pt;
    margin-bottom: 5pt;
  }

  .print-brand {
    font-weight: 700;
    letter-spacing: 0.1em;
    font-size: 8pt;
  }

  .print-meta {
    font-size: 8.5pt;
  }

  .print-confidence {
    text-align: right;
    max-width: 62mm;
    font-size: 8pt;
  }

  .print-confidence strong {
    display: block;
    font-size: 10pt;
  }

  /* Frame still on the left, the headline numbers beside it. */
  .print-report-body {
    display: flex;
    gap: 6mm;
    align-items: flex-start;
    margin-bottom: 5pt;
  }

  .print-figure {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
  }

  .print-figure img {
    display: block;
    max-width: 100%;
    /* Bounded so a tall portrait clip cannot push the rest onto a second
       sheet; the aspect ratio is preserved either way. */
    max-height: 72mm;
    object-fit: contain;
    border: 0.5pt solid #666;
  }

  .print-measurements {
    flex: 0 0 62mm;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3pt;
  }

  .print-measurement {
    border: 0.5pt solid #999;
    padding: 3pt 4pt;
  }

  .print-measurement strong {
    display: block;
    font-size: 12pt;
    line-height: 1.1;
  }

  .print-measurement span {
    font-size: 7.5pt;
  }

  .print-adjustments ol {
    padding-left: 12pt;
  }

  .print-adjustments strong {
    display: block;
  }

  .print-findings {
    display: flex;
    gap: 6mm;
    margin-bottom: 5pt;
  }

  .print-findings > div {
    flex: 1 1 0;
  }

  .print-findings ul {
    padding-left: 12pt;
  }

  .print-angles table {
    width: 100%;
    border-collapse: collapse;
    font-size: 8pt;
  }

  .print-angles th,
  .print-angles td {
    border-bottom: 0.5pt solid #bbb;
    padding: 1.5pt 3pt;
    text-align: left;
  }

  .print-angles th {
    border-bottom: 0.75pt solid #000;
  }

  .print-angles td + td,
  .print-angles th + th {
    text-align: right;
    width: 22mm;
  }

  .print-note {
    font-size: 7.5pt;
    font-style: italic;
    margin-top: 4pt;
  }

  .print-footer {
    font-size: 7.5pt;
    border-top: 0.5pt solid #000;
    padding-top: 3pt;
    text-align: right;
  }

  /* Nothing in the report should be split across sheets. */
  .print-report section,
  .print-report figure,
  .print-report li,
  .print-report tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
