:root{
  --bg:#0c1116; --card:#141c25; --card2:#1a2431; --line:#26313f;
  --txt:#e9eef5; --mut:#8d99ab; --acc:#2fd67c; --acc-d:#0c2f1e;
  --red:#ff6b6b; --gold:#f2b544; --blue:#4da3ff;
}
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent;}
html{font-size:16px;}
body{margin:0; background:var(--bg); color:var(--txt);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  line-height:1.45; padding-bottom:4rem;}
.wrap{max-width:680px; margin:0 auto; padding:0 1rem;}
header{position:sticky; top:0; z-index:20; background:rgba(12,17,22,.92);
  backdrop-filter:blur(8px); border-bottom:1px solid var(--line);}
.hrow{display:flex; align-items:center; justify-content:space-between; height:3.25rem;}
.logo{font-weight:800; font-size:1.25rem; color:var(--txt); text-decoration:none; letter-spacing:.02em;}
.logo::after{content:""; display:inline-block; width:.45em; height:.45em; border-radius:50%;
  background:var(--acc); margin-left:.3em; vertical-align:baseline;}
.hright{display:flex; align-items:center; gap:.6rem;}
.hname{color:var(--mut); font-size:.9rem;}
.hname.renameable{cursor:pointer; border-bottom:1px dotted var(--mut);}
.pill{background:var(--acc-d); color:var(--acc); border:1px solid #1d5c38;
  padding:.25rem .7rem; border-radius:999px; font-weight:700; font-size:.9rem; white-space:nowrap;}
h2{font-size:1.4rem; margin:1.25rem 0 .5rem;}
h3{font-size:1.05rem; margin:1.25rem 0 .5rem;}
.mut{color:var(--mut);}
.center{text-align:center;}
.card{background:var(--card); border:1px solid var(--line); border-radius:.9rem;
  padding:1rem; margin:.75rem 0;}
.stack{display:flex; flex-direction:column; gap:.6rem;}
.row{display:flex; gap:.6rem;}
.row>*{flex:1;}
input,select,textarea{width:100%; background:var(--card2); color:var(--txt);
  border:1px solid var(--line); border-radius:.6rem; padding:.7rem .8rem;
  font-size:1rem; margin:.3rem 0; font-family:inherit;}
input:focus,select:focus,textarea:focus{outline:none; border-color:var(--acc);}
textarea{min-height:4.5rem; resize:vertical;}
input.mono{font-family:ui-monospace,Menlo,Consolas,monospace; text-transform:uppercase;}
.btn{display:inline-flex; align-items:center; justify-content:center;
  background:var(--card2); color:var(--txt); border:1px solid var(--line);
  border-radius:.6rem; padding:.7rem 1.1rem; font-size:1rem; font-weight:600;
  cursor:pointer; min-height:2.9rem; text-decoration:none;}
