/* The index page (/index/{slug}, js/market-index/page.js), laid out as the company page (founder, 29 Nov 2026: "layout is
   not aligning with existing design"): the width of .page-main, the company heading's type, the key figures as the company
   page's metric grid, the chart in its card (.card.dd-chart-card, buttons from chart.css), then the members. */
.index-page { max-width: 1200px; margin: 0 auto; padding: 14px 24px 60px; color: var(--text-secondary); font-size: 14px; line-height: 1.6; }

.mi-crumbs { font-size: 12.5px; color: var(--text-tertiary); margin: 4px 0 10px; }
.mi-crumbs a { color: var(--text-tertiary); text-decoration: none; }
.mi-crumbs a:hover { color: var(--text-primary); text-decoration: underline; }
/* The company heading's ticker (.dd-ticker) and price: DM Serif 28px, the level 26px at 800. */
.mi-title { margin: 0; font-family: var(--font-heading); font-size: 28px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; color: var(--text-primary); }
.mi-kind { margin: 2px 0 8px; font-size: 13px; color: var(--text-tertiary); }
.mi-level { margin: 0 0 18px; font-family: var(--font-data); font-variant-numeric: tabular-nums; font-size: 14px; }
.mi-level b { font-size: 26px; font-weight: 800; color: var(--text-primary); margin-right: 8px; }
.mi-move { font-weight: 600; }
.mi-move.is-up { color: var(--green); }
.mi-move.is-down { color: var(--red); }
.mi-muted { color: var(--text-tertiary); font-size: 13px; white-space: nowrap; }

/* The key figures: the company page's metric grid (.dd-pulse-row), as many cells a row as fit the width. */
.mi-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; margin: 0 0 6px;
  background: rgba(34,197,94,0.15); border: 1px solid rgba(34,197,94,0.15); border-radius: 8px; overflow: hidden; }
.mi-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 14px 10px;
  background: var(--card-bg); text-align: center; min-width: 0; }
/* Above .dd-pulse-label (9px), which the chart loader may append again after this sheet. */
.mi-tile .mi-tile-label { font-size: 10px; }
.mi-tile-value { font-family: var(--font-data); font-variant-numeric: tabular-nums; font-size: 16px; font-weight: 700; color: var(--text-primary); overflow-wrap: anywhere; }
.mi-tile-sub { font-size: 11px; color: var(--text-tertiary); line-height: 1.4; }
.mi-note { margin: 6px 0 0; font-size: 12.5px; color: var(--text-tertiary); }

/* The chart: the company chart's card. */
.mi-chart { margin: 16px 0 0; padding: 20px 24px 16px; overflow: hidden; }
.mi-chart .lw-chart-container { min-height: 400px; }
.mi-chart-note:empty { display: none; }

/* The members: one row each, as many columns as fit, name left and the CMP cell right. */
.mi-members { margin: 16px 0 0; padding: 18px 24px 10px; }
.mi-members-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 8px; }
.mi-section-title { margin: 0; font-family: var(--font-heading); font-size: 20px; font-weight: 700; color: var(--text-primary); }
.mi-count { margin-left: 4px; font-family: var(--font-data); font-size: 14px; font-weight: 600; color: var(--text-tertiary); }
.mi-member-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); column-gap: 28px; margin: 0; padding: 0; list-style: none; }
.mi-member { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 10px 0; border-bottom: 1px solid var(--border); }
.mi-member-name { min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.mi-member-name a { color: inherit; text-decoration: none; }
.mi-member-name a:hover { color: var(--accent); text-decoration: underline; }
.mi-member-symbol { display: block; font-size: 11px; font-weight: 500; color: var(--text-tertiary); }
.mi-member-cmp { flex: none; text-align: right; }
.mi-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0 4px; font-size: 12.5px; color: var(--text-tertiary); }
.mi-pager-btn:disabled { opacity: 0.4; cursor: default; }

.mi-unavailable { margin: 0 0 8px; padding: 14px 16px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; color: var(--text-secondary); }
/* The server's block, put back when the index could not be loaded: it is the page then, so no rule above it. */
.index-page > .server-facts { margin-top: 12px; border-top: 0; padding-top: 0; }

@media (max-width: 600px) {
  .index-page { padding: 12px 16px 48px; }
  .mi-title { font-size: 24px; }
  .mi-level b { font-size: 22px; }
  .mi-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mi-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .mi-chart { padding: 14px 10px; }
  .mi-chart .lw-chart-container { min-height: 300px; }
  .mi-members { padding: 14px 14px 8px; }
  .mi-member-list { grid-template-columns: minmax(0, 1fr); }
}
