/* Chart tokens. Dark is the default surface; the light values are the same hues stepped for a white card. The three series colours are
   categorical slots 1-3 of the reference palette, validated against both card colours (CVD and normal-vision separation pass; light aqua is
   under 3:1, which the always-visible legend and the table-view link relieve). */
:root {
  --s1: #3987e5; --s2: #d95926; --s3: #199e70;            /* plan / actual / latest forecast */
  --pole-neg: #3987e5; --pole-pos: #e66767;               /* diverging pair: blue <-> red */
  --ink: #e6edf3; --ink2: #b4c0cc; --muted: #8b98a8;
  --grid: #263040; --axis: #3d4a5c; --card: #161c24;
}
@media (prefers-color-scheme: light) {
  :root {
    --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a;
    --pole-neg: #2a78d6; --pole-pos: #e34948;
    --ink: #1f2328; --ink2: #52514e; --muted: #898781;
    --grid: #e1e0d9; --axis: #c3c2b7; --card: #ffffff;
  }
}

.tabs a { padding: 0.35rem 0.8rem; }
.help a { color: var(--accent); }
.card .sub { color: var(--muted); }
.swatch { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 2px; vertical-align: -1px; }
.swatch.neg { background: var(--pole-neg); } .swatch.pos { background: var(--pole-pos); }

.graphs { display: block; padding: 0 1rem 2rem; }
.section { margin-top: 1.4rem; }
.section > h2 { font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin: 0 0 0.5rem; font-weight: 600; }
.grid-of-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(26rem, 1fr)); gap: 0.8rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 0.6rem 0.8rem 0.4rem; min-width: 0; }
.card h3 { margin: 0; font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.card h3 .area { color: var(--muted); font-weight: 500; margin-right: 0.4rem; }
.card .sub { color: var(--muted); font-size: 11px; margin: 0.1rem 0 0.2rem; min-height: 1em; }
.card .chips { display: flex; gap: 0.9rem; color: var(--ink2); font-size: 11px; margin: 0.1rem 0 0.2rem; }
.card .chips span::before { content: ""; display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 2px; margin-right: 0.35rem; vertical-align: -1px; background: var(--c); }
.chartbox { position: relative; height: 15rem; }
.card.empty .chartbox::after { content: "no data yet"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 12px; pointer-events: none; }
.loading .graphs { opacity: 0.55; transition: opacity 0.15s; }
