/* Citation link styling - remove visited/unvisited color differences */
a[href*="bibliography.html"] {
  color: inherit !important;
  text-decoration: none !important;
}

a[href*="bibliography.html"]:visited {
  color: inherit !important;
}

a[href*="bibliography.html"]:hover {
  color: inherit !important;
  text-decoration: none !important;
}

a[href*="bibliography.html"]:link {
  color: inherit !important;
}

@media screen {
  /* Hide cover link in the sidebar when not printing */
  .chapter-item:has(a[href$="cover.html"]),
  li:has(> a[href$="cover.html"]) {
    display: none !important;
  }

  /* Hide cover image completely when viewing on screen */
  .cover-page {
    display: none !important;
  }
}

@media print {
  /* Remove all margins and padding from parent elements */
  body, #body-container, #page-wrapper, .page, #content, main {
    margin: 0 !important;
    padding: 0 !important;
  }

  .cover-page {
    position: relative;
    width: 100vw;
    height: 100vh;
    margin: 0 !important;
    padding: 0 !important;
    page-break-after: always;
  }

  .cover-page img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
    padding: 0;
  }
}
