@media print {
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  body { background: #fff !important; color: #000 !important; font-family: Arial, sans-serif; font-size: 11pt; margin: 0; padding: 0; }

  /* Hide interactive / nav elements */
  header, nav, .filter-bar, .search-wrap, .leaflet-container,
  #logout-btn, .map-wrap, script { display: none !important; }

  /* Remove dark backgrounds */
  .site-card, .owner-card, .deed-grid, .flag, .info-block,
  .hero, .hero-stats, .grid-wrap, .site-grid { background: #fff !important; border-color: #ccc !important; }

  /* Status pills — keep color but use borders */
  .status-pill { border: 1px solid #999 !important; background: none !important; color: #000 !important; }

  /* Cards: single column in print */
  .site-grid { display: block !important; }
  .site-card { display: block; page-break-inside: avoid; border: 1px solid #ccc; margin-bottom: 16pt; padding: 10pt; }

  /* Ensure all collapsible sections are visible */
  .section-body, details { display: block !important; }
  details[open] summary::after, details summary::after { content: '' !important; }

  /* Hero */
  .hero-title { color: #000 !important; font-size: 18pt; }
  .hero-sub, .hero-stat-val, .hero-stat-lbl { color: #000 !important; }

  /* Links — show URL after anchor text */
  a[href]::after { content: ' (' attr(href) ')'; font-size: 8pt; color: #555; }
  a.site-card::after { content: none; }

  /* Page breaks */
  h2, h3 { page-break-after: avoid; }
  .owner-card, .flag { page-break-inside: avoid; }
}
