/* DARK shared topbar module.
   Markup, layout, responsive behavior and theme presentation live here so
   public pages and auth routes do not inherit menu behavior from page CSS. */
:root {
  --dark-menu-max: 1120px;
  --dark-menu-bg: rgba(5,5,5,.86);
  --dark-menu-panel: #0b0b0b;
  --dark-menu-text: #f5f5f2;
  --dark-menu-muted: rgba(245,245,242,.66);
  --dark-menu-line: rgba(255,255,255,.13);
  --dark-menu-green: #35d477;
}
html[data-theme="light"],
html[data-register-theme="light"] {
  --dark-menu-bg: rgba(247,246,242,.88);
  --dark-menu-panel: #ffffff;
  --dark-menu-text: #111214;
  --dark-menu-muted: rgba(17,18,20,.64);
  --dark-menu-line: rgba(17,18,20,.12);
}

html body .darkTopbar.darkTopbar--global,
html body .darkTopbar.darkTopbar--global * { box-sizing: border-box !important; }

html body .darkTopbar.darkTopbar--global {
  position: sticky !important;
  inset: auto !important;
  top: 0 !important;
  left: auto !important;
  transform: none !important;
  z-index: 1100 !important;
  width: min(calc(100% - 40px), var(--dark-menu-max)) !important;
  min-height: 76px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--dark-menu-line) !important;
  border-radius: 0 !important;
  background: var(--dark-menu-bg) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  backdrop-filter: blur(18px) !important;
  box-shadow: none !important;
  color: var(--dark-menu-text) !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

html body .darkTopbar--global a { color: inherit !important; text-decoration: none !important; }
html body .darkTopbar--global .darkTopbar__brand {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex: 0 0 128px !important;
  width: 128px !important;
  min-width: 128px !important;
  max-width: 128px !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  overflow: hidden !important;
  line-height: 0 !important;
}
html body .darkTopbar--global .darkTopbar__logo {
  position: relative !important;
  display: block !important;
  flex: 0 0 128px !important;
  width: 128px !important;
  min-width: 128px !important;
  max-width: 128px !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  background: transparent !important;
}
html body .darkTopbar--global .darkTopbar__logoImage {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 128px !important;
  min-width: 128px !important;
  max-width: 128px !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: contain !important;
  object-position: left center !important;
}

html body .darkTopbar--global .darkTopbar__nav {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  min-height: 46px !important;
  margin-left: auto !important;
  color: var(--dark-menu-muted) !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
}
html body .darkTopbar--global .darkTopbar__menu,
html body .darkTopbar--global .darkTopbar__menu[hidden] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 18px !important;
}
html body .darkTopbar--global .darkTopbar__link,
html body .darkTopbar--global .darkTopbar__action {
  min-height: 42px !important;
  height: 42px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 12px !important;
  font: inherit !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease !important;
}
html body .darkTopbar--global .darkTopbar__link {
  padding: 0 4px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--dark-menu-muted) !important;
}
html body .darkTopbar--global .darkTopbar__link:hover,
html body .darkTopbar--global .darkTopbar__link:focus-visible,
html body .darkTopbar--global .darkTopbar__link--active {
  color: var(--dark-menu-text) !important;
  background: transparent !important;
  outline: none !important;
}
html body .darkTopbar--global .darkTopbar__action {
  min-height: 42px !important;
  height: 42px !important;
  max-height: 42px !important;
  padding: 0 17px !important;
  border: 1px solid color-mix(in srgb, var(--dark-menu-text) 24%, transparent) !important;
  background: transparent !important;
  color: var(--dark-menu-text) !important;
  font-weight: 760 !important;
}
html body .darkTopbar--global .darkTopbar__action:hover,
html body .darkTopbar--global .darkTopbar__action:focus-visible,
html body .darkTopbar--global .darkTopbar__action--active {
  border-color: rgba(53,212,119,.64) !important;
  background: rgba(53,212,119,.10) !important;
  color: var(--dark-menu-text) !important;
  outline: none !important;
}
html body .darkTopbar--global .darkTopbar__action:active { transform: translateY(1px) !important; }
html body .darkTopbar--global .darkTopbar__landingCta,
html body .darkTopbar--global .darkTopbar__loginCta {
  min-height: 42px !important;
  height: 42px !important;
  max-height: 42px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  align-items: center !important;
}
html body .darkTopbar--global .darkTopbar__action--primary,
html body .darkTopbar--global .darkTopbar__action--primary:visited {
  border-color: var(--dark-menu-text) !important;
  background: var(--dark-menu-text) !important;
  color: var(--dark-menu-panel) !important;
}
html body .darkTopbar--global .darkTopbar__landingCta:hover,
html body .darkTopbar--global .darkTopbar__landingCta:focus-visible,
html body .darkTopbar--global .darkTopbar__landingCta.darkTopbar__action--active {
  border-color: var(--dark-menu-green) !important;
  background: #35d477 !important;
  color: #041109 !important;
  box-shadow: 0 10px 24px rgba(53,212,119,.16) !important;
  outline: none !important;
}

