/* PRO CANVAS PHASE 3 A2 — workflow state and operation UX */
:root {
  --pro-canvas-shell-height: 144px;
  --pro-canvas-shell-z: 2147483200;
}

.pro-canvas-shell {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--pro-canvas-shell-z);
  min-width: 0;
  color: #eef6ff;
  font-family: Inter, Arial, Helvetica, sans-serif;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .22);
}

.pro-canvas-shell[hidden] { display: none !important; }

.pro-canvas-command-header {
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(420px, 2fr) minmax(280px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 9px 24px;
  border-bottom: 1px solid rgba(118, 158, 246, .26);
  background:
    radial-gradient(circle at 88% 0%, rgba(34, 211, 238, .18), transparent 34%),
    radial-gradient(circle at 28% 130%, rgba(124, 58, 237, .30), transparent 48%),
    linear-gradient(132deg, rgba(6, 17, 39, .99), rgba(24, 47, 139, .97) 56%, rgba(41, 99, 213, .93));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}

.pro-canvas-command-left,
.pro-canvas-command-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pro-canvas-command-actions { justify-content: flex-end; }

.pro-canvas-command-title {
  min-width: 0;
  text-align: center;
}

.pro-canvas-command-title span {
  display: block;
  margin-bottom: 1px;
  color: #9ee9ff;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.pro-canvas-command-title strong {
  display: block;
  color: #fff;
  font-size: clamp(21px, 1.7vw, 29px);
  font-weight: 950;
  letter-spacing: -.035em;
  line-height: 1.02;
}

.pro-canvas-command-title em {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: rgba(226, 239, 255, .86);
  font-size: 10px;
  font-style: normal;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pro-canvas-shell-button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(202, 221, 255, .32);
  border-radius: 11px;
  background: rgba(255, 255, 255, .10);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
  transition: transform .14s ease, background .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.pro-canvas-shell-button:hover,
.pro-canvas-shell-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(185, 224, 255, .62);
  background: rgba(255, 255, 255, .17);
  outline: none;
  box-shadow: 0 8px 18px rgba(2, 8, 23, .22), inset 0 1px 0 rgba(255, 255, 255, .20);
}

.pro-canvas-shell-button.is-primary {
  border-color: rgba(94, 234, 212, .46);
  background: linear-gradient(135deg, #0f766e, #2563eb);
}

.pro-canvas-shell-button.is-muted {
  color: rgba(226, 232, 240, .72);
  cursor: help;
}

.pro-canvas-stage-nav {
  height: 76px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(152px, 1fr);
  gap: 7px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 18px 9px;
  border-bottom: 1px solid rgba(99, 125, 255, .22);
  background:
    radial-gradient(circle at 3% 20%, rgba(34, 211, 238, .11), transparent 24%),
    radial-gradient(circle at 94% 0%, rgba(124, 58, 237, .13), transparent 25%),
    linear-gradient(180deg, rgba(250, 253, 255, .98), rgba(237, 244, 255, .98));
  scrollbar-width: thin;
}

.pro-canvas-stage-button {
  min-width: 0;
  height: 58px;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border: 1px solid rgba(99, 125, 255, .18);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .88), rgba(247, 250, 255, .78));
  color: #263b63;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 6px 15px rgba(30, 41, 59, .06), inset 0 1px 0 rgba(255, 255, 255, .75);
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease, background .14s ease;
}

.pro-canvas-stage-button:hover,
.pro-canvas-stage-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(54, 102, 214, .44);
  outline: none;
  box-shadow: 0 10px 22px rgba(30, 64, 175, .12), inset 0 1px 0 rgba(255, 255, 255, .82);
}

.pro-canvas-stage-button.is-active {
  border-color: rgba(57, 189, 225, .58);
  background:
    radial-gradient(circle at 94% 4%, rgba(34, 211, 238, .22), transparent 40%),
    linear-gradient(143deg, #071b42, #183d91 58%, #5538a5);
  color: #fff;
  box-shadow: 0 12px 26px rgba(30, 64, 175, .22), inset 0 1px 0 rgba(255, 255, 255, .24);
}

.pro-canvas-stage-button.is-planned {
  opacity: .62;
  cursor: help;
}

.pro-canvas-stage-number {
  width: 31px;
  height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(99, 125, 255, .24);
  border-radius: 10px;
  background: rgba(236, 243, 255, .94);
  color: #1f4b92;
  font-size: 12px;
  font-weight: 950;
}

.pro-canvas-stage-button.is-active .pro-canvas-stage-number {
  border-color: rgba(125, 231, 255, .38);
  background: rgba(255, 255, 255, .13);
  color: #fff;
}

.pro-canvas-stage-copy { min-width: 0; }

.pro-canvas-stage-copy b,
.pro-canvas-stage-copy em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pro-canvas-stage-copy b {
  font-size: 11.5px;
  font-weight: 950;
  letter-spacing: .01em;
}

.pro-canvas-stage-copy em {
  margin-top: 3px;
  color: #687b99;
  font-size: 9px;
  font-style: normal;
  font-weight: 780;
}

.pro-canvas-stage-button.is-active .pro-canvas-stage-copy em { color: rgba(226, 239, 255, .86); }

.pro-canvas-operation-tracker {
  position: fixed;
  top: calc(var(--pro-canvas-shell-height) + 10px);
  left: 50%;
  z-index: calc(var(--pro-canvas-shell-z) + 2);
  width: min(1380px, calc(100vw - 34px));
  transform: translateX(-50%);
  padding: 13px 15px 14px;
  border: 1px solid rgba(79, 127, 227, .32);
  border-radius: 18px;
  background: rgba(249, 252, 255, .96);
  color: #10213d;
  box-shadow: 0 22px 56px rgba(15, 23, 42, .20), inset 0 1px 0 rgba(255, 255, 255, .84);
  backdrop-filter: blur(18px) saturate(135%);
}

.quick-report-window > .pro-canvas-operation-tracker.is-modal-mounted {
  position: relative;
  inset: auto;
  z-index: 8;
  flex: 0 0 auto;
  width: auto;
  margin: 0;
  transform: none;
  border-width: 0 0 1px;
  border-radius: 0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .10), inset 0 1px 0 rgba(255, 255, 255, .92);
}

.pro-canvas-operation-tracker.is-collapsed { padding-bottom: 12px; }
.pro-canvas-operation-tracker.is-collapsed .pro-canvas-operation-steps { display: none; }

.pro-canvas-operation-tracker[hidden] { display: none !important; }

