header.global-header {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: clamp(.6rem, 2vw, 1.5rem);
  padding: .8rem clamp(.8rem, 3vw, 2.5rem);
  background: #17151f;
  color: #fff5e7;
  border-bottom: 1px solid #c99e5966;
}

.global-header .global-header-brand {
  color: inherit;
  font-family: Georgia, serif;
  font-size: clamp(.9rem, 1.5vw, 1.2rem);
  white-space: nowrap;
}

.global-header-brand span { color: #e4bd78; }

.global-header .global-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: .8rem;
  min-width: 0;
  width: 100%;
}

.global-header .global-nav details { margin: 0; }
.global-header .global-nav summary { cursor: pointer; font-weight: 600; }
.global-header .global-nav a { color: inherit; }
.global-header .global-nav a:hover { text-decoration: underline; }
.global-header :focus-visible { outline: 2px solid #e4bd78; outline-offset: 3px; }

.global-header .global-nav-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .4rem clamp(.45rem, 1vw, .95rem);
  font-size: .875rem;
}

.global-header .global-nav > details:last-child > summary {
  padding: .45rem .6rem;
  border: 1px solid #c99e59;
  border-radius: .4rem;
  white-space: nowrap;
}

.global-header .global-nav-panel {
  position: absolute;
  inset-inline-end: .8rem;
  z-index: 1;
  width: min(42rem, calc(100% - 1.6rem));
  max-height: 65vh;
  overflow: auto;
  margin-top: .45rem;
  padding: 1rem;
  background: #241722;
  border: 1px solid #c99e59;
  border-radius: .65rem;
  box-shadow: 0 .5rem 1.5rem #0005;
}

.global-header .global-nav-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.global-header .global-nav-panel a,
.global-header .global-nav-panel .account-email {
  display: block;
  padding: .4rem 0;
  overflow-wrap: anywhere;
}

.global-header .global-nav-auth { width: min(14rem, calc(100% - 1.6rem)); }
.global-header .global-nav-auth .nav-register { color: #e4bd78; }

@media (min-width: 75rem) {
  .global-header .global-nav-menu > summary { display: none; }
  .global-header .global-nav-menu::details-content {
    display: contents;
    content-visibility: visible;
  }
}

@media (max-width: 74.999rem) {
  .global-header .global-nav { grid-template-columns: max-content max-content; justify-content: end; }
  .global-header .global-nav-main {
    position: absolute;
    z-index: 1;
    inset-inline: .8rem;
    display: grid;
    justify-content: stretch;
    margin-top: .65rem;
    padding: .85rem;
    max-height: 70vh;
    overflow: auto;
    border: 1px solid #c99e59;
    border-radius: .65rem;
    background: #241722;
  }
  .global-header .global-nav-main > a,
  .global-header .global-nav-main > details > summary { padding: .35rem 0; }
  .global-header .global-nav-groups {
    position: static;
    width: auto;
    max-height: none;
    grid-template-columns: 1fr;
  }
}
