/* Market Summary specialist pages V4
   Scoped to .nx-ms-page to keep Market Today and other applications isolated. */

.nx-ms-page {
  --nxms-accent: #2563eb;
  --nxms-accent-dark: #1e40af;
  --nxms-accent-soft: #eff6ff;
  --nxms-ink: #0f172a;
  --nxms-muted: #64748b;
  --nxms-line: #e2e8f0;
  --nxms-surface: #ffffff;
  --nxms-soft: #f8fafc;
  --nxms-up: #087a49;
  --nxms-up-soft: #ecfdf5;
  --nxms-down: #c0263d;
  --nxms-down-soft: #fff1f2;
  --nxms-font-xs: clamp(.69rem, .12vw + .66rem, .78rem);
  --nxms-font-sm: clamp(.76rem, .15vw + .72rem, .88rem);
  --nxms-font-md: clamp(.84rem, .19vw + .79rem, .98rem);
  --nxms-font-lg: clamp(1.08rem, .4vw + .98rem, 1.42rem);
  padding: clamp(.55rem, 1vw, .9rem) 0 clamp(2rem, 4vw, 3.5rem);
  color: var(--nxms-ink);
}

.nx-ms-page--money { --nxms-accent: #0f8a5f; --nxms-accent-dark: #066443; --nxms-accent-soft: #ecfdf5; }
.nx-ms-page--supply { --nxms-accent: #2563eb; --nxms-accent-dark: #1e40af; --nxms-accent-soft: #eff6ff; }
.nx-ms-page--players,
.nx-ms-page--industries { --nxms-accent: #7c3aed; --nxms-accent-dark: #5b21b6; --nxms-accent-soft: #f5f3ff; }
.nx-ms-page--impact { --nxms-accent: #0369a1; --nxms-accent-dark: #075985; --nxms-accent-soft: #f0f9ff; }
.nx-ms-page--shareholder-trades,
.nx-ms-page--shareholder-movements { --nxms-accent: #b45309; --nxms-accent-dark: #92400e; --nxms-accent-soft: #fffbeb; }

.nx-ms-page .container-fluid {
  width: min(100%, 1600px);
  margin-inline: auto;
  padding-inline: clamp(.65rem, 1.5vw, 1.35rem);
}

/* Tool switcher */
.nx-ms-page .nx-ms-tools-nav {
  position: sticky;
  z-index: 12;
  top: 68px;
  display: flex;
  gap: .42rem;
  overflow-x: auto;
  margin-bottom: .75rem;
  padding: .45rem;
  border: 1px solid rgba(203, 213, 225, .82);
  border-radius: 1rem;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
  backdrop-filter: blur(14px);
  scrollbar-width: none;
}
.nx-ms-page .nx-ms-tools-nav::-webkit-scrollbar { display: none; }
.nx-ms-page .nx-ms-tools-nav a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  min-height: 40px;
  padding: .48rem .72rem;
  border: 1px solid transparent;
  border-radius: .72rem;
  color: #475569;
  text-decoration: none;
  background: transparent;
  font-size: var(--nxms-font-xs);
  font-weight: 900;
  white-space: nowrap;
  transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease;
}
.nx-ms-page .nx-ms-tools-nav a:hover {
  color: var(--nxms-accent-dark);
  border-color: color-mix(in srgb, var(--nxms-accent) 22%, white);
  background: var(--nxms-accent-soft);
  transform: translateY(-1px);
}
.nx-ms-page .nx-ms-tools-nav a.is-active {
  color: #fff;
  border-color: var(--nxms-accent);
  background: linear-gradient(135deg, var(--nxms-accent), var(--nxms-accent-dark));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--nxms-accent) 24%, transparent);
}

/* Header */
.nx-ms-page .nx-ms-header-card {
  overflow: visible;
  margin-bottom: .8rem !important;
  padding: clamp(1rem, 2.2vw, 1.5rem);
  border: 1px solid color-mix(in srgb, var(--nxms-accent) 17%, #e2e8f0);
  border-radius: 1.25rem;
  background:
    radial-gradient(circle at 8% 5%, color-mix(in srgb, var(--nxms-accent) 13%, transparent), transparent 20rem),
    linear-gradient(135deg, #fff, color-mix(in srgb, var(--nxms-accent-soft) 60%, #fff));
  box-shadow: 0 18px 46px rgba(15, 23, 42, .07);
}
.nx-ms-page .nx-ms-header-card::before {
  inset-inline-end: -55px;
  inset-block-start: -75px;
  width: 210px;
  height: 210px;
  background: radial-gradient(circle at center, color-mix(in srgb, var(--nxms-accent) 16%, transparent), transparent 68%);
}
.nx-ms-page .nx-ms-title {
  gap: .58rem;
  color: var(--nxms-ink);
  font-size: var(--nxms-font-lg);
  font-weight: 950;
  line-height: 1.6;
  letter-spacing: -.025em;
}
.nx-ms-page .nx-ms-title i {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 38px;
  border-radius: .78rem;
  color: #fff;
  background: linear-gradient(135deg, var(--nxms-accent), var(--nxms-accent-dark));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--nxms-accent) 22%, transparent);
  font-size: .92rem;
}
.nx-ms-page .nx-ms-subtitle {
  max-width: 900px;
  margin-top: .45rem;
  color: #526078;
  font-size: var(--nxms-font-sm);
  font-weight: 650;
  line-height: 1.95;
}
.nx-ms-page .nx-ms-header-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .72rem;
}
.nx-ms-page .nx-ms-header-meta span {
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  padding: .3rem .55rem;
  border: 1px solid color-mix(in srgb, var(--nxms-accent) 13%, #e2e8f0);
  border-radius: 999px;
  color: #526078;
  background: rgba(255,255,255,.72);
  font-size: var(--nxms-font-xs);
  font-weight: 800;
}
.nx-ms-page .nx-ms-header-meta i { color: var(--nxms-accent); }
.nx-ms-page .nx-ms-actions { min-width: min(100%, 280px); }

/* Search and filters */
.nx-ms-page .search-wrapper { width: min(100%, 310px); }
.nx-ms-page .search-box {
  min-height: 48px;
  padding: .35rem .72rem;
  border: 1px solid #d5dfeb;
  border-radius: .88rem;
  background: rgba(255,255,255,.96);
  box-shadow: 0 8px 20px rgba(15,23,42,.055);
}
.nx-ms-page .search-box:focus-within {
  border-color: color-mix(in srgb, var(--nxms-accent) 60%, white);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--nxms-accent) 12%, transparent), 0 10px 24px rgba(15,23,42,.07);
}
.nx-ms-page .search-box input {
  min-width: 0;
  padding: .5rem .2rem .5rem 3.2rem;
  color: var(--nxms-ink);
  font-size: var(--nxms-font-sm);
  font-weight: 750;
}
.nx-ms-page .search-box input::placeholder { color: #94a3b8; }
.nx-ms-page .search-icon,
.nx-ms-page .clear-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: .6rem;
  font-size: .8rem;
}
.nx-ms-page .search-icon { left: 8px; color: #fff; background: linear-gradient(135deg, var(--nxms-accent), var(--nxms-accent-dark)); }
.nx-ms-page .clear-btn { left: 42px; color: #94a3b8; background: #f1f5f9; }
.nx-ms-page .clear-btn:hover { color: var(--nxms-down); background: var(--nxms-down-soft); }
.nx-ms-page .form-select {
  min-height: 48px;
  max-width: 190px !important;
  border-color: #d5dfeb;
  border-radius: .85rem;
  color: #334155;
  background-color: #fff;
  font-size: var(--nxms-font-sm);
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(15,23,42,.045);
}
.nx-ms-page .form-select:focus {
  border-color: color-mix(in srgb, var(--nxms-accent) 55%, white);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--nxms-accent) 12%, transparent);
}

