.global-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid rgba(214, 163, 64, .14);
  background: rgba(22, 17, 12, .94);
  backdrop-filter: blur(18px);
}

.global-header-inner {
  min-height: 76px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
}

.project-brand {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  min-width: max-content;
  color: var(--text);
  text-decoration: none;
}

.project-brand:focus-visible,
.global-nav a:focus-visible,
.tools-section-nav a:focus-visible,
.tools-brand:focus-visible {
  outline: 3px solid rgba(237, 207, 122, .42);
  outline-offset: 4px;
  border-radius: 8px;
}

.lamp-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(214, 163, 64, .52);
  border-radius: 999px;
  background: radial-gradient(circle at center, rgba(214, 163, 64, .23), rgba(214, 163, 64, .05));
  box-shadow: inset 0 0 0 4px rgba(214, 163, 64, .07);
}

.lamp-mark span {
  width: 13px;
  height: 13px;
  display: block;
  border-radius: 999px;
  background: var(--gold-soft);
  box-shadow: 0 0 0 5px rgba(214, 163, 64, .25), 0 0 18px rgba(214, 163, 64, .35);
}

.project-brand-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: .08em;
  white-space: nowrap;
}

.global-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(.75rem, 1.35vw, 1.25rem);
  min-width: 0;
}

.global-nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: .9rem;
  line-height: 1;
  white-space: nowrap;
  transition: color .16s ease;
}

.global-nav a:hover,
.global-nav a[aria-current="page"] {
  color: var(--gold-soft);
}

.global-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -.65rem;
  height: 1px;
  background: var(--gold);
}

.global-language {
  flex-wrap: nowrap;
}

.global-language button {
  min-width: 0;
  min-height: 36px;
  padding: .42rem .68rem;
  font-size: .8rem;
}

.tools-localbar {
  border-bottom: 1px solid var(--line-soft);
  background: rgba(12, 10, 8, .78);
}

.tools-localbar-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
}

.tools-brand {
  display: inline-flex;
  flex-direction: column;
  flex: 0 0 auto;
  color: inherit;
  text-decoration: none;
  line-height: 1;
}

.tools-brand .brand-kicker {
  margin-bottom: .4rem;
}

.tools-brand .brand-name {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.tools-section-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.tools-section-nav a {
  flex: 0 0 auto;
  color: var(--muted-2);
  text-decoration: none;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
  transition: color .16s ease;
}

.tools-section-nav a:hover {
  color: var(--gold-soft);
}

.ws03-anchor {
  scroll-margin-top: 96px;
}

@media (max-width: 1180px) {
  .global-header-inner {
    grid-template-columns: auto 1fr;
    padding-block: .7rem;
  }

  .global-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: .2rem;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
  }

  .global-language {
    justify-self: end;
  }
}

@media (max-width: 820px) {
  .project-brand-name {
    font-size: .95rem;
    letter-spacing: .06em;
  }

  .lamp-mark {
    width: 34px;
    height: 34px;
  }

  .global-language button {
    min-height: 34px;
    padding: .38rem .58rem;
    font-size: .75rem;
  }

  .tools-localbar-inner {
    min-height: 64px;
    align-items: flex-start;
    flex-direction: column;
    gap: .8rem;
    padding-block: .8rem;
  }

  .tools-section-nav {
    width: 100%;
    justify-content: flex-start;
    padding-bottom: .1rem;
  }

  .ws03-anchor {
    scroll-margin-top: 132px;
  }
}

@media (max-width: 560px) {
  .global-header-inner {
    grid-template-columns: 1fr;
    gap: .7rem;
  }

  .project-brand,
  .global-language {
    justify-self: start;
  }

  .global-language {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .global-nav {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
    gap: 1rem;
    padding-block: .2rem .1rem;
  }

  .global-nav a {
    font-size: .84rem;
  }

  .tools-section-nav {
    gap: .85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .global-nav a,
  .tools-section-nav a {
    transition: none;
  }
}
