/* Native disclosure navigation stays usable without JavaScript. */
.header.site-header {
  position: relative;
  z-index: 30;
  flex-wrap: nowrap;
  gap: 24px;
  padding-block: 18px;
}
.site-header .site-navigation {
  display: flex;
  order: initial;
  width: auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.site-header .site-navigation > a,
.site-header summary,
.site-members-panel a,
.site-header .site-mobile-navigation a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 4px;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.4;
}
.site-header summary {
  justify-content: center;
  gap: 8px;
  list-style: none;
  cursor: pointer;
  white-space: nowrap;
}
.site-header summary::-webkit-details-marker { display: none; }
.site-header summary svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}
.site-header .site-navigation > a:hover,
.site-header summary:hover,
.site-header details[open] > summary,
.site-members-panel a:hover,
.site-header .site-mobile-navigation a:hover {
  color: var(--ink);
  background: var(--panel);
}
.site-header a:focus-visible,
.site-header summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.site-members { position: relative; }
.site-members-panel,
.site-header .site-mobile-navigation {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  box-shadow: 0 18px 40px #020d0980;
}
.site-members-panel { width: 210px; }
.site-members-panel a {
  justify-content: space-between;
  gap: 16px;
}
.site-members-panel a + a { margin-top: 8px; }
.site-header > .header-community { flex: 0 0 auto; }
.site-menu { display: none; }

@media (max-width: 1199px) {
  .site-header .site-navigation { display: none; }
  .site-header > .header-community { margin-left: auto; }
  .site-header .site-menu { display: block; flex: 0 0 auto; }
  .site-menu > summary {
    min-width: 84px;
    border: 1px solid var(--line);
    color: var(--ink);
  }
  .site-header .site-mobile-navigation {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    order: initial;
    width: min(360px, 100%);
    max-height: calc(100dvh - 130px);
    overflow-y: auto;
    top: calc(100% - 2px);
  }
  .site-header .site-mobile-navigation a {
    justify-content: space-between;
    gap: 20px;
    color: var(--ink);
    white-space: normal;
  }
  .site-mobile-navigation a span { color: var(--accent); }
  .site-menu-members {
    display: grid;
    gap: 8px;
    border-top: 1px solid var(--line);
    padding-top: 16px;
    margin-top: 8px;
  }
  .site-menu-label {
    display: block;
    padding-inline: 12px;
    color: var(--accent);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
  }
}

@media (max-width: 720px) {
  .header.site-header { gap: 12px; min-height: 88px; padding-block: 14px; }
  .site-header > .header-community { display: none; }
  .site-header .site-menu { margin-left: auto; }
}
@media (max-width: 380px) {
  .header.site-header { gap: 8px; }
  .site-menu > summary { min-width: 72px; padding-inline: 9px; gap: 6px; }
}
