/* PRO_DETAILED_ANALYSIS_V2_PHASE5_H3
   Professional Systems Builder only.
   Final qualifier-column alignment and report-selection compatibility closeout.
   No report calculation, ranking, settlement or database-schema changes. */

/* ========================================================================== 
   2K / SURPLUS-WIDTH QUALIFIER ALIGNMENT
   ========================================================================== */

@media (min-width: 2200px) {
  /* Decision Metrics now uses the full analytical canvas. The earlier 90%
     dual-card width deliberately reserved a right-side breathing column, but
     that space is now required by Race Win %, PPR, PPH and winner-price data. */
  body[data-workspace-mode="pro_system_builder"] #quickReportOverlay.pro-canvas-detailed-report .detail-breakdown-card.dual-cohort-breakdown-card {
    width: 100% !important;
    max-width: none !important;
    align-self: stretch !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* The full-width dual table has one 12.5% identity column. Its thirteen
     qualifier columns consume 13/20 of the remaining 87.5%, so the exact
     identity-plus-qualifier boundary is 69.375% of the report canvas. Keep
     positive-only tables on that same vertical boundary. */
  body[data-workspace-mode="pro_system_builder"] #quickReportOverlay.pro-canvas-detailed-report .detail-breakdown-card.single-positive-breakdown-card {
    width: 69.375% !important;
    max-width: none !important;
    align-self: flex-start !important;
    margin-left: 0 !important;
    margin-right: auto !important;
  }

  /* 12.5 / 69.375 = 18.018018%; this keeps the row-identity divider aligned
     between dual-cohort and positive-only tables. */
  body[data-workspace-mode="pro_system_builder"] #quickReportOverlay.pro-canvas-detailed-report .detail-breakdown-card.single-positive-breakdown-card .detail-breakdown-table th:first-child,
  body[data-workspace-mode="pro_system_builder"] #quickReportOverlay.pro-canvas-detailed-report .detail-breakdown-card.single-positive-breakdown-card .detail-breakdown-table td:first-child {
    width: 18.01801802% !important;
  }

  /* At 2K widths the table fits without a nested horizontal scroller. Keep
     local scrolling only for the narrower responsive matrix. */
  body[data-workspace-mode="pro_system_builder"] #quickReportOverlay.pro-canvas-detailed-report .detail-breakdown-table-wrap {
    overflow-x: visible !important;
    scrollbar-gutter: auto !important;
  }
}




/* Lock the browser root as well as the report body. The report window owns the
   single vertical scroll track while Detailed Analysis is open. */
html.report-overlay-open {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

/* Keep compact labels and their help controls inside the semantic column. */
body[data-workspace-mode="pro_system_builder"] #quickReportOverlay.pro-canvas-detailed-report .detail-breakdown-table .detail-column-help-label {
  max-width: 100% !important;
  min-width: 0 !important;
  gap: 1px !important;
}
body[data-workspace-mode="pro_system_builder"] #quickReportOverlay.pro-canvas-detailed-report .detail-breakdown-table .detail-column-help-text {
  min-width: 0 !important;
}
body[data-workspace-mode="pro_system_builder"] #quickReportOverlay.pro-canvas-detailed-report .detail-breakdown-table .metric-help {
  flex: 0 0 13px !important;
}

/* ========================================================================== 
   DECISION METRICS 001 — LOCAL TABLE WIDTH AND COHORT BOUNDARY
   ========================================================================== */

/* Additional decision metrics remain readable through component-local
   horizontal scrolling. No application grid, report navigator or sidebar
   geometry is changed. */
body[data-workspace-mode="pro_system_builder"] #quickReportOverlay.pro-canvas-detailed-report .detail-breakdown-table-wrap {
  overflow-x: auto !important;
  overflow-y: visible !important;
  scrollbar-gutter: stable !important;
}

body[data-workspace-mode="pro_system_builder"] #quickReportOverlay.pro-canvas-detailed-report .detail-breakdown-card.dual-cohort-breakdown-card .dual-cohort-detail-table {
  min-width: 1460px !important;
}

body[data-workspace-mode="pro_system_builder"] #quickReportOverlay.pro-canvas-detailed-report .detail-breakdown-card.single-positive-breakdown-card .detail-breakdown-table {
  min-width: 1040px !important;
}

body[data-workspace-mode="pro_system_builder"] #quickReportOverlay.pro-canvas-detailed-report .detail-breakdown-card.negative-only-breakdown-card .detail-breakdown-table {
  min-width: 820px !important;
}

/* Phase 3 used positional selectors while the negative family contained six
   columns. Decision Metrics adds Avg Neg Win BSP, so the boundary is now
   controlled by semantic column/cohort classes instead of column position. */
body[data-workspace-mode="pro_system_builder"] #quickReportOverlay.pro-canvas-detailed-report .dual-cohort-detail-table td:nth-last-child(6) {
  border-left: 0 !important;
}

body[data-workspace-mode="pro_system_builder"] #quickReportOverlay.pro-canvas-detailed-report .dual-cohort-detail-table .detail-column-negative_runners {
  border-left: 2px solid rgba(213, 72, 98, .22) !important;
}

body[data-workspace-mode="pro_system_builder"] #quickReportOverlay.pro-canvas-detailed-report .dual-cohort-detail-table tbody td.detail-cohort-negative,
body[data-workspace-mode="pro_system_builder"] #quickReportOverlay.pro-canvas-detailed-report .dual-cohort-detail-table tfoot td.detail-cohort-negative {
  background-color: rgba(255, 248, 249, .62) !important;
}

body[data-workspace-mode="pro_system_builder"] #quickReportOverlay.pro-canvas-detailed-report .dual-cohort-detail-table tbody tr:hover td.detail-cohort-negative {
  background-color: rgba(255, 240, 244, .88) !important;
}

body[data-workspace-mode="pro_system_builder"] #quickReportOverlay.pro-canvas-detailed-report .detail-column-race_win_pct,
body[data-workspace-mode="pro_system_builder"] #quickReportOverlay.pro-canvas-detailed-report .detail-column-sp_points_per_race,
body[data-workspace-mode="pro_system_builder"] #quickReportOverlay.pro-canvas-detailed-report .detail-column-bsp_points_per_race,
body[data-workspace-mode="pro_system_builder"] #quickReportOverlay.pro-canvas-detailed-report .detail-column-sp_points_per_horse,
body[data-workspace-mode="pro_system_builder"] #quickReportOverlay.pro-canvas-detailed-report .detail-column-bsp_points_per_horse,
body[data-workspace-mode="pro_system_builder"] #quickReportOverlay.pro-canvas-detailed-report .detail-column-sp_avg_winner_price,
body[data-workspace-mode="pro_system_builder"] #quickReportOverlay.pro-canvas-detailed-report .detail-column-bsp_avg_winner_price,
body[data-workspace-mode="pro_system_builder"] #quickReportOverlay.pro-canvas-detailed-report .detail-column-negative_avg_winner_bsp {
  font-variant-numeric: tabular-nums !important;
}
