/* Keep the brand, navigation and actions balanced across the public pages. */
.site-monochrome .help-nav { height: auto; }

html .site-monochrome .site-navigation {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 1720px;
  height: 72px;
  min-height: 72px;
  margin-inline: auto;
  padding: 0 32px;
  gap: 16px;
}

html .site-monochrome .site-navigation > :is(.nav-logo, .brand) {
  flex: 0 0 auto;
  margin: 0;
}

html .site-monochrome .site-navigation > .nav-links {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin: 0 24px;
  white-space: nowrap;
}

html .site-monochrome .site-navigation .nav-links > :is(a, button) {
  flex-shrink: 0;
  font-size: 14px;
  letter-spacing: 0;
}

html .site-monochrome .site-navigation .nav-auth-trigger.is-authed {
  min-height: 38px;
}

html .site-monochrome .site-navigation .nav-auth-name {
  max-width: 80px;
}

html .site-monochrome .site-navigation > :is(.nav-cta, .download-btn, .invite-cta, .telegram-contact-trigger),
html .site-monochrome .site-navigation .i18n-language-button {
  box-sizing: border-box;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-height: 40px;
  padding: 0 16px;
  gap: 8px;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}

html .site-monochrome .site-navigation > .i18n-language-switcher {
  margin: 0;
  order: 0;
}

html .site-monochrome .site-navigation .i18n-language-button {
  padding-inline: 12px;
  font-size: 12px;
}

html .site-monochrome .site-navigation > .nav-x-link {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
}

/* Reserve breathing room for the longer English labels and account badges. */
@media (max-width: 1480px) {
  html .site-monochrome .site-navigation > .nav-links {
    gap: 24px;
    margin-inline: 16px;
  }
}

@media (max-width: 1399px) {
  html .site-monochrome .site-navigation.telegram-nav > .nav-links {
    display: none;
  }
  html .site-monochrome .site-navigation.telegram-nav > :is(.nav-logo, .brand) {
    margin-right: auto;
  }
}

@media (max-width: 1679px) {
  html[data-locale="en"] .site-monochrome .site-navigation.telegram-nav > .nav-links {
    display: none;
  }
  html[data-locale="en"] .site-monochrome .site-navigation.telegram-nav > :is(.nav-logo, .brand) {
    margin-right: auto;
  }
}

@media (max-width: 1535px) {
  html[data-locale="ko"] .site-monochrome .site-navigation.telegram-nav > .nav-links { display:none; }
  html[data-locale="ko"] .site-monochrome .site-navigation.telegram-nav > :is(.nav-logo,.brand) { margin-right:auto; }
}

@media (max-width: 1279px) {
  html .site-monochrome .site-navigation > .nav-links {
    display: none;
  }
  html .site-monochrome .site-navigation > :is(.nav-logo, .brand) {
    margin-right: auto;
  }
}

/* Compact the long download/contact labels before they reach the screen edge. */
@media (max-width: 768px) {
  html .site-monochrome .site-navigation > :is(.nav-cta, .download-btn, .invite-cta, .telegram-contact-trigger) {
    order: 0;
    flex: 0 0 40px;
    width: 40px;
    padding: 0;
    gap: 0;
    font-size: 0;
  }
  html .site-monochrome .site-navigation > :is(.download-btn, .telegram-contact-trigger) > span {
    display: none;
  }
}

@media (max-width: 640px) {
  html .site-monochrome .site-navigation {
    height: 64px;
    min-height: 64px;
    padding-inline: 20px;
    gap: 12px;
  }
}

@media (max-width: 560px) {
  html .site-monochrome .site-navigation {
    padding-inline: 16px;
    gap: 8px;
  }
  html .site-monochrome .site-navigation > :is(.nav-cta, .download-btn, .invite-cta, .telegram-contact-trigger, .nav-x-link) {
    order: 0;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    gap: 0;
    font-size: 0;
  }
  html .site-monochrome .site-navigation .i18n-language-button {
    height: 34px;
    min-height: 34px;
    padding-inline: 10px;
  }
}
