/* ============================================================================
   Print.
   ----------------------------------------------------------------------------
   A buyer printing a floor spec to compare against a competitor's quote is a
   real and likely thing to do on this site, and until now only 6 of the 145
   pages had any print handling at all — the @media print block in
   resources.css, which is scoped to .rs-* and is about collapsing that
   section's scroll-driven sequences rather than about the page furniture
   (F-VIS-28).

   This file is the furniture, sitewide. It is linked from header_unify.py
   alongside header.css, so it reaches every page the shared header does.
   The resources rules stay where they are: they are genuinely specific to
   those six pages, and merging them here would make this file a dumping
   ground rather than a stylesheet.
   ========================================================================== */
@media print{
  /* Chrome that is navigation, not content. On paper a sticky header is just
     a band of colour at the top of page 1, and a 40-link footer is a wasted
     sheet. */
  #cdShell,
  #cdFoot,
  .cdh-band,
  .cdh-skip{display:none!important}

  /* Anything that floats over the page follows the pointer that can no longer
     reach it: the chat launcher, its panel and teaser, and the toast. */
  #cdChatBtn,
  #cdChatPanel,
  #cdChatTease,
  #cdChatBadge,
  #cdToast{display:none!important}

  /* Ink is expensive and coloured text on white prints muddy. Force the body
     to black on white and let the images carry the colour. */
  html,body{
    background:#fff!important;
    color:#000!important;
  }

  /* Reversed-out type is the one thing that disappears completely on paper:
     white on a background the printer does not print is white on white. */
  [style*="color:#FCFAF6"],
  [style*="color:#fff"],
  [style*="color:#FFF"],
  [style*="color:#F5F1EA"],
  [style*="color:#EFE9DE"],
  [style*="color:#CFE0EE"]{color:#000!important}

  /* Dark hero panels: drop the fill, keep the words. */
  [style*="background:#163A5D"],
  [style*="background:#123350"],
  [style*="background:#0E2740"]{
    background:#fff!important;
    color:#000!important;
  }

  /* Nothing should be mid-animation on paper, and nothing should be clipped
     to a scroll box the reader cannot scroll. */
  *{
    animation:none!important;
    transition:none!important;
  }
  .cdlvp-scroll{overflow:visible!important}
  .cdlvp-scroll table{min-width:0!important}

  /* Reveal anything the motion layer left parked at opacity:0 — on paper
     there is no scroll to trigger it. This mirrors motion.js's rescue(). */
  .cd-rise,[data-cd-reveal],[data-cd-lift]{
    opacity:1!important;
    transform:none!important;
    visibility:visible!important;
  }

  /* Keep a spec table and its heading together, and never break mid-row. */
  h1,h2,h3,h4{break-after:avoid-page;page-break-after:avoid}
  table,figure,dl{break-inside:avoid-page;page-break-inside:avoid}
  tr,li{break-inside:avoid;page-break-inside:avoid}

  /* A printed page loses every href. Spell out real destinations after the
     link text, but not for in-page anchors or the site's own root, which
     would be noise. */
  a[href^="http"]::after{
    content:" (" attr(href) ")";
    font-size:11px;
    word-break:break-all;
  }
  a[href^="#"]::after,
  a[href^="/"]::after,
  a[href^="mailto:"]::after,
  a[href^="tel:"]::after{content:""}

  img{max-width:100%!important}
  @page{margin:16mm}
}
