/* Shared public header geometry. Keep language controls stable across routes. */
html {
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

body[class] > .site-header {
  top: 8px !important;
  width: min(1440px, calc(100% - 48px)) !important;
  min-height: 76px !important;
  grid-template-columns: minmax(205px, 1fr) auto minmax(205px, 1fr) !important;
  grid-template-areas: "brand nav actions" !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 0 4px !important;
}

body[class] > .site-header .brand {
  grid-area: brand !important;
  min-height: 58px !important;
  align-self: center !important;
  justify-self: start !important;
}

body[class] > .site-header .brand__mark {
  width: 44px !important;
  height: 44px !important;
  flex-basis: 44px !important;
}

body[class] > .site-header .brand__name {
  font-family: "Arial Black", "Segoe UI Black", Inter, "Segoe UI", Arial, sans-serif !important;
  font-weight: 900 !important;
  line-height: 1.08 !important;
  text-transform: uppercase !important;
}

body[class] > .site-header .nav {
  grid-area: nav !important;
  align-self: center !important;
  justify-self: center !important;
  min-height: 44px !important;
}

body[class] > .site-header .header-actions {
  grid-area: actions !important;
  display: flex !important;
  width: auto !important;
  min-width: 205px !important;
  min-height: 42px !important;
  align-items: center !important;
  align-self: center !important;
  justify-content: flex-end !important;
  justify-self: end !important;
}

body[class] > .site-header .language-switcher {
  box-sizing: border-box !important;
  display: inline-flex !important;
  width: 90px !important;
  min-width: 90px !important;
  height: 42px !important;
  min-height: 42px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  padding: 3px !important;
  border: 1px solid rgba(255, 255, 255, 0.13) !important;
  border-radius: 4px !important;
  background: rgba(4, 8, 9, 0.78) !important;
  box-shadow: none !important;
}

body[class] > .site-header .language-switcher button {
  box-sizing: border-box !important;
  width: 40px !important;
  min-width: 40px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  border: 1px solid transparent !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

body[class] > .site-header .language-switcher button.is-active {
  border-color: #19e1cf !important;
  color: #001310 !important;
  background: #19e1cf !important;
  box-shadow: none !important;
}

@media (max-width: 900px) {
  body[class] > .site-header {
    top: 8px !important;
    width: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
    height: 104px !important;
    min-height: 104px !important;
    grid-template-columns: minmax(0, 1fr) 90px !important;
    grid-template-rows: 46px 44px !important;
    grid-template-areas: "brand actions" "nav nav" !important;
    align-content: start !important;
    gap: 4px 8px !important;
    padding: 4px 0 !important;
    overflow: visible !important;
    border-radius: 0 !important;
  }

  body[class] > .site-header .brand {
    min-width: 0 !important;
    min-height: 42px !important;
    padding: 0 !important;
  }

  body[class] > .site-header .brand__mark {
    width: 36px !important;
    height: 36px !important;
    flex-basis: 36px !important;
  }

  body[class] > .site-header .header-actions {
    width: 90px !important;
    min-width: 90px !important;
    min-height: 42px !important;
  }

  body[class] > .site-header .nav {
    display: grid !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 44px !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 2px !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  body[class] > .site-header .nav a {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 40px !important;
    padding: 0 5px !important;
    font-size: 11px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 360px) {
  body[class] > .site-header .brand__name {
    font-size: 12px !important;
  }

  body[class] > .site-header .nav a {
    padding-inline: 3px !important;
    font-size: 10px !important;
  }
}

@media (max-width: 640px) {
  html {
    scrollbar-width: none;
  }

  ::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  body[class] > .site-header .brand {
    gap: 0 !important;
  }

  body[class] > .site-header .brand__mark {
    display: none !important;
  }

  body[class] > .site-header .brand__name {
    max-width: none !important;
    overflow: visible !important;
    font-size: 16px !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 360px) {
  body[class] > .site-header .brand__name {
    font-size: 15px !important;
  }
}
