/* Shared native typography. Keep virtual row heights and reserved chart sizes intact. */
:root{--stockap-font:-apple-system,system-ui,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif}
body,body>header.site-header,button,input,select,textarea,table,.watch table{font-family:var(--stockap-font)!important}
body{font-size:14px;-webkit-font-smoothing:antialiased}
pre,code,kbd,samp{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}
table,.price,.quote,.scroll-price,.change,[data-quote]{font-variant-numeric:tabular-nums}
.watch table{font-size:12px}
.article-prose{font-size:16px;line-height:1.65;overflow-wrap:break-word}
@media(max-width:760px){input[type=search],input[type=text],input[type=email],input[type=password],textarea{font-size:16px}}
/* Mobile Terminal detail is an overlay; keep it above the shared header. */
@media(max-width:850px){body:has(.workspace) aside.open{z-index:1200;top:max(12px,env(safe-area-inset-top))}}
/* Keep first paint and hydrated/live geometry identical. */
body>header.site-header:not(:has(.home-search,.global-search-inline))::before{content:"";grid-column:1/-1;grid-row:2;height:44px}
body>header.site-header>#symbolForm{display:none}
@media(min-width:1100px){body>header.site-header:not(:has(.home-search,.global-search-inline))::before{grid-column:2;grid-row:1}}
#btcJson{height:180px;overflow:auto;margin-top:11px;line-height:19px}
#btcStatus{display:inline-block;width:100px;min-height:27px;text-align:center;flex:none}
#btcPrice{min-height:44px;line-height:44px}
.hero-console .btc-meta{min-height:18px}
.tabs #count{display:inline-block;width:130px;flex:0 0 130px;white-space:nowrap}
.tabs .connection #status{display:inline-block;width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.stocks-page:not(.chart-workspace) .stock-chart-header{min-height:84px}
.stocks-page:not(.chart-workspace) .compact-quote{width:400px;max-width:100%;min-height:58px}
.stocks-page:not(.chart-workspace) #chart{min-height:390px}
.crypto-ranking-nav{display:grid!important;grid-template-columns:90px minmax(0,1fr) 70px;min-height:44px}
.crypto-ranking-nav span{min-width:0;line-height:18px}
@media(max-width:760px){
 .stocks-page:not(.chart-workspace) .stock-chart-header{flex-wrap:wrap;min-height:140px;align-content:flex-start}
 .stocks-page:not(.chart-workspace) .compact-quote{width:100%;height:60px;display:flex;flex-wrap:wrap;gap:4px 10px;align-content:center}
 .stocks-page:not(.chart-workspace) .stock-title{width:100%}
 .stocks-page:not(.chart-workspace) .stock-price-line{height:28px}
 .stocks-page:not(.chart-workspace) #chartControls{min-height:32px;max-width:100%;overflow-x:auto}
 .crypto-ranking-nav{min-height:76px}
 .crypto-ranking-nav span{font-size:11px}
}
.stocks-page:not(.chart-workspace) .stock-title{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:2px!important;min-height:60px}
.stocks-page:not(.chart-workspace) .stock-title h1{line-height:24px;margin:0}
.stocks-page:not(.chart-workspace) #companyName{min-height:33px;line-height:16.5px!important}
@media(max-width:760px){
 .stocks-page:not(.chart-workspace) .compact-quote{height:94px;flex-direction:column;align-items:flex-start;flex-wrap:nowrap;justify-content:flex-start}
 .stocks-page:not(.chart-workspace) .stock-chart-header{min-height:166px}
}
html[data-chart-market=crypto] .detail-main:not(:has(>.crypto-ranking-nav))::before{content:"";display:block;height:44px}
@media(max-width:760px){html[data-chart-market=crypto] .detail-main:not(:has(>.crypto-ranking-nav))::before{height:76px}}
@media(max-width:850px){.tabs .connection{min-width:0;max-width:100%}.tabs .connection #status{width:0;min-width:0;flex:1 1 0}.tabs #count{max-width:100%;line-height:21px;height:21px}}
/* Mobile controls occupy their final row even before chart modules arrive. */
@media(max-width:760px){
 .stocks-page:not(.chart-workspace) #chartControls{flex:0 0 100%;width:100%;height:32px}
 .stocks-page:not(.chart-workspace) .stock-header-actions{flex:0 0 100%;justify-content:flex-start}
}
