/* ==========================================================================
   Print / PDF for articles (inc/print.php)
   The printout opens with the article's social card and web address, then
   the article alone.
   ========================================================================== */

.sk-print-header {
    display: none;
}

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

    html,
    body {
        background: #fff !important;
    }

    /* The site alone: the admin editor, its floating buttons and anything a
       browser extension adds stay off paper. Anything wider than the page
       makes Chrome shrink the printout, and on Arabic pages it then crops
       the left side */
    html > :not(head):not(body),
    body > :not(.sk-site) {
        display: none !important;
    }

    html,
    body,
    .sk-site {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    .sk-single {
        overflow-wrap: anywhere;
    }

    .sk-single img,
    .sk-single table,
    .sk-single iframe,
    .sk-single video,
    .sk-single pre {
        max-width: 100% !important;
    }

    .sk-single pre {
        white-space: pre-wrap !important;
    }

    /* Everything that isn't the article itself */
    .sk-header,
    .sk-footer,
    .sk-sidebar-saved-btn,
    .sk-subnav,
    .sk-post-context,
    .sk-post-hero__meta,
    .sk-post-content__rail,
    .sk-post-taxonomy,
    .sk-sidebar-share,
    .sk-related,
    .sk-line,
    .sk-line-v,
    .sk-research-modal,
    .sk-research-feedback,
    .pdfjs-fullscreen,
    #wpadminbar {
        display: none !important;
    }

    .sk-site,
    .sk-main,
    .sk-single {
        margin: 0 !important;
        padding: 0 !important;
        width: auto !important;
        max-width: none !important;
    }

    .sk-single,
    .sk-single * {
        color: #000 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    /* A small letterhead: the card centred, the address on its own line
       below, a rule under both */
    .sk-print-header {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        gap: 2.5mm;
        margin: 0 0 7mm;
        padding: 0 0 5mm;
        border-bottom: 0.75pt solid #242424;
        break-inside: avoid;
    }

    .sk-print-header__frame {
        width: 38%;
        border: 0.75pt solid #242424;
        line-height: 0;
    }

    .sk-print-header__card {
        display: block;
        width: 100%;
        height: auto;
    }

    .sk-print-header__url {
        width: 100%;
        margin: 0;
        font-family: var(--sk-font-mono, monospace);
        font-size: 7pt;
        line-height: 1.4;
        text-align: center;
        color: #555 !important;
        word-break: break-all;
    }

    /* Title block (original-language title, deck, feature image) */
    .sk-post-hero {
        display: block !important;
        border: 0 !important;
        padding: 0 !important;
        margin: 0 0 6mm !important;
        min-height: 0 !important;
    }

    .sk-post-hero__title {
        padding: 0 !important;
        border: 0 !important;
    }

    .sk-post-hero__h1 {
        font-size: 20pt !important;
        line-height: 1.25 !important;
        margin: 0 0 3mm !important;
    }

    .sk-post-hero__h1-original,
    .sk-post-hero__deck {
        font-size: 13pt !important;
        line-height: 1.4 !important;
        margin: 0 0 3mm !important;
    }

    .sk-post-hero__feature {
        margin: 4mm 0 0 !important;
        break-inside: avoid;
    }

    /* The text, full width (without the rail's divider line) */
    .sk-post-content {
        display: block !important;
        padding: 0 !important;
        border: 0 !important;
    }

    .sk-post-content::before,
    .sk-post-content::after {
        display: none !important;
    }

    .sk-post-content__body {
        max-width: none !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .sk-post-content__body,
    .sk-post-content__body p,
    .sk-post-content__body li,
    .sk-post-content__body td,
    .sk-post-content__body blockquote {
        font-size: 11.5pt !important;
        line-height: 1.6 !important;
    }

    .sk-post-content__body h2,
    .sk-post-content__body h3,
    .sk-post-content__body h4 {
        break-after: avoid;
    }

    .sk-post-content__body p {
        orphans: 3;
        widows: 3;
    }

    .sk-post-content__body img,
    .sk-post-content__body figure,
    .sk-post-content__body blockquote {
        max-width: 100% !important;
        height: auto;
        break-inside: avoid;
    }

    .sk-single a {
        text-decoration: none !important;
    }
}
