/* Shared desktop geometry, independent of page and automatic fit classes. */
html body:has(#analysis-overlay.open) .market-clock,
html body:has(#chat-overlay.open) .market-clock {
  display: none !important;
}
html body:has(#analysis-overlay.open) > header.topbar {
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 12000 !important;
}
@media (min-width: 901px) {
  html body #analysis-overlay.open {
    top: 78px !important;
    height: calc(100dvh - 78px) !important;
    max-height: calc(100dvh - 78px) !important;
    padding-top: 0 !important;
  }
}
@media (min-width: 1601px) {
  html body #analysis-overlay.open {
    top: 92px !important;
    height: calc(100dvh - 92px) !important;
    max-height: calc(100dvh - 92px) !important;
  }
}
html body header.topbar .topbar-suggest-list {
  max-height: 360px !important;
  overflow-y: auto !important;
}
html body header.topbar .topbar-suggest-list button {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  gap: 4px !important;
  width: 100% !important;
  height: auto !important;
  min-height: 66px !important;
  padding: 10px 12px !important;
  text-align: left !important;
  box-sizing: border-box !important;
}
html body header.topbar .topbar-suggest-list button > strong,
html body header.topbar .topbar-suggest-list button > span {
  position: static !important;
  grid-column: 1 !important;
  width: auto !important;
  line-height: 1.4 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}
