/* Blackbook /trade Centerpiece Layout, Decision Rail, Overlay Toggles & Cookie Context Styles */
body[data-page="trade"] {
  background: #0e100f;
  color: #f3f0e8;
  font-family: "Instrument Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Collapse cluttered redundant nav strips on desktop /trade while preserving functionality */
.tr-quicknav { display: none !important; }
body[data-page="trade"] #flowOverview:empty,
body[data-page="trade"] #pageDetails:empty { display: none; }

.bb-trade-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 10px 16px 24px;
  box-sizing: border-box;
}

/* Single crisp Market Strip directly above chart */
.bb-instrument-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 10px 14px;
  margin-bottom: 10px;
  background: #141716;
  border: 1px solid #262b29;
  border-radius: 8px;
}

.bb-inst-left,
.bb-inst-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.bb-inst-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #f3f0e8;
  letter-spacing: -0.02em;
}

.bb-contract-seg {
  display: inline-flex;
  padding: 2px;
  background: #0e100f;
  border: 1px solid #2d3330;
  border-radius: 6px;
  gap: 2px;
}

.bb-contract-seg button {
  min-height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #8f9691;
  font: 500 12px/1 "Instrument Sans", sans-serif;
  cursor: pointer;
}

.bb-contract-seg button[aria-pressed="true"] {
  background: #222725;
  color: #f3f0e8;
  box-shadow: inset 0 0 0 1px #373f3b;
}

.bb-price-hero {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: "Geist Mono Variable", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 20px;
  font-weight: 600;
  color: #f3f0e8;
}

.bb-price-hero small {
  font-size: 11px;
  font-weight: 500;
  color: #8f9691;
}

/* Individual Overlay Toggle Strip */
.bb-overlay-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 12px;
  margin-bottom: 10px;
  background: #141716;
  border: 1px solid #262b29;
  border-radius: 8px;
}

.bb-overlay-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.bb-overlay-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #838a85;
  margin-right: 4px;
}

.bb-ov-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 3px 10px;
  border: 1px solid #2c3330;
  border-radius: 6px;
  background: #0e100f;
  color: #838a85;
  font: 500 12px/1.2 "Instrument Sans", sans-serif;
  cursor: pointer;
  white-space: nowrap;
}

.bb-ov-btn[aria-pressed="true"] {
  background: #1d2220;
  border-color: #3f4a45;
  color: #f3f0e8;
}

.bb-ov-btn[aria-pressed="true"][data-tone="mint"] {
  border-color: rgba(78, 207, 161, 0.45);
  color: #4ecfa1;
}

.bb-ov-btn[aria-pressed="true"][data-tone="wait"] {
  border-color: rgba(220, 166, 83, 0.45);
  color: #dca653;
}

.bb-ov-btn[aria-pressed="true"][data-tone="cyan"] {
  border-color: rgba(98, 168, 229, 0.45);
  color: #7cc2f8;
}

/* Primary 2-column Centerpiece Grid */
.bb-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 388px;
  gap: 12px;
  align-items: start;
}

