:root {
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --brand-navy: #101828;
  --brand-blue: #155eef;
  --brand-teal: #0e9384;
  --brand-violet: #7a5af8;
  --bg: #07111f;
  --bg-2: #0d1b2d;
  --ink: #111827;
  --text: #111827;
  --muted: #607089;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: #ffffff;
  --line: #d7e0ec;
  --blue: #155eef;
  --blue-soft: #eaf1ff;
  --green: #078660;
  --green-soft: #dcfae6;
  --red: #c2410c;
  --orange: #f79009;
  --shadow: 0 18px 50px rgba(28, 39, 59, 0.12);
  --body-bg:
    radial-gradient(circle at 12% 18%, rgba(21, 94, 239, 0.28), transparent 26%),
    radial-gradient(circle at 86% 20%, rgba(168, 85, 247, 0.22), transparent 28%),
    radial-gradient(circle at 48% 86%, rgba(20, 184, 166, 0.18), transparent 30%),
    linear-gradient(135deg, #050a13, #0b1627 44%, #060b14);
  --topbar-bg: rgba(5, 10, 19, 0.82);
  --tape-bg: linear-gradient(90deg, rgba(7, 17, 31, 0.96), rgba(12, 25, 43, 0.94));
  --control-bg: #ffffff;
  --control-border: #cbd5e1;
  --button-bg: #111827;
  --button-ink: #ffffff;
  --soft-surface: #f1f5f9;
  --pill-ink: #475467;
  --text-soft: #344054;
  --card-soft: rgba(255, 255, 255, 0.78);
  --tool-bg: rgba(255, 255, 255, 0.82);
  --watch-up-bg: linear-gradient(180deg, rgba(236, 253, 243, 0.88), rgba(255, 255, 255, 0.92));
  --watch-down-bg: linear-gradient(180deg, rgba(255, 241, 240, 0.84), rgba(255, 255, 255, 0.92));
  --chart-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(248, 251, 255, 0.94)),
    repeating-linear-gradient(0deg, transparent 0 55px, rgba(21, 94, 239, 0.08) 55px 56px);
  --menu-bg: #ffffff;
  --chat-bg: #ffffff;
  --chat-head-bg: linear-gradient(135deg, #f5f9ff, #f3fbf8);
  --chat-body-bg: #f8fbff;
  --bot-bg: #eaf1ff;
  --user-bg: #e7f8ef;
  --hero-panel:
    radial-gradient(circle at 22% 78%, rgba(20, 184, 166, 0.18), transparent 28%),
    radial-gradient(circle at 72% 24%, rgba(124, 58, 237, 0.2), transparent 32%),
    linear-gradient(135deg, rgba(8, 13, 24, 0.96), rgba(14, 23, 39, 0.96));
  --analysis-overlay-bg: rgba(15, 23, 42, 0.22);
  --analysis-modal-bg:
    radial-gradient(circle at 16% 18%, rgba(23, 92, 211, 0.1), transparent 28%),
    radial-gradient(circle at 82% 22%, rgba(14, 147, 132, 0.08), transparent 30%),
    linear-gradient(135deg, rgba(250, 253, 255, 0.98), rgba(239, 247, 255, 0.96)),
    var(--panel-strong);
  --analysis-modal-glow:
    radial-gradient(circle at 18% 16%, rgba(23, 92, 211, 0.08), transparent 30%),
    radial-gradient(circle at 78% 20%, rgba(14, 147, 132, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.76));
  --analysis-modal-visual:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.7) 48%, rgba(255, 255, 255, 0.98)),
    linear-gradient(115deg, transparent 0 18%, rgba(23, 92, 211, 0.08) 18.2% 18.55%, transparent 18.8% 42%, rgba(14, 147, 132, 0.08) 42.2% 42.55%, transparent 42.8%),
    repeating-linear-gradient(90deg, rgba(23, 92, 211, 0.06) 0 1px, transparent 1px 78px),
    repeating-linear-gradient(0deg, rgba(14, 147, 132, 0.045) 0 1px, transparent 1px 58px);
  --analysis-modal-visual-opacity: 0.72;
  --analysis-head-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(238, 247, 255, 0.94));
  --analysis-hero-bg:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(233, 246, 255, 0.9), rgba(255, 255, 255, 0.98)),
    repeating-linear-gradient(90deg, rgba(23, 92, 211, 0.055) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(14, 147, 132, 0.04) 0 1px, transparent 1px 52px),
    var(--panel-strong);
  --analysis-border: rgba(91, 124, 166, 0.28);
  --analysis-panel-bg: rgba(255, 255, 255, 0.86);
  --analysis-panel-strong-bg: rgba(255, 255, 255, 0.96);
  --analysis-panel-soft-bg: rgba(241, 247, 255, 0.84);
  --analysis-panel-muted-bg: rgba(232, 241, 255, 0.68);
  --analysis-accent-bg: rgba(23, 92, 211, 0.1);
  --analysis-grid-overlay:
    linear-gradient(rgba(23, 92, 211, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 92, 211, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 16% 18%, rgba(14, 147, 132, 0.08), transparent 28%);
  --analysis-chart-bg:
    linear-gradient(rgba(23, 92, 211, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 92, 211, 0.05) 1px, transparent 1px),
    var(--analysis-panel-soft-bg);
  --analysis-shadow: 0 16px 38px rgba(21, 94, 239, 0.1);
  --analysis-modal-shadow: 0 30px 90px rgba(16, 24, 40, 0.18);
  --analysis-chip-text: var(--blue);
  --analysis-good: #067647;
  --analysis-bad: #b42318;
  --analysis-warn: #b54708;
  font-family: var(--font-sans);
}

/* Final requested navigation/search/markets corrections */
.brand-wordmark {
  width: 166px;
}

.nav-analyst,
.topbar nav .nav-analyst {
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #155eef 42%, #06b6d4 100%) !important;
  box-shadow: 0 14px 34px rgba(21, 94, 239, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.nav-subscribe,
.topbar nav .nav-subscribe {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.34);
  color: #1d1604;
  font-weight: 900;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.58), transparent 22%),
    linear-gradient(135deg, #f97316 0%, #f59e0b 42%, #facc15 100%) !important;
  box-shadow:
    0 0 0 1px rgba(250, 204, 21, 0.18),
    0 16px 38px rgba(249, 115, 22, 0.34),
    0 0 28px rgba(245, 158, 11, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.nav-subscribe::before {
  content: "";
  position: absolute;
  inset: -40% -20%;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.55), transparent 65%);
  transform: translateX(-80%) rotate(12deg);
  transition: transform 0.55s ease;
}

.nav-subscribe:hover::before,
.nav-subscribe:focus-visible::before {
  transform: translateX(80%) rotate(12deg);
}

.nav-subscribe:hover,
.nav-subscribe:focus-visible {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 0 0 3px rgba(250, 204, 21, 0.24),
    0 20px 48px rgba(249, 115, 22, 0.44),
    0 0 36px rgba(245, 158, 11, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.nav-analyst:hover,
.nav-analyst:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 44px rgba(21, 94, 239, 0.48), 0 0 0 3px rgba(20, 184, 166, 0.18);
}

.notification-button {
  color: #fff;
  font-size: 0;
  background: linear-gradient(180deg, rgba(17, 28, 46, 0.94), rgba(15, 23, 42, 0.94));
}

.notification-button::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: transparent;
}

.notification-button::after {
  content: "";
  position: absolute;
  top: 11px;
  right: 11px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #fff;
  box-shadow: none;
}

.profile-button.simple {
  width: 42px;
  min-width: 42px;
  padding: 4px;
  border-radius: 999px;
}

.profile-button.simple span {
  width: 30px;
  height: 30px;
}

.profile-button.simple b,
.profile-button.simple i,
.profile-button.simple::after {
  display: none !important;
}

.profile-dropdown {
  right: 0;
  width: 220px;
}

.profile-dropdown button {
  min-height: 44px;
}

.search-row {
  width: min(820px, 100%);
  grid-template-columns: 46px minmax(0, 1fr);
}

.search-row input,
.topbar-search input,
.watchlist-form input,
.analysis-search-form input {
  min-width: 0;
  text-align: left !important;
  direction: ltr;
}

.search-row input {
  padding-left: 0 !important;
}

.hero-search-icon {
  justify-self: center;
}

.watchlist-input-wrap,
.analysis-search-input-wrap {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  border: 1px solid var(--control-border);
  border-radius: 10px;
  background: rgba(8, 15, 29, 0.72);
}

.watchlist-input-wrap input,
.analysis-search-input-wrap input {
  width: 100%;
  border: 0 !important;
  background: transparent !important;
}

.field-search-icon {
  position: relative;
  display: grid;
  height: 100%;
  min-height: 42px;
  place-items: center;
}

.field-search-icon::before {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid var(--muted);
  border-radius: 999px;
}

.field-search-icon::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  border-radius: 999px;
  background: var(--muted);
  transform: translate(8px, 8px) rotate(45deg);
}

.watchlist-form {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.analysis-request {
  justify-items: center;
}

.analysis-search-form {
  grid-template-columns: minmax(280px, 760px) auto;
  width: min(100%, 980px);
  margin-inline: auto;
}

.analysis-search-input-wrap {
  min-height: 58px;
}

.markets-main {
  display: grid;
  gap: 16px;
  width: min(1500px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.markets-hero,
.markets-table-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: clamp(18px, 2.5vw, 28px);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.markets-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.markets-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(36px, 4vw, 64px);
}

.markets-page-tape {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.markets-overview.standalone {
  width: 100%;
  margin: 0;
}

.markets-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.markets-lists article {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.markets-lists h3 {
  margin: 0;
}

.markets-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 120px 94px;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.12);
}

.markets-row span {
  overflow: hidden;
  color: var(--text-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.markets-row em,
.markets-row b {
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.markets-row.up b {
  color: #36d399;
}

.markets-row.down b {
  color: #ff6b6b;
}

.markets-trending-panel {
  display: grid;
  gap: 16px;
}

.markets-trending-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.markets-trending-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.12);
  text-decoration: none;
}

.markets-trending-card span {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 900;
}

.markets-trending-card strong {
  font-size: 20px;
  line-height: 1;
}

.markets-trending-card small {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.markets-trending-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.markets-trending-card em,
.markets-trending-card b {
  font-style: normal;
  font-weight: 950;
}

.markets-trending-card.up b {
  color: #36d399;
}

.markets-trending-card.down b {
  color: #ff6b6b;
}

.markets-trending-card.loading {
  opacity: 0.74;
}

@media (max-width: 900px) {
  .markets-lists {
    grid-template-columns: 1fr;
  }

  .markets-trending-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analysis-recent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .markets-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .markets-row {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .markets-row em,
  .markets-row b {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .markets-trending-grid {
    grid-template-columns: 1fr;
  }

  .analysis-recent-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .analysis-search-form,
  .watchlist-form {
    grid-template-columns: 1fr;
  }

  .analysis-search-input-wrap,
  .watchlist-input-wrap {
    min-width: 0;
  }
}

/* Absolute final mobile/header override */
.topbar {
  grid-template-columns: minmax(250px, auto) minmax(260px, 420px) minmax(0, 1fr) !important;
}

.brand-wordmark {
  width: 164px !important;
  min-width: 164px !important;
}

.topbar-search {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) !important;
  width: min(100%, 420px) !important;
  max-width: 420px !important;
  min-width: 260px !important;
}

.topbar-search-icon {
  grid-column: 1 !important;
  justify-self: center !important;
}

.topbar-search input {
  grid-column: 2 !important;
  width: 100% !important;
  padding: 0 14px 0 0 !important;
  text-align: left !important;
  direction: ltr !important;
}

.search-row {
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) !important;
  width: min(760px, 100%) !important;
}

.hero-search-icon {
  grid-column: 1 !important;
  justify-self: center !important;
}

.search-row input {
  grid-column: 2 !important;
  width: 100% !important;
  padding: 0 16px 0 0 !important;
  text-align: left !important;
  direction: ltr !important;
}

.notification-button {
  color: #fff !important;
  background: rgba(15, 23, 42, 0.92) !important;
}

.notification-button::before {
  content: "" !important;
  position: static !important;
  width: 22px !important;
  height: 22px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background-color: currentColor !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3Cpath d='M10 4a2 2 0 0 1 4 0'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3Cpath d='M10 4a2 2 0 0 1 4 0'/%3E%3C/svg%3E") center / contain no-repeat;
}

.notification-button::after {
  display: none !important;
}

.topbar nav .nav-analyst {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff !important;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 38%, #0891b2 72%, #0f766e 100%) !important;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.34), 0 0 26px rgba(6, 182, 212, 0.24) !important;
}

.topbar nav .nav-analyst::after {
  content: "";
  position: absolute;
  inset: -60% auto -60% -42%;
  width: 42%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.46), transparent);
  animation: analyst-sheen 3.8s ease-in-out infinite;
}

.profile-button.simple {
  display: grid !important;
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  place-items: center !important;
  border-radius: 999px !important;
  background: transparent !important;
}

.profile-button.simple span {
  width: 34px !important;
  height: 34px !important;
  color: #fff !important;
  background: #a58d5f !important;
}

.profile-button.simple b,
.profile-button.simple i,
.profile-button.simple::after {
  display: none !important;
}

:root[data-theme="light"] .topbar-search,
:root[data-theme="light"] .search-row,
:root[data-theme="light"] .watchlist-input-wrap,
:root[data-theme="light"] .analysis-search-input-wrap {
  border-color: rgba(21, 94, 239, 0.22) !important;
  background: rgba(255, 255, 255, 0.92) !important;
}

:root[data-theme="light"] .topbar-search input,
:root[data-theme="light"] .search-row input,
:root[data-theme="light"] .watchlist-form input,
:root[data-theme="light"] .analysis-search-form input {
  color: #111827 !important;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr !important;
  }

  .topbar-search {
    width: 100% !important;
    max-width: none !important;
  }

  .topbar nav {
    justify-content: center !important;
  }
}

@media (max-width: 760px) {
  html,
  body {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .topbar {
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    padding: 8px 10px !important;
    overflow: hidden !important;
  }

  .brand {
    justify-content: center !important;
  }

  .brand-wordmark {
    width: 150px !important;
    min-width: 150px !important;
  }

  .topbar-search {
    grid-template-columns: 40px minmax(0, 1fr) !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .topbar nav {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    gap: 6px !important;
    overflow: hidden !important;
  }

  .topbar nav a {
    min-width: 0 !important;
    min-height: 36px !important;
    padding-inline: 4px !important;
    font-size: 12px !important;
    text-align: center !important;
  }

  .notification-button,
  .theme-switch,
  .profile-button.simple {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    justify-self: center !important;
  }

  .topbar nav .nav-analyst {
    grid-column: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 38px !important;
    padding-inline: 8px !important;
  }

  .profile-menu {
    grid-column: 3 !important;
    justify-self: center !important;
  }

  .profile-button.simple span {
    width: 31px !important;
    height: 31px !important;
  }

  .hero {
    width: calc(100% - 16px) !important;
    margin-inline: auto !important;
  }

  .hero-copy h1 {
    width: 100% !important;
    max-width: 100% !important;
    font-size: clamp(25px, 7vw, 31px) !important;
    overflow-wrap: anywhere !important;
  }

  .search-row {
    width: min(100%, calc(100vw - 34px)) !important;
    grid-template-columns: 40px minmax(0, 1fr) !important;
  }
}

/* Final visual unification: hero-centered dark research workspace. */
:root,
:root[data-theme="dark"] {
  --bg: #050812;
  --bg-2: #080d1b;
  --ink: #f8fbff;
  --text: #f8fbff;
  --muted: #9aa8bd;
  --text-soft: #b7c2d4;
  --panel: rgba(7, 13, 27, 0.82);
  --panel-strong: rgba(6, 10, 22, 0.94);
  --card-soft: rgba(17, 29, 49, 0.78);
  --soft-surface: rgba(28, 42, 65, 0.74);
  --line: rgba(89, 119, 165, 0.42);
  --line-soft: rgba(89, 119, 165, 0.22);
  --control-bg: rgba(7, 13, 27, 0.86);
  --control-border: rgba(122, 167, 255, 0.32);
  --body-bg:
    radial-gradient(circle at 18% 24%, rgba(20, 184, 166, 0.12), transparent 28%),
    radial-gradient(circle at 70% 18%, rgba(124, 58, 237, 0.18), transparent 34%),
    linear-gradient(135deg, #050812 0%, #081321 42%, #09071c 100%);
  --hero-panel:
    radial-gradient(circle at 22% 78%, rgba(20, 184, 166, 0.18), transparent 28%),
    radial-gradient(circle at 72% 24%, rgba(124, 58, 237, 0.2), transparent 32%),
    linear-gradient(135deg, rgba(5, 8, 18, 0.98), rgba(9, 7, 28, 0.98));
  --chart-bg:
    linear-gradient(rgba(122, 167, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 167, 255, 0.045) 1px, transparent 1px),
    rgba(6, 11, 24, 0.9);
  --watch-up-bg: rgba(9, 33, 35, 0.78);
  --watch-down-bg: rgba(37, 14, 24, 0.78);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

html,
body {
  background: var(--body-bg) !important;
}

body::before {
  opacity: 0.72 !important;
}

.hero-copy,
.market-card,
.watchlist,
.market-news,
.brand-finale,
.home-movers,
.markets-hero,
.markets-overview,
.markets-table-panel,
.movers-panel,
.ipo-hero,
.ipo-kpis article,
.ipo-controls,
.ipo-card,
.analysis-panel,
.analysis-summary,
.analysis-verdict-card,
.profile-panel,
.profile-hero-card,
.app-footer {
  border-color: rgba(122, 167, 255, 0.24) !important;
  background:
    linear-gradient(135deg, rgba(8, 13, 27, 0.9), rgba(9, 7, 28, 0.84)),
    var(--panel) !important;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.18) !important;
}

.hero-copy {
  background: var(--hero-panel) !important;
}

body:not(.watchlist-focus-view) main > .hero:first-child {
  min-height: calc(100svh - 156px) !important;
  display: grid !important;
  align-items: stretch !important;
  justify-items: center !important;
  padding-block: 16px 22px !important;
}

body:not(.watchlist-focus-view) main > .hero:first-child .hero-copy {
  width: 100% !important;
  min-height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: column !important;
  text-align: center !important;
  gap: clamp(14px, 2vh, 22px) !important;
  padding-block: clamp(22px, 5vh, 52px) !important;
}

body:not(.watchlist-focus-view) main > .hero:first-child .hero-copy h1,
body:not(.watchlist-focus-view) main > .hero:first-child .hero-copy .lede {
  margin-inline: auto !important;
  text-align: center !important;
}

body:not(.watchlist-focus-view) main > .hero:first-child .hero-actions,
body:not(.watchlist-focus-view) main > .hero:first-child .ticker-strip {
  justify-content: center !important;
}

body:not(.watchlist-focus-view) main > .hero:first-child .search-panel,
body:not(.watchlist-focus-view) main > .hero:first-child .ticker-strip {
  margin-inline: auto !important;
}

body:not(.watchlist-focus-view) .market-workbench {
  margin-top: 24px !important;
}

@media (max-width: 980px) {
  body:not(.watchlist-focus-view) main > .hero:first-child {
    min-height: calc(100svh - 132px) !important;
  }
}

@media (max-width: 640px) {
  body:not(.watchlist-focus-view) main > .hero:first-child {
    min-height: calc(100svh - 118px) !important;
    padding-block: 10px 18px !important;
  }

  body:not(.watchlist-focus-view) main > .hero:first-child .hero-copy {
    justify-content: flex-start !important;
    padding-block: 20px !important;
  }
}

/* Final visual unification: hero-centered dark research workspace. */
:root,
:root[data-theme="dark"] {
  --bg: #050812;
  --bg-2: #080d1b;
  --ink: #f8fbff;
  --text: #f8fbff;
  --muted: #9aa8bd;
  --text-soft: #b7c2d4;
  --panel: rgba(7, 13, 27, 0.82);
  --panel-strong: rgba(6, 10, 22, 0.94);
  --card-soft: rgba(17, 29, 49, 0.78);
  --soft-surface: rgba(28, 42, 65, 0.74);
  --line: rgba(89, 119, 165, 0.42);
  --line-soft: rgba(89, 119, 165, 0.22);
  --control-bg: rgba(7, 13, 27, 0.86);
  --control-border: rgba(122, 167, 255, 0.32);
  --body-bg:
    radial-gradient(circle at 18% 24%, rgba(20, 184, 166, 0.12), transparent 28%),
    radial-gradient(circle at 70% 18%, rgba(124, 58, 237, 0.18), transparent 34%),
    linear-gradient(135deg, #050812 0%, #081321 42%, #09071c 100%);
  --hero-panel:
    radial-gradient(circle at 22% 78%, rgba(20, 184, 166, 0.18), transparent 28%),
    radial-gradient(circle at 72% 24%, rgba(124, 58, 237, 0.2), transparent 32%),
    linear-gradient(135deg, rgba(5, 8, 18, 0.98), rgba(9, 7, 28, 0.98));
  --chart-bg:
    linear-gradient(rgba(122, 167, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 167, 255, 0.045) 1px, transparent 1px),
    rgba(6, 11, 24, 0.9);
  --watch-up-bg: rgba(9, 33, 35, 0.78);
  --watch-down-bg: rgba(37, 14, 24, 0.78);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

html,
body {
  background: var(--body-bg) !important;
}

body::before {
  opacity: 0.72 !important;
}

.hero-copy,
.market-card,
.watchlist,
.market-news,
.brand-finale,
.home-movers,
.markets-hero,
.markets-overview,
.markets-table-panel,
.movers-panel,
.ipo-hero,
.ipo-kpis article,
.ipo-controls,
.ipo-card,
.analysis-panel,
.analysis-summary,
.analysis-verdict-card,
.profile-panel,
.profile-hero-card,
.app-footer {
  border-color: rgba(122, 167, 255, 0.24) !important;
  background:
    linear-gradient(135deg, rgba(8, 13, 27, 0.9), rgba(9, 7, 28, 0.84)),
    var(--panel) !important;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.18) !important;
}

.hero-copy {
  background: var(--hero-panel) !important;
}

body:not(.watchlist-focus-view) main > .hero:first-child {
  min-height: calc(100svh - 156px) !important;
  display: grid !important;
  align-items: stretch !important;
  justify-items: center !important;
  padding-block: 16px 22px !important;
}

body:not(.watchlist-focus-view) main > .hero:first-child .hero-copy {
  width: 100% !important;
  min-height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: column !important;
  text-align: center !important;
  gap: clamp(14px, 2vh, 22px) !important;
  padding-block: clamp(22px, 5vh, 52px) !important;
}

body:not(.watchlist-focus-view) main > .hero:first-child .hero-copy h1,
body:not(.watchlist-focus-view) main > .hero:first-child .hero-copy .lede {
  margin-inline: auto !important;
  text-align: center !important;
}

body:not(.watchlist-focus-view) main > .hero:first-child .hero-actions,
body:not(.watchlist-focus-view) main > .hero:first-child .ticker-strip {
  justify-content: center !important;
}

body:not(.watchlist-focus-view) main > .hero:first-child .search-panel {
  margin: 0 auto !important;
}

body:not(.watchlist-focus-view) main > .hero:first-child .ticker-strip {
  margin: 0 auto !important;
}

body:not(.watchlist-focus-view) .market-workbench {
  margin-top: 24px !important;
}

@media (max-width: 980px) {
  body:not(.watchlist-focus-view) main > .hero:first-child {
    min-height: calc(100svh - 132px) !important;
  }
}

@media (max-width: 640px) {
  body:not(.watchlist-focus-view) main > .hero:first-child {
    min-height: calc(100svh - 118px) !important;
    padding-block: 10px 18px !important;
  }

  body:not(.watchlist-focus-view) main > .hero:first-child .hero-copy {
    justify-content: flex-start !important;
    padding-block: 20px !important;
  }
}

/* Final requested visual-state winner */
.notification-button,
.theme-switch {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

.analysis-search-form,
.analysis-search-input-wrap,
.analysis-header-search,
.analysis-header-search-wrap,
.topbar-search {
  overflow: visible !important;
}

.analysis-search-form,
.analysis-header-search,
.topbar-search {
  position: relative;
}

.analysis-request .analysis-search-form {
  z-index: 120;
}

:root[data-theme="light"] .notification-button,
:root[data-theme="light"] .theme-switch {
  color: #101828 !important;
  background: transparent !important;
}

:root[data-theme="dark"] .notification-button,
:root[data-theme="dark"] .theme-switch {
  color: #ffffff !important;
  background: transparent !important;
}

.topbar nav .nav-analyst,
.nav-analyst {
  color: #ffffff !important;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.32), transparent 24%),
    linear-gradient(135deg, #7c3aed 0%, #2563eb 36%, #0891b2 70%, #0f766e 100%) !important;
  box-shadow:
    0 18px 40px rgba(37, 99, 235, 0.32),
    0 0 22px rgba(124, 58, 237, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
}

.analysis-teaser-button {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.28), transparent 25%),
    linear-gradient(135deg, #7c3aed 0%, #4f46e5 45%, #0ea5e9 100%) !important;
  box-shadow: 0 18px 34px rgba(79, 70, 229, 0.28), 0 0 24px rgba(124, 58, 237, 0.22) !important;
}

.hero-analyst {
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.25), transparent 26%),
    linear-gradient(135deg, #155eef 0%, #0ea5e9 46%, #0f766e 100%) !important;
  box-shadow: 0 18px 34px rgba(14, 165, 233, 0.24), 0 0 24px rgba(15, 118, 110, 0.22) !important;
}

/* Requested desktop action polish */
.notification-button,
.theme-switch {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.notification-button {
  color: var(--text) !important;
}

.notification-button:hover,
.theme-switch:hover {
  transform: translateY(-1px);
  filter: drop-shadow(0 8px 16px rgba(21, 94, 239, 0.22));
}

:root[data-theme="dark"] .notification-button,
:root[data-theme="dark"] .theme-switch {
  color: #ffffff !important;
}

:root[data-theme="light"] .notification-button,
:root[data-theme="light"] .theme-switch {
  color: #101828 !important;
}

.theme-switch {
  color: var(--text) !important;
}

.theme-switch::before,
.theme-switch [data-theme-label] {
  display: none !important;
}

.topbar nav {
  padding-right: 14px;
}

.profile-menu {
  margin-left: 8px;
}

.topbar nav .nav-analyst,
.nav-analyst {
  color: #ffffff !important;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.28), transparent 24%),
    linear-gradient(135deg, #6d28d9 0%, #2563eb 36%, #0891b2 70%, #0f766e 100%) !important;
  box-shadow:
    0 18px 40px rgba(37, 99, 235, 0.32),
    0 0 22px rgba(124, 58, 237, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
}

.analysis-teaser-button,
.hero-analyst {
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.analysis-teaser-button {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.28), transparent 25%),
    linear-gradient(135deg, #7c3aed 0%, #4f46e5 45%, #0ea5e9 100%) !important;
  box-shadow: 0 18px 34px rgba(79, 70, 229, 0.28), 0 0 24px rgba(124, 58, 237, 0.22) !important;
}

.hero-analyst {
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.25), transparent 26%),
    linear-gradient(135deg, #155eef 0%, #0ea5e9 46%, #0f766e 100%) !important;
  box-shadow: 0 18px 34px rgba(14, 165, 233, 0.24), 0 0 24px rgba(15, 118, 110, 0.22) !important;
}

.analysis-teaser-button::after,
.hero-analyst::after,
.topbar nav .nav-analyst::after {
  content: "";
  position: absolute;
  inset: -65% auto -65% -38%;
  width: 36%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.46), transparent);
  animation: analyst-sheen 4.2s ease-in-out infinite;
}

.analysis-teaser-button:hover,
.hero-analyst:hover {
  transform: translateY(-2px);
  filter: saturate(1.08);
}

.profile-menu:not(.open) .profile-dropdown {
  display: none !important;
}

.profile-menu.open .profile-dropdown {
  display: grid !important;
}

.profile-menu:focus-within .profile-dropdown {
  display: none;
}

.profile-menu.open:focus-within .profile-dropdown {
  display: grid !important;
}

.action-panel {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 22px;
  background: rgba(2, 6, 23, 0.42);
  backdrop-filter: blur(8px);
}

.action-panel.open {
  display: grid;
}

.action-panel-card {
  position: relative;
  width: min(560px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 15%, rgba(21, 94, 239, 0.16), transparent 34%),
    linear-gradient(135deg, var(--panel-strong), var(--panel));
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.28);
}

.action-panel-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: var(--card-soft);
}

.action-panel-card h2 {
  margin: 2px 0 14px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1;
}

.action-panel-body {
  display: grid;
  gap: 10px;
}

.action-panel-body p {
  margin: 0;
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
}

.app-footer {
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) minmax(360px, 1.7fr) auto;
  gap: 22px;
  align-items: start;
  width: min(1540px, calc(100% - 36px));
  margin: 34px auto 0;
  border: 1px solid var(--line);
  border-radius: 14px 14px 0 0;
  padding: clamp(22px, 3vw, 34px);
  color: var(--text);
  background:
    radial-gradient(circle at 14% 18%, rgba(21, 94, 239, 0.12), transparent 28%),
    radial-gradient(circle at 82% 22%, rgba(14, 147, 132, 0.1), transparent 30%),
    var(--panel);
  box-shadow: var(--shadow);
}

.app-footer-brand {
  display: grid;
  gap: 12px;
}

.app-footer-brand > img {
  width: 184px;
}

.app-footer-brand p,
.app-footer-brand small,
.app-footer-grid span {
  margin: 0;
  color: var(--text-soft);
  font-weight: 750;
  line-height: 1.5;
}

.app-footer-brand small {
  color: var(--muted);
}

.app-footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.app-footer-grid article {
  display: grid;
  gap: 7px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 14px;
  background: var(--card-soft);
}

.app-footer-grid strong {
  color: var(--text);
  font-size: 16px;
}

.app-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.app-footer-actions button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--blue);
  background: var(--card-soft);
  font-size: 13px;
  font-weight: 900;
}

@media (max-width: 980px) {
  .app-footer {
    grid-template-columns: 1fr;
  }

  .app-footer-grid {
    grid-template-columns: 1fr;
  }

  .app-footer-actions {
    justify-content: flex-start;
  }
}

/* Absolute final mobile/header override */
.topbar {
  grid-template-columns: minmax(250px, auto) minmax(260px, 420px) minmax(0, 1fr) !important;
}

.brand-wordmark {
  width: 164px !important;
  min-width: 164px !important;
}

.topbar-search {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) !important;
  width: min(100%, 420px) !important;
  max-width: 420px !important;
  min-width: 260px !important;
}

.topbar-search-icon {
  grid-column: 1 !important;
  justify-self: center !important;
}

.topbar-search input {
  grid-column: 2 !important;
  width: 100% !important;
  padding: 0 14px 0 0 !important;
  text-align: left !important;
  direction: ltr !important;
}

.search-row {
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) !important;
  width: min(760px, 100%) !important;
}

.hero-search-icon {
  grid-column: 1 !important;
  justify-self: center !important;
}

.search-row input {
  grid-column: 2 !important;
  width: 100% !important;
  padding: 0 16px 0 0 !important;
  text-align: left !important;
  direction: ltr !important;
}

.notification-button {
  color: #fff !important;
  background: rgba(15, 23, 42, 0.92) !important;
}

.notification-button::before {
  content: "" !important;
  position: static !important;
  width: 22px !important;
  height: 22px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background-color: currentColor !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3Cpath d='M10 4a2 2 0 0 1 4 0'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3Cpath d='M10 4a2 2 0 0 1 4 0'/%3E%3C/svg%3E") center / contain no-repeat;
}

.notification-button::after {
  display: none !important;
}

.topbar nav .nav-analyst {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff !important;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 38%, #0891b2 72%, #0f766e 100%) !important;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.34), 0 0 26px rgba(6, 182, 212, 0.24) !important;
}

.topbar nav .nav-analyst::after {
  content: "";
  position: absolute;
  inset: -60% auto -60% -42%;
  width: 42%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.46), transparent);
  animation: analyst-sheen 3.8s ease-in-out infinite;
}

.profile-button.simple {
  display: grid !important;
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  place-items: center !important;
  border-radius: 999px !important;
  background: transparent !important;
}

.profile-button.simple span {
  width: 34px !important;
  height: 34px !important;
  color: #fff !important;
  background: #a58d5f !important;
}

.profile-button.simple b,
.profile-button.simple i,
.profile-button.simple::after {
  display: none !important;
}

:root[data-theme="light"] .topbar-search,
:root[data-theme="light"] .search-row,
:root[data-theme="light"] .watchlist-input-wrap,
:root[data-theme="light"] .analysis-search-input-wrap {
  border-color: rgba(21, 94, 239, 0.22) !important;
  background: rgba(255, 255, 255, 0.92) !important;
}

:root[data-theme="light"] .topbar-search input,
:root[data-theme="light"] .search-row input,
:root[data-theme="light"] .watchlist-form input,
:root[data-theme="light"] .analysis-search-form input {
  color: #111827 !important;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr !important;
  }

  .topbar-search {
    width: 100% !important;
    max-width: none !important;
  }

  .topbar nav {
    justify-content: center !important;
  }
}

@media (max-width: 760px) {
  html,
  body {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .topbar {
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    padding: 8px 10px !important;
    overflow: hidden !important;
  }

  .brand {
    justify-content: center !important;
  }

  .brand-wordmark {
    width: 150px !important;
    min-width: 150px !important;
  }

  .topbar-search {
    grid-template-columns: 40px minmax(0, 1fr) !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .topbar nav {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    gap: 6px !important;
    overflow: hidden !important;
  }

  .topbar nav a {
    min-width: 0 !important;
    min-height: 36px !important;
    padding-inline: 4px !important;
    font-size: 12px !important;
    text-align: center !important;
  }

  .notification-button,
  .theme-switch,
  .profile-button.simple {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    justify-self: center !important;
  }

  .topbar nav .nav-analyst {
    grid-column: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 38px !important;
    padding-inline: 8px !important;
  }

  .profile-menu {
    grid-column: 3 !important;
    justify-self: center !important;
  }

  .profile-button.simple span {
    width: 31px !important;
    height: 31px !important;
  }

  .hero {
    width: calc(100% - 16px) !important;
    margin-inline: auto !important;
  }

  .hero-copy h1 {
    width: 100% !important;
    max-width: 100% !important;
    font-size: clamp(25px, 7vw, 31px) !important;
    overflow-wrap: anywhere !important;
  }

  .search-row {
    width: min(100%, calc(100vw - 34px)) !important;
    grid-template-columns: 40px minmax(0, 1fr) !important;
  }
}

/* Final header/search correction pass */
.topbar {
  grid-template-columns: minmax(250px, auto) minmax(260px, 420px) minmax(0, 1fr) !important;
  gap: 12px !important;
}

.brand-wordmark {
  width: 164px !important;
  min-width: 164px;
}

.topbar-search,
.search-row {
  direction: ltr !important;
  text-align: left !important;
}

.topbar-search {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) !important;
  align-items: center;
  width: min(100%, 420px) !important;
  min-width: 260px !important;
  max-width: 420px !important;
  min-height: 46px;
  overflow: hidden;
  border-color: rgba(122, 167, 255, 0.42);
  background: rgba(8, 15, 29, 0.86);
}

.topbar-search-icon {
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-self: center !important;
  pointer-events: none;
}

.topbar-search input {
  grid-column: 2 !important;
  grid-row: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 0 14px 0 0 !important;
  color: var(--text) !important;
  text-align: left !important;
  direction: ltr !important;
  background: transparent !important;
  outline: 0 !important;
}

.topbar-search input::placeholder,
.search-row input::placeholder,
.watchlist-form input::placeholder,
.analysis-search-form input::placeholder {
  color: var(--muted);
  opacity: 0.86;
  text-align: left !important;
}

.topbar nav {
  gap: 7px !important;
}

.topbar nav a {
  padding-inline: 10px !important;
}

.topbar nav .nav-analyst {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.58) !important;
  color: #ffffff !important;
  background:
    linear-gradient(135deg, #2563eb 0%, #1d4ed8 38%, #0891b2 72%, #0f766e 100%) !important;
  box-shadow:
    0 16px 34px rgba(37, 99, 235, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 0 26px rgba(6, 182, 212, 0.24) !important;
}

.topbar nav .nav-analyst::after {
  content: "";
  position: absolute;
  inset: -60% auto -60% -42%;
  z-index: -1;
  width: 42%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.46), transparent);
  animation: analyst-sheen 3.8s ease-in-out infinite;
}

@keyframes analyst-sheen {
  0%, 38% {
    transform: translateX(0) rotate(18deg);
  }
  72%, 100% {
    transform: translateX(430%) rotate(18deg);
  }
}

.notification-button {
  width: 44px !important;
  min-width: 44px !important;
  height: 44px;
  border-radius: 12px !important;
  color: #ffffff !important;
  background: rgba(15, 23, 42, 0.92) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.notification-button::before {
  content: "" !important;
  position: static !important;
  width: 22px !important;
  height: 22px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background-color: currentColor !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3Cpath d='M10 4a2 2 0 0 1 4 0'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3Cpath d='M10 4a2 2 0 0 1 4 0'/%3E%3C/svg%3E") center / contain no-repeat;
}

.notification-button::after {
  display: none !important;
}

.profile-button.simple {
  display: grid !important;
  width: 44px !important;
  min-width: 44px !important;
  height: 44px;
  padding: 0 !important;
  place-items: center;
  border: 1px solid rgba(122, 167, 255, 0.34) !important;
  border-radius: 999px !important;
  background: transparent !important;
  box-shadow: none !important;
}

.profile-button.simple span {
  display: grid !important;
  width: 34px !important;
  height: 34px !important;
  place-items: center;
  border-radius: 999px;
  color: #ffffff !important;
  background: #a58d5f !important;
  font-size: 17px !important;
  font-weight: 950 !important;
}

.profile-button.simple b,
.profile-button.simple i,
.profile-button.simple::after {
  display: none !important;
}

.profile-dropdown {
  width: 210px !important;
  background: var(--panel-strong) !important;
}

.search-row {
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) !important;
  align-items: center;
  width: min(760px, 100%) !important;
  min-height: 52px;
  overflow: hidden;
}

.hero-search-icon {
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-self: center !important;
  width: 44px !important;
  min-width: 44px !important;
  height: 100% !important;
  min-height: 52px !important;
  pointer-events: none;
}

.search-row input {
  grid-column: 2 !important;
  grid-row: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 0 16px 0 0 !important;
  color: var(--text) !important;
  text-align: left !important;
  direction: ltr !important;
  background: transparent !important;
  outline: 0 !important;
}

:root[data-theme="light"] .topbar-search,
:root[data-theme="light"] .search-row,
:root[data-theme="light"] .watchlist-input-wrap,
:root[data-theme="light"] .analysis-search-input-wrap {
  border-color: rgba(21, 94, 239, 0.22) !important;
  background: rgba(255, 255, 255, 0.92) !important;
}

:root[data-theme="light"] .topbar-search input,
:root[data-theme="light"] .search-row input,
:root[data-theme="light"] .watchlist-form input,
:root[data-theme="light"] .analysis-search-form input {
  color: #111827 !important;
}

:root[data-theme="light"] .profile-button.simple {
  border-color: rgba(21, 94, 239, 0.24) !important;
  background: rgba(255, 255, 255, 0.72) !important;
}

:root[data-theme="light"] .notification-button {
  color: #ffffff !important;
  background: #111827 !important;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr !important;
    align-items: stretch;
  }

  .topbar-search {
    width: 100% !important;
    max-width: none !important;
  }

  .topbar nav {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center !important;
    margin-left: 0 !important;
  }
}

@media (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .topbar {
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box;
    padding: 8px 10px !important;
    overflow: hidden;
  }

  .brand {
    justify-content: center;
  }

  .brand-wordmark {
    width: 150px !important;
    min-width: 150px;
  }

  .topbar-search {
    min-width: 0 !important;
    grid-template-columns: 40px minmax(0, 1fr) !important;
  }

  .topbar nav {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    box-sizing: border-box;
    align-items: center;
    justify-content: stretch !important;
    gap: 6px !important;
    overflow: hidden;
  }

  .topbar nav a {
    min-height: 36px;
    min-width: 0 !important;
    padding-inline: 4px !important;
    font-size: 12px;
    text-align: center;
  }

  .topbar nav .nav-analyst {
    grid-column: 2;
    width: 100% !important;
    min-width: 0 !important;
    padding-inline: 8px !important;
    min-height: 38px;
  }

  .notification-button,
  .theme-switch,
  .profile-button.simple {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px;
    max-width: 40px;
  }

  .notification-button,
  .theme-switch {
    justify-self: center;
  }

  .profile-menu {
    grid-column: 3;
    justify-self: center;
    display: grid !important;
  }

  .profile-button.simple span {
    width: 31px !important;
    height: 31px !important;
  }

  .search-row {
    width: min(100%, calc(100vw - 34px)) !important;
    grid-template-columns: 40px minmax(0, 1fr) !important;
  }

  .hero {
    width: calc(100% - 16px);
    margin-inline: auto;
  }

  .hero-copy h1 {
    width: 100% !important;
    max-width: 100% !important;
    font-size: clamp(25px, 7vw, 31px) !important;
    overflow-wrap: anywhere;
  }
}

:root[data-theme="dark"] {
  --bg: #0c1220;
  --bg-2: #111c2e;
  --ink: #e8eef8;
  --text: #e8eef8;
  --muted: #9ba9bd;
  --panel: rgba(17, 27, 44, 0.92);
  --panel-strong: #101827;
  --line: #26364e;
  --blue: #7aa7ff;
  --blue-soft: rgba(68, 106, 190, 0.2);
  --green: #4ade80;
  --green-soft: rgba(34, 197, 94, 0.16);
  --red: #fb7185;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --body-bg:
    radial-gradient(circle at top left, rgba(21, 94, 239, 0.22), transparent 32%),
    radial-gradient(circle at top right, rgba(14, 147, 132, 0.2), transparent 30%),
    linear-gradient(135deg, #080d18, #101827 46%, #0b1422);
  --topbar-bg: rgba(10, 17, 29, 0.9);
  --tape-bg: linear-gradient(90deg, rgba(13, 22, 38, 0.98), rgba(16, 29, 49, 0.96));
  --control-bg: #111c2e;
  --control-border: #31445f;
  --button-bg: #e8eef8;
  --button-ink: #0b1220;
  --soft-surface: #18253a;
  --pill-ink: #c1cad8;
  --text-soft: #c6d0df;
  --card-soft: rgba(17, 28, 46, 0.82);
  --tool-bg: rgba(17, 28, 46, 0.86);
  --watch-up-bg: linear-gradient(180deg, rgba(20, 83, 45, 0.44), rgba(17, 28, 46, 0.9));
  --watch-down-bg: linear-gradient(180deg, rgba(127, 29, 29, 0.38), rgba(17, 28, 46, 0.9));
  --chart-bg:
    linear-gradient(180deg, rgba(14, 23, 39, 0.72), rgba(17, 28, 46, 0.96)),
    repeating-linear-gradient(0deg, transparent 0 55px, rgba(122, 167, 255, 0.13) 55px 56px);
  --menu-bg: #111c2e;
  --chat-bg: #111c2e;
  --chat-head-bg: linear-gradient(135deg, #13213a, #102a2b);
  --chat-body-bg: #0d1726;
  --bot-bg: #172744;
  --user-bg: #123324;
  --hero-panel:
    radial-gradient(circle at 18% 78%, rgba(20, 184, 166, 0.2), transparent 28%),
    radial-gradient(circle at 74% 28%, rgba(217, 70, 239, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(5, 10, 19, 0.98), rgba(13, 22, 38, 0.98));
  --analysis-overlay-bg: rgba(3, 7, 18, 0.64);
  --analysis-modal-bg:
    radial-gradient(circle at 16% 18%, rgba(122, 167, 255, 0.14), transparent 28%),
    radial-gradient(circle at 82% 22%, rgba(34, 211, 238, 0.1), transparent 30%),
    linear-gradient(135deg, rgba(6, 12, 28, 0.92), rgba(4, 20, 25, 0.88)),
    var(--chat-bg);
  --analysis-modal-glow:
    radial-gradient(circle at 18% 16%, rgba(251, 146, 60, 0.2), transparent 30%),
    radial-gradient(circle at 78% 20%, rgba(34, 211, 238, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(5, 10, 20, 0.24), rgba(5, 10, 20, 0.88));
  --analysis-modal-visual:
    linear-gradient(90deg, rgba(5, 10, 20, 0.92), rgba(5, 10, 20, 0.56) 48%, rgba(5, 10, 20, 0.94)),
    linear-gradient(115deg, transparent 0 18%, rgba(122, 167, 255, 0.11) 18.2% 18.55%, transparent 18.8% 42%, rgba(34, 211, 238, 0.08) 42.2% 42.55%, transparent 42.8%),
    repeating-linear-gradient(90deg, rgba(122, 167, 255, 0.08) 0 1px, transparent 1px 78px),
    repeating-linear-gradient(0deg, rgba(34, 211, 238, 0.05) 0 1px, transparent 1px 58px);
  --analysis-modal-visual-opacity: 0.78;
  --analysis-head-bg: linear-gradient(135deg, rgba(19, 33, 58, 0.94), rgba(13, 39, 42, 0.88));
  --analysis-hero-bg:
    linear-gradient(90deg, rgba(7, 12, 28, 0.94), rgba(7, 21, 31, 0.78), rgba(7, 12, 28, 0.94)),
    repeating-linear-gradient(90deg, rgba(122, 167, 255, 0.07) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(34, 211, 238, 0.045) 0 1px, transparent 1px 52px),
    rgba(8, 13, 24, 0.84);
  --analysis-border: rgba(122, 167, 255, 0.24);
  --analysis-panel-bg: rgba(12, 21, 36, 0.74);
  --analysis-panel-strong-bg: rgba(5, 10, 20, 0.72);
  --analysis-panel-soft-bg: rgba(5, 10, 20, 0.42);
  --analysis-panel-muted-bg: rgba(8, 13, 24, 0.42);
  --analysis-accent-bg: rgba(122, 167, 255, 0.14);
  --analysis-grid-overlay:
    linear-gradient(rgba(122, 167, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 167, 255, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 16% 18%, rgba(34, 211, 238, 0.12), transparent 28%);
  --analysis-chart-bg:
    linear-gradient(rgba(122, 167, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 167, 255, 0.06) 1px, transparent 1px),
    rgba(5, 10, 20, 0.5);
  --analysis-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
  --analysis-modal-shadow: 0 30px 90px rgba(0, 0, 0, 0.46);
  --analysis-chip-text: #dbe6f6;
  --analysis-good: #86efac;
  --analysis-bad: #fda4af;
  --analysis-warn: #fde68a;
}

:root[data-theme="light"] {
  --bg: #edf4ff;
  --bg-2: #dcecff;
  --ink: #101828;
  --text: #101828;
  --muted: #667085;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-strong: #ffffff;
  --line: #cbdaf0;
  --blue: #175cd3;
  --blue-soft: #e8f1ff;
  --green: #067647;
  --green-soft: #dcfae6;
  --red: #b42318;
  --shadow: 0 18px 48px rgba(21, 94, 239, 0.12);
  --body-bg:
    linear-gradient(115deg, rgba(23, 92, 211, 0.08), transparent 30%),
    linear-gradient(245deg, rgba(14, 147, 132, 0.09), transparent 32%),
    linear-gradient(180deg, #f8fbff, #edf4ff 58%, #f7fbff);
  --topbar-bg: rgba(255, 255, 255, 0.82);
  --tape-bg: linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(233, 242, 255, 0.94));
  --control-bg: #ffffff;
  --control-border: #b9c8de;
  --button-bg: #101828;
  --button-ink: #ffffff;
  --soft-surface: #eef4ff;
  --pill-ink: #344054;
  --text-soft: #344054;
  --card-soft: rgba(255, 255, 255, 0.8);
  --tool-bg: rgba(255, 255, 255, 0.86);
  --watch-up-bg: linear-gradient(180deg, rgba(220, 250, 230, 0.92), rgba(255, 255, 255, 0.94));
  --watch-down-bg: linear-gradient(180deg, rgba(254, 228, 226, 0.9), rgba(255, 255, 255, 0.94));
  --chart-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(248, 251, 255, 0.98)),
    repeating-linear-gradient(0deg, transparent 0 55px, rgba(23, 92, 211, 0.08) 55px 56px);
  --menu-bg: #ffffff;
  --chat-bg: #ffffff;
  --chat-head-bg: linear-gradient(135deg, #f5f9ff, #effcf8);
  --chat-body-bg: #f7fbff;
  --bot-bg: #e8f1ff;
  --user-bg: #e7f8ef;
  --hero-panel:
    linear-gradient(120deg, rgba(255, 255, 255, 0.9), rgba(237, 246, 255, 0.82)),
    repeating-linear-gradient(90deg, rgba(23, 92, 211, 0.08) 0 1px, transparent 1px 68px),
    repeating-linear-gradient(0deg, rgba(14, 147, 132, 0.06) 0 1px, transparent 1px 56px);
  --analysis-overlay-bg: rgba(15, 23, 42, 0.22);
  --analysis-modal-bg:
    radial-gradient(circle at 16% 18%, rgba(23, 92, 211, 0.1), transparent 28%),
    radial-gradient(circle at 82% 22%, rgba(14, 147, 132, 0.08), transparent 30%),
    linear-gradient(135deg, rgba(250, 253, 255, 0.98), rgba(239, 247, 255, 0.96)),
    var(--panel-strong);
  --analysis-modal-glow:
    radial-gradient(circle at 18% 16%, rgba(23, 92, 211, 0.08), transparent 30%),
    radial-gradient(circle at 78% 20%, rgba(14, 147, 132, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.76));
  --analysis-modal-visual:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.7) 48%, rgba(255, 255, 255, 0.98)),
    linear-gradient(115deg, transparent 0 18%, rgba(23, 92, 211, 0.08) 18.2% 18.55%, transparent 18.8% 42%, rgba(14, 147, 132, 0.08) 42.2% 42.55%, transparent 42.8%),
    repeating-linear-gradient(90deg, rgba(23, 92, 211, 0.06) 0 1px, transparent 1px 78px),
    repeating-linear-gradient(0deg, rgba(14, 147, 132, 0.045) 0 1px, transparent 1px 58px);
  --analysis-modal-visual-opacity: 0.72;
  --analysis-head-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(238, 247, 255, 0.94));
  --analysis-hero-bg:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(233, 246, 255, 0.9), rgba(255, 255, 255, 0.98)),
    repeating-linear-gradient(90deg, rgba(23, 92, 211, 0.055) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(14, 147, 132, 0.04) 0 1px, transparent 1px 52px),
    var(--panel-strong);
  --analysis-border: rgba(91, 124, 166, 0.28);
  --analysis-panel-bg: rgba(255, 255, 255, 0.86);
  --analysis-panel-strong-bg: rgba(255, 255, 255, 0.96);
  --analysis-panel-soft-bg: rgba(241, 247, 255, 0.84);
  --analysis-panel-muted-bg: rgba(232, 241, 255, 0.68);
  --analysis-accent-bg: rgba(23, 92, 211, 0.1);
  --analysis-grid-overlay:
    linear-gradient(rgba(23, 92, 211, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 92, 211, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 16% 18%, rgba(14, 147, 132, 0.08), transparent 28%);
  --analysis-chart-bg:
    linear-gradient(rgba(23, 92, 211, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 92, 211, 0.05) 1px, transparent 1px),
    var(--analysis-panel-soft-bg);
  --analysis-shadow: 0 16px 38px rgba(21, 94, 239, 0.1);
  --analysis-modal-shadow: 0 30px 90px rgba(16, 24, 40, 0.18);
  --analysis-chip-text: var(--blue);
  --analysis-good: #067647;
  --analysis-bad: #b42318;
  --analysis-warn: #b54708;
}

:root[data-theme="advanced"] {
  --bg: #050812;
  --bg-2: #0b1020;
  --ink: #f5f8ff;
  --text: #f5f8ff;
  --muted: #aebbd2;
  --panel: rgba(9, 16, 31, 0.76);
  --panel-strong: rgba(13, 24, 45, 0.92);
  --line: rgba(137, 177, 255, 0.32);
  --blue: #9dbcff;
  --blue-soft: rgba(96, 165, 250, 0.18);
  --green: #5ff0a5;
  --green-soft: rgba(20, 184, 166, 0.18);
  --red: #ff7b9b;
  --orange: #ffb86b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42), 0 0 45px rgba(21, 94, 239, 0.1);
  --body-bg:
    linear-gradient(125deg, rgba(1, 7, 20, 0.98), rgba(8, 13, 31, 0.98) 38%, rgba(8, 29, 34, 0.94)),
    repeating-linear-gradient(90deg, rgba(122, 167, 255, 0.08) 0 1px, transparent 1px 58px),
    repeating-linear-gradient(0deg, rgba(20, 184, 166, 0.055) 0 1px, transparent 1px 52px);
  --topbar-bg: rgba(5, 9, 19, 0.72);
  --tape-bg: linear-gradient(90deg, rgba(6, 10, 22, 0.98), rgba(12, 29, 43, 0.96), rgba(20, 12, 42, 0.94));
  --control-bg: rgba(6, 12, 25, 0.92);
  --control-border: rgba(137, 177, 255, 0.38);
  --button-bg: #f5f8ff;
  --button-ink: #080d18;
  --soft-surface: rgba(137, 177, 255, 0.12);
  --pill-ink: #d7e2f7;
  --text-soft: #d7e2f7;
  --card-soft: rgba(11, 22, 41, 0.74);
  --tool-bg: rgba(10, 19, 35, 0.78);
  --watch-up-bg: linear-gradient(135deg, rgba(6, 78, 59, 0.52), rgba(9, 18, 34, 0.9));
  --watch-down-bg: linear-gradient(135deg, rgba(94, 22, 52, 0.5), rgba(9, 18, 34, 0.9));
  --chart-bg:
    linear-gradient(180deg, rgba(7, 13, 25, 0.72), rgba(8, 16, 31, 0.96)),
    repeating-linear-gradient(0deg, transparent 0 54px, rgba(157, 188, 255, 0.12) 54px 55px);
  --menu-bg: rgba(8, 15, 29, 0.96);
  --chat-bg: rgba(8, 15, 29, 0.96);
  --chat-head-bg: linear-gradient(135deg, rgba(12, 30, 60, 0.98), rgba(12, 45, 48, 0.94), rgba(47, 20, 78, 0.92));
  --chat-body-bg: rgba(5, 10, 20, 0.96);
  --bot-bg: rgba(20, 38, 72, 0.92);
  --user-bg: rgba(11, 57, 41, 0.9);
  --hero-panel:
    linear-gradient(120deg, rgba(3, 7, 16, 0.96), rgba(8, 16, 34, 0.92), rgba(17, 12, 38, 0.9)),
    repeating-linear-gradient(90deg, rgba(157, 188, 255, 0.1) 0 1px, transparent 1px 68px),
    repeating-linear-gradient(0deg, rgba(95, 240, 165, 0.08) 0 1px, transparent 1px 56px);
  --analysis-overlay-bg: rgba(2, 6, 15, 0.68);
  --analysis-modal-bg:
    radial-gradient(circle at 16% 18%, rgba(157, 188, 255, 0.15), transparent 28%),
    radial-gradient(circle at 82% 22%, rgba(95, 240, 165, 0.1), transparent 30%),
    linear-gradient(135deg, rgba(5, 9, 21, 0.92), rgba(5, 27, 31, 0.86)),
    var(--chat-bg);
  --analysis-modal-glow:
    radial-gradient(circle at 18% 16%, rgba(255, 184, 107, 0.18), transparent 30%),
    radial-gradient(circle at 78% 20%, rgba(95, 240, 165, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(5, 10, 20, 0.2), rgba(3, 7, 16, 0.88));
  --analysis-modal-visual:
    linear-gradient(90deg, rgba(3, 7, 16, 0.92), rgba(3, 7, 16, 0.54) 48%, rgba(3, 7, 16, 0.94)),
    linear-gradient(115deg, transparent 0 18%, rgba(157, 188, 255, 0.12) 18.2% 18.55%, transparent 18.8% 42%, rgba(95, 240, 165, 0.08) 42.2% 42.55%, transparent 42.8%),
    repeating-linear-gradient(90deg, rgba(157, 188, 255, 0.08) 0 1px, transparent 1px 78px),
    repeating-linear-gradient(0deg, rgba(95, 240, 165, 0.05) 0 1px, transparent 1px 58px);
  --analysis-modal-visual-opacity: 0.76;
  --analysis-head-bg: linear-gradient(135deg, rgba(12, 30, 60, 0.94), rgba(12, 45, 48, 0.86), rgba(37, 18, 65, 0.84));
  --analysis-hero-bg:
    linear-gradient(90deg, rgba(4, 8, 20, 0.94), rgba(6, 25, 31, 0.78), rgba(7, 9, 26, 0.94)),
    repeating-linear-gradient(90deg, rgba(157, 188, 255, 0.07) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(95, 240, 165, 0.045) 0 1px, transparent 1px 52px),
    rgba(8, 13, 24, 0.84);
  --analysis-border: rgba(157, 188, 255, 0.32);
  --analysis-panel-bg: rgba(10, 19, 35, 0.76);
  --analysis-panel-strong-bg: rgba(5, 10, 20, 0.76);
  --analysis-panel-soft-bg: rgba(7, 14, 28, 0.5);
  --analysis-panel-muted-bg: rgba(8, 16, 31, 0.46);
  --analysis-accent-bg: rgba(157, 188, 255, 0.14);
  --analysis-grid-overlay:
    linear-gradient(rgba(157, 188, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95, 240, 165, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 16% 18%, rgba(95, 240, 165, 0.1), transparent 28%);
  --analysis-chart-bg:
    linear-gradient(rgba(157, 188, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95, 240, 165, 0.045) 1px, transparent 1px),
    rgba(5, 10, 20, 0.5);
  --analysis-shadow: 0 16px 38px rgba(0, 0, 0, 0.2), 0 0 34px rgba(21, 94, 239, 0.06);
  --analysis-modal-shadow: 0 30px 90px rgba(0, 0, 0, 0.5), 0 0 54px rgba(95, 240, 165, 0.06);
  --analysis-chip-text: #d7e2f7;
  --analysis-good: #8df7af;
  --analysis-bad: #ffb4c2;
  --analysis-warn: #fde68a;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: rgba(122, 167, 255, 0.45) rgba(5, 10, 19, 0.92);
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background:
    linear-gradient(180deg, rgba(5, 10, 19, 0.98), rgba(7, 17, 31, 0.98));
}

::-webkit-scrollbar-thumb {
  border: 3px solid rgba(5, 10, 19, 0.98);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(122, 167, 255, 0.78), rgba(20, 184, 166, 0.68));
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.82), rgba(20, 184, 166, 0.78));
}

::-webkit-scrollbar-corner {
  background: rgba(5, 10, 19, 0.98);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--body-bg);
  background-attachment: fixed;
  background-size: auto;
  font-size: 14px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    repeating-linear-gradient(90deg, rgba(122, 167, 255, 0.07) 0 1px, transparent 1px 54px),
    repeating-linear-gradient(0deg, rgba(20, 184, 166, 0.045) 0 1px, transparent 1px 49px);
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  display: none;
  pointer-events: none;
}

:root[data-theme="light"] body::before {
  background:
    repeating-linear-gradient(90deg, rgba(23, 92, 211, 0.07) 0 1px, transparent 1px 70px),
    repeating-linear-gradient(0deg, rgba(14, 147, 132, 0.045) 0 1px, transparent 1px 62px);
}

:root[data-theme="advanced"] body {
  background-size: 150% 150%, auto, auto;
  animation: advancedBodyShift 36s ease-in-out infinite alternate;
}

:root[data-theme="advanced"] body::before {
  background:
    linear-gradient(115deg, transparent 0 15%, rgba(21, 94, 239, 0.12) 15% 16%, transparent 16% 42%, rgba(217, 70, 239, 0.1) 42% 43%, transparent 43%),
    linear-gradient(245deg, transparent 0 22%, rgba(20, 184, 166, 0.13) 22% 23%, transparent 23% 58%, rgba(251, 191, 36, 0.08) 58% 59%, transparent 59%),
    repeating-linear-gradient(90deg, rgba(157, 188, 255, 0.09) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg, rgba(95, 240, 165, 0.06) 0 1px, transparent 1px 54px);
  background-position: 0 0, 0 0, 0 0, 0 0;
  animation: marketGridDrift 48s linear infinite;
}

:root[data-theme="advanced"] body::after {
  display: block;
  opacity: 0.32;
  background:
    linear-gradient(90deg, transparent 0 4%, rgba(64, 255, 128, 0.38) 4.2% 4.55%, transparent 4.75% 10%, rgba(255, 54, 88, 0.35) 10.25% 10.55%, transparent 10.8%),
    linear-gradient(90deg, transparent 0 13%, rgba(41, 231, 255, 0.36) 13.15% 13.42%, transparent 13.7% 22%, rgba(255, 184, 107, 0.28) 22.15% 22.44%, transparent 22.7%),
    repeating-linear-gradient(90deg, transparent 0 82px, rgba(64, 255, 128, 0.16) 82px 84px, transparent 84px 148px),
    linear-gradient(180deg, transparent, rgba(1, 4, 10, 0.44));
  background-size: 520px 180px, 660px 240px, 100% 100%, 100% 100%;
  background-position: 0 15%, 80px 70%, 0 0, 0 0;
  mix-blend-mode: screen;
  animation: candleFlow 52s linear infinite;
}

.pro-market-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: none;
  overflow: hidden;
  pointer-events: none;
}

:root[data-theme="advanced"] .pro-market-scene {
  display: block;
  opacity: 0.36;
}

:root[data-theme="advanced"] .market-tape,
:root[data-theme="advanced"] .market-clock,
:root[data-theme="advanced"] main,
:root[data-theme="advanced"] footer {
  position: relative;
  z-index: 1;
}

.pro-market-wall {
  position: absolute;
  top: 7%;
  left: -8%;
  width: 68%;
  height: 56%;
  overflow: hidden;
  border-right: 1px solid rgba(64, 255, 128, 0.24);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 19, 10, 0.58), transparent),
    repeating-linear-gradient(0deg, rgba(64, 255, 128, 0.18) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(90deg, rgba(64, 255, 128, 0.14) 0 1px, transparent 1px 42px);
  filter: drop-shadow(0 0 28px rgba(64, 255, 128, 0.2));
  opacity: 0.72;
  transform: perspective(760px) rotateY(18deg) rotateX(2deg);
  transform-origin: left center;
}

.pro-market-wall::before,
.pro-market-wall::after {
  content: "423.50  1.24  0.91  5861  +2.08  74.1  129.80  0.42  BUY  SELL  2184.90  +0.67  341.2  58.4  19.6  5.00";
  position: absolute;
  left: 0;
  right: 0;
  color: rgba(64, 255, 128, 0.56);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: clamp(13px, 1.15vw, 18px);
  font-weight: 800;
  line-height: 2;
  word-spacing: 18px;
  text-shadow: 0 0 10px rgba(64, 255, 128, 0.52);
  animation: marketNumbers 16s linear infinite;
}

.pro-market-wall::before {
  top: -20%;
}

.pro-market-wall::after {
  top: 26%;
  color: rgba(255, 54, 88, 0.38);
  text-shadow: 0 0 10px rgba(255, 54, 88, 0.32);
  animation-duration: 22s;
  animation-direction: reverse;
}

.pro-market-wall span {
  position: absolute;
  left: 0;
  display: block;
  width: max-content;
  color: rgba(137, 255, 181, 0.82);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: clamp(13px, 1.2vw, 20px);
  font-weight: 900;
  white-space: nowrap;
  text-shadow: 0 0 14px rgba(64, 255, 128, 0.62);
  animation: marketTickerSlide 19s linear infinite;
}

.pro-market-wall span:first-child {
  bottom: 28%;
}

.pro-market-wall span:last-child {
  bottom: 17%;
  color: rgba(41, 231, 255, 0.76);
  text-shadow: 0 0 14px rgba(41, 231, 255, 0.48);
  animation-duration: 24s;
  animation-direction: reverse;
}

.pro-candle-field {
  position: absolute;
  top: 14%;
  right: 3%;
  width: min(640px, 45vw);
  height: min(430px, 42vh);
  opacity: 0.78;
  filter: drop-shadow(0 0 22px rgba(41, 231, 255, 0.2));
}

.pro-candle-field::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(41, 231, 255, 0.18);
  background:
    repeating-linear-gradient(90deg, rgba(41, 231, 255, 0.08) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(0deg, rgba(64, 255, 128, 0.06) 0 1px, transparent 1px 38px);
  transform: skewX(-9deg);
}

.pro-candle-field i {
  position: absolute;
  bottom: calc(18% + (var(--i) % 7) * 7%);
  left: calc(var(--i) * 4.15%);
  width: 8px;
  height: calc(52px + (var(--i) % 5) * 20px);
  border-radius: 999px;
  background: linear-gradient(180deg, #7dffbd, #00d084);
  box-shadow: 0 0 16px rgba(64, 255, 128, 0.56);
  animation: proCandlePulse 2.8s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.14s);
}

.pro-candle-field i::before {
  content: "";
  position: absolute;
  left: 3px;
  top: -24px;
  width: 2px;
  height: calc(100% + 50px);
  border-radius: 999px;
  background: currentColor;
  opacity: 0.72;
}

.pro-candle-field i:nth-child(3n) {
  height: calc(44px + (var(--i) % 6) * 16px);
  color: #ff3658;
  background: linear-gradient(180deg, #ff8aa0, #ff3658);
  box-shadow: 0 0 16px rgba(255, 54, 88, 0.52);
}

.pro-line {
  position: absolute;
  left: -8%;
  right: -8%;
  height: 140px;
  opacity: 0.62;
  filter: drop-shadow(0 0 12px currentColor);
  clip-path: polygon(0 74%, 7% 62%, 13% 72%, 20% 36%, 27% 46%, 35% 22%, 43% 52%, 51% 34%, 59% 44%, 67% 18%, 76% 31%, 84% 16%, 92% 38%, 100% 21%, 100% 28%, 92% 45%, 84% 23%, 76% 38%, 67% 25%, 59% 52%, 51% 41%, 43% 60%, 35% 29%, 27% 54%, 20% 42%, 13% 79%, 7% 69%, 0 81%);
  animation: proLineDrift 13s ease-in-out infinite alternate;
}

.pro-line-a {
  top: 24%;
  color: rgba(64, 255, 128, 0.82);
  background: currentColor;
}

.pro-line-b {
  top: 38%;
  color: rgba(41, 231, 255, 0.66);
  background: currentColor;
  --line-scale: 0.75;
  animation-delay: -3s;
}

.pro-line-c {
  top: 54%;
  color: rgba(255, 54, 88, 0.58);
  background: currentColor;
  --line-scale: 0.55;
  animation-delay: -6s;
}

.pro-market-floor {
  position: absolute;
  left: -12%;
  right: -12%;
  bottom: -7%;
  height: 42%;
  background:
    linear-gradient(90deg, transparent, rgba(64, 255, 128, 0.3), transparent),
    repeating-linear-gradient(90deg, rgba(64, 255, 128, 0.2) 0 1px, transparent 1px 58px),
    repeating-linear-gradient(0deg, rgba(64, 255, 128, 0.18) 0 1px, transparent 1px 34px);
  opacity: 0.42;
  transform: perspective(680px) rotateX(66deg);
  transform-origin: bottom center;
  animation: proFloorMove 9s linear infinite;
}

.pro-market-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 42%, rgba(64, 255, 128, 0.19), transparent 25%),
    radial-gradient(circle at 76% 22%, rgba(41, 231, 255, 0.15), transparent 22%),
    radial-gradient(circle at 72% 70%, rgba(255, 54, 88, 0.12), transparent 24%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.22), transparent 44%, rgba(0, 0, 0, 0.42));
}

html.modal-open,
body.modal-open {
  overflow: hidden;
}

@keyframes advancedBodyShift {
  from {
    background-position: 0% 0%, 0 0, 0 0;
  }
  to {
    background-position: 100% 100%, 0 0, 0 0;
  }
}

@keyframes marketGridDrift {
  from {
    background-position: 0 0, 0 0, 0 0, 0 0;
  }
  to {
    background-position: 420px -160px, -360px 180px, 128px 0, 0 108px;
  }
}

@keyframes candleFlow {
  from {
    background-position: -520px 18%, 660px 72%, 0 0, 0 0;
  }
  to {
    background-position: 520px 18%, -660px 72%, 0 0, 0 0;
  }
}

@keyframes marketNumbers {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(46%);
  }
}

@keyframes marketTickerSlide {
  from {
    transform: translateX(-8%);
  }
  to {
    transform: translateX(-52%);
  }
}

@keyframes proCandlePulse {
  0%, 100% {
    transform: scaleY(0.82) translateY(4px);
    opacity: 0.62;
  }
  50% {
    transform: scaleY(1.12) translateY(-4px);
    opacity: 1;
  }
}

@keyframes proLineDrift {
  from {
    transform: translateX(-3%) scaleY(var(--line-scale, 1));
  }
  to {
    transform: translateX(3%) scaleY(var(--line-scale, 1));
  }
}

@keyframes proFloorMove {
  from {
    background-position: -260px 0, 0 0, 0 0;
  }
  to {
    background-position: 260px 0, 116px 0, 0 68px;
  }
}

@keyframes signalSweep {
  0% {
    transform: translateX(-18%) rotate(var(--line-angle, 0deg));
    opacity: 0.22;
  }
  50% {
    opacity: 0.78;
  }
  100% {
    transform: translateX(18%) rotate(var(--line-angle, 0deg));
    opacity: 0.28;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-wordmark {
  display: block;
  width: 132px;
  height: 38px;
  border: 1px solid rgba(122, 167, 255, 0.16);
  border-radius: 10px;
  background: #f7f9ff;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.18);
}

.brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #175cd3, #0e9384);
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 17px;
  letter-spacing: 0;
}

.brand small,
.hint,
small {
  color: var(--muted);
}

nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 750;
}

.market-tape {
  border-bottom: 1px solid var(--line);
  background: var(--tape-bg);
  overflow: hidden;
}

.market-tape-track {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
}

.tape-item {
  min-width: 0;
  padding: 10px 14px;
  border-right: 1px solid var(--line);
}

.tape-item span {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: var(--blue);
  font-weight: 900;
  white-space: nowrap;
}

.tape-value-row {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
  white-space: nowrap;
}

.tape-item strong {
  display: inline-block;
  margin-right: 6px;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 180ms ease, transform 180ms ease;
}

.tape-item small {
  flex: 0 0 auto;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.tape-arrow.up,
.tape-item.up .tape-arrow {
  color: #079455 !important;
}

.tape-arrow.down,
.tape-item.down .tape-arrow {
  color: #f04438 !important;
}

.tape-item small {
  color: #079455;
}

.tape-item.down small {
  color: #f04438;
}

.market-clock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 58px;
  padding: 10px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  color: var(--text-soft);
  text-align: center;
}

.market-clock > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.market-clock strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.market-clock p,
.market-clock small {
  margin: 0;
}

.market-clock p {
  color: var(--ink);
  font-weight: 850;
}

nav a,
.nav-analyst,
.theme-switch {
  min-height: 38px;
  border-radius: 999px;
  padding: 9px 14px;
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 42px;
  min-width: 42px;
  border: 1px solid rgba(122, 167, 255, 0.28);
  color: var(--ink);
  background: rgba(122, 167, 255, 0.1);
  box-shadow: none;
  font-weight: 900;
  text-transform: none;
}

.theme-switch::before {
  content: "☾";
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: currentColor;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1;
}

.theme-switch[data-theme-icon="sun"]::before {
  content: "☀";
  color: #f59e0b;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
}

.theme-switch-icon {
  position: relative;
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.theme-switch [data-theme-label] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.theme-switch-icon::before,
.theme-switch-icon::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.theme-switch-icon::before {
  inset: 3px;
  background: currentColor;
  opacity: 0.42;
}

.theme-switch-icon::after {
  inset: auto;
  opacity: 1;
}

.theme-switch[data-active-theme="light"] {
  color: #175cd3;
  background: rgba(255, 255, 255, 0.76);
}

.theme-switch[data-theme-icon="sun"] .theme-switch-icon {
  border-color: currentColor;
  background:
    linear-gradient(currentColor, currentColor) 50% -6px / 2px 5px no-repeat,
    linear-gradient(currentColor, currentColor) 50% calc(100% + 6px) / 2px 5px no-repeat,
    linear-gradient(90deg, currentColor, currentColor) -6px 50% / 5px 2px no-repeat,
    linear-gradient(90deg, currentColor, currentColor) calc(100% + 6px) 50% / 5px 2px no-repeat;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.theme-switch[data-theme-icon="sun"] .theme-switch-icon::before {
  inset: 4px;
  opacity: 1;
  background: currentColor;
}

.theme-switch[data-theme-icon="sun"] .theme-switch-icon::after {
  inset: -7px;
  border: 0;
  background:
    linear-gradient(45deg, transparent 43%, currentColor 44% 56%, transparent 57%) 0 0 / 100% 100%,
    linear-gradient(-45deg, transparent 43%, currentColor 44% 56%, transparent 57%) 0 0 / 100% 100%;
  opacity: 0.7;
}

.theme-switch[data-theme-icon="moon"] .theme-switch-icon {
  border-color: transparent;
  background: currentColor;
  box-shadow: inset -6px 0 0 var(--topbar-bg), 0 0 0 1px currentColor;
}

.theme-switch[data-theme-icon="moon"] .theme-switch-icon::before {
  inset: 2px 2px auto auto;
  width: 4px;
  height: 4px;
  opacity: 1;
  background: currentColor;
}

.theme-switch[data-theme-icon="moon"] .theme-switch-icon::after {
  display: none;
}

@keyframes themeRing {
  to {
    transform: rotate(360deg);
  }
}

.nav-analyst,
.analyst-button {
  border: 0;
  background: linear-gradient(135deg, #155eef, #0e9384);
  color: #fff;
  box-shadow: 0 10px 24px rgba(21, 94, 239, 0.22);
}

main {
  width: min(1500px, calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: stretch;
  padding: 22px 0 18px;
}

.hero-copy,
.market-card,
.watchlist,
.metrics-band article {
  background: var(--panel);
  border: 1px solid rgba(176, 190, 211, 0.72);
  border-radius: 12px;
  box-shadow: 0 12px 35px rgba(28, 39, 59, 0.06);
}

.hero-copy {
  position: relative;
  overflow: hidden;
  display: flex;
  min-height: min(620px, calc(100vh - 178px));
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 3.3vw, 44px);
  color: #f8fbff;
  background: var(--hero-panel);
  text-align: center;
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(122, 167, 255, 0.07) 0 1px, transparent 1px 56px),
    repeating-linear-gradient(0deg, rgba(20, 184, 166, 0.05) 0 1px, transparent 1px 50px);
  opacity: 0.8;
}

.hero-copy::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(180deg, transparent, rgba(5, 10, 19, 0.58));
  pointer-events: none;
}

:root[data-theme="light"] .hero-copy {
  color: #101828;
  box-shadow: 0 22px 70px rgba(23, 92, 211, 0.12);
}

:root[data-theme="light"] .hero-copy::after {
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.62));
}

:root[data-theme="light"] .hero-copy input {
  border-color: #b9c8de;
  background: rgba(255, 255, 255, 0.92);
  color: #101828;
}

:root[data-theme="light"] .hero-copy label {
  color: #344054;
}

:root[data-theme="light"] .hero-copy input::placeholder {
  color: #667085;
}

:root[data-theme="light"] .lede {
  color: #344054;
}

:root[data-theme="advanced"] .topbar {
  border-bottom-color: rgba(95, 240, 165, 0.2);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 18px 58px rgba(0, 0, 0, 0.28);
}

:root[data-theme="advanced"] .brand-mark {
  background:
    linear-gradient(135deg, #155eef, #0e9384 48%, #d946ef);
  box-shadow: 0 0 30px rgba(95, 240, 165, 0.22);
}

:root[data-theme="advanced"] .hero-copy,
:root[data-theme="advanced"] .market-card,
:root[data-theme="advanced"] .watchlist,
:root[data-theme="advanced"] .metrics-band article,
:root[data-theme="advanced"] .analysis-summary,
:root[data-theme="advanced"] .analysis-verdict-card,
:root[data-theme="advanced"] .analysis-panel,
:root[data-theme="advanced"] .analysis-component {
  border-color: rgba(157, 188, 255, 0.34);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.035) inset,
    0 28px 72px rgba(0, 0, 0, 0.32),
    0 0 54px rgba(21, 94, 239, 0.08);
  backdrop-filter: blur(18px);
}

:root[data-theme="advanced"] .hero-copy::before {
  background:
    linear-gradient(110deg, transparent 0 26%, rgba(95, 240, 165, 0.14) 26.2% 26.6%, transparent 26.8% 62%, rgba(217, 70, 239, 0.15) 62.2% 62.7%, transparent 62.9%),
    repeating-linear-gradient(90deg, rgba(157, 188, 255, 0.1) 0 1px, transparent 1px 56px),
    repeating-linear-gradient(0deg, rgba(95, 240, 165, 0.07) 0 1px, transparent 1px 50px);
  background-position: 0 0, 0 0, 0 0;
  animation: marketGridDrift 28s linear infinite;
}

.hero-live-scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pulse-line {
  position: absolute;
  left: 4%;
  width: 92%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.82), rgba(217, 70, 239, 0.74), transparent);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.28);
  opacity: 0.68;
}

.line-one {
  top: 21%;
  transform: rotate(-3deg);
}

.line-two {
  top: 34%;
  transform: rotate(4deg);
  opacity: 0.42;
}

.line-three {
  top: 61%;
  transform: rotate(-2deg);
  opacity: 0.36;
}

.market-orbit {
  position: absolute;
  right: 10%;
  bottom: 16%;
  width: min(420px, 42vw);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(122, 167, 255, 0.18);
  background:
    radial-gradient(circle at 44% 48%, rgba(255, 255, 255, 0.1), transparent 9%),
    conic-gradient(from 120deg, rgba(21, 94, 239, 0), rgba(34, 211, 238, 0.26), rgba(217, 70, 239, 0.2), rgba(21, 94, 239, 0));
  filter: blur(0.2px);
  opacity: 0.62;
}

:root[data-theme="advanced"] .pulse-line {
  animation: signalSweep 14s ease-in-out infinite alternate;
}

:root[data-theme="advanced"] .line-one {
  --line-angle: -3deg;
}

:root[data-theme="advanced"] .line-two {
  --line-angle: 4deg;
  animation-delay: -1.6s;
}

:root[data-theme="advanced"] .line-three {
  --line-angle: -2deg;
  animation-delay: -3.1s;
}

:root[data-theme="advanced"] .market-orbit {
  border-color: rgba(95, 240, 165, 0.2);
  background:
    linear-gradient(90deg, transparent 48%, rgba(95, 240, 165, 0.24) 49% 51%, transparent 52%),
    linear-gradient(0deg, transparent 48%, rgba(157, 188, 255, 0.18) 49% 51%, transparent 52%),
    conic-gradient(from 120deg, rgba(21, 94, 239, 0), rgba(95, 240, 165, 0.22), rgba(217, 70, 239, 0.22), rgba(255, 184, 107, 0.16), rgba(21, 94, 239, 0));
  animation: advancedOrbit 42s linear infinite;
}

@keyframes advancedOrbit {
  to {
    transform: rotate(360deg);
  }
}

.eyebrow {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin-bottom: 16px;
  font-size: clamp(32px, 3.7vw, 54px);
  line-height: 1.04;
  letter-spacing: 0;
  text-wrap: balance;
}

h2 {
  margin-bottom: 8px;
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: 0;
}

.lede {
  position: relative;
  z-index: 1;
  max-width: 860px;
  color: rgba(232, 238, 248, 0.88);
  font-size: 18px;
  line-height: 1.45;
}

.hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 14px;
}

.hero-analyst,
.analysis-teaser-button {
  position: relative;
  display: inline-flex;
  width: min(310px, calc(50vw - 48px));
  min-width: 260px;
  min-height: 64px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  padding: 9px 28px;
  color: #fff;
  font-size: clamp(18px, 1.45vw, 22px);
  font-weight: 950;
  line-height: 1.05;
  text-align: center;
}

.hero-analyst {
  background:
    linear-gradient(135deg, rgba(21, 94, 239, 0.96), rgba(14, 147, 132, 0.96), rgba(168, 85, 247, 0.92));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16) inset,
    0 20px 54px rgba(34, 211, 238, 0.22),
    0 0 54px rgba(168, 85, 247, 0.24);
}

.analysis-teaser-button {
  border: 1px solid rgba(190, 207, 255, 0.28);
  background:
    linear-gradient(135deg, rgba(82, 42, 189, 0.96), rgba(109, 65, 221, 0.94), rgba(59, 130, 246, 0.86));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14) inset,
    0 18px 46px rgba(109, 65, 221, 0.24);
  cursor: default;
}

.hero-analyst small,
.analysis-teaser-button small {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.search-panel {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  margin: 28px auto 0;
  text-align: left;
}

.search-results {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.search-results.open {
  display: grid;
}

.search-result-button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--card-soft);
  color: var(--ink);
  text-align: left;
  box-shadow: none;
}

.search-result-button span:last-child {
  min-width: 0;
}

.search-result-button strong,
.search-result-button small {
  display: block;
}

.search-result-button strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-button small {
  margin-top: 2px;
}

.search-results-note {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 12px;
  color: var(--muted);
  background: var(--card-soft);
  text-align: center;
  font-weight: 750;
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 800;
}

.search-row,
.chat-input {
  display: flex;
  gap: 10px;
}

input {
  min-width: 0;
  width: 100%;
  height: 48px;
  border: 1px solid var(--control-border);
  border-radius: 10px;
  padding: 0 15px;
  background: var(--control-bg);
  color: var(--ink);
  font: inherit;
  outline: none;
}

input:focus {
  border-color: var(--control-focus);
  box-shadow: 0 0 0 4px var(--control-focus-ring);
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  padding: 0 18px;
  color: var(--button-ink);
  background: var(--button-bg);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.05);
}

.ticker-strip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  width: min(1340px, 100%);
  margin: 16px auto 0;
}

.hero-copy input {
  background: rgba(10, 17, 29, 0.76);
  color: #f8fbff;
}

.hero-copy label {
  color: rgba(232, 238, 248, 0.86);
}

.hero-copy input::placeholder {
  color: rgba(232, 238, 248, 0.48);
}

.ticker-pill {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  column-gap: 9px;
  min-height: 58px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: var(--card-soft);
  color: var(--ink);
  text-align: left;
}

/* Final visual unification: hero-centered dark research workspace. */
:root,
:root[data-theme="dark"] {
  --bg: #050812;
  --bg-2: #080d1b;
  --ink: #f8fbff;
  --text: #f8fbff;
  --muted: #9aa8bd;
  --text-soft: #b7c2d4;
  --panel: rgba(7, 13, 27, 0.82);
  --panel-strong: rgba(6, 10, 22, 0.94);
  --card-soft: rgba(17, 29, 49, 0.78);
  --soft-surface: rgba(28, 42, 65, 0.74);
  --line: rgba(89, 119, 165, 0.42);
  --line-soft: rgba(89, 119, 165, 0.22);
  --control-bg: rgba(7, 13, 27, 0.86);
  --control-border: rgba(122, 167, 255, 0.32);
  --body-bg:
    radial-gradient(circle at 18% 24%, rgba(20, 184, 166, 0.12), transparent 28%),
    radial-gradient(circle at 70% 18%, rgba(124, 58, 237, 0.18), transparent 34%),
    linear-gradient(135deg, #050812 0%, #081321 42%, #09071c 100%);
  --hero-panel:
    radial-gradient(circle at 22% 78%, rgba(20, 184, 166, 0.18), transparent 28%),
    radial-gradient(circle at 72% 24%, rgba(124, 58, 237, 0.2), transparent 32%),
    linear-gradient(135deg, rgba(5, 8, 18, 0.98), rgba(9, 7, 28, 0.98));
  --chart-bg:
    linear-gradient(rgba(122, 167, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 167, 255, 0.045) 1px, transparent 1px),
    rgba(6, 11, 24, 0.9);
  --watch-up-bg: rgba(9, 33, 35, 0.78);
  --watch-down-bg: rgba(37, 14, 24, 0.78);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

html,
body {
  background: var(--body-bg) !important;
}

body::before {
  opacity: 0.72 !important;
}

.hero-copy,
.market-card,
.watchlist,
.market-news,
.brand-finale,
.home-movers,
.markets-hero,
.markets-overview,
.markets-table-panel,
.movers-panel,
.ipo-hero,
.ipo-kpis article,
.ipo-controls,
.ipo-card,
.analysis-panel,
.analysis-summary,
.analysis-verdict-card,
.profile-panel,
.profile-hero-card,
.app-footer {
  border-color: rgba(122, 167, 255, 0.24) !important;
  background:
    linear-gradient(135deg, rgba(8, 13, 27, 0.9), rgba(9, 7, 28, 0.84)),
    var(--panel) !important;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.18) !important;
}

.hero-copy {
  background: var(--hero-panel) !important;
}

body:not(.watchlist-focus-view) main > .hero:first-child {
  min-height: calc(100svh - 156px) !important;
  display: grid !important;
  align-items: stretch !important;
  justify-items: center !important;
  padding-block: 16px 22px !important;
}

body:not(.watchlist-focus-view) main > .hero:first-child .hero-copy {
  width: 100% !important;
  min-height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: column !important;
  text-align: center !important;
  gap: clamp(14px, 2vh, 22px) !important;
  padding-block: clamp(22px, 5vh, 52px) !important;
}

body:not(.watchlist-focus-view) main > .hero:first-child .hero-actions,
body:not(.watchlist-focus-view) main > .hero:first-child .ticker-strip {
  justify-content: center !important;
}

body:not(.watchlist-focus-view) main > .hero:first-child .search-panel {
  margin: 0 auto !important;
}

body:not(.watchlist-focus-view) main > .hero:first-child .ticker-strip {
  margin: 0 auto !important;
}

body:not(.watchlist-focus-view) .market-workbench {
  margin-top: 24px !important;
}

@media (max-width: 980px) {
  body:not(.watchlist-focus-view) main > .hero:first-child {
    min-height: calc(100svh - 132px) !important;
  }
}

@media (max-width: 640px) {
  body:not(.watchlist-focus-view) main > .hero:first-child {
    min-height: calc(100svh - 118px) !important;
    padding-block: 10px 18px !important;
  }

  body:not(.watchlist-focus-view) main > .hero:first-child .hero-copy {
    justify-content: flex-start !important;
    padding-block: 20px !important;
  }
}

/* Opening viewport: keep the home hero as the only first-screen content. */
body:not(.watchlist-focus-view) main > .hero:first-child {
  min-height: calc(100svh - 156px);
  display: grid;
  align-items: stretch;
  padding-block: 16px 22px;
}

body:not(.watchlist-focus-view) main > .hero:first-child .hero-copy {
  min-height: 100%;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(14px, 2vh, 22px);
  padding-block: clamp(22px, 5vh, 52px);
}

body:not(.watchlist-focus-view) main > .hero:first-child .search-panel,
body:not(.watchlist-focus-view) main > .hero:first-child .ticker-strip {
  margin-top: 0;
}

body:not(.watchlist-focus-view) .market-workbench {
  margin-top: 24px;
}

@media (max-width: 980px) {
  body:not(.watchlist-focus-view) main > .hero:first-child {
    min-height: calc(100svh - 132px);
  }
}

@media (max-width: 640px) {
  body:not(.watchlist-focus-view) main > .hero:first-child {
    min-height: calc(100svh - 118px);
    padding-block: 10px 18px;
  }

  body:not(.watchlist-focus-view) main > .hero:first-child .hero-copy {
    align-content: start;
    padding-block: 20px;
  }
}

.ticker-pill img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.92);
}

.ticker-pill span {
  overflow: visible;
  min-width: 0;
  text-overflow: clip;
  white-space: nowrap;
}

.ticker-pill small {
  grid-column: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}























.market-card {
  display: flex;
  min-height: 390px;
  flex-direction: column;
  padding: clamp(18px, 2.4vw, 24px);
}









.status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
}

#auto-refresh-status {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--soft-surface);
  color: var(--pill-ink);
  font-weight: 800;
}

.quote-head,
.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.quote-title,
.watch-head {
  display: flex;
  align-items: center;
  gap: 13px;
}

.watch-head > div:nth-child(2) {
  min-width: 0;
}

.quote-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.exchange-pill,
.live-dot {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border-radius: 999px;
  padding: 0 10px;
  color: #067647;
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 900;
}

.live-dot.market-open {
  color: #067647;
  background: var(--green-soft);
}

.live-dot.market-closed {
  color: #b42318;
  background: #fee4e2;
}

#stock-name {
  margin-top: 7px;
  margin-bottom: 4px;
}

#stock-symbol {
  margin: 0;
  color: var(--muted);
}

.ghost {
  background: var(--blue-soft);
  color: var(--blue);
  box-shadow: none;
}

.price-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 16px;
}

#stock-price {
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: 1;
  font-weight: 900;
}

#stock-change {
  font-size: 16px;
}

.direction-arrow {
  display: inline-flex;
  align-items: center;
  align-self: center;
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 900;
  line-height: 1;
}

.positive {
  color: var(--green);
}

.negative {
  color: var(--red);
}

.chart-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: clamp(190px, 27vh, 280px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--chart-bg);
  overflow: hidden;
}

canvas {
  width: 100%;
  height: 100%;
  min-height: clamp(190px, 27vh, 280px);
  display: block;
}

.chart-tooltip {
  position: absolute;
  z-index: 8;
  display: none;
  min-width: 176px;
  border-radius: 8px;
  padding: 9px 11px;
  color: #f8fbff;
  background: rgba(17, 24, 39, 0.92);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
  pointer-events: none;
}

.chart-tooltip.open {
  display: block;
}

.chart-tooltip strong,
.chart-tooltip span,
.chart-tooltip small {
  display: block;
}

.chart-tooltip strong {
  margin-bottom: 3px;
  font-size: 14px;
}

.chart-tooltip span,
.chart-tooltip small {
  color: rgba(232, 238, 248, 0.78);
  font-size: 12px;
}

.chart-ohlc {
  position: absolute;
  z-index: 6;
  top: 54px;
  left: 14px;
  right: 142px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-height: 22px;
  color: rgba(232, 238, 248, 0.82);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  pointer-events: none;
}

.chart-ohlc strong {
  color: #f8fbff;
  font-weight: 900;
}

.chart-ohlc span,
.chart-ohlc em {
  font-style: normal;
}

.chart-ohlc b {
  font-weight: 900;
}

.chart-ohlc b.up {
  color: #14b8a6;
}

.chart-ohlc b.down {
  color: #fb7185;
}

.chart-mode-toggle {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  display: grid;
  width: 42px;
  min-height: 42px;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 50%;
  padding: 0;
  background: rgba(15, 23, 42, 0.82);
  color: #f8fbff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

.chart-toolbox {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

.chart-zoom-controls {
  position: absolute;
  right: 62px;
  bottom: 14px;
  z-index: 4;
  display: flex;
  gap: 7px;
}

.chart-zoom-controls button {
  display: grid;
  width: 34px;
  min-height: 34px;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 50%;
  padding: 0;
  background: rgba(15, 23, 42, 0.82);
  color: #f8fbff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
  font-size: 22px;
  line-height: 1;
}

.chart-mode-toggle span {
  display: block;
  width: 21px;
  height: 17px;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: skewX(-12deg);
}

.chart-mode-toggle.candle span {
  width: 22px;
  height: 20px;
  border: 0;
  background:
    linear-gradient(currentColor, currentColor) 4px 0 / 2px 20px no-repeat,
    linear-gradient(currentColor, currentColor) 14px 0 / 2px 20px no-repeat,
    linear-gradient(currentColor, currentColor) 1px 5px / 8px 10px no-repeat,
    linear-gradient(currentColor, currentColor) 11px 3px / 8px 12px no-repeat;
  transform: none;
}

.chart-fullscreen-toggle,
.chart-snapshot-toggle {
  display: grid;
  width: 42px;
  min-height: 42px;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 50%;
  padding: 0;
  background: rgba(15, 23, 42, 0.82);
  color: #f8fbff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

.chart-fullscreen-toggle.active,
.chart-snapshot-toggle:active {
  background: rgba(21, 94, 239, 0.88);
}

.chart-fullscreen-toggle span,
.chart-snapshot-toggle span {
  display: block;
  width: 19px;
  height: 19px;
}

.chart-fullscreen-toggle span {
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 8px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 0 / 2px 8px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 0 / 8px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 0 / 2px 8px no-repeat,
    linear-gradient(currentColor, currentColor) 0 100% / 8px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 100% / 2px 8px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 100% / 8px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 100% / 2px 8px no-repeat;
}

.chart-snapshot-toggle span {
  border: 2px solid currentColor;
  border-radius: 5px;
  background:
    radial-gradient(circle at 50% 52%, currentColor 0 3px, transparent 3.5px),
    linear-gradient(currentColor, currentColor) 5px -2px / 9px 4px no-repeat;
}

.chart-wrap:fullscreen,
.chart-wrap.chart-expanded {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  background: var(--chart-bg);
}

.chart-wrap.chart-expanded {
  position: fixed;
  inset: 0;
  z-index: 2200;
}

.chart-wrap:fullscreen canvas,
.chart-wrap.chart-expanded canvas {
  min-height: 100vh;
}

.metrics-band {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid rgba(176, 190, 211, 0.58);
  border-radius: 14px;
  margin: 0 0 24px;
  background:
    linear-gradient(135deg, rgba(21, 94, 239, 0.08), rgba(20, 184, 166, 0.08)),
    rgba(8, 13, 24, 0.72);
  box-shadow: var(--shadow);
}

.metrics-band::before {
  content: "Live stock command panel";
  grid-column: 1 / -1;
  border-bottom: 1px solid rgba(176, 190, 211, 0.22);
  padding: 12px 18px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.metrics-band article {
  min-height: 108px;
  border: 0;
  border-right: 1px solid rgba(176, 190, 211, 0.16);
  border-bottom: 1px solid rgba(176, 190, 211, 0.16);
  border-radius: 0;
  padding: 16px 18px;
  background: transparent;
  box-shadow: none;
}

.metrics-band article:nth-of-type(4n) {
  border-right: 0;
}

.metrics-band article:nth-last-child(-n + 4) {
  border-bottom: 0;
}

.metrics-band span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.metrics-band strong {
  display: block;
  margin: 9px 0 6px;
  color: var(--text);
  font-size: 24px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.metrics-band small {
  line-height: 1.4;
}

#metric-range {
  font-size: 17px;
  line-height: 1.25;
}

.tool-grid {
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 24px;
}

.tool-card {
  display: block;
  min-height: 110px;
  padding: 18px;
  border: 1px solid rgba(176, 190, 211, 0.72);
  border-radius: 12px;
  background: var(--tool-bg);
  box-shadow: var(--shadow);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.tool-card:hover,
.tool-card:focus-visible {
  border-color: var(--blue);
  background: var(--card-soft);
  outline: 0;
  transform: translateY(-2px);
}

.tool-grid span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.tool-grid strong {
  display: block;
  margin: 9px 0 6px;
  font-size: 20px;
}

.workspace {
  display: block;
  padding-bottom: 34px;
}

.watchlist {
  padding: 24px;
}

.watchlist-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 10px;
  margin-top: 18px;
}

.watch-grid {
  display: block;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-soft);
}

.watch-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.watch-table th,
.watch-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 12px;
  text-align: left;
  vertical-align: middle;
}

.watch-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.watch-table tbody tr {
  cursor: pointer;
}

.watch-table tbody tr:hover {
  background: rgba(122, 167, 255, 0.08);
}

.watch-table tbody tr:last-child td {
  border-bottom: 0;
}

.watch-rank {
  width: 48px;
  color: var(--muted);
  text-align: center !important;
}

.watch-stock-cell {
  width: 28%;
}

.watch-stock-line {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.watch-stock-line > div {
  min-width: 0;
}

.watch-stock-line strong,
.watch-stock-line small {
  display: block;
}

.watch-stock-line strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watch-stock-line small {
  margin-top: 2px;
  color: var(--muted);
  font-weight: 850;
}

.watch-price-cell strong,
.watch-change-cell strong,
.watch-signal-cell strong,
.watch-rsi-cell strong,
.watch-volume-cell strong {
  margin: 0;
  font-size: 15px;
}

.watch-change-pill,
.watch-rsi-pill,
.watch-signal-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 7px;
  padding: 0 9px;
  background: rgba(148, 163, 184, 0.12);
  font-weight: 900;
}

.watch-change-pill.positive,
.watch-rsi-pill.good,
.watch-signal-pill.buy {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
}

.watch-change-pill.negative,
.watch-rsi-pill.hot,
.watch-signal-pill.sell {
  background: rgba(248, 113, 113, 0.16);
  color: #fb7185;
}

.watch-spark {
  width: 150px;
}

.watch-sparkline {
  display: block;
  width: 118px;
  height: 34px;
}

.watch-ai-button {
  min-height: 34px;
  border-radius: 8px;
  padding: 0 12px;
  background: linear-gradient(135deg, #155eef, #0e9384);
  color: #fff;
  box-shadow: none;
  white-space: nowrap;
}

.watch-menu {
  position: relative;
  margin-left: auto;
}

.menu-dots {
  width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 50%;
  background: var(--soft-surface);
  color: var(--text-soft);
  box-shadow: none;
}

.menu-popover {
  position: absolute;
  top: 42px;
  right: 0;
  z-index: 4;
  display: none;
  min-width: 160px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  background: var(--menu-bg);
  box-shadow: var(--shadow);
}

.menu-popover.open {
  display: block;
}

.menu-popover button {
  display: block;
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 7px;
  background: transparent;
  color: var(--text-soft);
  text-align: left;
  box-shadow: none;
}

.menu-popover button:hover {
  background: var(--soft-surface);
}

.empty-watchlist {
  border: 1px dashed #b8c4d6;
  border-radius: 12px;
  padding: 28px;
  color: var(--muted);
  background: var(--card-soft);
  text-align: center;
  font-weight: 750;
}

.analyst-button.compact {
  min-height: 40px;
  padding: 0 14px;
}

.chat-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(8px);
}

.chat-overlay.open {
  display: flex;
}

.chat-modal {
  display: flex;
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--chat-bg);
  box-shadow: var(--shadow);
}

.chat-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--chat-head-bg);
}

.chat-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.clear-chat {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-surface);
  color: var(--text-soft);
  font-size: 13px;
  box-shadow: none;
}

.clear-chat:hover {
  color: var(--text);
  border-color: var(--accent);
}

.close-chat {
  width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 50%;
  background: var(--soft-surface);
  color: var(--text-soft);
  font-size: 26px;
  line-height: 1;
  box-shadow: none;
}

.chat-messages {
  min-height: 260px;
  max-height: 480px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 22px;
  background: var(--chat-body-bg);
}

.chat-messages article {
  display: flex;
  flex-direction: column;
  max-width: 86%;
  border-radius: 12px;
  padding: 13px 15px;
  line-height: 1.48;
}

.chat-messages article.chat-message {
  /* Override with new unified styles */
}

.chat-messages p {
  margin: 6px 0 0;
  white-space: pre-wrap;
}

.chat-content {
  margin-top: 6px;
}

.chat-content h3,
.chat-content h4,
.chat-content h5 {
  margin: 14px 0 7px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
}

.chat-content h3:first-child,
.chat-content h4:first-child,
.chat-content h5:first-child,
.chat-content p:first-child {
  margin-top: 0;
}

.chat-content p {
  margin: 8px 0 0;
}

.chat-content ul {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding-left: 18px;
}

.chat-content li {
  padding-left: 2px;
}

.chat-table-shell {
  width: 100%;
  margin: 9px 0 12px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-soft);
}

.chat-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}

.chat-content th,
.chat-content td {
  border-bottom: 1px solid var(--line);
  padding: 8px 9px;
  text-align: left;
  vertical-align: top;
}

.chat-content th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.chat-content tr:last-child td {
  border-bottom: 0;
}

.chat-advanced {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-surface);
}

.chat-advanced summary {
  cursor: pointer;
  padding: 10px 12px;
  color: var(--blue);
  font-weight: 950;
}

.chat-advanced-body {
  border-top: 1px solid var(--line);
  padding: 10px 12px 12px;
}

/* Chat message styling with user/bot differentiation */
.chat-message {
  display: flex;
  flex-direction: column;
  max-width: 86%;
  border-radius: 12px;
  padding: 13px 15px;
  line-height: 1.48;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.chat-user {
  align-self: flex-end;
  background: linear-gradient(135deg, #2d7a3d 0%, #1f5c2a 100%);
  color: white;
  margin-left: auto;
  border: 1px solid rgba(75, 192, 75, 0.3);
}

.chat-bot {
  align-self: flex-start;
  background: rgba(45, 65, 85, 0.5);
  color: var(--text);
  border: 1px solid var(--line);
  margin-right: auto;
}

.chat-typing-message {
  max-width: fit-content;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.chat-messages article.chat-typing-message {
  margin: 0 auto 0 0;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.chat-typing-content {
  display: inline-flex;
  align-items: center;
  margin-top: 0;
}

.chat-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(147, 197, 253, 0.32);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.16);
}

.chat-typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #a78bfa;
  animation: chatTypingPulse 1.05s ease-in-out infinite;
}

.chat-typing-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.chat-typing-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes chatTypingPulse {
  0%,
  80%,
  100% {
    opacity: 0.42;
    transform: translateY(0) scale(0.9);
  }

  40% {
    opacity: 1;
    transform: translateY(-3px) scale(1);
  }
}

.chat-message-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.chat-message-title {
  display: block;
  font-weight: 600;
  font-size: 14px;
  flex: 1;
}

.chat-user .chat-message-title {
  color: rgba(255, 255, 255, 0.95);
}

.chat-bot .chat-message-title {
  color: var(--text);
}

.chat-action-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.chat-action-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
  opacity: 0.6;
}

.chat-action-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

.chat-action-btn:active {
  transform: scale(0.95);
}

.chat-action-btn.active {
  opacity: 1;
  background: rgba(75, 192, 75, 0.2);
  color: #4bc04b;
}

.chat-action-btn svg {
  width: 16px;
  height: 16px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Refresh button spinning animation */
.chat-action-btn.spinning svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Individual button styles */
.chat-copy-btn {
  /* Default copy icon */
}

.chat-like-btn {
  /* Thumbs up icon */
}

.chat-like-btn.active {
  background: rgba(75, 192, 75, 0.2);
}

.chat-dislike-btn {
  /* Thumbs down icon */
}

.chat-dislike-btn.active {
  background: rgba(220, 53, 69, 0.2);
  color: #dc3545;
}

.chat-download-btn {
  /* Download icon */
}

.chat-refresh-btn {
  /* Refresh icon */
}

.chat-more-btn {
  /* Three dots icon */
}

.research-card-pack {
  display: grid;
  gap: 12px;
  margin: 12px 0;
}

.research-card-head {
  display: grid;
  gap: 4px;
}

.research-card-head h4,
.research-card-head p {
  margin: 0;
}

.research-card-head p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.research-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 10px;
}

.research-result-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: rgba(8, 15, 29, 0.44);
}

.research-result-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 9px;
}

.research-rank {
  display: grid;
  min-width: 34px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.22);
  font-weight: 950;
}

.research-result-top strong,
.research-result-top small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.research-result-top strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.2;
}

.research-result-top small,
.research-result-card p,
.research-result-card footer {
  color: var(--text-soft);
}

.research-result-top b {
  color: #86efac;
  font-size: 16px;
}

.research-score-rail,
.research-mini-metrics span {
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.research-score-rail {
  height: 8px;
}

.research-score-rail i,
.research-mini-metrics i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #60a5fa);
}

.research-result-meta,
.research-mini-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.research-result-meta span {
  overflow: hidden;
  border-radius: 7px;
  padding: 5px 7px;
  color: var(--text);
  background: rgba(122, 167, 255, 0.12);
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.research-result-card p,
.research-result-card footer {
  margin: 0;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
}

.research-mini-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.research-mini-metrics span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
  padding: 7px;
}

.research-mini-metrics small,
.research-mini-metrics em {
  color: var(--text);
  font-style: normal;
  font-size: 12px;
  font-weight: 850;
}

.research-mini-metrics i {
  grid-column: 1 / -1;
  height: 4px;
}

:root[data-theme="light"] .research-result-card {
  background: #ffffff;
}

:root[data-theme="light"] .research-rank,
:root[data-theme="light"] .research-result-meta span {
  color: #175cd3;
  background: #eaf1ff;
}

.bot {
  align-self: flex-start;
  max-width: min(96%, 680px);
  background: var(--bot-bg);
}

.user {
  align-self: flex-end;
  background: var(--user-bg);
}

.chat-input {
  padding: 16px 22px 20px;
  border-top: 1px solid var(--line);
  background: var(--chat-bg);
}

.analysis-overlay {
  position: fixed;
  inset: 0;
  z-index: 32;
  display: none;
  align-items: stretch;
  justify-content: stretch;
  padding: 14px;
  background: var(--analysis-overlay-bg);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.analysis-overlay.open {
  display: flex;
}

body.modal-open .app-footer {
  display: none !important;
}

.analysis-modal {
  position: relative;
  isolation: isolate;
  display: flex;
  width: 100%;
  height: calc(100vh - 28px);
  max-height: none;
  flex-direction: column;
  overflow: hidden;
  max-width: 100vw;
  border: 1px solid var(--analysis-border);
  border-radius: 16px;
  background: var(--analysis-modal-bg);
  box-shadow: var(--analysis-modal-shadow);
}

.analysis-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--analysis-modal-glow);
  pointer-events: none;
}

.analysis-modal::after {
  content: "";
  position: absolute;
  inset: 92px 0 0;
  z-index: -1;
  background: var(--analysis-modal-visual);
  opacity: var(--analysis-modal-visual-opacity);
  pointer-events: none;
}

.analysis-modal-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--analysis-border);
  background: var(--analysis-head-bg);
}

.analysis-head-title {
  min-width: 240px;
}

.analysis-title-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.analysis-refresh {
  display: grid;
  width: 38px;
  min-height: 38px;
  place-items: center;
  border: 1px solid var(--analysis-border);
  border-radius: 10px;
  padding: 0;
  background: var(--analysis-panel-strong-bg);
  color: var(--blue);
  font-size: 19px;
  font-weight: 1000;
  box-shadow: none;
}

.analysis-refresh:hover,
.analysis-refresh:focus-visible {
  border-color: var(--blue);
  outline: 0;
}

.analysis-header-search {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  flex: 0 1 620px;
  gap: 10px;
  margin-left: auto;
}

.analysis-header-search[hidden] {
  display: none !important;
}

.analysis-header-search input {
  min-height: 44px;
  border: 1px solid var(--analysis-border);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--text);
  background: var(--analysis-panel-strong-bg);
  box-shadow: inset 0 0 0 1px var(--analysis-accent-bg);
}

.analysis-header-search button {
  min-height: 44px;
  border-radius: 12px;
  padding: 0 16px;
  white-space: nowrap;
}

.analysis-body {
  position: relative;
  z-index: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 18px 28px 28px;
  scroll-padding-top: 18px;
}

.analysis-body > * {
  width: min(1320px, 100%);
  justify-self: center;
}

.analysis-body.request-mode {
  min-height: 0;
  align-content: center;
  place-items: center;
}

.analysis-request {
  display: grid;
  gap: 14px;
  width: min(860px, 100%);
  max-width: none;
  text-align: center;
}

.analysis-request h3 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
}

.analysis-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

[data-analysis-panel][hidden] {
  display: none !important;
}

.analysis-search-form input {
  min-height: 48px;
}

.analysis-search-form button {
  min-height: 48px;
  white-space: nowrap;
}

.analysis-loading {
  border: 1px dashed var(--analysis-border);
  border-radius: 14px;
  padding: 28px;
  color: var(--text-soft);
  background: var(--analysis-panel-bg);
  text-align: center;
  font-weight: 850;
}

.analysis-loading.error {
  border-color: rgba(251, 113, 133, 0.42);
  color: var(--red);
}

.analysis-hero {
  position: relative;
  overflow: visible;
  display: block;
  gap: 18px;
  height: max-content;
  min-height: 184px;
  border: 1px solid var(--analysis-border);
  border-radius: 14px;
  padding: 14px 18px 12px;
  background: var(--analysis-hero-bg);
  box-shadow: var(--analysis-shadow);
}

.analysis-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--analysis-grid-overlay);
  background-size: 100% 52px, 76px 100%, auto;
  pointer-events: none;
}

.analysis-hero > * {
  position: relative;
  z-index: 1;
}

.analysis-identity h3 {
  margin: 0;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: clamp(24px, 2.6vw, 42px);
  line-height: 0.98;
}

.analysis-identity {
  position: relative;
  display: grid;
  gap: 8px;
  padding-right: 310px;
}

.analysis-title-line {
  display: block;
}

.analysis-title-name {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
}

.analysis-title-name h3 {
  margin-bottom: 0;
}



.analysis-identity small {
  color: var(--muted);
  font-weight: 800;
}

.analysis-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.analysis-price-row strong {
  font-size: clamp(28px, 3.2vw, 44px);
}

.analysis-price-row span,
.analysis-price-row em {
  border-radius: 999px;
  padding: 7px 11px;
  background: var(--analysis-accent-bg);
  font-style: normal;
  font-weight: 950;
}

.analysis-price-row [data-analysis-live-change] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}

.analysis-price-row span.up {
  color: var(--analysis-good);
}

.analysis-price-row span.down {
  color: var(--analysis-bad);
}

.forecast-score-card {
  overflow: visible;
  display: grid;
  align-content: center;
  gap: 10px;
  min-height: 184px;
  border: 1px solid var(--analysis-border);
  border-radius: 16px;
  padding: 20px;
  background: var(--analysis-panel-strong-bg);
}

.analysis-score-inline {
  position: absolute;
  top: 48px;
  right: 0;
  justify-self: end;
  width: min(280px, 100%);
  min-height: 0;
  margin-top: 0;
  border-radius: 14px;
  padding: 11px 13px;
  background: var(--analysis-panel-strong-bg);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  gap: 7px;
}

.forecast-score-card > span,
.forecast-score-title span,
.forecast-confidence {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.forecast-score-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
}

.forecast-score-card strong {
  font-size: clamp(42px, 5vw, 66px);
  line-height: 1;
}

.forecast-score-card.analysis-score-inline > strong {
  font-size: clamp(28px, 2.4vw, 38px);
}

.forecast-score-card.analysis-score-inline .forecast-score-rail {
  height: 9px;
}

.forecast-score-card.analysis-score-inline .forecast-score-rail i {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

.forecast-score-card.analysis-score-inline .forecast-score-scale small {
  font-size: 12px;
}

.forecast-score-card.positive strong {
  color: #4ade80;
}

.forecast-score-card.neutral strong {
  color: #fbbf24;
}

.forecast-score-card.negative strong {
  color: #fb7185;
}

.forecast-score-card p {
  margin: 0;
  color: var(--text-soft);
  font-weight: 900;
}

.forecast-score-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
}

.score-help-popover {
  position: relative;
}

.score-help-popover summary {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--analysis-border);
  border-radius: 50%;
  color: var(--analysis-chip-text);
  background: var(--analysis-accent-bg);
  cursor: pointer;
  font-size: 13px;
  font-weight: 1000;
  list-style: none;
}

.score-help-popover summary::-webkit-details-marker {
  display: none;
}

.score-help-popover div {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  display: grid;
  gap: 6px;
  width: min(300px, calc(100vw - 40px));
  border: 1px solid var(--analysis-border);
  border-radius: 12px;
  padding: 12px;
  color: var(--text-soft);
  background: var(--analysis-panel-strong-bg);
  box-shadow: var(--analysis-shadow);
  opacity: 0;
  transform: translateY(-4px);
  visibility: hidden;
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
}

.analysis-score-inline .score-help-popover div {
  left: auto;
  right: 0;
  width: min(280px, calc(100vw - 40px));
}

.score-help-popover[open] div,
.score-help-popover:focus-within div {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.score-help-popover div strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
}

.score-help-popover div span {
  font-size: 13px;
  line-height: 1.45;
}

.forecast-score-rail {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ef4444, #fbbf24, #22c55e);
}

.forecast-score-rail i {
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  border: 3px solid var(--panel-strong);
  border-radius: 50%;
  background: var(--analysis-panel-strong-bg);
  transform: translate(-50%, -50%);
  box-shadow: var(--analysis-shadow);
}

.forecast-score-scale {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  line-height: 1.2;
}

@media (max-width: 1080px) {
  .analysis-identity {
    padding-right: 0;
  }

  .analysis-title-line {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .analysis-score-inline {
    position: static;
    top: auto;
    right: auto;
    justify-self: start;
    width: min(100%, 380px);
  }

  .analysis-identity h3 {
    font-size: clamp(26px, 6vw, 46px);
  }
}

.analysis-feature-switcher {
  display: grid;
  gap: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.analysis-feature-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.analysis-feature-title span {
  color: var(--blue);
  font-size: 13px;
  font-weight: 1000;
  text-transform: uppercase;
}

.analysis-feature-title small {
  color: var(--muted);
  font-weight: 850;
}

.analysis-feature-bar {
  display: flex;
  gap: 28px;
  width: 100%;
  min-height: 44px;
  overflow-x: auto;
  border: 0;
  border-bottom: 2px solid var(--analysis-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.analysis-feature-bar button {
  display: inline-flex;
  align-items: center;
  min-width: max-content;
  min-height: 44px;
  justify-content: center;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  font-size: 16px;
  font-weight: 950;
  box-shadow: none;
}

.analysis-feature-bar button:last-child {
  border-right: 0;
}

.analysis-feature-bar button.active {
  color: var(--text);
  background: transparent;
  box-shadow: inset 0 -4px 0 #7aa7ff;
}

.analysis-feature-bar button:disabled {
  opacity: 0.62;
}

.forecast-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.8fr);
  gap: 16px;
}

.forecast-workspace.forecast-chart-only {
  grid-template-columns: 1fr;
}

.forecast-main-panel,
.forecast-side-panel,
.forecast-factor {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.forecast-main-panel,
.forecast-side-panel {
  padding: 0;
}

.forecast-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.forecast-panel-head h3,
.forecast-side-panel h3 {
  margin: 0;
  font-size: 24px;
}

.forecast-confidence {
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--analysis-accent-bg);
}

.forecast-chart-shell {
  overflow: hidden;
  border: 1px solid var(--analysis-border);
  border-radius: 14px;
  background: var(--analysis-chart-bg);
  background-size: 100% 25%, 20% 100%, auto;
}

.forecast-chart {
  display: block;
  width: 100%;
  min-height: 300px;
}

.analysis-chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
}

.analysis-chart-card {
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.analysis-chart-card.loading-range .analysis-canvas-wrap {
  opacity: 0.72;
}

.analysis-chart-card.range-error .analysis-canvas-wrap {
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.45);
}

.analysis-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 4px 0;
}

.analysis-chart-head h3 {
  margin: 0;
  font-size: 18px;
}

.analysis-chart-head span {
  border-radius: 999px;
  padding: 6px 9px;
  background: var(--analysis-accent-bg);
  font-size: 12px;
  font-weight: 950;
}

.analysis-chart-head span.up {
  color: var(--analysis-good);
}

.analysis-chart-head span.down {
  color: var(--analysis-bad);
}

.analysis-chart-head span.buy {
  color: #22c55e;
}

.analysis-chart-head span.sell {
  color: #fb7185;
}

.analysis-chart-head span.hold {
  color: #facc15;
}

.analysis-score-history-card {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
}

.score-history-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 4px 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 900;
}

.score-history-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.score-history-legend span::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: currentColor;
}

.score-history-legend .buy {
  color: #22c55e;
}

.score-history-legend .hold {
  color: #facc15;
}

.score-history-legend .sell {
  color: #fb7185;
}

.analysis-chart-note {
  margin: 6px 14px 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.42;
}

.analysis-live-chart,
.analysis-target-chart {
  cursor: crosshair;
  display: block;
  width: 100%;
  min-height: 340px;
}

.analysis-canvas-wrap {
  position: relative;
  min-height: clamp(280px, 46vh, 360px);
  margin-top: 12px;
  border: 1px solid var(--analysis-border);
  border-radius: 12px;
  background: #101010;
  overflow: hidden;
}

.analysis-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  min-height: clamp(280px, 46vh, 360px);
  display: block;
}

.score-history-wrap,
.score-history-wrap canvas {
  min-height: clamp(328px, 52vh, 430px);
}

.score-history-tooltip {
  width: 170px;
}

.analysis-chart-tooltip {
  z-index: 6;
}

.analysis-chart-ohlc {
  position: absolute;
  top: 58px;
  left: 14px;
  z-index: 6;
  display: flex;
  max-width: calc(100% - 330px);
  align-items: center;
  gap: 8px;
  overflow: hidden;
  color: rgba(226, 232, 240, 0.9);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.analysis-chart-ohlc strong {
  color: #f8fafc;
  font-size: 13px;
}

.analysis-chart-ohlc span {
  color: rgba(226, 232, 240, 0.72);
}

.analysis-chart-ohlc em {
  color: rgba(226, 232, 240, 0.82);
  font-style: normal;
}

.analysis-chart-ohlc b {
  font-weight: 900;
}

.analysis-chart-ohlc b.up {
  color: #089981;
}

.analysis-chart-ohlc b.down {
  color: #f23645;
}

.analysis-chart-controls {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 8px;
}

.analysis-chart-zoom-controls {
  position: static;
  right: auto;
  bottom: auto;
}

.analysis-chart-mode-toggle,
.analysis-chart-fullscreen-toggle {
  position: static;
  flex: 0 0 auto;
}

.analysis-chart-fullscreen-toggle.active {
  color: #9df0a5;
}

.analysis-chart-range-bar {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 8;
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(10px);
}

.analysis-chart-range-bar button {
  width: auto;
  min-width: 42px;
  min-height: 34px;
  border: 0;
  border-right: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 7px;
  padding: 0 11px;
  color: rgba(226, 232, 240, 0.78);
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 900;
}

.analysis-chart-range-bar button:last-child {
  border-right: 0;
}

.analysis-chart-range-bar button.active {
  color: #ffffff;
  background: linear-gradient(135deg, #1d8cf8, #12a5a5);
}

.analysis-chart-range-bar button span {
  display: block;
}

.analysis-chart-hit {
  fill: transparent;
  pointer-events: all;
  stroke: transparent;
  cursor: crosshair;
}

.analysis-live-line {
  fill: none;
  stroke: #14b8a6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.analysis-live-dot {
  fill: var(--analysis-panel-strong-bg);
  stroke: #7aa7ff;
  stroke-width: 3;
}

.analysis-target-history {
  fill: none;
  stroke: #2f6bff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.analysis-target-divider {
  stroke: rgba(148, 163, 184, 0.32);
  stroke-width: 1;
}

.analysis-target-upside {
  fill: rgba(20, 184, 166, 0.2);
  stroke: rgba(20, 184, 166, 0.72);
  stroke-dasharray: 3 4;
}

.analysis-target-downside {
  fill: rgba(244, 63, 94, 0.16);
  stroke: rgba(244, 63, 94, 0.7);
  stroke-dasharray: 3 4;
}

.analysis-target-current {
  stroke: #2f6bff;
  stroke-width: 2;
}

.analysis-target-average {
  stroke: #ec4899;
  stroke-width: 2;
}

.analysis-chart-axis,
.analysis-chart-price,
.analysis-chart-label {
  fill: var(--text-soft);
  font-size: 12px;
  font-weight: 850;
}

.analysis-chart-price {
  fill: var(--text);
}

.analysis-chart-label.max {
  fill: var(--analysis-good);
}

.analysis-chart-label.avg {
  fill: #ec4899;
}

.analysis-chart-label.min {
  fill: var(--analysis-bad);
}

.analysis-chart-card:fullscreen,
.analysis-chart-card.analysis-chart-expanded {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  padding: 18px;
  background: var(--analysis-panel-strong-bg);
}

.analysis-chart-card.analysis-chart-expanded {
  position: fixed;
  inset: 12px;
  z-index: 2000;
  width: auto;
  height: auto;
}

.analysis-chart-card:fullscreen .analysis-canvas-wrap,
.analysis-chart-card.analysis-chart-expanded .analysis-canvas-wrap {
  min-height: calc(100vh - 104px);
}

.analysis-chart-card:fullscreen .analysis-canvas-wrap canvas,
.analysis-chart-card.analysis-chart-expanded .analysis-canvas-wrap canvas {
  min-height: calc(100vh - 104px);
}

.stock-explanation {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--analysis-border);
}

.stock-explanation h3 {
  margin: 0;
  color: var(--text);
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.15;
}

.stock-explanation h3 + p {
  margin-top: 2px;
}

.stock-explanation p {
  max-width: 1220px;
  margin: 0;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.72;
}

.accendion-research-note {
  padding: 22px;
  border: 1px solid rgba(122, 167, 255, 0.22);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(12, 18, 34, 0.46));
}

.research-note-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.research-note-head small {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 750;
}

.research-call-inline {
  display: inline-flex;
  transform: translateY(-4px);
  margin-left: 12px;
  vertical-align: middle;
  border-radius: 999px;
  padding: 8px 13px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.18), 0 12px 26px rgba(20, 184, 166, 0.12);
  font-size: clamp(13px, 1vw, 16px);
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  animation: research-call-pulse 1.4s ease-in-out infinite;
}

.research-call-inline.positive {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.28), rgba(14, 165, 233, 0.2));
  color: #2dd4bf;
}

.research-call-inline.negative {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.24), rgba(249, 115, 22, 0.18));
  color: #fb7185;
}

@keyframes research-call-pulse {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.18), 0 12px 26px rgba(20, 184, 166, 0.08);
    filter: brightness(1);
  }
  50% {
    box-shadow: 0 0 0 1px currentColor, 0 0 22px rgba(251, 113, 133, 0.34);
    filter: brightness(1.18);
  }
}

.research-decision-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 4px;
}

.research-decision-grid article {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.5);
}

.research-decision-grid span,
.research-decision-grid small {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.research-decision-grid strong {
  display: block;
  margin: 6px 0;
  color: var(--text);
  font-size: clamp(18px, 1.8vw, 26px);
  line-height: 1.12;
}

.analysis-company-end {
  display: grid;
  gap: 18px;
  margin: 28px 0 10px;
  padding: 34px 0 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  background: transparent !important;
  text-align: center;
}

.analysis-company-wordmark {
  width: min(268px, 72vw);
  height: auto;
  justify-self: center;
  filter: drop-shadow(0 12px 26px rgba(99, 102, 241, 0.22));
}

.analysis-company-end p {
  max-width: 900px;
  justify-self: center;
  margin: 0;
  color: var(--text-soft);
  font-size: clamp(20px, 2vw, 30px);
  font-weight: 900;
  line-height: 1.35;
}

.analysis-company-end-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 10px;
}

.analysis-company-end-grid span {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
}

.analysis-company-end-grid small {
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
  text-transform: uppercase;
}

.analysis-company-end-grid strong {
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.35;
}

@media (max-width: 980px) {
  .research-decision-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .research-note-head {
    display: grid;
  }

  .research-decision-grid {
    grid-template-columns: 1fr;
  }
}

.analysis-ratings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 28px;
}

.rating-gauge-panel {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0 6px 10px;
  text-align: center;
}

.rating-gauge-copy {
  justify-self: stretch;
  text-align: left;
}

.rating-gauge-copy h3 {
  margin: 0 0 6px;
  font-size: clamp(24px, 2.8vw, 36px);
  line-height: 1.1;
}

.rating-gauge-copy p {
  margin: 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.45;
}

.rating-gauge {
  width: min(100%, 480px);
  max-height: 282px;
  overflow: visible;
}

.rating-arc {
  fill: none;
  stroke-linecap: round;
  stroke-width: 14;
}

.rating-arc.base {
  stroke: rgba(148, 163, 184, 0.24);
  stroke-width: 18;
}

.rating-arc.strong-sell {
  stroke: #ef4444;
}

.rating-arc.sell {
  stroke: #f97316;
}

.rating-arc.neutral {
  stroke: #eab308;
}

.rating-arc.buy {
  stroke: #7aa7ff;
}

.rating-arc.strong-buy {
  stroke: #22c55e;
}

.rating-needle {
  stroke: var(--text);
  stroke-linecap: round;
  stroke-width: 5;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.2));
}

.rating-hub {
  fill: var(--text);
}

.rating-label {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.rating-label.center {
  text-anchor: middle;
}

.rating-label.end {
  text-anchor: end;
}

.rating-gauge-panel > strong {
  color: var(--blue);
  font-size: 26px;
  line-height: 1;
}

.rating-gauge-panel.positive > strong {
  color: var(--analysis-good);
}

.rating-gauge-panel.negative > strong {
  color: var(--analysis-bad);
}

.rating-gauge-panel > small {
  color: var(--muted);
  font-weight: 850;
}

.analysis-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.analysis-section-head h3 {
  margin: 0;
  color: var(--text);
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.1;
}

.analysis-buy-sell-card,
.analysis-trade-plan-card,
.analysis-fundamentals-card,
.analysis-shareholders-card {
  display: grid;
  gap: 18px;
  margin-top: 24px;
  border: 1px solid var(--analysis-border);
  border-radius: 12px;
  padding: 22px 26px;
  background: var(--analysis-panel-strong-bg);
}

.analysis-trade-plan-card {
  border-radius: 8px;
}

.trade-plan-action {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--analysis-good);
  background: rgba(20, 184, 166, 0.1);
  font-size: 13px;
  font-weight: 900;
}

.trade-plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.trade-plan-grid article {
  display: grid;
  gap: 8px;
  min-height: 144px;
  border: 1px solid var(--analysis-border);
  border-radius: 8px;
  padding: 16px;
  background: var(--analysis-panel-muted-bg);
}

.trade-plan-grid article.buy {
  border-color: rgba(20, 184, 166, 0.32);
}

.trade-plan-grid article.breakout {
  border-color: rgba(59, 130, 246, 0.32);
}

.trade-plan-grid article.sell {
  border-color: rgba(245, 158, 11, 0.35);
}

.trade-plan-grid article.risk {
  border-color: rgba(239, 68, 68, 0.34);
}

.trade-plan-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.trade-plan-grid strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1.15;
  font-weight: 950;
}

.trade-plan-grid small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 750;
}

.trade-plan-context {
  display: grid;
  gap: 8px;
  border-radius: 8px;
  padding: 14px 16px;
  background: rgba(100, 116, 139, 0.1);
}

.trade-plan-context p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.trade-plan-context strong {
  color: var(--text);
}

.trade-plan-context span {
  margin-left: 10px;
  font-weight: 850;
}

.averaging-workspace {
  display: grid;
  gap: 18px;
}

.averaging-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.averaging-hero h3 {
  margin: 4px 0 8px;
  color: var(--text);
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.05;
}

.averaging-hero p {
  max-width: 860px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-weight: 750;
}

.averaging-decision-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--text);
  background: rgba(148, 163, 184, 0.12);
  font-weight: 950;
  white-space: nowrap;
}

.averaging-decision-pill.average {
  color: var(--analysis-good);
  border-color: rgba(20, 184, 166, 0.38);
  background: rgba(20, 184, 166, 0.14);
}

.averaging-decision-pill.wait {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.36);
  background: rgba(251, 191, 36, 0.12);
}

.averaging-decision-pill.risk {
  color: #ff5b75;
  border-color: rgba(255, 91, 117, 0.4);
  background: rgba(255, 91, 117, 0.12);
}

.averaging-score-grid,
.averaging-zone-grid,
.averaging-bookset-grid,
.averaging-path-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.averaging-path-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.averaging-score-grid article,
.averaging-zone-grid article,
.averaging-bookset-grid article,
.averaging-path-grid article,
.averaging-calculator,
.averaging-decision-card,
.averaging-recovery-card {
  border: 1px solid var(--analysis-border);
  border-radius: 14px;
  padding: 18px;
  background: var(--analysis-panel-strong-bg);
}

.averaging-score-grid article,
.averaging-zone-grid article,
.averaging-bookset-grid article,
.averaging-path-grid article {
  display: grid;
  gap: 8px;
}

.averaging-calculator {
  display: grid;
  grid-template-columns: minmax(230px, 1.1fr) repeat(4, minmax(118px, 0.48fr)) repeat(3, minmax(190px, 0.78fr));
  gap: 14px;
  align-items: stretch;
}

.averaging-calculator h4 {
  margin: 4px 0 6px;
  color: var(--text);
  font-size: 22px;
}

.averaging-calculator small {
  color: var(--muted);
  line-height: 1.45;
  font-weight: 750;
}

.averaging-calculator .average-input-warning {
  display: block;
  margin-top: 10px;
  border: 1px solid rgba(251, 191, 36, 0.34);
  border-radius: 10px;
  padding: 10px 12px;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  font-weight: 900;
}

.averaging-calculator .average-input-warning[hidden] {
  display: none;
}

.averaging-calculator.has-input-warning [data-average-old-buy] {
  border-color: rgba(251, 191, 36, 0.72);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.14);
}

.averaging-calculator.has-input-warning [data-average-add-buy] {
  border-color: rgba(251, 191, 36, 0.72);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.14);
}

.averaging-calculator label,
.averaging-calculator article {
  display: grid;
  align-content: center;
  gap: 8px;
  border: 1px solid var(--analysis-border);
  border-radius: 12px;
  padding: 14px;
  background: var(--analysis-panel-soft-bg);
}

.averaging-calculator article.average-bookset-live {
  border-color: rgba(251, 191, 36, 0.28);
}

.averaging-calculator article.average-wait-zone {
  border-color: rgba(20, 184, 166, 0.32);
  background:
    radial-gradient(circle at 20% 0%, rgba(20, 184, 166, 0.14), transparent 42%),
    var(--analysis-panel-soft-bg);
}

.averaging-calculator article.average-wait-zone strong {
  color: var(--analysis-good);
}

.averaging-calculator label span,
.averaging-calculator article span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.averaging-calculator input {
  width: 100%;
  border: 1px solid var(--analysis-border);
  border-radius: 10px;
  padding: 11px 12px;
  color: var(--text);
  background: var(--analysis-panel-bg);
  font: inherit;
  font-weight: 900;
  outline: none;
}

.averaging-calculator input:focus {
  border-color: rgba(96, 165, 250, 0.7);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.16);
}

.averaging-calculator article strong {
  color: var(--analysis-good);
  font-size: 24px;
  line-height: 1.1;
}

.averaging-score-grid span,
.averaging-zone-grid span,
.averaging-bookset-grid span,
.averaging-path-grid span,
.averaging-decision-card span,
.averaging-recovery-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.averaging-score-grid strong,
.averaging-zone-grid strong,
.averaging-bookset-grid strong,
.averaging-path-grid strong,
.averaging-decision-card strong,
.averaging-recovery-card strong {
  color: var(--text);
  font-size: clamp(19px, 2vw, 28px);
  line-height: 1.12;
  font-weight: 950;
}

.averaging-score-grid small,
.averaging-zone-grid small,
.averaging-bookset-grid small,
.averaging-decision-card small,
.averaging-recovery-card small {
  color: var(--muted);
  line-height: 1.45;
  font-weight: 750;
}

.averaging-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
}

.averaging-decision-card,
.averaging-recovery-card {
  display: grid;
  align-content: start;
  gap: 12px;
}

.averaging-decision-card {
  border-left: 4px solid rgba(251, 191, 36, 0.65);
}

.averaging-decision-card.average {
  border-left-color: var(--analysis-good);
}

.averaging-decision-card.risk {
  border-left-color: #ff5b75;
}

.averaging-decision-card p,
.averaging-recovery-card p,
.averaging-path-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-weight: 760;
}

.averaging-recovery-card strong {
  color: var(--analysis-good);
}

.averaging-zone-grid article.buy {
  border-color: rgba(20, 184, 166, 0.34);
}

.averaging-zone-grid article.breakout {
  border-color: rgba(99, 102, 241, 0.36);
}

.averaging-zone-grid article.target {
  border-color: rgba(34, 211, 238, 0.32);
}

.averaging-zone-grid article.risk {
  border-color: rgba(255, 91, 117, 0.38);
}

.averaging-bookset-grid article {
  background: linear-gradient(135deg, var(--analysis-panel-strong-bg), var(--analysis-panel-soft-bg));
}

.averaging-bookset-grid article.cost {
  border-color: rgba(96, 165, 250, 0.34);
}

.averaging-bookset-grid article.profit {
  border-color: rgba(20, 184, 166, 0.36);
}

.averaging-bookset-grid article.partial {
  border-color: rgba(251, 191, 36, 0.35);
}

.averaging-bookset-grid article.avoid {
  border-color: rgba(255, 91, 117, 0.38);
}

.averaging-bookset-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-weight: 760;
}

.averaging-path-grid article {
  background: var(--analysis-panel-soft-bg);
}

.averaging-visual-board {
  display: grid;
  gap: 26px;
  border: 1px solid var(--analysis-border);
  border-radius: 18px;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 18%, rgba(20, 184, 166, 0.16), transparent 34%),
    radial-gradient(circle at 80% 20%, rgba(96, 165, 250, 0.13), transparent 34%),
    var(--analysis-panel-strong-bg);
}

.averaging-visual-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.averaging-visual-head h4 {
  margin: 4px 0 8px;
  color: var(--text);
  font-size: clamp(24px, 2.7vw, 40px);
  line-height: 1.05;
}

.averaging-visual-head small {
  color: var(--muted);
  font-weight: 800;
}

.averaging-visual-head > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(96, 165, 250, 0.34);
  border-radius: 999px;
  padding: 10px 16px;
  color: #93c5fd;
  background: rgba(96, 165, 250, 0.1);
  font-weight: 950;
  white-space: nowrap;
}

.averaging-visual-head > span.average {
  color: var(--analysis-good);
  border-color: rgba(20, 184, 166, 0.36);
  background: rgba(20, 184, 166, 0.12);
}

.averaging-visual-head > span.risk {
  color: #ff5b75;
  border-color: rgba(255, 91, 117, 0.36);
  background: rgba(255, 91, 117, 0.12);
}

.average-ladder {
  position: relative;
  min-height: 224px;
  border-radius: 18px;
  padding: 56px 28px 26px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 91, 117, 0.12), rgba(251, 191, 36, 0.1) 42%, rgba(20, 184, 166, 0.16));
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.average-ladder-without-track {
  min-height: 0;
}

.average-ladder-without-track .average-ladder-guide {
  margin-top: 0;
}

.average-ladder-track {
  position: relative;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff4f6d, #fbbf24 48%, #20d6b1 72%, #60a5fa);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 18px 44px rgba(20, 184, 166, 0.1);
}

.average-ladder-fill {
  position: absolute;
  left: 28px;
  top: 56px;
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  pointer-events: none;
  mix-blend-mode: screen;
}

.ladder-dot {
  position: absolute;
  top: calc(50% + var(--lane-y, 0px));
  width: 20px;
  height: 20px;
  border: 3px solid #08111f;
  border-radius: 999px;
  background: #cbd5e1;
  transform: translate(-50%, -50%);
  z-index: 2;
  font-style: normal;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.ladder-dot.risk,
.ladder-dot.low {
  background: #ff4f6d;
}

.ladder-dot.current {
  width: 26px;
  height: 26px;
  background: #60a5fa;
  box-shadow: 0 0 0 7px rgba(96, 165, 250, 0.18), 0 0 24px rgba(96, 165, 250, 0.55);
}

.ladder-dot.reduce {
  background: #fbbf24;
}

.ladder-dot.average {
  background: #a78bfa;
}

.ladder-dot.profit,
.ladder-dot.target {
  background: #20d6b1;
}

.average-ladder-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 42px;
}

.average-ladder-guide span {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 999px;
  padding: 8px 10px;
  color: var(--muted);
  background: rgba(8, 17, 31, 0.3);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.average-ladder-guide .danger {
  color: #ff8a9d;
  border-color: rgba(255, 91, 117, 0.22);
}

.average-ladder-guide .watch {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.22);
}

.average-ladder-guide .safe {
  color: #2dd4bf;
  border-color: rgba(45, 212, 191, 0.22);
}

.average-ladder-legend {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.average-ladder-legend article {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  padding: 10px 11px;
  background: rgba(8, 17, 31, 0.46);
}

.average-ladder-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.average-ladder-legend span i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #cbd5e1;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.average-ladder-legend strong {
  color: var(--text);
  font-size: clamp(14px, 1.2vw, 18px);
  line-height: 1.05;
  font-weight: 950;
  white-space: nowrap;
}

.average-ladder-legend small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 780;
}

.average-ladder-legend article.risk,
.average-ladder-legend article.low {
  border-color: rgba(255, 91, 117, 0.24);
}

.average-ladder-legend article.risk span i,
.average-ladder-legend article.low span i {
  background: #ff4f6d;
}

.average-ladder-legend article.current {
  border-color: rgba(96, 165, 250, 0.34);
  background: rgba(96, 165, 250, 0.12);
}

.average-ladder-legend article.current span i {
  background: #60a5fa;
}

.average-ladder-legend article.reduce {
  border-color: rgba(251, 191, 36, 0.26);
}

.average-ladder-legend article.reduce span i {
  background: #fbbf24;
}

.average-ladder-legend article.average {
  border-color: rgba(167, 139, 250, 0.28);
}

.average-ladder-legend article.average span i {
  background: #a78bfa;
}

.average-ladder-legend article.profit,
.average-ladder-legend article.target {
  border-color: rgba(32, 214, 177, 0.28);
}

.average-ladder-legend article.profit span i,
.average-ladder-legend article.target span i {
  background: #20d6b1;
}

.average-action-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.average-action-cards article {
  display: grid;
  gap: 8px;
  border: 1px solid var(--analysis-border);
  border-radius: 16px;
  padding: 18px;
  background: var(--analysis-panel-soft-bg);
}

.average-action-cards article.average {
  border-color: rgba(20, 184, 166, 0.34);
}

.average-action-cards article.risk {
  border-color: rgba(255, 91, 117, 0.38);
}

.average-action-cards article.profit {
  border-color: rgba(20, 184, 166, 0.34);
}

.average-action-cards span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  font-weight: 950;
}

.average-action-cards strong {
  color: var(--text);
  font-size: 21px;
  line-height: 1.15;
}

.average-action-cards p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-weight: 760;
}

@media (max-width: 980px) {
  .averaging-hero,
  .averaging-main-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .averaging-score-grid,
  .averaging-zone-grid,
  .averaging-bookset-grid,
  .averaging-path-grid,
  .average-ladder-legend,
  .average-action-cards,
  .averaging-calculator {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .averaging-calculator > div:first-child,
  .averaging-calculator article {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .averaging-score-grid,
  .averaging-zone-grid,
  .averaging-bookset-grid,
  .averaging-path-grid,
  .average-ladder-legend,
  .average-action-cards,
  .averaging-calculator {
    grid-template-columns: 1fr;
  }

  .averaging-decision-pill {
    width: 100%;
  }

  .averaging-visual-head {
    display: grid;
  }

  .average-ladder {
    padding-left: 18px;
    padding-right: 18px;
  }

  .average-ladder-guide {
    grid-template-columns: 1fr;
  }

  .average-ladder-track {
    min-width: 0;
  }
}


.signal-mix-bars {
  display: grid;
  gap: 13px;
  max-width: 650px;
}

.signal-mix-bars article {
  display: grid;
  grid-template-columns: 150px minmax(180px, 1fr) 86px;
  align-items: center;
  gap: 16px;
}

.signal-mix-bars span,
.signal-mix-bars strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}

.signal-mix-bars strong {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.signal-mix-bars div {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.28);
}

.signal-mix-bars i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #14b8a6;
}

.signal-mix-bars article.buy i {
  background: #2dd4bf;
}

.signal-mix-bars article.hold i {
  background: #64748b;
}

.signal-mix-bars article.sell i {
  background: #f59e0b;
}

.signal-mix-bars article.strong-sell i {
  background: #ef4444;
}

.fundamentals-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 28px;
}

.fundamentals-grid article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 54px;
  border-radius: 7px;
  padding: 0 16px;
  background: var(--analysis-panel-muted-bg);
}

.fundamentals-grid article:nth-child(3n + 1) {
  background: transparent;
}

.fundamentals-grid span {
  color: var(--text-soft);
  font-size: 16px;
  font-weight: 750;
}

.fundamentals-grid strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 950;
  text-align: right;
}

.shareholder-bars {
  display: grid;
  gap: 14px;
  max-width: 620px;
}

.shareholder-bars article {
  display: grid;
  grid-template-columns: 150px minmax(180px, 1fr) 86px;
  align-items: center;
  gap: 16px;
}

.shareholder-bars span,
.shareholder-bars strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}

.shareholder-bars strong {
  text-align: right;
}

.shareholder-bars div {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.28);
}

.shareholder-bars i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #14b8a6;
}

.shareholder-bars article.good i {
  background: #2dd4bf;
}

.shareholder-bars article.hold i {
  background: #64748b;
}

.shareholder-bars article.warm i {
  background: #f59e0b;
}

.shareholder-bars.empty i {
  width: 0 !important;
}

.scenario-desk {
  margin-top: 18px;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.scenario-desk h3 {
  font-size: 24px;
}

.scenario-desk .scenario-grid article {
  border: 0;
  border-left: 3px solid var(--analysis-border);
  border-radius: 0;
  padding: 4px 14px;
  background: transparent;
}

.news-workspace {
  display: grid;
  gap: 18px;
}

.news-page-head {
  max-width: 980px;
}

.news-page-head h3 {
  margin: 0 0 8px;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.1;
}

.news-page-head p {
  margin: 0;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.55;
}

.news-lead-card,
.news-row-card {
  display: grid;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  cursor: default;
}

.news-lead-card {
  border-top: 1px solid var(--analysis-border);
  border-bottom: 1px solid var(--analysis-border);
  padding: 18px 0;
}

.news-lead-card > strong {
  max-width: 1060px;
  font-size: clamp(22px, 2.3vw, 34px);
  line-height: 1.18;
}

.news-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.news-lead-card p {
  max-width: 980px;
  margin: 0;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.55;
}

.news-update-note {
  display: grid;
  gap: 4px;
  max-width: 980px;
  border-left: 3px solid var(--blue);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--analysis-accent-bg);
}

.news-update-note small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.news-update-note span {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}

.news-list-grid {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--analysis-border);
}

.news-row-card {
  grid-template-columns: minmax(94px, 120px) minmax(0, 1fr) minmax(140px, 220px);
  align-items: start;
  border-bottom: 1px solid var(--analysis-border);
  padding: 14px 0;
}

.news-lead-card span,
.news-row-card span {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--blue);
  background: var(--analysis-accent-bg);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.news-update-note span {
  width: auto;
  border-radius: 0;
  padding: 0;
  color: var(--text);
  background: transparent;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  text-transform: none;
}

.news-lead-card.up .news-card-meta span,
.news-row-card.up > span {
  color: var(--analysis-good);
  background: rgba(34, 197, 94, 0.14);
}

.news-lead-card.down .news-card-meta span,
.news-row-card.down > span {
  color: var(--analysis-bad);
  background: rgba(244, 63, 94, 0.14);
}

.news-row-card strong {
  line-height: 1.35;
}

.news-row-copy {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.news-row-copy p,
.news-row-copy em {
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
  font-style: normal;
  line-height: 1.45;
}

.news-row-copy em {
  color: var(--muted);
  font-weight: 800;
}

.news-lead-card small,
.news-row-card small {
  color: var(--muted);
  font-weight: 800;
}

.news-row-card > small {
  justify-self: end;
  text-align: right;
}

.forecast-path {
  fill: none;
  stroke: #7aa7ff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
}

.forecast-support,
.forecast-resistance {
  stroke-dasharray: 8 8;
  stroke-width: 2;
}

.forecast-support {
  stroke: rgba(34, 197, 94, 0.66);
}

.forecast-resistance {
  stroke: rgba(251, 191, 36, 0.72);
}

.forecast-point circle {
  fill: var(--analysis-panel-strong-bg);
  stroke: #7aa7ff;
  stroke-width: 4;
}

.forecast-point.up circle {
  stroke: #4ade80;
}

.forecast-point.down circle {
  stroke: #fb7185;
}

.forecast-point text {
  fill: var(--text);
  font-size: 13px;
  font-weight: 850;
  text-anchor: middle;
}

.forecast-axis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--analysis-border);
}

.forecast-axis span {
  display: grid;
  gap: 4px;
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.forecast-axis strong {
  color: var(--text);
}

.forecast-side-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.forecast-side-panel p,
.beginner-brief span {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.beginner-brief {
  display: grid;
  gap: 6px;
  border-left: 4px solid #7aa7ff;
  border-radius: 10px;
  padding: 12px;
  background: var(--analysis-accent-bg);
}

.forecast-factors {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.forecast-factor {
  display: grid;
  gap: 8px;
  padding: 13px;
}

.forecast-factor span {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--analysis-accent-bg);
  color: var(--analysis-chip-text);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.forecast-factor.up span {
  background: rgba(34, 197, 94, 0.18);
  color: var(--analysis-good);
}

.forecast-factor.down span {
  background: rgba(251, 113, 133, 0.18);
  color: var(--analysis-bad);
}

.forecast-factor p {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.analysis-levels.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.institutional-workspace {
  display: grid;
  gap: 16px;
}

.institutional-command-card,
.institutional-engine-card,
.institutional-panel,
.institutional-probability-grid article {
  border: 1px solid var(--analysis-border);
  border-radius: 14px;
  background: var(--analysis-panel-bg);
  box-shadow: var(--analysis-shadow);
}

.institutional-command-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 18px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(21, 94, 239, 0.16), rgba(14, 147, 132, 0.1)),
    var(--analysis-panel-bg);
}

.institutional-command-card h3 {
  margin: 0 0 10px;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 0.98;
}

.institutional-command-card p,
.institutional-engine-card p,
.institutional-panel p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.institutional-master-score {
  display: grid;
  align-content: center;
  gap: 8px;
  border: 1px solid var(--analysis-border);
  border-radius: 14px;
  padding: 16px;
  background: var(--analysis-panel-strong-bg);
  text-align: center;
}

.institutional-master-score span,
.institutional-probability-grid span,
.institutional-engine-card span,
.institutional-agent-list small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.institutional-master-score strong {
  color: var(--blue);
  font-size: clamp(52px, 6vw, 76px);
  line-height: 0.95;
}

.institutional-probability-grid,
.institutional-engine-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.institutional-probability-grid article {
  display: grid;
  gap: 6px;
  min-height: 112px;
  padding: 14px;
}

.institutional-probability-grid strong {
  font-size: clamp(30px, 3.5vw, 48px);
}

.institutional-engine-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.institutional-engine-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
}

.institutional-engine-card > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.institutional-engine-card > div strong {
  color: var(--blue);
  font-size: 32px;
  line-height: 1;
}

.institutional-evidence-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.institutional-evidence-list li {
  display: grid;
  gap: 4px;
  border: 1px solid var(--analysis-border);
  border-radius: 10px;
  padding: 9px;
  background: var(--analysis-panel-soft-bg);
}

.institutional-evidence-list li.positive strong {
  color: var(--analysis-good);
}

.institutional-evidence-list li.negative strong,
.institutional-evidence-list li.warning strong {
  color: var(--analysis-bad);
}

.institutional-evidence-list span {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.35;
}

.institutional-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.institutional-panel {
  padding: 16px;
}

.institutional-panel h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.institutional-agent-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.institutional-agent-list span {
  display: grid;
  gap: 4px;
  border: 1px solid var(--analysis-border);
  border-radius: 10px;
  padding: 10px;
  background: var(--analysis-panel-soft-bg);
}

.compact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.earnings-workspace {
  display: grid;
  gap: 16px;
}

.earnings-overview,
.earnings-panel,
.earnings-quarter-card,
.earnings-kpi-grid article {
  border: 1px solid rgba(122, 167, 255, 0.22);
  border-radius: 14px;
  background: rgba(12, 21, 36, 0.74);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
}

.earnings-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 240px);
  gap: 18px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.13), rgba(21, 94, 239, 0.08)),
    rgba(8, 13, 24, 0.78);
}

.earnings-overview h3 {
  margin: 0 0 8px;
  font-size: clamp(28px, 3.4vw, 48px);
}

.earnings-overview p {
  max-width: 860px;
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.earnings-score-card {
  display: grid;
  place-items: center;
  border-radius: 14px;
  padding: 16px;
  background: rgba(5, 10, 20, 0.72);
  text-align: center;
}

.earnings-score-card span,
.earnings-score-card small,
.earnings-kpi-grid span,
.earnings-kpi-grid small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.earnings-score-card strong {
  color: #7aa7ff;
  font-size: 60px;
  line-height: 0.95;
}

.earnings-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.earnings-kpi-grid article {
  display: grid;
  gap: 6px;
  min-height: 126px;
  padding: 14px;
}

.earnings-kpi-grid strong {
  overflow-wrap: anywhere;
  font-size: clamp(20px, 2.3vw, 30px);
}

.earnings-visual-grid,
.earnings-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.earnings-panel {
  padding: 16px;
}

.earnings-panel h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.earnings-bar-chart {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
  min-height: 280px;
  border: 1px solid rgba(122, 167, 255, 0.16);
  border-radius: 14px;
  padding: 18px 14px 12px;
  background:
    linear-gradient(rgba(122, 167, 255, 0.08) 1px, transparent 1px),
    rgba(5, 10, 20, 0.46);
  background-size: 100% 25%;
}

.earnings-bar-item {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 7px;
  min-width: 0;
  height: 100%;
  text-align: center;
}

.earnings-bar-track {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
  min-height: 160px;
}

.earnings-bar-track i {
  display: block;
  width: min(44px, 76%);
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, #4ade80, #15803d);
  box-shadow: 0 14px 32px rgba(34, 197, 94, 0.16);
}

.earnings-bar-track i.down {
  background: linear-gradient(180deg, #fb7185, #be123c);
  box-shadow: 0 14px 32px rgba(251, 113, 133, 0.16);
}

.earnings-bar-item strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.earnings-bar-item small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.earnings-next-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.earnings-next-grid span {
  border: 1px solid rgba(122, 167, 255, 0.16);
  border-radius: 12px;
  padding: 11px;
  background: rgba(5, 10, 20, 0.42);
}

.earnings-next-grid small {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-weight: 900;
}

.earnings-next-grid strong {
  overflow-wrap: anywhere;
}

.earnings-checks {
  display: grid;
  gap: 9px;
}

.earnings-checks span {
  display: grid;
  gap: 3px;
  border-left: 4px solid rgba(122, 167, 255, 0.5);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(122, 167, 255, 0.08);
}

.earnings-checks span.pass {
  border-left-color: #22c55e;
}

.earnings-checks span.fail {
  border-left-color: #fb7185;
}

.earnings-checks small {
  color: var(--muted);
}

.earnings-quarter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.earnings-quarter-card {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.earnings-quarter-card h4 {
  margin: 0;
  font-size: 18px;
}

.earnings-quarter-card dl {
  display: grid;
  gap: 7px;
  margin: 0;
}

.earnings-quarter-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(122, 167, 255, 0.12);
  padding-bottom: 7px;
}

.earnings-quarter-card dt {
  color: var(--muted);
}

.earnings-quarter-card dd {
  margin: 0;
  font-weight: 900;
  text-align: right;
}

.earnings-quarter-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.earnings-reaction-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.earnings-reaction-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(122, 167, 255, 0.18);
  border-radius: 14px;
  padding: 16px;
  background: rgba(5, 10, 20, 0.42);
}

.earnings-reaction-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.earnings-reaction-head strong,
.earnings-reaction-head small {
  display: block;
}

.earnings-reaction-head small {
  color: var(--muted);
}

.earnings-reaction-head em {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(148, 163, 184, 0.13);
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.earnings-reaction-head em.up {
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
}

.earnings-reaction-head em.down {
  color: #fda4af;
  background: rgba(244, 63, 94, 0.12);
}

.earnings-reaction-bars {
  display: grid;
  gap: 10px;
}

.earnings-reaction-bars span {
  display: grid;
  grid-template-columns: minmax(92px, auto) minmax(90px, 1fr) minmax(54px, auto);
  align-items: center;
  gap: 10px;
}

.earnings-reaction-bars small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.earnings-reaction-bars i {
  display: block;
  height: 9px;
  min-width: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
}

.earnings-reaction-bars i.up {
  background: linear-gradient(90deg, #14b8a6, #86efac);
}

.earnings-reaction-bars i.down {
  background: linear-gradient(90deg, #fb7185, #f97316);
}

.earnings-reaction-bars strong {
  text-align: right;
  font-weight: 950;
}

.earnings-reaction-bars strong.up {
  color: #86efac;
}

.earnings-reaction-bars strong.down {
  color: #fda4af;
}

.earnings-table-wrap {
  overflow-x: auto;
}

.earnings-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

.earnings-table th,
.earnings-table td {
  border-bottom: 1px solid rgba(122, 167, 255, 0.14);
  padding: 12px 10px;
  text-align: left;
}

.earnings-table th {
  color: var(--text);
  font-size: 12px;
  text-transform: uppercase;
}

.earnings-table td {
  color: var(--text-soft);
}

.dividend-workspace {
  display: grid;
  gap: 16px;
}

.dividend-overview,
.dividend-panel,
.dividend-kpi-grid article {
  border: 1px solid rgba(122, 167, 255, 0.22);
  border-radius: 14px;
  background: rgba(12, 21, 36, 0.74);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
}

.dividend-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 250px);
  gap: 18px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.13), rgba(21, 94, 239, 0.08)),
    rgba(8, 13, 24, 0.78);
}

.dividend-overview h3 {
  margin: 0 0 8px;
  font-size: clamp(28px, 3.4vw, 48px);
}

.dividend-overview p {
  max-width: 900px;
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.dividend-score-card {
  display: grid;
  place-items: center;
  border-radius: 14px;
  padding: 16px;
  background: rgba(5, 10, 20, 0.72);
  text-align: center;
}

.dividend-score-card span,
.dividend-score-card small,
.dividend-kpi-grid span,
.dividend-kpi-grid small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.dividend-score-card strong {
  color: #86efac;
  font-size: 60px;
  line-height: 0.95;
}

.dividend-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dividend-kpi-grid article {
  display: grid;
  gap: 6px;
  min-height: 126px;
  padding: 14px;
}

.dividend-kpi-grid strong {
  overflow-wrap: anywhere;
  font-size: clamp(20px, 2.3vw, 30px);
}

.dividend-visual-grid,
.dividend-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dividend-panel {
  padding: 16px;
}

.dividend-panel h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.dividend-bar-chart {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
  min-height: 280px;
  border: 1px solid rgba(122, 167, 255, 0.16);
  border-radius: 14px;
  padding: 18px 14px 12px;
  background:
    linear-gradient(rgba(122, 167, 255, 0.08) 1px, transparent 1px),
    rgba(5, 10, 20, 0.46);
  background-size: 100% 25%;
}

.dividend-bar-item {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 7px;
  min-width: 0;
  height: 100%;
  text-align: center;
}

.dividend-bar-track {
  display: flex;
  align-items: end;
  justify-content: center;
  min-height: 160px;
}

.dividend-bar-track i {
  display: block;
  width: min(42px, 76%);
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, #86efac, #16a34a);
  box-shadow: 0 14px 32px rgba(34, 197, 94, 0.16);
}

.dividend-bar-item strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dividend-bar-item small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.dividend-yield-chart {
  overflow: hidden;
  border: 1px solid rgba(122, 167, 255, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(rgba(122, 167, 255, 0.08) 1px, transparent 1px),
    rgba(5, 10, 20, 0.46);
  background-size: 100% 25%;
}

.dividend-yield-chart svg {
  display: block;
  width: 100%;
  min-height: 240px;
}

.dividend-yield-chart path {
  fill: none;
  stroke: #7aa7ff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
}

.dividend-yield-chart circle {
  fill: #0b1220;
  stroke: #86efac;
  stroke-width: 4;
}

.dividend-yield-chart text {
  fill: #dbe6f6;
  font-size: 13px;
  font-weight: 850;
  text-anchor: middle;
}

.dividend-explain-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.dividend-explain-grid span {
  border: 1px solid rgba(122, 167, 255, 0.16);
  border-radius: 12px;
  padding: 11px;
  background: rgba(5, 10, 20, 0.42);
}

.dividend-explain-grid small {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-weight: 900;
}

.dividend-explain-grid strong {
  overflow-wrap: anywhere;
}

.signals-workspace {
  display: grid;
  gap: 16px;
}

.signals-overview,
.signals-panel,
.signal-gauge {
  border: 1px solid rgba(122, 167, 255, 0.22);
  border-radius: 14px;
  background: rgba(12, 21, 36, 0.74);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
}

.signals-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 18px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(21, 94, 239, 0.13), rgba(251, 191, 36, 0.08)),
    rgba(8, 13, 24, 0.78);
}

.signals-overview.buy {
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.14), rgba(21, 94, 239, 0.08)),
    rgba(8, 13, 24, 0.78);
}

.signals-overview.sell {
  background:
    linear-gradient(135deg, rgba(251, 113, 133, 0.14), rgba(21, 94, 239, 0.08)),
    rgba(8, 13, 24, 0.78);
}

.signals-overview h3 {
  margin: 0 0 8px;
  font-size: clamp(28px, 3.4vw, 48px);
}

.signals-overview p,
.signals-panel p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.signals-decision-card {
  display: grid;
  align-content: center;
  gap: 10px;
  border-radius: 14px;
  padding: 16px;
  background: rgba(5, 10, 20, 0.72);
}

.signals-decision-card span,
.signals-decision-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.signals-decision-card strong {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
}

.signal-score-rail {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  height: 18px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.signal-score-rail::before {
  content: "";
  position: absolute;
  right: 34px;
  left: 34px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ef4444, #fbbf24, #22c55e);
}

.signal-score-rail i {
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #0b1220;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.signal-gauge-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.signal-gauge {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.signal-gauge div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.signal-gauge span {
  color: var(--muted);
  font-weight: 900;
}

.signal-gauge strong {
  font-size: 24px;
}

.signal-gauge i {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.signal-gauge b {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.signal-gauge.buy b {
  background: #22c55e;
}

.signal-gauge.hold b {
  background: #fbbf24;
}

.signal-gauge.sell b {
  background: #ef4444;
}

.signal-indicator-panel {
  display: grid;
  gap: 14px;
}

.signal-indicator-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.signal-indicator-card {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 154px;
  border: 1px solid rgba(122, 167, 255, 0.18);
  border-radius: 12px;
  padding: 12px;
  background: rgba(5, 10, 20, 0.42);
}

.signal-indicator-card.buy {
  border-color: rgba(45, 212, 191, 0.32);
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.12), transparent 70%),
    rgba(5, 10, 20, 0.42);
}

.signal-indicator-card.sell {
  border-color: rgba(251, 113, 133, 0.34);
  background:
    linear-gradient(135deg, rgba(251, 113, 133, 0.12), transparent 70%),
    rgba(5, 10, 20, 0.42);
}

.signal-indicator-card.hold {
  border-color: rgba(251, 191, 36, 0.28);
}

.signal-indicator-card div {
  display: grid;
  gap: 4px;
}

.signal-indicator-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.signal-indicator-card strong {
  overflow: hidden;
  color: var(--text);
  font-size: 19px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal-indicator-card p {
  min-height: 43px;
  font-size: 13px;
  line-height: 1.42;
}

.signal-mini-rail {
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
}

.signal-mini-rail i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #fbbf24;
}

.signal-indicator-card.buy .signal-mini-rail i {
  background: #2dd4bf;
}

.signal-indicator-card.sell .signal-mini-rail i {
  background: #fb7185;
}

.signal-indicator-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.signals-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.signals-panel {
  padding: 16px;
}

.signals-panel h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.signals-count-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.signals-count-grid span {
  border: 1px solid rgba(122, 167, 255, 0.16);
  border-radius: 12px;
  padding: 11px;
  background: rgba(5, 10, 20, 0.42);
}

.signals-count-grid small {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-weight: 900;
}

.signals-count-grid strong {
  font-size: 28px;
}

.signal-sparkline {
  overflow: hidden;
  border: 1px solid rgba(122, 167, 255, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(rgba(122, 167, 255, 0.08) 1px, transparent 1px),
    rgba(5, 10, 20, 0.46);
  background-size: 100% 25%;
}

.signal-sparkline svg {
  display: block;
  width: 100%;
  min-height: 200px;
}

.signal-sparkline line {
  stroke: rgba(148, 163, 184, 0.45);
  stroke-dasharray: 8 8;
}

.signal-sparkline path {
  fill: none;
  stroke: #7aa7ff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
}

.signal-sparkline circle {
  fill: #0b1220;
  stroke: #86efac;
  stroke-width: 4;
}

.signals-table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
}

.signals-table th,
.signals-table td {
  border-bottom: 1px solid rgba(122, 167, 255, 0.14);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

.signals-table th {
  color: var(--text);
  font-size: 12px;
  text-transform: uppercase;
}

.signals-table td {
  color: var(--text-soft);
}

.signals-table tr.buy td:nth-child(2) {
  color: #86efac;
}

.signals-table tr.sell td:nth-child(2) {
  color: #fda4af;
}

.signals-table tr.hold td:nth-child(2) {
  color: #fde68a;
}

.signal-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 10px;
  border-radius: 50%;
  background: #fbbf24;
}

.signal-dot.buy {
  background: #22c55e;
}

.signal-dot.sell {
  background: #ef4444;
}

.signal-rule-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.signal-rule-list li {
  border-left: 4px solid rgba(122, 167, 255, 0.58);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text-soft);
  background: rgba(122, 167, 255, 0.08);
}

.signal-rule-list.muted li {
  border-left-color: rgba(148, 163, 184, 0.42);
  color: var(--muted);
}

.profile-workspace {
  display: grid;
  gap: 16px;
}

.profile-hero-card,
.profile-panel,
.profile-stat-grid article {
  border: 1px solid rgba(122, 167, 255, 0.22);
  border-radius: 14px;
  background: rgba(12, 21, 36, 0.74);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
}

.profile-hero-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.14), rgba(21, 94, 239, 0.12)),
    rgba(8, 13, 24, 0.78);
}





.profile-hero-card h3 {
  margin: 0 0 6px;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1;
}

.profile-hero-card p,
.profile-description p,
.profile-business-grid p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.profile-chip-row,
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.profile-chip-row span,
.profile-actions a {
  border: 1px solid rgba(122, 167, 255, 0.22);
  border-radius: 999px;
  padding: 7px 11px;
  color: #dbe6f6;
  background: rgba(5, 10, 20, 0.48);
  font-size: 13px;
  font-weight: 900;
}

.profile-actions {
  justify-content: flex-end;
}

.profile-actions a {
  color: #fff;
  background: rgba(21, 94, 239, 0.34);
}

.profile-stat-grid,
.profile-market-grid,
.profile-business-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.profile-stat-grid article,
.profile-market-grid article {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.profile-stat-grid span,
.profile-market-grid span,
.profile-info-list small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.profile-stat-grid strong,
.profile-market-grid strong {
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-stat-grid strong a,
.profile-info-list strong a {
  color: inherit;
  text-decoration: none;
}

.profile-stat-grid strong a:hover,
.profile-info-list strong a:hover {
  color: #9dbbff;
  text-decoration: underline;
}

.profile-stat-grid small,
.profile-market-grid small {
  color: var(--text-soft);
}

.profile-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 14px;
}

.profile-panel {
  padding: 16px;
}

.profile-panel h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.profile-description {
  display: grid;
  gap: 13px;
}

.profile-company-story {
  min-height: 430px;
  padding: clamp(18px, 2vw, 28px);
}

.profile-story-copy {
  display: grid;
  gap: 16px;
}

.profile-story-copy p {
  color: var(--text-soft);
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.72;
}

.profile-coverage-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 1.1fr);
  gap: 14px;
  border: 1px solid rgba(122, 167, 255, 0.16);
  border-radius: 12px;
  padding: 14px;
  background: rgba(5, 10, 20, 0.34);
}

.profile-coverage-grid strong {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
}

.profile-coverage-grid ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
  line-height: 1.45;
}

.profile-info-list,
.profile-officer-list,
.profile-checklist {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-info-list span,
.profile-officer-list span,
.profile-business-grid article,
.profile-checklist li {
  border: 1px solid rgba(122, 167, 255, 0.16);
  border-radius: 12px;
  padding: 12px;
  background: rgba(5, 10, 20, 0.42);
}

.profile-info-list strong,
.profile-officer-list strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  line-height: 1.4;
}

.profile-info-list em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.profile-officer-list small {
  color: var(--muted);
}

.profile-key-points {
  display: grid;
  gap: 6px;
  border-left: 4px solid rgba(20, 184, 166, 0.62);
  border-radius: 10px;
  padding: 12px;
  background: rgba(20, 184, 166, 0.08);
}

.profile-key-points strong {
  color: var(--text);
}

.profile-key-points p {
  margin: 0;
}

.profile-fact-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-fact-chips span {
  border: 1px solid rgba(122, 167, 255, 0.2);
  border-radius: 999px;
  padding: 6px 10px;
  color: #dbe6f6;
  background: rgba(122, 167, 255, 0.08);
  font-size: 12px;
  font-weight: 900;
}

.profile-business-grid article {
  min-height: 138px;
}

.profile-business-grid strong {
  display: block;
  margin-bottom: 8px;
  color: #c7d8ff;
}

.profile-checklist li {
  border-left: 4px solid rgba(20, 184, 166, 0.62);
  color: var(--text-soft);
}

.profile-report-grid {
  align-items: start;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
}

.profile-stat-grid,
.profile-market-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.profile-business-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.profile-info-list {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.profile-info-list span,
.profile-officer-list span,
.profile-business-grid article,
.profile-checklist li {
  min-height: 0;
}

.profile-business-grid article {
  min-height: 0;
}

.profile-description {
  align-content: start;
}

.profile-description p {
  max-width: 112ch;
}

.profile-actions {
  align-self: start;
}

.earnings-panel,
.earnings-quarter-card,
.earnings-kpi-grid article,
.dividend-panel,
.dividend-kpi-grid article,
.signals-panel,
.signal-gauge,
.profile-panel,
.profile-stat-grid article,
.analysis-verdict-card,
.analysis-panel,
.analysis-component,
.analysis-footnote,
.institutional-engine-card,
.institutional-panel,
.institutional-probability-grid article {
  box-shadow: none;
}

.earnings-workspace,
.dividend-workspace,
.signals-workspace,
.news-workspace,
.profile-workspace,
.institutional-workspace {
  gap: 14px;
}

.news-lead-card {
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  border: 1px solid var(--analysis-border);
  border-radius: 16px;
  padding: 14px;
  background: var(--analysis-panel-bg);
}

.analysis-news-copy {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.analysis-news-copy > strong {
  font-size: clamp(22px, 2.3vw, 34px);
  line-height: 1.18;
}

.analysis-news-media,
.analysis-news-thumb {
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--analysis-border);
  border-radius: 14px;
  background: var(--analysis-panel-soft-bg);
}

.analysis-news-media {
  min-height: 190px;
}

.analysis-news-thumb {
  width: 128px;
  aspect-ratio: 1.25;
}

.analysis-news-image,
.analysis-news-thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.analysis-news-image.contain,
.analysis-news-thumb-img.contain {
  object-fit: contain;
  padding: 18px;
  background: rgba(255, 255, 255, 0.96);
}

.news-lead-card .analysis-news-image-fallback,
.news-row-card .analysis-news-image-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 100%;
  place-items: center;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: #dbe6f6;
  background:
    linear-gradient(135deg, rgba(21, 94, 239, 0.35), rgba(20, 184, 166, 0.26)),
    var(--analysis-panel-soft-bg);
  font-size: 12px;
  text-align: center;
  text-transform: none;
}

.analysis-news-image-fallback strong {
  font-size: 34px;
  line-height: 1;
}

.analysis-news-image-fallback small {
  color: var(--text-soft);
  font-weight: 850;
}

.news-list-grid {
  gap: 10px;
  border-top: 0;
}

.news-row-card {
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--analysis-border);
  border-radius: 14px;
  padding: 12px;
  background: var(--analysis-panel-bg);
}

.news-row-card > small {
  justify-self: start;
  text-align: left;
}

.news-row-copy > span {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--blue);
  background: var(--analysis-accent-bg);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.news-row-card.up .news-row-copy > span {
  color: var(--analysis-good);
  background: rgba(34, 197, 94, 0.14);
}

.news-row-card.down .news-row-copy > span {
  color: var(--analysis-bad);
  background: rgba(244, 63, 94, 0.14);
}

.news-row-copy small {
  color: var(--muted);
  font-weight: 800;
}

.analysis-summary,
.analysis-verdict-card,
.analysis-panel,
.analysis-component,
.analysis-footnote {
  border: 1px solid rgba(122, 167, 255, 0.22);
  border-radius: 14px;
  background: rgba(12, 21, 36, 0.72);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
}

.analysis-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(21, 94, 239, 0.12), rgba(14, 147, 132, 0.08)),
    rgba(12, 21, 36, 0.78);
}

.analysis-summary h3 {
  margin: 0 0 6px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.04;
}

.analysis-summary small,
.analysis-footnote span,
.analysis-footnote small,
.analysis-muted {
  color: var(--muted);
}

.analysis-score {
  display: grid;
  min-width: 170px;
  min-height: 150px;
  place-items: center;
  border-radius: 16px;
  padding: 14px;
  background: rgba(8, 13, 24, 0.72);
  text-align: center;
}

.analysis-score span,
.analysis-score small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.analysis-score strong {
  font-size: 58px;
  line-height: 0.98;
}

.analysis-score.strong strong,
.analysis-component.strong .component-head strong {
  color: #4ade80;
}

.analysis-score.watch strong,
.analysis-component.watch .component-head strong {
  color: #7aa7ff;
}

.analysis-score.neutral strong,
.analysis-component.neutral .component-head strong {
  color: #fbbf24;
}

.analysis-score.weak strong,
.analysis-component.weak .component-head strong {
  color: #fb7185;
}

.analysis-verdict-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
  gap: 14px;
  padding: 16px;
}

.verdict-pill,
.confluence-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  color: #fff;
  background: rgba(122, 167, 255, 0.18);
  font-size: 13px;
  font-weight: 900;
}

.verdict-pill.strong,
.confluence-pill.active {
  background: rgba(34, 197, 94, 0.2);
  color: #8df7af;
}

.verdict-pill.watch {
  background: rgba(122, 167, 255, 0.2);
  color: #bdd2ff;
}

.verdict-pill.neutral {
  background: rgba(251, 191, 36, 0.18);
  color: #fde68a;
}

.verdict-pill.weak {
  background: rgba(251, 113, 133, 0.18);
  color: #fecdd3;
}

.analysis-verdict-card p {
  margin: 12px 0 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.confluence-pill {
  display: grid;
  align-content: center;
  border-radius: 14px;
  padding: 13px 14px;
  background: rgba(15, 23, 42, 0.7);
}

.confluence-pill small {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 750;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.analysis-component {
  padding: 14px;
}

.component-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.component-head span {
  color: var(--text-soft);
  font-weight: 900;
}

.component-head strong {
  font-size: 25px;
}

.score-meter {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
}

.score-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #fb7185, #fbbf24, #4ade80);
}

.analysis-component ul,
.missing-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.analysis-component li {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 3px 8px;
  border-radius: 10px;
  padding: 8px 9px;
  background: rgba(122, 167, 255, 0.07);
}

.analysis-component li span {
  grid-row: span 2;
  align-self: center;
  border-radius: 999px;
  padding: 4px 7px;
  color: #dbeafe;
  background: rgba(122, 167, 255, 0.16);
  font-size: 10px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.analysis-component li.pass span {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.18);
}

.analysis-component li.fail span {
  color: #fecdd3;
  background: rgba(251, 113, 133, 0.16);
}

.analysis-component li strong,
.analysis-component li small {
  min-width: 0;
}

.analysis-component li strong {
  font-size: 13px;
}

.analysis-component li small {
  color: var(--muted);
}

.analysis-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.analysis-panel {
  padding: 16px;
}

.analysis-panel h3 {
  margin: 0 0 12px;
  font-size: 20px;
}

.analysis-levels,
.forecast-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.forecast-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 12px;
  border-top: 1px solid var(--analysis-border);
  border-bottom: 1px solid var(--analysis-border);
}

.analysis-levels span,
.forecast-strip span,
.scenario-grid article {
  border: 1px solid rgba(122, 167, 255, 0.18);
  border-radius: 12px;
  padding: 11px;
  background: rgba(8, 13, 24, 0.42);
}

.forecast-strip span {
  border: 0;
  border-right: 1px solid var(--analysis-border);
  border-radius: 0;
  padding: 14px 16px;
  background: transparent;
}

.forecast-strip span:last-child {
  border-right: 0;
}

.analysis-levels small,
.forecast-strip small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-weight: 850;
}

.analysis-levels strong,
.forecast-strip strong {
  display: block;
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forecast-strip em {
  display: block;
  margin-top: 4px;
  color: var(--blue);
  font-style: normal;
  font-weight: 900;
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.scenario-grid p {
  margin: 8px 0 0;
  color: var(--text-soft);
  line-height: 1.45;
}

.analysis-news-list {
  display: grid;
  gap: 9px;
}

.analysis-news-list a {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(122, 167, 255, 0.18);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(8, 13, 24, 0.38);
}

.analysis-news-list a span {
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  color: #dbeafe;
  background: rgba(122, 167, 255, 0.16);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.analysis-news-list a.up span {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.18);
}

.analysis-news-list a.down span {
  color: #fecdd3;
  background: rgba(251, 113, 133, 0.16);
}

.analysis-news-list a small,
.analysis-empty {
  color: var(--muted);
}

.missing-list li {
  border-left: 3px solid rgba(122, 167, 255, 0.42);
  padding: 4px 0 4px 10px;
  color: var(--text-soft);
}

.analysis-footnote {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
}

.earnings-overview,
.dividend-overview,
.signals-overview,
.profile-hero-card,
.analysis-summary {
  border-color: var(--analysis-border);
  background:
    linear-gradient(135deg, rgba(21, 94, 239, 0.1), rgba(14, 147, 132, 0.07)),
    var(--analysis-panel-bg);
  box-shadow: var(--analysis-shadow);
}

.signals-overview.buy {
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(21, 94, 239, 0.07)),
    var(--analysis-panel-bg);
}

.signals-overview.sell {
  background:
    linear-gradient(135deg, rgba(251, 113, 133, 0.12), rgba(21, 94, 239, 0.07)),
    var(--analysis-panel-bg);
}

.earnings-panel,
.earnings-quarter-card,
.earnings-kpi-grid article,
.dividend-panel,
.dividend-kpi-grid article,
.signals-panel,
.signal-gauge,
.profile-panel,
.profile-stat-grid article,
.analysis-verdict-card,
.analysis-panel,
.analysis-component,
.analysis-footnote {
  border-color: var(--analysis-border);
  background: var(--analysis-panel-bg);
  box-shadow: var(--analysis-shadow);
}

.forecast-score-card,
.earnings-score-card,
.dividend-score-card,
.signals-decision-card,
.analysis-score,
.confluence-pill {
  background: var(--analysis-panel-strong-bg);
}

.analysis-levels span,
.forecast-strip span,
.scenario-grid article,
.earnings-next-grid span,
.earnings-reaction-card,
.dividend-explain-grid span,
.signals-count-grid span,
.profile-info-list span,
.profile-officer-list span,
.profile-business-grid article,
.profile-checklist li,
.analysis-news-list a {
  border-color: var(--analysis-border);
  background: var(--analysis-panel-soft-bg);
}

.earnings-bar-chart,
.earnings-reaction-spark,
.dividend-bar-chart,
.dividend-yield-chart,
.signal-sparkline {
  border-color: var(--analysis-border);
  background: var(--analysis-chart-bg);
}

.analysis-component li,
.signal-rule-list li,
.earnings-checks span,
.profile-chip-row span,
.profile-actions a {
  border-color: var(--analysis-border);
  background: var(--analysis-accent-bg);
  color: var(--analysis-chip-text);
}

.analysis-component li span,
.analysis-news-list a span {
  color: var(--analysis-chip-text);
  background: var(--analysis-accent-bg);
}

.analysis-component li.pass span,
.analysis-news-list a.up span {
  color: var(--analysis-good);
}

.analysis-component li.fail span,
.analysis-news-list a.down span {
  color: var(--analysis-bad);
}

.profile-business-grid strong {
  color: var(--blue);
}

.earnings-reaction-spark path,
.forecast-path,
.dividend-yield-chart path,
.signal-sparkline path {
  stroke: var(--blue);
}

.earnings-reaction-spark path {
  stroke: var(--text-soft);
}

.forecast-point text,
.dividend-yield-chart text {
  fill: var(--text);
}

.forecast-score-rail i,
.signal-score-rail i {
  border-color: var(--panel-strong);
  background: var(--analysis-panel-strong-bg);
}

.dividend-yield-chart circle,
.signal-sparkline circle {
  fill: var(--analysis-panel-strong-bg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

nav a[aria-current="page"] {
  color: #fff;
  background: rgba(122, 167, 255, 0.16);
}

.movers-main {
  display: grid;
  gap: 24px;
  width: min(1780px, calc(100% - 64px));
  padding: 28px 0 44px;
}

.movers-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  min-height: 300px;
  border: 1px solid rgba(176, 190, 211, 0.58);
  border-radius: 14px;
  padding: clamp(26px, 4vw, 56px);
  background:
    linear-gradient(120deg, rgba(20, 184, 166, 0.12), transparent 38%),
    linear-gradient(260deg, rgba(168, 85, 247, 0.18), transparent 45%),
    var(--hero-panel);
  box-shadow: var(--shadow);
}

.movers-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(122, 167, 255, 0.08) 0 1px, transparent 1px 78px),
    repeating-linear-gradient(0deg, rgba(20, 184, 166, 0.06) 0 1px, transparent 1px 64px);
  pointer-events: none;
}

.movers-hero > * {
  position: relative;
  z-index: 1;
}

.movers-hero h1 {
  max-width: 980px;
  margin: 8px 0 14px;
  color: var(--text);
  font-size: clamp(42px, 5.7vw, 88px);
  line-height: 0.98;
}

.movers-hero .lede {
  max-width: 840px;
  margin-bottom: 18px;
  color: var(--text-soft);
}

.movers-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.movers-meta span,
.movers-count {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--text-soft);
  background: var(--card-soft);
  font-size: 13px;
  font-weight: 850;
}

.movers-refresh {
  flex: 0 0 auto;
  min-width: 230px;
  min-height: 70px;
  border-radius: 12px;
  font-size: 20px;
}

.movers-refresh span,
.movers-refresh small {
  display: block;
}

.movers-refresh.loading {
  opacity: 0.72;
}

.movers-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.movers-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.movers-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 26px 14px;
}

.movers-panel h2 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: clamp(28px, 3vw, 44px);
}

.mover-list {
  display: grid;
}

.mover-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(132px, auto) auto auto;
  align-items: center;
  gap: 14px;
  min-height: 96px;
  border-top: 1px solid var(--line);
  padding: 18px 18px 18px 26px;
  color: var(--text);
  transition: background 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.mover-row:hover,
.mover-row:focus-visible {
  background: rgba(122, 167, 255, 0.08);
  border-color: rgba(122, 167, 255, 0.28);
  transform: translateX(2px);
  outline: 0;
}





.mover-company {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.mover-company strong {
  overflow: visible;
  font-size: 18px;
  font-weight: 950;
  text-overflow: clip;
  white-space: nowrap;
}

.mover-company span,
.mover-session {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mover-company em,
.mover-company small,
.mover-session small {
  color: var(--muted);
  font-style: normal;
  font-weight: 850;
}

.mover-company em {
  border-radius: 7px;
  padding: 4px 7px;
  color: var(--text-soft);
  background: var(--soft-surface);
  font-size: 12px;
}

.mover-session {
  justify-content: flex-end;
  flex-direction: column;
  align-items: flex-end;
}

.mover-session strong {
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.mover-change {
  min-width: 92px;
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
  font-size: 17px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.mover-change.positive {
  color: #d1fadf;
  background: rgba(18, 183, 106, 0.9);
}

.mover-change.negative {
  color: #fff1f3;
  background: rgba(240, 68, 56, 0.92);
}

.mover-strength {
  position: absolute;
  right: 18px;
  bottom: 8px;
  left: 26px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(176, 190, 211, 0.16);
}

.mover-strength span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #14b8a6, #4ade80);
}

.mover-row.is-loser .mover-strength span {
  background: linear-gradient(90deg, #fb7185, #f97316);
}

.mover-action {
  min-width: 78px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
  color: var(--blue);
  background: var(--blue-soft);
  text-align: center;
  font-size: 13px;
  font-weight: 950;
}

.mover-loading,
.mover-empty {
  border-top: 1px solid var(--line);
  padding: 28px;
  color: var(--muted);
  font-weight: 850;
}

.movers-disclaimer {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  color: var(--text-soft);
  background: var(--card-soft);
}

.movers-disclaimer strong {
  color: var(--text);
}

.market-news {
  display: grid;
  gap: 16px;
  margin: 10px 0 30px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(18px, 3vw, 28px);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.news-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.news-head h2 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1;
}

.news-head h2 span {
  color: var(--blue);
}

.news-see-all {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--blue);
  background: var(--blue-soft);
  font-weight: 900;
  white-space: nowrap;
}

.news-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.news-layout {
  display: grid;
  gap: 22px;
}

.news-top {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.8fr);
  gap: 22px;
}

.news-feature,
.news-compact,
.news-small {
  color: var(--text);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.news-feature:hover,
.news-feature:focus-visible,
.news-compact:hover,
.news-compact:focus-visible,
.news-small:hover,
.news-small:focus-visible {
  border-color: rgba(122, 167, 255, 0.48);
  background: rgba(122, 167, 255, 0.08);
  transform: translateY(-2px);
  outline: 0;
}

.news-feature {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1fr);
  gap: 18px;
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: var(--card-soft);
}

.news-feature-media,
.news-thumb {
  overflow: hidden;
  display: block;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(21, 94, 239, 0.3), rgba(14, 147, 132, 0.22));
}

.news-feature-media img,
.news-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-feature-media {
  min-height: 268px;
}

.news-feature-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
}

.news-feature-copy small,
.news-compact small,
.news-small small,
.news-compact em,
.news-small em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.news-feature-copy strong {
  display: block;
  color: var(--text);
  font-size: clamp(24px, 2.5vw, 36px);
  line-height: 1.08;
}

.news-feature-copy em {
  color: var(--text-soft);
  font-size: 17px;
  font-style: normal;
  line-height: 1.36;
}

.news-feature-copy span {
  margin-top: auto;
  color: #7aa7ff;
  font-weight: 950;
}

.news-side-list {
  display: grid;
  gap: 14px;
}

.news-compact,
.news-small {
  display: grid;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-soft);
}

.news-compact {
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 14px;
  min-height: 138px;
  padding: 12px;
}

.news-thumb {
  min-height: 112px;
}

.news-compact > span:last-child,
.news-small > span:last-child {
  display: grid;
  align-content: center;
  gap: 7px;
  min-width: 0;
}

.news-compact strong,
.news-small strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  line-height: 1.18;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.news-lower {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.news-small {
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
}

.news-image-fallback {
  display: grid;
  min-height: 100%;
  place-items: center;
  align-content: center;
  gap: 4px;
  color: var(--text-soft);
  text-align: center;
}

.news-image-fallback strong {
  font-size: 22px;
}

.news-image-fallback small {
  color: var(--muted);
  font-weight: 900;
}

.news-empty {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 24px;
  color: var(--muted);
  background: var(--card-soft);
  font-weight: 850;
}

.brand-finale {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 0 0 34px;
}

.brand-finale-visual,
.brand-finale-copy {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(176, 190, 211, 0.44);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(5, 10, 19, 0.98), rgba(13, 22, 38, 0.94)),
    repeating-linear-gradient(90deg, rgba(122, 167, 255, 0.08) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(20, 184, 166, 0.06) 0 1px, transparent 1px 58px);
  box-shadow: var(--shadow);
}

.brand-finale-visual {
  min-height: clamp(280px, 28vw, 430px);
  isolation: isolate;
}

.brand-finale-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(5, 10, 19, 0.9), transparent 22%, rgba(5, 10, 19, 0.58) 78%, rgba(5, 10, 19, 0.9)),
    linear-gradient(180deg, transparent, rgba(5, 10, 19, 0.5));
  pointer-events: none;
}

.brand-finale-visual::after {
  content: "ACCENDION";
  position: absolute;
  z-index: 2;
  top: 30%;
  left: 7%;
  color: rgba(248, 251, 255, 0.13);
  font-size: clamp(78px, 12vw, 190px);
  font-weight: 950;
  line-height: 0.8;
  white-space: nowrap;
  animation: finale-ghost 7s ease-in-out infinite alternate;
}

.brand-led {
  position: absolute;
  z-index: 3;
  left: -8%;
  width: 116%;
  overflow: hidden;
  border-block: 1px solid rgba(255, 255, 255, 0.13);
  background:
    linear-gradient(90deg, rgba(21, 94, 239, 0.5), rgba(124, 58, 237, 0.38), rgba(14, 147, 132, 0.5)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 7px);
  box-shadow: 0 0 34px rgba(20, 184, 166, 0.18);
}

.brand-led-main {
  top: 28%;
  height: clamp(56px, 6vw, 86px);
  transform: rotate(-1deg);
}

.brand-led-sub {
  bottom: 20%;
  height: clamp(42px, 4.4vw, 62px);
  transform: rotate(1deg);
}

.brand-track {
  display: flex;
  width: max-content;
  min-width: 220%;
  height: 100%;
  align-items: center;
  gap: clamp(22px, 3.2vw, 58px);
  color: #f8fbff;
  animation: finale-marquee 22s linear infinite;
}

.brand-track.reverse {
  animation-direction: reverse;
  animation-duration: 18s;
}

.brand-track span {
  flex: 0 0 auto;
  font-size: clamp(20px, 4vw, 58px);
  font-weight: 950;
  text-shadow: 0 0 18px rgba(248, 251, 255, 0.3);
  white-space: nowrap;
}

.brand-led-sub .brand-track span {
  font-size: clamp(16px, 2.6vw, 34px);
}

.brand-terminal {
  position: absolute;
  z-index: 4;
  top: 18%;
  right: 5%;
  width: min(460px, 48%);
  height: 56%;
  overflow: hidden;
  border: 1px solid rgba(122, 167, 255, 0.42);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(8, 13, 24, 0.92), rgba(8, 13, 24, 0.76)),
    repeating-linear-gradient(90deg, rgba(122, 167, 255, 0.08) 0 1px, transparent 1px 46px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42), 0 0 36px rgba(122, 167, 255, 0.18);
}

.terminal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  color: #dbe6f6;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.terminal-head em {
  border-radius: 999px;
  padding: 5px 9px;
  color: #03210f;
  background: #4ade80;
  font-style: normal;
}

.terminal-bars {
  position: absolute;
  right: 18px;
  bottom: 22px;
  left: 18px;
  height: calc(100% - 72px);
  border-bottom: 1px solid rgba(176, 190, 211, 0.26);
}

.terminal-bars::before {
  content: "";
  position: absolute;
  inset: 20% 0 0;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.08), rgba(20, 184, 166, 0.26), rgba(249, 115, 22, 0.14), rgba(20, 184, 166, 0.22));
  clip-path: polygon(0 82%, 12% 68%, 20% 74%, 32% 48%, 45% 58%, 58% 32%, 70% 44%, 86% 24%, 100% 34%, 100% 100%, 0 100%);
}

.terminal-bars i {
  position: relative;
  display: inline-block;
  width: 8%;
  height: var(--h);
  margin-right: 1.2%;
  vertical-align: bottom;
  border-radius: 999px;
  background: #14b8a6;
  box-shadow: 0 0 16px rgba(20, 184, 166, 0.38);
  animation: finale-candle 1.9s ease-in-out infinite;
  animation-delay: var(--d);
}

.terminal-bars i:nth-child(3n),
.terminal-bars i:nth-child(5n) {
  background: #f97316;
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.34);
}

.terminal-bars i::before {
  content: "";
  position: absolute;
  top: -14px;
  bottom: -12px;
  left: 50%;
  width: 2px;
  border-radius: 999px;
  background: inherit;
  transform: translateX(-50%);
  opacity: 0.82;
}

.brand-finale-copy {
  display: grid;
  min-height: auto;
  gap: 18px;
  padding: clamp(24px, 3vw, 38px);
}

.brand-finale-copy h2 {
  margin: 0;
  color: #f8fbff;
  font-size: clamp(44px, 6vw, 88px);
  line-height: 0.95;
}

.brand-finale-lede {
  max-width: 1080px;
  margin: 0;
  color: #dbe6f6;
  font-size: 18px;
  font-weight: 750;
  line-height: 1.45;
}

.brand-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 6px;
}

.brand-info-grid article {
  min-height: 170px;
  border: 1px solid rgba(176, 190, 211, 0.28);
  border-radius: 12px;
  padding: 18px;
  background: rgba(10, 17, 29, 0.62);
}

.brand-info-grid strong {
  display: block;
  color: #f8fbff;
  font-size: 18px;
  font-weight: 950;
}

.brand-info-grid p {
  margin: 10px 0 0;
  color: #dbe6f6;
  font-size: 15px;
  font-weight: 720;
  line-height: 1.45;
}

:root[data-theme="light"] .brand-finale-copy {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(238, 247, 255, 0.9)),
    repeating-linear-gradient(90deg, rgba(23, 92, 211, 0.06) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(14, 147, 132, 0.04) 0 1px, transparent 1px 58px);
}

:root[data-theme="light"] .brand-finale-copy h2,
:root[data-theme="light"] .brand-info-grid strong {
  color: #101828;
}

:root[data-theme="light"] .brand-finale-lede,
:root[data-theme="light"] .brand-info-grid p {
  color: #344054;
}

:root[data-theme="light"] .brand-info-grid article {
  border-color: rgba(91, 124, 166, 0.26);
  background: rgba(255, 255, 255, 0.72);
}

@keyframes finale-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes finale-ghost {
  from {
    transform: translateX(-2%);
  }
  to {
    transform: translateX(5%);
  }
}

@keyframes finale-candle {
  0%, 100% {
    opacity: 0.76;
    transform: scaleY(0.9);
  }
  50% {
    opacity: 1;
    transform: scaleY(1.05);
  }
}

.accendion-wall {
  display: grid;
  gap: 16px;
  margin: 10px 0 30px;
}

.accendion-wall-stage {
  position: relative;
  overflow: hidden;
  min-height: clamp(320px, 38vw, 540px);
  border: 1px solid rgba(176, 190, 211, 0.48);
  border-radius: 16px;
  background: #02040a;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

.accendion-wall-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 4, 10, 0.72), transparent 26%, rgba(2, 4, 10, 0.3) 78%, rgba(2, 4, 10, 0.82)),
    linear-gradient(180deg, rgba(2, 4, 10, 0.1), rgba(2, 4, 10, 0.78));
  pointer-events: none;
}

.wall-building {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    linear-gradient(100deg, rgba(21, 94, 239, 0.22), transparent 18%),
    linear-gradient(280deg, rgba(217, 70, 239, 0.18), transparent 28%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0 2px, transparent 2px 86px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 58px),
    linear-gradient(135deg, #060b14, #151826 48%, #070910);
}

.wall-building::before {
  content: "ACCENDION";
  position: absolute;
  top: 26%;
  left: 4%;
  z-index: 2;
  width: 38%;
  color: rgba(248, 251, 255, 0.9);
  font-size: clamp(54px, 9vw, 154px);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.9;
  opacity: 0.72;
  transform: skewY(-4deg) translateX(-18%);
  animation: wall-title-drift 7s ease-in-out infinite alternate;
  text-shadow: 0 0 28px rgba(122, 167, 255, 0.26);
}

.wall-building::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0 34%, rgba(255, 255, 255, 0.1) 35%, transparent 37%),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.42));
  animation: wall-light-sweep 6s linear infinite;
  pointer-events: none;
}

.wall-led {
  position: absolute;
  z-index: 3;
  left: -4%;
  width: 108%;
  overflow: hidden;
  border-block: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(32, 19, 69, 0.92), rgba(6, 78, 59, 0.86)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 6px);
  box-shadow: 0 0 35px rgba(124, 58, 237, 0.28);
}

.wall-led-top {
  top: 20%;
  height: clamp(56px, 6vw, 88px);
  transform: rotate(-1.2deg);
}

.wall-led-bottom {
  right: -8%;
  bottom: 17%;
  height: clamp(46px, 5vw, 70px);
  transform: rotate(1.1deg);
}

.wall-marquee {
  display: flex;
  width: max-content;
  min-width: 200%;
  height: 100%;
  align-items: center;
  gap: clamp(26px, 4vw, 72px);
  color: #f8fbff;
  animation: wall-marquee 19s linear infinite;
}

.wall-marquee.reverse {
  animation-direction: reverse;
  animation-duration: 16s;
}

.wall-marquee span {
  flex: 0 0 auto;
  font-size: clamp(24px, 4.6vw, 74px);
  font-weight: 950;
  white-space: nowrap;
  text-shadow: 0 0 20px rgba(20, 184, 166, 0.42);
}

.wall-led-bottom .wall-marquee span {
  font-size: clamp(18px, 2.7vw, 42px);
}

.wall-screen {
  position: absolute;
  top: 24%;
  right: 5%;
  z-index: 4;
  width: min(740px, 53%);
  height: 44%;
  overflow: hidden;
  border: 1px solid rgba(168, 85, 247, 0.72);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(8, 13, 24, 0.9), rgba(8, 13, 24, 0.74)),
    repeating-linear-gradient(90deg, rgba(20, 184, 166, 0.08) 0 1px, transparent 1px 52px),
    repeating-linear-gradient(0deg, rgba(122, 167, 255, 0.08) 0 1px, transparent 1px 44px);
  box-shadow:
    0 0 0 1px rgba(20, 184, 166, 0.2),
    0 0 48px rgba(168, 85, 247, 0.38);
  transform: perspective(900px) rotateY(-7deg) skewY(-1deg);
}

.screen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  color: #dbe6f6;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.screen-head span {
  border-radius: 999px;
  padding: 5px 10px;
  color: #00140f;
  background: #4ade80;
}

.screen-chart {
  position: absolute;
  right: 22px;
  bottom: 24px;
  left: 22px;
  height: calc(100% - 78px);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.screen-chart::before {
  content: "";
  position: absolute;
  inset: 15% 0 0;
  background:
    linear-gradient(135deg, transparent 8%, rgba(20, 184, 166, 0.16) 9% 16%, transparent 17% 24%, rgba(20, 184, 166, 0.24) 25% 36%, transparent 37% 44%, rgba(249, 115, 22, 0.22) 45% 52%, transparent 53% 62%, rgba(20, 184, 166, 0.22) 63% 72%, transparent 73%);
  clip-path: polygon(0 82%, 8% 68%, 15% 72%, 23% 55%, 31% 59%, 40% 34%, 50% 41%, 58% 24%, 67% 46%, 75% 38%, 86% 20%, 100% 30%, 100% 100%, 0 100%);
  opacity: 0.7;
  animation: screen-chart-glow 2.8s ease-in-out infinite alternate;
}

.screen-chart i {
  position: absolute;
  bottom: 10%;
  left: var(--x);
  width: 9px;
  height: var(--h);
  border-radius: 999px;
  background: #14b8a6;
  box-shadow: 0 0 16px rgba(20, 184, 166, 0.52);
  animation: candle-pulse 1.8s ease-in-out infinite;
  animation-delay: var(--d);
}

.screen-chart i:nth-child(3n),
.screen-chart i:nth-child(5n) {
  background: #f97316;
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.54);
}

.screen-chart i::before {
  content: "";
  position: absolute;
  top: -16px;
  bottom: -13px;
  left: 50%;
  width: 2px;
  border-radius: 999px;
  background: inherit;
  transform: translateX(-50%);
  opacity: 0.82;
}

.wall-caption {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid rgba(176, 190, 211, 0.38);
  border-radius: 14px;
  padding: 18px 22px;
  background: rgba(8, 13, 24, 0.76);
}

.wall-caption h2 {
  margin: 4px 0 0;
  color: #f8fbff;
  font-size: clamp(34px, 5vw, 76px);
  line-height: 0.95;
}

.wall-caption p {
  max-width: 680px;
  margin: 0;
  color: var(--text-soft);
  font-weight: 750;
}

@keyframes wall-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes wall-title-drift {
  from {
    transform: skewY(-4deg) translateX(-18%);
  }
  to {
    transform: skewY(-4deg) translateX(-6%);
  }
}

@keyframes wall-light-sweep {
  from {
    transform: translateX(-28%);
  }
  to {
    transform: translateX(28%);
  }
}

@keyframes candle-pulse {
  0%, 100% {
    opacity: 0.74;
    transform: scaleY(0.9);
  }
  50% {
    opacity: 1;
    transform: scaleY(1.06);
  }
}

@keyframes screen-chart-glow {
  from {
    opacity: 0.46;
    transform: translateY(8px);
  }
  to {
    opacity: 0.82;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wall-marquee,
  .wall-building::before,
  .wall-building::after,
  .screen-chart::before,
  .screen-chart i,
  .pro-market-scene,
  .pro-market-scene *,
  :root[data-theme="advanced"] body,
  :root[data-theme="advanced"] body::before,
  :root[data-theme="advanced"] body::after {
    animation: none;
  }
}

footer {
  border-top: 1px solid var(--line);
  padding: 18px 16px 30px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1120px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    width: 100%;
    flex-wrap: wrap;
  }

  nav a,
  .nav-analyst,
  .theme-switch {
    flex: 1 1 auto;
    text-align: center;
  }

  .tool-grid,
  .metrics-band {
    grid-template-columns: 1fr 1fr;
  }

  .ticker-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .search-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .watch-grid {
    overflow-x: auto;
  }

  .watch-table {
    min-width: 980px;
  }

  .movers-main {
    width: min(100% - 32px, 1060px);
  }

  .movers-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .movers-grid {
    grid-template-columns: 1fr;
  }

  .news-top,
  .news-feature,
  .news-lower {
    grid-template-columns: 1fr;
  }

  .analysis-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analysis-hero,
  .analysis-chart-grid,
  .analysis-ratings,
  .news-row-card,
  .earnings-overview,
  .earnings-visual-grid,
  .earnings-two-col,
  .dividend-overview,
  .dividend-visual-grid,
  .dividend-two-col,
  .signals-overview,
  .signals-two-col,
  .forecast-workspace {
    grid-template-columns: 1fr;
  }

  .dividend-kpi-grid,
  .earnings-kpi-grid,
  .earnings-quarter-grid,
  .earnings-reaction-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .forecast-factors {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .institutional-command-card,
  .institutional-engine-grid,
  .institutional-two-col {
    grid-template-columns: 1fr;
  }

  .institutional-probability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .signal-indicator-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .signal-gauge-grid {
    grid-template-columns: 1fr;
  }

  .analysis-verdict-card,
  .analysis-two-col {
    grid-template-columns: 1fr;
  }

  .brand-finale {
    grid-template-columns: 1fr;
  }

  .brand-finale-copy {
    min-height: auto;
  }

  .brand-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-row-card > small {
    justify-self: start;
    text-align: left;
  }

  .wall-caption {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 840px) {
  main {
    width: min(100% - 20px, 720px);
  }

  .topbar {
    position: relative;
    gap: 12px;
    padding: 12px 14px;
  }

  .brand {
    width: 100%;
  }

  .brand-wordmark {
    width: 144px;
    height: 38px;
  }

  .brand strong {
    font-size: 16px;
  }

  .brand small {
    font-size: 12px;
  }

  nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    font-size: 12px;
  }

  nav a,
  .nav-analyst,
  .theme-switch {
    min-height: 34px;
    padding: 8px 9px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero,
  .tool-grid,
  .metrics-band {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: auto;
    border-radius: 10px;
  }

  h1 {
    font-size: clamp(34px, 8vw, 54px);
  }

  .lede {
    font-size: 16px;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-analyst,
  .analysis-teaser-button {
    width: min(100%, 360px);
  }

  .market-card {
    min-height: auto;
  }

  .chart-wrap,
  canvas {
    min-height: 280px;
  }

  .ticker-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-clock {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }

  .market-clock > div {
    justify-content: center;
  }

  .market-tape-track {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pro-market-wall {
    left: -26%;
    width: 96%;
    height: 48%;
    opacity: 0.42;
  }

  .pro-candle-field {
    top: 18%;
    right: -10%;
    width: 72vw;
    opacity: 0.42;
  }

  .pro-line {
    opacity: 0.38;
  }

  .pro-market-floor {
    height: 34%;
    opacity: 0.28;
  }

  .movers-main {
    width: min(100% - 20px, 720px);
  }

  .movers-hero {
    min-height: auto;
    padding: 28px 18px;
  }

  .movers-hero h1 {
    font-size: clamp(34px, 8vw, 54px);
  }

  .movers-refresh {
    width: 100%;
  }

  .mover-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "company change"
      "session action";
    min-height: 112px;
    padding: 16px 14px 18px;
  }



  .mover-company {
    grid-area: company;
  }

  .mover-session {
    grid-area: session;
    align-items: flex-start;
    justify-content: flex-start;
  }

  .mover-change {
    grid-area: change;
  }

  .mover-action {
    grid-area: action;
    justify-self: end;
  }

  .mover-strength {
    left: 66px;
  }

  .news-head {
    align-items: stretch;
    flex-direction: column;
  }

  .news-feature {
    min-height: auto;
  }

  .news-feature-media {
    min-height: 230px;
  }

  .brand-finale-visual {
    min-height: 360px;
  }

  .brand-terminal {
    top: 22%;
    right: 6%;
    width: min(520px, 64%);
  }

  .accendion-wall-stage {
    min-height: 380px;
  }

  .wall-building::before {
    top: 18%;
    width: 80%;
  }

  .wall-screen {
    top: 36%;
    right: 6%;
    width: 88%;
    height: 38%;
    transform: none;
  }

  .wall-led-top {
    top: 18%;
  }

  .wall-led-bottom {
    bottom: 8%;
  }
}

@media (max-width: 640px) {
  .quote-head,
  .section-title {
    align-items: stretch;
    flex-direction: column;
  }

  .search-row,
  .chat-input,
  .watchlist-form,
  .quote-actions {
    flex-direction: column;
  }

  .watchlist-form {
    display: flex;
  }

  button {
    width: 100%;
  }

  nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  nav a:nth-child(3),
  nav a:nth-child(4),
  nav a:nth-child(5),
  nav a:nth-child(6) {
    display: none;
  }

  .ticker-strip,
  .search-results {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(31px, 9vw, 42px);
  }

  .hero-copy {
    padding: 28px 18px;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-analyst,
  .analysis-teaser-button {
    min-width: 0;
    min-height: 62px;
    font-size: 19px;
  }

  .market-orbit {
    right: -20%;
    width: 72vw;
  }

  .market-tape-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tape-item {
    padding: 9px 10px;
  }

  .tape-item span,
  .tape-item small {
    font-size: 11px;
  }

  .tape-value-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .market-clock {
    padding: 10px 12px;
    font-size: 13px;
  }

  .market-card,
  .watchlist {
    padding: 16px;
  }

  .movers-panel-head,
  .movers-disclaimer {
    align-items: stretch;
    flex-direction: column;
  }

  .mover-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "company company"
      "session session"
      "change action";
    gap: 10px;
  }



  .mover-company strong {
    white-space: normal;
  }

  .mover-session {
    flex-direction: row;
    justify-content: space-between;
    border-radius: 10px;
    padding: 10px;
    background: rgba(122, 167, 255, 0.07);
  }

  .mover-change,
  .mover-action {
    width: 100%;
    min-width: 0;
  }

  .mover-strength {
    left: 14px;
  }

  .market-news {
    padding: 16px;
  }

  .news-compact,
  .news-small {
    grid-template-columns: 98px minmax(0, 1fr);
  }

  .news-thumb {
    min-height: 92px;
  }

  .news-feature-media {
    min-height: 190px;
  }

  .news-feature-copy strong {
    font-size: 22px;
  }

  .news-feature-copy em {
    font-size: 15px;
  }

  .brand-finale {
    gap: 14px;
  }

  .brand-finale-visual {
    min-height: 320px;
  }

  .brand-finale-visual::after {
    top: 36%;
    left: 4%;
    font-size: clamp(70px, 20vw, 118px);
  }

  .brand-led {
    left: -22%;
    width: 144%;
  }

  .brand-led-main {
    top: 23%;
  }

  .brand-led-sub {
    bottom: 12%;
  }

  .brand-terminal {
    top: 40%;
    right: 14px;
    left: 14px;
    width: auto;
    height: 36%;
  }

  .terminal-head {
    padding: 10px 12px;
    font-size: 11px;
  }

  .terminal-bars {
    right: 12px;
    bottom: 14px;
    left: 12px;
    height: calc(100% - 58px);
  }

  .terminal-bars i {
    width: 7.2%;
  }

  .brand-finale-copy {
    padding: 20px;
  }

  .brand-finale-copy h2 {
    font-size: clamp(38px, 14vw, 62px);
  }

  .brand-finale-lede {
    font-size: 16px;
  }

  .brand-info-grid {
    grid-template-columns: 1fr;
  }

  .brand-info-grid article {
    min-height: auto;
  }

  .accendion-wall {
    margin-bottom: 22px;
  }

  .accendion-wall-stage {
    min-height: 340px;
    border-radius: 12px;
  }

  .wall-led {
    left: -22%;
    width: 144%;
  }

  .wall-screen {
    right: 14px;
    left: 14px;
    width: auto;
    height: 36%;
  }

  .screen-head {
    padding: 10px 12px;
    font-size: 11px;
  }

  .screen-chart {
    right: 12px;
    bottom: 14px;
    left: 12px;
    height: calc(100% - 58px);
  }

  .screen-chart i {
    width: 6px;
  }

  .wall-caption {
    padding: 16px;
  }

  .quote-title {
    align-items: flex-start;
  }

  #stock-price {
    font-size: clamp(42px, 15vw, 64px);
  }

  .price-line {
    gap: 8px;
    margin: 18px 0 12px;
  }

  #stock-change {
    width: 100%;
    font-size: 15px;
  }

  .chart-wrap,
  canvas {
    min-height: 250px;
  }

  .chart-zoom-controls {
    right: 58px;
  }

  .chart-zoom-controls button {
    width: 32px;
    min-height: 32px;
  }

  .chart-mode-toggle {
    width: 38px;
    min-height: 38px;
  }

  .chart-fullscreen-toggle,
  .chart-snapshot-toggle {
    width: 38px;
    min-height: 38px;
  }

  .metrics-band article,
  .tool-card {
    min-height: auto;
    padding: 14px;
  }

  .watch-grid {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .watch-table,
  .watch-table thead,
  .watch-table tbody,
  .watch-table tr,
  .watch-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .watch-table thead {
    display: none;
  }

  .watch-table tr {
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    background: var(--card-soft);
  }

  .watch-table td {
    border: 0;
    padding: 7px 0;
  }

  .watch-rank {
    display: none !important;
  }

  .watch-stock-cell {
    width: 100%;
  }

  .watch-price-cell,
  .watch-change-cell,
  .watch-ai-cell,
  .watch-menu-cell {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .watch-price-cell::before {
    content: "Price";
  }

  .watch-change-cell::before {
    content: "Change";
  }

  .watch-ai-cell::before {
    content: "AI";
  }

  .watch-price-cell::before,
  .watch-change-cell::before,
  .watch-ai-cell::before {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .watch-ai-button,
  .menu-dots {
    width: 100%;
  }

  .chat-overlay {
    padding: 10px;
  }

.subscription-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 6000 !important;
  display: none !important;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 6, 23, 0.68);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.markets-movers-hero {
  margin-top: 34px;
  scroll-margin-top: 110px;
}

.subscription-overlay.open {
  display: flex !important;
}

.subscription-modal {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid rgba(250, 204, 21, 0.28);
  border-radius: 20px;
  background:
    radial-gradient(circle at 20% 0%, rgba(250, 204, 21, 0.16), transparent 28%),
    radial-gradient(circle at 86% 12%, rgba(34, 197, 94, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(8, 13, 25, 0.98));
  box-shadow: 0 28px 90px rgba(249, 115, 22, 0.22), 0 0 60px rgba(34, 197, 94, 0.12);
}

.subscription-modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 26px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(8, 13, 25, 0.86);
  backdrop-filter: blur(14px);
}

.subscription-modal-head h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
}

.subscription-modal-head p {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--text-soft);
}

.subscription-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 24px 26px 28px;
}

.subscription-plan {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 330px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  padding: 20px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.subscription-plan::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 0%, rgba(249, 115, 22, 0.16), transparent 34%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.subscription-plan:hover::before {
  opacity: 1;
}

.subscription-plan.featured {
  border-color: rgba(250, 204, 21, 0.52);
  background:
    radial-gradient(circle at 22% 0%, rgba(250, 204, 21, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(20, 34, 54, 0.92), rgba(12, 22, 38, 0.92));
  box-shadow: 0 18px 46px rgba(249, 115, 22, 0.18), inset 0 1px 0 rgba(250, 204, 21, 0.18);
}

.subscription-plan > * {
  position: relative;
  z-index: 1;
}

.plan-badge {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 10px;
  color: #102012;
  font-size: 12px;
  font-weight: 950;
  background: linear-gradient(135deg, #f97316, #facc15, #22c55e);
}

.subscription-plan h3 {
  margin: 16px 0 6px;
  font-size: 22px;
}

.subscription-plan p {
  margin: 0;
  color: var(--text-soft);
}

.subscription-plan strong {
  margin: 18px 0 14px;
  color: #ffffff;
  font-size: 30px;
}

.subscription-plan strong span {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 700;
}

.subscription-plan ul {
  display: grid;
  gap: 10px;
  margin: 0 0 20px;
  padding: 0;
  color: var(--text-soft);
  list-style: none;
}

.subscription-plan li {
  display: flex;
  gap: 8px;
}

.subscription-plan li::before {
  content: "✓";
  color: #22c55e;
  font-weight: 950;
}

.subscription-plan button {
  margin-top: auto;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  color: #ffffff;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.08);
}

.subscription-plan.featured button {
  color: #102012;
  background: linear-gradient(135deg, #f97316, #facc15, #22c55e);
}

@media (max-width: 900px) {
  .subscription-modal {
    max-height: calc(100vh - 32px);
  }

  .subscription-plans {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .subscription-plan {
    min-height: 0;
  }
}

.analysis-overlay {
    padding: 0;
  }

  .chat-modal {
    height: 100vh;
    max-height: 100vh;
    border-radius: 10px;
  }

  .analysis-modal {
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .analysis-modal-head {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .analysis-head-title {
    min-width: 0;
    flex: 1 1 calc(100% - 70px);
  }

  .analysis-header-search {
    order: 3;
    flex: 1 1 100%;
    margin-left: 0;
  }

  .analysis-body {
    padding: 14px;
  }

  .analysis-search-form {
    grid-template-columns: 1fr;
  }

  .analysis-header-search {
    grid-template-columns: 1fr;
  }

  .analysis-feature-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .analysis-feature-bar {
    grid-template-columns: repeat(5, minmax(118px, 1fr));
    overflow-x: auto;
  }

  .analysis-buy-sell-card,
  .analysis-trade-plan-card,
  .analysis-fundamentals-card,
  .analysis-shareholders-card {
    padding: 18px;
  }

  .trade-plan-grid {
    grid-template-columns: 1fr;
  }

  .trade-plan-context span {
    display: block;
    margin-left: 0;
    margin-top: 4px;
  }

  .fundamentals-grid {
    grid-template-columns: 1fr;
  }

  .fundamentals-grid article:nth-child(3n + 1) {
    background: var(--analysis-panel-muted-bg);
  }

  .signal-mix-bars article,
  .shareholder-bars article {
    grid-template-columns: 110px minmax(90px, 1fr) 72px;
    gap: 10px;
  }

  .signal-mix-bars span,
  .signal-mix-bars strong,
  .shareholder-bars span,
  .shareholder-bars strong,
  .fundamentals-grid span,
  .fundamentals-grid strong {
    font-size: 14px;
  }

  .analysis-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .analysis-score {
    width: 100%;
    min-height: 120px;
  }

  .analysis-grid,
  .analysis-levels,
  .dividend-bar-chart,
  .dividend-explain-grid,
  .dividend-kpi-grid,
  .earnings-bar-chart,
  .earnings-kpi-grid,
    .earnings-next-grid,
    .earnings-quarter-grid,
    .earnings-reaction-grid,
    .forecast-axis,
    .forecast-factors,
    .forecast-strip,
    .institutional-agent-list,
    .institutional-probability-grid,
    .profile-business-grid,
  .profile-market-grid,
  .profile-stat-grid,
  .signals-count-grid,
  .scenario-grid {
    grid-template-columns: 1fr;
  }

  .profile-hero-card,
  .profile-two-col {
    grid-template-columns: 1fr;
  }

  .profile-actions {
    justify-content: flex-start;
  }

  .chat-messages article {
    max-width: 100%;
  }
}

@media (max-width: 420px) {
  main {
    width: min(100% - 12px, 420px);
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  nav {
    grid-template-columns: 1fr 1fr;
  }

  nav a,
  .nav-analyst,
  .theme-switch {
    padding-inline: 7px;
  }

  .market-tape-track {
    grid-template-columns: 1fr;
  }

  .ticker-pill {
    min-height: 54px;
  }
}

/* Detailed analysis polish: keep report tabs dense and image-led. */
.earnings-panel,
.earnings-quarter-card,
.earnings-kpi-grid article,
.dividend-panel,
.dividend-kpi-grid article,
.signals-panel,
.signal-gauge,
.profile-panel,
.profile-stat-grid article,
.analysis-verdict-card,
.analysis-panel,
.analysis-component,
.analysis-footnote,
.institutional-engine-card,
.institutional-panel,
.institutional-probability-grid article {
  box-shadow: none;
}

.profile-report-grid {
  align-items: start;
}

.profile-report-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
}

.profile-stat-grid,
.profile-market-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.profile-business-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.profile-info-list {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.profile-business-grid article {
  min-height: 0;
}

@media (max-width: 980px) {
  .profile-report-grid,
  .profile-coverage-grid {
    grid-template-columns: 1fr;
  }

  .profile-company-story {
    min-height: 0;
  }
}

.news-lead-card {
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 18px;
  border: 1px solid var(--analysis-border);
  border-radius: 16px;
  padding: 14px;
  background: var(--analysis-panel-bg);
}

.analysis-news-copy {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.analysis-news-copy > strong {
  font-size: clamp(22px, 2.3vw, 34px);
  line-height: 1.18;
}

.analysis-news-media,
.analysis-news-thumb {
  overflow: hidden;
  border: 1px solid var(--analysis-border);
  border-radius: 14px;
  background: var(--analysis-panel-soft-bg);
}

.analysis-news-media {
  min-height: 190px;
}

.analysis-news-thumb {
  width: 128px;
  aspect-ratio: 1.25;
}

.analysis-news-image,
.analysis-news-thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-lead-card .analysis-news-image-fallback,
.news-row-card .analysis-news-image-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: #dbe6f6;
  background:
    linear-gradient(135deg, rgba(21, 94, 239, 0.35), rgba(20, 184, 166, 0.26)),
    var(--analysis-panel-soft-bg);
  text-align: center;
  text-transform: none;
}

.analysis-news-image-fallback strong {
  font-size: 34px;
  line-height: 1;
}

.analysis-news-image-fallback small {
  color: var(--text-soft);
  font-weight: 850;
}

.news-list-grid {
  gap: 10px;
  border-top: 0;
}

.news-row-card {
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--analysis-border);
  border-radius: 14px;
  padding: 12px;
  background: var(--analysis-panel-bg);
}

.news-row-copy > span {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--blue);
  background: var(--analysis-accent-bg);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.news-row-card.up .news-row-copy > span {
  color: var(--analysis-good);
  background: rgba(34, 197, 94, 0.14);
}

.news-row-card.down .news-row-copy > span {
  color: var(--analysis-bad);
  background: rgba(244, 63, 94, 0.14);
}

.news-row-copy small {
  color: var(--muted);
  font-weight: 800;
}

@media (max-width: 760px) {
  .news-lead-card,
  .news-row-card {
    grid-template-columns: 1fr;
  }

  .analysis-news-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
  }
}

/* Workstation density and chart upgrade pass */
main {
  width: min(1580px, calc(100% - 28px));
}

.hero {
  grid-template-columns: minmax(330px, 0.72fr) minmax(560px, 1.28fr);
  gap: 12px;
  padding: 12px 0;
}

.hero-copy {
  min-height: 0;
  align-items: stretch;
  justify-content: flex-start;
  padding: 18px;
  text-align: left;
}

.hero-copy::after {
  height: 22%;
}

.hero-live-scene {
  opacity: 0.28;
}

.hero-copy .eyebrow {
  margin-bottom: 6px;
}

.hero-copy h1 {
  max-width: 720px;
  margin-bottom: 8px;
  font-size: clamp(28px, 2.8vw, 42px);
}

.hero-copy .lede {
  max-width: 680px;
  margin-bottom: 0;
  font-size: 14px;
  line-height: 1.35;
}

.hero-actions {
  justify-content: flex-start;
  gap: 10px;
  margin-top: 12px;
}

.hero-analyst,
.analysis-teaser-button {
  width: auto;
  min-width: 190px;
  min-height: 48px;
  border-radius: 10px;
  padding: 7px 18px;
  font-size: 16px;
}

.hero-analyst small,
.analysis-teaser-button small {
  margin-top: 3px;
  font-size: 10px;
}

.search-panel {
  width: 100%;
  margin-top: 14px;
}

.search-row {
  gap: 8px;
}

.search-row input {
  height: 42px;
}

.search-row button {
  min-height: 42px;
}

.ticker-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.ticker-pill {
  min-height: 38px;
  max-width: none;
  border-radius: 8px;
  padding: 6px 9px;
}

.market-card {
  min-height: 520px;
  padding: 14px;
}

.status-line {
  margin-bottom: 8px;
}

.quote-head {
  align-items: center;
}



#stock-name {
  margin-top: 3px;
  margin-bottom: 1px;
  font-size: 20px;
}

.price-line {
  margin: 10px 0 10px;
}

#stock-price {
  font-size: clamp(32px, 3.4vw, 48px);
}

.chart-wrap {
  min-height: 380px;
  border-radius: 8px;
}

.advanced-price-chart {
  position: absolute;
  inset: 0;
  min-height: 100%;
}

.advanced-price-chart a,
.advanced-price-chart [class*="logo"],
.advanced-price-chart [class*="attribution"] {
  display: none !important;
}

.advanced-price-chart[hidden],
canvas.fallback-hidden {
  display: none;
}

.chart-range-bar {
  position: absolute;
  z-index: 5;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 4px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  padding: 3px;
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(10px);
}

.chart-range-bar button {
  min-height: 26px;
  border-radius: 6px;
  padding: 0 8px;
  color: rgba(248, 251, 255, 0.78);
  background: transparent;
  font-size: 11px;
  font-weight: 900;
}

.chart-range-bar button.active {
  color: #fff;
  background: linear-gradient(135deg, #155eef, #0e9384);
}

.chart-wrap.loading-range::after {
  content: "Loading market chart...";
  position: absolute;
  inset: 0;
  z-index: 7;
  display: grid;
  place-items: center;
  color: #f8fbff;
  background: rgba(5, 10, 19, 0.42);
  font-weight: 900;
}

.metrics-band {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  margin-bottom: 12px;
  border-radius: 10px;
}

.metrics-band::before {
  padding: 8px 12px;
}

.metrics-band article {
  min-height: 78px;
  padding: 10px 12px;
}

.metrics-band article:nth-of-type(4n) {
  border-right: 1px solid rgba(176, 190, 211, 0.16);
}

.metrics-band article:nth-of-type(8n) {
  border-right: 0;
}

.metrics-band strong {
  margin: 5px 0 3px;
  font-size: 18px;
}

.metrics-band small {
  font-size: 11px;
}

#metric-range {
  font-size: 14px;
}

.workspace {
  padding-bottom: 14px;
}

.watchlist {
  padding: 14px;
}

.watchlist-form,
.watch-grid {
  margin-top: 10px;
}

.market-news {
  gap: 10px;
  margin: 8px 0 18px;
  border-radius: 10px;
  padding: 14px;
}

.news-head {
  align-items: center;
  padding-bottom: 8px;
}

.news-head h2 {
  font-size: clamp(24px, 2.4vw, 34px);
}

.news-layout {
  gap: 12px;
}

.news-top {
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 12px;
}

.news-feature {
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: 190px;
  gap: 12px;
  border-radius: 8px;
  padding: 10px;
}

.news-feature-media {
  min-height: 170px;
}

.news-feature-copy {
  gap: 7px;
  justify-content: flex-start;
}

.news-feature-copy strong {
  font-size: clamp(19px, 1.7vw, 25px);
}

.news-feature-copy em,
.news-compact em,
.news-small em {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.news-compact,
.news-small {
  border-radius: 8px;
}

.news-compact {
  grid-template-columns: 94px minmax(0, 1fr);
  min-height: 104px;
  gap: 10px;
  padding: 9px;
}

.news-small {
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 9px;
  padding: 9px;
}

.news-thumb {
  min-height: 82px;
}

.news-compact strong,
.news-small strong {
  font-size: 15px;
  -webkit-line-clamp: 2;
}

.news-intel-row {
  display: flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 !important;
  color: var(--muted) !important;
}

.news-source-logo {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #155eef, #0e9384);
  font-size: 10px;
  font-weight: 950;
}

.news-intel-row b,
.news-intel-row i {
  border-radius: 999px;
  padding: 4px 7px;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.news-intel-row b.up {
  color: #027a48;
  background: #d1fadf;
}

.news-intel-row b.down {
  color: #b42318;
  background: #fee4e2;
}

.news-intel-row b.flat,
.news-intel-row i {
  color: var(--pill-ink);
  background: var(--soft-surface);
}

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: 0;
  }

  .market-card {
    min-height: 470px;
  }

  .metrics-band {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  main {
    width: min(100% - 16px, 100%);
  }

  .hero {
    gap: 8px;
    padding: 8px 0;
  }

  .hero-copy {
    padding: 14px;
  }

  .hero-actions,
  .search-row {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-analyst,
  .analysis-teaser-button {
    width: 100%;
    min-width: 0;
  }

  .ticker-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-card {
    min-height: 430px;
    padding: 10px;
  }

  .quote-head,
  .price-line {
    gap: 8px;
  }

  .quote-actions {
    width: 100%;
    justify-content: stretch;
  }

  .quote-actions button {
    width: 100%;
  }

  .chart-wrap {
    min-height: 300px;
  }

  .chart-toolbox,
  .chart-mode-toggle,
  .chart-zoom-controls {
    transform: scale(0.88);
    transform-origin: right bottom;
  }

  .chart-range-bar {
    max-width: calc(100% - 20px);
    overflow-x: auto;
  }

  .metrics-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-top,
  .news-lower,
  .news-feature {
    grid-template-columns: 1fr;
  }

  .news-feature-media {
    min-height: 150px;
  }
}

/* Last-pass cleanup for the requested simpler page style. Keep this at the end. */
.topbar,
.market-tape,
.market-tape-track,
.tape-item,
.ticker-pill,
.metrics-band,
.metrics-band::before,
.metrics-band article,
.watch-grid,
.watch-table th,
.watch-table td,
.movers-panel-head,
.mover-row,
.news-list-grid,
.news-lead-card,
.news-row-card,
.analysis-feature-switcher,
.analysis-feature-bar,
.analysis-panel h3,
.earnings-panel h3,
.dividend-panel h3,
.signals-panel h3,
.profile-panel h3,
.institutional-panel h3,
.profit-loss-table th,
.profit-loss-table td {
  border-color: transparent !important;
  border-top: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
  border-left: 0 !important;
}

.brand-wordmark {
  width: 132px;
  height: 38px;
}

.market-tape-track {
  gap: 6px;
  padding: 0 8px;
}

.tape-item,
.ticker-pill,
.search-panel,
.watchlist-form,
.watch-table tbody tr {
  background: color-mix(in srgb, var(--panel) 74%, transparent);
}

.ticker-strip {
  gap: 8px;
}

.market-card {
  min-height: 390px;
  padding: clamp(18px, 2.4vw, 24px);
}

.chart-wrap,
.chart-wrap canvas {
  min-height: clamp(190px, 27vh, 280px);
}

.metrics-band {
  background: color-mix(in srgb, var(--panel) 82%, transparent);
}

.metrics-band article {
  background: transparent;
}

.watch-grid {
  overflow: visible;
  background: transparent;
}

.watch-table {
  border-collapse: separate;
  border-spacing: 0 8px;
}

.watch-table tbody td:first-child {
  border-radius: 12px 0 0 12px;
}

.watch-table tbody td:last-child {
  border-radius: 0 12px 12px 0;
}

.analysis-feature-switcher {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
  padding-bottom: 4px;
  background: transparent !important;
}

.analysis-feature-bar {
  gap: 10px;
}

.analysis-feature-bar button {
  min-height: 36px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 14px;
}

.analysis-feature-bar button.active {
  background: rgba(122, 167, 255, 0.16);
  box-shadow: none;
}

@media (max-width: 840px) {
  .brand-wordmark {
    width: 126px;
    height: 37px;
  }

  .chart-wrap,
  .chart-wrap canvas {
    min-height: 220px;
  }
}

/* Final visual cleanup: fewer divider lines, compact charts, and non-sticky analysis tabs. */
.topbar,
.market-tape {
  border-bottom: 0;
}

.brand-wordmark {
  width: 132px;
  height: 38px;
}

.market-tape-track {
  gap: 6px;
  padding: 0 8px;
}

.tape-item {
  border-right: 0;
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 74%, transparent);
}

.hero-copy,
.market-card,
.watchlist,
.market-news,
.metrics-band,
.movers-panel,
.analysis-modal,
.analysis-hero,
.analysis-panel,
.earnings-panel,
.dividend-panel,
.signals-panel,
.profile-panel,
.institutional-panel,
.profit-loss-panel,
.profit-loss-table-panel {
  border-color: transparent;
  box-shadow: none;
}

.market-card {
  min-height: 390px;
  padding: clamp(18px, 2.4vw, 24px);
}

.chart-wrap,
.chart-wrap canvas {
  min-height: clamp(190px, 27vh, 280px);
}

.ticker-strip {
  gap: 8px;
}

.ticker-pill {
  border: 0;
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 78%, transparent);
}

.search-panel,
.watchlist-form {
  border: 0;
  background: color-mix(in srgb, var(--panel) 70%, transparent);
}

.metrics-band {
  gap: 0;
  border: 0;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
}

.metrics-band::before {
  border-bottom: 0;
}

.metrics-band article,
.metrics-band article:nth-child(4n),
.metrics-band article:nth-last-child(-n + 4) {
  border-right: 0;
  border-bottom: 0;
}

.watch-grid {
  border: 0;
  background: transparent;
  overflow: visible;
}

.watch-table {
  border-collapse: separate;
  border-spacing: 0 8px;
}

.watch-table th,
.watch-table td {
  border-bottom: 0;
}

.watch-table thead {
  color: var(--muted);
}

.watch-table tbody tr {
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 72%, transparent);
}

.watch-table tbody td:first-child {
  border-radius: 12px 0 0 12px;
}

.watch-table tbody td:last-child {
  border-radius: 0 12px 12px 0;
}

.movers-panel-head,
.mover-row,
.news-list-grid,
.news-lead-card,
.news-row-card,
.profit-loss-table th,
.profit-loss-table td,
.analysis-panel h3,
.earnings-panel h3,
.dividend-panel h3,
.signals-panel h3,
.profile-panel h3,
.institutional-panel h3 {
  border: 0;
}

.analysis-feature-switcher {
  position: static !important;
  top: auto;
  z-index: auto;
  border-bottom: 0;
  padding-bottom: 4px;
  background: transparent;
}

.analysis-feature-bar {
  border-bottom: 0;
  gap: 10px;
}

.analysis-feature-bar button {
  min-height: 36px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 14px;
}

.analysis-feature-bar button.active {
  background: rgba(122, 167, 255, 0.16);
  box-shadow: none;
}

@media (max-width: 840px) {
  .brand-wordmark {
    width: 126px;
    height: 37px;
  }

  .chart-wrap,
  .chart-wrap canvas {
    min-height: 220px;
  }
}

/* Compact refinement: preserve placement, reduce scale, and keep news text-only. */
.analysis-identity h3,
.profile-hero-card h3,
.earnings-overview h3,
.dividend-overview h3,
.signals-overview h3,
.institutional-command-card h3 {
  font-size: clamp(22px, 2.35vw, 34px);
}

.analysis-price-row strong {
  font-size: clamp(28px, 3vw, 38px);
}

.forecast-score-card strong,
.earnings-score-card strong,
.dividend-score-card strong,
.institutional-master-score strong {
  font-size: clamp(38px, 4vw, 54px);
}

.news-head h2,
.movers-panel h2 {
  font-size: clamp(24px, 2.8vw, 38px);
}

.movers-hero h1 {
  font-size: clamp(34px, 4.4vw, 60px);
}

.analysis-panel h3,
.earnings-panel h3,
.dividend-panel h3,
.signals-panel h3,
.profile-panel h3,
.institutional-panel h3 {
  font-size: 18px;
}

.analysis-news-media,
.analysis-news-thumb,
.analysis-news-image,
.analysis-news-thumb-img,
.analysis-news-image-fallback {
  display: none !important;
}

.news-lead-card,
.news-row-card {
  grid-template-columns: 1fr !important;
}

.news-lead-card > strong,
.analysis-news-copy > strong,
.news-row-card strong {
  font-size: clamp(18px, 1.8vw, 26px);
  line-height: 1.22;
}

.news-lead-card p,
.news-row-copy p,
.news-update-note span {
  font-size: 14px;
}

.profit-loss-chart svg {
  min-width: 700px;
}

.profit-loss-head h3 {
  font-size: 19px;
}

.profit-loss-head small {
  max-width: 680px;
  font-size: 13px;
}

/* Profit and loss intelligence */
.analysis-feature-switcher {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.analysis-ai-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: max-content;
  min-height: 42px;
  border: 1px solid rgba(122, 167, 255, 0.55);
  border-radius: 10px;
  padding: 0 14px;
  color: #eaf1ff;
  background:
    linear-gradient(135deg, rgba(21, 94, 239, 0.78), rgba(20, 184, 166, 0.72)),
    var(--analysis-panel-strong-bg);
  font-size: 13px;
  font-weight: 1000;
  letter-spacing: 0;
  text-transform: uppercase;
  box-shadow: none;
}

.analysis-ai-button:hover,
.analysis-ai-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(234, 241, 255, 0.82);
  outline: 0;
}

.analysis-ai-button.compact {
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
}

.chat-overlay.open {
  z-index: 44;
}

.profit-loss-panel,
.profit-loss-table-panel {
  display: grid;
  gap: 14px;
}

.profit-loss-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.profit-loss-head h3 {
  margin: 2px 0 4px;
}

.profit-loss-head small {
  display: block;
  max-width: 760px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.profit-loss-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.profit-loss-summary span {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--analysis-border);
  border-radius: 10px;
  padding: 11px 12px;
  background: var(--analysis-panel-soft-bg);
}

.profit-loss-summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.profit-loss-summary strong {
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profit-loss-chart {
  overflow-x: auto;
  border: 1px solid var(--analysis-border);
  border-radius: 12px;
  background: var(--analysis-chart-bg);
}

.profit-loss-chart svg {
  display: block;
  width: 100%;
  min-width: 760px;
  height: auto;
}

.pl-grid {
  stroke: rgba(148, 163, 184, 0.22);
  stroke-width: 1;
}

.pl-axis {
  stroke: rgba(203, 213, 225, 0.5);
  stroke-width: 1.4;
}

.pl-axis-title,
.pl-y-label,
.pl-x-label,
.pl-net-label {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.pl-y-label {
  text-anchor: end;
}

.pl-x-label,
.pl-net-label {
  text-anchor: middle;
}

.pl-net-label {
  font-size: 11px;
}

.pl-net-label.up {
  fill: var(--analysis-good);
}

.pl-net-label.down {
  fill: var(--analysis-bad);
}

.pl-bar-profit {
  fill: #2dd4bf;
}

.pl-bar-sales {
  fill: #3b82f6;
}

.pl-bar-expenses {
  fill: #f59e0b;
}

.pl-bar-operating {
  fill: #8b5cf6;
}

.pl-bar-net {
  fill: #2dd4bf;
}

.pl-bar-net.negative {
  fill: #fb7185;
}

.pl-bar-loss {
  fill: #fb7185;
}

.profit-loss-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.profit-loss-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-soft);
}

.profit-loss-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.profit-loss-legend .profit {
  background: #2dd4bf;
}

.profit-loss-legend .sales {
  background: #3b82f6;
}

.profit-loss-legend .expenses {
  background: #f59e0b;
}

.profit-loss-legend .operating {
  background: #8b5cf6;
}

.profit-loss-legend .loss {
  background: #fb7185;
}

.scenario-probability-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: -4px;
}

.scenario-probability-strip article {
  --scenario-color: #7aa7ff;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 86px;
  border: 1px solid color-mix(in srgb, var(--scenario-color) 42%, var(--analysis-border));
  border-radius: 14px;
  padding: 12px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--scenario-color) 18%, transparent), transparent 66%),
    var(--analysis-panel-bg);
}

.scenario-probability-strip article::after {
  content: "";
  position: absolute;
  inset: auto 12px 10px 68px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--scenario-color), transparent);
  opacity: 0.8;
}

.scenario-probability-strip article.bullish {
  --scenario-color: #2dd4bf;
}

.scenario-probability-strip article.bearish {
  --scenario-color: #fb7185;
}

.scenario-probability-strip article.sideways {
  --scenario-color: #fbbf24;
}

.scenario-probability-strip article.volatility {
  --scenario-color: #a78bfa;
}

.scenario-ring {
  position: relative;
  display: grid;
  width: 46px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 999px;
  background: conic-gradient(var(--scenario-color) var(--value), rgba(148, 163, 184, 0.22) 0);
}

.scenario-ring::after {
  content: "";
  width: 29px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: var(--analysis-panel-bg);
}

.scenario-ring i {
  position: absolute;
  width: 7px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: var(--scenario-color);
  box-shadow: 0 0 16px var(--scenario-color);
}

.scenario-probability-strip div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.scenario-probability-strip small {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.scenario-probability-strip strong {
  color: var(--text);
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1;
}

.scenario-probability-strip em {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profit-loss-table-wrap {
  overflow: auto;
  border: 1px solid var(--analysis-border);
  border-radius: 12px;
  background: var(--analysis-chart-bg);
}

.profit-loss-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  color: var(--text);
}

.profit-loss-table th,
.profit-loss-table td {
  border-bottom: 1px solid var(--analysis-border);
  padding: 11px 12px;
  font-size: 13px;
  line-height: 1.25;
  text-align: right;
  white-space: nowrap;
}

.profit-loss-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--text-soft);
  background: var(--analysis-panel-strong-bg);
  font-size: 12px;
  font-weight: 950;
}

.profit-loss-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 210px;
  text-align: left;
  background: var(--analysis-panel-strong-bg);
}

.profit-loss-table tbody th {
  color: var(--text);
  font-weight: 850;
}

.profit-loss-table tr.strong-row th,
.profit-loss-table tr.strong-row td {
  color: var(--text);
  font-weight: 1000;
}

.profit-loss-table tbody tr:nth-child(odd) td {
  background: rgba(122, 167, 255, 0.035);
}

@media (max-width: 760px) {
  .analysis-feature-switcher,
  .profit-loss-head,
  .profit-loss-summary,
  .scenario-probability-strip,
  .signal-indicator-grid {
    grid-template-columns: 1fr;
  }

  .profit-loss-head {
    display: grid;
  }

  .analysis-ai-button {
    width: 100%;
  }

  .profit-loss-summary strong {
    white-space: normal;
  }
}

/* Unified report GUI: keep the whole app in the same clean, single-page style as Overview. */
.analysis-body {
  gap: 12px;
  padding-inline: clamp(14px, 2.5vw, 28px);
}

.analysis-body > * {
  width: min(1180px, 100%);
}

.analysis-modal,
.analysis-hero,
.forecast-main-panel,
.analysis-buy-sell-card,
.analysis-fundamentals-card,
.analysis-shareholders-card,
.profit-loss-panel,
.profit-loss-table-panel,
.earnings-overview,
.earnings-panel,
.dividend-overview,
.dividend-panel,
.signals-overview,
.signals-panel,
.profile-hero-card,
.profile-panel,
.institutional-command-card,
.institutional-panel,
.analysis-footnote,
.market-card,
.watchlist,
.market-news,
.brand-finale-copy,
.movers-hero,
.movers-panel,
.movers-disclaimer {
  border-color: var(--analysis-border);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(122, 167, 255, 0.035), transparent 42%),
    var(--analysis-panel-bg);
  box-shadow: none;
}

.analysis-hero,
.earnings-overview,
.dividend-overview,
.signals-overview,
.profile-hero-card,
.institutional-command-card,
.movers-hero {
  background:
    linear-gradient(135deg, rgba(21, 94, 239, 0.1), rgba(20, 184, 166, 0.055)),
    var(--analysis-panel-bg);
}

.analysis-hero::before,
.analysis-modal::before,
.analysis-modal::after,
.hero-live-scene,
.brand-finale-visual,
.movers-hero::before {
  display: none;
}

.analysis-feature-switcher {
  position: sticky;
  top: 0;
  z-index: 4;
  border-bottom: 1px solid var(--analysis-border);
  padding: 0 0 8px;
  background: linear-gradient(180deg, var(--analysis-modal-bg) 75%, transparent);
}

.analysis-feature-bar {
  overflow-x: auto;
  gap: 28px;
  border: 0;
  border-bottom: 2px solid var(--analysis-border);
  border-radius: 0;
  background: transparent;
}

.analysis-feature-bar button {
  border-right: 0;
  border-radius: 0;
  background: transparent;
}

.analysis-feature-bar button:last-child {
  border-right: 0;
}

.analysis-feature-bar button.active {
  color: #fff;
  background: transparent;
  box-shadow: inset 0 -4px 0 #7aa7ff;
}

.forecast-workspace,
.earnings-workspace,
.dividend-workspace,
.signals-workspace,
.news-workspace,
.profile-workspace,
.institutional-workspace {
  gap: 12px;
}

.earnings-visual-grid,
.earnings-two-col,
.dividend-visual-grid,
.dividend-two-col,
.signals-two-col,
.institutional-two-col,
.profile-two-col {
  gap: 12px;
}

.analysis-panel,
.earnings-panel,
.dividend-panel,
.signals-panel,
.profile-panel,
.institutional-panel {
  padding: 18px 20px;
}

.analysis-panel h3,
.earnings-panel h3,
.dividend-panel h3,
.signals-panel h3,
.profile-panel h3,
.institutional-panel h3 {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--analysis-border);
}

.earnings-kpi-grid,
.dividend-kpi-grid,
.signal-gauge-grid,
.signals-count-grid,
.institutional-probability-grid,
.profile-stat-grid,
.profile-market-grid,
.profile-info-list,
.profile-officer-list,
.profile-business-grid,
.analysis-levels,
.forecast-strip,
.scenario-grid,
.dividend-explain-grid,
.earnings-next-grid,
.earnings-quarter-grid,
.earnings-reaction-grid,
.signal-indicator-grid,
.brand-info-grid,
.ticker-strip {
  overflow: hidden;
  gap: 0;
  border: 1px solid var(--analysis-border);
  border-radius: 8px;
  background: var(--analysis-panel-bg);
}

.earnings-kpi-grid article,
.dividend-kpi-grid article,
.signal-gauge,
.signals-count-grid span,
.institutional-probability-grid article,
.profile-stat-grid article,
.profile-market-grid article,
.profile-info-list span,
.profile-officer-list span,
.profile-business-grid article,
.analysis-levels span,
.forecast-strip span,
.scenario-grid article,
.dividend-explain-grid span,
.earnings-next-grid span,
.earnings-quarter-card,
.earnings-reaction-card,
.signal-indicator-card,
.brand-info-grid article,
.ticker-pill {
  min-height: 0;
  border: 0;
  border-right: 1px solid var(--analysis-border);
  border-bottom: 1px solid var(--analysis-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.earnings-kpi-grid article:nth-child(4n),
.dividend-kpi-grid article:nth-child(4n),
.institutional-probability-grid article:nth-child(4n),
.brand-info-grid article:nth-child(4n),
.ticker-pill:nth-child(4n) {
  border-right: 0;
}

.signal-gauge:nth-child(3n),
.signals-count-grid span:nth-child(3n),
.profile-stat-grid article:nth-child(3n),
.profile-market-grid article:nth-child(3n),
.analysis-levels span:nth-child(3n),
.scenario-grid article:nth-child(3n),
.earnings-next-grid span:nth-child(2n),
.dividend-explain-grid span:nth-child(2n),
.earnings-quarter-card:nth-child(4n),
.earnings-reaction-card:nth-child(4n),
.signal-indicator-card:nth-child(4n),
.ticker-pill:nth-child(3n) {
  border-right: 0;
}

.forecast-strip span:last-child,
.profile-info-list span:last-child,
.profile-officer-list span:last-child,
.profile-business-grid article:last-child,
.analysis-levels span:last-child,
.scenario-grid article:last-child,
.dividend-explain-grid span:last-child,
.earnings-next-grid span:last-child,
.earnings-quarter-card:last-child,
.earnings-reaction-card:last-child,
.signal-indicator-card:last-child,
.brand-info-grid article:last-child,
.ticker-pill:last-child {
  border-right: 0;
}

.ticker-pill:nth-child(3n),
.ticker-pill:nth-child(4n) {
  border-right: 1px solid var(--analysis-border);
}

.ticker-pill:nth-child(6n),
.ticker-pill:last-child {
  border-right: 0;
}

.earnings-kpi-grid article:nth-last-child(-n + 4),
.dividend-kpi-grid article:nth-last-child(-n + 4),
.institutional-probability-grid article:nth-last-child(-n + 4),
.brand-info-grid article:nth-last-child(-n + 4) {
  border-bottom: 0;
}

.signal-gauge:nth-last-child(-n + 3),
.signals-count-grid span:nth-last-child(-n + 3),
.profile-stat-grid article:nth-last-child(-n + 3),
.profile-market-grid article:nth-last-child(-n + 3),
.analysis-levels span:nth-last-child(-n + 3),
.scenario-grid article:nth-last-child(-n + 3),
.earnings-next-grid span:nth-last-child(-n + 2),
.dividend-explain-grid span:nth-last-child(-n + 2),
.signal-indicator-card:nth-last-child(-n + 4) {
  border-bottom: 0;
}

.forecast-strip {
  margin-top: 0;
}

.forecast-strip span {
  padding: 12px 14px;
}

.scenario-desk {
  margin-top: 12px;
}

.scenario-desk .scenario-grid article {
  border-left: 0;
  padding: 12px 14px;
}

.analysis-buy-sell-card,
.analysis-fundamentals-card,
.analysis-shareholders-card {
  margin-top: 12px;
  padding: 18px 20px;
}

.fundamentals-grid {
  overflow: hidden;
  gap: 0;
  border: 1px solid var(--analysis-border);
  border-radius: 8px;
  background: var(--analysis-panel-bg);
}

.fundamentals-grid article {
  min-height: 48px;
  border-radius: 0;
  border-right: 1px solid var(--analysis-border);
  border-bottom: 1px solid var(--analysis-border);
  background: transparent !important;
}

.fundamentals-grid article:nth-child(3n) {
  border-right: 0;
}

.fundamentals-grid article:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.signal-indicator-card {
  min-height: 132px;
}

.signal-indicator-card.buy,
.signal-indicator-card.sell,
.signal-indicator-card.hold {
  background: transparent;
}

.signal-indicator-card.buy {
  box-shadow: inset 3px 0 0 rgba(45, 212, 191, 0.72);
}

.signal-indicator-card.sell {
  box-shadow: inset 3px 0 0 rgba(251, 113, 133, 0.72);
}

.signal-indicator-card.hold {
  box-shadow: inset 3px 0 0 rgba(251, 191, 36, 0.62);
}

.institutional-engine-grid {
  gap: 0;
  border: 1px solid var(--analysis-border);
  border-radius: 8px;
  background: var(--analysis-panel-bg);
  overflow: hidden;
}

.institutional-engine-card {
  border: 0;
  border-right: 1px solid var(--analysis-border);
  border-bottom: 1px solid var(--analysis-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.institutional-engine-card:nth-child(3n) {
  border-right: 0;
}

.institutional-engine-card:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.institutional-master-score,
.earnings-score-card,
.dividend-score-card,
.signals-decision-card,
.forecast-score-card,
.analysis-score {
  border: 1px solid var(--analysis-border);
  border-radius: 8px;
  background: var(--analysis-panel-strong-bg);
  box-shadow: none;
}

.institutional-agent-list,
.institutional-evidence-list,
.signal-rule-list,
.earnings-checks,
.profile-checklist {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--analysis-border);
  border-radius: 8px;
  background: var(--analysis-panel-bg);
}

.institutional-agent-list span,
.institutional-evidence-list li,
.signal-rule-list li,
.earnings-checks span,
.profile-checklist li {
  border: 0;
  border-bottom: 1px solid var(--analysis-border);
  border-left: 0;
  border-radius: 0;
  background: transparent;
}

.institutional-agent-list span:last-child,
.institutional-evidence-list li:last-child,
.signal-rule-list li:last-child,
.earnings-checks span:last-child,
.profile-checklist li:last-child {
  border-bottom: 0;
}

.profit-loss-chart,
.profit-loss-table-wrap,
.earnings-bar-chart,
.earnings-reaction-spark,
.dividend-bar-chart,
.dividend-yield-chart,
.signal-sparkline,
.chart-wrap {
  border-radius: 8px;
  box-shadow: none;
}

.news-lead-card,
.news-row-card {
  border-radius: 0;
  background: transparent;
}

.news-list-grid {
  border: 1px solid var(--analysis-border);
  border-radius: 8px;
  overflow: hidden;
}

.news-row-card {
  padding-inline: 14px;
}

.news-lead-card {
  border: 1px solid var(--analysis-border);
  border-radius: 8px;
  padding: 16px;
}

.metrics-band {
  overflow: hidden;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: none;
}

.metrics-band article {
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.metrics-band article:nth-child(4n) {
  border-right: 0;
}

.metrics-band article:nth-last-child(-n + 4) {
  border-bottom: 0;
}

.watchlist-form,
.search-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--soft-surface);
}

.watch-table tr,
.mover-row {
  background: transparent;
}

.movers-grid {
  gap: 16px;
}

.movers-panel {
  overflow: hidden;
}

.movers-panel-head {
  border-bottom: 1px solid var(--line);
  padding: 18px 20px 14px;
}

.mover-row {
  min-height: 84px;
  border-top: 0;
  border-bottom: 1px solid var(--line);
}

.mover-row:last-child {
  border-bottom: 0;
}

.brand-finale {
  margin-top: 0;
}

.brand-finale-copy h2 {
  font-size: clamp(34px, 4vw, 58px);
}

.brand-info-grid article {
  min-height: 132px;
}

@media (max-width: 1120px) {
  .earnings-kpi-grid article:nth-child(2n),
  .dividend-kpi-grid article:nth-child(2n),
  .institutional-probability-grid article:nth-child(2n),
  .profile-stat-grid article:nth-child(2n),
  .profile-market-grid article:nth-child(2n),
  .signal-indicator-card:nth-child(2n),
  .earnings-quarter-card:nth-child(2n),
  .earnings-reaction-card:nth-child(2n),
  .brand-info-grid article:nth-child(2n),
  .ticker-pill:nth-child(2n) {
    border-right: 0;
  }

  .ticker-pill:nth-child(2n) {
    border-right: 1px solid var(--analysis-border);
  }

  .ticker-pill:nth-child(3n),
  .ticker-pill:last-child {
    border-right: 0;
  }

  .metrics-band article:nth-child(2n) {
    border-right: 0;
  }

  .metrics-band article:nth-last-child(-n + 4) {
    border-bottom: 1px solid var(--line);
  }

  .metrics-band article:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}

@media (max-width: 760px) {
  .analysis-panel,
  .earnings-panel,
  .dividend-panel,
  .signals-panel,
  .profile-panel,
  .institutional-panel,
  .analysis-buy-sell-card,
  .analysis-fundamentals-card,
  .analysis-shareholders-card {
    padding: 14px;
  }

  .earnings-kpi-grid article,
  .dividend-kpi-grid article,
  .signal-gauge,
  .signals-count-grid span,
  .institutional-probability-grid article,
  .profile-stat-grid article,
  .profile-market-grid article,
  .analysis-levels span,
  .scenario-grid article,
  .dividend-explain-grid span,
  .earnings-next-grid span,
  .earnings-quarter-card,
  .earnings-reaction-card,
  .signal-indicator-card,
  .brand-info-grid article,
  .ticker-pill,
  .metrics-band article {
    border-right: 0 !important;
    border-bottom: 1px solid var(--analysis-border);
  }

  .earnings-kpi-grid article:last-child,
  .dividend-kpi-grid article:last-child,
  .signal-gauge:last-child,
  .signals-count-grid span:last-child,
  .institutional-probability-grid article:last-child,
  .profile-stat-grid article:last-child,
  .profile-market-grid article:last-child,
  .analysis-levels span:last-child,
  .scenario-grid article:last-child,
  .dividend-explain-grid span:last-child,
  .earnings-next-grid span:last-child,
  .earnings-quarter-card:last-child,
  .earnings-reaction-card:last-child,
  .signal-indicator-card:last-child,
  .brand-info-grid article:last-child,
  .ticker-pill:last-child,
  .metrics-band article:last-child {
    border-bottom: 0;
  }
}

/* Last-pass cleanup for the requested simpler page style. Keep this at the end. */
.topbar,
.market-tape,
.market-tape-track,
.tape-item,
.ticker-pill,
.metrics-band,
.metrics-band::before,
.metrics-band article,
.watch-grid,
.watch-table th,
.watch-table td,
.movers-panel-head,
.mover-row,
.news-list-grid,
.news-lead-card,
.news-row-card,
.analysis-feature-switcher,
.analysis-feature-bar,
.analysis-panel h3,
.earnings-panel h3,
.dividend-panel h3,
.signals-panel h3,
.profile-panel h3,
.institutional-panel h3,
.profit-loss-table th,
.profit-loss-table td {
  border-color: transparent !important;
  border-top: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
  border-left: 0 !important;
}

.brand-wordmark {
  width: 132px;
  height: 38px;
}

.market-tape-track {
  gap: 6px;
  padding: 0 8px;
}

.tape-item,
.ticker-pill,
.search-panel,
.watchlist-form,
.watch-table tbody tr {
  background: color-mix(in srgb, var(--panel) 74%, transparent);
}

.ticker-strip {
  gap: 8px;
}

.market-card {
  min-height: 390px;
  padding: clamp(18px, 2.4vw, 24px);
}

.chart-wrap,
.chart-wrap canvas {
  min-height: clamp(190px, 27vh, 280px);
}

.metrics-band {
  background: color-mix(in srgb, var(--panel) 82%, transparent);
}

.metrics-band article {
  background: transparent;
}

.watch-grid {
  overflow: visible;
  background: transparent;
}

.watch-table {
  border-collapse: separate;
  border-spacing: 0 8px;
}

.watch-table tbody td:first-child {
  border-radius: 12px 0 0 12px;
}

.watch-table tbody td:last-child {
  border-radius: 0 12px 12px 0;
}

.analysis-feature-switcher {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
  padding-bottom: 4px;
  background: transparent !important;
}

.analysis-feature-bar {
  gap: 10px;
}

.analysis-feature-bar button {
  min-height: 36px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 14px;
}

.analysis-feature-bar button.active {
  background: rgba(122, 167, 255, 0.16);
  box-shadow: none;
}

@media (max-width: 840px) {
  .brand-wordmark {
    width: 126px;
    height: 37px;
  }

  .chart-wrap,
  .chart-wrap canvas {
    min-height: 220px;
  }
}

.watchlist-form {
  border: 0;
  padding: 0;
  background: transparent;
}

.topbar {
  border-bottom: 1px solid var(--line) !important;
}

.ticker-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 12px;
  width: min(1000px, 100%);
  margin: 22px auto 0;
  border: 0 !important;
  border-radius: 0;
  padding: 0;
  background: transparent !important;
  box-shadow: none;
  overflow: visible;
}

.ticker-pill {
  position: relative;
  overflow: hidden;
  display: inline-grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: auto;
  min-width: 150px;
  max-width: 190px;
  min-height: 44px;
  border: 1px solid rgba(139, 165, 212, 0.45) !important;
  border-radius: 12px;
  padding: 7px 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(235, 245, 255, 0.9)),
    var(--panel);
  box-shadow:
    0 12px 30px rgba(21, 94, 239, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.ticker-pill::after {
  content: "";
  position: absolute;
  inset: auto 10px 7px 44px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(21, 94, 239, 0.55), rgba(20, 184, 166, 0.28), transparent);
}

.ticker-pill img {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.95);
}

.ticker-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(21, 94, 239, 0.42) !important;
  box-shadow:
    0 16px 34px rgba(21, 94, 239, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.ticker-pill span {
  position: relative;
  z-index: 1;
  overflow: visible;
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.1;
  text-overflow: clip;
  white-space: nowrap;
}

.ticker-pill small {
  display: none;
}





:root[data-theme="dark"] .ticker-pill {
  border-color: rgba(148, 163, 184, 0.36) !important;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.84)),
    var(--panel);
  color: #f8fbff;
  box-shadow: none;
}

:root[data-theme="dark"] .ticker-pill span {
  color: #f8fbff;
}

:root[data-theme="dark"] .ticker-pill::after {
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.75), rgba(45, 212, 191, 0.45), transparent);
}

.market-card {
  min-height: 320px;
}

.chart-wrap,
.chart-wrap canvas {
  min-height: clamp(145px, 19vh, 210px);
}

.search-panel {
  width: min(960px, 100%);
  margin: 24px auto 0;
  border: 0 !important;
  border-radius: 0;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none;
  text-align: left;
}

.search-panel .search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.search-panel input {
  height: 52px;
  border-radius: 8px;
}

.search-panel button {
  min-height: 52px;
  border-radius: 8px;
  padding-inline: 24px;
}

.analysis-feature-switcher {
  position: static !important;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin: 14px 0 18px;
  border: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none;
}

.analysis-feature-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  overflow-x: auto;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
}

.analysis-feature-bar button {
  flex: 0 0 auto;
  min-height: 44px;
  border: 0 !important;
  border-radius: 999px;
  padding: 0 16px;
  color: var(--text-soft);
  background: transparent;
  font-size: 15px;
  font-weight: 950;
  box-shadow: none;
}

.analysis-feature-bar button.active {
  color: #fff;
  background: color-mix(in srgb, var(--blue) 76%, #ffffff);
  box-shadow: none;
}

.analysis-ai-button {
  min-height: 44px;
  border-radius: 8px;
}

.analysis-chart-ohlc {
  max-width: calc(100% - 190px);
  flex-wrap: wrap;
  overflow: visible;
  white-space: normal;
  line-height: 1.35;
}

@media (max-width: 760px) {
  .search-panel .search-row,
  .analysis-feature-switcher {
    grid-template-columns: 1fr;
  }

  .analysis-feature-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-height: 0;
    overflow: visible;
  }

  .analysis-feature-bar button {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 0 10px;
    font-size: 14px;
    white-space: normal;
  }

  .analysis-ai-button {
    width: 100%;
  }

  .analysis-chart-ohlc {
    top: 78px;
    left: 14px;
    max-width: calc(100% - 28px);
    gap: 5px 8px;
    font-size: 11px;
  }

  .analysis-chart-ohlc strong,
  .analysis-chart-ohlc span {
    flex-basis: 100%;
  }

  .forecast-score-card.analysis-score-inline > strong {
    font-size: clamp(26px, 9vw, 36px);
  }

  .analysis-score-inline {
    width: 100%;
    padding: 10px 12px;
  }
}

@media (max-width: 380px) {
  .forecast-score-scale {
    gap: 8px;
  }

  .forecast-score-scale small,
  .forecast-score-scale span {
    font-size: 11px;
  }
}

/* Final live-dashboard pass */
.market-tape {
  overflow-x: auto;
  scrollbar-width: thin;
}

.market-tape-track {
  grid-template-columns: repeat(6, minmax(270px, 1fr));
  min-width: 1620px;
  overflow: visible;
}

.tape-item {
  min-width: 270px;
}

.tape-value-row {
  min-width: max-content;
  gap: 10px;
}

.tape-item strong {
  overflow: visible;
  max-width: none;
  margin-right: 0;
  text-overflow: clip;
  white-space: nowrap;
}

.tape-item small {
  white-space: nowrap;
}

nav a[aria-current="page"] {
  position: relative;
  color: var(--blue);
  background: rgba(21, 94, 239, 0.1);
  box-shadow: inset 0 -3px 0 var(--blue);
}







:root[data-theme="advanced"] body,
:root[data-theme="advanced"] body::before,
:root[data-theme="advanced"] body::after,
:root[data-theme="advanced"] .hero-copy::before,
:root[data-theme="advanced"] .pulse-line,
:root[data-theme="advanced"] .market-orbit,
:root[data-theme="advanced"] .brand-track,
:root[data-theme="advanced"] .terminal-bars i {
  animation: none !important;
}

:root[data-theme="advanced"] .pro-market-scene,
:root[data-theme="advanced"] .cursor-spotlight,
:root[data-theme="advanced"] .hero-live-scene {
  display: none !important;
}

:root[data-theme="advanced"] .hero-copy,
:root[data-theme="advanced"] .market-card,
:root[data-theme="advanced"] .watchlist,
:root[data-theme="advanced"] .metrics-band article,
:root[data-theme="advanced"] .analysis-summary,
:root[data-theme="advanced"] .analysis-verdict-card,
:root[data-theme="advanced"] .analysis-panel,
:root[data-theme="advanced"] .analysis-component {
  backdrop-filter: none !important;
}

.stock-heatmap {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: clamp(16px, 2.2vw, 24px);
  background:
    linear-gradient(135deg, rgba(21, 94, 239, 0.06), rgba(20, 184, 166, 0.04)),
    var(--panel);
  box-shadow: 0 14px 40px rgba(16, 24, 40, 0.07);
}

.heatmap-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.heatmap-head h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 3vw, 42px);
}

.heatmap-head > span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--text-soft);
  background: var(--card-soft);
  font-size: 13px;
  font-weight: 900;
}

.heatmap-head > span[hidden],
.home-movers-grid article > div:first-child span[hidden] {
  display: none !important;
}

.heatmap-board {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.heatmap-sector {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}

.heatmap-sector h3 {
  overflow: hidden;
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heatmap-sector-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(42px, 1fr));
  grid-auto-rows: 44px;
  gap: 3px;
}

.heatmap-tile {
  position: relative;
  display: grid;
  grid-column: span var(--span);
  min-width: 0;
  min-height: 0;
  align-content: center;
  justify-items: center;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 5px;
  padding: 5px;
  color: #fff;
  background: #64748b;
  box-shadow: none;
  text-align: center;
}

.heatmap-tile strong,
.heatmap-tile span {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heatmap-tile strong {
  font-size: clamp(12px, 1.5vw, 20px);
  line-height: 1;
}

.heatmap-tile span {
  font-size: 12px;
  font-weight: 850;
}

.heatmap-tile.hot-up {
  background: #166534;
}

.heatmap-tile.up {
  background: #15803d;
}

.heatmap-tile.soft-up {
  background: #7ca991;
}

.heatmap-tile.hot-down {
  background: #991b1b;
}

.heatmap-tile.down {
  background: #dc2626;
}

.heatmap-tile.soft-down {
  background: #c98f98;
}

.heatmap-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  z-index: 8;
  display: none;
  width: 220px;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--text);
  background: var(--panel);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.22);
  text-align: left;
}

.heatmap-tip b,
.heatmap-tip small {
  display: block;
}

.heatmap-tip b {
  margin-bottom: 5px;
  color: var(--ink);
}

.heatmap-tip small {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.4;
}

.heatmap-tile:hover,
.heatmap-tile:focus-visible {
  z-index: 5;
  outline: 2px solid rgba(21, 94, 239, 0.36);
}

.heatmap-tile:hover .heatmap-tip,
.heatmap-tile:focus-visible .heatmap-tip {
  display: block;
}

@media (max-width: 1100px) {
  .heatmap-board {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .market-tape-track {
    grid-template-columns: repeat(6, minmax(245px, 1fr));
    min-width: 1470px;
  }

  .tape-item {
    min-width: 245px;
  }

  .heatmap-board {
    grid-template-columns: 1fr;
  }
}

/* Movers and dense heatmap pass */
.market-tape {
  overflow: visible;
}

.market-tape-track {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  min-width: 0;
  gap: 6px;
}

.tape-item {
  min-width: 0;
  min-height: 70px;
  padding: 10px 14px;
}

.tape-item span {
  font-size: 14px;
}

.tape-item strong {
  font-size: clamp(18px, 1.45vw, 22px);
  line-height: 1.05;
}

.tape-item small {
  font-size: 13px;
}

.tape-value-row {
  min-width: 0;
  gap: 8px;
}

.stock-heatmap {
  width: min(100%, 1320px);
  margin-inline: auto;
}

.heatmap-board {
  grid-template-columns: repeat(28, minmax(0, 1fr));
  grid-auto-flow: dense;
  grid-auto-rows: 28px;
  gap: 4px;
}

.heatmap-sector {
  display: contents;
}

.heatmap-sector-grid {
  display: contents;
}

.heatmap-sector h3 {
  grid-column: span 5;
  align-self: end;
  min-height: 28px;
  padding: 2px 4px 0;
  font-size: clamp(13px, 1.05vw, 18px);
}

.heatmap-tile {
  grid-row: span var(--rows);
  min-height: 0;
  border-radius: 4px;
  padding: 5px 6px;
  overflow: visible;
}

.heatmap-tile strong {
  display: block;
  overflow: visible;
  max-width: 100%;
  font-size: clamp(10px, 0.82vw, 16px);
  line-height: 1.02;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.heatmap-tile span {
  display: block;
  margin-top: 2px;
  overflow: visible;
  font-size: clamp(9px, 0.62vw, 11px);
  line-height: 1;
  text-overflow: clip;
  white-space: nowrap;
}

.home-movers {
  display: grid;
  width: min(100%, 1320px);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: clamp(16px, 2vw, 22px);
  background:
    linear-gradient(135deg, rgba(21, 94, 239, 0.055), rgba(16, 185, 129, 0.04)),
    var(--panel);
  box-shadow: 0 14px 40px rgba(16, 24, 40, 0.06);
}

.home-movers-head,
.home-movers-grid article > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-movers-head h2,
.home-movers-grid h3 {
  margin: 0;
}

.home-movers-head a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--blue);
  background: var(--card-soft);
  font-weight: 900;
}

.home-movers-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.home-movers-grid article {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.home-movers-grid article > div:first-child span,
.movers-count {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--text-soft);
  background: var(--card-soft);
  font-size: 12px;
  font-weight: 900;
}

.home-mover-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, auto) 112px;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line-soft);
  padding: 12px 0;
  color: var(--text);
}

.home-mover-name {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.home-mover-row b,
.home-mover-row em {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.home-mover-row strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-weight: 950;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-mover-row small {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  overflow: hidden;
  border-radius: 7px;
  padding: 3px 7px;
  color: var(--text-soft);
  background: var(--soft-surface);
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-mover-row b {
  color: var(--ink);
  text-align: right;
}

.home-mover-row em {
  border-radius: 8px;
  padding: 8px;
  color: #fff;
  text-align: center;
  font-style: normal;
  font-weight: 950;
}

.home-mover-row.up em {
  background: #12b76a;
}

.home-mover-row.down em {
  background: #f04438;
}

.movers-grid-secondary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.movers-timeframe-shell {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  background:
    radial-gradient(circle at 18% 0%, rgba(21, 94, 239, 0.16), transparent 34%),
    radial-gradient(circle at 90% 0%, rgba(20, 184, 166, 0.13), transparent 34%),
    var(--surface);
  box-shadow: var(--shadow-soft);
}

.movers-timeframe-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.movers-timeframe-head h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.movers-timeframe-tabs {
  display: inline-flex;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.movers-timeframe-tab {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: var(--text-soft);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 950;
  transition: transform 0.18s ease, color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.movers-timeframe-tab:hover {
  color: var(--ink);
  transform: translateY(-1px);
}

.movers-timeframe-tab.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, #5b6cff, #1397b8);
  box-shadow: 0 14px 34px rgba(91, 108, 255, 0.28);
}

.movers-timeframe-panel {
  margin-top: 0;
}

.movers-timeframe-panel:not(.is-active),
.movers-timeframe-panel[hidden] {
  display: none !important;
}

.movers-period-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 22px;
}

.movers-period-low {
  border-color: rgba(255, 84, 112, 0.28);
}

.movers-period-gain {
  border-color: rgba(32, 211, 164, 0.28);
}

.mover-list.compact .mover-row {
  grid-template-columns: minmax(240px, 1fr) minmax(118px, auto) auto;
  min-height: 72px;
}

.mover-list.compact .mover-strength,
.mover-list.compact .mover-action {
  display: none;
}

.mover-load-more {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--blue);
  background: var(--card-soft);
  font-weight: 950;
}

.mover-load-more:hover {
  border-color: rgba(21, 94, 239, 0.45);
  background: rgba(21, 94, 239, 0.1);
}

@media (max-width: 840px) {
  .movers-timeframe-head {
    align-items: stretch;
    flex-direction: column;
  }

  .movers-timeframe-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 20px;
  }

  .movers-timeframe-tab {
    padding: 10px 12px;
  }
}

/* Indices */
.indices-main {
  display: grid;
  gap: 18px;
  width: min(1120px, calc(100% - 42px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.indices-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.indices-head h1 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1;
}

.indices-refresh {
  min-width: 122px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue);
  background: var(--card-soft);
  font-weight: 950;
}

.indices-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.indices-tabs button {
  min-height: 64px;
  border: 0;
  border-bottom: 5px solid transparent;
  color: var(--text-soft);
  background: transparent;
  font-size: clamp(20px, 3vw, 34px);
  font-weight: 950;
}

.indices-tabs button.active {
  border-color: var(--text);
  color: var(--text);
}

.indices-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.indices-table-head,
.indices-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 260px);
  gap: 14px;
  padding: 18px 26px;
  color: var(--text-soft);
  font-weight: 900;
}

.indices-status {
  display: block;
  border-top: 1px solid var(--line-soft);
  padding-block: 10px;
  font-size: 13px;
}

.indices-list {
  display: grid;
}

.index-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) minmax(150px, 250px);
  align-items: center;
  gap: 18px;
  min-height: 92px;
  border-top: 1px solid var(--line-soft);
  padding: 16px 26px;
  color: var(--text);
}

.index-row:hover,
.index-row:focus-visible {
  background: var(--card-soft);
  outline: 0;
}

.index-name,
.index-value {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.index-name strong,
.index-value strong {
  overflow: hidden;
  color: var(--ink);
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.index-name small,
.index-value small {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 850;
}

.index-value {
  justify-items: end;
  text-align: right;
}

.index-row.up .index-value small {
  color: #079455;
}

.index-row.down .index-value small {
  color: #d92d20;
}

.indices-empty {
  padding: 24px 26px;
  color: var(--text-soft);
  font-weight: 850;
}

.index-icon {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
}

.index-icon i {
  position: absolute;
  display: block;
}

.index-icon.nifty i,
.index-icon.nse i {
  width: 20px;
  height: 20px;
  border-radius: 2px 100% 2px 100%;
  background: #f97316;
  transform-origin: 100% 100%;
}

.index-icon.nifty i:nth-child(1) { transform: translate(-9px, -9px) rotate(0deg); background: #f43f5e; }
.index-icon.nifty i:nth-child(2) { transform: translate(9px, -9px) rotate(90deg); background: #f59e0b; }
.index-icon.nifty i:nth-child(3) { transform: translate(9px, 9px) rotate(180deg); background: #fbbf24; }
.index-icon.nifty i:nth-child(4) { transform: translate(-9px, 9px) rotate(270deg); background: #fb923c; }

.index-icon.nse {
  border: 1px solid rgba(148, 163, 184, 0.42);
  background: #fff;
}

.index-icon.nse i {
  width: 22px;
  height: 22px;
}

.index-icon.bank i,
.index-icon.bankex i {
  background: #f59e0b;
}

.index-icon.bank i:nth-child(1),
.index-icon.bankex i:nth-child(1) {
  top: 8px;
  left: 2px;
  width: 42px;
  height: 22px;
  border-radius: 22px 22px 4px 4px;
}

.index-icon.bank i:nth-child(n+2),
.index-icon.bankex i:nth-child(n+2) {
  bottom: 7px;
  width: 8px;
  height: 20px;
  background: #ef4444;
}

.index-icon.bank i:nth-child(2),
.index-icon.bankex i:nth-child(2) { left: 7px; }
.index-icon.bank i:nth-child(3),
.index-icon.bankex i:nth-child(3) { left: 19px; background: #111827; }
.index-icon.bank i:nth-child(4),
.index-icon.bankex i:nth-child(4) { right: 7px; }

.index-icon.finance i:nth-child(1),
.index-icon.midselect i:nth-child(1) {
  inset: 5px 21px 5px 5px;
  background: #fb923c;
}

.index-icon.finance i:nth-child(2),
.index-icon.midselect i:nth-child(2) {
  inset: 5px 5px 23px 23px;
  background: #ef4444;
}

.index-icon.finance i:nth-child(3),
.index-icon.midselect i:nth-child(3) {
  inset: 25px 5px 5px 23px;
  border-radius: 0 0 18px 0;
  background: #fbbf24;
}

.index-icon.finance i:nth-child(4),
.index-icon.midselect i:nth-child(4) {
  display: none;
}

.index-icon.sensex i:nth-child(1),
.index-icon.sensex i:nth-child(2) {
  width: 34px;
  height: 17px;
  border-radius: 18px 2px 2px 18px;
  background: #22d3ee;
}

.index-icon.sensex i:nth-child(1) {
  top: 7px;
  left: 6px;
}

.index-icon.sensex i:nth-child(2) {
  right: 6px;
  bottom: 7px;
  background: #2563eb;
  transform: rotate(180deg);
}

.index-icon.bse::before {
  content: "BSE";
  color: #0ea5e9;
  font-size: 17px;
  font-weight: 1000;
  letter-spacing: -1px;
}

.index-icon.bse i,
.index-icon.global i {
  display: none;
}

.index-icon.global {
  border-radius: 999px;
  background: linear-gradient(135deg, #155eef, #14b8a6);
}

@media (max-width: 700px) {
  .indices-main {
    width: min(100% - 24px, 720px);
  }

  .indices-head {
    align-items: start;
  }

  .indices-table-head {
    grid-template-columns: 1fr auto;
    padding-inline: 14px;
  }

  .index-row {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    padding-inline: 14px;
  }

  .index-value {
    grid-column: 2;
    justify-items: start;
    text-align: left;
  }
}

.ipo-main {
  display: grid;
  gap: 18px;
  width: min(100% - 32px, 1320px);
  margin: 0 auto;
  padding: 24px 0 48px;
}

.ipo-hero,
.ipo-controls,
.ipo-card,
.ipo-kpis article {
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(21, 94, 239, 0.05), rgba(20, 184, 166, 0.035)),
    var(--panel);
  box-shadow: 0 14px 36px rgba(16, 24, 40, 0.06);
}

.ipo-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(18px, 2.5vw, 28px);
}

.ipo-hero h1 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: clamp(34px, 4vw, 56px);
  letter-spacing: 0;
}

.ipo-meta,
.ipo-kpis,
.ipo-controls,
.ipo-tabs,
.ipo-card-top,
.ipo-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ipo-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  background: var(--card-soft);
  color: var(--text-soft);
  font-weight: 900;
}

.ipo-refresh {
  min-width: 170px;
}

.ipo-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ipo-kpis article {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
}

.ipo-kpis small {
  color: var(--text-soft);
  font-weight: 850;
}

.ipo-kpis strong {
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}

.ipo-controls {
  justify-content: space-between;
  padding: 12px;
}

.ipo-tabs button {
  border: 0;
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--text);
  background: transparent;
  font-weight: 900;
}

.ipo-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--teal));
}

#ipo-search {
  min-width: min(360px, 100%);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  background: var(--panel);
  font: inherit;
}

.ipo-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ipo-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.ipo-card-top {
  align-items: flex-start;
}





.ipo-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.1;
}

.ipo-card-top > div {
  min-width: 0;
  flex: 1;
}

.ipo-card-top > div > span {
  color: var(--text-soft);
  font-weight: 900;
}

.ipo-status-pill {
  border-radius: 999px;
  padding: 8px 11px;
  color: #fff;
  background: #155eef;
  font-size: 12px;
  white-space: nowrap;
}

.ipo-card.upcoming .ipo-status-pill {
  background: #7c3aed;
}

.ipo-card.closed .ipo-status-pill {
  background: #667085;
}

.ipo-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ipo-facts span {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  padding: 10px;
  background: var(--card-soft);
}

.ipo-facts small {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.ipo-facts strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

.ipo-card-actions a,
.ipo-muted {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--blue);
  background: var(--card-soft);
  font-size: 13px;
  font-weight: 900;
}

.ipo-muted {
  color: var(--text-soft);
}

.ipo-load-wrap {
  display: flex;
  justify-content: center;
}

.ipo-load-more {
  min-width: 210px;
}

.ipo-empty {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  color: var(--text-soft);
  background: var(--panel);
  font-weight: 850;
}

@media (max-width: 1180px) {
  .market-tape-track {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .heatmap-sector {
    grid-column: span 6;
  }

  .movers-grid-secondary,
  .ipo-list,
  .home-movers-grid {
    grid-template-columns: 1fr;
  }
}

/* Final workstation overrides: keep the app dense after all legacy style passes. */
:root {
  --shadow: 0 18px 42px rgba(2, 6, 23, 0.12);
}

:root[data-theme="dark"] {
  --shadow: 0 18px 54px rgba(0, 0, 0, 0.34);
}

body {
  font-family: var(--font-sans);
  font-feature-settings: "cv02", "cv03", "cv04", "ss01";
}

.topbar {
  min-height: 64px;
  padding-block: 10px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 14px 34px rgba(2, 6, 23, 0.18);
}

.brand {
  gap: 12px;
  min-width: 0;
}

.brand-wordmark {
  width: 148px;
  height: 34px;
  border-radius: 8px;
  border-color: rgba(122, 167, 255, 0.28);
  background: #f8fbff;
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.22);
}

.brand-copy strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.brand-copy small {
  font-size: 11px;
  font-weight: 650;
  line-height: 1.15;
}

nav {
  gap: 6px;
  font-size: 13px;
  font-weight: 850;
}

nav a,
.nav-analyst,
.theme-switch {
  border-radius: 8px;
}

nav a {
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 6px;
  left: 10px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-teal));
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 160ms ease, transform 160ms ease;
}

nav a:hover::after,
nav a:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.nav-analyst,
.analyst-button {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-teal));
  box-shadow: 0 12px 28px rgba(21, 94, 239, 0.18);
}

h1,
h2,
h3,
.metrics-band strong,
#stock-price {
  font-family: var(--font-display);
  letter-spacing: 0;
}

button,
input,
.ticker-pill,
.market-card,
.watchlist,
.market-news,
.metrics-band {
  border-radius: var(--radius-lg);
}

main {
  width: min(1580px, calc(100% - 28px));
}

.hero {
  grid-template-columns: 1fr;
  gap: 0;
  padding: 12px 0;
}

.hero-copy {
  min-height: 0;
  align-items: stretch;
  justify-content: flex-start;
  padding: 28px clamp(22px, 4vw, 42px);
  text-align: left;
}

.hero-copy h1 {
  max-width: 980px;
  margin-bottom: 8px;
  font-size: clamp(34px, 4vw, 62px);
}

.hero-copy .lede {
  max-width: 960px;
  font-size: clamp(15px, 1.1vw, 18px);
  line-height: 1.35;
}

.hero-actions {
  justify-content: flex-start;
  gap: 10px;
  margin-top: 12px;
}

.hero-analyst,
.analysis-teaser-button {
  width: auto;
  min-width: 190px;
  min-height: 48px;
  border-radius: 10px;
  padding: 7px 18px;
  font-size: 16px;
}

.search-panel {
  width: min(1180px, 100%);
  margin-top: 14px;
}

.ticker-strip {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  margin-inline: 0;
  width: min(1180px, 100%);
}

.ticker-pill {
  min-height: 38px;
  max-width: none;
  border-radius: 8px;
  padding: 6px 9px;
}

.market-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(360px, 0.6fr);
  gap: 12px;
  margin-top: 12px;
}

.market-card {
  min-height: 540px;
  padding: 14px;
}

.price-line {
  margin: 10px 0;
}

.chart-wrap,
.chart-wrap canvas {
  min-height: 360px;
}

.advanced-price-chart {
  position: absolute;
  inset: 0;
  min-height: 100%;
}

.advanced-price-chart[hidden],
canvas.fallback-hidden {
  display: none;
}

.chart-range-bar {
  position: absolute;
  z-index: 5;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 4px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  padding: 3px;
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(10px);
}

.chart-range-bar button {
  min-height: 26px;
  border-radius: 6px;
  padding: 0 8px;
  color: rgba(248, 251, 255, 0.78);
  background: transparent;
  font-size: 11px;
  font-weight: 900;
}

.chart-range-bar button.active {
  color: #fff;
  background: linear-gradient(135deg, #155eef, #0e9384);
}

.metrics-band {
  display: none !important;
}

.workspace {
  display: contents;
}

.watchlist {
  align-self: stretch;
  padding: 14px;
}

.watchlist .section-title {
  align-items: center;
}

.watchlist .section-title h2 {
  font-size: 22px;
}

.watchlist-form {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.watch-grid {
  max-height: 420px;
  overflow: auto;
}

.watch-table th:nth-child(4),
.watch-table td:nth-child(4) {
  text-align: center;
}

.news-head h2 {
  font-size: clamp(24px, 2.4vw, 34px);
}

.news-top {
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 12px;
}

.news-feature {
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: 190px;
  gap: 12px;
  border-radius: 8px;
  padding: 10px;
}

.news-feature-media {
  min-height: 170px;
}

.news-compact {
  grid-template-columns: 94px minmax(0, 1fr);
  min-height: 104px;
  gap: 10px;
  padding: 9px;
}

.news-small {
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 9px;
  padding: 9px;
}

.news-thumb {
  min-height: 82px;
}

@media (max-width: 1180px) {
  .market-workbench {
    grid-template-columns: 1fr;
  }

  .ticker-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    padding: 10px 14px;
  }

  .brand {
    justify-content: flex-start;
  }

  .brand-wordmark {
    width: 126px;
    height: 30px;
  }

  .brand-copy strong {
    font-size: 15px;
  }

  .brand-copy small {
    font-size: 11px;
  }

  .topbar nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    overflow: hidden;
  }

  .topbar nav a,
  .topbar nav button {
    display: inline-flex !important;
    min-width: 0;
    min-height: 34px;
    justify-content: center;
    border-radius: 999px;
    padding: 6px 8px;
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .theme-switch {
    width: 36px;
    min-width: 36px;
    padding-inline: 0;
    justify-self: center;
  }

  .nav-analyst {
    grid-column: span 2;
  }

  main {
    width: calc(100% - 16px);
  }

  .hero {
    gap: 8px;
    padding: 8px 0;
  }

  .hero-copy {
    padding: 14px;
  }

  .hero-actions,
  .search-row {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-analyst,
  .analysis-teaser-button,
  .quote-actions button {
    width: 100%;
    min-width: 0;
  }

  .ticker-strip,
  .metrics-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-card {
    min-height: 430px;
    padding: 10px;
  }

  .chart-wrap,
  .chart-wrap canvas {
    min-height: 300px;
  }

  .news-top,
  .news-lower,
  .news-feature {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .market-tape-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ipo-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .ipo-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ipo-facts {
    grid-template-columns: 1fr;
  }

  .home-mover-row {
    grid-template-columns: minmax(0, 1fr) 86px;
  }

  .home-mover-row b {
    display: none;
  }

  .heatmap-board,
  .heatmap-sector {
    display: block;
  }

  .heatmap-sector + .heatmap-sector {
    margin-top: 10px;
  }
}

@media (max-width: 760px) {
  .hero-copy {
    width: 100%;
    max-width: calc(100vw - 16px);
    box-sizing: border-box;
    overflow: hidden;
  }

  .hero-copy h1 {
    width: min(100%, calc(100vw - 44px));
    max-width: calc(100vw - 44px);
    font-size: clamp(24px, 7.1vw, 28px);
    line-height: 1.06;
    overflow-wrap: anywhere;
    word-break: normal;
    white-space: normal;
    text-wrap: wrap;
  }

  .hero-copy .lede {
    display: none;
  }

  .search-panel,
  .search-row,
  .search-row input,
  .search-row button,
  .hero-actions,
  .hero-actions button,
  .ticker-strip {
    max-width: 100%;
  }

  .search-row button {
    width: 100%;
    min-height: 46px;
  }

  .ticker-strip {
    grid-template-columns: 1fr;
  }

  .market-workbench {
    gap: 10px;
  }

  .market-card,
  .watchlist {
    min-width: 0;
  }

  .chart-wrap,
  .chart-wrap canvas {
    min-height: 280px;
  }

  .watch-grid {
    max-height: 340px;
  }

  .watch-table th,
  .watch-table td {
    padding: 10px 8px;
  }
}

/* Focused navigation and rectangular heatmap polish */
.topbar {
  display: grid;
  grid-template-columns: minmax(220px, auto) minmax(320px, 640px) auto;
  align-items: center;
  gap: 14px;
}

.topbar-search {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  min-width: 280px;
  max-width: 640px;
  border: 1px solid rgba(122, 167, 255, 0.32);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(8, 15, 29, 0.72);
}

.topbar-search input {
  grid-column: 1;
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 11px 13px;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 760;
  outline: 0;
}

.topbar-search input::placeholder {
  color: var(--muted);
}

.topbar-search button {
  display: grid;
  grid-column: 2;
  min-width: 76px;
  place-items: center;
  border: 0;
  border-left: 1px solid rgba(122, 167, 255, 0.22);
  color: #fff;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-teal));
  font-size: 12px;
  font-weight: 950;
}

.topbar-search.searching button {
  opacity: 0.65;
}

.watchlist-focus-view .market-news,
.watchlist-focus-view .brand-finale {
  display: none !important;
}

.watchlist-focus-view .market-workbench {
  grid-template-columns: 1fr;
}

.watchlist-focus-view .market-card,
.watchlist-focus-view .hero {
  display: none !important;
}

.watchlist-focus-view .watchlist {
  min-height: calc(100vh - 230px);
}

.stock-heatmap {
  width: min(100%, 1180px);
  padding: clamp(12px, 1.8vw, 18px);
}

.heatmap-head {
  margin-bottom: 4px;
}

.heatmap-head h2 {
  font-size: clamp(24px, 2.6vw, 36px);
}

.heatmap-board {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 460px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.08);
}

.heatmap-sector,
.heatmap-sector-grid {
  display: contents;
}

.heatmap-sector h3 {
  display: none;
}

.heatmap-tile {
  position: absolute;
  display: grid;
  align-content: center;
  justify-items: center;
  min-width: 0;
  min-height: 0;
  border: 2px solid var(--panel);
  border-radius: 6px;
  padding: clamp(3px, 0.55vw, 8px);
  overflow: hidden;
  color: #fff;
  text-align: center;
}

.heatmap-tile strong {
  display: block;
  overflow: hidden;
  max-width: 100%;
  font-size: clamp(10px, 1vw, 19px);
  font-weight: 1000;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heatmap-tile span {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  max-width: 100%;
  font-size: clamp(8px, 0.72vw, 12px);
  font-weight: 950;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heatmap-tile.compact strong {
  font-size: clamp(8px, 0.74vw, 12px);
}

.heatmap-tile.compact span {
  font-size: clamp(7px, 0.58vw, 10px);
}

.movers-main .market-news,
.movers-main .brand-finale,
.movers-main + .market-news,
.movers-main + .brand-finale {
  display: none !important;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .topbar-search {
    order: 2;
    width: 100%;
    max-width: none;
  }

  .topbar nav {
    order: 3;
  }
}

@media (max-width: 760px) {
  .topbar-search {
    grid-template-columns: minmax(0, 1fr) 76px;
    min-width: 0;
  }

  .topbar-search input {
    padding: 10px 11px;
    font-size: 12px;
  }

  .heatmap-board {
    aspect-ratio: 4 / 5;
    min-height: 560px;
  }

  .heatmap-tile {
    border-width: 1px;
    border-radius: 5px;
  }
}

/* Final polish for header, Markets, hero search and heatmap interaction */
.topbar {
  grid-template-columns: minmax(260px, auto) minmax(220px, 360px) minmax(0, 1fr);
}

.brand-wordmark {
  width: 162px;
}

.topbar-search {
  max-width: 360px;
  min-width: 220px;
}

.topbar nav {
  margin-left: -4px;
}

.notification-button {
  color: #ffffff;
}

.notification-button::before {
  width: 13px;
  height: 15px;
  border-color: #ffffff;
  border-width: 2px;
}

.notification-button::after {
  background: #ffffff;
  box-shadow: 0 4px 0 -1px #ffffff;
}

.profile-button.simple {
  display: inline-flex;
  width: auto;
  min-width: 118px;
  gap: 8px;
  border-radius: 999px;
  padding: 4px 10px 4px 5px;
  color: var(--text);
  background: rgba(17, 28, 46, 0.82);
}

.profile-button.simple span {
  width: 30px;
  height: 30px;
  font-size: 16px;
}

.profile-button.simple b {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.profile-button.simple i,
.profile-button.simple::after {
  display: none !important;
}

.markets-overview {
  display: grid;
  gap: 10px;
  width: min(1580px, calc(100% - 28px));
  margin: 12px auto 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: var(--panel);
  box-shadow: 0 12px 34px rgba(2, 6, 23, 0.12);
}

.markets-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.markets-overview-head h2 {
  margin: 0;
  font-size: 24px;
}

.markets-overview-head > span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--text-soft);
  background: var(--card-soft);
  font-size: 12px;
  font-weight: 900;
}

.markets-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.markets-overview-grid article {
  display: grid;
  gap: 4px;
  min-height: 92px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.12);
}

.markets-overview-grid span {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.markets-overview-grid strong {
  color: var(--text);
  font-size: clamp(18px, 1.8vw, 26px);
  line-height: 1;
}

.markets-overview-grid small {
  color: var(--muted);
  font-weight: 750;
}

.markets-overview-grid article.up strong {
  color: #36d399;
}

.markets-overview-grid article.down strong {
  color: #ff6b6b;
}

.search-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  width: min(940px, 100%);
  margin-inline: auto;
  border: 1px solid var(--control-border);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(8, 15, 29, 0.72);
}

.hero-search-icon {
  position: relative;
  display: grid;
  height: 100%;
  min-height: 48px;
  place-items: center;
}

.hero-search-icon::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid var(--muted);
  border-radius: 999px;
}

.hero-search-icon::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: var(--muted);
  transform: translate(9px, 9px) rotate(45deg);
}

.search-row input {
  border: 0 !important;
  background: transparent !important;
}

.ticker-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  justify-items: center;
}

.heatmap-tile {
  overflow: visible;
}

.heatmap-tile strong,
.heatmap-tile span {
  max-width: calc(100% - 4px);
}

.heatmap-tip {
  pointer-events: none;
}

.heatmap-tile:hover,
.heatmap-tile:focus-visible {
  z-index: 30;
}

.heatmap-tile:hover .heatmap-tip,
.heatmap-tile:focus-visible .heatmap-tip {
  display: block !important;
}

@media (max-width: 1180px) {
  .markets-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .profile-button.simple {
    min-width: 0;
    padding-right: 5px;
  }

  .profile-button.simple b {
    display: none;
  }

  .markets-overview {
    width: calc(100% - 16px);
  }

  .markets-overview-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .markets-overview-grid {
    grid-template-columns: 1fr;
  }

  .search-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }
}

/* Header, profile, hero centering, and watchlist refinement */
.topbar {
  grid-template-columns: minmax(280px, auto) minmax(260px, 430px) minmax(0, 1fr);
  gap: 12px;
}

.brand-wordmark {
  width: 154px;
}

.topbar-search {
  grid-template-columns: 36px minmax(0, 1fr);
  min-width: 240px;
  max-width: 430px;
  min-height: 42px;
  border-radius: 9px;
}

.topbar-search-icon {
  position: relative;
  display: grid;
  place-items: center;
}

.topbar-search-icon::before {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid var(--muted);
  border-radius: 999px;
}

.topbar-search-icon::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  border-radius: 999px;
  background: var(--muted);
  transform: translate(8px, 8px) rotate(45deg);
}

.topbar-search input {
  grid-column: 2;
  padding: 10px 12px 10px 0;
}

.topbar nav {
  justify-content: flex-start;
  gap: 5px;
}

.topbar nav a,
.topbar nav button,
.nav-analyst {
  min-height: 40px;
}

.notification-button,
.profile-button {
  position: relative;
  display: grid;
  width: 42px;
  min-width: 42px;
  place-items: center;
  border: 1px solid rgba(122, 167, 255, 0.34);
  color: var(--text);
  background: rgba(17, 28, 46, 0.82);
}

.notification-button::before {
  content: "";
  width: 14px;
  height: 16px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 10px 10px 4px 4px;
}

.notification-button::after {
  content: "";
  position: absolute;
  bottom: 9px;
  width: 9px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 4px 0 -1px currentColor;
}

.profile-menu {
  position: relative;
}

.profile-button {
  border-radius: 999px;
  background: #a58d5f;
}

.profile-button span,
.profile-head span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #a58d5f;
  font-size: 18px;
  font-weight: 900;
}

.profile-button i {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--topbar-bg);
  border-radius: 999px;
  background: #ef476f;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  display: none;
  width: 260px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-strong);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.26);
}

.profile-menu.open .profile-dropdown,
.profile-menu:focus-within .profile-dropdown {
  display: grid;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

.profile-head strong {
  color: var(--text);
  font-size: 15px;
}

.profile-dropdown button {
  justify-content: flex-start;
  border: 0;
  border-radius: 0;
  padding: 13px 16px;
  color: var(--text);
  background: transparent;
  font-size: 14px;
  font-weight: 800;
  text-align: left;
}

.profile-dropdown button:hover {
  background: var(--soft-surface);
}

.hero-copy {
  align-items: center;
  text-align: center;
}

.hero-copy h1,
.hero-copy .lede {
  margin-inline: auto;
}

.hero-actions,
.search-row {
  justify-content: center;
}

.search-panel,
.ticker-strip {
  margin-inline: auto;
}

.watch-table {
  table-layout: fixed;
}

.watch-table th:nth-child(1),
.watch-table td:nth-child(1) {
  width: 46%;
}

.watch-table th:nth-child(2),
.watch-table td:nth-child(2) {
  width: 18%;
}

.watch-table th:nth-child(3),
.watch-table td:nth-child(3) {
  width: 24%;
}

.watch-table th:nth-child(4),
.watch-table td:nth-child(4) {
  width: 58px;
  text-align: center;
}

.watch-menu-cell {
  justify-content: center;
}

.menu-dots {
  font-size: 0;
}

.menu-dots::before {
  content: "...";
  color: var(--text);
  font-size: 17px;
  font-weight: 1000;
  letter-spacing: 1px;
  line-height: 1;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar-search {
    grid-template-columns: 34px minmax(0, 1fr);
    max-width: none;
  }

  .topbar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .notification-button,
  .theme-switch,
  .profile-button {
    justify-self: center;
  }

  .profile-menu {
    display: grid;
  }

  .profile-dropdown {
    right: auto;
    left: 50%;
    width: min(280px, calc(100vw - 28px));
    transform: translateX(-50%);
  }

  .hero-copy {
    text-align: left;
  }

  .hero-actions,
  .search-row {
    justify-content: stretch;
  }
}

/* Final requested navigation/search/markets corrections */
.brand-wordmark {
  width: 166px;
}

.nav-analyst,
.topbar nav .nav-analyst {
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #155eef 42%, #06b6d4 100%) !important;
  box-shadow: 0 14px 34px rgba(21, 94, 239, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.nav-analyst:hover,
.nav-analyst:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 44px rgba(21, 94, 239, 0.48), 0 0 0 3px rgba(20, 184, 166, 0.18);
}

.notification-button {
  color: #fff;
  font-size: 0;
  background: linear-gradient(180deg, rgba(17, 28, 46, 0.94), rgba(15, 23, 42, 0.94));
}

.notification-button::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: transparent;
}

.notification-button::after {
  content: "";
  position: absolute;
  top: 11px;
  right: 11px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #fff;
  box-shadow: none;
}

.profile-button.simple {
  width: 42px;
  min-width: 42px;
  padding: 4px;
  border-radius: 999px;
}

.profile-button.simple span {
  width: 30px;
  height: 30px;
}

.profile-button.simple b,
.profile-button.simple i,
.profile-button.simple::after {
  display: none !important;
}

.profile-dropdown {
  right: 0;
  width: 220px;
}

.profile-dropdown button {
  min-height: 44px;
}

.search-row {
  width: min(820px, 100%);
  grid-template-columns: 46px minmax(0, 1fr);
}

.search-row input,
.topbar-search input,
.watchlist-form input,
.analysis-search-form input {
  min-width: 0;
  text-align: left !important;
  direction: ltr;
}

.search-row input {
  padding-left: 0 !important;
}

.hero-search-icon {
  justify-self: center;
}

.watchlist-input-wrap,
.analysis-search-input-wrap {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  border: 1px solid var(--control-border);
  border-radius: 10px;
  background: rgba(8, 15, 29, 0.72);
}

.watchlist-input-wrap input,
.analysis-search-input-wrap input {
  width: 100%;
  border: 0 !important;
  background: transparent !important;
}

.field-search-icon {
  position: relative;
  display: grid;
  height: 100%;
  min-height: 42px;
  place-items: center;
}

.field-search-icon::before {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid var(--muted);
  border-radius: 999px;
}

.field-search-icon::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  border-radius: 999px;
  background: var(--muted);
  transform: translate(8px, 8px) rotate(45deg);
}

.watchlist-form {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.analysis-request {
  justify-items: center;
}

.analysis-search-form {
  grid-template-columns: minmax(280px, 760px) auto;
  width: min(100%, 980px);
  margin-inline: auto;
}

.analysis-search-input-wrap {
  min-height: 58px;
}

.markets-main {
  display: grid;
  gap: 16px;
  width: min(1500px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.markets-hero,
.markets-table-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: clamp(18px, 2.5vw, 28px);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.markets-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.markets-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(36px, 4vw, 64px);
}

.markets-page-tape {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.markets-overview.standalone {
  width: 100%;
  margin: 0;
}

.markets-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.markets-lists article {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.markets-lists h3 {
  margin: 0;
}

.markets-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 120px 94px;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.12);
}

.markets-row span {
  overflow: hidden;
  color: var(--text-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.markets-row em,
.markets-row b {
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.markets-row.up b {
  color: #36d399;
}

.markets-row.down b {
  color: #ff6b6b;
}

@media (max-width: 900px) {
  .markets-lists {
    grid-template-columns: 1fr;
  }

  .markets-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .markets-row {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .markets-row em,
  .markets-row b {
    text-align: left;
  }
}

@media (max-width: 760px) {
  .analysis-search-form,
  .watchlist-form {
    grid-template-columns: 1fr;
  }

  .analysis-search-input-wrap,
  .watchlist-input-wrap {
    min-width: 0;
  }
}
/* True EOF override marker */
.topbar {
  grid-template-columns: minmax(250px, auto) minmax(260px, 420px) minmax(0, 1fr) !important;
}

.brand-wordmark {
  width: 164px !important;
  min-width: 164px !important;
}

.topbar-search {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) !important;
  width: min(100%, 420px) !important;
  max-width: 420px !important;
  min-width: 260px !important;
}

.topbar-search-icon {
  grid-column: 1 !important;
  justify-self: center !important;
}

.topbar-search input {
  grid-column: 2 !important;
  width: 100% !important;
  padding: 0 14px 0 0 !important;
  text-align: left !important;
  direction: ltr !important;
}

.search-row {
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) !important;
  width: min(760px, 100%) !important;
}

.hero-search-icon {
  grid-column: 1 !important;
  justify-self: center !important;
}

.search-row input {
  grid-column: 2 !important;
  width: 100% !important;
  padding: 0 16px 0 0 !important;
  text-align: left !important;
  direction: ltr !important;
}

.notification-button {
  color: #fff !important;
  background: rgba(15, 23, 42, 0.92) !important;
}

.notification-button::before {
  content: "" !important;
  position: static !important;
  width: 22px !important;
  height: 22px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background-color: currentColor !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3Cpath d='M10 4a2 2 0 0 1 4 0'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3Cpath d='M10 4a2 2 0 0 1 4 0'/%3E%3C/svg%3E") center / contain no-repeat;
}

.notification-button::after {
  display: none !important;
}

.topbar nav .nav-analyst {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff !important;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 38%, #0891b2 72%, #0f766e 100%) !important;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.34), 0 0 26px rgba(6, 182, 212, 0.24) !important;
}

.topbar nav .nav-analyst::after {
  content: "";
  position: absolute;
  inset: -60% auto -60% -42%;
  width: 42%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.46), transparent);
  animation: analyst-sheen 3.8s ease-in-out infinite;
}

.profile-button.simple {
  display: grid !important;
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  place-items: center !important;
  border-radius: 999px !important;
  background: transparent !important;
}

.profile-button.simple span {
  width: 34px !important;
  height: 34px !important;
  color: #fff !important;
  background: #a58d5f !important;
}

.profile-button.simple b,
.profile-button.simple i,
.profile-button.simple::after {
  display: none !important;
}

:root[data-theme="light"] .topbar-search,
:root[data-theme="light"] .search-row,
:root[data-theme="light"] .watchlist-input-wrap,
:root[data-theme="light"] .analysis-search-input-wrap {
  border-color: rgba(21, 94, 239, 0.22) !important;
  background: rgba(255, 255, 255, 0.92) !important;
}

:root[data-theme="light"] .topbar-search input,
:root[data-theme="light"] .search-row input,
:root[data-theme="light"] .watchlist-form input,
:root[data-theme="light"] .analysis-search-form input {
  color: #111827 !important;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr !important;
  }

  .topbar-search {
    width: 100% !important;
    max-width: none !important;
  }

  .topbar nav {
    justify-content: center !important;
  }
}

@media (max-width: 760px) {
  html,
  body {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .topbar {
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    padding: 8px 10px !important;
    overflow: hidden !important;
  }

  .brand {
    justify-content: center !important;
  }

  .brand-wordmark {
    width: 150px !important;
    min-width: 150px !important;
  }

  .topbar-search {
    grid-template-columns: 40px minmax(0, 1fr) !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .topbar nav {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    gap: 6px !important;
    overflow: hidden !important;
  }

  .topbar nav a {
    min-width: 0 !important;
    min-height: 36px !important;
    padding-inline: 4px !important;
    font-size: 12px !important;
    text-align: center !important;
  }

  .notification-button,
  .theme-switch,
  .profile-button.simple {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    justify-self: center !important;
  }

  .topbar nav .nav-analyst {
    grid-column: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 38px !important;
    padding-inline: 8px !important;
  }

  .profile-menu {
    grid-column: 3 !important;
    justify-self: center !important;
  }

  .profile-button.simple span {
    width: 31px !important;
    height: 31px !important;
  }

  .hero {
    width: calc(100% - 16px) !important;
    margin-inline: auto !important;
  }

  .hero-copy h1 {
    width: 100% !important;
    max-width: 100% !important;
    font-size: clamp(25px, 7vw, 31px) !important;
    overflow-wrap: anywhere !important;
  }

  .search-row {
    width: min(100%, calc(100vw - 34px)) !important;
    grid-template-columns: 40px minmax(0, 1fr) !important;
  }
}

/* Final visual unification: hero-centered dark research workspace. */
:root,
:root[data-theme="dark"] {
  --bg: #050812;
  --bg-2: #080d1b;
  --ink: #f8fbff;
  --text: #f8fbff;
  --muted: #9aa8bd;
  --text-soft: #b7c2d4;
  --panel: rgba(7, 13, 27, 0.82);
  --panel-strong: rgba(6, 10, 22, 0.94);
  --card-soft: rgba(17, 29, 49, 0.78);
  --soft-surface: rgba(28, 42, 65, 0.74);
  --line: rgba(89, 119, 165, 0.42);
  --line-soft: rgba(89, 119, 165, 0.22);
  --control-bg: rgba(7, 13, 27, 0.86);
  --control-border: rgba(122, 167, 255, 0.32);
  --body-bg:
    radial-gradient(circle at 18% 24%, rgba(20, 184, 166, 0.12), transparent 28%),
    radial-gradient(circle at 70% 18%, rgba(124, 58, 237, 0.18), transparent 34%),
    linear-gradient(135deg, #050812 0%, #081321 42%, #09071c 100%);
  --hero-panel:
    radial-gradient(circle at 22% 78%, rgba(20, 184, 166, 0.18), transparent 28%),
    radial-gradient(circle at 72% 24%, rgba(124, 58, 237, 0.2), transparent 32%),
    linear-gradient(135deg, rgba(5, 8, 18, 0.98), rgba(9, 7, 28, 0.98));
  --chart-bg:
    linear-gradient(rgba(122, 167, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 167, 255, 0.045) 1px, transparent 1px),
    rgba(6, 11, 24, 0.9);
  --watch-up-bg: rgba(9, 33, 35, 0.78);
  --watch-down-bg: rgba(37, 14, 24, 0.78);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

html,
body {
  background: var(--body-bg) !important;
}

body::before {
  opacity: 0.72 !important;
}

.hero-copy,
.market-card,
.watchlist,
.market-news,
.brand-finale,
.home-movers,
.markets-hero,
.markets-overview,
.markets-table-panel,
.movers-panel,
.ipo-hero,
.ipo-kpis article,
.ipo-controls,
.ipo-card,
.analysis-panel,
.analysis-summary,
.analysis-verdict-card,
.profile-panel,
.profile-hero-card,
.app-footer {
  border-color: rgba(122, 167, 255, 0.24) !important;
  background:
    linear-gradient(135deg, rgba(8, 13, 27, 0.9), rgba(9, 7, 28, 0.84)),
    var(--panel) !important;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.18) !important;
}

.hero-copy {
  background: var(--hero-panel) !important;
}

body:not(.watchlist-focus-view) main > .hero:first-child {
  min-height: calc(100svh - 156px) !important;
  display: grid !important;
  align-items: stretch !important;
  justify-items: center !important;
  padding-block: 16px 22px !important;
}

body:not(.watchlist-focus-view) main > .hero:first-child .hero-copy {
  width: 100% !important;
  min-height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: column !important;
  text-align: center !important;
  gap: clamp(14px, 2vh, 22px) !important;
  padding-block: clamp(22px, 5vh, 52px) !important;
}

body:not(.watchlist-focus-view) main > .hero:first-child .hero-copy h1,
body:not(.watchlist-focus-view) main > .hero:first-child .hero-copy .lede {
  margin-inline: auto !important;
  text-align: center !important;
}

body:not(.watchlist-focus-view) main > .hero:first-child .hero-actions,
body:not(.watchlist-focus-view) main > .hero:first-child .ticker-strip {
  justify-content: center !important;
}

body:not(.watchlist-focus-view) main > .hero:first-child .search-panel,
body:not(.watchlist-focus-view) main > .hero:first-child .ticker-strip {
  margin-inline: auto !important;
}

body:not(.watchlist-focus-view) .market-workbench {
  margin-top: 24px !important;
}

@media (max-width: 980px) {
  body:not(.watchlist-focus-view) main > .hero:first-child {
    min-height: calc(100svh - 132px) !important;
  }
}

@media (max-width: 640px) {
  body:not(.watchlist-focus-view) main > .hero:first-child {
    min-height: calc(100svh - 118px) !important;
    padding-block: 10px 18px !important;
  }

  body:not(.watchlist-focus-view) main > .hero:first-child .hero-copy {
    justify-content: flex-start !important;
    padding-block: 20px !important;
  }
}

/* Final surface flattening: one continuous hero-style workspace. */
:root,
:root[data-theme="dark"] {
  --body-bg: linear-gradient(135deg, #050812 0%, #070b18 52%, #09071c 100%) !important;
  --hero-panel: linear-gradient(135deg, #050812 0%, #070b18 52%, #09071c 100%) !important;
  --panel: transparent !important;
  --panel-strong: transparent !important;
  --card-soft: rgba(16, 26, 45, 0.58) !important;
  --soft-surface: rgba(17, 29, 49, 0.72) !important;
  --line: rgba(122, 167, 255, 0.22) !important;
  --line-soft: rgba(122, 167, 255, 0.12) !important;
}

html,
body,
main,
.hero,
.market-workbench,
.markets-main,
.movers-main,
.ipo-main,
.indices-main {
  background: var(--body-bg) !important;
}

body::before,
body::after,
.hero-live-scene,
.hero-copy::before,
.hero-copy::after {
  display: none !important;
}

.hero-copy,
.market-card,
.watchlist,
.market-news,
.brand-finale,
.home-movers,
.markets-hero,
.markets-overview,
.markets-table-panel,
.movers-panel,
.ipo-hero,
.ipo-kpis article,
.ipo-controls,
.ipo-card,
.analysis-panel,
.analysis-summary,
.analysis-verdict-card,
.profile-panel,
.profile-hero-card,
.app-footer {
  border-color: rgba(122, 167, 255, 0.16) !important;
  background: transparent !important;
  box-shadow: none !important;
}

.hero-copy {
  border-color: rgba(122, 167, 255, 0.2) !important;
  background: var(--hero-panel) !important;
}

.market-card,
.watchlist,
.markets-overview,
.markets-table-panel,
.movers-panel,
.home-movers,
.market-news,
.brand-finale {
  border-radius: 10px !important;
}

.market-workbench,
.movers-grid,
.movers-grid-secondary,
.markets-lists,
.home-movers-grid,
.analysis-two-col,
.profile-two-col {
  gap: 12px !important;
}

.market-card,
.watchlist,
.markets-overview,
.markets-table-panel,
.movers-panel,
.home-movers {
  padding: clamp(14px, 2vw, 20px) !important;
}

.watch-table tbody td,
.markets-row,
.mover-row,
.home-mover-row,
.news-card,
.news-row-card,
.heatmap-sector,
.profile-stat-grid article,
.profile-market-grid article,
.ipo-card {
  background: rgba(12, 20, 36, 0.52) !important;
  border-color: rgba(122, 167, 255, 0.12) !important;
  box-shadow: none !important;
}

.chart-wrap,
.advanced-price-chart,
#price-chart {
  background: rgba(5, 8, 18, 0.72) !important;
}

body:not(.watchlist-focus-view) .market-workbench {
  margin-top: 0 !important;
  padding-top: 18px !important;
}

body:not(.watchlist-focus-view) main > .hero:first-child {
  padding-bottom: 0 !important;
}

/* Final targeted correction: keep page background plain, but preserve data UI structure. */
html,
body,
main,
.hero,
.hero-copy,
.market-workbench,
.markets-main,
.movers-main,
.ipo-main,
.indices-main,
.app-footer {
  background: var(--body-bg) !important;
  background-image: var(--body-bg) !important;
}

body::before,
body::after,
.hero::before,
.hero::after,
.hero-copy::before,
.hero-copy::after,
.brand-finale-visual,
.brand-finale-visual::before,
.brand-finale-visual::after {
  display: none !important;
}

.heatmap-board {
  background: rgba(3, 7, 18, 0.8) !important;
  border: 1px solid rgba(122, 167, 255, 0.16) !important;
}

.heatmap-tile {
  border: 1px solid rgba(3, 7, 18, 0.88) !important;
  border-radius: 7px !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
}

.heatmap-tip {
  border: 1px solid rgba(122, 167, 255, 0.24) !important;
  background: rgba(11, 17, 33, 0.88) !important;
}

.app-footer {
  border-color: transparent !important;
  padding-top: clamp(34px, 5vw, 58px) !important;
}

.app-footer-grid article {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* Final app-wide page merge, hover feedback, and light-theme cleanup. */
:root[data-theme="light"] {
  --body-bg: #ffffff !important;
  --hero-panel: #ffffff !important;
  --topbar-bg: #ffffff !important;
  --tape-bg: #ffffff !important;
  --panel: #ffffff !important;
  --panel-strong: #ffffff !important;
  --card-soft: #ffffff !important;
  --soft-surface: #ffffff !important;
  --tool-bg: #ffffff !important;
  --chart-bg: #ffffff !important;
  --menu-bg: #ffffff !important;
  --chat-bg: #ffffff !important;
  --chat-body-bg: #ffffff !important;
  --chat-head-bg: #ffffff !important;
}

html,
body {
  margin: 0 !important;
  background: var(--body-bg) !important;
  background-image: var(--body-bg) !important;
}

main,
.hero,
.market-workbench,
.market-news,
.home-movers,
.brand-finale,
.app-footer,
.markets-main,
.movers-main,
.ipo-main,
.indices-main {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  background: var(--body-bg) !important;
  background-image: var(--body-bg) !important;
}

.topbar,
.market-clock {
  border: 0 !important;
  box-shadow: none !important;
  background: var(--topbar-bg) !important;
}

.market-clock {
  margin: 0 !important;
  min-height: 52px !important;
  padding: 8px clamp(14px, 3vw, 42px) !important;
}

.hero {
  padding: 0 !important;
  gap: 0 !important;
}

body:not(.watchlist-focus-view) main > .hero:first-child {
  min-height: calc(100svh - 124px) !important;
  padding: 0 !important;
}

body:not(.watchlist-focus-view) main > .hero:first-child .hero-copy {
  min-height: calc(100svh - 124px) !important;
}

.hero-copy {
  width: 100% !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.market-workbench {
  padding: 18px clamp(12px, 2vw, 28px) 0 !important;
}

:root[data-theme="light"] .hero-copy,
:root[data-theme="light"] .hero-copy h1,
:root[data-theme="light"] .hero-copy .lede,
:root[data-theme="light"] .hero-copy .eyebrow {
  color: #101828 !important;
}

:root[data-theme="light"] .market-card,
:root[data-theme="light"] .watchlist,
:root[data-theme="light"] .market-news,
:root[data-theme="light"] .home-movers,
:root[data-theme="light"] .markets-overview,
:root[data-theme="light"] .markets-table-panel,
:root[data-theme="light"] .movers-panel,
:root[data-theme="light"] .ipo-card,
:root[data-theme="light"] .app-footer {
  background: #ffffff !important;
  background-image: none !important;
}

.nav-analyst,
.analyst-button,
.analysis-ai-button,
.analysis-teaser-button,
.hero-actions button,
.quote-actions button,
.watch-ai-button,
.open-ai-button,
.chat-open-button {
  border-radius: 999px !important;
}

:where(button, a, input, select, textarea, .ticker-pill, .market-card, .watchlist, .news-card, .news-row-card, .home-mover-row, .mover-row, .markets-row, .ipo-card, .profile-panel, .analysis-panel, .heatmap-tile, .app-footer-grid article) {
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    filter 160ms ease,
    opacity 160ms ease !important;
}

:where(button, a, .ticker-pill, .news-card, .news-row-card, .home-mover-row, .mover-row, .markets-row, .ipo-card, .heatmap-tile, .app-footer-grid article):hover {
  border-color: rgba(122, 167, 255, 0.46) !important;
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(21, 94, 239, 0.16) !important;
}

:where(button, a, .ticker-pill, .news-card, .news-row-card, .home-mover-row, .mover-row, .markets-row, .ipo-card, .heatmap-tile):active {
  filter: brightness(0.96);
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 6px 18px rgba(21, 94, 239, 0.12) !important;
}

:where(input, select, textarea, button, a, .ticker-pill, .heatmap-tile):focus-visible {
  outline: 0 !important;
  box-shadow: 0 0 0 3px rgba(122, 167, 255, 0.34), 0 12px 32px rgba(21, 94, 239, 0.18) !important;
}

@media (max-width: 760px) {
  body:not(.watchlist-focus-view) main > .hero:first-child,
  body:not(.watchlist-focus-view) main > .hero:first-child .hero-copy {
    min-height: calc(100svh - 116px) !important;
  }

  .market-workbench {
    padding-inline: 10px !important;
  }
}

/* Light theme correction and detailed-analysis alignment pass. */
:root[data-theme="light"] html,
:root[data-theme="light"] body,
:root[data-theme="light"] main,
:root[data-theme="light"] .hero,
:root[data-theme="light"] .hero-copy,
:root[data-theme="light"] .market-workbench,
:root[data-theme="light"] .market-card,
:root[data-theme="light"] .watchlist,
:root[data-theme="light"] .watch-grid,
:root[data-theme="light"] .market-news,
:root[data-theme="light"] .home-movers,
:root[data-theme="light"] .movers-main,
:root[data-theme="light"] .movers-panel,
:root[data-theme="light"] .markets-main,
:root[data-theme="light"] .markets-overview,
:root[data-theme="light"] .markets-table-panel,
:root[data-theme="light"] .analysis-body,
:root[data-theme="light"] .analysis-request,
:root[data-theme="light"] .analysis-hero,
:root[data-theme="light"] .analysis-panel,
:root[data-theme="light"] .signals-panel,
:root[data-theme="light"] .profile-panel,
:root[data-theme="light"] .app-footer {
  background: #ffffff !important;
  background-image: none !important;
}

:root[data-theme="light"] body::before,
:root[data-theme="light"] body::after,
:root[data-theme="light"] .analysis-hero::before {
  display: none !important;
}

:root[data-theme="light"] .watch-table tbody tr,
:root[data-theme="light"] .watch-table tbody td,
:root[data-theme="light"] .mover-row,
:root[data-theme="light"] .home-mover-row,
:root[data-theme="light"] .markets-row,
:root[data-theme="light"] .news-card,
:root[data-theme="light"] .news-row-card,
:root[data-theme="light"] .ipo-card,
:root[data-theme="light"] .signal-indicator-card,
:root[data-theme="light"] .signal-gauge,
:root[data-theme="light"] .signals-overview,
:root[data-theme="light"] .analysis-verdict-card,
:root[data-theme="light"] .forecast-score-card,
:root[data-theme="light"] .chart-wrap {
  background: #ffffff !important;
  background-image: none !important;
}

:root[data-theme="light"] .watch-table tbody tr,
:root[data-theme="light"] .mover-row,
:root[data-theme="light"] .home-mover-row,
:root[data-theme="light"] .markets-row {
  border-color: #e5edf8 !important;
}

.analysis-search-input-wrap {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  align-items: center !important;
  position: relative !important;
  overflow: visible !important;
  border: 1px solid var(--control-border) !important;
  border-radius: 14px !important;
  background: var(--panel-strong) !important;
  box-shadow: none !important;
}

.analysis-search-input-wrap .field-search-icon {
  justify-self: center !important;
}

.analysis-search-input-wrap input,
.analysis-search-form input,
.analysis-search-input-wrap input:focus,
.analysis-search-input-wrap input:focus-visible {
  width: 100% !important;
  min-width: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  border-radius: 0 !important;
  padding-inline: 0 14px !important;
  background: transparent !important;
  box-shadow: none !important;
}

.analysis-header-search-wrap {
  position: relative;
  display: block;
  min-width: 0;
}

.analysis-suggest-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 1000;
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: var(--panel-strong);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.28);
}

.analysis-suggest-list[hidden] {
  display: none !important;
}

.analysis-suggest-list button,
.analysis-suggest-empty {
  display: grid;
  grid-template-columns: minmax(74px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 9px;
  padding: 10px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.analysis-suggest-list button:hover {
  background: rgba(96, 165, 250, 0.16);
}

.analysis-suggest-list strong {
  font-size: 14px;
}

.analysis-suggest-list span {
  overflow: hidden;
  color: var(--text-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-suggest-list small {
  color: var(--muted);
  font-weight: 850;
}

.watchlist-input-wrap {
  position: relative;
}

.watchlist-suggest-list {
  top: calc(100% + 10px);
  z-index: 1200;
  max-height: 320px;
  overflow: auto;
}

.watchlist-suggest-list button {
  grid-template-columns: minmax(0, 1fr) auto;
}

.topbar-suggest-list {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 1000;
  display: grid;
  gap: 6px;
  min-width: min(420px, 92vw);
  border: 1px solid rgba(128, 160, 255, 0.34);
  border-radius: 14px;
  padding: 8px;
  background: rgba(10, 13, 31, 0.96);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.38);
}

.topbar-suggest-list[hidden] {
  display: none !important;
}

.topbar-suggest-list button,
.topbar-suggest-empty {
  display: grid;
  grid-template-columns: minmax(70px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 10px;
  color: #f8fbff;
  background: transparent;
  text-align: left;
}

.topbar-suggest-list button:hover {
  background: rgba(96, 165, 250, 0.18);
}

.topbar-suggest-list strong {
  font-size: 14px;
}

.topbar-suggest-list span {
  overflow: hidden;
  color: rgba(232, 238, 255, 0.82);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-suggest-list small {
  color: rgba(185, 201, 232, 0.86);
  font-weight: 850;
}

.topbar-suggest-empty {
  grid-template-columns: 1fr;
  color: rgba(232, 238, 255, 0.82);
  font-weight: 850;
}

:root[data-theme="light"] .topbar-suggest-list {
  border-color: #c8d8f4;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 42px rgba(74, 95, 126, 0.22);
}

:root[data-theme="light"] .topbar-suggest-list button,
:root[data-theme="light"] .topbar-suggest-empty {
  color: #0f172a;
}

:root[data-theme="light"] .topbar-suggest-list span {
  color: #4b5870;
}

:root[data-theme="light"] .topbar-suggest-list small {
  color: #64748b;
}

:root[data-theme="light"] .topbar-suggest-list button:hover {
  background: rgba(37, 99, 235, 0.1);
}

.analysis-suggest-empty {
  grid-template-columns: 1fr;
  color: var(--text-soft);
  font-weight: 850;
}

.analysis-recent-stocks {
  display: grid;
  gap: 14px;
  width: min(100%, 980px);
  margin-top: 18px;
}

.analysis-recent-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.analysis-recent-head span {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 850;
}

.analysis-recent-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.analysis-recent-grid button {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  color: var(--text);
  background: var(--panel-strong);
  text-align: left;
}

.analysis-recent-grid button:hover {
  border-color: rgba(96, 165, 250, 0.58);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.14);
}

.analysis-recent-grid strong {
  font-size: 16px;
}

.analysis-recent-grid span {
  overflow: hidden;
  color: var(--text-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-hero {
  min-height: 218px !important;
  overflow: visible !important;
}

.analysis-identity {
  padding-right: 340px !important;
}

.analysis-score-inline {
  top: 50% !important;
  right: 22px !important;
  width: min(320px, 32vw) !important;
  min-height: 0 !important;
  padding: 14px 16px !important;
  transform: translateY(-50%) !important;
}

.forecast-score-scale {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
}

.forecast-score-scale span {
  justify-self: center;
  min-width: 0;
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--analysis-accent-bg);
  font-size: 12px;
  font-weight: 950;
  text-align: center;
  white-space: nowrap;
}

.forecast-score-scale small:first-child {
  color: #fb7185 !important;
}

.forecast-score-scale small:last-child {
  color: #4ade80 !important;
}

.forecast-score-scale.signal-sell span {
  color: #fb7185 !important;
  background: rgba(251, 113, 133, 0.16);
  box-shadow: 0 0 18px rgba(251, 113, 133, 0.18);
}

.forecast-score-scale.signal-buy span {
  color: #4ade80 !important;
  background: rgba(74, 222, 128, 0.16);
  box-shadow: 0 0 18px rgba(74, 222, 128, 0.18);
}

.forecast-score-scale.signal-hold span {
  color: #facc15 !important;
  background: rgba(250, 204, 21, 0.16);
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.16);
}

.mover-row {
  grid-template-columns: minmax(0, 1fr) minmax(104px, 122px) minmax(96px, 116px) minmax(78px, 92px) !important;
  overflow: hidden !important;
}

.mover-company,
.mover-session {
  min-width: 0 !important;
}

.mover-company strong,
.mover-session small {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.mover-session strong,
.mover-change,
.mover-action {
  justify-self: end;
}

.mover-list.compact .mover-row {
  grid-template-columns: minmax(0, 1fr) minmax(104px, 122px) minmax(96px, 116px) !important;
}

.home-mover-row {
  grid-template-columns: minmax(0, 1fr) minmax(96px, 118px) minmax(96px, 112px) !important;
}

.watch-table {
  table-layout: fixed !important;
  width: 100% !important;
}

.watch-table th:nth-child(1),
.watch-table td:nth-child(1) {
  width: 46% !important;
}

.watch-table th:nth-child(2),
.watch-table td:nth-child(2) {
  width: 18% !important;
}

.watch-table th:nth-child(3),
.watch-table td:nth-child(3) {
  width: 22% !important;
}

.watch-table th:nth-child(4),
.watch-table td:nth-child(4) {
  width: 76px !important;
}

.watch-stock-line,
.watch-stock-line > div {
  min-width: 0 !important;
}

.watch-stock-line strong,
.watch-stock-line small {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.watch-price-cell,
.watch-change-cell {
  text-align: right !important;
}

.watch-menu-cell {
  text-align: center !important;
}

@media (max-width: 1080px) {
  .analysis-identity {
    padding-right: 0 !important;
  }

  .analysis-score-inline {
    position: static !important;
    width: min(100%, 360px) !important;
    transform: none !important;
  }
}

/* Final light-theme leak cleanup: heatmap hover, scrollbars, and profile cards. */
:root[data-theme="light"] {
  scrollbar-color: #9db7df #ffffff !important;
}

:root[data-theme="light"] ::-webkit-scrollbar-track {
  background: #ffffff !important;
}

:root[data-theme="light"] ::-webkit-scrollbar-thumb {
  border: 3px solid #ffffff !important;
  background: linear-gradient(180deg, #b8c9e8, #8da7d4) !important;
}

:root[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #8da7d4, #6f8fc8) !important;
}

:root[data-theme="light"] ::-webkit-scrollbar-corner {
  background: #ffffff !important;
}

:root[data-theme="light"] .heatmap-board {
  background: #ffffff !important;
  border-color: #dbe7f7 !important;
}

:root[data-theme="light"] .heatmap-tip {
  color: #101828 !important;
  background: rgba(255, 255, 255, 0.96) !important;
  border-color: #b8c9e8 !important;
  box-shadow: 0 18px 44px rgba(16, 24, 40, 0.18) !important;
  backdrop-filter: blur(10px);
}

:root[data-theme="light"] .heatmap-tip b,
:root[data-theme="light"] .heatmap-tip small {
  color: #101828 !important;
}

:root[data-theme="light"] .profile-stat-grid article,
:root[data-theme="light"] .profile-market-grid article,
:root[data-theme="light"] .profile-business-grid article,
:root[data-theme="light"] .profile-info-list span,
:root[data-theme="light"] .profile-officer-list span,
:root[data-theme="light"] .profile-checklist li,
:root[data-theme="light"] .profile-description,
:root[data-theme="light"] .profile-key-points,
:root[data-theme="light"] .profile-fact-chips span,
:root[data-theme="light"] .profile-coverage-grid {
  color: #101828 !important;
  background: #ffffff !important;
  background-image: none !important;
  border-color: #dbe7f7 !important;
  box-shadow: none !important;
}

:root[data-theme="light"] .profile-stat-grid span,
:root[data-theme="light"] .profile-market-grid span,
:root[data-theme="light"] .profile-info-list small,
:root[data-theme="light"] .profile-stat-grid small,
:root[data-theme="light"] .profile-market-grid small,
:root[data-theme="light"] .profile-story-copy p,
:root[data-theme="light"] .profile-coverage-grid ul {
  color: #667085 !important;
}

:root[data-theme="light"] .profile-stat-grid strong,
:root[data-theme="light"] .profile-market-grid strong,
:root[data-theme="light"] .profile-info-list strong,
:root[data-theme="light"] .profile-officer-list strong,
:root[data-theme="light"] .profile-business-grid strong,
:root[data-theme="light"] .profile-checklist li {
  color: #101828 !important;
}

:root[data-theme="light"] .watch-grid,
:root[data-theme="light"] .watchlist {
  scrollbar-color: #9db7df #ffffff !important;
}

/* Final header alignment pass. */
.topbar {
  display: grid !important;
  grid-template-columns: auto minmax(180px, 280px) minmax(0, 1fr) !important;
  align-items: center !important;
  gap: clamp(18px, 2.4vw, 34px) !important;
  width: 100% !important;
  padding: 10px 18px 10px 0 !important;
}

.topbar .brand {
  justify-self: start !important;
  margin-left: 0 !important;
  padding-left: 0 !important;
  gap: 14px !important;
}

.brand-wordmark {
  width: 206px !important;
  min-width: 206px !important;
  height: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.topbar-search {
  justify-self: center !important;
  width: min(100%, 280px) !important;
  max-width: 280px !important;
  min-width: 180px !important;
}

.topbar nav {
  justify-self: end !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: clamp(10px, 1vw, 18px) !important;
  width: 100% !important;
  min-width: 0 !important;
}

.topbar nav a,
.topbar nav button {
  flex: 0 0 auto !important;
}

.topbar nav .nav-analyst {
  margin-left: clamp(6px, 1vw, 14px) !important;
}

.topbar .profile-menu {
  margin-left: clamp(6px, 1vw, 14px) !important;
}

.topbar .profile-button.simple {
  width: 50px !important;
  min-width: 50px !important;
  height: 50px !important;
}

.topbar .profile-button.simple span {
  width: 38px !important;
  height: 38px !important;
}

@media (max-width: 1500px) {
  .topbar {
    grid-template-columns: auto minmax(170px, 240px) minmax(0, 1fr) !important;
    gap: 14px !important;
    padding-right: 12px !important;
  }

  .brand-copy small {
    display: none !important;
  }

  .topbar-search {
    max-width: 240px !important;
  }

  .topbar nav {
    gap: 8px !important;
  }

  .topbar nav a,
  .topbar nav button:not(.profile-button) {
    padding-inline: 10px !important;
  }

  .topbar nav .nav-analyst {
    min-width: 124px !important;
    margin-left: 6px !important;
  }

  .topbar .profile-menu {
    margin-left: 6px !important;
  }
}

@media (max-width: 1320px) and (min-width: 1181px) {
  .topbar {
    grid-template-columns: auto minmax(160px, 210px) minmax(0, 1fr) !important;
  }

  .brand-wordmark {
    width: 188px !important;
    min-width: 188px !important;
  }

  .brand-copy {
    display: none !important;
  }

  .topbar-search {
    max-width: 210px !important;
  }

  .topbar nav a,
  .topbar nav button:not(.profile-button) {
    padding-inline: 8px !important;
  }
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr !important;
    padding: 12px !important;
  }

  .topbar .brand,
  .topbar-search,
  .topbar nav {
    justify-self: stretch !important;
  }
}

/* Responsive fit pass: keep every major screen inside the viewport and let long market names breathe. */
html,
body {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

body,
main,
.hero,
.market-workbench,
.markets-main,
.movers-main,
.market-news,
.brand-finale,
.app-footer {
  width: 100% !important;
  max-width: 100% !important;
}

.market-card,
.watchlist,
.markets-hero,
.markets-overview,
.markets-table-panel,
.movers-panel,
.movers-disclaimer,
.analysis-modal,
.analysis-panel,
.analysis-hero,
.app-footer {
  min-width: 0 !important;
  max-width: 100% !important;
}

.chart-wrap,
.advanced-price-chart,
.analysis-canvas-wrap,
.heatmap-board {
  min-width: 0 !important;
  max-width: 100% !important;
}

canvas {
  max-width: 100% !important;
}

.markets-row span,
.mover-company strong,
.mover-company em,
.mover-session small,
.watch-stock-line strong,
.watch-stock-line small {
  overflow-wrap: anywhere !important;
}

@media (max-width: 1180px) {
  .market-workbench {
    grid-template-columns: minmax(0, 1fr) !important;
    padding-inline: 16px !important;
    overflow: hidden !important;
  }

  .market-workbench > .market-card,
  .market-workbench > .watchlist {
    width: 100% !important;
    max-width: calc(100vw - 32px) !important;
    margin-inline: auto !important;
  }

  .markets-main,
  .movers-main {
    padding-inline: 16px !important;
  }

  .movers-grid,
  .movers-grid-secondary,
  .markets-lists {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (max-width: 760px) {
  .topbar {
    gap: 12px !important;
  }

  .topbar-search {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }

  .topbar nav {
    justify-content: flex-start !important;
    overflow-x: auto !important;
    padding-bottom: 4px !important;
    scrollbar-width: thin;
  }

  .market-clock {
    display: grid !important;
    justify-items: center !important;
    gap: 8px !important;
    padding-inline: 14px !important;
    text-align: center !important;
  }

  .hero {
    padding-inline: 10px !important;
  }

  .hero-copy {
    width: 100% !important;
    max-width: calc(100vw - 20px) !important;
    padding-inline: 16px !important;
  }

  .ticker-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
  }

  .ticker-pill {
    min-width: 0 !important;
  }

  .ticker-pill span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .market-workbench,
  .markets-main,
  .movers-main {
    padding-inline: 10px !important;
  }

  .market-workbench > .market-card,
  .market-workbench > .watchlist,
  .markets-hero,
  .markets-overview,
  .markets-table-panel,
  .movers-panel,
  .movers-disclaimer {
    max-width: calc(100vw - 20px) !important;
  }

  .watchlist-form {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .watchlist-form button {
    width: 100% !important;
  }

  .watch-table,
  .watch-table thead,
  .watch-table tbody,
  .watch-table tr,
  .watch-table td {
    display: block !important;
    width: 100% !important;
  }

  .watch-table thead {
    display: none !important;
  }

  .watch-table tbody tr {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px 12px !important;
    padding: 14px !important;
  }

  .watch-table tbody td {
    padding: 0 !important;
    border: 0 !important;
  }

  .watch-table tbody td:nth-child(2),
  .watch-table tbody td:nth-child(3) {
    text-align: left !important;
  }

  .watch-table tbody td:nth-child(4) {
    grid-column: 2 !important;
    grid-row: 1 / span 2 !important;
    align-self: center !important;
  }

  .watch-stock-line strong,
  .watch-stock-line small {
    white-space: normal !important;
  }

  .markets-row {
    grid-template-columns: minmax(72px, auto) minmax(0, 1fr) !important;
    gap: 6px 12px !important;
    align-items: start !important;
  }

  .markets-row span {
    white-space: normal !important;
  }

  .markets-row em,
  .markets-row b {
    justify-self: start !important;
  }

  .mover-row,
  .mover-list.compact .mover-row {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px 12px !important;
    align-items: center !important;
  }

  .mover-company {
    grid-column: 1 / -1 !important;
  }

  .mover-company strong,
  .mover-session small {
    white-space: normal !important;
    text-overflow: clip !important;
  }

  .mover-session {
    justify-self: start !important;
  }

  .mover-change,
  .mover-action {
    justify-self: end !important;
  }

  .mover-strength {
    grid-column: 1 / -1 !important;
    width: 100% !important;
  }
}

@media (max-width: 420px) {
  .brand-wordmark {
    width: 184px !important;
    min-width: 184px !important;
  }

  .hero-actions {
    grid-template-columns: 1fr !important;
  }

  .ticker-strip {
    grid-template-columns: 1fr !important;
  }

  .quote-head,
  .section-title,
  .movers-panel-head,
  .markets-overview-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    justify-items: start !important;
  }
}

.analysis-hero.is-report-loading {
  position: relative !important;
}

.analysis-hero.is-report-loading::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 4 !important;
  border-radius: inherit !important;
  background: rgba(7, 13, 28, 0.58) !important;
  backdrop-filter: blur(2px);
  pointer-events: none !important;
}

.analysis-report-loading {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  z-index: 5 !important;
  width: min(520px, calc(100% - 32px)) !important;
  transform: translate(-50%, -50%) !important;
  border: 1px solid rgba(122, 167, 255, 0.34) !important;
  border-radius: 999px !important;
  padding: 14px 20px !important;
  color: #f8fbff !important;
  background: rgba(10, 19, 40, 0.92) !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28) !important;
  font-weight: 900 !important;
  text-align: center !important;
  pointer-events: none !important;
}

:root[data-theme="light"] .analysis-hero.is-report-loading::after {
  background: rgba(255, 255, 255, 0.66) !important;
}

:root[data-theme="light"] .analysis-report-loading {
  color: #101828 !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 18px 42px rgba(16, 24, 40, 0.12) !important;
}

.analysis-inline-error {
  margin-top: 16px !important;
}

.analysis-access-blocked {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(760px, 100%);
  margin: 18px auto 0;
  padding: 28px;
  border: 1px solid rgba(122, 167, 255, 0.28);
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 0%, rgba(27, 117, 255, 0.18), transparent 34%),
    radial-gradient(circle at 82% 10%, rgba(16, 185, 129, 0.12), transparent 32%),
    rgba(8, 16, 34, 0.96);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.30);
  color: #ffffff;
  text-align: center;
}

.analysis-access-blocked.finished {
  border-color: rgba(255, 159, 26, 0.46);
}

.analysis-access-blocked.pending {
  border-color: rgba(20, 184, 166, 0.48);
}

.analysis-access-icon {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 999px;
  color: #06111f;
  background: linear-gradient(135deg, #ff9f1a, #62d14f);
  font-size: 28px;
  font-weight: 1000;
  box-shadow: 0 18px 44px rgba(255, 159, 26, 0.24);
}

.analysis-access-blocked.pending .analysis-access-icon {
  color: #ffffff;
  background: linear-gradient(135deg, #1b75ff, #14b8a6);
}

.analysis-access-blocked h3 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.05;
}

.analysis-access-blocked p {
  max-width: 640px;
  margin: 0;
  color: #dbe7ff;
  font-size: 16px;
  line-height: 1.5;
}

.analysis-access-meter {
  display: grid;
  gap: 8px;
  width: min(460px, 100%);
  color: #dbe7ff;
  font-weight: 850;
}

.analysis-access-meter strong {
  color: #8bf7b0;
}

.analysis-access-meter i {
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(219, 231, 255, 0.18);
}

.analysis-access-meter b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1b75ff, #14b8a6, #86ef18);
}

.analysis-access-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.analysis-access-actions a,
.analysis-access-actions button {
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  color: #06111f;
  background: linear-gradient(135deg, #ff9f1a, #62d14f);
  font: inherit;
  font-weight: 950;
  text-decoration: none;
  cursor: pointer;
}

.analysis-access-actions button {
  color: #dbe7ff;
  background: rgba(122, 167, 255, 0.14);
  border: 1px solid rgba(122, 167, 255, 0.28);
}

.analysis-access-blocked small {
  color: #9fb0ca;
  font-weight: 800;
}

:root[data-theme="light"] .analysis-access-blocked {
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.12);
}

:root[data-theme="light"] .analysis-access-blocked h3,
:root[data-theme="light"] .analysis-access-blocked p {
  color: #0f172a;
}

.quota-upgrade-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 22px;
}

.quota-upgrade-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 7, 18, 0.74);
  backdrop-filter: blur(10px);
}

.quota-upgrade-dialog {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(520px, 100%);
  padding: 30px;
  border: 1px solid rgba(255, 159, 26, 0.46);
  border-radius: 24px;
  background:
    radial-gradient(circle at 18% 0%, rgba(27, 117, 255, 0.22), transparent 36%),
    radial-gradient(circle at 84% 8%, rgba(16, 185, 129, 0.16), transparent 34%),
    #081225;
  color: #ffffff;
  text-align: center;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

.quota-upgrade-dialog.pending {
  border-color: rgba(20, 184, 166, 0.48);
}

.quota-upgrade-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(219, 231, 255, 0.18);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(219, 231, 255, 0.12);
  font-weight: 1000;
  cursor: pointer;
}

.quota-upgrade-icon {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 999px;
  color: #06111f;
  background: linear-gradient(135deg, #ff9f1a, #62d14f);
  font-size: 34px;
  font-weight: 1000;
  box-shadow: 0 18px 46px rgba(255, 159, 26, 0.25);
}

.quota-upgrade-dialog.pending .quota-upgrade-icon {
  color: #ffffff;
  background: linear-gradient(135deg, #1b75ff, #14b8a6);
}

.quota-upgrade-dialog h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.04;
}

.quota-upgrade-dialog p {
  max-width: 440px;
  margin: 0;
  color: #dbe7ff;
  font-size: 16px;
  line-height: 1.52;
}

.quota-upgrade-dialog small {
  color: #9fb0ca;
  font-weight: 850;
}

.quota-upgrade-meter {
  display: grid;
  gap: 8px;
  width: 100%;
  color: #dbe7ff;
  font-weight: 850;
}

.quota-upgrade-meter strong {
  color: #8bf7b0;
}

.quota-upgrade-meter i {
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(219, 231, 255, 0.16);
}

.quota-upgrade-meter b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1b75ff, #14b8a6, #86ef18);
}

.quota-upgrade-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.quota-upgrade-actions a,
.quota-upgrade-actions button {
  display: inline-grid;
  place-items: center;
  min-height: 46px;
  min-width: 150px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  color: #06111f;
  background: linear-gradient(135deg, #ff9f1a, #62d14f);
  font: inherit;
  font-weight: 950;
  text-decoration: none;
  cursor: pointer;
}

.quota-upgrade-actions button {
  color: #dbe7ff;
  background: rgba(122, 167, 255, 0.14);
  border: 1px solid rgba(122, 167, 255, 0.28);
}

:root[data-theme="light"] .quota-upgrade-backdrop {
  background: rgba(15, 23, 42, 0.38);
}

:root[data-theme="light"] .quota-upgrade-dialog {
  color: #0f172a;
  background:
    radial-gradient(circle at 18% 0%, rgba(27, 117, 255, 0.12), transparent 36%),
    radial-gradient(circle at 84% 8%, rgba(20, 184, 166, 0.12), transparent 34%),
    #ffffff;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.22);
}

:root[data-theme="light"] .quota-upgrade-dialog h2,
:root[data-theme="light"] .quota-upgrade-dialog p {
  color: #0f172a;
}

:root[data-theme="light"] .quota-upgrade-dialog small,
:root[data-theme="light"] .quota-upgrade-meter {
  color: #475569;
}

:root[data-theme="light"] .quota-upgrade-close {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.12);
}

@media (max-width: 560px) {
  .quota-upgrade-dialog {
    padding: 26px 18px 22px;
  }

  .quota-upgrade-actions a,
  .quota-upgrade-actions button {
    width: 100%;
  }
}

/* Final responsive QA pass: prefer wrapping over clipped market names on compact screens. */
.ticker-pill span,
.home-mover-row strong,
.markets-row span,
.markets-overview-grid strong,
.mover-company strong,
.mover-company em,
.mover-session small,
.heatmap-tile strong {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

.ticker-pill {
  align-items: center !important;
}

.mover-company strong,
.markets-row span,
.markets-overview-grid strong {
  line-height: 1.2 !important;
}

@media (max-width: 760px) {
  .brand-wordmark {
    width: 164px !important;
    min-width: 164px !important;
    max-width: calc(100vw - 210px) !important;
    margin-left: 0 !important;
    transform: none !important;
  }

  .ticker-pill {
    min-height: 46px !important;
  }
}

@media (max-width: 420px) {
  .brand-wordmark {
    width: 150px !important;
    min-width: 150px !important;
    max-width: calc(100vw - 200px) !important;
  }
}

/* Hero search should read as one single field; no divider between lens and text input. */
.hero .search-row,
.hero-copy .search-row,
#stock-search .search-row {
  column-gap: 0 !important;
}

.hero .hero-search-icon,
.hero-copy .hero-search-icon,
#stock-search .hero-search-icon {
  border: 0 !important;
  border-right: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.hero .search-row input,
.hero .search-row input:focus,
.hero .search-row input:focus-visible,
.hero-copy .search-row input,
.hero-copy .search-row input:focus,
.hero-copy .search-row input:focus-visible,
#stock-search .search-row input,
#stock-search .search-row input:focus,
#stock-search .search-row input:focus-visible {
  border: 0 !important;
  border-left: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

:root[data-theme="dark"] body .analysis-company-end.accendion-company-end {
  border-color: rgba(148, 163, 184, 0.22) !important;
  background: transparent !important;
  background-image: none !important;
}

:root[data-theme="dark"] body .analysis-company-end .analysis-company-end-grid span {
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

body .app-footer {
  display: grid !important;
  gap: clamp(28px, 4vw, 44px) !important;
  margin-top: clamp(38px, 6vw, 72px) !important;
  border: 0 !important;
  border-top: 1px solid rgba(122, 167, 255, 0.16) !important;
  border-radius: 0 !important;
  padding: clamp(34px, 5vw, 58px) clamp(18px, 4vw, 46px) !important;
  text-align: center !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(122, 167, 255, 0.08), transparent 34%),
    transparent !important;
  box-shadow: none !important;
}

body .app-footer-brand {
  display: grid !important;
  justify-items: center !important;
  gap: 18px !important;
}

body .app-footer-brand > img {
  width: min(268px, 72vw) !important;
  height: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: 0 18px 42px rgba(122, 167, 255, 0.12) !important;
}

body .app-footer-brand p {
  max-width: 980px !important;
  color: var(--text-soft) !important;
  font-size: clamp(20px, 2.2vw, 30px) !important;
  line-height: 1.35 !important;
}

body .app-footer-brand small {
  color: var(--muted) !important;
  font-size: 17px !important;
}

body .app-footer-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: clamp(18px, 3vw, 36px) !important;
}

body .app-footer-grid article {
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body .app-footer-grid strong {
  color: var(--text) !important;
  font-size: 18px !important;
  text-transform: uppercase !important;
}

body .app-footer-grid span {
  max-width: 360px !important;
  margin-inline: auto !important;
  color: var(--text-soft) !important;
}

@media (max-width: 760px) {
  body .app-footer-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Requested light-theme-only fixes. */
:root[data-theme="light"] #stock-search.search-panel,
:root[data-theme="light"] .search-panel {
  border-color: transparent !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

:root[data-theme="light"] .analysis-search-form button,
:root[data-theme="light"] .analysis-header-search button {
  border: 1px solid rgba(21, 94, 239, 0.28) !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #155eef 0%, #1570ef 58%, #0891b2 100%) !important;
  box-shadow: 0 16px 36px rgba(21, 94, 239, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}

:root[data-theme="light"] .analysis-hero.is-report-loading::after {
  background: rgba(21, 94, 239, 0.08) !important;
  backdrop-filter: none !important;
}

:root[data-theme="light"] .app-footer-brand > img,
:root[data-theme="light"] .analysis-company-wordmark {
  filter: saturate(1.55) contrast(1.45) brightness(0.72) drop-shadow(0 10px 20px rgba(49, 85, 212, 0.12)) !important;
}

:root[data-theme="light"] .analysis-chart-ohlc {
  color: #101828 !important;
  opacity: 1 !important;
  -webkit-text-fill-color: #101828 !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72) !important;
}

:root[data-theme="light"] .analysis-chart-ohlc *,
:root[data-theme="light"] .analysis-chart-ohlc strong,
:root[data-theme="light"] .analysis-chart-ohlc span,
:root[data-theme="light"] .analysis-chart-ohlc em,
:root[data-theme="light"] .analysis-chart-ohlc b {
  color: #101828 !important;
  opacity: 1 !important;
  -webkit-text-fill-color: #101828 !important;
}

:root[data-theme="light"] .stock-explanation.accendion-research-note {
  border-color: #b8c7dc !important;
  color: #101828 !important;
  background: linear-gradient(135deg, #ffffff 0%, #eef6ff 100%) !important;
  box-shadow: 0 16px 36px rgba(16, 24, 40, 0.08) !important;
}

:root[data-theme="light"] .stock-explanation.accendion-research-note h3,
:root[data-theme="light"] .stock-explanation.accendion-research-note p,
:root[data-theme="light"] .stock-explanation.accendion-research-note small {
  color: #101828 !important;
}

:root[data-theme="light"] .research-decision-grid article {
  border-color: #cbdaf0 !important;
  background: #ffffff !important;
}

:root[data-theme="light"] .research-decision-grid span,
:root[data-theme="light"] .research-decision-grid small {
  color: #344054 !important;
}

:root[data-theme="light"] .research-decision-grid strong {
  color: #101828 !important;
}

/* Last responsive QA override: keep logos and long names readable at every audited size. */
.ticker-pill span,
.home-mover-row strong,
.markets-row span,
.markets-row small,
.markets-overview-grid small,
.markets-overview-grid strong,
.mover-company strong,
.mover-company em,
.mover-session small,
.heatmap-tile strong {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

@media (max-width: 760px) {
  body .topbar .brand-wordmark,
  .topbar .brand-wordmark,
  .brand-wordmark {
    width: 164px !important;
    min-width: 164px !important;
    max-width: 164px !important;
    margin-left: 0 !important;
    transform: none !important;
  }
}

@media (max-width: 420px) {
  body .topbar .brand-wordmark,
  .topbar .brand-wordmark,
  .brand-wordmark {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
  }
}


/* ===== CHAT INTERFACE POLISH ===== */

/* Reduce space in user messages - compact layout */
article.chat-user {
  padding: 8px 12px !important;
}

article.chat-user .chat-content {
  margin: 0 !important;
  padding: 0 !important;
}

article.chat-user .chat-content p {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.4;
}

/* Move action buttons to the right side of chat bubbles */
.chat-action-buttons {
  display: flex !important;
  gap: 10px !important;
  justify-content: flex-end !important;
  align-items: center !important;
  margin-top: 6px !important;
  padding-top: 0 !important;
}

.chat-action-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
  color: rgba(148, 163, 184, 0.6) !important;
  transition: color 0.15s ease !important;
  width: auto !important;
  height: auto !important;
}

.chat-action-btn:hover {
  color: rgba(100, 116, 139, 0.9) !important;
  background: transparent !important;
}

.chat-action-btn svg {
  width: 16px !important;
  height: 16px !important;
}

.chat-action-btn.active {
  color: rgb(59, 130, 246) !important;
}

/* Dark theme adjustments */
[data-theme="dark"] .chat-action-btn {
  color: rgba(148, 163, 184, 0.5) !important;
}

[data-theme="dark"] .chat-action-btn:hover {
  color: rgba(226, 232, 240, 0.85) !important;
  background: transparent !important;
}

[data-theme="dark"] .chat-action-btn.active {
  color: rgb(96, 165, 250) !important;
}

/* Scroll-to-bottom button */
.chat-scroll-bottom {
  position: fixed !important;
  bottom: 120px !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(15px) scale(0.85) !important;
  width: 40px !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
  border-radius: 50% !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
  cursor: pointer !important;
  transition: all 0.25s ease !important;
  opacity: 0 !important;
  visibility: hidden !important;
  z-index: 999 !important;
  color: rgba(51, 65, 85, 0.75) !important;
  pointer-events: none !important;
  padding: 0 !important;
  line-height: 1 !important;
}

.chat-scroll-bottom.visible {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(-50%) translateY(0) scale(1) !important;
  pointer-events: auto !important;
}

.chat-scroll-bottom:hover {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(148, 163, 184, 0.35) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15) !important;
  transform: translateX(-50%) translateY(-2px) scale(1.08) !important;
  color: rgba(15, 23, 42, 0.9) !important;
}

.chat-scroll-bottom:active {
  transform: translateX(-50%) translateY(0) scale(0.95) !important;
}

.chat-scroll-bottom svg {
  width: 20px !important;
  height: 20px !important;
  stroke-width: 2.5 !important;
}

/* Dark theme scroll button */
[data-theme="dark"] .chat-scroll-bottom {
  background: rgba(30, 41, 59, 0.85) !important;
  border-color: rgba(71, 85, 105, 0.35) !important;
  color: rgba(226, 232, 240, 0.8) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .chat-scroll-bottom.visible {
  opacity: 1 !important;
  visibility: visible !important;
}

[data-theme="dark"] .chat-scroll-bottom:hover {
  background: rgba(30, 41, 59, 0.95) !important;
  border-color: rgba(71, 85, 105, 0.5) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4) !important;
  transform: translateX(-50%) translateY(-2px) scale(1.08) !important;
  color: rgba(248, 250, 252, 0.95) !important;
}

[data-theme="dark"] .chat-scroll-bottom:active {
  transform: translateX(-50%) translateY(0) scale(0.95) !important;
}

/* Requested 2026-06-18 fixes: visible dark nav CTA, real plan picker, chat bubble spacing, and durable scroll arrow. */
:root[data-theme="dark"] .topbar nav .nav-get-started,
:root[data-theme="dark"] .nav-get-started {
  border: 1px solid rgba(255, 183, 77, 0.9) !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #ff8a1f 0%, #ffb020 100%) !important;
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.34) !important;
  text-shadow: none !important;
}

:root[data-theme="dark"] .topbar nav .nav-get-started:hover,
:root[data-theme="dark"] .topbar nav .nav-get-started:focus-visible,
:root[data-theme="dark"] .nav-get-started:hover,
:root[data-theme="dark"] .nav-get-started:focus-visible {
  border-color: rgba(255, 206, 115, 0.98) !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #f97316 0%, #f59e0b 100%) !important;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.22), 0 16px 34px rgba(249, 115, 22, 0.28) !important;
  text-shadow: none !important;
}

.subscription-billing {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 18px 26px 0;
}

.subscription-billing button {
  min-height: 40px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--text-soft);
  font-weight: 900;
  background: rgba(255, 255, 255, 0.06);
}

.subscription-billing button.active {
  color: #102012;
  background: linear-gradient(135deg, #f97316, #facc15, #22c55e);
}

.subscription-billing span {
  margin-left: 6px;
  font-size: 12px;
}

.subscription-plans {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.subscription-plan {
  min-height: 390px !important;
  border-radius: 8px !important;
}

.subscription-plan.selected {
  border-color: rgba(94, 234, 212, 0.8) !important;
  box-shadow: 0 0 0 2px rgba(94, 234, 212, 0.2), 0 18px 48px rgba(20, 184, 166, 0.14) !important;
}

.subscription-plan button:disabled {
  cursor: default;
  color: #06111f !important;
  background: #ffffff !important;
}

.chat-messages article.chat-user,
.chat-messages article.chat-message.chat-user,
#chat-messages article.chat-user,
#chat-messages article.chat-message.chat-user {
  width: fit-content !important;
  min-width: 0 !important;
  padding: 8px 10px 6px !important;
  row-gap: 4px !important;
}

.chat-messages article.chat-user .chat-content p,
#chat-messages article.chat-user .chat-content p {
  line-height: 1.3 !important;
  overflow-wrap: anywhere !important;
}

.chat-like-btn.active,
.chat-like-btn.active:hover,
[data-theme="dark"] .chat-like-btn.active,
[data-theme="dark"] .chat-like-btn.active:hover {
  color: #22c55e !important;
}

.chat-dislike-btn.active,
.chat-dislike-btn.active:hover,
[data-theme="dark"] .chat-dislike-btn.active,
[data-theme="dark"] .chat-dislike-btn.active:hover {
  color: #ef4444 !important;
}

#chat-scroll-bottom.chat-scroll-bottom,
.chat-messages #chat-scroll-bottom.chat-scroll-bottom {
  position: sticky !important;
  bottom: 16px !important;
  left: auto !important;
  align-self: center !important;
  margin: -48px auto 8px !important;
  transform: translateY(12px) scale(0.9) !important;
}

#chat-scroll-bottom.chat-scroll-bottom.visible,
.chat-messages #chat-scroll-bottom.chat-scroll-bottom.visible {
  transform: translateY(0) scale(1) !important;
}

#chat-scroll-bottom.chat-scroll-bottom:hover,
.chat-messages #chat-scroll-bottom.chat-scroll-bottom:hover {
  transform: translateY(-2px) scale(1.06) !important;
}

@media (max-width: 1100px) {
  .subscription-plans {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  .subscription-modal-head {
    display: grid !important;
  }

  .subscription-billing {
    padding-inline: 18px;
  }

  .subscription-plans {
    grid-template-columns: 1fr !important;
  }
}

/* Final upgrade modal safety: keep the plans panel above every polished header/tool layer. */
body #subscription-overlay.subscription-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 6000 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  padding: clamp(10px, 2vw, 24px) !important;
  overflow: auto !important;
  background: rgba(2, 6, 23, 0.72) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

body #subscription-overlay.subscription-overlay.open {
  display: flex !important;
}

body #subscription-overlay .subscription-modal {
  position: relative !important;
  z-index: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  width: min(1120px, calc(100vw - 32px)) !important;
  max-height: min(760px, calc(100dvh - 32px)) !important;
  overflow: hidden !important;
  border: 1px solid rgba(250, 204, 21, 0.34) !important;
  border-radius: 14px !important;
  background:
    radial-gradient(circle at 20% 0%, rgba(250, 204, 21, 0.16), transparent 28%),
    radial-gradient(circle at 86% 12%, rgba(34, 197, 94, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.99), rgba(8, 13, 25, 0.99)) !important;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42), 0 0 60px rgba(249, 115, 22, 0.16) !important;
}

body #subscription-overlay .subscription-modal-head {
  flex: 0 0 auto !important;
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 14px !important;
  padding: clamp(18px, 2.2vw, 26px) !important;
}

body #subscription-overlay .subscription-modal-head h2 {
  max-width: 780px !important;
  margin: 0 !important;
  font-size: clamp(24px, 3vw, 34px) !important;
  line-height: 1.12 !important;
}

body #subscription-overlay .subscription-modal-head p:not(.eyebrow) {
  max-width: 720px !important;
  margin: 10px 0 0 !important;
  line-height: 1.35 !important;
}

body #subscription-overlay .subscription-billing {
  flex: 0 0 auto !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  padding: 16px clamp(18px, 2.2vw, 26px) 0 !important;
}

body #subscription-overlay .subscription-billing button {
  min-width: 0 !important;
}

body #subscription-overlay .subscription-plans {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: auto !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(190px, 1fr)) !important;
  gap: 14px !important;
  padding: 22px clamp(18px, 2.2vw, 26px) 26px !important;
}

body #subscription-overlay .subscription-plan {
  min-height: 0 !important;
  border-radius: 10px !important;
  padding: 18px !important;
}

body #subscription-overlay .subscription-plan strong {
  font-size: clamp(26px, 3vw, 36px) !important;
}

@media (max-width: 980px) {
  body #subscription-overlay .subscription-plans {
    grid-template-columns: repeat(2, minmax(220px, 1fr)) !important;
  }
}

@media (max-width: 620px) {
  body #subscription-overlay.subscription-overlay {
    align-items: stretch !important;
    padding: 8px !important;
  }

  body #subscription-overlay .subscription-modal {
    width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
    border-radius: 12px !important;
  }

  body #subscription-overlay .subscription-modal-head {
    grid-template-columns: 1fr auto !important;
    padding: 16px !important;
  }

  body #subscription-overlay .subscription-modal-head h2 {
    font-size: 24px !important;
  }

  body #subscription-overlay .subscription-modal-head p:not(.eyebrow) {
    font-size: 15px !important;
  }

  body #subscription-overlay .subscription-billing {
    padding: 14px 16px 0 !important;
  }

  body #subscription-overlay .subscription-plans {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 18px 16px 20px !important;
  }

  body #subscription-overlay .subscription-plan {
    padding: 16px !important;
  }
}

/* Upgrade dialog card polish: final visual layer. */
body #subscription-overlay .subscription-modal {
  color: #f8fafc !important;
}

body #subscription-overlay .subscription-modal-head {
  align-items: start !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18) !important;
  background:
    radial-gradient(circle at 72% 0%, rgba(20, 184, 166, 0.16), transparent 32%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(8, 31, 38, 0.96)) !important;
}

body #subscription-overlay .subscription-modal-head .eyebrow {
  margin: 0 0 10px !important;
  color: #7aa7ff !important;
  font-size: 13px !important;
  letter-spacing: 0 !important;
}

body #subscription-overlay .subscription-modal-head h2 {
  max-width: 820px !important;
  font-size: clamp(28px, 3vw, 40px) !important;
  line-height: 1.08 !important;
}

body #subscription-overlay .subscription-modal-head p:not(.eyebrow) {
  max-width: 760px !important;
  color: #cbd5e1 !important;
  font-size: 16px !important;
}

body #subscription-overlay #close-subscription.close-chat {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #dbeafe !important;
  font-size: 24px !important;
  line-height: 1 !important;
  background: rgba(15, 23, 42, 0.72) !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  box-shadow: none !important;
}

body #subscription-overlay #close-subscription.close-chat:hover,
body #subscription-overlay #close-subscription.close-chat:focus-visible {
  color: #ffffff !important;
  background: rgba(30, 41, 59, 0.95) !important;
  border-color: rgba(125, 211, 252, 0.42) !important;
}

body #subscription-overlay .subscription-billing {
  width: min(720px, calc(100% - 48px)) !important;
  margin: 18px auto 0 !important;
  padding: 4px !important;
  border: 1px solid rgba(148, 163, 184, 0.24) !important;
  border-radius: 999px !important;
  background: rgba(15, 23, 42, 0.72) !important;
}

body #subscription-overlay .subscription-billing button {
  min-height: 42px !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #cbd5e1 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body #subscription-overlay .subscription-billing button.active {
  color: #0f172a !important;
  background: linear-gradient(135deg, #ff8a1f, #facc15 48%, #3acc5c) !important;
}

body #subscription-overlay .subscription-plans {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
  padding-top: 24px !important;
}

body #subscription-overlay .subscription-plan {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  min-height: 360px !important;
  border: 1px solid rgba(100, 116, 139, 0.36) !important;
  border-radius: 12px !important;
  padding: 18px !important;
  background:
    radial-gradient(circle at 16% 0%, rgba(125, 211, 252, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(8, 14, 28, 0.94)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

body #subscription-overlay .subscription-plan.selected {
  border-color: rgba(45, 212, 191, 0.55) !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(45, 212, 191, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(13, 26, 39, 0.98), rgba(7, 13, 26, 0.98)) !important;
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

body #subscription-overlay .subscription-plan.featured {
  border-color: rgba(250, 204, 21, 0.48) !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(250, 204, 21, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(18, 28, 43, 0.98), rgba(8, 14, 28, 0.98)) !important;
}

body #subscription-overlay .plan-badge {
  margin-bottom: 16px !important;
  border-radius: 999px !important;
  padding: 5px 10px !important;
  color: #0f172a !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  background: linear-gradient(135deg, #ff8a1f, #facc15 55%, #3acc5c) !important;
}

body #subscription-overlay .subscription-plan h3 {
  margin: 0 0 8px !important;
  color: #f8fafc !important;
  font-size: 21px !important;
  line-height: 1.15 !important;
}

body #subscription-overlay .subscription-plan p {
  min-height: 42px !important;
  margin: 0 0 16px !important;
  color: #cbd5e1 !important;
  font-size: 15px !important;
  line-height: 1.25 !important;
}

body #subscription-overlay .subscription-plan strong {
  display: flex !important;
  align-items: baseline !important;
  gap: 4px !important;
  margin: 0 0 16px !important;
  color: #ffffff !important;
  font-size: clamp(27px, 2.2vw, 34px) !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body #subscription-overlay .subscription-plan strong span {
  color: #cbd5e1 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
}

body #subscription-overlay .subscription-plan ul {
  display: grid !important;
  gap: 9px !important;
  margin: 0 0 18px !important;
  padding: 0 !important;
  color: #dbe4f0 !important;
  font-size: 14px !important;
  line-height: 1.25 !important;
  list-style: none !important;
}

body #subscription-overlay .subscription-plan li {
  position: relative !important;
  display: block !important;
  padding-left: 18px !important;
}

body #subscription-overlay .subscription-plan li::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: 0.48em !important;
  width: 7px !important;
  height: 4px !important;
  border-left: 2px solid #22c55e !important;
  border-bottom: 2px solid #22c55e !important;
  transform: rotate(-45deg) !important;
}

body #subscription-overlay .subscription-plan button {
  width: 100% !important;
  min-height: 44px !important;
  margin-top: auto !important;
  border-radius: 10px !important;
  color: #0f172a !important;
  font-weight: 900 !important;
  background: #e8eef8 !important;
  border: 1px solid rgba(226, 232, 240, 0.78) !important;
  box-shadow: none !important;
}

body #subscription-overlay .subscription-plan button:not(:disabled):hover,
body #subscription-overlay .subscription-plan button:not(:disabled):focus-visible {
  background: #ffffff !important;
  transform: translateY(-1px) !important;
}

body #subscription-overlay .subscription-plan button:disabled {
  opacity: 1 !important;
  color: #0f172a !important;
  background: #ffffff !important;
}

@media (max-width: 1180px) {
  body #subscription-overlay .subscription-plans {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body #subscription-overlay .subscription-plan {
    min-height: 320px !important;
  }
}

@media (max-width: 700px) {
  body #subscription-overlay .subscription-modal-head h2 {
    font-size: 26px !important;
  }

  body #subscription-overlay .subscription-billing {
    width: calc(100% - 32px) !important;
  }

  body #subscription-overlay .subscription-plans {
    grid-template-columns: 1fr !important;
  }

  body #subscription-overlay .subscription-plan {
    min-height: 0 !important;
  }
}

/* Dedicated Upgrade page */
body.upgrade-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(122, 167, 255, 0.2), transparent 32%),
    radial-gradient(circle at 88% 10%, rgba(20, 184, 166, 0.2), transparent 34%),
    linear-gradient(180deg, #090f1f 0%, #06111f 48%, #07131c 100%);
}

body.upgrade-page .topbar {
  position: sticky;
  top: 0;
}

.upgrade-shell {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.upgrade-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  border: 1px solid rgba(122, 167, 255, 0.18);
  border-radius: 10px;
  padding: clamp(24px, 4vw, 44px);
  background:
    radial-gradient(circle at 75% 10%, rgba(20, 184, 166, 0.16), transparent 32%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(8, 31, 38, 0.88));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.upgrade-hero h1 {
  max-width: none;
  margin: 0;
  color: #f8fafc;
  font-size: clamp(44px, 5.6vw, 86px);
  line-height: 1.02;
  white-space: nowrap;
}

.upgrade-hero p:not(.eyebrow) {
  max-width: 780px;
  margin: 18px 0 0;
  color: #cbd5e1;
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.42;
}

.upgrade-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  padding: 0 16px;
  color: #dbeafe;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.58);
}

.upgrade-control-panel {
  display: flex;
  justify-content: center;
  margin: 24px 0;
}

.upgrade-billing {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: min(720px, 100%);
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 999px;
  padding: 5px;
  background: rgba(15, 23, 42, 0.74);
}

.upgrade-billing button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  color: #cbd5e1;
  font-weight: 950;
  background: transparent;
}

.upgrade-billing button.active {
  color: #0f172a;
  background: linear-gradient(135deg, #ff8a1f 0%, #facc15 48%, #3acc5c 100%);
}

.upgrade-billing span {
  margin-left: 6px;
  font-size: 12px;
}

#upgrade-status {
  display: none;
  margin: 0;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  padding: 13px 15px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.55);
}

#upgrade-status[data-tone="success"] {
  border-color: rgba(34, 197, 94, 0.36);
  color: #bbf7d0;
}

#upgrade-status[data-tone="warning"] {
  border-color: rgba(250, 204, 21, 0.36);
  color: #fef3c7;
}

.upgrade-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.upgrade-plan {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 500px;
  border: 1px solid rgba(100, 116, 139, 0.36);
  border-radius: 10px;
  padding: 22px;
  background:
    radial-gradient(circle at 18% 0%, rgba(125, 211, 252, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(8, 14, 28, 0.95));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.upgrade-plan.selected {
  border-color: rgba(45, 212, 191, 0.58);
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.upgrade-plan.featured {
  border-color: rgba(250, 204, 21, 0.5);
  background:
    radial-gradient(circle at 18% 0%, rgba(250, 204, 21, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(18, 28, 43, 0.98), rgba(8, 14, 28, 0.98));
}

.upgrade-badge {
  width: fit-content;
  margin-bottom: 18px;
  border-radius: 999px;
  padding: 5px 11px;
  color: #0f172a;
  font-size: 12px;
  font-weight: 950;
  background: linear-gradient(135deg, #ff8a1f, #facc15 55%, #3acc5c);
}

.upgrade-plan h2 {
  margin: 0 0 8px;
  color: #f8fafc;
  font-size: 26px;
  line-height: 1.1;
}

.upgrade-plan p {
  min-height: 42px;
  margin: 0 0 18px;
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.28;
}

.upgrade-plan strong {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 0 0 20px;
  color: #ffffff;
  font-size: clamp(34px, 3vw, 46px);
  line-height: 1;
  white-space: nowrap;
}

.upgrade-plan strong span {
  color: #cbd5e1;
  font-size: 15px;
  font-weight: 850;
}

.upgrade-plan ul {
  display: grid;
  gap: 11px;
  margin: 0 0 22px;
  padding: 0;
  color: #dbe4f0;
  font-size: 14px;
  line-height: 1.25;
  list-style: none;
}

.upgrade-plan li {
  position: relative;
  padding-left: 20px;
}

.upgrade-plan li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.48em;
  width: 8px;
  height: 4px;
  border-left: 2px solid #22c55e;
  border-bottom: 2px solid #22c55e;
  transform: rotate(-45deg);
}

.upgrade-plan button {
  width: 100%;
  min-height: 46px;
  margin-top: auto;
  border: 1px solid rgba(250, 204, 21, 0.36);
  border-radius: 10px;
  color: #0f172a;
  font-weight: 950;
  background: linear-gradient(135deg, #ff8a1f 0%, #facc15 50%, #3acc5c 100%);
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.18);
}

.upgrade-plan button:not(:disabled):hover,
.upgrade-plan button:not(:disabled):focus-visible {
  background: linear-gradient(135deg, #f97316 0%, #fde047 52%, #22c55e 100%);
  transform: translateY(-1px);
}

.upgrade-plan button:disabled {
  cursor: default;
  opacity: 1;
  color: #0f172a;
  background: linear-gradient(135deg, #f59e0b 0%, #facc15 52%, #22c55e 100%);
}

.upgrade-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  margin-top: 22px;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 10px;
  padding: 16px 18px;
  color: #cbd5e1;
  background: rgba(8, 31, 38, 0.54);
}

.upgrade-summary strong {
  color: #f8fafc;
}

@media (max-width: 1100px) {
  .upgrade-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .upgrade-shell {
    width: min(100% - 24px, 720px);
    padding-top: 18px;
  }

  .upgrade-hero,
  .upgrade-summary {
    grid-template-columns: 1fr;
  }

  .upgrade-hero h1 {
    white-space: normal;
  }

  .upgrade-grid {
    grid-template-columns: 1fr;
  }

  .upgrade-plan {
    min-height: 0;
  }
}

/* Final Upgrade page and chat polish */
body .topbar nav .nav-subscribe,
body .topbar nav .nav-subscribe:visited {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  text-decoration: none !important;
  background:
    radial-gradient(circle at 22% 20%, rgba(255, 255, 255, 0.62), transparent 22%),
    linear-gradient(135deg, #ff8a1f 0%, #facc15 100%) !important;
  border: 1px solid rgba(255, 206, 115, 0.88) !important;
  box-shadow: 0 10px 28px rgba(249, 115, 22, 0.32) !important;
  opacity: 1 !important;
}

body .topbar nav .nav-subscribe:hover,
body .topbar nav .nav-subscribe:focus-visible,
body .topbar nav .nav-subscribe.active,
body .topbar nav .nav-subscribe[aria-current="page"] {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  background:
    radial-gradient(circle at 22% 20%, rgba(255, 255, 255, 0.7), transparent 22%),
    linear-gradient(135deg, #f97316 0%, #fde047 100%) !important;
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.2), 0 16px 36px rgba(249, 115, 22, 0.36) !important;
  opacity: 1 !important;
}

body.upgrade-page .topbar {
  grid-template-columns: auto minmax(210px, 390px) minmax(0, 1fr) !important;
  min-height: 88px !important;
  padding: 12px 32px !important;
  overflow: visible !important;
}

body.upgrade-page .topbar .brand {
  min-width: 220px !important;
}

body.upgrade-page .topbar .brand-wordmark {
  width: 220px !important;
  min-width: 220px !important;
}

body.upgrade-page .topbar nav {
  justify-content: flex-end !important;
  gap: clamp(16px, 1.7vw, 28px) !important;
  margin-left: 0 !important;
}

body.upgrade-page .topbar nav a {
  white-space: nowrap !important;
}

body.upgrade-page .topbar nav .nav-subscribe {
  min-height: 50px !important;
  padding: 0 22px !important;
  border-radius: 9px !important;
}

body.upgrade-page .upgrade-shell {
  width: min(1360px, calc(100% - 48px)) !important;
}

body.upgrade-page .upgrade-hero {
  display: flex !important;
  justify-content: center !important;
  text-align: center !important;
  padding: clamp(34px, 5vw, 72px) 28px !important;
}

body.upgrade-page .upgrade-hero > div {
  width: min(1060px, 100%) !important;
}

body.upgrade-page .upgrade-hero .eyebrow,
body.upgrade-page .upgrade-back-link {
  display: none !important;
}

body.upgrade-page .upgrade-hero h1 {
  margin: 0 !important;
  font-size: clamp(48px, 6vw, 84px) !important;
  line-height: 1.02 !important;
  white-space: normal !important;
}

body.upgrade-page .upgrade-hero p:not(.eyebrow) {
  max-width: 1120px !important;
  margin: 18px auto 0 !important;
  color: #dbe4f0 !important;
  font-size: clamp(19px, 2vw, 28px) !important;
  line-height: 1.32 !important;
  white-space: normal !important;
  text-wrap: balance !important;
}

body.upgrade-page .upgrade-control-panel {
  margin: 30px 0 !important;
}

body.upgrade-page .upgrade-billing {
  width: min(760px, 100%) !important;
}

body.upgrade-page .upgrade-footer {
  width: 100% !important;
  margin: 44px 0 0 !important;
}

body.upgrade-page .upgrade-footer .app-footer-brand {
  text-align: center !important;
}

body.upgrade-page .upgrade-footer .app-footer-brand p {
  max-width: 1120px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

#chat-messages article.chat-user,
#chat-messages article.chat-message.chat-user,
.chat-messages article.chat-user,
.chat-messages article.chat-message.chat-user {
  display: inline-flex !important;
  flex-direction: column !important;
  align-self: flex-end !important;
  width: fit-content !important;
  min-width: 0 !important;
  max-width: min(70%, 620px) !important;
  margin: 7px 0 4px auto !important;
  padding: 8px 10px 6px !important;
  gap: 4px !important;
}

#chat-messages article.chat-user .chat-content,
#chat-messages article.chat-message.chat-user .chat-content,
.chat-messages article.chat-user .chat-content,
.chat-messages article.chat-message.chat-user .chat-content {
  width: auto !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

#chat-messages article.chat-user .chat-content p,
#chat-messages article.chat-message.chat-user .chat-content p,
.chat-messages article.chat-user .chat-content p,
.chat-messages article.chat-message.chat-user .chat-content p {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.3 !important;
  overflow-wrap: anywhere !important;
}

@media (max-width: 900px) {
  body.upgrade-page .topbar {
    grid-template-columns: 1fr !important;
    justify-items: center !important;
    gap: 14px !important;
  }

  body.upgrade-page .topbar nav {
    justify-content: center !important;
    flex-wrap: wrap !important;
    margin-left: 0 !important;
  }
}

@media (max-width: 1250px) {
  body.upgrade-page .topbar {
    grid-template-columns: auto minmax(180px, 300px) minmax(0, 1fr) !important;
    padding-inline: 22px !important;
  }

  body.upgrade-page .topbar .brand,
  body.upgrade-page .topbar .brand-wordmark {
    width: 190px !important;
    min-width: 190px !important;
  }

  body.upgrade-page .topbar nav {
    gap: 14px !important;
  }
}

/* Global page navigation and support controls */
.page-back-button,
.page-close-button,
.floating-support-button {
  position: fixed;
  z-index: 2200;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.32);
  color: #f8fafc;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.page-back-button {
  top: 104px;
  left: 22px;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(135deg, #251557 0%, #2461a6 48%, #2dd4bf 100%);
  box-shadow: 0 16px 38px rgba(20, 184, 166, 0.28);
}

.page-back-button svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 5.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-back-button span {
  display: block;
  color: #f8fafc;
  font-family: Arial, sans-serif;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-1px);
}

.page-back-button[hidden] {
  display: none !important;
}

.page-close-button {
  top: 104px;
  right: 22px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
}

.page-close-button span {
  font-size: 32px;
  font-weight: 950;
  line-height: 1;
}

.floating-support-button {
  right: 24px;
  bottom: 24px;
  width: 62px;
  height: 62px;
  border-radius: 999px;
  color: #ffffff;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.56), transparent 24%),
    linear-gradient(135deg, #ff4d00 0%, #f97316 52%, #2563eb 100%);
  box-shadow: 0 18px 44px rgba(249, 115, 22, 0.38), 0 0 0 6px rgba(37, 99, 235, 0.08);
}

.floating-support-button svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-back-button:hover,
.page-back-button:focus-visible,
.page-close-button:hover,
.page-close-button:focus-visible,
.floating-support-button:hover,
.floating-support-button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(250, 204, 21, 0.65);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.36), 0 0 0 4px rgba(250, 204, 21, 0.14);
}

body.upgrade-page .upgrade-grid {
  align-items: stretch;
  justify-content: center;
}

body.upgrade-page .upgrade-plan {
  text-align: center;
}

body.upgrade-page .upgrade-badge {
  margin-left: auto;
  margin-right: auto;
}

body.upgrade-page .upgrade-plan strong {
  justify-content: center;
}

body.upgrade-page .upgrade-plan ul {
  text-align: left;
}

body.upgrade-page .upgrade-plan button {
  background: linear-gradient(135deg, #ff8a1f 0%, #facc15 50%, #3acc5c 100%) !important;
  color: #0f172a !important;
}

/* Full page Help Center */
body.help-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(37, 99, 235, 0.16), transparent 32%),
    radial-gradient(circle at 86% 4%, rgba(20, 184, 166, 0.16), transparent 30%),
    linear-gradient(180deg, #070b18 0%, #06111f 52%, #060a16 100%);
}

.help-shell {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 46px 0 58px;
}

.help-hero {
  display: flex;
  justify-content: center;
  border: 1px solid rgba(122, 167, 255, 0.18);
  border-radius: 10px;
  padding: clamp(34px, 5vw, 70px) 28px;
  text-align: center;
  background:
    radial-gradient(circle at 70% 10%, rgba(20, 184, 166, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(8, 31, 38, 0.88));
}

.help-hero > div {
  width: min(980px, 100%);
}

.help-hero h1 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(50px, 7vw, 94px);
  line-height: 1;
}

.help-hero p {
  max-width: 980px;
  margin: 18px auto 0;
  color: #dbe4f0;
  font-size: clamp(18px, 2vw, 28px);
  line-height: 1.35;
  text-wrap: balance;
}

.help-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(0, 1.14fr);
  gap: 22px;
  margin-top: 28px;
}

.help-topics {
  display: grid;
  gap: 14px;
  align-content: start;
}

.help-topics button {
  display: grid;
  gap: 7px;
  min-height: 104px;
  border: 1px solid rgba(100, 116, 139, 0.36);
  border-radius: 10px;
  padding: 18px;
  text-align: left;
  color: #e5edf8;
  background:
    radial-gradient(circle at 10% 0%, rgba(125, 211, 252, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(8, 14, 28, 0.95));
}

.help-topics button:hover,
.help-topics button:focus-visible {
  border-color: rgba(45, 212, 191, 0.56);
  transform: translateY(-1px);
}

.help-topics strong {
  color: #f8fafc;
  font-size: 18px;
}

.help-topics span {
  color: #cbd5e1;
  line-height: 1.36;
}

.help-chat-card {
  display: grid;
  grid-template-rows: auto minmax(360px, 1fr) auto;
  min-height: 560px;
  border: 1px solid rgba(45, 212, 191, 0.28);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(8, 14, 28, 0.94);
}

.help-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  padding: 18px 20px;
  background: rgba(15, 23, 42, 0.84);
}

.help-chat-head strong {
  display: block;
  color: #f8fafc;
  font-size: 18px;
}

.help-chat-head span {
  display: block;
  margin-top: 3px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
}

.help-chat-log {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  overflow: auto;
}

.help-message {
  width: fit-content;
  max-width: min(78%, 620px);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  padding: 12px 14px;
  color: #e5edf8;
  background: rgba(30, 41, 59, 0.78);
}

.help-message.user {
  align-self: flex-end;
  border-color: rgba(34, 197, 94, 0.26);
  background: rgba(5, 95, 55, 0.88);
}

.help-message.bot {
  align-self: flex-start;
}

.help-message strong {
  display: block;
  margin-bottom: 5px;
  color: #f8fafc;
  font-size: 13px;
}

.help-message p {
  margin: 0;
  line-height: 1.42;
  white-space: pre-line;
}

.help-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding: 14px;
}

.help-chat-form input {
  min-height: 52px;
  border: 1px solid rgba(122, 167, 255, 0.26);
  border-radius: 10px;
  padding: 0 15px;
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.82);
}

.help-chat-form button {
  min-height: 52px;
  border: 1px solid rgba(250, 204, 21, 0.4);
  border-radius: 10px;
  padding: 0 22px;
  color: #0f172a;
  font-weight: 950;
  background: linear-gradient(135deg, #ff8a1f 0%, #facc15 50%, #3acc5c 100%);
}

.help-footer {
  width: 100%;
  margin-top: 28px;
}

.help-footer .app-footer-brand {
  text-align: center;
}

.help-footer .app-footer-brand p {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 900px) {
  .page-back-button {
    top: 118px;
    left: 14px;
    width: 42px;
    height: 42px;
  }

  .page-close-button {
    top: 118px;
    right: 14px;
    width: 42px;
    height: 42px;
  }

  .floating-support-button {
    right: 16px;
    bottom: 16px;
    width: 56px;
    height: 56px;
  }

  .help-shell {
    width: min(100% - 24px, 720px);
    padding-top: 26px;
  }

  .help-layout {
    grid-template-columns: 1fr;
  }

  .help-chat-card {
    min-height: 520px;
  }
}

/* Final support/upgrade alignment pass */
body .topbar nav .nav-subscribe,
body .topbar nav .nav-subscribe:visited,
body .topbar nav .nav-subscribe:hover,
body .topbar nav .nav-subscribe:focus-visible,
body .topbar nav .nav-subscribe.active,
body .topbar nav .nav-subscribe[aria-current="page"] {
  min-height: 42px !important;
  padding: 0 16px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  color: #263142 !important;
  -webkit-text-fill-color: #263142 !important;
  font-weight: 760 !important;
  text-shadow: none !important;
}

body.upgrade-page .upgrade-shell {
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 30px 0 60px !important;
}

body.upgrade-page .upgrade-hero {
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: clamp(22px, 3vw, 42px) 28px !important;
}

body.upgrade-page .upgrade-hero h1 {
  font-size: clamp(40px, 4.5vw, 64px) !important;
}

body.upgrade-page .upgrade-hero p:not(.eyebrow) {
  max-width: 860px !important;
  font-size: clamp(17px, 1.45vw, 22px) !important;
}

body.upgrade-page .upgrade-control-panel {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: min(760px, 100%) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 26px !important;
  margin-bottom: 26px !important;
}

body.upgrade-page .upgrade-billing {
  width: 100% !important;
  max-width: 760px !important;
}

body.upgrade-page .upgrade-state-note {
  margin: 0 !important;
  border: 1px solid rgba(45, 212, 191, 0.32) !important;
  border-radius: 9px !important;
  padding: 15px 18px !important;
  color: #a7f3d0 !important;
  font-size: 15px !important;
  font-weight: 850 !important;
  background: rgba(8, 20, 35, 0.86) !important;
}

body.upgrade-page .upgrade-grid {
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 20px !important;
}

body.upgrade-page .upgrade-plan {
  min-height: 590px !important;
  padding: 28px !important;
  text-align: left !important;
}

body.upgrade-page .upgrade-plan p {
  min-height: 0 !important;
  margin-bottom: 14px !important;
}

body.upgrade-page .upgrade-plan strong {
  margin-bottom: 16px !important;
  justify-content: flex-start !important;
  font-size: clamp(40px, 3.2vw, 56px) !important;
}

body.upgrade-page .upgrade-plan ul {
  gap: 14px !important;
  font-size: 16px !important;
}

body.upgrade-page .upgrade-badge {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body.upgrade-page .upgrade-state-note {
  display: flex !important;
  gap: 18px !important;
  align-items: center !important;
  margin-top: 26px !important;
}

body.upgrade-page .upgrade-state-note strong {
  color: #f8fafc !important;
  white-space: nowrap !important;
}

body.upgrade-page .upgrade-state-note span {
  color: #dbeafe !important;
  font-weight: 500 !important;
}

.page-back-button,
.page-close-button {
  width: 42px;
  height: 42px;
}

.page-back-button {
  top: 96px;
  left: 18px;
}

.page-close-button {
  top: 96px;
  right: 18px;
}

.page-close-button span {
  font-size: 28px;
}

.help-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.92fr);
}

.help-faq-card {
  border: 1px solid rgba(45, 212, 191, 0.28);
  border-radius: 10px;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 0%, rgba(125, 211, 252, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(8, 14, 28, 0.95));
}

.help-answer-view {
  margin: 18px;
  border: 1px solid rgba(250, 204, 21, 0.24);
  border-radius: 10px;
  padding: 20px;
  background: rgba(2, 6, 23, 0.36);
}

.help-answer-view span {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 11px;
  color: #0f172a;
  font-size: 12px;
  font-weight: 950;
  background: linear-gradient(135deg, #ff8a1f, #facc15 55%, #3acc5c);
}

.help-answer-view h2 {
  margin: 14px 0 9px;
  color: #f8fafc;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.05;
}

.help-answer-view p {
  margin: 0;
  color: #dbe4f0;
  font-size: 17px;
  line-height: 1.45;
}

.help-faq-card .help-topics {
  padding: 0 18px 18px;
}

.help-topics button.active {
  border-color: rgba(250, 204, 21, 0.56);
  background:
    radial-gradient(circle at 12% 0%, rgba(250, 204, 21, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(20, 31, 47, 0.98), rgba(8, 14, 28, 0.98));
}

.help-chat-card {
  min-height: 620px;
}

body .topbar nav .nav-candlestick-link,
body .topbar nav .nav-candlestick-link:visited,
body .topbar nav .nav-candlestick-link[aria-current="page"] {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  color: #34d399 !important;
  -webkit-text-fill-color: #34d399 !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.58), 0 0 3px rgba(248, 250, 252, 0.22) !important;
  filter: none !important;
}

body .topbar nav .nav-candlestick-link:hover,
body .topbar nav .nav-candlestick-link:focus-visible {
  color: #86efac !important;
  -webkit-text-fill-color: #86efac !important;
  text-shadow: 0 0 12px rgba(34, 197, 94, 0.72), 0 0 5px rgba(248, 250, 252, 0.28) !important;
}

body .topbar nav .nav-candlestick-link .nav-candle-text {
  display: inline-flex;
  align-items: center;
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
  font-weight: 950;
  white-space: nowrap;
}

body .topbar nav .nav-candlestick-link .nav-candle-main {
  color: #34d399 !important;
  -webkit-text-fill-color: #34d399 !important;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.58);
}

body .topbar nav .nav-candlestick-link .nav-candle-red {
  color: #ff6b6b !important;
  -webkit-text-fill-color: #ff6b6b !important;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.58);
}

body .topbar nav .nav-candlestick-link .nav-candle-mark {
  position: relative;
  display: inline-block;
  width: 7px;
  height: 16px;
  border-radius: 3px;
  flex: 0 0 auto;
  color: #22c55e;
  background: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.75);
  opacity: 1 !important;
  visibility: visible !important;
}

body .topbar nav .nav-candlestick-link .nav-candle-mark::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -5px;
  bottom: -5px;
  width: 2px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: currentColor;
  opacity: 0.9;
}

body .topbar nav {
  gap: clamp(7px, 0.72vw, 14px) !important;
}

body .topbar nav .notification-button {
  margin-left: -8px !important;
  margin-right: 2px !important;
}

body .topbar nav .nav-subscribe {
  min-width: 116px !important;
  padding-left: 18px !important;
  padding-right: 18px !important;
}

body .topbar .profile-menu {
  margin-left: 6px !important;
  flex: 0 0 auto !important;
}

@media (max-width: 1200px) {
  body.upgrade-page .upgrade-shell {
    width: min(980px, calc(100% - 40px)) !important;
  }

  body.upgrade-page .upgrade-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  body.upgrade-page .upgrade-shell {
    width: min(100% - 24px, 720px) !important;
  }

  body.upgrade-page .upgrade-grid,
  .help-layout {
    grid-template-columns: 1fr !important;
  }
}

/* 2026-07-08 light theme rescue: keep premium layout but restore readable contrast. */
:root[data-theme="light"] body {
  color: #101828 !important;
  background:
    radial-gradient(circle at 12% 18%, rgba(20, 184, 166, 0.11), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(122, 167, 255, 0.15), transparent 30%),
    linear-gradient(180deg, #f7fbff 0%, #ffffff 38%, #f8fbff 100%) !important;
}

:root[data-theme="light"] body .hero,
:root[data-theme="light"] body:not(.watchlist-focus-view) main > .hero:first-child,
:root[data-theme="light"] body .hero-copy {
  color: #f8fbff !important;
  background:
    radial-gradient(circle at 13% 88%, rgba(8, 145, 178, 0.36), transparent 30%),
    radial-gradient(circle at 76% 72%, rgba(168, 85, 247, 0.26), transparent 34%),
    linear-gradient(135deg, #050a16 0%, #081326 48%, #1a0730 100%) !important;
}

:root[data-theme="light"] body .hero-copy h1 {
  color: #eef5ff !important;
  -webkit-text-fill-color: transparent !important;
  background: linear-gradient(90deg, #dbeafe 0%, #c7d2fe 48%, #f5d0fe 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  text-shadow: 0 18px 54px rgba(122, 167, 255, 0.18) !important;
}

:root[data-theme="light"] body .hero-copy .lede,
:root[data-theme="light"] body .hero-copy .eyebrow {
  color: rgba(226, 232, 240, 0.9) !important;
  -webkit-text-fill-color: currentColor !important;
}

:root[data-theme="light"] body .hero-copy .hero-actions .analysis-teaser-button,
:root[data-theme="light"] body .hero-copy .hero-actions .hero-analyst {
  color: #101828 !important;
  border-color: rgba(226, 232, 240, 0.86) !important;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.96), rgba(215, 226, 242, 0.92) 46%, rgba(255, 255, 255, 0.9)) !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
}

:root[data-theme="light"] body .hero-copy .hero-actions .analysis-teaser-button span,
:root[data-theme="light"] body .hero-copy .hero-actions .hero-analyst span,
:root[data-theme="light"] body .hero-copy .hero-actions .analysis-teaser-button small,
:root[data-theme="light"] body .hero-copy .hero-actions .hero-analyst small {
  color: #172554 !important;
  -webkit-text-fill-color: currentColor !important;
}

:root[data-theme="light"] body .search-row,
:root[data-theme="light"] body .search-panel .search-row,
:root[data-theme="light"] body .topbar-search,
:root[data-theme="light"] body .watchlist-input-wrap {
  color: #101828 !important;
  background: rgba(255, 255, 255, 0.94) !important;
  border-color: rgba(148, 163, 184, 0.55) !important;
}

:root[data-theme="light"] body .search-row input,
:root[data-theme="light"] body .topbar-search input,
:root[data-theme="light"] body .watchlist-input-wrap input {
  color: #101828 !important;
  -webkit-text-fill-color: #101828 !important;
}

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

:root[data-theme="light"] body .ticker-pill,
:root[data-theme="light"] body .watchlist,
:root[data-theme="light"] body .watch-grid,
:root[data-theme="light"] body .market-card,
:root[data-theme="light"] body .market-news,
:root[data-theme="light"] body .home-movers,
:root[data-theme="light"] body .news-card,
:root[data-theme="light"] body .news-row-card,
:root[data-theme="light"] body .home-mover-row,
:root[data-theme="light"] body .watch-table tbody tr,
:root[data-theme="light"] body .watch-table tbody td {
  color: #101828 !important;
  background: rgba(255, 255, 255, 0.96) !important;
  background-image: none !important;
  border-color: #dbe7f7 !important;
}

:root[data-theme="light"] body .ticker-pill strong,
:root[data-theme="light"] body .ticker-pill span,
:root[data-theme="light"] body .market-card strong,
:root[data-theme="light"] body .watchlist strong,
:root[data-theme="light"] body .watch-table strong,
:root[data-theme="light"] body .home-mover-row strong,
:root[data-theme="light"] body .news-card h3,
:root[data-theme="light"] body .news-row-card h3,
:root[data-theme="light"] body .market-news h2,
:root[data-theme="light"] body .home-movers h2 {
  color: #101828 !important;
  -webkit-text-fill-color: currentColor !important;
}

:root[data-theme="light"] body .ticker-pill small,
:root[data-theme="light"] body .market-card small,
:root[data-theme="light"] body .watchlist small,
:root[data-theme="light"] body .watch-table small,
:root[data-theme="light"] body .home-mover-row small,
:root[data-theme="light"] body .news-card p,
:root[data-theme="light"] body .news-row-card p {
  color: #667085 !important;
  -webkit-text-fill-color: currentColor !important;
}

:root[data-theme="light"] body .chart-wrap {
  background: #171b26 !important;
  border-color: #dbe7f7 !important;
}

:root[data-theme="light"] body .nav-get-started {
  color: #344054 !important;
  background: transparent !important;
  box-shadow: none !important;
}
body.public-access-mode .profile-login-action,
body.public-access-mode .profile-auth-action,
body.public-access-mode [data-profile-action="profile-settings"],
body.public-access-mode .nav-get-started,
.profile-login-action[hidden],
.profile-auth-action[hidden],
.nav-get-started[hidden] {
  display: none !important;
}

/* Sector grouped Indian market heatmap */
.stock-heatmap {
  width: min(calc(100vw - 28px), 1840px) !important;
  max-width: none !important;
  margin: clamp(18px, 2vw, 28px) 50% !important;
  transform: translateX(-50%) !important;
  padding: clamp(14px, 1.4vw, 22px) !important;
  border-radius: 10px !important;
  border: 1px solid rgba(122, 167, 255, 0.28) !important;
  background:
    radial-gradient(circle at 14% 14%, rgba(14, 165, 233, 0.14), transparent 32%),
    radial-gradient(circle at 88% 4%, rgba(168, 85, 247, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(8, 16, 32, 0.98), rgba(10, 7, 30, 0.98)) !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

.stock-heatmap .heatmap-head {
  display: flex !important;
  align-items: end !important;
  justify-content: space-between !important;
  gap: 18px !important;
  margin-bottom: 14px !important;
}

.stock-heatmap .heatmap-head h2 {
  margin: 4px 0 0 !important;
  font-size: clamp(32px, 3.1vw, 52px) !important;
  line-height: 0.96 !important;
  letter-spacing: 0 !important;
}

.stock-heatmap .heatmap-board {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  min-height: min(76vh, 820px) !important;
  height: min(76vh, 820px) !important;
  aspect-ratio: 16 / 8.6 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
}

.stock-heatmap .heatmap-sector {
  position: absolute !important;
  display: block !important;
  inset: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 22px 0 0 !important;
  border: 2px solid rgba(2, 6, 23, 0.96) !important;
  border-radius: 0 !important;
  background: rgba(226, 232, 240, 0.94) !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

.stock-heatmap .heatmap-sector h3 {
  position: absolute !important;
  left: 4px !important;
  right: 4px !important;
  top: 2px !important;
  z-index: 3 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #050816 !important;
  font-size: clamp(12px, 0.82vw, 18px) !important;
  font-weight: 950 !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.stock-heatmap .heatmap-sector h3::after {
  content: ">";
  color: #050816;
  font-size: 14px;
  line-height: 1;
}

.stock-heatmap .heatmap-sector h3 span {
  margin-left: auto;
  color: rgba(15, 23, 42, 0.62) !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  text-transform: none !important;
}

.stock-heatmap .heatmap-sector-grid {
  position: absolute !important;
  inset: 22px 0 0 0 !important;
  display: block !important;
  min-width: 0 !important;
  min-height: 0 !important;
  width: auto !important;
  height: auto !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.stock-heatmap .heatmap-tile {
  position: absolute !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: clamp(2px, 0.34vw, 6px) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: clamp(3px, 0.62vw, 12px) !important;
  border: 1px solid rgba(2, 6, 23, 0.9) !important;
  border-radius: 0 !important;
  color: #f8fbff !important;
  text-align: center !important;
  text-decoration: none !important;
  overflow: hidden !important;
  cursor: pointer !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035) !important;
}

.stock-heatmap .heatmap-tile strong {
  display: block !important;
  max-width: 100% !important;
  color: #ffffff !important;
  font-size: clamp(9px, 1.35vw, 34px) !important;
  font-weight: 950 !important;
  line-height: 0.96 !important;
  letter-spacing: 0 !important;
  overflow-wrap: anywhere !important;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.38) !important;
}

.stock-heatmap .heatmap-tile span {
  display: block !important;
  max-width: 100% !important;
  color: rgba(255, 255, 255, 0.96) !important;
  font-size: clamp(8px, 0.78vw, 18px) !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  overflow-wrap: anywhere !important;
}

.stock-heatmap .heatmap-tile.compact {
  padding: 2px !important;
}

.stock-heatmap .heatmap-tile.compact strong {
  font-size: clamp(7px, 0.62vw, 12px) !important;
}

.stock-heatmap .heatmap-tile.compact span {
  font-size: clamp(6px, 0.48vw, 10px) !important;
}

.stock-heatmap .heatmap-tile.hot-up {
  background: linear-gradient(135deg, #009946, #0fb861) !important;
}

.stock-heatmap .heatmap-tile.up {
  background: linear-gradient(135deg, #086d34, #159447) !important;
}

.stock-heatmap .heatmap-tile.soft-up {
  background: linear-gradient(135deg, #134e2f, #176b3a) !important;
}

.stock-heatmap .heatmap-tile.hot-down {
  background: linear-gradient(135deg, #e11d48, #991b1b) !important;
}

.stock-heatmap .heatmap-tile.down {
  background: linear-gradient(135deg, #a11d27, #7f1d1d) !important;
}

.stock-heatmap .heatmap-tile.soft-down {
  background: linear-gradient(135deg, #8f1d24, #6f171d) !important;
}

.stock-heatmap .heatmap-tile:hover,
.stock-heatmap .heatmap-tile:focus-visible {
  z-index: 4 !important;
  outline: 2px solid rgba(147, 197, 253, 0.78) !important;
  outline-offset: -2px !important;
  filter: brightness(1.12) saturate(1.08) !important;
}

.stock-heatmap .heatmap-tip {
  z-index: 8 !important;
}

.stock-heatmap .heatmap-sector.heatmap-sector-span-2 {
  grid-column: span 2 !important;
}

.stock-heatmap .heatmap-sector.heatmap-sector-span-3 {
  grid-column: span 3 !important;
}

.stock-heatmap .heatmap-sector.heatmap-sector-span-4 {
  grid-column: span 4 !important;
}

.stock-heatmap .heatmap-sector.heatmap-sector-span-5 {
  grid-column: span 5 !important;
}

.stock-heatmap .heatmap-sector.heatmap-sector-rows-1 {
  grid-row: span 1 !important;
}

.stock-heatmap .heatmap-sector.heatmap-sector-rows-2 {
  grid-row: span 2 !important;
}

.stock-heatmap .heatmap-sector.heatmap-sector-rows-3 {
  grid-row: span 3 !important;
}

@media (max-width: 1180px) {
  .stock-heatmap {
    width: min(calc(100vw - 20px), 100%) !important;
    margin: 18px auto !important;
    transform: none !important;
  }

  .stock-heatmap .heatmap-board {
    min-height: 680px !important;
    height: 680px !important;
  }
}

@media (max-width: 720px) {
  .stock-heatmap .heatmap-head {
    align-items: start !important;
    flex-direction: column !important;
  }

  .stock-heatmap .heatmap-board {
    min-height: 880px !important;
    height: 880px !important;
  }
}

/* Restored original home heatmap layout */
.stock-heatmap {
  width: min(calc(100vw - 48px), 1840px) !important;
  max-width: none !important;
  margin: clamp(18px, 2vw, 28px) auto !important;
  transform: none !important;
  padding: clamp(14px, 1.4vw, 24px) !important;
  border-radius: 10px !important;
  border: 1px solid rgba(122, 167, 255, 0.28) !important;
  background:
    radial-gradient(circle at 14% 14%, rgba(14, 165, 233, 0.14), transparent 32%),
    radial-gradient(circle at 88% 4%, rgba(168, 85, 247, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(8, 16, 32, 0.98), rgba(10, 7, 30, 0.98)) !important;
}

.stock-heatmap .heatmap-head {
  display: block !important;
  margin-bottom: 12px !important;
}

.stock-heatmap .heatmap-head h2 {
  margin: 4px 0 0 !important;
  font-size: clamp(32px, 3.1vw, 48px) !important;
  line-height: 1 !important;
}

.stock-heatmap .heatmap-board {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  aspect-ratio: 21 / 8.7 !important;
  min-height: min(72vh, 760px) !important;
  height: auto !important;
  overflow: hidden !important;
  border: 1px solid rgba(148, 163, 184, 0.24) !important;
  border-radius: 8px !important;
  background: rgba(3, 7, 18, 0.8) !important;
}

.stock-heatmap .heatmap-sector,
.stock-heatmap .heatmap-sector-grid {
  display: contents !important;
}

.stock-heatmap .heatmap-sector h3 {
  display: none !important;
}

.stock-heatmap .heatmap-tile {
  position: absolute !important;
  display: grid !important;
  align-content: center !important;
  justify-items: center !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 3px 4px !important;
  border: 1px solid rgba(3, 7, 18, 0.88) !important;
  border-radius: 7px !important;
  overflow: hidden !important;
  color: #f8fbff !important;
  text-align: center !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
}

.stock-heatmap .heatmap-tile strong {
  display: block !important;
  max-width: calc(100% - 4px) !important;
  overflow: hidden !important;
  color: #ffffff !important;
  font-size: clamp(8px, 0.78vw, 16px) !important;
  font-weight: 950 !important;
  line-height: 1.02 !important;
  letter-spacing: 0 !important;
  overflow-wrap: anywhere !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

.stock-heatmap .heatmap-tile span {
  display: block !important;
  max-width: calc(100% - 4px) !important;
  margin-top: 2px !important;
  overflow: hidden !important;
  color: rgba(255, 255, 255, 0.96) !important;
  font-size: clamp(7px, 0.58vw, 11px) !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

.stock-heatmap .heatmap-tile.compact strong {
  font-size: clamp(7px, 0.58vw, 10px) !important;
}

.stock-heatmap .heatmap-tile.compact span {
  font-size: clamp(6px, 0.46vw, 9px) !important;
}

@media (max-width: 720px) {
  .stock-heatmap .heatmap-board {
    aspect-ratio: 4 / 5 !important;
    min-height: 560px !important;
    height: auto !important;
  }
}

/* Wide sector-separated heatmap */
.stock-heatmap .heatmap-board {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-auto-rows: minmax(190px, auto) !important;
  align-items: stretch !important;
  gap: 8px !important;
  aspect-ratio: auto !important;
  min-height: min(72vh, 760px) !important;
  height: auto !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
}

.stock-heatmap .heatmap-sector {
  display: grid !important;
  grid-template-rows: 24px minmax(0, 1fr) !important;
  gap: 5px !important;
  min-width: 0 !important;
  min-height: 190px !important;
  padding: 0 !important;
  border: 1px solid rgba(122, 167, 255, 0.22) !important;
  border-radius: 8px !important;
  background: rgba(3, 7, 18, 0.74) !important;
  overflow: hidden !important;
}

.stock-heatmap .heatmap-sector h3 {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  height: 24px !important;
  margin: 0 !important;
  padding: 5px 8px 0 !important;
  color: rgba(238, 245, 255, 0.96) !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.stock-heatmap .heatmap-sector h3::after {
  content: "" !important;
}

.stock-heatmap .heatmap-sector h3 span {
  color: rgba(170, 184, 207, 0.82) !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
}

.stock-heatmap .heatmap-sector-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(68px, 1fr)) !important;
  grid-auto-rows: minmax(54px, 1fr) !important;
  gap: 3px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  width: 100% !important;
  height: 100% !important;
  padding: 4px !important;
  overflow: hidden !important;
}

.stock-heatmap .heatmap-sector-grid .heatmap-tile {
  position: relative !important;
  inset: auto !important;
  display: grid !important;
  align-content: center !important;
  justify-items: center !important;
  width: auto !important;
  height: auto !important;
  min-height: 54px !important;
  padding: 3px 4px !important;
}

@media (min-width: 1500px) {
  .stock-heatmap .heatmap-board {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1100px) {
  .stock-heatmap .heatmap-board {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  .stock-heatmap .heatmap-board {
    grid-template-columns: 1fr !important;
  }
}

/* Keep home heatmap visible and wide */
.stock-heatmap .heatmap-board {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  aspect-ratio: 21 / 8.7 !important;
  min-height: min(72vh, 760px) !important;
  height: auto !important;
  overflow: hidden !important;
  border: 1px solid rgba(148, 163, 184, 0.24) !important;
  border-radius: 8px !important;
  background: rgba(3, 7, 18, 0.8) !important;
}

.stock-heatmap .heatmap-board > .heatmap-tile {
  position: absolute !important;
  display: grid !important;
  align-content: center !important;
  justify-items: center !important;
  min-width: 0 !important;
  min-height: 0 !important;
}

/* Final heatmap correction: sector groups, visible hover info, red/green only. */
.stock-heatmap .heatmap-board {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  aspect-ratio: 21 / 8.7 !important;
  min-height: min(72vh, 760px) !important;
  overflow: visible !important;
}

.stock-heatmap .heatmap-sector {
  position: absolute !important;
  display: grid !important;
  grid-template-rows: 24px minmax(0, 1fr) !important;
  gap: 3px !important;
  padding: 0 !important;
  border: 1px solid rgba(122, 167, 255, 0.24) !important;
  border-radius: 8px !important;
  background: rgba(3, 7, 18, 0.86) !important;
  overflow: visible !important;
}

.stock-heatmap .heatmap-sector h3 {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  height: 24px !important;
  margin: 0 !important;
  padding: 5px 7px 0 !important;
  color: rgba(238, 245, 255, 0.98) !important;
  font-size: clamp(10px, 0.72vw, 13px) !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.stock-heatmap .heatmap-sector h3 span {
  color: rgba(180, 195, 220, 0.86) !important;
  font-size: clamp(8px, 0.55vw, 10px) !important;
  font-weight: 850 !important;
}

.stock-heatmap .heatmap-sector-grid {
  position: relative !important;
  display: block !important;
  min-width: 0 !important;
  min-height: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: visible !important;
}

.stock-heatmap .heatmap-sector-grid .heatmap-tile {
  position: absolute !important;
}

.stock-heatmap .heatmap-tile {
  overflow: visible !important;
}

.stock-heatmap .heatmap-tile.hot-up {
  background: linear-gradient(135deg, #00d466, #00a64d) !important;
}

.stock-heatmap .heatmap-tile.up {
  background: linear-gradient(135deg, #059c4b, #067536) !important;
}

.stock-heatmap .heatmap-tile.soft-up {
  background: linear-gradient(135deg, #075f31, #043f22) !important;
}

.stock-heatmap .heatmap-tile.hot-down {
  background: linear-gradient(135deg, #ff3157, #b41428) !important;
}

.stock-heatmap .heatmap-tile.down {
  background: linear-gradient(135deg, #b11d2b, #7d111b) !important;
}

.stock-heatmap .heatmap-tile.soft-down {
  background: linear-gradient(135deg, #76131b, #4c0d14) !important;
}

.stock-heatmap .heatmap-tip {
  position: absolute !important;
  left: 50% !important;
  bottom: calc(100% + 8px) !important;
  z-index: 30 !important;
  display: grid !important;
  gap: 4px !important;
  min-width: 210px !important;
  max-width: 280px !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(147, 197, 253, 0.46) !important;
  border-radius: 8px !important;
  background: rgba(7, 12, 26, 0.98) !important;
  color: #f8fbff !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  text-align: left !important;
  transform: translate(-50%, 6px) !important;
  transition: opacity 140ms ease, transform 140ms ease !important;
}

.stock-heatmap .heatmap-tip b,
.stock-heatmap .heatmap-tip small {
  display: block !important;
  color: inherit !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  white-space: normal !important;
}

.stock-heatmap .heatmap-tip b {
  font-size: 13px !important;
  font-weight: 950 !important;
}

.stock-heatmap .heatmap-tile:hover,
.stock-heatmap .heatmap-tile:focus-visible {
  z-index: 40 !important;
}

.stock-heatmap .heatmap-tile:hover .heatmap-tip,
.stock-heatmap .heatmap-tile:focus-visible .heatmap-tip {
  opacity: 1 !important;
  transform: translate(-50%, 0) !important;
}

/* Revert home heatmap to the stable full-page mixed treemap. */
.stock-heatmap .heatmap-board {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  aspect-ratio: 21 / 8.7 !important;
  min-height: min(72vh, 760px) !important;
  height: auto !important;
  overflow: visible !important;
  border: 1px solid rgba(148, 163, 184, 0.24) !important;
  border-radius: 8px !important;
  background: rgba(3, 7, 18, 0.8) !important;
}

.stock-heatmap .heatmap-board > .heatmap-tile {
  position: absolute !important;
  display: grid !important;
  align-content: center !important;
  justify-items: center !important;
}

/* Detailed analysis chart: match the compact home chart style. */
.analysis-live-chart-card {
  max-width: min(100%, 1660px) !important;
}

.analysis-live-chart-card .analysis-chart-head {
  padding: 4px 6px 8px !important;
}

.analysis-live-chart-card .analysis-chart-head h3 {
  font-size: clamp(18px, 1.35vw, 24px) !important;
}

.analysis-live-chart-card .analysis-chart-summary {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.analysis-live-chart-card .analysis-chart-summary strong {
  color: var(--text) !important;
  font-size: clamp(26px, 2.2vw, 38px);
  font-weight: 900;
  line-height: 1;
}

.analysis-live-chart-card .analysis-chart-summary span {
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  font-size: 14px !important;
  font-weight: 850 !important;
}

.analysis-live-chart-card .analysis-canvas-wrap {
  min-height: clamp(360px, 52vh, 520px) !important;
  height: clamp(360px, 52vh, 520px) !important;
  margin-top: 8px !important;
  border-radius: 8px !important;
  border-color: rgba(122, 167, 255, 0.28) !important;
  background: var(--chart-bg) !important;
}

.analysis-advanced-price-chart {
  position: absolute !important;
  inset: 0 !important;
  min-height: 100% !important;
}

.analysis-advanced-price-chart a,
.analysis-advanced-price-chart [class*="logo"],
.analysis-advanced-price-chart [class*="attribution"] {
  display: none !important;
}

.analysis-advanced-price-chart[hidden],
#analysis-price-chart.fallback-hidden {
  display: none !important;
}

.analysis-live-chart-card .analysis-canvas-wrap canvas {
  min-height: clamp(360px, 52vh, 520px) !important;
  height: 100% !important;
}

.analysis-live-chart-card .analysis-chart-range-bar {
  top: 12px !important;
  left: 12px !important;
  border-radius: 8px !important;
  padding: 3px !important;
  background: rgba(15, 23, 42, 0.76) !important;
}

.analysis-live-chart-card .analysis-chart-range-bar button {
  min-height: 30px !important;
  min-width: 42px !important;
  padding: 0 9px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
}

.analysis-live-chart-card .analysis-chart-controls {
  top: 16px !important;
  right: 16px !important;
}

.analysis-live-chart-card .analysis-chart-ohlc {
  top: 58px !important;
  left: 18px !important;
  max-width: calc(100% - 320px) !important;
  font-size: 12px !important;
}

@media (max-width: 760px) {
  .analysis-live-chart-card .analysis-canvas-wrap,
  .analysis-live-chart-card .analysis-canvas-wrap canvas {
    min-height: 340px !important;
    height: 340px !important;
  }

  .analysis-live-chart-card .analysis-chart-ohlc {
    max-width: calc(100% - 28px) !important;
    top: 54px !important;
  }
}

/* Click-through market news detail */
.news-feature,
.news-compact,
.news-small,
.news-page-feature-card,
.news-page-card {
  cursor: pointer;
}

.news-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 6, 18, 0.78);
  backdrop-filter: blur(14px);
}

.news-detail-overlay[hidden] {
  display: none;
}

.news-detail-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  width: min(1120px, 96vw);
  max-height: min(86vh, 820px);
  overflow: auto;
  border: 1px solid rgba(122, 167, 255, 0.32);
  border-radius: 14px;
  background:
    radial-gradient(circle at 12% 10%, rgba(21, 94, 239, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(7, 12, 27, 0.98), rgba(16, 10, 36, 0.98));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.46);
}

.news-detail-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(122, 167, 255, 0.26);
  border-radius: 50%;
  color: var(--text);
  background: rgba(12, 18, 40, 0.86);
  font-size: 18px;
  font-weight: 950;
  cursor: pointer;
}

.news-detail-media {
  min-height: 100%;
  background: rgba(12, 18, 40, 0.74);
}

.news-detail-image,
.news-detail-media .news-image-fallback {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.news-detail-body {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: clamp(28px, 4vw, 54px);
}

.news-detail-body h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(30px, 4vw, 56px);
  line-height: 1.04;
}

.news-detail-time {
  margin: 0;
  color: var(--muted);
  font-weight: 850;
}

.news-detail-summary {
  margin: 0;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.65;
}

.news-detail-points {
  display: grid;
  gap: 10px;
  color: var(--text-soft);
  font-weight: 800;
}

.news-detail-points span {
  display: block;
  padding: 12px 14px;
  border: 1px solid rgba(122, 167, 255, 0.2);
  border-radius: 10px;
  background: rgba(122, 167, 255, 0.08);
}

.news-detail-source-link {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  border: 0;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #1e8df0, #0e9384);
  font-weight: 950;
  text-decoration: none;
  cursor: pointer;
}

.news-detail-source-link:disabled {
  cursor: wait;
  opacity: 0.76;
}

.news-detail-expanded {
  display: grid;
  gap: 12px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(122, 167, 255, 0.18);
  color: var(--text-soft);
}

.news-detail-expanded[hidden] {
  display: none;
}

.news-detail-expanded h3,
.news-detail-expanded h4 {
  margin: 0;
  color: var(--text);
}

.news-detail-expanded p,
.news-detail-expanded ul {
  margin: 0;
  line-height: 1.62;
}

.news-detail-expanded ul {
  padding-left: 20px;
}

.news-detail-preview,
.news-detail-note {
  color: var(--muted) !important;
  font-size: 14px;
}

/* Pricing offer styling */
.subscription-plan strong s,
.upgrade-plan strong s,
body #subscription-overlay .subscription-plan strong s,
body.upgrade-page .upgrade-plan strong s {
  display: inline-block !important;
  margin-right: 10px !important;
  color: rgba(226, 232, 240, 0.58) !important;
  font-size: clamp(22px, 2vw, 32px) !important;
  font-weight: 900 !important;
  text-decoration-thickness: 3px !important;
  text-decoration-color: #fb7185 !important;
}

.subscription-plan strong small,
.upgrade-plan strong small,
body #subscription-overlay .subscription-plan strong small,
body.upgrade-page .upgrade-plan strong small {
  display: inline-block !important;
  margin-top: 4px !important;
  margin-left: 4px !important;
  color: #8bf7b0 !important;
  font-size: 11px !important;
  font-weight: 950 !important;
  line-height: 1.25 !important;
  white-space: normal !important;
  max-width: 100% !important;
}

.subscription-plan strong,
.upgrade-plan strong,
body #subscription-overlay .subscription-plan strong,
body.upgrade-page .upgrade-plan strong {
  display: flex !important;
  align-items: baseline !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  white-space: normal !important;
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
}

@media (max-width: 780px) {
  .news-detail-overlay {
    padding: 12px;
  }

  .news-detail-panel {
    grid-template-columns: 1fr;
  }

  .news-detail-image,
  .news-detail-media .news-image-fallback {
    min-height: 220px;
    max-height: 280px;
  }
}

/* Keep all Accendion wordmarks on the same header brand theme. */
body .analysis-company-wordmark,
body .app-footer-brand > img,
body .welcome-tour-logo,
body .auth-logo {
  filter: drop-shadow(0 12px 26px rgba(99, 102, 241, 0.22)) !important;
}

:root[data-theme="light"] body .analysis-company-wordmark,
:root[data-theme="light"] body .app-footer-brand > img,
:root[data-theme="light"] body .welcome-tour-logo,
:root[data-theme="light"] body .auth-logo {
  filter: drop-shadow(0 10px 20px rgba(49, 85, 212, 0.16)) !important;
}

.plan-payment-overlay {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(14px);
}

.plan-payment-overlay.open {
  display: flex;
}

.plan-payment-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(430px, 100%);
  max-height: min(92vh, 760px);
  overflow: auto;
  padding: 28px;
  border: 1px solid rgba(122, 167, 255, 0.34);
  border-radius: 18px;
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 0%, rgba(27, 117, 255, 0.22), transparent 36%),
    radial-gradient(circle at 90% 10%, rgba(16, 185, 129, 0.14), transparent 32%),
    #07111f;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.48);
  text-align: center;
}

.plan-payment-step {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: 100%;
}

.plan-payment-step[hidden] {
  display: none !important;
}

.plan-payment-card h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
}

.plan-payment-card .eyebrow {
  color: #7ab0ff;
}

.plan-payment-summary {
  margin: 0;
  color: #8bf7b0;
  font-size: 18px;
  font-weight: 950;
}

.plan-payment-qr {
  width: min(330px, 76vw);
  height: auto;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.plan-payment-card strong {
  color: #ffffff;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.plan-payment-card span {
  max-width: 340px;
  color: #dbe7ff;
  font-size: 14px;
  line-height: 1.45;
}

.plan-payment-verify {
  display: grid;
  gap: 8px;
  width: min(340px, 100%);
  text-align: left;
}

.plan-payment-verify label {
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.plan-payment-verify div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.plan-payment-verify input {
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(122, 167, 255, 0.36);
  border-radius: 12px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.72);
  font-weight: 850;
  outline: none;
}

.plan-payment-verify input::placeholder {
  color: rgba(219, 231, 255, 0.56);
}

.plan-payment-verify button {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  color: #06111f;
  background: linear-gradient(135deg, #ff9f1a, #62d14f);
  font-weight: 950;
  cursor: pointer;
}

.plan-payment-verify button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.plan-payment-verify small {
  color: #dbe7ff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.plan-payment-card .plan-payment-warning {
  display: block;
  max-width: 340px;
  color: #fef3c7;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.plan-payment-success {
  padding: 28px 0 8px;
  min-height: 410px;
  align-content: center;
}

.plan-payment-check {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: linear-gradient(135deg, #19d27c, #75e04f);
  box-shadow: 0 18px 46px rgba(34, 197, 94, 0.30);
  position: relative;
}

.plan-payment-check::after {
  content: "";
  position: absolute;
  left: 28px;
  top: 20px;
  width: 20px;
  height: 36px;
  border: solid #ffffff;
  border-width: 0 7px 7px 0;
  transform: rotate(45deg);
}

.plan-payment-done {
  width: min(280px, 100%);
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  color: #06111f;
  background: linear-gradient(135deg, #ff9f1a, #62d14f);
  font-weight: 950;
  cursor: pointer;
}

:root[data-theme="light"] .plan-payment-card {
  color: #ffffff !important;
  background:
    radial-gradient(circle at 20% 0%, rgba(27, 117, 255, 0.24), transparent 36%),
    radial-gradient(circle at 90% 10%, rgba(16, 185, 129, 0.16), transparent 32%),
    #07111f !important;
}

:root[data-theme="light"] .plan-payment-card h2,
:root[data-theme="light"] .plan-payment-card strong,
:root[data-theme="light"] .plan-payment-card span {
  color: #ffffff !important;
}

:root[data-theme="light"] .plan-payment-card .plan-payment-note {
  color: #dbe7ff !important;
}

:root[data-theme="light"] .plan-payment-card .plan-payment-warning {
  color: #fef3c7 !important;
}

:root[data-theme="light"] .plan-payment-verify label,
:root[data-theme="light"] .plan-payment-verify input {
  color: #ffffff !important;
}

:root[data-theme="light"] .plan-payment-verify small {
  color: #dbe7ff !important;
}

.plan-payment-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

/* Compact subscription cards: plan, price, essential benefits, CTA. */
body #subscription-overlay .subscription-modal {
  padding-block: 18px !important;
}

body #subscription-overlay .subscription-plans,
body.upgrade-page .upgrade-grid {
  align-items: stretch !important;
}

body #subscription-overlay .subscription-plan,
body.upgrade-page .upgrade-plan {
  min-height: 0 !important;
  padding: 22px !important;
}

body #subscription-overlay .subscription-plan p,
body.upgrade-page .upgrade-plan p {
  display: none !important;
}

body #subscription-overlay .plan-badge,
body.upgrade-page .upgrade-badge {
  margin-bottom: 12px !important;
}

body #subscription-overlay .subscription-plan h3,
body.upgrade-page .upgrade-plan h2 {
  margin-bottom: 14px !important;
}

body #subscription-overlay .subscription-plan strong,
body.upgrade-page .upgrade-plan strong {
  margin-bottom: 16px !important;
  font-size: clamp(32px, 3.1vw, 46px) !important;
}

body #subscription-overlay .subscription-plan strong s,
body.upgrade-page .upgrade-plan strong s {
  font-size: clamp(18px, 1.7vw, 26px) !important;
}

body #subscription-overlay .subscription-plan strong small,
body.upgrade-page .upgrade-plan strong small {
  flex-basis: 100% !important;
  margin-left: 0 !important;
}

body #subscription-overlay .subscription-plan ul,
body.upgrade-page .upgrade-plan ul {
  gap: 10px !important;
  margin-bottom: 18px !important;
  font-size: 15px !important;
  line-height: 1.28 !important;
}

body #subscription-overlay .subscription-plan button,
body.upgrade-page .upgrade-plan button {
  min-height: 46px !important;
}

/* Pricing page: single-screen plan grid with no extra boxed sections. */
body.upgrade-page {
  min-height: 100vh !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(14, 165, 233, 0.18), transparent 30%),
    radial-gradient(circle at 88% 8%, rgba(147, 51, 234, 0.16), transparent 34%),
    #050914 !important;
}

body.upgrade-page .upgrade-shell {
  width: min(1320px, calc(100vw - 48px)) !important;
  min-height: calc(100vh - 96px) !important;
  margin: 0 auto !important;
  padding: clamp(18px, 2.2vh, 28px) 0 26px !important;
}

body.upgrade-page .upgrade-hero,
body.upgrade-page .upgrade-control-panel {
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: center !important;
}

body.upgrade-page .upgrade-hero {
  margin-bottom: 18px !important;
}

body.upgrade-page .upgrade-hero > div {
  max-width: none !important;
}

body.upgrade-page .upgrade-hero h1 {
  margin: 0 !important;
  font-size: clamp(34px, 4vw, 52px) !important;
  line-height: 1.02 !important;
}

body.upgrade-page .upgrade-hero p:not(.eyebrow) {
  max-width: 760px !important;
  margin: 10px auto 0 !important;
  font-size: clamp(16px, 1.5vw, 21px) !important;
  line-height: 1.35 !important;
}

body.upgrade-page .upgrade-control-panel {
  display: flex !important;
  justify-content: center !important;
  margin: 0 0 22px !important;
}

body.upgrade-page .upgrade-billing {
  width: min(360px, 100%) !important;
  padding: 4px !important;
  border-radius: 14px !important;
  background: rgba(226, 232, 240, 0.08) !important;
}

body.upgrade-page .upgrade-billing button {
  min-height: 40px !important;
  border-radius: 10px !important;
  font-size: 15px !important;
}

body.upgrade-page .upgrade-grid {
  width: 100% !important;
  margin: 0 auto !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 18px !important;
}

body.upgrade-page .upgrade-plan {
  min-height: 0 !important;
  padding: 18px !important;
  border-radius: 12px !important;
}

body.upgrade-page .upgrade-badge {
  padding: 4px 10px !important;
  font-size: 11px !important;
}

body.upgrade-page .upgrade-plan h2 {
  margin-bottom: 12px !important;
  font-size: clamp(22px, 2vw, 30px) !important;
}

body.upgrade-page .upgrade-plan strong {
  margin-bottom: 13px !important;
  font-size: clamp(34px, 3.2vw, 50px) !important;
}

body.upgrade-page .upgrade-plan strong span {
  font-size: 13px !important;
}

body.upgrade-page .upgrade-plan ul {
  gap: 7px !important;
  margin-bottom: 14px !important;
  font-size: clamp(12px, 0.9vw, 14px) !important;
  line-height: 1.18 !important;
}

body.upgrade-page .upgrade-plan li {
  padding-left: 17px !important;
}

body.upgrade-page .upgrade-plan button {
  min-height: 40px !important;
  border-radius: 999px !important;
  font-size: 14px !important;
}

body.upgrade-page .upgrade-state-note,
body.upgrade-page .upgrade-footer {
  display: none !important;
}

/* Restore clear-plan upgrade page after compact experiment. */
body.upgrade-page .upgrade-shell {
  width: min(100%, 1900px) !important;
  min-height: auto !important;
  padding: 0 0 46px !important;
}

body.upgrade-page .upgrade-hero {
  display: grid !important;
  place-items: center !important;
  min-height: 168px !important;
  margin: 0 0 24px !important;
  padding: 26px 24px 34px !important;
  border: 1px solid rgba(122, 167, 255, 0.22) !important;
  border-radius: 0 0 8px 8px !important;
  background:
    radial-gradient(circle at 17% 20%, rgba(14, 165, 233, 0.16), transparent 26%),
    radial-gradient(circle at 78% 12%, rgba(20, 184, 166, 0.18), transparent 28%),
    linear-gradient(105deg, rgba(6, 17, 32, 0.96), rgba(15, 12, 37, 0.96)) !important;
  box-shadow: none !important;
  text-align: center !important;
}

body.upgrade-page .upgrade-hero h1 {
  font-size: clamp(42px, 5vw, 68px) !important;
  line-height: 1.02 !important;
}

body.upgrade-page .upgrade-hero p:not(.eyebrow) {
  max-width: 660px !important;
  margin-top: 14px !important;
  font-size: clamp(18px, 1.5vw, 24px) !important;
}

body.upgrade-page .upgrade-control-panel {
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
  margin: 0 auto 22px !important;
}

body.upgrade-page .upgrade-billing {
  width: min(710px, calc(100vw - 56px)) !important;
  border-radius: 22px !important;
}

body.upgrade-page .upgrade-billing button {
  min-height: 48px !important;
  border-radius: 16px !important;
  font-size: 16px !important;
}

body.upgrade-page .upgrade-grid {
  width: min(100%, 1900px) !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
  padding-inline: 0 !important;
}

body.upgrade-page .upgrade-plan {
  min-height: 520px !important;
  padding: 20px !important;
  border-radius: 8px !important;
}

body.upgrade-page .upgrade-plan p {
  display: block !important;
  margin: -4px 0 18px !important;
  color: #c3ccdc !important;
  font-size: 15px !important;
  line-height: 1.35 !important;
}

body.upgrade-page .upgrade-plan h2 {
  margin-bottom: 14px !important;
  font-size: clamp(24px, 2vw, 32px) !important;
}

body.upgrade-page .upgrade-plan strong {
  margin-bottom: 18px !important;
  font-size: clamp(40px, 4vw, 58px) !important;
}

body.upgrade-page .upgrade-plan ul {
  gap: 10px !important;
  margin-bottom: 22px !important;
  font-size: clamp(14px, 1vw, 16px) !important;
  line-height: 1.28 !important;
}

body.upgrade-page .upgrade-plan button {
  min-height: 52px !important;
  font-size: 15px !important;
}

body.upgrade-page .upgrade-state-note {
  display: none !important;
}

body.upgrade-page .upgrade-footer {
  display: block !important;
  width: min(90vw, 1710px) !important;
  margin: 34px auto 0 !important;
}

/* Light theme cleanup: avoid dark text on dark panels and keep pricing as one clean page. */
:root[data-theme="light"] .stock-heatmap {
  background:
    radial-gradient(circle at 16% 0%, rgba(59, 130, 246, 0.12), transparent 28%),
    radial-gradient(circle at 92% 10%, rgba(20, 184, 166, 0.10), transparent 30%),
    #ffffff !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.10) !important;
}

:root[data-theme="light"] .stock-heatmap .heatmap-head h2,
:root[data-theme="light"] .stock-heatmap .heatmap-head > span,
:root[data-theme="light"] .stock-heatmap .heatmap-sector h3 {
  color: #0f172a !important;
  text-shadow: none !important;
}

:root[data-theme="light"] .stock-heatmap .heatmap-board {
  background: #f8fafc !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
}

:root[data-theme="light"] .stock-heatmap .heatmap-tip {
  background: #ffffff !important;
  border-color: rgba(37, 99, 235, 0.28) !important;
  color: #0f172a !important;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18) !important;
}

:root[data-theme="light"] body.upgrade-page {
  background:
    radial-gradient(circle at 14% 0%, rgba(14, 165, 233, 0.10), transparent 30%),
    radial-gradient(circle at 88% 8%, rgba(236, 72, 153, 0.10), transparent 34%),
    #f8fbff !important;
}

:root[data-theme="light"] body.upgrade-page .upgrade-shell {
  background: transparent !important;
}

body.upgrade-page .upgrade-hero {
  border-left: 0 !important;
  border-right: 0 !important;
  border-radius: 0 !important;
}

:root[data-theme="light"] body.upgrade-page .upgrade-hero,
:root[data-theme="light"] body.upgrade-page .upgrade-control-panel {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

:root[data-theme="light"] body.upgrade-page .upgrade-hero h1,
:root[data-theme="light"] body.upgrade-page .upgrade-hero p:not(.eyebrow),
:root[data-theme="light"] body.upgrade-page .upgrade-plan h2,
:root[data-theme="light"] body.upgrade-page .upgrade-plan p,
:root[data-theme="light"] body.upgrade-page .upgrade-plan li,
:root[data-theme="light"] body.upgrade-page .upgrade-plan strong {
  color: #0f172a !important;
}

:root[data-theme="light"] body.upgrade-page .upgrade-plan {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.10) !important;
}

:root[data-theme="light"] body.upgrade-page .upgrade-plan.selected {
  border-color: rgba(20, 184, 166, 0.62) !important;
}

:root[data-theme="light"] body.upgrade-page .upgrade-plan.featured {
  border-color: rgba(234, 179, 8, 0.70) !important;
}

:root[data-theme="light"] body.upgrade-page .upgrade-billing {
  background: #eef2f7 !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
}

:root[data-theme="light"] body.upgrade-page .upgrade-billing button {
  color: #334155 !important;
}

:root[data-theme="light"] body.upgrade-page .upgrade-billing button.active {
  color: #07111f !important;
}

:root[data-theme="light"] body.upgrade-page .upgrade-footer {
  width: min(90vw, 1710px) !important;
  background:
    radial-gradient(circle at 24% 26%, rgba(20, 184, 166, 0.12), transparent 28%),
    radial-gradient(circle at 70% 28%, rgba(236, 72, 153, 0.10), transparent 30%),
    #ffffff !important;
  border: 0 !important;
  box-shadow: none !important;
}

@media (max-width: 1120px) {
  body.upgrade-page .upgrade-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 680px) {
  body.upgrade-page .upgrade-shell {
    width: min(100% - 24px, 520px) !important;
  }

  body.upgrade-page .upgrade-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Modal version follows the same compact subscription-card rhythm. */
body #subscription-overlay .subscription-modal {
  width: min(1380px, calc(100vw - 28px)) !important;
  max-height: calc(100vh - 28px) !important;
  border-color: rgba(122, 167, 255, 0.24) !important;
  background:
    radial-gradient(circle at 14% 0%, rgba(14, 165, 233, 0.16), transparent 28%),
    radial-gradient(circle at 88% 5%, rgba(147, 51, 234, 0.16), transparent 30%),
    rgba(5, 9, 20, 0.98) !important;
}

body #subscription-overlay .subscription-modal-head {
  display: none !important;
}

body #subscription-overlay .subscription-billing {
  width: min(520px, 92%) !important;
  margin: 18px auto 18px !important;
}

body #subscription-overlay .subscription-plans {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
  padding: 0 18px 18px !important;
}

body #subscription-overlay .subscription-plan {
  padding: 17px !important;
  border-radius: 12px !important;
}

body #subscription-overlay .subscription-plan h3 {
  font-size: clamp(22px, 2vw, 30px) !important;
  margin-bottom: 12px !important;
}

body #subscription-overlay .subscription-plan strong {
  font-size: clamp(32px, 3vw, 48px) !important;
  margin-bottom: 13px !important;
}

body #subscription-overlay .subscription-plan ul {
  gap: 7px !important;
  font-size: clamp(12px, 0.9vw, 14px) !important;
  line-height: 1.18 !important;
}

@media (max-width: 1180px) {
  body #subscription-overlay .subscription-plans {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 620px) {
  body #subscription-overlay .subscription-plans {
    grid-template-columns: 1fr !important;
  }
}

/* Heatmap symbols must stay readable as stock codes, never split letter-by-letter. */
.stock-heatmap .heatmap-tile strong {
  display: block !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  overflow-wrap: normal !important;
  word-break: keep-all !important;
  white-space: nowrap !important;
  text-overflow: clip !important;
  font-size: clamp(8px, 0.68vw, 15px) !important;
  line-height: 1.05 !important;
}

.stock-heatmap .heatmap-tile.compact strong {
  max-width: 100% !important;
  font-size: clamp(6px, 0.48vw, 10px) !important;
  white-space: nowrap !important;
  text-overflow: clip !important;
}

/* Stock calls desk */
.stock-calls-page {
  background:
    radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.18), transparent 28%),
    radial-gradient(circle at 82% 4%, rgba(20, 184, 166, 0.14), transparent 24%),
    linear-gradient(135deg, #050a13, #0b1424 42%, #07111f);
}

.stock-calls-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 56px;
  color: #e5edf8;
}

.stock-calls-head,
.stock-calls-compose,
.stock-calls-board,
.stock-calls-disclaimer {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  background: rgba(8, 15, 29, 0.82);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.24);
}

.stock-calls-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
}

.stock-calls-head h1,
.stock-calls-compose h2,
.stock-calls-board h2 {
  margin: 0;
  color: #fff;
  letter-spacing: 0;
}

.stock-calls-head h1 {
  font-size: clamp(28px, 4vw, 44px);
}

.stock-calls-head p {
  max-width: 720px;
  margin: 8px 0 0;
  color: rgba(226, 232, 240, 0.78);
}

.stock-calls-reg {
  display: grid;
  gap: 4px;
  min-width: 170px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.32);
  background: rgba(14, 165, 233, 0.1);
}

.stock-calls-reg span {
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.stock-calls-reg strong {
  color: #fff;
}

.stock-calls-tabs,
.stock-calls-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stock-calls-tabs {
  margin: 18px 0;
}

.stock-calls-tabs button,
.stock-calls-subtabs button,
.stock-call-actions button {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  color: rgba(226, 232, 240, 0.82);
  background: rgba(15, 23, 42, 0.84);
  font-weight: 900;
}

.stock-calls-tabs button {
  min-height: 46px;
  padding: 0 20px;
}

.stock-calls-tabs button.is-active,
.stock-calls-subtabs button.is-active {
  color: #fff;
  border-color: rgba(56, 189, 248, 0.44);
  background: linear-gradient(135deg, #155eef, #0e9384);
}

.stock-calls-compose {
  padding: 18px;
  margin-bottom: 18px;
}

.stock-calls-compose-head,
.stock-calls-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.stock-calls-compose-head span {
  padding: 8px 10px;
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.12);
  font-size: 12px;
  font-weight: 900;
}

.stock-call-form {
  display: grid;
  grid-template-columns: minmax(170px, 1.3fr) 110px repeat(4, minmax(120px, 1fr));
  gap: 10px;
  align-items: end;
}

.stock-call-form label {
  display: grid;
  gap: 6px;
}

.stock-call-form label span {
  color: rgba(226, 232, 240, 0.76);
  font-size: 12px;
  font-weight: 900;
}

.stock-call-form input,
.stock-call-form select {
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 8px;
  padding: 0 12px;
  color: #fff;
  background: rgba(2, 6, 23, 0.56);
}

.stock-call-form input::placeholder {
  color: rgba(203, 213, 225, 0.48);
}

.stock-call-note-field {
  grid-column: span 3;
}

.stock-call-form button[type="submit"] {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #16a34a, #0e9384);
  font-weight: 900;
}

.stock-calls-board {
  padding: 18px;
}

.stock-calls-board + .stock-calls-board {
  margin-top: 18px;
}

.stock-calls-subtabs button {
  min-height: 38px;
  padding: 0 12px;
}

.stock-calls-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.stock-calls-summary article {
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.66);
}

.stock-calls-summary span {
  display: block;
  color: rgba(226, 232, 240, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.stock-calls-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 26px;
  color: #fff;
}

.stock-calls-summary .target strong {
  color: #6ee7b7;
}

.stock-calls-summary .stop strong {
  color: #fca5a5;
}

.stock-calls-list {
  display: grid;
  gap: 12px;
}

.stock-call-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.08), transparent 42%),
    rgba(15, 23, 42, 0.72);
}

.stock-call-card.is-closed {
  opacity: 0.92;
}

.stock-call-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.stock-call-kind {
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.stock-call-card h3 {
  margin: 3px 0 0;
  color: #fff;
  font-size: 22px;
}

.stock-call-status {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.stock-call-status.open {
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.18);
}

.stock-call-status.target {
  color: #bbf7d0;
  background: rgba(22, 163, 74, 0.2);
}

.stock-call-status.stop {
  color: #fecaca;
  background: rgba(220, 38, 38, 0.18);
}

.stock-call-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.stock-call-grid span {
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.42);
}

.stock-call-grid small {
  display: block;
  color: rgba(203, 213, 225, 0.64);
  font-weight: 800;
}

.stock-call-grid strong {
  display: block;
  margin-top: 3px;
  color: #fff;
  overflow-wrap: anywhere;
}

.stock-call-card p {
  margin: 0;
  color: rgba(226, 232, 240, 0.72);
}

.stock-call-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stock-call-actions button {
  min-height: 36px;
  padding: 0 12px;
}

.stock-call-actions button[data-status-action="target"] {
  color: #bbf7d0;
}

.stock-call-actions button[data-status-action="stop"] {
  color: #fecaca;
}

.stock-calls-empty {
  padding: 22px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  color: rgba(226, 232, 240, 0.72);
  text-align: center;
}

.stock-calls-disclaimer {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  padding: 14px 16px;
  color: rgba(226, 232, 240, 0.74);
}

.stock-calls-disclaimer strong {
  color: #fff;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .stock-call-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stock-call-note-field {
    grid-column: span 2;
  }

  .stock-call-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .stock-calls-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 20px;
  }

  .stock-calls-head,
  .stock-calls-compose-head,
  .stock-calls-board-head,
  .stock-calls-disclaimer {
    align-items: stretch;
    flex-direction: column;
  }

  .stock-call-form,
  .stock-calls-summary,
  .stock-call-grid {
    grid-template-columns: 1fr;
  }

  .stock-call-note-field {
    grid-column: auto;
  }

.stock-call-card-head {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Duration pricing refresh */
body.upgrade-page .upgrade-control-panel {
  padding-inline: 16px !important;
}

body.upgrade-page .upgrade-duration-tabs {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(120px, 1fr)) !important;
  gap: 0 !important;
  width: min(980px, calc(100vw - 40px)) !important;
  min-height: 96px !important;
  padding: 6px !important;
  border: 4px solid #171717 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

body.upgrade-page .upgrade-duration-tabs button {
  min-width: 0 !important;
  min-height: 72px !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: transparent !important;
  color: #050816 !important;
  font-size: clamp(17px, 1.45vw, 26px) !important;
  font-weight: 950 !important;
}

body.upgrade-page .upgrade-duration-tabs button.active {
  color: #111827 !important;
  background: linear-gradient(90deg, #ff9f1c 0%, #f3d21b 48%, #55cf55 100%) !important;
}

body.upgrade-page .upgrade-grid {
  width: min(1320px, calc(100vw - 36px)) !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: clamp(18px, 2.4vw, 42px) !important;
  align-items: stretch !important;
}

body.upgrade-page .upgrade-plan,
:root[data-theme="light"] body.upgrade-page .upgrade-plan {
  min-height: 500px !important;
  padding: clamp(18px, 2.2vw, 28px) !important;
  border: 4px solid #222222 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #0b0f19 !important;
  box-shadow: none !important;
}

body.upgrade-page .upgrade-plan.featured,
:root[data-theme="light"] body.upgrade-page .upgrade-plan.featured,
body.upgrade-page .upgrade-plan.selected,
:root[data-theme="light"] body.upgrade-page .upgrade-plan.selected {
  border-color: #222222 !important;
  box-shadow: none !important;
}

body.upgrade-page .upgrade-badge {
  display: none !important;
}

body.upgrade-page .upgrade-plan h2,
body.upgrade-page .upgrade-plan p,
body.upgrade-page .upgrade-plan li,
body.upgrade-page .upgrade-plan strong,
body.upgrade-page .upgrade-plan strong span,
:root[data-theme="light"] body.upgrade-page .upgrade-plan h2,
:root[data-theme="light"] body.upgrade-page .upgrade-plan p,
:root[data-theme="light"] body.upgrade-page .upgrade-plan li,
:root[data-theme="light"] body.upgrade-page .upgrade-plan strong {
  color: #0b0f19 !important;
}

body.upgrade-page .upgrade-plan h2 {
  margin-bottom: 8px !important;
  color: #9aa5b1 !important;
  font-size: clamp(25px, 2.4vw, 34px) !important;
  line-height: 1 !important;
}

body.upgrade-page .upgrade-plan p {
  display: none !important;
}

body.upgrade-page .upgrade-plan strong {
  justify-content: center !important;
  margin: 8px 0 24px !important;
  font-size: clamp(31px, 3vw, 42px) !important;
  line-height: 1.05 !important;
  text-align: center !important;
}

body.upgrade-page .upgrade-plan strong span {
  align-self: end !important;
  padding-bottom: 7px !important;
  font-size: 14px !important;
}

body.upgrade-page .upgrade-plan ul {
  gap: 13px !important;
  margin: 0 0 28px !important;
  color: #0b0f19 !important;
  font-size: clamp(16px, 1.45vw, 22px) !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
}

body.upgrade-page .upgrade-plan li {
  min-height: 30px !important;
  padding-left: 36px !important;
}

body.upgrade-page .upgrade-plan li::before {
  top: 5px !important;
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  color: #ffffff !important;
  background: #58c985 !important;
  box-shadow: 0 0 0 3px #f5fff8 !important;
}

body.upgrade-page .upgrade-plan button {
  width: min(220px, 100%) !important;
  min-height: 42px !important;
  margin: auto auto 0 !important;
  border: 5px solid #222222 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #0b0f19 !important;
  font-size: clamp(18px, 1.6vw, 26px) !important;
  font-weight: 950 !important;
  box-shadow: none !important;
}

body.upgrade-page .upgrade-plan button:disabled {
  opacity: 0.72 !important;
}

@media (max-width: 820px) {
  body.upgrade-page .upgrade-duration-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    min-height: auto !important;
  }

  body.upgrade-page .upgrade-duration-tabs button {
    min-height: 54px !important;
  }
}

@media (max-width: 1160px) {
  body.upgrade-page .upgrade-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Restore premium dark pricing GUI with the new duration tabs. */
body.upgrade-page .upgrade-shell {
  width: min(100%, 1900px) !important;
}

body.upgrade-page .upgrade-control-panel {
  padding-inline: 0 !important;
}

body.upgrade-page .upgrade-duration-tabs {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 0 !important;
  width: min(96vw, 1360px) !important;
  min-height: 72px !important;
  padding: 5px !important;
  border: 1px solid rgba(148, 163, 184, 0.26) !important;
  border-radius: 28px !important;
  background: rgba(18, 24, 40, 0.92) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 46px rgba(0, 0, 0, 0.18) !important;
}

body.upgrade-page .upgrade-control-panel .upgrade-billing.upgrade-duration-tabs {
  width: min(96vw, 1360px) !important;
  max-width: none !important;
}

body.upgrade-page .upgrade-duration-tabs button {
  min-height: 60px !important;
  min-width: 0 !important;
  border: 0 !important;
  border-radius: 22px !important;
  background: transparent !important;
  color: #c9d1df !important;
  font-size: clamp(14px, 1.2vw, 18px) !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
}

body.upgrade-page .upgrade-duration-tabs button.active {
  color: #07111f !important;
  background: linear-gradient(90deg, #ff9f1c 0%, #f2d417 48%, #56d05a 100%) !important;
  box-shadow: 0 10px 26px rgba(255, 159, 28, 0.20) !important;
}

body.upgrade-page .upgrade-grid {
  width: 100% !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
  padding-inline: 0 !important;
}

body.upgrade-page .upgrade-grid[data-duration="three_months"],
body.upgrade-page .upgrade-grid[data-duration="six_months"],
body.upgrade-page .upgrade-grid[data-duration="one_year"] {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body.upgrade-page .upgrade-grid[data-duration="premium_plans"] {
  width: min(980px, calc(100vw - 48px)) !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.upgrade-page .upgrade-plan,
:root[data-theme="light"] body.upgrade-page .upgrade-plan {
  min-height: 560px !important;
  padding: 26px !important;
  border: 1px solid rgba(122, 167, 255, 0.24) !important;
  border-radius: 8px !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(37, 99, 235, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(16, 27, 47, 0.96), rgba(7, 15, 29, 0.98)) !important;
  color: #f8fbff !important;
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.26) !important;
}

body.upgrade-page .upgrade-plan.featured,
:root[data-theme="light"] body.upgrade-page .upgrade-plan.featured {
  border-color: rgba(234, 179, 8, 0.7) !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(250, 204, 21, 0.11), transparent 30%),
    linear-gradient(180deg, rgba(29, 39, 36, 0.96), rgba(7, 15, 29, 0.98)) !important;
}

body.upgrade-page .upgrade-plan.selected,
:root[data-theme="light"] body.upgrade-page .upgrade-plan.selected {
  border-color: rgba(20, 184, 166, 0.78) !important;
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.26), 0 0 0 1px rgba(20, 184, 166, 0.18) !important;
}

body.upgrade-page .upgrade-badge {
  display: inline-flex !important;
  width: max-content !important;
  padding: 7px 13px !important;
  border-radius: 999px !important;
  color: #06101d !important;
  background: linear-gradient(90deg, #ff9f1c, #f2d417 50%, #56d05a) !important;
  font-size: 12px !important;
  font-weight: 950 !important;
}

body.upgrade-page .upgrade-plan h2,
:root[data-theme="light"] body.upgrade-page .upgrade-plan h2 {
  margin: 18px 0 12px !important;
  color: #ffffff !important;
  font-size: clamp(30px, 2.8vw, 40px) !important;
  line-height: 1.05 !important;
}

body.upgrade-page .upgrade-plan p,
:root[data-theme="light"] body.upgrade-page .upgrade-plan p {
  display: block !important;
  margin: 0 0 26px !important;
  color: #c3ccdc !important;
  font-size: clamp(15px, 1.05vw, 18px) !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
}

body.upgrade-page .upgrade-plan strong,
:root[data-theme="light"] body.upgrade-page .upgrade-plan strong {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
  margin: 0 0 22px !important;
  color: #ffffff !important;
  font-size: clamp(40px, 3.8vw, 64px) !important;
  line-height: 0.95 !important;
  text-align: left !important;
}

body.upgrade-page .upgrade-plan strong span,
:root[data-theme="light"] body.upgrade-page .upgrade-plan strong span {
  align-self: end !important;
  padding-bottom: 7px !important;
  color: #dce5f4 !important;
  font-size: 16px !important;
}

body.upgrade-page .upgrade-plan ul {
  gap: 14px !important;
  margin: 0 0 24px !important;
  color: #e6edf8 !important;
  font-size: clamp(15px, 1.08vw, 20px) !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
}

body.upgrade-page .upgrade-plan li,
:root[data-theme="light"] body.upgrade-page .upgrade-plan li {
  min-height: 0 !important;
  padding-left: 22px !important;
  color: #e6edf8 !important;
}

:root[data-theme="light"] body.upgrade-page .upgrade-plan p,
:root[data-theme="light"] body.upgrade-page .upgrade-plan ul,
:root[data-theme="light"] body.upgrade-page .upgrade-plan li {
  color: #243047 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

:root[data-theme="light"] body.upgrade-page .upgrade-plan strong span {
  color: #475569 !important;
  opacity: 1 !important;
}

body.upgrade-page .upgrade-plan[data-plan-billing="premium_six_months"] .upgrade-price {
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  font-size: clamp(32px, 3.3vw, 48px) !important;
}

body.upgrade-page .upgrade-plan[data-plan-billing="premium_six_months"] .upgrade-price span {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  font-size: clamp(13px, 1.1vw, 16px) !important;
}

body.upgrade-page .upgrade-plan li::before {
  content: "✓" !important;
  top: 0 !important;
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
  color: #31e981 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.upgrade-page .upgrade-plan button {
  width: 100% !important;
  min-height: 52px !important;
  margin-top: auto !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #ff9f1c, #f2d417 50%, #56d05a) !important;
  color: #06101d !important;
  font-size: 15px !important;
  font-weight: 950 !important;
  box-shadow: 0 14px 28px rgba(255, 159, 28, 0.18) !important;
}

@media (max-width: 980px) {
  body.upgrade-page .upgrade-duration-tabs {
    width: min(100% - 24px, 860px) !important;
  }

  body.upgrade-page .upgrade-grid,
  body.upgrade-page .upgrade-grid[data-duration="three_months"],
  body.upgrade-page .upgrade-grid[data-duration="six_months"],
  body.upgrade-page .upgrade-grid[data-duration="one_year"],
  body.upgrade-page .upgrade-grid[data-duration="premium_plans"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 680px) {
  body.upgrade-page .upgrade-duration-tabs {
    grid-template-columns: 1fr !important;
    border-radius: 18px !important;
  }

  body.upgrade-page .upgrade-grid,
  body.upgrade-page .upgrade-grid[data-duration="three_months"],
  body.upgrade-page .upgrade-grid[data-duration="six_months"],
  body.upgrade-page .upgrade-grid[data-duration="one_year"],
  body.upgrade-page .upgrade-grid[data-duration="premium_plans"] {
    grid-template-columns: 1fr !important;
  }
}

/* Final pricing tick correction: simple green checks like the original GUI. */
body.upgrade-page .upgrade-plan li::before {
  content: "" !important;
  left: 0 !important;
  top: 0.46em !important;
  width: 10px !important;
  height: 5px !important;
  border: 0 !important;
  border-left: 2px solid #31e981 !important;
  border-bottom: 2px solid #31e981 !important;
  border-radius: 0 !important;
  color: #31e981 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: rotate(-45deg) !important;
}
/* Shared semantic theme tokens. Add new shared UI colors here instead of page overrides. */
:root,
:root[data-theme="dark"] {
  --surface-base: #050812;
  --surface-raised: rgba(7, 13, 27, 0.86);
  --surface-soft: rgba(28, 42, 65, 0.74);
  --content-primary: #f8fbff;
  --content-secondary: #b7c2d4;
  --border-subtle: rgba(89, 119, 165, 0.42);
  --border-strong: rgba(122, 167, 255, 0.32);
  --shadow-raised: 0 12px 28px rgba(0, 0, 0, 0.32);
  --chart-surface: #081120;
  --chart-grid: rgba(148, 163, 184, 0.16);
  --chart-control-surface: rgba(15, 23, 42, 0.82);
  --chart-range-border: rgba(148, 163, 184, 0.32);
  --chart-range-divider: rgba(148, 163, 184, 0.22);
  --chart-control-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
  --chart-tooltip-surface: rgba(17, 24, 39, 0.92);
  --chart-active: #1767d2;
  --status-positive: #047857;
  --status-negative: #c2410c;
  --header-control: #cbd5e1;
  --header-control-hover: #f8fbff;
  --footer-surface: #091224;
  --footer-content: #d7deea;
  --footer-heading: #f8fbff;
  --footer-link: #bec9db;
  --footer-link-active: #3ca8ff;
  --footer-accent: #35c4e2;
  --footer-focus: #59b7ff;
  --footer-detail-heading: #76c8ff;
  --footer-muted: #8ca2bf;
  --footer-rule: rgba(157, 180, 213, 0.28);
  --control-focus: #84adff;
  --control-focus-ring: rgba(21, 94, 239, 0.12);
  --support-line: #8796aa;
  --support-action: #1761c9;
  --support-dialog-surface: #20252d;
  --support-dialog-content: #f1f5fa;
  --support-field-surface: #ffffff;
  --support-field-content: #172033;
  --support-field-border: #8695aa;
  --support-error: #ffacac;
  --support-confirm-border: #50d99a;
  --support-confirm-surface: #0d5138;
}

:root[data-theme="light"] {
  --surface-base: #ffffff;
  --surface-raised: #ffffff;
  --surface-soft: #edf3fa;
  --content-primary: #142033;
  --content-secondary: #334155;
  --border-subtle: rgba(51, 65, 85, 0.22);
  --border-strong: rgba(51, 65, 85, 0.32);
  --shadow-raised: 0 12px 28px rgba(15, 23, 42, 0.18);
  --chart-surface: #ffffff;
  --chart-grid: rgba(71, 85, 105, 0.18);
  --chart-control-surface: #ffffff;
  --chart-range-border: rgba(51, 65, 85, 0.24);
  --chart-range-divider: rgba(51, 65, 85, 0.16);
  --chart-control-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
  --chart-tooltip-surface: rgba(255, 255, 255, 0.98);
  --chart-active: #1767d2;
  --status-positive: #047857;
  --status-negative: #c2410c;
  --header-control: #1e293b;
  --header-control-hover: #0f172a;
  --footer-surface: #f5f8fc;
  --footer-content: #24334a;
  --footer-heading: #16263d;
  --footer-link: #42546d;
  --footer-link-active: #3ca8ff;
  --footer-accent: #0e7490;
  --footer-focus: #1767d2;
  --footer-detail-heading: #0e7490;
  --footer-muted: #62748b;
  --footer-rule: rgba(51, 65, 85, 0.2);
  --control-focus: #84adff;
  --control-focus-ring: rgba(21, 94, 239, 0.12);
  --support-line: #8796aa;
  --support-action: #1761c9;
  --support-dialog-surface: #ffffff;
  --support-dialog-content: #172033;
  --support-field-surface: #ffffff;
  --support-field-content: #172033;
  --support-field-border: #8695aa;
  --support-error: #a11a27;
  --support-confirm-border: #50d99a;
  --support-confirm-surface: #0d5138;
}
