/* The home page heading holds the logo and no text, so the heading metrics
   apply to nothing visible: an inline image sits on a text baseline, which
   leaves the line box's leading above and below it, and the bottom margin is
   sized for 2em text. */
.md-typeset h1 > img {
  display: block;
}

.md-typeset h1:has(> img) {
  margin-bottom: 1rem;
}

/* The permalink is inline, so a block image pushes it onto a line of its own
   and the heading gains an empty text line. The home page title needs no
   anchor. */
.md-typeset h1:has(> img) .headerlink {
  display: none;
}

/* Below 76.25em the primary navigation is a drawer in which each section
   slides in as a panel of its own, and navigation.expand does not apply.
   Lay the sections out inline instead, so the drawer shows every page. */
@media screen and (max-width: 76.234375em) {
  .md-nav--primary .md-nav__item .md-nav {
    position: static;
    height: auto;
    opacity: 1;
    transform: none;
    transition: none;
  }

  .md-nav--primary .md-nav__item .md-nav > .md-nav__title,
  .md-nav--primary .md-nav__link .md-nav__icon {
    display: none;
  }

  .md-nav--primary .md-nav__item .md-nav > .md-nav__list {
    box-shadow: none;
    overflow: visible;
    padding-left: 0.8rem;
  }
}
