/* Print layout: "Download scorecard (PDF)" opens the print dialog; choose "Save as PDF". */
/* Farmer information block: hidden on screen, printed only in farmer mode */
.print-only { display: none; }
@media print {
  body.srg-farmer-on .print-only { display: block; break-before: page; font-size: 10.5pt; line-height: 1.45; color: #111; }
  .print-only h2 { font-size: 16pt; color: #173f34; margin: 0 0 6px; }
  .print-only h3 { font-size: 12pt; color: #173f34; margin: 12px 0 4px; break-after: avoid; }
  .print-only ul { margin: 0 0 4px 18px; padding: 0; }
  .print-only li { margin: 0 0 3px; }
  .print-only .pi-note { font-size: 9.5pt; color: #444; }
}
@media print {
  @page { size: A4; margin: 14mm; }
  body * { visibility: hidden !important; }
  #calcResultsPanel, #calcResultsPanel * { visibility: visible !important; }
  #calcResultsPanel {
    position: absolute !important; left: 0; top: 0; width: 100% !important;
    box-shadow: none !important; border: none !important; background: #fff !important;
  }
  .no-print { display: none !important; }
  #calcResultsPanel .scorecard { break-inside: avoid; }
  #calcResultsPanel table tr { break-inside: avoid; }
}

/* Stop blank trailing pages: size the printed panel to its content only */
@media print {
  html, body { height: auto !important; min-height: 0 !important; overflow: visible !important; }
  #calcResultsPanel { height: auto !important; min-height: 0 !important; max-height: none !important; overflow: visible !important; margin: 0 !important; padding: 0 !important; }
  #calcResultsPanel .print-only { margin-bottom: 0 !important; }
}

/* Remove other page sections from print flow (visibility:hidden still takes up space) */
@media print {
  header, footer, nav, .site-header, .topbar, .ticker, .scroll-top, .footer-cta, #siteFooter, #siteHeader,
  section:not(:has(#calcResultsPanel)), .notice-band, .faq-layout, .cta-band { display: none !important; }
  section:has(#calcResultsPanel) { padding: 0 !important; margin: 0 !important; }
  .wrap:has(#calcResultsPanel) { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .tool-shell { display: block !important; }
}
