.neo-unified-header {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
  position: relative;
  color: var(--text-primary, #172033);
  font: 500 13px/1.2 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.neo-unified-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  font-weight: 700;
  font-size: 13px;
}
.neo-unified-brand img { width: 25px; height: 25px; object-fit: contain; }
.neo-unified-controls { display: inline-flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; min-width: 0; }
.neo-unified-back,
.neo-unified-locale-button,
.neo-unified-signin,
.neo-unified-avatar {
  box-sizing: border-box;
  min-height: 36px;
  border: 1px solid var(--border-color, rgba(120,130,150,.35));
  border-radius: 9px;
  background: var(--card-bg, rgba(255,255,255,.76));
  color: inherit;
  font: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  cursor: pointer;
  white-space: nowrap;
}
.neo-unified-back { gap: 4px; }
.neo-unified-signin { font-weight: 650; }
.neo-unified-avatar {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  font-weight: 700;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border-color: transparent;
}
.neo-unified-locale { position: relative; }
.neo-unified-locale .neo-lang-btn { min-width: 42px; min-height: 36px; height: 36px; padding: 0 7px; font-size: 12px; font-weight: 700; }
.neo-unified-locale .neo-lang-dropdown { min-width: 142px; max-height: min(60vh, 340px); overflow-y: auto; }
.neo-unified-profile {
  display: none;
  position: fixed;
  top: calc(54px + env(safe-area-inset-top, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  z-index: 10030;
  width: min(340px, calc(100vw - 24px));
  max-height: calc(100vh - 70px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  max-height: calc(100dvh - 70px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  background: var(--card-bg, #fff);
}
.neo-unified-profile[style*="display: block"] { display: flex !important; flex-direction: column; }
.neo-unified-profile-body { min-height: 0; overflow-y: auto; flex: 1 1 auto; -webkit-overflow-scrolling: touch; }
.neo-unified-logout-row {
  position: sticky;
  bottom: 0;
  z-index: 1;
  flex: 0 0 auto;
  background: var(--card-bg, #fff);
  padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
}
.neo-unified-profile .home-profile-logout-section {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: var(--bg-elevated, var(--card-bg, #fff));
  padding-bottom: max(8px, env(safe-area-inset-bottom, 0px)) !important;
}
/* Generic shared profile card is self-contained: some consumers (including
   the public home shell) intentionally do not load styles.css. Keep these
   selectors off Portal's reused .home-profile-dropdown to preserve its
   established profile component styling. */
.neo-unified-profile:not(.home-profile-dropdown) {
  display: none;
  flex-direction: column;
  overflow: hidden;
  max-height: calc(100vh - 70px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  max-height: calc(100dvh - 70px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  width: min(360px, calc(100vw - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  box-sizing: border-box;
  padding: 0;
  border: 1px solid #d9dfeb;
  border-radius: 16px;
  color: #172033;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .24);
}
.neo-unified-profile:not(.home-profile-dropdown)[style*="display: block"] {
  display: flex !important;
}
.neo-unified-profile:not(.home-profile-dropdown) .profile-dd-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid #e6eaf0;
}
.neo-unified-profile:not(.home-profile-dropdown) .profile-dd-avatar {
  display: flex;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}
.neo-unified-profile:not(.home-profile-dropdown) .profile-dd-identity {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  gap: 3px;
}
.neo-unified-profile:not(.home-profile-dropdown) .profile-dd-name {
  display: block;
  overflow-wrap: anywhere;
  color: #172033;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}
.neo-unified-profile:not(.home-profile-dropdown) .profile-dd-email {
  display: block;
  overflow-wrap: anywhere;
  color: #687386;
  font-size: 12px;
  line-height: 1.35;
}
.neo-unified-profile:not(.home-profile-dropdown) .neo-unified-wallet {
  display: block;
  flex: 0 0 auto;
  padding: 12px 16px;
  border-bottom: 1px solid #e6eaf0;
}
.neo-unified-profile:not(.home-profile-dropdown) .neo-unified-wallet[hidden] {
  display: none !important;
}
.neo-unified-profile:not(.home-profile-dropdown) .profile-dd-section-title {
  display: block;
  margin: 0 0 8px;
  color: #687386;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.neo-unified-profile:not(.home-profile-dropdown) .profile-dd-wallet {
  display: block;
}
.neo-unified-profile:not(.home-profile-dropdown) .profile-dd-wallet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.neo-unified-profile:not(.home-profile-dropdown) .profile-dd-wallet-label {
  display: block;
  color: #687386;
  font-size: 12px;
}
.neo-unified-profile:not(.home-profile-dropdown) .profile-dd-wallet-value {
  display: block;
  color: #172033;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}
.neo-unified-profile:not(.home-profile-dropdown) .neo-unified-profile-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  padding: 7px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.neo-unified-profile:not(.home-profile-dropdown) .profile-dd-link {
  display: flex !important;
  flex: 0 0 auto;
  align-items: center;
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  padding: 9px 10px;
  border-radius: 8px;
  color: #253047;
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
}
.neo-unified-profile:not(.home-profile-dropdown) .profile-dd-link:hover,
.neo-unified-profile:not(.home-profile-dropdown) .profile-dd-link:focus-visible {
  background: #f1f4fa;
  color: #4338ca;
}
.neo-unified-profile:not(.home-profile-dropdown) .neo-unified-logout-row {
  display: block;
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding: 9px 12px max(9px, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #e6eaf0;
  background: #fff;
}
.neo-unified-profile:not(.home-profile-dropdown) .profile-dd-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  padding: 8px 12px;
  border: 1px solid #efcaca;
  border-radius: 9px;
  background: #fff7f7;
  color: #a12b2b;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.neo-unified-profile:not(.home-profile-dropdown) .profile-dd-logout:hover,
.neo-unified-profile:not(.home-profile-dropdown) .profile-dd-logout:focus-visible {
  background: #ffeded;
  border-color: #e3aaaa;
}
html[data-theme="dark"] .neo-unified-profile:not(.home-profile-dropdown) {
  border-color: #3b465a;
  color: #edf2fb;
  background: #111827;
}
html[data-theme="dark"] .neo-unified-profile:not(.home-profile-dropdown) .profile-dd-header,
html[data-theme="dark"] .neo-unified-profile:not(.home-profile-dropdown) .neo-unified-wallet {
  border-color: #303a4d;
}
html[data-theme="dark"] .neo-unified-profile:not(.home-profile-dropdown) .profile-dd-name,
html[data-theme="dark"] .neo-unified-profile:not(.home-profile-dropdown) .profile-dd-wallet-value {
  color: #edf2fb;
}
html[data-theme="dark"] .neo-unified-profile:not(.home-profile-dropdown) .profile-dd-email,
html[data-theme="dark"] .neo-unified-profile:not(.home-profile-dropdown) .profile-dd-section-title,
html[data-theme="dark"] .neo-unified-profile:not(.home-profile-dropdown) .profile-dd-wallet-label {
  color: #aab5c7;
}
html[data-theme="dark"] .neo-unified-profile:not(.home-profile-dropdown) .profile-dd-link {
  color: #e1e8f5;
}
html[data-theme="dark"] .neo-unified-profile:not(.home-profile-dropdown) .profile-dd-link:hover,
html[data-theme="dark"] .neo-unified-profile:not(.home-profile-dropdown) .profile-dd-link:focus-visible {
  background: #202b40;
  color: #c4b5fd;
}
html[data-theme="dark"] .neo-unified-profile:not(.home-profile-dropdown) .neo-unified-logout-row {
  border-color: #303a4d;
  background: #111827;
}
html[data-theme="dark"] .neo-unified-profile:not(.home-profile-dropdown) .profile-dd-logout {
  border-color: #754646;
  background: #351d24;
  color: #ffb8b8;
}
html[data-theme="dark"] .neo-unified-profile:not(.home-profile-dropdown) .profile-dd-logout:hover,
html[data-theme="dark"] .neo-unified-profile:not(.home-profile-dropdown) .profile-dd-logout:focus-visible {
  background: #47232c;
}
/* Both established authenticated dropdowns are reparented to body by the
   shared mount. Override their legacy absolute/overflow rules and give the
   whole menu a real viewport-bounded touch scroller. */
#profileDropdown.neo-unified-profile,
#homeProfileDropdown.home-profile-dropdown.neo-unified-profile {
  position: fixed !important;
  top: calc(46px + env(safe-area-inset-top, 0px)) !important;
  right: max(8px, env(safe-area-inset-right, 0px)) !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 2147483000 !important;
  width: min(340px, calc(100vw - 16px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px))) !important;
  max-width: none !important;
  max-height: calc(100vh - 54px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
  max-height: calc(100dvh - 54px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  background-color: var(--bg-elevated, var(--pub-card, #fff)) !important;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .3) !important;
}
#profileDropdown.neo-unified-profile[style*="display: block"],
#homeProfileDropdown.home-profile-dropdown.neo-unified-profile[style*="display: block"] {
  display: flex !important;
  flex-direction: column;
}
#profileDropdown.neo-unified-profile .profile-dd-footer,
#homeProfileDropdown.home-profile-dropdown.neo-unified-profile .home-profile-logout-section {
  position: sticky !important;
  bottom: 0 !important;
  z-index: 2147483001 !important;
  flex: 0 0 auto;
  background: var(--bg-elevated, var(--pub-card, #fff)) !important;
  box-shadow: 0 -8px 14px rgba(15, 23, 42, .08);
  padding-bottom: max(10px, env(safe-area-inset-bottom, 0px)) !important;
}
/* Portal does not load styles.css, so style its preserved profile component
   locally; the SPA menu above continues using its existing profile styles. */
#homeProfileDropdown.home-profile-dropdown.neo-unified-profile .profile-dd-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--pub-card-border, #e2e8f0);
  background: var(--pub-card, #fff);
}
#homeProfileDropdown.home-profile-dropdown.neo-unified-profile .profile-dd-avatar {
  display: flex;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--pub-gradient, linear-gradient(135deg, #2563eb, #7c3aed));
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}
#homeProfileDropdown.home-profile-dropdown.neo-unified-profile .profile-dd-identity {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  gap: 3px;
}
#homeProfileDropdown.home-profile-dropdown.neo-unified-profile .profile-dd-name,
#homeProfileDropdown.home-profile-dropdown.neo-unified-profile .profile-dd-email {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
  color: var(--pub-text, #0f172a);
}
#homeProfileDropdown.home-profile-dropdown.neo-unified-profile .profile-dd-name {
  font-size: 14px;
  font-weight: 700;
}
#homeProfileDropdown.home-profile-dropdown.neo-unified-profile .profile-dd-email {
  color: var(--pub-text2, #475569);
  font-size: 12px;
}
#homeProfileDropdown.home-profile-dropdown.neo-unified-profile .profile-dd-section {
  display: block;
  flex: 0 0 auto;
  padding: 10px 14px;
  border-bottom: 1px solid var(--pub-card-border, #e2e8f0);
}
#homeProfileDropdown.home-profile-dropdown.neo-unified-profile .profile-dd-section-title {
  display: block;
  margin: 0 0 7px;
  color: var(--pub-text3, #64748b);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
#homeProfileDropdown.home-profile-dropdown.neo-unified-profile .profile-dd-wallet {
  display: block;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--pub-card-border, #e2e8f0);
  border-radius: 9px;
  background: var(--pub-bg2, #f3f7fc);
}
#homeProfileDropdown.home-profile-dropdown.neo-unified-profile .profile-dd-wallet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
}
#homeProfileDropdown.home-profile-dropdown.neo-unified-profile .profile-dd-wallet-label {
  color: var(--pub-text2, #475569);
  font-size: 12px;
}
#homeProfileDropdown.home-profile-dropdown.neo-unified-profile .profile-dd-wallet-value {
  color: var(--pub-text, #0f172a);
  font-size: 12px;
  font-weight: 700;
}
#homeProfileDropdown.home-profile-dropdown.neo-unified-profile .profile-dd-link {
  display: flex !important;
  align-items: center;
  width: 100%;
  min-height: 40px;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--pub-text2, #475569);
  font: inherit;
  font-size: 13px;
  line-height: 1.35;
  text-align: start;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
}
#homeProfileDropdown.home-profile-dropdown.neo-unified-profile .profile-dd-link:hover,
#homeProfileDropdown.home-profile-dropdown.neo-unified-profile .profile-dd-link:focus-visible {
  background: var(--pub-bg2, #f3f7fc);
  color: var(--pub-blue, #2563eb);
}
#homeProfileDropdown.home-profile-dropdown.neo-unified-profile .profile-dd-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  border: 1px solid rgba(220, 38, 38, .28);
  border-radius: 9px;
  background: rgba(220, 38, 38, .06);
  color: #b42323;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
html[data-theme="dark"] #homeProfileDropdown.home-profile-dropdown.neo-unified-profile {
  background-color: var(--pub-card, #1e293b) !important;
  border-color: var(--pub-card-border, #334155);
}
html[data-theme="dark"] #homeProfileDropdown.home-profile-dropdown.neo-unified-profile .profile-dd-header {
  background: var(--pub-card, #1e293b);
  border-color: var(--pub-card-border, #334155);
}
html[data-theme="dark"] #homeProfileDropdown.home-profile-dropdown.neo-unified-profile .profile-dd-section {
  border-color: var(--pub-card-border, #334155);
}
html[data-theme="dark"] #homeProfileDropdown.home-profile-dropdown.neo-unified-profile .profile-dd-wallet {
  border-color: var(--pub-card-border, #334155);
  background: var(--pub-bg2, #0f172a);
}
html[data-theme="dark"] #homeProfileDropdown.home-profile-dropdown.neo-unified-profile .profile-dd-name,
html[data-theme="dark"] #homeProfileDropdown.home-profile-dropdown.neo-unified-profile .profile-dd-wallet-value {
  color: var(--pub-text, #f1f5f9);
}
html[data-theme="dark"] #homeProfileDropdown.home-profile-dropdown.neo-unified-profile .profile-dd-email,
html[data-theme="dark"] #homeProfileDropdown.home-profile-dropdown.neo-unified-profile .profile-dd-wallet-label,
html[data-theme="dark"] #homeProfileDropdown.home-profile-dropdown.neo-unified-profile .profile-dd-section-title {
  color: var(--pub-text2, #94a3b8);
}
html[data-theme="dark"] #homeProfileDropdown.home-profile-dropdown.neo-unified-profile .home-profile-logout-section {
  background: var(--pub-card, #1e293b) !important;
  border-color: var(--pub-card-border, #334155);
}
html[data-theme="dark"] #homeProfileDropdown.home-profile-dropdown.neo-unified-profile .profile-dd-logout {
  border-color: #754646;
  background: #351d24;
  color: #ffb8b8;
}
.neo-unified-theme-mount { display: inline-flex; align-items: center; }
.neo-unified-theme-mount .neo-theme-toggle { min-width: 36px; min-height: 36px; }
.neo-unified-header [hidden] { display: none !important; }
.neo-unified-header[data-neo-unified-mounted="true"] ~ #homeProfileBtn,
header:has(.neo-unified-header) #homeProfileBtn { display: none !important; }
@media (max-width: 640px) {
  .neo-unified-header { gap: 5px; }
  .neo-unified-controls { gap: 4px; }
  .neo-unified-brand span { display: none; }
  .neo-unified-back,
  .neo-unified-signin,
  .neo-unified-avatar { min-height: 38px; }
  .neo-unified-back { padding: 0 7px; }
}
/* Portal's pre-existing narrow header uses a 12-column grid for product
   links. Put the shared controls on one full-width grid row so the inner
   Back / locale / theme / Sign In controls stay in a compact horizontal bar. */
@media (max-width: 700px) {
  body.neo-portal-brand-background .home-header-actions > .neo-unified-header {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    width: 100%;
    min-width: 0;
  }
  body.neo-portal-brand-background .home-header-actions > .neo-unified-header .neo-unified-controls {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 4px;
  }
}
@media (max-width: 360px) {
  .neo-unified-header { gap: 3px; }
  .neo-unified-controls { gap: 3px; }
  .neo-unified-back { font-size: 12px; padding: 0 5px; }
  .neo-unified-theme-mount .neo-theme-toggle { width: 36px; }
}

/* Shared family layout: keep left navigation and right-side utilities as
   atomic groups. Flex wrapping can move the whole utility group, never one
   control at a time. */
.neo-unified-header {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  width: auto;
  min-width: 0;
  color: inherit;
  font-family: inherit;
}
.neo-unified-leading {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: max-content;
  gap: 8px;
}
.neo-unified-controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  min-width: 0;
  gap: 6px;
}
.neo-unified-back,
.neo-unified-sections,
.neo-unified-menu,
.neo-unified-signin,
.neo-unified-avatar,
.neo-unified-locale .neo-lang-btn,
.neo-unified-theme-mount .neo-theme-toggle {
  box-sizing: border-box;
  min-height: 44px;
  height: 44px;
  border-radius: 10px;
  font: inherit;
}
.neo-unified-back {
  display: inline-flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  padding: 0;
  border: 1px solid var(--border-color, rgba(120, 130, 150, .35));
  background: var(--card-bg, rgba(255, 255, 255, .76));
  color: inherit;
}
.neo-unified-back-icon { font-size: 22px; line-height: 1; }
.neo-unified-back[hidden] { display: none !important; }
#themeButton[hidden] { display: none !important; }
.neo-unified-brand {
  flex: 0 0 auto;
  min-width: 0;
  font-size: 13px;
}
.neo-unified-brand img { width: 28px; height: 28px; }
.neo-unified-sections {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0 12px;
  border: 1px solid var(--border-color, rgba(120, 130, 150, .35));
  background: var(--card-bg, rgba(255, 255, 255, .76));
  color: var(--text-primary, #172033);
  text-decoration: none;
  white-space: nowrap;
}
.neo-unified-menu {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--border-color, rgba(120, 130, 150, .35));
  background: var(--card-bg, rgba(255, 255, 255, .76));
  color: inherit;
  white-space: nowrap;
}
.neo-unified-signin {
  min-height: 44px;
  padding: 0 12px;
  color: var(--text-primary, #172033);
}
html[data-theme="dark"] .neo-unified-header .neo-unified-sections,
html[data-theme="dark"] .neo-unified-header .neo-unified-signin {
  background: #1d2a40;
  color: #f8fafc;
  border-color: rgba(180, 200, 230, .26);
}
.agents-topbar .neo-unified-sections {
  background: var(--agents-panel);
  color: var(--agents-ink);
  border-color: var(--agents-line);
}
.neo-unified-avatar {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-height: 44px;
  border-radius: 50%;
}
.neo-unified-locale { display: inline-flex; align-items: center; }
.neo-unified-locale .neo-lang-btn {
  min-width: 44px;
  width: auto;
  padding: 0 8px;
}
.neo-unified-theme-mount { display: inline-flex; align-items: center; }
.neo-unified-theme-mount .neo-theme-toggle {
  width: 44px;
  min-width: 44px;
}
.neo-unified-controls > * { flex: 0 0 auto; }
.neo-unified-header [hidden] { display: none !important; }
.neo-unified-back:focus-visible,
.neo-unified-sections:focus-visible,
.neo-unified-brand:focus-visible,
.neo-unified-menu:focus-visible,
.neo-unified-signin:focus-visible,
.neo-unified-avatar:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
.neo-unified-profile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10029;
  background: rgba(8, 16, 30, .28);
  -webkit-tap-highlight-color: transparent;
}
.neo-unified-profile-backdrop[hidden] { display: none !important; }
.neo-unified-section-menu {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  z-index: 120;
  width: min(270px, calc(100vw - 28px));
  max-height: min(60dvh, 420px);
  overflow-y: auto;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--border-color, #bcc9dc);
  border-radius: 12px;
  background: var(--card-bg, #fff);
  box-shadow: 0 14px 35px rgba(8, 17, 36, .2);
}
.neo-unified-section-menu[hidden] { display: none !important; }
.neo-unified-section-menu a {
  display: block !important;
  padding: 10px;
  border-radius: 8px;
  color: var(--text-primary, #172033);
  text-decoration: none;
}
html[data-theme="dark"] .neo-unified-section-menu {
  background: #1d2a40;
}
html[data-theme="dark"] .neo-unified-section-menu a { color: #f8fafc; }
.neo-unified-profile {
  z-index: 10030;
  top: var(--neo-profile-top, calc(54px + env(safe-area-inset-top, 0px)));
  right: var(--neo-profile-right, max(12px, env(safe-area-inset-right, 0px)));
  max-height: calc(100vh - var(--neo-profile-top, 54px) - 12px - env(safe-area-inset-bottom, 0px));
  max-height: calc(100dvh - var(--neo-profile-top, 54px) - 12px - env(safe-area-inset-bottom, 0px));
}
#profileDropdown.neo-unified-profile,
#homeProfileDropdown.home-profile-dropdown.neo-unified-profile {
  top: var(--neo-profile-top, calc(46px + env(safe-area-inset-top, 0px))) !important;
  right: var(--neo-profile-right, max(8px, env(safe-area-inset-right, 0px))) !important;
  max-height: calc(100vh - var(--neo-profile-top, 54px) - 12px - env(safe-area-inset-bottom, 0px)) !important;
  max-height: calc(100dvh - var(--neo-profile-top, 54px) - 12px - env(safe-area-inset-bottom, 0px)) !important;
}
@media (max-width: 700px) {
  body.neo-portal-brand-background .home-header-actions > .home-header-link,
  body.neo-portal-brand-background .home-header-actions > .home-header-btn {
    display: none !important;
  }
  body.neo-portal-brand-background .home-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
  }
  body.neo-portal-brand-background .home-header-actions {
    display: flex;
    flex: 1 1 100%;
    width: 100%;
    justify-content: flex-start;
    min-width: 0;
  }
  .neo-unified-header { gap: 7px 10px; }
  .neo-unified-leading { gap: 6px; }
  .neo-unified-controls { gap: 5px; }
  .neo-unified-brand { font-size: 12px; }
  .neo-unified-brand img { width: 25px; height: 25px; }
  .neo-unified-profile:not(.home-profile-dropdown) {
    width: min(360px, calc(100vw - 16px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  }
  body.neo-portal-brand-background .home-header-actions > .neo-unified-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
    min-width: 0;
  }
  body.neo-portal-brand-background .home-header-actions > .neo-unified-header .neo-unified-controls {
    display: flex;
    flex-wrap: nowrap;
    width: auto;
    margin-inline-start: auto;
  }
}
@media (max-width: 390px) {
  .neo-unified-header { column-gap: 6px; }
  .neo-unified-leading { gap: 5px; }
  .neo-unified-controls { gap: 4px; }
  .neo-unified-brand span { display: none; }
  .neo-unified-sections { padding-inline: 9px; }
  .neo-unified-locale .neo-lang-btn { min-width: 40px; padding-inline: 5px; }
}
/* End shared responsive header rules. */