html body .darkTopbar--global .darkTopbar__theme {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 76px !important;
  width: 76px !important;
  min-width: 76px !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 5px 3px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: var(--dark-menu-text) !important;
  cursor: pointer !important;
}
html body .darkTopbar--global .darkTopbar__themeTrack {
  position: relative !important;
  display: block !important;
  width: 68px !important;
  height: 30px !important;
  overflow: hidden !important;
  border: 1px solid color-mix(in srgb, var(--dark-menu-text) 16%, transparent) !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--dark-menu-panel) 92%, var(--dark-menu-text) 8%) !important;
  box-shadow: none !important;
}
html body .darkTopbar--global .darkTopbar__themeThumb {
  position: absolute !important;
  z-index: 1 !important;
  top: 5px !important;
  left: 45px !important;
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  background: #9a9a9a !important;
  transition: left .18s ease, background .18s ease !important;
}
html body .darkTopbar--global .darkTopbar__themeState {
  position: absolute !important;
  z-index: 2 !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 0 23px 0 7px !important;
  color: var(--dark-menu-muted) !important;
  font-size: 9px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  pointer-events: none !important;
}
html[data-theme="light"] body .darkTopbar--global .darkTopbar__themeThumb,
html[data-register-theme="light"] body .darkTopbar--global .darkTopbar__themeThumb {
  left: 5px !important;
  background: #ffffff !important;
}
html[data-theme="light"] body .darkTopbar--global .darkTopbar__themeState,
html[data-register-theme="light"] body .darkTopbar--global .darkTopbar__themeState {
  justify-content: flex-end !important;
  padding: 0 7px 0 23px !important;
}

html body .darkTopbar--global .darkTopbar__burger {
  display: none !important;
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  place-content: center !important;
  gap: 4px !important;
  padding: 0 !important;
  border: 1px solid var(--dark-menu-line) !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: var(--dark-menu-text) !important;
  cursor: pointer !important;
}
html body .darkTopbar--global .darkTopbar__burger span {
  display: block !important;
  width: 18px !important;
  height: 2px !important;
  border-radius: 2px !important;
  background: currentColor !important;
}

body.chat-mode .darkTopbar--global,
body.chat-mode [data-dark-topbar="global"],
body.chat-mode [data-dark-menu-slot] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

@media (max-width: 840px) {
  html body .darkTopbar.darkTopbar--global {
    width: min(calc(100% - 28px), var(--dark-menu-max)) !important;
  }
  html body .darkTopbar--global .darkTopbar__menu,
  html body .darkTopbar--global .darkTopbar__menu[hidden] {
    position: absolute !important;
    z-index: 1200 !important;
    top: calc(100% + 8px) !important;
    right: 52px !important;
    display: none !important;
    width: min(282px, calc(100vw - 28px)) !important;
    padding: 10px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    border: 1px solid var(--dark-menu-line) !important;
    border-radius: 18px !important;
    background: color-mix(in srgb, var(--dark-menu-panel) 96%, transparent) !important;
    box-shadow: 0 24px 60px rgba(0,0,0,.32) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    backdrop-filter: blur(18px) !important;
  }
  html body .darkTopbar--global.is-menu-open .darkTopbar__menu { display: flex !important; }
  html body .darkTopbar--global .darkTopbar__menu .darkTopbar__link {
    width: 100% !important;
    min-height: 44px !important;
    padding: 0 12px !important;
    justify-content: flex-start !important;
  }
  html body .darkTopbar--global .darkTopbar__landingCta { display: none !important; }
  html body .darkTopbar--global .darkTopbar__burger { display: inline-grid !important; }
}

