/* print-base.css
   ===========================================================================
   Print support for every page type EXCEPT fix guides and category hubs
   (those load public/css/page-fix.css instead — see that file's own print
   block). This file must NEVER be linked on the same page as page-fix.css.

   WHY A SEPARATE FILE, NOT AN EXTENSION OF page-fix.css
   ---------------------------------------------------------------------------
   page-fix.css's print block targets the fx-* class vocabulary that only
   scripts/generate_fixes_page.py's own templates stamp onto a page (fx-h1,
   fx-lead, fx-prose, fx-crumbs, fx-nav, fx-footer, ...). None of the other
   24 page types (homepage, /fixes, get-help, install, security,
   troubleshooting, FAQ, privacy, terms, EULA, 404, accessibility,
   founder-story and the other story/comparison pages) share that
   vocabulary — each was hand-authored with its own page-<name>.css and its
   own class names. Enumerating every one of those per-page class names
   here would just be page-fix.css's mistake repeated 24 times over, so
   this file targets semantic ELEMENTS (h1-h6, a, nav, footer, form,
   button) plus the handful of components that really are shared verbatim
   across every page (a11y.css's accessibility panel, lang-selector.css's
   language switcher) — page-shape-agnostic by construction, not by
   enumeration.

   THE STRATEGY, mirrored from page-fix.css's own print block
   ---------------------------------------------------------------------------
   This site does not print backgrounds by default (browsers don't, unless
   the reader has turned on a "background graphics" print option this site
   cannot rely on) — so it does NOT lean on `print-color-adjust: exact` to
   carry correctness; that property only controls whether a background is
   drawn AT ALL, which is exactly the setting most printers start from OFF.
   Instead every background is explicitly stripped (`* { background: none
   !important }`), which works whether or not the browser paints
   backgrounds, and every element's near-white/dark-theme text colour is
   explicitly forced dark, so nothing depends on background contrast to
   stay legible on paper.

   THE UNIVERSAL COLOUR OVERRIDE, AND WHY IT HAS TO BE `*`
   ---------------------------------------------------------------------------
   Setting `color` on `html, body` alone is NOT enough: a descendant that
   carries its own (non-!important) `color` rule from that page's own
   page-<name>.css — e.g. a `.lede`/`.crumb`/`.lead`-type class styled near-
   white for the dark theme — wins over an INHERITED value from an
   ancestor no matter how important that ancestor's own rule is;
   inheritance only ever applies when nothing targets the element itself.
   That is why this rule targets `*` (every element, not just body): a
   `*` rule and a `.some-class` rule both target the SAME element
   directly, so the one carrying `!important` wins outright, regardless of
   which side has higher specificity. Follow-up rules for headings/links/
   strong below still win over this universal one because a type selector
   (`h1`) is more specific than the universal selector (`*`), and CSS
   breaks a tie between two `!important` declarations on specificity
   first — so declaration order below doesn't matter, but the more
   specific selectors are listed after the blanket one for readability.

   ONE NAMED, DOCUMENTED EXCEPTION: the 4 vs-*.html comparison pages style
   their comparison table's header cells with `table.compare th.wh-col-head
   { color: #6ee7b7 !important }` (a light mint green, tuned for the dark
   background) — higher specificity than this file's own `!important`
   rules, so it survives every rule above unless named here explicitly.
   Left as light mint on white paper it would be barely legible, so it is
   force-corrected to the same readable dark green every other print link
   here uses.
   =========================================================================== */
@media print {
    html, body { print-color-adjust: exact; -webkit-print-color-adjust: exact; }

    * {
        background: none !important;
        background-image: none !important;
        box-shadow: none !important;
        text-shadow: none !important;
        color: #111 !important;
    }

    html, body { background: #fff !important; color: #111 !important; font-size: 12pt; }

    h1, h2, h3, h4, h5, h6 { color: #000 !important; }
    a, a:visited { color: #0b5e3d !important; text-decoration: underline !important; }
    strong, b { color: #000 !important; }

    /* Named exception — see file header. */
    table.compare th.wh-col-head { color: #0b5e3d !important; }

    /* Chrome that means nothing on paper — a printed page can't be
       clicked, scrolled, tapped, or typed into. Targeted by real semantic
       element (<nav>/<footer>/<form>/<button>), not by any one page's own
       class names, so this works identically across every page shape —
       plus the handful of components genuinely shared verbatim across
       every page (the floating accessibility panel + its toggle, and the
       floating language switcher). The "← Back to WindowsHelper" crumb
       (class="crumb", every non-fix/category page's own equivalent of
       fx-crumbs) is DELIBERATELY KEPT — like fx-crumbs on a fix guide,
       it's part of THIS page's own printed context (where the reader is),
       not an interactive-only affordance. */
    nav, footer, form, button,
    .a11y-panel, .a11y-fab, .language-selector, .wh-lang-selector {
        display: none !important;
    }

    @page { margin: 1.5cm; }
}
