/* Section eyebrows are decorative; retain the actual headings and data labels. */
html body .eyebrow { display: none !important; }
html body .watchlist { min-width: 0 !important; container-type: inline-size; }
html body .watchlist .section-title { flex-wrap: wrap !important; gap: 12px !important; }
html body .watchlist-form {
  position: relative !important;
  z-index: 20 !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
}
html body .watchlist-form .watchlist-input-wrap {
  grid-column: 1 / -1 !important;
  position: relative !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
}
html body #watchlist-input {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  padding: 14px 40px 14px 46px !important;
  pointer-events: auto !important;
}
html body #watchlist-suggestions {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-height: 300px !important;
  overflow-y: auto !important;
  z-index: 100 !important;
}
html body #watchlist-suggestions button {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  width: 100% !important;
  height: auto !important;
  min-height: 60px !important;
  gap: 4px !important;
  padding: 10px !important;
}
html body #watchlist-suggestions button > * {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  min-width: 0 !important;
}
html body .watch-grid { overflow-x: auto !important; }
html body .watch-table { width: 100% !important; min-width: 360px !important; }
html body .watch-stock-cell { min-width: 120px !important; }
html body .movers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
html body .movers-grid-secondary { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
html body .movers-panel { min-width: 0 !important; padding: 18px !important; }
html body .movers-panel-head { gap: 12px !important; align-items: center !important; }
html body .movers-panel-head h2 { font-size: 24px !important; line-height: 1.25 !important; }
html body .movers-count { flex-shrink: 0 !important; white-space: nowrap !important; }
html body .mover-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 10px 12px !important;
  padding: 14px !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
}
html body .mover-company { grid-column: 1 / -1 !important; min-width: 0 !important; }
html body .mover-company strong {
  display: block !important;
  font-size: 16px !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}
html body .mover-company > span { display: flex !important; gap: 8px !important; flex-wrap: wrap !important; }
html body .mover-company em { white-space: normal !important; word-break: normal !important; }
html body .mover-session { grid-column: 1 !important; min-width: 0 !important; text-align: left !important; }
html body .mover-session small { white-space: normal !important; }
html body .mover-session strong { text-align: left !important; }
html body .mover-change { grid-column: 2 !important; align-self: center !important; white-space: nowrap !important; }
html body .mover-strength { grid-column: 1 / -1 !important; }
html body .mover-action { grid-column: 1 / -1 !important; }
@media (max-width: 1100px) {
  html body .movers-grid-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 700px) {
  html body .movers-grid,
  html body .movers-grid-secondary { grid-template-columns: minmax(0, 1fr) !important; }
  html body .movers-panel-head { flex-wrap: wrap !important; }
}

