/**
 * Phase 17.UI.3 — Visual rhythm & density normalization.
 * Scoped to /markets/overview. Does not change color system from 17.UI.2.
 */

[data-zs-page='markets-overview'] {
  /* ── Proportion tokens (shared across all tabs) ── */
  --mo-content-max-width: 1440px;
  --mo-gutter: 24px;
  --mo-gutter-compact: 16px;
  --mo-section-gap: 24px;
  --mo-card-padding: 20px;
  --mo-card-padding-compact: 16px;
  --mo-card-radius: 16px;
  --mo-table-row-height: 48px;
  --mo-table-header-height: 40px;
  --mo-list-row-height: 48px;
  --mo-stat-card-min-height: 88px;
  --mo-spotlight-min-height: 480px;
}

/* ═══════════════════════════════════════════════════════════════
   1. GLOBAL FRAME — tab panes share one content anchor
   ═══════════════════════════════════════════════════════════════ */

[data-zs-page='markets-overview'] .mo-section-tabs {
  margin-bottom: var(--mo-section-gap) !important;
}

[data-zs-page='markets-overview'] .mo-tab-pane,
[data-zs-page='markets-overview'] .zs-mkt-section-card {
  margin-top: 0;
  margin-bottom: var(--mo-section-gap);
}

[data-zs-page='markets-overview'] .zs-mkt-page-inner {
  max-width: var(--mo-content-max-width);
  padding-inline: var(--mo-gutter);
}

[data-zs-page='markets-overview'] .mo-overview-card,
[data-zs-page='markets-overview'] .mo-card-primary,
[data-zs-page='markets-overview'] .mo-mv-featured,
[data-zs-page='markets-overview'] .mo-mv-card,
[data-zs-page='markets-overview'] .mo-tvl-summary,
[data-zs-page='markets-overview'] .mo-tvl-card,
[data-zs-page='markets-overview'] .zs-cc {
  border-radius: var(--mo-card-radius) !important;
}

/* ═══════════════════════════════════════════════════════════════
   3. OVERVIEW — aligned two-column module
   ═══════════════════════════════════════════════════════════════ */

[data-zs-page='markets-overview'] .mo-spotlight {
  margin-bottom: var(--mo-section-gap);
}

[data-zs-page='markets-overview'] .mo-spotlight-desktop {
  gap: var(--mo-section-gap) !important;
  align-items: start;
}

[data-zs-page='markets-overview'] .mo-spotlight-desktop > .mo-overview-card.mo-spotlight-chart {
  min-height: var(--mo-spotlight-min-height);
  display: flex;
  flex-direction: column;
}

[data-zs-page='markets-overview'] .mo-spotlight-desktop > .mo-overview-card.mo-spotlight-coins {
  min-height: 0;
  height: auto;
  align-self: start;
  display: block;
}

[data-zs-page='markets-overview'] .mo-spotlight-desktop .zs-cc {
  flex: 1;
  min-height: 0;
}

[data-zs-page='markets-overview'] .mo-spotlight-desktop .mo-spotlight-coins .mo-coin-list {
  display: block;
  min-height: 0;
  height: auto;
}

[data-zs-page='markets-overview'] .mo-spotlight-coins section[dir='rtl'] {
  flex: none;
  min-height: 0;
  height: auto !important;
}

[data-zs-page='markets-overview'] .mo-spotlight-coins section[dir='rtl'] > div {
  height: auto !important;
}

[data-zs-page='markets-overview'] .mo-spotlight-coins section[dir='rtl'] > div > div:nth-child(2) {
  flex: 0 0 auto !important;
  overflow: visible !important;
}

[data-zs-page='markets-overview'] .mo-cc-header {
  padding: var(--mo-card-padding) var(--mo-card-padding) 12px !important;
}

[data-zs-page='markets-overview'] .mo-cc-chart-area {
  padding: 12px var(--mo-card-padding) var(--mo-card-padding) !important;
}

[data-zs-page='markets-overview'] .mo-spotlight-desktop section > div {
  padding: var(--mo-card-padding) var(--mo-card-padding) 0 !important;
}

[data-zs-page='markets-overview'] .mo-mcap-btc-section {
  gap: var(--mo-section-gap) !important;
  margin-bottom: var(--mo-section-gap) !important;
}

[data-zs-page='markets-overview'] .mo-mcap-btc-section > .mo-overview-card {
  min-height: 420px;
}

/* ═══════════════════════════════════════════════════════════════
   4. MARKET MOVERS — light touch (preserve hierarchy)
   ═══════════════════════════════════════════════════════════════ */

[data-zs-page='markets-overview'] .mo-mv-hub {
  gap: var(--mo-section-gap);
  --mo-mv-radius: var(--mo-card-radius);
}

/* ═══════════════════════════════════════════════════════════════
   5. CRYPTO PERFORMANCE — analytical density, not empty card
   ═══════════════════════════════════════════════════════════════ */

[data-zs-crypto-root][data-zs-page='markets-overview']
  .zs-mkt-section-card:has([data-zs-perf-crypto='1']) {
  padding: var(--mo-card-padding) !important;
  padding-top: var(--mo-card-padding) !important;
}

[data-zs-page='markets-overview'] [data-zs-perf-crypto='1'] {
  padding: 0 !important;
}

[data-zs-page='markets-overview'] [data-zs-perf-crypto='1'] h2 {
  padding: 0 0 10px !important;
  margin: 0 0 0 !important;
  font-size: 18px !important;
  font-weight: 600 !important;
}

[data-zs-page='markets-overview'] [data-zs-perf-crypto='1'] .zs-perf-row {
  min-height: var(--mo-list-row-height) !important;
  height: var(--mo-list-row-height) !important;
  padding: 0 var(--mo-card-padding-compact) !important;
  column-gap: 16px !important;
}

[data-zs-page='markets-overview'] [data-zs-perf-crypto='1'] .zs-perf-row > div:nth-child(2) {
  height: 28px !important;
  min-height: 28px !important;
  align-self: center !important;
}

