/*
 * LIVE_RACING_002BL — Sire / Dam-sire comparison-table premium refinement.
 * Scope: Live Racing Sire Stats and Dam-sire Stats drilldowns only.
 * The Handicap Baseline remains in the summary card; the detailed table shows
 * today's seven metrics plus the single A/E comparison against that baseline.
 */

/* --------------------------------------------------------------------------
   MODAL COMMAND SHELL — shared evidence-page controls, slightly denser
   -------------------------------------------------------------------------- */
#liveHorseFormModal.is-sire-stats .horse-drilldown-modal-header{
  min-height:82px!important;
  margin:-24px -24px 12px!important;
  padding:13px 16px!important;
}
#liveHorseFormModal.is-sire-stats .horse-drilldown-modal-header h2{
  font-size:clamp(25px,1.85vw,38px)!important;
  margin:2px 0 1px!important;
}
#liveHorseFormModal.is-sire-stats .horse-drilldown-modal-header p{
  font-size:11.5px!important;
  line-height:1.2!important;
}
#liveHorseFormModal.is-sire-stats .horse-drilldown-actions{
  gap:6px!important;
  padding:5px!important;
  border-radius:16px!important;
}
#liveHorseFormModal.is-sire-stats .horse-drilldown-actions button{
  min-height:40px!important;
  padding:8px 13px!important;
  border-radius:11px!important;
  font-size:11.5px!important;
  font-weight:900!important;
}
#liveHorseFormModal.is-sire-stats .horse-drilldown-close{
  width:40px!important;
  min-width:40px!important;
  padding:0!important;
}

/* --------------------------------------------------------------------------
   SUMMARY + RUNNER RAIL — keep the canonical baseline once, at the top
   -------------------------------------------------------------------------- */
#liveHorseFormModal.is-sire-stats .sire-stats-summary-panel{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(410px,560px)!important;
  gap:16px!important;
  align-items:stretch!important;
  padding:16px 18px!important;
  border-radius:21px!important;
}
#liveHorseFormModal.is-sire-stats .sire-summary-main{
  align-self:center!important;
  padding:2px 0 2px 6px!important;
}
#liveHorseFormModal.is-sire-stats .sire-summary-main h3{
  margin:4px 0 6px!important;
  font-size:clamp(24px,1.75vw,36px)!important;
  line-height:1.02!important;
}
#liveHorseFormModal.is-sire-stats .sire-summary-main :is(.horse-profile-race-context-line,.trainer-runner-context){
  margin:4px 0!important;
  line-height:1.24!important;
}
#liveHorseFormModal.is-sire-stats .sire-baseline-card{
  align-self:stretch!important;
  padding:12px!important;
  border-radius:17px!important;
}
#liveHorseFormModal.is-sire-stats .sire-baseline-card .hp-career-head{
  margin-bottom:8px!important;
  gap:8px!important;
}
#liveHorseFormModal.is-sire-stats .sire-baseline-card .hp-career-record-inner-v2{
  grid-template-columns:minmax(82px,.8fr) minmax(220px,1.7fr) minmax(82px,.8fr)!important;
  gap:8px!important;
}
#liveHorseFormModal.is-sire-stats .sire-baseline-card :is(.hp-career-lead,.horse-profile-overall-grid div){
  min-height:58px!important;
  padding:7px 9px!important;
  border-radius:12px!important;
}
#liveHorseFormModal.is-sire-stats .sire-baseline-card .horse-profile-overall-grid{
  gap:7px!important;
}
#liveHorseFormModal.is-sire-stats .horse-context-strip{
  min-height:58px!important;
  margin:10px 0!important;
  padding:7px 10px!important;
  border-radius:15px!important;
}
#liveHorseFormModal.is-sire-stats .horse-context-runner-list button{
  min-height:40px!important;
  padding:6px 10px!important;
  border-radius:10px!important;
}

/* --------------------------------------------------------------------------
   BASIS + INTERPRETATION — premium but content-driven, not oversized
   -------------------------------------------------------------------------- */
#liveHorseFormModal.is-sire-stats .sire-stats-basis-banner{
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:14px!important;
  padding:12px 14px!important;
  border-radius:17px!important;
}
#liveHorseFormModal.is-sire-stats .hp-evidence-basis-copy strong{
  font-size:14px!important;
}
#liveHorseFormModal.is-sire-stats .hp-evidence-basis-copy :is(em,small){
  line-height:1.28!important;
}
#liveHorseFormModal.is-sire-stats .sire-race-actions{
  gap:7px!important;
  align-items:center!important;
}
#liveHorseFormModal.is-sire-stats :is(.hp-evidence-basis-button,.horse-profile-exclude-button){
  min-height:36px!important;
  padding:7px 11px!important;
  border-radius:10px!important;
}
#liveHorseFormModal.is-sire-stats .sire-today-dashboard{
  gap:12px!important;
  margin:12px 0!important;
}
#liveHorseFormModal.is-sire-stats .sire-today-dashboard :is(.hp-highlight-group,.hp-highlight-pair){
  gap:10px!important;
}
#liveHorseFormModal.is-sire-stats .sire-today-dashboard .hp-highlight-card{
  min-height:0!important;
  padding:12px!important;
  border-radius:16px!important;
}
#liveHorseFormModal.is-sire-stats .sire-today-dashboard .hp-highlight-card h4{
  margin:3px 0 8px!important;
}
#liveHorseFormModal.is-sire-stats .sire-today-dashboard .hp-highlight-card p{
  margin:0!important;
  min-height:0!important;
}

