/* Native-currency labels and unconverted decimal values share the same layout.
   Wrap within the existing surface rather than ellipsizing verified amounts. */
#metricPnl,
.bot-stats :is([data-stat="pnl"], [data-stat="realized"]),
.wb-stage-metric :is(.wb-stage-floating, .wb-stage-total),
.wb-stage-rail > .wb-trade-summary .wb-stage-metric strong:is(.wb-stage-floating, .wb-stage-total),
.account-capital-grid [data-capital-stat] {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-overflow: clip;
}
.wb-stage-metric :is([data-wb-floating-label], [data-wb-total-label]),
.wb-stage-rail > .wb-trade-summary .wb-stage-metric small:is([data-wb-floating-label], [data-wb-total-label]),
.bot-stats [data-stat-label],
.account-capital-grid > div > span {
  white-space: normal;
  overflow-wrap: anywhere;
}

/* P&L text owns its natural rows; fixed trade-control heights remain unchanged. */
.wb-stage-rail:has(> .wb-trade-summary :is(.wb-stage-floating, .wb-stage-total)) {
  grid-template-rows: auto auto;
}
.wb-stage-rail > .wb-trade-summary:has(> .wb-stage-metrics :is(.wb-stage-floating, .wb-stage-total)) {
  height: auto;
  grid-template-rows: auto;
  align-items: start;
}
.wb-stage-rail > .wb-trade-summary .wb-stage-metrics:has(:is(.wb-stage-floating, .wb-stage-total)) {
  height: auto;
}
.wb-stage-rail > .wb-trade-summary .wb-stage-metric:has(> :is(.wb-stage-floating, .wb-stage-total)) {
  grid-template-rows: auto auto;
}

/* Overview amounts are atomic; horizontal scrolling retains every decimal. */
#dashboard .metric .metric-reading > :is(#metricUnrealized, #metricRealized) {
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow-wrap: normal;
  overflow-x: auto;
  text-overflow: clip;
  scrollbar-width: thin;
}