/* Cards */
.nx-ms-page .row.g-3 { --bs-gutter-x: .8rem; --bs-gutter-y: .8rem; }
.nx-ms-page .sd-card {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 1.08rem;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15,23,42,.055);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.nx-ms-page .sd-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--nxms-accent) 22%, #e2e8f0);
  box-shadow: 0 14px 34px rgba(15,23,42,.075);
}
.nx-ms-page .sd-card-header {
  min-height: 60px;
  padding: .82rem .95rem;
  border-bottom: 1px solid #e8edf3;
  background: linear-gradient(180deg, #fff, #f8fafc);
}
.nx-ms-page .sd-card-title {
  color: #253046;
  font-size: var(--nxms-font-md);
  font-weight: 950;
}
.nx-ms-page .sd-card-header .small,
.nx-ms-page .sd-card-header .text-muted {
  color: #7b8798 !important;
  font-size: var(--nxms-font-xs) !important;
  font-weight: 800;
}
.nx-ms-page .nx-dot { width: 9px; height: 9px; box-shadow: 0 0 0 4px rgba(148,163,184,.12); }
.nx-ms-page .nx-dot-success { background: #10b981; box-shadow: 0 0 0 4px rgba(16,185,129,.13); }
.nx-ms-page .nx-dot-danger { background: #f43f5e; box-shadow: 0 0 0 4px rgba(244,63,94,.12); }
.nx-ms-page .nx-dot-info { background: #0ea5e9; box-shadow: 0 0 0 4px rgba(14,165,233,.12); }
.nx-ms-page .nx-dot-warning { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245,158,11,.13); }

/* Tables */
.nx-ms-page .nx-ms-tablewrap {
  position: relative;
  max-height: min(70vh, 760px);
  overflow: auto;
  border-top: 0;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.nx-ms-page .nx-ms-table {
  min-width: 720px;
  margin: 0;
  color: #334155;
  font-size: var(--nxms-font-sm);
  font-variant-numeric: tabular-nums;
}
.nx-ms-page .nx-ms-table thead th {
  top: 0;
  z-index: 6;
  padding: .72rem .62rem;
  border-bottom: 1px solid #dfe7f0;
  color: #526078;
  background: #f8fafc;
  font-size: var(--nxms-font-xs);
  font-weight: 950;
  line-height: 1.55;
  white-space: nowrap;
}
.nx-ms-page .nx-ms-table tbody td {
  padding: .68rem .62rem;
  border-bottom: 1px solid #edf1f5;
  color: #475569;
  background: #fff;
  font-size: var(--nxms-font-sm);
  font-weight: 760;
  line-height: 1.55;
  vertical-align: middle;
}
.nx-ms-page .nx-ms-table tbody tr:last-child td { border-bottom: 0; }
.nx-ms-page .nx-ms-table tbody tr:hover td { background: color-mix(in srgb, var(--nxms-accent-soft) 62%, #fff); }
.nx-ms-page .nx-ms-table a {
  color: var(--nxms-accent-dark) !important;
  font-weight: 950 !important;
  text-decoration: none !important;
}
.nx-ms-page .nx-ms-table a:hover { color: var(--nxms-accent) !important; }
.nx-ms-page .nx-ms-table .text-success { color: var(--nxms-up) !important; }
.nx-ms-page .nx-ms-table .text-danger { color: var(--nxms-down) !important; }
.nx-ms-page .nx-ms-tooltip,
.nx-ms-page .nx-compact-number {
  direction: ltr;
  unicode-bidi: isolate;
  font-weight: 900;
}
.nx-ms-page .nx-ms-tooltip::after {
  direction: ltr;
  unicode-bidi: isolate;
  font-size: .74rem;
}
.nx-ms-page .badge {
  min-width: 52px;
  padding: .35rem .55rem;
  font-size: var(--nxms-font-xs);
  font-weight: 900;
}
.nx-ms-page .nx-table-empty {
  min-height: 130px;
  padding: 2rem .8rem !important;
  color: #7b8798;
  background: #fbfdff !important;
  font-size: var(--nxms-font-sm);
  font-weight: 750;
}

/* Notices */
.nx-ms-page #nxError {
  position: relative;
  z-index: 1;
  border: 1px solid #fde68a;
  border-radius: .85rem;
  color: #854d0e;
  background: #fffbeb;
  font-size: var(--nxms-font-sm);
}
.nx-ms-page .nx-ms-footer-hint {
  gap: .38rem;
  margin-top: .65rem !important;
  padding: .55rem .7rem;
  border: 1px dashed #d9e1ec;
  border-radius: .72rem;
  color: #64748b !important;
  background: #f8fafc;
  font-size: var(--nxms-font-xs) !important;
  font-weight: 750;
}
.nx-ms-page .nx-ms-footer-hint:empty { display: none; }
.nx-ms-page .nx-ms-footer-hint i { color: var(--nxms-accent); }

/* Large displays: use available space and improve readability. */
@media (min-width: 1440px) {
  .nx-ms-page .nx-ms-header-card { padding: 1.45rem 1.6rem; }
  .nx-ms-page .nx-ms-table { min-width: 100%; }
  .nx-ms-page .nx-ms-table thead th { padding-block: .78rem; }
  .nx-ms-page .nx-ms-table tbody td { padding-block: .74rem; }
}

@media (max-width: 991.98px) {
  .nx-ms-page .nx-ms-tools-nav { top: 58px; }
  .nx-ms-page .nx-ms-header-card > .d-flex { flex-direction: column; }
  .nx-ms-page .nx-ms-actions { width: 100%; justify-content: flex-start; }
  .nx-ms-page .search-wrapper { flex: 1 1 280px; width: auto; }
  .nx-ms-page .form-select { flex: 0 1 190px; }
  .nx-ms-page .nx-ms-tablewrap { max-height: 66vh; }
}

@media (max-width: 575.98px) {
  .nx-ms-page { padding-top: .35rem; }
  .nx-ms-page .container-fluid { padding-inline: .55rem; }
  .nx-ms-page .nx-ms-tools-nav { top: 54px; margin-bottom: .55rem; padding: .34rem; border-radius: .82rem; }
  .nx-ms-page .nx-ms-tools-nav a { min-height: 37px; padding: .42rem .58rem; }
  .nx-ms-page .nx-ms-header-card { padding: .9rem; border-radius: 1rem; }
  .nx-ms-page .nx-ms-title { align-items: flex-start; }
  .nx-ms-page .nx-ms-title i { width: 34px; height: 34px; flex-basis: 34px; }
  .nx-ms-page .nx-ms-header-meta { gap: .3rem; }
  .nx-ms-page .nx-ms-header-meta span { padding: .26rem .45rem; }
  .nx-ms-page .nx-ms-actions { gap: .42rem; }
  .nx-ms-page .search-wrapper,
  .nx-ms-page .form-select { flex: 1 1 100%; width: 100%; max-width: none !important; }
  .nx-ms-page .sd-card { border-radius: .9rem; }
  .nx-ms-page .sd-card-header { min-height: 54px; padding: .72rem .75rem; }
  .nx-ms-page .nx-ms-tablewrap { max-height: 62vh; }
  .nx-ms-page .nx-ms-table { min-width: 650px; }
  .nx-ms-page .nx-ms-table thead th { padding: .62rem .5rem; }
  .nx-ms-page .nx-ms-table tbody td { padding: .62rem .5rem; }
}

/* Semantic emphasis for paired market views. */
.nx-ms-page--supply .row.g-3 > div:first-child .sd-card,
.nx-ms-page--money .row.g-3 > div:first-child .sd-card {
  border-color: rgba(16, 185, 129, .22);
}
.nx-ms-page--supply .row.g-3 > div:first-child .sd-card-header,
.nx-ms-page--money .row.g-3 > div:first-child .sd-card-header {
  background: linear-gradient(180deg, #fff, #f0fdf4);
}
.nx-ms-page--supply .row.g-3 > div:last-child .sd-card,
.nx-ms-page--money .row.g-3 > div:last-child .sd-card {
  border-color: rgba(244, 63, 94, .2);
}
.nx-ms-page--supply .row.g-3 > div:last-child .sd-card-header,
.nx-ms-page--money .row.g-3 > div:last-child .sd-card-header {
  background: linear-gradient(180deg, #fff, #fff1f2);
}

.nx-ms-page--players .nx-ms-table thead th:nth-child(2),
.nx-ms-page--players .nx-ms-table thead th:nth-child(3),
.nx-ms-page--players .nx-ms-table thead th:nth-child(7),
.nx-ms-page--players .nx-ms-table thead th:nth-child(9),
.nx-ms-page--industries .nx-ms-table thead th:nth-child(2),
.nx-ms-page--industries .nx-ms-table thead th:nth-child(4) {
  color: #047857;
  background: #f0fdf4;
}
.nx-ms-page--players .nx-ms-table thead th:nth-child(4),
.nx-ms-page--players .nx-ms-table thead th:nth-child(5),
.nx-ms-page--players .nx-ms-table thead th:nth-child(8),
.nx-ms-page--players .nx-ms-table thead th:nth-child(10),
.nx-ms-page--industries .nx-ms-table thead th:nth-child(3),
.nx-ms-page--industries .nx-ms-table thead th:nth-child(5) {
  color: #be123c;
  background: #fff1f2;
}
.nx-ms-page--players .nx-ms-table thead th:nth-child(6),
.nx-ms-page--industries .nx-ms-table thead th:nth-child(6) {
  color: #6d28d9;
  background: #f5f3ff;
}

/* V5: custom exact-number tooltips should not show the browser help cursor. */
.nx-ms-page .nx-ms-tooltip,
.nx-ms-page .nx-compact-number,
.nx-ms-page [data-tip],
.nx-ms-page [data-bs-toggle="tooltip"] {
  cursor: default !important;
}
.nx-ms-page button[data-bs-toggle="tooltip"],
.nx-ms-page a[data-bs-toggle="tooltip"],
.nx-ms-page [role="button"][data-bs-toggle="tooltip"] {
  cursor: pointer !important;
}

/* --------------------------------------------------------------------------
   Market Summary Intelligence V1 — real-money + supply/demand specialist UX
   -------------------------------------------------------------------------- */
.nx-mi-page {
  --nxmi-card-shadow: 0 14px 36px rgba(15, 23, 42, .065);
  --nxmi-border: #e4eaf1;
  --nxmi-soft: #f8fafc;
}

.nx-mi-page .nx-mi-hero { overflow: hidden; }
.nx-mi-page .nx-mi-hero__main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(285px, 390px);
  gap: clamp(1rem, 2vw, 1.6rem);
  align-items: stretch;
}
.nx-mi-page .nx-mi-kicker {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  color: var(--nxms-accent-dark);
  font-size: var(--nxms-font-xs);
  font-weight: 900;
}
.nx-mi-page .nx-mi-kicker i { font-size: .9rem; }
.nx-mi-page .nx-mi-hero__aside {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 132px;
  padding: 1rem 1.05rem;
  border: 1px solid color-mix(in srgb, var(--nxms-accent) 18%, #e2e8f0);
  border-radius: 1rem;
  background: rgba(255, 255, 255, .78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 12px 28px rgba(15,23,42,.05);
  backdrop-filter: blur(9px);
}
.nx-mi-page .nx-mi-verdict__label {
  margin-bottom: .34rem;
  color: var(--nxms-accent-dark);
  font-size: var(--nxms-font-xs);
  font-weight: 900;
}
.nx-mi-page .nx-mi-hero__aside strong {
  color: #172033;
  font-size: clamp(.94rem, .25vw + .88rem, 1.08rem);
  font-weight: 950;
  line-height: 1.75;
}
.nx-mi-page .nx-mi-hero__aside p {
  margin: .35rem 0 0;
  color: #64748b;
  font-size: var(--nxms-font-xs);
  font-weight: 700;
  line-height: 1.9;
}

.nx-mi-page .nx-mi-section { margin-top: 1rem; }
.nx-mi-page .nx-mi-section-row { margin-top: .1rem; }
.nx-mi-page .nx-mi-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .68rem;
}
.nx-mi-page .nx-mi-section-head > div > span {
  display: inline-flex;
  margin-bottom: .16rem;
  color: var(--nxms-accent-dark);
  font-size: var(--nxms-font-xs);
  font-weight: 900;
}
.nx-mi-page .nx-mi-section-head h2 {
  margin: 0;
  color: #182236;
  font-size: clamp(.94rem, .3vw + .86rem, 1.14rem);
  font-weight: 950;
  line-height: 1.65;
}
.nx-mi-page .nx-mi-section-head > p,
.nx-mi-page .nx-mi-section-head > div > p {
  max-width: 720px;
  margin: 0;
  color: #718096;
  font-size: var(--nxms-font-xs);
  font-weight: 680;
  line-height: 1.85;
}
.nx-mi-page .nx-mi-section-head--with-action { align-items: center; }
.nx-mi-page .nx-mi-section-head--with-action > div { min-width: 0; }
.nx-mi-page .nx-mi-section-head--with-action .search-wrapper { flex: 0 0 min(100%, 310px); }
.nx-mi-page .nx-mi-search-note {
  display: block;
  margin-top: .25rem;
  color: #7c899c;
  font-size: .68rem;
  font-weight: 700;
}

.nx-mi-page .nx-mi-kpi-grid {
  display: grid;
  gap: .72rem;
}
.nx-mi-page .nx-mi-kpi-grid--five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.nx-mi-page .nx-mi-kpi {
  position: relative;
  display: flex;
  align-items: center;
  gap: .72rem;
  min-height: 108px;
  padding: .88rem .9rem;
  overflow: hidden;
  border: 1px solid var(--nxmi-border);
  border-radius: 1rem;
  background: linear-gradient(145deg, #fff, #fbfdff);
  box-shadow: var(--nxmi-card-shadow);
}
.nx-mi-page .nx-mi-kpi::after {
  content: "";
  position: absolute;
  inset-inline-end: -24px;
  inset-block-start: -28px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--nxms-accent) 6%, transparent);
}
.nx-mi-page .nx-mi-kpi__icon {
  position: relative;
  z-index: 1;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  border-radius: .82rem;
  color: var(--nxms-accent-dark);
  background: var(--nxms-accent-soft);
  font-size: .95rem;
}
.nx-mi-page .nx-mi-kpi > div { position: relative; z-index: 1; min-width: 0; }
.nx-mi-page .nx-mi-kpi small {
  display: block;
  margin-bottom: .22rem;
  color: #6b778a;
  font-size: .69rem;
  font-weight: 800;
  line-height: 1.55;
}
.nx-mi-page .nx-mi-kpi strong {
  display: block;
  color: #172033;
  font-size: clamp(.94rem, .35vw + .86rem, 1.15rem);
  font-weight: 950;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  unicode-bidi: isolate;
}
.nx-mi-page .nx-mi-kpi em {
  display: block;
  margin-top: .12rem;
  overflow: hidden;
  color: #94a3b8;
  font-size: .65rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1.45;
  text-overflow: ellipsis;
}
.nx-mi-page .nx-mi-kpi--primary { border-color: color-mix(in srgb, var(--nxms-accent) 24%, #e2e8f0); }
.nx-mi-page .nx-mi-kpi--up .nx-mi-kpi__icon { color: #047857; background: #ecfdf5; }
.nx-mi-page .nx-mi-kpi--down .nx-mi-kpi__icon { color: #be123c; background: #fff1f2; }

.nx-mi-page .nx-mi-chart-card,
.nx-mi-page .nx-mi-focus-card,
.nx-mi-page .nx-mi-balance-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--nxmi-border);
  border-radius: 1.05rem;
  background: #fff;
  box-shadow: var(--nxmi-card-shadow);
}
.nx-mi-page .nx-mi-chart-card { padding: .78rem .85rem .55rem; }
.nx-mi-page .nx-mi-chart-card--hero { padding-top: .7rem; }
.nx-mi-page .nx-mi-chart { width: 100%; min-height: 300px; }
.nx-mi-page .nx-mi-chart--bubble { min-height: 390px; }
.nx-mi-page .nx-mi-chart-empty {
  display: grid;
  min-height: 220px;
  place-items: center;
  color: #94a3b8;
  font-size: var(--nxms-font-sm);
  font-weight: 800;
}
.nx-mi-page .nx-mi-quadrant-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .38rem .72rem;
  padding: .28rem .25rem .35rem;
  color: #637086;
  font-size: .68rem;
  font-weight: 800;
}
.nx-mi-page .nx-mi-quadrant-legend span { display: inline-flex; align-items: center; gap: .32rem; }
.nx-mi-page .nx-mi-quadrant-legend i { width: 8px; height: 8px; border-radius: 50%; }
.nx-mi-page .nx-mi-quadrant-legend .is-positive i { background: #0f8a5f; }
.nx-mi-page .nx-mi-quadrant-legend .is-accum i { background: #0284c7; }
.nx-mi-page .nx-mi-quadrant-legend .is-diverge i { background: #d97706; }
.nx-mi-page .nx-mi-quadrant-legend .is-negative i { background: #d11f45; }
.nx-mi-page .nx-mi-live-note {
  display: flex;
  align-items: center;
  gap: .36rem;
  color: #64748b;
  font-size: .68rem;
  font-weight: 760;
}
.nx-mi-page .nx-mi-live-note > span { width: 10px; height: 10px; border-radius: 3px; background: #2563eb; }

.nx-mi-page .nx-mi-focus-card { display: flex; flex-direction: column; gap: .9rem; padding: 1rem; }
.nx-mi-page .nx-mi-focus-item {
  padding: .8rem;
  border: 1px solid #edf1f5;
  border-radius: .88rem;
  background: #fbfdff;
}
.nx-mi-page .nx-mi-focus-item > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
.nx-mi-page .nx-mi-focus-item span { color: #526078; font-size: var(--nxms-font-xs); font-weight: 850; }
.nx-mi-page .nx-mi-focus-item strong { color: #172033; font-size: 1.02rem; font-weight: 950; }
.nx-mi-page .nx-mi-focus-item p { margin: .42rem 0 0; color: #8290a3; font-size: .67rem; font-weight: 700; line-height: 1.7; }
.nx-mi-page .nx-mi-progress {
  height: 8px;
  margin-top: .58rem;
  overflow: hidden;
  border-radius: 999px;
  background: #eaf0f5;
}
.nx-mi-page .nx-mi-progress > span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #34d399, #0f8a5f); transition: width .35s ease; }
.nx-mi-page .nx-mi-progress--down > span { background: linear-gradient(90deg, #fb7185, #d11f45); }
.nx-mi-page .nx-mi-focus-tip { display: flex; gap: .55rem; padding: .72rem .76rem; border-radius: .82rem; color: #556175; background: var(--nxms-accent-soft); }
.nx-mi-page .nx-mi-focus-tip i { flex: 0 0 auto; margin-top: .15rem; color: var(--nxms-accent); }
.nx-mi-page .nx-mi-focus-tip p { margin: 0; font-size: .68rem; font-weight: 700; line-height: 1.85; }

.nx-mi-page .nx-mi-balance-card { padding: 1rem 1.05rem; }
.nx-mi-page .nx-mi-balance-values,
.nx-mi-page .nx-mi-balance-caption { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.nx-mi-page .nx-mi-balance-values > div { display: flex; align-items: baseline; gap: .42rem; }
.nx-mi-page .nx-mi-balance-values span { color: #66758b; font-size: var(--nxms-font-xs); font-weight: 850; }
.nx-mi-page .nx-mi-balance-values strong { font-size: 1rem; font-weight: 950; }
.nx-mi-page .nx-mi-balance-values .is-buy strong { color: #087a49; }
.nx-mi-page .nx-mi-balance-values .is-sell strong { color: #c0263d; }
.nx-mi-page .nx-mi-balance-track {
  display: flex;
  width: 100%;
  height: 18px;
  margin: .72rem 0 .45rem;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
  direction: ltr;
}
.nx-mi-page .nx-mi-balance-track span { height: 100%; width: 0; transition: width .35s ease; }
.nx-mi-page .nx-mi-balance-track .is-buy { background: linear-gradient(90deg, #34d399, #0f8a5f); }
.nx-mi-page .nx-mi-balance-track .is-sell { background: linear-gradient(90deg, #fb7185, #d11f45); }
.nx-mi-page .nx-mi-balance-caption { color: #8491a3; font-size: .68rem; font-weight: 760; }

.nx-mi-page .nx-mi-money { color: inherit; }
.nx-mi-page .nx-mi-apex-tip {
  min-width: 215px;
  padding: .7rem .78rem;
  direction: rtl;
  color: #334155;
  background: #fff;
  font-family: inherit;
  text-align: right;
}
.nx-mi-page .nx-mi-apex-tip strong { display: block; color: #172033; font-size: .84rem; font-weight: 950; }
.nx-mi-page .nx-mi-apex-tip small { display: block; margin: .1rem 0 .45rem; color: #8491a3; font-size: .68rem; }
.nx-mi-page .nx-mi-apex-tip div { display: flex; justify-content: space-between; gap: .8rem; padding: .17rem 0; font-size: .7rem; }
.nx-mi-page .nx-mi-apex-tip div span { color: #64748b; }
.nx-mi-page .nx-mi-apex-tip div b { color: #243047; font-weight: 900; unicode-bidi: isolate; }
.nx-mi-page .apexcharts-tooltip { border: 1px solid #e2e8f0 !important; border-radius: .78rem !important; box-shadow: 0 12px 30px rgba(15,23,42,.12) !important; font-family: inherit !important; }
.nx-mi-page .apexcharts-legend-text,
.nx-mi-page .apexcharts-xaxis-label,
.nx-mi-page .apexcharts-yaxis-label,
.nx-mi-page .apexcharts-text { font-family: inherit !important; }

/* Tables remain the expert-detail layer, not the primary page experience. */
.nx-mi-page .nx-ms-table { min-width: 760px; }
.nx-mi-page--supply .nx-ms-table { min-width: 900px; }
.nx-mi-page .nx-ms-table th,
.nx-mi-page .nx-ms-table td { text-align: center; }
.nx-mi-page .nx-ms-table th:first-child,
.nx-mi-page .nx-ms-table td:first-child { position: sticky; right: 0; z-index: 4; text-align: right; }
.nx-mi-page .nx-ms-table thead th:first-child { z-index: 8; background: #f8fafc; }
.nx-mi-page .nx-ms-table tbody td:first-child { background: #fff; box-shadow: -8px 0 12px -13px rgba(15,23,42,.55); }
.nx-mi-page .nx-ms-table tbody tr:hover td:first-child { background: color-mix(in srgb, var(--nxms-accent-soft) 62%, #fff); }

@media (max-width: 1199.98px) {
  .nx-mi-page .nx-mi-kpi-grid--five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nx-mi-page .nx-mi-kpi-grid--five .nx-mi-kpi:nth-child(4),
  .nx-mi-page .nx-mi-kpi-grid--five .nx-mi-kpi:nth-child(5) { grid-column: span 1; }
}

@media (max-width: 991.98px) {
  .nx-mi-page .nx-mi-hero__main { grid-template-columns: 1fr; }
  .nx-mi-page .nx-mi-hero__aside { min-height: auto; }
  .nx-mi-page .nx-mi-section-head { align-items: flex-start; flex-direction: column; gap: .35rem; }
  .nx-mi-page .nx-mi-section-head--with-action .search-wrapper { width: 100%; flex-basis: auto; }
  .nx-mi-page .nx-mi-kpi-grid--five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nx-mi-page .nx-mi-kpi-grid--five .nx-mi-kpi:first-child { grid-column: span 2; }
}

@media (max-width: 575.98px) {
  .nx-mi-page .nx-mi-hero { padding: .85rem; }
  .nx-mi-page .nx-mi-kicker { font-size: .66rem; }
  .nx-mi-page .nx-mi-hero__aside { padding: .78rem .82rem; border-radius: .86rem; }
  .nx-mi-page .nx-mi-section { margin-top: .8rem; }
  .nx-mi-page .nx-mi-section-head { margin-bottom: .52rem; }
  .nx-mi-page .nx-mi-section-head h2 { font-size: .93rem; }
  .nx-mi-page .nx-mi-kpi-grid--five { gap: .48rem; }
  .nx-mi-page .nx-mi-kpi {
    min-height: 94px;
    gap: .55rem;
    padding: .7rem .68rem;
    border-radius: .85rem;
  }
  .nx-mi-page .nx-mi-kpi__icon { width: 32px; height: 32px; flex-basis: 32px; border-radius: .7rem; font-size: .8rem; }
  .nx-mi-page .nx-mi-kpi small { font-size: .64rem; }
  .nx-mi-page .nx-mi-kpi strong { font-size: .91rem; }
  .nx-mi-page .nx-mi-kpi em { font-size: .61rem; }
  .nx-mi-page .nx-mi-chart-card,
  .nx-mi-page .nx-mi-focus-card,
  .nx-mi-page .nx-mi-balance-card { border-radius: .88rem; }
  .nx-mi-page .nx-mi-chart-card { padding: .58rem .45rem .35rem; }
  .nx-mi-page .nx-mi-quadrant-legend { gap: .32rem .55rem; font-size: .62rem; }
  .nx-mi-page .nx-mi-chart--bubble { min-height: 365px; }
  .nx-mi-page .nx-mi-balance-card { padding: .8rem; }
  .nx-mi-page .nx-mi-balance-caption { align-items: flex-start; flex-direction: column; gap: .15rem; }
  .nx-mi-page .nx-mi-search-note { margin-inline: .12rem; }
}

/* --------------------------------------------------------------------------
   Market Summary Intelligence V2 — interaction, layout and chart hardening
   -------------------------------------------------------------------------- */
.nx-mi-page .nx-mi-section {
  position: relative;
  z-index: 0;
  clear: both;
  isolation: isolate;
  margin-top: 1.2rem;
}
.nx-mi-page .nx-mi-section + .nx-mi-section,
.nx-mi-page .nx-mi-section-row + .nx-mi-section,
.nx-mi-page .nx-mi-section + .nx-mi-section-row {
  margin-top: 1.2rem;
}
.nx-mi-page .nx-mi-section-row {
  position: relative;
  z-index: 0;
  isolation: isolate;
  margin-top: 1.2rem;
}
.nx-mi-page .nx-mi-section-row > [class*="col-"] {
  display: flex;
  min-width: 0;
}
.nx-mi-page .nx-mi-section-row > [class*="col-"] > .nx-mi-section {
  width: 100%;
  margin-top: 0;
}
.nx-mi-page .nx-mi-panel {
  overflow: hidden;
  border: 1px solid var(--nxmi-border);
  border-radius: 1.08rem;
  background: #fff;
  box-shadow: var(--nxmi-card-shadow);
}
.nx-mi-page .nx-mi-panel > .nx-mi-section-head--contained {
  margin: 0;
  padding: 1rem 1.05rem .85rem;
  border-bottom: 1px solid #edf1f5;
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
}
.nx-mi-page .nx-mi-panel > .nx-mi-section-head--contained > div > p {
  max-width: 840px;
}
.nx-mi-page .nx-mi-panel .nx-mi-chart-card--embedded,
.nx-mi-page .nx-mi-panel .nx-mi-focus-card--embedded,
.nx-mi-page .nx-mi-panel .nx-mi-balance-card--embedded {
  overflow: hidden;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.nx-mi-page .nx-mi-details-panel {
  padding-bottom: 1rem;
}
.nx-mi-page .nx-mi-details-panel .nx-mi-detail-grid {
  margin: 0;
  padding: 1rem 1rem 0;
}
.nx-mi-page .nx-mi-details-panel .sd-card {
  overflow: hidden;
}
.nx-mi-page .nx-mi-section--snapshot {
  padding: .05rem 0;
}

/* Robust exact-number tooltip portal (provided by navexa-polish.js). */
.nx-mi-page .nx-tooltip-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: .04rem .2rem;
  border-radius: .4rem;
  direction: ltr;
  unicode-bidi: isolate;
  cursor: default !important;
  outline: none;
  transition: background-color .14s ease, box-shadow .14s ease;
}
.nx-mi-page .nx-tooltip-value:hover,
.nx-mi-page .nx-tooltip-value:focus-visible {
  background: rgba(37, 99, 235, .07);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .08);
}
.nx-exact-number-tooltip {
  position: fixed;
  z-index: 14000;
  max-width: min(320px, calc(100vw - 28px));
  padding: .48rem .68rem;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: .7rem;
  color: #fff;
  background: #172033;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .24);
  direction: rtl;
  unicode-bidi: plaintext;
  text-align: right;
  white-space: normal;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.75;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 10px)) translateY(3px);
  transition: opacity .12s ease, transform .12s ease;
}
.nx-exact-number-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 9px;
  height: 9px;
  border-right: 1px solid rgba(148, 163, 184, .18);
  border-bottom: 1px solid rgba(148, 163, 184, .18);
  background: #172033;
  transform: translate(-50%, -5px) rotate(45deg);
}
.nx-exact-number-tooltip.is-visible {
  opacity: 1;
  transform: translate(-50%, calc(-100% - 10px)) translateY(0);
}

/* Client-side table sorting. */
.nx-mi-page .nx-sortable-head {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
.nx-mi-page .nx-sortable-head:hover,
.nx-mi-page .nx-sortable-head:focus-visible {
  color: #075985;
  background: #eef8ff;
  outline: none;
}
.nx-mi-page .nx-sortable-head.nx-sort-active {
  color: #075985;
  background: #e8f5ff;
}
.nx-mi-page .nx-sort-icon {
  display: inline-flex;
  min-width: 1rem;
  margin-right: .32rem;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: .7rem;
  opacity: .7;
}
.nx-mi-page .nx-sort-active .nx-sort-icon {
  color: #0284c7;
  opacity: 1;
  font-weight: 950;
}

/* Price x real-money relationship matrix. */
.nx-mi-page .nx-mi-panel--matrix {
  border-color: #dce6f1;
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
}
.nx-mi-page .nx-mi-chart-scope {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 34px;
  gap: .12rem;
  padding: .45rem .75rem;
  border: 1px solid #dbe7f3;
  border-radius: 1rem;
  color: #526078;
  background: #f8fbff;
  font-size: .68rem;
  font-weight: 800;
  line-height: 1.55;
  text-align: right;
}
.nx-mi-page .nx-mi-chart-scope small {
  color: #64748b;
  font-size: .62rem;
  font-weight: 700;
}
.nx-mi-page .nx-mi-matrix-guide {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .6rem;
  padding: .85rem 1rem 0;
}
.nx-mi-page .nx-mi-matrix-guide__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .5rem;
  align-items: center;
  min-height: 66px;
  padding: .65rem .7rem;
  border: 1px solid #e6edf4;
  border-radius: .82rem;
  background: #fff;
}
.nx-mi-page .nx-mi-matrix-guide__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(148, 163, 184, .10);
}
.nx-mi-page .nx-mi-matrix-guide__item strong {
  display: block;
  color: #253046;
  font-size: .7rem;
  font-weight: 950;
  line-height: 1.6;
}
.nx-mi-page .nx-mi-matrix-guide__item small {
  display: block;
  margin-top: .08rem;
  color: #8491a3;
  font-size: .61rem;
  font-weight: 700;
  line-height: 1.5;
}
.nx-mi-page .nx-mi-matrix-guide__item b {
  min-width: 48px;
  color: #526078;
  font-size: .68rem;
  font-weight: 950;
  text-align: left;
  white-space: nowrap;
}
.nx-mi-page .nx-mi-matrix-guide__item.is-positive { border-color: rgba(15, 138, 95, .18); background: #f7fdf9; }
.nx-mi-page .nx-mi-matrix-guide__item.is-positive .nx-mi-matrix-guide__dot { background: #0f8a5f; }
.nx-mi-page .nx-mi-matrix-guide__item.is-accum { border-color: rgba(2, 132, 199, .18); background: #f5fbff; }
.nx-mi-page .nx-mi-matrix-guide__item.is-accum .nx-mi-matrix-guide__dot { background: #0284c7; }
.nx-mi-page .nx-mi-matrix-guide__item.is-diverge { border-color: rgba(217, 119, 6, .2); background: #fffbf3; }
.nx-mi-page .nx-mi-matrix-guide__item.is-diverge .nx-mi-matrix-guide__dot { background: #d97706; }
.nx-mi-page .nx-mi-matrix-guide__item.is-negative { border-color: rgba(209, 31, 69, .18); background: #fff7f8; }
.nx-mi-page .nx-mi-matrix-guide__item.is-negative .nx-mi-matrix-guide__dot { background: #d11f45; }
.nx-mi-page .nx-mi-chart-card--matrix {
  margin: .75rem 1rem 1rem;
  padding: .55rem .7rem .65rem;
  overflow: hidden;
  border-color: #e0e8f0;
  box-shadow: none;
  background: #fff;
}
.nx-mi-page .nx-mi-matrix-chart-frame {
  position: relative;
  min-width: 0;
}
.nx-mi-page .nx-mi-chart--bubble {
  min-height: 500px;
}
.nx-mi-page .nx-mi-matrix-side-label {
  position: absolute;
  z-index: 4;
  inset-inline-end: .7rem;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .45rem;
  border-radius: .55rem;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 4px 16px rgba(15, 23, 42, .06);
  pointer-events: none;
  font-size: .61rem;
  font-weight: 850;
  backdrop-filter: blur(5px);
}
.nx-mi-page .nx-mi-matrix-side-label--top { top: .4rem; color: #087a49; }
.nx-mi-page .nx-mi-matrix-side-label--bottom { bottom: 2.55rem; color: #c0263d; }
.nx-mi-page .nx-mi-matrix-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem 1rem;
  flex-wrap: wrap;
  margin-top: -.05rem;
  padding: .5rem .45rem .1rem;
  border-top: 1px dashed #e3eaf2;
  color: #718096;
  font-size: .64rem;
  font-weight: 760;
  line-height: 1.75;
}
.nx-mi-page .nx-mi-matrix-footer span {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.nx-mi-page .nx-mi-matrix-footer i { color: #64748b; }
.nx-mi-page .nx-mi-matrix-footer b {
  color: #334155;
  direction: ltr;
  unicode-bidi: isolate;
}

/* ApexCharts: informational charts must never enter a stuck click/selection state. */
.nx-mi-page .apexcharts-canvas,
.nx-mi-page .apexcharts-canvas:focus,
.nx-mi-page .apexcharts-canvas:focus-visible,
.nx-mi-page .apexcharts-svg,
.nx-mi-page .apexcharts-svg:focus,
.nx-mi-page .apexcharts-svg:focus-visible,
.nx-mi-page .apexcharts-inner:focus,
.nx-mi-page .apexcharts-series:focus,
.nx-mi-page .apexcharts-marker:focus,
.nx-mi-page .apexcharts-bar-area:focus {
  outline: none !important;
}
.nx-mi-page .apexcharts-canvas,
.nx-mi-page .apexcharts-svg {
  -webkit-tap-highlight-color: transparent;
}
.nx-mi-page .apexcharts-selection-rect,
.nx-mi-page .apexcharts-zoom-icon,
.nx-mi-page .apexcharts-selection-icon {
  display: none !important;
}
.nx-mi-page .apexcharts-tooltip {
  overflow: hidden !important;
  border: 1px solid #dfe7f0 !important;
  border-radius: .82rem !important;
  background: #fff !important;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .16) !important;
  direction: rtl !important;
  font-family: inherit !important;
  text-align: right !important;
}
.nx-mi-page .nx-mi-apex-tip {
  min-width: 218px;
  padding: .68rem .75rem;
  direction: rtl;
  unicode-bidi: plaintext;
  color: #334155;
  background: #fff;
  text-align: right;
}
.nx-mi-page .nx-mi-apex-tip__head {
  margin: -.05rem 0 .4rem;
  padding-bottom: .42rem;
  border-bottom: 1px solid #edf1f5;
}
.nx-mi-page .nx-mi-apex-tip__head strong {
  display: block;
  color: #172033;
  font-size: .82rem;
  font-weight: 950;
}
.nx-mi-page .nx-mi-apex-tip__head small {
  display: block;
  margin-top: .05rem;
  color: #8491a3;
  font-size: .64rem;
  font-weight: 700;
}
.nx-mi-page .nx-mi-apex-tip > div:not(.nx-mi-apex-tip__head) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  min-width: 0;
  padding: .18rem 0;
  font-size: .69rem;
}
.nx-mi-page .nx-mi-apex-tip > div > span { color: #64748b; }
.nx-mi-page .nx-mi-apex-tip > div > b {
  color: #243047;
  font-weight: 900;
  unicode-bidi: isolate;
  white-space: nowrap;
}
.nx-mi-page .nx-mi-apex-tip > div > b.text-success { color: #087a49 !important; }
.nx-mi-page .nx-mi-apex-tip > div > b.text-danger { color: #c0263d !important; }
.nx-mi-page .nx-mi-tip-money {
  display: inline-flex;
  align-items: baseline;
  gap: .24rem;
  direction: rtl;
}
.nx-mi-page .nx-mi-tip-money > span {
  direction: ltr;
  unicode-bidi: isolate;
}
.nx-mi-page .nx-mi-tip-money > small {
  color: #94a3b8;
  font-size: .58rem;
  font-weight: 750;
}
.nx-mi-page .nx-mi-tip-money.is-up { color: #087a49 !important; }
.nx-mi-page .nx-mi-tip-money.is-down { color: #c0263d !important; }

/* The balance caption contains compact values with separate exact-value tooltips. */
.nx-mi-page .nx-mi-balance-caption > span {
  display: inline-flex;
  align-items: center;
  gap: .24rem;
  flex-wrap: wrap;
}

@media (max-width: 1199.98px) {
  .nx-mi-page .nx-mi-matrix-guide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nx-mi-page .nx-mi-chart--bubble { min-height: 455px; }
}

@media (max-width: 991.98px) {
  .nx-mi-page .nx-mi-panel > .nx-mi-section-head--contained {
    padding: .9rem .9rem .78rem;
  }
  .nx-mi-page .nx-mi-chart-scope {
    width: 100%;
    justify-content: flex-start;
    border-radius: .68rem;
  }
  .nx-mi-page .nx-mi-details-panel .nx-mi-detail-grid {
    padding: .85rem .85rem 0;
  }
}

@media (max-width: 575.98px) {
  .nx-mi-page .nx-mi-section,
  .nx-mi-page .nx-mi-section + .nx-mi-section,
  .nx-mi-page .nx-mi-section-row + .nx-mi-section,
  .nx-mi-page .nx-mi-section + .nx-mi-section-row,
  .nx-mi-page .nx-mi-section-row {
    margin-top: .85rem;
  }
  .nx-mi-page .nx-mi-panel {
    border-radius: .92rem;
  }
  .nx-mi-page .nx-mi-panel > .nx-mi-section-head--contained {
    padding: .78rem .72rem .68rem;
  }
  .nx-mi-page .nx-mi-matrix-guide {
    grid-template-columns: 1fr;
    gap: .42rem;
    padding: .65rem .65rem 0;
  }
  .nx-mi-page .nx-mi-matrix-guide__item {
    min-height: 58px;
    padding: .52rem .58rem;
  }
  .nx-mi-page .nx-mi-matrix-guide__item strong { font-size: .67rem; }
  .nx-mi-page .nx-mi-matrix-guide__item small { font-size: .59rem; }
  .nx-mi-page .nx-mi-chart-card--matrix {
    margin: .6rem .55rem .65rem;
    padding: .35rem .2rem .45rem;
  }
  .nx-mi-page .nx-mi-chart--bubble { min-height: 420px; }
  .nx-mi-page .nx-mi-matrix-side-label {
    inset-inline-end: .35rem;
    font-size: .57rem;
  }
  .nx-mi-page .nx-mi-matrix-side-label--bottom { bottom: 2.65rem; }
  .nx-mi-page .nx-mi-matrix-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: .18rem;
    padding-inline: .55rem;
  }
  .nx-mi-page .nx-mi-details-panel .nx-mi-detail-grid {
    padding: .65rem .55rem 0;
  }
  .nx-mi-page .nx-sort-icon {
    margin-right: .22rem;
  }
  .nx-exact-number-tooltip {
    max-width: calc(100vw - 24px);
    font-size: .68rem;
  }
}

/* V42: keep the price × money-flow tooltip fully visible near the plot edges. */
.nx-mi-page .nx-mi-panel--matrix,
.nx-mi-page .nx-mi-panel--matrix .nx-mi-chart-card--matrix,
.nx-mi-page .nx-mi-panel--matrix .nx-mi-matrix-chart-frame,
.nx-mi-page .nx-mi-panel--matrix .apexcharts-canvas,
.nx-mi-page .nx-mi-panel--matrix .apexcharts-svg {
  overflow: visible !important;
}
.nx-mi-page .nx-mi-panel--matrix .nx-mi-chart-card--matrix {
  position: relative;
  z-index: 3;
}
.nx-mi-page .nx-mi-panel--matrix .apexcharts-tooltip {
  z-index: 120 !important;
  overflow: visible !important;
  pointer-events: none !important;
}

/* V43: compact, readable data tables across all five Market Summary analyst pages. */
.nx-ms-page--money .nx-ms-table,
.nx-ms-page--supply .nx-ms-table,
.nx-ms-page--players .nx-ms-table,
.nx-ms-page--industries .nx-ms-table,
.nx-ms-page--impact .nx-ms-table {
  font-size: .72rem;
}
.nx-ms-page--money .nx-ms-table thead th,
.nx-ms-page--supply .nx-ms-table thead th,
.nx-ms-page--players .nx-ms-table thead th,
.nx-ms-page--industries .nx-ms-table thead th,
.nx-ms-page--impact .nx-ms-table thead th {
  padding: .58rem .5rem;
  font-size: .66rem;
  line-height: 1.45;
}
.nx-ms-page--money .nx-ms-table tbody td,
.nx-ms-page--supply .nx-ms-table tbody td,
.nx-ms-page--players .nx-ms-table tbody td,
.nx-ms-page--industries .nx-ms-table tbody td,
.nx-ms-page--impact .nx-ms-table tbody td {
  padding: .56rem .5rem;
  font-size: .72rem;
  line-height: 1.45;
}
.nx-ms-page--money .nx-ms-table { min-width: 720px; }
.nx-ms-page--supply .nx-ms-table { min-width: 850px; }
.nx-ms-page--players .nx-ms-table { min-width: 1120px; }
.nx-ms-page--industries .nx-ms-table { min-width: 820px; }
.nx-ms-page--impact .nx-ms-table { min-width: 620px; }

.nx-ms-page--money .nx-ms-tablewrap,
.nx-ms-page--supply .nx-ms-tablewrap,
.nx-ms-page--players .nx-ms-tablewrap,
.nx-ms-page--industries .nx-ms-tablewrap,
.nx-ms-page--impact .nx-ms-tablewrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
}

/* Keep the identity column visible while horizontally scrolling expert tables. */
.nx-ms-page--impact .nx-ms-table th:first-child,
.nx-ms-page--impact .nx-ms-table td:first-child {
  position: sticky;
  right: 0;
  z-index: 4;
  min-width: 86px;
  background: #fff;
  box-shadow: -8px 0 12px -13px rgba(15,23,42,.55);
}
.nx-ms-page--impact .nx-ms-table thead th:first-child {
  z-index: 8;
  background: #f8fafc;
}
.nx-ms-page--money .nx-ms-table td:first-child,
.nx-ms-page--supply .nx-ms-table td:first-child,
.nx-ms-page--players .nx-ms-table td:first-child,
.nx-ms-page--industries .nx-ms-table td:first-child {
  min-width: 92px;
}

@media (max-width: 767.98px) {
  .nx-ms-page--money .nx-ms-table,
  .nx-ms-page--supply .nx-ms-table,
  .nx-ms-page--players .nx-ms-table,
  .nx-ms-page--industries .nx-ms-table,
  .nx-ms-page--impact .nx-ms-table {
    font-size: .68rem;
  }
  .nx-ms-page--money .nx-ms-table thead th,
  .nx-ms-page--supply .nx-ms-table thead th,
  .nx-ms-page--players .nx-ms-table thead th,
  .nx-ms-page--industries .nx-ms-table thead th,
  .nx-ms-page--impact .nx-ms-table thead th {
    padding: .5rem .42rem;
    font-size: .62rem;
  }
  .nx-ms-page--money .nx-ms-table tbody td,
  .nx-ms-page--supply .nx-ms-table tbody td,
  .nx-ms-page--players .nx-ms-table tbody td,
  .nx-ms-page--industries .nx-ms-table tbody td,
  .nx-ms-page--impact .nx-ms-table tbody td {
    padding: .5rem .42rem;
    font-size: .68rem;
  }
  .nx-ms-page--money .nx-ms-table { min-width: 680px; }
  .nx-ms-page--supply .nx-ms-table { min-width: 820px; }
  .nx-ms-page--players .nx-ms-table { min-width: 1040px; }
  .nx-ms-page--industries .nx-ms-table { min-width: 760px; }
  .nx-ms-page--impact .nx-ms-table { min-width: 590px; }
}

/* V44: identity-column alignment contract for all five Market Summary analyst tables. */
.nx-ms-page--money .nx-ms-table thead th:first-child,
.nx-ms-page--supply .nx-ms-table thead th:first-child,
.nx-ms-page--players .nx-ms-table thead th:first-child,
.nx-ms-page--industries .nx-ms-table thead th:first-child,
.nx-ms-page--impact .nx-ms-table thead th:first-child {
  text-align: center !important;
}
.nx-ms-page--money .nx-ms-table tbody td:first-child,
.nx-ms-page--supply .nx-ms-table tbody td:first-child,
.nx-ms-page--players .nx-ms-table tbody td:first-child,
.nx-ms-page--industries .nx-ms-table tbody td:first-child,
.nx-ms-page--impact .nx-ms-table tbody td:first-child {
  text-align: center !important;
}

/* V4: compact, responsive market-view selector. No extra JS/CSS dependency. */
.nx-market-scope-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  margin: .62rem 0 .9rem;
  padding: .46rem .5rem .46rem .68rem;
  border: 1px solid #e2e8f0;
  border-radius: .92rem;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 7px 20px rgba(15, 23, 42, .045);
}
.nx-market-scope-switch__head {
  display: flex;
  align-items: center;
  min-width: max-content;
}
.nx-market-scope-switch__label {
  display: inline-flex;
  align-items: center;
  gap: .34rem;
  color: #475569;
  font-size: .68rem;
  font-weight: 900;
  white-space: nowrap;
}
.nx-market-scope-switch__label i {
  color: #2563eb;
  font-size: .78rem;
}
.nx-market-scope-switch__options {
  display: grid;
  grid-template-columns: .82fr 1.28fr .95fr;
  gap: .22rem;
  width: min(100%, 460px);
  padding: .22rem;
  border: 1px solid #e2e8f0;
  border-radius: .72rem;
  background: #f1f5f9;
}
.nx-market-scope-switch__option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .28rem;
  min-width: 0;
  min-height: 36px;
  padding: .32rem .46rem;
  border: 1px solid transparent;
  border-radius: .56rem;
  color: #64748b;
  background: transparent;
  font-size: .66rem;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: color .14s ease, background-color .14s ease, border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}
.nx-market-scope-switch__option i {
  flex: 0 0 auto;
  font-size: .72rem;
}
.nx-market-scope-switch__option:hover {
  color: #1d4ed8;
  background: rgba(255, 255, 255, .72);
}
.nx-market-scope-switch__option:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .16);
}
.nx-market-scope-switch__option.is-active {
  color: #1d4ed8;
  border-color: #dbeafe;
  background: #fff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .08);
}
.nx-market-scope-switch__option.is-active i { color: #2563eb; }

/* Scope descriptions use Bootstrap's unified tooltip engine, not the native title attribute. */
.tooltip.nx-market-scope-tooltip .tooltip-inner {
  max-width: 270px;
  padding: .48rem .68rem !important;
  border: 1px solid rgba(147, 197, 253, .24);
  border-radius: .7rem !important;
  background: linear-gradient(135deg, #0f2747 0%, #123f73 100%) !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .24) !important;
  color: #fff !important;
  direction: rtl;
  text-align: right !important;
  font-size: .7rem !important;
  font-weight: 800;
  line-height: 1.75 !important;
}

@media (max-width: 767.98px) {
  .nx-market-scope-switch {
    align-items: stretch;
    flex-direction: column;
    gap: .42rem;
    padding: .5rem;
  }
  .nx-market-scope-switch__head { padding-inline: .12rem; }
  .nx-market-scope-switch__options { width: 100%; }
}
@media (max-width: 420px) {
  .nx-market-scope-switch__label { font-size: .64rem; }
  .nx-market-scope-switch__option {
    min-height: 38px;
    gap: .18rem;
    padding-inline: .24rem;
    font-size: .61rem;
    white-space: normal;
  }
  .nx-market-scope-switch__option i { font-size: .66rem; }
}
@media (prefers-reduced-motion: reduce) {
  .nx-market-scope-switch__option { transition: none; }
}

/* V5: scope switching stays on-page; show a subtle progress cue only while fresh data arrives. */
.nx-market-scope-switch.is-loading .nx-market-scope-switch__options {
  cursor: progress;
}
.nx-market-scope-switch.is-loading .nx-market-scope-switch__option:not(.is-active) {
  opacity: .72;
}
.nx-market-scope-switch.is-loading .nx-market-scope-switch__option.is-active {
  position: relative;
  overflow: hidden;
}
.nx-market-scope-switch.is-loading .nx-market-scope-switch__option.is-active::after {
  content: "";
  position: absolute;
  inset-inline: 18%;
  bottom: 2px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  opacity: .55;
  animation: nxScopeLoading 720ms ease-in-out infinite alternate;
}
@keyframes nxScopeLoading {
  from { transform: scaleX(.35); opacity: .25; }
  to { transform: scaleX(1); opacity: .65; }
}
@media (prefers-reduced-motion: reduce) {
  .nx-market-scope-switch.is-loading .nx-market-scope-switch__option.is-active::after { animation: none; }
}
