/* PDF defaults to A4 - change to letter portrait and set margins */
@page {
    size: letter portrait !important;
    margin: 0.75in 0.7in 0.75in 0.7in !important;
}

/* PDF needs table styles to fit within margins */
@media print {
    table {
        table-layout: fixed !important;
        width: 100% !important;
        border-collapse: collapse !important;
        font-size: 5pt !important;
        line-height: 1.1 !important;
    }

    th, td {
        padding: 1px 2px !important;
        font-size: 5pt !important;
    }
}

/* Both HTML and PDF - add white background to diagram images for better visibility on dark themes */
img[src*="images/diagrams/"] {
    background-color: white;
    padding: 10px;
    border-radius: 4px;
}
