/*
 * Print styles — applied only when printing or saving to PDF.
 *
 * Goals:
 *   - Hide navigation, footer, back-to-top, search, social sharing buttons
 *   - Strip background colors / gradients so ink usage is reasonable
 *   - Force readable black text on white
 *   - Keep images responsive but bounded, and never page-break a heading
 */

@media print {
  /* Layout chrome — hide */
  .NavBar,
  #navbar-main,
  .dropdowns,
  footer,
  .Footer,
  .Footer-Main,
  .Footer-Subscribe,
  .Footer-ExternalLinks,
  .Subscribe-Section,
  .Back-To-Top,
  .NavBar-Box-Content-SearchBox,
  .Search-Results-Section,
  .Article-Section-SuggestedLinks,
  .Article-Section-SuggestedLinks-SocialMedia,
  .Article-Section-SuggestedLinks-ReadMore,
  .SuggestedLinks,
  .Contact-Form-Section,
  script,
  noscript {
    display: none !important;
  }

  /* Strip page chrome */
  html,
  body {
    background: #fff !important;
    color: #000 !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 11pt !important;
    line-height: 1.5 !important;
  }

  /* Drop transforms & shadows that confuse print engines */
  *,
  *::before,
  *::after {
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
  }

  a {
    color: #000 !important;
    text-decoration: underline;
  }

  /* Show link URLs after the anchor text — standard print-style trick */
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #555;
    word-break: break-all;
  }

  /* Hide URL annotation for internal-only anchors & mail/tel links that are noisy */
  a[href^="#"]::after,
  a[href^="mailto:"]::after,
  a[href^="tel:"]::after {
    content: "";
  }

  /* Headings should not break across pages */
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    page-break-inside: avoid;
    color: #000 !important;
  }

  /* Images — responsive, bounded, readable */
  img {
    max-width: 100% !important;
    height: auto !important;
    page-break-inside: avoid;
  }

  /* Tables */
  table {
    border-collapse: collapse;
    width: 100%;
  }
  table, th, td {
    border: 1px solid #999;
    page-break-inside: avoid;
  }
  th, td {
    padding: 4pt 6pt;
  }

  /* Article content — widen to the page */
  .Area-Section,
  .Article-Section,
  .Article-Section-Information,
  .Article-Section-Information-Text {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
  }

  /* Detail page: title, meta, body in a single column */
  .Article-Section-Information-Head,
  .Article-Section-Information-Image,
  .Article-Section-Information-Text {
    display: block !important;
    page-break-inside: avoid;
  }
}
