/* Professional Systems Builder — Phase 2B preparation, summary and carry-forward refinement */

/* -------------------------------------------------------------------------- */
/* Command-header refinements                                                  */
/* -------------------------------------------------------------------------- */
body.pro-canvas-shell-active .pro-canvas-command-future {
  gap: 7px;
  padding-right: 10px;
}
body.pro-canvas-shell-active .pro-canvas-command-future .pro-ui-button.is-header-future {
  min-width: 78px;
  min-height: 40px;
  padding: 0 13px;
  border-style: solid;
  border-color: rgba(202, 225, 255, .30);
  color: rgba(243, 248, 255, .88);
  background:
    linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.08));
  box-shadow:
    0 7px 18px rgba(2,8,23,.12),
    inset 0 1px 0 rgba(255,255,255,.18);
  font-size: 10px;
  letter-spacing: .02em;
}
body.pro-canvas-shell-active .pro-canvas-command-future .pro-ui-button.is-header-future:hover,
body.pro-canvas-shell-active .pro-canvas-command-future .pro-ui-button.is-header-future:focus-visible {
  border-color: rgba(205,231,255,.42);
  background: linear-gradient(180deg, rgba(255,255,255,.20), rgba(255,255,255,.11));
}
body.pro-canvas-shell-active .pro-canvas-command-state b,
body.pro-canvas-shell-active .pro-canvas-command-state em,
body.pro-canvas-shell-active .pro-canvas-command-state small {
  padding: 4px 10px;
  font-size: 8.8px;
}
body.pro-canvas-shell-active .pro-canvas-command-actions > .pro-ui-button.is-reset {
  color: #fff;
  border-color: rgba(255,170,190,.50);
  background: linear-gradient(135deg, rgba(166,48,78,.92), rgba(220,86,116,.92));
  box-shadow: 0 8px 18px rgba(110,25,50,.18), inset 0 1px 0 rgba(255,255,255,.20);
}
body.pro-canvas-shell-active .pro-canvas-command-actions > .pro-ui-button.is-reset:hover,
body.pro-canvas-shell-active .pro-canvas-command-actions > .pro-ui-button.is-reset:focus-visible {
  border-color: rgba(255,196,208,.70);
  background: linear-gradient(135deg,#bd3e60,#e16a80);
}

/* -------------------------------------------------------------------------- */
/* Population-stage hierarchy                                                  */
/* -------------------------------------------------------------------------- */
body.pro-canvas-shell-active .pro-canvas-stage-intro-main {
  display: block;
}
body.pro-canvas-shell-active .pro-canvas-stage-intro-copy {
  width: 100%;
}
body.pro-canvas-shell-active .pro-canvas-stage-intro-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
body.pro-canvas-shell-active .pro-canvas-stage-intro-heading > span {
  min-width: 0;
}
body.pro-canvas-shell-active .pro-canvas-stage-intro-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
body.pro-canvas-shell-active .pro-canvas-stage-intro-meta b,
body.pro-canvas-shell-active .pro-canvas-stage-intro-meta em {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid rgba(75,113,200,.17);
  border-radius: 999px;
  padding: 0 9px;
  color: #35558e;
  background: rgba(255,255,255,.66);
  font-size: 8.8px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}
body.pro-canvas-shell-active .pro-canvas-stage-intro-meta em {
  color: #6a7c96;
  font-weight: 760;
}
body.pro-canvas-shell-active .pro-canvas-stage-actions.is-population-stage {
  grid-template-columns: minmax(120px,.55fr) minmax(170px,.85fr) minmax(360px,3fr);
}
body.pro-canvas-shell-active .pro-canvas-stage-action.is-guide {
  padding-inline: 14px;
}
body.pro-canvas-shell-active .pro-canvas-stage-guidance {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 11px;
  border-radius: 11px;
  background: rgba(255,255,255,.68);
}
body.pro-canvas-shell-active .pro-canvas-stage-guidance strong {
  flex: 0 0 auto;
  font-size: 9.5px;
}
body.pro-canvas-shell-active .pro-canvas-stage-guidance span {
  font-size: 9.2px;
  line-height: 1.25;
}

/* Selected filters should read as state, not as primary actions. */
body.pro-canvas-shell-active.pro-canvas-population-stage-active section.section[data-pro-population-section] .chip.selected {
  color: var(--pro-section-accent) !important;
  border-color: var(--pro-section-line) !important;
  background:
    linear-gradient(135deg, var(--pro-section-soft), rgba(255,255,255,.90)) !important;
  box-shadow:
    0 6px 14px rgba(29,45,86,.055),
    inset 0 0 0 1px rgba(255,255,255,.46),
    inset 0 1px 0 rgba(255,255,255,.88) !important;
}
body.pro-canvas-shell-active.pro-canvas-population-stage-active section.section[data-pro-population-section] .chip.selected::before {
  content: "✓";
  margin-right: 5px;
  color: var(--pro-section-accent);
  font-size: 9px;
  font-weight: 950;
}
body.pro-canvas-shell-active.pro-canvas-population-stage-active section.section[data-pro-population-section] .chip.selected:hover:not(.disabled) {
  color: var(--pro-section-accent) !important;
  background:
    linear-gradient(135deg, var(--pro-section-soft), rgba(255,255,255,.76)) !important;
  box-shadow: 0 8px 18px var(--pro-section-soft), inset 0 1px 0 rgba(255,255,255,.92) !important;
}

/* -------------------------------------------------------------------------- */
/* Working-population summary overlay                                          */
/* -------------------------------------------------------------------------- */
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary {
  background: rgba(7,16,35,.58);
  backdrop-filter: blur(13px) saturate(118%);
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .quick-report-layout {
  width: min(1540px, calc(100vw - 44px));
  height: min(94vh, 1260px);
  max-width: 1540px;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .report-navigator-panel {
  display: none !important;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .quick-report-window {
  min-width: 0;
  border: 1px solid rgba(101,139,232,.28);
  border-radius: 24px;
  background:
    radial-gradient(circle at 97% 0%, rgba(34,211,238,.10), transparent 28%),
    radial-gradient(circle at 4% 100%, rgba(124,58,237,.08), transparent 30%),
    linear-gradient(180deg, rgba(250,253,255,.98), rgba(241,247,255,.97));
  box-shadow: 0 32px 86px rgba(8,18,40,.30), inset 0 1px 0 rgba(255,255,255,.92);
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .quick-report-window-header,
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-detailed-report .quick-report-window-header {
  display: grid !important;
  min-height: 78px;
  grid-template-columns: minmax(0,1fr) auto !important;
  gap: 18px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(82,119,214,.17);
  background:
    radial-gradient(circle at 95% -40%, rgba(34,211,238,.14), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,.91), rgba(247,250,255,.79));
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .quick-report-window-header > div:first-child,
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-detailed-report .quick-report-window-header > div:first-child {
  min-width: 0;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .quick-report-window-kicker,
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-detailed-report .quick-report-window-kicker {
  color: #3d62a4;
  font-size: 8.5px;
  font-weight: 950;
  letter-spacing: .16em;
  text-transform: uppercase;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .quick-report-window-header h2,
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-detailed-report .quick-report-window-header h2 {
  margin-top: 4px;
  color: #10213d;
  font-size: clamp(22px,1.7vw,30px);
  line-height: 1;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .quick-report-window-market-slot,
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-detailed-report .quick-report-window-market-slot {
  display: none !important;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .quick-report-window-actions,
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-detailed-report .quick-report-window-actions {
  grid-column: 2 !important;
  justify-self: end !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 0 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-detailed-report #quickOverlaySignals,
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-detailed-report #quickOverlaySireWorkspace,
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-detailed-report #quickOverlayDetailed,
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-detailed-report #quickOverlayRaceRules,
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-detailed-report #quickOverlayRunnerSelection,
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-detailed-report #quickOverlayRaceUniverse {
  display: none !important;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary #quickOverlayClose,
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-detailed-report #quickOverlayClose {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 10.5px;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .quick-report-window-body {
  padding: 14px 16px 22px;
  gap: 12px;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .quick-status-bar {
  min-height: 34px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 11px;
  font-size: 10px;
  line-height: 1.35;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .pro-canvas-baseline-note {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(45,121,200,.22);
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(225,242,255,.88), rgba(242,247,255,.86));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.86);
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .pro-canvas-baseline-note[hidden] {
  display: none !important;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .pro-canvas-baseline-note span {
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  color: #fff;
  background: linear-gradient(135deg,#1f6fa9,#4468c7);
  font-size: 8.5px;
  font-weight: 950;
  letter-spacing: .10em;
  text-transform: uppercase;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .pro-canvas-baseline-note strong {
  color: #244263;
  font-size: 10.5px;
  line-height: 1.35;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .quick-report-card {
  margin: 0;
  border-radius: 16px;
  padding: 12px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 10px 24px rgba(24,39,78,.065), inset 0 1px 0 rgba(255,255,255,.90);
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .quick-report-card > .card-title {
  margin-bottom: 8px;
  color: #38517a;
  font-size: 9px;
  letter-spacing: .10em;
  text-transform: uppercase;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .quick-report-card:has(#overlaySummary) > .card-title {
  display: none;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .quick-report-card:has(#overlaySummary) {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .summary-hero.compact {
  min-height: 0;
  margin-bottom: 10px;
  padding: 11px 13px;
  border-radius: 13px;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .summary-hero.compact strong {
  font-size: 18px;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .summary-hero.compact p {
  font-size: 10px;
  line-height: 1.35;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .summary-performance-card {
  min-height: 0;
  border-radius: 18px;
  padding: 14px;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .summary-primary-toolbar {
  margin-bottom: 10px;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .summary-primary-heading-line h3 {
  font-size: clamp(20px,1.6vw,28px);
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .system-signals-review-button--summary {
  display: none !important;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .summary-performance-layout {
  gap: 10px;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .summary-pl-hero {
  min-height: 210px;
  padding: 13px;
  border-radius: 14px;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .summary-pl-value {
  font-size: clamp(34px,3.2vw,52px);
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .summary-performance-top-grid,
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .summary-performance-bottom-grid {
  gap: 8px;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .summary-market-tile {
  min-height: 98px;
  padding: 10px;
  border-radius: 13px;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .summary-market-tile .summary-market-tile-value {
  font-size: clamp(20px,1.7vw,29px);
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .year-card {
  margin-top: 0;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .quick-year-table-wrap {
  max-height: none;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary #overlayYearTable th,
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary #overlayYearTable td {
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 10px;
}

/* -------------------------------------------------------------------------- */
/* Operation tracker                                                           */
/* -------------------------------------------------------------------------- */
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .pro-canvas-operation-tracker.is-modal-mounted {
  margin: 0;
  border: 0;
  border-bottom: 1px solid rgba(78,116,214,.16);
  border-radius: 0;
  padding: 12px 16px 13px;
  background:
    radial-gradient(circle at 96% 0%, rgba(34,211,238,.11), transparent 30%),
    linear-gradient(180deg, rgba(246,250,255,.96), rgba(238,245,255,.90));
  box-shadow: none;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .pro-canvas-operation-head {
  margin-bottom: 9px;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .pro-canvas-operation-head strong {
  font-size: 14px;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .pro-canvas-operation-head em {
  font-size: 9.5px;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .pro-canvas-operation-steps {
  gap: 7px;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .pro-canvas-operation-step {
  min-height: 56px;
  border-radius: 12px;
  padding: 8px 9px;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .pro-canvas-operation-step > span {
  position: relative;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .pro-canvas-operation-step.is-running {
  color: #fff;
  border-color: rgba(82,113,229,.48);
  background:
    radial-gradient(circle at 96% 0%, rgba(34,211,238,.20), transparent 42%),
    linear-gradient(135deg,#17368e,#3768d8 60%,#168ea1);
  box-shadow: 0 10px 22px rgba(43,76,170,.20), inset 0 1px 0 rgba(255,255,255,.18);
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .pro-canvas-operation-step.is-running b,
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .pro-canvas-operation-step.is-running em {
  color: #fff;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .pro-canvas-operation-step.is-running > span {
  color: transparent;
  border: 2px solid rgba(255,255,255,.30);
  background: transparent;
  animation: none;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .pro-canvas-operation-step.is-running > span::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 2px solid rgba(255,255,255,.38);
  border-top-color: #fff;
  border-radius: 50%;
  animation: proCanvasPhase2bSpin .72s linear infinite;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .pro-canvas-operation-step.is-complete {
  border-color: rgba(21,158,112,.28);
  background: linear-gradient(180deg, rgba(235,253,246,.94), rgba(244,255,250,.88));
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .pro-canvas-operation-step.is-complete > span {
  background: linear-gradient(135deg,#12866f,#38b98e);
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .pro-canvas-operation-complete-action {
  margin-top: 10px;
  border: 1px solid rgba(29,160,117,.25);
  border-radius: 13px;
  padding: 11px 12px;
  background: linear-gradient(90deg, rgba(231,253,244,.94), rgba(239,248,255,.94));
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .pro-canvas-operation-complete-action strong {
  font-size: 13px;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .pro-canvas-operation-complete-action em {
  font-size: 9.5px;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .pro-canvas-operation-destinations button {
  min-height: 34px;
  border-radius: 11px;
  padding: 0 12px;
  font-size: 9.5px;
}
body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .pro-canvas-operation-destinations button.is-close {
  color: #fff;
  border-color: rgba(190,64,92,.40);
  background: linear-gradient(135deg,#b83f5c,#df687e);
}

@keyframes proCanvasPhase2bSpin { to { transform: rotate(360deg); } }

@media (max-width: 1100px) {
  body.pro-canvas-shell-active .pro-canvas-command-future .pro-ui-button.is-header-future {
    min-width: 64px;
    padding-inline: 8px;
  }
  body.pro-canvas-shell-active .pro-canvas-stage-actions.is-population-stage {
    grid-template-columns: minmax(110px,.65fr) minmax(150px,.9fr) minmax(260px,2.2fr);
  }
  body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .summary-performance-layout {
    grid-template-columns: 1fr;
  }
  body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .summary-pl-hero {
    min-height: 170px;
  }
}

@media (max-width: 760px) {
  body.pro-canvas-shell-active .pro-canvas-stage-intro-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  body.pro-canvas-shell-active .pro-canvas-stage-intro-meta {
    flex-wrap: wrap;
  }
  body.pro-canvas-shell-active .pro-canvas-stage-actions.is-population-stage {
    grid-template-columns: 1fr 1fr;
  }
  body.pro-canvas-shell-active .pro-canvas-stage-action.is-primary {
    grid-column: 1 / -1;
  }
  body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .quick-report-layout {
    width: calc(100vw - 18px);
    height: calc(100vh - 18px);
  }
  body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .quick-report-window-header {
    grid-template-columns: minmax(0,1fr) auto !important;
    padding: 11px 12px;
  }
  body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .pro-canvas-baseline-note {
    grid-template-columns: 1fr;
  }
  body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .summary-performance-top-grid,
  body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .summary-performance-bottom-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .pro-canvas-operation-complete-action {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.pro-canvas-shell-active #quickReportOverlay.pro-canvas-quick-summary .pro-canvas-operation-step.is-running > span::after {
    animation-duration: 1.4s;
  }
}
