
:root{box-sizing:border-box;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px);
  --bg:#F4F0F2;--surface:#FFFFFF;--ink:#2A1F2D;--muted:#6E6272;--line:#DED6DB;--line-strong:#C9BFC6;
  --plum:#6D3B67;--plum-soft:#EBDDE8;--moss:#3F7A56;--moss-soft:#DFEBE2;--rose:#B94A63;--rose-soft:#F3DEE3;--amber:#B8862B;--amber-soft:#F4EAD6;--rail:#E9E1E6;--focus:#6D3B67;
  --c0:#2A1F2D;--c1:#6D3B67;--c2:#B94A63;--c3:#3F7A56;--c4:#B8862B}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--bg:#1B151D;--surface:#251E28;--ink:#F1EAEE;--muted:#A99EA7;--line:#3A3040;--line-strong:#4B4050;--plum:#C58BBC;--plum-soft:#3B2C39;--moss:#7DBB93;--moss-soft:#243528;--rose:#E28398;--rose-soft:#3E272D;--amber:#E0B25C;--amber-soft:#3C3222;--rail:#332A36;--focus:#C58BBC;--c0:#F1EAEE;--c1:#C58BBC;--c2:#E28398;--c3:#7DBB93;--c4:#E0B25C}}
:root[data-theme="dark"]{--bg:#1B151D;--surface:#251E28;--ink:#F1EAEE;--muted:#A99EA7;--line:#3A3040;--line-strong:#4B4050;--plum:#C58BBC;--plum-soft:#3B2C39;--moss:#7DBB93;--moss-soft:#243528;--rose:#E28398;--rose-soft:#3E272D;--amber:#E0B25C;--amber-soft:#3C3222;--rail:#332A36;--focus:#C58BBC;--c0:#F1EAEE;--c1:#C58BBC;--c2:#E28398;--c3:#7DBB93;--c4:#E0B25C}
html{scroll-padding-top:env(safe-area-inset-top,0px);height:100%}
*,*::before,*::after{box-sizing:inherit}
body{margin:0;background:var(--bg);color:var(--ink);font-family:"Manrope",system-ui,-apple-system,"Segoe UI",sans-serif;font-size:15px;line-height:1.5;-webkit-font-smoothing:antialiased}
main{max-width:1080px;margin:0 auto;padding:32px 20px 64px}
h1,h2{font-family:"Fraunces",Georgia,"Times New Roman",serif;font-weight:500;letter-spacing:-0.01em}
h1{font-size:34px;line-height:1.1;margin:0 0 6px}
h2{font-size:22px;margin:40px 0 12px}
p{margin:0 0 10px;max-width:72ch}
.muted{color:var(--muted)} .small{font-size:13px}
header{display:flex;flex-wrap:wrap;gap:8px 24px;align-items:baseline;justify-content:space-between;border-bottom:1px solid var(--line);padding-bottom:16px}
.status{font-size:13px;color:var(--muted)} .status b{color:var(--ink);font-weight:600}
.answer{margin:24px 0 8px;font-family:"Fraunces",Georgia,serif;font-size:22px;line-height:1.35;max-width:34em}
.answer .tight{color:var(--rose)} .answer .ok{color:var(--moss)}
.keyline{display:flex;flex-wrap:wrap;gap:8px 28px;margin:10px 0 4px;font-size:14px;color:var(--muted)}
.keyline b{font-family:"Fraunces",Georgia,serif;font-size:20px;color:var(--ink);font-weight:500;margin-right:4px}
.controls{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px 16px;background:var(--surface);border:1px solid var(--line);padding:16px;border-radius:6px;margin-top:20px}
.controls label{display:flex;flex-direction:column;gap:4px;font-size:13px;color:var(--muted)}
.controls input,.controls select{font:inherit;font-size:15px;color:var(--ink);background:var(--bg);border:1px solid var(--line-strong);border-radius:4px;padding:7px 9px;width:100%}
.controls input:focus,.controls select:focus,button:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.controls .src{color:var(--muted);font-size:12px}
.subrow{grid-column:1/-1;display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px 16px;padding-top:10px;border-top:1px dashed var(--line)}
.controls .reset{grid-column:1/-1;justify-self:start;background:none;border:1px solid var(--line-strong);color:var(--muted);border-radius:4px;padding:6px 10px;font:inherit;font-size:13px;cursor:pointer}
.rails{display:grid;gap:14px;margin-top:8px}
.rail{display:grid;grid-template-columns:210px 1fr 200px;gap:16px;align-items:center}
.rail .name{font-weight:600;font-size:14px} .rail .name span{display:block;font-weight:400;color:var(--muted);font-size:12px}
.track{position:relative;height:46px}
.track .bar{position:absolute;left:0;top:19px;height:8px;background:var(--rail);border-radius:4px;width:100%}
.track .fill{position:absolute;left:0;top:19px;height:8px;border-radius:4px;background:var(--plum-soft)}
.track .fill.proj{background:repeating-linear-gradient(90deg,var(--plum-soft) 0 6px,transparent 6px 10px)}
.track .dot{position:absolute;top:15px;width:16px;height:16px;border-radius:50%;background:var(--plum);border:2px solid var(--surface);transform:translateX(-50%);box-shadow:0 0 0 1px var(--plum)}
.track .dot.m1{background:var(--surface)} .track .dot.m6{opacity:.55}
.track .dot i{position:absolute;top:18px;left:50%;transform:translateX(-50%);font:600 11px "Manrope",sans-serif;font-style:normal;color:var(--muted);white-space:nowrap}
.track .tick{position:absolute;top:7px;width:2px;height:32px;transform:translateX(-50%)}
.track .tick.cpa{background:var(--ink)} .track .tick.scn{background:var(--rose)}
.track .tick i{position:absolute;top:-14px;left:50%;transform:translateX(-50%);font:600 11px "Manrope",sans-serif;font-style:normal;white-space:nowrap}
.track .tick.cpa i{color:var(--ink)} .track .tick.scn i{color:var(--rose)}
.rail .verdict{font-size:13px;line-height:1.35} .rail .verdict b{font-family:"Fraunces",Georgia,serif;font-weight:500;font-size:17px}
.rail .verdict.ok b{color:var(--moss)} .rail .verdict.tight b{color:var(--rose)} .rail .verdict.mid b{color:var(--amber)}
.legend{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:12px;color:var(--muted);margin-top:8px}
.legend span::before{content:"";display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:6px;vertical-align:-1px}
.legend .l1::before{background:var(--surface);box-shadow:0 0 0 2px var(--plum)} .legend .l3::before{background:var(--plum)} .legend .l6::before{background:var(--plum);opacity:.55}
.legend .lc::before{background:var(--ink);border-radius:0;width:2px} .legend .ls::before{background:var(--rose);border-radius:0;width:2px}
@media (max-width:720px){.rail{grid-template-columns:1fr;gap:6px} h1{font-size:28px} .answer{font-size:19px}}
.chartwrap{background:var(--surface);border:1px solid var(--line);border-radius:6px;padding:12px 8px 4px;overflow-x:auto}
svg text{font-family:"Manrope",system-ui,sans-serif;fill:var(--muted);font-size:12px}
svg .axis{stroke:var(--line-strong);stroke-width:1} svg .grid{stroke:var(--line);stroke-width:1}
svg .cpa{stroke:var(--ink);stroke-width:1.2;stroke-dasharray:4 4} svg .scn{stroke:var(--rose);stroke-width:1.2;stroke-dasharray:4 4}
.chart-legend{display:flex;flex-wrap:wrap;gap:6px 16px;font-size:12px;color:var(--muted);padding:8px 8px 6px}
.chart-legend span::before{content:"";display:inline-block;width:14px;height:3px;border-radius:2px;margin-right:6px;vertical-align:3px;background:var(--sw)}
.tabs{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 10px}
.tabs button{font:inherit;font-size:13px;padding:6px 11px;border-radius:999px;border:1px solid var(--line-strong);background:var(--surface);color:var(--ink);cursor:pointer}
.tabs button[aria-selected="true"]{background:var(--plum);border-color:var(--plum);color:#fff}
.tablewrap{overflow-x:auto;background:var(--surface);border:1px solid var(--line);border-radius:6px}
table{border-collapse:collapse;width:100%;font-size:13px;min-width:640px}
th,td{padding:8px 10px;text-align:right;border-bottom:1px solid var(--line);white-space:nowrap}
th{font-weight:600;color:var(--muted);font-size:12px} th:first-child,td:first-child{text-align:left}
tbody tr:last-child td{border-bottom:0} td.proj{color:var(--muted);font-style:italic}
tr.sum td{font-weight:600;border-top:2px solid var(--line-strong)} tr.dim td{color:var(--muted)}
td{font-variant-numeric:tabular-nums}
.notes{border-left:2px solid var(--line-strong);padding-left:14px;margin-top:12px} .notes p{margin-bottom:8px}
.pill{display:inline-block;font-size:12px;padding:2px 8px;border-radius:999px;margin-right:6px;font-weight:600}
.pill.done{background:var(--moss-soft);color:var(--moss)} .pill.ph{background:var(--amber-soft);color:var(--amber)} .pill.no{background:var(--rose-soft);color:var(--rose)}

nav.top{display:flex;flex-wrap:wrap;gap:6px 18px;align-items:center;padding:12px 20px;border-bottom:1px solid var(--line);background:var(--surface);font-size:14px}
nav.top a{color:var(--ink);text-decoration:none;padding:4px 0}
nav.top a.active{color:var(--plum);font-weight:600;border-bottom:2px solid var(--plum)}
nav.top .brand{font-family:"Fraunces",Georgia,serif;font-size:17px;margin-right:12px}
nav.top .right{margin-left:auto;display:flex;gap:14px;align-items:center;color:var(--muted);font-size:13px}
nav.top button{font:inherit;font-size:13px;background:none;border:1px solid var(--line-strong);border-radius:4px;padding:4px 10px;color:var(--muted);cursor:pointer}
.card{background:var(--surface);border:1px solid var(--line);border-radius:6px;padding:18px 20px;margin:14px 0}
.card h3{margin:0 0 8px;font-family:"Fraunces",Georgia,serif;font-weight:500;font-size:18px}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px 16px}
.field{display:flex;flex-direction:column;gap:4px;font-size:13px;color:var(--muted)}
.field input,.field select,.field textarea{font:inherit;font-size:15px;color:var(--ink);background:var(--bg);border:1px solid var(--line-strong);border-radius:4px;padding:7px 9px;width:100%}
.btn{font:inherit;font-size:14px;background:var(--plum);color:#fff;border:0;border-radius:4px;padding:9px 16px;cursor:pointer}
.btn.secondary{background:none;color:var(--ink);border:1px solid var(--line-strong)}
.msg{font-size:13px;margin-top:8px;min-height:18px}
.msg.ok{color:var(--moss)} .msg.err{color:var(--rose)}
table.rates td input{width:84px;padding:4px 6px;font-size:13px}
.home{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px;margin-top:24px}
.home a.tile{display:block;background:var(--surface);border:1px solid var(--line);border-radius:6px;padding:22px;text-decoration:none;color:var(--ink)}
.home a.tile:hover{border-color:var(--plum)}
.home a.tile h3{margin:0 0 6px;font-family:"Fraunces",Georgia,serif;font-weight:500;font-size:20px}
.home a.tile p{margin:0;color:var(--muted);font-size:14px}
.login{max-width:380px;margin:12vh auto 0;padding:0 20px}