[data-zs-page='markets-overview'] [data-zs-perf-crypto='1'] .zs-perf-tab {
  padding: 4px 12px !important;
  min-height: 32px;
}

[data-zs-page='markets-overview'] [data-zs-perf-crypto='1'] > div:last-child {
  margin-top: 12px !important;
  padding: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════
   6. MARKET CAP — executive intelligence strip + terminal table
   ═══════════════════════════════════════════════════════════════ */

[data-zs-page='markets-overview'] .mo-crypto-table-section .all-coins-terminal-page-head {
  margin-bottom: 12px;
}

[data-zs-page='markets-overview'] .mo-crypto-table-section .all-coins-terminal-cards {
  gap: 12px;
  margin-bottom: 16px;
}

[data-zs-page='markets-overview'] .mo-crypto-table-section .all-coins-terminal-card {
  padding: var(--mo-card-padding-compact) var(--mo-card-padding) !important;
  min-height: var(--mo-stat-card-min-height) !important;
}

[data-zs-page='markets-overview'] .mo-crypto-table-section .all-coins-terminal-card-inner {
  min-height: 0 !important;
  gap: 4px !important;
}

[data-zs-page='markets-overview'] .mo-crypto-table-section .all-coins-terminal-toolbar {
  margin-bottom: 12px;
  gap: 12px;
}

[data-zs-page='markets-overview'] .mo-crypto-table-section .all-coins-terminal-grid-row--header .all-coins-terminal-grid-cell {
  min-height: var(--mo-table-header-height);
  padding-block: 8px;
}

[data-zs-page='markets-overview'] .mo-crypto-table-section .all-coins-terminal-grid-row--data .all-coins-terminal-grid-cell {
  min-height: var(--mo-table-row-height);
  padding-block: 6px;
  align-items: center;
}

[data-zs-page='markets-overview'] .mo-crypto-table-section .all-coins-terminal-spark svg {
  max-height: 28px;
}

/* ═══════════════════════════════════════════════════════════════
   7. TVL — compact institutional table (7 rows, no stretch)
   ═══════════════════════════════════════════════════════════════ */

[data-zs-page='markets-overview'] .mo-tvl-panel {
  margin-bottom: var(--mo-section-gap);
}

[data-zs-page='markets-overview'] .mo-tvl-title-row {
  margin-bottom: 12px;
}

[data-zs-page='markets-overview'] .mo-tvl-summary {
  height: auto;
  min-height: 56px;
  padding: 12px 16px;
  margin-bottom: 12px;
}

[data-zs-page='markets-overview'] .mo-tvl-card {
  height: auto !important;
  min-height: 0 !important;
}

[data-zs-page='markets-overview'] .mo-tvl-head {
  min-height: var(--mo-table-header-height);
  padding: 6px 16px;
}

[data-zs-page='markets-overview'] .mo-tvl-row {
  min-height: var(--mo-table-row-height);
  height: var(--mo-table-row-height);
  padding: 6px 16px;
}

[data-zs-page='markets-overview'] .mo-tvl-footer-link {
  margin-top: 12px;
}

/* ═══════════════════════════════════════════════════════════════
   8. (removed) GAINERS / LOSERS tab pane — content lives on homepage
   ═══════════════════════════════════════════════════════════════ */

[data-zs-page='markets-overview'] .mo-density-row {
  min-height: var(--mo-list-row-height);
  height: var(--mo-list-row-height);
  padding-block: 0 !important;
  padding-inline: var(--mo-card-padding-compact) !important;
}

[data-zs-page='markets-overview'] .mo-density-row img.rounded-full,
[data-zs-page='markets-overview'] .mo-gl-coin-logo {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px;
}

[data-zs-page='markets-overview'] .mo-overview-card .mo-density-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1.4fr) minmax(96px, 0.75fr) minmax(80px, 0.6fr) !important;
  column-gap: 12px !important;
  align-items: center !important;
}

[data-zs-page='markets-overview'] .mo-overview-card .mo-density-row > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

[data-zs-page='markets-overview'] .mo-overview-card .mo-density-row > div:nth-child(2),
[data-zs-page='markets-overview'] .mo-overview-card .mo-density-row > div:nth-child(3) {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  text-align: end;
}

