:root {
  color-scheme: dark;
  --bg:#0d1715; --panel:#15221e; --panel-soft:#192923; --border:#304139;
  --ink:#f2f5ed; --muted:#a9baaf; --green:#c8ff72; --coral:#ff9e87; --gold:#ffd484;
  --radius:18px; --mono:"IBM Plex Mono",Consolas,monospace;
  font: 16px/1.5 Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
  background:var(--bg); color:var(--ink);
}
*,*::before,*::after { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; }
a { color:var(--green); text-underline-offset:4px; }
button,select,input { font:inherit; }
button,select,summary { cursor:pointer; }
button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,summary:focus-visible,div[tabindex]:focus-visible { outline:2px solid var(--green); outline-offset:4px; }
h1,h2,h3,p { margin:0; }
h2 { font-size:1.2rem; line-height:1.25; letter-spacing:-.025em; }
h3 { font-size:1rem; line-height:1.3; }
.sr-only,.skip:not(:focus) { position:absolute; width:1px; height:1px; clip-path:inset(50%); overflow:hidden; white-space:nowrap; }
.skip:focus { position:fixed; top:8px; left:8px; z-index:5; background:var(--bg); padding:.7rem; }
.shell,.top-inner { max-width:1376px; margin:auto; padding-inline:clamp(16px,3.8vw,56px); }
.top { border-bottom:1px solid var(--border); background:#111d19; }
.top-inner { display:flex; gap:28px; min-height:69px; align-items:center; }
.brand { display:inline-flex; align-items:center; flex-shrink:0; font-size:1.03rem; font-weight:750; color:var(--ink); text-decoration:none; letter-spacing:-.045em; }
.dotcom { color:var(--muted); font-weight:500; }
.brand-icon { display:flex; gap:2px; align-items:end; justify-content:center; width:30px; height:30px; border-radius:8px; padding:7px; margin-right:8px; background:var(--green); }
.brand-icon i { display:block; width:4px; border-radius:1px; background:#1e320f; height:6px; }
.brand-icon i:nth-child(2) { height:10px; }.brand-icon i:nth-child(3) { height:15px; }
.top nav { display:flex; align-items:center; gap:24px; margin-left:auto; }
.top nav a { color:var(--muted); font-weight:600; font-size:.9rem; text-decoration:none; }
.top nav .nav-active { color:var(--green); }
.button,select { min-height:42px; border-radius:9px; padding:8px 12px; font-size:.875rem; font-weight:650; white-space:nowrap; }
.button { border:1px solid transparent; }
.accent { background:var(--green); color:#14210b; }
.outline,select { background:#1c2b25; color:var(--ink); border:1px solid #43564b; }
.button:hover { filter:brightness(1.13); }
.intro { display:flex; align-items:end; justify-content:space-between; gap:24px; padding:40px 0 30px; }
.eyebrow { display:flex; align-items:center; gap:8px; color:var(--green); font:600 .79rem var(--mono); letter-spacing:.09em; }
.eyebrow span { width:8px; height:8px; background:var(--green); border-radius:100%; }
h1 { font-size:clamp(2.45rem,5.5vw,4.7rem); letter-spacing:-.085em; line-height:1.04; margin:12px 0; }
h1 em { font-style:normal; color:var(--green); }
.intro p { max-width:550px; color:var(--muted); }
.intro-meta { display:grid; gap:3px; text-align:right; flex:none; margin-bottom:3px; }
.intro-meta strong { font:600 1rem var(--mono); }.intro-meta span { color:var(--muted); font-size:.83rem; }
.metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:17px; }
.metric,.panel,.fund-card { background:var(--panel); border:1px solid var(--border); border-radius:var(--radius); }
.metric { min-height:122px; padding:14px 16px; }
.metric strong { display:block; font-size:clamp(1.4rem,2.8vw,2.12rem); letter-spacing:-.055em; font-variant-numeric:tabular-nums; line-height:1.13; margin:7px 0 5px; }
.metric span,.metric small { color:var(--muted); font-size:.84rem; }
.negative { color:var(--coral); }.positive { color:var(--green); }.warning { color:var(--gold); }
.workspace { display:grid; grid-template-columns:minmax(265px,310px) minmax(0,1fr); gap:16px; align-items:start; }
.results { display:grid; gap:16px; min-width:0; }
.panel,.fund-card { padding:17px; }
.panel-head,.section-head { display:flex; justify-content:space-between; align-items:start; gap:10px; }
.panel-head p,.section-head p { color:var(--muted); font-size:.875rem; margin-top:4px; }
.panel-head a,.section-head a { font-size:.875rem; }
.preset { display:grid; gap:5px; margin:18px 0 13px; font-size:.875rem; }
.policy details { border-top:1px solid var(--border); padding:10px 0; }
.policy summary,.annual summary { color:var(--ink); font-weight:650; font-size:.92rem; }
.control { padding-top:12px; }
.control label,.policy-foot label { display:flex; justify-content:space-between; gap:7px; align-items:center; color:var(--ink); font-weight:600; font-size:.86rem; }
output { color:var(--green); font:600 .83rem var(--mono); white-space:nowrap; }
input[type=range] { display:block; width:100%; height:25px; margin:3px 0 0; accent-color:var(--green); touch-action:pan-y; cursor:pointer; }
.control p,.range-notes { color:var(--muted); font-size:.8rem; }
.control p { margin-top:1px; }
.policy-foot { border-top:1px solid var(--border); padding-top:13px; margin-top:4px; }
.range-notes { display:flex; justify-content:space-between; }
.wide { width:100%; margin-top:13px; }
.projection { min-width:0; }
.chart-tools { display:flex; align-items:center; gap:8px; justify-content:space-between; margin-top:15px; flex-wrap:wrap; }
#legend { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
#legend span,.check,.chart-year { display:inline-flex; align-items:center; gap:6px; color:var(--muted); font-size:.83rem; }
#legend i { width:13px; height:3px; border-radius:3px; background:var(--series-color); }
.check input { accent-color:var(--green); width:16px; height:16px; margin:0; }
.check:has(:disabled) { opacity:.5; }
.plot { height:clamp(235px,28vw,325px); position:relative; }
canvas { width:100%; height:100%; display:block; }
.tooltip { position:absolute; z-index:1; pointer-events:none; top:10px; padding:7px 9px; border:1px solid var(--border); border-radius:8px; background:#101c17; font-size:.82rem; white-space:nowrap; max-width:100%; }
.chart-year select { min-height:38px; }
.section-head { margin:3px 0 10px; align-items:center; }
.funds { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.fund-card p { color:var(--muted); font-size:.82rem; }
.fund-card strong { display:block; font-size:1.6rem; letter-spacing:-.04em; margin:8px 0 1px; }
.fund-card progress,.impact-row progress { width:100%; accent-color:var(--green); height:7px; }
.fund-card[data-risk="true"] progress { accent-color:var(--gold); }
#impacts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px 22px; margin-top:12px; }
.impact-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:1px 5px; padding:6px 0; border-bottom:1px solid #293b32; font-size:.86rem; }
.impact-row span { color:var(--muted); }
.impact-row strong { font:600 .83rem var(--mono); color:var(--green); }
.impact-row progress { grid-column:1/-1; }
.table-scroll { overflow:auto; margin-top:10px; }
table { width:100%; border-collapse:collapse; font-size:.86rem; white-space:nowrap; }
th,td { text-align:right; padding:9px 8px; border-bottom:1px solid var(--border); font-variant-numeric:tabular-nums; }
th:first-child { text-align:left; }
thead th { color:var(--muted); }
tr.selected { background:#213329; }
.annual details { margin-top:14px; }
.method p,.method li { color:var(--muted); margin-top:9px; font-size:.93rem; }
.method strong { color:var(--ink); }
.method ul { margin-bottom:0; padding-left:20px; }
.footer { display:flex; gap:18px; flex-wrap:wrap; margin:25px auto; color:var(--muted); font-size:.85rem; }
.footer span { margin-right:auto; }
.ad-slot { min-height:105px; text-align:center; border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.ad-slot small,.ad-slot a { display:block; margin:12px; }
.ad-slot small,td small,th small { color:var(--muted); font-weight:400; }
dialog { width:min(540px,calc(100% - 24px)); color:var(--ink); background:var(--panel); border:1px solid var(--border); border-radius:var(--radius); padding:18px; }
dialog::backdrop { background:#060d0acc; }
dialog label { display:block; margin-top:14px; font-size:.875rem; }
.dialog-actions,.saved-row { display:flex; align-items:center; gap:8px; margin-top:6px; }
.dialog-actions input { flex:1; min-width:0; color:var(--ink); background:var(--bg); border:1px solid var(--border); border-radius:8px; padding:8px; }
.saved-row span { margin-right:auto; overflow-wrap:anywhere; }
#toast { position:fixed; z-index:4; right:12px; bottom:12px; padding:10px 14px; border-radius:10px; background:var(--green); color:#15220c; }
#fireworks { position:fixed; z-index:3; inset:0; overflow:hidden; pointer-events:none; }
.spark { position:absolute; top:38%; left:70%; width:8px; height:8px; border-radius:50%; background:var(--spark); animation:burst .8s ease-out forwards; }
@keyframes burst { to { transform:translate(var(--dx),var(--dy)) scale(.2); opacity:0; } }
.flair-pulse { animation:pulse .45s ease-out; }
@keyframes pulse { 45% { transform:translateY(-3px); filter:brightness(1.24); } }
@media(max-width:850px) {
  .workspace { grid-template-columns:minmax(220px,255px) minmax(0,1fr); }
  .funds { grid-template-columns:1fr; }
}
@media(max-width:680px) {
  .top-inner { min-height:60px; gap:8px; justify-content:space-between; }
  .top nav { display:none; }
  .intro { align-items:start; flex-direction:column; gap:12px; padding:28px 0 18px; }
  .intro-meta { text-align:left; }
  .metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .metric { min-height:105px; padding:10px; }
  .workspace { grid-template-columns:minmax(0,1fr); }
  .panel,.fund-card { padding:12px; }
  .projection-head { flex-wrap:wrap; }
  .funds { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(max-width:450px) {
  .funds { grid-template-columns:1fr; }
  .section-head { align-items:start; }
  #impacts { grid-template-columns:1fr; gap:3px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none !important; scroll-behavior:auto !important; } }
