@media print {
  @page {
    size: A4;
    margin: 18mm 16mm;
  }

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

  html {
    font-size: 11pt;
  }

  body {
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.45;
    max-width: none;
  }

  /* Hide site chrome, menus, search, social, newsletter/footer clutter */
  header,
  nav,
  footer,
  aside,
  form,
  iframe,
  .site-header,
  .site-footer,
  .nav-primary,
  .menu,
  .genesis-nav-menu,
  .breadcrumb,
  .sidebar,
  .widget-area,
  .search-form,
  .social,
  .social-icons,
  .footer-widgets,
  .entry-comments,
  .comment-respond,
  .post-edit-link {
    display: none !important;
  }

  /* Main article */
  main,
  article,
  .site-inner,
  .content,
  .entry,
  .entry-content {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  h1 {
    font-size: 20pt;
    line-height: 1.2;
    margin: 0 0 10mm;
    page-break-after: avoid;
  }

  h2, h3, h4, h5 {
    font-family: Arial, Helvetica, sans-serif;
    page-break-after: avoid;
    margin: 7mm 0 3mm;
    line-height: 1.25;
  }

  h3, h4 {
    border-top: 1px solid #999;
    padding-top: 4mm;
  }

  p,
  li {
    orphans: 3;
    widows: 3;
  }

  ul,
  ol {
    padding-left: 1.35em;
  }

  li {
    margin-bottom: 2mm;
  }

  hr {
    border: 0;
    border-top: 1px solid #aaa;
    margin: 6mm 0;
  }

  a {
    text-decoration: underline;
    word-break: break-word;
  }

  /* Print useful external URLs, but avoid noisy internal nav URLs */
  .entry-content a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 8.5pt;
  }

  .entry-content a[href^="https://www.unaoc.org"]::after,
  .entry-content a[href^="http://www.unaoc.org"]::after {
    content: "";
  }

  img {
    max-width: 100% !important;
    height: auto !important;
    page-break-inside: avoid;
  }

  table {
    width: 100%;
    border-collapse: collapse;
    page-break-inside: avoid;
  }

  th,
  td {
    border: 1px solid #bbb;
    padding: 4pt 6pt;
  }

  /* Keep CTA links readable but not button-like */
  .button,
  .btn,
  a.button {
    border: 1px solid #777;
    padding: 3pt 5pt;
    text-decoration: none;
    font-weight: bold;
  }

  /* Optional printed source */
  article::after,
  .entry::after {
    content: "Printed from: " attr(data-url);
    display: block;
    margin-top: 10mm;
    font-size: 8pt;
    color: #666 !important;
  }
}