:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #5b6780;
  --line: #d8e0ee;
  --accent: #315efb;
  --accent-soft: #eaf0ff;
  --good: #0e9f6e;
  --warn: #b26a00;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
.page-header, .layout { max-width: 1440px; margin: 0 auto; padding: 20px; }
.page-header {
  display: flex; justify-content: space-between; gap: 16px; align-items: flex-start;
  padding-top: 28px; padding-bottom: 8px;
}
.eyebrow { margin: 0 0 8px; text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; color: var(--accent); font-weight: 700; }
h1 { margin: 0; font-size: 32px; }
.subtle { color: var(--muted); margin: 6px 0 0; }
.layout { display: grid; gap: 20px; padding-bottom: 40px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px;
  box-shadow: 0 10px 30px rgba(30, 52, 92, 0.06);
}
.section-heading { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.metric-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px;
}
.metric {
  border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: linear-gradient(180deg, #fff, #fbfcff);
}
.metric-label { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.metric-value { font-size: 28px; font-weight: 700; }
.metric-note { color: var(--muted); font-size: 12px; margin-top: 6px; }
.filters {
  display: grid; grid-template-columns: 2fr repeat(3, minmax(160px, 1fr)); gap: 12px; margin-bottom: 14px;
}
.filters label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
input, select {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: white; color: var(--text);
}
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; min-width: 980px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
th { position: sticky; top: 0; background: #f8faff; z-index: 1; }
tr:hover td { background: #fafcff; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600;
}
.hidden { display: none; }
.empty-state {
  padding: 14px; border: 1px dashed var(--line); border-radius: 14px; background: #fafcff; color: var(--muted);
}
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 12px; }
.badge {
  display: inline-block; padding: 3px 8px; border-radius: 999px; background: #eef3ff; color: #2846b9; font-size: 12px; font-weight: 600;
}
.delta-badge {
  display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.delta-new { background: #fff4dd; color: var(--warn); }
.delta-pos { color: var(--good); font-weight: 600; }
.delta-neg { color: #b42318; font-weight: 600; }
.delta-zero, .delta-na { color: var(--muted); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
@media (max-width: 900px) {
  .page-header, .section-heading { flex-direction: column; }
  .filters { grid-template-columns: 1fr; }
}
