/* Auto-extracted from market_economics.html by refactor */
:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface2: #1c2128;
  --border: #30363d;
  --accent: #e11d48;
  --accent-dim: rgba(225,29,72,.1);
  --accent-mid: rgba(225,29,72,.25);
  --gold: #f59e0b;
  --gold-dim: rgba(245,158,11,.12);
  --green: #22c55e;
  --green-dim: rgba(34,197,94,.1);
  --cyan: #06b6d4;
  --text: #e6edf3;
  --muted: #7d8590;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 15px; line-height: 1.6; min-height: 100vh; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

 
.wrap { width: min(1200px, calc(100% - 48px)); margin: 0 auto; }

 
.topbar {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(13,17,23,.92);
  backdrop-filter: blur(16px);
}
.topbar-inner {
  display: flex; align-items: center; gap: 16px;
  min-height: 56px; padding: 0 24px;
}
.topbar-brand { font: 700 14px var(--mono); color: var(--text); }
.topbar-brand span { color: var(--accent); }
.topbar-sep { color: var(--border); }
.topbar-title { font: 500 13px var(--mono); color: var(--muted); }
.topbar-back { margin-left: auto; font: 600 11px var(--mono); color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.topbar-back:hover { color: var(--text); }

 
.hero { padding: 80px 0 60px; position: relative; overflow: hidden; }
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 40% at 80% 50%, rgba(225,29,72,.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-kicker {
  font: 700 11px var(--mono); letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); display: block; margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(52px, 9vw, 110px); font-weight: 900; line-height: .95;
  letter-spacing: -.06em; color: var(--text);
  margin-bottom: 16px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub {
  font-size: clamp(17px, 2vw, 22px); color: var(--muted);
  max-width: 720px; line-height: 1.55; margin-bottom: 36px;
}
.hero-sub strong { color: var(--text); }

 
.stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-bottom: 80px;
}
.stat-card {
  border: 1px solid var(--border); border-radius: 12px;
  padding: 24px; background: var(--surface);
  transition: border-color .2s;
}
.stat-card.accent { border-color: var(--accent); background: var(--accent-dim); }
.stat-card.gold { border-color: var(--gold); background: var(--gold-dim); }
.stat-card.green { border-color: var(--green); background: var(--green-dim); }
.stat-num {
  font: 800 clamp(28px,4vw,46px)/1 var(--sans);
  letter-spacing: -.04em; margin-bottom: 8px;
}
/* Scoped to this page: the shared layout-repair.css sets .stat-num to
   clamp(32px, 3.6vw, 50px) / clamp(28px, 7.6vw, 40px), which clips "$128.1M"
   in the 4-up grid near 1280px and in the 2-up grid at 360px. Overriding it
   here rather than in the shared sheet leaves the other exhibits untouched. */
body.casework .stat-grid .stat-num { font-size: clamp(23px, 3.1vw, 46px); }
@media (max-width: 760px) {
  body.casework .stat-grid .stat-num { font-size: clamp(23px, 6.4vw, 40px); }
}
.stat-card.accent .stat-num { color: var(--accent); }
.stat-card.gold .stat-num { color: var(--gold); }
.stat-card.green .stat-num { color: var(--green); }
.stat-card .stat-num { color: var(--text); }
.stat-label { font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* Rhythm variant: sections whose headline number is the first card give it a
   wider column and a larger figure, so four stat rows do not read identically.
   Collapses back to the plain 2-up grid under 900px. */
.stat-grid--lead { grid-template-columns: 1.45fr 1fr 1fr 1fr; }
.stat-grid--lead > .stat-card:first-child { padding: 28px 26px; }
body.casework .stat-grid--lead > .stat-card:first-child .stat-num,
.stat-grid--lead > .stat-card:first-child .stat-num { font-size: clamp(32px, 4.4vw, 58px); }

 
.section { padding: 64px 0; border-top: 1px solid var(--border); }
.section-kicker { font: 700 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 12px; }
.section h2 { font-size: clamp(24px,3vw,36px); font-weight: 800; letter-spacing: -.04em; margin-bottom: 8px; }
.section-desc { color: var(--muted); max-width: 700px; margin-bottom: 40px; line-height: 1.65; }
.section-desc strong { color: var(--text); }

 
.argument {
  background: linear-gradient(135deg, rgba(225,29,72,.08) 0%, var(--surface) 100%);
  border: 1px solid var(--accent-mid); border-radius: 16px;
  padding: 40px; margin-bottom: 48px;
}
.argument-title { font: 800 22px var(--sans); letter-spacing: -.03em; margin-bottom: 20px; color: var(--text); }
.argument-points { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.argument-point {
  display: flex; gap: 14px; align-items: flex-start;
  background: rgba(0,0,0,.2); border-radius: 10px; padding: 16px;
}
.arg-num {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center;
  font: 700 12px var(--mono); margin-top: 1px;
}
.arg-text { font-size: 13px; color: #c9d1d9; line-height: 1.6; }
.arg-text strong { color: var(--accent); }

/* Rhythm variants for the three argument blocks: same component, three quiet
   treatments, so they do not read as one repeated slab. */
.argument--rule {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 16px 16px 0;
}
.argument--mirror {
  background: linear-gradient(315deg, rgba(225,29,72,.08) 0%, var(--surface) 100%);
}
.argument--mirror .arg-num {
  background: transparent; border: 1px solid var(--accent); color: var(--accent);
}

 
.comparison-wrap { margin-bottom: 56px; }
.comparison-label {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  margin-bottom: 8px; font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .1em;
}
.comparison-bar-track {
  min-height: 52px; background: var(--surface2); border-radius: 8px; overflow: hidden;
  display: flex; position: relative; border: 1px solid var(--border);
}
/* Geometry only. $31M of the $1,307M total = 2.372%, i.e. 1:41.16. The segment
   carries no text and no min-width, so nothing can inflate it off the value it
   encodes — the label hangs on the brace below instead. */
.comparison-bar-steam {
  flex: 0 0 2.372%; min-width: 0; padding: 0;
  background: rgba(6,182,212,.35);
  border-right: 1px solid var(--cyan);
  position: relative; z-index: 1;
}
.comparison-bar-tp {
  flex: 1 1 0; min-width: 0;
  background: linear-gradient(90deg, rgba(225,29,72,.35) 0%, rgba(225,29,72,.15) 100%);
  display: flex; align-items: center; padding: 10px 14px;
  font: 700 clamp(11px, 1.15vw, 14px)/1.4 var(--mono); color: var(--accent);
}
.comparison-callout { display: flex; align-items: flex-start; gap: 8px; padding: 0 1px; }
.comparison-callout-brace {
  flex: 0 0 2.372%; min-width: 0; height: 9px;
  border: 1px solid var(--cyan); border-top: 0; border-radius: 0 0 3px 3px;
}
.comparison-callout-text {
  font: 700 11px var(--mono); color: var(--cyan); letter-spacing: .06em;
  padding-top: 2px; white-space: nowrap;
}
.comparison-note { font: 500 12px var(--sans); color: var(--muted); margin-top: 10px; }

 
.market-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.market-table thead th {
  text-align: left; padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font: 700 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.market-table tbody tr { border-bottom: 1px solid rgba(48,54,61,.4); transition: background .15s; }
.market-table tbody tr:hover { background: rgba(255,255,255,.02); }
.market-table td { padding: 10px 14px; vertical-align: middle; }
.td-rank { font: 600 11px var(--mono); color: var(--muted); width: 40px; }
.td-name { font-weight: 600; }
.td-name.is-steam { color: var(--cyan); }
.td-val { font: 600 12px var(--mono); text-align: right; }
.td-bar { width: 240px; min-width: 180px; }
/* Zero-line behind every bar, so a platform whose share is genuinely
   negligible reads as "measured, ~nil" rather than "no data". */
.bar-track { height: 6px; border-radius: 3px; background: var(--surface2); }
.bar-inner { height: 6px; border-radius: 3px; background: var(--accent); opacity: .7; }
.bar-steam { background: var(--cyan); opacity: .5; }
.td-offers { font: 400 11px var(--mono); color: var(--muted); text-align: right; }

 
.cap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 48px; }
/* The card holding the chart gets the wider half; which half that is
   alternates down the page, which also breaks the four identical 50/50 rows. */
.cap-grid--chart-right { grid-template-columns: 1fr 1.3fr; }
.cap-grid--chart-left  { grid-template-columns: 1.3fr 1fr; }
.cap-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 28px; }
.cap-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.cap-card .cap-num { font: 800 42px/1 var(--mono); letter-spacing: -.05em; color: var(--accent); margin: 12px 0 6px; }
.cap-card p { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* The label and count columns are declared on the list, not the row, so every
   row still aligns while both columns size to their own content. The old fixed
   140px / 60px tracks clipped "$10,000-$25,000" and "14,083,486". */
.band-list {
  display: grid;
  grid-template-columns: max-content minmax(48px, 1fr) max-content;
  gap: 10px 12px; align-items: center;
}
.band-row { display: contents; }
.band-label { font: 600 11px var(--mono); color: var(--muted); min-width: 0; white-space: nowrap; }
.band-track { height: 10px; background: var(--surface2); border-radius: 5px; overflow: hidden; min-width: 0; }
.band-fill { height: 100%; border-radius: 5px; background: var(--accent); }
.band-count { font: 700 11px var(--mono); text-align: right; color: var(--text); min-width: 0; white-space: nowrap; }

 
.item-list { display: flex; flex-direction: column; gap: 8px; }
.item-row {
  display: grid; grid-template-columns: 24px 1fr 120px 200px;
  gap: 14px; align-items: center;
  padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}
.item-rank { font: 700 11px var(--mono); color: var(--muted); }
.item-name { font: 600 13px var(--sans); }
.item-price { font: 700 13px var(--mono); color: var(--gold); text-align: right; }
.item-bar-track { height: 6px; background: var(--surface2); border-radius: 3px; overflow: hidden; }
.item-bar-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--gold), var(--accent)); }

 
.footer { border-top: 1px solid var(--border); padding: 32px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-note { font: 400 12px var(--mono); color: var(--muted); max-width: 700px; line-height: 1.7; }
.footer-link { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .1em; }

@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .argument-points { grid-template-columns: 1fr; }
  .cap-grid { grid-template-columns: 1fr; }
  .item-row { grid-template-columns: 24px 1fr 90px; }
  .item-row > .item-bar-track { display: none; }
  /* Narrower scale column so the register's horizontal scroll stays shorter
     than it was before the column was widened for desktop. */
  .td-bar { width: 160px; min-width: 140px; }
}
@media (max-width: 600px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  /* "infrastructure." alone is wider than a 360px column at a fixed 52px. */
  .hero h1 { font-size: clamp(34px, 11vw, 52px); overflow-wrap: anywhere; }
}
/* Under ~520px three columns leave the bar too little room to read as a bar,
   so the row stacks: label and count on one line, full-width track beneath. */
@media (max-width: 520px) {
  .band-list { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
  .band-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-areas: "label count" "track track";
    gap: 5px 10px; align-items: center;
  }
  .band-label { grid-area: label; white-space: normal; }
  .band-track { grid-area: track; }
  .band-count { grid-area: count; }
}
