.md-header {
  position: static;
  color: #f5f7f0;
  background: #11130f;
  border-bottom: 1px solid #292d26;
  box-shadow: none;
}
.md-header__inner {
  min-height: var(--man-header-h);
  padding: 0 1.15rem;
  gap: .8rem;
}
.md-header__button.man-header__logo { display: flex; align-items: center; width: 4.2rem; height: 1.4rem; margin: 0 .15rem 0 0; }
.man-header__logo img { display: block; width: 4.05rem; height: auto; }
.md-header__button.man-header__menu { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; margin: 0; padding: .4rem; color: #aeb4aa; border: 0; border-radius: .35rem; background: transparent; cursor: pointer; }
.md-header__button.man-header__menu:hover, .md-header__button.man-header__menu:focus-visible, html.man-sidebar-collapsed .md-header__button.man-header__menu { color: #fff; background: #242820; }
.md-header__button.man-header__menu:focus-visible { outline: 1px solid var(--man-green); outline-offset: 1px; }
.md-header__button.man-header__search { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; margin: 0 .1rem 0 0; padding: .4rem; color: #aeb4aa; border: 0; border-radius: .35rem; background: transparent; cursor: pointer; }
.md-header__button.man-header__search:hover, .md-header__button.man-header__search:focus-visible { color: #fff; background: #242820; }
.md-header__button.man-header__search:focus-visible { outline: 1px solid var(--man-green); outline-offset: 1px; }
.man-header__links, .man-header__tools { display: flex; align-items: center; }
.man-header__links { gap: .08rem; }
.man-header__tools { gap: .08rem; margin-left: auto; }
.man-header__link, .man-community-menu summary {
  display: inline-flex; align-items: center; box-sizing: border-box; min-height: 1.7rem; padding: .25rem .45rem;
  color: #aeb4aa; border-radius: .35rem; font-size: .64rem; font-weight: 620; line-height: 1; text-decoration: none; white-space: nowrap;
}
.man-header__link:hover, .man-header__link:focus-visible, .man-community-menu summary:hover, .man-community-menu[open] summary { color: #fff; background: #242820; }
.man-header__link:focus-visible, .man-community-menu summary:focus-visible { outline: 1px solid var(--man-green); outline-offset: 1px; }
.man-header__language { margin-right: .12rem; font-family: "SF Mono", "Cascadia Mono", monospace; font-size: .6rem; }
.man-community-menu, .man-language-menu { position: relative; }
/* A closed <details> keeps its laid-out box in Chromium, and an absolutely
   positioned closed panel would extend the page's scrollable overflow on
   phones. Unopened menus must therefore be fully out of paint and layout. */
.man-community-menu:not([open]) .man-community-menu__panel,
.man-language-menu:not([open]) .man-language-menu__panel { visibility: hidden; }
.man-community-menu summary { gap: .35rem; cursor: pointer; list-style: none; }
.man-community-menu summary::-webkit-details-marker { display: none; }
.man-community-menu summary::after { width: .34rem; height: .34rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; content: ""; transform: rotate(45deg) translateY(-.08rem); }
.man-community-menu[open] summary::after { transform: rotate(225deg); }
.man-community-menu__panel {
  position: absolute; top: calc(100% + .35rem); left: 0; z-index: 30; display: grid; min-width: 12.6rem; padding: .28rem;
  border: 1px solid #3a4035; border-radius: .45rem; background: #171a15; box-shadow: 0 14px 30px rgba(0, 0, 0, .24);
}
.man-community-menu__panel p { margin: .2rem .48rem .28rem; color: #858c82; font-size: .56rem; font-weight: 650; letter-spacing: .06em; }
.man-community-menu__panel a { display: flex; align-items: center; gap: .5rem; min-height: 1.82rem; padding: .34rem .48rem; color: #dbe0d6; border-radius: .28rem; font-size: .64rem; text-decoration: none; }
.man-community-menu__panel a:first-of-type { margin-bottom: .2rem; border-bottom: 1px solid #2e332c; }
.man-community-menu__panel a:hover { color: #fff; background: #272c24; }
.man-community-menu__panel img { width: .8rem; height: .8rem; object-fit: contain; }
.man-community-menu__panel span { flex: 1; }
.man-community-menu__panel .man-arrow { color: var(--man-green-strong); }
.man-language-menu summary {
  display: grid; place-items: center; width: 1.7rem; height: 1.7rem; color: #aeb4aa; border-radius: .35rem;
  font-family: "SF Mono", "Cascadia Mono", monospace; font-size: .58rem; font-weight: 700; cursor: pointer; list-style: none;
}
.man-language-menu summary::-webkit-details-marker { display: none; }
.man-language-menu summary:hover, .man-language-menu[open] summary { color: #fff; background: #242820; }
.man-language-menu__panel {
  position: absolute; top: calc(100% + .35rem); right: 0; z-index: 30; display: grid; min-width: 7rem; padding: .28rem;
  border: 1px solid #3a4035; border-radius: .45rem; background: #171a15; box-shadow: 0 14px 30px rgba(0, 0, 0, .24);
}
.man-language-menu__panel a { padding: .38rem .5rem; color: #aeb4aa; border-radius: .28rem; font-size: .62rem; text-decoration: none; }
.man-language-menu__panel a:hover { color: #fff; background: #272c24; }
.man-language-menu__panel a[aria-current="page"] { color: var(--man-green); }
.man-header__mode { display: flex; align-items: center; height: 1.7rem; }
.man-header__palette-raw { position: absolute; width: 0; height: 0; overflow: hidden; opacity: 0; pointer-events: none; }
.man-theme-switch { position: relative; width: 2rem; height: 1.15rem; padding: 0; border: 0; border-radius: 999px; background: #34382f; cursor: pointer; }
.man-theme-switch__thumb { position: absolute; top: 50%; left: .1rem; display: grid; place-items: center; width: .95rem; height: .95rem; border-radius: 50%; background: #fff; transform: translateY(-50%); transition: transform 180ms ease, background 180ms ease; }
.man-theme-switch__thumb svg { width: .62rem; height: .62rem; fill: #555d51; }
.man-theme-switch__icon--sun { display: block; }
.man-theme-switch__icon--moon { display: none; }
[data-md-color-scheme="slate"] .man-theme-switch__thumb { background: var(--man-green); transform: translate(.82rem, -50%); }
[data-md-color-scheme="slate"] .man-theme-switch__icon--sun { display: none; }
[data-md-color-scheme="slate"] .man-theme-switch__icon--moon { display: block; }
@media screen and (max-width: 29.99em) {
  .md-header__inner { padding: 0 .65rem; gap: .45rem; }
  .md-header__button.man-header__logo { width: 3.6rem; }
  .man-header__logo img { width: 3.45rem; }
  .man-header__links .man-header__link { display: none; }
  /* The community label is the widest header item and its targets all have
     other entries (home nav column, guide help banner, community page), so a
     phone header keeps only menu, logo, search, language, and scheme. */
  .man-community-menu { display: none; }
  .man-header__language { margin-right: 0; }
  .man-community-menu__panel { left: 50%; right: auto; transform: translateX(-50%); max-width: calc(100vw - 1rem); }
}
/* Single search entry point: the theme's inline input takes over from
   60em up, so the compact icon must step aside there. Below 60em the
   icon opens the overlay while the inline form stays hidden. */
@media screen and (min-width: 60em) {
  .md-header__button.man-header__search { display: none; }
}

/* Stock Material stretches the phone search sheet to the full viewport even
   for a single hit. Cap it so the sheet hugs its content like the desktop
   dropdown does; the result list scrolls within that cap. */
@media screen and (max-width: 59.984375em) {
  [data-md-toggle="search"]:checked ~ .md-header .md-search__inner {
    height: auto;
    max-height: min(30rem, 92vh);
  }
  .md-search__output {
    position: static;
    top: auto;
    bottom: auto;
  }
  .md-search__scrollwrap {
    height: auto;
    max-height: calc(min(30rem, 92vh) - 2.5rem);
  }
}
