/* CLF print stylesheet — applied via media="print". Hides
   the app shell (toolbar, menu, footer chrome), expands
   content for paper, and forces a monochrome palette so
   colours don't waste toner. */

@media print {

    :root {
        /* Override colour tokens for paper. */
        --cobd-color-background:    #ffffff;
        --cobd-color-foreground:    #000000;
        --cobd-color-primary:       #000000;
        --cobd-color-primary-contrast: #ffffff;
        --cobd-color-secondary:     #000000;
        --cobd-color-link:          #000000;
        --cobd-color-link-visited:  #000000;
    }

    body {
        background: #ffffff !important;
        color: #000000 !important;
        font: 12pt/1.5 Georgia, "Times New Roman", serif;
    }

    /* Hide the app shell — toolbar, side menu, theme toggle,
       skip-link, footer nav, social block. The article body
       is what should appear on paper. */
    ion-header,
    ion-footer,
    ion-menu,
    ion-split-pane > ion-menu,
    ion-menu-button,
    cobd-theme-toggle,
    .skip-link,
    .cobd-footer__nav,
    .cobd-footer__social,
    nav[aria-label],
    [role="navigation"] {
        display: none !important;
    }

    /* Strip shell containers so flow works for paper. */
    ion-app,
    ion-split-pane,
    ion-content,
    .ion-page {
        display: block !important;
        position: static !important;
        overflow: visible !important;
        height: auto !important;
    }

    /* Expand inline links so the reader can type them. */
    a[href^="http"]::after {
        content: " <" attr(href) ">";
        font-size: 90%;
    }
    a[href^="#"]::after,
    a[href^="mailto:"]::after,
    .skip-link::after {
        content: "";
    }

    /* Avoid orphans / widows around headings. */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        page-break-inside: avoid;
    }
    img, table, figure, pre {
        page-break-inside: avoid;
    }

    /* Footer copyright + contact still useful in print. */
    .cobd-footer__contact,
    .cobd-footer__copyright {
        display: block !important;
        margin-top: 1.5em;
        font-size: 10pt;
    }

    /* Print-specific helpers. */
    .cobd-no-print { display: none !important; }
    .cobd-print-only { display: block !important; }
}

/* Hide print-only blocks on screen. */
@media screen {
    .cobd-print-only { display: none !important; }
}