@media (max-width: 760px) {
  html body .darkTopbar.darkTopbar--global {
    min-height: 62px !important;
    gap: 8px !important;
  }
  html body .darkTopbar--global .darkTopbar__brand,
  html body .darkTopbar--global .darkTopbar__logo,
  html body .darkTopbar--global .darkTopbar__logoImage {
    flex-basis: 112px !important;
    width: 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
  }
  html body .darkTopbar--global .darkTopbar__nav { gap: 6px !important; }
  html body .darkTopbar--global .darkTopbar__theme {
    flex-basis: 44px !important;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 2px !important;
  }
  html body .darkTopbar--global .darkTopbar__themeTrack { width: 40px !important; height: 28px !important; }
  html body .darkTopbar--global .darkTopbar__themeThumb { top: 4px !important; left: 17px !important; width: 18px !important; height: 18px !important; }
  html body .darkTopbar--global .darkTopbar__themeState { font-size: 0 !important; padding: 0 !important; }
  html[data-theme="light"] body .darkTopbar--global .darkTopbar__themeThumb,
  html[data-register-theme="light"] body .darkTopbar--global .darkTopbar__themeThumb { left: 3px !important; }
  html body .darkTopbar--global .darkTopbar__loginCta {
    min-height: 42px !important;
    height: 42px !important;
    padding: 0 13px !important;
    font-size: 13px !important;
  }
}

@media (max-width: 430px) {
  html body .darkTopbar.darkTopbar--global { width: calc(100% - 18px) !important; }
  html body .darkTopbar--global .darkTopbar__brand,
  html body .darkTopbar--global .darkTopbar__logo,
  html body .darkTopbar--global .darkTopbar__logoImage {
    flex-basis: 96px !important;
    width: 96px !important;
    min-width: 96px !important;
    max-width: 96px !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
  }
}

/* DARK 3.8.9 — topbar action buttons follow the shared black/white contract. */
html body .darkTopbar--global .darkTopbar__action,
html body .darkTopbar--global .darkTopbar__action--primary,
html body .darkTopbar--global .darkTopbar__action--primary:visited{
  min-height: 42px !important;
  height: 42px !important;
  max-height: 42px !important;
  border: 1px solid #f5f5f2 !important;
  background: #f5f5f2 !important;
  color: #050505 !important;
  box-shadow: none !important;
  transform: none !important;
}
html body .darkTopbar--global .darkTopbar__action:is(:hover, :focus-visible, :active),
html body .darkTopbar--global .darkTopbar__action--active,
html body .darkTopbar--global .darkTopbar__landingCta:is(:hover, :focus-visible),
html body .darkTopbar--global .darkTopbar__landingCta.darkTopbar__action--active{
  border-color: #35d477 !important;
  background: #f5f5f2 !important;
  color: #050505 !important;
  box-shadow: 0 0 0 1px rgba(53,212,119,.22) !important;
  outline: none !important;
  transform: none !important;
}
html[data-theme="light"] body .darkTopbar--global .darkTopbar__action,
html[data-theme="light"] body .darkTopbar--global .darkTopbar__action--primary,
html[data-theme="light"] body .darkTopbar--global .darkTopbar__action--primary:visited{
  border-color: #111214 !important;
  background: #111214 !important;
  color: #ffffff !important;
}
html[data-theme="light"] body .darkTopbar--global .darkTopbar__action:is(:hover, :focus-visible, :active),
html[data-theme="light"] body .darkTopbar--global .darkTopbar__action--active,
html[data-theme="light"] body .darkTopbar--global .darkTopbar__landingCta:is(:hover, :focus-visible),
html[data-theme="light"] body .darkTopbar--global .darkTopbar__landingCta.darkTopbar__action--active{
  border-color: #35d477 !important;
  background: #111214 !important;
  color: #ffffff !important;
}