.bb-chart-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bb-chart-stage {
  background: #141716;
  border: 1px solid #262b29;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bb-chart-stage #member-canvas,
.bb-chart-stage .member-canvas {
  height: min(64vh, 580px) !important;
  min-height: 440px !important;
  width: 100%;
}

/* Beside-Chart Decision Rail */
.bb-rail {
  background: #141716;
  border: 1px solid #262b29;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.bb-rail-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid #262b29;
  background: #101312;
}

.bb-rail-tab {
  min-height: 40px;
  padding: 6px 4px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #8f9691;
  font: 600 12px/1.2 "Instrument Sans", sans-serif;
  cursor: pointer;
  white-space: nowrap;
}

.bb-rail-tab[aria-selected="true"] {
  color: #4ecfa1;
  border-bottom-color: #4ecfa1;
  background: #141716;
}

.bb-rail-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bb-verdict-box {
  padding: 12px;
  background: #1a1e1c;
  border: 1px solid #2d3330;
  border-left: 3px solid #838a85;
  border-radius: 6px;
}

.bb-verdict-box[data-verdict="WAIT"] { border-left-color: #dca653; }
.bb-verdict-box[data-verdict="LONG"] { border-left-color: #4ecfa1; }
.bb-verdict-box[data-verdict="SHORT"] { border-left-color: #e56962; }
.bb-verdict-box[data-verdict="STALE"],
.bb-verdict-box[data-verdict="UNAVAILABLE"] { border-left-color: #6b726e; }

.bb-verdict-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.bb-verdict-word {
  font: 650 14px/1.25 "Geist Mono Variable", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  color: #f3f0e8;
}

.bb-q-block {
  border-top: 1px solid #242927;
  padding-top: 10px;
}

.bb-q-title {
  margin: 0 0 6px;
  font: 600 11px/1.3 "Instrument Sans", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #838a85;
}

.bb-copy {
  margin: 0;
  font-size: 13px;
  line-height: 1.48;
  color: #d4d8d2;
}

.bb-quiet-meta {
  margin: 4px 0 0;
  font-size: 11.5px;
  line-height: 1.4;
  color: #838a85;
  font-family: "Geist Mono Variable", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

/* Separated Gate Checks + Horizontal Progress Bar (NEVER like a chart candle) */
.bb-gate-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.bb-gate-row {
  padding: 9px 10px;
  background: #101312;
  border: 1px solid #242927;
  border-radius: 6px;
}

.bb-gate-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #f3f0e8;
}

.bb-progress-track {
  display: flex;
  gap: 2px;
  height: 6px;
  margin-top: 7px;
  width: 100%;
  background: #1f2422;
  border-radius: 3px;
  overflow: hidden;
}

.bb-progress-fill {
  height: 100%;
  background: #dca653;
  border-radius: 3px;
  transition: width 0.2s ease;
}

.bb-progress-fill[data-met="true"] {
  background: #4ecfa1;
}

/* Key-Value Tabular Ladder */
.bb-kv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.bb-kv-table td {
  padding: 5px 0;
  border-bottom: 1px solid #1f2422;
}

.bb-kv-table tr:last-child td { border-bottom: 0; }
.bb-kv-table td:first-child { color: #9fa6a0; }
.bb-kv-table td:last-child {
  text-align: right;
  font-family: "Geist Mono Variable", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  color: #f3f0e8;
  font-weight: 600;
}

/* Action Row & Inputs inside Rail */
.bb-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bb-btn-mint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 6px;
  background: #4ecfa1;
  color: #091510;
  font: 600 12.5px/1 "Instrument Sans", sans-serif;
  cursor: pointer;
  text-decoration: none;
}

.bb-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #2f3734;
  border-radius: 6px;
  background: #1a1e1c;
  color: #f3f0e8;
  font: 500 12.5px/1 "Instrument Sans", sans-serif;
  cursor: pointer;
  text-decoration: none;
}

.bb-btn-ghost[aria-pressed="true"] {
  border-color: rgba(78, 207, 161, 0.5);
  background: rgba(78, 207, 161, 0.12);
  color: #4ecfa1;
}

/* Plan Stepper & Form inside Rail */
.bb-stepper {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.bb-step-pill {
  text-align: center;
  padding: 5px 2px;
  border-radius: 4px;
  background: #101312;
  border: 1px solid #262b29;
  color: #7e8580;
  font: 600 10.5px/1.2 "Instrument Sans", sans-serif;
}

.bb-step-pill[data-active="true"] {
  border-color: rgba(78, 207, 161, 0.5);
  background: rgba(78, 207, 161, 0.12);
  color: #4ecfa1;
}

.bb-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.bb-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  color: #9fa6a0;
}

.bb-field.full { grid-column: 1 / -1; }

.bb-field input,
.bb-field select,
.bb-field textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 36px;
  padding: 6px 9px;
  border-radius: 6px;
  border: 1px solid #2f3734;
  background: #0e100f;
  color: #f3f0e8;
  font: 500 13px/1.3 "Geist Mono Variable", ui-monospace, monospace;
}

.bb-field textarea {
  font-family: "Instrument Sans", sans-serif;
  min-height: 58px;
  resize: vertical;
}

/* Cookie contextual Q&A */
.bb-cookie-answer {
  padding: 11px 12px;
  background: #101312;
  border: 1px solid #2c3330;
  border-left: 3px solid #4ecfa1;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: #e6e3db;
}

/* Divergence Ball Inspector & clickable rows */
.bb-ball-list {
  display: grid;
  gap: 6px;
}

.bb-ball-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #262b29;
  background: #101312;
  color: #f3f0e8;
  font: 500 12px/1.3 "Geist Mono Variable", ui-monospace, monospace;
  cursor: pointer;
  text-align: left;
}

.bb-ball-row[aria-current="true"] {
  border-color: rgba(78, 207, 161, 0.5);
  background: #19211d;
}

/* Fix mobile toolbar button wrap in OpenAlgo widget ("Indicators" wrapping as Indicator/s) */
#member-canvas button,
#chart button,
#public-chart button {
  white-space: nowrap;
}

/* Owner, Member & Public /trade responsive layout overrides (prevent member-trade.css & public-chart.css absolute/flex fights) */
body.public-trade {
  display: block !important;
  height: auto !important;
  min-height: 100dvh;
}

body.public-trade .bb-masthead {
  flex: none;
  position: relative;
  z-index: 25;
  height: auto !important;
}

body.public-trade #charts.bb-workspace-grid,
body.member-trade[data-page="trade"] #charts.bb-workspace-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 388px !important;
  gap: 12px;
  align-items: start;
  position: relative !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  overflow: visible !important;
  flex: none !important;
}