.pro-canvas-operation-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.pro-canvas-operation-head span,
.pro-canvas-operation-head strong,
.pro-canvas-operation-head em { display: block; }
.pro-canvas-operation-head span { color: #526d94; font-size: 8.5px; font-weight: 950; letter-spacing: .15em; text-transform: uppercase; }
.pro-canvas-operation-head strong { margin-top: 2px; color: #10213d; font-size: 15px; font-weight: 950; }
.pro-canvas-operation-head em { margin-top: 2px; color: #5d708d; font-size: 10px; font-style: normal; font-weight: 700; }
.pro-canvas-operation-head button { border: 0; background: transparent; color: #315b9e; font-size: 10px; font-weight: 900; cursor: pointer; }
.pro-canvas-operation-head button[hidden] { display: none !important; }
.pro-canvas-operation-head button:disabled { cursor: default; opacity: .46; }

.pro-canvas-operation-steps {
  display: grid;
  grid-template-columns: repeat(var(--visible-operation-steps, 7), minmax(130px, 1fr));
  gap: 7px;
  overflow-x: auto;
}

.pro-canvas-operation-step[hidden] { display: none !important; }

.pro-canvas-operation-step {
  min-width: 0;
  min-height: 50px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 12px;
  background: #fff;
}

.pro-canvas-operation-step > span {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #eef2ff;
  color: #355794;
  font-size: 10px;
  font-weight: 950;
}

.pro-canvas-operation-step b,
.pro-canvas-operation-step em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pro-canvas-operation-step b { color: #293d5c; font-size: 9.5px; font-weight: 900; }
.pro-canvas-operation-step em { margin-top: 2px; color: #74839a; font-size: 8.5px; font-style: normal; font-weight: 760; }
.pro-canvas-operation-step.is-running { border-color: rgba(37, 99, 235, .46); background: #eff6ff; box-shadow: inset 0 -2px 0 rgba(37, 99, 235, .22); }
.pro-canvas-operation-step.is-running > span { background: #2563eb; color: #fff; animation: proCanvasStagePulse 1.1s ease-in-out infinite; }
.pro-canvas-operation-step.is-complete { border-color: rgba(22, 163, 74, .34); background: #f0fdf4; }
.pro-canvas-operation-step.is-complete > span { background: #16a34a; color: #fff; }
.pro-canvas-operation-step.is-skipped { opacity: .64; background: #f8fafc; }
.pro-canvas-operation-step.is-failed { border-color: rgba(220, 38, 38, .46); background: #fef2f2; }
.pro-canvas-operation-step.is-failed > span { background: #dc2626; color: #fff; }

@keyframes proCanvasStagePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 99, 235, .24); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(37, 99, 235, 0); }
}

.pro-breeding-apply-running-card {
  position: fixed;
  top: calc(var(--pro-canvas-shell-height) + 22px);
  left: 50%;
  z-index: calc(var(--pro-canvas-shell-z) + 30);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: min(620px, calc(100vw - 36px));
  padding: 15px 18px;
  border: 1px solid rgba(93, 196, 255, .48);
  border-radius: 18px;
  background: radial-gradient(circle at 92% 8%, rgba(34, 211, 238, .22), transparent 34%), linear-gradient(135deg, rgba(7, 25, 61, .985), rgba(37, 78, 188, .97) 58%, rgba(18, 151, 172, .94));
  box-shadow: 0 22px 58px rgba(6, 18, 48, .38), inset 0 1px 0 rgba(255, 255, 255, .24);
  color: #fff;
  opacity: 0;
  transform: translate(-50%, -10px) scale(.985);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
.pro-breeding-apply-running-card[hidden] { display: none !important; }
.pro-breeding-apply-running-card.is-visible { opacity: 1; transform: translate(-50%, 0) scale(1); }
.pro-breeding-apply-running-spinner { width: 32px; height: 32px; border: 3px solid rgba(255, 255, 255, .28); border-top-color: #fff; border-radius: 50%; animation: proCanvasApplySpin .82s linear infinite; }
.pro-breeding-apply-running-copy { min-width: 0; }
.pro-breeding-apply-running-copy span,
.pro-breeding-apply-running-copy strong,
.pro-breeding-apply-running-copy em { display: block; }
.pro-breeding-apply-running-copy span { color: #a5f3fc; font-size: 8.5px; font-weight: 950; letter-spacing: .15em; text-transform: uppercase; }
.pro-breeding-apply-running-copy strong { margin-top: 2px; color: #fff; font-size: 16px; font-weight: 950; }
.pro-breeding-apply-running-copy em { margin-top: 3px; overflow: hidden; color: rgba(235, 247, 255, .92); font-size: 10px; font-style: normal; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.pro-breeding-apply-running-card > b { min-width: 42px; color: #fff; font-size: 15px; font-weight: 950; text-align: right; }
@keyframes proCanvasApplySpin { to { transform: rotate(360deg); } }

body.pro-canvas-shell-active {
  --pro-canvas-content-top: calc(var(--pro-canvas-shell-height) + 20px);
}

body.pro-canvas-shell-active .app { grid-template-columns: 1fr !important; }
body.pro-canvas-shell-active .sidebar { display: none !important; }
body.pro-canvas-shell-active .main { width: 100%; max-width: none; padding: var(--pro-canvas-content-top) 26px 72px !important; }
body.pro-canvas-shell-active #page-builder > .topbar { display: none !important; }
body.pro-canvas-shell-active #mainBuilderOverviewDeck,
body.pro-canvas-shell-active .builder-sticky-actions { display: none !important; }
body.pro-canvas-shell-active .pro-canvas-stage-hidden { display: none !important; }


.pro-canvas-stage-intro[hidden] { display: none !important; }
.pro-canvas-stage-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  margin: 0 0 18px;
  padding: 18px 21px;
  border: 1px solid rgba(99, 125, 255, .20);
  border-radius: 22px;
  background:
    radial-gradient(circle at 93% 5%, rgba(34, 211, 238, .13), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, .92), rgba(239, 246, 255, .80) 62%, rgba(241, 239, 255, .72));
  box-shadow: 0 18px 42px rgba(28, 43, 84, .10), inset 0 1px 0 rgba(255, 255, 255, .72);
}

.pro-canvas-stage-intro-copy { min-width: 0; }
.pro-canvas-stage-intro-copy span { color: #4d68a0; font-size: 9px; font-weight: 950; letter-spacing: .15em; text-transform: uppercase; }
.pro-canvas-stage-intro-copy h2 { margin: 5px 0 4px; color: #10213d; font-size: clamp(22px, 2vw, 31px); line-height: 1.05; letter-spacing: -.035em; }
.pro-canvas-stage-intro-copy p { max-width: 950px; margin: 0; color: #536985; font-size: 12px; font-weight: 700; line-height: 1.45; }
.pro-canvas-stage-intro-state { flex: 0 0 auto; min-width: 150px; padding: 10px 13px; border: 1px solid rgba(60, 108, 204, .22); border-radius: 14px; background: rgba(255, 255, 255, .76); text-align: right; }
.pro-canvas-stage-intro-state b,
.pro-canvas-stage-intro-state em { display: block; }
.pro-canvas-stage-intro-state b { color: #19468d; font-size: 12px; font-weight: 950; }
.pro-canvas-stage-intro-state em { margin-top: 3px; color: #71819a; font-size: 9px; font-style: normal; font-weight: 760; }

/* Keep the shared shell visible above the existing full-screen Sire/Dam-sire workspace. */
body.pro-canvas-shell-active #proSireQueryGridPanel.pro-sire-workspace-open {
  inset: var(--pro-canvas-shell-height) 0 0 0 !important;
  width: 100dvw !important;
  height: calc(100dvh - var(--pro-canvas-shell-height)) !important;
  padding-top: 10px !important;
}

/* The seven-stage shell is now the navigation authority. Remove duplicated controls. */
body.pro-canvas-shell-active #proSireQueryGridPanel.pro-sire-workspace-open #closeProSireWorkspaceButton,
body.pro-canvas-shell-active #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-entity-host,
body.pro-canvas-shell-active #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-actions .report-table-group-count {
  display: none !important;
}

body.pro-canvas-shell-active #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-top {
  grid-template-columns: minmax(420px, 1fr) auto !important;
  grid-template-areas: "title actions" !important;
  min-height: 74px !important;
  padding: 9px 15px !important;
}

body.pro-canvas-shell-active #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-title-block {
  grid-area: title !important;
  justify-self: start !important;
  width: min(900px, 100%) !important;
  max-width: 900px !important;
  text-align: left !important;
}

body.pro-canvas-shell-active #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-title-block p {
  margin: 0 !important;
}

body.pro-canvas-shell-active #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-actions {
  grid-area: actions !important;
  justify-self: end !important;
  align-self: center !important;
  width: auto !important;
}

@media (max-width: 1180px) {
  :root { --pro-canvas-shell-height: 146px; }
  .pro-canvas-command-header { grid-template-columns: auto minmax(300px, 1fr) auto; padding-inline: 14px; }
  .pro-canvas-command-title em { display: none; }
  .pro-canvas-stage-nav { grid-auto-columns: minmax(148px, 1fr); padding-inline: 10px; }
  body.pro-canvas-shell-active .main { padding-left: 15px !important; padding-right: 15px !important; }
  .pro-canvas-operation-steps { grid-template-columns: repeat(var(--visible-operation-steps, 7), minmax(128px, 1fr)); }
}

@media (max-width: 820px) {
  :root { --pro-canvas-shell-height: 150px; }
  .pro-canvas-command-header { grid-template-columns: auto minmax(210px, 1fr) auto; gap: 7px; padding-inline: 9px; }
  .pro-canvas-command-title span { display: none; }
  .pro-canvas-command-title strong { font-size: 18px; }
  .pro-canvas-command-actions .is-muted { display: none; }
  .pro-canvas-shell-button { min-height: 34px; padding-inline: 10px; font-size: 10px; }
  .pro-canvas-stage-nav { grid-auto-columns: 144px; }
  .pro-canvas-stage-intro { align-items: flex-start; flex-direction: column; }
  .pro-canvas-stage-intro-state { width: 100%; text-align: left; }
  body.pro-canvas-shell-active #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-top {
    grid-template-columns: 1fr !important;
    grid-template-areas: "title" "actions" !important;
  }
  body.pro-canvas-shell-active #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-actions { justify-self: start !important; }
}


@media (prefers-reduced-motion: reduce) {
  .pro-breeding-apply-running-spinner { animation: none; }
}


/* ========================================================================== 
   PRO CANVAS PACKAGE 1 — Canvas geometry, operation consistency and upstream guard
   Component-scoped only. Do not generalise these rules to Live Racing or other pages.
   ========================================================================== */

body.pro-canvas-shell-active .main {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
}
body.pro-canvas-shell-active #page-builder,
body.pro-canvas-shell-active #page-builder > .section,
body.pro-canvas-shell-active #page-builder > .pro-canvas-stage-intro {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
body.pro-canvas-shell-active #page-builder > .section {
  margin-bottom: 18px !important;
}

.pro-canvas-stage-intro {
  display: block;
  padding: 16px 18px 15px;
}
.pro-canvas-stage-intro-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.pro-canvas-stage-actions {
  display: grid;
  grid-template-columns: minmax(120px, .72fr) minmax(150px, .95fr) minmax(260px, 1.7fr);
  gap: 9px;
  margin-top: 14px;
}
.pro-canvas-stage-action {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid rgba(77, 104, 160, .22);
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(239,246,255,.80));
  color: #1d3f86;
  font-size: 10.5px;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(28,43,84,.08), inset 0 1px 0 rgba(255,255,255,.80);
}
.pro-canvas-stage-action:hover,
.pro-canvas-stage-action:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(37,99,235,.42);
  outline: none;
}
.pro-canvas-stage-action.is-primary {
  border-color: rgba(45,212,191,.44);
  background: linear-gradient(135deg, #0f766e, #0ea5e9 52%, #2563eb);
  color: #fff;
  box-shadow: 0 13px 28px rgba(14,165,233,.18), inset 0 1px 0 rgba(255,255,255,.22);
}
.pro-canvas-stage-action.is-guide { background: linear-gradient(180deg, rgba(240,253,250,.96), rgba(236,254,255,.86)); color: #0f766e; }
.pro-canvas-stage-action.is-secondary { color: #5b3e9d; background: linear-gradient(180deg, rgba(250,245,255,.96), rgba(241,239,255,.84)); }
.pro-canvas-stage-action:disabled { opacity: .58; cursor: wait; transform: none; }

.pro-canvas-stage-guidance {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 9px;
  padding: 8px 11px;
  border: 1px solid rgba(99,125,255,.16);
  border-radius: 11px;
  background: rgba(248,250,255,.72);
}
.pro-canvas-stage-guidance strong { flex: 0 0 auto; color: #23467f; font-size: 9.5px; font-weight: 950; text-transform: uppercase; letter-spacing: .08em; }
.pro-canvas-stage-guidance span { min-width: 0; color: #5c708c; font-size: 10px; font-weight: 730; }
.pro-canvas-stage-guidance.is-changed { border-color: rgba(245,158,11,.34); background: linear-gradient(90deg, rgba(255,247,237,.92), rgba(255,251,235,.74)); }
.pro-canvas-stage-guidance.is-changed strong { color: #a04a08; }
.pro-canvas-stage-guidance.is-current { border-color: rgba(16,185,129,.28); background: linear-gradient(90deg, rgba(236,253,245,.88), rgba(240,253,250,.72)); }
.pro-canvas-stage-guidance.is-current strong { color: #047857; }

/* Race Universe no longer opens on the old detached report/breeding command stack. */
body.pro-canvas-shell-active #builder-actions { display: none !important; }
body.pro-canvas-shell-active.pro-canvas-analysis-options-open[data-pro-canvas-stage="race-universe"] #builder-actions {
  display: block !important;
  border-color: rgba(99,125,255,.24) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.90), rgba(242,247,255,.82)) !important;
}
body.pro-canvas-shell-active.pro-canvas-analysis-options-open #builder-actions .section-header {
  min-height: 64px !important;
  padding: 12px 17px !important;
  background: linear-gradient(135deg, #143b85, #315bd5 60%, #6d45c2) !important;
}
body.pro-canvas-shell-active.pro-canvas-analysis-options-open #builder-actions .section-kicker { color: #b9f4ff !important; }
body.pro-canvas-shell-active.pro-canvas-analysis-options-open #builder-actions .section-title { color: #fff !important; }
body.pro-canvas-shell-active.pro-canvas-analysis-options-open #builder-actions .section-description { color: rgba(235,244,255,.90) !important; }
body.pro-canvas-shell-active.pro-canvas-analysis-options-open #builder-actions .section-title { font-size: 20px !important; }
body.pro-canvas-shell-active.pro-canvas-analysis-options-open #builder-actions .section-body { padding: 14px !important; }
body.pro-canvas-shell-active.pro-canvas-analysis-options-open #builder-actions .builder-action-grid.report-groups-layout { display: block !important; }
body.pro-canvas-shell-active.pro-canvas-analysis-options-open #builder-actions .report-control-card,
body.pro-canvas-shell-active.pro-canvas-analysis-options-open #builder-actions .pro-sire-analysis-card,
body.pro-canvas-shell-active.pro-canvas-analysis-options-open #builder-actions .system-management-card,
body.pro-canvas-shell-active.pro-canvas-analysis-options-open #builder-actions .polished-management-card { display: none !important; }
body.pro-canvas-shell-active.pro-canvas-analysis-options-open #builder-actions .report-table-groups-card {
  display: block !important;
  width: 100% !important;
  grid-column: auto !important;
  grid-row: auto !important;
  min-height: 0 !important;
}
body.pro-canvas-shell-active.pro-canvas-analysis-options-open #builder-actions .report-table-groups-card .report-table-groups-list {
  grid-template-columns: repeat(2, minmax(260px, 1fr)) !important;
}

/* The stage bar is the only breeding navigation authority. */
body.pro-canvas-shell-active #builder-actions .pro-sire-analysis-card,
body.pro-canvas-shell-active #builder-actions .pro-sire-workspace-launch { display: none !important; }

.quick-report-overlay.pro-canvas-operation-locked .quick-report-window {
  box-shadow: 0 28px 80px rgba(15,23,42,.34), 0 0 0 2px rgba(37,99,235,.12) !important;
}
#quickOverlayClose.is-operation-locked,
#quickOverlayClose:disabled {
  background: linear-gradient(180deg, #e8eef7, #dbe5f2) !important;
  color: #64748b !important;
  border-color: #cbd5e1 !important;
  cursor: wait !important;
  box-shadow: none !important;
}

.pro-canvas-upstream-dialog[hidden] { display: none !important; }
.pro-canvas-upstream-dialog {
  position: fixed;
  inset: 0;
  z-index: calc(var(--pro-canvas-shell-z) + 80);
  display: grid;
  place-items: center;
  padding: 24px;
}
.pro-canvas-upstream-backdrop { position: absolute; inset: 0; background: rgba(7,18,42,.62); backdrop-filter: blur(9px); }
.pro-canvas-upstream-panel {
  position: relative;
  width: min(720px, calc(100vw - 36px));
  padding: 23px;
  border: 1px solid rgba(83,170,244,.44);
  border-radius: 24px;
  background: radial-gradient(circle at 92% 4%, rgba(34,211,238,.20), transparent 39%), radial-gradient(circle at 4% 98%, rgba(147,93,255,.18), transparent 42%), linear-gradient(143deg, rgba(5,18,44,.99), rgba(24,53,132,.98) 54%, rgba(62,49,154,.96));
  color: #fff;
  box-shadow: 0 32px 90px rgba(5,12,32,.44), inset 0 1px 0 rgba(255,255,255,.25);
}
.pro-canvas-upstream-panel > span { color: #7deaff; font-size: 9px; font-weight: 950; letter-spacing: .16em; text-transform: uppercase; }
.pro-canvas-upstream-panel h3 { margin: 6px 0 8px; color: #fff; font-size: 24px; line-height: 1.08; }
.pro-canvas-upstream-panel p { margin: 0; color: rgba(226,239,255,.94); font-size: 12px; font-weight: 720; line-height: 1.5; }
.pro-canvas-upstream-impact { margin-top: 16px; padding: 13px 15px; border: 1px solid rgba(125,211,252,.22); border-radius: 15px; background: rgba(255,255,255,.08); }
.pro-canvas-upstream-impact b,
.pro-canvas-upstream-impact em { display: block; }
.pro-canvas-upstream-impact b { color: #fff; font-size: 10px; font-weight: 950; text-transform: uppercase; letter-spacing: .08em; }
.pro-canvas-upstream-impact em { margin-top: 5px; color: rgba(226,239,255,.90); font-size: 10.5px; font-style: normal; font-weight: 700; line-height: 1.45; }
.pro-canvas-upstream-actions { display: grid; grid-template-columns: 1.45fr 1fr .72fr; gap: 9px; margin-top: 18px; }
.pro-canvas-upstream-actions button { min-height: 43px; padding: 9px 13px; border: 1px solid rgba(202,221,255,.30); border-radius: 13px; background: rgba(255,255,255,.10); color: #fff; font-size: 10.5px; font-weight: 950; cursor: pointer; }
.pro-canvas-upstream-actions button.is-primary { border-color: rgba(94,234,212,.46); background: linear-gradient(135deg, #0f766e, #0ea5e9 55%, #2563eb); }
.pro-canvas-upstream-actions button.is-stay { background: rgba(255,255,255,.06); color: rgba(235,244,255,.88); }
.pro-canvas-upstream-actions button:hover { transform: translateY(-1px); border-color: rgba(185,224,255,.66); }

@media (max-width: 1000px) {
  .pro-canvas-stage-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pro-canvas-stage-guidance { align-items: flex-start; flex-direction: column; }
  body.pro-canvas-shell-active.pro-canvas-analysis-options-open #builder-actions .report-table-groups-card .report-table-groups-list { grid-template-columns: 1fr !important; }
}
@media (max-width: 720px) {
  .pro-canvas-stage-intro-main { align-items: flex-start; flex-direction: column; }
  .pro-canvas-stage-actions { grid-template-columns: 1fr; }
  .pro-canvas-upstream-actions { grid-template-columns: 1fr; }
}

/* Package 1 action-row states: reports stay out of first-use setup, then appear only after a committed population exists. */
.pro-canvas-stage-actions.has-analysis-setup {
  grid-template-columns: minmax(120px, .72fr) minmax(150px, .95fr) minmax(260px, 1.7fr) minmax(150px, .9fr);
}
.pro-canvas-stage-actions.has-analysis-run {
  grid-template-columns: minmax(110px, .65fr) minmax(135px, .82fr) minmax(230px, 1.45fr) minmax(135px, .82fr) minmax(150px, .9fr);
}
.pro-canvas-stage-action.is-analysis {
  border-color: rgba(99,102,241,.30);
  background: linear-gradient(135deg, #3346a8, #635bdb 54%, #7c3aed);
  color: #fff;
  box-shadow: 0 12px 24px rgba(79,70,229,.17), inset 0 1px 0 rgba(255,255,255,.20);
}
@media (max-width: 1000px) {
  .pro-canvas-stage-actions.has-analysis-setup,
  .pro-canvas-stage-actions.has-analysis-run { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .pro-canvas-stage-actions.has-analysis-setup,
  .pro-canvas-stage-actions.has-analysis-run { grid-template-columns: 1fr; }
}

/* ========================================================================== */
/* PRO CANVAS PHASE 3 A3-H1 — acceptance fixes                              */
/* ========================================================================== */

/* Dual-range controls remain draggable after the full-width Canvas remount. */
body.pro-canvas-shell-active .dual-range {
  touch-action: none;
  cursor: ew-resize;
}
body.pro-canvas-shell-active .dual-range input[type="range"]::-webkit-slider-thumb,
body.pro-canvas-shell-active .dual-range input[type="range"]::-moz-range-thumb {
  cursor: ew-resize !important;
}

/* Completed operations remain fully visible until the user continues or closes. */
.pro-canvas-operation-tracker.is-terminal {
  border-color: rgba(22,163,74,.34);
  background: linear-gradient(180deg, rgba(248,255,251,.98), rgba(240,253,244,.94));
}
.pro-canvas-operation-tracker.is-terminal.is-failed {
  border-color: rgba(220,38,38,.38);
  background: linear-gradient(180deg, rgba(255,250,250,.98), rgba(254,242,242,.94));
}
.pro-canvas-operation-tracker.is-terminal .pro-canvas-operation-steps {
  display: grid !important;
}
.pro-canvas-operation-complete-action {
  display: flex;
  justify-content: flex-end;
  margin-top: 11px;
}
.pro-canvas-operation-complete-action[hidden] { display: none !important; }
.pro-canvas-operation-complete-action button {
  min-width: 250px;
  min-height: 42px;
  padding: 9px 22px;
  border: 1px solid rgba(45,212,191,.48);
  border-radius: 13px;
  background: linear-gradient(135deg, #047857, #10b981 52%, #0ea5e9);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 13px 28px rgba(16,185,129,.22), inset 0 1px 0 rgba(255,255,255,.24);
}
.pro-canvas-operation-complete-action button:hover,
.pro-canvas-operation-complete-action button:focus-visible {
  transform: translateY(-1px);
  outline: none;
  box-shadow: 0 16px 32px rgba(16,185,129,.27), inset 0 1px 0 rgba(255,255,255,.28);
}

/* The named operation tracker is the sole running/success narration. */
.quick-report-overlay.pro-canvas-operation-locked #overlayStatus,
.quick-report-overlay.pro-canvas-operation-complete #overlayStatus {
  display: none !important;
}
.quick-report-overlay.pro-canvas-operation-complete #quickOverlaySireWorkspace {
  display: none !important;
}

/* Analysis table selection is a real Stage 7 page, not an inserted Race Universe block. */
body.pro-canvas-shell-active[data-pro-canvas-stage="analysis"] #builder-actions {
  display: block !important;
  border-color: rgba(99,125,255,.24) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.90), rgba(242,247,255,.82)) !important;
}
body.pro-canvas-shell-active[data-pro-canvas-stage="analysis"] #builder-actions > .section-header {
  display: none !important;
}
body.pro-canvas-shell-active[data-pro-canvas-stage="analysis"] #builder-actions .section-body {
  padding: 14px !important;
}
body.pro-canvas-shell-active[data-pro-canvas-stage="analysis"] #builder-actions .builder-action-grid.report-groups-layout {
  display: block !important;
}
body.pro-canvas-shell-active[data-pro-canvas-stage="analysis"] #builder-actions .report-control-card,
body.pro-canvas-shell-active[data-pro-canvas-stage="analysis"] #builder-actions .pro-sire-analysis-card,
body.pro-canvas-shell-active[data-pro-canvas-stage="analysis"] #builder-actions .system-management-card,
body.pro-canvas-shell-active[data-pro-canvas-stage="analysis"] #builder-actions .polished-management-card {
  display: none !important;
}
body.pro-canvas-shell-active[data-pro-canvas-stage="analysis"] #builder-actions .report-table-groups-card {
  display: block !important;
  width: 100% !important;
  min-height: 0 !important;
  grid-column: auto !important;
  grid-row: auto !important;
}
body.pro-canvas-shell-active[data-pro-canvas-stage="analysis"] #builder-actions .report-table-groups-list {
  grid-template-columns: repeat(2, minmax(260px, 1fr)) !important;
}
.pro-canvas-stage-actions.is-analysis-stage {
  grid-template-columns: minmax(140px,.7fr) minmax(320px,1.7fr);
}

/* Experiment History fills the same control-deck height as the other tabs. */
body.pro-canvas-shell-active #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel-history,
body.pro-canvas-shell-active #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel-history.is-active {
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  align-self: stretch !important;
}
body.pro-canvas-shell-active #proSireQueryGridPanel .pro-sire-deck-panel-history .pro-experiment-history-compact-list {
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
}

@media (max-width: 1000px) {
  body.pro-canvas-shell-active[data-pro-canvas-stage="analysis"] #builder-actions .report-table-groups-list,
  .pro-canvas-stage-actions.is-analysis-stage { grid-template-columns: 1fr !important; }
}


/* C1R-H2: report and chart layers must sit above the fixed Pro Canvas command shell. */
body.pro-canvas-shell-active .quick-report-overlay { z-index:2147483643!important; }
body.pro-canvas-shell-active .race-profiler-utility-modal { z-index:2147483646!important; }
body.pro-canvas-shell-active .race-profiler-utility-close { z-index:2147483647!important; }

/* ========================================================================== */
/* PRO CANVAS PHASE 4 D2 — shared System Journey across Stages 3–7           */
/* ========================================================================== */

.pro-canvas-system-journey {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0 0 12px;
  padding: 11px;
  border: 1px solid rgba(91,119,237,.22);
  border-radius: 22px;
  background:
    radial-gradient(circle at 4% 0%, rgba(34,211,238,.10), transparent 25%),
    radial-gradient(circle at 96% 0%, rgba(124,58,237,.10), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,.88), rgba(242,247,255,.78));
  box-shadow:
    0 16px 36px rgba(28,43,84,.10),
    inset 0 1px 0 rgba(255,255,255,.72);
  -webkit-backdrop-filter: blur(16px) saturate(138%);
  backdrop-filter: blur(16px) saturate(138%);
}
.pro-canvas-system-journey[hidden] { display: none !important; }

.pro-canvas-journey-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  margin: 0 2px 9px;
}
.pro-canvas-journey-head > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.pro-canvas-journey-head > div:first-child > span {
  color: #4e6ca5;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pro-canvas-journey-head > div:first-child > strong {
  color: #10213d;
  font-size: 15px;
  line-height: 1;
  font-weight: 950;
  white-space: nowrap;
}
.pro-canvas-journey-head > div:first-child > em {
  overflow: hidden;
  color: #6d7f99;
  font-size: 9px;
  line-height: 1.2;
  font-style: normal;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pro-canvas-journey-identities {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}
.pro-canvas-journey-identities b {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border: 1px solid rgba(71,112,202,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: #31538d;
  font-size: 8px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}

.pro-canvas-journey-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(118px, auto);
  gap: 9px;
  min-width: 0;
}
.pro-canvas-journey-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr;
  min-width: 0;
  min-height: 118px;
  overflow: hidden;
  padding: 10px 11px 9px;
  border: 1px solid rgba(91,119,237,.20);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.92), rgba(239,246,255,.76) 62%, rgba(241,239,255,.68));
  box-shadow:
    0 9px 22px rgba(28,43,84,.08),
    inset 0 1px 0 rgba(255,255,255,.76);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.pro-canvas-journey-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 16px 0 0 16px;
  background: linear-gradient(180deg, #5df2ff, #4f8df7 55%, #a56cf2);
  opacity: .58;
}
.pro-canvas-journey-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding-left: 3px;
}
.pro-canvas-journey-card > header > div {
  min-width: 0;
}
.pro-canvas-journey-card > header span,
.pro-canvas-journey-card > header strong,
.pro-canvas-journey-card > header em {
  display: block;
}
.pro-canvas-journey-card > header span {
  color: #3d6990;
  font-size: 7px;
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.pro-canvas-journey-card > header strong {
  margin-top: 2px;
  overflow: hidden;
  color: #10213d;
  font-size: 11px;
  line-height: 1.08;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pro-canvas-journey-card > header em {
  flex: 0 1 auto;
  max-width: 48%;
  overflow: hidden;
  padding: 3px 7px;
  border: 1px solid rgba(71,112,202,.14);
  border-radius: 999px;
  background: rgba(255,255,255,.68);
  color: #61758f;
  font-size: 7px;
  line-height: 1;
  font-style: normal;
  font-weight: 880;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pro-canvas-journey-money {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  margin: 7px 0 6px 3px;
}
.pro-canvas-journey-money b {
  color: #10213d;
  font-size: 19px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -.025em;
}
.pro-canvas-journey-money span {
  color: #60738c;
  font-size: 7px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.pro-canvas-journey-money.is-positive b { color: #047857; }
.pro-canvas-journey-money.is-negative b { color: #c52a2a; }
.pro-canvas-journey-money.is-neutral b { color: #6f8096; }

.pro-canvas-journey-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  min-width: 0;
  align-self: end;
}
.pro-canvas-journey-metrics > span {
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid rgba(82,115,188,.14);
  border-radius: 9px;
  background: rgba(255,255,255,.56);
}
.pro-canvas-journey-metrics b,
.pro-canvas-journey-metrics em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pro-canvas-journey-metrics b {
  color: #17345f;
  font-size: 9px;
  line-height: 1.05;
  font-weight: 950;
}
.pro-canvas-journey-metrics em {
  margin-top: 2px;
  color: #6c7e96;
  font-size: 6.5px;
  line-height: 1;
  font-style: normal;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.pro-canvas-journey-card.is-after-breeding::before,
.pro-canvas-journey-card.is-combined-negative::before {
  background: linear-gradient(180deg, #2dd4bf, #0ea5e9 54%, #6366f1);
}
.pro-canvas-journey-card.is-sire-negative::before {
  background: linear-gradient(180deg, #60a5fa, #2563eb 58%, #4338ca);
}
.pro-canvas-journey-card.is-damsire-negative::before {
  background: linear-gradient(180deg, #c084fc, #7c3aed 58%, #4f46e5);
}
.pro-canvas-journey-card.is-final-system::before {
  width: 5px;
  background: linear-gradient(180deg, #5df2ff, #246bfd 48%, #8b5cf6 76%, #2dd4bf);
  opacity: .92;
}
.pro-canvas-journey-card.is-stage-highlight {
  z-index: 1;
  border-color: rgba(45,122,231,.52);
  box-shadow:
    0 14px 30px rgba(37,99,235,.16),
    0 0 0 2px rgba(56,189,248,.10),
    inset 0 1px 0 rgba(255,255,255,.86);
  transform: translateY(-1px);
}
.pro-canvas-journey-card.is-after-breeding.is-stage-highlight {
  border-color: rgba(13,148,136,.50);
  box-shadow: 0 14px 30px rgba(13,148,136,.15), 0 0 0 2px rgba(45,212,191,.10), inset 0 1px 0 rgba(255,255,255,.86);
}
.pro-canvas-journey-card.is-damsire-negative.is-stage-highlight {
  border-color: rgba(124,58,237,.48);
  box-shadow: 0 14px 30px rgba(124,58,237,.15), 0 0 0 2px rgba(167,139,250,.10), inset 0 1px 0 rgba(255,255,255,.86);
}
.pro-canvas-journey-card.is-final-system.is-stage-highlight {
  border-color: rgba(59,130,246,.56);
  background:
    radial-gradient(circle at 96% 0%, rgba(45,212,191,.11), transparent 34%),
    linear-gradient(143deg, rgba(241,248,255,.97), rgba(237,242,255,.92) 58%, rgba(246,241,255,.90));
  box-shadow: 0 16px 34px rgba(30,64,175,.18), 0 0 0 2px rgba(99,102,241,.10), inset 0 1px 0 rgba(255,255,255,.90);
}
.pro-canvas-journey-card.is-awaiting { opacity: .72; }
.pro-canvas-journey-card.is-stale {
  border-color: rgba(217,119,6,.44);
  background: linear-gradient(145deg, rgba(255,253,245,.94), rgba(255,247,225,.82));
}
.pro-canvas-journey-card.is-stale > header em {
  border-color: rgba(217,119,6,.26);
  background: rgba(255,247,219,.88);
  color: #9a5b00;
}

/* The old entity-only three-card rail is replaced by the shared journey. */
body.pro-canvas-shell-active #proSireQueryGridPanel.pro-sire-workspace-open #proSireWorkspaceOverview {
  display: none !important;
}
body.pro-canvas-shell-active #proSireQueryGridPanel.pro-sire-workspace-open > .pro-sire-workspace-main-stage {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto !important;
  align-items: start !important;
}
body.pro-canvas-shell-active #proSireQueryGridPanel.pro-sire-workspace-open > .pro-sire-workspace-main-stage > .pro-sire-workspace-control-deck {
  grid-column: 1 / -1 !important;
  height: auto !important;
  min-height: 0 !important;
}
body.pro-canvas-shell-active #proSireQueryGridPanel.pro-sire-workspace-open > .pro-sire-workspace-main-stage > .pro-sire-workspace-control-deck > .pro-sire-control-deck-card-v3 {
  height: auto !important;
  min-height: 0 !important;
}
body.pro-canvas-shell-active #proSireQueryGridPanel.pro-sire-workspace-open > #proCanvasSystemJourney {
  margin: 0 0 12px !important;
}

@media (max-width: 1120px) {
  .pro-canvas-journey-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .pro-canvas-journey-identities { justify-content: flex-start; flex-wrap: wrap; }
  .pro-canvas-journey-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .pro-canvas-system-journey { padding: 9px; border-radius: 18px; }
  .pro-canvas-journey-head > div:first-child { align-items: flex-start; flex-direction: column; gap: 3px; }
  .pro-canvas-journey-head > div:first-child > em { white-space: normal; }
  .pro-canvas-journey-grid { grid-template-columns: 1fr; }
  .pro-canvas-journey-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Phase 4 D4 — destructive reset, retained completion routes and Pro detailed navigation. */
.pro-canvas-shell-button.is-reset,
.pro-canvas-stage-action.is-reset {
  color:#8b1538;
  border-color:rgba(225,29,72,.32);
  background:linear-gradient(135deg,rgba(255,240,246,.96),rgba(255,213,225,.88));
  box-shadow:0 10px 24px rgba(190,24,93,.10),inset 0 1px 0 rgba(255,255,255,.82);
}
.pro-canvas-shell-button.is-reset:hover,
.pro-canvas-stage-action.is-reset:hover { color:#fff;background:linear-gradient(135deg,#e11d48,#be185d);border-color:rgba(190,24,93,.72); }
.pro-canvas-stage-actions { grid-template-columns:minmax(0,.8fr) minmax(0,1fr) minmax(0,2.3fr) auto; }
.pro-canvas-stage-actions.is-analysis-stage { grid-template-columns:minmax(0,.8fr) minmax(0,2.3fr) auto; }
.pro-canvas-reset-dialog[hidden]{display:none!important}
.pro-canvas-reset-dialog{position:fixed;inset:0;z-index:100080;display:grid;place-items:center;padding:24px}
.pro-canvas-reset-backdrop{position:absolute;inset:0;background:rgba(8,18,46,.58);backdrop-filter:blur(8px)}
.pro-canvas-reset-panel{position:relative;width:min(620px,calc(100vw - 32px));padding:26px;border-radius:24px;background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(247,249,255,.96));border:1px solid rgba(225,29,72,.24);box-shadow:0 30px 90px rgba(15,23,42,.34),inset 0 1px 0 #fff;color:#10213d}
.pro-canvas-reset-panel>span{font-size:11px;font-weight:900;letter-spacing:.15em;text-transform:uppercase;color:#be185d}
.pro-canvas-reset-panel h2{margin:7px 0 8px;font-size:26px}
.pro-canvas-reset-panel p{margin:0;color:#435b78;line-height:1.55}
.pro-canvas-reset-protected{margin:18px 0;padding:12px 14px;border-radius:14px;background:rgba(16,185,129,.08);border:1px solid rgba(16,185,129,.18);color:#155e52}
.pro-canvas-reset-actions{display:flex;justify-content:flex-end;gap:10px}
.pro-canvas-reset-actions button{min-height:40px;padding:0 18px;border-radius:13px;border:1px solid rgba(80,103,177,.24);background:#fff;font-weight:850;color:#18305a}
.pro-canvas-reset-actions button.is-confirm{color:#fff;border-color:#be185d;background:linear-gradient(135deg,#e11d48,#be185d);box-shadow:0 12px 24px rgba(190,24,93,.24)}
.pro-canvas-operation-complete-action{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:12px 14px;border-top:1px solid rgba(77,115,227,.15);background:linear-gradient(90deg,rgba(236,253,245,.88),rgba(239,246,255,.9))}
.pro-canvas-operation-complete-action[hidden]{display:none!important}
.pro-canvas-operation-complete-action>div:first-child{display:grid;gap:2px}.pro-canvas-operation-complete-action span{font-size:9px;font-weight:950;letter-spacing:.14em;text-transform:uppercase;color:#047857}.pro-canvas-operation-complete-action strong{font-size:14px;color:#10213d}.pro-canvas-operation-complete-action em{font-size:11px;color:#5b6f8c;font-style:normal}
.pro-canvas-operation-destinations{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.pro-canvas-operation-destinations button{min-height:34px;padding:0 14px;border-radius:999px;border:1px solid rgba(59,130,246,.22);background:rgba(255,255,255,.88);color:#1d3f86;font-weight:900}.pro-canvas-operation-destinations button:hover{background:linear-gradient(135deg,#2563eb,#7c3aed);color:#fff}
#quickReportOverlay.pro-canvas-detailed-report #overlayStatus:not([data-status-tone="error"]){display:none}
#quickReportOverlay.pro-canvas-detailed-report .quick-report-window-actions{flex-wrap:wrap;justify-content:flex-end}
#quickReportOverlay .pro-canvas-report-destination{border-color:rgba(59,130,246,.25);color:#1d3f86;background:rgba(239,246,255,.85)}
@media(max-width:1100px){.pro-canvas-stage-actions,.pro-canvas-stage-actions.is-analysis-stage{grid-template-columns:repeat(2,minmax(0,1fr))}.pro-canvas-operation-complete-action{align-items:flex-start;flex-direction:column}.pro-canvas-operation-destinations{justify-content:flex-start}}

/* ========================================================================== */
/* PRO CANVAS VISUAL PHASE 1B — shared command header and stage-rail standard */
/* ========================================================================== */
:root { --pro-canvas-shell-height: 132px; }

.pro-canvas-command-header {
  min-height: 66px;
  grid-template-columns: minmax(190px, auto) minmax(310px, 1fr) minmax(500px, auto);
  gap: 14px;
  padding: 8px 16px;
  background:
    radial-gradient(circle at 92% -15%, rgba(34,211,238,.22), transparent 36%),
    radial-gradient(circle at 24% 135%, rgba(124,58,237,.31), transparent 48%),
    linear-gradient(132deg, rgba(5,16,38,.995), rgba(23,48,126,.98) 54%, rgba(46,85,187,.95));
  box-shadow:
    0 18px 44px rgba(15,23,42,.22),
    inset 0 1px 0 rgba(255,255,255,.20);
}
.pro-canvas-command-left,
.pro-canvas-command-actions { gap: 7px; }
.pro-canvas-command-left .pro-ui-button > em {
  display: block;
  margin-top: 1px;
  color: rgba(255,226,232,.78);
  font-size: 7px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.pro-canvas-command-title { text-align: center; }
.pro-canvas-command-title > span {
  margin-bottom: 1px;
  color: #8eeaf1;
  font-size: 8px;
  letter-spacing: .17em;
}
.pro-canvas-command-title > strong {
  font-size: clamp(19px, 1.45vw, 26px);
  line-height: 1;
}
.pro-canvas-command-title > em { display: none; }
.pro-canvas-command-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
  min-width: 0;
}
.pro-canvas-command-state b,
.pro-canvas-command-state em,
.pro-canvas-command-state small {
  min-width: 0;
  border: 1px solid rgba(190,218,255,.18);
  border-radius: 999px;
  padding: 3px 8px;
  overflow: hidden;
  color: rgba(235,244,255,.88);
  background: rgba(255,255,255,.08);
  font-size: 8px;
  font-style: normal;
  font-weight: 850;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pro-canvas-command-state em[data-tone="current"],
.pro-canvas-command-state em[data-tone="ready"] {
  border-color: rgba(80,224,185,.30);
  color: #b7ffe4;
  background: rgba(17,143,121,.18);
}
.pro-canvas-command-state em[data-tone="warning"] {
  border-color: rgba(252,194,72,.34);
  color: #ffe4a2;
  background: rgba(181,111,18,.18);
}
.pro-canvas-command-state small { color: rgba(196,215,242,.76); }
.pro-canvas-command-actions { min-width: 0; }
.pro-canvas-command-future {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-right: 7px;
  border-right: 1px solid rgba(204,225,255,.14);
}
.pro-canvas-command-actions > .pro-ui-button.is-reset {
  color: #fff;
  border-color: rgba(255,176,190,.36);
  background: rgba(139,37,66,.42);
}
.pro-canvas-command-actions > .pro-ui-button.is-reset:hover,
.pro-canvas-command-actions > .pro-ui-button.is-reset:focus-visible {
  border-color: rgba(255,181,195,.64);
  background: linear-gradient(135deg,#bd3e60,#e16a80);
}

.pro-canvas-stage-nav {
  height: 66px;
  grid-auto-columns: minmax(146px, 1fr);
  gap: 6px;
  padding: 7px 14px 8px;
  scroll-behavior: smooth;
  scroll-padding-inline: 22px;
  background:
    radial-gradient(circle at 2% 20%, rgba(34,211,238,.09), transparent 24%),
    radial-gradient(circle at 96% 0%, rgba(124,58,237,.10), transparent 25%),
    linear-gradient(180deg, rgba(252,254,255,.99), rgba(239,245,255,.98));
}
.pro-canvas-stage-button {
  height: 51px;
  grid-template-columns: 27px minmax(0,1fr);
  gap: 8px;
  padding: 6px 9px;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(246,249,255,.82));
}
.pro-canvas-stage-number {
  width: 27px;
  height: 27px;
  border-radius: 9px;
  font-size: 10px;
}
.pro-canvas-stage-copy b { font-size: 10.5px; }
.pro-canvas-stage-copy em { margin-top: 2px; font-size: 8px; }
.pro-canvas-stage-button.is-active {
  border-color: rgba(79,210,230,.60);
  background:
    radial-gradient(circle at 96% 0%, rgba(34,211,238,.24), transparent 42%),
    linear-gradient(143deg, #071b42, #173d91 58%, #5538a5);
  box-shadow: 0 11px 24px rgba(30,64,175,.22), inset 0 1px 0 rgba(255,255,255,.24);
}
.pro-canvas-stage-button.is-active::after {
  content: "";
  position: absolute;
  inset: auto 11px 4px 46px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg,#64eff7,#8b8cff);
  box-shadow: 0 0 10px rgba(100,239,247,.52);
}
.pro-canvas-stage-button { position: relative; }

body.pro-canvas-shell-active {
  --pro-canvas-content-top: calc(var(--pro-canvas-shell-height) + 16px);
}
body.pro-canvas-shell-active .main { padding-top: var(--pro-canvas-content-top) !important; }
body.pro-canvas-shell-active #proCanvasStageIntro,
body.pro-canvas-shell-active #proCanvasRaceRulesStage,
body.pro-canvas-shell-active #proCanvasRunnerSelectionStage,
body.pro-canvas-shell-active #proCanvasSystemJourney {
  scroll-margin-top: calc(var(--pro-canvas-shell-height) + 14px);
}
body.pro-canvas-shell-active #proSireQueryGridPanel.pro-sire-workspace-open {
  inset: var(--pro-canvas-shell-height) 0 0 0 !important;
  height: calc(100dvh - var(--pro-canvas-shell-height)) !important;
}

@media (max-width: 1420px) {
  .pro-canvas-command-header {
    grid-template-columns: minmax(170px, auto) minmax(260px, 1fr) minmax(430px, auto);
    gap: 9px;
    padding-inline: 11px;
  }
  .pro-canvas-command-actions .pro-ui-button { padding-inline: 10px; }
  .pro-canvas-command-future .pro-ui-button { min-width: 59px; }
  .pro-canvas-command-state small { display: none; }
}
@media (max-width: 1180px) {
  :root { --pro-canvas-shell-height: 132px; }
  .pro-canvas-command-header {
    grid-template-columns: minmax(145px, auto) minmax(220px, 1fr) minmax(350px, auto);
    padding-inline: 8px;
  }
  .pro-canvas-command-left .pro-ui-button,
  .pro-canvas-command-actions > .pro-ui-button { min-height: 35px; padding-inline: 9px; font-size: 9px; }
  .pro-canvas-command-future .pro-ui-button { min-width: 49px; padding-inline: 6px; }
  .pro-canvas-command-title > strong { font-size: 18px; }
  .pro-canvas-command-state b { max-width: 160px; }
  .pro-canvas-stage-nav { grid-auto-columns: 143px; padding-inline: 9px; }
}
@media (max-width: 900px) {
  .pro-canvas-command-future { display: none; }
  .pro-canvas-command-header { grid-template-columns: auto minmax(190px,1fr) auto; }
  .pro-canvas-command-left .pro-ui-button > em,
  .pro-canvas-command-title > span { display: none; }
}
@media (max-width: 680px) {
  :root { --pro-canvas-shell-height: 128px; }
  .pro-canvas-command-header { min-height: 62px; gap: 5px; }
  .pro-canvas-command-title > strong { font-size: 15px; }
  .pro-canvas-command-state b { max-width: 110px; }
  .pro-canvas-command-state em { max-width: 95px; }
  .pro-canvas-command-left .pro-ui-button:nth-child(2) { display: none; }
  .pro-canvas-command-actions > .pro-ui-button { padding-inline: 7px; }
  .pro-canvas-stage-nav { height: 66px; grid-auto-columns: 140px; }
}

/* Phase 1B compact shared stage header. */
.pro-canvas-stage-intro {
  margin-bottom: 12px;
  padding: 12px 14px 11px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 96% 0%, rgba(34,211,238,.10), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.94), rgba(242,247,255,.82) 64%, rgba(244,241,255,.72));
  box-shadow: 0 13px 30px rgba(28,43,84,.09), inset 0 1px 0 rgba(255,255,255,.80);
}
.pro-canvas-stage-intro-main { gap: 14px; }
.pro-canvas-stage-intro-copy h2 { margin: 4px 0 3px; font-size: clamp(19px,1.55vw,27px); }
.pro-canvas-stage-intro-copy p { max-width: 1050px; font-size: 11px; line-height: 1.4; }
.pro-canvas-stage-intro-state { min-width: 142px; padding: 8px 11px; border-radius: 12px; }
.pro-canvas-stage-actions { margin-top: 10px; gap: 7px; }
.pro-canvas-stage-action { min-height: 36px; padding: 7px 12px; border-radius: 11px; }
.pro-canvas-stage-guidance { margin-top: 7px; }

/* PRO CANVAS PHASE 3G-H2 — one readable command-button type scale. */
body.pro-canvas-shell-active .pro-canvas-command-actions > .pro-ui-button,
body.pro-canvas-shell-active .pro-canvas-command-future .pro-ui-button.is-header-future {
  min-height: 40px !important;
  font-size: 11.5px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
}
body.pro-canvas-shell-active .pro-canvas-command-future .pro-ui-button.is-header-future {
  min-width: 76px !important;
  padding-inline: 13px !important;
}
body.pro-canvas-shell-active .pro-canvas-command-actions > .pro-ui-button.is-header-apply {
  font-size: 11.5px !important;
}
@media (max-width: 1400px) {
  body.pro-canvas-shell-active .pro-canvas-command-actions > .pro-ui-button,
  body.pro-canvas-shell-active .pro-canvas-command-future .pro-ui-button.is-header-future {
    min-height: 36px !important;
    font-size: 10px !important;
  }
}


/* Phase 4B — one centred entity Apply lifecycle and Analysis completion navigation. */
.pro-breeding-apply-running-card {
  top:50%!important;
  width:min(720px,calc(100vw - 36px))!important;
  transform:translate(-50%,-50%) scale(.985)!important;
}
.pro-breeding-apply-running-card.is-visible { transform:translate(-50%,-50%) scale(1)!important; }
.pro-breeding-apply-running-copy em {
  overflow:visible!important;
  text-overflow:clip!important;
  white-space:normal!important;
  line-height:1.35!important;
}
.pro-breeding-apply-running-card.is-complete {
  border-color:rgba(134,239,172,.62)!important;
  background:radial-gradient(circle at 92% 8%,rgba(74,222,128,.22),transparent 34%),linear-gradient(135deg,rgba(5,46,22,.985),rgba(21,128,61,.97) 58%,rgba(13,148,136,.94))!important;
}
.pro-breeding-apply-running-card.is-complete .pro-breeding-apply-running-spinner {
  display:grid;
  place-items:center;
  border-color:rgba(255,255,255,.4)!important;
  animation:none!important;
}
.pro-breeding-apply-running-card.is-complete .pro-breeding-apply-running-spinner::after {
  content:"✓";
  color:#fff;
  font-size:20px;
  font-weight:950;
}
.pro-canvas-analysis-complete {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  margin:18px 0 4px;
  padding:18px 20px;
  border:1px solid rgba(45,196,134,.34);
  border-radius:18px;
  background:radial-gradient(circle at 90% 0,rgba(34,211,238,.13),transparent 38%),linear-gradient(145deg,rgba(240,253,250,.98),rgba(239,246,255,.95));
  box-shadow:0 16px 38px rgba(18,72,99,.10);
}
.pro-canvas-analysis-complete[hidden] { display:none!important; }
.pro-canvas-analysis-complete span { display:block; color:#087f5b; font-size:9px; font-weight:950; letter-spacing:.14em; text-transform:uppercase; }
.pro-canvas-analysis-complete strong { display:block; margin-top:4px; color:#153451; font-size:18px; font-weight:950; }
.pro-canvas-analysis-complete p { margin:4px 0 0; color:#61758f; font-size:11px; font-weight:700; }
.pro-canvas-analysis-complete nav { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:9px; }
.pro-canvas-analysis-complete button { min-height:38px; padding:8px 13px; border:1px solid rgba(52,95,181,.26); border-radius:11px; background:#fff; color:#244d8e; font-size:10px; font-weight:900; cursor:pointer; box-shadow:0 6px 16px rgba(37,72,135,.08); }
.pro-canvas-analysis-complete button:hover { border-color:#3156d8; color:#1d3f80; transform:translateY(-1px); }
@media(max-width:900px){.pro-canvas-analysis-complete{align-items:flex-start;flex-direction:column}.pro-canvas-analysis-complete nav{justify-content:flex-start}}

/* ========================================================================== */
/* PRO_SAVE_LOAD_001F — Canvas working card, section hierarchy and controls.  */
/* ========================================================================== */
body.pro-canvas-shell-active #proCanvasStageIntro[data-rendered-stage="race-universe"],
body.pro-canvas-shell-active #proCanvasStageIntro[data-rendered-stage="horse-conditions"] {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.pro-canvas-working-card {
  display: grid;
  grid-template-columns: minmax(250px,.86fr) minmax(360px,1.45fr) minmax(390px,1fr);
  gap: 16px;
  align-items: stretch;
  padding: 15px 16px;
  border: 1px solid rgba(81,112,211,.20);
  border-radius: 20px;
  background:
    radial-gradient(circle at 96% 0%, rgba(34,211,238,.11), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(242,247,255,.88) 68%, rgba(245,242,255,.78));
  box-shadow: 0 15px 34px rgba(28,43,84,.10), inset 0 1px 0 rgba(255,255,255,.88);
}
.pro-canvas-working-card.is-changed {
  border-color: rgba(225,153,39,.28);
  background: linear-gradient(145deg, rgba(255,252,240,.97), rgba(245,249,255,.90));
}
.pro-canvas-working-card.is-current {
  border-color: rgba(16,185,129,.24);
  background: linear-gradient(145deg, rgba(242,255,249,.97), rgba(245,249,255,.90));
}
.pro-canvas-working-card.is-unavailable {
  border-color: rgba(226,145,54,.30);
  background: linear-gradient(145deg, rgba(255,249,238,.97), rgba(247,249,255,.90));
}
.pro-canvas-working-identity,
.pro-canvas-working-state,
.pro-canvas-working-actions {
  min-width: 0;
}
.pro-canvas-working-identity {
  padding-right: 14px;
  border-right: 1px solid rgba(91,117,191,.14);
}
.pro-canvas-working-identity > span,
.pro-canvas-working-state > span {
  display: block;
  color: #5e73a8;
  font-size: 8.5px;
  font-weight: 950;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.pro-canvas-working-identity > strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #10213d;
  font-size: 18px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pro-canvas-working-identity > em {
  display: block;
  margin-top: 4px;
  color: #536a84;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 720;
  line-height: 1.35;
}
.pro-canvas-working-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.pro-canvas-working-badges b {
  padding: 4px 8px;
  border: 1px solid rgba(76,111,204,.15);
  border-radius: 999px;
  color: #36537c;
  background: rgba(255,255,255,.70);
  font-size: 8px;
  font-weight: 900;
}
.pro-canvas-working-state > strong {
  display: block;
  margin-top: 4px;
  color: #173f87;
  font-size: 14px;
  font-weight: 950;
}
.pro-canvas-working-state > p {
  margin: 4px 0 0;
  color: #536a84;
  font-size: 10.5px;
  font-weight: 720;
  line-height: 1.42;
}
.pro-canvas-working-metrics {
  display: grid;
  grid-template-columns: repeat(4,minmax(70px,1fr));
  gap: 7px;
  margin-top: 10px;
}
.pro-canvas-working-metrics > span {
  padding: 7px 8px;
  border: 1px solid rgba(16,185,129,.14);
  border-radius: 10px;
  background: rgba(255,255,255,.68);
}
.pro-canvas-working-metrics em,
.pro-canvas-working-metrics b,
.pro-canvas-working-metrics small { display: block; }
.pro-canvas-working-metrics em {
  color: #6b7f99;
  font-size: 7.5px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.pro-canvas-working-metrics b {
  margin-top: 2px;
  color: #10213d;
  font-size: 11.5px;
}
.pro-canvas-working-metrics small {
  margin-top: 1px;
  color: #718198;
  font-size: 7.5px;
}
.pro-canvas-working-actions {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 8px;
  align-content: center;
}
.pro-canvas-working-actions .pro-canvas-stage-action {
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 11px;
  font-size: 10px;
  font-weight: 900;
}
.pro-canvas-working-actions .is-primary {
  grid-column: 1 / -1;
}
.pro-canvas-working-actions .is-primary.is-unavailable {
  border-color: rgba(222,144,48,.32);
  color: #8a5618;
  background: linear-gradient(135deg,rgba(255,246,224,.96),rgba(255,255,255,.88));
}
.pro-canvas-working-actions .is-save {
  border-color: rgba(16,153,126,.30);
  color: #087a62;
  background: rgba(238,253,248,.94);
}
.pro-canvas-working-actions .is-save-copy {
  border-color: rgba(87,105,180,.25);
  color: #46577f;
  background: rgba(247,249,255,.94);
}
.pro-canvas-working-actions .is-placeholder {
  border-style: dashed;
  color: #94a1b5;
  background: rgba(244,247,251,.72);
}

/* Race code controls now lead the race-universe workflow. */
body.pro-canvas-shell-active[data-pro-canvas-stage="race-universe"] #race { margin-top: 0 !important; }

/* Strong, reusable section commands for the Pro Canvas. */
body.pro-canvas-shell-active .section-header-actions .profiler-section-toggle,
body.pro-canvas-shell-active .section-header .section-reset-button {
  min-height: 40px !important;
  border-radius: 11px !important;
  padding: 8px 15px !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  opacity: 1 !important;
  filter: none !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78), 0 7px 16px rgba(38,61,115,.08) !important;
}
body.pro-canvas-shell-active .section-header-actions .profiler-section-toggle {
  min-width: 170px !important;
  border: 1px solid rgba(58,100,203,.30) !important;
  color: #244f9d !important;
  background: linear-gradient(180deg,rgba(245,250,255,.98),rgba(229,239,255,.94)) !important;
}
body.pro-canvas-shell-active .section-header .section-reset-button {
  min-width: 116px !important;
  border: 1px solid rgba(16,153,126,.27) !important;
  color: #087a62 !important;
  background: linear-gradient(180deg,rgba(247,255,252,.98),rgba(232,249,242,.94)) !important;
}
body.pro-canvas-shell-active .section-header-actions .profiler-section-toggle:hover,
body.pro-canvas-shell-active .section-header-actions .profiler-section-toggle:focus-visible,
body.pro-canvas-shell-active .section-header .section-reset-button:hover,
body.pro-canvas-shell-active .section-header .section-reset-button:focus-visible {
  transform: translateY(-1px);
  outline: none !important;
  box-shadow: 0 10px 21px rgba(38,61,115,.14), inset 0 1px 0 rgba(255,255,255,.9) !important;
}

@media (max-width: 1380px) {
  .pro-canvas-working-card {
    grid-template-columns: minmax(220px,.72fr) minmax(320px,1.28fr);
  }
  .pro-canvas-working-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(5,minmax(120px,1fr));
  }
  .pro-canvas-working-actions .is-primary { grid-column: auto; }
}
@media (max-width: 900px) {
  .pro-canvas-working-card { grid-template-columns: 1fr; }
  .pro-canvas-working-identity {
    padding-right: 0;
    padding-bottom: 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(91,117,191,.14);
  }
  .pro-canvas-working-actions { grid-column: auto; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pro-canvas-working-actions .is-primary { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .pro-canvas-working-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pro-canvas-working-actions { grid-template-columns: 1fr; }
  .pro-canvas-working-actions .is-primary { grid-column: auto; }
}

/* PRO_SAVE_LOAD_002B — premium working state, command save and shared decision surfaces. */
body.pro-canvas-shell-active #proCanvasStageIntro[data-rendered-stage="race-universe"],
body.pro-canvas-shell-active #proCanvasStageIntro[data-rendered-stage="horse-conditions"] {
  margin-top: 10px !important;
  margin-bottom: 13px !important;
}
.pro-canvas-working-card {
  --pro-working-accent: #63e8ee;
  position: relative;
  overflow: hidden;
  grid-template-columns: minmax(0,1fr) minmax(390px,520px);
  gap: 20px;
  align-items: stretch;
  padding: 17px 18px;
  border: 1px solid rgba(104,184,244,.42);
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 94% 0%, rgba(34,211,238,.20), transparent 34%),
    radial-gradient(circle at 8% 110%, rgba(124,58,237,.24), transparent 42%),
    linear-gradient(139deg, rgba(5,18,44,.985), rgba(24,53,132,.965) 56%, rgba(52,68,164,.95));
  box-shadow:
    0 20px 48px rgba(10,24,59,.24),
    inset 0 1px 0 rgba(255,255,255,.24),
    inset 0 0 0 1px rgba(255,255,255,.045);
}
.pro-canvas-working-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,.86),rgba(99,225,250,.48),transparent);
  pointer-events: none;
}
.pro-canvas-working-card::after {
  content: "";
  position: absolute;
  inset: 12px auto 12px 0;
  width: 5px;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(180deg,var(--pro-working-accent),#4f8df7 52%,#a56cf2);
  box-shadow: 0 0 22px rgba(82,182,255,.46);
  pointer-events: none;
}
.pro-canvas-working-card.is-current {
  --pro-working-accent: #51e6b4;
  border-color: rgba(81,230,180,.44);
  background:
    radial-gradient(circle at 94% 0%, rgba(57,230,186,.18), transparent 34%),
    radial-gradient(circle at 8% 110%, rgba(44,128,220,.20), transparent 42%),
    linear-gradient(139deg, rgba(5,25,42,.99), rgba(17,71,107,.97) 56%, rgba(38,86,139,.95)) !important;
}
.pro-canvas-working-card.is-changed {
  --pro-working-accent: #ffd073;
  border-color: rgba(255,208,115,.44);
  background:
    radial-gradient(circle at 94% 0%, rgba(255,198,77,.20), transparent 34%),
    radial-gradient(circle at 8% 110%, rgba(116,79,214,.22), transparent 42%),
    linear-gradient(139deg, rgba(28,25,47,.99), rgba(69,52,112,.97) 56%, rgba(94,68,135,.95)) !important;
}
.pro-canvas-working-card.is-unavailable {
  --pro-working-accent: #ffac7b;
  border-color: rgba(255,172,123,.45);
  background:
    radial-gradient(circle at 94% 0%, rgba(255,154,102,.20), transparent 34%),
    radial-gradient(circle at 8% 110%, rgba(104,77,191,.20), transparent 42%),
    linear-gradient(139deg, rgba(34,24,43,.99), rgba(75,48,94,.97) 56%, rgba(105,61,103,.95)) !important;
}
.pro-canvas-working-copy {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(230px,.78fr) minmax(340px,1.22fr);
  gap: 18px;
  align-items: center;
}
.pro-canvas-working-identity {
  min-width: 0;
  padding-right: 18px;
  border-right: 1px solid rgba(218,235,255,.15);
}
.pro-canvas-working-state { min-width: 0; }
.pro-canvas-working-identity > span,
.pro-canvas-working-state > span {
  color: #8ceaf1 !important;
  font-size: 9.5px;
  font-weight: 950;
  letter-spacing: .14em;
}
.pro-canvas-working-identity > strong {
  margin-top: 5px;
  color: #fff !important;
  font-size: 20px;
  line-height: 1.08;
}
.pro-canvas-working-identity > em,
.pro-canvas-working-state > p {
  color: rgba(229,241,255,.82) !important;
  font-size: 11.5px;
  line-height: 1.45;
}
.pro-canvas-working-state > strong {
  margin-top: 5px;
  color: #fff !important;
  font-size: 16px;
  line-height: 1.15;
}
.pro-canvas-working-badges b {
  padding: 5px 9px;
  border-color: rgba(204,228,255,.18) !important;
  color: rgba(239,247,255,.90) !important;
  background: rgba(255,255,255,.08) !important;
  font-size: 9px;
}
.pro-canvas-working-metrics > span {
  border-color: rgba(207,228,255,.16) !important;
  background: rgba(255,255,255,.075) !important;
}
.pro-canvas-working-metrics em,
.pro-canvas-working-metrics small { color: rgba(226,239,255,.72) !important; }
.pro-canvas-working-metrics b { color: #fff !important; }
.pro-canvas-working-actions {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(225px,1.35fr) minmax(145px,.78fr);
  gap: 9px;
  align-items: stretch;
  align-content: center;
  padding-left: 19px;
  border-left: 1px solid rgba(218,235,255,.15);
}
.pro-canvas-working-primary-action,
.pro-canvas-working-support-actions {
  min-width: 0;
  display: grid;
  gap: 9px;
}
.pro-canvas-working-primary-action { grid-column: 1; grid-row: 1; }
.pro-canvas-working-support-actions { grid-column: 2; grid-row: 1; grid-template-columns: 1fr; }
.pro-canvas-working-actions .pro-canvas-stage-action {
  min-height: 42px;
  border-radius: 12px;
  font-size: 11px;
}
.pro-canvas-working-primary-action .pro-canvas-stage-action.is-primary {
  width: 100%;
  min-width: 0;
  min-height: 93px;
  padding: 12px 18px;
  border-color: rgba(255,255,255,.18);
  background: linear-gradient(135deg,#0c8f88,#16a6a7 46%,#2e70e2 100%);
  box-shadow: 0 14px 28px rgba(8,87,147,.28), inset 0 1px 0 rgba(255,255,255,.24);
}
.pro-canvas-working-support-actions .is-preview {
  color: #473b91;
  border-color: rgba(195,184,255,.30);
  background: linear-gradient(180deg,rgba(255,252,255,.98),rgba(235,231,255,.94));
}
.pro-canvas-working-support-actions .is-guide {
  color: #274d79;
  border-color: rgba(190,216,248,.27);
  background: linear-gradient(180deg,rgba(250,253,255,.98),rgba(225,239,255,.94));
}
body.pro-canvas-shell-active .pro-canvas-command-future .pro-ui-button.is-save-ready,
body.pro-canvas-shell-active .pro-canvas-command-future .pro-ui-button.is-load-ready {
  color: #fff;
  border-style: solid;
  border-color: rgba(162,215,255,.34);
  background: linear-gradient(180deg,rgba(65,139,229,.58),rgba(39,94,190,.42));
}
body.pro-canvas-shell-active .pro-canvas-command-future .pro-ui-button.is-save-ready:hover,
body.pro-canvas-shell-active .pro-canvas-command-future .pro-ui-button.is-save-ready:focus-visible,
body.pro-canvas-shell-active .pro-canvas-command-future .pro-ui-button.is-load-ready:hover,
body.pro-canvas-shell-active .pro-canvas-command-future .pro-ui-button.is-load-ready:focus-visible {
  border-color: rgba(169,230,255,.70);
  background: linear-gradient(180deg,rgba(70,157,244,.78),rgba(40,105,209,.62));
}

/* One premium decision-card family for Canvas change guards. */
.pro-canvas-upstream-panel,
.pro-canvas-reset-panel,
.pro-sire-unsaved-dialog-panel {
  border: 1px solid rgba(90,176,246,.46) !important;
  border-radius: 24px !important;
  color: #fff !important;
  background:
    radial-gradient(circle at 93% 3%, rgba(34,211,238,.20), transparent 36%),
    radial-gradient(circle at 4% 100%, rgba(147,93,255,.20), transparent 42%),
    linear-gradient(143deg, rgba(5,18,44,.99), rgba(24,53,132,.975) 54%, rgba(62,49,154,.955)) !important;
  box-shadow: 0 30px 86px rgba(3,12,35,.44), inset 0 1px 0 rgba(255,255,255,.25) !important;
}
.pro-canvas-upstream-panel > span,
.pro-canvas-reset-panel > span,
.pro-sire-unsaved-kicker {
  color: #7fe8f1 !important;
  font-size: 9px !important;
  font-weight: 950 !important;
  letter-spacing: .16em !important;
}
.pro-canvas-upstream-panel h3,
.pro-canvas-reset-panel h2,
.pro-sire-unsaved-dialog-panel h3 { color: #fff !important; text-shadow: 0 1px 8px rgba(0,0,0,.24); }
.pro-canvas-upstream-panel p,
.pro-canvas-reset-panel p,
.pro-sire-unsaved-dialog-panel p { color: rgba(231,241,255,.88) !important; }
.pro-canvas-upstream-impact,
.pro-canvas-reset-protected {
  border-color: rgba(151,205,255,.23) !important;
  color: rgba(238,247,255,.92) !important;
  background: rgba(255,255,255,.09) !important;
}
.pro-canvas-upstream-impact b,
.pro-canvas-upstream-impact em,
.pro-canvas-reset-protected b { color: inherit !important; }
.pro-canvas-upstream-actions button,
.pro-canvas-reset-actions button,
.pro-sire-unsaved-actions .btn {
  min-height: 42px !important;
  border: 1px solid rgba(197,220,255,.30) !important;
  border-radius: 12px !important;
  color: #fff !important;
  background: rgba(255,255,255,.10) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14) !important;
}
.pro-canvas-upstream-actions button.is-primary,
.pro-sire-unsaved-actions .btn.deep {
  border-color: rgba(95,228,223,.42) !important;
  background: linear-gradient(135deg,#0d8b84,#2d73eb) !important;
  box-shadow: 0 12px 24px rgba(8,78,160,.25), inset 0 1px 0 rgba(255,255,255,.22) !important;
}
.pro-canvas-reset-actions button.is-confirm {
  border-color: rgba(255,160,180,.44) !important;
  background: linear-gradient(135deg,#c33258,#e0647c) !important;
}
.pro-canvas-upstream-actions button:hover,
.pro-canvas-upstream-actions button:focus-visible,
.pro-canvas-reset-actions button:hover,
.pro-canvas-reset-actions button:focus-visible,
.pro-sire-unsaved-actions .btn:hover,
.pro-sire-unsaved-actions .btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(214,235,255,.62) !important;
  outline: none;
}

@media (max-width: 1420px) {
  .pro-canvas-working-card { grid-template-columns: minmax(0,1fr) minmax(360px,460px); }
  .pro-canvas-working-copy { grid-template-columns: minmax(210px,.72fr) minmax(280px,1.28fr); }
}
@media (max-width: 1120px) {
  .pro-canvas-working-card { grid-template-columns: 1fr; }
  .pro-canvas-working-actions {
    grid-template-columns: minmax(220px,1.25fr) minmax(150px,.75fr);
    padding-left: 0;
    padding-top: 14px;
    border-left: 0;
    border-top: 1px solid rgba(218,235,255,.15);
  }
}
@media (max-width: 760px) {
  .pro-canvas-working-copy { grid-template-columns: 1fr; }
  .pro-canvas-working-identity {
    padding-right: 0;
    padding-bottom: 13px;
    border-right: 0;
    border-bottom: 1px solid rgba(218,235,255,.15);
  }
  .pro-canvas-working-actions { grid-template-columns: 1fr; }
  .pro-canvas-working-primary-action,
  .pro-canvas-working-support-actions { grid-column: 1; grid-row: auto; }
  .pro-canvas-working-primary-action .pro-canvas-stage-action.is-primary { min-height: 46px; }
  .pro-canvas-working-support-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 520px) {
  .pro-canvas-working-support-actions { grid-template-columns: 1fr; }
  .pro-canvas-upstream-actions,
  .pro-canvas-reset-actions,
  .pro-sire-unsaved-actions { grid-template-columns: 1fr !important; }
}


/* SHARED_BUILDER_002B_H3 — reset dialog overlay geometry recovery. */
body.pro-canvas-reset-open { overflow: hidden !important; }
#proCanvasResetDialog.pro-canvas-reset-dialog[hidden] { display: none !important; }
#proCanvasResetDialog.pro-canvas-reset-dialog {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  width: 100vw !important;
  height: 100dvh !important;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: 24px;
  overflow: auto;
  isolation: isolate;
}
#proCanvasResetDialog .pro-canvas-reset-backdrop {
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
}
#proCanvasResetDialog .pro-canvas-reset-panel {
  position: relative !important;
  z-index: 1 !important;
  width: min(620px, calc(100vw - 32px)) !important;
  max-height: calc(100dvh - 48px) !important;
  overflow: auto;
}
@supports not (height: 100dvh) {
  #proCanvasResetDialog.pro-canvas-reset-dialog { height: 100vh !important; }
  #proCanvasResetDialog .pro-canvas-reset-panel { max-height: calc(100vh - 48px) !important; }
}
