.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 80px;
  background: rgba(251, 252, 250, 0.97);
  border-bottom: 1px solid #dadcd8;
  backdrop-filter: blur(14px);
}
.header-inner {
  height: 80px;
  display: flex;
  align-items: center;
  gap: 45px;
}
.brand {
  width: 200px;
  height: 64px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}
.brand img {
  width: 200px;
  height: 53px;
  flex: 0 0 auto;
}
.main-nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 41px;
  flex: 1 1 auto;
  min-width: 0;
}
.main-nav a {
  height: 42px;
  display: flex;
  align-items: center;
  font-size: 16px;
  line-height: 16px;
  white-space: nowrap;
}
.main-nav a.active,
.main-nav a[aria-current="page"] {
  color: var(--forest);
  text-decoration-line: underline;
  text-decoration-color: var(--forest);
  text-decoration-thickness: 2px;
  text-underline-offset: 12px;
  text-decoration-skip-ink: none;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.header-sandbox-status {
  min-width: 164px;
  min-height: 48px;
  padding: 7px 14px;
  border: 1px solid #b7d4c7;
  border-radius: 8px;
  background: #f2f8f5;
  color: #064d38;
  display: inline-flex;
  align-items: center;
  gap: 11px;
}
.header-sandbox-status__dot {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #18ad67;
  box-shadow: 0 0 0 4px rgb(24 173 103 / 13%);
}
.header-sandbox-status__copy {
  display: grid;
  gap: 2px;
  font-size: 11px;
  line-height: 1.05;
  white-space: nowrap;
}
.header-sandbox-status__copy strong {
  font-size: 14px;
  line-height: 1.05;
}
.header-login {
  min-width: 90px;
  height: 48px;
  padding: 0 16px 2px;
  line-height: 1;
  background: #fff;
}
.header-login:hover {
  background: #f3f7ff;
}
.header-button {
  min-width: 145px;
  height: 48px;
  padding: 0 22px 2px;
  line-height: 1;
}
.language {
  position: relative;
}
.language summary {
  width: 68px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  list-style: none;
  cursor: pointer;
  font-size: 14px;
}
.language summary::-webkit-details-marker {
  display: none;
}
.language summary i {
  width: 7px;
  height: 7px;
  border-right: 1px solid;
  border-bottom: 1px solid;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.18s ease;
}
.language[open] summary i {
  transform: translateY(2px) rotate(225deg);
}
.language-menu {
  position: absolute;
  top: 52px;
  right: 0;
  z-index: 10;
  width: 202px;
  max-height: min(70vh, 520px);
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding: 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(23, 28, 24, 0.14);
}
.language:not([open]) .language-menu {
  display: none;
}
.language-menu button {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.language-menu button:hover,
.language-menu button[aria-selected="true"] {
  color: var(--forest);
  background: #edf4f0;
}

@media (max-width: 1100px) {
  .header-inner {
    gap: 22px;
  }
  .main-nav {
    gap: 20px;
  }
}

@media (max-width: 1365px) {
  .site-header {
    height: auto;
  }
  .header-inner {
    min-height: 0;
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
  }
  .brand {
    width: 145px;
    height: 48px;
  }
  .brand img {
    width: 145px;
    height: auto;
  }
  .header-actions {
    order: 2;
    width: 100%;
    gap: 10px;
    margin-left: 0;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  .header-button {
    min-width: 120px;
    padding: 0 14px 2px;
  }
  .header-login {
    min-width: 78px;
    padding: 0 12px 2px;
  }
  .main-nav {
    order: 3;
    width: 100%;
    height: 42px;
    justify-content: flex-start;
    gap: 24px;
    overflow-x: auto;
  }
}

/* Central uses the original public rail/gaps. Only account actions use the existing
   accommodation; mobile-navigation measures the actual remaining space. */
@media (max-width:1365px) {
  .customer-workspace-body .site-header { line-height: 1.55; }
  .customer-workspace-body .header-inner { width:100%; padding-inline:20px; }
}
@media (max-width:420px) { .customer-workspace-body .header-inner { padding-inline:16px; } }
:is(.customer-workspace-body, .central-public-account-shell) .site-header .header-actions form { margin: 0; display: flex; }
:is(.customer-workspace-body, .central-public-account-shell) .site-header .header-actions .button { min-width: 0; height: 48px; padding-inline: 16px; }

.mobile-navigation-enabled .site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 68px;
  height: auto;
}
.mobile-navigation-enabled .header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  height: auto;
  min-height: 68px;
  padding-block: 9px;
}
.mobile-navigation-enabled .brand {
  width: min(172px, 65vw);
}
.mobile-navigation-enabled .brand img {
  width: 100%;
  height: auto;
}
.mobile-navigation-enabled .mobile-menu-toggle {
  display: inline-grid;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border: 1px solid #bdc8c2;
  border-radius: 7px;
  background: #fff;
  color: #10221b;
}
.mobile-navigation-enabled .mobile-menu-toggle[hidden] {
  display: none;
}
.mobile-navigation-enabled .mobile-menu-icon,
.mobile-navigation-enabled .mobile-menu-icon::before,
.mobile-navigation-enabled .mobile-menu-icon::after {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  content: "";
}
.mobile-navigation-enabled .mobile-menu-icon {
  position: relative;
}
.mobile-navigation-enabled .mobile-menu-icon::before,
.mobile-navigation-enabled .mobile-menu-icon::after {
  position: absolute;
  left: 0;
}
.mobile-navigation-enabled .mobile-menu-icon::before {
  top: -7px;
}
.mobile-navigation-enabled .mobile-menu-icon::after {
  top: 7px;
}
.mobile-navigation-enabled .mobile-menu-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.mobile-navigation-enabled .main-nav,
.mobile-navigation-enabled .header-actions {
  grid-column: 1 / -1;
}
.mobile-navigation-enabled .header-inner {
  grid-template-columns: minmax(0, 1fr) auto auto;
}
.mobile-navigation-enabled .header-inner > .language {
  grid-column: 2;
  grid-row: 1;
  width: auto;
  justify-self: end;
}
.mobile-navigation-enabled .mobile-menu-toggle {
  grid-column: 3;
  grid-row: 1;
}
.mobile-navigation-enabled .main-nav[hidden],
.mobile-navigation-enabled .header-actions[hidden] {
  display: none;
}

@media (max-width: 360px) {
.mobile-navigation-enabled .header-inner {
    gap: 6px;
  }
.mobile-navigation-enabled .brand {
    width: 132px;
  }
}
.mobile-navigation-enabled .main-nav {
  order: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
  width: 100%;
  height: auto;
  gap: 0;
  padding-top: 8px;
  overflow: visible;
  border-top: 1px solid #d8dfdb;
}
.mobile-navigation-enabled .main-nav a {
  min-height: 46px;
  padding: 12px 2px;
  border-bottom: 1px solid #edf0ee;
}
.mobile-navigation-enabled .header-actions {
  order: 3;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 100%;
  padding-bottom: 10px;
}
.mobile-navigation-enabled .header-actions .language,
.mobile-navigation-enabled .header-actions .button {
  width: 100%;
}
.mobile-navigation-enabled .header-actions .header-button {
  grid-column: 1 / -1;
}
.mobile-navigation-enabled .header-actions .header-login {
  grid-column: 1 / -1;
}
.mobile-navigation-enabled .header-actions .header-sandbox-status {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  justify-content: center;
}
.mobile-navigation-enabled .language summary {
  min-height: var(--mobile-control-height);
}
.mobile-navigation-enabled .language-menu {
  right: 0;
  left: auto;
  width: min(202px, calc(100vw - 32px));
  overflow-x: hidden;
}
.mobile-navigation-enabled .language-menu button {
  min-height: 44px;
  overflow-wrap: normal;
  white-space: nowrap;
}


.mobile-navigation-enabled .brand { width: min(172px, 100%); min-width: 0; height: auto; }
.mobile-navigation-enabled .header-actions form { width: 100%; }
.mobile-navigation-enabled .header-actions .button { width: 100%; height: auto; min-height: 48px; padding: 12px 18px; white-space: normal; }
.site-header .language-menu a { display: block; padding: 10px 12px; color: inherit; font-size: 14px; }
.site-header .language-menu a:hover, .site-header .language-menu a[aria-selected="true"] { color: var(--forest); background: #edf4f0; }

/* Reuse the existing compact action rhythm only when rendered account controls need it. */
:is(.customer-workspace-body, .central-public-account-shell) .header-actions[data-content-fit="compact"] { gap:10px; }
:is(.customer-workspace-body, .central-public-account-shell) .header-actions[data-content-fit="compact"] .button { padding-inline:14px; }
