/* ==========================================================================
   HIPs — Print styles for Briefs + Guides
   ========================================================================== */

@page {
  margin: 0.75in;
}

/* Print-only baseline */
@media print {

  /* --- Reset / baseline --- */
  html, body {
    background: #fff !important;
    color: #000 !important;
  }

  /* Avoid wasting ink */
  * {
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    background: transparent !important;
  }

  /* Typography tuned for paper */
  body {
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 11.5pt !important;
    line-height: 1.45 !important;
    -webkit-print-color-adjust: economy;
    print-color-adjust: economy;
  }

  h1, h2, h3, h4 {
    font-family: Georgia, "Times New Roman", serif !important;
    color: #000 !important;
    page-break-after: avoid;
    break-after: avoid;
  }

  h1 { color: #000 !important; font-size: 20pt !important; line-height: 1.15 !important; margin: 0 0 0.2in 0 !important; }
  h2 { color: #000 !important; font-size: 14.5pt !important; margin: 0.18in 0 0.12in 0 !important; }
  h3 { color: #000 !important; font-size: 12.5pt !important; margin: 0.14in 0 0.08in 0 !important; }
  p, li { color: #000 !important; font-size: 11.5pt !important; }

  /* Widows/orphans */
  p, blockquote, li {
    orphans: 3;
    widows: 3;
  }

  /* Constrain layout to page width */
  .article-flex {
    display: block;
  }
  img, svg, video, iframe, canvas, .article-body {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Prevent ugly splits */
  img, figure, blockquote, table, pre, code, .article-callout, .article-table img {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* --- Hide global chrome / non-content UI --- */
  header,
  nav,
  footer,
  .site-header,
  .site-footer,
  .primary-menu,
  .menu,
  .breadcrumbs,
  .breadcrumb,
  .search,
  .search-form,
  .language,
  .wp-block-search,
  .wp-block-buttons,
  .wp-block-button,
  .button,
  .btn,
  .back-to-top,
  .skip-link,
  .social,
  .share,
  .newsletter,
  .cookie,
  .modal,
  .popup,
  .related,
  .pagination,
  .utility-header,
  .article-navigation {
    display: none !important;
  }

  /* --- Focus the printable area --- */
  main, article, .content, .site-content, .inner {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Captions */
  figcaption {
    font-size: 9.5pt !important;
    line-height: 1.35 !important;
    margin-top: 6pt !important;
    color: #000 !important;
  }

  /* --- Tables --- */
  table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 0.12in 0 !important;
  }
  th, td {
    border: 1px solid #000 !important;
    padding: 6pt !important;
    vertical-align: top !important;
  }
  th {
    font-weight: 700 !important;
  }

  /* --- Links / citations --- */
  a, a:visited {
    color: #000 !important;
    text-decoration: underline !important;
  }

  /* Show URL after external links */
  /* a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 9.5pt;
    word-break: break-word;
  } */

  /* Don’t add URLs for in-page anchors or javascript links */
  /* a[href^="#"]:after,
  a[href^="javascript:"]:after {
    content: "";
  } */

  /* --- Lists --- */
  ul, ol {
    margin: 0.08in 0 0.12in 0.22in !important;
    padding: 0 !important;
  }
  li { margin: 0 0 6pt 0 !important; }

  /* --- Blockquotes / callouts --- */
  blockquote {
    border-left: 3px solid #000 !important;
    padding-left: 0.14in !important;
    margin: 0.12in 0 !important;
  }

  /* --- Ensure long headings aren’t stranded at page bottom --- */
  h2, h3 {
    break-after: avoid;
    page-break-after: avoid;
  }

  /* --- Article specific styles --- */
  .article-hero,
  .article-image,
  .article-callout,
  .article-table {
    margin-bottom: 0.12in;
  }

  .article-intro,
  .article-hero-title {
    padding: 0 0 0.12in 0;
  }

  .article-hero-links-container {
    display: none;
  }

  .article-hero-caption {
    display: block;
    position: relative;
    text-align: center;
    width: 100%;
  }

  .article-hero-caption .material-symbols-outlined {
    display: none;
  }

  .quote-container {
    padding: 0;
  }

  .quote-container:before {
    display: none;
  }

  .figure-label {
    font-weight: 700;
    margin: 0;
    padding: 0;
  }

  .article-callout {
    border: 1px solid #000;
    padding: 0 0.12in;
    margin: 0.12in 0 0.36in 0;
  }

  .callout-icon {
    display: none;
  }

  .callout-title {
    padding: 0;
  }

  .callout-title h3 {
    font-weight: 700;
  }

  .callout-content {
    padding: 0.06in 0;
  }

  .briefs-table__table th,
  .briefs-table__table td:first-child {
    color: #000 !important;
  }

  .article-paragraph div[style*="padding: 20px 20px 10px 20px;"] {
    margin-bottom: 0.12in !important;
    padding: 0 !important;
  }

  .article-paragraph div[style*="padding"] + p[style*="text-align: center"] {
    margin-bottom: 0;
  }

  .article-paragraph .fa.fa-chevron-down {
    display: none;
  }

  .wptb-style-isolation:not(#wptb-style-isolation):not(#wptb-style-isolation) table.wptb-table p,
  .article-table-container th p,
  .article-table-container td p,
  .article-table-container p {
    font-size: 10pt !important;
  }

  /* remove scroll containers */
  .article-table-container .wptb-table-container,
  .article-table-container .wptb-table-wrapper {
    overflow: visible !important;
  }

  /* let the table fit the page width */
  .article-table-container table.wptb-table {
    width: 100% !important;
    min-width: 0 !important;     /* overrides inline min-width:1468px */
    table-layout: fixed;          /* forces columns to shrink */
  }

  /* prevent insane wrapping behavior */
  .article-table-container table.wptb-table td,
  .article-table-container table.wptb-table th {
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  /* optional: slightly smaller text for print */
  .article-table-container table.wptb-table {
    font-size: 10pt;
  }

  /* try to keep rows together */
  .article-table-container tr { break-inside: avoid; }

  .hide-print {
    display: none !important;
  }

  .show-print-only {
    display: block !important;
  }

}