@media print {
  body::before {
    content: "TrafficTorch.net ⚖️\A\A Semantic Entity Audit Tool 🎯\A\A Report:\A " attr(data-url);
    display: block;
    height: 100vh;
    min-height: 100vh;
    page-break-after: always;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #4b5563;
    font-family: system-ui, -apple-system, sans-serif;
    font-weight: 900;
    text-align: center;
    padding-top: 20vh;
    line-height: 1.4;
    white-space: pre;
    font-size: 2rem;
    text-shadow:
      -2px -2px 0 #fb923c,
      2px -2px 0 #fb923c,
      -2px 2px 0 #fb923c,
      2px 2px 0 #fb923c,
      -2px 0 0 #fb923c,
      2px 0 0 #fb923c,
      0 -2px 0 #fb923c,
      0 2px 0 #fb923c,
      0 10px 30px rgba(0,0,0,0.5);
  }

  /* Force full-width content and clean page start */
  #results-wrapper {
    page-break-before: always;
    margin-top: 0 !important;
  }

  #results-wrapper,
  #results-wrapper .container,
  #results-wrapper .max-w-*,
  #results-wrapper .mx-auto {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 1cm 1.2cm !important;
    box-sizing: border-box;
  }

  /* Prevent page breaks inside important blocks */
  .score-card,
  .fixes-panel,
  .full-details,
  section > div,
  .grid,
  .flex,
  .details-panel,
  .fixes-panel {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  /* Better text flow control */
  p, li, div {
    orphans: 3;
    widows: 3;
  }

  /* General print cleanup */
  body {
    background: white !important;
    color: black !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 11pt;
  }

  /* Remove shadows and decorative elements */
  [class*="shadow"] {
    box-shadow: none !important;
  }

  /* ──────────────────────────────────────────────────────────────
     TARGETED HIDING – promotional / non-report elements
  ─────────────────────────────────────────────────────────────── */
  /* How It Works accordion */
  .max-w-4xl.mx-auto.my-16 details.group,
  /* Why Semantic Entity Optimization Matters accordion */
  .max-w-4xl.mx-auto.my-16 details.group:nth-of-type(2),
  /* Semantic Entity Checklist */
  #seo-ux-checklist,
  /* Comparison table, high-impact moves, author bio, etc. */
  #promo-high-impact-cards,
  #promo-old-vs-modern-seo,
  #author-bio,
  .tools-grid,
  .bottom-banner,
  .max-w-7xl.mx-auto,
  /* Share / Feedback / Upgrade modals and buttons */
  #share-form-container,
  #feedback-form-container,
  #share-message,
  #feedback-message,
  #share-report-btn,
  #feedback-btn,
  #upgradeModal,
  .a2a_kit,
  [class*="a2a_"],
  button,
  details > summary,
  header,
  footer,
  nav,
  aside,
  .no-print {
    display: none !important;
  }

  /* ──────────────────────────────────────────────────────────────
     FORCE EXPAND “More Details” and “Show Fixes” panels
  ─────────────────────────────────────────────────────────────── */
  /* Target the exact panels generated by your JS */
  .details-panel,
  .fixes-panel,
  .details-panel.expanded,
  .fixes-panel.expanded,
  [class*="details-panel"],
  [class*="fixes-panel"],
  .mt-3.pt-3.border-t,
  .mt-5.pt-5.border-t,
  .hidden.mt-3,
  .hidden.mt-5,
  .mt-3.pt-3,
  .mt-5.pt-5 {
    display: block !important;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* Ensure toggle buttons are hidden but content stays visible */
  .details-toggle,
  .fixes-toggle,
  button.details-toggle,
  button.fixes-toggle {
    display: none !important;
  }

  /* Force any JS-hidden classes to show in print */
  .hidden,
  [class*="hidden"] {
    display: block !important;
  }

  /* Extra safety for common hiding patterns in your HTML */
  .hidden.space-y-4,
  .hidden.space-y-6,
  .hidden.space-y-8,
  .mt-4.hidden,
  .mt-6.hidden,
  .mt-8.hidden {
    display: block !important;
  }
}