/* Compact "GitHub" buttons in the Supported models table (docs/model_status.md,
   generated by scripts/gen_status_table.py). */
.md-typeset .md-button.omm-repo {
  margin: 0;
  padding: 0.1em 0.7em;
  font-size: 0.7rem;
  white-space: nowrap;
}

/* With navigation.tabs, Material "lifts" the sidebar to the active section only.
   Show every top-level section on every page instead, as a bold heading with
   its pages indented beneath it. */
@media screen and (min-width: 76.25em) {
  .md-nav--lifted > .md-nav__list > .md-nav__item {
    display: block;
  }
  .md-nav--lifted > .md-nav__list > .md-nav__item > .md-nav__link {
    color: var(--md-default-fg-color);
    font-weight: 700;
    pointer-events: auto;
    position: static;
    box-shadow: none;
    margin-top: 0.625em;
  }
  [dir="ltr"] .md-nav--lifted > .md-nav__list > .md-nav__item > .md-nav:not(.md-nav--secondary) {
    margin-left: 0;
  }
  [dir="rtl"] .md-nav--lifted > .md-nav__list > .md-nav__item > .md-nav:not(.md-nav--secondary) {
    margin-right: 0;
  }
}

/* Below the desktop breakpoint Material hides the tabs and the header logo and
   moves the sidebar into a drawer. On tablet and laptop widths keep the tabs,
   the logo and the full sidebar visible, laid out like the desktop one. */
@media screen and (min-width: 45em) and (max-width: 76.234375em) {
  .md-tabs {
    display: block;
  }
  .md-header__button.md-logo {
    display: inline-block;
  }
  label.md-header__button[for="__drawer"] {
    display: none;
  }
  /* the page's table of contents already sits in the left sidebar here */
  .md-sidebar--secondary {
    display: none !important;
  }
  .md-sidebar--primary {
    position: sticky;
    top: 4.8rem;
    left: auto;
    transform: none;
    transition: none;
    box-shadow: none;
    height: auto;
    width: 12.1rem;
    z-index: auto;
    align-self: flex-start;
    flex-shrink: 0;
    padding: 1.2rem 0;
    background-color: transparent;
  }
  .md-sidebar--primary .md-sidebar__scrollwrap {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    margin: 0 0.2rem 0 0.8rem;
    overflow-y: auto;
    max-height: calc(100vh - 7.2rem);
  }
  .md-nav--primary,
  .md-nav--primary .md-nav {
    position: static;
    display: block;
    height: auto;
    background-color: transparent;
    z-index: auto;
  }
  .md-nav--primary .md-nav__title,
  .md-nav--primary .md-nav__source {
    display: none;
  }
  .md-nav--primary .md-nav__title ~ .md-nav__list {
    box-shadow: none;
    overflow: visible;
  }
  /* the drawer slides nested panels sideways; keep them in place */
  .md-sidebar--primary .md-nav--primary .md-nav__toggle ~ .md-nav {
    transform: none !important;
    transition: none !important;
    visibility: visible;
    opacity: 1;
  }
  .md-nav--primary .md-nav__item {
    border-top: 0;
    font-size: 0.7rem;
    line-height: 1.3;
    padding: 0;
  }
  .md-nav--primary .md-nav__link {
    padding: 0;
    margin-top: 0.625em;
    color: var(--md-default-fg-color--light);
  }
  .md-nav--primary .md-nav__link .md-nav__icon {
    display: none;
  }
  .md-nav--primary .md-nav__item--active > .md-nav__link,
  .md-nav--primary .md-nav__link--active {
    color: var(--md-typeset-a-color);
  }
  .md-nav--primary > .md-nav__list > .md-nav__item > .md-nav__link {
    color: var(--md-default-fg-color);
    font-weight: 700;
    pointer-events: auto;
  }
  [dir="ltr"] .md-nav--primary .md-nav__list {
    padding-left: 0;
  }
  [dir="ltr"] .md-nav--primary .md-nav .md-nav__list {
    padding-left: 0.6rem;
  }
  [dir="ltr"] .md-nav--lifted > .md-nav__list > .md-nav__item > .md-nav:not(.md-nav--secondary) {
    margin-left: 0;
  }
}

/* Space before each section heading in the sidebar (padding, since margins
   collapse into the previous section's last link). */
@media screen and (min-width: 45em) {
  .md-nav--primary > .md-nav__list > .md-nav__item:not(:first-child) {
    padding-top: 0.6em;
  }
  .md-nav--primary > .md-nav__list > .md-nav__item > .md-nav {
    margin-bottom: 0;
  }
}

/* "Ask your LLM" prompts are ```text blocks: wrap them instead of scrolling. */
.md-typeset .language-text pre code {
  white-space: pre-wrap;
  word-break: break-word;
}

/* The site name in the header links home (see docs/javascripts/extra.js). */
.md-header__title {
  cursor: pointer;
}
