:root {
  --bg: #f7f7f5; --fg: #1d1d1b; --muted: #6b6b66; --line: #e2e1dc; --card: #fff;
  --accent: #2f6fb3; --warm: #d0562c; --cool: #2f6fb3; --rain: #3b8fd1;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #161615; --fg: #ecebe6; --muted: #9a9993; --line: #2c2c2a; --card: #1f1f1d;
    --accent: #7fb0e6; --warm: #f08a5d; --cool: #7fb0e6; --rain: #6fb3ea; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.top, main, .foot { padding: 0 16px; }
@media (min-width: 900px) { .top, main, .foot { padding: 0 32px; } }
.top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding-top: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.brand { font-weight: 600; font-size: 18px; color: var(--fg); }
.pick { display: flex; gap: 6px; }
.pick input, .pick button { font: inherit; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--fg); }
h1 { font-size: 22px; margin: 24px 0 12px; }
.coverage { margin-top: 16px; color: var(--muted); }
.empty { color: var(--muted); font-style: italic; }
/* 1 → 2 → 4 per row; a page with two charts keeps them side by side. */
.charts { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 760px) { .charts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1400px) { .charts.quad { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 12px; min-width: 0; }
figcaption { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.chart { min-height: 220px; }
.chart .u-legend { font-size: 12px; }
.chart.nodata::after { content: "немає даних"; color: var(--muted); font-style: italic; }
table { width: 100%; border-collapse: collapse; margin: 20px 0; font-variant-numeric: tabular-nums; background: var(--card); }
th, td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
th:first-child, td:first-child, .hours td:nth-child(4) { text-align: left; }
th { font-weight: 500; color: var(--muted); font-size: 13px; }
tr.gap td { color: var(--muted); }
.scroll { overflow-x: auto; margin: 20px 0; }
.scroll table { margin: 0; }
.pager { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pager h1 { text-align: center; }
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.summary div { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.summary span { display: block; color: var(--muted); font-size: 13px; }
.summary b { font-size: 20px; font-weight: 600; }
.foot { color: var(--muted); font-size: 12px; padding-top: 24px; padding-bottom: 24px; }