.btn:active{transform:scale(.98);}
.btn.primary{background:var(--acc); border-color:var(--acc); color:#06130c;}
.btn.danger{background:transparent; border-color:var(--red); color:var(--red);}
.btn.gold{background:var(--gold); border-color:var(--gold); color:#241a05;}
.btn:disabled{opacity:.45; cursor:default;}
.btn.block{width:100%; margin-top:.5rem;}
a{color:var(--blue);}
.back{display:inline-block; margin:1rem 0 .25rem; color:var(--mut); text-decoration:none; font-size:.95rem;}
.evcard{display:block; background:var(--card); border:1px solid var(--line);
  border-radius:.9rem; padding:1rem; color:var(--txt); text-decoration:none;}
.evcard:active{border-color:var(--acc);}
.evcard .t{font-weight:700; font-size:1.05rem;}
.evcard .s{color:var(--mut); font-size:.85rem; margin-top:.2rem;}
.badge{display:inline-block; font-size:.72rem; font-weight:800; letter-spacing:.06em;
  padding:.18rem .55rem; border-radius:999px; text-transform:uppercase;}
.badge.live{background:var(--acc-d); color:var(--acc); border:1px solid #1d5c38;}
.badge.closed{background:#2a2f36; color:var(--mut); border:1px solid var(--line);}
.badge.final{background:#3a2f14; color:var(--gold); border:1px solid #6b541f;}
.opt{display:block; width:100%; text-align:left; background:var(--card);
  border:1px solid var(--line); border-radius:.7rem; padding:.7rem .8rem;
  margin:.45rem 0; cursor:pointer; color:var(--txt); font-size:1rem;}
.opt.sel{border-color:var(--acc); box-shadow:0 0 0 1px var(--acc);}
.olabel{font-weight:600;}
.opct{float:right; font-weight:800; font-variant-numeric:tabular-nums;}
.obar{display:block; height:.45rem; background:#0a0e13; border-radius:999px; margin-top:.5rem; overflow:hidden;}
.ofill{display:block; height:100%; background:linear-gradient(90deg,#1d8a4e,var(--acc)); border-radius:999px;
  transition:width .25s ease;}
.coderow{display:flex; align-items:center; gap:.6rem; background:var(--card);
  border:1px dashed var(--line); border-radius:.7rem; padding:.6rem .8rem; margin:.6rem 0;}
.coderow code{font-family:ui-monospace,Menlo,Consolas,monospace; font-size:1.15rem;
  letter-spacing:.15em; color:var(--gold); font-weight:800;}
.coderow .btn{margin-left:auto; min-height:2.2rem; padding:.35rem .8rem; font-size:.85rem;}
.seg{display:flex; background:#0a0e13; border:1px solid var(--line); border-radius:.7rem;
  padding:.25rem; gap:.25rem; margin:.4rem 0;}
.seg button{flex:1; border:0; background:transparent; color:var(--mut); font-weight:700;
  font-size:1rem; padding:.6rem; border-radius:.5rem; cursor:pointer;}
.seg button.on{background:var(--card2); color:var(--txt);}
.seg button.on.buy{color:var(--acc);}
.seg button.on.sell{color:var(--red);}
#quote{display:flex; justify-content:space-between; align-items:center; gap:.5rem;
  background:#0a0e13; border:1px solid var(--line); border-radius:.6rem;
  padding:.6rem .8rem; margin:.5rem 0; font-size:.95rem;}
#quote .bad{color:var(--red);}
.lrow{display:flex; align-items:center; gap:.7rem; padding:.55rem .2rem;
  border-bottom:1px solid var(--line);}
.lrow:last-child{border-bottom:0;}
.rank{width:1.6rem; text-align:center; color:var(--mut); font-weight:800;}
.lname{flex:1; font-weight:600;}
.pnl{font-weight:800; font-variant-numeric:tabular-nums;}
.pnl.pos{color:var(--acc);} .pnl.neg{color:var(--red);}
.tup{flex:0 0 auto; width:1.7rem; height:1.7rem; border-radius:50%;
  border:1px solid var(--acc); background:transparent; color:var(--acc);
  font-size:1rem; font-weight:800; line-height:1; cursor:pointer; padding:0;}
.tup:active{transform:scale(.92);}
.trow{display:flex; gap:.5rem; font-size:.85rem; padding:.4rem 0; border-bottom:1px solid var(--line); color:var(--mut);}
.trow:last-child{border-bottom:0;}
.trow .who{font-weight:700; color:var(--txt);}
.trow .amt{margin-left:auto; font-variant-numeric:tabular-nums; white-space:nowrap;}
.criteria{background:#0a0e13; border-left:3px solid var(--gold); padding:.6rem .8rem;
  border-radius:0 .6rem .6rem 0; font-size:.92rem; color:var(--mut); margin:.6rem 0;}
.kv{display:flex; justify-content:space-between; font-size:.9rem; color:var(--mut); margin:.3rem 0;}
#toast{position:fixed; left:50%; bottom:1.5rem; transform:translateX(-50%) translateY(4rem);
  background:#1f2a38; color:var(--txt); border:1px solid var(--line);
  padding:.8rem 1.2rem; border-radius:.8rem; font-weight:600; max-width:90vw;
  opacity:0; transition:all .25s ease; z-index:99; text-align:center;}
#toast.show{opacity:1; transform:translateX(-50%) translateY(0);}
#toast.bad{border-color:var(--red); color:#ffb3b3;}
#modal-root:empty{display:none;}
.overlay{position:fixed; inset:0; background:rgba(0,0,0,.65); z-index:50;
  display:flex; align-items:flex-end; justify-content:center;}
.sheet{background:var(--card); border:1px solid var(--line); border-radius:1.1rem 1.1rem 0 0;
  width:100%; max-width:680px; max-height:88vh; overflow-y:auto; padding:1.2rem 1.2rem 2rem;}
@media(min-width:700px){ .overlay{align-items:center;} .sheet{border-radius:1.1rem;} }
.outrow{display:flex; gap:.5rem; align-items:center;}
.outrow input{flex:1;}
.xbtn{background:none; border:0; color:var(--mut); font-size:1.3rem; cursor:pointer; padding:.4rem;}
.hero{padding:2.5rem 0 1rem;}
.hero h1{font-size:2rem; margin:0 0 .4rem;}
.refbtn{background:none; border:1px solid var(--line); color:var(--mut); border-radius:.5rem;
  padding:.3rem .6rem; font-size:.85rem; cursor:pointer;}
.toprow{display:flex; align-items:center; justify-content:space-between; gap:.5rem;}
.plink{color:var(--mut); text-decoration:none; font-size:.95rem; font-weight:600; white-space:nowrap;}
.plink:active{color:var(--txt);}
@media (max-width:560px){
  .hname{display:none;}
  .hright{gap:.5rem;}
  .plink{font-size:.88rem;}
  .pill{font-size:.82rem; padding:.2rem .6rem;}
  .logo{font-size:1.1rem;}
}
.price{font-size:2rem; font-weight:800; margin:.25rem 0;}
.feat{list-style:none; padding:0; margin:.75rem 0;}
.feat li{padding:.35rem 0; border-bottom:1px solid var(--line); font-size:.95rem;}
.feat li:last-child{border-bottom:0;}
.feat li::before{content:"✓ "; color:var(--acc); font-weight:800;}
.card.hot{border-color:var(--acc);}
.upnudge{background:var(--acc-d); border:1px solid #1d5c38; color:var(--acc);
  border-radius:.7rem; padding:.6rem .8rem; margin:.6rem 0; font-size:.9rem; font-weight:600;}
.upnudge a{color:var(--acc);}
