:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --line: #e4e4e7;
  --fg: #18181b;
  --muted: #71717a;
  --accent: #2563eb;
  --gas: #d97706;
  --up: #059669;
  --down: #dc2626;
  --band: rgba(113, 113, 122, 0.16);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c0e;
    --surface: #16161a;
    --line: #2a2a30;
    --fg: #ececf0;
    --muted: #91919b;
    --accent: #60a5fa;
    --gas: #fbbf24;
    --up: #34d399;
    --down: #f87171;
    --band: rgba(145, 145, 155, 0.16);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.r { text-align: right; }
.pos { color: var(--up); }
.neg { color: var(--down); }

.top { border-bottom: 1px solid var(--line); background: var(--surface); }
.top-row { height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { font-weight: 600; letter-spacing: -0.01em; }

main section { margin: 40px 0; }
h1 { font-size: 36px; line-height: 1.15; margin: 4px 0 10px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 12px; }
h2 { font-size: 19px; margin: 0 0 6px; letter-spacing: -0.01em; }
h3 { font-size: 15px; margin: 24px 0 8px; font-weight: 600; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.eyebrow { margin: 0; color: var(--muted); font-size: 14px; }
.lead { font-size: 16px; max-width: 48ch; margin: 0 0 18px; }
.dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; flex: none; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }

.hero { display: grid; grid-template-columns: 1fr 440px; gap: 32px; align-items: center; margin-top: 32px; }
.kpis { display: flex; gap: 28px; margin: 0 0 12px; flex-wrap: wrap; }
.kpis div { display: flex; flex-direction: column; }
.kpis dt { font-size: 13px; color: var(--muted); }
.kpis dd { margin: 0; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.study { margin: 0; padding: 12px; }
.study-box { position: relative; height: 320px; }
.study figcaption { text-align: center; margin-top: 4px; }

.chart-card { padding: 12px; height: 340px; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

.toggle { font-size: 14px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }

.table-wrap { overflow-x: auto; }
.scroll { max-height: 420px; overflow-y: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); }
.scroll th { position: sticky; top: 0; background: var(--surface); }
td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
tbody tr:first-child td { border-top: 0; }
td .sub { display: block; font-size: 12px; color: var(--muted); }

.method details { border-top: 1px solid var(--line); padding: 12px 0; }
.method summary { cursor: pointer; font-weight: 500; }
.method li { margin: 6px 0; }

.foot { border-top: 1px solid var(--line); padding-top: 16px; padding-bottom: 32px; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  h1 { font-size: 30px; }
  .chart-card { height: 280px; }
  .study-box { height: 280px; }
}
