#dh-metrics{border:1px solid var(--t-border);border-radius:4px;background:var(--t-chart-bg,var(--t-panel));padding:8px;min-width:0;position:relative;color:var(--t-text)}
#dh-metrics .dh-metric-heading{display:flex;align-items:center;justify-content:space-between;font-size:11px;gap:5px}#dh-metrics .dh-metric-heading button{border:1px solid var(--t-border);border-radius:50%;background:transparent;color:inherit;width:22px;height:22px;padding:0;cursor:pointer}#dh-metrics time{display:block;color:var(--t-muted);font-size:10px;margin:4px 0}.dh-metric-plot svg{display:block;width:100%;height:auto;min-height:145px}.dh-metric-help{position:absolute;right:0;top:35px;width:min(420px,80vw);padding:12px;background:var(--t-panel);border:1px solid var(--t-border);border-radius:5px;box-shadow:0 8px 30px #0003;z-index:80;font-size:11px;line-height:1.6}.dh-metric-help[hidden]{display:none}.dh-metric-help p{margin:0 0 8px}.dh-source-read{white-space:pre-line}#dynamic-hedge>.dh-read{display:none!important}#dh-metrics #dealer-trend-summary{margin:8px 0 0!important;padding:8px 0 0!important;border-width:1px 0 0!important;font-size:11px!important}
#p-gx.dashboard-gamma-replay>.chartwrap{display:none!important}#p-gx.dashboard-gamma-replay>.ph{display:none!important}#dashboard-gamma-history{min-width:0;width:100%;height:100%;display:flex;align-items:center}#dashboard-gamma-history[hidden]{display:none}#dashboard-gamma-history svg{display:block;width:100%;height:100%}.dashboard-missing{padding:24px;color:var(--t-muted);font-size:12px}
@media(min-width:851px){
 html body.terminal-site #terminal.t-replay-dashboard{--dash-price:clamp(260px,42vh,520px);--dash-pressure:clamp(200px,22vh,280px)}
 html body.terminal-site #terminal.t-replay-dashboard #chartPanel svg.bf-pg-svg:not(.app-chart-expanded){height:calc(var(--dash-price) - 54px)!important}
 html body.terminal-site #terminal.t-replay-dashboard #chartWrap{min-height:0!important;height:var(--dash-price)!important;overflow:visible!important}
 html body.terminal-site #terminal.t-replay-dashboard #p-gx{height:var(--dash-price)!important;overflow:visible!important}
 html body.terminal-site #terminal.t-replay-dashboard #p-gx canvas:not(.app-chart-expanded){height:calc(var(--dash-price) - 30px)!important}
 html body.terminal-site #terminal.t-replay-dashboard #p-gx .ph{height:28px!important;min-height:28px!important;overflow:hidden;display:flex!important;flex-wrap:nowrap!important}
 html body.terminal-site #terminal.t-replay-dashboard #p-gx.dashboard-gamma-replay .ph{display:none!important}
 html body.terminal-site #terminal.t-replay-dashboard #p-gx .ph h3{white-space:nowrap}html body.terminal-site #terminal.t-replay-dashboard #p-gx .ph>.sp{max-width:75%;overflow:auto;scrollbar-width:none}
 html body.terminal-site #terminal.t-replay-dashboard #bfReplay-price{padding:3px 6px!important;min-height:32px!important;margin:0!important}
 html body.terminal-site #terminal.t-replay-dashboard[data-area="direction"][data-dealer-hedge="true"] #dynamic-hedge{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(170px,27%);gap:3px 6px;padding:4px!important;margin:0!important;border-radius:0!important}
 html body.terminal-site #terminal.t-replay-dashboard #dynamic-hedge>.ph{grid-column:1;grid-row:1;min-height:20px!important;padding:0 4px!important}
 html body.terminal-site #terminal.t-replay-dashboard #dynamic-hedge>.dh-tools{grid-column:1;grid-row:2;margin:0 3px!important;padding:0!important;min-height:26px}
 html body.terminal-site #terminal.t-replay-dashboard #dynamic-hedge>.dh-pressure{grid-column:1;grid-row:3;min-width:0}
 html body.terminal-site #terminal.t-replay-dashboard #dynamic-hedge :is(#cvPress,#cvPressX):not(.app-chart-expanded){height:var(--dash-pressure)!important}
 html body.terminal-site #terminal.t-replay-dashboard #dh-metrics{grid-column:2;grid-row:1/4;align-self:stretch;display:flex;flex-direction:column;justify-content:center}
 html body.terminal-site #terminal.t-replay-dashboard #dynamic-hedge>details{grid-column:1/-1;margin:2px 4px!important;font-size:10px}
 html body.terminal-site #terminal.t-replay-dashboard .dh-history{margin:2px 0!important;font-size:9px}
 html body.terminal-site #terminal.t-replay-dashboard .dh-history svg{height:32px!important}
 html body.terminal-site #terminal.t-replay-dashboard .dh-flow-detail .dh-head{display:inline-flex;margin:2px 0!important;font-size:10px}
 html body.terminal-site #terminal.t-replay-dashboard .dh-flow,.dh-status{font-size:10px}
 html body.terminal-site #terminal.t-replay-dashboard .dh-flow-detail .dh-flow{margin:2px 0!important}
 html body.terminal-site #terminal.t-replay-dashboard .dh-flow-detail .dh-strength-note{display:none}
 html body.terminal-site #terminal.t-replay-dashboard #overview-indicators>section{min-height:0!important}
 html body.terminal-site #terminal.t-replay-dashboard #overview-indicators .desktop-chart-values{font-size:10px;padding:0 8px}
}
@media(max-width:850px){#dh-metrics{margin:8px 10px}.dh-metric-plot svg{max-height:190px}#dynamic-hedge{display:flex!important;flex-direction:column}#dynamic-hedge>.ph{order:0}#dynamic-hedge>.dh-tools{order:1}#dynamic-hedge>.dh-pressure{order:2}#dh-metrics{order:3}#dynamic-hedge>details{order:4}}

@media(min-width:851px){
 html body.terminal-site #terminal.t-replay-dashboard #bfPxMain{min-height:0!important;height:var(--dash-price)!important}
 html body.terminal-site #terminal.t-replay-dashboard #bfPxMain .bf-pg-toolbar{flex-wrap:nowrap!important}
 html body.terminal-site #terminal.t-replay-dashboard #dh-metrics .dh-metric-plot{flex:1;display:flex;align-items:center}
 html body.terminal-site #terminal.t-replay-dashboard #dh-metrics .dh-metric-plot svg{height:180px!important;min-height:0!important}
}

@media(min-width:851px){
 html body.terminal-site #terminal.t-replay-dashboard #bfPxMain .bf-vg-per{height:36px!important;min-height:36px!important;max-height:36px!important;flex-wrap:nowrap!important;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;gap:1px!important}
 html body.terminal-site #terminal.t-replay-dashboard #bfPxMain .bf-vg-per button{font-size:10px!important;padding:3px 4px!important;min-width:0!important;flex-shrink:0}
 html body.terminal-site #terminal.t-replay-dashboard #chartPanel svg.bf-pg-svg:not(.app-chart-expanded){height:calc(var(--dash-price) - 42px)!important}
}

html body.terminal-site #terminal.t-replay-dashboard .presswrap.app-chart-expanded :is(#cvPress,#cvPressX){height:calc(100vh - 84px)!important}

#terminal.t-replay-dashboard :is(#chartWrap,#p-gx) .rowsplit{height:16px!important;min-height:16px;cursor:ns-resize;touch-action:none;position:relative;z-index:12;margin-top:-5px}
#terminal.t-replay-dashboard .rowsplit i{display:block;width:64px!important;height:5px!important;border-radius:3px;background:var(--t-muted);opacity:.6;margin:auto}
#terminal.t-replay-dashboard .rowsplit:hover i,#terminal.t-replay-dashboard .rowsplit.drag i{opacity:1;background:var(--t-accent)}
body.dashboard-resizing,body.dashboard-resizing *{cursor:ns-resize!important;user-select:none!important}

@media(min-width:851px){
 html body.terminal-site #terminal.t-replay-dashboard .dh-bottom{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;border-top:1px solid var(--t-border);padding-top:4px}
 html body.terminal-site #terminal.t-replay-dashboard .dh-bottom>details{min-width:0;margin:0!important;font-size:10px}
 html body.terminal-site #terminal.t-replay-dashboard .dh-bottom .dh-head{display:flex;gap:4px;margin:2px 0!important}
 html body.terminal-site #terminal.t-replay-dashboard .dh-bottom table{font-size:9px!important;table-layout:fixed}
 html body.terminal-site #terminal.t-replay-dashboard .dh-bottom th,html body.terminal-site #terminal.t-replay-dashboard .dh-bottom td{padding:2px 1px;white-space:normal;overflow-wrap:anywhere}
 html body.terminal-site #terminal.t-replay-dashboard .dh-bottom .dh-strength{white-space:normal}
 html body.terminal-site #terminal.t-replay-dashboard .dh-bottom .dh-status{display:block;margin:3px 0!important;font-size:9px}
 html body.terminal-site #terminal.t-replay-dashboard .dh-bottom .dh-history{gap:4px}
}
@media(max-width:850px){#dynamic-hedge>.dh-bottom{order:4;min-width:0}}

@media(min-width:851px){html body.terminal-site #terminal.t-replay-dashboard #overview-indicators{height:var(--dash-study-height,calc(100dvh - 148px))!important;min-height:0!important;max-height:none!important;grid-template-rows:repeat(3,minmax(0,1fr))!important}html body.terminal-site #terminal.t-replay-dashboard #overview-indicators>section{height:auto!important}}

@media(min-width:851px){
 html body.terminal-site #terminal.t-replay-dashboard .dh-bottom{min-height:158px;align-items:stretch;padding-top:7px}
 html body.terminal-site #terminal.t-replay-dashboard .dh-bottom .dh-history svg{height:88px!important;max-height:none!important}
 html body.terminal-site #terminal.t-replay-dashboard .dh-bottom .dh-history{margin-top:7px!important}
 html body.terminal-site #terminal.t-replay-dashboard .dh-bottom .dh-flow-detail{padding:0 8px}
}

@media(min-width:851px){
 html body.terminal-site #terminal.t-replay-dashboard[data-area="direction"][data-dealer-hedge="true"] #dynamic-hedge{grid-template-columns:auto minmax(0,1fr) minmax(170px,27%)}
 html body.terminal-site #terminal.t-replay-dashboard #dynamic-hedge>.ph{grid-column:1;grid-row:1;align-self:center;white-space:nowrap;border-bottom:0!important}
 html body.terminal-site #terminal.t-replay-dashboard #dynamic-hedge>.dh-tools{grid-column:2;grid-row:1;align-self:center;margin:0!important;min-width:0}
 html body.terminal-site #terminal.t-replay-dashboard #dynamic-hedge>.dh-tools #pressSeg{flex-wrap:nowrap;gap:1px}
 html body.terminal-site #terminal.t-replay-dashboard #dynamic-hedge>.dh-tools button{padding:3px 5px!important;font-size:10px!important;min-height:26px!important}
 html body.terminal-site #terminal.t-replay-dashboard #dynamic-hedge>.dh-pressure{grid-column:1/3;grid-row:2}
 html body.terminal-site #terminal.t-replay-dashboard #dh-metrics{grid-column:3;grid-row:1/3}
}

@media(min-width:851px){
 html body.terminal-site #terminal.t-replay-dashboard #chartWrap#chartWrap{height:var(--dash-price)!important;min-height:0!important;align-self:start;contain:size}
 html body.terminal-site #terminal.t-replay-dashboard #bfPxMain:not(.app-chart-expanded){height:100%!important;box-sizing:border-box}
 html body.terminal-site #terminal.t-replay-dashboard #bfPxMain#bfPxMain:not(.app-chart-expanded) svg.bf-pg-svg{height:var(--price-fill-height,calc(var(--dash-price) - 42px))!important;max-height:none!important}
}

/* Keep Gamma state indicators in chart chrome, outside plot labels. */
#terminal #dynamic-hedge .dh-tools .dh-state-lamp{display:inline-flex;align-items:center;gap:6px;flex:none;margin-left:auto;padding:5px 8px;border:1px solid var(--t-border);border-radius:12px;background:var(--t-panel)}
#terminal #dynamic-hedge .dh-tools .dh-state-lamp[hidden]{display:none!important}
#terminal #dynamic-hedge .dh-state-lamp i{width:9px;height:9px;border-radius:50%;background:var(--t-muted);opacity:.18}
#terminal #dynamic-hedge .dh-state-lamp i.active{opacity:1}
#terminal #dynamic-hedge .dh-state-lamp i:nth-child(1).active{background:#e05561}
#terminal #dynamic-hedge .dh-state-lamp i:nth-child(2).active{background:#e8a33d}
#terminal #dynamic-hedge .dh-state-lamp i:nth-child(3).active{background:#37b26a}
