/* Performance uses a fixed 1680 x 945 canvas, scaled once by the dashboard root.
   Keep viewport breakpoints from rearranging that canvas while zooming. */
body.performance-page-active .performance-filter-row:last-child {
  grid-template-columns: minmax(120px,.7fr) minmax(150px,1fr) minmax(160px,1fr) auto;
  gap: 16px;
}
body.performance-page-active .leader-view-tabs { grid-column: auto; justify-self: auto; }
body.performance-page-active .leader-view-tab { padding-inline: 12px; }
body.performance-page-active .performance-content { padding: 20px 16px 16px; }
body.performance-page-active .leader-chart-grid,
body.performance-page-active .transparent-lower-grid,
body.performance-page-active .product-line-grid {
  grid-template-columns: repeat(2,minmax(0,1fr)) !important;
}
body.performance-page-active .leader-bubble-card,
body.performance-page-active .leader-treemap-card,
body.performance-page-active .product-line-card { padding: 16px; }
body.performance-page-active .leader-bubble-chart,
body.performance-page-active .leader-treemap-chart { height: 520px !important; }
body.performance-page-active .leader-treemap-layout {
  grid-template-columns: minmax(0,1fr) 200px !important;
  gap: 12px !important;
}
body.performance-page-active .leader-related-panel {
  width: 200px !important;
  height: 520px !important;
  position: sticky !important;
  border-top: 0;
}
body.performance-page-active .leader-bubble-legend { grid-template-columns: repeat(5,max-content); }
body.performance-page-active .transparent-perf-toolbar {
  grid-template-columns: minmax(180px,260px) minmax(180px,220px) minmax(0,1fr);
}
body.performance-page-active .transparent-tip { text-align: right; grid-column: auto; }
body.performance-page-active .transparent-kpi-grid { grid-template-columns: repeat(6,minmax(120px,1fr)); }
body.performance-page-active .warning-item { grid-template-columns: 76px 82px minmax(0,1fr) minmax(150px,.8fr); }
body.performance-page-active .intermediate-kpi-groups { grid-template-columns: repeat(2,minmax(0,1fr)); }
body.performance-page-active .product-line-heatmaps { grid-template-columns: repeat(3,minmax(0,1fr)); }
body.performance-page-active .product-line-insights { grid-template-columns: repeat(5,minmax(0,1fr)); }
body.performance-page-active .product-line-combo-chart { height: 410px; }
body.performance-page-active .product-line-combo-tick,
body.performance-page-active .product-line-combo-xlabel { font-size: 12px; }
body.performance-page-active .product-line-combo-insights { grid-template-columns: repeat(2,minmax(0,1fr)); }
body.performance-page-active .product-line-combo-table { font-size: 11px; }
body.performance-page-active .product-line-view-btn { font-size: 12px; padding: 0 10px; }
body.performance-page-active .product-line-data-table { font-size: 12px; }
body.performance-page-active .product-line-data-table th,
body.performance-page-active .product-line-data-table td { height: 42px; padding: 0 7px; }
body.performance-page-active .product-line-data-table th { height: 40px; }
body.performance-page-active .product-line-detail { font-size: 13px; }
body.performance-page-active .product-line-detail-metrics { grid-template-columns: repeat(5,minmax(0,1fr)); }
body.performance-page-active .product-line-detail-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); }
body.performance-page-active .product-line-detail-table { font-size: 11px; }
body.performance-page-active .product-line-detail-actions { grid-template-columns: none; }
body.performance-page-active .product-line-detail-drawer { left: auto; right: 18px; top: 86px; width: 520px; }

/* Readable laptop typography, shared by every zoom level. */
body.performance-page-active .leader-bubble-sub,
body.performance-page-active .product-line-sub { font-size: 13px !important; line-height: 1.6; }
body.performance-page-active .leader-bubble-legend-item,
body.performance-page-active .leader-treemap-legend { font-size: 12px !important; }
body.performance-page-active .leader-bubble-note,
body.performance-page-active .leader-treemap-note { font-size: 12px !important; }
body.performance-page-active .leader-related-link { font-size: 12px !important; min-height: 33px; }
body.performance-page-active .leader-treemap-owner { font-size: 12px; }
body.performance-page-active .product-line-combo-tick,
body.performance-page-active .product-line-combo-xlabel { font-size: 14px; }
body.performance-page-active .product-line-combo-legend { font-size: 13px; }
body.performance-page-active .product-line-data-table,
body.performance-page-active .product-line-detail-table { font-size: 13px; }
body.performance-page-active .product-line-heat-cell { font-size: 12px; min-height: 38px; line-height: 1.4; }
body.performance-page-active .product-line-bubble-label {
  font-size: 13px;
  fill: #334155;
  stroke: #fff;
  stroke-width: 3px;
}
body.performance-page-active .leader-bubble-tick,
body.performance-page-active .product-line-tick { fill: #526b70; }

/* Keep names beside the heading, anchored to the upper-right corner. */
body.performance-page-active .leader-bubble-head {
  flex-direction: row !important;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
body.performance-page-active .leader-bubble-head > :first-child { min-width: 0; flex: 1; }
body.performance-page-active .leader-bubble-legend,
body.performance-page-active .leader-treemap-legend {
  flex: 0 0 auto;
  align-self: flex-start;
  margin-left: auto;
  justify-content: end;
  align-content: start;
  padding-top: 2px;
  gap: 5px 8px !important;
}
body.performance-page-active #leaderBubbleLegend { display: grid; grid-template-columns: repeat(5,max-content); }
body.performance-page-active #leaderTreemapLegend { display: grid; grid-template-columns: repeat(6,max-content); }
body.performance-page-active .leader-bubble-legend-item { white-space: nowrap; }

body.performance-page-active .leader-related-panel .leader-related-link,
body.performance-page-active .leader-related-panel .leader-related-row:nth-of-type(2n) .leader-related-link {
  background: #f2f8f5 !important;
  border-color: #cfe0da !important;
  color: #24574c !important;
  box-shadow: inset 2px 0 0 #a9cec0 !important;
}
body.performance-page-active .leader-related-panel .leader-related-link:hover,
body.performance-page-active .leader-related-panel .leader-related-row:nth-of-type(2n) .leader-related-link:hover {
  background: #e4f1ec !important;
  border-color: #a9cebe !important;
  color: #0f5b45 !important;
}
