/* Keep selected links readable over the theme's tinted background. */
:root > * {
  --md-accent-fg-color: #4051b5;
  --md-accent-fg-color--transparent: #4051b51a;
}

/* The dark scheme needs a lighter accent for the same contrast. */
:root > [data-md-color-scheme="slate"] {
  --md-accent-fg-color: #a5b4fc;
  --md-accent-fg-color--transparent: #a5b4fc1a;
}

.md-header__button[data-docs-toggle] {
  background: transparent;
  border: 0;
  color: inherit;
}

.md-header__button[data-docs-toggle]:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

@media screen and (min-width: 60em) {
  .md-header__button[data-docs-toggle="__search"] {
    display: none;
  }
}

@media screen and (min-width: 76.25em) {
  .md-header__button[data-docs-toggle="__drawer"] {
    display: none;
  }
}

/* Translation alone leaves the closed drawer's links in the tab order. The theme makes an
   open section's nested list visible again, so its descendants are hidden too. */
@media screen and (max-width: 76.234375em) {
  [data-md-toggle="drawer"]:not(:checked) ~ .md-container .md-sidebar--primary,
  [data-md-toggle="drawer"]:not(:checked) ~ .md-container .md-sidebar--primary * {
    visibility: hidden;
  }
}

/* Keep identifiers whole in a table's first column; a table that gets too wide scrolls. */
.md-typeset td:first-child code {
  white-space: nowrap;
}

/* Edge shadows show that a table scrolls sideways. The `local` layers cover them at the ends. */
.md-typeset__scrollwrap {
  background:
    linear-gradient(to right, var(--md-default-bg-color) 30%, transparent) left / 2rem 100% no-repeat local,
    linear-gradient(to left, var(--md-default-bg-color) 30%, transparent) right / 2rem 100% no-repeat local,
    linear-gradient(to right, var(--md-default-fg-color--lighter), transparent) left / 0.6rem 100% no-repeat scroll,
    linear-gradient(to left, var(--md-default-fg-color--lighter), transparent) right / 0.6rem 100% no-repeat scroll;
}

.md-typeset .md-typeset__table table:not([class]) {
  background: transparent;
}