body.member-trade[data-page="trade"] .bb-trade-shell,
body.public-trade .bb-trade-shell {
  width: 100%;
  position: relative;
  z-index: 1;
}

body.member-trade[data-page="trade"] .bb-chart-stage,
body.public-trade .bb-chart-stage {
  height: min(64vh, 560px) !important;
  min-height: 440px !important;
  display: flex;
  flex-direction: column;
}

body.member-trade[data-page="trade"] .member-plot {
  position: relative !important;
  flex: 1 1 auto !important;
  min-height: 440px !important;
  height: 100% !important;
  width: 100% !important;
}

body.member-trade[data-page="trade"] #member-canvas,
body.public-trade #public-chart {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 440px !important;
}

body.member-trade[data-page="trade"] .tr-toolbar {
  flex-wrap: wrap !important;
  margin: 0 !important;
  padding: 8px 12px !important;
  gap: 6px 10px !important;
}

/* Owner desktop adjustments so chart + decision take ~80% of 1440x900 viewport */
body[data-page="trade"]:not(.member-trade):not(.public-trade) .tr-marketbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 5px 14px !important;
  min-height: 36px;
  border-bottom: 1px solid #222725;
}

body[data-page="trade"]:not(.member-trade):not(.public-trade) .tr-instrument {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  max-width: none !important;
}

body[data-page="trade"]:not(.member-trade):not(.public-trade) .tr-brand {
  display: none;
}

body[data-page="trade"]:not(.member-trade):not(.public-trade) .tr-sym {
  font-size: 14px !important;
}

body[data-page="trade"]:not(.member-trade):not(.public-trade) .tr-px {
  font-size: 18px !important;
  margin-left: 0 !important;
}

body[data-page="trade"]:not(.member-trade):not(.public-trade) .tr-toolbar {
  padding: 4px 14px !important;
  gap: 6px 8px !important;
  border-bottom: 1px solid #222725;
}

body[data-page="trade"]:not(.member-trade):not(.public-trade) .tr-quick-btn,
body[data-page="trade"]:not(.member-trade):not(.public-trade) .tr-panel-toggle,
body[data-page="trade"]:not(.member-trade):not(.public-trade) .tr-disclosure > summary,
body[data-page="trade"]:not(.member-trade):not(.public-trade) #modeSeg [data-mode] {
  min-height: 28px !important;
  padding: 3px 9px !important;
  font-size: 11.5px !important;
}

body[data-page="trade"]:not(.member-trade):not(.public-trade) .bb-overlay-bar {
  margin: 0 !important;
  padding: 4px 14px !important;
  border-radius: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-top: 0 !important;
  background: #111413 !important;
}

body[data-page="trade"]:not(.member-trade):not(.public-trade) .bb-ov-btn {
  min-height: 26px !important;
  padding: 2px 8px !important;
  font-size: 11.5px !important;
}

.bb-owner-shelves {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  padding: 3px 14px;
  background: #0e100f;
  border-bottom: 1px solid #1e2321;
}