html body header.topbar .topbar-suggest-list button > strong { grid-row: 1 !important; }
html body header.topbar .topbar-suggest-list button > span { grid-row: 2 !important; }
html body header.topbar .topbar-suggest-list button > small { display: none !important; }
@media (min-width: 1101px) {
  html body header.topbar.topbar.topbar.topbar {
    display: grid !important;
    grid-template-columns: 330px 360px minmax(0, 1fr) 112px !important;
    column-gap: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-inline: 20px !important;
  }
  html body header.topbar.topbar.topbar.topbar .brand {
    width: 100% !important;
    min-width: 0 !important;
  }
  html body header.topbar.topbar.topbar.topbar .brand-wordmark {
    width: 100% !important;
    max-width: 330px !important;
  }
  html body header.topbar.topbar.topbar.topbar .topbar-search,
  html body header.topbar.topbar.topbar.topbar .topbar-search:focus-within {
    grid-column: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 360px !important;
    height: 60px !important;
    max-height: 60px !important;
    margin: 0 !important;
  }
  html body header.topbar.topbar.topbar.topbar .topbar-search input,
  html body header.topbar.topbar.topbar.topbar .topbar-search input::placeholder {
    font-size: 15px !important;
  }
  html body header.topbar.topbar.topbar.topbar > nav {
    grid-column: 3 !important;
    display: flex !important;
    flex-flow: row nowrap !important;
    justify-content: space-between !important;
    justify-self: stretch !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    min-width: 0 !important;
    margin: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
  html body header.topbar.topbar.topbar.topbar > nav > a,
  html body header.topbar.topbar.topbar.topbar > nav > button {
    flex: 0 0 auto !important;
    font-size: 15px !important;
    padding-inline: 0 !important;
    white-space: nowrap !important;
  }
  html body header.topbar.topbar.topbar.topbar > nav .nav-analyst {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding-inline: 14px !important;
    box-sizing: border-box !important;
  }
  html body header.topbar.topbar.topbar.topbar > nav .nav-get-started {
    padding-inline: 18px !important;
  }
  html body header.topbar.topbar.topbar.topbar .topbar-utilities {
    grid-column: 4 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 112px !important;
    min-width: 112px !important;
    gap: 24px !important;
  }
  html body header.topbar.topbar.topbar.topbar .topbar-menu-toggle {
    display: none !important;
  }
}
@media (min-width: 1601px) {
  html body:has(> header.topbar) {
    padding-top: 92px !important;
  }
  html body header.topbar.topbar.topbar.topbar {
    height: 92px !important;
    min-height: 92px !important;
    max-height: 92px !important;
  }
}
@media (min-width: 1101px) and (max-width: 1600px) {
  html body header.topbar.topbar.topbar.topbar {
    grid-template-columns: 230px minmax(160px, 240px) minmax(max-content, 1fr) 100px !important;
    column-gap: 12px !important;
    padding-inline: 16px !important;
  }
  html body header.topbar.topbar.topbar.topbar > nav { gap: 12px !important; }
  html body header.topbar.topbar.topbar.topbar .topbar-search,
  html body header.topbar.topbar.topbar.topbar .topbar-search:focus-within {
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
  }
  html body header.topbar.topbar.topbar.topbar .topbar-search input,
  html body header.topbar.topbar.topbar.topbar .topbar-search input::placeholder {
    font-size: 13px !important;
  }
  html body header.topbar.topbar.topbar.topbar > nav > a,
  html body header.topbar.topbar.topbar.topbar > nav > button { font-size: 13px !important; }
  html body header.topbar.topbar.topbar.topbar > nav .nav-analyst {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }
  html body header.topbar.topbar.topbar.topbar .topbar-utilities {
    width: 100px !important;
    min-width: 100px !important;
    gap: 12px !important;
  }
}
@media (min-width: 1251px) and (max-width: 1400px) {
  html body header.topbar.topbar.topbar.topbar {
    grid-template-columns: 190px minmax(140px, 200px) minmax(max-content, 1fr) 100px !important;
  }
}
@media (min-width: 1101px) and (max-width: 1250px) {
  html body header.topbar.topbar.topbar.topbar {
    grid-template-columns: 140px minmax(100px, 150px) minmax(max-content, 1fr) 100px !important;
    column-gap: 8px !important;
  }
  html body header.topbar.topbar.topbar.topbar > nav { gap: 8px !important; }
  html body header.topbar.topbar.topbar.topbar > nav .nav-analyst {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }
}
@media (min-width: 1601px) and (max-width: 1800px) {
  html body header.topbar.topbar.topbar.topbar {
    grid-template-columns: 280px minmax(200px, 280px) minmax(max-content, 1fr) 112px !important;
  }
}

html:root[data-theme="light"] body header.topbar.topbar.topbar.topbar .topbar-search-clear,
html:root[data-theme="light"] body header.topbar.topbar.topbar.topbar .topbar-search-close,
html:root[data-theme="light"] body .topbar-search-clear,
html:root[data-theme="light"] body .topbar-search-close {
  color: var(--content-secondary) !important;
  opacity: 1 !important;
  -webkit-text-fill-color: var(--content-secondary) !important;
  filter: none !important;
}

html:root[data-theme="light"] body header.topbar [data-topbar-control],
html:root[data-theme="light"] body .topbar-search [data-topbar-control] {
  color: var(--header-control) !important;
  -webkit-text-fill-color: var(--header-control) !important;
  opacity: 1 !important;
  text-shadow: none !important;
  background: transparent !important;
  border-radius: 999px !important;
}

html:root[data-theme="light"] body header.topbar [data-topbar-control="clear"],
html:root[data-theme="light"] body .topbar-search [data-topbar-control="clear"] {
  min-width: 58px !important;
  margin-right: 6px !important;
  padding: 0 10px !important;
  border-right: 0 !important;
}

html:root[data-theme="light"] body header.topbar [data-topbar-control="close"],
html:root[data-theme="light"] body .topbar-search [data-topbar-control="close"] {
  width: 30px !important;
  min-width: 30px !important;
  padding: 0 !important;
  font-weight: 800 !important;
}

html:root[data-theme="light"] body header.topbar.topbar.topbar.topbar .topbar-search-clear {
  border-right-color: var(--border-strong) !important;
}

html:root[data-theme="light"] body header.topbar.topbar.topbar.topbar .topbar-search-clear:hover,
html:root[data-theme="light"] body header.topbar.topbar.topbar.topbar .topbar-search-close:hover,
html:root[data-theme="light"] body .topbar-search-clear:hover,
html:root[data-theme="light"] body .topbar-search-close:hover {
  color: var(--header-control-hover) !important;
  -webkit-text-fill-color: var(--header-control-hover) !important;
}

/* Shared notification bell and unread-count base state. */
html body .topbar nav .notification-button,
html:root[data-theme="light"] body .topbar nav .notification-button {
  position: relative !important;
  overflow: visible !important;
}

html body .topbar nav .notification-button .notification-count,
html:root[data-theme="light"] body .topbar nav .notification-button .notification-count {
  position: absolute !important;
  top: -7px !important;
  right: -8px !important;
  display: inline-grid !important;
  place-items: center !important;
  min-width: 18px !important;
  height: 18px !important;
  padding: 0 5px !important;
  border: 2px solid #0b1020 !important;
  border-radius: 999px !important;
  color: #ffffff !important;
  background: #ef4444 !important;
  box-shadow: 0 8px 16px rgba(239, 68, 68, 0.34) !important;
  font-size: 10px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  z-index: 5 !important;
}

html:root[data-theme="light"] body .topbar nav .notification-button .notification-count {
  border-color: #f8fbff !important;
}

html body .topbar nav .notification-button .notification-count[hidden] {
  display: none !important;
}

/* Shared topbar search surface and readable input states. */
html body .topbar-search {
  border-color: rgba(122, 167, 255, 0.48) !important;
  border-radius: 999px !important;
  background: rgba(9, 16, 31, 0.86) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(45, 212, 191, 0.08),
    0 0 26px rgba(122, 167, 255, 0.12) !important;
}

html body .topbar-search input,
html body .topbar-search input::placeholder {
  opacity: 1 !important;
  color: #dbe6f7 !important;
  -webkit-text-fill-color: #dbe6f7 !important;
  text-shadow: none !important;
  filter: none !important;
  font-size: 15px !important;
  font-weight: 850 !important;
}

html:root[data-theme="light"] body .topbar-search {
  background: rgba(255, 255, 255, 0.94) !important;
}

html:root[data-theme="light"] body .topbar-search input,
html:root[data-theme="light"] body .topbar-search input::placeholder {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
}

/* Shared profile dropdown surface and readable action states. */
html body .topbar .profile-dropdown {
  border: 1px solid rgba(122, 167, 255, 0.22) !important;
  border-radius: 8px !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #151525 !important;
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.42) !important;
  backdrop-filter: none !important;
}

