/* Set the base text color and background for printed pages */
body {
    font-size: 12pt; /* Standard font size for print, approximates to 16px */
    color: #000; /* Ensure Black text on white background for readability in print */
    background: #fff;
  }
  
  /* Remove outlines on focused elements, often irrelevant in print */
  *:focus {
    outline: none !important;
  }
  
  /* Remove empty paragraphs, often due to CMS output */
  p:empty {
    display: none;
  }
  
  /* Avoid layout issues by wrapping long text or URLs in list items, paragraphs, and links */
  li, p, a {
    word-wrap: break-word; /* Ensures long words break to fit the page */
    overflow-wrap: break-word; /* Modern equivalent, ensures cross-browser compatibility */
  }
  
  /* Links should appear in black, consistent with text color */
  a:link,
  a:visited {
    color: #000;
  }
  
  /* Prevent headings from being separated from their following content by page breaks */
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }
  
  /* Prevent listed elements from splitting across pages */
  tr, img, dd, dt, li {
    page-break-inside: avoid;
  }
  
  /* Define margins for printed pages */
  @page {
    margin: 1cm;
  }
  
  /* Set minimum orphaned and widowed lines for paragraphs and headings */
  p, h2, h3 {
    orphans: 3; /* Minimum number of lines on the bottom of a page */
    widows: 3; /* Minimum number of lines at the top of a page */
  }
  
  
  /* By default hide all images and inline SVGs in print */
  img, svg {
    display: none; 
  }
  
  /* Set max width to prevent any images set to display in the 'site' css file from extending beyond page boundaries */
  img {
    max-width: 100% !important;
  }
  
  /* Append the URL of each link after the link text for clarity */
  a:after {
    font-size: 0.9rem; /* Slightly smaller font for URLs */
    font-weight: normal;
    text-decoration: none;
  }
  
  /* Generate a URL next to each link using its href attribute */
  a[href]:after {
    content: " (" attr(href) ")"; /* Adds the URL in parentheses after the link text */
    word-break: break-all; /* Allows long URLs to break across lines */
  }
  
    /* Remove URLs for internal links or links marked in the generateListOfPageLinks function */
  a.js-hasPrintLinkRef:after,
  a[href^="/"]:after {
    content: ''; /* Remove generated URLs */
  }
  
  /* Hide content for internal anchors and links that execute JavaScript code rather than navigate to a different URL in print */
  a[href^="#"]:after,
  a[href^="javascript:"]:after {
    content: "";
  }
  
  /* Table styles for printed pages */
  table {
    table-layout: fixed; /* Ensures consistent column widths */
    width: 100%; /* Stretches table width to fit the page */
    border-collapse: collapse; /* Removes gaps between table cells */
  
  }
  
  /* Ensures text alignment in all table cells */
  table * {
    text-align: left;
  }
  
  /* Adds padding below table captions for clarity */
  table caption {
    padding-bottom: .15cm;
  }
  
  /* Adds padding to table cells for readability */
  td, th {
    padding-right: .25cm;
  }
  
  /* Display table headers at the top of each new page if the table spans multiple pages */
  thead {
    display: table-header-group;
  }
  
  /* Styles details element for printing */  
  details summary {
    margin-top: 1em;
    margin-bottom: 1em;
  }
  details[open] summary {
    margin-bottom: 0.5rem;
  }

  details > summary + * { /* Styles disclosure content */  
    padding-left: 1rem;
    padding-right: 1rem;
    margin-bottom: 1.25rem;
  }

/* Utility classes to control element visibility in print */
.no-print {
  display: none !important; /* Hides these elements from printed output */
}