/* ============================================================================
   The fridge document. Loaded with media="print" so it never blocks render and
   never counts against the render-critical path. Target: one A4 or Letter page.
   Two pages is a failure of editing, not of the stylesheet.
   See research/page-format.md, Deliverable Four.
   ========================================================================= */

@page { margin: 12mm; }

@media print {
  html { font-size: 11pt }
  body { line-height: 1.35; color: #000; background: #fff }

  /* Removed. None of this survives a printer and all of it costs a page. */
  nav, footer, .site-header, .breadcrumb, .chips, .related, .progression,
  .follow, .product, .print-button, .skip-link, .search, .toc, .toast,
  [aria-label="Follow"] { display: none !important }

  /* Kept in full. */
  h1 { font-size: 18pt; margin: 0 0 2mm }
  h2, .body-h2 { font-size: 12pt; margin: 4mm 0 1.5mm;
                 page-break-after: avoid; break-after: avoid }
  h3, .body-h3 { font-size: 11pt; font-weight: 600;
                 page-break-after: avoid; break-after: avoid }
  .one-line { font-size: 11pt; margin: 0 0 3mm }

  .glance { border: 1pt solid #000; padding: 3mm; margin: 0 0 4mm; display: block;
            columns: 2; column-gap: 6mm; break-inside: avoid; border-radius: 0 }
  .glance > div { padding: 0 0 1.5mm; background: none; break-inside: avoid }
  .glance dt { font-size: 7pt }
  .glance dd { font-size: 9pt; margin: 0 }

  .materials, .setup > li, .say, .working li, .problems > div, .safety {
            break-inside: avoid; page-break-inside: avoid }
  .safety { border: 1pt solid #000; padding: 2.5mm; border-radius: 0; background: none }

  /* Demoted to a compact list. Present, but not at full length. */
  .expect .body, .ladder .rung .body, .ladder dl { display: none }
  .expect .ageblock h3, .ladder .rung h3 { display: inline; font-size: 10pt }
  .expect .ageblock h3::after, .ladder .rung h3::after { content: " / " }
  .expect .ageblock, .ladder .rung { border: 0; margin: 0; padding: 0; display: inline }

  /* Dropped entirely. A parent printing this has already read them. */
  .faq, .why, .not, .evidence-note, .finding { display: none }

  /* Images. Hero only, and only if it earns its space. */
  img { max-width: 100%; break-inside: avoid }
  .hero-box { max-height: 55mm; width: auto; aspect-ratio: 3/2 }
  .setup .shot { display: none }
  .setup[data-print-images="true"] .shot { display: block; max-height: 30mm }

  /* Link URLs. Only the canonical one. Thirty inline URLs destroys the page. */
  a[href]::after { content: none }
  .print-footer { display: block; font-size: 8pt; border-top: 0.5pt solid #000;
                  padding-top: 2mm; margin-top: 4mm; color: #000 }

  p, li { orphans: 3; widows: 3 }
  * { position: static !important; box-shadow: none !important;
      -webkit-print-color-adjust: exact; print-color-adjust: exact }
}
