.resource-print-page {
    background: var(--bs-tertiary-bg);
}

.resource-print-container {
    max-width: 58rem;
}

.resource-print-sheet {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 1rem;
}

.resource-print-content {
    overflow-wrap: anywhere;
    line-height: 1.65;
}

.resource-print-content img {
    max-width: 100%;
    height: auto;
}

.resource-print-image {
    display: block;
    width: 100%;
    max-height: 18rem;
    object-fit: contain;
}

.resource-print-content table {
    width: 100%;
    table-layout: fixed;
}

.resource-print-content pre {
    white-space: pre-wrap;
}

@media print {
    @page { margin: 15mm; }

    .resource-print-tools {
        display: none !important;
    }

    .resource-print-page,
    .resource-print-sheet {
        --bs-body-color: #000;
        --bs-body-bg: #fff;
        --bs-emphasis-color: #000;
        --bs-secondary-color: #444;
        --bs-link-color: #000;
        --bs-link-hover-color: #000;
        color-scheme: light;
        background: #fff;
        color: #000;
    }

    .resource-print-container,
    .resource-print-sheet {
        max-width: none;
        width: 100%;
        margin: 0;
        padding: 0 !important;
        border: 0;
        border-radius: 0;
    }

    .resource-print-content {
        font-size: 11pt;
        line-height: 1.45;
    }

    .resource-print-image {
        max-height: 50mm;
    }

    .resource-print-content :is(h1, h2, h3, h4, h5, h6) {
        break-after: avoid;
    }

    .resource-print-content :is(img, tr) {
        break-inside: avoid;
    }

    .resource-print-content :is(p, li) {
        orphans: 3;
        widows: 3;
    }

    .resource-print-content a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.9em;
    }

    .resource-print-content a {
        color: #000;
    }
}
