/* Hide everything that's not main content */
@media print {
  /* Basic reset */
  * {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  body {
    margin: .40;
    padding: .40;
    font-size: 14pt;
    line-height: 1.4;
  }

  /* Layout */
  header,
  nav,
  footer,
  aside,
  .no-print {
    display: none !important;
  }

  main,
  .print-area {
    display: block;
  }

  /* Links: show URL after text */
  a::after {
    content: " (" attr(href) ")";
    font-size: 14pt;
  }

  /* Images: scale nicely, avoid breaking */
  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }

  /* Page breaks helpers */
  .page-break {
    page-break-before: always;
  }

  /* Avoid breaking headings from content */
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }
}
