:root { color-scheme: dark; --a:#8FBAD1; --a2:#A7CCE0; --warm:#E0A17F; --ink:#ECEAE4; --dim:#B6B3AB; }
* { box-sizing: border-box; }
/* Site background so the frame blends with the page. */
html, body { background:#141417; }
body { margin:0; padding:8px 0 24px; color:var(--ink); font-family:system-ui,-apple-system,"DM Sans",sans-serif; line-height:1.6; }
.wrap { max-width:620px; margin:0 auto; }
.panel { padding:22px 0; border-top:1px solid rgba(255,255,255,.08); }
.panel:first-child { border-top:0; padding-top:6px; }
.panel h2 { font-family:Georgia,"EB Garamond",serif; font-weight:500; font-size:1.25rem; margin:0 0 6px; }
.lede { color:var(--dim); font-size:.92rem; margin:0 0 14px; }
.eq { margin:12px 0; overflow-x:auto; }

/* Plots */
.plot { }
svg { width:100%; height:auto; display:block; touch-action:none; }
.axis { stroke:#2a2a30; stroke-width:1; }
.grid { stroke:#212127; stroke-width:1; }
.axis-label { fill:#86847D; font-size:11px; font-family:ui-monospace,monospace; }
.tick { fill:#6f6d67; font-size:10px; font-family:ui-monospace,monospace; }
.curve { fill:none; stroke:var(--a); stroke-width:2; }
.stair { fill:none; stroke:var(--warm); stroke-width:1.6; opacity:.9; }
.muline { stroke:#4a4a52; stroke-width:1; stroke-dasharray:4 4; }
.dot { fill:var(--warm); stroke:#141417; stroke-width:2; cursor:grab; }
.dot:active { cursor:grabbing; }
.drop { stroke:var(--warm); stroke-width:1; stroke-dasharray:3 3; opacity:.6; }
.dens { fill:rgba(143,186,209,.16); stroke:var(--a); stroke-width:2; }
.datum { stroke:var(--a2); stroke-width:2; }

/* Controls */
.controls { display:flex; flex-wrap:wrap; gap:14px 22px; align-items:center; margin:14px 0 4px; }
.chk { font-family:ui-monospace,monospace; font-size:.86rem; color:var(--warm); display:inline-flex; align-items:center; gap:8px; cursor:pointer; }
.chk input { accent-color:var(--warm); width:15px; height:15px; }
.ctl { display:grid; grid-template-columns:150px 1fr; gap:12px; align-items:center; flex:1 1 260px; }
.ctl label { font-family:ui-monospace,monospace; font-size:.82rem; color:var(--a2); }
.ctl output { font-variant-numeric:tabular-nums; color:var(--ink); }
input[type=range] { width:100%; accent-color:var(--a); }

/* Readout */
.readout { margin-top:12px; display:flex; gap:20px; align-items:baseline; flex-wrap:wrap; font-family:ui-monospace,monospace; font-size:.88rem; color:var(--dim); }
.readout b { color:var(--ink); font-variant-numeric:tabular-nums; }
.readout .lost { color:var(--warm); }
