:root {
  color-scheme: dark;
  --bg: #0b1020;
  --panel: rgba(19, 28, 52, 0.86);
  --panel-soft: rgba(30, 42, 75, 0.58);
  --text: #eef4ff;
  --muted: #9ba9c5;
  --line: rgba(157, 177, 219, 0.17);
  --accent: #8ee5c0;
  --accent-strong: #48c89a;
  --positive: #89e6bd;
  --negative: #ff9d9d;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(71, 126, 212, 0.24), transparent 35rem),
    radial-gradient(circle at 100% 18%, rgba(72, 200, 154, 0.13), transparent 30rem),
    var(--bg);
  font: 15px/1.6 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: var(--accent); }

.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 64px 0 42px; }

.hero { margin-bottom: 30px; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 11px; font-weight: 750; letter-spacing: .16em; }
h1, h2 { margin: 0; line-height: 1.15; letter-spacing: -.035em; }
h1 { font-size: clamp(2.1rem, 5vw, 4.1rem); max-width: 900px; }
h2 { font-size: 1.35rem; }
.muted, .lede, .small-note, footer { color: var(--muted); }
.lede { max-width: 650px; margin: 16px 0 10px; font-size: 1rem; }
.status { margin: 0; color: var(--muted); font-size: .86rem; }

.metrics { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.metric, .panel {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(35, 50, 86, .83), var(--panel));
  box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
  backdrop-filter: blur(14px);
}
.metric { min-height: 116px; padding: 20px; border-radius: 18px; display: flex; flex-direction: column; justify-content: space-between; }
.metric-primary { border-color: rgba(142, 229, 192, .4); background: linear-gradient(145deg, rgba(58, 113, 108, .72), rgba(19, 42, 57, .88)); }
.metric-label { color: var(--muted); font-size: .83rem; }
.metric strong { margin-top: 16px; font-size: clamp(1.3rem, 3vw, 2rem); font-weight: 700; letter-spacing: -.025em; }
.metric-primary strong { font-size: clamp(1.8rem, 4vw, 3rem); color: var(--accent); }
.positive { color: var(--positive) !important; }
.negative { color: var(--negative) !important; }
.neutral { color: var(--muted) !important; }

.panel { margin-top: 18px; padding: 24px; border-radius: 22px; }
.panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.small-note, .data-link { font-size: .8rem; }
.chart-wrap { min-height: 300px; position: relative; }
#chart { width: 100%; height: auto; overflow: visible; }
.grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 4 8; }
.axis-label { fill: var(--muted); font-size: 11px; }
.trend-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 4px 10px rgba(72, 200, 154, .25)); }
.last-dot { fill: var(--bg); stroke: var(--accent); stroke-width: 3; }
.empty { margin: 0; padding: 46px 12px; color: var(--muted); text-align: center; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .04em; }
td { font-variant-numeric: tabular-nums; }
td.number { text-align: right; }
tbody tr:hover { background: var(--panel-soft); }

footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 22px; font-size: .78rem; }

@media (max-width: 760px) {
  .shell { width: min(100% - 22px, 1120px); padding-top: 34px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric-primary { grid-column: 1 / -1; }
  .panel { padding: 18px 12px; border-radius: 18px; }
  .panel-heading { align-items: start; flex-direction: column; gap: 6px; }
  .chart-wrap { min-height: 230px; }
}
