:root {
  --cc-topbar-container: 1200px;
  --cc-topbar-height: 90px;
  --cc-topbar-logo-size: 66px;
  --cc-topbar-logo-radius: 22px;
  --cc-topbar-nav-font: 16px;
  --cc-topbar-yellow: #F7D54A;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* Keep viewport gutter consistent across pages so centered header
   doesn't appear to shift when some pages show a vertical scrollbar. */
html {
  scrollbar-gutter: stable;
}

header.topbar {
  position: sticky !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 1000 !important;
  background: var(--cc-topbar-yellow) !important;
  border-bottom: 1px solid rgba(17, 24, 39, .12) !important;
  box-shadow: 0 10px 30px rgba(2, 6, 23, .08) !important;
  overflow: visible !important;
  min-height: var(--cc-topbar-height) !important;
  font-family: "Montserrat", system-ui, -apple-system, Arial, sans-serif !important;
}

.topbar__wrap {
  max-width: var(--cc-topbar-container) !important;
  min-height: var(--cc-topbar-height) !important;
  padding: 12px 16px !important;
  gap: 18px !important;
  align-items: center !important;
  justify-content: space-between !important;
  position: relative !important;
  overflow: visible !important;
}

.brand {
  display: flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
}

.brand__logo-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
}

.brand__logo-img {
  width: var(--cc-topbar-logo-size) !important;
  height: var(--cc-topbar-logo-size) !important;
  border-radius: var(--cc-topbar-logo-radius) !important;
  object-fit: contain !important;
  border: 3px solid #111 !important;
  background: #fff !important;
  display: block !important;
}

.topbar__right {
  margin-left: auto !important;
  display: flex !important;
  justify-content: flex-end !important;
  flex: 1 1 auto !important;
  align-items: center !important;
  gap: 18px !important;
}

.profile {
  position: relative !important;
  margin-left: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
}

.nav {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  white-space: nowrap !important;
  flex-wrap: nowrap !important;
}

.nav__link {
  color: #111 !important;
  text-decoration: none !important;
  font-family: "Montserrat", system-ui, -apple-system, Arial, sans-serif !important;
  font-size: var(--cc-topbar-nav-font) !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  padding: 10px 14px !important;
  border-radius: 999px !important;
  white-space: nowrap !important;
}

.nav__link:hover {
  background: rgba(255, 255, 255, .45) !important;
  transform: translateY(-1px) !important;
}

.nav__link--active {
  background: #111 !important;
  color: var(--cc-topbar-yellow) !important;
}

#profileBtn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  border: 0 !important;
  cursor: pointer !important;
  background: transparent !important;
  padding: 6px 8px !important;
  border-radius: 999px !important;
}

.profile__avatar {
  width: 42px !important;
  height: 42px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .95) !important;
  display: grid !important;
  place-items: center !important;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .12) !important;
}

.profile__avatar svg {
  width: 22px !important;
  height: 22px !important;
  color: #111 !important;
}

.profile__chev {
  width: 32px !important;
  height: 32px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .55) !important;
  display: grid !important;
  place-items: center !important;
  color: #111 !important;
}

.profile__chev svg {
  width: 18px !important;
  height: 18px !important;
}

.locale-pill button,
#profileBtn,
.pm__head,
.pm__item {
  font-family: "Montserrat", system-ui, -apple-system, Arial, sans-serif !important;
}

.pm__head-title {
  font-family: "Montserrat", system-ui, -apple-system, Arial, sans-serif !important;
}

/* Creators has an extra search strip under header; keep it visually separate
   so the topbar itself matches dashboard/consult. */
body[data-current-lang] .search {
  background: #f8fafc !important;
  padding: 10px 16px 14px !important;
}

body[data-current-lang] .search__wrap {
  max-width: var(--cc-topbar-container) !important;
}

body[data-current-lang] .search__input {
  font: 600 14px/1 "Montserrat", system-ui, -apple-system, Arial, sans-serif !important;
}

@media (max-width: 1100px) {
  .topbar__wrap {
    min-height: auto !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 8px 10px !important;
  }
  .brand { flex: 0 0 auto !important; }
  .brand__logo-img {
    width: 66px !important;
    height: 66px !important;
    border-radius: 22px !important;
  }

  .topbar__right {
    width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: auto auto !important;
    grid-template-areas:
      "locale profile"
      "nav nav" !important;
    justify-content: end !important;
    align-items: center !important;
    gap: 8px 10px !important;
  }

  .nav {
    grid-area: nav !important;
    width: 100% !important;
    margin: 0 !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 8px !important;
  }
  .nav::-webkit-scrollbar {
    display: none !important;
  }
  .nav__link {
    font-size: 15px !important;
    padding: 9px 12px !important;
  }

  .locale-pill {
    grid-area: locale !important;
    max-width: 160px !important;
    min-width: 0 !important;
  }

  .locale-pill button {
    min-width: 0 !important;
    max-width: 78px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .profile {
    grid-area: profile !important;
    flex: 0 0 auto !important;
    justify-self: end !important;
  }
}

@media (max-width: 640px) {
  .topbar__wrap {
    padding: 10px 12px !important;
    gap: 10px !important;
  }

  .brand__logo-img {
    width: 66px !important;
    height: 66px !important;
    border-radius: 22px !important;
  }

  .nav__link {
    font-size: 13px !important;
    padding: 8px 9px !important;
  }

  .locale-pill {
    display: inline-flex !important;
    max-width: 160px !important;
    min-width: 0 !important;
  }

  #openLangModal {
    max-width: 58px !important;
  }

  #openCurrencyModal {
    max-width: 72px !important;
  }

  .locale-pill button {
    font-size: 12px !important;
    padding: 7px 8px !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  #profileBtn {
    padding: 4px !important;
  }

  .profile__avatar {
    width: 36px !important;
    height: 36px !important;
  }

  .profile__chev {
    display: none !important;
  }
}
