/* PRO CANVAS PHASE 2 D2 — visible Sire / Dam-sire parity lens */
.pro-breeding-entity-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(116, 139, 190, 0.24);
  border-radius: 14px;
  background: rgba(246, 249, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.pro-breeding-entity-tab {
  min-height: 34px;
  padding: 7px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #41506f;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.pro-breeding-entity-tab:hover,
.pro-breeding-entity-tab:focus-visible {
  border-color: rgba(91, 119, 186, 0.26);
  background: rgba(235, 241, 255, 0.92);
  color: #233a70;
  outline: none;
}

.pro-breeding-entity-tab.is-active {
  border-color: rgba(69, 92, 164, 0.36);
  background: linear-gradient(135deg, rgba(38, 71, 139, 0.98), rgba(91, 69, 161, 0.96));
  color: #fff;
  box-shadow: 0 8px 18px rgba(46, 61, 118, 0.19);
}

.pro-breeding-entity-tab.is-ready:not(.is-active)::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 8px;
  border-radius: 50%;
  background: #2f9c76;
  vertical-align: 1px;
}

.pro-breeding-entity-status {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 12px;
}

.pro-breeding-entity-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 9px 13px;
  border: 1px solid rgba(119, 138, 181, 0.2);
  border-radius: 12px;
  background: rgba(250, 252, 255, 0.78);
  color: #34415e;
}

.pro-breeding-entity-state b {
  font-size: 0.77rem;
  letter-spacing: 0.025em;
}

