:root {
  --ee-focus-ring: #005fcc;
}

[data-md-color-scheme="slate"] {
  --ee-focus-ring: #79dcff;
}

html {
  scroll-behavior: smooth;
}

body {
  text-rendering: optimizeLegibility;
}

/* Preserve Material's native grid, sidebar, typography, and color geometry. */
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  filter: brightness(0) invert(1);
  object-fit: contain;
}

:where(
  .md-typeset a,
  button,
  input,
  summary,
  [role="button"],
  [tabindex]:not([tabindex="-1"])
):focus-visible {
  border-radius: 0.1rem;
  outline: 0.15rem solid var(--ee-focus-ring);
  outline-offset: 0.15rem;
}

.md-content__inner[tabindex="-1"]:focus {
  outline: none;
}

.md-header :where(a, button, input, [role="button"]):focus-visible,
.md-search__icon[role="button"]:focus-visible {
  outline-color: #fff;
}

label[role="button"] {
  cursor: pointer;
}

.ee-home-mark {
  height: auto;
  width: 13rem;
}

/* Page-language switching lives in the standard header menu. */
.ee-language {
  display: none !important;
}

/* The configured navigation has one complete tree per language. Only the
   current tree is exposed, and its wrapper is flattened to Material's native
   primary-navigation level. */
.ee-nav-language-root--hidden {
  display: none !important;
}

.ee-nav-language-root--active > .md-nav__container,
.ee-nav-language-root--active > .md-nav__link,
.ee-nav-language-root--active > label.md-nav__link {
  display: none !important;
}

.ee-nav-language-root--active > nav.md-nav {
  display: block !important;
  margin: 0;
}

.ee-nav-language-root--active > nav.md-nav > .md-nav__list {
  padding: 0;
}

/* Keep wide engineering tables keyboard-accessible without changing their
   native Material appearance. */
.md-typeset__table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.md-typeset__table[data-ee-overflow]:focus-visible {
  outline: 0.15rem solid var(--ee-focus-ring);
  outline-offset: 0.15rem;
}

.md-typeset table:not([class]) td {
  vertical-align: top;
}

@media screen and (max-width: 48em) {
  .ee-home-mark {
    width: 8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .md-header,
  .md-sidebar,
  .ee-language {
    display: none !important;
  }

  .md-main__inner,
  .md-content {
    margin: 0;
    max-width: none;
  }
}