.bb-owner-shelves .tr-positioning {
  margin: 0;
  flex: 0 1 auto;
  border: 0 !important;
  padding: 0 !important;
}

.bb-owner-shelves .tr-positioning > summary {
  padding: 2px 8px !important;
  font-size: 11.5px !important;
  color: #9ca39d;
  border: 1px solid #262b29;
  border-radius: 5px;
  background: #141716;
  cursor: pointer;
}

.bb-owner-shelves .tr-positioning[open] {
  flex-basis: 100%;
  padding: 8px 0 !important;
}

body[data-page="trade"]:not(.member-trade):not(.public-trade) #accountBar {
  padding: 2px 14px !important;
  font-size: 11.5px !important;
}

body[data-page="trade"]:not(.member-trade):not(.public-trade) #pageDetails {
  padding: 2px 14px !important;
}

body[data-page="trade"]:not(.member-trade):not(.public-trade) #pageDetails .tr-details-btn {
  margin: 0 !important;
  min-height: 24px !important;
  font-size: 11px !important;
}

body.board-open {
  --board-open-w: 392px;
}

#chartBoard.bb-mode-decision #chartBoardBody {
  display: none !important;
}

#chartBoard:not(.bb-mode-decision) #bbDecisionRail {
  display: none !important;
}

#chartBoard #bbDecisionRail {
  margin: 6px;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
}

.bb-owner-panel-seg {
  margin-right: 6px;
}

/* v0.7.21 Trader Execution Precision: Live edge jump, Bar close timer, Sizing readout, Structure alerts */
.bb-live-edge-btn {
  margin-left: auto;
  border-color: rgba(78, 207, 161, 0.55) !important;
  color: #4ecfa1 !important;
  background: rgba(78, 207, 161, 0.08) !important;
  font-variant-numeric: tabular-nums;
}
.bb-live-edge-btn:hover {
  background: rgba(78, 207, 161, 0.16) !important;
}
.bb-live-edge-btn[hidden],
.bb-alert-badge[hidden] {
  display: none !important;
}

.bb-bar-timer {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid #2b312f;
  background: #141716;
  color: #f3f0e8;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.bb-alert-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 9px;
  background: rgba(78, 207, 161, 0.18);
  border: 1px solid rgba(78, 207, 161, 0.65);
  color: #4ecfa1;
  font-size: 10.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.bb-alert-banner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
  border-radius: 7px;
  border: 1px solid rgba(78, 207, 161, 0.55);
  background: rgba(78, 207, 161, 0.09);
  color: #f3f0e8;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.bb-alert-banner:hover {
  background: rgba(78, 207, 161, 0.16);
}

.bb-size-readout {
  display: block;
  padding: 7px 9px;
  border-radius: 6px;
  border: 1px solid #2a302e;
  background: #141716;
  color: #d8d5cd;
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.bb-alert-form-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.bb-alert-form-inline .bb-select {
  flex: 1 1 auto;
  min-width: 0;
}

.bb-alert-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bb-alert-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 6px;
  border: 1px solid #262b29;
  border-left: 2px solid #353c39;
  background: #141716;
  color: #e4e1d9;
  font-size: 11.5px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}
.bb-alert-item[data-unread="true"] {
  border-left-color: #4ecfa1;
  background: rgba(78, 207, 161, 0.06);
}
.bb-alert-item p {
  margin: 3px 0 0;
}

