@media print {
    /* Remove backgrounds & shadows */
    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }

    @page {
        size: A4;
        margin: 15mm 15mm 20mm;
    }

    body {
        font-size: 9pt;
        line-height: 1.35;
        background: #fff !important;
        color: #000 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Hide UI elements */
    header,
    .navbar,
    .breadcrumb-container,
    footer,
    .btn,
    #cms-top {
        display: none !important;
    }

    /* Links: show URLs */
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 90%;
    }

    .job-view .section {
        padding: 10px !important;
    }

    /* Base rules for ALL headings */
    h1, h2, h3, h4, h5,
    .h1, .h2, .h3, .h4, .h5 {
        color: #000 !important;
        font-weight: 600;
        page-break-after: avoid;
        break-after: avoid;
        page-break-inside: avoid;
        break-inside: avoid;
        orphans: 3;
        widows: 3;
    }

    h1, .h1 {
        font-size: 20pt;
        line-height: 1.2;
        margin: 0 0 6mm 0;
    }

    h2, .h2 {
        font-size: 15pt;
        line-height: 1.25;
        margin: 8mm 0 4mm;
    }

    h3, .h3 {
        font-size: 12pt;
        line-height: 1.3;
        margin: 6mm 0 3mm;
    }

    h4, .h4 {
        font-size: 11pt;
        line-height: 1.35;
        margin: 5mm 0 2mm;
        font-weight: 500;
    }

    h5, .h5 {
        font-size: 10pt;
        line-height: 1.4;
        margin: 4mm 0 2mm;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    /* Prevent margin-collapse edge cases */
    h1, h2, h3, h4, h5 {
        padding-top: 0.01mm;
    }

    p, ul li, td {
        font-size: 9pt;
        line-height: 1.35;
    }

    ul li {
        margin-bottom: 0.5mm;
    }
}