/* Same self-hosted title and percentage faces used by BitBull. */
@font-face{font-family:'Bull Bowlby';src:url('/fonts/BowlbyOne-Card-v2.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Bull Archivo';src:url('/fonts/ArchivoBlack-Card-v2.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
/* StockBull portfolio: the approved BitBull layout with a solid navy header. */
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
main{width:calc(100% - 24px);max-width:none;margin:8px auto 44px}
.portfolio-header{min-height:58px;padding-block:6px}.portfolio-logo img{max-height:40px}
.stock-overview{overflow:hidden;border:1px solid var(--line);border-radius:22px;background:var(--surface);box-shadow:0 8px 30px #1a263012;padding:0 16px 10px}
.stock-summary-row,.stock-detail-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;min-width:0}
.stock-summary-row{margin:0 -16px 10px;padding:10px 16px 8px;background:#071d36}
.stock-summary-cell,.stock-history-column,.stock-allocation-column{min-width:0;container-type:inline-size}
.stock-amount-panel{display:flex;flex-direction:column;gap:1.5cqw;height:24cqw;padding:1cqw 0;color:#fff}
.stock-amount-panel>span{font-size:4cqw;font-weight:900;line-height:1.15}
.stock-amount-box{display:flex;align-items:center;justify-content:flex-end;width:100%;height:12cqw;flex:none;padding:1cqw 3cqw;border:1px solid #ffffffd9;border-radius:2cqw;background:#fff;box-shadow:0 2px 5px #003d2526;font-size:10cqw}
.stock-amount-box strong{display:block;min-width:0;width:100%;max-width:100%;margin:0;color:#126cb1;font-size:10cqw;font-weight:1000;font-style:italic;font-synthesis:style;line-height:.85;white-space:nowrap;text-align:right;transform-origin:right center}
.stock-amount-box strong[data-tone="profit"]{color:#078f42}.stock-amount-box strong[data-tone="loss"]{color:#dc2535}
.stock-amount-panel small{font-size:2.5cqw;line-height:1.2}
.stock-amount-box .demo-amount-char{color:inherit;font:inherit}
.stock-detail-row h2{margin:0 0 4px;min-height:20px;font-size:4cqw;line-height:1.2}
.stock-mix-heading{display:flex;align-items:baseline;gap:1.5cqw;min-height:20px;margin-bottom:4px}
.stock-mix-heading h2{margin:0}.stock-mix-heading small{font-size:2.6cqw;color:var(--muted);font-weight:900}
.stock-allocation-bar{width:100%;height:5cqw;min-height:6px;margin:0 0 3cqw;border-radius:1.4cqw;background:#e8edef}
.stock-allocation-legend{display:grid;gap:0;margin:0;padding:0;list-style:none;container-type:inline-size}
.stock-legend-row{display:grid;grid-template-columns:minmax(0,.38fr) minmax(0,.17fr) minmax(0,.45fr);align-items:center;gap:1cqw;min-height:15.5cqw;padding:1.4cqw 0;border-bottom:.2cqw solid var(--line)}
.stock-legend-coin{display:flex;align-items:center;gap:1.2cqw;min-width:0}.stock-legend-coin b{overflow:hidden;min-width:0;max-width:100%;font-size:4.1cqw;line-height:1.1;text-overflow:ellipsis;white-space:nowrap}
.stock-legend-icon{display:grid;place-items:center;flex:0 0 11cqw;width:11cqw;height:11cqw;border-radius:50%;background:#fff;box-shadow:0 0 0 .7cqw var(--legend-color);font-size:5cqw}
.stock-legend-row .stock-legend-icon .market-icon{display:grid;place-items:center;width:100%;height:100%;overflow:hidden;border-radius:50%;font-size:6cqw;background:#fff}
.stock-legend-icon img,.holding-icon .market-icon img{display:block;width:100%;height:100%;object-fit:contain}
.stock-legend-icon .stock-letter-icon b{font-size:3cqw}.stock-legend-icon .stock-region-mark{display:none}
.stock-legend-row :is(.stock-legend-percent,.stock-legend-value){display:block;min-width:0;width:100%;font-family:var(--font-display);font-size:4.6cqw;line-height:1.15;font-weight:900;font-style:italic;white-space:nowrap;text-align:right;color:#59626c}
.stock-allocation-legend .empty-state{font-size:3.3cqw;text-align:left}
.stock-portfolio-chart-card{position:relative;min-width:0;overflow:hidden;border:1px solid #d6e1dd;border-radius:7px;background:#fff;box-shadow:2px 2px 2px #1b1f243d,5px 8px 14px #1b1f2438}
.stock-portfolio-chart-card .coin-heading{display:flex;align-items:flex-start;justify-content:space-between;z-index:2}
.stock-portfolio-chart-card .coin-identity{display:flex;width:100%;min-width:0}.stock-portfolio-chart-card .coin-identity>div:last-child{flex:1;min-width:0}
.stock-portfolio-chart-card .coin-symbol-row{display:flex;justify-content:flex-end;width:100%;min-width:0}
.stock-portfolio-chart-card .coin-symbol{color:#14191c;font-family:'Bull Archivo','Bull Japanese Black',var(--font-ui);font-weight:900;font-style:normal;transform:skewX(-13deg);transform-origin:right center;text-align:right;white-space:nowrap}
.stock-portfolio-app-icon{display:block;flex:none;object-fit:cover;border-radius:5cqw;box-shadow:0 2px 6px #26372a20}
.stock-portfolio-chart-card .change-strip{display:flex;background:linear-gradient(90deg,#fff,#edf6fa 60%,#dcecf7)}
.stock-portfolio-chart-card #history-summary{display:block;width:100%;min-width:0;max-width:100%;margin:0;font-family:'Bull Bowlby',var(--font-display);font-style:normal;font-weight:400;font-synthesis:none;letter-spacing:0;text-align:right;white-space:nowrap;transform:skewX(-10deg);transform-origin:right center;color:#59626c;font-size:7cqw}
.stock-portfolio-chart-card #history-summary[data-tone="profit"]{color:#078b36}.stock-portfolio-chart-card #history-summary[data-tone="loss"]{color:#d51d23}
.stock-portfolio-chart-card .chart-wrap svg{display:block;width:100%;height:100%;overflow:visible}
.stock-portfolio-chart-card .history-grid{stroke:#45c8e8;stroke-width:1}.stock-portfolio-chart-card .history-line{stroke-width:2}
.stock-portfolio-chart-card .history-label{font-family:var(--font-display);font-size:11px;fill:#398b9d}
.stock-chart-empty{margin:30% 3% 0;color:#738087;font-size:3.3cqw;text-align:center;line-height:1.6}
.stock-period-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;width:100%;margin-top:8px}
.stock-period-tabs button{min-width:0;width:100%;padding:7px 3px;border:1px solid #d7e5dc;border-radius:999px;background:#f5faf7;color:#4e6257;font-size:.8rem;font-weight:900;line-height:1.2;white-space:nowrap;cursor:pointer}
.stock-period-tabs button[aria-selected="true"]{color:#fff;background:#079447;border-color:#079447}
.stock-live-status{margin:5px 0 0;color:var(--muted);font-size:.64rem;line-height:1.25;text-align:center}
.portfolio-workspace{display:block;margin-top:18px}.portfolio-workspace .holding-form{padding:0}
.holding-form .holding-form-toggle{min-height:56px;padding:16px 18px;background:#fff;color:#626970}.holding-form-toggle small{display:none}.holding-form-toggle strong{font-size:1.08rem}.holding-form-toggle i{border:0;background:none;color:#859099;font-size:1.5rem}
.holding-icon .market-icon{display:block;position:relative;overflow:hidden;width:100%;height:100%;border-radius:50%}.holding-icon .stock-letter-icon b{font-size:14px}.holding-icon .stock-region-mark{display:none}
.history-note{line-height:1.65;margin-top:18px}
html[data-theme="dark"] .stock-portfolio-chart-card{background:#151c1f;border-color:#34453d}html[data-theme="dark"] .stock-portfolio-chart-card .coin-symbol{color:#f1f5f3}html[data-theme="dark"] .stock-portfolio-chart-card .change-strip{background:linear-gradient(90deg,#151c1f,#172d3b)}
html[data-theme="dark"] .stock-legend-row :is(.stock-legend-percent,.stock-legend-value){color:#c8d4d0}
html[data-theme="dark"] .holding-form .holding-form-toggle{background:#151d22;color:#edf3f6}
.demo-balance-value.balance-flash-up{animation:stockPortfolioFlashUp .52s ease}.demo-balance-value.balance-flash-down{animation:stockPortfolioFlashDown .52s ease}
@keyframes stockPortfolioFlashUp{0%,100%{filter:none;transform:scale(1)}24%,62%{color:#20f578;filter:drop-shadow(0 0 8px #20f578e0);transform:scale(1.055)}}
@keyframes stockPortfolioFlashDown{0%,100%{filter:none;transform:scale(1)}24%,62%{color:#ff3155;filter:drop-shadow(0 0 8px #ff3155d6);transform:scale(1.055)}}
@media(min-width:681px){main{width:96%;max-width:none;padding-left:env(safe-area-inset-left,0px);padding-right:env(safe-area-inset-right,0px)}.stock-overview .stock-portfolio-chart-card{width:80%;max-width:460px}.stock-period-tabs button{min-height:56px;padding-block:16px;font-size:1.08rem;line-height:1.2}}
@media(max-width:680px){.stock-overview{padding:0 10px 8px}.stock-summary-row{gap:10px;margin-inline:-10px;margin-bottom:8px;padding:7px 10px 6px}.stock-detail-row{gap:10px}.stock-period-tabs{gap:5px}.stock-period-tabs button{font-size:.7rem;padding:7px 2px}.stock-live-status{font-size:.55rem}}
@media(prefers-reduced-motion:reduce){.stock-overview .demo-balance-value{animation:none!important}}


.stock-portfolio-chart-card .change-strip{background:var(--change-bg,linear-gradient(90deg,#fff,#edf6fa 60%,#dcecf7))}
.stock-portfolio-chart-card #history-summary{font-size:10cqw;-webkit-text-stroke:.2cqw #fff;paint-order:stroke fill}

/* Keep phone amounts prominent; only long values shrink inside a fixed white box. */
@media(max-width:680px){
 .stock-summary-row .stock-amount-panel{height:auto;min-height:78px;padding:2px 0;gap:4px}
 .stock-summary-row .stock-amount-panel>span{font-size:clamp(12px,6.5cqw,15px)}
 .stock-summary-row .stock-amount-box{height:clamp(34px,22cqw,48px);padding:2px 3cqw;font-size:clamp(20px,14cqw,30px)}
 .stock-summary-row .stock-amount-box strong{font-size:clamp(20px,14cqw,30px)}
 .stock-summary-row .stock-amount-panel small{font-size:clamp(8px,4cqw,10px);line-height:1.25}
 .stock-detail-row #history-title,.stock-detail-row #allocation-title{font-size:12px;line-height:1.2}
 .stock-mix-heading small{font-size:9px}
 .stock-legend-row{min-height:32px}
 .stock-legend-coin b{font-size:clamp(9px,5cqw,12px)}
 .stock-legend-row :is(.stock-legend-percent,.stock-legend-value){font-size:clamp(10px,5.5cqw,13px)}
 .stock-legend-icon{flex-basis:clamp(20px,11cqw,26px);width:clamp(20px,11cqw,26px);height:clamp(20px,11cqw,26px)}
}

.stock-portfolio-chart-card .coin-symbol.stock-portfolio-chart-title{display:block;width:100%;max-width:100%;min-width:0;font-size:8.2cqw;text-align:right;white-space:nowrap}

.stock-legend-coin b[data-legend-name]{display:block;flex:1 1 0;min-width:0;width:0;max-width:100%;white-space:nowrap;text-overflow:clip;overflow:hidden}
.stock-legend-coin b[data-legend-name][data-wrap="true"]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-height:2.2em;line-height:1.1;white-space:normal;overflow-wrap:anywhere;text-overflow:clip}

/* Generated shared card proportions. */
.stock-portfolio-chart-card{container-type:inline-size;aspect-ratio:360 / 384;padding:0;min-height:0;--icon-size:25cqw;--card-edit-offset:0cqw}
.stock-portfolio-chart-card .coin-heading{position:absolute;top:calc(3.333cqw + var(--card-edit-offset));left:3.333cqw;right:3.333cqw;min-height:0;height:25cqw;gap:3.889cqw}
.stock-portfolio-chart-card .coin-identity{height:100%;gap:3.889cqw;align-items:flex-start}
.stock-portfolio-chart-card .coin-identity>div:last-child{padding-top:0}
.stock-portfolio-chart-card .coin-icon-shell{width:25cqw;height:25cqw}
.stock-portfolio-chart-card .coin-symbol-row{gap:1.389cqw}
.stock-portfolio-chart-card .coin-symbol{font-size:9.444cqw;line-height:1;letter-spacing:-.035em}
.stock-portfolio-chart-card .coin-name{font-size:2.778cqw;line-height:1.2;margin-top:.833cqw}
.stock-portfolio-chart-card .currency{display:none}
.stock-portfolio-chart-card .change-strip{position:absolute;top:calc(13.333cqw + var(--card-edit-offset));left:31.111cqw;right:0;height:14.444cqw;min-height:0;margin:0;padding:.833cqw 3.333cqw;align-items:center;justify-content:flex-end}
.stock-portfolio-chart-card .change{font-size:10cqw;line-height:1;letter-spacing:-.045em;white-space:nowrap}
.stock-portfolio-chart-card .tick-arrow{left:1.111cqw;width:6.111cqw;height:7.778cqw;margin:auto 0}
.stock-portfolio-chart-card .chart-wrap{position:absolute;top:calc(30.833cqw + var(--card-edit-offset));left:3.333cqw;right:3.333cqw;height:62.222cqw;margin:0}
.stock-portfolio-chart-card .sparkline{width:100%;height:100%;aspect-ratio:auto;overflow:visible}
.stock-portfolio-chart-card .sparkline [vector-effect],
.stock-portfolio-chart-card .sparkline line,
.stock-portfolio-chart-card .sparkline path,
.stock-portfolio-chart-card .sparkline rect{vector-effect:none}
.stock-portfolio-chart-card .card-price-row{position:absolute;top:calc(93.889cqw + var(--card-edit-offset));left:3.333cqw;right:3.333cqw;height:12.222cqw;margin:0;gap:1.944cqw;align-items:center;justify-content:center;line-height:1}
.stock-portfolio-chart-card .price{font-size:10.417cqw;line-height:1;font-weight:900;letter-spacing:-.045em;white-space:nowrap}
.stock-portfolio-chart-card .card-price-row>span:empty{display:none}
