.header {
  min-height: 88px;
  padding: 10px max(48px, calc(50% - 672px));
  display: flex;
  align-items: center;
  gap: 58px;
  border-bottom: 1px solid var(--header-line);
  line-height: normal;
  font-kerning: auto;
  font-variant-ligatures: normal;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}

:where(.header) svg {
  display: block;
}

:where(.header) a,
:where(.header) button {
  -webkit-tap-highlight-color: transparent;
}

:where(.header) button {
  cursor: pointer;
}

:where(.header) button svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand {
  font-size: 29px;
  font-weight: 600;
  letter-spacing: -.9px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.header .brand {
  padding: 5px 0;
  margin: -5px 0;
}

.logo {
  display: block;
  flex: none;
  width: 40px;
  height: 35px;
}

.logo-outline {
  fill: #052c17;
}

.logo-ring {
  fill: none;
  stroke: #052c17;
  stroke-width: 20;
}

.logo-fruit {
  fill: #00c853;
}

.logo-leaf-back {
  fill: #007a35;
  fill-rule: evenodd;
}

.logo-leaf {
  fill: #00c853;
  fill-rule: evenodd;
}

.product-nav {
  flex: 1 1 0;
  min-width: 40%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 26px;
  font-size: 14px;
  font-weight: 500;
}

.product-nav > * {
  display: flex;
  align-items: center;
  gap: 6px;
}

.product-nav small {
  font-size: 9px;
  font-weight: 400;
  padding: 4px;
  border-radius: 4px;
  background: var(--header-soft);
  color: var(--muted);
}

.product-nav a,
.header-support,
.lang-button,
.theme-icon {
  transition: color .15s;
}

.product-nav a:hover,
.product-nav [aria-current="page"],
a.header-support:hover,
.lang-button:hover,
.lang.is-open .lang-button,
.theme-icon:hover {
  color: var(--header-accent);
}

.header-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 12px;
  white-space: nowrap;
}

.header-tools button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
}

.header-tools svg {
  width: 18px;
  height: 18px;
}

.header-support {
  white-space: normal;
}

.header-tools .theme-icon {
  padding: 11px 10px;
  margin: -11px -10px;
}

.header-tools .menu-icon {
  display: none;
  padding: 11px;
  margin: -11px;
}

.icon-sun,
.icon-close,
.dark .icon-moon,
[aria-expanded="true"] > .icon-menu {
  display: none;
}

.dark .icon-sun,
[aria-expanded="true"] > .icon-close {
  display: block;
}

.lang {
  position: relative;
}

.header-tools .lang-button {
  display: flex;
  align-items: baseline;
  padding: 11px 10px;
  margin: -11px -10px;
}

.lang-button .lang-chevron {
  width: .584em;
  height: .3477em;
  margin: 0 .0986em;
  fill: currentColor;
  stroke: none;
  transition: transform .2s;
}

.lang.is-open .lang-chevron {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 22px);
  right: -14px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 184px;
  padding: 6px;
  background: var(--header-panel);
  border: 1px solid var(--header-line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-size: 13px;
  white-space: normal;
}

.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 500;
  transition: background-color .15s;
}

.lang-option:hover {
  background: var(--header-soft);
}

.lang-option:focus-visible {
  outline-offset: -2px;
}

.lang-option[aria-current="true"] {
  color: var(--header-accent);
  font-weight: 600;
}

.lang-option-code {
  flex: none;
  font-size: 11px;
  letter-spacing: .6px;
  color: var(--muted);
}

.lang-option[aria-current="true"] .lang-option-code {
  color: inherit;
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 60px;
  right: 18px;
  left: 18px;
  z-index: 12;
  padding: 6px 18px 18px;
  background: var(--header-panel);
  border: 1px solid var(--header-line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.menu-links {
  display: flex;
  flex-direction: column;
}

.menu-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 6px 0;
  border-bottom: 1px solid var(--header-line);
  font-size: 15px;
  font-weight: 500;
  transition: color .15s;
}

a.menu-link:hover,
.menu-link[aria-current="page"] {
  color: var(--header-accent);
}

.menu-link small {
  font-size: 10px;
  font-weight: 400;
  padding: 4px 6px;
  border-radius: 4px;
  background: var(--header-soft);
  color: var(--muted);
}

.menu-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
}

.menu-links + .menu-tools {
  padding-top: 16px;
}

.menu-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.menu-lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--header-line);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .5px;
  transition: border-color .15s;
}

.menu-lang:hover {
  border-color: var(--muted);
}

.menu-lang[aria-current="true"] {
  background: #d4f77d;
  border-color: #d4f77d;
  color: #1b2d15;
}

.menu-theme {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--header-line);
  border-radius: 50%;
  background: none;
  color: var(--ink);
  transition: border-color .15s;
}

.menu-theme:hover {
  border-color: var(--muted);
}

.menu-theme svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 1430px) {
  .header {
    gap: 36px;
    padding-inline: 32px;
  }

  .header-tools {
    gap: 20px;
  }
}

@media (min-width: 701px) and (max-width: 1000px) {
  .header-support {
    display: none;
  }

  .product-nav {
    column-gap: 18px;
  }

  .header {
    gap: 30px;
  }
}

@media (max-width: 700px) {
  .header {
    position: relative;
    min-height: 72px;
    padding: 0 20px;
    gap: 10px;
  }

  .brand {
    font-size: 25px;
  }

  .logo {
    width: 36px;
    height: 31px;
  }

  .product-nav,
  .header-support,
  .lang,
  .header-tools .theme-icon {
    display: none;
  }

  .header-tools .menu-icon,
  .mobile-menu {
    display: block;
  }
}

@media (forced-colors: active) {
  .product-nav [aria-current="page"],
  .lang-option[aria-current="true"],
  .menu-link[aria-current="page"],
  .menu-lang[aria-current="true"] {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
  }

  .menu-lang[aria-current="true"] {
    border-width: 2px;
  }
}
