/* Round C: an optional public fast path, with the familiar terminal preserved. */
[hidden]{display:none!important;}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid var(--accent);outline-offset:3px;}
.qq-shell{max-width:1120px;margin:0 auto;padding:24px;display:grid;gap:18px;}
#viewQuote.active{overflow:auto;}
.quick-quote-view .marketbar,.quick-quote-view #walletBtn,.quick-quote-view #refreshBtn{display:none;}
.qq-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;}
.qq-heading h1{font-size:26px;margin:0 0 5px;letter-spacing:-.5px;}
.qq-heading p,.qq-meta,.qq-disclaimer,.qq-asof{color:var(--muted);font-size:13px;line-height:1.6;margin:0;}
.qq-badge{border:1px solid var(--line);border-radius:20px;padding:6px 10px;font-size:12px;color:var(--accent);}
.qq-inputs,.qq-result{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:20px;min-width:0;}
.qq-controls{display:grid;grid-template-columns:1.5fr .7fr 1fr 1.3fr;gap:12px;align-items:end;margin-top:16px;}
.qq-controls label{display:block;color:var(--muted);font-size:12px;margin-bottom:7px;}
.qq-controls input,.qq-controls select{width:100%;min-width:0;height:46px;background:var(--panel-2);color:var(--text);border:1px solid var(--line);border-radius:7px;padding:0 11px;font:inherit;}
.qq-controls input{font-size:20px;font-variant-numeric:tabular-nums;}
.qq-controls input[aria-invalid="true"]{border-color:var(--warn);}
.qq-controls select:disabled{opacity:.65;}
.qq-sides{display:flex;gap:8px;}
.qq-sides button,.qq-actions button,.qq-preset button,#qqTerminal{min-height:44px;border:1px solid var(--line);background:var(--panel-2);color:var(--text);border-radius:7px;padding:9px 14px;cursor:pointer;font:inherit;}
.qq-sides button.active{background:var(--accent);color:var(--bg);font-weight:700;border-color:var(--accent);}
.qq-hint{font-size:12px;color:var(--muted);line-height:1.5;margin:10px 0 0;}
.qq-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:14px;}
.qq-actions span{color:var(--muted);font-size:12px;}
.qq-presets{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px;}
.qq-preset{display:flex;gap:3px;max-width:100%;}
.qq-preset button{font-size:12px;white-space:normal;overflow-wrap:anywhere;}
.qq-preset button:last-child{flex-shrink:0;min-width:70px;}
.qq-freshness{padding:11px 14px;border:1px solid var(--line);border-radius:7px;font-size:13px;}
.qq-freshness.ok{color:var(--buy);}.qq-freshness.warn{color:var(--warn);}
.qq-results{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
.qq-result h2{font-size:16px;margin:0 0 10px;}
.qq-result-status{font-size:12px;color:var(--muted);margin:0 0 18px;}
.qq-totals{margin:0;display:grid;gap:5px;}
.qq-totals dt{color:var(--muted);font-size:12px;}
.qq-totals dd{font-size:25px;font-weight:700;letter-spacing:-.5px;overflow-wrap:anywhere;margin:0 0 15px;font-variant-numeric:tabular-nums;}
.qq-residual{font-size:13px;margin:0 0 8px;}
.qq-result details{margin-top:15px;border-top:1px solid var(--line);font-size:12px;line-height:1.7;}
.qq-result summary{cursor:pointer;min-height:44px;padding:12px 0;color:var(--accent);}
.qq-result ol{padding-left:19px;margin:0;}.qq-result li{padding:8px 0;overflow-wrap:anywhere;}
.qq-disclaimer{border-left:3px solid var(--accent);padding:5px 13px;}
.qq-empty{grid-column:1/-1;border:1px dashed var(--line);border-radius:12px;padding:26px;line-height:1.7;color:var(--muted);}
.qq-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);}
.terminal-toolbar{display:flex;gap:10px;align-items:center;padding:8px 12px;border-bottom:1px solid var(--line);background:var(--panel);font-size:12px;color:var(--muted);flex-wrap:wrap;}
#viewTrade.active{display:flex;flex-direction:column;}
#viewTrade .terminal{flex:1;min-height:0;height:auto;}
.terminal:not(.account-open){grid-template-areas:"chart ladder order chat";grid-template-rows:minmax(420px,1fr);}
.terminal:not(.account-open)>.area-account{display:none;}
.account-context{padding:9px 14px;color:var(--muted);font-size:12px;border-bottom:1px solid var(--line);}
.invite-help{display:inline-block;padding:8px 0;color:var(--accent);font-size:13px;}
@media(max-width:1180px){
  .terminal:not(.account-open){grid-template-areas:"chart order" "ladder order" "chat chat";grid-template-rows:560px 560px 380px;}
  .terminal.chat-collapsed:not(.account-open){grid-template-rows:560px 560px 48px;}
  .qq-controls{grid-template-columns:1fr 1fr;}
}
@media(max-width:820px){
  .workspace-tabs{overflow-x:auto;flex-wrap:nowrap;max-width:100%;}
  .workspace-tabs button,.workspace-tabs a{flex:none;white-space:nowrap;min-height:44px;}
  .topbar{max-width:100%;}.topbar>.hbtn{min-height:40px;}
  .terminal:not(.account-open){grid-template-areas:"chart" "ladder" "order" "chat";grid-template-rows:520px 520px auto 380px;}
  .terminal.chat-collapsed:not(.account-open){grid-template-rows:520px 520px auto 48px;}
  .qq-shell{padding:16px 12px;gap:12px;}.qq-heading h1{font-size:23px;}
  .qq-inputs,.qq-result{padding:16px;}.qq-results{grid-template-columns:1fr;gap:12px;}
  .qq-controls{grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:10px;}
  .qq-controls input{font-size:18px;}.qq-controls select{font-size:14px;}
  .qq-totals dd{font-size:24px;}.qq-badge{display:none;}
}
.estimate-title {font-size:15px;padding:10px 12px;border-bottom:1px solid var(--line)}
.estimate-note {text-align:left;color:var(--muted);padding:8px 12px}
.calc .selrow {display:grid;grid-template-columns:minmax(0,1fr);gap:6px}
.calc .selrow>div {display:grid;grid-template-columns:74px minmax(0,1fr);align-items:center}
.calc .selrow select {width:100%;max-width:none}
.public-segment {display:flex;gap:2px}
.public-segment button {flex:1 1 auto;background:var(--panel-2);border:1px solid var(--line-2);border-radius:4px;padding:3px 5px;min-height:32px;font:inherit}
.public-segment [aria-checked=true] {color:var(--accent);border-color:var(--accent)}
.sideswitch .buy.active,.qq-sides [data-qq-side=BUY].active {background:var(--bw3-buy-action);color:white}
.sideswitch .sell.active,.qq-sides [data-qq-side=SELL].active {background:var(--bw3-sell-action);color:white}
.qq-sides button {line-height:1.65;letter-spacing:normal;text-transform:none}
.qq-result,.qq-inputs {border-radius:0}
.qq-result:only-child {grid-column:1/-1}
.qq-results .qq-result:only-child .qq-totals {display:flex;flex-wrap:wrap;align-items:baseline;gap:8px 14px}
.qq-result:only-child .qq-totals dd {font-size:23px}
#estimateEvidence:not(:empty),#bookEvidence:not(:empty) {padding:8px 12px;font-size:13px}
.book-side {padding:3px 8px;font-size:12px;font-weight:600;background:var(--panel-2)}
.ladder-head,.ladder-mid .index-label {text-transform:none!important}
.qq-freshness[data-state=fresh],.source-chip[data-state=fresh]{color:var(--text)}
.phone-only,.phone-tabs {display:none}
.topbar {position:relative}
#researchMenu {position:absolute;top:100%;left:clamp(12px,18vw,330px);z-index:40;background:var(--panel);border:1px solid var(--line-2);padding:4px;box-shadow:0 6px 18px #0003;border-radius:6px}
#researchMenu :is(a,button) {display:flex;justify-content:space-between;gap:12px;width:100%;height:auto;min-height:34px;color:var(--text);opacity:1;padding:6px 10px;white-space:nowrap}
#researchMenu small {color:var(--muted);font-weight:400}
#returnBook {color:var(--accent);text-decoration:underline;padding:6px}
@media(min-width:1280px){
  #viewTrade .terminal.chat-collapsed {grid-template-columns:minmax(0,1fr) minmax(275px,24%) minmax(265px,22%) 42px}
  #viewTrade .terminal:not(.account-open){grid-template-rows:minmax(0,1fr)}
  .area-order {overflow-y:auto}
  .footer-bar {height:30px;min-height:30px}
}
@media(min-width:900px) and (max-width:1279px){
  body.trade-view {height:auto;overflow:auto;display:block}
  #viewTrade .terminal,#viewTrade .terminal.chat-collapsed {grid-template-columns:1fr 1fr;grid-template-areas:"chart chart" "ladder order" "account account" "chat chat";grid-template-rows:560px minmax(560px,auto) auto auto}
}
@media(max-width:899px){
  body.trade-view,body.quick-quote-view{height:auto;display:block;overflow:auto}
  .topbar {display:flex;flex-wrap:nowrap;height:52px;min-height:52px;padding:0 6px;gap:4px}
  .brand {gap:2px}.brand .pill,.brand-logo,.topbar>.hspacer {display:none}
  .topbar .workspace-tabs {order:0;display:flex;flex:1;min-width:0;width:auto;gap:0;overflow:visible;flex-wrap:nowrap}
  .topbar .workspace-tabs>button {flex:1 1 auto;width:auto;min-width:44px;height:44px;padding:0 3px}
  .shell-actions:not(.mobile-open) {display:none}
  .shell-actions.mobile-open {position:absolute;right:5px;top:100%;background:var(--panel);padding:8px;z-index:39;border:1px solid var(--line)}
  #researchMenu {left:auto;right:6px}
  #ticker {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));height:auto;gap:2px 7px;padding:5px 8px;overflow:visible}
  #ticker .tstat {min-width:0;padding:0;border:none}
  #ticker .tstat .l {font-size:11px;white-space:normal}
  #ticker .tstat .v {font-size:14px;white-space:normal}
  #ticker .hero .v {font-size:24px}
  #ticker .source-chip {order:-1;grid-column:3;grid-row:1;align-self:center;white-space:normal;text-align:right;font-size:12px}
  #ticker .hero,#ticker .change {grid-row:1}
  #ticker .hero {grid-column:1}#ticker .change{grid-column:2}
  #ticker .tstat.extreme+.tstat:not(.extreme) {grid-column:1/-1;display:flex;align-items:center;gap:8px}
  .phone-only,.phone-tabs {display:flex;align-items:center}
  .phone-tabs {background:var(--panel);border-block:1px solid var(--line)}
  .phone-tabs button {flex:1;color:var(--muted)}
  .phone-tabs [aria-selected=true]{color:var(--accent);box-shadow:inset 0 -2px var(--accent)}
  #viewTrade .terminal,#viewTrade .terminal.chat-collapsed {display:flex;flex-direction:column}
  #viewTrade[data-pane=chart] :is(.area-ladder,.area-order),#viewTrade[data-pane=book] :is(.area-chart,.area-order),#viewTrade[data-pane=quote] :is(.area-chart,.area-ladder){display:none}
  .area-chart .chart-panel {overflow:visible}.area-chart .chart-zone {min-height:220px;height:32vh;flex:none}
  .area-ladder #ladderWrap {height:max(410px,calc(100vh - 286px));height:max(410px,calc(100svh - 286px));flex:none}
  .chart-panel>.panel-head {padding:4px;gap:4px}.chart-panel>.panel-head>.panel-title,.chart-panel>.panel-head>.hspacer{display:none}
  #chartToolRail:not(.mobile-open),#chartProControls:not(.mobile-open){display:none}
  #chartToolRail.mobile-open {display:flex;flex-wrap:wrap;height:auto;z-index:8;max-height:100%;overflow:auto}
  #chartProControls.mobile-open {display:flex;flex-wrap:wrap;position:relative}
  #chartProControls .chart-menu.open {max-width:95vw;left:0;right:auto;z-index:9}
  .area-chart .rangebar {flex-wrap:wrap}
  .qq-controls {grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .qq-controls>div:nth-child(n+3) {grid-column:1/-1}
  .area-account,.area-order {min-width:0}
  .area-account {order:-1}
  .footer-links {flex-wrap:wrap}
}
@media(pointer:coarse){
  :is(header,#viewTrade,#viewQuote,footer,.modal-overlay) :is(button,a,select,input,summary,[role=button]) {min-width:44px;min-height:44px}
  .ladder-row {height:32px;min-height:32px}
  .chart-menu label {min-height:44px}
}
@media(max-width:599px){
  :is(#viewTrade,#viewQuote) {font-size:14px;line-height:20px}
  :is(#viewTrade,#viewQuote) :is(button,select,.ladder-row .p,.ladder-row .q,.ladder-row .t) {font-size:14px;line-height:20px}
  .qq-sides button {line-height:1.65}
  #ticker .hero .v {font-size:28px;line-height:32px}
}
.topbar .brand {width:auto;flex:0 0 auto}
.shell-actions .icon {width:32px;height:32px;padding:0}
.quick-quote-view .shell-actions :is(#walletBtn,#refreshBtn){display:inline-block}
#ticker .tstat {gap:0;padding:0;justify-content:center}
#ticker .tstat .l {line-height:15px}
#ticker .tstat .v {line-height:20px}
#ticker .hero .v {line-height:24px}
.sideswitch button.buy.active {background:var(--bw3-buy-action);color:#fff}
.sideswitch button.sell.active {background:var(--bw3-sell-action);color:#fff}
body.trade-view .footer-dot,body.quick-quote-view .footer-dot {color:var(--muted)}
body[data-theme=light] :is(.area-order,#publicBook) .vbadge.binance {color:#725100;background:#fff1c4}
body[data-theme=light] :is(.area-order,#publicBook) .vbadge.bybit {color:#204e87;background:#dfebfa}
.book-side.ask {position:sticky;top:0;z-index:2}
.calc .area-exec {flex:1 0 100px;min-height:100px}
body[data-market-state=loading] #ticker .tstat .v {color:transparent;background:var(--panel-2);border-radius:2px;min-width:3.5em}
body[data-market-state=loading] :is(#ladderWrap,.chart-zone) {background:repeating-linear-gradient(0deg,var(--panel) 0 10px,var(--panel-2) 11px 22px)}
@media(max-width:899px){
  .topbar .brand {max-width:46px}
  #ticker .tstat {align-items:flex-start}
  #ticker .tstat.extreme+.tstat:not(.extreme) {flex-direction:row;justify-content:flex-start;align-items:center}
  #ticker .source-chip {margin:0}
  #ticker .hero .v {line-height:32px}
  #researchMenu [role=menuitem] {white-space:normal}
  .chart-panel .rangebar {min-width:0}
  #inviteGateOverlay .modal-box {max-width:calc(100vw - 16px);padding:12px}
}
#accountReturnBook {color:var(--accent);padding:6px}
.snapshot-caption {font-size:12px;color:var(--bw3-warn-text)}
#publicBook .ladder-head {line-height:16px}
.quick-quote-view #ticker {display:none}
#inviteGateSubmit {background:#1558a9;color:#fff;border-color:#1558a9}

/* Public chart toolbar and expandable evidence. */
.stroke-icon {display:inline-block;width:16px;height:16px;vertical-align:middle;flex:none}
#researchMenu small .stroke-icon,#researchLock .stroke-icon {width:13px;height:13px}
.chart-panel .panel-head:first-child {padding:4px 6px;gap:5px;flex-wrap:nowrap;position:relative;z-index:6}
#chartTitle {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.chart-panel .tabset,.chart-panel .chart-pro {gap:2px}
.chart-panel .tabset button,.chart-panel [data-chart-menu-button] {height:32px;line-height:16px;padding:0 7px;white-space:nowrap}
#chartProControls {margin-left:auto}
.chart-panel [data-chart-menu-button] .stroke-icon {display:none}
#chartAsOf:not([hidden]) {position:absolute;top:100%;right:4px;background:var(--panel);padding:2px 4px}
.chart-readout {display:flex;align-items:center;flex-wrap:wrap;gap:2px 8px;padding:3px 8px;border-block:1px solid var(--line)}
.chart-readout .lw-legend {padding:0;gap:3px 8px;line-height:16px}
.chart-status-buttons {display:flex;align-items:center;flex-wrap:wrap;gap:3px}
.chart-status-buttons button,.chart-bottom-bar button {color:var(--muted);font-size:12px;line-height:16px;padding:4px 6px;border-radius:4px}
.chart-status-buttons button:hover,.chart-bottom-bar button:hover {background:var(--panel-2);color:var(--text)}
#chartGapButton {color:var(--bw3-warn-text)}
.chart-notes {margin:auto;max-width:min(550px,95vw);max-height:65vh;overflow:auto;padding:14px 18px;border:1px solid var(--line-2);background:var(--panel);color:var(--text);border-radius:6px;line-height:1.5;box-shadow:0 6px 22px #0004}
.chart-notes .legend {padding:4px 0;gap:8px}
.chart-panel .chart-insight-strip.is-signal-hidden.is-annotation-hidden {display:none}
.chart-insight-strip.is-signal-hidden,.chart-insight-strip.is-annotation-hidden {grid-template-columns:minmax(0,1fr)}
.chart-bottom-bar {display:flex;align-items:center;flex-wrap:wrap;gap:3px;padding:3px 6px;border-top:1px solid var(--line)}
.chart-bottom-bar .rangebar {border:0;margin:0;padding:0;gap:0;display:flex;align-items:center}
.chart-bottom-tools {display:flex;align-items:center;color:var(--muted);gap:2px}
.chart-bottom-tools>span {padding:0 4px;font-size:11px}
.chart-bottom-bar .history-range-label {line-height:16px}
.chart-panel .chart-zone {min-height:0}
.chart-toolrail button {padding:0}
#chartToolRail {flex-direction:column;left:4px;top:6px;gap:3px;max-width:none}
.chart-menu.open {max-height: min(60vh,460px);overflow:auto}
#chartProControls [data-chart-menu-button] {display:inline-flex;align-items:center;justify-content:center;gap:2px}
@container (max-width:800px) {
  #chartProControls [data-chart-menu-button] .stroke-icon {display:inline}
  #chartProControls [data-chart-menu-button] .menu-label {display:none}
  #chartProControls [data-chart-menu-button] {min-width:32px;padding:0 5px}
}
@media (min-width:900px) {
  #publicChart .chart-zone {padding-left:39px}
  .chart-panel .chart-bottom-bar {flex-wrap:nowrap}
}
@media (min-width:900px) and (pointer:fine) {
  #publicBook {line-height:16px}
  #publicBook .book-head {padding:3px 9px;min-height:38px}
  #publicBook .book-tools button {height:28px;min-height:0}
  #publicBook .ladder-head {padding:2px 10px;line-height:16px;min-height:22px}
  #publicBook .ladder-row {height:24px;min-height:24px;align-items:center;padding-block:0}
  #publicBook .vbadge,.order-panel .vbadge {line-height:14px;height:16px;padding:1px 4px;font-size:10px}
  #publicBook .book-side {padding:0 10px;line-height:16px}
  #publicBook .ladder-mid {padding:2px 10px;min-height:22px;line-height:16px}
  #publicBook .ladder-recenter {line-height:16px;padding:0 4px}
  #publicBook .ladder-depth {height:16px}
  #publicBook .ladder-foot {padding:2px 10px;gap:0}
  #publicBook .ladder-foot-row button {line-height:16px;padding:0}
  .order-panel {line-height:16px}
  .estimate-title {padding:7px 12px;line-height:18px}
  .order-panel .calc-body {padding:8px 12px;gap:6px}
  .order-panel .flabel {line-height:16px;margin-bottom:2px}
  .order-panel .sideswitch {padding:0}
  .order-panel .sideswitch button,.order-panel .public-segment button,.order-panel select,.order-panel .chips button {min-height:32px;height:32px;padding-block:0;line-height:16px}
  .order-panel .amt-wrap {height:36px}
  .order-panel .amt-wrap input {min-height:0;height:32px}
  .order-panel .chips {margin-top:3px}
  .order-panel .selrow {gap:3px}
  .order-panel .quote {gap:3px;padding:6px 12px}
  .order-panel .quote-rate .v {line-height:28px}
  .order-panel .qrow {line-height:18px}
  .order-panel .plan-head {padding:3px 12px;min-height:32px}
  .order-panel .plan-body {padding:3px 12px}
  .order-panel .plan-row {height:22px;padding:0;line-height:16px}
  .order-panel .plan-more {padding:0;line-height:18px}
  .order-panel .estimate-note {line-height:16px;padding:3px 12px}
}
@media (max-width:899px),(pointer:coarse) {
  #publicBook .ladder-row {height:32px;min-height:32px;align-items:center;padding-block:0}
}
.qq-sides button span {white-space:nowrap}
.qq-result .qq-totals,.qq-result:only-child .qq-totals {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(140px,100%),1fr));gap:8px 16px;align-items:start}
.qq-totals dd {line-height:1.35;margin-bottom:8px}
.phone-ticker-extra,.phone-ticker-summary {display:none}
@media (max-width:899px) {
  .chart-panel .panel-head:first-child {flex-wrap:wrap}
  #chartProControls.mobile-open {flex-basis:100%;margin:0}
  #chartProControls.mobile-open [data-chart-menu-button] .menu-label {display:inline}
  #chartProControls.mobile-open [data-chart-menu-button] .stroke-icon {display:none}
  #chartToolRail.mobile-open {flex-direction:row;max-width:100%}
  .chart-panel .chart-zone {min-height:220px}
  #ticker {display:grid;height:76px;min-height:76px;padding:0 8px;gap:0 4px;grid-template-columns:minmax(64px,1fr) auto minmax(68px,1fr) 44px;grid-template-rows:40px 36px}
  #ticker .tstat.extreme+.tstat:not(.extreme),#ticker .tstat:not(.hero):not(.change) {display:none}
  #ticker .hero {grid-area:1/1}.marketbar .hero .l {font-size:10px}
  #ticker .hero .v {font-size:20px;line-height:22px}
  #ticker .change {grid-area:1/2;align-self:start;min-height:44px}
  #ticker .change .v {white-space:nowrap}
  #ticker #marketChip {grid-area:1/3/2/5;align-self:center;justify-self:end;white-space:nowrap;font-size:11px}
  #ticker .phone-ticker-summary {display:block;grid-area:2/1/3/4;align-self:center;font-size:12px;line-height:16px;white-space:nowrap}
  #ticker .phone-ticker-extra {display:block;grid-area:2/4;align-self:end;width:44px;height:44px;font-size:16px}
}
.quick-quote-view #ticker {display:none}