html body .topbar .profile-dropdown button {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: transparent !important;
}

html body .topbar .profile-dropdown button:hover,
html body .topbar .profile-dropdown button:focus-visible {
  background: rgba(122, 167, 255, 0.12) !important;
}

html body .topbar .profile-dropdown button[hidden] {
  display: none !important;
}

html:root[data-theme="light"] body .topbar .profile-dropdown {
  border-color: rgba(148, 163, 184, 0.34) !important;
  background: #ffffff !important;
  box-shadow: 0 22px 62px rgba(15, 23, 42, 0.16) !important;
}

html:root[data-theme="light"] body .topbar .profile-dropdown button {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
}

html:root[data-theme="light"] body .topbar .profile-dropdown button:hover,
html:root[data-theme="light"] body .topbar .profile-dropdown button:focus-visible {
  background: rgba(37, 99, 235, 0.08) !important;
}

/* Shared Accendion AI navigation action. */
html body .topbar nav .nav-analyst,
html body .topbar nav .nav-analyst:visited,
html body .nav-analyst {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html body .topbar nav .nav-analyst:hover,
html body .topbar nav .nav-analyst:focus-visible {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: linear-gradient(135deg, #2563eb 0%, #6d5dfc 44%, #0891b2 100%) !important;
  border-color: rgba(125, 211, 252, 0.76) !important;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.32), 0 0 0 1px rgba(255, 255, 255, 0.22) inset !important;
}

html:root[data-theme="light"] body .topbar nav .nav-analyst,
html:root[data-theme="light"] body .topbar nav .nav-analyst:visited {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: linear-gradient(135deg, #2563eb 0%, #6d5dfc 44%, #0891b2 100%) !important;
}

/* Shared Upgrade navigation action. */
html body .topbar nav .nav-subscribe,
html body .topbar nav .nav-subscribe:visited,
html body .topbar nav .nav-subscribe:hover,
html body .topbar nav .nav-subscribe:focus-visible,
html body .topbar nav .nav-subscribe.active,
html body .topbar nav .nav-subscribe[aria-current="page"] {
  color: #ffbd24 !important;
  -webkit-text-fill-color: #ffbd24 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  text-shadow: 0 0 16px rgba(255, 189, 36, 0.35) !important;
}

html:root[data-theme="light"] body .topbar nav .nav-subscribe,
html:root[data-theme="light"] body .topbar nav .nav-subscribe:visited,
html:root[data-theme="light"] body .topbar nav .nav-subscribe:hover,
html:root[data-theme="light"] body .topbar nav .nav-subscribe:focus-visible,
html:root[data-theme="light"] body .topbar nav .nav-subscribe.active,
html:root[data-theme="light"] body .topbar nav .nav-subscribe[aria-current="page"] {
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
  text-shadow: none !important;
}

html body .topbar nav .nav-subscribe::before,
html body .topbar nav .nav-subscribe::after,
html body .nav-subscribe::before,
html body .nav-subscribe::after {
  content: none !important;
  display: none !important;
  opacity: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
}

/* Shared standard navigation link states, excluding dedicated header actions. */
html body .topbar nav a:not(.nav-subscribe):not(.nav-analyst):not(.nav-get-started):hover,
html body .topbar nav a:not(.nav-subscribe):not(.nav-analyst):not(.nav-get-started):focus-visible {
  color: #ffffff !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body .topbar nav a:not(.nav-subscribe):not(.nav-analyst):not(.nav-get-started)[aria-current="page"],
html body .topbar nav a:not(.nav-subscribe):not(.nav-analyst):not(.nav-get-started).active,
html body .topbar nav a:not(.nav-subscribe):not(.nav-analyst):not(.nav-get-started).is-active {
  color: #7aa7ff !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

html:root[data-theme="light"] body .topbar nav a:not(.nav-subscribe):not(.nav-analyst):not(.nav-get-started) {
  color: #111827 !important;
  text-shadow: none !important;
}

html:root[data-theme="light"] body .topbar nav a:not(.nav-subscribe):not(.nav-analyst):not(.nav-get-started)[aria-current="page"],
html:root[data-theme="light"] body .topbar nav a:not(.nav-subscribe):not(.nav-analyst):not(.nav-get-started).active,
html:root[data-theme="light"] body .topbar nav a:not(.nav-subscribe):not(.nav-analyst):not(.nav-get-started).is-active {
  color: #171a62 !important;
}

/* Navigation links do not use the legacy decorative after-effect. */
html body .topbar nav a::after {
  display: none !important;
  animation: none !important;
}
