/* One floating header shape across the main site and account pages. */
.site-header .primary-nav > a.header-login.is-authenticated { gap: 7px; min-width: 0; max-width: 158px; padding: 4px 12px 4px 5px; border: 1px solid #e5e9f0; color: #202b40; background: #fff; box-shadow: 0 4px 14px rgba(26,39,64,.08); text-transform: none; }
.site-header .primary-nav > a.header-login.is-authenticated:hover { border-color: #d6deea; color: #202b40; background: #fff; }
.account-nav-avatar, .profile-account-link .profile-account-avatar { display: grid; flex: 0 0 auto; place-items: center; width: 29px; height: 29px; border-radius: 50%; color: #fff; background: #172033; font-size: 10px; font-weight: 800; letter-spacing: 0; }
.account-nav-name { overflow: hidden; max-width: 68px; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 800; }
.account-nav-label { white-space: nowrap; color: #202b40; font-size: 10px; font-weight: 800; }
.profile-account-link { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 5px; border: 1px solid #e1e7f0; color: #202b40; background: #fff; box-shadow: 0 4px 14px rgba(26,39,64,.08); }
.profile-account-link:hover { color: #202b40; border-color: #d6deea; }
.profile-account-link-name { overflow: hidden; max-width: 90px; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.profile-account-link-label { color: #202b40; font-size: 10px; white-space: nowrap; }

/* Shared signed-in account menu used across all standard site headers. */
.site-header .primary-nav > .shared-account-menu,
.profile-account-nav > .shared-account-menu {
  position: relative;
  flex: 0 0 auto;
}
.shared-account-menu > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 4px 10px 4px 5px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  color: #202b40;
  background: #fff;
  box-shadow: 0 4px 14px rgba(26,39,64,.08);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.shared-account-menu > summary::-webkit-details-marker { display: none; }
.shared-account-menu > summary::marker { content: ''; }
.shared-account-menu > summary:hover,
.shared-account-menu[open] > summary {
  border-color: #d6deea;
  color: #202b40;
}
.shared-account-menu > summary:focus-visible {
  outline: 2px solid #e81e35;
  outline-offset: 3px;
}
.shared-account-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 31px;
  height: 31px;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background-color: #172033;
  background-repeat: no-repeat;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .03em;
  box-shadow: 0 2px 7px rgba(23,32,51,.18);
}
.shared-account-name {
  overflow: hidden;
  max-width: 78px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 850;
}
.shared-account-chevron { margin-top: -3px; color: #526078; font-size: 17px; line-height: 1; transition: transform .18s ease; }
.shared-account-menu[open] .shared-account-chevron { transform: rotate(180deg); }
.shared-account-menu-panel {
  position: absolute;
  z-index: 60;
  top: calc(100% + 9px);
  right: 0;
  display: grid;
  width: 206px;
  padding: 8px;
  border: 1px solid #e0e6ef;
  border-radius: 14px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 18px 38px rgba(23,32,51,.17);
  backdrop-filter: blur(14px);
}
.shared-account-menu-identity { display: grid; gap: 3px; padding: 7px 9px 10px; border-bottom: 1px solid #edf1f5; }
.shared-account-menu-identity strong { overflow: hidden; color: #1b263b; font-size: 12px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.shared-account-menu-identity small { color: #78869a; font-size: 10px; font-weight: 700; }
.shared-account-menu-action {
  width: 100%;
  padding: 10px 9px;
  border: 0;
  border-radius: 8px;
  color: #2a374e;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  text-align: left;
  text-decoration: none;
}
.shared-account-menu-action:hover,
.shared-account-menu-action:focus-visible { color: #202b40; background: #f3f6fa; outline: none; }
.shared-account-menu-logout { color: #2a374e; }
@media (max-width: 1023px) {
  .site-header .primary-nav > .shared-account-menu { align-self: stretch; display: grid; }
  .site-header .primary-nav > .shared-account-menu > summary { justify-content: flex-start; }
  .shared-account-menu-panel { left: 0; right: auto; }
}
@media (max-width: 1023px) { .site-header .primary-nav > a.header-login.is-authenticated { max-width: none; min-height: 46px; justify-content: flex-start; padding-right: 15px; } }
:root {
  --shared-header-width: 1500px;
  --shared-header-surface: rgba(255, 255, 255, .94);
  --shared-header-border: rgba(255, 255, 255, .96);
  --shared-header-shadow: 0 12px 30px rgba(87, 103, 126, .12), 0 -4px 16px rgba(255, 255, 255, .98);
}

.site-header,
.experts-page .site-header {
  padding: 10px 0 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.site-header .header-inner,
.experts-page .site-header .header-inner,
.talent-header,
.profile-site-header {
  width: min(var(--shared-header-width), calc(100% - 48px)) !important;
  min-height: 68px !important;
  border: 1px solid var(--shared-header-border) !important;
  border-radius: 22px !important;
  background: var(--shared-header-surface) !important;
  box-shadow: var(--shared-header-shadow) !important;
  backdrop-filter: blur(18px);
}

.site-header .header-inner,
.experts-page .site-header .header-inner {
  padding: 0 16px 0 12px !important;
}

.talent-header,
.profile-site-header {
  top: 10px;
  margin: 10px auto 0 !important;
  padding: 0 16px !important;
}

/* Project details uses the same global navigation bar, even though it does not
   load the freelancer profile stylesheet. */
.project-detail-header.profile-site-header {
  position: sticky;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(18px, 2vw, 32px);
}
.project-detail-header.profile-site-header .profile-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  overflow: hidden;
}
.project-detail-header.profile-site-header .profile-brand img {
  display: block;
  width: 100%;
  height: auto;
}
.project-detail-header.profile-site-header .profile-primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.35vw, 21px);
  margin-left: auto;
}
.project-detail-header.profile-site-header .profile-primary-nav a {
  position: relative;
  padding: 23px 0;
  color: #647087;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}
.project-detail-header.profile-site-header .profile-primary-nav a:hover { color: #e81e35; }
.project-detail-header.profile-site-header .profile-primary-nav .profile-header-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 7px 9px 7px 16px;
  border-radius: 25px;
  color: #fff;
  background: #e81e35;
  box-shadow: 0 9px 18px rgba(232,30,53,.2);
}
.project-detail-header.profile-site-header .profile-primary-nav .profile-header-cta span {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  color: #e81e35;
  background: #fff;
  font-size: 15px;
  line-height: 1;
}

.site-header .brand,
.talent-header > .brand,
.profile-site-header .profile-brand {
  width: 210px !important;
  height: 56px !important;
  border-radius: 12px;
}

@media (min-width: 1321px) {
  .talent-header .talent-nav > a { padding-block: 26px; }
}

@media (max-width: 1023px) {
  .site-header .primary-nav { inset: calc(100% + 4px) 0 auto !important; }
}

@media (max-width: 600px) {
  .site-header,
  .experts-page .site-header { padding: 7px 0 0 !important; }

  .site-header .header-inner,
  .experts-page .site-header .header-inner,
  .talent-header,
  .profile-site-header {
    width: calc(100% - 16px) !important;
    min-height: 62px !important;
    border-radius: 18px !important;
  }

  .talent-header,
  .profile-site-header {
    top: 7px;
    margin-top: 7px !important;
  }

  .site-header .brand,
  .talent-header > .brand,
  .profile-site-header .profile-brand {
    width: 150px !important;
    height: 46px !important;
  }

  .project-detail-header.profile-site-header { gap: 8px; }
  .project-detail-header.profile-site-header .profile-primary-nav { gap: 0; }
  .project-detail-header.profile-site-header .profile-primary-nav > a:not(.profile-header-cta) { display: none; }
  .project-detail-header.profile-site-header .profile-primary-nav .profile-header-cta { padding: 9px 8px 9px 12px; font-size: 9px; }
  .project-detail-header.profile-site-header .profile-primary-nav .profile-header-cta span { width: 21px; height: 21px; font-size: 13px; }
}
