/* QC fix: keep the product dropdown visible and anchored on first load. */
.site-header {
  z-index: 220;
  overflow: visible;
}

.header-inner,
.main-nav,
.nav-dropdown {
  overflow: visible;
}

.nav-dropdown::before {
  top: 100%;
  z-index: 229;
}

.nav-menu {
  top: calc(100% + 8px);
  bottom: auto;
  z-index: 230;
  visibility: hidden;
  transform-origin: top center;
}

.nav-dropdown:hover .nav-menu,
.nav-dropdown:focus-within .nav-menu {
  visibility: visible;
}

@media (max-width: 760px) {
  .site-header {
    height: auto;
    overflow: visible;
  }

  .header-inner {
    overflow: visible;
  }

  .main-nav {
    overflow: visible;
    flex-wrap: wrap;
    row-gap: 4px;
    padding-bottom: 0;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-dropdown {
    overflow: visible;
  }

  .nav-dropdown::before {
    left: 50%;
    width: min(330px, calc(100vw - 24px));
    transform: translateX(-50%);
  }

  .nav-menu {
    top: calc(100% + 8px);
    left: 50%;
    width: min(330px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    transform: translate(-50%, 6px);
  }

  .nav-dropdown:hover .nav-menu,
  .nav-dropdown:focus-within .nav-menu {
    transform: translate(-50%, 0);
  }
}

@media (max-width: 420px) {
  .main-nav a {
    padding: 0 10px;
  }

  .main-nav .nav-menu a {
    padding: 8px 10px;
  }
}

/* QC-Copy header recommended proportions: wider, steadier product-site navigation. */
:root {
  --qc-header-height: 72px;
  --qc-header-width: 1360px;
  --qc-header-gutter: 56px;
  --qc-header-brand-width: 240px;
}

.site-header {
  height: var(--qc-header-height);
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid #e5edf5;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.045);
}

.page {
  min-height: calc(100vh - var(--qc-header-height));
}

.header-inner {
  width: min(var(--qc-header-width), calc(100% - var(--qc-header-gutter)));
  max-width: var(--qc-header-width);
  height: var(--qc-header-height);
  grid-template-columns: var(--qc-header-brand-width) minmax(0, 1fr);
  gap: 24px;
}

.brand {
  gap: 11px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  font-size: 22px;
  box-shadow: 0 12px 24px rgba(255, 90, 0, 0.24);
}

.brand strong {
  font-size: 18px;
  letter-spacing: 0;
}

.brand span:last-child {
  margin-top: 3px;
  color: #667085;
  font-size: 11.5px;
  font-weight: 850;
}

.main-nav {
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  min-height: 42px;
  padding: 0 18px;
  border-bottom-color: transparent;
  border-radius: 8px;
  color: #182235;
  font-size: 15px;
  font-weight: 850;
  line-height: 1;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.main-nav a.active,
.main-nav a:hover {
  color: #ff5a00;
  background: #fff4ec;
  box-shadow: inset 0 -2px 0 #ff5a00;
}

.main-nav a.active {
  border-bottom-color: transparent;
  border-radius: 8px;
}

.nav-dropdown > a {
  padding-right: 30px;
}

.nav-dropdown > a::after {
  right: 15px;
}

.nav-menu {
  top: calc(100% + 10px);
  width: 260px;
  padding: 8px;
  border: 1px solid #e5edf5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}

.main-nav .nav-menu a {
  min-height: auto;
  display: block;
  padding: 11px 12px;
  border-bottom: 0;
  border-radius: 8px;
  box-shadow: none;
  color: #182235;
  font-size: 13px;
  line-height: 1.35;
}

.main-nav .nav-menu a strong {
  display: block;
  color: #182235;
  font-size: 14px;
  font-weight: 900;
}

.main-nav .nav-menu a span {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
  font-weight: 760;
}

.main-nav .nav-menu a:hover,
.main-nav .nav-menu a.active {
  color: #ff5a00;
  background: #fff4ec;
  box-shadow: none;
}

@media (max-width: 920px) {
  :root {
    --qc-header-gutter: 32px;
  }

  .site-header {
    height: auto;
  }

  .header-inner {
    min-height: var(--qc-header-height);
    height: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 14px;
    padding: 10px 0;
  }

  .main-nav {
    flex: 1 0 100%;
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .main-nav a {
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }

  .nav-dropdown > a {
    padding-right: 24px;
  }

  .nav-dropdown > a::after {
    right: 10px;
  }
}

.form label.auth-remember,
.auth-form label.auth-remember {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-top: -2px;
  color: #475467;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.3;
}

.form label.auth-remember input,
.auth-form label.auth-remember input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  accent-color: #ff5a00;
}

.form label.auth-remember span,
.auth-form label.auth-remember span {
  color: inherit;
  white-space: nowrap;
}

@media (max-width: 520px) {
  :root {
    --qc-header-gutter: 24px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .brand strong {
    font-size: 17px;
  }

  .brand span:last-child {
    font-size: 11px;
  }

  .main-nav a {
    padding: 0 10px;
  }
}

/* Scheme C: compact dark data-platform navigation. */
:root {
  --qc-header-height: 52px;
  --qc-header-width: 1520px;
  --qc-header-gutter: 20px;
  --qc-header-brand-width: 154px;
  --qc-platform-bg: #071a2f;
  --qc-platform-bg-2: #0b2340;
  --qc-platform-line: rgba(226, 232, 240, 0.16);
}

.site-header {
  height: var(--qc-header-height);
  background: var(--qc-platform-bg);
  border-bottom: 1px solid var(--qc-platform-line);
  box-shadow: 0 10px 30px rgba(2, 8, 23, 0.18);
}

.page {
  min-height: calc(100vh - var(--qc-header-height));
}

.header-inner {
  width: min(var(--qc-header-width), calc(100% - var(--qc-header-gutter)));
  max-width: var(--qc-header-width);
  height: var(--qc-header-height);
  display: grid;
  grid-template-columns: var(--qc-header-brand-width) minmax(410px, auto) minmax(360px, 620px);
  gap: 16px;
  align-items: center;
}

.brand {
  gap: 8px;
  color: #fff;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: #ff5a00;
  color: #fff;
  font-size: 19px;
  box-shadow: 0 10px 20px rgba(255, 90, 0, 0.22);
}

.brand strong {
  color: #fff;
  font-size: 17px;
  font-weight: 950;
}

.brand span:last-child {
  display: none;
}

.main-nav {
  justify-content: flex-start;
  gap: 2px;
}

.main-nav a {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  box-shadow: none;
}

.main-nav a.active,
.main-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 -2px 0 #ff5a00;
}

.main-nav a.active {
  border-bottom-color: transparent;
  border-radius: 4px;
}

.nav-dropdown > a {
  padding-right: 24px;
}

.nav-dropdown > a::after {
  right: 10px;
  border-top-color: rgba(255, 255, 255, 0.8);
}

.nav-menu {
  top: calc(100% + 7px);
  width: 270px;
  padding: 8px;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 8px;
  background: #0b2340;
  box-shadow: 0 18px 42px rgba(2, 8, 23, 0.38);
}

.main-nav .nav-menu a {
  padding: 10px 11px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  box-shadow: none;
}

.main-nav .nav-menu a strong {
  color: #fff;
  font-size: 13px;
}

.main-nav .nav-menu a span {
  color: rgba(219, 234, 254, 0.72);
  font-size: 12px;
}

.main-nav .nav-menu a:hover,
.main-nav .nav-menu a.active {
  color: #fff;
  background: rgba(255, 90, 0, 0.18);
  box-shadow: none;
}

.header-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.platform-search {
  flex: 1 1 360px;
  min-width: 260px;
  height: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.24);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.96);
}

.platform-search:focus-within {
  border-color: rgba(255, 90, 0, 0.85);
  box-shadow: 0 0 0 3px rgba(255, 90, 0, 0.16);
}

.platform-search input {
  min-width: 0;
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  padding: 0 10px;
  color: #182235;
  background: transparent;
  font-size: 12px;
  font-weight: 760;
}

.platform-search input::placeholder {
  color: #667085;
}

.platform-search button {
  height: 100%;
  border: 0;
  border-left: 1px solid #dbe5f0;
  background: #f8fafc;
  color: #315f9e;
  font-size: 12px;
  font-weight: 900;
}

.platform-search button:hover {
  color: #ff5a00;
  background: #fff4ec;
}

.header-login,
.header-locale {
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.header-login {
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0 11px;
  background: rgba(255, 255, 255, 0.08);
}

.header-login[hidden] {
  display: none !important;
}

.header-login:hover {
  color: #fff;
  border-color: rgba(255, 90, 0, 0.72);
  background: rgba(255, 90, 0, 0.22);
}

.member-menu {
  position: relative;
  z-index: 70;
  display: inline-flex;
  align-items: center;
}

.member-trigger {
  height: 32px;
  max-width: 178px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  padding: 0 9px 0 7px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.member-trigger:hover,
.member-menu.open .member-trigger {
  color: #fff;
  border-color: rgba(255, 90, 0, 0.72);
  background: rgba(255, 90, 0, 0.22);
}

.member-avatar {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #ff7a1a, #ff4a00);
  box-shadow: 0 7px 16px rgba(255, 90, 0, 0.28);
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
}

.member-trigger-text {
  min-width: 0;
  display: grid;
  gap: 1px;
  text-align: left;
  line-height: 1.05;
}

.member-trigger-text strong,
.member-trigger-text span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-trigger-text strong {
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.member-trigger-text span {
  max-width: 98px;
  color: rgba(219, 234, 254, 0.72);
  font-size: 10px;
  font-weight: 820;
}

.member-caret {
  color: rgba(219, 234, 254, 0.76);
  font-size: 10px;
}

.member-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 252px;
  display: none;
  padding: 8px;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.20);
}

.member-menu.open .member-dropdown {
  display: block;
}

.member-dropdown::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 24px;
  width: 10px;
  height: 10px;
  border-left: 1px solid #dbe5f0;
  border-top: 1px solid #dbe5f0;
  background: #fff;
  transform: rotate(45deg);
}

.member-summary {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 9px 10px 11px;
  border-bottom: 1px solid #edf2f7;
  color: #0b1728;
}

.member-summary .member-avatar {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  font-size: 14px;
}

.member-summary strong,
.member-summary small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-summary strong {
  color: #0b1728;
  font-size: 13px;
  font-weight: 950;
}

.member-summary small {
  margin-top: 3px;
  color: #667085;
  font-size: 11px;
  font-weight: 820;
}

.member-dropdown a,
.member-dropdown button {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  color: #182235;
  background: transparent;
  font-size: 13px;
  font-weight: 880;
  text-align: left;
  text-decoration: none;
}

.member-dropdown a:hover,
.member-dropdown button:hover {
  color: #ff5a00;
  background: #fff4ec;
}

.member-dropdown em {
  color: #667085;
  font-style: normal;
  font-size: 11px;
  font-weight: 820;
}

.member-dropdown button {
  margin-top: 4px;
  color: #b42318;
  cursor: pointer;
}

.header-locale {
  padding: 0 6px;
  color: rgba(219, 234, 254, 0.82);
}

@media (max-width: 1180px) {
  .header-inner {
    grid-template-columns: var(--qc-header-brand-width) minmax(350px, auto) minmax(260px, 1fr);
    gap: 10px;
  }

  .main-nav a {
    padding: 0 9px;
  }

  .platform-search {
    min-width: 220px;
  }
}

@media (max-width: 920px) {
  .site-header {
    height: auto;
  }

  .header-inner {
    min-height: var(--qc-header-height);
    height: auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 10px;
    padding: 8px 0;
  }

  .brand {
    grid-column: 1;
  }

  .header-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: stretch;
    order: 3;
  }

  .main-nav {
    grid-column: 1 / -1;
    grid-row: 3;
    overflow-x: auto;
    justify-content: flex-start;
    gap: 4px;
    order: 4;
    padding-bottom: 0;
  }

  .main-nav a {
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }

  .platform-search {
    flex-basis: 100%;
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .header-actions {
    flex-wrap: wrap;
  }

  .platform-search {
    flex: 1 0 100%;
  }

  .header-login,
  .header-locale {
    height: 30px;
  }
}

/* Readability pass for Scheme C. */
:root {
  --qc-header-brand-width: 188px;
}

.header-inner {
  grid-template-columns: var(--qc-header-brand-width) minmax(430px, auto) minmax(360px, 620px);
}

.brand > span:last-child {
  display: block;
  min-width: 0;
}

.brand > span > span {
  display: none;
}

.brand strong {
  display: block;
  color: #fff;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: 0;
}

.main-nav a {
  min-height: 38px;
  padding: 0 13px;
  color: #fff;
  font-size: 14px;
  font-weight: 920;
  text-shadow: 0 1px 1px rgba(2, 8, 23, 0.22);
}

.main-nav a.active,
.main-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.nav-dropdown > a::after {
  border-top-color: #fff;
  opacity: 0.9;
}

@media (max-width: 1180px) {
  .header-inner {
    grid-template-columns: var(--qc-header-brand-width) minmax(380px, auto) minmax(240px, 1fr);
  }

  .main-nav a {
    padding: 0 10px;
    font-size: 13px;
  }
}

@media (max-width: 920px) {
  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .main-nav a {
    min-height: 34px;
    padding: 0 10px;
    font-size: 13px;
  }
}

/* Larger Scheme C pass: keep the dark platform style, but give the menu more presence. */
:root {
  --qc-header-height: 62px;
  --qc-header-brand-width: 216px;
}

.site-header {
  height: var(--qc-header-height);
  min-height: var(--qc-header-height);
}

.header-inner {
  height: var(--qc-header-height);
  min-height: var(--qc-header-height);
  grid-template-columns: var(--qc-header-brand-width) minmax(490px, auto) minmax(390px, 650px);
  gap: 18px;
}

.brand {
  gap: 10px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  font-size: 22px;
}

.brand strong {
  font-size: 19px;
}

.main-nav {
  gap: 4px;
}

.main-nav a {
  min-height: 42px;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 920;
}

.nav-dropdown > a {
  padding-right: 30px;
}

.nav-dropdown > a::after {
  right: 14px;
}

.platform-search {
  height: 38px;
  grid-template-columns: minmax(0, 1fr) 60px;
}

.platform-search input {
  padding: 0 12px;
  font-size: 13px;
}

.platform-search button {
  font-size: 13px;
}

.header-login,
.header-locale {
  height: 38px;
  font-size: 13px;
}

.header-login {
  padding: 0 14px;
}

@media (max-width: 1280px) {
  .header-inner {
    grid-template-columns: 196px minmax(430px, auto) minmax(300px, 1fr);
    gap: 12px;
  }

  .main-nav a {
    padding: 0 12px;
    font-size: 14px;
  }
}

@media (max-width: 920px) {
  .site-header {
    height: auto;
  }

  .header-inner {
    min-height: var(--qc-header-height);
    height: auto;
    grid-template-columns: 1fr auto;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .brand strong {
    font-size: 18px;
  }

  .main-nav a {
    min-height: 38px;
    padding: 0 12px;
    font-size: 14px;
  }

  .platform-search {
    height: 36px;
  }
}
