/* Palette and chrome. Categorical slots validated for CVD separation in both modes;
   the three event colours are the reserved status steps, and every one of them is
   paired with a text label so hue never carries meaning on its own. */
.viz-root{
  color-scheme:light;
  --surface-1:#fcfcfb; --page:#f9f9f7;
  --text-primary:#0b0b0b; --text-secondary:#52514e; --muted:#898781;
  --grid:#e1e0d9; --axis:#c3c2b7; --border:rgba(11,11,11,.10);
  --c0:#2a78d6; --c1:#eb6834; --c2:#1baf7a; --c3:#eda100; --c4:#e87ba4;
  --c5:#008300; --c6:#4a3aa7; --c7:#e34948;
  --ev-halving:#0b0b0b; --ev-top:#0ca30c; --ev-bottom:#d03b3b;
  --chip:#f0efec; --good:#006300; --bad:#d03b3b;
}
@media (prefers-color-scheme:dark){:root:where(:not([data-theme="light"])) .viz-root{
  color-scheme:dark;
  --surface-1:#1a1a19; --page:#000000;
  --text-primary:#fff; --text-secondary:#c3c2b7; --muted:#898781;
  --grid:#2c2c2a; --axis:#383835; --border:rgba(255,255,255,.10);
  --c0:#3987e5; --c1:#d95926; --c2:#199e70; --c3:#c98500; --c4:#d55181;
  --c5:#008300; --c6:#9085e9; --c7:#e66767;
  --ev-halving:#fff; --chip:#242422; --good:#0ca30c;
}}
:root[data-theme="dark"] .viz-root{
  color-scheme:dark;
  --surface-1:#1a1a19; --page:#000000;
  --text-primary:#fff; --text-secondary:#c3c2b7; --muted:#898781;
  --grid:#2c2c2a; --axis:#383835; --border:rgba(255,255,255,.10);
  --c0:#3987e5; --c1:#d95926; --c2:#199e70; --c3:#c98500; --c4:#d55181;
  --c5:#008300; --c6:#9085e9; --c7:#e66767;
  --ev-halving:#fff; --chip:#242422; --good:#0ca30c;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{background:#f9f9f7}
:root[data-theme="dark"] body{background:#000000}
.viz-root{background:var(--page);color:var(--text-primary);min-height:100vh;
  font-family:system-ui,-apple-system,"Segoe UI",sans-serif;padding:26px 22px 64px;-webkit-font-smoothing:antialiased}
.wrap{max-width:1180px;margin:0 auto}
header.hd{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;margin-bottom:20px;flex-wrap:wrap}
h1{font-size:26px;line-height:1.2;font-weight:640;margin:0 0 6px}
h2{font-size:16px;font-weight:640;margin:30px 0 10px}
.sub{font-size:14px;color:var(--text-secondary);max-width:780px;line-height:1.55;margin:0}
button{font:inherit;cursor:pointer}
.btn{background:var(--surface-1);border:1px solid var(--border);color:var(--text-secondary);
  border-radius:8px;padding:7px 12px;font-size:13px;white-space:nowrap}
.btn:hover{background:var(--chip)}
.btn[aria-pressed="true"]{color:var(--text-primary);border-color:var(--axis);font-weight:600}
.btn:disabled{opacity:.5;cursor:default}
.stats{display:grid;gap:1px;background:var(--border);border:1px solid var(--border);
  border-radius:12px;overflow:hidden;margin-bottom:18px}
.s5{grid-template-columns:repeat(5,minmax(0,1fr))}
.s4{grid-template-columns:repeat(4,minmax(0,1fr))}
.s3{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:860px){.s5,.s4,.s3{grid-template-columns:repeat(2,minmax(0,1fr))}}
.tile{background:var(--surface-1);padding:13px 15px}
.tile .lab{font-size:11.5px;color:var(--muted);margin-bottom:5px}
.tile .val{font-size:21px;font-weight:640;letter-spacing:-.01em}
.tile.hero .val{font-size:33px}
.tile .sub2{font-size:11.5px;color:var(--text-secondary);margin-top:4px;line-height:1.4}
.dn{color:var(--bad)} .up{color:var(--good)}
.striphead{font-size:12px;color:var(--muted);margin:0 2px 8px}
.filters{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:14px}
.filters .sep{width:1px;height:22px;background:var(--border);margin:0 3px}
.cyc{display:inline-flex;align-items:center;gap:7px}
.cyc .key{width:14px;height:3px;border-radius:2px;display:inline-block}
.card{background:var(--surface-1);border:1px solid var(--border);border-radius:14px;padding:8px}
.chartwrap{position:relative}
svg{display:block;width:100%;height:auto;touch-action:none}
.gridline{fill:none;stroke:var(--grid);stroke-width:1}
.axisline{stroke:var(--axis);stroke-width:1;fill:none}
.ringlab{font-size:12.5px;fill:var(--text-secondary);paint-order:stroke;stroke:var(--surface-1);
  stroke-width:4px;stroke-linejoin:round;font-variant-numeric:tabular-nums}
.spokelab{font-size:12px;fill:var(--muted);paint-order:stroke;stroke:var(--surface-1);stroke-width:4px}
.arc{fill:none;stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.evlab{font-size:12px;fill:var(--text-primary);paint-order:stroke;stroke:var(--surface-1);
  stroke-width:4.5px;stroke-linejoin:round;font-weight:560}
.leader{stroke:var(--axis);stroke-width:1;fill:none}
.dot{stroke:var(--surface-1);stroke-width:2}
.cyclab{font-size:13px;font-weight:620;paint-order:stroke;stroke:var(--surface-1);stroke-width:5px}
.tip{position:absolute;pointer-events:none;opacity:0;transition:opacity .09s;background:var(--surface-1);
  border:1px solid var(--border);border-radius:10px;box-shadow:0 6px 22px rgba(0,0,0,.13);
  padding:10px 12px;min-width:190px;z-index:5}
.tip .d{font-size:11.5px;color:var(--muted);margin-bottom:2px}
.tip .p{font-size:20px;font-weight:660;margin-bottom:6px}
.tip .row{display:flex;justify-content:space-between;gap:14px;font-size:12px;padding:1.5px 0}
.tip .row span:first-child{color:var(--text-secondary)}
.tip .row span:last-child{font-variant-numeric:tabular-nums;font-weight:560}
.tip .keyrow{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--text-secondary);
  margin-bottom:5px;padding-bottom:5px;border-bottom:1px solid var(--border)}
.tip .keyrow i{width:13px;height:3px;border-radius:2px}
.legend{display:flex;flex-wrap:wrap;gap:6px 20px;padding:12px 10px 4px;font-size:12.5px;color:var(--text-secondary)}
.legend .it{display:inline-flex;align-items:center;gap:7px}
.legend .sw{width:11px;height:11px;border-radius:50%;box-shadow:0 0 0 2px var(--surface-1)}
.legend .ln{width:16px;height:3px;border-radius:2px}
table{border-collapse:collapse;width:100%;font-size:13px}
th,td{text-align:right;padding:7px 10px;border-bottom:1px solid var(--border);font-variant-numeric:tabular-nums}
th:first-child,td:first-child{text-align:left;font-variant-numeric:normal}
th{color:var(--muted);font-weight:560;font-size:11.5px;white-space:nowrap}
caption{text-align:left;font-size:14px;font-weight:620;padding:14px 10px 8px}
.hidden{display:none!important}
.notes{font-size:12.5px;color:var(--text-secondary);line-height:1.65;max-width:920px}
.notes b{color:var(--text-primary);font-weight:600}
.notes p{margin:0 0 12px}
.status{font-size:11.5px;color:var(--muted);margin-top:18px;line-height:1.6}
.status code{background:var(--chip);padding:1px 5px;border-radius:4px}
.pill{display:inline-block;font-size:11px;padding:2px 8px;border-radius:999px;background:var(--chip);
  color:var(--text-secondary);margin-right:6px}
.pill.warn{background:#fdf0d8;color:#7a5200}
:root[data-theme="dark"] .pill.warn{background:#3a2c10;color:#f0c25a}
.bars{display:grid;gap:3px;margin:6px 0 2px}
.bars .r{display:grid;grid-template-columns:46px 1fr 62px;align-items:center;gap:8px;font-size:12px}
.bars .t{height:9px;background:var(--chip);border-radius:3px;position:relative;overflow:hidden}
.bars .f{position:absolute;top:0;bottom:0;border-radius:3px}

/* menu bar */
.menubar{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;
  border-bottom:1px solid var(--border);margin:4px 0 20px;padding-bottom:0}
.tabs{display:flex;gap:2px}
.tab{background:none;border:0;border-bottom:2px solid transparent;color:var(--text-secondary);
  font-size:14px;padding:9px 14px 10px;display:inline-flex;align-items:center;gap:8px;
  border-radius:8px 8px 0 0;margin-bottom:-1px}
.tab:hover{background:var(--chip);color:var(--text-primary)}
.tab[aria-selected="true"]{color:var(--text-primary);font-weight:640;border-bottom-color:var(--text-primary)}
.tab .ti{font-size:15px;opacity:.65;line-height:1}
.tab[aria-selected="true"] .ti{opacity:1}
.tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding-bottom:8px}
.ctl{display:inline-flex;gap:8px}
.tools .sep{width:1px;height:22px;background:var(--border);margin:0 2px}
@media (max-width:760px){.menubar{align-items:flex-start;flex-direction:column;gap:6px}
  .tabs{width:100%;overflow-x:auto}.tools{padding-bottom:10px}}

/* twelve-year outlook */
.gl{stroke:var(--grid);stroke-width:1;fill:none}
.ax{stroke:var(--axis);stroke-width:1;fill:none}
.tk{font-size:11.5px;fill:var(--muted);font-variant-numeric:tabular-nums}
.olab{font-size:12px;fill:var(--text-primary);font-weight:560;paint-order:stroke;
  stroke:var(--surface-1);stroke-width:4px;stroke-linejoin:round}
.olabm{font-size:11px;fill:var(--text-secondary);paint-order:stroke;stroke:var(--surface-1);stroke-width:4px}