/* Responsive Tablet & Phone Priority: Current State -> Chart -> Next Level -> Plan Actions */
@media (max-width: 1060px) {
  .bb-workspace-grid,
  body.public-trade #charts.bb-workspace-grid,
  body.member-trade[data-page="trade"] #charts.bb-workspace-grid,
  body[data-page="trade"].tr-has-rail .tr-body {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  body.member-trade[data-page="trade"] .member-chart-pane,
  body.public-trade .bb-chart-column {
    width: 100% !important;
    min-width: 0 !important;
  }
  body.member-trade[data-page="trade"] #bbDecisionRail,
  body.public-trade #bbDecisionRail {
    width: 100% !important;
    max-width: 100% !important;
    order: 2;
  }
  body.member-trade[data-page="trade"] .tr-toolbar {
    display: flex !important;
    flex-wrap: wrap !important;
  }
  .bb-chart-stage,
  body.member-trade[data-page="trade"] .bb-chart-stage,
  body.public-trade .bb-chart-stage,
  body.member-trade[data-page="trade"] .member-plot,
  body.member-trade[data-page="trade"] #member-canvas,
  body.public-trade #public-chart,
  body[data-page="trade"]:not(.member-trade):not(.public-trade) #chart {
    height: min(56vh, 460px) !important;
    min-height: 360px !important;
    flex: none !important;
    width: 100% !important;
  }
  body[data-page="trade"]:not(.member-trade):not(.public-trade) {
    height: auto !important;
    min-height: 100dvh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
  body[data-page="trade"]:not(.member-trade):not(.public-trade) .tr-body,
  body[data-page="trade"]:not(.member-trade):not(.public-trade) .tr-slot-a {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    flex: none !important;
    overflow: visible !important;
  }
  body[data-page="trade"]:not(.member-trade):not(.public-trade) #chartBoard {
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    flex: none !important;
  }
  body[data-page="trade"]:not(.member-trade):not(.public-trade) #chartBoard #bbDecisionRail {
    max-height: none !important;
  }
}

@media (max-width: 600px) {
  .bb-trade-shell {
    padding: 8px 10px 24px;
  }
  .bb-instrument-strip {
    padding: 10px;
  }
  .bb-overlay-bar {
    padding: 8px 10px;
  }
  .bb-chart-stage,
  body.member-trade[data-page="trade"] .bb-chart-stage,
  body.public-trade .bb-chart-stage,
  body.member-trade[data-page="trade"] .member-plot,
  body.member-trade[data-page="trade"] #member-canvas,
  body.public-trade #public-chart,
  body[data-page="trade"]:not(.member-trade):not(.public-trade) #chart {
    height: min(52vh, 380px) !important;
    min-height: 320px !important;
  }
  .bb-rail,
  body.member-trade[data-page="trade"] #bbDecisionRail,
  body.public-trade #bbDecisionRail,
  body[data-page="trade"]:not(.member-trade):not(.public-trade) #chartBoard {
    order: -1 !important;
  }
  .bb-ov-btn,
  body[data-page="trade"]:not(.member-trade):not(.public-trade) .bb-ov-btn,
  .bb-rail-tab,
  .bb-btn-mint,
  .bb-btn-ghost,
  .bb-alert-banner {
    min-height: 44px !important;
    padding: 6px 10px !important;
  }
  .bb-alert-form-inline {
    flex-direction: column;
    align-items: stretch;
  }
  .bb-form-grid {
    grid-template-columns: 1fr;
  }
}

/* v0.7.23 Live Flush & Liquidity Radar */
.bb-flush-radar {
  border: 1px solid #2a302d;
  background: #121514;
  border-radius: 7px;
  padding: 9px 10px;
  margin-bottom: 10px;
}
.bb-flush-radar[data-flush-state="ACTIVE_FLUSH"] {
  border-color: rgba(229, 105, 98, 0.65);
  background: #191313;
}
.bb-flush-radar[data-flush-state="ABSORBING"] {
  border-color: rgba(78, 207, 161, 0.55);
  background: #121916;
}
.bb-flush-radar[data-flush-state="ELEVATED"] {
  border-color: rgba(220, 166, 83, 0.55);
}
.bb-flush-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.bb-flush-title {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f3f0e8;
  white-space: nowrap;
}
.bb-flush-headline {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: #f3f0e8;
  font-variant-numeric: tabular-nums;
}
.bb-flush-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-top: 7px;
}
@media (max-width: 600px) {
  .bb-flush-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bb-hotkey-bar {
    display: none !important;
  }
}

/* v0.8.0 Session Lens/Zoom pills, Microstructure strip, Confluence & Quick Plan chips */
.bb-ov-sep {
  display: inline-block;
  width: 1px;
  height: 18px;
  background: #272d2b;
  margin: 0 2px;
  align-self: center;
}
.bb-ov-preset,
.bb-ov-zoom {
  font-size: 11px !important;
  padding: 3px 8px !important;
  color: #b4bcb7;
}
.bb-ov-preset[aria-pressed="true"],
.bb-ov-zoom[aria-pressed="true"] {
  border-color: rgba(78, 207, 161, 0.6) !important;
  color: #4ecfa1 !important;
  background: rgba(78, 207, 161, 0.10) !important;
}

