/* print.css */
@media print {
    /* General text and background */
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
    }

    /* Links */
    a {
        color: black !important;
        text-decoration: underline;
    }
    a::after {
        content: " (" attr(href) ")";
        font-size: 0.9em;
    }

    /* Tables */
    table {
        width: 100% !important;
        border-collapse: collapse !important;
        margin: auto
        page-break-inside: auto;
    }
    th, td {
        border: 1px solid black !important;
        padding: 4px;
        background: none !important;
    }
    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
    thead {
        display: table-header-group; /* repeat header on each page */
    }

    @media print {
      .noprint { 
        display: none
      }
      .onlyprint {
        color: #000 !important;
        display: block !important;
        padding-left: 10px; /* or whatever you want */
      }
    }
    /* Hide print-only content on screen */
    @media screen {
      .onlyprint {
        display: none !important;
      }
    }
    
    /* Hide elements not needed for print */
    .noprint, nav, .sidebar, .ad {
        display: none !important;
    }

    /* Optional: prevent links from wrapping awkwardly */
    a, span {
        color: #000;
        word-break: break-word;
    }
}

