@page {
  margin: 0.65in;
}

@media print {
  html,
  body {
    height: auto !important;
    overflow: visible !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Keep the Docsify theme; remove navigation and its reserved space. */
  .sidebar,
  .sidebar-toggle,
  .app-nav,
  .github-corner,
  .progress,
  .anchor .anchor-icon {
    display: none !important;
  }

  .content {
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  /* Let the page margin provide the inset, without extra theme padding. */
  .markdown-section {
    padding: 0 !important;
    overflow: visible !important;
  }

  .markdown-section > h1:first-child {
    margin-top: 0;
  }

  .markdown-section h1,
  .markdown-section h2,
  .markdown-section h3 {
    break-inside: avoid;
    break-after: avoid;
    page-break-inside: avoid;
    page-break-after: avoid;
  }

  .markdown-section h1 + p {
    break-after: avoid;
    page-break-after: avoid;
  }

  .markdown-section p {
    orphans: 3;
    widows: 3;
  }

  .markdown-section li {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