.pro-breeding-entity-state em {
  overflow: hidden;
  color: #6c7893;
  font-size: 0.72rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pro-breeding-entity-state.is-ready {
  border-color: rgba(55, 145, 112, 0.24);
  background: rgba(239, 250, 246, 0.86);
}

.pro-breeding-entity-state.is-ready b {
  color: #17684f;
}

@media (max-width: 980px) {
  .pro-breeding-entity-tabs {
    order: 3;
    width: 100%;
  }

  .pro-breeding-entity-tab {
    flex: 1 1 0;
  }

  .pro-breeding-entity-status {
    grid-template-columns: 1fr;
  }
}


/* PRO CANVAS PHASE 2 D2-H1 — explicit query activation and applied-state clarity */
.pro-breeding-query-toggle-chip {
  min-width: 124px !important;
  padding-inline: 12px !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.035em !important;
}

.pro-breeding-query-detail-button {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(92, 119, 180, 0.28);
  border-radius: 999px;
  background: rgba(244, 248, 255, 0.94);
  color: #28477f;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.pro-breeding-query-detail-button:hover,
.pro-breeding-query-detail-button:focus-visible {
  border-color: rgba(57, 89, 158, 0.48);
  background: #fff;
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(35, 56, 109, 0.12);
}

.pro-breeding-entity-state.is-applied {
  box-shadow: inset 0 -2px 0 rgba(42, 121, 91, 0.16);
}

.pro-breeding-entity-state.is-not-applied em {
  color: #7b6680;
}

.pro-breeding-entity-tab.is-busy {
  cursor: wait;
  opacity: 0.72;
}

.pro-breeding-apply-progress {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1280px) {
  .pro-breeding-query-toggle-chip {
    min-width: 108px !important;
  }
  .pro-breeding-query-detail-button {
    padding-inline: 8px;
  }
}


/* PRO CANVAS D4-H1 — entity controls in title block and strict two-column stage recovery */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-title-block{
  display:grid!important;
  align-content:center!important;
  gap:3px!important;
  min-width:0!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-breeding-entity-tabs{
  display:flex!important;
  width:min(620px,100%)!important;
  margin-top:7px!important;
  padding:3px!important;
  gap:5px!important;
  border:1px solid rgba(255,255,255,.36)!important;
  border-radius:13px!important;
  background:rgba(228,237,255,.78)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.78)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-breeding-entity-tab{
  position:relative!important;
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr)!important;
  align-items:center!important;
  gap:8px!important;
  flex:1 1 0!important;
  min-width:0!important;
  min-height:34px!important;
  padding:6px 10px!important;
  border-radius:10px!important;
  text-align:left!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-breeding-entity-tab span{
  font-size:10px!important;
  font-weight:950!important;
  letter-spacing:.02em!important;
  white-space:nowrap!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-breeding-entity-tab small{
  min-width:0!important;
  overflow:hidden!important;
  color:#64748b!important;
  font-size:8px!important;
  font-weight:750!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-breeding-entity-tab.is-active small{color:rgba(238,246,255,.88)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-breeding-entity-tab.is-ready:not(.is-active)::after{
  position:absolute!important;
  right:8px!important;
  top:8px!important;
  margin:0!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-breeding-entity-status{display:none!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-summary:empty{display:none!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-main-stage{
  grid-template-columns:minmax(300px,27%) minmax(0,1fr)!important;
  grid-template-rows:minmax(326px,auto)!important;
  align-items:stretch!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-overview{
  grid-column:1!important;
  grid-row:1!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-control-deck{
  grid-column:2!important;
  grid-row:1!important;
}
@media(max-width:1180px){
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-breeding-entity-tabs{width:100%!important;}
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-main-stage{
    grid-template-columns:1fr!important;
    grid-template-rows:auto auto!important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-overview,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-control-deck{
    grid-column:1!important;
    grid-row:auto!important;
  }
}


/* D4-H2 — centred entity switch with larger readable labels */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-breeding-entity-tabs{width:min(650px,100%)!important;margin:9px auto 0!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-breeding-entity-tab{min-height:39px!important;padding:7px 12px!important;text-align:center!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-breeding-entity-tab span{font-size:13px!important;letter-spacing:.025em!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-breeding-entity-tab small{font-size:8.75px!important;}

/* === PHASE2 D4 H3: header, performance, and history polish === */
.pro-sire-workspace-top {
  display: grid !important;
  grid-template-columns: minmax(240px, 280px) minmax(360px, 1fr) minmax(320px, 420px);
  grid-template-areas:
    "close entity title"
    "actions entity title"
    "status status status";
  align-items: center;
  column-gap: 20px;
  row-gap: 10px;
}

#closeProSireWorkspaceButton {
  grid-area: close;
  align-self: center;
  justify-self: start;
}

.pro-sire-workspace-actions {
  grid-area: actions;
  justify-self: start;
  align-self: start;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pro-sire-workspace-entity-host {
  grid-area: entity;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pro-sire-workspace-title-block {
  grid-area: title;
  align-self: center;
  justify-self: end;
  max-width: 420px;
  text-align: right;
}

.pro-sire-workspace-title-block .section-kicker {
  font-size: 12px;
}

.pro-sire-workspace-title-block h2 {
  font-size: 2rem;
}

.pro-sire-workspace-title-block p {
  margin-left: auto;
}

.pro-sire-hidden-status {
  grid-area: status;
}

#proBreedingEntityTabs {
  width: min(640px, 100%);
  margin: 0;
}

#proBreedingEntityTabs .pro-breeding-entity-tab span {
  font-size: 1rem;
}

#proBreedingEntityTabs .pro-breeding-entity-tab small {
  font-size: 0.76rem;
}

.pro-sire-workspace-main-stage {
  align-items: stretch;
}

.pro-sire-workspace-overview,
.pro-sire-workspace-control-deck,
.pro-sire-control-deck-card-v3 {
  height: 100%;
}

.pro-sire-control-deck-card-v3 {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.pro-sire-deck-panel {
  min-height: 0;
  overflow: auto;
}

.pro-sire-performance-head {
  align-items: center;
  gap: 16px;
}

.pro-sire-performance-view-switch {
  gap: 10px;
  align-items: center;
}

.pro-sire-performance-open-button {
  border: 1px solid rgba(87, 171, 255, 0.42);
  border-radius: 999px;
  background: #ffffff;
  padding: 10px 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #173a7a;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.pro-sire-performance-open-button:hover,
.pro-sire-performance-open-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(31, 76, 169, 0.14);
  border-color: rgba(52, 128, 255, 0.6);
}

.pro-sire-performance-view[data-pro-sire-performance-panel="components"] {
  display: none !important;
}

.pro-component-performance-panel,
.pro-sire-family-comparison-panel,
.pro-experiment-history-compact-list {
  overflow: auto;
}

.pro-component-performance-table th,
.pro-component-performance-table td,
.pro-sire-family-comparison-panel th,
.pro-sire-family-comparison-panel td {
  white-space: nowrap;
}

.pro-sire-impact-basis-tools {
  flex-wrap: wrap;
  align-items: center;
}

.pro-sire-impact-basis-tools > span:first-child {
  white-space: nowrap;
  min-width: 126px;
}

.pro-experiment-history-tab-actions {
  align-items: center;
  gap: 12px;
}

.pro-experiment-history-scope button,
#openProExperimentHistoryButton {
  border-radius: 999px !important;
  font-weight: 800;
  line-height: 1;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.pro-experiment-history-scope button:hover,
.pro-experiment-history-scope button:focus-visible,
#openProExperimentHistoryButton:hover,
#openProExperimentHistoryButton:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(31, 76, 169, 0.14);
}

#openProExperimentHistoryButton {
  padding-inline: 16px;
}

.pro-sire-component-modal {
  position: fixed;
  inset: 0;
  z-index: 2400;
}

.pro-sire-component-modal[hidden] {
  display: none !important;
}

.pro-sire-component-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 24, 52, 0.44);
  backdrop-filter: blur(4px);
}

.pro-sire-component-modal-panel {
  position: relative;
  width: min(1500px, calc(100vw - 64px));
  max-height: calc(100vh - 56px);
  margin: 28px auto;
  background: linear-gradient(180deg, #f9fbff 0%, #f2f7ff 100%);
  border: 1px solid rgba(87, 171, 255, 0.32);
  border-radius: 28px;
  box-shadow: 0 28px 64px rgba(11, 31, 66, 0.24);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.pro-sire-component-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid rgba(87, 171, 255, 0.22);
}

.pro-sire-component-modal-header h3 {
  margin: 4px 0 6px;
  font-size: 1.4rem;
}

.pro-sire-component-modal-header p {
  margin: 0;
  color: #5a6f98;
}

.pro-sire-component-modal-close {
  border: 1px solid rgba(87, 171, 255, 0.32);
  border-radius: 14px;
  background: #ffffff;
  padding: 12px 16px;
  font-weight: 800;
  color: #183c79;
  cursor: pointer;
}

.pro-sire-component-modal-body {
  padding: 18px 24px 24px;
  overflow: auto;
}

body.pro-sire-component-modal-open {
  overflow: hidden;
}

@media (max-width: 1240px) {
  .pro-sire-workspace-top {
    grid-template-columns: 1fr;
    grid-template-areas:
      "close"
      "entity"
      "title"
      "actions"
      "status";
  }

  .pro-sire-workspace-title-block,
  .pro-sire-workspace-actions,
  #closeProSireWorkspaceButton {
    justify-self: start;
    text-align: left;
  }

  .pro-sire-workspace-title-block p {
    margin-left: 0;
  }
}

/* ========================================================================== */
/* PRO CANVAS D4-H4 — layout and control correction                           */
/* Component-local authority for header, equal-height stage, Components modal */
/* and true full-screen query-table focus.                                     */
/* ========================================================================== */

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-top {
  display: grid !important;
  grid-template-columns: minmax(250px, 300px) minmax(420px, 1fr) minmax(420px, 500px) !important;
  grid-template-rows: auto auto !important;
  grid-template-areas:
    "back title entity"
    "actions title entity" !important;
  align-items: center !important;
  column-gap: 18px !important;
  row-gap: 7px !important;
  min-height: 86px !important;
  margin: 0 0 8px !important;
  padding: 9px 14px !important;
  box-sizing: border-box !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open #closeProSireWorkspaceButton {
  grid-area: back !important;
  align-self: start !important;
  justify-self: start !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-actions {
  grid-area: actions !important;
  align-self: end !important;
  justify-self: start !important;
  justify-content: flex-start !important;
  min-width: 0 !important;
  margin: 0 !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-title-block {
  grid-area: title !important;
  align-self: center !important;
  justify-self: center !important;
  width: min(760px, 100%) !important;
  max-width: 760px !important;
  gap: 2px !important;
  text-align: center !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-title-block .section-kicker {
  font-size: 11px !important;
  line-height: 1 !important;
  letter-spacing: .15em !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-title-block h2 {
  margin: 2px 0 !important;
  font-size: clamp(27px, 1.65vw, 31px) !important;
  line-height: .98 !important;
  letter-spacing: -.025em !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-title-block p {
  max-width: 680px !important;
  margin: 0 auto !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-entity-host {
  grid-area: entity !important;
  align-self: center !important;
  justify-self: end !important;
  width: min(480px, 100%) !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open #proBreedingEntityTabs {
  width: 100% !important;
  margin: 0 !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-breeding-entity-tab {
  min-height: 38px !important;
  padding: 6px 11px !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-main-stage {
  display: grid !important;
  grid-template-columns: minmax(300px, 27%) minmax(0, 1fr) !important;
  grid-template-rows: auto !important;
  align-items: stretch !important;
  gap: 12px !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-overview,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-control-deck {
  align-self: stretch !important;
  min-height: 0 !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-outcome-rail-list {
  height: 100% !important;
  grid-template-rows: repeat(3, minmax(0, 1fr)) !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-control-deck {overflow: hidden !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v3 {
  display: grid !important;
  flex: 1 1 auto !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-tabs {
  flex: none !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-panel,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-panel.is-active {
  min-width: 0 !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: auto !important;
}

.pro-sire-component-modal {
  z-index: 13050 !important;
  display: grid;
  place-items: stretch;
  padding: 14px;
  box-sizing: border-box;
}

.pro-sire-component-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 19, 49, .78);
  backdrop-filter: blur(7px);
}

.pro-sire-component-modal-panel {
  position: relative !important;
  inset: auto !important;
  z-index: 1;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  overflow: hidden !important;
  border-radius: 20px !important;
}

.pro-sire-component-modal-header {
  flex: none;
  padding: 16px 18px !important;
}

.pro-sire-component-modal-body {
  min-height: 0 !important;
  overflow: auto !important;
  padding: 16px 18px 20px !important;
}

html.pro-sire-table-focus-mode,
body.pro-sire-table-focus-mode {
  overflow: hidden !important;
}

body.pro-sire-table-focus-mode #proSireQueryGridPanel.pro-sire-workspace-open {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 0 !important;
  padding: 12px !important;
  overflow: hidden !important;
}

body.pro-sire-table-focus-mode #proSireQueryGridPanel.pro-sire-workspace-open > .pro-sire-workspace-top,
body.pro-sire-table-focus-mode #proSireQueryGridPanel.pro-sire-workspace-open > .pro-sire-query-grid-summary,
body.pro-sire-table-focus-mode #proSireQueryGridPanel.pro-sire-workspace-open > .pro-sire-workspace-main-stage,
body.pro-sire-table-focus-mode #proSireQueryGridPanel.pro-sire-workspace-open > .pro-sire-applied-summary,
body.pro-sire-table-focus-mode #proSireQueryGridPanel.pro-sire-workspace-open > .pro-sire-query-detail-workspace {
  display: none !important;
}

body.pro-sire-table-focus-mode #proSireQueryGridPanel.pro-sire-workspace-open::before {
  display: none !important;
  content: none !important;
}

body.pro-sire-table-focus-mode #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-table-tools {
  position: relative !important;
  inset: auto !important;
  z-index: 2 !important;
  margin: 0 !important;
  border-radius: 16px 16px 0 0 !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .12) !important;
}

body.pro-sire-table-focus-mode #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-scroll {
  position: relative !important;
  inset: auto !important;
  z-index: 1 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: auto !important;
  border: 1px solid rgba(147, 197, 253, .72) !important;
  border-top: 0 !important;
  border-radius: 0 0 18px 18px !important;
  background: #fff !important;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .16) !important;
  overscroll-behavior: contain !important;
}

body.pro-sire-table-focus-mode #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table {
  margin-bottom: 0 !important;
}

body.pro-sire-table-focus-mode #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 6 !important;
}

@media (max-width: 1280px) {
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-top {
    grid-template-columns: minmax(230px, 290px) minmax(0, 1fr) !important;
    grid-template-areas:
      "back title"
      "actions title"
      "entity entity" !important;
    min-height: 0 !important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-entity-host {
    justify-self: center !important;
    width: min(680px, 100%) !important;
  }
}

@media (max-width: 1100px) {
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-top {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "title"
      "back"
      "actions"
      "entity" !important;
    text-align: center !important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open #closeProSireWorkspaceButton,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-actions,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-entity-host {
    justify-self: center !important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-main-stage {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto !important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-outcome-rail-list {
    height: auto !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: 1fr !important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v3 {
    min-height: 360px !important;
  }
}



/* ========================================================================== */
/* PRO CANVAS D4-H4A — post-install visual and control correction              */
/* Confirmed browser findings: header scale/Apply width, matched main-stage     */
/* height, capture-owned Components modal, and reliable sticky table headers.   */
/* ========================================================================== */

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-top {
  grid-template-columns: minmax(350px, 390px) minmax(420px, 1fr) minmax(420px, 500px) !important;
  min-height: 104px !important;
  padding: 11px 16px !important;
  column-gap: 20px !important;
  row-gap: 9px !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-actions {
  flex-wrap: nowrap !important;
  gap: 10px !important;
  width: 100% !important;
  overflow: visible !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-actions .report-table-group-count {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-actions .pro-sire-apply-primary {
  flex: 0 0 auto !important;
  min-width: 178px !important;
  width: auto !important;
  padding-inline: 15px !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-title-block .section-kicker {
  font-size: 11.5px !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-title-block h2 {
  font-size: clamp(29px, 1.72vw, 33px) !important;
  line-height: 1 !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-title-block p {
  font-size: 12.5px !important;
  line-height: 1.3 !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-breeding-entity-tab {
  min-height: 42px !important;
}

/* One explicit desktop stage row makes the deck exactly as deep as the
   three-card outcome rail. Long tab content scrolls inside the matched card. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-main-stage {
  grid-template-rows: clamp(386px, 36vh, 430px) !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-overview,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-control-deck {
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  align-self: stretch !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-control-deck {}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v3 {
  align-self: stretch !important;
  height: auto !important;
  min-height: 100% !important;
  max-height: none !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-panel,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-panel.is-active {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: auto !important;
}

.pro-sire-component-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
}

.pro-sire-component-modal.is-open {
  display: grid !important;
}

/* Use one sticky owner only: the header cells. Legacy sticky positioning on
   THEAD/TR is neutralised because it breaks in Chromium inside the focus grid. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-scroll {
  position: relative !important;
  contain: none !important;
  overflow: auto !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead {
  display: table-header-group !important;
  position: static !important;
  top: auto !important;
  z-index: auto !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead tr {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 260 !important;
  background-clip: padding-box !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th:first-child {
  z-index: 280 !important;
}

body.pro-sire-table-focus-mode #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th {
  top: 0 !important;
  z-index: 320 !important;
}

body.pro-sire-table-focus-mode #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th:first-child {
  z-index: 340 !important;
}

@media (max-width: 1100px) {
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-main-stage {
    grid-template-rows: auto auto !important;
  }
}


/* ========================================================================== */
/* PRO CANVAS D4-H4B — component report and main-stage geometry                */
/* Premium Glass evidence-page hierarchy; applied-only data semantics retained. */
/* ========================================================================== */

/* Let the outcome rail establish its natural readable height. The deck is the
   second item in the same CSS-grid row and stretches to the identical height. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-main-stage {
  width: 100% !important;
  grid-template-rows: auto !important;
  align-items: stretch !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-overview,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-control-deck {
  height: auto !important;
  min-height: 0 !important;
  align-self: stretch !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-outcome-rail-list {
  height: auto !important;
  grid-template-rows: repeat(3, minmax(152px, auto)) !important;
  align-content: start !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-outcome-card {
  min-height: 152px !important;
  display: grid !important;
  grid-template-rows: auto auto minmax(0, 1fr) !important;
  align-content: start !important;
  box-sizing: border-box !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-control-deck {width: 100% !important;
  max-width: none !important;
  overflow: hidden !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v3 {
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  max-height: none !important;
  align-self: stretch !important;
}

/* Modal shell: pale operational glass with one clear orientation header. */
.pro-sire-component-modal-panel {
  background:
    radial-gradient(circle at 3% 7%, rgba(34,211,238,.10), transparent 24%),
    radial-gradient(circle at 96% 4%, rgba(124,58,237,.10), transparent 27%),
    linear-gradient(180deg, rgba(249,252,255,.98), rgba(239,245,255,.96)) !important;
  border: 1px solid rgba(99,125,255,.26) !important;
  box-shadow:
    0 28px 74px rgba(15,23,42,.28),
    inset 0 1px 0 rgba(255,255,255,.78) !important;
}

.pro-sire-component-modal-header {
  align-items: center !important;
  padding: 15px 18px !important;
  background: linear-gradient(180deg, rgba(255,255,255,.91), rgba(245,249,255,.82)) !important;
  border-bottom: 1px solid rgba(81,108,199,.18) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72) !important;
}

.pro-sire-component-modal-header > div {
  display: grid !important;
  gap: 2px !important;
}

.pro-sire-component-modal-header .section-kicker {
  color: #526b92 !important;
  font-size: 9px !important;
  font-weight: 900 !important;
  letter-spacing: .16em !important;
  text-transform: uppercase !important;
}

.pro-sire-component-modal-header h3 {
  margin: 0 !important;
  color: #10213d !important;
  font-size: clamp(21px, 1.55vw, 27px) !important;
  line-height: 1.05 !important;
  letter-spacing: -.02em !important;
}

.pro-sire-component-modal-header p {
  max-width: 980px !important;
  margin: 2px 0 0 !important;
  color: #536b89 !important;
  font-size: 11px !important;
  line-height: 1.35 !important;
  font-weight: 650 !important;
}

.pro-sire-component-modal-close {
  min-width: 84px !important;
  min-height: 38px !important;
  padding: 9px 15px !important;
  border: 1px solid rgba(101,123,255,.24) !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(240,246,255,.88)) !important;
  color: #1d3f86 !important;
  box-shadow: 0 9px 22px rgba(17,24,39,.07), inset 0 1px 0 rgba(255,255,255,.72) !important;
}

.pro-sire-component-modal-close:hover,
.pro-sire-component-modal-close:focus-visible {
  border-color: rgba(48,104,230,.48) !important;
  box-shadow: 0 12px 25px rgba(37,99,235,.14), inset 0 1px 0 rgba(255,255,255,.78) !important;
}

.pro-sire-component-modal-body {
  padding: 14px 16px 18px !important;
  background: transparent !important;
  scrollbar-gutter: stable !important;
}

.pro-component-report {
  display: grid;
  gap: 14px;
  width: 100%;
}

/* One high-value intelligence panel summarises the selected applied version. */
.pro-component-report-summary {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 15px 18px 15px 22px;
  overflow: hidden;
  border: 1px solid rgba(83,170,244,.42);
  border-radius: 16px;
  background:
    radial-gradient(circle at 92% 4%, rgba(34,211,238,.22), transparent 39%),
    radial-gradient(circle at 4% 98%, rgba(147,93,255,.20), transparent 42%),
    linear-gradient(143deg, rgba(5,18,44,.985), rgba(24,53,132,.965) 54%, rgba(62,49,154,.945));
  box-shadow: 0 14px 30px rgba(20,45,118,.22), inset 0 1px 0 rgba(255,255,255,.27);
}

.pro-component-report-summary::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, #5df2ff 0%, #4f8df7 48%, #a56cf2 100%);
  box-shadow: 0 0 25px rgba(82,182,255,.62);
}

.pro-component-report-summary::after {
  content: "";
  position: absolute;
  inset: 0 14% auto 14%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.86), rgba(99,225,250,.48), transparent);
}

.pro-component-report-summary-copy {
  min-width: 0;
}

.pro-component-report-summary-copy > span {
  display: block;
  margin-bottom: 3px;
  color: rgba(210,231,255,.90);
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.pro-component-report-summary-copy > strong {
  display: block;
  color: #fff;
  font-size: 16px;
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -.012em;
  text-shadow: 0 1px 7px rgba(0,0,0,.26);
}

.pro-component-report-summary-copy > p {
  max-width: 920px;
  margin: 5px 0 0;
  color: rgba(226,239,255,.94);
  font-size: 10.25px;
  line-height: 1.3;
  font-weight: 680;
}

.pro-component-report-summary dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 8px;
  margin: 0;
}

.pro-component-report-summary dl > div {
  min-width: 92px;
  padding: 8px 10px;
  border: 1px solid rgba(137,190,255,.28);
  border-radius: 12px;
  background: rgba(255,255,255,.09);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
}

.pro-component-report-summary dt {
  color: rgba(204,226,255,.82);
  font-size: 7.5px;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.pro-component-report-summary dd {
  margin: 2px 0 0;
  color: #fff;
  font-size: 15px;
  line-height: 1;
  font-weight: 950;
}

.pro-component-group {
  overflow: hidden;
  border: 1px solid rgba(81,108,199,.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.86), rgba(244,248,255,.72));
  box-shadow: 0 16px 34px rgba(21,35,68,.085), inset 0 1px 0 rgba(255,255,255,.68);
}

.pro-component-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 13px;
  background: linear-gradient(90deg, rgba(236,246,255,.88), rgba(245,243,255,.76));
  border-bottom: 1px solid rgba(81,108,199,.16);
}

.pro-component-group-header > div {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
}

.pro-component-group-header span {
  color: #6b7f99;
  font-size: 7.5px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.pro-component-group-header strong {
  color: #173a70;
  font-size: 12px;
  font-weight: 950;
}

.pro-component-group-header em {
  flex: none;
  padding: 5px 9px;
  border: 1px solid rgba(101,123,255,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.76);
  color: #516985;
  font-size: 8px;
  font-style: normal;
  font-weight: 850;
}

.pro-component-table-shell,
.pro-component-query-shell {
  width: 100%;
  overflow-x: auto;
}

.pro-component-performance-table,
.pro-component-query-table {
  width: 100%;
  min-width: 900px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  color: #10213d;
  font-size: 10px;
}

.pro-component-performance-table col.is-component { width: 27%; }
.pro-component-performance-table col.is-count { width: 9%; }
.pro-component-query-table col.is-query { width: 50%; }

.pro-component-performance-table thead th,
.pro-component-query-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(139,177,255,.26);
  background: linear-gradient(135deg, #11254f, #2855c8 68%, #258fae);
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .075em;
  text-align: right;
  text-transform: uppercase;
  white-space: nowrap;
}

.pro-component-performance-table thead th:first-child,
.pro-component-query-table thead th:first-child {
  text-align: left;
}

.pro-component-performance-table tbody > tr > th,
.pro-component-performance-table tbody > tr > td,
.pro-component-query-table tbody > tr > th,
.pro-component-query-table tbody > tr > td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(72,95,157,.13);
  background: rgba(255,255,255,.34);
  text-align: right;
  vertical-align: middle;
}

.pro-component-performance-table tbody > tr:last-child > th,
.pro-component-performance-table tbody > tr:last-child > td,
.pro-component-query-table tbody > tr:last-child > th,
.pro-component-query-table tbody > tr:last-child > td {
  border-bottom: 0;
}

.pro-component-summary-row:hover > th,
.pro-component-summary-row:hover > td,
.pro-component-query-table tbody tr:hover > th,
.pro-component-query-table tbody tr:hover > td {
  background: linear-gradient(90deg, rgba(222,242,255,.72), rgba(239,240,255,.58));
}

.pro-component-summary-row.is-expanded > th,
.pro-component-summary-row.is-expanded > td {
  background: linear-gradient(90deg, rgba(219,239,255,.88), rgba(235,234,255,.76));
}

.pro-component-summary-toggle {
  width: 100%;
  min-height: 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.pro-component-summary-copy {
  min-width: 0;
}

.pro-component-summary-copy strong {
  display: block;
  overflow: hidden;
  color: #153b78;
  font-size: 11px;
  line-height: 1.15;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pro-component-summary-copy small {
  display: block;
  margin-top: 3px;
  color: #6b7f99;
  font-size: 8px;
  line-height: 1;
  font-weight: 750;
}

.pro-component-summary-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 6px 9px;
  border: 1px solid rgba(101,123,255,.20);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.90), rgba(240,246,255,.80));
  color: #1d3f86;
  font-size: 8px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(17,24,39,.055), inset 0 1px 0 rgba(255,255,255,.65);
}

.pro-component-summary-action b {
  color: #2876d9;
  font-size: 10px;
}

.pro-component-summary-toggle:hover .pro-component-summary-action,
.pro-component-summary-toggle:focus-visible .pro-component-summary-action {
  border-color: rgba(48,104,230,.44);
  box-shadow: 0 9px 18px rgba(37,99,235,.12), inset 0 1px 0 rgba(255,255,255,.72);
}

.pro-component-detail-row[hidden] {
  display: none !important;
}

.pro-component-detail-row > td {
  padding: 12px !important;
  background: rgba(238,244,255,.78) !important;
  text-align: left !important;
}

.pro-component-query-shell {
  overflow: hidden;
  border: 1px solid rgba(81,108,199,.17);
  border-radius: 14px;
  background: rgba(255,255,255,.70);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}

.pro-component-query-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 11px;
  border-bottom: 1px solid rgba(81,108,199,.14);
  background: linear-gradient(90deg, rgba(247,251,255,.95), rgba(241,244,255,.86));
}

.pro-component-query-heading > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.pro-component-query-heading span {
  color: #6b7f99;
  font-size: 7.5px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.pro-component-query-heading strong {
  color: #173a70;
  font-size: 10px;
  font-weight: 900;
}

.pro-component-query-heading p {
  margin: 0;
  color: #647792;
  font-size: 8.5px;
  line-height: 1.25;
  font-weight: 650;
}

.pro-component-query-table {
  min-width: 1040px;
}

.pro-component-query-table tbody > tr > th {
  text-align: left;
}

.pro-component-query-link {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.pro-component-query-index {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  min-height: 28px;
  padding: 5px 7px;
  border: 1px solid rgba(89,168,246,.38);
  border-radius: 10px;
  background: linear-gradient(135deg, #12244d, #315fd7 70%, #27a8c9);
  color: #fff;
  font-size: 8px;
  font-weight: 950;
  box-shadow: 0 7px 16px rgba(37,99,235,.18), inset 0 1px 0 rgba(255,255,255,.20);
}

.pro-component-query-copy {
  min-width: 0;
}

.pro-component-query-copy strong {
  display: block;
  color: #173a70;
  font-size: 9.5px;
  line-height: 1.25;
  font-weight: 850;
  white-space: normal;
}

.pro-component-query-copy small {
  display: block;
  margin-top: 2px;
  color: #73839a;
  font-size: 7.5px;
  font-weight: 700;
}

.pro-component-query-arrow {
  color: #2b74d5;
  font-size: 14px;
  font-weight: 900;
}

.pro-component-query-link:hover .pro-component-query-copy strong,
.pro-component-query-link:focus-visible .pro-component-query-copy strong {
  color: #174ea6;
}

.pro-component-performance-table .pro-sire-money,
.pro-component-query-table .pro-sire-money {
  font-size: 10px !important;
  font-weight: 950 !important;
}

.pro-component-performance-empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 24px;
  border: 1px dashed rgba(81,108,199,.28);
  border-radius: 16px;
  background: rgba(255,255,255,.64);
  color: #657894;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.pro-component-performance-empty.is-error {
  color: #b42335;
  border-color: rgba(180,35,53,.25);
}

@media (max-width: 1180px) {
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-outcome-rail-list {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: 1fr !important;
  }

  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-outcome-card {
    min-height: 152px !important;
  }

  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v3 {
    min-height: 390px !important;
  }

  .pro-component-report-summary {
    grid-template-columns: 1fr;
  }

  .pro-component-report-summary dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .pro-component-report-summary dl {
    grid-template-columns: 1fr;
  }

  .pro-component-query-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* ========================================================================== */
/* PRO CANVAS D4-H4C — final workspace and component polish                    */
/* Canonical query wording, simplified query rows, aligned evidence typography, */
/* and full-width matched workspace geometry.                                  */
/* ========================================================================== */

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-main-stage {
  flex: 0 0 auto !important;
  align-self: stretch !important;
  justify-self: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  box-sizing: border-box !important;
  grid-template-columns: minmax(420px, 27%) minmax(0, 1fr) !important;
  grid-template-rows: auto !important;
  justify-content: stretch !important;
  align-items: stretch !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-overview,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-control-deck {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 100% !important;
  box-sizing: border-box !important;
  align-self: stretch !important;
  justify-self: stretch !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-outcome-rail-list {
  height: 100% !important;
  min-height: 0 !important;
  grid-template-rows: repeat(3, minmax(152px, 1fr)) !important;
  align-content: stretch !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v3 {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 100% !important;
  min-height: 100% !important;
  box-sizing: border-box !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-main-inline {
  display: grid !important;
  grid-template-columns: auto auto minmax(0, 1fr) !important;
  gap: 8px !important;
  align-items: center !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-active-chip {
  min-width: 112px !important;
  height: 28px !important;
  padding: 0 12px !important;
  font-size: 10.5px !important;
  line-height: 28px !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-detail-link {
  width: 100% !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 5px 8px !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  background: transparent !important;
  color: #111827 !important;
  text-align: left !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-brief-copy {
  min-width: 0 !important;
  display: block !important;
  font-size: 11.75px !important;
  line-height: 1.28 !important;
  font-weight: 780 !important;
  white-space: normal !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-detail-arrow {
  color: #2a67ca !important;
  font-size: 15px !important;
  font-weight: 950 !important;
  transform: translateX(0) !important;
  transition: transform .16s ease !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-detail-link:hover,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-detail-link:focus-visible {
  border-color: rgba(59,130,246,.25) !important;
  background: linear-gradient(90deg, rgba(235,246,255,.82), rgba(244,243,255,.68)) !important;
  outline: none !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-detail-link:hover .pro-sire-query-detail-arrow,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-detail-link:focus-visible .pro-sire-query-detail-arrow {
  transform: translateX(3px) !important;
}

.pro-component-performance-table,
.pro-component-query-table {
  font-size: 12px !important;
}

.pro-component-performance-table thead th,
.pro-component-query-table thead th {
  padding: 10px 11px !important;
  font-size: 9.5px !important;
  line-height: 1.2 !important;
  text-align: center !important;
}

.pro-component-performance-table thead th:first-child,
.pro-component-query-table thead th:first-child {
  text-align: left !important;
}

.pro-component-performance-table thead th:last-child,
.pro-component-query-table thead th:last-child {
  text-align: right !important;
}

.pro-component-performance-table tbody > tr > th,
.pro-component-performance-table tbody > tr > td,
.pro-component-query-table tbody > tr > th,
.pro-component-query-table tbody > tr > td {
  padding: 10px 11px !important;
  font-size: 12px !important;
  line-height: 1.28 !important;
  text-align: center !important;
}

.pro-component-performance-table tbody > tr > th,
.pro-component-query-table tbody > tr > th {
  text-align: left !important;
}

.pro-component-performance-table tbody > tr > td:last-child,
.pro-component-query-table tbody > tr > td:last-child {
  text-align: right !important;
}

.pro-component-summary-copy strong {
  font-size: 12.5px !important;
}

.pro-component-summary-copy small {
  font-size: 9px !important;
}

.pro-component-summary-action {
  min-width: 112px !important;
  justify-content: center !important;
  font-size: 9px !important;
}

.pro-component-query-copy strong {
  font-size: 11.5px !important;
  line-height: 1.32 !important;
}

.pro-component-query-copy small {
  font-size: 8.5px !important;
}

.pro-component-query-index {
  min-width: 42px !important;
  min-height: 30px !important;
  font-size: 9px !important;
}

.pro-component-performance-table .pro-sire-money,
.pro-component-query-table .pro-sire-money {
  font-size: 12.5px !important;
}

.pro-component-group-header strong {
  font-size: 13px !important;
}

.pro-component-group-header span,
.pro-component-query-heading span {
  font-size: 8.5px !important;
}

.pro-component-query-heading strong {
  font-size: 11px !important;
}

.pro-component-query-heading p {
  font-size: 9.5px !important;
}

@media (max-width: 1500px) {
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-main-stage {
    grid-template-columns: minmax(390px, 32%) minmax(0, 1fr) !important;
  }
  .pro-component-performance-table,
  .pro-component-query-table {
    font-size: 11.5px !important;
  }
  .pro-component-query-copy strong {
    font-size: 11px !important;
  }
}

@media (max-width: 1180px) {
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-main-stage {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto !important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-outcome-rail-list {
    height: auto !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: 1fr !important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-control-deck {
    min-height: 390px !important;
  }
}

@media (max-width: 760px) {
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-outcome-rail-list {
    grid-template-columns: 1fr !important;
    grid-template-rows: repeat(3, minmax(152px, auto)) !important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-main-inline {
    grid-template-columns: auto auto minmax(180px, 1fr) !important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-active-chip {
    min-width: 104px !important;
    font-size: 10px !important;
  }
  .pro-component-performance-table,
  .pro-component-query-table {
    min-width: 960px !important;
  }
  .pro-component-report-summary-copy > strong {
    font-size: 17px !important;
  }
}


/* ========================================================================== */
/* PRO CANVAS D4-H4F — source consolidation and query identity                */
/* One authoritative two-column stage. The control deck now has one child and */
/* therefore uses normal block layout; historical internal grid tracks are     */
/* deliberately removed from styles.css and the earlier Canvas rules.          */
/* ========================================================================== */

#proSireQueryGridPanel.pro-sire-workspace-root.pro-sire-workspace-open {
  align-items: stretch !important;
  justify-items: stretch !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open > .pro-sire-workspace-main-stage {
  display: grid !important;
  flex: 0 0 auto !important;
  align-self: stretch !important;
  justify-self: stretch !important;
  width: 100% !important;
  inline-size: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  box-sizing: border-box !important;
  grid-template-columns: minmax(420px, 27%) minmax(0, 1fr) !important;
  grid-template-rows: auto !important;
  gap: 12px !important;
  justify-content: stretch !important;
  align-items: stretch !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open > .pro-sire-workspace-main-stage > .pro-sire-workspace-overview {
  grid-column: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  align-self: stretch !important;
  justify-self: stretch !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open > .pro-sire-workspace-main-stage > .pro-sire-workspace-control-deck {
  grid-column: 2 / -1 !important;
  display: block !important;
  grid-template-columns: none !important;
  grid-template-rows: none !important;
  width: 100% !important;
  inline-size: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 100% !important;
  box-sizing: border-box !important;
  align-self: stretch !important;
  justify-self: stretch !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open > .pro-sire-workspace-main-stage > .pro-sire-workspace-control-deck > .pro-sire-control-deck-card-v3 {
  width: 100% !important;
  inline-size: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 100% !important;
  min-height: 100% !important;
  box-sizing: border-box !important;
  align-self: stretch !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-main-inline {
  grid-template-columns: auto auto minmax(0, 1fr) auto !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-brief {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 4px 2px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #111827 !important;
  text-align: left !important;
  cursor: default !important;
  box-shadow: none !important;
  pointer-events: none !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-detail-open {
  min-width: 112px !important;
  height: 28px !important;
  padding: 0 12px !important;
  border: 1px solid rgba(49,95,215,.24) !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, #ffffff, #eef5ff) !important;
  color: #174ea6 !important;
  font-size: 10px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: .01em !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  box-shadow: 0 5px 12px rgba(37,99,235,.08) !important;
  transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-detail-open:hover,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-detail-open:focus-visible {
  border-color: rgba(37,99,235,.48) !important;
  background: linear-gradient(135deg, #eaf6ff, #eef0ff) !important;
  color: #123b8f !important;
  outline: none !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 8px 16px rgba(37,99,235,.14) !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-breeding-query-detail-button,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-detail-arrow,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-detail-link {
  display: none !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-table-tools [data-pro-sire-apply-changes-trigger]:disabled,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-table-tools [data-pro-sire-apply-changes-trigger][aria-disabled="true"] {
  background: #dbe8ef !important;
  color: #7c95a8 !important;
  border: 1px solid #cbd5e1 !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  filter: none !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-table-tools [data-pro-sire-apply-changes-trigger].is-dirty:not(:disabled) {
  background: linear-gradient(135deg, #16a34a, #0ea5e9) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  opacity: 1 !important;
  cursor: pointer !important;
  box-shadow: 0 12px 28px rgba(14,165,233,.28) !important;
  filter: none !important;
}

@media (max-width: 1500px) {
  #proSireQueryGridPanel.pro-sire-workspace-open > .pro-sire-workspace-main-stage {
    grid-template-columns: minmax(390px, 32%) minmax(0, 1fr) !important;
  }
}

@media (max-width: 1180px) {
  #proSireQueryGridPanel.pro-sire-workspace-open > .pro-sire-workspace-main-stage {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto !important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open > .pro-sire-workspace-main-stage > .pro-sire-workspace-overview,
  #proSireQueryGridPanel.pro-sire-workspace-open > .pro-sire-workspace-main-stage > .pro-sire-workspace-control-deck {
    grid-column: 1 !important;
  }
}

@media (max-width: 760px) {
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-main-inline {
    grid-template-columns: auto auto minmax(0, 1fr) !important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-detail-open {
    grid-column: 3 !important;
    justify-self: end !important;
    min-width: 84px !important;
    padding-inline: 10px !important;
    font-size: 9px !important;
  }
}

/* ========================================================================== */
/* PRO CANVAS PHASE 2 M1 — full-screen Companion Dashboard launch             */
/* ========================================================================== */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-entity-host {
  flex-direction: column !important;
  gap: 6px !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open #proBreedingEntityTabs {
  order: 1 !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-companion-launch-button {
  order: 2 !important;
  align-self: flex-end !important;
  min-height: 28px !important;
  padding: 5px 11px !important;
  border-color: rgba(255, 255, 255, .44) !important;
  background: rgba(255, 255, 255, .90) !important;
  color: #17306a !important;
  box-shadow: 0 7px 16px rgba(12, 32, 92, .14) !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-companion-launch-button:hover {
  transform: translateY(-1px) !important;
  border-color: rgba(78, 111, 227, .48) !important;
  box-shadow: 0 9px 20px rgba(12, 32, 92, .18) !important;
}

@media (max-width: 1280px) {
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-companion-launch-button {
    align-self: center !important;
  }
}

/* ========================================================================== */
/* PRO CANVAS PHASE 2 M1A — workspace CTA and rule-family contrast polish     */
/* ========================================================================== */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-apply-primary,
#proSireQueryGridPanel.pro-sire-workspace-open [data-pro-sire-apply-changes-trigger] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: 1.05 !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-apply-row #proSireApplyRuleActivationButton,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-apply-row .pro-sire-apply-mirror {
  min-height: 38px !important;
  height: 38px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family-chip.is-active,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family-chip[aria-pressed="true"] {
  color: #ffffff !important;
  text-shadow: none !important;
  font-weight: 950 !important;
  -webkit-font-smoothing: antialiased !important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family[data-rule-family="win"] .pro-sire-rule-activation-family-chip.is-active,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family[data-rule-family="win"] .pro-sire-rule-activation-family-chip[aria-pressed="true"] {
  background: #3b82f6 !important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family[data-rule-family="zero"] .pro-sire-rule-activation-family-chip.is-active,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family[data-rule-family="zero"] .pro-sire-rule-activation-family-chip[aria-pressed="true"] {
  background: #d97706 !important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family[data-rule-family="ae"] .pro-sire-rule-activation-family-chip.is-active,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family[data-rule-family="ae"] .pro-sire-rule-activation-family-chip[aria-pressed="true"] {
  background: #8b5cf6 !important;
}


/* ========================================================================== */
/* PRO CANVAS M1D — Rule Activation home, visible Pause/Restore, overlap split */
/* ========================================================================== */

/* The first visit to each entity opens Rule Activation. Subsequent tab choices
   are retained by the existing entity state bank. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-panel-activation.is-active {
  display: block !important;
  overflow: auto !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-hub {
  height: 100% !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: auto minmax(118px, .8fr) auto minmax(178px, 1.2fr) !important;
  gap: 12px !important;
  overflow: auto !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-pause-section {
  min-height: 118px !important;
  display: grid !important;
  grid-template-columns: minmax(260px, .75fr) minmax(520px, 1.25fr) !important;
  gap: 16px !important;
  align-items: center !important;
  padding: 14px 16px !important;
  border: 1px solid rgba(56, 105, 210, .22) !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, rgba(239, 247, 255, .96), rgba(247, 252, 255, .94)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8) !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-pause-copy {
  display: grid !important;
  gap: 6px !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-pause-copy strong {
  color: #123a72 !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-pause-copy span {
  color: #5b6f8f !important;
  font-size: 11px !important;
  line-height: 1.4 !important;
  font-weight: 650 !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-pause-bar {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-pause-bar .btn {
  width: 100% !important;
  min-height: 42px !important;
  height: 42px !important;
  border-radius: 13px !important;
  font-size: 11.5px !important;
  font-weight: 900 !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-pause-bar [data-pro-sire-family-pause="win"] {
  background: #eaf3ff !important;
  border-color: #82b5ff !important;
  color: #154f9d !important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-pause-bar [data-pro-sire-family-pause="zero"] {
  background: #fff4da !important;
  border-color: #e8b95a !important;
  color: #8b5100 !important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-pause-bar [data-pro-sire-family-pause="ae"] {
  background: #f2eaff !important;
  border-color: #b69bff !important;
  color: #6537b5 !important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-pause-bar .btn.is-paused {
  background: linear-gradient(135deg, #172554, #315fd7 72%, #10a7c4) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .18) !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-divider {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: #64748b !important;
  font-size: 9.5px !important;
  font-weight: 900 !important;
  letter-spacing: .12em !important;
  text-transform: uppercase !important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-divider::before,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-divider::after {
  content: "" !important;
  height: 1px !important;
  flex: 1 1 auto !important;
  background: rgba(75, 106, 180, .18) !important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-grid-v2 {
  min-height: 178px !important;
  grid-template-rows: 72px 88px !important;
  overflow: visible !important;
}

/* Active family buttons must retain white text over the family colour. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family-chip.is-active,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family-chip[aria-pressed="true"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family-chip.is-active *,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family-chip[aria-pressed="true"] * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .15) !important;
}

@media (max-width: 1180px) {
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-hub {
    grid-template-rows: auto auto auto auto !important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-pause-section {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-pause-bar {
    grid-template-columns: 1fr !important;
  }
}
