/**
 * Print.
 *
 * The Print button on a recipe was calling window.print() against the screen
 * stylesheet, so it produced the whole page — masthead, related cards, review
 * form, footer — across five or six sheets, with the method broken over a page
 * break somewhere in the middle.
 *
 * A printed recipe is a working document. It needs the title, the timings, the
 * ingredients and the method, on as few sheets as possible, in ink you can read
 * next to a hob. Everything else goes.
 */

@media print {

    /* Backgrounds and reversed text cost ink and print grey. */
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    html,
    body {
        margin: 0;
        padding: 0;
        font-size: 11.5pt;
        line-height: 1.45;
        background: #fff !important;
    }

    @page {
        margin: 16mm 14mm;
    }

    /* ------------------------------------------------------------- removed */

    .fmr-header,
    .fmr-footer,
    .fmr-drawer,
    .fmr-headsearch,
    .fmr-actions,
    .fmr-scaler__reset,
    .fmr-progress,
    .fmr-reviews,
    .fmr-reviewform,
    .fmr-linksets,
    .fmr-section--tint,
    .fmr-tags,
    .fmr-ad,
    .fmr-breadcrumb,
    .skip-to-content,
    #comments,
    .fmr-rhero__eyebrow,
    iframe,
    video,
    noscript {
        display: none !important;
    }

    /* ---------------------------------------------------------------- head */

    .fmr-rhero {
        display: block;
    }

    .fmr-rhero h1 {
        font-size: 20pt;
        line-height: 1.15;
        margin: 0 0 6pt;
    }

    .fmr-rhero__lede {
        font-size: 10.5pt;
        margin: 0 0 8pt;
        max-width: none;
    }

    /* One small photo is worth the ink — it tells you what you are aiming at.
       Anything larger pushes the method onto a second sheet. */
    .fmr-rhero__media {
        float: right;
        width: 52mm;
        margin: 0 0 6pt 8pt;
    }

    .fmr-rhero__media img {
        width: 100%;
        height: auto;
        border: 0.5pt solid #999;
    }

    .fmr-rfacts {
        display: flex;
        flex-wrap: wrap;
        gap: 10pt;
        padding: 6pt 0;
        margin: 0 0 10pt;
        border-block: 1pt solid #000;
    }

    .fmr-rfact__n {
        font-size: 11pt;
        font-weight: 700;
    }

    .fmr-rfact__l {
        font-size: 8pt;
        text-transform: uppercase;
        letter-spacing: .06em;
    }

    /* ---------------------------------------------------------------- body */

    .fmr-rcols {
        display: block;
    }

    .fmr-ingredients {
        position: static !important;
        break-inside: avoid;
        page-break-inside: avoid;
        padding: 0;
        border: 0;
        margin-bottom: 10pt;
    }

    .fmr-sect__title,
    .fmr-block h2 {
        font-size: 12pt;
        margin: 10pt 0 4pt;
        padding-bottom: 2pt;
        border-bottom: 1pt solid #000;
        break-after: avoid;
        page-break-after: avoid;
    }

    .fmr-ing {
        columns: 2;
        column-gap: 10mm;
        margin: 0;
    }

    .fmr-ing li,
    .fmr-steps li {
        break-inside: avoid;
        page-break-inside: avoid;
        margin-bottom: 3pt;
    }

    /* A ticked-off step is state from this session, not part of the recipe. */
    .fmr-tickable li.is-done {
        opacity: 1 !important;
        text-decoration: none !important;
    }

    .fmr-ing.fmr-tickable li::before {
        border-color: #000 !important;
        background: transparent !important;
    }

    .fmr-qty.is-scaled {
        box-shadow: none !important;
        font-weight: 700;
    }

    .fmr-nutri {
        display: flex;
        flex-wrap: wrap;
        gap: 8pt;
    }

    .fmr-block {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    /* FAQs are collapsed on screen; on paper there is nothing to click. */
    .fmr-faq details {
        display: block;
    }

    .fmr-faq details>* {
        display: revert;
    }

    .fmr-faq summary {
        font-weight: 700;
        list-style: none;
    }

    /* ------------------------------------------------------------- credits */

    /* A printed sheet leaves the site. It should still say where it came from,
       so a cook who liked it can find it again. */
    .fmr-recipe article::after {
        content: "5-minuterecipes.com";
        display: block;
        margin-top: 12pt;
        padding-top: 4pt;
        border-top: 1pt solid #000;
        font-size: 8.5pt;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    a[href]::after {
        content: "";
    }
}
