/* Investing Portfolio view. Reuses the P&L Tracker's cards, KPIs, tables and meters. */
#investRoot{display:flex;flex-direction:column;gap:16px}
.iv-lead .pl-hero{background:linear-gradient(160deg,#122019 0%,#0f131a 70%)}
.iv-line-s{margin:-4px 0 0;font-size:14.5px;color:var(--mut)}
.iv-line-s b{font-weight:700}
.iv-line-s b.pos{color:var(--gain)}.iv-line-s b.neg{color:var(--red)}
.iv-sub{margin:8px 0 0;font-size:14px;font-weight:600;color:var(--text)}

.iv-legend{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:13px;color:var(--mut)}
.iv-key{display:inline-flex;align-items:center;gap:7px}
.iv-key i{width:12px;height:3px;border-radius:2px}
.iv-key b{color:var(--text);font-weight:700}
.iv-key b.pos{color:var(--gain)}.iv-key b.neg{color:var(--red)}
.iv-line{fill:none;stroke-linejoin:round;stroke-linecap:round}
.iv-line.qqq,.iv-line.spy{stroke-width:1.1;opacity:.85}
.iv-line.mine{stroke-width:2.6}
.iv-cw{position:relative}
.iv-chart{touch-action:pan-y}
.iv-hit{fill:transparent;cursor:crosshair}
.iv-hover[hidden],.iv-hover circle[hidden]{display:none}
.iv-guide{stroke:var(--mut);stroke-width:1;stroke-dasharray:3 3;pointer-events:none}
.iv-hover circle{pointer-events:none}
.iv-tip{position:absolute;top:8px;z-index:2;min-width:170px;padding:10px 12px;border-radius:10px;background:#0b0e12f2;border:1px solid var(--line2);box-shadow:var(--shadow-pop);font-size:13px;pointer-events:none}
.iv-tip[hidden]{display:none}
.iv-tip b{display:block;margin-bottom:6px;font-size:12.5px;color:var(--mut);font-weight:600}
.iv-tip div{display:grid;grid-template-columns:10px minmax(0,1fr) auto;align-items:center;gap:8px;padding:2px 0}
.iv-tip i{width:10px;height:3px;border-radius:2px}
.iv-tip em{font-style:normal;font-weight:700;text-align:right;font-variant-numeric:tabular-nums}
.iv-tip .pos{color:var(--gain)}.iv-tip .neg{color:var(--red)}
.iv-rt tr.on td{background:#ffffff06}
.iv-rt td small{display:block;color:var(--mut);font-size:12px;margin-top:2px}
.iv-rt .pos,.iv-ht .pos{color:var(--gain)}.iv-rt .neg,.iv-ht .neg{color:var(--red)}

.iv-stack{display:flex;height:14px;border-radius:99px;overflow:hidden;background:#232a34;gap:2px}
.iv-stack span{display:block;height:100%;min-width:2px}
.iv-alloc{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 18px}
.iv-alloc div{display:grid;grid-template-columns:10px 56px minmax(0,1fr) auto;align-items:center;gap:8px;font-size:13.5px;padding:5px 0;border-bottom:1px solid var(--line)}
.iv-alloc i{width:10px;height:10px;border-radius:3px}
.iv-alloc span{color:var(--mut);text-align:right}
.iv-alloc em{font-style:normal;font-weight:600;min-width:46px;text-align:right}
.iv-ind{display:flex;flex-direction:column;gap:8px}
.iv-ind div{display:grid;grid-template-columns:minmax(0,170px) minmax(0,1fr) 52px;align-items:center;gap:12px;font-size:13px}
.iv-ind div span:first-child{color:var(--mut);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.iv-ind em{font-style:normal;text-align:right;font-weight:600}
.iv-ind .pl-meter{margin:0}

.iv-moves{display:flex;flex-direction:column;gap:4px}
.iv-moves>div{display:grid;grid-template-columns:56px minmax(0,1fr) 92px 64px;align-items:center;gap:10px;font-size:13.5px;padding:4px 0}
.iv-mbar{position:relative;height:10px}
.iv-mbar::before{content:"";position:absolute;left:50%;top:-3px;bottom:-3px;width:1px;background:var(--line2)}
.iv-mbar span{position:absolute;top:0;bottom:0;border-radius:3px;background:var(--gain)}
.iv-mbar span.neg{background:var(--red)}
.iv-moves em{font-style:normal;text-align:right;font-weight:600}
.iv-moves small{text-align:right;font-size:12.5px}
.iv-moves .pos{color:var(--gain)}.iv-moves .neg{color:var(--red)}

.iv-band{display:flex;flex-direction:column;gap:12px;padding:20px 22px;border-radius:14px;border:1px solid var(--acc-line);background:linear-gradient(180deg,#0f1a14 0%,var(--panel) 100%)}
.iv-band h3{margin:0;font-size:17px;font-weight:600}
.iv-five{grid-template-columns:repeat(5,minmax(0,1fr))}
.iv-five .pl-kpi{background:#0c1015}
.iv-five .pl-v{font-size:24px}

.iv-stars{color:#F5C451;letter-spacing:1px;white-space:nowrap;font-size:13px}
.iv-stars i{font-style:normal;color:#3a414c}
.iv-pfv{display:inline-block;padding:2px 8px;border-radius:99px;font-weight:600;border:1px solid var(--line2)}
.iv-pfv.lo{color:var(--gain);border-color:var(--acc-line);background:var(--acc-bg)}
.iv-pfv.hi{color:var(--red);border-color:#4a1f1f;background:#1f0d0d}
.iv-pfv.mid{color:var(--amb);border-color:var(--amb-line);background:var(--amb-bg)}
.iv-pc{min-width:150px}
.iv-pc .pl-meter{margin:2px 0 0}

.iv-notes{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px}
.iv-note{display:flex;flex-direction:column;gap:10px;padding:16px;border-radius:12px;border:1px solid var(--line2);background:var(--panel2);min-width:0}
.iv-note header{display:flex;align-items:center;justify-content:space-between;gap:8px}
.iv-note header .ct-tk>span:not(.lg-av){display:flex;flex-direction:column}
.iv-note header small{color:var(--mut);font-size:12px}
.iv-note p{margin:0;font-size:13.5px;line-height:1.5}
.iv-say{font-size:13px;line-height:1.45}
.iv-say b{font-size:11.5px;letter-spacing:.06em;text-transform:uppercase}
.iv-say.bull b{color:var(--gain)}.iv-say.bear b{color:var(--red)}
.iv-say ul{margin:4px 0 0;padding-left:18px;color:var(--mut)}
.iv-note footer{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:auto}
.iv-asof{margin-left:auto;color:var(--dim);font-size:12px}

@media(max-width:1100px){.iv-five{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:600px){.iv-five{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.iv-alloc{grid-template-columns:minmax(0,1fr)}.iv-moves>div{grid-template-columns:48px minmax(0,1fr) 80px 56px;gap:6px}.iv-ind div{grid-template-columns:minmax(0,110px) minmax(0,1fr) 46px}.iv-band{padding:16px}.iv-notes{grid-template-columns:minmax(0,1fr)}}

.iv-moved{stroke:var(--mut);stroke-width:1;stroke-dasharray:4 4}
.iv-yb rect{fill:#5b8def}
.iv-yb.neg rect{fill:var(--red)}
.iv-yb.ytd rect{fill-opacity:.55;stroke:#5b8def;stroke-dasharray:4 3}
.iv-yb.ytd.neg rect{stroke:var(--red)}
.iv-yb:hover rect{fill-opacity:.8}
.iv-cagr{background:linear-gradient(160deg,#13233a 0%,var(--panel) 80%);border-color:#2a3b5e}
.iv-edit{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:12px 16px;align-items:end}
.iv-edit .pl-field{display:flex;flex-direction:column;align-items:stretch;text-align:left;gap:6px;font-size:13px;color:var(--mut)}
.iv-edit .iv-msg{grid-column:1/-1;margin:0;color:var(--amb,#F5A524);font-size:13px}
.iv-edit .iv-wide{grid-column:1/-1}
.iv-edit-b{display:flex;gap:8px}
@media(max-width:600px){.iv-edit{grid-template-columns:minmax(0,1fr)}}
/* Phones: the 1M…Lifetime switch scrolls sideways inside its own row instead of running off the card. */
@media(max-width:700px){#v-invest .pl-h .seg{max-width:100%;overflow-x:auto;scrollbar-width:none;flex-wrap:nowrap}#v-invest .pl-h .seg::-webkit-scrollbar{display:none}#v-invest .pl-h .seg button{flex:none;padding:5px 10px}}
