/* market — page-local rules (★#59 M6). Moved verbatim from market.html's inline <style>. Token-only; shared components live in chrome.css. */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Hero KPI band (on the shared light .page-hero) */
.hero-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; max-width: 1040px; margin: 30px 0 0; text-align: left; }
.hero-kpi { background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow), var(--highlight); }
.hero-kpi-label { font-size: var(--fs-1); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.hero-kpi-value { font-family: 'Inter Tight', sans-serif; font-size: var(--num-hero); font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.hero-kpi-sub { font-size: var(--fs-1); color: var(--text-muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.badge-up { color: var(--pos); font-weight: 600; }
.badge-dn { color: var(--danger); font-weight: 600; }

/* Layout — wide dashboard (grid-2 sections) */
.data-wrap { max-width: var(--page-max); margin: 0 auto; padding: 16px 20px 80px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.section { margin-top: 44px; }
.section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.section-title { font-family: 'Inter Tight', sans-serif; font-size: var(--fs-6); font-weight: 700; letter-spacing: -.02em; color: var(--text); }
.section-sub { font-size: var(--fs-2); color: var(--text-muted); }
.see-all { font-size: var(--fs-1); color: var(--accent); font-weight: 500; }

/* Cards / chart */
.card { background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow), var(--highlight); }

/* Data tables */
/* .data-table: the canonical copy lives in chrome.css (★#59 M3 took these values from this page; the duplicate dropped in M6). */
.rank { font-size: var(--fs-1); font-weight: 700; color: var(--text-subtle); width: 24px; }
.comm-link { font-weight: 600; color: var(--text); }
.comm-link:hover { color: var(--accent); text-decoration: none; }
.trend-up { color: var(--pos); font-weight: 600; font-size: var(--fs-2); }
.trend-dn { color: var(--danger); font-weight: 600; font-size: var(--fs-2); }
.trend-fl { color: var(--text-subtle); font-size: var(--fs-2); }

/* Movers */
.mover-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mover-card { background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.mover-card.up { background: color-mix(in srgb, var(--pos) 7%, transparent); border-color: color-mix(in srgb, var(--pos) 22%, transparent); }
.mover-card.dn { background: color-mix(in srgb, var(--neg) 7%, transparent); border-color: color-mix(in srgb, var(--neg) 22%, transparent); }
.mover-name { font-size: var(--fs-2); font-weight: 600; color: var(--text); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mover-pct { font-family: 'Inter Tight', sans-serif; font-size: var(--fs-5); font-weight: 700; }
.mover-ppsf { font-size: var(--fs-1); color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* Recent transactions */
.tx-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--border); gap: 12px; }
.tx-row:last-child { border-bottom: none; }
.tx-info { min-width: 0; flex: 1; }
.tx-project { font-size: var(--fs-2); font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-meta { font-size: var(--fs-1); color: var(--text-muted); margin-top: 1px; }
.tx-price { font-family: 'Inter Tight', sans-serif; font-size: var(--fs-3); font-weight: 700; color: var(--text); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tx-ppsf { font-size: var(--fs-1); color: var(--text-muted); text-align: right; font-variant-numeric: tabular-nums; }

.loading { color: var(--text-subtle); text-align: center; padding: 40px; font-size: var(--fs-2); }
.retry-link { background: none; border: none; padding: 0; font: inherit; color: var(--accent); font-weight: 600; cursor: pointer; text-decoration: underline; }

/* Loading-state skeleton (UIUX #31c) — mirrors community.html's pattern so the
   site shares one skeleton system across pages. */

.bld-area-sub { display: none; }

@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
  .hero-kpis { grid-template-columns: 1fr 1fr; }
  .mover-grid { grid-template-columns: 1fr 1fr; }
  .data-table .hide-mobile { display: none; }
  .bld-area-sub { display: block; font-size: var(--fs-1); font-weight: 400; color: var(--text-muted); }
}
@media (max-width: 480px) {
  .hero-kpis { grid-template-columns: 1fr 1fr; }
  .data-wrap { padding: 16px 16px 64px; }
}

/* ★#59 M6 — classes that replace this page's static style="" attributes (values unchanged). */
.sk-kpi { display: inline-block; width: 64px; height: 22px; vertical-align: middle; }
.sk-kpi-80 { width: 80px; }
.sk-kpi-70 { width: 70px; }
.col-rank { width: 24px; }
.col-traj { min-width: 82px; }
.sk-rank { width: 14px; height: 12px; }
.sk-name { height: 14px; }
.sk-name-70 { width: 70%; }
.sk-name-75 { width: 75%; }
.sk-num { height: 14px; margin-left: auto; }
.sk-num-52 { width: 52px; }
.sk-num-36 { width: 36px; }
.sk-num-34 { width: 34px; }
.sk-num-24 { width: 24px; }
.sk-num-60s { width: 60px; height: 12px; }
.sk-mv-title { width: 70%; height: 12px; margin-bottom: 8px; }
.sk-mv-value { width: 40%; height: 20px; margin-bottom: 6px; }
.sk-mv-sub { width: 55%; height: 11px; }
.sk-tx-title { width: 60%; height: 14px; margin-bottom: 6px; }
.sk-tx-sub { width: 40%; height: 11px; }
.sk-tx-price { width: 70px; height: 14px; margin-bottom: 6px; margin-left: auto; }
.sk-tx-meta { width: 50px; height: 11px; margin-left: auto; }
.market-foot { text-align: center; margin-top: 6px; }
/* ★#59 M6 — classes for the static style="" this page's JS used to build (values unchanged). */
.bld-name-cell { font-weight: 600; font-size: .85rem; }
.bld-area-cell { font-size: .78rem; color: var(--text-muted); }
.mover-pct.is-pos { color: var(--pos); }
.mover-pct.is-neg { color: var(--neg); }
.link-inherit { color: inherit; }
.loading.is-full { grid-column: 1 / -1; }
/* SEO B2: .data-wrap already pads the frame — the link hub would double it */
.data-wrap .link-hub { padding: 0; }