[data-zs-page='markets-overview'] .mo-overview-card .mo-density-row > div:nth-child(3) span {
  min-width: 72px;
  text-align: center;
  justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════
   10. Typography — no synthetic weight / glow on overview
   ═══════════════════════════════════════════════════════════════ */

[data-zs-page='markets-overview'] .marketOverviewPage,
[data-zs-page='markets-overview'] .marketOverviewPage *:not(svg):not(path) {
  font-synthesis: none;
  text-shadow: none;
}

[data-zs-page='markets-overview'] [data-zs-perf-crypto='1'] .zs-perf-tab {
  font-weight: 500 !important;
}

[data-zs-page='markets-overview'] [data-zs-perf-crypto='1'] .zs-perf-tab[data-active='true'] {
  font-weight: 600 !important;
}

[data-zs-page='markets-overview'] .mo-cc-price,
[data-zs-page='markets-overview'] .mo-cc-change,
[data-zs-page='markets-overview'] .mo-overview-title,
[data-zs-page='markets-overview'] .mo-section-tab {
  letter-spacing: 0 !important;
}

[data-zs-page='markets-overview'] .mo-crypto-table-section .all-coins-terminal-card {
  border-radius: var(--mo-card-radius) !important;
}

/* Override legacy 58px row locks from mobile.css */
[data-zs-page='markets-overview'] .mo-density-row {
  min-height: var(--mo-list-row-height) !important;
  height: var(--mo-list-row-height) !important;
}

[data-zs-page='markets-overview'] [data-zs-perf-crypto='1'] .zs-perf-row {
  min-height: var(--mo-list-row-height) !important;
  height: var(--mo-list-row-height) !important;
}

[data-zs-page='markets-overview'] .mo-coin-list div[role='button'] {
  height: var(--mo-list-row-height) !important;
  min-height: var(--mo-list-row-height) !important;
  max-height: var(--mo-list-row-height);
  padding-block: 6px !important;
}

/* Main Cryptocurrencies — tabular numeric column (price / USD / %) */
[data-zs-page='markets-overview'] .mo-coin-list .mo-coin-quote {
  display: grid;
  grid-template-columns: 10ch 26px;
  grid-template-rows: auto auto;
  column-gap: 4px;
  row-gap: 2px;
  width: calc(10ch + 30px);
  flex-shrink: 0;
  align-self: center;
  font-family: 'Inter', 'SF Pro Display', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

[data-zs-page='markets-overview'] .mo-coin-list .mo-coin-price {
  grid-column: 1;
  grid-row: 1;
  text-align: right;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.2;
  white-space: nowrap;
}

[data-zs-page='markets-overview'] .mo-coin-list .mo-coin-currency {
  grid-column: 2;
  grid-row: 1;
  align-self: baseline;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.2;
  white-space: nowrap;
}

[data-zs-page='markets-overview'] .mo-coin-list .mo-coin-change {
  grid-column: 1;
  grid-row: 2;
  text-align: right;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

[data-zs-page='markets-overview'] .mo-coin-list .mo-coin-quote-skeleton {
  border-radius: 4px;
}

[data-zs-page='markets-overview'] .mo-coin-list .mo-coin-quote-skeleton--price {
  grid-column: 1 / -1;
  grid-row: 1;
  height: 14px;
  width: 100%;
}

[data-zs-page='markets-overview'] .mo-coin-list .mo-coin-quote-skeleton--change {
  grid-column: 1;
  grid-row: 2;
  height: 12px;
  width: 100%;
}

[data-zs-page='markets-overview'] .mo-crypto-table-section .all-coins-terminal-grid-cell {
  min-height: var(--mo-table-row-height) !important;
}

/* ═══════════════════════════════════════════════════════════════
   13. Responsive — preserve rhythm, avoid overflow
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 1023px) {
  [data-zs-page='markets-overview'] {
    --mo-spotlight-min-height: 0;
  }

  [data-zs-page='markets-overview'] .mo-spotlight-desktop > .mo-overview-card {
    min-height: 0;
  }

  [data-zs-page='markets-overview'] [data-zs-perf-crypto='1'] .zs-perf-row {
    grid-template-columns: minmax(140px, 180px) minmax(0, 1fr) minmax(64px, 80px) !important;
  }
}

@media (max-width: 767px) {
  [data-zs-page='markets-overview'] {
    --mo-gutter: var(--mo-gutter-compact);
    --mo-list-row-height: 52px;
  }

  [data-zs-page='markets-overview'] .mo-overview-card .mo-density-row {
    grid-template-columns: minmax(0, 1.35fr) minmax(88px, 0.78fr) minmax(72px, 0.62fr) !important;
    column-gap: 8px !important;
  }
}

/**
 * Phase 17.UI.4 — Full-width institutional canvas.
 * Horizontal layout only. Preserves Phase 17.UI.3 vertical rhythm tokens.
 * Scoped to /markets/overview.
 */

[data-zs-page='markets-overview'] {
  --mo-gutter-fluid: clamp(20px, 2.2vw, 40px);
}

/* ═══════════════════════════════════════════════════════════════
   DESKTOP WORKSPACE — remove 1440 centered island
   ═══════════════════════════════════════════════════════════════ */

@media (min-width: 1024px) {
  [data-zs-page='markets-overview'] {
    --mo-content-max-width: none;
    --mo-gutter: var(--mo-gutter-fluid);
  }

  [data-zs-page='markets-overview'] .zs-mkt-page-inner,
  [data-zs-page='markets-overview'] .mo-overview-shell {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    padding-inline: var(--mo-gutter-fluid);
    box-sizing: border-box;
  }

  [data-zs-page='markets-overview'] .marketOverviewPage {
    width: 100%;
    max-width: none;
  }
}

@media (min-width: 1366px) {
  [data-zs-page='markets-overview'] {
    --mo-gutter-fluid: clamp(22px, 2.1vw, 44px);
  }
}

@media (min-width: 1600px) {
  [data-zs-page='markets-overview'] {
    --mo-gutter-fluid: clamp(24px, 2vw, 48px);
  }

  /* Overview — chart gains width; coin list stays proportionally narrower */
  [data-zs-page='markets-overview'] .mo-spotlight-desktop {
    grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.85fr) !important;
  }
}

@media (min-width: 1920px) {
  [data-zs-page='markets-overview'] {
    --mo-gutter-fluid: clamp(28px, 1.8vw, 48px);
  }

  [data-zs-page='markets-overview'] .mo-spotlight-desktop {
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.8fr) !important;
  }
}

/* Tablet/mobile — preserve existing adaptive rules from mobile.css */
@media (max-width: 1023px) {
  [data-zs-page='markets-overview'] .zs-mkt-page-inner {
    max-width: 100%;
    padding-inline: var(--mo-gutter-compact, 16px);
  }

  [data-zs-page='markets-overview'] .mo-overview-shell {
    max-width: 100%;
  }
}

/**
 * Phase 17.UI.4B — Overview desktop independent column flow.
 * Superseded layout rules for the Visual Architecture Pass live in
 * markets-overview-workspace-arch.css (stage + rail + tertiary band).
 * Keep only mobile-hide helper + coin-list fill helpers here.
 */

@media (min-width: 1024px) {
  [data-zs-page='markets-overview'] .mo-overview-desktop-canvas .mo-coin-list div[role='button'] {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  /* Rail density uses identity | price | change — do not collapse to 2 cols */
  [data-zs-page='markets-overview'] .mo-overview-desktop-canvas .mo-coin-rail .mo-coin-row {
    grid-template-columns: minmax(0, 1fr) auto auto !important;
  }

  [data-zs-page='markets-overview'] .mo-overview-desktop-canvas .mo-coin-list div[role='button'] > div:first-child {
    justify-self: start;
    min-width: 0;
  }

  [data-zs-page='markets-overview'] .mo-overview-desktop-canvas .mo-coin-list .mo-coin-quote {
    justify-self: end;
  }

  [data-zs-page='markets-overview'] .mo-overview-stack-mobile .mo-mcap-btc-section {
    display: none !important;
  }
}

/**
 * Phase 17.UI.5 — Overview premium finish (desktop canvas only).
 * Presentation polish for chart + crypto list cohesion. No layout architecture changes.
 */

@media (min-width: 1024px) {
  /* Stage hierarchy owned by markets-overview-workspace-arch.css — do not re-equalize card chrome. */
  [data-zs-page='markets-overview'] .mo-overview-desktop-canvas .mo-spotlight-chart .mo-cc-header {
    padding: 12px 14px 8px !important;
  }

  [data-zs-page='markets-overview'] .mo-overview-desktop-canvas .mo-spotlight-coins section[dir='rtl'] > div {
    padding: 12px 12px 0 !important;
  }

  [data-zs-page='markets-overview'] .mo-overview-desktop-canvas .mo-spotlight-coins section[dir='rtl'] h2 {
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: 0;
    margin-bottom: 6px;
    line-height: 1.3;
    color: var(--zs-text-secondary, #64748b);
  }

  /* ── Main chart — institutional plot presentation ── */
  [data-zs-page='markets-overview'] .mo-overview-desktop-canvas .mo-cc-chart-box--overview-desktop {
    padding: 2px 12px 14px !important;
  }

  [data-zs-page='markets-overview']
    .mo-overview-desktop-canvas
    .mo-cc-chart-box--overview-desktop
    .recharts-cartesian-grid-horizontal
    line {
    stroke: var(--mo-chart-grid-stroke) !important;
    stroke-opacity: 1 !important;
  }

  [data-zs-page='markets-overview']
    .mo-overview-desktop-canvas
    .mo-cc-chart-box--overview-desktop
    .recharts-area-curve {
    stroke-width: 2.25 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
  }

  [data-zs-page='markets-overview']
    .mo-overview-desktop-canvas
    .mo-cc-chart-box--overview-desktop:not(.mo-chart--down):not(.mo-chart--neutral)
    .recharts-area-curve {
    stroke: var(--mo-chart-line-up, #16a34a) !important;
  }

  [data-zs-page='markets-overview']
    .mo-overview-desktop-canvas
    .mo-cc-chart-box--overview-desktop.mo-chart--down
    .recharts-area-curve {
    stroke: var(--mo-chart-line-down, #dc2626) !important;
    stroke-opacity: 0.92 !important;
  }

  [data-zs-page='markets-overview']
    .mo-overview-desktop-canvas
    .mo-cc-chart-box--overview-desktop.mo-chart--neutral
    .recharts-area-curve {
    stroke: var(--mo-text-muted, var(--zs-text-secondary, #64748b)) !important;
  }

  [data-zs-page='markets-overview']
    .mo-overview-desktop-canvas
    .mo-cc-chart-box--overview-desktop
    .recharts-area-area {
    opacity: 1 !important;
  }

  [data-zs-page='markets-overview']
    .mo-overview-desktop-canvas
    .mo-cc-chart-box--overview-desktop
    .recharts-cartesian-axis-tick-value {
    fill: var(--mo-text-muted, var(--zs-text-secondary)) !important;
    font-size: 10.5px !important;
    font-weight: 500;
    opacity: 0.88;
  }

  /* ── Main crypto list — row clarity ── */
  [data-zs-page='markets-overview'] .mo-overview-desktop-canvas .mo-coin-list div[role='button'] {
    padding-inline: 6px;
    border-top-color: var(--mo-divider-color, rgba(15, 23, 42, 0.08));
  }

  [data-zs-page='markets-overview']
    .mo-overview-desktop-canvas
    .mo-coin-list
    div[role='button']
    > div:first-child
    > div:last-child
    > span:last-child {
    color: var(--mo-text-muted, var(--zs-text-secondary)) !important;
    opacity: 0.92;
  }

  [data-zs-page='markets-overview'] .mo-overview-desktop-canvas .mo-coin-list .mo-coin-currency {
    color: var(--mo-text-muted, var(--zs-text-secondary)) !important;
    opacity: 0.9;
  }

  [data-zs-page='markets-overview'] .mo-overview-desktop-canvas .mo-coin-list .mo-coin-price,
  [data-zs-page='markets-overview'] .mo-overview-desktop-canvas .mo-coin-list .mo-coin-change {
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum' 1;
  }
}

/* Light mode — restore readable chart axis/grid (overrides dark-biased mobile chart rules) */
@media (min-width: 1024px) {
  [data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light']
    .mo-overview-desktop-canvas
    .mo-cc-chart-box--overview-desktop
    .recharts-cartesian-grid-horizontal
    line {
    stroke: rgba(15, 23, 42, 0.06) !important;
  }

  [data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light']
    .mo-overview-desktop-canvas
    .mo-cc-chart-box--overview-desktop
    .recharts-cartesian-axis-tick-value {
    fill: #64748b !important;
  }
}

/* Chart tooltip — light mode semantic surface (fixes dark leak from mobile chart rules) */
[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light']
  .mo-cc-chart-box
  .recharts-tooltip-wrapper
  .zs-tp:not(.zs-tp--dark) {
  background: var(--mo-surface, #ffffff) !important;
  border: 1px solid var(--mo-border, rgba(15, 23, 42, 0.1)) !important;
  border-radius: 8px !important;
  padding: 6px 10px !important;
  box-shadow: var(--crypto-card-shadow, 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04)) !important;
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light']
  .mo-cc-chart-box
  .recharts-tooltip-wrapper
  .zs-tp:not(.zs-tp--dark)
  .zs-tp-v {
  color: var(--mo-text-primary, #0f172a) !important;
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light']
  .mo-cc-chart-box
  .recharts-tooltip-wrapper
  .zs-tp:not(.zs-tp--dark)
  .zs-tp-t {
  color: var(--mo-text-muted, #64748b) !important;
}

/* "أكبر الفرص" — premium elevated opportunity cards (light only) */
[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light']
  .mo-mv-opp-section
  .mo-mv-opp-card {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 14px !important;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 4px 12px rgba(15, 23, 42, 0.055),
    0 12px 28px rgba(15, 23, 42, 0.045) !important;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light']
  .mo-mv-opp-section
  .mo-mv-opp-card:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 23, 42, 0.08) !important;
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.05),
    0 8px 20px rgba(15, 23, 42, 0.07),
    0 18px 36px rgba(15, 23, 42, 0.055) !important;
}

/* ── Final visual polish — Market Movers hub (light only) ── */

/* 1) Featured wide card — subtle elevation, no card hover lift */
[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light'] .mo-mv-featured {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.03),
    0 5px 14px rgba(15, 23, 42, 0.05),
    0 14px 30px rgba(15, 23, 42, 0.04) !important;
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light']
  .mo-mv-featured.mo-mv-hover:hover {
  transform: none !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.03),
    0 5px 14px rgba(15, 23, 42, 0.05),
    0 14px 30px rgba(15, 23, 42, 0.04) !important;
}

/* 2) Top-3 widgets — metric hierarchy */
[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light'] .mo-mv-widget {
  box-shadow: none !important;
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light'] .mo-mv-widget-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--mo-text-muted, #64748b);
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light'] .mo-mv-widget-hero {
  font-size: 24px;
  font-weight: 800;
  opacity: 1;
  letter-spacing: -0.02em;
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light']
  .mo-mv-widget--winners
  .mo-mv-widget-hero {
  color: #16a34a;
  opacity: 1;
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light']
  .mo-mv-widget--losers
  .mo-mv-widget-hero {
  color: #dc2626;
  opacity: 1;
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light'] .mo-mv-widget-chg {
  font-size: 13px;
  font-weight: 700;
  opacity: 1;
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light'] .mo-mv-widget-sym {
  font-size: 13px;
  font-weight: 600;
  color: var(--mo-text-primary, #0f172a);
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light'] .mo-mv-widget-vol {
  font-size: 10px;
  font-weight: 500;
  color: var(--mo-text-muted, #64748b);
  opacity: 0.82;
}

/* 3) Opportunity cards — clarity pass (typography only) */
[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light']
  .mo-mv-opp-section
  .mo-mv-opp-price {
  color: #0f172a;
  font-weight: 800;
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light']
  .mo-mv-opp-section
  .mo-mv-opp-badge {
  opacity: 1;
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light']
  .mo-mv-opp-section
  .mo-mv-opp-symbol {
  font-size: 11px;
  font-weight: 600;
  color: var(--mo-text-secondary, #475569);
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light']
  .mo-mv-opp-section
  .mo-mv-opp-pair,
[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light']
  .mo-mv-opp-section
  .mo-mv-opp-foot {
  color: var(--mo-text-muted, #64748b);
  opacity: 0.78;
}

/* 4) "لماذا يتحرك السوق اليوم؟" — institutional contrast */
[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light'] .mo-mv-insight {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.025),
    0 4px 12px rgba(15, 23, 42, 0.035);
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light'] .mo-mv-insight-title {
  color: #0f172a;
  opacity: 1;
  font-weight: 700;
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light'] .mo-mv-insight-item {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.025),
    0 4px 12px rgba(15, 23, 42, 0.035);
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light'] .mo-mv-insight-icon {
  color: #64748b;
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light'] .mo-mv-insight-item-title {
  color: #0f172a;
  opacity: 1;
  font-weight: 700;
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light'] .mo-mv-insight-item-desc {
  color: #64748b;
  opacity: 0.92;
}

/* ── Crypto Performance tab — light institutional bars (overview only) ── */
[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light']
  [data-zs-perf-crypto='1']
  .zs-perf-row
  > div:nth-child(2)
  > div:first-child {
  background: rgba(15, 23, 42, 0.06) !important;
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light']
  [data-zs-perf-crypto='1']
  .zs-perf-row
  > div:nth-child(2)
  > div:nth-child(2) {
  background: rgba(15, 23, 42, 0.14) !important;
  opacity: 1 !important;
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light']
  [data-zs-perf-crypto='1']
  .zs-perf-row
  > div:nth-child(2)
  > div:nth-child(3)[style*='left: 50%'] {
  background: #16a34a !important;
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light']
  [data-zs-perf-crypto='1']
  .zs-perf-row
  > div:nth-child(2)
  > div:nth-child(3)[style*='right: 50%'] {
  background: #dc2626 !important;
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light']
  [data-zs-perf-crypto='1']
  .zs-perf-row
  > div:nth-child(2)
  > div:nth-child(3)[style*='left: 50%']::after {
  background: #16a34a !important;
  box-shadow: none !important;
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light']
  [data-zs-perf-crypto='1']
  .zs-perf-row
  > div:nth-child(2)
  > div:nth-child(3)[style*='right: 50%']::after {
  background: #dc2626 !important;
  box-shadow: none !important;
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light']
  [data-zs-perf-crypto='1']
  .zs-perf-row
  > div:last-child {
  font-weight: 700;
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light']
  [data-zs-perf-crypto='1']
  .zs-perf-tab[data-active='true'],
[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light']
  [data-zs-perf-crypto='1']
  .zs-perf-tab[data-active='true']:hover {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light']
  [data-zs-perf-crypto='1']
  .zs-perf-tab[data-active='false'] {
  background: transparent !important;
  color: #64748b !important;
  border: 1px solid transparent !important;
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light']
  [data-zs-perf-crypto='1']
  .zs-perf-tab[data-active='false']:hover {
  background: rgba(15, 23, 42, 0.04) !important;
  color: #0f172a !important;
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light']
  [data-zs-perf-crypto='1']
  .zs-perf-link {
  color: #475569 !important;
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light']
  [data-zs-perf-crypto='1']
  .zs-perf-link:hover {
  color: #0f172a !important;
  opacity: 1 !important;
}

[data-zs-crypto-root][data-zs-page='markets-overview'][data-zs-theme='light']
  .zs-mkt-section-card:has([data-zs-perf-crypto='1']) {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.03),
    0 4px 12px rgba(15, 23, 42, 0.04) !important;
}

/* Cap-rank: professional spark direction + 3 honest summary cards */
@media (min-width: 1024px) {
  [data-zs-page='markets-overview'] .mo-crypto-table-section .all-coins-terminal-cards--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

[data-zs-page='markets-overview'] .mo-crypto-table-section .all-coins-terminal-spark polyline[stroke='#EF4444'] {
  stroke: #DC2626 !important;
  opacity: 0.92 !important;
}

[data-zs-page='markets-overview'] .mo-crypto-table-section .all-coins-terminal-spark polyline[stroke='#18C37E'],
[data-zs-page='markets-overview'] .mo-crypto-table-section .all-coins-terminal-spark polyline[stroke='#16a34a'] {
  stroke: #16A34A !important;
  opacity: 0.92 !important;
}

/* /markets/overview — title shell spacing only.
   Switcher visual system lives in shared PageTitleCluster.css
   (.zs-ptc--title-pilot / .zs-ptc--overview-pilot). */

[data-zs-page='markets-overview'] .mo-overview-shell.zs-ptc-shell {
  padding-block: 16px 28px;
  overflow: visible;
}

[data-zs-page='markets-overview'] .mo-overview-shell .zs-ptc__subtitle {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

@media (min-width: 1024px) {
  [data-zs-page='markets-overview'] .mo-overview-shell.zs-ptc-shell {
    padding-block: 22px 34px;
  }
}

@media (max-width: 767px) {
  [data-zs-page='markets-overview'] .mo-overview-shell.zs-ptc-shell {
    padding-block: 16px 20px;
  }
}

/**
 * Markets Overview — Visual Architecture Pass
 * Hierarchy only under [data-zs-page='markets-overview'].
 * Does not touch title pilot, theme tokens, or other routes.
 */

[data-zs-page='markets-overview'] {
  --mo-spotlight-min-height: 520px;
  --mo-stage-gap: 14px;
  --mo-tertiary-gap: 0;
}

/* ── Desktop: stage (chart + rail) then tertiary band ── */
@media (min-width: 1024px) {
  [data-zs-page='markets-overview'] .mo-overview-desktop-canvas {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
    margin-bottom: var(--mo-section-gap, 16px);
  }

  [data-zs-page='markets-overview'] .mo-overview-stage {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
    gap: var(--mo-stage-gap);
    align-items: stretch;
    min-width: 0;
  }

  [data-zs-page='markets-overview'] .mo-overview-desktop-canvas .mo-spotlight-chart,
  [data-zs-page='markets-overview'] .mo-overview-desktop-canvas .mo-spotlight-chart.mo-overview-card,
  [data-zs-page='markets-overview'] .mo-overview-desktop-canvas .mo-stage-primary {
    min-height: var(--mo-spotlight-min-height, 520px);
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 4px !important;
    box-shadow: none !important;
    border: 1px solid color-mix(in srgb, var(--zs-border-mid, #e2e8f0) 85%, transparent) !important;
    background: var(--zs-surface-1, #fff) !important;
  }

  [data-zs-page='markets-overview'] .mo-overview-desktop-canvas .mo-spotlight-coins,
  [data-zs-page='markets-overview'] .mo-overview-desktop-canvas .mo-spotlight-coins.mo-overview-card,
  [data-zs-page='markets-overview'] .mo-overview-desktop-canvas .mo-stage-rail {
    min-height: 0;
    height: var(--mo-spotlight-min-height, 520px);
    max-height: var(--mo-spotlight-min-height, 520px);
    align-self: stretch;
    display: flex;
    flex-direction: column;
    border-radius: 4px !important;
    box-shadow: none !important;
    border: 1px solid color-mix(in srgb, var(--zs-border-mid, #e2e8f0) 70%, transparent) !important;
    background: transparent !important;
    overflow: hidden;
  }

  [data-zs-page='markets-overview'] .mo-overview-tertiary-band {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 0;
    min-width: 0;
    border-radius: 4px;
    border: 1px solid color-mix(in srgb, var(--zs-border-mid, #e2e8f0) 75%, transparent);
    background: color-mix(in srgb, var(--zs-surface-2, #f8fafc) 55%, var(--zs-surface-1, #fff));
    overflow: hidden;
  }

  [data-zs-page='markets-overview'] .mo-overview-tertiary-band .mo-tertiary-panel {
    min-height: 0;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    overflow: hidden;
  }

  [data-zs-page='markets-overview'] .mo-overview-tertiary-band .mo-mcap-btc-primary {
    border-inline-end: 1px solid color-mix(in srgb, var(--zs-border-mid, #e2e8f0) 80%, transparent) !important;
  }

  /* Chart flex height chain */
  [data-zs-page='markets-overview'] .mo-overview-desktop-canvas .mo-spotlight-chart .zs-cc {
    flex: 1;
    min-height: 0;
    border-radius: 0 !important;
  }

  [data-zs-page='markets-overview'] .mo-overview-desktop-canvas .mo-spotlight-chart .mo-cc-chart-area {
    flex: 1 1 0%;
    min-height: 280px;
    display: flex;
    flex-direction: column;
  }

  [data-zs-page='markets-overview']
    .mo-overview-desktop-canvas
    .mo-spotlight-chart
    .mo-cc-chart-area
    > .recharts-responsive-container {
    flex: 1 1 auto;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
  }

  [data-zs-page='markets-overview'] .mo-overview-desktop-canvas .mo-coin-list,
  [data-zs-page='markets-overview'] .mo-overview-desktop-canvas .mo-spotlight-coins section[dir='rtl'],
  [data-zs-page='markets-overview'] .mo-overview-desktop-canvas .mo-spotlight-coins section[dir='rtl'] > div,
  [data-zs-page='markets-overview']
    .mo-overview-desktop-canvas
    .mo-spotlight-coins
    section[dir='rtl']
    > div
    > div:nth-child(2) {
    width: 100%;
    max-width: none;
    flex: 1;
    min-height: 0;
  }

  [data-zs-page='markets-overview'] .mo-overview-stack-mobile .mo-mcap-btc-section {
    display: none !important;
  }
}

@media (min-width: 1280px) {
  [data-zs-page='markets-overview'] .mo-overview-stage {
    grid-template-columns: minmax(0, 2.15fr) minmax(260px, 1fr);
  }
}

@media (min-width: 1440px) {
  [data-zs-page='markets-overview'] .mo-overview-stage {
    /* ~68% / 32% */
    grid-template-columns: minmax(0, 2.15fr) minmax(280px, 1fr);
  }
}

/* ── Primary chart header hierarchy ── */
[data-zs-page='markets-overview'] .mo-spotlight-chart.mo-stage-primary .mo-cc-header {
  padding: 12px 14px 8px !important;
}

[data-zs-page='markets-overview'] .mo-spotlight-chart.mo-stage-primary .mo-cc-price {
  font-size: 1.75rem !important;
  font-weight: 600 !important;
  letter-spacing: -0.03em !important;
  font-variant-numeric: tabular-nums;
  unicode-bidi: isolate;
}

[data-zs-page='markets-overview'] .mo-spotlight-chart.mo-stage-primary .mo-cc-change {
  font-size: 12px !important;
  font-weight: 500 !important;
  padding: 2px 6px !important;
  border-radius: 3px !important;
}

[data-zs-page='markets-overview'] .mo-spotlight-chart.mo-stage-primary .mo-cc-ranges.zs-rb {
  padding: 1px !important;
  border-radius: 4px !important;
  background: color-mix(in srgb, var(--zs-surface-2, #f1f5f9) 90%, transparent) !important;
  border: 1px solid color-mix(in srgb, var(--zs-border-mid, #e2e8f0) 70%, transparent) !important;
  box-shadow: none !important;
}

[data-zs-page='markets-overview'] .mo-spotlight-chart.mo-stage-primary .mo-cc-ranges .zs-rbn {
  padding: 3px 7px !important;
  font-size: 10.5px !important;
  font-weight: 500 !important;
  border-radius: 3px !important;
  box-shadow: none !important;
}

[data-zs-page='markets-overview'] .mo-spotlight-chart.mo-stage-primary .mo-cc-ranges .zs-ra {
  font-weight: 600 !important;
  box-shadow: none !important;
  background: var(--zs-surface-1, #fff) !important;
  border: 1px solid color-mix(in srgb, var(--zs-border-mid, #cbd5e1) 80%, transparent) !important;
}

/* ── Major coins rail ── */
[data-zs-page='markets-overview'] .mo-spotlight-coins.mo-stage-rail section[dir='rtl'] > div,
[data-zs-page='markets-overview'] .mo-coin-rail > div {
  padding: 8px 10px 0 10px !important;
  min-height: 0;
  box-sizing: border-box;
  height: 100%;
}

[data-zs-page='markets-overview'] .mo-spotlight-coins.mo-stage-rail section h2,
[data-zs-page='markets-overview'] .mo-coin-rail h2 {
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  margin-bottom: 2px !important;
  color: var(--zs-text-secondary, #64748b) !important;
  line-height: 1.3 !important;
  flex-shrink: 0;
}

[data-zs-page='markets-overview'] .mo-coin-rail .mo-coin-rail-list {
  min-height: 0 !important;
  flex: 1 1 0% !important;
  overflow: hidden !important;
}

[data-zs-page='markets-overview'] .mo-coin-rail {
  --zs-success: #18C37E;
  --zs-red: #EF4444;
}

[data-zs-page='markets-overview'] .mo-coin-rail .mo-coin-row,
[data-zs-page='markets-overview'] .mo-coin-list .mo-coin-rail .mo-coin-row[role='button'] {
  height: 35px !important;
  min-height: 35px !important;
  max-height: 35px !important;
  border-radius: 0 !important;
  border-top: 1px solid color-mix(in srgb, var(--zs-border-mid, #e5e7eb) 88%, transparent) !important;
  box-shadow: none !important;
  padding-inline: 2px !important;
  padding-block: 0 !important;
  grid-template-columns: minmax(0, 1fr) 9.25ch 5.25ch !important;
  column-gap: 8px !important;
  align-items: center !important;
  overflow: hidden !important;
}

[data-zs-page='markets-overview'] .mo-coin-rail .mo-coin-row:hover {
  background: color-mix(in srgb, var(--zs-text-primary, #0f172a) 3%, transparent) !important;
}

[data-zs-page='markets-overview'] .mo-coin-rail .mo-coin-row[aria-current='true'],
[data-zs-page='markets-overview'] .mo-coin-rail .mo-coin-row[data-active='true'] {
  background: color-mix(in srgb, var(--zs-text-primary, #0f172a) 5%, transparent) !important;
  box-shadow: inset 2px 0 0 0 color-mix(in srgb, var(--zs-text-primary, #0f172a) 28%, transparent) !important;
}

[data-zs-page='markets-overview'] .mo-coin-rail .mo-coin-logo {
  width: 20px !important;
  height: 20px !important;
  background: transparent !important;
  overflow: hidden !important;
  flex-shrink: 0;
}

[data-zs-page='markets-overview'] .mo-coin-rail .mo-coin-logo img,
[data-zs-page='markets-overview'] .mo-coin-rail .mo-coin-logo-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block;
}

[data-zs-page='markets-overview'] .mo-coin-rail .mo-coin-ticker {
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  font-family: var(--zs-font-sans, Inter, system-ui, sans-serif) !important;
  color: var(--zs-text-primary, #0f172a) !important;
  line-height: 1.1 !important;
}

[data-zs-page='markets-overview'] .mo-coin-rail .mo-coin-name {
  font-size: 10px !important;
  font-weight: 400 !important;
  color: var(--zs-text-secondary, #94a3b8) !important;
  line-height: 1.1 !important;
}

[data-zs-page='markets-overview'] .mo-coin-rail .mo-coin-quote-price,
[data-zs-page='markets-overview'] .mo-coin-rail .mo-coin-quote-change {
  align-self: center;
  justify-self: end;
  line-height: 1 !important;
  white-space: nowrap !important;
  overflow: hidden;
}

[data-zs-page='markets-overview'] .mo-coin-rail .mo-coin-price {
  font-size: 13px !important;
  font-weight: 600 !important;
  font-variant-numeric: tabular-nums;
  line-height: 1 !important;
}

[data-zs-page='markets-overview'] .mo-coin-rail .mo-coin-currency {
  font-size: 9.5px !important;
  font-weight: 500 !important;
  color: var(--zs-text-secondary, #94a3b8) !important;
}

[data-zs-page='markets-overview'] .mo-coin-rail .mo-coin-change {
  font-size: 12px !important;
  font-weight: 500 !important;
  font-variant-numeric: tabular-nums;
  line-height: 1 !important;
}

[data-zs-page='markets-overview'] .mo-coin-rail .mo-coin-change[data-change-dir='up'] {
  color: #18C37E !important;
}

[data-zs-page='markets-overview'] .mo-coin-rail .mo-coin-change[data-change-dir='down'] {
  color: #EF4444 !important;
}

[data-zs-page='markets-overview'] .mo-coin-rail .mo-coin-rail-footer {
  padding: 4px 0 6px !important;
  margin-top: auto !important;
  flex-shrink: 0;
  border-top: 1px solid color-mix(in srgb, var(--zs-border-mid, #e5e7eb) 85%, transparent) !important;
}

[data-zs-page='markets-overview'] .mo-coin-rail .mo-coin-rail-footer a,
[data-zs-page='markets-overview'] .mo-coin-rail .mo-coin-rail-footer button {
  font-size: 11px !important;
  font-weight: 500 !important;
  color: #0f172a !important;
}

[data-zs-page='markets-overview'] .mo-coin-rail .mo-coin-rail-footer a:hover,
[data-zs-page='markets-overview'] .mo-coin-rail .mo-coin-rail-footer button:hover {
  color: #334155 !important;
  text-decoration: underline;
}

@media (max-width: 1023px) {
  [data-zs-page='markets-overview'] .mo-spotlight-mobile-rail .mo-coin-rail .mo-coin-row,
  [data-zs-page='markets-overview'] .mo-spotlight-mobile-rail .mo-coin-list .mo-coin-rail .mo-coin-row[role='button'] {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    overflow: hidden !important;
  }

  [data-zs-page='markets-overview'] .mo-spotlight-mobile-rail .mo-coin-rail .mo-coin-name {
    font-size: 11px !important;
    line-height: 1.2 !important;
  }
}

/* ── Tertiary BTC context: keep compact identity visible; demote hero-scale only ── */
[data-zs-page='markets-overview'] .mo-overview-tertiary-band .mo-btc-context-root {
  min-height: 0;
}

[data-zs-page='markets-overview'] .mo-overview-tertiary-band .mo-btc-context-identity .mo-btc-line-chart {
  max-height: 80px;
}

[data-zs-page='markets-overview'] .mo-overview-tertiary-band .mo-mcap-btc-primary > div,
[data-zs-page='markets-overview'] .mo-mcap-btc-section.mo-tertiary-mobile .mo-mcap-btc-primary > div {
  padding-top: 12px !important;
}

[data-zs-page='markets-overview'] .mo-overview-tertiary-band [style*='font-size: 30px'],
[data-zs-page='markets-overview'] .mo-mcap-btc-section.mo-tertiary-mobile [style*='font-size: 30px'] {
  font-size: 22px !important;
  font-weight: 600 !important;
}

[data-zs-page='markets-overview'] .mo-overview-tertiary-band [style*='font-size: 29px'],
[data-zs-page='markets-overview'] .mo-mcap-btc-section.mo-tertiary-mobile [style*='font-size: 29px'] {
  font-size: 18px !important;
  font-weight: 600 !important;
}

[data-zs-page='markets-overview'] .mo-overview-tertiary-band [style*='font-weight: 800'],
[data-zs-page='markets-overview'] .mo-mcap-btc-section.mo-tertiary-mobile [style*='font-weight: 800'] {
  font-weight: 600 !important;
}

[data-zs-page='markets-overview'] .mo-overview-tertiary-band [style*='font-weight: 700'],
[data-zs-page='markets-overview'] .mo-mcap-btc-section.mo-tertiary-mobile [style*='font-weight: 700'] {
  font-weight: 500 !important;
}

/* ── Mobile / tablet stack ── */
@media (max-width: 1023px) {
  [data-zs-page='markets-overview'] .mo-spotlight-chart-only,
  [data-zs-page='markets-overview'] .mo-spotlight-chart-only.mo-overview-card {
    border-radius: 4px !important;
    box-shadow: none !important;
    border: 1px solid color-mix(in srgb, var(--zs-border-mid, #e2e8f0) 85%, transparent) !important;
  }

  [data-zs-page='markets-overview'] .mo-spotlight-mobile-rail {
    margin-top: 12px;
    border-radius: 4px;
    border: 1px solid color-mix(in srgb, var(--zs-border-mid, #e2e8f0) 75%, transparent);
    background: transparent;
    overflow: hidden;
  }

  [data-zs-page='markets-overview'] .mo-mcap-btc-section.mo-tertiary-mobile {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    border-radius: 4px;
    border: 1px solid color-mix(in srgb, var(--zs-border-mid, #e2e8f0) 75%, transparent);
    background: color-mix(in srgb, var(--zs-surface-2, #f8fafc) 55%, var(--zs-surface-1, #fff));
    overflow: hidden;
    margin-bottom: var(--mo-section-gap, 16px);
  }

  [data-zs-page='markets-overview'] .mo-mcap-btc-section.mo-tertiary-mobile > .mo-tertiary-panel {
    min-height: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  [data-zs-page='markets-overview'] .mo-mcap-btc-section.mo-tertiary-mobile > .mo-mcap-btc-primary {
    border-bottom: 1px solid color-mix(in srgb, var(--zs-border-mid, #e2e8f0) 80%, transparent) !important;
  }
}

