/* Tokens. The wall is always dark (a TV across a room); the summary follows the viewer.
   Brand: Patriot Blue #003A70, Liberty Red #E41E2E, Accent Gray #D9D9D6, Open Sans
   (knowledge/editorial/2026-03-17_TPPA_Brand_Guidelines.md). Series colors were checked with
   the dataviz validator against --surface-1 in each mode: organic/paid pass every check;
   the two brands pass every check. */
@font-face {
  font-family: "Open Sans";
  src: url("fonts/OpenSans.ttf") format("truetype");
  font-weight: 300 800;
  font-stretch: 75% 100%;
  font-display: block;
}

:root {
  color-scheme: light;
  --page: #f4f6fa;
  --surface-1: #ffffff;
  --surface-2: #eef2f8;
  --ink-1: #0e1a2e;
  --ink-2: #44526b;
  --ink-3: #6f7b91;
  --grid: #e3e8f0;
  --axis: #c2cad8;
  --hair: rgba(14, 26, 46, 0.10);
  --navy: #003a70;
  --red: #e41e2e;
  --organic: #1d9a6c;
  --paid: #c98500;
  --unsplit: #d6dbe4;
  --unsplit-ink: #b4bccb;
  --brand-1: #2a78d6;   /* Tea Party Patriots Action */
  --brand-2: #e34948;   /* Jenny Beth Martin */
  --up: #006300;
  --down: #b3122b;
  --shadow: 0 1px 2px rgba(14, 26, 46, .06), 0 8px 24px rgba(14, 26, 46, .06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #06101f; --surface-1: #0d1f3c; --surface-2: #132a4d;
    --ink-1: #f2f5fa; --ink-2: #b9c4d8; --ink-3: #8593ad;
    --grid: #1c3157; --axis: #2b4470; --hair: rgba(255, 255, 255, 0.08);
    --organic: #199e70; --paid: #c98500; --unsplit: #2a3d5f; --unsplit-ink: #3c5480;
    --brand-1: #4a90e8; --brand-2: #ef5a5a; --up: #3fcf7f; --down: #ff7a85;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #06101f; --surface-1: #0d1f3c; --surface-2: #132a4d;
  --ink-1: #f2f5fa; --ink-2: #b9c4d8; --ink-3: #8593ad;
  --grid: #1c3157; --axis: #2b4470; --hair: rgba(255, 255, 255, 0.08);
  --organic: #199e70; --paid: #c98500; --unsplit: #2a3d5f; --unsplit-ink: #3c5480;
  --brand-1: #4a90e8; --brand-2: #ef5a5a; --up: #3fcf7f; --down: #ff7a85;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--page);
  color: var(--ink-1);
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.num { font-stretch: 80%; font-weight: 750; letter-spacing: -0.01em; }
.muted { color: var(--ink-3); }

/* ---------- chart pieces ---------- */
.chart { position: relative; }
.chart svg { display: block; overflow: visible; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .base { stroke: var(--axis); stroke-width: 1; }
.chart .tick { fill: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.chart .cursor { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .gapmark { stroke: var(--ink-3); stroke-width: 2; stroke-dasharray: 2 2; opacity: .6; }
.tip {
  position: absolute; display: none; pointer-events: none; z-index: 5; min-width: 180px;
  background: var(--surface-2); color: var(--ink-1); border: 1px solid var(--hair);
  border-radius: 10px; padding: 10px 12px; font-size: 13px; box-shadow: var(--shadow);
}
.tip div { display: flex; align-items: center; gap: 8px; line-height: 1.6; }
.tip b { margin-left: auto; padding-left: 16px; font-variant-numeric: tabular-nums; }
.tip .tdate { font-weight: 700; margin-bottom: 2px; }
.tip .tot { border-top: 1px solid var(--hair); margin-top: 4px; padding-top: 4px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.sw-organic { background: var(--organic); }
.sw-paid { background: var(--paid); }
.sw-unsplit { background: repeating-linear-gradient(45deg, var(--unsplit) 0 3px, var(--unsplit-ink) 3px 5px); }
.sw-b1 { background: var(--brand-1); }
.sw-b2 { background: var(--brand-2); }
.legend { display: flex; gap: 18px; color: var(--ink-2); font-size: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }

.split { width: 100%; }
.split-bar { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; }
.split-bar .seg { min-width: 3px; }
.seg-organic { background: var(--organic); }
.seg-paid { background: var(--paid); }
.seg-unsplit { background: repeating-linear-gradient(45deg, var(--unsplit) 0 3px, var(--unsplit-ink) 3px 5px); }
.split-labels { display: flex; gap: 16px; margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.split-labels span { display: inline-flex; align-items: center; gap: 6px; }
.split-labels b { color: var(--ink-1); }

.delta { font-weight: 700; font-size: 15px; white-space: nowrap; }
.delta.up { color: var(--up); }
.delta.down { color: var(--down); }
.delta.flat, .delta.na { color: var(--ink-3); font-weight: 600; }

.icon { display: inline-flex; width: 20px; height: 20px; color: var(--ink-2); }
.icon svg { width: 100%; height: 100%; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none;
          background: var(--surface-2); box-shadow: 0 0 0 2px var(--surface-1); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
         letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.badge.paid { background: color-mix(in srgb, var(--paid) 22%, transparent); color: var(--ink-1); }
.badge.paid::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--paid); }
.badge.kind { background: var(--surface-2); color: var(--ink-2); }
.chart .partial { opacity: .4; }
.sw-partial { background: var(--organic); opacity: .4; }
.split-labels { flex-wrap: wrap; row-gap: 4px; }
.split-labels span { white-space: nowrap; }