/* Shared narrow-screen contract. This loads after page-specific styles. */
@media (max-width: 1100px) {
  html body.has-topbar { padding-top: 72px !important; }

  html body .topbar,
  html body.candlestick-page .topbar,
  html body.upgrade-page .topbar {
    position: fixed !important;
    inset: 0 0 auto 0 !important;
    z-index: 4400 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto auto !important;
    grid-template-areas: "brand search utilities menu" !important;
    align-items: center !important;
    gap: 8px !important;
    min-height: 72px !important;
    height: 72px !important;
    padding: 10px 12px !important;
    overflow: visible !important;
  }

  html body .topbar .brand,
  html body.candlestick-page .topbar .brand,
  html body.upgrade-page .topbar .brand {
    grid-area: brand !important;
    display: block !important;
    min-width: 0 !important;
    width: auto !important;
    margin: 0 !important;
  }

  html body .topbar .brand img {
    display: block !important;
    width: min(142px, 100%) !important;
    max-width: 142px !important;
    height: auto !important;
  }

  html body .topbar .topbar-search,
  html body.candlestick-page .topbar .topbar-search,
  html body.upgrade-page .topbar .topbar-search {
    grid-area: search !important;
    position: relative !important;
    display: grid !important;
    place-items: center !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    overflow: visible !important;
  }

  html body .topbar .topbar-search::before,
  html body .topbar .topbar-search::after,
  html body .topbar.topbar-fit-compact .topbar-search::after,
  html body .topbar.topbar-fit-tight .topbar-search::after,
  html body .topbar.topbar-fit-menu .topbar-search::after {
    content: none !important;
    display: none !important;
  }
  html body .topbar .topbar-search input,
  html body .topbar .topbar-search input::placeholder,
  html body .topbar.topbar-fit-compact .topbar-search input,
  html body .topbar.topbar-fit-compact .topbar-search input::placeholder,
  html body .topbar.topbar-fit-tight .topbar-search input,
  html body .topbar.topbar-fit-tight .topbar-search input::placeholder,
  html body .topbar.topbar-fit-menu .topbar-search input,
  html body .topbar.topbar-fit-menu .topbar-search input::placeholder {
    position: absolute !important;
    inset: 0 !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
    caret-color: transparent !important;
    font-size: 0 !important;
    cursor: pointer !important;
  }
  html body .topbar .topbar-search .search-icon,
  html body .topbar .topbar-search .topbar-search-icon {
    position: absolute !important;
    inset: 50% auto auto 50% !important;
    z-index: 1 !important;
    margin: 0 !important;
    pointer-events: none !important;
    transform: translate(-50%, -50%) !important;
  }
  html body .topbar .topbar-search:focus-within,
  html body .topbar .topbar-search.mobile-search-open {
    position: fixed !important;
    top: 82px !important;
    left: 12px !important;
    right: 12px !important;
    z-index: 4600 !important;
    width: auto !important;
    height: 52px !important;
    border-radius: 16px !important;
  }
  html body .topbar .topbar-search:focus-within input,
  html body .topbar .topbar-search:focus-within input::placeholder,
  html body .topbar .topbar-search.mobile-search-open input,
  html body .topbar .topbar-search.mobile-search-open input::placeholder {
    width: 100% !important;
    height: 52px !important;
    padding: 0 16px 0 50px !important;
    color: inherit !important;
    -webkit-text-fill-color: currentColor !important;
    caret-color: auto !important;
    font-size: 16px !important;
    cursor: text !important;
  }
  html body .topbar .topbar-search:focus-within input::placeholder,
  html body .topbar .topbar-search.mobile-search-open input::placeholder {
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
    font-size: 0 !important;
  }
  html body .topbar .topbar-search:focus-within .search-icon,
  html body .topbar .topbar-search:focus-within .topbar-search-icon,
  html body .topbar .topbar-search.mobile-search-open .search-icon,
  html body .topbar .topbar-search.mobile-search-open .topbar-search-icon {
    inset: 50% auto auto 16px !important;
    transform: translateY(-50%) !important;
  }
  html body .topbar .topbar-search:focus-within .topbar-search-results,
  html body .topbar .topbar-search.mobile-search-open .topbar-search-results {
    position: fixed !important;
    top: 142px !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-height: min(52dvh, 400px) !important;
  }

  html body .topbar .topbar-utilities {
    grid-area: utilities !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 0 !important;
  }
  html body .topbar .notification-button,
  html body .topbar .profile-menu-trigger {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    margin: 0 !important;
  }
  html body .topbar .profile-menu-trigger { font-size: 16px !important; }
  html body .topbar-utilities .profile-menu { position: static !important; }
  html body .topbar .profile-dropdown {
    position: fixed !important;
    top: 80px !important;
    left: 12px !important;
    right: 12px !important;
    z-index: 4550 !important;
    width: auto !important;
    max-width: none !important;
    max-height: calc(100dvh - 96px) !important;
    overflow-y: auto !important;
    transform: none !important;
  }
  html body .topbar .profile-dropdown button {
    display: flex !important;
    width: 100% !important;
    min-height: 52px !important;
    padding: 14px 16px !important;
    align-items: center !important;
  }
  html body .topbar .profile-dropdown .profile-theme-row { justify-content: space-between !important; }
  html body .topbar .profile-dropdown .profile-mini-summary { padding: 16px !important; }
  html body .topbar .topbar-menu-toggle {
    grid-area: menu !important;
    display: grid !important;
    place-items: center !important;
    width: 40px !important;
    height: 40px !important;
    margin: 0 !important;
  }

  html body .topbar > nav,
  html body.candlestick-page .topbar > nav,
  html body.upgrade-page .topbar > nav {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    left: 12px !important;
    right: 12px !important;
    z-index: 4500 !important;
    display: none !important;
    grid-area: auto !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 14px !important;
    margin: 0 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 4px !important;
    border-radius: 16px !important;
  }
  html body .topbar.menu-open > nav { display: flex !important; }
  html body .topbar > nav > a,
  html body .topbar > nav > button {
    width: 100% !important;
    min-width: 0 !important;
    height: 48px !important;
    padding: 0 14px !important;
    justify-content: flex-start !important;
  }
  html body .topbar > nav .nav-analyst,
  html body .topbar > nav a.nav-analyst {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    padding-inline: 16px !important;
  }

  html body .action-panel {
    align-items: start !important;
    overflow-y: auto !important;
    padding: 14px !important;
  }
  html body .action-panel.open .action-panel-card {
    width: 100% !important;
    max-width: 100% !important;
    max-height: calc(100dvh - 28px) !important;
    margin: 0 !important;
    overflow: auto !important;
  }
  html body .profile-settings-panel,
  html body .profile-settings-form,
  html body .profile-settings-user,
  html body .profile-subscription-summary { min-width: 0 !important; max-width: 100% !important; }
  html body .profile-settings-user { align-items: center !important; gap: 12px !important; }
  html body .profile-settings-user > div:last-child { min-width: 0 !important; }
  html body .profile-settings-user span,
  html body .profile-subscription-summary small { overflow-wrap: anywhere !important; }
  html body .profile-phone-fields,
  html body .profile-dob-fields { grid-template-columns: minmax(0, 1fr) !important; }
  html body .profile-phone-fields input,
  html body .profile-phone-fields select,
  html body .profile-dob-fields input,
  html body .profile-dob-fields select { width: 100% !important; min-width: 0 !important; }

  html body .watch-table,
  html body .watch-table tbody,
  html body .watch-table tr,
  html body .watch-table td { display: block !important; width: 100% !important; min-width: 0 !important; }
  html body .watch-table thead { display: none !important; }
  html body .watch-table tr { padding: 18px !important; }
  html body .watch-table td { padding: 0 0 12px !important; }
  html body .watch-table td:last-child { padding-bottom: 0 !important; }
  html body .watch-menu-cell { display: grid !important; grid-template-columns: minmax(0, 1fr) auto !important; gap: 10px !important; align-items: center !important; }
  html body .watch-row-ai { grid-column: 1 !important; width: 100% !important; min-width: 0 !important; max-width: none !important; white-space: normal !important; }
  html body .watch-menu { grid-column: 2 !important; min-width: 44px !important; }

  html body .chart-ohlc,
  html body .analysis-chart-ohlc {
    top: 62px !important;
    left: 12px !important;
    right: 68px !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: start !important;
    gap: 3px 8px !important;
    min-height: 0 !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
  }
  html body .chart-ohlc strong,
  html body .analysis-chart-ohlc strong { grid-column: 1 / -1 !important; }
  html body .chart-ohlc span,
  html body .chart-ohlc em,
  html body .chart-ohlc b,
  html body .analysis-chart-ohlc span,
  html body .analysis-chart-ohlc em,
  html body .analysis-chart-ohlc b { min-width: 0 !important; white-space: nowrap !important; }

  html body .candle-hero,
  html body .upgrade-hero { padding-top: 32px !important; }
  html body .candle-hero h1,
  html body .upgrade-hero h1 { font-size: clamp(34px, 11vw, 48px) !important; }

  html body.help-page .help-shell {
    width: calc(100% - 24px) !important;
    min-width: 0 !important;
    padding: 18px 0 28px !important;
  }
  html body.help-page .help-hero {
    width: 100% !important;
    min-width: 0 !important;
    padding: 24px 18px !important;
  }
  html body.help-page .help-hero h1 {
    font-size: clamp(34px, 11vw, 44px) !important;
    line-height: 1.08 !important;
    overflow-wrap: anywhere !important;
  }
  html body.help-page .help-hero p {
    max-width: 100% !important;
    font-size: 17px !important;
    overflow-wrap: anywhere !important;
  }
  html body.help-page .help-layout,
  html body.help-page .help-chat-card,
  html body.help-page .help-faq-card { min-width: 0 !important; width: 100% !important; }
  html body.help-page .help-chat-log,
  html body.help-page .help-message,
  html body.help-page .help-message p { min-width: 0 !important; overflow-wrap: anywhere !important; }

  html body.news-page .news-page-main {
    width: calc(100% - 24px) !important;
    min-width: 0 !important;
    padding: 18px 0 36px !important;
  }
  html body.news-page .news-page-feature,
  html body.news-page .news-page-feature-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  html body.news-page .news-page-feature-card {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
  }
  html body.news-page .news-page-feature-media {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 220px !important;
    height: 220px !important;
  }
  html body.news-page .news-page-feature-media img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
  html body.news-page .news-page-feature-copy {
    min-width: 0 !important;
    padding: 20px !important;
  }
  html body.news-page .news-page-feature-copy h2,
  html body.news-page .news-page-feature-copy p,
  html body.news-page .news-page-feature-copy a { overflow-wrap: anywhere !important; }
  html body.news-page .news-page-grid-wrap,
  html body.news-page .news-page-grid,
  html body.news-page .news-page-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  html body.news-page .news-page-grid { grid-template-columns: minmax(0, 1fr) !important; }

  html body .topbar-menu-toggle,
  html body .action-panel-close,
  html body .auth-close,
  html body .analysis-modal-close,
  html body .news-detail-close,
  html body .topbar-search-close {
    min-width: 44px !important;
    min-height: 44px !important;
    touch-action: manipulation !important;
    pointer-events: auto !important;
  }
  html body .topbar-search,
  html body .topbar-search input,
  html body .topbar-menu-toggle,
  html body .profile-button,
  html body [data-analysis-tab],
  html body [data-upgrade-duration] { touch-action: manipulation !important; }

  html body.upgrade-page .upgrade-billing.upgrade-duration-tabs {
    width: calc(100% - 24px) !important;
    max-width: 680px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 8px !important;
  }
  html body.upgrade-page .upgrade-billing.upgrade-duration-tabs button {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 54px !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 10px !important;
    text-align: center !important;
  }
  html body.upgrade-page .topbar > nav .nav-analyst {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    justify-content: center !important;
    text-align: center !important;
  }

  html body .analysis-feature-switcher {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  html body .analysis-feature-bar {
    display: grid !important;
    width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 4px !important;
    overflow: visible !important;
  }
  html body .analysis-feature-bar button {
    width: 100% !important;
    min-height: 44px !important;
    padding: 0 14px !important;
    white-space: nowrap !important;
  }
  html body .analysis-ai-button { width: 100% !important; justify-content: center !important; }
  html body [data-analysis-panel],
  html body .earnings-workspace,
  html body .dividend-workspace,
  html body .signals-workspace { width: 100% !important; min-width: 0 !important; }
  html body .earnings-kpi-grid,
  html body .dividend-kpi-grid,
  html body .signals-count-grid,
  html body .earnings-overview,
  html body .dividend-overview,
  html body .earnings-visual-grid,
  html body .earnings-two-col,
  html body .earnings-quarter-grid,
  html body .earnings-reaction-grid,
  html body .dividend-visual-grid,
  html body .dividend-two-col,
  html body .dividend-explain-grid,
  html body .signals-overview,
  html body .signals-two-col { grid-template-columns: minmax(0, 1fr) !important; }
  html body .analysis-modal,
  html body .analysis-body,
  html body .analysis-body > *,
  html body [data-analysis-panel],
  html body .earnings-workspace,
  html body .dividend-workspace,
  html body .signals-workspace,
  html body .earnings-overview > *,
  html body .dividend-overview > *,
  html body .signals-overview > *,
  html body .earnings-score-card,
  html body .dividend-score-card,
  html body .signals-decision-card {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  html body .analysis-body,
  html body [data-analysis-panel],
  html body .earnings-workspace,
  html body .dividend-workspace,
  html body .signals-workspace {
    overflow-x: hidden !important;
  }
  html body .earnings-table-wrap { width: 100% !important; max-width: 100% !important; overflow-x: auto !important; }
  html body .earnings-table,
  html body .signals-table { min-width: 560px !important; }

  /* These overview cards previously retained their desktop score column. */
  html body .earnings-overview,
  html body .dividend-overview,
  html body .signals-overview {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 18px !important;
  }
  html body .earnings-overview h3,
  html body .dividend-overview h3,
  html body .signals-overview h3,
  html body .earnings-overview p,
  html body .dividend-overview p,
  html body .signals-overview p {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-wrap: anywhere !important;
  }
  html body .earnings-score-card,
  html body .dividend-score-card,
  html body .signals-decision-card {
    display: grid !important;
    width: 100% !important;
    margin-top: 16px !important;
  }
}

@media (max-width: 1100px) {
  :root[data-theme="light"] body .analysis-overlay.open,
  :root[data-theme="light"] body .analysis-modal,
  :root[data-theme="light"] body .analysis-body {
    color: #101828 !important;
    background: #f6f8fc !important;
  }
  :root[data-theme="light"] body .analysis-feature-switcher,
  :root[data-theme="light"] body .analysis-feature-bar,
  :root[data-theme="light"] body .earnings-panel,
  :root[data-theme="light"] body .dividend-panel,
  :root[data-theme="light"] body .signals-panel,
  :root[data-theme="light"] body .earnings-overview,
  :root[data-theme="light"] body .dividend-overview,
  :root[data-theme="light"] body .signals-overview {
    color: #101828 !important;
    background: #ffffff !important;
    border-color: #d7e1ee !important;
  }
  :root[data-theme="light"] body .analysis-feature-bar button {
    color: #334155 !important;
    background: #eef3fa !important;
    border-color: #cbd8e8 !important;
  }
  :root[data-theme="light"] body .analysis-feature-bar button.active {
    color: #ffffff !important;
    background: #2563eb !important;
    border-color: #2563eb !important;
  }
  :root[data-theme="light"] body .topbar > nav {
    background: #ffffff !important;
    border-color: #cbd8e8 !important;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18) !important;
  }
  :root[data-theme="light"] body .topbar > nav > a,
  :root[data-theme="light"] body .topbar > nav > button {
    color: #101828 !important;
    -webkit-text-fill-color: #101828 !important;
  }
  :root[data-theme="light"] body header.topbar.menu-open > nav > a.nav-subscribe {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    justify-content: flex-start !important;
    text-align: left !important;
    color: #a15c00 !important;
    -webkit-text-fill-color: #a15c00 !important;
  }
  :root[data-theme="light"] body .topbar > nav .nav-analyst {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
  }
  html body header.topbar.menu-open > nav > button.nav-analyst,
  html body header.topbar.menu-open > nav > a.nav-analyst {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
  }
  :root[data-theme="light"] body .analysis-body h2,
  :root[data-theme="light"] body .analysis-body h3,
  :root[data-theme="light"] body .analysis-body h4,
  :root[data-theme="light"] body .analysis-body strong,
  :root[data-theme="light"] body .analysis-body p,
  :root[data-theme="light"] body .analysis-body small,
  :root[data-theme="light"] body .analysis-body span,
  :root[data-theme="light"] body .analysis-body td,
  :root[data-theme="light"] body .analysis-body th {
    color: #101828 !important;
    -webkit-text-fill-color: currentColor !important;
  }
  :root[data-theme="light"] body .analysis-price-row span.up {
    color: #15803d !important;
    -webkit-text-fill-color: #15803d !important;
    background: rgba(21, 128, 61, 0.12) !important;
  }
  :root[data-theme="light"] body .analysis-price-row span.down {
    color: #be123c !important;
    -webkit-text-fill-color: #be123c !important;
    background: rgba(190, 18, 60, 0.12) !important;
  }
  :root[data-theme="light"] body .sebi-inline-badge i {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
  }
}