.bb-macro-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-top: 7px;
}
@media (max-width: 600px) {
  .bb-macro-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.bb-macro-pill {
  border: 1px solid #222725;
  background: #141716;
  border-radius: 5px;
  padding: 4px 6px;
  font-variant-numeric: tabular-nums;
}
.bb-macro-pill > span {
  display: block;
  font-size: 9.5px;
  color: #8f9691;
}
.bb-macro-pill > strong {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #e6eae7;
}
.bb-macro-pill[data-tone="bid"] > strong { color: #5ed6a3; }
.bb-macro-pill[data-tone="offer"] > strong { color: #f47b79; }

.bb-conf-line {
  margin: 6px 0 0;
  padding: 5px 7px;
  border-radius: 5px;
  border: 1px solid #252b28;
  background: #151918;
  font-size: 11px;
  line-height: 1.38;
  color: #d6dcd8;
  font-variant-numeric: tabular-nums;
}
.bb-tape-tabs {
  display: flex;
  gap: 5px;
  margin: 5px 0 6px;
}
.bb-tape-tab {
  border: 1px solid #2a302d;
  background: #141716;
  color: #9ba39e;
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 11px;
  cursor: pointer;
}
.bb-tape-tab[aria-pressed="true"] {
  border-color: rgba(78, 207, 161, 0.65);
  color: #4ecfa1;
  background: rgba(78, 207, 161, 0.10);
}
.bb-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}
.bb-chip-btn {
  border: 1px solid #2a302d;
  background: #141716;
  color: #c5ccc7;
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.bb-chip-btn:hover,
.bb-chip-btn[aria-pressed="true"] {
  border-color: rgba(78, 207, 161, 0.6);
  color: #4ecfa1;
  background: rgba(78, 207, 161, 0.08);
}
.bb-hotkey-bar {
  margin-top: 10px;
  padding-top: 7px;
  border-top: 1px solid #212624;
  font-size: 10.5px;
  color: #79817c;
  font-family: "Geist Mono Variable", ui-monospace, monospace;
}
.bb-flush-cell {
  border: 1px solid #242927;
  background: #151817;
  border-radius: 5px;
  padding: 4px 6px;
  font-variant-numeric: tabular-nums;
}
.bb-flush-win {
  display: block;
  font-size: 10px;
  color: #8f9691;
}
.bb-flush-val {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  margin-top: 1px;
  color: #f3f0e8;
}
.bb-flush-sub {
  margin: 6px 0 0;
  font-size: 11.5px;
  line-height: 1.38;
  color: #d6dcd8;
  font-variant-numeric: tabular-nums;
}
.bb-flush-tape {
  margin-top: 7px;
  border-top: 1px solid #232826;
  padding-top: 6px;
}
.bb-flush-tape-summary {
  cursor: pointer;
  font-size: 11px;
  color: #9ba39e;
  user-select: none;
}
.bb-flush-tape-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 5px;
}
.bb-flush-item {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: #dce2de;
}

/* Free-Window Multi-Venue Open Interest Explorer */
.bb-oi-card {
  margin-top: 7px;
  padding: 8px 9px;
  border-radius: 7px;
  border: 1px solid #262d2a;
  background: #121514;
  font-variant-numeric: tabular-nums;
}
.bb-oi-card[data-busy="true"] {
  opacity: 0.72;
}
.bb-oi-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}
.bb-oi-title {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b889f4;
}
.bb-oi-total {
  font-size: 11px;
  font-weight: 600;
  color: #dce2de;
  font-family: "Geist Mono Variable", ui-monospace, monospace;
}
.bb-oi-winbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.bb-oi-btn {
  border: 1px solid #29302d;
  background: #171b1a;
  color: #aeb6b1;
  border-radius: 5px;
  padding: 2px 6px;
  min-height: 22px;
  font-size: 10.5px;
  font-weight: 600;
  font-family: "Geist Mono Variable", ui-monospace, monospace;
  cursor: pointer;
}
.bb-oi-btn:hover {
  border-color: rgba(184, 137, 244, 0.55);
  color: #f3f0e8;
}
.bb-oi-btn[aria-pressed="true"] {
  border-color: rgba(184, 137, 244, 0.8);
  background: rgba(184, 137, 244, 0.16);
  color: #e4d1ff;
}
.bb-oi-custom {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
}
.bb-oi-custom input {
  width: 44px;
  height: 22px;
  padding: 0 4px;
  border-radius: 4px;
  border: 1px solid #2b322f;
  background: #0d100f;
  color: #e6eae7;
  font-size: 10.5px;
  font-family: "Geist Mono Variable", ui-monospace, monospace;
  text-align: center;
}
.bb-oi-custom select {
  height: 22px;
  padding: 0 3px;
  border-radius: 4px;
  border: 1px solid #2b322f;
  background: #0d100f;
  color: #e6eae7;
  font-size: 10.5px;
  font-family: "Geist Mono Variable", ui-monospace, monospace;
}
.bb-oi-readout {
  margin-top: 7px;
  padding: 6px 7px;
  border-radius: 5px;
  background: #171b19;
  border: 1px solid #232927;
}
.bb-oi-read-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.bb-oi-delta {
  font-size: 12px;
  font-weight: 700;
  color: #e6eae7;
  font-family: "Geist Mono Variable", ui-monospace, monospace;
}
.bb-oi-delta[data-tone="bid"] { color: #5ed6a3; }
.bb-oi-delta[data-tone="offer"] { color: #f47b79; }
.bb-oi-horizons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-top: 6px;
}
.bb-oi-hcell {
  border: 1px solid #252b28;
  background: #151918;
  border-radius: 5px;
  padding: 4px 3px;
  text-align: center;
  cursor: pointer;
  color: #d6dcd8;
}
.bb-oi-hcell:hover,
.bb-oi-hcell[aria-pressed="true"] {
  border-color: rgba(184, 137, 244, 0.72);
  background: rgba(184, 137, 244, 0.12);
}
.bb-oi-hcell > span {
  display: block;
  font-size: 9.5px;
  color: #8f9691;
}
.bb-oi-hcell > strong {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  margin-top: 1px;
}
.bb-oi-hcell[data-tone="bid"] > strong { color: #5ed6a3; }
.bb-oi-hcell[data-tone="offer"] > strong { color: #f47b79; }
.bb-oi-hcell > small {
  display: block;
  font-size: 9px;
  color: #9ba39e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bb-oi-venues {
  margin-top: 6px;
  border-top: 1px solid #222826;
  padding-top: 5px;
}
.bb-oi-venues summary {
  cursor: pointer;
  font-size: 10.5px;
  color: #9ba39e;
  user-select: none;
}
.bb-oi-venue-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 5px;
}
.bb-oi-venue-row {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 10.5px;
  color: #cfd5d1;
}
.bb-oi-venue-row em {
  font-style: normal;
  color: #8b938d;
}
@media (max-width: 600px) {
  .bb-oi-custom {
    margin-left: 0;
  }
}

/* Plain-English Options Radar */
.bb-opt-card {
  margin-bottom: 10px;
  padding: 9px 10px;
  border-radius: 7px;
  border: 1px solid #2a302d;
  background: #121514;
}
.bb-opt-card[data-light="red"] {
  border-color: rgba(229, 105, 98, 0.45);
  background: #171313;
}
.bb-opt-card[data-light="green"] {
  border-color: rgba(78, 207, 161, 0.45);
  background: #121815;
}
.bb-opt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-top: 7px;
}
@media (max-width: 480px) {
  .bb-opt-grid {
    grid-template-columns: 1fr;
  }
}
.bb-opt-tile {
  border: 1px solid #242927;
  background: #151918;
  border-radius: 5px;
  padding: 6px 7px;
  font-variant-numeric: tabular-nums;
}
.bb-opt-tile > span {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #8f9691;
}
.bb-opt-tile > strong {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 700;
  color: #f3f0e8;
}
.bb-opt-tile[data-tone="bid"] > strong { color: #5ed6a3; }
.bb-opt-tile[data-tone="offer"] > strong { color: #f47b79; }
.bb-opt-tile > small {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  line-height: 1.32;
  color: #a9b1ac;
}

/* Hands-Free Voice AI & News Bar */
.bb-voice-dock {
  padding: 8px 10px;
  border-bottom: 1px solid #262b29;
  background: #101413;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bb-voice-row {
  display: flex;
  gap: 5px;
  align-items: center;
}
.bb-voice-mic, .bb-voice-btn, .bb-voice-go {
  min-height: 28px;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid #2d3431;
  background: #161b19;
  color: #e6ebe7;
  font: 600 11.5px/1 "Instrument Sans", sans-serif;
  cursor: pointer;
}
.bb-voice-mic {
  border-color: rgba(78, 207, 161, 0.5);
  color: #4ecfa1;
  flex: 1 1 auto;
}
.bb-voice-mic[aria-pressed="true"] {
  background: rgba(229, 105, 98, 0.2);
  border-color: #f47b79;
  color: #f47b79;
}
.bb-voice-btn[aria-pressed="true"] {
  border-color: rgba(78, 207, 161, 0.45);
  color: #4ecfa1;
}
.bb-voice-form {
  display: flex;
  gap: 5px;
}
.bb-voice-form input {
  flex: 1 1 auto;
  min-width: 0;
  height: 28px;
  padding: 0 8px;
  border-radius: 5px;
  border: 1px solid #2b322f;
  background: #0c0e0d;
  color: #f3f0e8;
  font: 500 11.5px "Instrument Sans", sans-serif;
}
.bb-news-ticker {
  text-align: left;
  background: #141917;
  border: 1px solid #232a27;
  border-radius: 5px;
  padding: 5px 8px;
  color: #a9b5ae;
  font: 500 11px/1.3 "Instrument Sans", sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.bb-voice-reply {
  background: #151c19;
  border: 1px solid rgba(78, 207, 161, 0.35);
  border-radius: 6px;
  padding: 7px 9px;
}
.bb-voice-reply small {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #4ecfa1;
  margin-bottom: 2px;
}
.bb-voice-reply p {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: #eef1ed;
}

/* Scalp Guide, Volatility Model & Wipeout Guard */
.bb-scalp-guide, .bb-wipeout-card {
  margin-bottom: 10px;
  padding: 9px 10px;
  border-radius: 7px;
  border: 1px solid #2a302d;
  background: #121514;
}
.bb-guide-list {
  margin: 6px 0 7px;
  padding-left: 16px;
  font-size: 11.5px;
  line-height: 1.45;
  color: #cad1cc;
}
.bb-vol-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
.bb-vol-cell {
  border: 1px solid #252b29;
  background: #161a19;
  border-radius: 5px;
  padding: 5px 6px;
  font-variant-numeric: tabular-nums;
}
.bb-vol-cell span { display: block; font-size: 9.5px; color: #8f9691; }
.bb-vol-cell strong { display: block; font-size: 11px; color: #f5b84f; margin: 1px 0; }
.bb-vol-cell small { display: block; font-size: 9.5px; color: #9ea6a1; }
.bb-wipeout-inputs {
  display: grid;
  grid-template-columns: 74px repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 7px;
}
.bb-wipeout-inputs select, .bb-wipeout-inputs input {
  min-width: 0;
  height: 28px;
  padding: 0 6px;
  border-radius: 5px;
  border: 1px solid #2c3330;
  background: #0d100f;
  color: #f3f0e8;
  font: 500 11.5px "Instrument Sans", sans-serif;
}
.bb-warn-box {
  margin-bottom: 10px;
  padding: 9px 10px;
  border-radius: 7px;
  border: 1px solid #4d2525;
  border-left: 3px solid #e56962;
  background: #171010;
}
.bb-warn-box[data-level="WATCH"] { border-color: #463a21; border-left-color: #dca653; background: #16140f; }
.bb-warn-box[data-level="CALM"] { border-color: #243831; border-left-color: #4ecfa1; background: #101614; }
.bb-warn-list { margin: 5px 0 0; padding-left: 15px; font-size: 11px; line-height: 1.42; color: #dcd8d0; }

/* Tighten Clean Mode vertical chrome for maximum chart canvas */
body.tr-clean .tr-top { padding: 4px 10px; }
body.tr-clean .tr-toolbar { padding: 3px 0; gap: 6px; }
body.tr-clean .bb-overlay-bar { padding: 5px 10px; margin: 4px 10px 2px !important; }
body.tr-clean .bb-ov-btn { min-height: 26px; padding: 2px 8px; font-size: 11.5px; }
