.header-tools {
  --tool-hover: #f0eee222;
  --picker-bg: #1b2420;
  --picker-text: #f2eee5;
  --picker-muted: #b4bdb5;
  --picker-line: #536359;
  --picker-current: #29372f;
  --picker-accent: #e7d3a7;
  --picker-top: 77px;
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 3px;
}

.team-page .header-tools {
  --tool-hover: #82483315;
  --picker-bg: var(--team-paper, #f4efe6);
  --picker-text: var(--team-ink, #211d19);
  --picker-muted: var(--team-muted, #595049);
  --picker-line: var(--team-line, #cbbfae);
  --picker-current: #e9dfd0;
  --picker-accent: var(--team-accent, #824833);
}

.header-tool {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.header-tool:hover,
.header-tools:has(.site-language-picker:popover-open) .header-tool--language {
  background: var(--tool-hover);
}

.header-tool:focus-visible,
.site-language-list a:focus-visible {
  outline: 2px solid var(--picker-accent);
  outline-offset: 2px;
}

.site-language-picker {
  position: fixed;
  inset: var(--picker-top) 0 auto;
  width: 100%;
  max-width: none;
  max-height: calc(100dvh - var(--picker-top));
  margin: 0;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  color: var(--picker-text);
  background: var(--picker-bg);
  border: 0;
  border-block: 1px solid var(--picker-line);
  box-shadow: 0 16px 44px #100c083a;
}

.site-language-picker::backdrop { background: #11161170; }
.site-language-picker:focus { outline: none; }

.site-language-content {
  padding-block: clamp(15px, 3vw, 40px) clamp(24px, 4vw, 56px);
}

.site-language-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: clamp(10px, 2vw, 24px);
}

.site-language-heading h2 {
  font-size: clamp(1.65rem, 3vw, 2.85rem);
  line-height: 1.08;
}

.site-language-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-language-list a {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 3px 12px;
  min-height: 54px;
  padding: 8px 14px;
  border: 1px solid var(--picker-line);
  border-radius: 7px;
  font-size: 1rem;
  font-weight: 620;
}

.site-language-list a:hover,
.site-language-list a[aria-current='page'] {
  background: var(--picker-current);
  border-color: var(--picker-accent);
}

.site-language-list small {
  color: var(--picker-muted);
  font-size: .79rem;
  font-weight: 520;
}

@media (max-width: 850px) {
  .header {
    grid-template-columns: minmax(0, 1fr) auto;
    inset-block-start: 11px;
    row-gap: 8px;
    min-height: auto;
  }
  .section-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: space-between;
  }
  .section-links a { flex: 1; }
  .hero-caption { top: 116px; }
  .header-tools { --picker-top: 110px; }
}

@media (max-width: 600px) {
  .header-tools { gap: 1px; }
  .site-language-list { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .site-language-list a { min-height: 44px; }
}

@media (max-width: 370px) {
  .header-tool { width: 38px; }
  .header .brand > span:last-child { font-size: 1.39rem; }
}
