:root { color-scheme: light; --ink:#172a40; --muted:#4b6179; --brand:#134c84; --border:#d2deeb; --bg:#f2f6fa; font:16px/1.55 system-ui,sans-serif; color:var(--ink); background:var(--bg); }
* { box-sizing:border-box; }
body { margin:0; }
a { color:#144e88; text-underline-offset:.18em; }
.site { background:#132940; color:#fff; padding:.8rem max(1rem,calc((100vw - 1220px)/2)); display:flex; align-items:center; gap:1.5rem; flex-wrap:wrap; }
.site strong { letter-spacing:.15em; }
.site a { color:#d9e9fa; font-size:.9rem; }
main { max-width:1252px; margin:auto; padding:clamp(1rem,3vw,2rem) 1rem 3rem; }
.intro { margin-bottom:1.5rem; }
.eyebrow { font-size:.86rem; font-weight:650; color:var(--brand); margin:0; }
h1 { font-size:clamp(1.75rem,4vw,2.75rem); margin:.18em 0; line-height:1.18; letter-spacing:-.044em; }
h2 { font-size:1.18rem; margin:0 0 .6rem; }
p { margin:.5rem 0; }
.scope { font-size:.91rem; color:#674419; background:#fff6e6; border-left:3px solid #b77b24; width:fit-content; padding:.55rem .8rem; margin-top:1rem; }
.workspace { display:grid; grid-template-columns:minmax(280px,330px) minmax(0,1fr); gap:1rem; align-items:start; }
.panel { min-width:0; background:#fff; border:1px solid var(--border); border-radius:12px; padding:clamp(.8rem,2vw,1.3rem); }
.presets,.result-head,#legend { display:flex; flex-wrap:wrap; gap:.5rem; }
.result-head { justify-content:space-between; align-items:center; }
.result-head h2 { margin:0; }
button,input { font:inherit; border:1px solid #93aac0; border-radius:6px; color:var(--ink); }
button { cursor:pointer; background:#f5f9fd; padding:.38rem .65rem; font-size:.9rem; font-weight:650; min-height:40px; }
button:hover:not(:disabled) { background:#e5f0fc; }
button:disabled { opacity:.55; cursor:default; }
button.action { margin-top:1rem; width:100%; color:#fff; background:var(--brand); border-color:var(--brand); }
button.action:hover:not(:disabled) { background:#103d69; }
.inputs { display:grid; gap:.55rem; grid-template-columns:minmax(0,1fr); margin-top:.8rem; }
.inputs label { display:grid; grid-template-columns:minmax(0,1fr) minmax(86px,106px); align-items:center; gap:.4rem; font-size:.88rem; }
.inputs input { width:100%; min-height:36px; padding:.3rem .4rem; background:white; }
summary { cursor:pointer; margin-top:.9rem; font-size:.92rem; font-weight:650; }
#status,.balance { font-size:.9rem; color:var(--muted); }
#chart { display:block; width:100%; height:330px; }
#legend { margin:.3rem 0 .9rem; font-size:.82rem; }
#legend i { display:inline-block; width:1.05rem; border-top:3px solid; vertical-align:middle; margin-right:.25rem; }
.table-wrap { overflow:auto; }
table { width:100%; border-collapse:collapse; text-align:left; font-size:.9rem; font-variant-numeric:tabular-nums; }
caption { text-align:left; font-weight:650; padding:0 0 .35rem; }
th,td { border-bottom:1px solid var(--border); padding:.5rem .45rem; }
thead { background:#eff5fb; }
.theory { margin-top:1rem; }
:focus-visible { outline:3px solid #2377bd; outline-offset:2px; }
@media(max-width:780px) { .workspace { grid-template-columns:1fr; } #chart { height:285px; } }