/* --------------------------------------------------------------------------
   SECTION + COMPACT 9-COLUMN COMPARISON TABLE
   -------------------------------------------------------------------------- */
#liveHorseFormModal.is-sire-stats .sire-stats-section-stack{
  gap:12px!important;
}
#liveHorseFormModal.is-sire-stats .sire-stats-section-card{
  border-radius:18px!important;
}
#liveHorseFormModal.is-sire-stats .sire-stats-section-card > header{
  min-height:43px!important;
  padding:9px 13px!important;
}
#liveHorseFormModal.is-sire-stats .sire-stats-section-card > header h3{
  font-size:15px!important;
}
#liveHorseFormModal.is-sire-stats .horse-profile-table-wrap{
  overflow:auto!important;
  scrollbar-width:thin!important;
  scrollbar-color:rgba(80,104,190,.34) transparent!important;
}
#liveHorseFormModal.is-sire-stats .sire-stats-table-compact{
  width:100%!important;
  min-width:860px!important;
  table-layout:fixed!important;
  border-collapse:separate!important;
  border-spacing:0!important;
}
#liveHorseFormModal.is-sire-stats .sire-stats-table-compact col.hp-col-check{width:34%!important;}
#liveHorseFormModal.is-sire-stats .sire-stats-table-compact col.hp-col-metric{width:7.25%!important;}
#liveHorseFormModal.is-sire-stats .sire-stats-table-compact col.hp-col-delta{width:15.25%!important;}

/* One continuous premium band. Individual cells no longer restart gradients. */
#liveHorseFormModal.is-sire-stats .sire-stats-table-compact thead{
  background:linear-gradient(110deg,#10233f 0%,#27479f 56%,#515dcc 100%)!important;
}
#liveHorseFormModal.is-sire-stats .sire-stats-table-compact thead tr:first-child{
  background:transparent!important;
}
#liveHorseFormModal.is-sire-stats .sire-stats-table-compact thead tr:first-child th{
  height:34px!important;
  padding:8px 9px!important;
  color:#fff!important;
  background:transparent!important;
  border-color:rgba(255,255,255,.12)!important;
  font-size:10px!important;
  font-weight:900!important;
  letter-spacing:.10em!important;
  text-transform:uppercase!important;
}
#liveHorseFormModal.is-sire-stats .sire-stats-table-compact thead tr:first-child th:first-child{
  background:rgba(8,24,53,.42)!important;
  text-align:left!important;
}
#liveHorseFormModal.is-sire-stats .sire-stats-table-compact thead tr:first-child .hp-head-diff{
  background:rgba(83,72,199,.24)!important;
  white-space:nowrap!important;
}
#liveHorseFormModal.is-sire-stats .sire-stats-table-compact thead tr:nth-child(2){
  background:linear-gradient(180deg,#f4f7fd,#eaf0fa)!important;
}
#liveHorseFormModal.is-sire-stats .sire-stats-table-compact thead tr:nth-child(2) th{
  height:32px!important;
  padding:7px 6px!important;
  color:#4b5f7b!important;
  background:transparent!important;
  border-color:rgba(92,113,198,.13)!important;
  font-size:9.5px!important;
  font-weight:750!important;
  letter-spacing:.03em!important;
  white-space:nowrap!important;
}
#liveHorseFormModal.is-sire-stats .sire-stats-table-compact thead tr:nth-child(2) .hp-emphasis-head{
  color:#183d84!important;
  font-weight:950!important;
}
#liveHorseFormModal.is-sire-stats .sire-stats-table-compact tbody th,
#liveHorseFormModal.is-sire-stats .sire-stats-table-compact tbody td{
  height:48px!important;
  padding:7px 8px!important;
  color:#43536a!important;
  background:rgba(255,255,255,.94)!important;
  border-color:rgba(89,109,190,.10)!important;
  font-size:10.5px!important;
  font-weight:620!important;
  vertical-align:middle!important;
}
#liveHorseFormModal.is-sire-stats .sire-stats-table-compact tbody tr:nth-child(even) th,
#liveHorseFormModal.is-sire-stats .sire-stats-table-compact tbody tr:nth-child(even) td{
  background:rgba(246,249,255,.96)!important;
}
#liveHorseFormModal.is-sire-stats .sire-stats-table-compact tbody tr:hover th,
#liveHorseFormModal.is-sire-stats .sire-stats-table-compact tbody tr:hover td{
  background:#eef6ff!important;
}
#liveHorseFormModal.is-sire-stats .sire-stats-table-compact tbody th{
  position:sticky!important;
  left:0!important;
  z-index:2!important;
  text-align:left!important;
  box-shadow:1px 0 0 rgba(85,107,193,.12)!important;
}
#liveHorseFormModal.is-sire-stats .sire-stats-table-compact .horse-profile-stat-label{
  display:block!important;
  margin-bottom:3px!important;
  color:#15253e!important;
  font-size:11.5px!important;
  line-height:1.18!important;
  font-weight:900!important;
}
#liveHorseFormModal.is-sire-stats .sire-stats-table-compact tbody th small{
  display:block!important;
  color:#72839b!important;
  font-size:9px!important;
  line-height:1.22!important;
  font-weight:600!important;
}
#liveHorseFormModal.is-sire-stats .sire-stats-table-compact td.hp-num{
  text-align:right!important;
  font-variant-numeric:tabular-nums!important;
}
#liveHorseFormModal.is-sire-stats .sire-stats-table-compact :is(.hp-cell-win-pct,.hp-cell-ae){
  color:#173e82!important;
  font-weight:950!important;
}
#liveHorseFormModal.is-sire-stats .sire-stats-table-compact .sire-wvexp-cell{
  color:#51627a!important;
  font-weight:760!important;
}
#liveHorseFormModal.is-sire-stats .sire-stats-table-compact .hp-delta-single{
  border-left:1px solid rgba(77,94,187,.20)!important;
  color:#465a77!important;
  background:linear-gradient(180deg,rgba(239,244,255,.96),rgba(230,238,253,.92))!important;
  font-size:11px!important;
  font-weight:950!important;
}
#liveHorseFormModal.is-sire-stats .sire-stats-table-compact .hp-delta-single.is-positive{
  color:#116b70!important;
  background:linear-gradient(180deg,rgba(232,252,250,.96),rgba(219,246,243,.92))!important;
}
#liveHorseFormModal.is-sire-stats .sire-stats-table-compact .hp-delta-single.is-negative{
  color:#a4512d!important;
  background:linear-gradient(180deg,rgba(255,248,237,.98),rgba(255,239,219,.92))!important;
}
#liveHorseFormModal.is-sire-stats .sire-stats-table-compact .hp-delta-single.is-neutral,
#liveHorseFormModal.is-sire-stats .sire-stats-table-compact .hp-delta-single.is-unavailable{
  color:#718198!important;
}

