/*
  static/css/site.css
  Project : Campaign Donations
  Date    : 2026-10-26
  Purpose : Site styles: readable tables, the state map and charts, light and
            dark themes.
  Change log:
    2026-10-26  0.1.0  Initial version.
    2026-10-29  0.1.0  .as-of data date notice.
*/
:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #555555;
  --line: #d0d0d0;
  --link: #0057a3;
  --state: #e8eef5;
  --state-hover: #0072b2;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121417;
    --fg: #e8e8e8;
    --muted: #a8a8a8;
    --line: #3a3d42;
    --link: #7cb8ff;
    --state: #2a3340;
    --state-hover: #56b4e9;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--link); }
header.site, main, footer.site { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
header.site {
  display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline;
  justify-content: space-between; padding-top: 16px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
header.site .brand { font-weight: 700; font-size: 1.2rem; text-decoration: none; color: var(--fg); }
header.site nav a { margin-left: 16px; }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 24px 0 8px; }
.lead { color: var(--muted); font-size: 1.05rem; }
figure { margin: 16px 0; }
.us-map { width: 100%; height: auto; }
.us-map .state { fill: var(--state); stroke: none; }
.us-map a:hover .state, .us-map a:focus .state { fill: var(--state-hover); }
.us-map .borders { fill: none; stroke: var(--bg); stroke-width: 1; pointer-events: none; }
.state-list { columns: 4 12rem; padding-left: 18px; }
.chart { width: 100%; max-width: 640px; height: auto; }
.chart text { fill: var(--fg); font-size: 13px; }
table { border-collapse: collapse; width: 100%; margin: 12px 0 24px; font-size: 0.95rem; }
caption { text-align: left; color: var(--muted); padding-bottom: 4px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
section { overflow-x: auto; }
footer.site { margin-top: 48px; padding-top: 12px; padding-bottom: 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.notice { font-style: italic; }
.as-of { border-left: 4px solid var(--muted); padding: 4px 12px; color: var(--muted); }
