body {
  color: #1c1f23;
  font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 2rem;
  max-width: 1100px;
}
h1 { font-size: 22px; margin: 0 0 0.25rem 0; }
h2 { font-size: 16px; margin: 0 0 0.5rem 0; color: #4a5260; font-weight: 600; }
a { color: #2563a9; text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }

header { margin-bottom: 1.5rem; }
nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  color: #6a737d;
  font-size: 13px;
}
nav .sep { color: #c5c9cc; }
nav label { color: #4a5260; }
nav select {
  font-size: 13px;
  padding: 2px 6px;
  border: 1px solid #d0d7de;
  border-radius: 4px;
  background: white;
}

section { margin-bottom: 1.75rem; }
section.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 720px) {
  section.two-col { grid-template-columns: 1fr; }
}

.totals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 720px) {
  .totals { grid-template-columns: repeat(2, 1fr); }
}
.tile {
  background: white;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.tile .k { color: #6a737d; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.tile .v { color: #1c1f23; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }

.chart {
  background: white;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  min-height: 80px;
}

.chart .bar-row {
  display: grid;
  grid-template-columns: 160px 1fr 100px;
  align-items: center;
  gap: 0.5rem;
  margin: 0.3rem 0;
  font-size: 13px;
}
.chart .bar-row .label { color: #1c1f23; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chart .bar-row .bar {
  background: #e9eef3;
  border-radius: 3px;
  height: 14px;
  position: relative;
  overflow: hidden;
}
.chart .bar-row .fill {
  background: #2563a9;
  height: 100%;
  border-radius: 3px;
}
.chart .bar-row .count {
  text-align: right;
  color: #4a5260;
  font-variant-numeric: tabular-nums;
}

#raw {
  background: white;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  overflow-x: auto;
}
#raw table { border-collapse: collapse; width: 100%; font-size: 13px; }
#raw th, #raw td {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid #eef2f6;
  font-variant-numeric: tabular-nums;
}
#raw th { background: #f7f9fb; color: #4a5260; font-weight: 600; }
#raw tr:last-child td { border-bottom: none; }

.meta { color: #6a737d; font-size: 12px; }
.meta .hint { margin: 0.25rem 0 0 0; }

#status.error { color: #b54545; }

.empty { color: #6a737d; padding: 0.5rem 0; font-style: italic; }

svg.daychart { display: block; width: 100%; height: 140px; }
svg.daychart .bar { fill: #2563a9; }
svg.daychart .axis { stroke: #d0d7de; stroke-width: 1; }
svg.daychart .label { fill: #6a737d; font-size: 11px; }

.strategy-line {
  margin: -0.75rem 0 1.25rem 0;
  font-size: 13px;
  color: #4a5260;
}
#strategy-badge {
  display: inline-block;
  padding: 3px 8px;
  background: #eef2f7;
  border: 1px solid #d0d7de;
  border-radius: 999px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
}
.err-high { color: #b54545; font-weight: 700; }
.err-low { color: #b9831e; }
.err-zero { color: #1f8a4a; }