/* --------------------------------------------------------------------------
   VIEWPORT MATRIX — table stays local; page/modal never widens
   -------------------------------------------------------------------------- */
@media(max-width:1600px){
  #liveHorseFormModal.is-sire-stats .sire-stats-summary-panel{
    grid-template-columns:minmax(0,1fr) minmax(380px,500px)!important;
    gap:13px!important;
    padding:14px 16px!important;
  }
  #liveHorseFormModal.is-sire-stats .sire-baseline-card .hp-career-record-inner-v2{
    grid-template-columns:76px minmax(200px,1fr) 76px!important;
  }
  #liveHorseFormModal.is-sire-stats .sire-stats-table-compact{
    min-width:820px!important;
  }
}
@media(max-width:1180px){
  #liveHorseFormModal.is-sire-stats .sire-stats-summary-panel{
    grid-template-columns:1fr!important;
  }
  #liveHorseFormModal.is-sire-stats .sire-stats-basis-banner{
    grid-template-columns:1fr!important;
  }
  #liveHorseFormModal.is-sire-stats .sire-race-actions{
    justify-content:flex-start!important;
    flex-wrap:wrap!important;
  }
  #liveHorseFormModal.is-sire-stats .sire-today-dashboard{
    grid-template-columns:1fr!important;
  }
}
@media(max-width:900px){
  #liveHorseFormModal.is-sire-stats .horse-drilldown-modal-header{
    min-height:0!important;
    margin:-16px -16px 10px!important;
    padding:12px!important;
  }
  #liveHorseFormModal.is-sire-stats .horse-drilldown-actions{
    width:100%!important;
    justify-content:flex-start!important;
    flex-wrap:wrap!important;
  }
  #liveHorseFormModal.is-sire-stats .sire-baseline-card .hp-career-record-inner-v2{
    grid-template-columns:1fr!important;
  }
  #liveHorseFormModal.is-sire-stats .sire-stats-table-compact{
    min-width:780px!important;
  }
}
@media(prefers-reduced-motion:reduce){
  #liveHorseFormModal.is-sire-stats .horse-drilldown-actions button,
  #liveHorseFormModal.is-sire-stats .sire-stats-table-compact tbody tr{
    transition:none!important;
  }
}
