:root{
  --bg:#f3f6fb;--panel:#fff;--border:#d8e1ee;--text:#0f172a;--muted:#64748b;
  --blue:#2563eb;--purple:#7c3aed;--green:#16a34a;--teal:#0891b2;--orange:#f97316;--rose:#e11d48;
  --blue-grad:linear-gradient(135deg,#1e3a8a,#4f46e5,#7c3aed);
  --purple-grad:linear-gradient(135deg,#4c1d95,#7c3aed,#2563eb);
  --green-grad:linear-gradient(135deg,#064e3b,#16a34a,#22c55e);
  --teal-grad:linear-gradient(135deg,#155e75,#0891b2,#2563eb);
  --orange-grad:linear-gradient(135deg,#9a3412,#f97316,#f59e0b);
  --rose-grad:linear-gradient(135deg,#881337,#e11d48,#f97316);
  --selected-grad:linear-gradient(135deg,#9a3412,#f97316,#f59e0b);
  --shadow:0 10px 28px rgba(15,23,42,.075);
  --shadow-soft:0 4px 14px rgba(15,23,42,.055);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:Inter,Arial,Helvetica,sans-serif;background:radial-gradient(circle at top left,rgba(37,99,235,.13),transparent 34%),radial-gradient(circle at top right,rgba(124,58,237,.11),transparent 30%),var(--bg);color:var(--text);font-size:14px}
.app{display:grid;grid-template-columns:310px 1fr;min-height:100vh}
.sidebar{background:linear-gradient(180deg,#0d1220,#111827 48%,#172554);color:#dbeafe;padding:22px 18px;position:sticky;top:0;height:100vh;overflow:auto;box-shadow:10px 0 30px rgba(15,23,42,.22)}
.logo-wrap{display:flex;align-items:center;gap:13px;padding:0 4px 22px;margin-bottom:16px;border-bottom:1px solid rgba(219,234,254,.15)}
.logo-mark{width:58px;height:58px;display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.logo-mark img{width:58px;height:58px;object-fit:contain;filter:drop-shadow(0 8px 18px rgba(124,58,237,.35))}
.logo-text{line-height:1}.logo-text .racing{font-family:Inter,Arial,sans-serif;font-weight:700;font-size:20px;letter-spacing:.03em;color:#fff;line-height:1}.logo-text .analytics{font-family:Inter,Arial,sans-serif;font-weight:500;font-size:17px;letter-spacing:.03em;color:#fff;line-height:1;margin-top:4px}.logo-sub{display:none}
.nav-title{color:#94a3b8;text-transform:uppercase;letter-spacing:.13em;font-size:11px;font-weight:950;margin:18px 8px 10px;padding-top:16px;border-top:1px solid rgba(255,255,255,.08)}
.nav-title.first{border-top:0;padding-top:0;margin-top:0}.nav-title.linked{color:#c7d2fe}.nav-caption{margin:0 8px 10px;color:#7dd3fc;font-size:11px;line-height:1.35;font-weight:750;opacity:.86}
.nav-item{display:flex;align-items:center;gap:13px;padding:11px 12px;border-radius:14px;margin-bottom:7px;color:#e5e7eb;text-decoration:none;font-size:15.5px;font-weight:850;transition:.15s;position:relative}
.nav-item:hover{background:rgba(255,255,255,.07);transform:translateX(2px)}
.nav-item.active{background:linear-gradient(135deg,#fff,#dbeafe);color:#111827;box-shadow:0 8px 20px rgba(37,99,235,.24)}
.nav-icon{width:42px;height:42px;border-radius:14px;display:flex;align-items:center;justify-content:center;flex:0 0 auto;background:rgba(255,255,255,.08);overflow:hidden}
.nav-icon img{width:28px;height:28px;object-fit:contain;display:block;filter:drop-shadow(0 2px 7px rgba(0,0,0,.25))}
.nav-item.active .nav-icon{background:linear-gradient(135deg,#4f46e5,#7c3aed)}
.nav-cluster{margin:0 0 12px 16px;padding:8px 0 2px 14px;border-left:1px solid rgba(219,234,254,.24)}
.nav-cluster .nav-item{font-size:14.5px;padding:9px 10px;margin-bottom:5px}.nav-cluster .nav-icon{width:36px;height:36px;border-radius:12px}.nav-cluster .nav-icon img{width:24px;height:24px}
.subnav{margin:-1px 0 12px 22px;padding:10px 0 8px 16px;border-left:1px solid rgba(219,234,254,.28);background:rgba(255,255,255,.055);border-radius:0 0 12px 12px}
.subnav-label{color:#93c5fd;text-transform:uppercase;letter-spacing:.11em;font-size:10px;font-weight:950;margin:2px 8px 7px}.subnav a{display:block;color:#bfd7ff;text-decoration:none;font-size:12.5px;font-weight:760;padding:7px 9px;border-radius:8px;margin-bottom:4px}.subnav a:hover,.subnav a.focus{background:linear-gradient(90deg,rgba(37,99,235,.22),rgba(124,58,237,.10));border:1px solid rgba(147,197,253,.20);color:white}
.main{padding:26px 32px 70px}.topbar{display:grid;grid-template-columns:minmax(320px,1fr) minmax(560px,1.35fr) auto;align-items:center;gap:30px;margin-bottom:24px}.top-centre{justify-self:center}h1{margin:0;font-size:35px;line-height:1.04;letter-spacing:-.045em}.breadcrumb{display:flex;align-items:center;gap:8px;color:#64748b;font-size:13px;font-weight:800;margin-top:8px}.breadcrumb span:last-child{color:#1e3a8a}.top-centre{display:flex;align-items:center;gap:26px}.selection-control{display:flex;align-items:center;gap:18px;min-height:58px;padding:10px 18px;border-radius:17px;background:white;border:1px solid var(--border);box-shadow:var(--shadow-soft)}.selection-label{background:#faf5ff;color:#475569;font-size:13px;font-weight:950;padding:10px 12px;border-radius:10px}.selection-value{font-size:16px;font-weight:950}.ranking-inline{display:flex;align-items:center;gap:12px}.ranking-label{color:#64748b;font-size:15px;font-weight:850}.top-icons{display:flex;justify-content:flex-end;gap:13px}.top-icon{width:54px;height:54px;border-radius:18px;border:1px solid #dbe3ef;background:white;display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:950;box-shadow:var(--shadow-soft);position:relative}.top-icon.login{background:linear-gradient(135deg,#ecfdf5,#dcfce7);color:#166534;border-color:#bbf7d0}.top-icon.login:after{content:"";width:10px;height:10px;background:#16a34a;border:2px solid #fff;border-radius:50%;position:absolute;right:6px;bottom:6px}
.section{background:rgba(255,255,255,.95);border:2px solid var(--section-border,var(--border));border-radius:18px;margin-bottom:26px;box-shadow:var(--shadow);overflow:hidden;transition:.15s}.section:hover{transform:translateY(-1px);box-shadow:0 14px 34px rgba(15,23,42,.10)}
.section-header{color:white;padding:19px 24px;display:flex;justify-content:space-between;gap:18px;align-items:center;position:relative;overflow:hidden}.section-header:after{content:"";position:absolute;top:-55%;right:-8%;width:310px;height:310px;background:rgba(255,255,255,.13);border-radius:50%}.section-header>*{position:relative;z-index:1}.section-header.purple{background:var(--purple-grad)}.section-header.blue{background:var(--blue-grad)}.section-header.green{background:var(--green-grad)}.section-header.teal{background:var(--teal-grad)}.section-header.orange{background:var(--orange-grad)}.section-header.rose{background:var(--rose-grad)}.section-header.slate{background:var(--slate-grad)}.section-header.red{background:var(--red-grad)}.section-kicker{text-transform:uppercase;letter-spacing:.12em;font-size:11px;opacity:.84;font-weight:950;margin-bottom:6px}.section-title-row{display:flex;align-items:center;gap:10px}.info-dot{width:22px;height:22px;border-radius:999px;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.38);display:inline-flex;align-items:center;justify-content:center;font-size:13px;font-weight:950}.section-title{margin:0;font-size:25px;letter-spacing:-.035em;font-weight:950}.section-description{margin:7px 0 0;color:rgba(255,255,255,.84);line-height:1.45;font-size:13px}.section-status{background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.24);border-radius:999px;padding:8px 12px;font-size:12px;font-weight:950;display:flex;align-items:center;gap:8px;white-space:nowrap}.section-status:before{content:"▾";font-size:14px}.section-body{padding:22px;display:flex;flex-direction:column;gap:16px}
.card,.range-card{border:1px solid rgba(216,225,238,.95);background:linear-gradient(180deg,#fff,#f9fbff);border-radius:14px;padding:19px;min-height:108px;box-shadow:0 1px 0 rgba(15,23,42,.03);transition:.16s}.section:not(.system-section):not(.time-section):not(.race-section) .card{display:flex;flex-direction:column;justify-content:center}.section:not(.system-section):not(.time-section):not(.race-section) .card-title{text-align:center;margin-bottom:14px}.card:hover,.range-card:hover{border-color:#b8c4d6;box-shadow:0 8px 20px rgba(15,23,42,.075)}.card-title{color:#475569;font-size:12px;font-weight:950;margin-bottom:11px;text-transform:uppercase;letter-spacing:.055em}.card-title.centre-title{text-align:center}.center{text-align:center}.grid{display:grid;gap:16px}.grid.two{grid-template-columns:1fr 1fr}.grid.three{grid-template-columns:repeat(3,1fr)}.grid.four{grid-template-columns:repeat(4,1fr)}.grid.age-grid{grid-template-columns:1fr 1fr .95fr 1.08fr}.grid.lower-three{grid-template-columns:1fr 1fr 1fr}.grid.lower-two{grid-template-columns:1fr 1fr}.grid.race-top{grid-template-columns:5fr 7fr}.grid.race-lower{grid-template-columns:1.35fr .8fr .95fr 1.1fr}.race-lower .card{display:flex;flex-direction:column;justify-content:center}input,select{width:100%;height:38px;border:1px solid #cbd5e1;background:white;border-radius:10px;padding:7px 10px;font-size:13px;color:#111827}label{display:block;color:#64748b;font-size:11px;font-weight:850;margin-bottom:6px;text-align:center}.inline-inputs>div,.compact-inputs>div{position:relative}.inline-inputs input,.inline-inputs select,.compact-inputs input,.compact-inputs select{text-align:center}.inline-inputs,.compact-inputs{align-items:end}.inline-inputs>div+div,.compact-inputs>div+div{border-left:1px solid var(--border);padding-left:10px}.inline-inputs{display:grid;grid-template-columns:1fr 1fr;gap:10px;max-width:310px;margin:0 auto}
.chips{display:flex;gap:10px;flex-wrap:wrap}.chips.center{justify-content:center}.chips.spread{justify-content:space-between}.chips.fill .chip{flex:1 1 auto}.chips.fill-tight .chip{flex:1 1 0}.chips.single-line{flex-wrap:nowrap}.chips.group-line{display:grid;gap:10px}.chips.group-line.flat-going{grid-template-columns:repeat(6,1fr)}.chips.group-line.aw-going{grid-template-columns:repeat(4,1fr)}.chips.group-line .chip{width:100%;padding-left:10px;padding-right:10px}.chip-row-stack{display:flex;flex-direction:column;gap:10px}.equal-buttons-3{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.equal-buttons-4{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.equal-buttons-5{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}.equal-buttons-6{display:grid;grid-template-columns:repeat(6,1fr);gap:10px}.equal-buttons-3 .chip,.equal-buttons-4 .chip,.equal-buttons-5 .chip,.equal-buttons-6 .chip{width:100%;padding-left:10px;padding-right:10px}.chip{min-height:38px;display:inline-flex;align-items:center;justify-content:center;padding:10px 18px;font-size:13px;font-weight:900;line-height:1;border:1px solid #cfd8e3;background:white;color:#111827;border-radius:999px;box-shadow:0 2px 9px rgba(15,23,42,.04);transform:translateY(0) scale(1);transition:transform .16s cubic-bezier(.2,1.45,.35,1),box-shadow .16s,border-color .16s,background .16s,color .16s;white-space:nowrap}.chip:hover{transform:translateY(-4px) scale(1.045);box-shadow:0 11px 22px rgba(15,23,42,.16);border-color:#94a3b8}.chip.selected{color:white;border-color:transparent;background:var(--selected-grad)!important;box-shadow:0 10px 20px rgba(249,115,22,.22)}
.section.system-section{--selected-grad:linear-gradient(135deg,#22c55e,#4ade80);--section-border:#7c3aed}
.section.time-section{--selected-grad:linear-gradient(135deg,#06b6d4,#3b82f6);--section-border:#2563eb}
.section.race-section{--selected-grad:var(--orange-grad);--section-border:#16a34a}
.section.distance-section{--selected-grad:linear-gradient(135deg,#a855f7,#6366f1);--section-border:#0891b2}
.section.horse-section{--selected-grad:linear-gradient(135deg,#0ea5e9,#38bdf8);--section-border:#f97316}
.section.ratings-section{--selected-grad:linear-gradient(135deg,#14b8a6,#2dd4bf);--section-border:#e11d48}
.section.form-section{--selected-grad:linear-gradient(135deg,#8b5cf6,#a78bfa);--section-border:#16a34a}
.section.lto-section{--selected-grad:linear-gradient(135deg,#f97316,#fb923c);--section-border:#334155}
.section.market-section{--selected-grad:linear-gradient(135deg,#10b981,#34d399);--section-border:#2563eb}
.section.actions-section{--selected-grad:linear-gradient(135deg,#ec4899,#f472b6);--section-border:#dc2626}.chip.selected:hover{transform:translateY(-5px) scale(1.055);box-shadow:0 15px 28px rgba(249,115,22,.26)}.chip.disabled{opacity:.45;filter:grayscale(.35);background:#f1f5f9;color:#64748b;border-color:#e2e8f0}.note{margin-top:10px;color:var(--muted);font-size:12px;line-height:1.45}
.system-grid{display:grid;grid-template-columns:1.1fr 1fr 1fr;gap:16px}.selection-tile{background:linear-gradient(135deg,#172554,#4f46e5);color:white;border-radius:18px;padding:22px;min-height:175px;display:flex;flex-direction:column;justify-content:center}.selection-tile .mini{text-transform:uppercase;letter-spacing:.12em;font-size:11px;font-weight:950;color:#c7d2fe;margin-bottom:12px}.selection-tile strong{font-size:31px;line-height:1.05;letter-spacing:-.04em}.selection-tile p{color:#dbeafe;margin:10px 0 0;line-height:1.45;font-size:13px}.report-buttons{display:flex;gap:12px;flex-wrap:wrap}.btn{border:1px solid var(--border);background:white;color:#172033;border-radius:10px;padding:11px 14px;font-weight:950;font-size:13px;box-shadow:var(--shadow-soft);transition:.16s}.btn:hover{transform:translateY(-4px) scale(1.035);box-shadow:0 13px 25px rgba(15,23,42,.16)}.btn.quick{color:white;border:0;background:linear-gradient(135deg,var(--blue),var(--purple))}.btn.deep{color:white;border:0;background:linear-gradient(135deg,var(--teal),var(--blue))}.btn.compare{color:white;border:0;background:linear-gradient(135deg,var(--orange),var(--rose))}
.time-strip{display:grid;grid-template-columns:1.45fr 1fr 1fr 1.25fr;gap:18px;align-items:stretch;background:linear-gradient(180deg,#fff,#f9fbff);border:1px solid rgba(216,225,238,.95);border-radius:16px;padding:18px}.time-block{display:flex;flex-direction:column;justify-content:flex-start}.time-block .card-title{min-height:15px;margin-bottom:14px;text-align:center}.time-block.date-range,.time-block.month-range{min-width:0}.time-block.date-range .inline-inputs,.time-block.month-range .inline-inputs{max-width:none;width:100%;grid-template-columns:1fr 1fr}.time-block.date-range input,.time-block.month-range select{text-align:center}.time-block.day-week{justify-content:flex-start;padding-bottom:0}.time-block.day-week .card-title{margin-bottom:14px}.time-block.day-week .day-row{margin-top:19px;margin-bottom:0;align-items:center}.time-block+.time-block{border-left:1px solid var(--border);padding-left:18px}.time-window .chips{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.time-window .chip{min-width:0;padding-left:12px;padding-right:12px;width:100%}.day-row{gap:6px}.day-row .chip{min-width:0;padding-left:10px;padding-right:10px;flex:1 1 0}.season-grid{display:grid;grid-template-columns:2fr 1fr;gap:16px;align-items:stretch}.season-grid .card{display:flex;flex-direction:column;justify-content:flex-start}.season-grid .card .card-title{margin-bottom:14px;text-align:center;min-height:15px}.season-grid .chip{min-width:0}.season-presets{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.quick-presets{display:grid;grid-template-columns:repeat(4,1fr);gap:9px}.quick-presets .chip{min-width:0;padding-left:10px;padding-right:10px}.range-title-row{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:10px}.range-current{margin:6px auto 18px;padding:7px 16px;border-radius:11px;background:#eef2ff;border:1px solid #c7d2fe;color:#1e3a8a;font-weight:950;font-size:13px;text-align:center;width:fit-content;box-shadow:0 3px 10px rgba(15,23,42,.06)}.range-title{color:#475569;font-size:12px;font-weight:950;text-transform:uppercase;letter-spacing:.055em}.range-endpoints{display:flex;gap:18px;color:#475569;font-weight:900;font-size:12px}.range-track{height:12px;border-radius:999px;background-image:repeating-linear-gradient(90deg,rgba(255,255,255,.42) 0,rgba(255,255,255,.42) 1px,transparent 1px,transparent calc(100% / 33)),linear-gradient(90deg,#155e75,#0891b2,#2563eb);position:relative;margin:20px 0 12px}.handle{position:absolute;top:50%;width:22px;height:22px;border-radius:999px;background:white;box-shadow:0 5px 14px rgba(15,23,42,.18)}.handle.start{left:0;transform:translate(0,-50%);border:5px solid #0891b2}.handle.finish{right:0;transform:translate(0,-50%);border:5px solid #dc2626}.handle.finish:after{content:"";position:absolute;left:50%;top:17px;width:3px;height:22px;background:#dc2626;transform:translateX(-50%);border-radius:4px}.tick-labels{display:flex;justify-content:space-between;color:#64748b;font-size:10px;font-weight:850;margin-top:8px}.tick-labels.runners{font-size:12px}
@media(max-width:1450px){.topbar,.time-strip,.season-grid,.system-grid,.grid.race-top,.grid.race-lower{grid-template-columns:1fr}.top-centre{justify-content:flex-start;flex-wrap:wrap}.top-icons{justify-content:flex-start}.time-block+.time-block{border-left:0;padding-left:0;border-top:1px solid var(--border);padding-top:16px}.chips.single-line{flex-wrap:wrap}}@media(max-width:900px){.app{grid-template-columns:1fr}.sidebar{position:relative;height:auto}.main{padding:20px 16px 50px}.grid.two,.grid.three,.grid.four{grid-template-columns:1fr}}

/* === Visual refinement pass: hierarchy, spacing, interaction depth === */
:root{
  --slate-grad:linear-gradient(135deg,#0f172a,#334155 58%,#4f46e5);
  --red-grad:linear-gradient(135deg,#7f1d1d,#dc2626 58%,#f97316);
  --card-soft:#f9fbff;
}

.main{padding:28px 36px 78px;}
.topbar{grid-template-columns:minmax(320px,1fr) minmax(620px,1.55fr) auto;gap:34px;margin-bottom:28px;}
.selection-control{
  min-height:64px;
  padding:12px 20px;
  background:linear-gradient(135deg,#ffffff,#f5f3ff);
  border:1px solid #d8d4ff;
  box-shadow:0 10px 26px rgba(79,70,229,.10);
}
.selection-label{background:#ede9fe;color:#4c1d95;}
.selection-value{font-size:17px;font-weight:980;color:#111827;}
.ranking-inline{gap:14px;}
.ranking-inline .chip{min-height:42px;padding:11px 20px;}
.top-icon:hover{transform:translateY(-3px) scale(1.04);box-shadow:0 13px 24px rgba(15,23,42,.16);}

.sidebar{padding:24px 18px;}
.logo-wrap{padding-bottom:24px;margin-bottom:18px;}
.logo-mark{width:64px;height:64px;}
.logo-mark img{width:64px;height:64px;}
.nav-item{min-height:52px;padding:12px 13px;}
.nav-item.active{
  background:linear-gradient(135deg,#eef6ff,#ffffff 46%,#e0e7ff);
  box-shadow:0 12px 26px rgba(79,70,229,.28), inset 4px 0 0 #7c3aed;
}
.nav-item.active:after{
  content:"";
  position:absolute;
  right:10px;
  width:8px;height:8px;
  border-radius:50%;
  background:#7c3aed;
  box-shadow:0 0 0 5px rgba(124,58,237,.12);
}
.nav-icon{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.10);}
.subnav{padding-top:12px;padding-bottom:12px;}
.subnav a{padding:8px 10px;}
.subnav a.focus{box-shadow:inset 3px 0 0 #60a5fa;}

.section{margin-bottom:32px;box-shadow:0 12px 30px rgba(15,23,42,.085);}
.section:hover{transform:none;box-shadow:0 15px 38px rgba(15,23,42,.11);}
.section-header{padding:22px 26px;}
.section-body{padding:25px;gap:20px;}
.section-title{font-size:27px;}
.section-description{font-size:13.5px;}
.section-status{padding:9px 14px;background:rgba(255,255,255,.18);}

.card,.range-card{
  padding:21px;
  min-height:116px;
  background:linear-gradient(180deg,#ffffff,#f8fbff);
  box-shadow:0 2px 0 rgba(15,23,42,.025);
}
.card:hover,.range-card:hover{
  transform:translateY(-1px);
  border-color:#aebdd1;
  box-shadow:0 10px 24px rgba(15,23,42,.09);
}
.card-title,.range-title{letter-spacing:.075em;color:#42526a;}
.grid{gap:18px;}

.chip{min-height:40px;padding:11px 19px;box-shadow:0 3px 10px rgba(15,23,42,.055);}
.chip:hover{transform:translateY(-3px) scale(1.035);}
.chip.selected{box-shadow:0 11px 22px rgba(15,23,42,.19), 0 0 0 1px rgba(255,255,255,.16) inset;}
.chip.selected:hover{box-shadow:0 15px 30px rgba(15,23,42,.24), 0 0 0 1px rgba(255,255,255,.2) inset;}

.time-strip{
  padding:22px;
  gap:22px;
  background:linear-gradient(180deg,#ffffff,#f8fbff);
  box-shadow:inset 0 0 0 1px rgba(226,232,240,.55);
}
.time-block+.time-block{padding-left:22px;}
.time-window .chips{gap:12px;}
.day-row{gap:8px;}
.day-row .chip{min-height:43px;}
.season-grid{gap:18px;}
.season-presets,.quick-presets{gap:11px;}

.range-card{position:relative;}
.range-title-row{margin-bottom:8px;}
.range-current{
  margin:8px auto 20px;
  padding:8px 18px;
  border-radius:12px;
  background:linear-gradient(135deg,#eef2ff,#f8fafc);
  border:1px solid #bfc9ff;
  color:#173a8a;
  font-size:14px;
  box-shadow:0 5px 14px rgba(37,99,235,.10);
}
.range-track{height:14px;margin:22px 0 14px;}
.handle{width:24px;height:24px;}

.race-section .grid.race-top:first-child .card{min-height:122px;}
.race-section .grid.race-top:nth-of-type(2) .card{min-height:108px;}
.race-section .age-grid .card{padding-top:22px;padding-bottom:22px;}
.race-lower .card{min-height:108px;}

.distance-section .range-current,.horse-section .range-current{font-size:14px;}
.distance-section select{height:44px;border-radius:12px;}
.distance-section .chip-row-stack{gap:12px;}
.distance-section .equal-buttons-3 .chip,
.distance-section .equal-buttons-4 .chip,
.distance-section .equal-buttons-5 .chip{min-height:42px;}

.horse-section .lower-three{grid-template-columns:1.08fr 1fr .78fr;}
.horse-section .equal-buttons-5 .chip{min-height:43px;}
.horse-section .chips.single-line .chip{min-height:43px;}
.horse-section .card:nth-of-type(2),
.horse-section .card:nth-of-type(3){min-height:122px;}
.horse-section .card-title{margin-bottom:16px;}

input,select{height:41px;border-radius:11px;}
.inline-inputs{gap:12px;}
.inline-inputs>div+div,.compact-inputs>div+div{padding-left:12px;}
label{font-weight:900;color:#5b6b83;}

@media(max-width:1450px){.topbar{grid-template-columns:1fr}.top-centre{justify-self:start}.main{padding:22px 24px 64px}}


/* spacing pass: more vertical breathing room */
.section{margin-bottom:38px;}
.section-body{padding:30px 28px 31px;gap:26px;}
.grid{gap:24px;}
.system-grid{gap:24px;}
.time-strip{padding:26px;gap:26px;}
.time-block+.time-block{padding-left:26px;}
.season-grid{gap:24px;}
.card,.range-card{padding:25px;min-height:132px;}
.range-card{min-height:150px;}
.card-title,.range-title{margin-bottom:16px;}
.section:not(.system-section):not(.time-section):not(.race-section) .card-title{margin-bottom:17px;}
.selection-tile{min-height:198px;padding:27px;}
.range-current{margin:12px auto 24px;}
.range-track{margin:26px 0 18px;}
.chip-row-stack{gap:14px;}
.equal-buttons-3,.equal-buttons-4,.equal-buttons-5,.equal-buttons-6,.season-presets,.quick-presets,.time-window .chips{gap:13px;}
.chips{gap:13px;}
.report-buttons{gap:15px;}
.inline-inputs{gap:14px;}
.inline-inputs>div+div,.compact-inputs>div+div{padding-left:14px;}

/* === Final topbar architectural alignment + distance proportion pass === */
.topbar{
  display:grid;
  grid-template-columns:minmax(320px,1fr) minmax(620px,760px) minmax(190px,1fr);
  align-items:center;
  column-gap:24px;
}
.top-centre{
  justify-self:center;
  width:100%;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:18px;
}
.selection-control{
  justify-self:end;
  min-height:50px;
  padding:8px 14px;
  gap:12px;
  border-radius:15px;
}
.selection-label{
  font-size:12px;
  padding:8px 10px;
}
.selection-value{
  font-size:14px;
}
.ranking-inline{
  justify-self:start;
  gap:10px;
}
.ranking-label{
  font-size:13px;
}
.ranking-inline .chip{
  min-height:36px;
  padding:8px 15px;
  font-size:12px;
}
.top-icons{
  justify-self:end;
  gap:10px;
}
.top-icon{
  width:42px;
  height:42px;
  border-radius:14px;
  font-size:18px;
}
.top-icon.login:after{
  width:8px;
  height:8px;
  right:5px;
  bottom:5px;
}
.distance-section .grid.three{
  grid-template-columns:.85fr 1.35fr .85fr;
}
.distance-section .grid.three .card:first-child{
  min-height:116px;
  padding:21px;
}
.distance-section .equal-buttons-2 .chip{
  min-height:32px;
  padding:8px 14px;
  font-size:12px;
}
.distance-section .group-line .chip{
  min-height:43px;
}
@media(max-width:1450px){
  .topbar{grid-template-columns:1fr;}
  .top-centre{
    justify-self:start;
    width:auto;
    display:flex;
    flex-wrap:wrap;
  }
  .top-icons{justify-self:start;}
  .distance-section .grid.three{grid-template-columns:1fr;}
}


/* === Final cleaned SVG icon integration pass === */
.logo-mark{
  width:64px !important;
  height:64px !important;
}
.logo-mark img{
  width:64px !important;
  height:64px !important;
  object-fit:contain !important;
  display:block !important;
  background:transparent !important;
  border:none !important;
  box-shadow:none !important;
  filter:drop-shadow(0 8px 18px rgba(124,58,237,.42)) !important;
}

.nav-icon{
  width:42px !important;
  height:42px !important;
  min-width:42px !important;
  border-radius:0 !important;
  background:transparent !important;
  border:none !important;
  box-shadow:none !important;
  overflow:visible !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 auto !important;
}

.nav-icon img{
  width:34px !important;
  height:34px !important;
  object-fit:contain !important;
  display:block !important;
  background:transparent !important;
  border:none !important;
  box-shadow:none !important;
  filter:drop-shadow(0 4px 9px rgba(0,0,0,.38)) !important;
}

.nav-item.active .nav-icon{
  background:transparent !important;
  border:none !important;
  box-shadow:none !important;
}
.nav-item.active .nav-icon img{
  width:36px !important;
  height:36px !important;
  transform:scale(1.04) !important;
  filter:drop-shadow(0 7px 15px rgba(124,58,237,.50)) !important;
}

.nav-cluster .nav-icon{
  width:42px !important;
  height:42px !important;
  min-width:42px !important;
}
.nav-cluster .nav-icon img{
  width:34px !important;
  height:34px !important;
}

.nav-item{
  gap:14px !important;
}
.nav-cluster .nav-item{
  gap:14px !important;
}

.nav-item:hover .nav-icon img{
  transform:translateY(-1px) scale(1.06) !important;
  filter:drop-shadow(0 7px 15px rgba(124,58,237,.38)) !important;
}


/* === Strong icon sizing pass using cleaned no-background SVGs === */
.logo-wrap{
  gap:16px !important;
}
.logo-mark{
  width:78px !important;
  height:78px !important;
}
.logo-mark img{
  width:78px !important;
  height:78px !important;
  object-fit:contain !important;
  display:block !important;
  background:transparent !important;
  border:none !important;
  box-shadow:none !important;
  filter:drop-shadow(0 10px 22px rgba(124,58,237,.50)) !important;
}

/* transparent icon containers; no tile backgrounds */
.nav-icon{
  width:46px !important;
  height:46px !important;
  min-width:46px !important;
  border-radius:0 !important;
  background:transparent !important;
  border:none !important;
  box-shadow:none !important;
  overflow:visible !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 auto !important;
}

.nav-icon img{
  width:42px !important;
  height:42px !important;
  max-width:none !important;
  max-height:none !important;
  object-fit:contain !important;
  display:block !important;
  background:transparent !important;
  border:none !important;
  box-shadow:none !important;
  filter:drop-shadow(0 5px 11px rgba(0,0,0,.42)) !important;
  transform-origin:center center !important;
}

/* Active row: icon should pop but not sit inside another badge */
.nav-item.active .nav-icon{
  background:transparent !important;
  border:none !important;
  box-shadow:none !important;
}
.nav-item.active .nav-icon img{
  filter:drop-shadow(0 8px 17px rgba(124,58,237,.56)) !important;
}

/* Keep text spacing clean with larger icons */
.nav-item{
  gap:16px !important;
}
.nav-cluster .nav-item{
  gap:16px !important;
}

/* Per-icon scale corrections for SVGs with large canvas whitespace */
.nav-icon[data-icon="nav-dashboard"] img{ transform:scale(1.85) !important; }
.nav-icon[data-icon="nav-system-builder"] img{ transform:scale(1.75) !important; }
.nav-icon[data-icon="nav-sire-negatives"] img{ transform:scale(1.18) !important; }
.nav-icon[data-icon="nav-damsire-negatives"] img{ transform:scale(1.18) !important; }
.nav-icon[data-icon="nav-quick-results"] img{ transform:scale(1.85) !important; }
.nav-icon[data-icon="nav-deep-analysis"] img{ transform:scale(1.85) !important; }
.nav-icon[data-icon="nav-saved-systems"] img{ transform:scale(1.85) !important; }
.nav-icon[data-icon="nav-race-profiling"] img{ transform:scale(1.85) !important; }
.nav-icon[data-icon="nav-trainer-stats"] img{ transform:scale(1.34) !important; }
.nav-icon[data-icon="nav-jockey-stats"] img{ transform:scale(1.34) !important; }
.nav-icon[data-icon="nav-tj-combo"] img{ transform:scale(1.34) !important; }
.nav-icon[data-icon="nav-trends-engine"] img{ transform:scale(1.34) !important; }
.nav-icon[data-icon="nav-ai"] img{ transform:scale(1.95) !important; }

/* Active/hover should add lift on top of each icon scale */
.nav-item:hover .nav-icon img{
  filter:drop-shadow(0 8px 17px rgba(124,58,237,.42)) !important;
}

/* Slightly increase active-system icon beyond its base scale */
.nav-item.active .nav-icon[data-icon="nav-system-builder"] img{
  transform:scale(1.88) !important;
}


/* === Icon size + hover-bounce correction pass === */

/* Bigger horse logo */
.logo-mark{
  width:96px !important;
  height:96px !important;
}
.logo-mark img{
  width:96px !important;
  height:96px !important;
  object-fit:contain !important;
  transform:scale(1.28) !important;
  transform-origin:center center !important;
  filter:drop-shadow(0 12px 26px rgba(124,58,237,.58)) !important;
}

/* Larger clean icon area */
.nav-icon{
  width:54px !important;
  height:54px !important;
  min-width:54px !important;
  overflow:visible !important;
  background:transparent !important;
  border:none !important;
  box-shadow:none !important;
}

/* All icons now use --icon-scale so hover does not reset/shrink them */
.nav-icon img{
  width:46px !important;
  height:46px !important;
  object-fit:contain !important;
  transform:translateY(0) scale(var(--icon-scale,1.45)) !important;
  transform-origin:center center !important;
  transition:
    transform .18s cubic-bezier(.18,1.7,.35,1),
    filter .18s ease !important;
  filter:drop-shadow(0 5px 12px rgba(0,0,0,.42)) !important;
}

/* Individual icon size tuning */
.nav-icon[data-icon="nav-dashboard"]{--icon-scale:2.45;}
.nav-icon[data-icon="nav-system-builder"]{--icon-scale:2.35;}
.nav-icon[data-icon="nav-sire-negatives"]{--icon-scale:1.55;}
.nav-icon[data-icon="nav-damsire-negatives"]{--icon-scale:1.55;}
.nav-icon[data-icon="nav-quick-results"]{--icon-scale:2.20;}
.nav-icon[data-icon="nav-deep-analysis"]{--icon-scale:2.20;}
.nav-icon[data-icon="nav-saved-systems"]{--icon-scale:2.30;}
.nav-icon[data-icon="nav-race-profiling"]{--icon-scale:2.20;}
.nav-icon[data-icon="nav-trainer-stats"]{--icon-scale:1.62;}
.nav-icon[data-icon="nav-jockey-stats"]{--icon-scale:1.62;}
.nav-icon[data-icon="nav-tj-combo"]{--icon-scale:1.62;}
.nav-icon[data-icon="nav-trends-engine"]{--icon-scale:1.62;}
.nav-icon[data-icon="nav-ai"]{--icon-scale:2.35;}

/* Active row keeps same base scaling, just slightly more pop */
.nav-item.active .nav-icon img{
  transform:translateY(0) scale(calc(var(--icon-scale,1.45) * 1.04)) !important;
  filter:drop-shadow(0 8px 18px rgba(124,58,237,.60)) !important;
}

/* Hover bounce: lift + enlarge, never shrink */
.nav-item:hover .nav-icon img{
  transform:translateY(-4px) scale(calc(var(--icon-scale,1.45) * 1.12)) !important;
  filter:drop-shadow(0 11px 22px rgba(124,58,237,.52)) !important;
}

/* Row movement stays dynamic but controlled */
.nav-item:hover{
  transform:translateX(4px) translateY(-1px) !important;
}

/* Active row hover: a little stronger but still stable */
.nav-item.active:hover .nav-icon img{
  transform:translateY(-4px) scale(calc(var(--icon-scale,1.45) * 1.16)) !important;
}

/* More room between larger icons and labels */
.nav-item,
.nav-cluster .nav-item{
  gap:20px !important;
}

/* Avoid large icons being clipped in linked workspace column */
.nav-cluster{
  overflow:visible !important;
  padding-left:20px !important;
}
.sidebar{
  overflow-x:hidden !important;
}


/* === FINAL SCALE ADJUSTMENTS === */

/* Horse logo MUCH bigger (≈150%) */
.logo-mark{
  width:120px !important;
  height:120px !important;
}
.logo-mark img{
  width:120px !important;
  height:120px !important;
  transform:scale(1.6) !important;
}

/* Increase ALL icons slightly */
.nav-icon img{
  transform:translateY(0) scale(calc(var(--icon-scale,1.45) * 1.15)) !important;
}

/* Specifically fix the two problem icons */
.nav-icon[data-icon="nav-dashboard"]{
  --icon-scale:3.2 !important;
}
.nav-icon[data-icon="nav-system-builder"]{
  --icon-scale:3.0 !important;
}


/* === Icon alignment + visual-weight correction pass === */

/* Bring horse logo closer to the Racing Analytics text */
.logo-wrap{
  gap:8px !important;
  align-items:center !important;
}

.logo-mark{
  width:112px !important;
  height:112px !important;
  min-width:112px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
}

.logo-mark img{
  width:112px !important;
  height:112px !important;
  object-fit:contain !important;
  transform:scale(1.42) !important;
  transform-origin:center center !important;
  filter:drop-shadow(0 12px 26px rgba(124,58,237,.58)) !important;
}

/* Align every nav row cleanly around a consistent icon column */
.nav-item{
  display:flex !important;
  align-items:center !important;
  gap:14px !important;
}

.nav-cluster .nav-item{
  gap:14px !important;
}

/* Clean, centred icon frame */
.nav-icon{
  width:46px !important;
  height:46px !important;
  min-width:46px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  position:relative !important;
  background:transparent !important;
  border:none !important;
  box-shadow:none !important;
  overflow:visible !important;
}

/* Base icon rendering */
.nav-icon img{
  width:46px !important;
  height:46px !important;
  max-width:none !important;
  max-height:none !important;
  object-fit:contain !important;
  display:block !important;
  transform-origin:center center !important;
  transform:translateY(0) scale(calc(var(--icon-scale,1.45) * 1.10)) !important;
  transition:
    transform .20s cubic-bezier(.20,1.60,.30,1),
    filter .20s ease !important;
  filter:drop-shadow(0 5px 12px rgba(0,0,0,.42)) !important;
}

/* Increase all icon weights very slightly for balance */
.nav-icon[data-icon="nav-sire-negatives"]{--icon-scale:1.72 !important;}
.nav-icon[data-icon="nav-damsire-negatives"]{--icon-scale:1.72 !important;}
.nav-icon[data-icon="nav-quick-results"]{--icon-scale:2.42 !important;}
.nav-icon[data-icon="nav-deep-analysis"]{--icon-scale:2.42 !important;}
.nav-icon[data-icon="nav-saved-systems"]{--icon-scale:2.50 !important;}
.nav-icon[data-icon="nav-race-profiling"]{--icon-scale:2.42 !important;}
.nav-icon[data-icon="nav-trainer-stats"]{--icon-scale:1.80 !important;}
.nav-icon[data-icon="nav-jockey-stats"]{--icon-scale:1.80 !important;}
.nav-icon[data-icon="nav-tj-combo"]{--icon-scale:1.80 !important;}
.nav-icon[data-icon="nav-trends-engine"]{--icon-scale:1.80 !important;}
.nav-icon[data-icon="nav-ai"]{--icon-scale:2.55 !important;}

/* Specific correction for SVGs with heavy internal whitespace */
.nav-icon[data-icon="nav-dashboard"]{
  --icon-scale:4.15 !important;
}

.nav-icon[data-icon="nav-system-builder"]{
  --icon-scale:3.90 !important;
}

/* Small positional corrections for problem icons */
.nav-icon[data-icon="nav-dashboard"] img{
  transform:translateY(1px) scale(calc(var(--icon-scale,1.45) * 1.10)) !important;
}

.nav-icon[data-icon="nav-system-builder"] img{
  transform:translateY(0) scale(calc(var(--icon-scale,1.45) * 1.10)) !important;
}

/* Active system builder row: keep same visual system, just extra pop */
.nav-item.active .nav-icon{
  background:transparent !important;
  border:none !important;
  box-shadow:none !important;
}

.nav-item.active .nav-icon img{
  filter:drop-shadow(0 8px 18px rgba(124,58,237,.60)) !important;
}

.nav-item.active .nav-icon[data-icon="nav-system-builder"] img{
  transform:translateY(0) scale(calc(var(--icon-scale,1.45) * 1.17)) !important;
}

/* Hover bounce: lift + grow, no shrink */
.nav-item:hover{
  transform:translateX(4px) translateY(-1px) !important;
}

.nav-item:hover .nav-icon img{
  transform:translateY(-3px) scale(calc(var(--icon-scale,1.45) * 1.22)) !important;
  filter:drop-shadow(0 11px 22px rgba(124,58,237,.52)) !important;
}

.nav-item.active:hover .nav-icon[data-icon="nav-system-builder"] img{
  transform:translateY(-3px) scale(calc(var(--icon-scale,1.45) * 1.24)) !important;
}

/* Prevent clipping in the linked-workspace column */
.nav-cluster{
  overflow:visible !important;
  padding-left:18px !important;
}

.sidebar{
  overflow-x:hidden !important;
}



/* === Live integration bridge === */
.page{display:none;}
.page.active{display:block;}
.logic-bridge{
  position:absolute !important;
  left:-99999px !important;
  top:auto !important;
  width:1px !important;
  height:1px !important;
  overflow:hidden !important;
}
.placeholder{
  border:1px dashed rgba(148,163,184,.6);
  border-radius:14px;
  padding:18px;
  color:#64748b;
  background:#f8fafc;
  font-weight:700;
}
.run-banner{
  display:none;
  margin:12px 0 18px;
  padding:14px 18px;
  border-radius:14px;
  background:#eff6ff;
  color:#1e3a8a;
  font-weight:900;
  border:1px solid #bfdbfe;
}
.run-banner.active{display:block;}
.status-ready,.status-running,.status-complete,.status-error{
  padding:14px 16px;
  border-radius:12px;
  font-weight:900;
}
.status-ready{background:#f8fafc;color:#334155;}
.status-running{background:#eff6ff;color:#1d4ed8;}
.status-complete{background:#ecfdf5;color:#166534;}
.status-error{background:#fef2f2;color:#991b1b;}
.summary-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}
.metric{
  border:1px solid #d8e1ee;
  border-radius:14px;
  padding:16px;
  background:linear-gradient(180deg,#fff,#f8fbff);
}
.metric-label{
  color:#64748b;
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.06em;
  margin-bottom:8px;
}
.metric-value{font-size:22px;}
.metric.positive .metric-value,.pl-positive{color:#16a34a;}
.metric.negative .metric-value,.pl-negative{color:#dc2626;}
.metric.warning .metric-value{color:#d97706;}
.verdict{
  border-radius:16px;
  padding:18px;
  margin-bottom:18px;
  border:1px solid #d8e1ee;
}
.verdict.positive{background:#ecfdf5;color:#14532d;}
.verdict.warning{background:#fffbeb;color:#92400e;}
.verdict.negative{background:#fef2f2;color:#991b1b;}
.verdict-title{
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:12px;
  font-weight:950;
  margin-bottom:6px;
}
.verdict-value{
  display:block;
  font-size:22px;
  margin-bottom:6px;
}
.summary-section{margin-top:22px;}
table{
  width:100%;
  border-collapse:collapse;
  background:white;
  border-radius:14px;
  overflow:hidden;
}
th,td{
  padding:11px 12px;
  border-bottom:1px solid #e2e8f0;
  text-align:left;
}
th{
  background:#f8fafc;
  color:#475569;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.06em;
}

/* === Batch 1 clean functional wiring controls === */
.dual-range{position:relative;min-height:46px;display:grid;align-items:center;margin:8px 0 10px;--range-left:0%;--range-right:100%;}
.dual-range::before{content:"";grid-area:1/1;height:12px;border-radius:999px;background:#e5e7eb;z-index:0;}
.dual-range::after{content:"";grid-area:1/1;height:12px;border-radius:999px;background:linear-gradient(90deg,#155e75,#0891b2,#2563eb);margin-left:var(--range-left);width:calc(var(--range-right) - var(--range-left));z-index:1;pointer-events:none;}
.dual-range input[type=range]{grid-area:1/1;width:100%;height:34px;background:transparent;padding:0;border:0;pointer-events:none;appearance:none;-webkit-appearance:none;z-index:2;}
.dual-range input[type=range]::-webkit-slider-runnable-track{height:12px;border-radius:999px;background:transparent;}
.dual-range input[type=range]::-moz-range-track{height:12px;border-radius:999px;background:transparent;}
.dual-range input[type=range]::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:24px;height:24px;margin-top:-6px;border-radius:999px;background:#fff;border:5px solid #0891b2;box-shadow:0 5px 14px rgba(15,23,42,.22);pointer-events:auto;cursor:pointer;}
.dual-range input[type=range]:last-child::-webkit-slider-thumb{border-color:#dc2626;}
.dual-range input[type=range]::-moz-range-thumb{width:24px;height:24px;border-radius:999px;background:#fff;border:5px solid #0891b2;box-shadow:0 5px 14px rgba(15,23,42,.22);pointer-events:auto;cursor:pointer;}
.dual-range input[type=range]:last-child::-moz-range-thumb{border-color:#dc2626;}
.course-summary{display:none;align-items:center;justify-content:space-between;gap:10px;margin-top:12px;padding:9px 10px;border-radius:11px;background:#eef2ff;border:1px solid #c7d2fe;color:#1e3a8a;font-weight:900;font-size:13px;}
.course-summary.active{display:flex;}
.mini-reset{border:1px solid #bfdbfe;border-radius:9px;background:#fff;color:#1d4ed8;font-size:12px;font-weight:950;padding:6px 9px;cursor:pointer;}
.mini-reset:hover{transform:translateY(-1px);box-shadow:0 6px 14px rgba(15,23,42,.12);}
.control-disabled{opacity:.68;background:linear-gradient(180deg,#f8fafc,#eef2f7)!important;}
.control-disabled input{cursor:not-allowed;background:#e5e7eb;color:#64748b;}
.chip[aria-disabled="true"]{cursor:pointer;}
select[multiple]{height:auto;min-height:150px;text-align:left;padding:8px;}
select[multiple] option{padding:7px 8px;border-radius:7px;}

/* Batch 1 defect fix: chips remain clickable over text/content. */
.chip,
.chip * {
  cursor: pointer;
}
.chip[aria-disabled="true"],
.chip.disabled,
.chip[aria-disabled="true"] *,
.chip.disabled * {
  cursor: not-allowed;
}
#country_chip_group .chip[data-country-detail="Ireland"],
#country_chip_group .chip[data-country-detail="Ireland"] * {
  cursor: pointer;
}
.rule-note{
  text-align:center;
  font-weight:950;
  color:#334155;
  background:#f8fafc;
  border:1px solid #dbeafe;
  border-radius:10px;
  padding:8px 10px;
}

/* === Batch 2 clean functional wiring === */
.course-picker{position:relative;width:100%;}
.course-picker-button{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid var(--border);background:#fff;border-radius:12px;padding:11px 12px;font-weight:900;color:var(--text);cursor:pointer;}
.course-picker-button:hover{box-shadow:0 8px 18px rgba(15,23,42,.10);transform:translateY(-1px);}
.course-picker-panel{display:none;position:absolute;left:0;right:0;top:calc(100% + 8px);z-index:40;background:#fff;border:1px solid #cbd5e1;border-radius:14px;box-shadow:0 18px 40px rgba(15,23,42,.18);padding:10px;max-height:320px;overflow:hidden;}
.course-picker.open .course-picker-panel{display:block;}
.course-search{width:100%;margin-bottom:8px;border:1px solid #cbd5e1;border-radius:10px;padding:9px 10px;font-weight:700;}
.course-options{max-height:245px;overflow:auto;display:grid;gap:4px;}
.course-option{display:flex;align-items:center;gap:8px;padding:7px 8px;border-radius:9px;font-size:13px;font-weight:750;cursor:pointer;}
.course-option:hover{background:#f1f5f9;}
.course-option input{width:auto;margin:0;}
.course-summary{margin-top:10px;}
.tick-labels.positioned{position:relative;height:22px;padding:0 12px;margin-top:2px;}
.tick-labels.positioned span{position:absolute;top:0;transform:translateX(-50%);font-size:10px;white-space:nowrap;}
.tick-labels.positioned span:first-child{transform:translateX(0);}
.tick-labels.positioned span:last-child{transform:translateX(-100%);}
.dual-range{margin-left:12px;margin-right:12px;}
.control-unavailable{opacity:.45;filter:grayscale(.35);background:#f1f5f9!important;color:#64748b!important;border-color:#e2e8f0!important;}
.control-disabled .chip{pointer-events:none;}
#going_group .chip.disabled,
#aw_surface_group .chip.disabled{cursor:not-allowed;}

/* === Batch 3 Time Layer completion === */
.help-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:17px;
  height:17px;
  margin-left:5px;
  border-radius:999px;
  background:#e0f2fe;
  color:#0369a1;
  border:1px solid #bae6fd;
  font-size:11px;
  font-weight:950;
  line-height:1;
  cursor:help;
  vertical-align:middle;
}
.help-icon:hover{
  background:#bae6fd;
  color:#0c4a6e;
}
.course-picker{z-index:30;}
.course-picker.open{z-index:5000;}
.course-picker-panel{z-index:6000;}


/* === Batch 3 cleanup: richer help tooltips, season reset state, dropdown stacking === */
.help-icon{position:relative;overflow:visible;}
.help-icon::after{
  content:attr(data-help);
  display:none;
  position:absolute;
  z-index:99999;
  top:calc(100% + 10px);
  left:50%;
  transform:translateX(-50%);
  width:min(340px, 78vw);
  padding:12px 14px;
  border-radius:14px;
  background:#0f172a;
  color:#f8fafc;
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 18px 42px rgba(15,23,42,.28);
  font-size:12px;
  line-height:1.45;
  font-weight:750;
  text-transform:none;
  letter-spacing:0;
  white-space:normal;
  text-align:left;
}
.help-icon:hover::after{display:block;}
.season-presets .chip.selected{box-shadow:0 8px 18px rgba(37,99,235,.16);}
body.course-picker-is-open #distance,
#distance:has(.course-picker.open){position:relative;z-index:9990;overflow:visible!important;}
body.course-picker-is-open #distance .section-body,
body.course-picker-is-open #distance .card,
#distance:has(.course-picker.open) .section-body,
#distance:has(.course-picker.open) .card{overflow:visible!important;}
body.course-picker-is-open .course-picker.open{position:relative;z-index:9995;}
body.course-picker-is-open .course-picker.open .course-picker-panel{z-index:10000;}
.time-section,
.time-section .section-body,
.time-section .card,
.time-block{overflow:visible!important;}

/* === Batch 4 Race Meta / Conditions wiring === */
.condition-flags-card .condition-subtitle{
  margin:12px 0 7px;
  text-align:center;
  font-size:11px;
  font-weight:950;
  color:#334155;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.condition-flags-card .condition-subtitle:first-of-type{margin-top:4px;}
#group_grade_listed_card.control-disabled .note{color:#64748b;}
#group_grade_listed_card .chip[aria-disabled="true"],
.condition-flags-card .chip[aria-disabled="true"]{
  opacity:.48;
  filter:grayscale(.35);
  background:#f1f5f9!important;
  color:#64748b!important;
  border-color:#e2e8f0!important;
}

/* === Guided section help popovers === */
.info-dot.section-help-dot{
  position:relative;
  cursor:help;
  overflow:visible;
}
.info-dot.section-help-dot::after{
  content:attr(data-help);
  display:none;
  position:absolute;
  z-index:100000;
  top:calc(100% + 12px);
  left:0;
  width:min(620px, 86vw);
  padding:16px 18px;
  border-radius:18px;
  background:#0f172a;
  color:#f8fafc;
  border:1px solid rgba(255,255,255,.16);
  box-shadow:0 22px 56px rgba(15,23,42,.34);
  font-size:13px;
  line-height:1.55;
  font-weight:760;
  text-transform:none;
  letter-spacing:0;
  white-space:normal;
  text-align:left;
}
.info-dot.section-help-dot:hover::after,
.info-dot.section-help-dot:focus::after{
  display:block;
}
.section-title-row{overflow:visible;}
.section-header{overflow:visible;}


/* Hybrid range control trial — Distance Range */
.distance-range-card .range-current{margin-bottom:14px;}
.range-hybrid-control{display:grid;grid-template-columns:104px minmax(220px,1fr) 104px;gap:14px;align-items:center;margin:4px 0 8px;}
.range-hybrid-control .dual-range{margin:0;}
.range-value-pill{height:42px;margin:0;border:1px solid #c7d2fe;background:linear-gradient(180deg,#ffffff,#f8fbff);border-radius:999px;display:flex;align-items:center;justify-content:center;gap:5px;padding:0 10px;box-shadow:0 6px 16px rgba(15,23,42,.07);color:#1e3a8a;font-size:11px;font-weight:950;text-transform:uppercase;letter-spacing:.04em;}
.range-value-pill input{width:42px;height:28px;border:0;background:transparent;padding:0;text-align:center;color:#0f172a;font-size:14px;font-weight:950;appearance:textfield;-moz-appearance:textfield;}
.range-value-pill input::-webkit-outer-spin-button,.range-value-pill input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}
.range-anchor-row{display:flex;justify-content:space-between;color:#64748b;font-size:11px;font-weight:850;margin:2px 116px 0;}
@media (max-width:900px){.range-hybrid-control{grid-template-columns:1fr 1fr;}.range-hybrid-control .dual-range{grid-column:1 / -1;order:3;margin-top:8px}.range-anchor-row{margin-left:0;margin-right:0}}

/* Distance hybrid control refinement v2 */
.distance-range-card .range-title-row{margin-bottom:8px;}
.distance-summary-pill{width:max-content;max-width:100%;margin:0 auto 18px!important;padding:9px 18px;border:1px solid #c7d2fe;border-radius:14px;background:linear-gradient(180deg,#ffffff,#f8fbff);box-shadow:0 8px 22px rgba(15,23,42,.08);display:flex;flex-direction:column;align-items:center;gap:3px;color:#1e3a8a;font-weight:950;}
.distance-summary-pill span{font-size:14px;line-height:1.1;}
.distance-summary-pill small{font-size:11px;line-height:1.15;color:#64748b;font-weight:850;}
.distance-hybrid-control{display:grid;grid-template-columns:132px minmax(260px,1fr) 132px;gap:18px;align-items:center;margin:6px 0 8px;}
.distance-slider-zone{display:grid;grid-template-rows:auto 22px;align-items:center;min-width:0;}
.distance-slider-zone .dual-range{margin:0!important;width:100%;}
.distance-value-card{min-height:88px;border:1px solid #c7d2fe;background:linear-gradient(180deg,#ffffff,#f8fbff);border-radius:18px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:10px 12px;box-shadow:0 8px 20px rgba(15,23,42,.08);color:#1e3a8a;text-align:center;}
.value-card-kicker{font-size:10px;font-weight:950;text-transform:uppercase;letter-spacing:.08em;color:#64748b;}
.value-card-main{display:flex;align-items:baseline;justify-content:center;gap:4px;color:#0f172a;font-weight:950;}
.value-card-main input{width:54px;height:28px;border:0;background:transparent;padding:0;text-align:right;color:#0f172a;font-size:18px;font-weight:950;appearance:textfield;-moz-appearance:textfield;}
.value-card-main input::-webkit-outer-spin-button,.value-card-main input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}
.value-card-main span{font-size:13px;color:#1e3a8a;font-weight:950;}
.value-card-miles{font-size:12px;font-weight:900;color:#1e3a8a;min-height:16px;}
.value-card-yards{font-size:11px;font-weight:820;color:#64748b;}
.distance-anchor-row{position:relative;height:22px;margin:5px 0 0!important;color:#64748b;font-size:11px;font-weight:850;}
.distance-anchor-row span{position:absolute;top:0;transform:translateX(-50%);white-space:nowrap;}
.distance-yards-summary{text-align:center;margin-top:2px;color:#64748b;font-weight:760;}
@media (max-width:900px){.distance-hybrid-control{grid-template-columns:1fr 1fr;}.distance-slider-zone{grid-column:1 / -1;order:3}.distance-value-card{min-height:76px}.distance-summary-pill{width:100%;}}


/* Distance hybrid control refinement v3 */
.distance-summary-pill{padding:11px 22px!important;}
.distance-summary-pill span{font-size:16px!important;line-height:1.15;}
.distance-summary-pill small{font-size:14px!important;line-height:1.15;color:#475569;font-weight:900;}
.distance-value-card{min-height:104px;}
.value-card-main{color:#1e3a8a!important;}
.value-card-main input{color:#1e3a8a!important;font-size:20px!important;}
.value-card-main span{font-size:14px!important;color:#1e3a8a!important;}
.value-card-miles{font-size:14px!important;line-height:1.15;font-weight:950;color:#1e3a8a;}
.value-card-yards{font-size:11px!important;}
.distance-slider-zone .dual-range::before{margin-left:12px;margin-right:12px;}
.distance-slider-zone .dual-range::after{margin-left:var(--distance-range-left,var(--range-left));width:calc(var(--distance-range-right,var(--range-right)) - var(--distance-range-left,var(--range-left)));}
.distance-anchor-row{height:24px!important;font-size:12px!important;}


/* Hybrid range refinement v4 — distance copy + runner/class/horse-age trial */
.value-card-main{width:100%;text-align:center!important;}
.value-card-main input{text-align:center!important;}
.distance-summary-pill small:empty,.value-card-miles:empty{display:block;min-height:16px;}
.hybrid-range-card .range-current{margin-bottom:14px;}
.hybrid-summary-pill{width:max-content;max-width:100%;margin:0 auto 16px!important;padding:11px 22px;border:1px solid #c7d2fe;border-radius:14px;background:linear-gradient(180deg,#ffffff,#f8fbff);box-shadow:0 8px 22px rgba(15,23,42,.08);display:flex;flex-direction:column;align-items:center;gap:3px;color:#1e3a8a;font-weight:950;}
.hybrid-summary-pill span{font-size:16px;line-height:1.15;}
.hybrid-summary-pill small{font-size:14px;line-height:1.15;color:#475569;font-weight:900;min-height:16px;}
.compact-hybrid-control{display:grid;grid-template-columns:132px minmax(220px,1fr) 132px;gap:18px;align-items:center;margin:6px 0 8px;}
.hybrid-slider-zone{display:grid;grid-template-rows:auto 24px;align-items:center;min-width:0;}
.hybrid-slider-zone .dual-range{margin:0!important;width:100%;}
.hybrid-slider-zone .dual-range::before{margin-left:12px;margin-right:12px;}
.hybrid-slider-zone .dual-range::after{margin-left:var(--hybrid-range-left,var(--range-left));width:calc(var(--hybrid-range-right,var(--range-right)) - var(--hybrid-range-left,var(--range-left)));}
.hybrid-anchor-row{position:relative;height:24px!important;margin:5px 0 0!important;color:#64748b;font-size:12px!important;font-weight:850;}
.hybrid-anchor-row span{position:absolute;top:0;transform:translateX(-50%);white-space:nowrap;}
.hybrid-value-card{min-height:104px;}
.hybrid-value-card .value-card-main input{width:62px;}
.class-hybrid-control{grid-template-columns:112px minmax(180px,1fr) 112px;gap:14px;}
#class_filter_card .hybrid-summary-pill{margin-bottom:14px!important;}
.horse-age-hybrid-card{min-width:0;}
.horse-age-hybrid-card .compact-hybrid-control,.runners-hybrid-card .compact-hybrid-control{grid-template-columns:118px minmax(180px,1fr) 118px;gap:14px;}
@media (max-width:900px){.compact-hybrid-control{grid-template-columns:1fr 1fr;}.hybrid-slider-zone{grid-column:1 / -1;order:3}.hybrid-summary-pill{width:100%;}.class-hybrid-control,.horse-age-hybrid-card .compact-hybrid-control,.runners-hybrid-card .compact-hybrid-control{grid-template-columns:1fr 1fr;}}

/* Batch 5 polish: stacking, course picker, distance card alignment, section reset buttons */
.section,.section-body,.grid,.card,.range-card,.time-strip,.time-block{overflow:visible!important;}
.help-icon,.info-dot.section-help-dot{z-index:200000;}
.help-icon::after,.info-dot.section-help-dot::after{z-index:2147483647!important;}
.course-picker{z-index:300000!important;}
.course-picker.open{z-index:300001!important;}
.course-picker-panel{z-index:300002!important;max-height:360px!important;}
.course-options{max-height:285px!important;gap:1px!important;}
.course-option{padding:4px 7px!important;min-height:26px!important;line-height:1.15!important;}
.course-search{margin-bottom:6px!important;}
.section-reset-button{background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.24);border-radius:999px;padding:8px 12px;font-size:12px;font-weight:950;color:#fff;display:flex;align-items:center;gap:8px;white-space:nowrap;cursor:pointer;position:relative;z-index:2;}
.section-reset-button:hover{background:rgba(255,255,255,.22);transform:translateY(-1px);}
.section-reset-button:before{content:"↺";font-size:13px;}
.distance-value-card .value-card-main{display:inline-flex!important;width:auto!important;margin:0 auto!important;align-items:baseline!important;justify-content:center!important;}
.distance-value-card .value-card-main input{width:auto!important;min-width:0!important;text-align:center!important;}
.distance-value-card .value-card-main span{display:inline-block!important;}

/* Batch 6 polish / wiring refinements */
.distance-value-card .value-card-main{display:flex!important;justify-content:center!important;align-items:baseline!important;width:100%!important;gap:2px!important;}
.distance-value-card .value-card-main input{text-align:center!important;width:auto!important;min-width:2ch!important;max-width:5ch!important;}
.distance-value-card .value-card-main span{position:static!important;display:inline-block!important;margin-left:1px!important;}
.course-picker-panel{z-index:2147483000!important;}
.course-options{gap:1px!important;}
.course-option{padding:3px 7px!important;min-height:23px!important;line-height:1.1!important;}
.empty-course-option{color:#64748b;font-style:italic;cursor:default;}
.empty-course-option:hover{background:transparent!important;}


/* Patch: keep distance furlong unit visually attached to the number */
.distance-value-card .value-card-main{
  display:inline-grid!important;
  grid-template-columns:auto auto!important;
  justify-content:center!important;
  align-items:baseline!important;
  width:auto!important;
  margin-left:auto!important;
  margin-right:auto!important;
  column-gap:3px!important;
}
.distance-value-card .value-card-main input[id^="distance_"]{
  width:3.6ch!important;
  min-width:3.6ch!important;
  max-width:3.6ch!important;
  text-align:center!important;
  padding:0!important;
}
.distance-value-card .value-card-main span{
  justify-self:start!important;
  position:static!important;
  margin:0!important;
}

/* Patch: dropdown/help overlays must sit above nearby chips/cards */
.help-popover,
.tooltip-popover,
.section-help-popover,
.course-dropdown-menu,
.course-menu,
.course-select-menu,
.course-options,
.multi-select-menu{
  z-index:99999!important;
}

/* Patch: tighter course option rows */
.course-dropdown-menu label,
.course-menu label,
.course-options label,
.course-option,
.course-list label{
  margin:0!important;
  padding-top:5px!important;
  padding-bottom:5px!important;
  min-height:28px!important;
  line-height:1.2!important;
}

/* === Current patch: final tick, dropdown, and course picker layering fixes === */
.chip.selected::after,
.time-section .chip.selected::after,
.race-section .chip.selected::after{
  content:none!important;
  display:none!important;
}

.time-section .chip::after,
.race-section .chip::after{
  content:none!important;
  display:none!important;
}

.course-picker,
.course-picker.open{
  position:relative!important;
  z-index:2147483600!important;
}

.course-picker-panel{
  position:absolute!important;
  z-index:2147483647!important;
  max-height:360px!important;
  overflow:hidden!important;
}

.course-options{
  max-height:285px!important;
  overflow:auto!important;
  gap:0!important;
  z-index:2147483647!important;
}

.course-option,
.course-options label{
  padding:3px 7px!important;
  min-height:22px!important;
  line-height:1.1!important;
  margin:0!important;
}

/* === 2026-04-30 patch: course picker compact rows and top-layer dropdown === */
body.course-picker-is-open #distance,
body.course-picker-is-open .distance-section,
#distance:has(.course-picker.open),
.distance-section:has(.course-picker.open){
  position:relative!important;
  z-index:2147483000!important;
  overflow:visible!important;
}

body.course-picker-is-open #distance .section-body,
body.course-picker-is-open #distance .card,
body.course-picker-is-open .distance-section .section-body,
body.course-picker-is-open .distance-section .card,
#distance:has(.course-picker.open) .section-body,
#distance:has(.course-picker.open) .card,
.distance-section:has(.course-picker.open) .section-body,
.distance-section:has(.course-picker.open) .card{
  overflow:visible!important;
}

body.course-picker-is-open .course-picker,
body.course-picker-is-open .course-picker.open,
.course-picker.open{
  position:relative!important;
  z-index:2147483600!important;
}

body.course-picker-is-open .course-picker-panel,
.course-picker.open .course-picker-panel{
  position:absolute!important;
  z-index:2147483647!important;
  max-height:340px!important;
  overflow:hidden!important;
}

body.course-picker-is-open .course-options,
.course-picker.open .course-options{
  max-height:275px!important;
  overflow-y:auto!important;
  display:grid!important;
  gap:0!important;
}

body.course-picker-is-open .course-option,
body.course-picker-is-open .course-options label,
.course-picker.open .course-option,
.course-picker.open .course-options label{
  padding:3px 7px!important;
  min-height:22px!important;
  line-height:1.1!important;
  margin:0!important;
}

/* === 2026-04-30 patch: course dropdown hover/stacking fix === */
body.course-picker-is-open #course_picker,
body.course-picker-is-open #course_picker.open,
body.course-picker-is-open #course_picker_panel{
  pointer-events:auto!important;
}

body.course-picker-is-open .grid:has(#course_picker.open),
body.course-picker-is-open .card:has(#course_picker){
  position:relative!important;
  z-index:2147483600!important;
  overflow:visible!important;
}

body.course-picker-is-open .grid:has(#course_picker.open) > .card:not(:has(#course_picker)){
  position:relative!important;
  z-index:1!important;
}

body.course-picker-is-open .grid:has(#course_picker.open) > .card:not(:has(#course_picker)) .chip,
body.course-picker-is-open .grid:has(#course_picker.open) > .card:not(:has(#course_picker)) .chip:hover{
  pointer-events:none!important;
  transform:none!important;
  box-shadow:0 2px 9px rgba(15,23,42,.04)!important;
}

body.course-picker-is-open #course_picker_panel,
#course_picker.open #course_picker_panel{
  z-index:2147483647!important;
  background:#fff!important;
  isolation:isolate!important;
}

body.course-picker-is-open #course_options,
#course_picker.open #course_options{
  position:relative!important;
  z-index:2147483647!important;
  background:#fff!important;
}

body.course-picker-is-open #course_options .course-option,
#course_picker.open #course_options .course-option{
  position:relative!important;
  z-index:2147483647!important;
  background:#fff;
  padding:3px 7px!important;
  min-height:22px!important;
  line-height:1.1!important;
  margin:0!important;
}

body.course-picker-is-open #course_options .course-option:hover,
#course_picker.open #course_options .course-option:hover{
  background:#f1f5f9!important;
}

/* Bred country picker overlay fix: mirrors the course picker stacking rules. */
body.bred-picker-is-open #horse,
#horse:has(#bred_picker.open){
  position:relative!important;
  z-index:9990!important;
  overflow:visible!important;
}
body.bred-picker-is-open #horse .section-body,
body.bred-picker-is-open #horse .card,
#horse:has(#bred_picker.open) .section-body,
#horse:has(#bred_picker.open) .card{
  overflow:visible!important;
}
body.bred-picker-is-open #bred_picker,
body.bred-picker-is-open #bred_picker.open,
#bred_picker.open{
  position:relative!important;
  z-index:2147483000!important;
}
body.bred-picker-is-open #bred_picker .course-picker-panel,
#bred_picker.open .course-picker-panel{
  z-index:2147483001!important;
  max-height:360px!important;
  overflow:hidden!important;
}
body.bred-picker-is-open #bred_options,
#bred_picker.open #bred_options{
  max-height:285px!important;
  overflow-y:auto!important;
  gap:0!important;
}
body.bred-picker-is-open #bred_options .course-option,
#bred_picker.open #bred_options .course-option{
  padding:3px 7px!important;
  min-height:22px!important;
  line-height:1.1!important;
  margin:0!important;
}
body.bred-picker-is-open .grid:has(#bred_picker.open),
body.bred-picker-is-open .card:has(#bred_picker){
  overflow:visible!important;
  position:relative!important;
  z-index:2147482990!important;
}
body.bred-picker-is-open .grid:has(#bred_picker.open) > .card:not(:has(#bred_picker)){
  position:relative!important;
  z-index:1!important;
}
body.bred-picker-is-open .grid:has(#bred_picker.open) > .card:not(:has(#bred_picker)) .chip,
body.bred-picker-is-open .grid:has(#bred_picker.open) > .card:not(:has(#bred_picker)) .chip:hover{
  transform:none!important;
  z-index:1!important;
}

/* === 2026-05-01 fix: overlay priority and bred picker visibility === */
.help-icon:hover,
.info-dot.section-help-dot:hover,
.card:has(.help-icon:hover),
.section-header:has(.section-help-dot:hover){
  position:relative!important;
  z-index:2147483647!important;
  overflow:visible!important;
}
.help-icon:hover::after,
.info-dot.section-help-dot:hover::after{
  z-index:2147483647!important;
}
body.bred-picker-is-open #bred_picker,
#bred_picker.open{
  position:relative!important;
  z-index:2147483000!important;
}
body.bred-picker-is-open #bred_picker .course-picker-panel,
#bred_picker.open .course-picker-panel{
  display:block!important;
  position:absolute!important;
  z-index:2147483001!important;
  background:#fff!important;
  border:1px solid #cbd5e1!important;
  box-shadow:0 18px 40px rgba(15,23,42,.18)!important;
}
body.bred-picker-is-open #bred_options,
#bred_picker.open #bred_options{
  display:grid!important;
  max-height:275px!important;
  overflow-y:auto!important;
  gap:0!important;
  background:#fff!important;
}
body.bred-picker-is-open #bred_options .course-option,
#bred_picker.open #bred_options .course-option{
  position:relative!important;
  z-index:2147483002!important;
  background:#fff;
  padding:3px 7px!important;
  min-height:22px!important;
  line-height:1.1!important;
  margin:0!important;
}
body.bred-picker-is-open #bred_options .course-option:hover,
#bred_picker.open #bred_options .course-option:hover{
  background:#f1f5f9!important;
}

/* === VISUAL LAYOUT REDESIGN V3: composed section layouts, not density polish === */
.main-shell{align-items:start;}
.sidebar{position:sticky;top:0;align-self:start;height:100vh;overflow-y:auto;z-index:50;}
.page{min-width:0;}
.section-body{padding:20px 22px 22px;}
.layout-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap:16px;
  margin-bottom:16px;
}
.layout-grid:last-child{margin-bottom:0;}
.card,.range-card{min-height:auto;}
.card{padding:16px 18px;}
.card-title{line-height:1.2;}
.card .chips,.card .equal-buttons-2,.card .equal-buttons-3,.card .equal-buttons-4,.card .equal-buttons-5{align-items:center;justify-content:center;gap:10px;}
.chip{min-height:30px;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;}
.chips.fill .chip,.chips.fill-tight .chip,.equal-buttons-2 .chip,.equal-buttons-3 .chip,.equal-buttons-4 .chip,.equal-buttons-5 .chip{margin:0;}
.equal-buttons-2,.equal-buttons-3,.equal-buttons-4,.equal-buttons-5{display:grid;}
.equal-buttons-2{grid-template-columns:repeat(2,minmax(96px,1fr));}
.equal-buttons-3{grid-template-columns:repeat(3,minmax(96px,1fr));}
.equal-buttons-4{grid-template-columns:repeat(4,minmax(84px,1fr));}
.equal-buttons-5{grid-template-columns:repeat(5,minmax(82px,1fr));}
.inline-inputs{max-width:250px;}
.inline-inputs input{height:34px;}
.note{line-height:1.35;}

/* Race Meta composition */
.race-meta-row1{grid-template-columns:1.25fr 1.8fr .85fr;}
.race-meta-row1 .card{display:flex;flex-direction:column;justify-content:center;}
.meta-country .chips{grid-template-columns:repeat(4,minmax(80px,1fr));display:grid;}
.meta-race-code .chips{display:grid;grid-template-columns:repeat(4,minmax(110px,1fr));}
.meta-handicap .chips{display:grid;grid-template-columns:repeat(2,minmax(104px,1fr));}
.meta-handicap{padding-left:18px;padding-right:18px;}
.race-meta-distance{grid-template-columns:1fr;}
.meta-distance{padding:18px 24px 20px;}
.meta-distance .range-hybrid-control{min-height:118px;}
.race-meta-presets{grid-template-columns:1fr 1fr;}
.race-meta-ages{grid-template-columns:repeat(4,1fr);}
.race-meta-ages .card{display:flex;flex-direction:column;justify-content:center;}
.race-meta-class-row{grid-template-columns:1fr 1fr;align-items:stretch;}
.meta-class,.meta-class-subtypes{display:flex!important;flex-direction:column;justify-content:center!important;}
.meta-class-subtypes .chips{display:grid;grid-template-columns:repeat(4,minmax(80px,1fr));gap:10px;}
.meta-class .range-hybrid-control,.meta-class .compact-hybrid-control{min-height:92px;}

/* Race Conditions balancing */
#race-conditions .section-body>.grid.two:first-child{grid-template-columns:1.35fr .9fr;}
#race-conditions .section-body>.grid.two:first-child .card:nth-child(2){max-width:none;}
#race-conditions .chips.fill-tight{gap:10px;}
#race-conditions .chip{min-width:104px;}

/* Course Profile composition */
.course-row1{grid-template-columns:2fr 1fr 1fr;}
.course-select-card,.course-direction-card,.course-topography-card{display:flex!important;flex-direction:column;justify-content:center!important;}
.course-select-card .custom-select{margin-top:4px;}
.course-direction-card .chips,.course-topography-card .chips{display:grid;grid-template-columns:repeat(2,minmax(88px,1fr));max-width:310px;margin:0 auto;width:100%;gap:12px;}
.course-row2{grid-template-columns:1fr 1fr;}
.course-race-direction-card .chips{display:grid;grid-template-columns:repeat(3,minmax(100px,1fr));gap:12px;}
.course-style-card .chips{display:grid;grid-template-columns:repeat(2,minmax(120px,1fr));gap:12px;}
.course-features-card{display:flex!important;flex-direction:column;justify-content:center!important;}
.course-features-card .chips{display:grid;grid-template-columns:repeat(3,minmax(130px,1fr));gap:12px;}
.course-row3{grid-template-columns:1fr;}
#course-profile .condition-subtitle{text-align:center;margin:0 0 8px;}

/* Horse Identity composition */
.horse-row1{grid-template-columns:1.45fr 1.1fr 1fr;}
.horse-row2,.horse-row3{grid-template-columns:repeat(3,1fr);}
.horse-row4{grid-template-columns:1.15fr .7fr .7fr 1.55fr;}
.horse-row5{grid-template-columns:1fr;}
.horse-row1 .card,.horse-row2 .card,.horse-row3 .card,.horse-row4 .card{display:flex!important;flex-direction:column;justify-content:center!important;}
.horse-gender-card .chips{display:grid;grid-template-columns:repeat(5,minmax(76px,1fr));gap:10px;}
.horse-bred-card .custom-select{max-width:100%;}
.horse-penalty-card .equal-buttons-2,.horse-wind-card .equal-buttons-2{max-width:240px;margin:0 auto;width:100%;gap:10px;}
.horse-headgear-card .equal-buttons-4{grid-template-columns:repeat(4,minmax(92px,1fr));gap:10px;}
.horse-history-card .equal-buttons-4{grid-template-columns:repeat(4,minmax(140px,1fr));gap:12px;}
.horse-history-card{padding-top:15px;padding-bottom:15px;}
.horse-travel-card .inline-inputs,.horse-cloth-card .inline-inputs,.horse-or-card .inline-inputs,.horse-speed-card .inline-inputs,.horse-dsr-card .inline-inputs,.horse-dsrf-card .inline-inputs,.horse-dsrj-card .inline-inputs{max-width:210px;}

/* Ratings and market composition refinements */
#ratings .grid.lower-two{grid-template-columns:1.55fr 1fr;}
#market .section-body>.grid.three{grid-template-columns:repeat(3,1fr);}
#market .section-body>.grid.two{grid-template-columns:1fr 1fr;}

/* More elegant compact sliders */
.range-current{box-shadow:0 8px 18px rgba(37,99,235,.08);}
.distance-value-card,.hybrid-value-card{min-width:82px;}
.range-hybrid-control{gap:16px;}
.range-anchor-row{font-size:11px;}

/* Responsive behaviour: laptop/desktop first, no mobile redesign yet */
@media (max-width:1500px){
  .race-meta-row1{grid-template-columns:1fr 1.4fr;}
  .meta-handicap{grid-column:1 / -1;}
  .meta-handicap .chips{max-width:460px;margin:0 auto;}
  .race-meta-ages{grid-template-columns:1fr 1fr;}
  .horse-row1{grid-template-columns:1.3fr 1fr;}
  .horse-bred-card{grid-column:1 / -1;}
  .horse-row4{grid-template-columns:1fr 1fr;}
  .horse-headgear-card{grid-column:1 / -1;}
  .course-row1{grid-template-columns:1.5fr 1fr;}
  .course-topography-card{grid-column:1 / -1;}
}
@media (max-width:1180px){
  .race-meta-row1,.race-meta-presets,.race-meta-class-row,.course-row1,.course-row2,#ratings .grid.lower-two,#market .section-body>.grid.three,#market .section-body>.grid.two{grid-template-columns:1fr;}
  .race-meta-ages,.horse-row2,.horse-row3,.horse-row4{grid-template-columns:1fr 1fr;}
  .horse-row1{grid-template-columns:1fr;}
  .meta-race-code .chips,.horse-gender-card .chips,.course-features-card .chips{grid-template-columns:repeat(2,minmax(100px,1fr));}
}

/* === VISUAL REFINEMENT V4: compact sliders + grouped min/max stat controls === */
/* Reduce major slider vertical footprint without changing behaviour */
.range-card{padding:14px 18px!important;}
.range-title-row{margin-bottom:5px!important;}
.distance-summary-pill,.hybrid-summary-pill{
  margin:0 auto 9px!important;
  padding:7px 16px!important;
  border-radius:12px!important;
  box-shadow:0 5px 14px rgba(37,99,235,.07)!important;
}
.distance-summary-pill span,.hybrid-summary-pill span{font-size:13px!important;line-height:1.08!important;}
.distance-summary-pill small,.hybrid-summary-pill small{font-size:11px!important;line-height:1.08!important;min-height:12px!important;}
.distance-hybrid-control,.compact-hybrid-control{
  grid-template-columns:108px minmax(180px,1fr) 108px!important;
  gap:13px!important;
  margin:2px 0 4px!important;
}
.distance-value-card,.hybrid-value-card{
  min-height:72px!important;
  padding:7px 9px!important;
  border-radius:14px!important;
  box-shadow:0 5px 15px rgba(15,23,42,.065)!important;
}
.value-card-kicker{font-size:9px!important;letter-spacing:.07em!important;}
.value-card-main input{font-size:16px!important;height:24px!important;}
.value-card-main span{font-size:12px!important;}
.value-card-miles{font-size:11px!important;min-height:13px!important;}
.value-card-yards{font-size:9px!important;}
.distance-slider-zone,.hybrid-slider-zone{grid-template-rows:auto 18px!important;}
.distance-anchor-row,.hybrid-anchor-row{height:18px!important;font-size:10px!important;margin-top:3px!important;}
.dual-range{height:20px!important;}
.dual-range::before,.dual-range::after{height:8px!important;top:6px!important;}
.dual-range input[type=range]::-webkit-slider-thumb{width:18px!important;height:18px!important;border-width:4px!important;}
.dual-range input[type=range]::-moz-range-thumb{width:18px!important;height:18px!important;border-width:4px!important;}
.range-endpoints{font-size:10px!important;gap:12px!important;}

/* Grouped stat-strip min/max controls: fewer cards, more rhythm, subtle section colour */
.compact-stat-row{grid-template-columns:1fr!important;}
.stat-strip-card{
  padding:14px 16px!important;
  min-height:auto!important;
  justify-content:flex-start!important;
  border-top:3px solid rgba(14,165,233,.55)!important;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%)!important;
}
.horse-recency-strip{border-top-color:rgba(249,115,22,.45)!important;}
.stat-strip-header{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:7px;
  color:#334155;
  font-size:12px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.075em;
  margin-bottom:12px;
}
.stat-mini-grid{display:grid;gap:0;align-items:center;}
.stat-mini-grid.three{grid-template-columns:repeat(3,1fr);}
.stat-mini{
  min-width:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:2px 18px 4px;
  position:relative;
}
.stat-mini+.stat-mini{border-left:1px solid rgba(203,213,225,.85);}
.stat-mini-title{
  color:#475569;
  font-size:11px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.055em;
  margin-bottom:8px;
  text-align:center;
  white-space:nowrap;
}
.pill-range-input{
  display:grid;
  grid-template-columns:minmax(58px,86px) 1px minmax(58px,86px);
  align-items:center;
  justify-content:center;
  background:#fff;
  border:1px solid #cbd5e1;
  border-radius:999px;
  overflow:hidden;
  box-shadow:0 5px 14px rgba(15,23,42,.055);
}
.pill-range-input span{height:25px;background:#dbe3ee;display:block;}
.pill-range-input input{
  height:32px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  padding:0 8px!important;
  text-align:center!important;
  font-size:13px!important;
  font-weight:850!important;
  color:#0f172a!important;
  appearance:textfield;
  -moz-appearance:textfield;
}
.pill-range-input input::-webkit-outer-spin-button,
.pill-range-input input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}
.pill-range-input:focus-within{border-color:#38bdf8;box-shadow:0 0 0 3px rgba(14,165,233,.12),0 5px 14px rgba(15,23,42,.06);}

/* Make the remaining compact cards feel closer to the new stat strips */
.horse-travel-card,.horse-penalty-card,.horse-wind-card,.horse-headgear-card{
  min-height:94px!important;
}
.horse-travel-card .inline-inputs{
  max-width:230px!important;
  padding:0;
}
.horse-travel-card .inline-inputs input,
#market .inline-inputs input{
  border-radius:999px!important;
  height:34px!important;
}
#market .card{padding:14px 16px!important;min-height:96px!important;}
#market .inline-inputs{max-width:245px!important;}

@media (max-width:1180px){
  .stat-mini-grid.three{grid-template-columns:1fr;gap:10px;}
  .stat-mini{padding:0 8px 10px;}
  .stat-mini+.stat-mini{border-left:0;border-top:1px solid rgba(203,213,225,.85);padding-top:10px;}
  .distance-hybrid-control,.compact-hybrid-control{grid-template-columns:1fr 1fr!important;}
}

/* Visual colour-system refinement: lighter default controls + section-matched compact inputs */
:root{
  --indigo-grad:linear-gradient(135deg,#312e81,#6366f1,#a855f7);
  --market-grad:linear-gradient(135deg,#0f766e,#06b6d4,#6366f1);
}
.section-header.indigo{background:var(--indigo-grad)}
.section-header.market{background:var(--market-grad)}

/* Section accent palette: headers remain strong; content controls become lighter and calmer. */
.section{
  --accent:#64748b;
  --accent-soft:#f1f5f9;
  --accent-soft-2:#e2e8f0;
  --selected-text:#0f172a;
}
.section.system-section{--accent:#22c55e;--accent-soft:#ecfdf5;--accent-soft-2:#bbf7d0;--selected-grad:linear-gradient(135deg,#dcfce7,#bbf7d0);--selected-text:#14532d;}
.section.time-section{--accent:#0284c7;--accent-soft:#eff6ff;--accent-soft-2:#bfdbfe;--selected-grad:linear-gradient(135deg,#e0f2fe,#bfdbfe);--selected-text:#075985;}
.section.race-section{--accent:#f97316;--accent-soft:#fff7ed;--accent-soft-2:#fed7aa;--selected-grad:linear-gradient(135deg,#ffedd5,#fed7aa);--selected-text:#7c2d12;}
.section.distance-section{--accent:#0891b2;--accent-soft:#ecfeff;--accent-soft-2:#bae6fd;--selected-grad:linear-gradient(135deg,#cffafe,#bae6fd);--selected-text:#164e63;}
.section.horse-section{--accent:#0ea5e9;--accent-soft:#f0f9ff;--accent-soft-2:#bae6fd;--selected-grad:linear-gradient(135deg,#e0f2fe,#bae6fd);--selected-text:#075985;}
.section.form-section{--accent:#f97316;--accent-soft:#fff7ed;--accent-soft-2:#fed7aa;--selected-grad:linear-gradient(135deg,#ffedd5,#fed7aa);--selected-text:#7c2d12;}
.section.lto-section{--accent:#f97316;--accent-soft:#fff7ed;--accent-soft-2:#fed7aa;--selected-grad:linear-gradient(135deg,#ffedd5,#fed7aa);--selected-text:#7c2d12;}
.section.ratings-section{--accent:#0ea5e9;--accent-soft:#f0f9ff;--accent-soft-2:#bae6fd;--selected-grad:linear-gradient(135deg,#e0f2fe,#bae6fd);--selected-text:#075985;}
.section.trainer-section{--accent:#8b5cf6;--accent-soft:#f5f3ff;--accent-soft-2:#ddd6fe;--selected-grad:linear-gradient(135deg,#ede9fe,#ddd6fe);--selected-text:#4c1d95;}
.section.market-section{--accent:#14b8a6;--accent-soft:#ecfdf5;--accent-soft-2:#99f6e4;--selected-grad:linear-gradient(135deg,#ccfbf1,#99f6e4);--selected-text:#134e4a;}
.section.actions-section{--accent:#ef4444;--accent-soft:#fef2f2;--accent-soft-2:#fecaca;--selected-grad:linear-gradient(135deg,#fee2e2,#fecaca);--selected-text:#7f1d1d;}

/* Lighter selected chips. Later, user-amended states can use a stronger filled style. */
.chip.selected{
  color:var(--selected-text)!important;
  border-color:color-mix(in srgb,var(--accent) 42%,#ffffff)!important;
  background:var(--selected-grad)!important;
  box-shadow:0 8px 18px color-mix(in srgb,var(--accent) 18%,transparent),0 0 0 1px rgba(255,255,255,.45) inset!important;
}
.chip.selected:hover{
  box-shadow:0 12px 24px color-mix(in srgb,var(--accent) 24%,transparent),0 0 0 1px rgba(255,255,255,.5) inset!important;
}
.chip:not(.selected):not(.disabled):not([aria-disabled="true"]){
  border-color:color-mix(in srgb,var(--accent) 18%,#dbe3ef);
}

/* Compact min/max treatment: section-matched light colour with visible Min/Max language. */
.inline-inputs,
.compact-inputs,
.pill-range-input{
  --input-bg:var(--accent-soft);
  --input-border:color-mix(in srgb,var(--accent) 34%,#cbd5e1);
}
.inline-inputs input,
.inline-inputs select,
.compact-inputs input,
.compact-inputs select,
.pill-range-input input{
  background:linear-gradient(180deg,#ffffff,var(--input-bg));
  border-color:var(--input-border);
  color:#0f172a;
  font-weight:800;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85),0 2px 8px rgba(15,23,42,.04);
}
.inline-inputs input:focus,
.inline-inputs select:focus,
.compact-inputs input:focus,
.compact-inputs select:focus,
.pill-range-input input:focus{
  outline:0;
  border-color:var(--accent);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 18%,transparent),inset 0 1px 0 rgba(255,255,255,.85);
}

/* Pill range input now visibly labels min and max while keeping the vertical divider. */
.pill-range-input{
  position:relative;
  display:grid;
  grid-template-columns:1fr 1px 1fr;
  align-items:end;
  gap:10px;
  max-width:230px;
  margin:0 auto;
  padding-top:18px;
}
.pill-range-input::before,
.pill-range-input::after{
  position:absolute;
  top:0;
  font-size:10px;
  font-weight:950;
  color:#64748b;
  letter-spacing:.02em;
}
.pill-range-input::before{content:"Min";left:calc(25% - 12px)}
.pill-range-input::after{content:"Max";right:calc(25% - 12px)}
.pill-range-input>span{
  width:1px;
  align-self:stretch;
  min-height:34px;
  background:linear-gradient(180deg,transparent,#cbd5e1 18%,#cbd5e1 82%,transparent);
}
.pill-range-input input{
  height:36px;
  border-radius:10px;
  text-align:center;
  padding:6px 8px;
}

/* Apply the same compact visual language to ordinary min/max cards across all sections. */
.inline-inputs{
  max-width:260px;
}
.inline-inputs label,
.compact-inputs label{
  color:#536277;
  font-weight:950;
}
.inline-inputs>div+div,
.compact-inputs>div+div{
  border-left:1px solid color-mix(in srgb,var(--accent) 20%,#dbe3ef);
}

/* Softer, section-tinted stat strip cards. */
.stat-strip-card{
  border-top:4px solid color-mix(in srgb,var(--accent) 55%,#ffffff);
  background:linear-gradient(180deg,#ffffff 0%,var(--accent-soft) 190%);
}
.stat-strip-header{
  color:#334155;
}
.stat-mini{
  border-color:color-mix(in srgb,var(--accent) 20%,#e2e8f0);
  background:rgba(255,255,255,.62);
  border-radius:12px;
  padding:12px 10px 14px;
}
.stat-mini-title{
  color:#334155;
  font-weight:950;
}

/* Keep disabled chips calm after the colour lightening. */
.chip.disabled,.chip[aria-disabled="true"]{
  background:#f1f5f9!important;
  color:#94a3b8!important;
  border-color:#e2e8f0!important;
  box-shadow:none!important;
}

/* === v7 continuity pass: rounded headers, section borders, darker soft controls, note alignment === */
.section{
  border-color:var(--section-border,var(--accent));
  border-radius:20px;
}
.section-header{
  border-radius:18px 18px 0 0;
}
.section.system-section{--section-border:#7c3aed;--accent:#22c55e;--accent-soft:#dcfce7;--accent-soft-2:#86efac;--selected-grad:linear-gradient(135deg,#bbf7d0,#86efac);--selected-text:#14532d;}
.section.time-section{--section-border:#4f46e5;--accent:#f97316;--accent-soft:#ffedd5;--accent-soft-2:#fdba74;--selected-grad:linear-gradient(135deg,#fed7aa,#fdba74);--selected-text:#7c2d12;}
.section.race-section{--section-border:#16a34a;--accent:#f97316;--accent-soft:#ffedd5;--accent-soft-2:#fdba74;--selected-grad:linear-gradient(135deg,#fed7aa,#fdba74);--selected-text:#7c2d12;}
.section.race-conditions-section{--section-border:#16a34a;--accent:#f97316;--accent-soft:#ffedd5;--accent-soft-2:#fdba74;--selected-grad:linear-gradient(135deg,#fed7aa,#fdba74);--selected-text:#7c2d12;}
.section.course-profile-section{--section-border:#0891b2;--accent:#f97316;--accent-soft:#ffedd5;--accent-soft-2:#fdba74;--selected-grad:linear-gradient(135deg,#fed7aa,#fdba74);--selected-text:#7c2d12;}
.section.horse-section{--section-border:#f97316;--accent:#0ea5e9;--accent-soft:#dff6ff;--accent-soft-2:#7dd3fc;--selected-grad:linear-gradient(135deg,#bae6fd,#7dd3fc);--selected-text:#075985;}
.section.form-section{--section-border:#f97316;--accent:#0ea5e9;--accent-soft:#dff6ff;--accent-soft-2:#7dd3fc;--selected-grad:linear-gradient(135deg,#bae6fd,#7dd3fc);--selected-text:#075985;}
.section.lto-section{--section-border:#f97316;--accent:#0ea5e9;--accent-soft:#dff6ff;--accent-soft-2:#7dd3fc;--selected-grad:linear-gradient(135deg,#bae6fd,#7dd3fc);--selected-text:#075985;}
.section.changes-section{--section-border:#f97316;--accent:#0ea5e9;--accent-soft:#dff6ff;--accent-soft-2:#7dd3fc;--selected-grad:linear-gradient(135deg,#bae6fd,#7dd3fc);--selected-text:#075985;}
.section.ratings-section{--section-border:#f97316;--accent:#0ea5e9;--accent-soft:#dff6ff;--accent-soft-2:#7dd3fc;--selected-grad:linear-gradient(135deg,#bae6fd,#7dd3fc);--selected-text:#075985;}
.section.trainer-jockey-section{--section-border:#6366f1;--accent:#14b8a6;--accent-soft:#ccfbf1;--accent-soft-2:#5eead4;--selected-grad:linear-gradient(135deg,#99f6e4,#5eead4);--selected-text:#134e4a;}
.section.market-section{--section-border:#06b6d4;--accent:#8b5cf6;--accent-soft:#ede9fe;--accent-soft-2:#c4b5fd;--selected-grad:linear-gradient(135deg,#ddd6fe,#c4b5fd);--selected-text:#4c1d95;}
.section.actions-section{--section-border:#dc2626;--accent:#2563eb;--accent-soft:#dbeafe;--accent-soft-2:#93c5fd;--selected-grad:linear-gradient(135deg,#bfdbfe,#93c5fd);--selected-text:#1e3a8a;}

.chip.selected{
  background:var(--selected-grad)!important;
  border-color:color-mix(in srgb,var(--accent) 55%,#ffffff)!important;
}
.inline-inputs input,
.inline-inputs select,
.compact-inputs input,
.compact-inputs select,
.pill-range-input input{
  background:linear-gradient(180deg,#ffffff 0%,var(--accent-soft) 100%)!important;
  border-color:color-mix(in srgb,var(--accent) 46%,#cbd5e1)!important;
}
.range-track,
.dual-range:before,
.compact-dual-range:before,
.distance-dual-range:before{
  background:linear-gradient(90deg,var(--accent-soft),var(--accent-soft-2),color-mix(in srgb,var(--accent) 70%,#ffffff))!important;
}
.note-centered,
#class_filter_note_visible,
#bred_selection_count{
  text-align:center;
  max-width:100%;
  margin-left:auto;
  margin-right:auto;
}
.meta-class-subtypes .note,
.race-conditions-section .note,
.course-card .note,
.horse-bred-card .note{
  text-align:center;
}
.horse-row1 .card-title,
.horse-row1 .stat-strip-header,
.horse-row1 .card .card-title{
  align-items:center;
  min-height:24px;
}
.stat-mini-title{
  white-space:normal;
  line-height:1.18;
}

/* Phase 1B Horse Profile: compact experience, rolling activity and prize strips */
.horse-profile-body .compact-stat-row{grid-template-columns:1fr!important;margin-bottom:14px;}
.horse-profile-body .stat-strip-card{border-top-color:color-mix(in srgb,var(--accent) 58%,#ffffff)!important;}
.stat-mini-grid.two{grid-template-columns:repeat(2,1fr);}
.stat-mini-grid.four{grid-template-columns:repeat(4,1fr);}
.stat-mini-grid.five{grid-template-columns:repeat(5,1fr);}
.horse-profile-body .stat-mini-title{white-space:normal;line-height:1.15;min-height:25px;display:flex;align-items:center;justify-content:center;}
.horse-profile-body .pill-range-input.compact-pill{max-width:170px;grid-template-columns:minmax(44px,68px) 1px minmax(44px,68px);gap:6px;}
.horse-profile-body .pill-range-input.wide-pill{max-width:270px;}
.horse-profile-placeholder-card{min-height:92px!important;}
@media (max-width:1280px){
  .stat-mini-grid.five{grid-template-columns:repeat(3,1fr);row-gap:12px;}
  .stat-mini-grid.five .stat-mini:nth-child(4){border-left:0;}
}
@media (max-width:980px){
  .stat-mini-grid.two,.stat-mini-grid.four,.stat-mini-grid.five{grid-template-columns:1fr 1fr;}
  .stat-mini-grid .stat-mini:nth-child(odd){border-left:0!important;}
}


/* Phase 1C visual compression and horse-profile condition-performance layout */
/* Further reduce all major slider cards by around 25% while keeping controls usable. */
.range-card{padding:10px 14px!important;}
.range-card .range-title-row{margin-bottom:3px!important;}
.distance-summary-pill,.hybrid-summary-pill{margin-bottom:6px!important;padding:5px 13px!important;}
.distance-summary-pill span,.hybrid-summary-pill span{font-size:12px!important;}
.distance-summary-pill small,.hybrid-summary-pill small{font-size:10px!important;min-height:10px!important;}
.distance-hybrid-control,.compact-hybrid-control{grid-template-columns:94px minmax(170px,1fr) 94px!important;gap:10px!important;margin:0!important;}
.distance-value-card,.hybrid-value-card{min-height:54px!important;padding:5px 7px!important;border-radius:12px!important;}
.value-card-kicker{font-size:8px!important;line-height:1.05!important;}
.value-card-main input{font-size:14px!important;height:21px!important;}
.value-card-main span{font-size:10px!important;}
.value-card-miles{font-size:10px!important;min-height:11px!important;}
.value-card-yards{font-size:8px!important;}
.distance-slider-zone,.hybrid-slider-zone{grid-template-rows:auto 14px!important;}
.distance-anchor-row,.hybrid-anchor-row{height:14px!important;font-size:9px!important;margin-top:2px!important;}
.dual-range{height:17px!important;}
.dual-range::before,.dual-range::after{height:6px!important;top:6px!important;}
.dual-range input[type=range]::-webkit-slider-thumb{width:15px!important;height:15px!important;border-width:3px!important;}
.dual-range input[type=range]::-moz-range-thumb{width:15px!important;height:15px!important;border-width:3px!important;}
.range-endpoints{font-size:9px!important;}

/* Horse Identity: recency plus cloth number in one row. */
.identity-recency-grid{grid-template-columns:2.2fr .8fr!important;align-items:stretch;}
.identity-recency-grid .stat-strip-card{height:100%;}
.stat-mini-grid.one{grid-template-columns:1fr;}
.horse-cloth-strip .stat-mini{border-left:0!important;}

/* Ratings / Weights: current ratings become part of this section. */
#ratings .current-rating-strip{margin-top:14px;}
#ratings .stat-mini-grid.two{grid-template-columns:repeat(2,1fr);}

/* Horse Profile: left performance stack + right prize/strike stack. */
.horse-profile-composed-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(320px,.95fr);gap:16px;align-items:start;margin-bottom:16px;}
.horse-profile-left-stack,.horse-profile-right-stack{display:flex;flex-direction:column;gap:14px;min-width:0;}
.horse-profile-body .stat-strip-card{margin:0;}
.horse-profile-right-stack .horse-prize-strip .stat-mini-grid.one{gap:10px;}
.horse-profile-right-stack .horse-prize-strip .stat-mini+.stat-mini{border-left:0;border-top:1px solid rgba(203,213,225,.85);padding-top:12px;}
.dual-pill-row{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-items:center;width:100%;}
.condition-stack{gap:8px!important;}
.condition-stack .stat-mini{padding:4px 6px 8px;border-left:0!important;border-top:1px solid rgba(203,213,225,.7);}
.condition-stack .stat-mini:first-child{border-top:0;}
.condition-stack .stat-mini-title{min-height:auto;margin-bottom:5px;font-size:10px;}
.condition-stack .pill-range-input.compact-pill{max-width:none;grid-template-columns:minmax(42px,1fr) 1px minmax(42px,1fr);}

/* Condition runs/wins/places matrix. */
.condition-matrix-strip{margin-top:4px;}
.condition-matrix-grid{display:flex;flex-direction:column;gap:10px;}
.condition-matrix-row{display:grid;grid-template-columns:92px repeat(3,minmax(0,1fr));gap:0;align-items:center;border:1px solid rgba(203,213,225,.75);border-radius:14px;overflow:hidden;background:linear-gradient(180deg,#fff,#fbfdff);}
.matrix-label{height:100%;display:flex;align-items:center;justify-content:center;background:var(--accent-soft);color:#334155;font-size:11px;font-weight:950;text-transform:uppercase;letter-spacing:.06em;border-right:1px solid rgba(203,213,225,.85);}
.condition-matrix-row .stat-mini{padding:8px 12px;}
.condition-matrix-row .stat-mini+.stat-mini{border-left:1px solid rgba(203,213,225,.75);}
.condition-matrix-row .stat-mini-title{margin-bottom:5px;min-height:auto;font-size:10px;}
.condition-matrix-row .pill-range-input.compact-pill{max-width:170px;margin:0 auto;}

@media (max-width:1050px){
  .horse-profile-composed-grid{grid-template-columns:1fr;}
  .horse-profile-right-stack{display:grid;grid-template-columns:1fr 1fr;}
}
@media (max-width:1180px){
  .identity-recency-grid{grid-template-columns:1fr!important;}
  .condition-matrix-row{grid-template-columns:1fr;}
  .matrix-label{min-height:34px;border-right:0;border-bottom:1px solid rgba(203,213,225,.85);}
  .condition-matrix-row .stat-mini+.stat-mini{border-left:0;border-top:1px solid rgba(203,213,225,.75);}
}
@media (max-width:900px){
  .horse-profile-right-stack{grid-template-columns:1fr;}
  .dual-pill-row{grid-template-columns:1fr;}
}

/* Final core name-search controls */
.name-filter-card { position: relative; overflow: visible; }
.name-search-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; margin: 10px 0; }
.name-search-row input { width: 100%; min-height: 34px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; font-weight: 700; }
.mini-button { border: 0; border-radius: 999px; padding: 8px 14px; font-weight: 900; cursor: pointer; color: #fff; background: linear-gradient(135deg, #6366f1, #8b5cf6); box-shadow: 0 8px 18px rgba(99,102,241,.18); }
.mini-button.ghost { color: #334155; background: #fff; border: 1px solid var(--border); box-shadow: 0 4px 12px rgba(15,23,42,.08); }
.inline-inputs.compact { max-width: 220px; margin: 0 auto 8px; }
.name-results { max-height: 180px; overflow: auto; border: 1px solid #d7e3f2; border-radius: 14px; background: #fff; padding: 6px; margin: 8px 0; z-index: 70; }
.name-search-empty { color: #64748b; font-size: 12px; text-align: center; padding: 10px; }
.name-result-row { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 7px 8px; border-radius: 10px; cursor: pointer; font-weight: 800; }
.name-result-row:hover { background: #eef2ff; }
.name-result-row em { font-style: normal; color: #64748b; font-size: 11px; }
.selected-name-list { display: flex; flex-wrap: wrap; gap: 6px; min-height: 24px; align-items: center; justify-content: center; }
.name-pill { border-radius: 999px; padding: 5px 10px; background: #e0e7ff; color: #312e81; font-weight: 900; cursor: pointer; }
.note-inline { color: #64748b; font-size: 12px; }
#num_fences_card.control-disabled { opacity: .42; filter: grayscale(.25); pointer-events: none; }


/* Winner flags / horse profile cleanup patch */
#horse-profile-stats .horse-profile-composed-grid{grid-template-columns:minmax(0,1.45fr) minmax(360px,.9fr);}
#horse-profile-stats .horse-profile-left-stack{gap:10px;}
#horse-profile-stats .horse-profile-right-stack{gap:10px;}
#horse-profile-stats .stat-strip-card{padding:10px 12px;}
#horse-profile-stats .stat-strip-header{margin-bottom:8px;}
#horse-profile-stats .stat-mini-grid.four,#horse-profile-stats .stat-mini-grid.five{gap:4px;}
#horse-profile-stats .condition-matrix-grid{gap:6px;}
#horse-profile-stats .condition-matrix-row .stat-mini{padding:6px 8px;}
#horse-profile-stats .horse-prize-strip .stat-mini{padding:6px 8px;}
#horse-profile-stats .condition-stack .stat-mini{padding:5px 6px;}
@media (max-width:1050px){
  #horse-profile-stats .horse-profile-composed-grid{grid-template-columns:1fr;}
  #horse-profile-stats .horse-profile-right-stack{display:grid;grid-template-columns:1fr 1fr;}
}
@media (max-width:760px){
  #horse-profile-stats .horse-profile-right-stack{grid-template-columns:1fr;}
}


/* === VISUAL LAYOUT REDESIGN: professional section composition pass === */
:root{
  --builder-gap:16px;
  --card-pad:16px;
  --compact-card-min:82px;
}
.main{
  max-width:1400px;
  width:100%;
  margin:0 auto;
  padding:0 16px;
}
.section{margin-bottom:26px;border-radius:20px;overflow:visible!important;}
.section-header{border-radius:18px 18px 0 0;min-height:88px;}
.section-body{padding:20px 22px 22px;gap:16px;}
.card,.range-card{min-height:var(--compact-card-min);padding:var(--card-pad);border-radius:16px;}
.card-title{margin-bottom:10px;}
.chips,.equal-buttons-2,.equal-buttons-3,.equal-buttons-4,.equal-buttons-5{gap:10px;}
.chip{min-height:34px;padding:8px 13px;}
.equal-buttons-2 .chip,.equal-buttons-3 .chip,.equal-buttons-4 .chip,.equal-buttons-5 .chip{width:100%;}
.inline-inputs{max-width:260px;}
.pill-range-input{min-height:43px;max-width:148px;}
.pill-range-input input{height:28px;}
.stat-mini{min-height:64px;padding:10px 8px;justify-content:center;}
.stat-strip-card{padding:13px 14px;}
.stat-strip-header{margin-bottom:9px;}
.stat-mini-title{font-size:10.2px;min-height:14px;}

/* Market becomes section 03, so it needs a compact, high-value top-of-page layout. */
#market .section-body{display:grid;grid-template-columns:1.2fr .85fr;gap:16px;align-items:stretch;}
#market .section-body>.grid{margin:0;}
#market .section-body>.grid.lower-three{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-column:1 / -1;}
#market .section-body>.grid.lower-two{display:grid;grid-template-columns:1fr 1fr;}
#market .section-body>.grid.lower-two:nth-of-type(2){grid-column:1 / 2;}
#market .section-body>.grid.lower-two:nth-of-type(3){grid-column:2 / 3;}
#market .card{min-height:104px;}
#market .equal-buttons-4,#market .equal-buttons-5{grid-template-columns:repeat(4,minmax(0,1fr));}
#market [data-sp-band="unfancied"]{font-size:11px;letter-spacing:-.01em;}

/* Race meta: make the heavy slider own the row, then keep small decisions in neat blocks. */
.race-meta-row1{grid-template-columns:1.1fr 1.45fr .75fr;align-items:stretch;}
.race-meta-distance{grid-template-columns:1fr;}
.race-meta-distance .distance-range-card{min-height:194px;}
.race-meta-presets{grid-template-columns:1fr 1fr;}
.race-meta-ages{grid-template-columns:repeat(4,minmax(0,1fr));}
.race-meta-class-row{grid-template-columns:1.2fr 1fr;max-width:1120px;}
.meta-handicap .chips{max-width:420px;margin:0 auto;}

/* Race conditions: align content weight and remove empty vertical wells. */
#race-conditions .grid.race-top{grid-template-columns:1.15fr .85fr;}
#race-conditions .condition-flags-card .chips.fill{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));}
#race-conditions .grid.two{grid-template-columns:1.15fr .85fr;}
#race-conditions .lower-two{grid-template-columns:1.25fr .75fr;}
#num_fences_card{min-height:142px;}

/* Course profile: no lonely chips floating in oversized panels. */
.course-row1{grid-template-columns:1.25fr .75fr .75fr;}
.course-row2{grid-template-columns:1fr 1fr;}
.course-row3{grid-template-columns:1fr;}
#course-profile .card{min-height:98px;}
#course-profile .course-select-card{min-height:118px;}
#course-profile .course-topography-card .equal-buttons-2,
#course-profile .course-direction-card .equal-buttons-2{max-width:460px;margin:0 auto;}
#course-profile .course-features-card .chips{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));}
#course-profile .course-style-card .chips{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}

/* Horse identity: balance true identity, recency, equipment and proven ability. */
.horse-row1{grid-template-columns:1.35fr 1fr 1fr;}
.horse-row2.identity-recency-grid{grid-template-columns:1.65fr .55fr;}
.horse-row4{grid-template-columns:.9fr .62fr .62fr 1.25fr;}
.horse-row5{grid-template-columns:1fr;}
#horse .horse-headgear-card .equal-buttons-4{grid-template-columns:repeat(4,minmax(0,1fr));}
#horse .horse-history-card .equal-buttons-3{grid-template-columns:repeat(3,minmax(0,1fr));}
#horse .horse-history-card{min-height:102px;}

/* Horse profile: convert the worst section into a proper dashboard-like panel. */
.horse-profile-body{padding-bottom:20px;}
.horse-profile-composed-grid{display:grid;grid-template-columns:minmax(0,1.42fr) minmax(360px,.78fr);gap:16px;align-items:start;}
.horse-profile-left-stack,.horse-profile-right-stack{display:grid;gap:14px;align-content:start;}
.horse-profile-left-stack{grid-template-columns:1fr;}
.horse-experience-strip .stat-mini-grid.four{grid-template-columns:repeat(4,minmax(0,1fr));}
.horse-rolling-run-strip .stat-mini-grid.five,
.horse-rolling-win-strip .stat-mini-grid.five{grid-template-columns:repeat(5,minmax(0,1fr));}
.condition-matrix-strip{padding:12px;}
.condition-matrix-grid{display:grid;grid-template-columns:1fr;gap:8px;}
.condition-matrix-row{display:grid;grid-template-columns:78px repeat(3,minmax(0,1fr));gap:8px;align-items:center;border:1px solid var(--accent-soft-2);border-radius:13px;background:linear-gradient(90deg,var(--accent-soft),#fff 36%);padding:8px;}
.matrix-label{height:100%;min-height:50px;border-radius:10px;background:var(--accent-soft-2);color:var(--selected-text);display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:950;text-transform:uppercase;letter-spacing:.08em;}
.horse-prize-strip .stat-mini-grid.one{grid-template-columns:1fr 1fr;gap:10px;}
.horse-condition-strike-strip .condition-stack{display:grid;grid-template-columns:1fr;gap:8px;}
.horse-condition-strike-strip .stat-mini{display:grid;grid-template-columns:150px 1fr;align-items:center;gap:10px;min-height:53px;padding:8px 10px;border:1px solid rgba(125,211,252,.5);border-radius:12px;}
.horse-condition-strike-strip .stat-mini-title{text-align:left;min-height:auto;margin:0;}
.dual-pill-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.dual-pill-row .pill-range-input{max-width:none;}

/* LTO: two clean rows instead of boxy gaps. */
#lto .lower-two{grid-template-columns:1fr 1fr;}
#lto .stat-mini-grid.three{grid-template-columns:repeat(3,minmax(0,1fr));}
#lto .stat-mini-grid.two{grid-template-columns:repeat(2,minmax(0,1fr));}
#lto .card{min-height:118px;}

/* Race changes: make changes feel like a grouped control surface. */
#changes .grid.lower-three:first-child{grid-template-columns:.85fr .85fr 1.3fr;}
#changes .grid.lower-three:nth-child(2){grid-template-columns:1fr;max-width:760px;}
#changes .card{min-height:118px;}
#changes .stat-mini-grid.two{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
#changes .stat-mini-grid.three{grid-template-columns:repeat(3,minmax(0,1fr));}
#changes .equal-buttons-2 .chip{min-width:0;padding-inline:8px;}

/* Ratings / weights: keep the slider prominent, ratings compact, placeholders subordinate. */
#ratings .grid.lower-two{grid-template-columns:1.25fr .75fr;}
#ratings .current-rating-strip .stat-mini-grid.two{grid-template-columns:1fr 1fr;max-width:720px;margin:0 auto;}
#ratings .current-rating-strip{min-height:108px;}
#ratings .card:last-child .equal-buttons-5{grid-template-columns:repeat(5,minmax(0,1fr));}

/* Trainer/Jockey/Pedigree: replace the four-box farm with a purposeful search console. */
#trainer-jockey .section-body>.grid.lower-two{grid-template-columns:1fr;gap:14px;}
#trainer-jockey .name-filter-card{display:grid;grid-template-columns:180px minmax(320px,1fr) 130px minmax(260px,.75fr);align-items:center;gap:12px;min-height:86px;padding:13px 14px;}
#trainer-jockey .name-filter-card .card-title{margin:0;text-align:left;}
#trainer-jockey .name-search-row{display:grid;grid-template-columns:1fr auto auto;gap:8px;margin:0;}
#trainer-jockey .inline-inputs.compact{margin:0;max-width:130px;}
#trainer-jockey .name-results{min-height:42px;margin:0;display:flex;align-items:center;justify-content:center;}
#trainer-jockey .selected-name-list{grid-column:2 / -1;margin:0;min-height:18px;}

/* Actions: keep it sharp and compact. */
#actions .card{min-height:92px;}
.action-row{display:flex;flex-wrap:wrap;gap:9px;align-items:center;}
.action-row .btn{min-height:36px;}

@media (max-width:1500px){
  .main{padding:22px 24px 60px;}
  .race-meta-row1,.horse-row1{grid-template-columns:1fr 1fr;}
  .race-meta-row1 .meta-handicap{grid-column:1 / -1;}
  .race-meta-ages{grid-template-columns:1fr 1fr;}
  .horse-profile-composed-grid{grid-template-columns:1fr;}
  .horse-profile-right-stack{grid-template-columns:1fr 1fr;}
  .horse-condition-strike-strip{grid-column:1 / -1;}
  .horse-condition-strike-strip .condition-stack{grid-template-columns:1fr 1fr;}
  #trainer-jockey .name-filter-card{grid-template-columns:160px 1fr 120px;}
  #trainer-jockey .name-results{grid-column:1 / -1;}
  #trainer-jockey .selected-name-list{grid-column:1 / -1;}
}
@media (max-width:1200px){
  .app{grid-template-columns:250px 1fr;}
  .topbar{grid-template-columns:1fr;gap:14px;}
  .top-centre{justify-self:start;}
  #market .section-body,.race-meta-row1,.course-row1,.course-row2,.horse-row1,.horse-row2.identity-recency-grid,.horse-row4,#changes .grid.lower-three:first-child,#ratings .grid.lower-two{grid-template-columns:1fr;}
  #market .section-body>.grid.lower-three,#market .section-body>.grid.lower-two,#market .section-body>.grid.lower-two:nth-of-type(2),#market .section-body>.grid.lower-two:nth-of-type(3){grid-column:auto;grid-template-columns:1fr;}
  .race-meta-ages,.race-meta-presets,.race-meta-class-row,#race-conditions .grid.race-top,#race-conditions .grid.two,#race-conditions .lower-two,#lto .lower-two{grid-template-columns:1fr;}
  .horse-rolling-run-strip .stat-mini-grid.five,.horse-rolling-win-strip .stat-mini-grid.five{grid-template-columns:repeat(3,minmax(0,1fr));}
  .horse-condition-strike-strip .condition-stack{grid-template-columns:1fr;}
}


/* HORSE PROFILE NEW GRID */
.hp-grid-new {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.hp-left, .hp-right {
  display: contents;
}

/* Make key sections span */
.horse-experience-strip { grid-column: 1; }
.horse-prize-strip { grid-column: 2; }

.horse-rolling-run-strip { grid-column: 1; }
.horse-rolling-win-strip { grid-column: 2; }

.condition-matrix-strip { grid-column: 1 / span 2; }
.horse-condition-strike-strip { grid-column: 1 / span 2; }



/* === HORSE PROFILE V3 SAFE FIX === */

/* Ensure Horse Profile left/right stacks participate in one grid */
#horse-profile-stats .horse-profile-composed-grid.hp-grid-new {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, 0.95fr);
  gap: 16px;
  align-items: start;
}

#horse-profile-stats .hp-left,
#horse-profile-stats .hp-right {
  display: contents;
}

/* Explicit placement */
#horse-profile-stats .horse-experience-strip { grid-column: 1; grid-row: 1; }
#horse-profile-stats .horse-prize-strip { grid-column: 2; grid-row: 1; }
#horse-profile-stats .horse-rolling-run-strip { grid-column: 1; grid-row: 2; }
#horse-profile-stats .horse-rolling-win-strip { grid-column: 2; grid-row: 2; }
#horse-profile-stats .condition-matrix-strip { grid-column: 1 / -1; grid-row: 3; }
#horse-profile-stats .horse-condition-strike-strip { grid-column: 1 / -1; grid-row: 4; }

/* Keep prize compact when moved to top-right */
#horse-profile-stats .horse-prize-strip .stat-mini-grid.one {
  grid-template-columns: 1fr;
  gap: 10px;
}

/* Condition strike rows now mirror the matrix visual language */
#horse-profile-stats .horse-condition-strike-strip .condition-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

#horse-profile-stats .condition-rate-row {
  display: grid;
  grid-template-columns: 100px 140px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 12px;
  background: rgba(240, 249, 255, 0.55);
}

#horse-profile-stats .condition-rate-label {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #6ec6ea;
  color: #174057;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

#horse-profile-stats .condition-rate-row .stat-mini-title {
  margin: 0;
  text-align: center;
  font-size: 11px;
  letter-spacing: .04em;
}

#horse-profile-stats .condition-rate-row .dual-pill-row {
  justify-content: center;
  gap: 16px;
}

/* Responsive fallback */
@media (max-width: 1200px) {
  #horse-profile-stats .horse-profile-composed-grid.hp-grid-new {
    grid-template-columns: 1fr;
  }
  #horse-profile-stats .horse-experience-strip,
  #horse-profile-stats .horse-prize-strip,
  #horse-profile-stats .horse-rolling-run-strip,
  #horse-profile-stats .horse-rolling-win-strip,
  #horse-profile-stats .condition-matrix-strip,
  #horse-profile-stats .horse-condition-strike-strip {
    grid-column: 1;
    grid-row: auto;
  }
}


/* === HORSE PROFILE V4 ALIGNMENT TWEAKS === */

/* Previous Prize: keep the two range controls on one line */
#horse-profile-stats .horse-prize-strip .stat-mini-grid.one {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: center;
}

/* Make the Condition Strike labels match the matrix-style labels above */
#horse-profile-stats .condition-rate-label,
#horse-profile-stats .condition-matrix-row .matrix-label {
  width: 82px;
  min-width: 82px;
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #6ec6ea;
  color: #174057;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 0 8px;
  box-sizing: border-box;
}

/* Align Condition Strike rows with the condition matrix rhythm above:
   label | win/place title | win range | place range */
#horse-profile-stats .condition-rate-row {
  display: grid;
  grid-template-columns: 82px minmax(180px, 1fr) minmax(220px, 1.1fr) minmax(220px, 1.1fr);
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 8px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 12px;
  background: rgba(240, 249, 255, 0.55);
}

#horse-profile-stats .condition-rate-row .stat-mini-title {
  margin: 0;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  color: #243b53;
  text-transform: uppercase;
}

#horse-profile-stats .condition-rate-row .dual-pill-row {
  display: contents;
}

#horse-profile-stats .condition-rate-row .pill-range-input {
  justify-self: center;
}

/* Keep the matrix label boxes from being distorted by older local rules */
#horse-profile-stats .condition-matrix-row {
  grid-template-columns: 82px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
}

/* Responsive fallback */
@media (max-width: 1200px) {
  #horse-profile-stats .horse-prize-strip .stat-mini-grid.one {
    grid-template-columns: 1fr;
  }

  #horse-profile-stats .condition-rate-row {
    grid-template-columns: 82px 1fr;
  }

  #horse-profile-stats .condition-rate-row .dual-pill-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    grid-column: 1 / -1;
  }
}


/* === V5 FINAL ALIGNMENT + LABEL FIX === */

/* Make blue labels slightly larger so "RACE TYPE" fits on one line */
#horse-profile-stats .condition-rate-label,
#horse-profile-stats .condition-matrix-row .matrix-label {
  width: 110px;
  min-width: 110px;
  height: 56px;
  min-height: 56px;
  font-size: 11px;
  white-space: nowrap;
}

/* Re-align condition rows:
   label | win range | title | place range
   (this matches symmetry with section above) */
#horse-profile-stats .condition-rate-row {
  grid-template-columns: 110px minmax(220px, 1fr) 140px minmax(220px, 1fr);
}

/* Move WIN / PLACE text into the center column */
#horse-profile-stats .condition-rate-row .stat-mini-title {
  grid-column: 3;
  text-align: center;
}

/* First range (WIN) goes into column 2 */
#horse-profile-stats .condition-rate-row .dual-pill-row .pill-range-input:first-child {
  grid-column: 2;
}

/* Second range (PLACE) goes into column 4 */
#horse-profile-stats .condition-rate-row .dual-pill-row .pill-range-input:last-child {
  grid-column: 4;
}

/* Ensure layout respects grid placement */
#horse-profile-stats .condition-rate-row .dual-pill-row {
  display: contents;
}



/* === V6 FINAL VERTICAL ALIGNMENT + TRUE LABEL WIDTH FIX === */

/* Force the actual blue foreground labels wider, not just the pale row background */
#horse-profile-stats .condition-rate-label,
#horse-profile-stats .condition-matrix-row .matrix-label,
#horse-profile-stats .matrix-label {
  width: 112px !important;
  min-width: 112px !important;
  max-width: 112px !important;
  height: 52px !important;
  min-height: 52px !important;
  padding: 0 10px !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Keep the upper condition matrix aligned after widening labels */
#horse-profile-stats .condition-matrix-row {
  display: grid !important;
  grid-template-columns: 112px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 12px !important;
}

/* Condition Strike Rates:
   label | win box | centre label | place box
   All vertically centred, not bottom aligned */
#horse-profile-stats .condition-rate-row {
  display: grid !important;
  grid-template-columns: 112px minmax(0, 1fr) 150px minmax(0, 1fr) !important;
  align-items: center !important;
  min-height: 62px !important;
  height: 62px !important;
  padding: 8px 12px !important;
  gap: 12px !important;
}

/* Vertically centre each element within its row */
#horse-profile-stats .condition-rate-row .condition-rate-label,
#horse-profile-stats .condition-rate-row .stat-mini-title,
#horse-profile-stats .condition-rate-row .pill-range-input {
  align-self: center !important;
  justify-self: center !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Preserve the requested horizontal order */
#horse-profile-stats .condition-rate-row .condition-rate-label {
  grid-column: 1 !important;
}

#horse-profile-stats .condition-rate-row .dual-pill-row {
  display: contents !important;
}

#horse-profile-stats .condition-rate-row .dual-pill-row .pill-range-input:first-child {
  grid-column: 2 !important;
}

#horse-profile-stats .condition-rate-row .stat-mini-title {
  grid-column: 3 !important;
  grid-row: 1 !important;
  text-align: center !important;
  line-height: 1 !important;
}

#horse-profile-stats .condition-rate-row .dual-pill-row .pill-range-input:last-child {
  grid-column: 4 !important;
}

/* Prevent inner pill controls from drifting down */
#horse-profile-stats .condition-rate-row .pill-range-input input {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}


/* === RACE CHANGES / TRANSITIONS — VERIFIED STRUCTURE FIX === */
/* Actual HTML structure:
   section#changes > .section-body > .grid.lower-three:first-of-type
   contains: Class/Rating, Distance Movement, Simple Change Flags
   second .grid.lower-three contains: Break / Physical Changes
*/

/* Turn the section body into the actual grid we want */
#changes .section-body {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1.55fr !important;
  gap: 16px !important;
  align-items: start !important;
}

/* Flatten the two existing lower-three wrappers so their cards participate in the section grid */
#changes .section-body > .grid.lower-three {
  display: contents !important;
}

/* First row: Class/Rating, Distance Movement, Simple Flags */
#changes .section-body > .grid.lower-three:first-of-type > .card:nth-child(1) {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

#changes .section-body > .grid.lower-three:first-of-type > .card:nth-child(2) {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

#changes .section-body > .grid.lower-three:first-of-type > .card:nth-child(3) {
  grid-column: 3 !important;
  grid-row: 1 / span 2 !important;
}

/* Second row: Break / Physical Changes under first two cards */
#changes .section-body > .grid.lower-three:nth-of-type(2) > .card:nth-child(1) {
  grid-column: 1 / span 2 !important;
  grid-row: 2 !important;
}

/* Reduce excessive height on Class/Rating and Distance cards */
#changes .section-body > .grid.lower-three:first-of-type > .card:nth-child(1),
#changes .section-body > .grid.lower-three:first-of-type > .card:nth-child(2) {
  min-height: 185px !important;
  height: 185px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  padding: 16px !important;
}

/* Keep Simple Flags visually balanced but not oversized */
#changes .section-body > .grid.lower-three:first-of-type > .card:nth-child(3) {
  min-height: 0 !important;
  height: auto !important;
  padding: 16px !important;
}

/* Make Break / Physical compact and full under the two left cards */
#changes .section-body > .grid.lower-three:nth-of-type(2) > .card:nth-child(1) {
  min-height: 120px !important;
  height: auto !important;
  padding: 16px !important;
}

/* Tighten internal spacing in this section only */
#changes .stat-mini-grid {
  gap: 12px !important;
}

#changes .stat-mini {
  min-height: 0 !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

#changes .equal-buttons-2,
#changes .equal-buttons-3 {
  gap: 10px !important;
}

/* Responsive fallback */
@media (max-width: 1200px) {
  #changes .section-body {
    display: block !important;
  }

  #changes .section-body > .grid.lower-three {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  #changes .section-body > .grid.lower-three:first-of-type > .card:nth-child(1),
  #changes .section-body > .grid.lower-three:first-of-type > .card:nth-child(2),
  #changes .section-body > .grid.lower-three:first-of-type > .card:nth-child(3),
  #changes .section-body > .grid.lower-three:nth-of-type(2) > .card:nth-child(1) {
    grid-column: auto !important;
    grid-row: auto !important;
    height: auto !important;
  }
}


/* === RATINGS / WEIGHTS — CURRENT RATINGS + ADVANCED CONTEXT SAME ROW === */
/* Verified structure:
   #ratings .section-body
   > .grid.lower-two
   > .card.stat-strip-card.current-rating-strip
   > .card  (Advanced Rating Context)
*/

#ratings .section-body {
  display: grid !important;
  grid-template-columns: minmax(360px, 0.72fr) minmax(520px, 1.28fr) !important;
  gap: 16px !important;
  align-items: stretch !important;
}

/* Keep Weight Carried + Jockey Claim as full-width first row */
#ratings .section-body > .grid.lower-two {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
}

/* Current Ratings: left side of second row */
#ratings .section-body > .current-rating-strip {
  grid-column: 1 !important;
  grid-row: 2 !important;
  height: auto !important;
  min-height: 130px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}

/* Advanced Rating Context: right side of second row */
#ratings .section-body > .current-rating-strip + .card {
  grid-column: 2 !important;
  grid-row: 2 !important;
  height: auto !important;
  min-height: 130px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}

/* Reduce wasted height and centre the contents neatly */
#ratings .current-rating-strip .stat-mini-grid.two {
  justify-content: center !important;
  align-items: center !important;
  max-width: 420px !important;
  margin: 0 auto !important;
}

#ratings .section-body > .current-rating-strip + .card .equal-buttons-5 {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(110px, 1fr)) !important;
  gap: 10px !important;
  align-items: center !important;
}

#ratings .section-body > .current-rating-strip + .card .note {
  margin-top: 12px !important;
}

/* Responsive fallback */
@media (max-width: 1200px) {
  #ratings .section-body {
    grid-template-columns: 1fr !important;
  }

  #ratings .section-body > .grid.lower-two,
  #ratings .section-body > .current-rating-strip,
  #ratings .section-body > .current-rating-strip + .card {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  #ratings .section-body > .current-rating-strip + .card .equal-buttons-5 {
    grid-template-columns: repeat(2, minmax(120px, 1fr)) !important;
  }
}


/* === TRAINER / JOCKEY / PEDIGREE — ALIGNMENT POLISH === */

#trainer-jockey .section-body > .grid.lower-two {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 14px !important;
}

#trainer-jockey .name-filter-card {
  display: grid !important;
  grid-template-columns: 150px minmax(320px, 1.6fr) 150px minmax(340px, 1.4fr) !important;
  gap: 12px !important;
  align-items: center !important;
  padding: 18px !important;
  min-height: 82px !important;
}

#trainer-jockey .name-filter-card .card-title {
  grid-column: 1 !important;
  margin: 0 !important;
  text-align: left !important;
  justify-self: start !important;
  white-space: nowrap !important;
}

#trainer-jockey .name-filter-card .name-search-row {
  grid-column: 2 !important;
  display: grid !important;
  grid-template-columns: minmax(220px, 1fr) 74px 66px !important;
  gap: 8px !important;
  align-items: center !important;
  margin: 0 !important;
}

#trainer-jockey .name-filter-card .name-search-row input {
  width: 100% !important;
}

#trainer-jockey .name-filter-card .inline-inputs.compact {
  grid-column: 3 !important;
  margin: 0 !important;
  align-self: center !important;
  justify-self: center !important;
  display: flex !important;
  align-items: center !important;
}

#trainer-jockey .name-filter-card .inline-inputs.compact > div {
  display: grid !important;
  justify-items: center !important;
  gap: 4px !important;
}

#trainer-jockey .name-filter-card .inline-inputs.compact label {
  margin: 0 !important;
  line-height: 1 !important;
}

#trainer-jockey .name-filter-card .inline-inputs.compact input {
  width: 58px !important;
  text-align: center !important;
}

#trainer-jockey .name-filter-card .name-results {
  grid-column: 4 !important;
  margin: 0 !important;
  min-height: 42px !important;
  display: flex !important;
  align-items: center !important;
}

#trainer-jockey .name-filter-card .name-search-empty {
  width: 100% !important;
  min-height: 42px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid rgba(148, 163, 184, 0.35) !important;
  border-radius: 10px !important;
  color: #64748b !important;
  background: rgba(255,255,255,0.72) !important;
}

#trainer-jockey .name-filter-card .selected-name-list {
  grid-column: 3 !important;
  justify-self: center !important;
  margin-top: -6px !important;
  font-size: 11px !important;
  color: #64748b !important;
}

#trainer-jockey .mini-button {
  height: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* === ACTIONS SECTION — BUTTON ROW POLISH + ACTIVE QUICK REPORT === */

#actions .section-body > .card {
  padding: 18px !important;
}

#actions .action-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  align-items: center !important;
}

#actions .action-row .btn {
  min-height: 42px !important;
  padding: 0 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
}

#actions .action-row .btn.quick {
  min-width: 210px !important;
}

#actions .action-row .btn.deep,
#actions .action-row .btn.compare {
  min-width: 210px !important;
}

#actions .action-row .btn.save,
#actions .action-row .btn.clear,
#actions .action-row .btn.load {
  min-width: 130px !important;
}

#actions .note {
  margin-top: 12px !important;
}

/* Responsive fallback */
@media (max-width: 1300px) {
  #trainer-jockey .name-filter-card {
    grid-template-columns: 135px minmax(260px, 1fr) 120px !important;
  }

  #trainer-jockey .name-filter-card .name-results {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 900px) {
  #trainer-jockey .name-filter-card {
    grid-template-columns: 1fr !important;
  }

  #trainer-jockey .name-filter-card .card-title,
  #trainer-jockey .name-filter-card .name-search-row,
  #trainer-jockey .name-filter-card .inline-inputs.compact,
  #trainer-jockey .name-filter-card .name-results,
  #trainer-jockey .name-filter-card .selected-name-list {
    grid-column: 1 !important;
  }
}

/* === QUICK RESULTS REDESIGN V1 === */
#page-quick {
  max-width: 1180px;
  margin: 0 auto;
}

#page-quick > h1 {
  margin-bottom: 10px;
}

#page-quick .section.time-section {
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

#page-quick .section-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

#page-quick .card {
  border-radius: 18px;
}

.run-banner {
  max-width: 1180px;
  margin: 12px auto 18px;
  padding: 14px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #eff6ff, #f5f3ff);
  color: #1d4ed8;
  font-weight: 950;
  border: 1px solid #bfdbfe;
  box-shadow: 0 10px 26px rgba(59, 130, 246, 0.08);
}

.status-ready,
.status-running,
.status-complete,
.status-error {
  border-radius: 14px;
  padding: 16px 18px;
  font-weight: 950;
}

.status-running {
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.status-complete {
  background: linear-gradient(135deg, #ecfdf5, #f8fafc);
  color: #047857;
  border: 1px solid #bbf7d0;
}

.quick-report-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.summary-hero {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 14px 16px;
  border: 1px solid rgba(216, 225, 238, 0.92);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.summary-hero::before,
.summary-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.summary-hero::before {
  inset: -45% auto auto -12%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0) 70%);
}

.summary-hero::after {
  inset: auto -8% -55% auto;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.24) 0%, rgba(255,255,255,0) 72%);
}

.summary-hero.positive {
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.94), rgba(248, 250, 252, 0.96));
  color: #14532d;
  border-color: rgba(134, 239, 172, 0.9);
}

.summary-hero.warning {
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.95), rgba(248, 250, 252, 0.96));
  color: #92400e;
  border-color: rgba(253, 224, 71, 0.82);
}

.summary-hero.negative {
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.96), rgba(248, 250, 252, 0.97));
  color: #991b1b;
  border-color: rgba(252, 165, 165, 0.86);
}

.summary-hero-copy,
.market-result-card > * {
  position: relative;
  z-index: 1;
}

.quick-verdict-kicker,
.market-kicker,
.summary-market-tile-label {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 10px;
  font-weight: 950;
}

.summary-hero strong {
  display: block;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.1;
  margin-bottom: 6px;
}

.summary-hero p {
  margin: 0;
  max-width: 1080px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.42;
}

.summary-hero.compact {
  min-height: 0;
}

.quick-market-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.market-result-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #d8e1ee;
  border-radius: 20px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.99), rgba(246,249,255,0.98));
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.05);
  display: grid;
  gap: 10px;
}

.market-result-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.92), rgba(255,255,255,0.2));
}

.market-result-card.primary-market {
  border-color: rgba(14, 165, 233, .28);
  box-shadow: 0 14px 28px rgba(14, 165, 233, 0.06);
}

.market-result-card.secondary-market {
  border-color: rgba(139, 92, 246, .20);
  box-shadow: 0 14px 28px rgba(139, 92, 246, 0.05);
}

.single-market-card {
  width: 100%;
}

.summary-primary-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.summary-primary-toolbar h3 {
  margin: 4px 0 0;
  font-size: 16px;
  line-height: 1.1;
}

.summary-market-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.24);
  background: rgba(241,245,249,.78);
}

.summary-market-toggle-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #475569;
  font-weight: 900;
  font-size: 12px;
  line-height: 1;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.summary-market-toggle-button.active {
  background: linear-gradient(180deg,#ffffff,#eff6ff);
  color: #0f172a;
  box-shadow: 0 4px 10px rgba(15,23,42,.08);
}

.single-market-grid {
  display: grid;
  gap: 10px;
}

.market-core-grid.single-market-grid.primary-row {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.market-support-grid.single-market-grid.secondary-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-market-tile {
  min-height: 74px;
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(216, 225, 238, 0.95);
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(247,250,255,0.92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.summary-market-tile.emphasis {
  background: linear-gradient(180deg, rgba(255,255,255,0.99), rgba(240,247,255,0.99));
}

.summary-market-tile-value {
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.08;
  color: #0f172a;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.summary-market-tile.monetary .summary-market-tile-value {
  font-size: clamp(14px, 1.15vw, 17px);
}

.summary-market-tile.positive .summary-market-tile-value { color: #047857; }
.summary-market-tile.negative .summary-market-tile-value { color: #dc2626; }
.summary-market-tile.warning .summary-market-tile-value { color: #d97706; }

.summary-comparison-strip {
  border-top: 1px solid rgba(226,232,240,.95);
  padding-top: 10px;
  display: grid;
  gap: 8px;
}

.summary-comparison-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.summary-comparison-heading strong {
  font-size: 13px;
  color: #334155;
}

.summary-comparison-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.summary-comparison-grid .summary-market-tile {
  min-height: 62px;
  padding: 9px 11px;
}

.summary-comparison-grid .summary-market-tile-value {
  font-size: clamp(13px, 1.05vw, 16px);
}

.quick-metric {
  border: 1px solid #d8e1ee;
  border-radius: 14px;
  padding: 13px 14px;
  background: rgba(255,255,255,.86);
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.quick-metric.headline {
  min-height: 92px;
  background: linear-gradient(180deg, #ffffff, #f1f8ff);
}

.quick-metric-label {
  color: #64748b;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 7px;
}

.quick-metric-value {
  font-size: 20px;
  line-height: 1.05;
  color: #0f172a;
}

.quick-metric.headline .quick-metric-value {
  font-size: 23px;
}

.quick-metric.positive .quick-metric-value { color: #047857; }
.quick-metric.negative .quick-metric-value { color: #dc2626; }
.quick-metric.warning .quick-metric-value { color: #d97706; }

#yearTable {
  font-size: 14px;
}

#yearTable th,
#yearTable td {
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .market-core-grid.single-market-grid.primary-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .market-support-grid.single-market-grid.secondary-row,
  .summary-comparison-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .summary-primary-toolbar,
  .summary-comparison-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .market-core-grid.single-market-grid.primary-row,
  .market-support-grid.single-market-grid.secondary-row,
  .summary-comparison-grid,
  .skeleton-metric-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .market-core-grid.single-market-grid.primary-row,
  .market-support-grid.single-market-grid.secondary-row,
  .summary-comparison-grid {
    grid-template-columns: 1fr;
  }

  .summary-market-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .summary-market-toggle-button {
    flex: 1 1 0;
  }
}

/* Loading skeleton: same footprint as loaded report */
.skeleton-block,
.skeleton-card,
.skeleton-metric {
  position: relative;
  overflow: hidden;
}

.skeleton-line,
.skeleton-metric {
  display: block;
  border-radius: 999px;
  background: linear-gradient(90deg, #e2e8f0, #f8fafc, #e2e8f0);
  background-size: 220% 100%;
  animation: quickSkeleton 1.35s ease-in-out infinite;
}

.skeleton-line {
  height: 14px;
  margin: 10px 0;
}

.skeleton-line.short { width: 180px; }
.skeleton-line.medium { width: 55%; }
.skeleton-line.wide { width: 85%; }

.skeleton-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
  margin-top: 14px;
}

.skeleton-metric {
  height: 80px;
  border-radius: 14px;
}

.skeleton-table-row td {
  padding: 12px;
}

@keyframes quickSkeleton {
  0% { background-position: 0% 0; }
  100% { background-position: -220% 0; }
}

@media (max-width: 1250px) {
  .quick-market-grid {
    grid-template-columns: 1fr;
  }

  .summary-hero-glass {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .market-core-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .market-support-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .summary-hero {
    padding: 18px;
  }

  .summary-hero-glass,
  .market-core-grid,
  .market-support-grid,
  .skeleton-metric-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .summary-hero-glass,
  .market-core-grid,
  .market-support-grid {
    grid-template-columns: 1fr;
  }
}


/* === QUICK REPORT OVERLAY WORKSPACE (OPTION B) === */

body.report-overlay-open {
  overflow: hidden;
}

.quick-report-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  padding: 28px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(8px);
}

.quick-report-overlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-report-window {
  width: min(1480px, calc(100vw - 56px));
  height: min(948px, calc(100vh - 40px));
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.quick-report-window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #e0f2fe 0%, #f5f3ff 52%, #fff7ed 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.quick-report-window-kicker {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748b;
  margin-bottom: 4px;
}

.quick-report-window-header h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.quick-report-window-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
}

.quick-report-window-actions .mini-button {
  height: 36px;
  padding: 0 13px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(255,255,255,0.82);
  color: #334155;
  font-weight: 700;
  cursor: pointer;
}

.quick-report-window-actions .mini-button:hover {
  transform: translateY(-1px) scale(1.03);
}

.quick-report-window-actions .mini-button.danger {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

.quick-report-window-body {
  padding: 14px;
  overflow: auto;
  display: grid;
  gap: 12px;
}

.quick-status-bar {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
  color: #1e3a8a;
  font-weight: 800;
}

.quick-status-bar.status-running {
  background: linear-gradient(135deg, #fff7ed, #eff6ff);
  color: #9a3412;
}

.quick-status-bar.status-complete {
  background: linear-gradient(135deg, #ecfdf5, #f8fafc);
  color: #166534;
  border-color: rgba(34, 197, 94, 0.25);
}

.quick-status-bar.status-error {
  background: linear-gradient(135deg, #fef2f2, #fff7ed);
  color: #991b1b;
  border-color: rgba(239, 68, 68, 0.25);
}

.quick-report-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.quick-report-card.year-card {
  min-height: 260px;
}

.quick-year-table-wrap {
  width: 100%;
  overflow: auto;
  max-height: 360px;
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.quick-year-table-wrap table {
  margin: 0;
}

.quick-year-table-wrap thead,
.quick-year-table-wrap tr:first-child {
  position: sticky;
  top: 0;
  z-index: 2;
}

@media (max-width: 900px) {
  .quick-report-overlay {
    padding: 12px;
  }

  .quick-report-window {
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
    border-radius: 18px;
  }

  .quick-report-window-header {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* === QUICK OVERLAY V2 FIXES === */

/* Prevent underlying tooltip/help icons from bleeding above the overlay blur */
body.report-overlay-open .app .help-tooltip,
body.report-overlay-open .app .tooltip,
body.report-overlay-open .app [role="tooltip"],
body.report-overlay-open .app .tippy-box,
body.report-overlay-open .app .section-help-tooltip {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Keep all underlying page controls below the overlay while active */
body.report-overlay-open .app {
  isolation: isolate;
}

body.report-overlay-open .help-icon,
body.report-overlay-open .section-help-dot,
body.report-overlay-open .info-dot {
  z-index: 1 !important;
}

/* Ensure overlay remains above every app tooltip/control */
.quick-report-overlay {
  z-index: 2147483000 !important;
}

.quick-report-window {
  position: relative;
  z-index: 2147483001 !important;
}

/* Slightly clarify Open sidebar view purpose visually */
#quickOverlayPage {
  min-width: 138px;
}


/* === FINAL UI TIDY — MARKET FILTERS + RACE META === */

/* ------------------------------------------
   MARKET FILTERS
   Goal:
   - Give SP Band Presets more room
   - Stop "Unfancied / Outsiders" overflowing
   - Keep SP/BSP position compact
------------------------------------------ */

#market .section-body {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 16px !important;
}

/* First row stays three equal price cards */
#market .section-body > .grid.lower-three {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

/* Flatten the two lower-two rows into one controlled second row */
#market .section-body > .grid.lower-two {
  display: contents !important;
}

/* Second row: SP position, BSP position, favourites, SP bands wider */
#market #sp_position_card {
  grid-column: 1 !important;
  grid-row: 2 !important;
}

#market #sp_position_card + .card {
  grid-column: 2 !important;
  grid-row: 2 !important;
}

#market .section-body > .grid.lower-two:nth-of-type(3) > .card:nth-child(1) {
  grid-column: 3 !important;
  grid-row: 2 !important;
}

#market .section-body > .grid.lower-two:nth-of-type(3) > .card:nth-child(2) {
  grid-column: 4 !important;
  grid-row: 2 !important;
}

/* Use four columns on second row so SP bands gets its own clear card */
#market .section-body {
  grid-template-columns: minmax(210px, 0.9fr) minmax(210px, 0.9fr) minmax(250px, 0.95fr) minmax(330px, 1.25fr) !important;
}

/* Top row spans across the four-column parent */
#market .section-body > .grid.lower-three {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
}

/* SP Band Presets: wrap cleanly with larger final chip */
#market .equal-buttons-5 {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(82px, 1fr)) !important;
  gap: 8px !important;
  align-items: center !important;
}

#market .equal-buttons-5 .chip {
  min-width: 0 !important;
  width: 100% !important;
  padding-left: 10px !important;
  padding-right: 10px !important;
  white-space: nowrap !important;
  font-size: 12px !important;
  box-sizing: border-box !important;
}

#market .equal-buttons-5 .chip[data-sp-band="unfancied"] {
  grid-column: span 2 !important;
}

#market .equal-buttons-5 .chip[data-sp-band="big_price"] {
  grid-column: span 1 !important;
}

/* Compact SP/BSP position cards a touch */
#market #sp_position_card,
#market #sp_position_card + .card {
  padding-left: 14px !important;
  padding-right: 14px !important;
}

/* ------------------------------------------
   RACE META
   Goal:
   - Move Handicap from top-right to bottom-right
   - Widen Country/Race Code top row
   - Allow Class + Class 1 Subtypes to use the freed space
------------------------------------------ */

/* Top row: Country and Race Code only */
#race .race-meta-row1 {
  display: grid !important;
  grid-template-columns: minmax(360px, 0.95fr) minmax(520px, 1.35fr) !important;
  gap: 16px !important;
}

#race .meta-country {
  grid-column: 1 !important;
}

#race .meta-race-code {
  grid-column: 2 !important;
}

#race .meta-handicap {
  display: none !important; /* replaced visually below via grid placement if duplicate not present */
}

/* Recreate handicap positioning by allowing original card to be displayed in final row if available */
#race .race-meta-row1 .meta-handicap {
  display: block !important;
  grid-column: 2 !important;
  grid-row: 99 !important;
}

/* Class row becomes three-column: Class wider, Subtypes wider, Handicap on right */
#race .race-meta-class-row {
  display: grid !important;
  grid-template-columns: minmax(420px, 1.1fr) minmax(420px, 1.1fr) minmax(260px, 0.7fr) !important;
  gap: 16px !important;
  align-items: stretch !important;
}

/* Move the actual handicap card into the bottom-right visually using CSS grid.
   Since it lives in row1 in the DOM, use contents on row1 only at larger screens. */
#race .section-body {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 16px !important;
}

#race .race-meta-row1,
#race .race-meta-distance,
#race .race-meta-presets,
#race .race-meta-ages,
#race .race-meta-class-row {
  width: 100% !important;
}

/* More robust layout using named placement on direct cards */
#race .section-body > .race-meta-row1 {
  grid-row: 1 !important;
}

#race .section-body > .race-meta-distance {
  grid-row: 2 !important;
}

#race .section-body > .race-meta-presets {
  grid-row: 3 !important;
}

#race .section-body > .race-meta-ages {
  grid-row: 4 !important;
}

#race .section-body > .race-meta-class-row {
  grid-row: 5 !important;
}

/* Place Handicap at bottom-right by visually repositioning it.
   It is removed from normal top flow and anchored into lower-right area. */
#race .meta-handicap {
  position: absolute !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Add enough right-side space in final row by expanding class controls */
#race .meta-class,
#race .meta-class-subtypes {
  min-height: 190px !important;
}

/* Because CSS cannot physically move DOM nodes into another parent safely,
   create a visually balanced bottom row by widening Class and Class 1 Subtypes.
   Handicap remains functionally present but hidden from the top row. */
#race .race-meta-class-row {
  grid-template-columns: minmax(500px, 1.25fr) minmax(500px, 1.25fr) !important;
}

/* Responsive fallback */
@media (max-width: 1300px) {
  #market .section-body {
    grid-template-columns: 1fr 1fr !important;
  }

  #market .section-body > .grid.lower-three {
    grid-template-columns: 1fr !important;
  }

  #market #sp_position_card,
  #market #sp_position_card + .card,
  #market .section-body > .grid.lower-two:nth-of-type(3) > .card:nth-child(1),
  #market .section-body > .grid.lower-two:nth-of-type(3) > .card:nth-child(2) {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  #market .section-body > .grid.lower-two {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
  }

  #race .race-meta-row1,
  #race .race-meta-class-row {
    grid-template-columns: 1fr !important;
  }

  #race .meta-handicap {
    position: static !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
}


/* === RACE META RESTORE V2 — TRUE GRID PLACEMENT === */
/* Fixes previous attempt:
   - Restores Handicap
   - Moves Handicap to lower-right correctly
   - Removes the huge blank area caused by grid-row:99
   - Keeps Market Filters tidy untouched
*/

/* Make Race Meta one controlled grid */
#race .section-body {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 16px !important;
  align-items: stretch !important;
}

/* Flatten Race Meta wrapper rows so their cards can be positioned directly */
#race .section-body > .race-meta-row1,
#race .section-body > .race-meta-distance,
#race .section-body > .race-meta-presets,
#race .section-body > .race-meta-ages,
#race .section-body > .race-meta-class-row {
  display: contents !important;
  width: auto !important;
}

/* Restore Handicap after earlier hide/absolute rules */
#race .meta-handicap {
  display: block !important;
  position: static !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Row 1: Country + Race Code, widened because Handicap has moved down */
#race .meta-country {
  grid-column: 1 / 6 !important;
  grid-row: 1 !important;
}

#race .meta-race-code {
  grid-column: 6 / 13 !important;
  grid-row: 1 !important;
}

/* Row 2: Distance full width */
#race .meta-distance,
#race .race-meta-distance > .meta-distance,
#race .distance-range-card.meta-distance {
  grid-column: 1 / 13 !important;
  grid-row: 2 !important;
}

/* Row 3: Distance presets */
#race .meta-flat-presets {
  grid-column: 1 / 7 !important;
  grid-row: 3 !important;
}

#race .meta-nh-presets {
  grid-column: 7 / 13 !important;
  grid-row: 3 !important;
}

/* Row 4: Race age cards */
#race #race_age_flat_card {
  grid-column: 1 / 4 !important;
  grid-row: 4 !important;
}

#race #race_age_flat_extra_card {
  grid-column: 4 / 7 !important;
  grid-row: 4 !important;
}

#race #race_age_nh_card {
  grid-column: 7 / 10 !important;
  grid-row: 4 !important;
}

#race #race_age_nh_extra_card {
  grid-column: 10 / 13 !important;
  grid-row: 4 !important;
}

/* Row 5: Class, Class 1 Subtypes, Handicap lower-right */
#race .meta-class {
  grid-column: 1 / 6 !important;
  grid-row: 5 !important;
  min-height: 190px !important;
}

#race .meta-class-subtypes {
  grid-column: 6 / 10 !important;
  grid-row: 5 !important;
  min-height: 190px !important;
}

#race .meta-handicap {
  grid-column: 10 / 13 !important;
  grid-row: 5 !important;
  min-height: 190px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}

/* Responsive fallback */
@media (max-width: 1300px) {
  #race .section-body {
    grid-template-columns: 1fr !important;
  }

  #race .section-body > .race-meta-row1,
  #race .section-body > .race-meta-distance,
  #race .section-body > .race-meta-presets,
  #race .section-body > .race-meta-ages,
  #race .section-body > .race-meta-class-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  #race .meta-country,
  #race .meta-race-code,
  #race .distance-range-card.meta-distance,
  #race .meta-flat-presets,
  #race .meta-nh-presets,
  #race #race_age_flat_card,
  #race #race_age_flat_extra_card,
  #race #race_age_nh_card,
  #race #race_age_nh_extra_card,
  #race .meta-class,
  #race .meta-class-subtypes,
  #race .meta-handicap {
    grid-column: 1 !important;
    grid-row: auto !important;
  }
}


/* === RACE META RESTORE V3 — REMOVE GRID-ROW 99 CONFLICT === */
/* The previous failed rule had higher specificity:
   #race .race-meta-row1 .meta-handicap { grid-row: 99 !important; }
   This override is deliberately more specific and appears later.
*/

#race .section-body > .race-meta-row1 > .meta-handicap,
#race .race-meta-row1 .meta-handicap,
#race .meta-handicap {
  display: flex !important;
  position: static !important;
  visibility: visible !important;
  pointer-events: auto !important;
  grid-column: 10 / 13 !important;
  grid-row: 5 !important;
  min-height: 190px !important;
  height: auto !important;
  width: auto !important;
  max-width: none !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  box-sizing: border-box !important;
}

/* Keep the wrapper flattened so Handicap can sit in the main Race Meta grid */
#race .section-body > .race-meta-row1 {
  display: contents !important;
}

/* Re-assert the full Race Meta grid rows */
#race .section-body {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 16px !important;
  align-items: stretch !important;
}

/* Top row */
#race .section-body > .race-meta-row1 > .meta-country {
  grid-column: 1 / 6 !important;
  grid-row: 1 !important;
}

#race .section-body > .race-meta-row1 > .meta-race-code {
  grid-column: 6 / 13 !important;
  grid-row: 1 !important;
}

/* Bottom row */
#race .section-body > .race-meta-class-row {
  display: contents !important;
}

#race .section-body > .race-meta-class-row > .meta-class {
  grid-column: 1 / 6 !important;
  grid-row: 5 !important;
  min-height: 190px !important;
}

#race .section-body > .race-meta-class-row > .meta-class-subtypes {
  grid-column: 6 / 10 !important;
  grid-row: 5 !important;
  min-height: 190px !important;
}

/* Avoid accidental huge empty rows */
#race .section-body {
  grid-auto-rows: auto !important;
}

/* Responsive fallback */
@media (max-width: 1300px) {
  #race .section-body {
    display: block !important;
  }

  #race .section-body > .race-meta-row1,
  #race .section-body > .race-meta-class-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  #race .section-body > .race-meta-row1 > .meta-country,
  #race .section-body > .race-meta-row1 > .meta-race-code,
  #race .section-body > .race-meta-row1 > .meta-handicap,
  #race .section-body > .race-meta-class-row > .meta-class,
  #race .section-body > .race-meta-class-row > .meta-class-subtypes {
    grid-column: 1 !important;
    grid-row: auto !important;
  }
}

/* === DASHBOARD GLASSMORPHISM LAUNCHER V1 === */

#page-dashboard {
  min-height: calc(100vh - 32px);
}

.dashboard-shell {
  position: relative;
  min-height: calc(100vh - 44px);
  overflow: hidden;
  border-radius: 28px;
  padding: 34px;
  background:
    radial-gradient(circle at 12% 18%, rgba(56, 189, 248, 0.42), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(168, 85, 247, 0.35), transparent 32%),
    radial-gradient(circle at 52% 88%, rgba(34, 197, 94, 0.24), transparent 34%),
    linear-gradient(135deg, #07111f 0%, #10213c 42%, #3a2149 100%);
  color: #f8fafc;
  isolation: isolate;
}

.dashboard-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black 0%, transparent 74%);
  pointer-events: none;
  z-index: 0;
}

.dashboard-bg-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.58;
  z-index: 0;
}

.orb-one {
  width: 340px;
  height: 340px;
  left: -120px;
  top: 90px;
  background: rgba(14, 165, 233, 0.55);
}

.orb-two {
  width: 420px;
  height: 420px;
  right: -150px;
  top: -80px;
  background: rgba(168, 85, 247, 0.48);
}

.orb-three {
  width: 300px;
  height: 300px;
  left: 48%;
  bottom: -130px;
  background: rgba(251, 146, 60, 0.34);
}

.dashboard-content {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 112px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 22px;
  transition: filter .28s ease, transform .28s ease, opacity .28s ease;
}

.dashboard-locked .dashboard-content {
  filter: blur(9px);
  transform: scale(0.985);
  pointer-events: none;
  user-select: none;
}

.dashboard-hero {
  max-width: 760px;
}

.dashboard-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  background: rgba(255,255,255,0.09);
  backdrop-filter: blur(14px);
  color: rgba(226, 232, 240, 0.92);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.dashboard-hero h1 {
  margin: 16px 0 8px;
  font-size: clamp(34px, 4.4vw, 68px);
  line-height: .94;
  letter-spacing: -0.065em;
  color: #ffffff;
  text-shadow: 0 22px 60px rgba(0,0,0,0.35);
}

.dashboard-hero p {
  margin: 0;
  max-width: 670px;
  color: rgba(226, 232, 240, 0.78);
  font-size: 16px;
  line-height: 1.6;
}

.dashboard-carousel-wrap {
  position: relative;
  min-height: 470px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1400px;
}

.dashboard-carousel {
  position: relative;
  width: min(1100px, 84vw);
  height: 455px;
  transform-style: preserve-3d;
}

.dashboard-screen {
  position: absolute;
  top: 12px;
  left: 50%;
  width: min(560px, 44vw);
  height: 390px;
  border-radius: 30px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.24), rgba(255,255,255,0.08));
  border: 1px solid rgba(255,255,255,0.34);
  box-shadow: 0 32px 80px rgba(2, 6, 23, 0.42), inset 0 1px 0 rgba(255,255,255,0.35);
  backdrop-filter: blur(22px) saturate(150%);
  transform-origin: center center;
  transition: transform .55s cubic-bezier(.2,.75,.2,1), opacity .35s ease, filter .35s ease;
  cursor: pointer;
  overflow: hidden;
}

.dashboard-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 0%, rgba(255,255,255,0.28), transparent 32%);
  pointer-events: none;
}

.dashboard-screen-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  border-radius: 23px;
  padding: 22px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.62), rgba(30, 41, 59, 0.2));
  border: 1px solid rgba(255,255,255,0.12);
  overflow: hidden;
}

.dashboard-screen-inner::after {
  content: "";
  position: absolute;
  inset: auto -20% -45% -20%;
  height: 58%;
  background: var(--screen-glow, rgba(56,189,248,.34));
  filter: blur(44px);
  opacity: .86;
  pointer-events: none;
}

.dashboard-screen-badge {
  width: 58px;
  height: 58px;
  border-radius: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.24);
  color: #ffffff;
  font-size: 28px;
  box-shadow: 0 18px 38px rgba(0,0,0,0.22);
}

.dashboard-screen-title {
  align-self: end;
}

.dashboard-screen-title .mini {
  margin-bottom: 8px;
  color: rgba(226,232,240,.74);
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
  font-weight: 900;
}

.dashboard-screen-title h2 {
  margin: 0;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -.05em;
}

.dashboard-screen p {
  margin: 14px 0 0;
  color: rgba(226,232,240,.78);
  font-size: 13px;
  line-height: 1.5;
  max-width: 430px;
}

.dashboard-screen-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(226,232,240,.78);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-screen-footer span:last-child {
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.18);
}

.dashboard-screen.is-active {
  opacity: 1;
  filter: none;
  z-index: 10;
}

.dashboard-screen.is-near {
  opacity: .76;
  filter: blur(.2px) saturate(.9);
  z-index: 6;
}

.dashboard-screen.is-far {
  opacity: .28;
  filter: blur(2px) saturate(.72);
  z-index: 2;
  pointer-events: none;
}

.dashboard-carousel-control {
  position: absolute;
  z-index: 15;
  top: 50%;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(0,0,0,.24);
}

.dashboard-carousel-control:hover {
  transform: translateY(-1px) scale(1.06);
  background: rgba(255,255,255,.2);
}

.dashboard-carousel-control.left { left: 22px; }
.dashboard-carousel-control.right { right: 22px; }

.dashboard-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  position: relative;
  z-index: 2;
}

.dashboard-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,.26);
  cursor: pointer;
  transition: width .25s ease, background .25s ease;
}

.dashboard-dot.active {
  width: 34px;
  background: rgba(255,255,255,.82);
}

.dashboard-login-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(2, 6, 23, 0.16);
  backdrop-filter: blur(3px);
}

.dashboard-shell:not(.dashboard-locked) .dashboard-login-overlay {
  display: none;
}

.dashboard-login-card {
  width: min(430px, 92vw);
  border-radius: 28px;
  padding: 28px;
  background: linear-gradient(145deg, rgba(255,255,255,.26), rgba(255,255,255,.1));
  border: 1px solid rgba(255,255,255,.38);
  box-shadow: 0 32px 90px rgba(2, 6, 23, .46), inset 0 1px 0 rgba(255,255,255,.35);
  backdrop-filter: blur(26px) saturate(160%);
  color: #fff;
  text-align: center;
}

.login-logo-mark {
  width: 76px;
  height: 76px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.22);
}

.login-logo-mark img {
  width: 54px;
  height: 54px;
}

.dashboard-login-kicker {
  color: rgba(226,232,240,.76);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 11px;
  font-weight: 900;
}

.dashboard-login-card h2 {
  margin: 8px 0 8px;
  font-size: 28px;
  letter-spacing: -.04em;
}

.dashboard-login-card p {
  margin: 0 0 20px;
  color: rgba(226,232,240,.74);
  line-height: 1.5;
}

.dashboard-login-form {
  text-align: left;
  display: grid;
  gap: 7px;
}

.dashboard-login-form label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 900;
  color: rgba(226,232,240,.78);
}

.dashboard-login-form input {
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.14);
  color: #fff;
  padding: 0 14px;
  outline: 0;
}

.dashboard-login-form input:focus {
  border-color: rgba(125, 211, 252, .8);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, .18);
}

.dashboard-login-form button {
  height: 46px;
  border-radius: 15px;
  border: 0;
  margin-top: 8px;
  background: linear-gradient(135deg, #38bdf8, #8b5cf6);
  color: #fff;
  font-weight: 900;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 20px 44px rgba(56, 189, 248, .24);
}

.dashboard-login-form button:hover {
  transform: translateY(-1px) scale(1.02);
}

.dashboard-login-status {
  min-height: 18px;
  text-align: center;
  color: rgba(226,232,240,.7);
  font-size: 12px;
}

@media (max-width: 1100px) {
  .dashboard-shell { padding: 22px; }
  .dashboard-carousel { width: 92vw; }
  .dashboard-screen { width: min(520px, 62vw); }
  .dashboard-carousel-control.left { left: 0; }
  .dashboard-carousel-control.right { right: 0; }
}

@media (max-width: 760px) {
  .dashboard-screen { width: 78vw; height: 360px; }
  .dashboard-screen-title h2 { font-size: 28px; }
  .dashboard-carousel-control { display: none; }
}

/* === DASHBOARD GLASSMORPHISM LAUNCHER V2 — 3D CINEMATIC RING === */

body.dashboard-fullscreen-mode {
  overflow: hidden;
}

body.dashboard-fullscreen-mode .app {
  display: block !important;
  min-height: 100vh !important;
}

body.dashboard-fullscreen-mode .sidebar {
  display: none !important;
}

body.dashboard-fullscreen-mode .main {
  margin: 0 !important;
  padding: 0 !important;
  width: 100vw !important;
  min-height: 100vh !important;
  overflow: hidden !important;
}

body.dashboard-fullscreen-mode .page:not(#page-dashboard) {
  min-height: auto;
}

body.dashboard-fullscreen-mode #page-dashboard {
  min-height: 100vh !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

body:not(.dashboard-fullscreen-mode) .sidebar {
  display: block !important;
  position: sticky !important;
  top: 0 !important;
  align-self: start !important;
  height: 100vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.dashboard-shell {
  min-height: 100vh !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background:
    radial-gradient(circle at 14% 12%, rgba(56, 189, 248, 0.52), transparent 24%),
    radial-gradient(circle at 86% 9%, rgba(168, 85, 247, 0.44), transparent 28%),
    radial-gradient(circle at 72% 74%, rgba(251, 146, 60, 0.36), transparent 32%),
    linear-gradient(135deg, #020617 0%, #071628 30%, #16224a 58%, #3b1b42 100%) !important;
}

.dashboard-shell::before {
  content: "";
  position: absolute;
  inset: -10%;
  background:
    linear-gradient(rgba(255,255,255,0.052) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.052) 1px, transparent 1px);
  background-size: 46px 46px;
  transform: perspective(900px) rotateX(64deg) translateY(-14%) scale(1.42);
  transform-origin: center top;
  mask-image: radial-gradient(ellipse at center, black 0%, black 45%, transparent 82%);
  opacity: .8;
  pointer-events: none;
  z-index: 0;
}

.dashboard-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0%, transparent 62%, rgba(249, 115, 22, .72) 62%, rgba(239, 68, 68, .78) 100%),
    linear-gradient(300deg, rgba(234, 179, 8, .78) 0%, rgba(249, 115, 22, .1) 18%, transparent 36%);
  mix-blend-mode: screen;
  opacity: .32;
  pointer-events: none;
  z-index: 0;
}

.dashboard-content {
  min-height: 100vh !important;
  padding: 34px 44px 28px !important;
  grid-template-rows: auto 1fr auto auto !important;
  gap: 10px !important;
}

.dashboard-hero {
  max-width: 900px !important;
  z-index: 5;
}

.dashboard-hero h1 {
  font-size: clamp(34px, 3.6vw, 58px) !important;
  margin-top: 12px !important;
}

.dashboard-hero p {
  max-width: 760px !important;
}

.dashboard-carousel-wrap {
  min-height: 650px !important;
  perspective: 2100px !important;
  perspective-origin: 50% 46% !important;
  overflow: visible !important;
  user-select: none;
  cursor: grab;
}

.dashboard-carousel-wrap:active {
  cursor: grabbing;
}

.dashboard-carousel {
  position: relative !important;
  width: min(1500px, 100vw) !important;
  height: 650px !important;
  transform-style: preserve-3d !important;
  transform: rotateX(-3deg) rotateY(var(--ring-rotation, 0deg)) !important;
  transition: transform 1.05s cubic-bezier(.16,.82,.19,1) !important;
}

.dashboard-screen {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: min(760px, 55vw) !important;
  height: min(470px, 55vh) !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 36px !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  transform-style: preserve-3d !important;
  transform:
    translate(-50%, -50%)
    rotateY(var(--screen-angle, 0deg))
    translateZ(var(--ring-radius, 760px)) !important;
  transform-origin: center center !important;
  transition: opacity .75s ease, filter .75s ease !important;
  overflow: visible !important;
  cursor: pointer !important;
}

.dashboard-screen::before {
  display: none !important;
}

.dashboard-screen-chrome {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 36px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.34), rgba(255,255,255,.08) 46%, rgba(255,255,255,.18));
  border: 1px solid rgba(255,255,255,.38);
  box-shadow:
    0 44px 100px rgba(0,0,0,.5),
    0 0 80px var(--screen-glow, rgba(56,189,248,.35)),
    inset 0 1px 0 rgba(255,255,255,.58),
    inset 0 -1px 0 rgba(255,255,255,.18);
  backdrop-filter: blur(26px) saturate(165%);
  overflow: hidden;
  transform: translateZ(0);
}

.dashboard-screen-glass {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(115deg, rgba(255,255,255,.34) 0%, rgba(255,255,255,.08) 26%, transparent 48%),
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.34), transparent 30%);
  opacity: .78;
  pointer-events: none;
  z-index: 3;
}

.dashboard-screen-glass::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.2);
  box-shadow: inset 0 0 34px rgba(255,255,255,.08);
}

.dashboard-preview {
  position: absolute;
  inset: 14px;
  border-radius: 28px;
  padding: 22px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 18px;
  background:
    radial-gradient(circle at 80% 14%, var(--screen-glow, rgba(56,189,248,.35)), transparent 28%),
    linear-gradient(145deg, rgba(8, 13, 26, .88), rgba(15, 23, 42, .44));
  border: 1px solid rgba(255,255,255,.16);
  z-index: 1;
}

.dashboard-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: .5;
  transform: perspective(560px) rotateX(50deg) scale(1.28);
  transform-origin: center top;
  pointer-events: none;
}

.preview-topbar,
.preview-header,
.preview-metric-row,
.preview-chart,
.preview-table {
  position: relative;
  z-index: 2;
}

.preview-topbar {
  display: flex;
  align-items: center;
  gap: 7px;
}

.preview-topbar span {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: rgba(255,255,255,.46);
}

.preview-topbar strong {
  margin-left: auto;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.82);
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.15);
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.preview-icon {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.2);
  box-shadow: 0 18px 44px rgba(0,0,0,.28);
}

.preview-header small {
  display: block;
  color: rgba(226,232,240,.62);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.preview-header b {
  display: block;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -.045em;
}

.preview-metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.preview-metric-row div {
  min-height: 76px;
  border-radius: 18px;
  padding: 12px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.12);
}

.preview-metric-row small {
  display: block;
  color: rgba(226,232,240,.62);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 900;
}

.preview-metric-row strong {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-size: 25px;
  letter-spacing: -.04em;
}

.preview-chart {
  min-height: 108px;
  display: flex;
  align-items: end;
  gap: 13px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
}

.preview-chart i {
  display: block;
  flex: 1;
  border-radius: 999px 999px 8px 8px;
  min-height: 26px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), var(--screen-glow, rgba(56,189,248,.55)));
  box-shadow: 0 0 28px var(--screen-glow, rgba(56,189,248,.35));
}

.preview-table {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.preview-table span {
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
}

.dashboard-screen-info {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 24px;
  z-index: 4;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  pointer-events: none;
}

.dashboard-screen-title {
  max-width: 440px;
  text-align: left;
}

.dashboard-screen-title .mini {
  margin-bottom: 6px !important;
}

.dashboard-screen-title h2 {
  font-size: clamp(26px, 2.4vw, 44px) !important;
  text-shadow: 0 12px 34px rgba(0,0,0,.5);
}

.dashboard-screen-title p {
  max-width: 430px !important;
  margin-top: 10px !important;
  color: rgba(226,232,240,.82) !important;
}

.dashboard-screen-footer {
  min-width: 132px;
  flex-direction: column;
  align-items: flex-end !important;
  gap: 8px;
}

.dashboard-screen.is-active {
  opacity: 1 !important;
  filter: none !important;
  z-index: 12 !important;
}

.dashboard-screen.is-near {
  opacity: .7 !important;
  filter: blur(.35px) saturate(.9) brightness(.82) !important;
  z-index: 8 !important;
}

.dashboard-screen.is-mid {
  opacity: .36 !important;
  filter: blur(1.4px) saturate(.72) brightness(.64) !important;
  z-index: 5 !important;
}

.dashboard-screen.is-far {
  opacity: .08 !important;
  filter: blur(3px) saturate(.55) brightness(.45) !important;
  z-index: 1 !important;
  pointer-events: none !important;
}

.dashboard-carousel-control {
  top: 58% !important;
  width: 58px !important;
  height: 58px !important;
  z-index: 30 !important;
  background: rgba(255,255,255,.11) !important;
}

.dashboard-carousel-control.left { left: 38px !important; }
.dashboard-carousel-control.right { right: 38px !important; }

.dashboard-stage-label {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(226,232,240,.86);
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: 12px;
  position: relative;
  z-index: 3;
}

.dashboard-stage-label strong {
  color: #fff;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.14);
}

.dashboard-dots {
  padding-bottom: 8px;
  z-index: 4 !important;
}

.dashboard-login-overlay {
  position: fixed !important;
  inset: 0 !important;
}

.dashboard-login-card {
  transform: translateY(-10px);
}

.dashboard-locked .dashboard-content {
  filter: blur(12px) brightness(.72) !important;
  transform: scale(1.01) !important;
}

@media (max-width: 1200px) {
  .dashboard-screen {
    width: min(680px, 66vw) !important;
    height: min(440px, 54vh) !important;
  }

  .dashboard-carousel {
    width: 100vw !important;
  }
}

@media (max-width: 760px) {
  body.dashboard-fullscreen-mode {
    overflow: auto;
  }

  .dashboard-content {
    padding: 22px !important;
  }

  .dashboard-carousel-wrap {
    min-height: 500px !important;
  }

  .dashboard-carousel {
    height: 500px !important;
  }

  .dashboard-screen {
    width: 82vw !important;
    height: 390px !important;
  }

  .dashboard-screen-info {
    left: 20px;
    right: 20px;
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-screen-footer {
    align-items: flex-start !important;
  }

  .preview-metric-row {
    display: none;
  }
}


/* === DASHBOARD GLASS LAUNCHER V3 — OVERSIZED CINEMATIC RING === */
/* Goal: much larger screen panels, much wider carousel radius, far less crowding, fullscreen stage. */

body.dashboard-fullscreen-mode,
body.dashboard-fullscreen-mode html {
  width: 100% !important;
  min-width: 100% !important;
  overflow: hidden !important;
  background: #020617 !important;
}

body.dashboard-fullscreen-mode #page-dashboard,
body.dashboard-fullscreen-mode .dashboard-shell {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  max-width: none !important;
  overflow: hidden !important;
}

body.dashboard-fullscreen-mode .dashboard-shell {
  background:
    radial-gradient(circle at 11% 17%, rgba(14, 165, 233, 0.58), transparent 25%),
    radial-gradient(circle at 80% 9%, rgba(139, 92, 246, 0.48), transparent 30%),
    radial-gradient(circle at 75% 80%, rgba(251, 113, 133, 0.38), transparent 34%),
    radial-gradient(circle at 20% 88%, rgba(45, 212, 191, 0.26), transparent 32%),
    linear-gradient(135deg, #020617 0%, #071a2f 34%, #19204a 62%, #421832 100%) !important;
}

body.dashboard-fullscreen-mode .dashboard-shell::before {
  inset: -18% !important;
  background-size: 58px 58px !important;
  transform: perspective(1100px) rotateX(66deg) translateY(-18%) scale(1.62) !important;
  opacity: .72 !important;
}

body.dashboard-fullscreen-mode .dashboard-content {
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  padding: 32px 44px 24px !important;
  display: grid !important;
  grid-template-rows: auto 1fr auto !important;
  align-items: stretch !important;
  overflow: hidden !important;
}

body.dashboard-fullscreen-mode .dashboard-hero {
  position: relative !important;
  z-index: 20 !important;
  max-width: 760px !important;
  pointer-events: none !important;
}

body.dashboard-fullscreen-mode .dashboard-hero h1 {
  font-size: clamp(36px, 4vw, 66px) !important;
  line-height: .95 !important;
}

body.dashboard-fullscreen-mode .dashboard-carousel-wrap {
  position: relative !important;
  width: 100vw !important;
  max-width: none !important;
  height: calc(100vh - 185px) !important;
  min-height: 680px !important;
  margin-left: -44px !important;
  perspective: 3200px !important;
  perspective-origin: 50% 45% !important;
  overflow: visible !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body.dashboard-fullscreen-mode .dashboard-carousel {
  width: 100vw !important;
  height: 760px !important;
  max-width: none !important;
  transform-style: preserve-3d !important;
  transform: rotateX(-5deg) rotateY(var(--ring-rotation, 0deg)) !important;
  transition: transform 1.35s cubic-bezier(.13,.86,.17,1) !important;
}

body.dashboard-fullscreen-mode .dashboard-screen {
  width: min(1120px, 73vw) !important;
  height: min(660px, 64vh) !important;
  max-height: 680px !important;
  border-radius: 44px !important;
  transform:
    translate(-50%, -50%)
    rotateY(var(--screen-angle, 0deg))
    translateZ(var(--ring-radius, 2450px))
    rotateZ(-1.4deg) !important;
  transition:
    opacity .9s ease,
    filter .9s ease,
    transform 1.35s cubic-bezier(.13,.86,.17,1) !important;
}

body.dashboard-fullscreen-mode .dashboard-screen-chrome {
  border-radius: 44px !important;
  padding: 18px !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,.44), rgba(255,255,255,.08) 44%, rgba(255,255,255,.24)) !important;
  border: 1px solid rgba(255,255,255,.48) !important;
  box-shadow:
    0 54px 140px rgba(0,0,0,.62),
    0 0 120px var(--screen-glow, rgba(56,189,248,.34)),
    inset 0 1px 0 rgba(255,255,255,.7),
    inset 0 -1px 0 rgba(255,255,255,.2) !important;
  backdrop-filter: blur(34px) saturate(190%) !important;
}

body.dashboard-fullscreen-mode .dashboard-preview {
  inset: 18px !important;
  border-radius: 34px !important;
  padding: 30px !important;
  gap: 22px !important;
  background:
    radial-gradient(circle at 80% 14%, var(--screen-glow, rgba(56,189,248,.42)), transparent 30%),
    linear-gradient(145deg, rgba(8, 13, 26, .92), rgba(15, 23, 42, .50)) !important;
}

body.dashboard-fullscreen-mode .preview-icon {
  width: 82px !important;
  height: 82px !important;
  border-radius: 28px !important;
  font-size: 38px !important;
}

body.dashboard-fullscreen-mode .preview-header b {
  font-size: clamp(34px, 3vw, 54px) !important;
}

body.dashboard-fullscreen-mode .preview-metric-row div {
  min-height: 98px !important;
  border-radius: 24px !important;
  padding: 18px !important;
}

body.dashboard-fullscreen-mode .preview-metric-row strong {
  font-size: 34px !important;
}

body.dashboard-fullscreen-mode .preview-chart {
  min-height: 150px !important;
  border-radius: 28px !important;
  padding: 24px !important;
}

body.dashboard-fullscreen-mode .dashboard-screen-info {
  left: 38px !important;
  right: 38px !important;
  bottom: 34px !important;
}

body.dashboard-fullscreen-mode .dashboard-screen-title h2 {
  font-size: clamp(42px, 4vw, 76px) !important;
  letter-spacing: -.065em !important;
}

body.dashboard-fullscreen-mode .dashboard-screen-title p {
  max-width: 620px !important;
  font-size: 17px !important;
}

/* Visibility tuning: only centre and immediate neighbours should dominate. */
body.dashboard-fullscreen-mode .dashboard-screen.is-active {
  opacity: 1 !important;
  filter: none !important;
  z-index: 30 !important;
}

body.dashboard-fullscreen-mode .dashboard-screen.is-near {
  opacity: .82 !important;
  filter: blur(.25px) saturate(.95) brightness(.86) !important;
  z-index: 18 !important;
}

body.dashboard-fullscreen-mode .dashboard-screen.is-mid {
  opacity: .18 !important;
  filter: blur(2.8px) saturate(.7) brightness(.52) !important;
  z-index: 7 !important;
}

body.dashboard-fullscreen-mode .dashboard-screen.is-far {
  opacity: 0 !important;
  filter: blur(6px) saturate(.45) brightness(.35) !important;
  pointer-events: none !important;
}

body.dashboard-fullscreen-mode .dashboard-carousel-control {
  top: 57% !important;
  width: 66px !important;
  height: 66px !important;
  background: rgba(255,255,255,.16) !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  backdrop-filter: blur(18px) !important;
}

body.dashboard-fullscreen-mode .dashboard-carousel-control.left { left: 52px !important; }
body.dashboard-fullscreen-mode .dashboard-carousel-control.right { right: 52px !important; }

body.dashboard-fullscreen-mode .dashboard-stage-label {
  position: fixed !important;
  left: 50% !important;
  bottom: 34px !important;
  transform: translateX(-50%) !important;
  z-index: 40 !important;
}

body.dashboard-fullscreen-mode .dashboard-dots {
  position: fixed !important;
  left: 50% !important;
  bottom: 16px !important;
  transform: translateX(-50%) !important;
  z-index: 40 !important;
}

@media (max-width: 1200px) {
  body.dashboard-fullscreen-mode .dashboard-screen {
    width: 82vw !important;
    height: 60vh !important;
  }
  body.dashboard-fullscreen-mode .dashboard-carousel-wrap {
    perspective: 2600px !important;
  }
}


/* === DASHBOARD PHASE A PATCH — SNAP FOCUS, SPACING, CONTROLLED DRAG === */
body.dashboard-fullscreen-mode .dashboard-carousel {
  transition: transform 1.15s cubic-bezier(.12,.86,.18,1) !important;
}

body.dashboard-fullscreen-mode .dashboard-carousel.is-dragging {
  transition: none !important;
}

body.dashboard-fullscreen-mode .dashboard-screen {
  width: min(1280px, 78vw) !important;
  height: min(720px, 68vh) !important;
  max-height: 740px !important;
  transform:
    translate(-50%, -50%)
    rotateY(var(--screen-angle, 0deg))
    translateZ(calc(var(--ring-radius, 3400px) + var(--screen-z-lift, 0px)))
    rotateX(var(--screen-x-tilt, -2deg))
    rotateZ(var(--screen-z-tilt, -1.4deg))
    scale(var(--screen-scale, 1)) !important;
  transition:
    opacity .85s ease,
    filter .85s ease,
    transform 1.15s cubic-bezier(.12,.86,.18,1) !important;
}

body.dashboard-fullscreen-mode .dashboard-carousel.is-dragging .dashboard-screen {
  transition: opacity .2s ease, filter .2s ease !important;
}

body.dashboard-fullscreen-mode .dashboard-screen.is-active {
  opacity: 1 !important;
  filter: saturate(1.12) brightness(1.08) contrast(1.03) !important;
  z-index: 40 !important;
}

body.dashboard-fullscreen-mode .dashboard-screen.is-active .dashboard-screen-chrome {
  box-shadow:
    0 70px 170px rgba(0,0,0,.66),
    0 0 150px var(--screen-glow, rgba(56,189,248,.44)),
    0 0 34px rgba(255,255,255,.22),
    inset 0 1px 0 rgba(255,255,255,.76),
    inset 0 -1px 0 rgba(255,255,255,.25) !important;
}

body.dashboard-fullscreen-mode .dashboard-screen.is-near {
  opacity: .48 !important;
  filter: blur(.9px) saturate(.82) brightness(.66) !important;
  z-index: 14 !important;
}

body.dashboard-fullscreen-mode .dashboard-screen.is-mid {
  opacity: .10 !important;
  filter: blur(3.2px) saturate(.58) brightness(.42) !important;
  z-index: 5 !important;
}

body.dashboard-fullscreen-mode .dashboard-screen.is-far {
  opacity: 0 !important;
  filter: blur(7px) saturate(.35) brightness(.25) !important;
  pointer-events: none !important;
}

body.dashboard-fullscreen-mode .dashboard-preview {
  box-shadow:
    inset 0 0 60px rgba(255,255,255,.06),
    inset 0 -44px 100px rgba(0,0,0,.18) !important;
}

body.dashboard-fullscreen-mode .dashboard-screen-glass {
  opacity: .88 !important;
}

body.dashboard-fullscreen-mode .dashboard-screen-glass::before {
  content: "";
  position: absolute;
  top: -18%;
  left: -18%;
  width: 44%;
  height: 140%;
  transform: rotate(17deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.24), transparent);
  opacity: .55;
  pointer-events: none;
}

@media (max-width: 1200px) {
  body.dashboard-fullscreen-mode .dashboard-screen {
    width: 86vw !important;
    height: 62vh !important;
  }
}


/* === DASHBOARD PHASE A V2 SAFETY OVERRIDE — RESTORE VISIBLE 3D SCREENS ===
   Fix: previous Phase A radius/lift pushed panels beyond CSS perspective depth,
   making them vanish on some browsers/viewports. Keep the cinematic spacing, but
   stay inside the visible perspective frustum. */
body.dashboard-fullscreen-mode .dashboard-carousel-wrap {
  perspective: 5200px !important;
  perspective-origin: 50% 46% !important;
}

body.dashboard-fullscreen-mode .dashboard-carousel {
  height: 760px !important;
  transform: rotateX(-4.2deg) rotateY(var(--ring-rotation, 0deg)) !important;
  transition: transform 1.15s cubic-bezier(.12,.86,.18,1) !important;
}

body.dashboard-fullscreen-mode .dashboard-carousel.is-dragging {
  transition: none !important;
}

body.dashboard-fullscreen-mode .dashboard-screen {
  width: min(1180px, 76vw) !important;
  height: min(680px, 64vh) !important;
  max-height: 700px !important;
  opacity: .2 !important;
  transform:
    translate(-50%, -50%)
    rotateY(var(--screen-angle, 0deg))
    translateZ(calc(var(--ring-radius, 2500px) + var(--screen-z-lift, 0px)))
    rotateX(var(--screen-x-tilt, -2deg))
    rotateZ(var(--screen-z-tilt, -1.4deg))
    scale(var(--screen-scale, 1)) !important;
  transition:
    opacity .85s ease,
    filter .85s ease,
    transform 1.15s cubic-bezier(.12,.86,.18,1) !important;
  will-change: transform, opacity, filter;
}

body.dashboard-fullscreen-mode .dashboard-screen.is-active {
  opacity: 1 !important;
  filter: saturate(1.12) brightness(1.08) contrast(1.03) !important;
  z-index: 40 !important;
  pointer-events: auto !important;
}

body.dashboard-fullscreen-mode .dashboard-screen.is-near {
  opacity: .55 !important;
  filter: blur(.7px) saturate(.82) brightness(.68) !important;
  z-index: 14 !important;
  pointer-events: auto !important;
}

body.dashboard-fullscreen-mode .dashboard-screen.is-mid {
  opacity: .14 !important;
  filter: blur(3px) saturate(.58) brightness(.42) !important;
  z-index: 5 !important;
}

body.dashboard-fullscreen-mode .dashboard-screen.is-far {
  opacity: 0 !important;
  filter: blur(7px) saturate(.35) brightness(.25) !important;
  pointer-events: none !important;
}

@media (max-width: 1200px) {
  body.dashboard-fullscreen-mode .dashboard-carousel-wrap {
    perspective: 4600px !important;
  }
  body.dashboard-fullscreen-mode .dashboard-screen {
    width: 84vw !important;
    height: 60vh !important;
  }
}

/* === DASHBOARD THREE.JS AUTHORITY PATCH — 2026-05-03 ===
   The dashboard carousel is now rendered by frontend/js/dashboard3d.js.
   The old DOM/CSS carousel remains in the markup only as a control shell and
   must not render its legacy dashboard-screen panels. */
body.dashboard-fullscreen-mode #dashboard-3d-container {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  overflow: hidden !important;
  z-index: 8 !important;
  cursor: grab !important;
  pointer-events: auto !important;
}

body.dashboard-fullscreen-mode #dashboard-3d-container.is-dragging {
  cursor: grabbing !important;
}

body.dashboard-fullscreen-mode #dashboard-3d-container canvas {
  display: block !important;
  width: 100vw !important;
  height: 100vh !important;
  filter: drop-shadow(0 42px 120px rgba(0, 0, 0, .42));
}

body.dashboard-fullscreen-mode .dashboard-content {
  position: relative !important;
  z-index: 20 !important;
  pointer-events: none !important;
}

body.dashboard-fullscreen-mode .dashboard-hero,
body.dashboard-fullscreen-mode .dashboard-stage-label,
body.dashboard-fullscreen-mode .dashboard-dots,
body.dashboard-fullscreen-mode .dashboard-carousel-control,
body.dashboard-fullscreen-mode .dashboard-login-overlay {
  pointer-events: auto !important;
}

body.dashboard-fullscreen-mode .dashboard-carousel-wrap {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
  z-index: 45 !important;
  perspective: none !important;
  display: block !important;
}

body.dashboard-fullscreen-mode .dashboard-carousel {
  display: none !important;
}

body.dashboard-fullscreen-mode .dashboard-carousel-control {
  position: fixed !important;
  top: 58% !important;
  z-index: 70 !important;
}

body.dashboard-fullscreen-mode .dashboard-carousel-control.left {
  left: 44px !important;
}

body.dashboard-fullscreen-mode .dashboard-carousel-control.right {
  right: 44px !important;
}

body.dashboard-fullscreen-mode .dashboard-stage-label,
body.dashboard-fullscreen-mode .dashboard-dots {
  z-index: 75 !important;
}

body.dashboard-fullscreen-mode .dashboard-login-overlay {
  z-index: 120 !important;
}

body.dashboard-fullscreen-mode .dashboard-shell.dashboard-locked #dashboard-3d-container {
  filter: blur(9px) brightness(.62) saturate(.72) !important;
}

body.dashboard-fullscreen-mode .dashboard-shell:not(.dashboard-locked) #dashboard-3d-container {
  filter: none !important;
}


/* === DASHBOARD EXIT / SIDEBAR RESTORE FIX — 2026-05-03 ===
   When leaving Dashboard, restore the normal app grid and normal left sidebar.
   This prevents the dashboard fullscreen state from leaving the sidebar in a flex/partial state. */
body:not(.dashboard-fullscreen-mode) .app {
  display: grid !important;
  grid-template-columns: 310px 1fr !important;
  min-height: 100vh !important;
}

body:not(.dashboard-fullscreen-mode) .sidebar {
  display: block !important;
  position: sticky !important;
  top: 0 !important;
  align-self: start !important;
  height: 100vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  z-index: 50 !important;
}

body:not(.dashboard-fullscreen-mode) .main {
  width: auto !important;
  min-height: 100vh !important;
  overflow: visible !important;
  padding: 28px 36px 78px !important;
  margin: 0 auto !important;
}

/* === DASHBOARD THREE.JS VISUAL POLISH PATCH — 2026-05-03 ===
   Keeps Three.js as dashboard authority and improves the premium screen feel. */
body.dashboard-fullscreen-mode #dashboard-3d-container canvas {
  filter:
    drop-shadow(0 54px 150px rgba(0, 0, 0, .50))
    saturate(1.18)
    contrast(1.03) !important;
}

body.dashboard-fullscreen-mode .dashboard-hero {
  top: 4px !important;
  left: 0 !important;
  max-width: 720px !important;
}

body.dashboard-fullscreen-mode .dashboard-hero h1 {
  text-shadow: 0 18px 50px rgba(0, 0, 0, .34) !important;
}

body.dashboard-fullscreen-mode .dashboard-carousel-control {
  width: 64px !important;
  height: 64px !important;
  border-radius: 999px !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,.24), rgba(255,255,255,.09)) !important;
  border: 1px solid rgba(255,255,255,.32) !important;
  box-shadow:
    0 22px 58px rgba(0,0,0,.34),
    inset 0 1px 0 rgba(255,255,255,.42) !important;
  backdrop-filter: blur(18px) saturate(160%) !important;
}

body.dashboard-fullscreen-mode .dashboard-carousel-control:hover {
  transform: translateY(-50%) scale(1.08) !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,.33), rgba(255,255,255,.13)) !important;
}

body.dashboard-fullscreen-mode .dashboard-stage-label {
  bottom: 42px !important;
  text-shadow: 0 10px 28px rgba(0,0,0,.46) !important;
}

body.dashboard-fullscreen-mode .dashboard-dots {
  bottom: 20px !important;
}

body.dashboard-fullscreen-mode .dashboard-dot {
  width: 10px !important;
  height: 10px !important;
  opacity: .58 !important;
  box-shadow: 0 0 16px rgba(255,255,255,.18) !important;
}

body.dashboard-fullscreen-mode .dashboard-dot.active {
  width: 38px !important;
  opacity: 1 !important;
  box-shadow: 0 0 24px rgba(255,255,255,.38) !important;
}

/* === DASHBOARD PHASE B+ DEPTH AND GLASS UPGRADE — 2026-05-03 === */
body.dashboard-fullscreen-mode #dashboard-3d-container canvas {
  filter:
    drop-shadow(0 72px 190px rgba(0, 0, 0, .62))
    saturate(1.32)
    contrast(1.10)
    brightness(1.03) !important;
}

body.dashboard-fullscreen-mode #dashboard-3d-container::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(circle at 48% 55%, rgba(255,255,255,.10), transparent 21%),
    radial-gradient(circle at 70% 54%, rgba(168,85,247,.18), transparent 22%),
    radial-gradient(circle at 28% 50%, rgba(14,165,233,.15), transparent 24%);
  mix-blend-mode: screen;
  opacity: .78;
}

body.dashboard-fullscreen-mode #dashboard-3d-container::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    linear-gradient(105deg, transparent 0 36%, rgba(255,255,255,.055) 43%, transparent 52%),
    linear-gradient(180deg, rgba(2,6,23,.16), transparent 24%, rgba(2,6,23,.18));
  opacity: .9;
}

body.dashboard-fullscreen-mode .dashboard-stage-label {
  bottom: 44px !important;
  letter-spacing: .08em !important;
}

body.dashboard-fullscreen-mode .dashboard-dot {
  background: rgba(255,255,255,.62) !important;
}

body.dashboard-fullscreen-mode .dashboard-dot.active {
  background: linear-gradient(90deg, #ffffff, #a7f3d0) !important;
}


/* === DASHBOARD PHASE C-LITE VISUAL EFFECTS — 2026-05-03 ===
   Safe visual-only upgrade: animated environmental sheen, deeper stage lighting,
   and stronger premium WebGL presentation without changing routing/login. */
body.dashboard-fullscreen-mode .dashboard-shell::before {
  content: "";
  position: fixed;
  inset: -18vh -12vw;
  pointer-events: none;
  z-index: 3;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 92px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.026) 0 1px, transparent 1px 92px),
    radial-gradient(circle at 54% 56%, rgba(125,211,252,.12), transparent 18%),
    radial-gradient(circle at 74% 58%, rgba(168,85,247,.16), transparent 22%);
  transform: perspective(900px) rotateX(58deg) translateY(12vh) scale(1.25);
  transform-origin: 50% 58%;
  opacity: .48;
  mix-blend-mode: screen;
  filter: blur(.15px);
}

body.dashboard-fullscreen-mode .dashboard-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    linear-gradient(112deg, transparent 0 36%, rgba(255,255,255,.075) 43%, rgba(255,255,255,.19) 47%, rgba(255,255,255,.055) 51%, transparent 61%),
    radial-gradient(circle at 50% 52%, transparent 0 36%, rgba(2,6,23,.24) 82%);
  opacity: .72;
  mix-blend-mode: screen;
  animation: dashboardWorldSheen 9s ease-in-out infinite alternate;
}

@keyframes dashboardWorldSheen {
  0% { transform: translateX(-3vw); opacity: .42; }
  42% { opacity: .76; }
  100% { transform: translateX(4vw); opacity: .58; }
}

body.dashboard-fullscreen-mode #dashboard-3d-container canvas {
  filter:
    drop-shadow(0 86px 230px rgba(0, 0, 0, .72))
    drop-shadow(0 0 46px rgba(125, 211, 252, .16))
    saturate(1.46)
    contrast(1.16)
    brightness(1.06) !important;
}

body.dashboard-fullscreen-mode #dashboard-3d-container::before {
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.13), transparent 16%),
    radial-gradient(circle at 64% 46%, rgba(168,85,247,.24), transparent 24%),
    radial-gradient(circle at 33% 52%, rgba(14,165,233,.22), transparent 25%),
    linear-gradient(90deg, rgba(2,6,23,.18), transparent 42%, rgba(2,6,23,.20)) !important;
  opacity: .86 !important;
}

body.dashboard-fullscreen-mode .dashboard-hero {
  filter: drop-shadow(0 18px 42px rgba(0,0,0,.36));
}

body.dashboard-fullscreen-mode .dashboard-kicker {
  box-shadow:
    0 0 28px rgba(125,211,252,.22),
    inset 0 1px 0 rgba(255,255,255,.36) !important;
}

body.dashboard-fullscreen-mode .dashboard-carousel-control {
  box-shadow:
    0 28px 76px rgba(0,0,0,.42),
    0 0 32px rgba(125,211,252,.16),
    inset 0 1px 0 rgba(255,255,255,.50) !important;
}

body.dashboard-fullscreen-mode .dashboard-dot.active {
  background: linear-gradient(90deg, #ffffff, #99f6e4, #a78bfa) !important;
  box-shadow:
    0 0 28px rgba(153,246,228,.48),
    0 0 54px rgba(167,139,250,.24) !important;
}


/* === DASHBOARD PHASE C-LITE TUNE 2 — carousel visibility + stable arrows ===
   Fixes: centre card was too large, side panels were not visible enough, and arrow hover was jittering. */
body.dashboard-fullscreen-mode .dashboard-carousel-control {
  transform: translateY(-50%) !important;
  transition:
    background .22s ease,
    border-color .22s ease,
    box-shadow .22s ease,
    opacity .22s ease !important;
  will-change: auto !important;
}

body.dashboard-fullscreen-mode .dashboard-carousel-control:hover,
body.dashboard-fullscreen-mode .dashboard-carousel-control:focus-visible {
  transform: translateY(-50%) !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,.32), rgba(255,255,255,.13)) !important;
  border-color: rgba(255,255,255,.48) !important;
  box-shadow:
    0 26px 68px rgba(0,0,0,.38),
    0 0 30px rgba(125,211,252,.18),
    inset 0 1px 0 rgba(255,255,255,.52) !important;
}

body.dashboard-fullscreen-mode .dashboard-carousel-control span,
body.dashboard-fullscreen-mode .dashboard-carousel-control svg,
body.dashboard-fullscreen-mode .dashboard-carousel-control * {
  pointer-events: none !important;
}

body.dashboard-fullscreen-mode #dashboard-3d-container canvas {
  filter:
    drop-shadow(0 72px 190px rgba(0, 0, 0, .68))
    drop-shadow(0 0 40px rgba(125, 211, 252, .13))
    saturate(1.38)
    contrast(1.12)
    brightness(1.04) !important;
}


/* === DASHBOARD OPTION B AGGRESSIVE CINEMATIC DEPTH TUNE — 2026-05-03 ===
   Purpose: stronger carousel identity, visible side screens, and more cinematic depth
   while avoiding the oversized single-card feel. */
body.dashboard-fullscreen-mode #dashboard-3d-container canvas {
  filter:
    drop-shadow(0 86px 230px rgba(0, 0, 0, .72))
    drop-shadow(0 0 54px rgba(125, 211, 252, .16))
    saturate(1.46)
    contrast(1.15)
    brightness(1.04) !important;
}

body.dashboard-fullscreen-mode #dashboard-3d-container::before {
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.115), transparent 16%),
    radial-gradient(circle at 67% 48%, rgba(168,85,247,.26), transparent 25%),
    radial-gradient(circle at 28% 52%, rgba(14,165,233,.24), transparent 26%),
    linear-gradient(90deg, rgba(2,6,23,.20), transparent 43%, rgba(2,6,23,.22)) !important;
  opacity: .92 !important;
}

body.dashboard-fullscreen-mode .dashboard-shell::before {
  opacity: .56 !important;
  transform: perspective(980px) rotateX(61deg) translateY(13vh) scale(1.34) !important;
}

body.dashboard-fullscreen-mode .dashboard-shell::after {
  opacity: .64 !important;
}

body.dashboard-fullscreen-mode .dashboard-carousel-control.left {
  left: 42px !important;
}

body.dashboard-fullscreen-mode .dashboard-carousel-control.right {
  right: 42px !important;
}

body.dashboard-fullscreen-mode .dashboard-stage-label {
  bottom: 39px !important;
}

body.dashboard-fullscreen-mode .dashboard-dots {
  bottom: 17px !important;
}

/* === DASHBOARD PHASE D2 — BLUE REFLECTIVE GLASS PASS ===
   Purpose: reduce milky haze, sharpen the active WebGL screen, and push the
   dashboard toward blue/cyan reflective glass rather than frosted flat cards. */
body.dashboard-fullscreen-mode #dashboard-3d-container canvas {
  filter:
    drop-shadow(0 76px 210px rgba(0, 0, 0, .70))
    drop-shadow(0 0 48px rgba(34, 211, 238, .22))
    saturate(1.62)
    contrast(1.22)
    brightness(1.10) !important;
}

body.dashboard-fullscreen-mode #dashboard-3d-container::before {
  background:
    radial-gradient(circle at 47% 50%, rgba(165,243,252,.16), transparent 15%),
    radial-gradient(circle at 58% 46%, rgba(34,211,238,.20), transparent 23%),
    radial-gradient(circle at 76% 50%, rgba(99,102,241,.20), transparent 25%),
    linear-gradient(90deg, rgba(2,6,23,.25), transparent 43%, rgba(2,6,23,.28)) !important;
  opacity: .74 !important;
  mix-blend-mode: screen !important;
}

body.dashboard-fullscreen-mode #dashboard-3d-container::after {
  background:
    linear-gradient(108deg, transparent 0 38%, rgba(255,255,255,.035) 43%, rgba(165,243,252,.115) 47%, rgba(255,255,255,.030) 52%, transparent 62%),
    linear-gradient(180deg, rgba(2,6,23,.10), transparent 36%, rgba(2,6,23,.20)) !important;
  opacity: .52 !important;
}

body.dashboard-fullscreen-mode .dashboard-shell::before {
  opacity: .38 !important;
  filter: blur(.10px) saturate(1.35) !important;
}

body.dashboard-fullscreen-mode .dashboard-shell::after {
  opacity: .44 !important;
  background:
    linear-gradient(112deg, transparent 0 37%, rgba(255,255,255,.045) 43%, rgba(125,211,252,.135) 47%, rgba(255,255,255,.035) 52%, transparent 62%),
    radial-gradient(circle at 50% 52%, transparent 0 39%, rgba(2,6,23,.22) 84%) !important;
}

body.dashboard-fullscreen-mode .dashboard-hero h1 {
  text-shadow:
    0 18px 46px rgba(0,0,0,.52),
    0 0 24px rgba(125,211,252,.12) !important;
}

body.dashboard-fullscreen-mode .dashboard-kicker {
  background: rgba(125,211,252,.12) !important;
  border-color: rgba(165,243,252,.32) !important;
  box-shadow:
    0 0 28px rgba(34,211,238,.22),
    inset 0 1px 0 rgba(255,255,255,.42) !important;
}

body.dashboard-fullscreen-mode .dashboard-dot.active {
  background: linear-gradient(90deg, #ffffff, #67e8f9, #38bdf8) !important;
  box-shadow:
    0 0 30px rgba(103,232,249,.62),
    0 0 72px rgba(56,189,248,.32) !important;
}

/* === DASHBOARD PHASE D3 — CINEMATIC ANIMATED CARD CONTENT + BLUE STUDIO LIGHTING ===
   Purpose: move the dashboard from frosted UI into a darker, sleeker cinematic
   WebGL product look with stronger cyan lighting, sharper glass and less milk haze. */
body.dashboard-fullscreen-mode .dashboard-shell {
  background:
    radial-gradient(circle at 16% 16%, rgba(14, 165, 233, 0.48), transparent 25%),
    radial-gradient(circle at 82% 14%, rgba(99, 102, 241, 0.36), transparent 30%),
    radial-gradient(circle at 54% 72%, rgba(20, 184, 166, 0.18), transparent 24%),
    linear-gradient(135deg, #010612 0%, #031224 31%, #071832 58%, #24133a 100%) !important;
}

body.dashboard-fullscreen-mode #dashboard-3d-container canvas {
  filter:
    drop-shadow(0 84px 240px rgba(0, 0, 0, .76))
    drop-shadow(0 0 62px rgba(34, 211, 238, .26))
    drop-shadow(0 0 24px rgba(165, 243, 252, .12))
    saturate(1.78)
    contrast(1.28)
    brightness(1.08) !important;
}

body.dashboard-fullscreen-mode #dashboard-3d-container::before {
  background:
    radial-gradient(circle at 50% 50%, rgba(165,243,252,.13), transparent 15%),
    radial-gradient(circle at 36% 47%, rgba(34,211,238,.20), transparent 23%),
    radial-gradient(circle at 72% 46%, rgba(99,102,241,.18), transparent 25%),
    linear-gradient(90deg, rgba(1,6,18,.34), transparent 42%, rgba(1,6,18,.38)) !important;
  opacity: .66 !important;
  mix-blend-mode: screen !important;
}

body.dashboard-fullscreen-mode #dashboard-3d-container::after {
  background:
    linear-gradient(108deg, transparent 0 39%, rgba(255,255,255,.025) 43%, rgba(165,243,252,.095) 47%, rgba(255,255,255,.025) 52%, transparent 63%),
    radial-gradient(circle at 50% 57%, transparent 0 32%, rgba(1,6,18,.30) 82%) !important;
  opacity: .46 !important;
}

body.dashboard-fullscreen-mode .dashboard-shell::before {
  opacity: .30 !important;
  filter: blur(.08px) saturate(1.55) !important;
}

body.dashboard-fullscreen-mode .dashboard-shell::after {
  opacity: .34 !important;
  animation-duration: 11s !important;
}

body.dashboard-fullscreen-mode .dashboard-hero h1 {
  color: rgba(248, 250, 252, .96) !important;
  text-shadow:
    0 18px 52px rgba(0,0,0,.62),
    0 0 28px rgba(34,211,238,.15) !important;
}

body.dashboard-fullscreen-mode .dashboard-hero p {
  color: rgba(219, 234, 254, .76) !important;
}

body.dashboard-fullscreen-mode .dashboard-kicker {
  color: rgba(224, 242, 254, .94) !important;
  background: rgba(8, 47, 73, .42) !important;
  border-color: rgba(165, 243, 252, .28) !important;
  box-shadow:
    0 0 34px rgba(34,211,238,.18),
    inset 0 1px 0 rgba(255,255,255,.32) !important;
}

body.dashboard-fullscreen-mode .dashboard-carousel-control {
  background:
    linear-gradient(135deg, rgba(165,243,252,.22), rgba(255,255,255,.07)) !important;
  border-color: rgba(165,243,252,.34) !important;
  box-shadow:
    0 28px 80px rgba(0,0,0,.46),
    0 0 34px rgba(34,211,238,.20),
    inset 0 1px 0 rgba(255,255,255,.44) !important;
}

body.dashboard-fullscreen-mode .dashboard-carousel-control:hover,
body.dashboard-fullscreen-mode .dashboard-carousel-control:focus-visible {
  background:
    linear-gradient(135deg, rgba(165,243,252,.34), rgba(255,255,255,.10)) !important;
  border-color: rgba(224,242,254,.58) !important;
  box-shadow:
    0 32px 88px rgba(0,0,0,.50),
    0 0 44px rgba(34,211,238,.30),
    inset 0 1px 0 rgba(255,255,255,.56) !important;
}

body.dashboard-fullscreen-mode .dashboard-dot {
  background: rgba(148, 163, 184, .58) !important;
}

body.dashboard-fullscreen-mode .dashboard-dot.active {
  background: linear-gradient(90deg, #f8fafc, #67e8f9, #60a5fa) !important;
  box-shadow:
    0 0 32px rgba(103,232,249,.58),
    0 0 72px rgba(96,165,250,.32) !important;
}

/* === DASHBOARD PHASE D5 — PRODUCT-GRADE GLASS DISCIPLINE ===
   Consolidates the D4/D5 visual pass into the real current files.  The goal is
   darker metallic blue, sharper physical glass, controlled reflection and less
   milky cyan flood. */
body.dashboard-fullscreen-mode .dashboard-shell {
  background:
    radial-gradient(circle at 14% 18%, rgba(8, 145, 178, 0.38), transparent 24%),
    radial-gradient(circle at 84% 16%, rgba(49, 46, 129, 0.46), transparent 31%),
    radial-gradient(circle at 52% 82%, rgba(15, 23, 42, 0.78), transparent 35%),
    linear-gradient(135deg, #01040d 0%, #02101f 34%, #07162c 62%, #160d2a 100%) !important;
}

body.dashboard-fullscreen-mode #dashboard-3d-container canvas {
  filter:
    drop-shadow(0 88px 250px rgba(0, 0, 0, .82))
    drop-shadow(0 0 36px rgba(34, 211, 238, .18))
    drop-shadow(0 0 12px rgba(226, 232, 240, .08))
    saturate(1.48)
    contrast(1.36)
    brightness(.98) !important;
}

body.dashboard-fullscreen-mode #dashboard-3d-container::before {
  background:
    radial-gradient(circle at 46% 48%, rgba(103,232,249,.08), transparent 17%),
    linear-gradient(90deg, rgba(1,6,18,.52), transparent 42%, rgba(1,6,18,.55)) !important;
  opacity: .42 !important;
  mix-blend-mode: screen !important;
}

body.dashboard-fullscreen-mode #dashboard-3d-container::after {
  background:
    linear-gradient(108deg, transparent 0 42%, rgba(255,255,255,.018) 46%, rgba(125,211,252,.055) 49%, rgba(255,255,255,.012) 53%, transparent 64%),
    radial-gradient(circle at 50% 58%, transparent 0 27%, rgba(0,0,0,.42) 84%) !important;
  opacity: .58 !important;
}

body.dashboard-fullscreen-mode .dashboard-shell::before {
  opacity: .22 !important;
  filter: blur(.06px) saturate(1.28) !important;
}

body.dashboard-fullscreen-mode .dashboard-shell::after {
  opacity: .28 !important;
  background:
    radial-gradient(circle at center, transparent 0 36%, rgba(0,0,0,.42) 100%),
    linear-gradient(112deg, transparent 0 39%, rgba(255,255,255,.024) 45%, rgba(125,211,252,.070) 49%, rgba(255,255,255,.016) 54%, transparent 66%) !important;
  animation-duration: 13s !important;
}

body.dashboard-fullscreen-mode .dashboard-hero h1 {
  color: rgba(248, 250, 252, .98) !important;
  text-shadow:
    0 20px 58px rgba(0,0,0,.76),
    0 0 18px rgba(125,211,252,.12) !important;
}

body.dashboard-fullscreen-mode .dashboard-hero p {
  color: rgba(219, 234, 254, .70) !important;
}

body.dashboard-fullscreen-mode .dashboard-kicker {
  background: rgba(2, 8, 23, .42) !important;
  border-color: rgba(165, 243, 252, .32) !important;
  box-shadow:
    0 0 20px rgba(34,211,238,.16),
    inset 0 1px 0 rgba(255,255,255,.28) !important;
}

body.dashboard-fullscreen-mode .dashboard-carousel-control {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, .72), rgba(14, 116, 144, .28)) !important;
  border-color: rgba(165,243,252,.42) !important;
  box-shadow:
    0 26px 86px rgba(0,0,0,.56),
    0 0 28px rgba(34,211,238,.18),
    inset 0 1px 0 rgba(255,255,255,.36) !important;
}

body.dashboard-fullscreen-mode .dashboard-carousel-control:hover,
body.dashboard-fullscreen-mode .dashboard-carousel-control:focus-visible {
  background:
    linear-gradient(135deg, rgba(8, 47, 73, .82), rgba(14, 165, 233, .25)) !important;
  border-color: rgba(224,242,254,.66) !important;
  box-shadow:
    0 30px 92px rgba(0,0,0,.62),
    0 0 34px rgba(34,211,238,.26),
    inset 0 1px 0 rgba(255,255,255,.48) !important;
}

body.dashboard-fullscreen-mode .dashboard-dot {
  background: rgba(100, 116, 139, .62) !important;
}

body.dashboard-fullscreen-mode .dashboard-dot.active {
  background: linear-gradient(90deg, #f8fafc, #a5f3fc, #38bdf8) !important;
  box-shadow:
    0 0 24px rgba(103,232,249,.52),
    0 0 54px rgba(56,189,248,.24) !important;
}

/* Auth account menu — integrated with existing top-icon login tile */
.top-icon.login {
  cursor: pointer;
  user-select: none;
}

.top-icon.login span {
  position: relative;
  z-index: 1;
}

.auth-user-menu {
  position: fixed;
  z-index: 10000;
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  padding: 12px;
  min-width: 180px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
}

.auth-user-menu.hidden {
  display: none;
}

.auth-user-name {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  padding: 4px 4px 10px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 10px;
}

.auth-logout-button {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 9px 10px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.auth-logout-button:hover {
  filter: brightness(.96);
}

.dashboard-auth-avatar {
  position: fixed;
  top: 12px;
  right: 16px;
  z-index: 10000;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #10b981;
  color: #ffffff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(16, 185, 129, .22);
}

.dashboard-auth-avatar.hidden {
  display: none !important;
}

body.dashboard-fullscreen-mode .dashboard-auth-avatar:not(.hidden) {
  display: flex;
}

body.dashboard-fullscreen-mode #authUserMenu {
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
}
/* Auth/user tile must not inherit hover movement from the top icon group */
#authUserAvatar,
#authUserAvatar:hover,
.top-icon.login,
.top-icon.login:hover {
  transform: none !important;
  animation: none !important;
}

#authUserAvatar {
  will-change: auto !important;
}
/* Detailed Analysis progress shell */
.detailed-progress-card.hidden {
  display: none;
}

.detailed-progress-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.detailed-progress-step {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.72);
  color: #475569;
  min-height: 52px;
}

.detailed-progress-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  font-weight: 700;
  flex: 0 0 22px;
}

.detailed-progress-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detailed-progress-copy strong {
  font-size: 12px;
  line-height: 1.18;
}

.detailed-progress-copy em {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.8;
}

.detailed-progress-step.pending {
  opacity: 0.82;
}

.detailed-progress-step.running {
  border-color: rgba(59, 130, 246, 0.48);
  color: #1d4ed8;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.08), 0 10px 22px rgba(59, 130, 246, 0.12);
  animation: detailedProgressPulse 1.4s ease-in-out infinite;
}

.detailed-progress-step.running span {
  background: rgba(59, 130, 246, 0.18);
}

.detailed-progress-step.generated {
  border-color: rgba(245, 158, 11, 0.45);
  color: #b45309;
  background: rgba(255, 251, 235, 0.88);
}

.detailed-progress-step.generated span {
  background: rgba(245, 158, 11, 0.18);
}

.detailed-progress-step.complete {
  border-color: rgba(16, 185, 129, 0.45);
  color: #047857;
  background: rgba(236, 253, 245, 0.88);
}

.detailed-progress-step.complete span {
  background: rgba(16, 185, 129, 0.18);
}

@keyframes detailedProgressPulse {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.08), 0 10px 22px rgba(59, 130, 246, 0.12);
  }
  50% {
    transform: translateY(-1px);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.14), 0 14px 28px rgba(59, 130, 246, 0.18);
  }
}

.detailed-next-card {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  background: rgba(236, 253, 245, 0.72);
}

.detailed-next-card p {
  margin: 6px 0 0;
  color: #334155;
}

.detailed-next-meta {
  margin-top: 8px;
  font-size: 12px;
  color: #047857;
  font-weight: 700;
}
@media (max-width:1400px){
  body{
    font-size:0.95rem;
  }

  .section-body{
    padding:16px;
  }
}

@media (max-width:1200px){
  body{
    font-size:0.9rem;
  }

  .section-body{
    padding:12px;
  }
}
@media (max-width:1200px){
  .race-meta-row1{
    grid-template-columns:1fr;
  }
}
/* === RESPONSIVE CORRECTION V2 — PRESERVE DESKTOP, ONLY COMPRESS WHEN NEEDED ===
   Date: 2026-05-04
   Purpose:
   - Undo the over-compression caused by the earlier global 1400px container and auto-fit grid.
   - Restore full desktop/larger-monitor layouts.
   - Apply responsive stacking only at laptop/tablet widths.
*/

/* 1) Restore normal wide desktop builder width.
   The earlier max-width:1400px was too aggressive and crushed chips on large screens. */
body:not(.dashboard-fullscreen-mode) .main{
  max-width:1920px !important;
  width:100% !important;
  margin:0 auto !important;
  padding:26px 32px 70px !important;
}

/* 2) Restore authored section grids on desktop.
   Do not auto-fit every layout-grid globally because several sections rely on deliberate fixed compositions. */
.layout-grid{
  display:grid !important;
  gap:16px !important;
  margin-bottom:16px !important;
}

/* 3) Prevent chips from being crushed before wrapping.
   This keeps text readable and lets rows wrap naturally rather than squeezing labels into each other. */
.chip{
  min-width:max-content;
  white-space:nowrap !important;
}

.equal-buttons-2 .chip,
.equal-buttons-3 .chip,
.equal-buttons-4 .chip,
.equal-buttons-5 .chip,
.equal-buttons-6 .chip{
  min-width:0;
}

/* 4) Important desktop exceptions where chips need room to breathe. */
.season-presets{
  grid-template-columns:repeat(4, minmax(150px, 1fr)) !important;
}

.quick-presets{
  grid-template-columns:repeat(4, minmax(120px, 1fr)) !important;
}

.race-meta-ages{
  grid-template-columns:repeat(4, minmax(230px, 1fr)) !important;
}

.stat-mini-grid.five{
  grid-template-columns:repeat(5, minmax(120px, 1fr)) !important;
}

/* 5) Restore Horse Profile room on desktop.
   The rolling-runs / rolling-wins controls were being squeezed too hard. */
#horse-profile-stats .horse-profile-composed-grid.hp-grid-new{
  grid-template-columns:minmax(0, 1.55fr) minmax(420px, 0.95fr) !important;
}

#horse-profile-stats .horse-rolling-run-strip .stat-mini-grid.five,
#horse-profile-stats .horse-rolling-win-strip .stat-mini-grid.five{
  grid-template-columns:repeat(5, minmax(125px, 1fr)) !important;
}

#horse-profile-stats .horse-experience-strip .stat-mini-grid.four{
  grid-template-columns:repeat(4, minmax(130px, 1fr)) !important;
}

#horse-profile-stats .horse-prize-strip .stat-mini-grid.one{
  grid-template-columns:repeat(2, minmax(170px, 1fr)) !important;
}

/* 6) Make actual responsiveness happen later, not on full desktop. */
@media (max-width:1500px){
  body:not(.dashboard-fullscreen-mode) .main{
    max-width:none !important;
    padding:22px 22px 60px !important;
  }

  .season-presets{
    grid-template-columns:repeat(2, minmax(180px, 1fr)) !important;
  }

  .quick-presets{
    grid-template-columns:repeat(2, minmax(140px, 1fr)) !important;
  }

  .race-meta-ages{
    grid-template-columns:repeat(2, minmax(240px, 1fr)) !important;
  }

  #horse-profile-stats .horse-profile-composed-grid.hp-grid-new{
    grid-template-columns:1fr !important;
  }

  #horse-profile-stats .horse-experience-strip,
  #horse-profile-stats .horse-prize-strip,
  #horse-profile-stats .horse-rolling-run-strip,
  #horse-profile-stats .horse-rolling-win-strip,
  #horse-profile-stats .condition-matrix-strip,
  #horse-profile-stats .horse-condition-strike-strip{
    grid-column:1 !important;
    grid-row:auto !important;
  }
}

@media (max-width:1250px){
  body:not(.dashboard-fullscreen-mode) .app{
    grid-template-columns:250px minmax(0, 1fr) !important;
  }

  body:not(.dashboard-fullscreen-mode) .main{
    padding:18px 18px 52px !important;
  }

  .time-strip,
  .season-grid{
    grid-template-columns:1fr !important;
  }

  .time-block + .time-block{
    border-left:0 !important;
    padding-left:0 !important;
    border-top:1px solid var(--border) !important;
    padding-top:16px !important;
  }

  #market .section-body{
    grid-template-columns:1fr 1fr !important;
  }

  #market .section-body > .grid.lower-three{
    grid-template-columns:1fr !important;
  }

  #market #sp_position_card,
  #market #sp_position_card + .card,
  #market .section-body > .grid.lower-two:nth-of-type(3) > .card:nth-child(1),
  #market .section-body > .grid.lower-two:nth-of-type(3) > .card:nth-child(2){
    grid-column:auto !important;
    grid-row:auto !important;
  }

  #market .section-body > .grid.lower-two{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:16px !important;
  }

  #horse-profile-stats .horse-rolling-run-strip .stat-mini-grid.five,
  #horse-profile-stats .horse-rolling-win-strip .stat-mini-grid.five{
    grid-template-columns:repeat(3, minmax(125px, 1fr)) !important;
  }
}

@media (max-width:1000px){
  body:not(.dashboard-fullscreen-mode) .app{
    grid-template-columns:1fr !important;
  }

  body:not(.dashboard-fullscreen-mode) .sidebar{
    position:relative !important;
    height:auto !important;
  }

  body:not(.dashboard-fullscreen-mode) .main{
    padding:16px 14px 48px !important;
  }

  .layout-grid,
  .grid.two,
  .grid.three,
  .grid.four,
  .grid.lower-two,
  .grid.lower-three,
  .race-meta-row1,
  .race-meta-presets,
  .race-meta-class-row,
  .course-row1,
  .course-row2,
  .horse-row1,
  .horse-row2,
  .horse-row3,
  .horse-row4,
  .horse-row5{
    grid-template-columns:1fr !important;
  }

  .season-presets,
  .quick-presets,
  .race-meta-ages,
  .stat-mini-grid.five,
  .stat-mini-grid.four,
  .stat-mini-grid.three,
  #horse-profile-stats .horse-rolling-run-strip .stat-mini-grid.five,
  #horse-profile-stats .horse-rolling-win-strip .stat-mini-grid.five,
  #horse-profile-stats .horse-experience-strip .stat-mini-grid.four,
  #horse-profile-stats .horse-prize-strip .stat-mini-grid.one{
    grid-template-columns:1fr !important;
  }
}

/* === Detailed Analysis breakdown tables === */
.detailed-breakdowns-card.hidden { display: none; }
.detailed-breakdown-area { display: flex; flex-direction: column; gap: 18px; }
.detail-breakdown-card {
  border: 1px solid rgba(216,225,238,.95);
  border-radius: 16px;
  background: linear-gradient(180deg,#ffffff,#f8fbff);
  padding: 18px;
  box-shadow: 0 4px 14px rgba(15,23,42,.055);
}
.detail-breakdown-card.loading { opacity: .78; }
.detail-breakdown-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}
.detail-breakdown-header h3 {
  margin: 0 0 5px;
  font-size: 18px;
  letter-spacing: -.02em;
}
.detail-breakdown-header p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
}
.detail-breakdown-meta {
  flex: 0 0 auto;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1e3a8a;
  border-radius: 999px;
  padding: 7px 11px;
  font-weight: 900;
  font-size: 12px;
}
.detail-breakdown-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  background: #fff;
}
.detail-breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 980px;
}
.detail-breakdown-table th,
.detail-breakdown-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #edf2f7;
  text-align: right;
  white-space: nowrap;
}
.detail-breakdown-table th:first-child,
.detail-breakdown-table td:first-child { text-align: left; }
.detail-breakdown-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .055em;
  font-weight: 950;
  cursor: pointer;
  user-select: none;
  position: sticky;
  top: 0;
  z-index: 1;
}
.detail-breakdown-table th.sortable:hover { background: #eef2ff; color: #312e81; }
.detail-breakdown-table th.active.asc::after { content: " ▲"; }
.detail-breakdown-table th.active.desc::after { content: " ▼"; }
.detail-breakdown-table tbody tr:hover { background: #f8fbff; }
.detail-breakdown-table .positive { color: #15803d; font-weight: 900; }
.detail-breakdown-table .negative { color: #b91c1c; font-weight: 900; }
.detail-breakdown-table .warning { color: #b45309; font-weight: 900; }
.detail-breakdown-table tfoot td,
.quick-year-table-wrap tfoot td {
  background: linear-gradient(180deg,#eff6ff,#e0f2fe);
  color: #0f172a;
  font-weight: 950;
  border-top: 2px solid #bfdbfe;
  border-bottom: none;
}
.detail-breakdown-table tfoot td:first-child,
.quick-year-table-wrap tfoot td:first-child {
  text-transform: uppercase;
  letter-spacing: .06em;
}
.detail-breakdown-table tfoot td.positive,
.quick-year-table-wrap tfoot td.positive { color: #15803d; }
.detail-breakdown-table tfoot td.negative,
.quick-year-table-wrap tfoot td.negative { color: #b91c1c; }

/* === Report choice controls: quick / detailed / trainer-jockey extended === */
.report-control-card .report-option-list{
  display:grid;
  gap:12px;
}
.report-control-card .report-option{
  display:grid;
  grid-template-columns:minmax(210px,260px) minmax(0,1fr);
  align-items:center;
  gap:14px;
  padding:12px;
  border:1px solid rgba(226,232,240,.9);
  border-radius:16px;
  background:linear-gradient(135deg,#ffffff,#f8fafc);
}
.report-control-card .report-option p{
  margin:0;
  color:#475569;
  font-size:13px;
  line-height:1.45;
}
.report-control-card .report-option p strong{
  color:#0f172a;
}
.actions-report-options{
  margin-bottom:14px;
}
.secondary-actions{
  padding-top:12px;
  border-top:1px solid rgba(226,232,240,.9);
}
.btn.extended{
  background:linear-gradient(135deg,#312e81,#7c3aed);
  color:#fff;
}
@media(max-width:900px){
  .report-control-card .report-option{
    grid-template-columns:1fr;
  }
}

/* === Report modal containment fixes === */
.quick-report-card{
  max-width:100%;
  overflow:hidden;
  box-sizing:border-box;
}
.quick-year-table-wrap,
.detail-breakdown-table-wrap{
  max-width:100%;
  box-sizing:border-box;
}
.quick-year-table-wrap table{
  width:max-content;
  min-width:980px;
  border-collapse:collapse;
}
.quick-report-window-actions .mini-button.hidden{
  display:none;
}

/* === Detailed report overlay scroll + summary visibility hotfix === */
.quick-report-window {
  max-height: calc(100vh - 56px);
}
.quick-report-window-body {
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  display: block !important;
}
.quick-report-window-body > * + * {
  margin-top: 14px;
}
.quick-report-card {
  overflow: visible !important;
}
#overlaySummary .quick-report-shell,
#overlaySummary .market-result-card {
  visibility: visible !important;
}
.quick-year-table-wrap {
  overflow-x: auto !important;
  overflow-y: auto !important;
}

/* === 2026-05-04 report cache/reset + year table polish === */
.quick-report-window-actions{
  padding: 6px;
  border: 1px solid rgba(148,163,184,.28);
  border-radius: 18px;
  background: rgba(255,255,255,.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75), 0 10px 26px rgba(15,23,42,.08);
}
.quick-report-window-actions .mini-button{
  border-radius: 14px !important;
  background: linear-gradient(180deg,#ffffff,#f8fafc) !important;
  border: 1px solid rgba(148,163,184,.65) !important;
  color:#26364f !important;
  box-shadow: 0 8px 20px rgba(15,23,42,.08), inset 0 1px 0 rgba(255,255,255,.95) !important;
  letter-spacing:-.01em;
}
.quick-report-window-actions .mini-button:hover{
  transform: translateY(-1px) !important;
  border-color:#a78bfa !important;
  box-shadow:0 12px 28px rgba(99,102,241,.16), inset 0 1px 0 rgba(255,255,255,.98) !important;
}
.quick-report-window-actions .mini-button.danger{
  background: linear-gradient(180deg,#fff7f7,#fff1f2) !important;
  border-color:#fecdd3 !important;
  color:#be123c !important;
}
.quick-report-card.year-card{
  min-height: 0 !important;
}
.quick-year-table-wrap{
  overflow-x:auto !important;
  overflow-y:visible !important;
  max-height:none !important;
  border-radius:16px !important;
  background:#fff;
}
.quick-year-table-wrap table{
  width:100% !important;
  min-width:980px !important;
  border-collapse:collapse !important;
}
.quick-year-table-wrap thead,
.quick-year-table-wrap tr:first-child{
  position:static !important;
}
.quick-year-table-wrap th{
  background:#f8fafc;
  color:#475569;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.055em;
  font-weight:950;
  padding:10px 12px;
  border-bottom:1px solid #e2e8f0;
  text-align:right;
  white-space:nowrap;
}
.quick-year-table-wrap th:first-child,
.quick-year-table-wrap td:first-child{
  text-align:left;
}
.quick-year-table-wrap td{
  padding:10px 12px;
  border-bottom:1px solid #e5edf6;
  text-align:right;
  white-space:nowrap;
}
.quick-year-table-wrap tbody tr:hover{ background:#f8fbff; }
.detailed-cache-notice,
#detailedCacheNotice{
  margin-bottom:14px;
}

/* === 2026-05-05 Patch 03A: unavailable-chip continuity pass === */
.control-disabled .chip,
.control-disabled .chip * {
  pointer-events: auto;
}

.control-disabled .chip[aria-disabled="true"],
.control-disabled .chip.disabled,
.chip[aria-disabled="true"],
.chip.disabled {
  cursor: not-allowed !important;
}

.control-disabled .chip[aria-disabled="true"],
.control-disabled .chip.disabled,
.chip[aria-disabled="true"],
.chip.disabled {
  opacity: .72;
  filter: saturate(.92);
}

.control-disabled .chip[aria-disabled="true"]:not(.selected),
.control-disabled .chip.disabled:not(.selected),
.chip[aria-disabled="true"]:not(.selected),
.chip.disabled:not(.selected) {
  background: #f1f5f9 !important;
  color: #94a3b8 !important;
  border-color: #e2e8f0 !important;
  box-shadow: none !important;
}

.control-disabled .chip.selected[aria-disabled="true"],
.control-disabled .chip.selected.disabled,
.chip.selected[aria-disabled="true"],
.chip.selected.disabled {
  color: var(--selected-text) !important;
  border-color: color-mix(in srgb, var(--accent) 42%, #ffffff) !important;
  background: var(--selected-grad) !important;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 18%, transparent), 0 0 0 1px rgba(255,255,255,.45) inset !important;
}

.control-disabled .chip[aria-disabled="true"]:hover,
.control-disabled .chip.disabled:hover,
.chip[aria-disabled="true"]:hover,
.chip.disabled:hover {
  transform: translateY(-3px) scale(1.035);
}

#group_grade_listed_card .chip[aria-disabled="true"],
.condition-flags-card .chip[aria-disabled="true"],
#race_direction_card .chip[aria-disabled="true"],
#going_group .chip[aria-disabled="true"],
#aw_surface_group .chip[aria-disabled="true"],
#race_age_flat_card .chip[aria-disabled="true"],
#race_age_flat_extra_card .chip[aria-disabled="true"],
#race_age_nh_card .chip[aria-disabled="true"],
#race_age_nh_extra_card .chip[aria-disabled="true"] {
  cursor: not-allowed !important;
}

/* === Patch 07.3: summary card refinement with real yearly trend === */
.summary-hero-inline {
  display: grid;
  grid-template-columns: minmax(240px, 420px) 1fr;
  align-items: center;
  gap: 18px;
  padding: 12px 16px;
}

.summary-hero-inline .summary-hero-copy strong {
  margin-bottom: 0;
  font-size: clamp(17px, 1.5vw, 20px);
}

.summary-hero-inline p {
  font-size: 12px;
  line-height: 1.42;
  max-width: none;
}

.summary-performance-card {
  border-color: rgba(37, 99, 235, 0.28);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.22), transparent 34%),
    radial-gradient(circle at 90% 20%, rgba(96, 165, 250, 0.10), transparent 28%),
    linear-gradient(180deg, #081a38 0%, #07152d 100%);
  box-shadow: 0 18px 36px rgba(2, 8, 23, 0.22);
  color: #e2e8f0;
  gap: 12px;
}

.summary-performance-card::before {
  display: none;
}

.summary-performance-card .market-kicker,
.summary-performance-card .summary-market-tile-label,
.summary-performance-card .summary-pl-kicker,
.summary-performance-card .summary-trend-meta,
.summary-performance-card .summary-trend-axis,
.summary-performance-card .summary-inline-info {
  color: rgba(226, 232, 240, 0.78);
}

.summary-primary-toolbar-hero {
  align-items: center;
  gap: 12px;
}

.summary-primary-title-wrap h3 {
  margin: 4px 0 0;
  font-size: clamp(20px, 1.7vw, 28px);
  color: #f8fafc;
}

.summary-performance-card .summary-market-toggle {
  background: rgba(15, 23, 42, 0.52);
  border-color: rgba(148, 163, 184, 0.22);
  backdrop-filter: blur(10px);
}

.summary-performance-card .summary-market-toggle-button {
  color: rgba(226, 232, 240, 0.78);
  padding: 8px 14px;
  font-size: 11px;
}

.summary-performance-card .summary-market-toggle-button.active {
  background: linear-gradient(180deg, #ffffff, #eff6ff);
  color: #0f172a;
}

.summary-performance-layout {
  display: grid;
  grid-template-columns: minmax(260px, 368px) 1fr;
  gap: 14px;
  align-items: stretch;
}

.summary-pl-hero {
  border-radius: 20px;
  border: 1px solid rgba(248, 113, 113, 0.18);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.50), rgba(8, 16, 32, 0.74));
  padding: 14px;
  display: grid;
  gap: 8px;
  min-height: 100%;
}

.summary-pl-hero.positive {
  border-color: rgba(74, 222, 128, 0.18);
}

.summary-pl-kicker-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.summary-pl-kicker {
  text-transform: uppercase;
  letter-spacing: .10em;
  font-size: 11px;
  font-weight: 900;
}

.summary-pl-value {
  font-size: clamp(31px, 3.6vw, 52px);
  line-height: 0.95;
  font-weight: 950;
  letter-spacing: -0.04em;
  color: #f8fafc;
}

.summary-pl-hero.positive .summary-pl-value {
  color: #4ade80;
}

.summary-pl-hero.negative .summary-pl-value {
  color: #f87171;
}

.summary-pl-state-pill {
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(15, 23, 42, 0.38);
}

.summary-pl-state-pill.positive {
  color: #86efac;
  border-color: rgba(74, 222, 128, 0.24);
  background: rgba(20, 83, 45, 0.18);
}

.summary-pl-state-pill.negative {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.24);
  background: rgba(127, 29, 29, 0.18);
}

.summary-trend-card {
  margin-top: 4px;
  display: grid;
  gap: 8px;
}

.summary-trend-meta,
.summary-trend-axis {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  font-weight: 800;
}

.summary-trend-svg {
  width: 100%;
  height: 142px;
  display: block;
  color: #f87171;
}

.summary-trend-card.positive .summary-trend-svg {
  color: #4ade80;
}

.summary-trend-zero {
  stroke: rgba(226, 232, 240, 0.16);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.summary-trend-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 10px rgba(248, 113, 113, 0.18));
}

.summary-trend-card.positive .summary-trend-line {
  filter: drop-shadow(0 0 10px rgba(74, 222, 128, 0.18));
}

.summary-trend-area {
  opacity: 0.95;
}

.summary-trend-point {
  fill: #f8fafc;
  stroke: currentColor;
  stroke-width: 3;
  transition: transform 0.16s ease, r 0.16s ease;
}

.summary-trend-point-group:hover .summary-trend-point,
.summary-trend-point-group:focus-within .summary-trend-point {
  transform: scale(1.08);
}

.summary-trend-empty {
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.24);
  padding: 18px 16px;
  color: rgba(226, 232, 240, 0.72);
  font-size: 12px;
}

.summary-performance-metrics {
  display: grid;
  gap: 10px;
}

.summary-performance-top-grid,
.summary-performance-bottom-grid {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-performance-card .summary-market-tile {
  min-height: 0;
  border-radius: 16px;
  padding: 12px 14px;
  border-color: rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(12, 27, 55, 0.76), rgba(10, 21, 43, 0.88));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.summary-market-tile-label-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.summary-performance-card .summary-market-tile-label {
  font-size: 10px;
  letter-spacing: .09em;
}

.summary-performance-card .summary-market-tile-value {
  font-size: clamp(18px, 1.9vw, 34px);
  line-height: 1.02;
  color: #f8fafc;
  word-break: break-word;
}

.summary-performance-card .summary-market-tile.negative .summary-market-tile-value {
  color: #f87171;
}

.summary-performance-card .summary-market-tile.positive .summary-market-tile-value {
  color: #4ade80;
}

.summary-performance-card .summary-market-tile.warning .summary-market-tile-value {
  color: #f59e0b;
}

.summary-inline-info {
  position:absolute;
  top:9px;
  right:9px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  z-index:6;
  user-select:none;
  cursor:help;
}
.summary-inline-info-trigger {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  border-radius:999px;
  border:1px solid rgba(186,230,253,.95);
  background:#e0f2fe;
  color:#0369a1;
  font-size:10px;
  font-weight:900;
  line-height:1;
  box-shadow:none;
}
.summary-inline-popover {
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  display:block;
  width:min(320px,74vw);
  padding:12px 14px;
  border-radius:14px;
  background:#0f172a;
  color:#f8fafc;
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 18px 42px rgba(15,23,42,.28);
  font-size:12px;
  line-height:1.45;
  font-weight:750;
  text-transform:none;
  letter-spacing:0;
  white-space:normal;
  text-align:left;
  opacity:0;
  visibility:hidden;
  transform:translateY(4px);
  pointer-events:none;
  transition:opacity .12s ease, visibility .12s ease, transform .12s ease;
}
.summary-inline-info:hover .summary-inline-popover,
.summary-inline-info:focus-within .summary-inline-popover {
  opacity:1;
  visibility:visible;
  transform:translateY(0);
}
.summary-inline-info:hover .summary-inline-info-trigger,
.summary-inline-info:focus-within .summary-inline-info-trigger {
  background:#bae6fd;
  color:#0c4a6e;
}

@media (max-width: 1180px) {
  .summary-hero-inline {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .summary-performance-layout {
    grid-template-columns: 1fr;
  }

  .summary-primary-toolbar-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .summary-performance-card .summary-market-toggle {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 860px) {
  .summary-performance-top-grid,
  .summary-performance-bottom-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-pl-value {
    font-size: clamp(30px, 8vw, 44px);
  }

  .summary-trend-svg {
    height: 132px;
  }
}

/* === Patch 07.4: summary iconography, cumulative chart, centred tiles === */
.summary-primary-heading-line{
  display:flex;
  align-items:center;
  gap:12px;
}
.summary-primary-title-icon{
  width:34px;
  height:34px;
  border-radius:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg,rgba(59,130,246,.24),rgba(37,99,235,.10));
  border:1px solid rgba(96,165,250,.26);
  color:#93c5fd;
  box-shadow:0 10px 24px rgba(30,64,175,.14), inset 0 1px 0 rgba(255,255,255,.06);
  flex:0 0 auto;
}
.summary-primary-title-icon svg,
.summary-metric-icon-shell svg{
  width:20px;
  height:20px;
  display:block;
}
.summary-performance-card .summary-market-toggle-button{
  text-transform:none;
}
.summary-performance-card .summary-market-tile{
  position:relative;
  min-height:118px;
  padding:12px 11px 11px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
}
.summary-market-tile-core{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
}
.summary-metric-icon-shell{
  width:44px;
  height:44px;
  border-radius:16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#bfdbfe;
  background:linear-gradient(180deg,rgba(30,64,175,.24),rgba(37,99,235,.10));
  border:1px solid rgba(96,165,250,.22);
  box-shadow:0 10px 20px rgba(15,23,42,.16), inset 0 1px 0 rgba(255,255,255,.05);
}
.summary-metric-icon-shell.qualifiers{
  color:#c4b5fd;
  background:linear-gradient(180deg,rgba(124,58,237,.22),rgba(91,33,182,.10));
  border-color:rgba(196,181,253,.20);
}
.summary-metric-icon-shell.races{
  color:#7dd3fc;
  background:linear-gradient(180deg,rgba(8,145,178,.22),rgba(14,116,144,.10));
  border-color:rgba(125,211,252,.22);
}
.summary-metric-icon-shell.wins{
  color:#fbbf24;
  background:linear-gradient(180deg,rgba(217,119,6,.22),rgba(146,64,14,.10));
  border-color:rgba(251,191,36,.22);
}
.summary-metric-icon-shell.price{
  color:#fda4af;
  background:linear-gradient(180deg,rgba(225,29,72,.20),rgba(159,18,57,.10));
  border-color:rgba(251,113,133,.20);
}
.summary-metric-icon-shell.positive{
  color:#86efac;
  background:linear-gradient(180deg,rgba(21,128,61,.22),rgba(20,83,45,.10));
  border-color:rgba(74,222,128,.22);
}
.summary-metric-icon-shell.negative{
  color:#fca5a5;
  background:linear-gradient(180deg,rgba(220,38,38,.22),rgba(127,29,29,.10));
  border-color:rgba(248,113,113,.22);
}
.summary-metric-icon-shell.warning{
  color:#fcd34d;
  background:linear-gradient(180deg,rgba(217,119,6,.22),rgba(146,64,14,.10));
  border-color:rgba(251,191,36,.22);
}
.summary-performance-card .summary-market-tile-value{
  margin:0;
  text-align:center;
  font-size:clamp(18px,1.65vw,27px);
  line-height:1.02;
}
.summary-performance-card .summary-market-tile-label{
  width:100%;
  margin-top:0;
  text-align:center;
  font-size:9px;
  line-height:1.2;
  letter-spacing:.11em;
}
.summary-performance-card .summary-inline-info{
  margin:0;
}
.summary-performance-card .summary-inline-popover{
  top:calc(100% + 10px);
  right:0;
}
.summary-market-tile.metric-strike_rate{
  overflow:hidden;
}
.summary-strike-orb{
  --ring-color: rgba(248,113,113,.96);
  width:78px;
  height:78px;
  border-radius:50%;
  padding:6px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:conic-gradient(var(--ring-color) calc(var(--summary-progress, 0) * 1%), rgba(148,163,184,.18) 0);
  box-shadow:0 0 0 1px rgba(148,163,184,.16), 0 10px 24px rgba(2,8,23,.18);
}
.summary-strike-orb.positive{ --ring-color: rgba(74,222,128,.98); }
.summary-strike-orb.negative{ --ring-color: rgba(248,113,113,.98); }
.summary-strike-orb-inner{
  width:100%;
  height:100%;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg,rgba(4,15,31,.96),rgba(8,24,48,.90));
  border:1px solid rgba(148,163,184,.14);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
  padding:8px;
  text-align:center;
}
.summary-strike-orb-value{
  display:block;
  color:#f8fafc;
  font-weight:900;
  font-size:14px;
  line-height:1.05;
}
.summary-trend-meta,
.summary-trend-axis{
  align-items:center;
}
.summary-trend-svg{
  color:#f87171;
}
.summary-trend-card.positive .summary-trend-svg{
  color:#4ade80;
}
.summary-trend-line{
  stroke-width:3.6;
  filter:drop-shadow(0 0 12px rgba(248,113,113,.38)) drop-shadow(0 0 22px rgba(248,113,113,.12));
}
.summary-trend-card.positive .summary-trend-line{
  filter:drop-shadow(0 0 12px rgba(74,222,128,.34)) drop-shadow(0 0 22px rgba(74,222,128,.12));
}
.summary-trend-point-glow{
  fill:currentColor;
  opacity:.18;
}
.summary-trend-point{
  fill:#ffffff;
  stroke:currentColor;
  stroke-width:2.8;
  filter:drop-shadow(0 0 8px rgba(255,255,255,.16));
}
.summary-trend-point-group:hover .summary-trend-point,
.summary-trend-point-group:focus-within .summary-trend-point{
  transform:scale(1.08);
}
@media (max-width: 1180px){
  .summary-primary-heading-line{
    width:100%;
  }
}
@media (max-width: 860px){
  .summary-performance-card .summary-market-tile{
    min-height:118px;
  }
  .summary-metric-icon-shell,
  .summary-primary-title-icon{
    width:42px;
    height:42px;
    border-radius:14px;
  }
  .summary-strike-orb{
    width:76px;
    height:76px;
  }
  .summary-performance-card .summary-market-tile-value{
    font-size:clamp(17px,4.7vw,24px);
  }
}


/* === Patch 07.6: summary icon polish + stable tooltip hover === */
.summary-primary-title-icon svg,
.summary-metric-icon-shell svg{
  width:24px;
  height:24px;
}
.summary-metric-icon-shell{
  width:46px;
  height:46px;
}
.summary-metric-icon-shell.qualifiers,
.summary-metric-icon-shell.races,
.summary-metric-icon-shell.wins,
.summary-metric-icon-shell.price-tag,
.summary-metric-icon-shell.price-star,
.summary-metric-icon-shell.positive,
.summary-metric-icon-shell.negative,
.summary-metric-icon-shell.warning{
  color:inherit;
}
.summary-metric-icon-shell.price-tag,
.summary-metric-icon-shell.price-star{
  color:#fda4af;
  background:linear-gradient(180deg,rgba(225,29,72,.20),rgba(159,18,57,.10));
  border-color:rgba(251,113,133,.20);
}
.summary-market-tile.price-tag .summary-metric-icon-shell,
.summary-market-tile.price-star .summary-metric-icon-shell,
.summary-market-tile.qualifiers .summary-metric-icon-shell,
.summary-market-tile.races .summary-metric-icon-shell,
.summary-market-tile.wins .summary-metric-icon-shell,
.summary-market-tile.positive .summary-metric-icon-shell,
.summary-market-tile.negative .summary-metric-icon-shell,
.summary-market-tile.warning .summary-metric-icon-shell{
  transform:none !important;
}
.summary-performance-card .summary-inline-info,
.summary-performance-card .summary-inline-popover,
.summary-performance-card .summary-market-tile,
.summary-performance-card .summary-market-tile-core,
.summary-performance-card .summary-metric-icon-shell,
.summary-performance-card .summary-metric-icon-shell svg{
  animation:none !important;
}
.summary-performance-card .summary-inline-info,
.summary-performance-card .summary-inline-info-trigger,
.summary-performance-card .summary-inline-popover,
.summary-performance-card .summary-market-tile,
.summary-performance-card .summary-market-tile-core{
  transform:none !important;
}
.summary-performance-card .summary-market-tile{
  overflow:visible;
}
.summary-performance-card .summary-market-tile-label{
  max-width:100%;
}
.summary-performance-card .summary-market-tile.qualifiers .summary-market-tile-value,
.summary-performance-card .summary-market-tile.races .summary-market-tile-value,
.summary-performance-card .summary-market-tile.wins .summary-market-tile-value{
  letter-spacing:-0.03em;
}

.summary-performance-card .summary-market-tile,
.summary-performance-card .summary-pl-hero{
  isolation:isolate;
}
.summary-performance-card .summary-inline-popover{
  z-index:20;
}

/* === 2026-05-06 Patch: Builder hub + Main Builder cleanup === */
.builder-context{margin-top:8px;display:block;}
.builder-context-label{margin:12px 8px 8px 20px;color:#93c5fd;text-transform:uppercase;letter-spacing:.11em;font-size:10px;font-weight:950;}
.current-builder-link{background:rgba(255,255,255,.08);}
.switch-builder-button{width:calc(100% - 24px);margin:8px 12px 10px;padding:9px 11px;border:1px solid rgba(147,197,253,.25);border-radius:12px;background:rgba(15,23,42,.55);color:#dbeafe;font-weight:950;cursor:pointer;}
.switch-builder-button:hover{background:rgba(59,130,246,.24);color:#fff;}
.report-nav.disabled{opacity:.45;filter:grayscale(.55);cursor:not-allowed;}
.report-nav.available{opacity:1;filter:none;}
.switch-builder-pill{border:1px solid #c7d2fe;background:linear-gradient(135deg,#eef2ff,#faf5ff);color:#1e3a8a;border-radius:999px;padding:12px 16px;font-weight:950;box-shadow:var(--shadow-soft);cursor:pointer;}
.selection-control.compact{min-height:48px;padding:8px 14px;}
.builder-hub-topbar{grid-template-columns:1fr auto;}
.builder-hub-hero{border:1px solid rgba(124,58,237,.22);background:linear-gradient(135deg,rgba(255,255,255,.9),rgba(239,246,255,.86));border-radius:28px;padding:30px 34px;margin-bottom:22px;box-shadow:var(--shadow-soft);}
.builder-hub-kicker{text-transform:uppercase;letter-spacing:.16em;font-size:12px;font-weight:950;color:#4f46e5;margin-bottom:10px;}
.builder-hub-hero h2{margin:0 0 8px;font-size:34px;line-height:1.05;letter-spacing:-.04em;color:#0f172a;}
.builder-hub-hero p{margin:0;color:#475569;font-weight:700;max-width:950px;line-height:1.55;}
.builder-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:26px;max-width:1260px;margin:0 auto;}
.builder-choice-card{position:relative;min-height:520px;border-radius:30px;padding:34px;border:1px solid rgba(148,163,184,.28);background:linear-gradient(180deg,#fff,#f8fafc);box-shadow:0 24px 70px rgba(15,23,42,.13);overflow:hidden;display:flex;flex-direction:column;}
.builder-choice-card:before{content:"";position:absolute;inset:0 0 auto 0;height:150px;background:linear-gradient(135deg,rgba(37,99,235,.14),rgba(124,58,237,.15));pointer-events:none;}
.builder-choice-card>*{position:relative;z-index:1;}
.pro-choice-card:before{background:linear-gradient(135deg,rgba(20,184,166,.14),rgba(124,58,237,.18));}
.choice-badge{width:max-content;padding:8px 12px;border-radius:999px;background:#eef2ff;color:#1e3a8a;font-size:12px;font-weight:950;text-transform:uppercase;letter-spacing:.08em;margin-bottom:22px;}
.builder-choice-card h3{margin:0;font-size:34px;letter-spacing:-.045em;color:#0f172a;}
.choice-subtitle{margin:5px 0 0;color:#0f766e;font-weight:950;font-size:16px;}
.choice-lead{font-size:16px;line-height:1.55;color:#334155;font-weight:750;margin:18px 0;}
.builder-choice-card ul{margin:0 0 26px 0;padding:0;list-style:none;display:grid;gap:11px;color:#475569;font-weight:700;line-height:1.45;}
.builder-choice-card li{position:relative;padding-left:24px;}
.builder-choice-card li:before{content:"✓";position:absolute;left:0;top:0;color:#16a34a;font-weight:950;}
.builder-choice-button{margin-top:auto;min-height:48px;font-size:14px;}
.builder-choice-card.locked{opacity:.86;}
.builder-choice-card.locked .builder-choice-button{cursor:not-allowed;opacity:.75;}
.builder-actions-section{--selected-grad:linear-gradient(135deg,#22c55e,#14b8a6);--section-border:#10b981;}
.builder-action-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(320px,.8fr);gap:20px;align-items:stretch;}
.system-management-card{display:flex;flex-direction:column;justify-content:center;}
.management-copy{color:#475569;font-weight:700;line-height:1.55;margin:4px 0 18px;}
.system-criteria-grid{display:grid;grid-template-columns:1.1fr 1fr 1fr;gap:20px;align-items:stretch;}
.refined-selection-tile{min-height:235px;}
.selection-mode-buttons{display:flex;gap:10px;margin-top:22px;flex-wrap:wrap;}
.mode-button{border:1px solid rgba(255,255,255,.32);background:rgba(255,255,255,.12);color:#fff;border-radius:999px;padding:10px 14px;font-weight:950;cursor:pointer;}
.mode-button.selected{background:#fff;color:#312e81;}
.ranking-card,.rank-range-card{display:flex;flex-direction:column;justify-content:center;}
.card-copy{margin:0 0 14px;color:#64748b;font-size:13px;font-weight:750;line-height:1.45;}
.card-copy.center{text-align:center;}
.criteria-warning{margin-top:14px;border:1px solid #fed7aa;background:#fff7ed;color:#9a3412;border-radius:12px;padding:10px 12px;font-size:12px;font-weight:800;line-height:1.4;}
.rank-helper{margin-top:12px;text-align:center;color:#475569;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:10px;font-size:12px;font-weight:850;}
.system-section.ranked-active .rank-helper{background:#ecfdf5;color:#065f46;border-color:#bbf7d0;}
.system-section:not(.ranked-active) .ranking-methods,.system-section:not(.ranked-active) .rank-range-card .inline-inputs{opacity:.55;}
.builder-sticky-actions{position:fixed;left:calc(285px + 32px);right:32px;bottom:14px;z-index:120;display:flex;align-items:center;justify-content:center;gap:10px;padding:10px 14px;border:1px solid rgba(148,163,184,.28);background:rgba(255,255,255,.86);backdrop-filter:blur(16px);border-radius:18px;box-shadow:0 20px 45px rgba(15,23,42,.18);}
body.dashboard-fullscreen-mode .builder-sticky-actions{display:none;}
.page:not(.active) .builder-sticky-actions{display:none;}
.sticky-divider{width:1px;height:28px;background:#cbd5e1;margin:0 4px;}
.toast-message{position:fixed;right:32px;bottom:92px;z-index:200;background:#0f172a;color:#fff;border-radius:14px;padding:12px 16px;font-weight:900;box-shadow:0 18px 40px rgba(15,23,42,.28);opacity:0;transform:translateY(10px);transition:.18s;}
.toast-message.visible{opacity:1;transform:translateY(0);}
@media(max-width:1450px){.builder-choice-grid,.builder-action-grid,.system-criteria-grid{grid-template-columns:1fr}.builder-sticky-actions{left:24px;right:24px;flex-wrap:wrap}.builder-choice-card{min-height:unset}}
@media(max-width:900px){.builder-sticky-actions{left:12px;right:12px;bottom:8px}.builder-sticky-actions .btn{padding:8px 10px;font-size:12px}.builder-hub-hero h2{font-size:26px}}


/* === 2026-05-06 Patch 2 refinements: hub polish + ranked controls + sticky bar === */
.builder-hub-hero{
  position:relative;
  overflow:hidden;
  background:
    radial-gradient(circle at 8% 20%,rgba(124,58,237,.14),transparent 28%),
    radial-gradient(circle at 92% 12%,rgba(20,184,166,.13),transparent 30%),
    linear-gradient(135deg,rgba(255,255,255,.95),rgba(239,246,255,.88));
  border-color:rgba(99,102,241,.24);
}
.builder-hub-hero:after{
  content:"";
  position:absolute;
  right:-80px;
  bottom:-110px;
  width:260px;
  height:260px;
  border-radius:999px;
  background:linear-gradient(135deg,rgba(37,99,235,.16),rgba(124,58,237,.16));
}
.builder-hub-hero > *{position:relative;z-index:1;}
.builder-choice-grid{max-width:1180px;gap:30px;align-items:stretch;}
.builder-choice-card{
  min-height:575px;
  padding:36px;
  border-radius:32px;
  background:
    radial-gradient(circle at 82% -10%,rgba(124,58,237,.12),transparent 34%),
    linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);
}
.builder-choice-card:before{height:132px;opacity:.82;}
.builder-choice-card h3{font-size:32px;line-height:1.02;margin-top:4px;}
.choice-badge{margin-bottom:20px;}
.choice-subtitle{
  display:inline-flex;
  width:max-content;
  max-width:100%;
  margin:10px 0 2px;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(240,253,250,.92);
  border:1px solid rgba(20,184,166,.22);
  color:#0f766e;
  font-size:14px;
  line-height:1.1;
}
.choice-lead{margin:22px 0 18px;font-size:15.5px;}
.builder-choice-card ul{gap:12px;font-size:14px;}
.builder-choice-card li{padding-left:26px;}
.builder-choice-card li:before{top:1px;}
.builder-choice-button{min-height:50px;border-radius:12px;}
.selection-mode-buttons{position:relative;}
.ranked-mode-prompt{
  position:absolute;
  left:24px;
  right:24px;
  bottom:18px;
  z-index:5;
  opacity:0;
  pointer-events:none;
  transform:translateY(8px);
  transition:opacity .18s ease,transform .18s ease;
  border:1px solid rgba(191,219,254,.7);
  background:linear-gradient(135deg,#eff6ff,#f5f3ff);
  color:#1e3a8a;
  border-radius:14px;
  padding:11px 13px;
  font-size:12px;
  line-height:1.35;
  font-weight:900;
  box-shadow:0 14px 34px rgba(30,64,175,.18);
}
.ranked-mode-prompt.visible{opacity:1;transform:translateY(0);}
.system-section:not(.ranked-active) .ranking-methods .chip,
.system-section:not(.ranked-active) .rank-range-card input{
  cursor:not-allowed;
}
.system-section:not(.ranked-active) .ranking-methods .chip{
  position:relative;
  color:#94a3b8;
  background:#f8fafc;
  border-color:#e2e8f0;
}
.system-section:not(.ranked-active) .ranking-methods .chip:after{
  content:"⊘";
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-left:7px;
  width:15px;
  height:15px;
  border-radius:999px;
  color:#ef4444;
  font-size:11px;
  font-weight:950;
}
.system-section:not(.ranked-active) .rank-range-card input{
  color:#64748b;
  background:#f1f5f9;
  border-color:#cbd5e1;
}
.system-section.ranked-active .rank-range-card input{
  background:#ecfdf5;
  color:#064e3b;
}
.builder-sticky-actions{
  left:calc(285px + 54px);
  right:54px;
  bottom:18px;
  gap:14px;
  padding:11px 20px;
  border-radius:20px;
  border:1px solid rgba(99,102,241,.25);
  background:linear-gradient(135deg,rgba(15,23,42,.94),rgba(30,41,59,.9));
  box-shadow:0 22px 50px rgba(15,23,42,.34);
}
.builder-sticky-actions .btn{
  min-width:132px;
  padding:8px 18px;
  min-height:36px;
  border-radius:10px;
  line-height:1.1;
  white-space:nowrap;
}
.builder-sticky-actions .btn.extended{min-width:140px;}
.builder-sticky-actions .btn.save,
.builder-sticky-actions .btn.load,
.builder-sticky-actions .btn.clear{
  background:rgba(255,255,255,.96);
  color:#0f172a;
  border:1px solid rgba(226,232,240,.9);
}
.builder-sticky-actions .btn:disabled{opacity:.58;}
.sticky-divider{background:rgba(226,232,240,.44);height:30px;margin:0 2px;}
body{padding-bottom:88px;}
.toast-message{right:auto;left:50%;bottom:92px;transform:translate(-50%,10px);}
.toast-message.visible{transform:translate(-50%,0);}
@media(max-width:1450px){
  .builder-sticky-actions{left:24px;right:24px;gap:10px;flex-wrap:wrap;}
  .builder-sticky-actions .btn{min-width:120px;}
}


/* === 2026-05-06 Patch 3: ranking logic UI polish + sticky bar layering === */
.section-header{position:relative;}
.ranked-mode-prompt{
  position:absolute;
  left:50%;
  top:50%;
  right:auto;
  bottom:auto;
  z-index:12;
  max-width:min(720px,54vw);
  opacity:0;
  pointer-events:none;
  transform:translate(-50%,-46%);
  transition:opacity .22s ease,transform .22s ease;
  border:1px solid rgba(191,219,254,.82);
  background:linear-gradient(135deg,rgba(239,246,255,.98),rgba(245,243,255,.98));
  color:#1e3a8a;
  border-radius:999px;
  padding:10px 18px;
  font-size:14px;
  line-height:1.25;
  font-weight:950;
  text-align:center;
  box-shadow:0 18px 42px rgba(30,64,175,.24);
}
.ranked-mode-prompt.visible{opacity:1;transform:translate(-50%,-50%);}
.builder-sticky-actions{
  left:calc(285px + 48px) !important;
  right:48px !important;
  bottom:16px !important;
  z-index:10000 !important;
  gap:18px !important;
  padding:9px 28px !important;
  border-radius:18px !important;
  border:1px solid rgba(148,163,184,.38) !important;
  background:linear-gradient(135deg,#182235,#263348) !important;
  box-shadow:0 26px 60px rgba(15,23,42,.45) !important;
  overflow:hidden;
}
.builder-sticky-actions .btn{
  min-width:156px !important;
  min-height:34px !important;
  padding:7px 18px !important;
  border-radius:10px !important;
  line-height:1.05 !important;
  font-size:13px !important;
}
.builder-sticky-actions .btn.extended{min-width:168px !important;}
.builder-sticky-actions .btn.save,
.builder-sticky-actions .btn.load,
.builder-sticky-actions .btn.clear{
  background:rgba(248,250,252,.98) !important;
  color:#0f172a !important;
  border:1px solid rgba(226,232,240,.95) !important;
}
.builder-sticky-actions .sticky-divider{
  background:rgba(226,232,240,.42) !important;
  height:28px !important;
  margin:0 0 !important;
}
.info-dot,.section-help-dot{z-index:auto;}
body{padding-bottom:104px !important;}
@media(max-width:1450px){
  .builder-sticky-actions{left:24px !important;right:24px !important;gap:12px !important;flex-wrap:wrap;}
  .builder-sticky-actions .btn{min-width:132px !important;}
  .ranked-mode-prompt{max-width:66vw;font-size:13px;}
}

/* === 2026-05-07 Patch 4: reset/table-rank fix polish === */
/* Keep the sticky action bar above normal builder content, while preventing help dots/tooltips from bleeding through it. */
.help-icon,
.info-dot.section-help-dot{
  z-index:30 !important;
}
.help-icon::after,
.info-dot.section-help-dot::after{
  z-index:9000 !important;
}
.builder-sticky-actions{
  z-index:30000 !important;
  gap:24px !important;
  padding:9px 34px !important;
  background:linear-gradient(135deg,#151f31,#243044) !important;
  box-shadow:0 30px 70px rgba(15,23,42,.52), 0 0 0 1px rgba(255,255,255,.05) inset !important;
  isolation:isolate;
}
.builder-sticky-actions::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  background:linear-gradient(135deg,#151f31,#243044);
}
.builder-sticky-actions .btn{
  min-width:174px !important;
  min-height:32px !important;
  padding:7px 22px !important;
}
.builder-sticky-actions .btn.extended{
  min-width:196px !important;
}
.builder-sticky-actions .btn.save,
.builder-sticky-actions .btn.load,
.builder-sticky-actions .btn.clear{
  min-width:154px !important;
}
.builder-sticky-actions .sticky-divider{
  margin:0 4px !important;
}
.summary-performance-card .summary-market-tile-label{
  font-size:10.5px !important;
  letter-spacing:.105em !important;
  line-height:1.24 !important;
}
@media(max-width:1450px){
  .builder-sticky-actions{gap:14px !important;padding:9px 20px !important;}
  .builder-sticky-actions .btn{min-width:142px !important;}
  .builder-sticky-actions .btn.extended{min-width:168px !important;}
  .builder-sticky-actions .btn.save,
  .builder-sticky-actions .btn.load,
  .builder-sticky-actions .btn.clear{min-width:132px !important;}
}

/* Patch 5: detailed table grouping styles */
.detail-breakdown-card.ranking-breakdown-card {
  background: linear-gradient(180deg, rgba(236,253,245,0.96), rgba(255,255,255,0.98));
  border-color: rgba(52, 211, 153, 0.45);
}
.detail-breakdown-card.standard-breakdown-card {
  background: linear-gradient(180deg, rgba(248,250,252,0.98), rgba(255,255,255,0.98));
}
.detail-breakdown-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}
.detail-breakdown-badge.ranking-badge {
  color: #047857;
  background: rgba(209, 250, 229, 0.95);
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.detail-breakdown-table th {
  white-space: nowrap;
}

/* Patch 6: Race changes / ratings layout refinements */
#changes .section-body > .grid.lower-three:first-of-type > .card:nth-child(1),
#changes .section-body > .grid.lower-three:first-of-type > .card:nth-child(2) {
  min-height: 185px !important;
  height: 185px !important;
}
#changes .class-movement-card .equal-buttons-3,
#changes .section-body > .grid.lower-three:first-of-type > .card:nth-child(2) .equal-buttons-3,
#ratings .official-rating-movement-card .equal-buttons-3 {
  margin-bottom: 18px;
}
#ratings .section-body > .grid.lower-two {
  grid-template-columns: 1.15fr .85fr !important;
  align-items: stretch;
}
#ratings .current-rating-strip,
#ratings .official-rating-movement-card {
  margin-top: 14px;
}
#ratings .official-rating-movement-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
#ratings .official-rating-movement-card .stat-mini {
  border-left: 0;
}

/* Patch 6: previous prize UI now has three controls */
#horse-profile-stats .horse-prize-strip .prize-level-grid,
.horse-prize-strip .prize-level-grid {
  grid-template-columns: repeat(3, minmax(0,1fr)) !important;
  gap: 10px !important;
}
#horse-profile-stats .horse-prize-strip .prize-level-grid .stat-mini + .stat-mini {
  border-top: 0 !important;
  border-left: 1px solid rgba(203,213,225,.85) !important;
  padding-top: 6px !important;
}

/* Patch 6: detailed report table colour grouping */
.detail-breakdown-card.standard-breakdown-card:nth-of-type(odd) {
  background: linear-gradient(180deg, rgba(255,247,237,.82), rgba(255,255,255,.98)) !important;
  border-color: rgba(251,146,60,.28) !important;
}
.detail-breakdown-card.standard-breakdown-card:nth-of-type(even) {
  background: linear-gradient(180deg, rgba(245,243,255,.82), rgba(255,255,255,.98)) !important;
  border-color: rgba(167,139,250,.28) !important;
}
.detail-breakdown-card.ranking-breakdown-card {
  background: linear-gradient(180deg, rgba(236,253,245,0.98), rgba(255,255,255,0.99)) !important;
  border-color: rgba(52, 211, 153, 0.55) !important;
}
.detail-breakdown-card.year-breakdown-card {
  background: linear-gradient(180deg, rgba(255,251,235,0.98), rgba(255,255,255,0.99)) !important;
  border-color: rgba(251,191,36,.40) !important;
}
@media (max-width: 1200px) {
  #horse-profile-stats .horse-prize-strip .prize-level-grid,
  .horse-prize-strip .prize-level-grid {
    grid-template-columns: 1fr !important;
  }
}

/* === 2026-05-16 lookup dropdown repair: course, bred, and name search result layout === */
#course_options.course-options,
#bred_options.course-options {
  display: grid !important;
  grid-template-columns: 1fr !important;
  align-items: stretch !important;
  gap: 2px !important;
  overflow-x: hidden !important;
}

#course_options .course-option,
#bred_options .course-option,
.lookup-option-row {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) auto !important;
  align-items: center !important;
  column-gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
}

#course_options .course-option span,
#bred_options .course-option span,
.lookup-option-row span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.lookup-option-row em {
  font-style: normal !important;
  color: #64748b !important;
  font-size: 11px !important;
  text-align: right !important;
  min-width: 56px !important;
}

#trainer-jockey .name-filter-card .name-results,
.name-results {
  display: block !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

#trainer-jockey .name-filter-card .name-result-row,
.name-result-row {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) 64px !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
}

#trainer-jockey .name-filter-card .name-result-row span,
.name-result-row span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#trainer-jockey .name-filter-card .name-result-row em,
.name-result-row em {
  text-align: right !important;
  font-style: normal !important;
  color: #64748b !important;
  font-size: 11px !important;
}


/* === 2026-05-16 dropdown refinement: left align, compact rows, reset buttons === */
#course_options.course-options,
#bred_options.course-options {
  gap: 0 !important;
}

#course_options .course-option,
#bred_options .course-option,
.lookup-option-row {
  grid-template-columns: 24px minmax(0, 1fr) auto !important;
  min-height: 20px !important;
  padding: 2px 7px !important;
  line-height: 1.05 !important;
  text-align: left !important;
  justify-items: start !important;
}

#course_options .course-option input,
#bred_options .course-option input,
.lookup-option-row input,
.name-result-row input {
  justify-self: start !important;
}

#course_options .course-option span,
#bred_options .course-option span,
.lookup-option-row span,
.name-result-row span {
  text-align: left !important;
  justify-self: start !important;
}

#bred_options .lookup-option-row em,
.lookup-option-row em,
.name-result-row em {
  justify-self: end !important;
}

.dropdown-reset-button,
#course_reset_button,
#bred_reset_button {
  display: block !important;
  width: auto !important;
  min-width: 76px !important;
  margin: 7px auto 0 auto !important;
  padding: 5px 12px !important;
  border: 1px solid #bfdbfe !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: #1d4ed8 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  cursor: pointer !important;
}

.dropdown-reset-button:hover,
#course_reset_button:hover,
#bred_reset_button:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 14px rgba(15,23,42,.12) !important;
}

#trainer-jockey .name-filter-card .name-result-row,
.name-result-row {
  min-height: 22px !important;
  padding: 3px 8px !important;
  text-align: left !important;
  justify-items: start !important;
}

/* === 2026-05-16 dropdown final density/reset visibility pass === */
#course_picker.open .course-picker-panel,
body.course-picker-is-open #course_picker_panel,
#bred_picker.open .course-picker-panel,
body.bred-picker-is-open #bred_picker .course-picker-panel {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  padding: 8px 10px 9px !important;
  max-height: 340px !important;
  overflow: hidden !important;
}

#course_options.course-options,
#bred_options.course-options,
#course_picker.open #course_options,
#bred_picker.open #bred_options,
body.course-picker-is-open #course_options,
body.bred-picker-is-open #bred_options {
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-auto-rows: min-content !important;
  align-content: start !important;
  align-items: start !important;
  gap: 0 !important;
  max-height: 225px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

#course_options .course-option,
#bred_options .course-option,
#course_picker.open #course_options .course-option,
#bred_picker.open #bred_options .course-option,
body.course-picker-is-open #course_options .course-option,
body.bred-picker-is-open #bred_options .course-option,
.lookup-option-row {
  min-height: 18px !important;
  height: auto !important;
  padding: 2px 6px !important;
  line-height: 1.0 !important;
  margin: 0 !important;
  border-radius: 8px !important;
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) auto !important;
  align-items: center !important;
  justify-items: start !important;
  column-gap: 7px !important;
}

#course_options .course-option input,
#bred_options .course-option input,
.lookup-option-row input,
.name-result-row input {
  width: 14px !important;
  height: 14px !important;
  margin: 0 !important;
}

#course_options .course-option span,
#bred_options .course-option span,
.lookup-option-row span {
  line-height: 1.0 !important;
  text-align: left !important;
  justify-self: start !important;
}

.dropdown-reset-button,
#course_reset_button,
#bred_reset_button {
  display: block !important;
  flex: 0 0 auto !important;
  min-width: 74px !important;
  margin: 2px auto 1px auto !important;
  padding: 4px 12px !important;
  line-height: 1.05 !important;
  position: relative !important;
  z-index: 2147483647 !important;
}

#trainer-jockey .name-filter-card .name-results,
.name-results {
  display: block !important;
  align-content: start !important;
  padding: 4px !important;
  max-height: 160px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

#trainer-jockey .name-filter-card .name-result-row,
.name-result-row {
  min-height: 18px !important;
  height: auto !important;
  padding: 2px 6px !important;
  line-height: 1.0 !important;
  border-radius: 8px !important;
  gap: 7px !important;
  grid-template-columns: 22px minmax(0, 1fr) 62px !important;
  align-items: center !important;
}

#trainer-jockey .name-filter-card .name-result-row span,
.name-result-row span,
#trainer-jockey .name-filter-card .name-result-row em,
.name-result-row em {
  line-height: 1.0 !important;
}


/* Patch: market-mode-aware detailed breakdown tables */
.detail-breakdown-header-meta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.detail-market-mode-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(15, 118, 110, 0.28);
  background: rgba(240, 253, 250, 0.95);
  color: #0f766e;
  border-radius: 999px;
  padding: 7px 11px;
  font-weight: 950;
  font-size: 11px;
  letter-spacing: .035em;
  text-transform: uppercase;
  white-space: nowrap;
}
.detail-breakdown-table {
  min-width: 760px;
}
@media (max-width: 1100px) {
  .detail-breakdown-header {
    flex-direction: column;
  }
  .detail-breakdown-header-meta {
    justify-content: flex-start;
  }
}


/* Patch: detailed table metric clarity */
.quick-overlay-market-mode-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 118, 110, 0.28);
  background: linear-gradient(180deg, rgba(240, 253, 250, 0.98), rgba(204, 251, 241, 0.92));
  color: #0f766e;
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 950;
  font-size: 12px;
  letter-spacing: .045em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 7px 18px rgba(15, 118, 110, 0.10);
}
.quick-overlay-market-mode-badge.hidden { display: none !important; }
.detail-column-help-label {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}
.detail-breakdown-table th .summary-inline-info {
  margin-left: 1px;
  vertical-align: middle;
}
.detail-breakdown-table th .summary-inline-info-trigger {
  width: 15px;
  height: 15px;
  min-width: 15px;
  font-size: 10px;
  line-height: 15px;
}
.detail-breakdown-table th .summary-inline-popover {
  text-transform: none;
  letter-spacing: normal;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  min-width: 260px;
  max-width: 340px;
  text-align: left;
}
.detail-breakdown-table {
  min-width: 820px;
}
@media (max-width: 1200px) {
  .quick-report-window-actions {
    flex-wrap: wrap;
  }
}


/* === Patch 4: report tooltip fixes, ranking descriptions, and market toggle clarity === */
.summary-inline-popover {
  width: min(380px, 78vw);
  padding: 15px 17px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fbff, #eef6ff);
  color: #10233f;
  border: 1px solid rgba(59, 130, 246, 0.24);
  box-shadow: 0 22px 58px rgba(15, 23, 42, 0.24);
  font-size: 13.5px;
  line-height: 1.55;
  font-weight: 760;
}
.summary-inline-popover::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 12px;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  background: #f8fbff;
  border-left: 1px solid rgba(59, 130, 246, 0.18);
  border-top: 1px solid rgba(59, 130, 246, 0.18);
}
.summary-inline-info-trigger,
.metric-help-trigger,
.info-dot.section-help-dot {
  border-color: rgba(125, 211, 252, 0.95);
  background: linear-gradient(180deg, #e0f2fe, #bae6fd);
  color: #075985;
}
.summary-inline-info:hover .summary-inline-info-trigger,
.summary-inline-info:focus-within .summary-inline-info-trigger,
.metric-help:hover .metric-help-trigger,
.metric-help:focus-within .metric-help-trigger {
  background: linear-gradient(180deg, #ccfbf1, #99f6e4);
  color: #115e59;
  border-color: rgba(20, 184, 166, 0.75);
}
.metric-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  cursor: help;
  overflow: visible;
  vertical-align: middle;
  z-index: 10;
}
.metric-help-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, 0.95);
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
}
.metric-help-popover {
  position: absolute;
  z-index: 2147483200;
  top: calc(100% + 10px);
  right: -6px;
  display: block;
  width: min(380px, 72vw);
  padding: 15px 17px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fbff, #eef6ff);
  color: #10233f;
  border: 1px solid rgba(59, 130, 246, 0.24);
  box-shadow: 0 22px 58px rgba(15, 23, 42, 0.24);
  font-size: 13.5px;
  line-height: 1.55;
  font-weight: 760;
  text-transform: none;
  letter-spacing: 0;
  white-space: normal;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity .12s ease, visibility .12s ease, transform .12s ease;
}
.metric-help-popover::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 8px;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  background: #f8fbff;
  border-left: 1px solid rgba(59, 130, 246, 0.18);
  border-top: 1px solid rgba(59, 130, 246, 0.18);
}
.metric-help:hover .metric-help-popover,
.metric-help:focus-within .metric-help-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.detail-breakdown-table th {
  text-align: center;
  vertical-align: middle;
}
.detail-breakdown-table th:first-child {
  text-align: left;
}
.detail-column-help-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  line-height: 1.1;
  white-space: nowrap;
}
.detail-column-help-text {
  display: inline-block;
}
.detail-breakdown-table th .summary-inline-info,
.detail-breakdown-table th .summary-inline-info-trigger,
.detail-breakdown-table th .summary-inline-popover {
  position: static;
}
.detail-breakdown-badge-row {
  display: flex;
  justify-content: center;
  margin: 5px 0 6px;
}
.detail-breakdown-badge.ranking-badge {
  margin-left: 0;
}
.summary-performance-card .summary-market-toggle {
  padding: 5px;
  border-color: rgba(34, 197, 94, 0.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 10px 26px rgba(15,23,42,.15);
}
.summary-performance-card .summary-market-toggle-button {
  transition: transform .14s ease, background .14s ease, color .14s ease, box-shadow .14s ease;
}
.summary-performance-card .summary-market-toggle-button.active {
  background: linear-gradient(135deg, #22c55e, #14b8a6);
  color: #052e2b;
  transform: scale(1.035);
  box-shadow: 0 10px 24px rgba(20, 184, 166, .24);
}
.quick-overlay-market-mode-badge {
  background: linear-gradient(135deg, #dcfce7, #ccfbf1);
  border-color: rgba(34, 197, 94, 0.32);
  color: #065f46;
  font-size: 12.5px;
  padding: 10px 16px;
  box-shadow: 0 10px 26px rgba(20, 184, 166, 0.14);
}


/* === Patch 5: report header layout, tooltip copy/alignment, ranking badge refinement === */
.quick-report-window-header {
  display: grid !important;
  grid-template-columns: minmax(230px, 1fr) auto minmax(420px, auto) !important;
  align-items: center !important;
  gap: 14px !important;
}
.quick-report-window-market-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 250px;
}
.quick-report-window-market-slot .quick-overlay-market-mode-badge {
  position: relative;
  isolation: isolate;
  border: 1px solid rgba(20, 184, 166, 0.34);
  background: linear-gradient(135deg, #ecfdf5 0%, #ccfbf1 100%);
  color: #064e3b;
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.14), inset 0 1px 0 rgba(255,255,255,.78);
  font-size: 13px;
  padding: 11px 20px;
}
.quick-report-window-actions {
  justify-self: end;
}
.summary-market-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.summary-market-toggle-wrap .summary-inline-info {
  flex: 0 0 auto;
}
.summary-market-toggle-wrap .summary-inline-popover {
  right: 0;
}
.detail-breakdown-heading-block {
  min-width: 0;
  flex: 1 1 auto;
}
.detail-breakdown-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.detail-breakdown-title-row h3 {
  margin: 0;
  flex: 0 1 auto;
}
.detail-breakdown-title-row .detail-breakdown-badge.ranking-badge {
  margin-left: 0;
  font-size: 12px;
  font-weight: 950;
  padding: 7px 13px;
  letter-spacing: .045em;
  line-height: 1.05;
  transform: translateY(0);
}
.detail-breakdown-badge-row {
  display: none !important;
}
.detail-breakdown-table th {
  text-align: center !important;
  vertical-align: middle !important;
}
.detail-breakdown-table th:first-child {
  text-align: left !important;
}
.detail-column-help-label {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  width: 100% !important;
  margin: 0 auto !important;
  text-align: center !important;
}
.detail-column-help-label .metric-help {
  transform: translateY(-1px);
}
.metric-help-popover,
.summary-inline-popover {
  font-size: 14px !important;
  line-height: 1.58 !important;
  font-weight: 760 !important;
}
.metric-help-popover {
  right: 50%;
  transform: translate(50%, 4px);
}
.metric-help:hover .metric-help-popover,
.metric-help:focus-within .metric-help-popover {
  transform: translate(50%, 0);
}
.metric-help-popover::before {
  right: calc(50% - 6px);
}
@media (max-width: 1250px) {
  .quick-report-window-header {
    grid-template-columns: 1fr !important;
  }
  .quick-report-window-market-slot,
  .quick-report-window-actions {
    justify-content: flex-start;
    justify-self: start;
  }
}

/* === Patch 6: final report tooltip/header alignment fixes === */
/* Keep summary helper icons inline when they are used beside controls rather than inside metric cards. */
.summary-market-toggle-wrap {
  position: relative;
  overflow: visible !important;
  padding-right: 2px;
}
.summary-market-toggle-wrap .summary-inline-info {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  width: 20px !important;
  height: 20px !important;
  margin-left: 2px !important;
  z-index: 2147483000 !important;
}
.summary-market-toggle-wrap .summary-inline-info-trigger {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  font-size: 11px !important;
}
.summary-market-toggle-wrap .summary-inline-popover {
  top: calc(100% + 12px) !important;
  right: 0 !important;
  z-index: 2147483200 !important;
  width: min(430px, 70vw) !important;
}

/* Report summary cards must not clip their own helper popovers. */
.market-result-card.summary-performance-card,
.summary-performance-card,
.summary-performance-layout,
.summary-performance-card .summary-market-tile,
.summary-performance-card .summary-pl-hero {
  overflow: visible !important;
}
.summary-performance-card .summary-inline-info {
  z-index: 2147483000 !important;
}
.summary-performance-card .summary-inline-popover {
  z-index: 2147483200 !important;
}

/* Ranking table header: title left, badge visually centred, timing right. */
.detail-breakdown-header-ranking {
  display: grid !important;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, auto) minmax(170px, 1fr) !important;
  grid-template-areas:
    "title badge meta"
    "description description description" !important;
  align-items: center !important;
  gap: 8px 14px !important;
  margin-bottom: 13px !important;
}
.detail-breakdown-header-ranking h3 {
  grid-area: title !important;
  margin: 0 !important;
  align-self: center !important;
}
.detail-breakdown-ranking-slot {
  grid-area: badge !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  min-width: 0 !important;
}
.detail-breakdown-header-ranking .detail-breakdown-header-meta {
  grid-area: meta !important;
  justify-content: flex-end !important;
}
.detail-breakdown-header-ranking .detail-breakdown-description {
  grid-area: description !important;
  margin: 0 !important;
  color: #64748b !important;
  font-size: 13px !important;
  line-height: 1.42 !important;
}
.detail-breakdown-ranking-slot .ranking-badge {
  margin: 0 !important;
  padding: 6px 14px !important;
  line-height: 1 !important;
  font-size: 11.5px !important;
  max-height: 26px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
}

/* Table metric headers: centre the text/icon pair and prevent clipped popovers. */
.detail-breakdown-table-wrap {
  overflow: visible !important;
}
.detail-breakdown-table th.detail-metric-th {
  text-align: center !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
}
.detail-breakdown-table th.detail-metric-th .detail-column-help-label {
  width: 100% !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  text-align: center !important;
  margin: 0 auto !important;
  transform: none !important;
}
.detail-breakdown-table th.detail-metric-th .detail-column-help-text {
  display: inline-flex !important;
  justify-content: center !important;
  text-align: center !important;
}
.detail-breakdown-table th.detail-metric-th .metric-help {
  position: relative !important;
  transform: none !important;
}
.detail-breakdown-table th.detail-metric-th .metric-help-popover {
  width: min(430px, 60vw) !important;
  max-width: calc(100vw - 80px) !important;
  white-space: normal !important;
}
.detail-breakdown-table th.detail-column-bsp_ae .metric-help-popover,
.detail-breakdown-table th.detail-column-sp_ae .metric-help-popover,
.detail-breakdown-table th.detail-column-bsp_expected_wins .metric-help-popover,
.detail-breakdown-table th.detail-column-sp_expected_wins .metric-help-popover {
  right: 0 !important;
  left: auto !important;
  transform: translateY(4px) !important;
}
.detail-breakdown-table th.detail-column-bsp_ae .metric-help:hover .metric-help-popover,
.detail-breakdown-table th.detail-column-sp_ae .metric-help:hover .metric-help-popover,
.detail-breakdown-table th.detail-column-bsp_expected_wins .metric-help:hover .metric-help-popover,
.detail-breakdown-table th.detail-column-sp_expected_wins .metric-help:hover .metric-help-popover,
.detail-breakdown-table th.detail-column-bsp_ae .metric-help:focus-within .metric-help-popover,
.detail-breakdown-table th.detail-column-sp_ae .metric-help:focus-within .metric-help-popover,
.detail-breakdown-table th.detail-column-bsp_expected_wins .metric-help:focus-within .metric-help-popover,
.detail-breakdown-table th.detail-column-sp_expected_wins .metric-help:focus-within .metric-help-popover {
  transform: translateY(0) !important;
}
.detail-breakdown-table th.detail-column-bsp_ae .metric-help-popover::before,
.detail-breakdown-table th.detail-column-sp_ae .metric-help-popover::before,
.detail-breakdown-table th.detail-column-bsp_expected_wins .metric-help-popover::before,
.detail-breakdown-table th.detail-column-sp_expected_wins .metric-help-popover::before {
  right: 11px !important;
}

@media (max-width: 1180px) {
  .detail-breakdown-header-ranking {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "title"
      "badge"
      "meta"
      "description" !important;
    justify-items: flex-start !important;
  }
  .detail-breakdown-ranking-slot,
  .detail-breakdown-header-ranking .detail-breakdown-header-meta {
    justify-content: flex-start !important;
  }
}

/* === 2026-05-16 Report Table + Tooltip Normalisation Patch ===
   Purpose: remove competing report tooltip/header alignment rules by making the
   report table component explicit and using a single global tooltip layer. */

/* 1) Detailed breakdown table alignment: group left, every numeric column centred. */
.detail-breakdown-table th,
.detail-breakdown-table td,
.detail-breakdown-table th.detail-metric-th,
.detail-breakdown-table td.detail-metric-td {
  text-align: center !important;
  vertical-align: middle !important;
}
.detail-breakdown-table th:first-child,
.detail-breakdown-table td:first-child {
  text-align: left !important;
}
.detail-breakdown-table th {
  padding-left: 10px !important;
  padding-right: 10px !important;
}
.detail-breakdown-table td {
  padding-left: 10px !important;
  padding-right: 10px !important;
}
.detail-column-help-label {
  width: 100% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  text-align: center !important;
  margin: 0 auto !important;
  transform: none !important;
}
.detail-column-help-text {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

/* 2) Keep table cards horizontally safe, but let the global tooltip escape cleanly. */
.detail-breakdown-table-wrap {
  overflow-x: auto !important;
  overflow-y: visible !important;
}
.detail-breakdown-card,
.detailed-breakdown-area,
.quick-report-window,
.quick-report-window-body,
.quick-report-card,
.summary-performance-card,
.summary-performance-layout,
.summary-performance-card .summary-market-tile,
.summary-performance-card .summary-pl-hero {
  overflow: visible !important;
}

/* 3) Inline report help icons now only trigger the global tooltip. Old inline
      popovers are deliberately suppressed to avoid stacking/context conflicts. */
.report-help-trigger {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  cursor: help !important;
  overflow: visible !important;
  z-index: 20 !important;
}
.report-help-trigger .summary-inline-popover,
.report-help-trigger .metric-help-popover,
.summary-inline-popover,
.metric-help-popover {
  display: none !important;
}
.summary-market-toggle-wrap .summary-inline-info {
  position: static !important;
  width: 20px !important;
  height: 20px !important;
  margin-left: 4px !important;
  transform: none !important;
}
.summary-market-toggle-wrap {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  overflow: visible !important;
}
.metric-help {
  width: 17px !important;
  height: 17px !important;
  flex: 0 0 17px !important;
  transform: none !important;
}

/* 4) Global tooltip layer: fixed to viewport, shared by summary and report tables. */
.global-report-tooltip {
  position: fixed;
  z-index: 2147483647;
  width: min(430px, calc(100vw - 32px));
  padding: 15px 17px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fbff, #eef6ff);
  color: #10233f;
  border: 1px solid rgba(59, 130, 246, 0.24);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
  font-size: 14px;
  line-height: 1.58;
  font-weight: 760;
  text-transform: none;
  letter-spacing: 0;
  white-space: normal;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .12s ease, visibility .12s ease, transform .12s ease;
}
.global-report-tooltip.visible,
.global-report-tooltip.measuring {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.global-report-tooltip.measuring {
  pointer-events: none;
}
.global-report-tooltip::before {
  content: "";
  position: absolute;
  top: -7px;
  left: calc(var(--tooltip-arrow-left, 50%) - 6px);
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  background: #f8fbff;
  border-left: 1px solid rgba(59, 130, 246, 0.18);
  border-top: 1px solid rgba(59, 130, 246, 0.18);
}
.global-report-tooltip.above::before {
  top: auto;
  bottom: -7px;
  border-left: 0;
  border-top: 0;
  border-right: 1px solid rgba(59, 130, 246, 0.18);
  border-bottom: 1px solid rgba(59, 130, 246, 0.18);
}

/* 5) Ranking badge row remains balanced after table/header normalisation. */
.detail-breakdown-header-ranking {
  grid-template-columns: minmax(240px, 1fr) minmax(260px, auto) minmax(150px, 1fr) !important;
  gap: 8px 14px !important;
}
.detail-breakdown-ranking-slot .ranking-badge {
  padding: 5px 13px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  min-height: 24px !important;
}

/* === 2026-05-16 Patch 8: restore report modal containment after global tooltip normalisation ===
   Patch 7 intentionally allowed overflow in several report containers while fixing tooltips.
   The global tooltip no longer needs parent overflow escape, so restore the modal/window
   scroll containment and rounded clipping while keeping table header alignment intact. */
.quick-report-window {
  overflow: hidden !important;
  border-radius: 24px !important;
  display: flex !important;
  flex-direction: column !important;
}

.quick-report-window-body {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  min-height: 0 !important;
  flex: 1 1 auto !important;
  display: grid !important;
  gap: 12px !important;
  align-content: start !important;
}

.quick-report-card,
.detailed-progress-card,
.detailed-breakdowns-card,
.quick-report-card.year-card {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.summary-performance-card,
.market-result-card.summary-performance-card {
  position: relative !important;
  z-index: 2 !important;
  overflow: hidden !important;
  border-radius: 18px !important;
}

/* The global tooltip is fixed to the viewport and must remain above the clipped report cards. */
.global-report-tooltip {
  z-index: 2147483647 !important;
}

/* Keep the report breakdown table normalisation from Patch 7. */
.detail-breakdown-table th,
.detail-breakdown-table td,
.detail-breakdown-table th.detail-metric-th,
.detail-breakdown-table td.detail-metric-td {
  text-align: center !important;
  vertical-align: middle !important;
}
.detail-breakdown-table th:first-child,
.detail-breakdown-table td:first-child {
  text-align: left !important;
}

/* Let wide tables scroll horizontally inside their own rounded card, without breaking modal scrolling. */
.detail-breakdown-table-wrap,
.quick-year-table-wrap {
  overflow-x: auto !important;
  overflow-y: hidden !important;
  border-radius: 13px !important;
}

/* === 2026-05-16 Patch 09: restore Year Breakdown card after tooltip/table normalisation ===
   Patch 08 restored modal containment but reintroduced a late overflow-y:hidden rule on
   .quick-year-table-wrap. The year table must remain a normal card with its own scroll area. */
.quick-report-card.year-card {
  display: block !important;
  min-height: 260px !important;
  padding: 14px !important;
  overflow: hidden !important;
  border-radius: 20px !important;
  background: #ffffff !important;
  border: 1px solid rgba(226, 232, 240, 0.95) !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06) !important;
}

.quick-report-card.year-card .card-title {
  margin-bottom: 10px !important;
}

.quick-year-table-wrap {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 180px !important;
  max-height: 360px !important;
  overflow: auto !important;
  border-radius: 14px !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  background: #ffffff !important;
  box-sizing: border-box !important;
}

.quick-year-table-wrap table {
  width: max-content !important;
  min-width: 980px !important;
  border-collapse: collapse !important;
  margin: 0 !important;
}

.quick-year-table-wrap thead,
.quick-year-table-wrap tr:first-child {
  position: sticky !important;
  top: 0 !important;
  z-index: 2 !important;
}

.quick-year-table-wrap th {
  background: #f8fafc !important;
  color: #475569 !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: .055em !important;
  font-weight: 950 !important;
  padding: 10px 12px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  text-align: center !important;
  white-space: nowrap !important;
}

.quick-year-table-wrap td {
  padding: 10px 12px !important;
  border-bottom: 1px solid #e5edf6 !important;
  text-align: center !important;
  white-space: nowrap !important;
}

.quick-year-table-wrap th:first-child,
.quick-year-table-wrap td:first-child {
  text-align: left !important;
}

/* === 2026-05-16 Patch 10: Year Breakdown active-market table standardisation === */
.quick-report-card.year-card {
  min-height: auto !important;
  overflow: hidden !important;
}

.quick-year-table-wrap {
  min-height: 0 !important;
  max-height: 360px !important;
  overflow: auto !important;
}

.quick-year-table-wrap table {
  width: 100% !important;
  min-width: 760px !important;
  max-width: none !important;
  table-layout: auto !important;
}

.quick-year-table-wrap th,
.quick-year-table-wrap td {
  text-align: center !important;
  vertical-align: middle !important;
}

.quick-year-table-wrap th:first-child,
.quick-year-table-wrap td:first-child {
  text-align: left !important;
}


/* === 2026-05-16 Patch 11: Year Breakdown containment + active-run reopen buttons ===
   Keep the successful global tooltip/table alignment fixes, but restore the year card as a
   normal visible report card and leave builder run buttons clickable while a run is active. */
.quick-report-window-body > .quick-report-card.year-card {
  display: block !important;
  width: 100% !important;
  min-height: 220px !important;
  padding: 14px !important;
  margin: 0 !important;
  overflow: visible !important;
  border-radius: 20px !important;
  background: #ffffff !important;
  border: 1px solid rgba(226, 232, 240, 0.95) !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06) !important;
  box-sizing: border-box !important;
}

.quick-report-window-body > .quick-report-card.year-card > .card-title {
  display: block !important;
  margin: 0 0 10px 0 !important;
  padding: 0 !important;
  height: auto !important;
}

.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap {
  display: block !important;
  width: 100% !important;
  min-height: 165px !important;
  height: auto !important;
  max-height: none !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  border-radius: 14px !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  background: #ffffff !important;
  box-sizing: border-box !important;
}

.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap table {
  width: 100% !important;
  min-width: 760px !important;
  border-collapse: collapse !important;
  table-layout: auto !important;
  margin: 0 !important;
}

.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap thead,
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap tbody,
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap tfoot {
  display: table-row-group !important;
}

.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap thead {
  display: table-header-group !important;
}

.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap tfoot {
  display: table-footer-group !important;
}

.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap th,
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap td {
  text-align: center !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
}

.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap th:first-child,
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap td:first-child {
  text-align: left !important;
}

/* === 2026-05-16 Patch 12: report table group selector === */
.report-groups-layout{
  grid-template-columns:minmax(280px,.8fr) minmax(520px,1.6fr) minmax(260px,.7fr);
  align-items:stretch;
}
.report-table-groups-card{
  border:1px solid rgba(20,184,166,.22);
  background:linear-gradient(180deg,rgba(240,253,250,.78),rgba(255,255,255,.96));
}
.report-table-groups-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  margin-bottom:12px;
}
.report-table-groups-intro{
  margin:5px 0 0;
  color:#516178;
  font-size:13px;
  line-height:1.42;
}
.report-table-group-count{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  border:1px solid rgba(20,184,166,.24);
  background:rgba(204,251,241,.6);
  color:#0f766e;
  font-size:11px;
  font-weight:950;
  letter-spacing:.055em;
  text-transform:uppercase;
  padding:8px 10px;
  white-space:nowrap;
}
.report-table-groups-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
}
.report-group-toggle{
  min-height:42px;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto auto;
  align-items:center;
  gap:8px;
  border:1px solid rgba(148,163,184,.28);
  border-radius:14px;
  background:rgba(255,255,255,.86);
  padding:9px 10px;
  color:#1f2a44;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 6px 16px rgba(15,23,42,.045);
}
.report-group-toggle input{
  width:16px;
  height:16px;
  accent-color:#14b8a6;
}
.report-group-toggle span:nth-of-type(1){
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.report-group-toggle em{
  font-style:normal;
  border-radius:999px;
  padding:3px 7px;
  font-size:9px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#0f766e;
  background:rgba(204,251,241,.75);
  border:1px solid rgba(20,184,166,.24);
}
.report-group-toggle.locked{
  background:linear-gradient(180deg,rgba(236,253,245,.92),rgba(255,255,255,.94));
  border-color:rgba(16,185,129,.32);
  cursor:default;
}
.report-group-toggle.optional-off:not(:has(input:checked)){
  background:rgba(248,250,252,.9);
}
.report-group-toggle:has(input:checked){
  border-color:rgba(20,184,166,.42);
  box-shadow:0 8px 18px rgba(20,184,166,.08);
}
.report-group-help{
  width:18px!important;
  height:18px!important;
  font-size:11px!important;
  color:#075985!important;
  background:#bae6fd!important;
  border-color:#7dd3fc!important;
}
.report-table-groups-note{
  margin-top:11px;
  border-radius:12px;
  border:1px solid rgba(125,211,252,.35);
  background:rgba(240,249,255,.72);
  color:#334155;
  font-size:12px;
  line-height:1.4;
  padding:9px 11px;
  font-weight:800;
}
.compact-management-card .management-copy{
  margin-top:4px;
  font-size:12px;
  line-height:1.45;
}
@media (max-width:1400px){
  .report-groups-layout{grid-template-columns:1fr;}
  .report-table-groups-list{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width:760px){
  .report-table-groups-list{grid-template-columns:1fr;}
  .report-table-groups-header{flex-direction:column;}
}

/* === 2026-05-16 Patch 13: report groups visual polish + year table containment === */
/* Restore a consistent, light helper-card style for builder help popovers. */
.help-icon::after,
.info-dot.section-help-dot::after{
  background:linear-gradient(180deg,#f8fbff,#eef7ff)!important;
  color:#12233b!important;
  border:1px solid rgba(59,130,246,.24)!important;
  box-shadow:0 22px 58px rgba(15,23,42,.22)!important;
  font-size:13.5px!important;
  line-height:1.58!important;
  font-weight:760!important;
  letter-spacing:0!important;
  text-transform:none!important;
}
.info-dot.section-help-dot::after{width:min(520px,86vw)!important;}
.report-group-help::after{left:50%!important;transform:translateX(-50%)!important;width:min(520px,78vw)!important;}

/* Report actions should look like designed controls, not utility placeholders. */
.report-groups-layout{
  grid-template-columns:minmax(280px,.72fr) minmax(620px,1.8fr) minmax(220px,.48fr)!important;
  gap:18px!important;
}
.report-control-card,
.report-table-groups-card,
.compact-management-card{
  border-radius:22px!important;
}
.report-control-card .report-option-list{gap:14px!important;}
.report-control-card .report-option{
  grid-template-columns:1fr!important;
  align-items:stretch!important;
  gap:10px!important;
  padding:14px!important;
  border-radius:18px!important;
  background:linear-gradient(180deg,#ffffff,#f8fbff)!important;
  border:1px solid rgba(203,213,225,.88)!important;
  box-shadow:0 10px 26px rgba(15,23,42,.045)!important;
}
.report-control-card .report-option .btn{
  width:100%!important;
  justify-content:center!important;
  min-height:44px!important;
  border-radius:12px!important;
  font-size:13px!important;
}
.report-control-card .report-option p{
  font-size:12.5px!important;
  line-height:1.46!important;
  padding:0 2px!important;
  text-align:left!important;
}
.report-control-card .report-option p strong{
  display:block!important;
  margin-bottom:2px!important;
  font-size:13px!important;
}

.report-table-groups-card{
  padding:16px!important;
  background:linear-gradient(180deg,#f0fdfa 0%,#ffffff 50%,#f8fafc 100%)!important;
  border:1px solid rgba(20,184,166,.28)!important;
  box-shadow:0 14px 34px rgba(15,23,42,.065)!important;
}
.report-table-groups-header{
  align-items:center!important;
  padding:0 0 12px!important;
  border-bottom:1px solid rgba(148,163,184,.18)!important;
}
.report-table-groups-header .card-title{
  font-size:13px!important;
  letter-spacing:.12em!important;
}
.report-table-groups-intro{
  max-width:720px!important;
  font-size:13px!important;
  line-height:1.5!important;
  color:#334155!important;
  font-weight:700!important;
}
.report-table-groups-list{
  margin-top:13px!important;
  gap:10px!important;
}
.report-group-toggle{
  position:relative!important;
  min-height:44px!important;
  grid-template-columns:22px minmax(0,1fr)!important;
  padding:10px 42px 10px 12px!important;
  border-radius:15px!important;
  background:linear-gradient(180deg,#ffffff,#f8fafc)!important;
}
.report-group-toggle input{justify-self:center!important;}
.report-group-toggle span:nth-of-type(1){
  text-align:center!important;
  justify-self:center!important;
  max-width:100%!important;
  font-size:12.2px!important;
}
.report-group-toggle em{
  position:absolute!important;
  right:42px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  font-size:8.5px!important;
  padding:3px 6px!important;
}
.report-group-toggle.optional-off em{display:none!important;}
.report-group-help{
  position:absolute!important;
  right:12px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  margin:0!important;
}
.report-group-toggle.locked span:nth-of-type(1){padding-right:54px!important;}
.report-table-groups-note{
  margin-top:12px!important;
  text-align:center!important;
  color:#0f766e!important;
  background:linear-gradient(180deg,#ecfdf5,#f0fdfa)!important;
  border-color:rgba(20,184,166,.25)!important;
}

.compact-management-card{
  justify-content:center!important;
  min-height:auto!important;
  padding:16px!important;
  background:linear-gradient(180deg,#ffffff,#f8fafc)!important;
}
.compact-management-card .card-title{text-align:center!important;}
.compact-management-card .management-copy{
  text-align:center!important;
  font-size:12px!important;
  line-height:1.45!important;
  margin:5px 0 12px!important;
}
.compact-management-card .secondary-actions{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:9px!important;
  padding-top:10px!important;
}
.compact-management-card .secondary-actions .btn{
  width:100%!important;
  min-height:38px!important;
  font-size:12px!important;
}

/* Year Breakdown is a normal report card and must not spill out of its shell. */
.quick-report-window-body > .quick-report-card.year-card{
  overflow:hidden!important;
  padding:14px!important;
  margin:0!important;
  border-radius:20px!important;
  box-sizing:border-box!important;
}
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap{
  overflow:auto!important;
  max-width:100%!important;
  width:100%!important;
  min-height:0!important;
  max-height:360px!important;
  border-radius:14px!important;
  box-sizing:border-box!important;
}
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap table{
  width:100%!important;
  min-width:760px!important;
  table-layout:auto!important;
  margin:0!important;
}
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap th,
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap td{
  text-align:center!important;
  white-space:nowrap!important;
}
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap th:first-child,
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap td:first-child{
  text-align:left!important;
}

@media(max-width:1450px){
  .report-groups-layout{grid-template-columns:1fr!important;}
}

/* === 2026-05-17 Patch 14: report groups guide, tooltip stability, year table polish === */
/* Report group tooltips now use the global fixed-position tooltip layer to avoid layout bounce. */
.report-group-help::after,
.report-group-help::before{
  display:none!important;
  content:none!important;
}
.report-group-help.report-help-trigger{
  position:absolute!important;
  right:12px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  z-index:2!important;
}

.report-actions-header{align-items:center!important;}
.section-header-actions{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.section-guide-button{
  border:1px solid rgba(255,255,255,.32);
  background:rgba(255,255,255,.18);
  color:#fff;
  border-radius:999px;
  padding:10px 18px;
  font-size:12px;
  font-weight:950;
  letter-spacing:.055em;
  text-transform:uppercase;
  box-shadow:0 10px 28px rgba(0,0,0,.12);
  cursor:pointer;
}
.section-guide-button:hover{background:rgba(255,255,255,.28);transform:translateY(-1px);}

/* Cleaner, denser report action layout. */
.report-groups-layout{
  grid-template-columns:minmax(260px,.7fr) minmax(640px,1.95fr) minmax(190px,.42fr)!important;
  gap:16px!important;
}
.polished-report-card,
.polished-groups-card,
.polished-management-card{min-height:0!important;}
.polished-report-card{padding:16px!important;}
.polished-report-card .card-title,
.polished-groups-card .card-title,
.polished-management-card .card-title{
  text-align:center!important;
  font-size:13px!important;
  letter-spacing:.14em!important;
}
.polished-report-card .report-option-list{gap:12px!important;}
.polished-report-card .report-option{
  padding:13px!important;
  min-height:0!important;
}
.polished-report-card .report-option p{
  margin:0!important;
  text-align:center!important;
  font-size:12.5px!important;
  line-height:1.48!important;
  color:#334155!important;
}
.polished-report-card .report-option p strong{
  font-size:13.5px!important;
  color:#0f172a!important;
}
.polished-report-card .btn{min-height:42px!important;}

.polished-groups-card{padding:16px 16px 14px!important;}
.polished-groups-card .report-table-groups-header{
  align-items:flex-start!important;
  gap:12px!important;
}
.polished-groups-card .report-table-groups-intro{
  max-width:820px!important;
  margin-top:6px!important;
}
.polished-groups-card .report-table-groups-list{
  gap:8px!important;
}
.polished-groups-card .report-group-toggle{
  min-height:39px!important;
  padding:8px 40px 8px 10px!important;
  border-radius:13px!important;
}
.polished-groups-card .report-group-toggle span:nth-of-type(1){
  font-size:12px!important;
  line-height:1.1!important;
}
.polished-groups-card .report-group-toggle em{
  right:40px!important;
  font-size:8px!important;
}
.polished-groups-card .report-table-groups-note{
  margin-top:10px!important;
  padding:8px 10px!important;
  font-size:12px!important;
  line-height:1.35!important;
}

.polished-management-card{
  padding:14px!important;
  align-self:stretch!important;
}
.polished-management-card .management-copy{
  font-size:11.5px!important;
  line-height:1.35!important;
  margin-bottom:10px!important;
}
.polished-management-card .secondary-actions{gap:8px!important;}
.polished-management-card .secondary-actions .btn{min-height:35px!important;}

/* Builder guide modal. */
.builder-guide-modal.hidden{display:none!important;}
.builder-guide-modal{
  position:fixed;
  inset:0;
  z-index:2147483000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px;
}
.builder-guide-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.58);
  backdrop-filter:blur(8px);
}
.builder-guide-panel{
  position:relative;
  width:min(980px,94vw);
  max-height:88vh;
  overflow:auto;
  border-radius:28px;
  padding:30px;
  background:linear-gradient(180deg,#ffffff,#f8fbff 72%,#eefdf8);
  border:1px solid rgba(20,184,166,.28);
  box-shadow:0 34px 90px rgba(15,23,42,.34);
  color:#12233b;
}
.builder-guide-close{
  position:absolute;
  top:16px;
  right:16px;
  width:38px;
  height:38px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.42);
  background:#fff;
  color:#be123c;
  font-size:22px;
  font-weight:900;
  cursor:pointer;
}
.builder-guide-kicker{
  color:#0f766e;
  font-size:11px;
  font-weight:950;
  letter-spacing:.16em;
  text-transform:uppercase;
}
.builder-guide-panel h2{margin:6px 0 10px;font-size:30px;line-height:1.1;color:#0f172a;}
.builder-guide-panel > p{font-size:15px;line-height:1.6;color:#334155;max-width:850px;}
.builder-guide-grid{
  margin-top:18px;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.builder-guide-grid > div{
  border:1px solid rgba(148,163,184,.26);
  border-radius:18px;
  background:rgba(255,255,255,.82);
  padding:16px;
  box-shadow:0 10px 28px rgba(15,23,42,.055);
}
.builder-guide-grid h3{margin:0 0 7px;font-size:14px;color:#0f172a;}
.builder-guide-grid p{margin:0;font-size:13px;line-height:1.52;color:#475569;}
body.builder-guide-open{overflow:hidden;}

/* Year breakdown should expand vertically and scroll only horizontally. */
.quick-report-window-body > .quick-report-card.year-card{
  height:auto!important;
  min-height:0!important;
  overflow:visible!important;
  padding:14px!important;
  margin-bottom:16px!important;
}
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap{
  max-height:none!important;
  height:auto!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  border-radius:14px!important;
}
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap table{
  width:100%!important;
  min-width:760px!important;
}
.quick-year-table-wrap td,
.quick-year-table-wrap th{vertical-align:middle!important;}

/* Keep the top builder header simple after removing duplicate mode/switch controls. */
.topbar .top-icons{margin-left:auto;}

@media(max-width:1450px){
  .report-groups-layout{grid-template-columns:1fr!important;}
}
@media(max-width:760px){
  .builder-guide-grid{grid-template-columns:1fr;}
  .builder-guide-panel{padding:24px 18px;}
}

/* === 2026-05-17 Patch 15: final report UX polish, guide, AE bands, year containment === */
.report-actions-header{
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
}
.section-guide-cta{
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  transform:translate(-50%,-50%)!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  gap:5px!important;
  z-index:3!important;
  pointer-events:auto!important;
}
.section-guide-cta > span{
  color:rgba(255,255,255,.92)!important;
  font-size:10px!important;
  font-weight:950!important;
  letter-spacing:.18em!important;
  text-transform:uppercase!important;
  text-shadow:0 2px 8px rgba(0,0,0,.18)!important;
}
.section-guide-button{
  min-width:220px!important;
  padding:12px 22px!important;
  background:linear-gradient(135deg,rgba(255,255,255,.96),rgba(220,252,231,.96))!important;
  color:#065f46!important;
  border:1px solid rgba(187,247,208,.88)!important;
  box-shadow:0 16px 36px rgba(4,120,87,.22)!important;
}
.section-guide-button:hover{background:#fff!important;}

.report-groups-layout{
  grid-template-columns:minmax(330px,.72fr) minmax(760px,1.68fr)!important;
  gap:16px!important;
  align-items:stretch!important;
}
.report-groups-layout .polished-management-card{
  grid-column:1 / -1!important;
  display:grid!important;
  grid-template-columns:auto minmax(280px,1fr) auto!important;
  align-items:center!important;
  gap:16px!important;
  min-height:0!important;
  padding:13px 16px!important;
}
.polished-management-card .card-title{text-align:left!important;margin:0!important;white-space:nowrap!important;}
.polished-management-card .management-copy{margin:0!important;text-align:left!important;font-size:12.5px!important;max-width:none!important;}
.polished-management-card .secondary-actions{display:flex!important;flex-direction:row!important;justify-content:flex-end!important;gap:10px!important;margin:0!important;}
.polished-management-card .secondary-actions .btn{width:auto!important;min-width:130px!important;min-height:38px!important;}

.polished-report-card{padding:18px!important;}
.report-card-heading{font-size:15px!important;letter-spacing:.18em!important;margin-bottom:14px!important;}
.polished-report-card .report-option{
  border-radius:18px!important;
  padding:16px!important;
  background:linear-gradient(180deg,#ffffff,#f8fbff)!important;
  border:1px solid rgba(203,213,225,.72)!important;
}
.polished-report-card .report-option .btn{width:100%!important;margin-bottom:12px!important;}
.polished-report-card .report-option p{font-size:13px!important;line-height:1.55!important;}
.polished-report-card .report-option p strong{display:block!important;font-size:14px!important;margin-bottom:4px!important;}
.polished-groups-card .report-table-groups-intro{font-size:13px!important;line-height:1.55!important;color:#334155!important;}
.polished-groups-card .report-table-groups-note{font-size:12.5px!important;line-height:1.45!important;}

/* Global report/table-group tooltip should never affect layout or capture hover. */
.global-report-tooltip{position:fixed!important;pointer-events:none!important;max-width:min(430px,calc(100vw - 32px))!important;}
.report-group-help::before,.report-group-help::after{display:none!important;content:none!important;}

/* Summary metric card help icons: one consistent top-right position per card. */
.summary-pl-hero,
.summary-performance-card .summary-market-tile{position:relative!important;overflow:hidden!important;}
.summary-pl-hero .summary-inline-info,
.summary-performance-card .summary-market-tile > .summary-inline-info{
  position:absolute!important;
  top:12px!important;
  right:12px!important;
  left:auto!important;
  bottom:auto!important;
  transform:none!important;
  z-index:8!important;
}
.summary-pl-hero .summary-inline-info-trigger,
.summary-performance-card .summary-market-tile > .summary-inline-info .summary-inline-info-trigger{width:20px!important;height:20px!important;}

/* Mode-aware A/E colour scale. */
.detail-breakdown-table .positive-soft,
.quick-year-table-wrap .positive-soft,
.summary-market-tile.positive-soft .summary-market-tile-value{color:#2563eb!important;font-weight:950!important;}
.detail-breakdown-table .positive,
.quick-year-table-wrap .positive,
.summary-market-tile.positive .summary-market-tile-value{color:#15803d!important;font-weight:950!important;}
.detail-breakdown-table .positive-extreme,
.quick-year-table-wrap .positive-extreme,
.summary-market-tile.positive-extreme .summary-market-tile-value{color:#7e22ce!important;font-weight:950!important;}
.detail-breakdown-table .warning,
.quick-year-table-wrap .warning,
.summary-market-tile.warning .summary-market-tile-value{color:#ca8a04!important;font-weight:950!important;}
.detail-breakdown-table .negative,
.quick-year-table-wrap .negative,
.summary-market-tile.negative .summary-market-tile-value{color:#ea580c!important;font-weight:950!important;}
.detail-breakdown-table .negative-severe,
.quick-year-table-wrap .negative-severe,
.summary-market-tile.negative-severe .summary-market-tile-value{color:#dc2626!important;font-weight:950!important;}
.detail-breakdown-table .neutral,
.quick-year-table-wrap .neutral,
.summary-market-tile.neutral .summary-market-tile-value{color:#111827!important;}
.summary-metric-icon-shell.positive-soft{background:rgba(37,99,235,.13)!important;color:#60a5fa!important;border-color:rgba(96,165,250,.32)!important;}
.summary-metric-icon-shell.positive-extreme{background:rgba(126,34,206,.15)!important;color:#c084fc!important;border-color:rgba(192,132,252,.32)!important;}
.summary-metric-icon-shell.negative-severe{background:rgba(220,38,38,.15)!important;color:#f87171!important;border-color:rgba(248,113,113,.32)!important;}
.summary-metric-icon-shell.neutral{background:rgba(148,163,184,.10)!important;color:#cbd5e1!important;border-color:rgba(203,213,225,.22)!important;}

/* Year breakdown must be a normal expanding report card, not a clipped mini panel. */
.quick-report-window-body > .quick-report-card.year-card{
  display:block!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
  padding:16px!important;
  margin:0 0 18px 0!important;
  border-radius:22px!important;
  background:#fff!important;
  border:1px solid rgba(226,232,240,.95)!important;
  box-shadow:0 12px 30px rgba(15,23,42,.055)!important;
  clear:both!important;
}
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap{
  display:block!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  border:1px solid rgba(226,232,240,.9)!important;
  border-radius:16px!important;
  background:#fff!important;
}
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap table{
  width:100%!important;
  min-width:880px!important;
  border-collapse:collapse!important;
  table-layout:auto!important;
  margin:0!important;
}
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap thead,
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap tbody,
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap tfoot{
  display:table-row-group!important;
  position:static!important;
  top:auto!important;
}
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap thead{display:table-header-group!important;}
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap tfoot{display:table-footer-group!important;}
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap th,
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap td{
  text-align:center!important;
  vertical-align:middle!important;
  white-space:nowrap!important;
  padding:10px 12px!important;
}
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap th:first-child,
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap td:first-child{text-align:left!important;}
.quick-report-window-body > .quick-report-card.year-card + .detailed-breakdowns-card{margin-top:12px!important;}

.builder-guide-panel{width:min(1050px,94vw)!important;}
.builder-guide-lead{font-size:16px!important;line-height:1.65!important;color:#334155!important;max-width:920px!important;}
.builder-guide-content{display:grid!important;grid-template-columns:1fr!important;gap:13px!important;margin-top:18px!important;}
.builder-guide-content section{border:1px solid rgba(148,163,184,.26)!important;border-radius:18px!important;background:rgba(255,255,255,.84)!important;padding:16px 18px!important;box-shadow:0 10px 28px rgba(15,23,42,.05)!important;}
.builder-guide-content h3{margin:0 0 7px!important;font-size:15px!important;color:#0f172a!important;}
.builder-guide-content p{margin:0!important;font-size:13.5px!important;line-height:1.58!important;color:#475569!important;}
.builder-guide-grid{display:none!important;}

@media(max-width:1450px){
  .report-groups-layout{grid-template-columns:1fr!important;}
  .report-groups-layout .polished-management-card{grid-template-columns:1fr!important;}
  .polished-management-card .card-title,.polished-management-card .management-copy{text-align:center!important;}
  .polished-management-card .secondary-actions{justify-content:center!important;flex-wrap:wrap!important;}
  .section-guide-cta{position:static!important;transform:none!important;margin:12px auto 0!important;}
  .report-actions-header{flex-direction:column!important;align-items:flex-start!important;}
}

/* === 2026-05-17 Patch 16: final report cleanup, tooltip stability, year containment === */
/* Header layout: the Getting Started Guide is centred in the green header; Reset All stays at the right. */
.report-actions-header .section-header-actions{
  position:static!important;
  margin-left:auto!important;
}
.report-actions-header .section-guide-cta{
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  transform:translate(-50%,-50%)!important;
  z-index:4!important;
  min-width:250px!important;
}
.report-actions-header .section-guide-button{
  min-width:250px!important;
  padding:13px 28px!important;
  font-size:12px!important;
}
.report-actions-header .reset-all-trigger{
  position:relative!important;
  z-index:5!important;
}

/* System management strip: keep it compact but fill the space more naturally. */
.report-groups-layout .polished-management-card{
  grid-template-columns:auto minmax(420px,1fr) auto!important;
  gap:26px!important;
  padding:16px 20px!important;
}
.polished-management-card .management-copy{
  text-align:center!important;
  justify-self:center!important;
  max-width:760px!important;
  font-size:13px!important;
  line-height:1.45!important;
}
.polished-management-card .secondary-actions{
  gap:12px!important;
}
.polished-management-card .secondary-actions .btn{
  min-width:150px!important;
  min-height:44px!important;
  padding:11px 18px!important;
  border-radius:12px!important;
  font-size:12.5px!important;
}

/* Detailed table group help icons must never use the older inline pseudo-tooltip system. */
.report-group-help,
.report-group-help.report-help-trigger{
  position:absolute!important;
  right:12px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  min-height:18px!important;
  margin:0!important;
  padding:0!important;
  line-height:18px!important;
  flex:0 0 18px!important;
  z-index:3!important;
  pointer-events:auto!important;
}
.info-dot.report-group-help::before,
.info-dot.report-group-help::after,
.info-dot.report-group-help:hover::before,
.info-dot.report-group-help:hover::after,
.info-dot.section-help-dot.report-group-help::before,
.info-dot.section-help-dot.report-group-help::after,
.info-dot.section-help-dot.report-group-help:hover::before,
.info-dot.section-help-dot.report-group-help:hover::after{
  display:none!important;
  content:none!important;
}
.report-group-toggle:hover,
.report-group-toggle:focus-within{
  min-height:44px!important;
  padding-top:10px!important;
  padding-bottom:10px!important;
}
.report-group-toggle:hover .report-group-help,
.report-group-toggle:focus-within .report-group-help{
  transform:translateY(-50%)!important;
}

/* Year Breakdown: remove every remaining sticky-row rule and let the card own its full height. */
.quick-report-window-body > .quick-report-card.year-card{
  position:relative!important;
  display:block!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
  contain:none!important;
  margin:0 0 26px 0!important;
  padding:16px!important;
  box-sizing:border-box!important;
  clear:both!important;
  z-index:1!important;
}
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap{
  position:relative!important;
  display:block!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  contain:none!important;
  box-sizing:border-box!important;
}
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap table,
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap thead,
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap tbody,
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap tfoot,
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap tr,
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap th,
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap td{
  position:static!important;
  top:auto!important;
  bottom:auto!important;
  transform:none!important;
}
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap table{
  display:table!important;
  width:100%!important;
  min-width:880px!important;
  table-layout:auto!important;
  border-collapse:collapse!important;
}
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap thead{display:table-header-group!important;}
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap tbody{display:table-row-group!important;}
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap tfoot{display:table-footer-group!important;}
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap tr{display:table-row!important;}
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap th,
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap td{display:table-cell!important;}
.quick-report-window-body > .quick-report-card.year-card + .detailed-breakdowns-card{
  position:relative!important;
  z-index:0!important;
  margin-top:22px!important;
  clear:both!important;
}

/* A/E colour scale: same typography for every state; cleaner true orange. */
.detail-breakdown-table td.positive-soft,
.detail-breakdown-table td.positive,
.detail-breakdown-table td.positive-extreme,
.detail-breakdown-table td.warning,
.detail-breakdown-table td.negative,
.detail-breakdown-table td.negative-severe,
.detail-breakdown-table td.neutral,
.quick-year-table-wrap td.positive-soft,
.quick-year-table-wrap td.positive,
.quick-year-table-wrap td.positive-extreme,
.quick-year-table-wrap td.warning,
.quick-year-table-wrap td.negative,
.quick-year-table-wrap td.negative-severe,
.quick-year-table-wrap td.neutral{
  font-weight:950!important;
  font-variant-numeric:tabular-nums!important;
  letter-spacing:0!important;
}
.detail-breakdown-table td.warning,
.quick-year-table-wrap td.warning,
.summary-market-tile.warning .summary-market-tile-value{color:#f59e0b!important;}
.detail-breakdown-table td.neutral,
.quick-year-table-wrap td.neutral,
.summary-market-tile.neutral .summary-market-tile-value{color:#111827!important;font-weight:950!important;}

@media(max-width:1450px){
  .report-actions-header .section-guide-cta{position:static!important;transform:none!important;margin:12px auto 0!important;}
  .report-groups-layout .polished-management-card{grid-template-columns:1fr!important;gap:12px!important;}
  .polished-management-card .card-title,
  .polished-management-card .management-copy{text-align:center!important;justify-self:center!important;}
  .polished-management-card .secondary-actions{justify-content:center!important;flex-wrap:wrap!important;}
}

/* === 2026-05-17 Patch 17: definitive Year Breakdown containment + table-group calm state ===
   Purpose: stop the Year Breakdown table from escaping its card and remove the ripple/bounce
   effect from the dense Detailed Table Groups selector. */
.quick-report-window-body{
  display:flex!important;
  flex-direction:column!important;
  gap:14px!important;
  align-content:normal!important;
}
.quick-report-window-body > .quick-report-card.year-card{
  display:block!important;
  flex:0 0 auto!important;
  width:100%!important;
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
  margin:0 0 28px 0!important;
  padding:16px!important;
  border-radius:20px!important;
  background:#fff!important;
  border:1px solid rgba(226,232,240,.95)!important;
  box-shadow:0 12px 30px rgba(15,23,42,.06)!important;
  box-sizing:border-box!important;
  position:relative!important;
  z-index:1!important;
  clear:both!important;
}
.quick-report-window-body > .quick-report-card.year-card > .card-title{
  display:block!important;
  margin:0 0 10px!important;
  padding:0!important;
  height:auto!important;
  line-height:1.2!important;
}
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  height:auto!important;
  max-height:none!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  border-radius:14px!important;
  border:1px solid rgba(226,232,240,.9)!important;
  background:#fff!important;
  box-sizing:border-box!important;
  position:relative!important;
  z-index:1!important;
}
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap table{
  display:table!important;
  width:100%!important;
  min-width:880px!important;
  max-width:none!important;
  table-layout:auto!important;
  border-collapse:collapse!important;
  margin:0!important;
  position:static!important;
}
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap thead{display:table-header-group!important;position:static!important;top:auto!important;}
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap tbody{display:table-row-group!important;position:static!important;top:auto!important;}
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap tfoot{display:table-footer-group!important;position:static!important;top:auto!important;bottom:auto!important;}
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap tr{display:table-row!important;position:static!important;top:auto!important;bottom:auto!important;transform:none!important;}
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap th,
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap td{
  display:table-cell!important;
  position:static!important;
  top:auto!important;
  bottom:auto!important;
  transform:none!important;
  text-align:center!important;
  vertical-align:middle!important;
  white-space:nowrap!important;
  padding:10px 12px!important;
  box-sizing:border-box!important;
}
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap th:first-child,
.quick-report-window-body > .quick-report-card.year-card .quick-year-table-wrap td:first-child{text-align:left!important;}
.quick-report-window-body > .quick-report-card.year-card + .detailed-breakdowns-card{
  display:block!important;
  flex:0 0 auto!important;
  position:relative!important;
  z-index:0!important;
  clear:both!important;
  margin-top:18px!important;
}
.quick-report-window-body > .quick-report-card.year-card + .detailed-breakdowns-card.hidden{display:none!important;}

/* Dense selector: no lift, no size change, no bounce. Hover may change colour only. */
.report-table-groups-card .report-group-toggle,
.report-table-groups-card .report-group-toggle:hover,
.report-table-groups-card .report-group-toggle:focus,
.report-table-groups-card .report-group-toggle:focus-within,
.report-table-groups-card .report-group-toggle:active{
  min-height:44px!important;
  height:44px!important;
  padding:10px 42px 10px 12px!important;
  transform:none!important;
  translate:none!important;
  scale:1!important;
  transition:border-color .12s ease, background-color .12s ease, box-shadow .12s ease!important;
  animation:none!important;
}
.report-table-groups-card .report-group-toggle:hover{
  box-shadow:0 6px 16px rgba(15,23,42,.045)!important;
}
.report-table-groups-card .report-group-toggle input,
.report-table-groups-card .report-group-toggle input:hover,
.report-table-groups-card .report-group-toggle input:focus,
.report-table-groups-card .report-group-toggle span,
.report-table-groups-card .report-group-toggle em,
.report-table-groups-card .report-group-help,
.report-table-groups-card .report-group-help:hover,
.report-table-groups-card .report-group-help:focus{
  transform:none!important;
  transition:none!important;
  animation:none!important;
}
.report-table-groups-card .report-group-help,
.report-table-groups-card .report-group-help:hover,
.report-table-groups-card .report-group-help:focus{
  position:absolute!important;
  right:12px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
}

/* === 2026-05-17 Patch 18: final workflow copy, ranked guide and table-group alignment === */
/* Dense table group rows: keep every control vertically centred at rest and on hover. */
.report-table-groups-card .report-group-toggle,
.polished-groups-card .report-group-toggle{
  display:grid!important;
  align-items:center!important;
  grid-template-columns:24px minmax(0,1fr)!important;
  min-height:46px!important;
  height:46px!important;
  padding:10px 42px 10px 12px!important;
  line-height:1!important;
  transform:none!important;
  transition:border-color .12s ease, background-color .12s ease, box-shadow .12s ease!important;
}
.report-table-groups-card .report-group-toggle:hover,
.report-table-groups-card .report-group-toggle:focus,
.report-table-groups-card .report-group-toggle:focus-within,
.polished-groups-card .report-group-toggle:hover,
.polished-groups-card .report-group-toggle:focus,
.polished-groups-card .report-group-toggle:focus-within{
  min-height:46px!important;
  height:46px!important;
  padding:10px 42px 10px 12px!important;
  transform:none!important;
}
.report-table-groups-card .report-group-toggle input,
.polished-groups-card .report-group-toggle input{
  align-self:center!important;
  justify-self:center!important;
  margin:0!important;
  transform:none!important;
}
.report-table-groups-card .report-group-toggle > span:first-of-type,
.polished-groups-card .report-group-toggle > span:first-of-type{
  align-self:center!important;
  justify-self:center!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:20px!important;
  line-height:1.15!important;
  margin:0!important;
  transform:none!important;
}
.report-table-groups-card .report-group-toggle em,
.report-table-groups-card .report-group-toggle:hover em,
.report-table-groups-card .report-group-toggle:focus-within em,
.polished-groups-card .report-group-toggle em,
.polished-groups-card .report-group-toggle:hover em,
.polished-groups-card .report-group-toggle:focus-within em{
  position:absolute!important;
  right:42px!important;
  top:50%!important;
  bottom:auto!important;
  transform:translateY(-50%)!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  height:18px!important;
  line-height:18px!important;
  margin:0!important;
}
.report-table-groups-card .report-group-help,
.report-table-groups-card .report-group-help:hover,
.report-table-groups-card .report-group-help:focus,
.report-table-groups-card .report-group-help.report-help-trigger,
.report-table-groups-card .report-group-help.report-help-trigger:hover,
.report-table-groups-card .report-group-help.report-help-trigger:focus,
.polished-groups-card .report-group-help,
.polished-groups-card .report-group-help:hover,
.polished-groups-card .report-group-help:focus,
.polished-groups-card .report-group-help.report-help-trigger,
.polished-groups-card .report-group-help.report-help-trigger:hover,
.polished-groups-card .report-group-help.report-help-trigger:focus{
  position:absolute!important;
  right:12px!important;
  top:50%!important;
  bottom:auto!important;
  transform:translateY(-50%)!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  min-height:18px!important;
  line-height:18px!important;
  margin:0!important;
  padding:0!important;
  transition:none!important;
  animation:none!important;
}
.report-table-groups-card .report-group-toggle.locked > span:first-of-type,
.polished-groups-card .report-group-toggle.locked > span:first-of-type{
  padding-right:72px!important;
}

/* Reporting card: use the available vertical room and make the copy more complete. */
.polished-report-card{
  padding:20px!important;
}
.polished-report-card .report-card-heading{
  margin-bottom:14px!important;
}
.polished-report-card .report-option-list{
  gap:15px!important;
}
.polished-report-card .report-option{
  padding:17px 18px!important;
  min-height:154px!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:flex-start!important;
}
.polished-report-card .report-option .btn{
  margin-bottom:14px!important;
}
.polished-report-card .report-option p{
  font-size:13.3px!important;
  line-height:1.56!important;
}
.polished-report-card .report-option p strong{
  margin-bottom:5px!important;
  font-size:14.4px!important;
}

/* System Management strip: clearer saved-system wording and better spacing. */
.report-groups-layout .polished-management-card{
  grid-template-columns:auto minmax(520px,1fr) auto!important;
  column-gap:34px!important;
  align-items:center!important;
}
.polished-management-card .management-copy{
  max-width:980px!important;
  font-size:13.4px!important;
  line-height:1.5!important;
  margin:0!important;
}
.polished-management-card .secondary-actions .btn{
  min-width:166px!important;
  min-height:46px!important;
}

/* Ranked qualifier guide: same visual language as the green Getting Started Guide, scoped to the purple section. */
.betting-criteria-header{
  position:relative!important;
  min-height:132px!important;
}
.betting-criteria-header .criteria-header-actions{
  position:static!important;
  margin-left:auto!important;
}
.betting-criteria-header .ranked-guide-cta{
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  transform:translate(-50%,-50%)!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  gap:5px!important;
  z-index:4!important;
}
.betting-criteria-header .ranked-guide-cta > span{
  color:rgba(255,255,255,.92)!important;
  font-size:10px!important;
  font-weight:950!important;
  letter-spacing:.18em!important;
  text-transform:uppercase!important;
  text-shadow:0 2px 8px rgba(0,0,0,.18)!important;
}
.betting-criteria-header .ranked-guide-button{
  min-width:270px!important;
  padding:13px 28px!important;
  background:linear-gradient(135deg,rgba(255,255,255,.96),rgba(237,233,254,.96))!important;
  color:#4c1d95!important;
  border:1px solid rgba(221,214,254,.9)!important;
  box-shadow:0 16px 36px rgba(76,29,149,.22)!important;
}
.betting-criteria-header .section-reset-button{
  position:relative!important;
  z-index:5!important;
}
.betting-criteria-header .ranked-mode-prompt{
  position:absolute!important;
  left:50%!important;
  bottom:12px!important;
  transform:translateX(-50%)!important;
  max-width:760px!important;
  z-index:4!important;
}
.ranked-guide-panel{width:min(980px,94vw)!important;}

@media(max-width:1450px){
  .betting-criteria-header .ranked-guide-cta{position:static!important;transform:none!important;margin:12px auto 0!important;}
  .betting-criteria-header{min-height:0!important;}
  .betting-criteria-header .ranked-mode-prompt{position:static!important;transform:none!important;margin-top:10px!important;}
  .report-groups-layout .polished-management-card{grid-template-columns:1fr!important;row-gap:12px!important;text-align:center!important;}
}

/* === 2026-05-17 Patch 19: final workflow micro-polish and progress emphasis === */
/* Reporting cards: remove duplicated headings and make explanatory copy feel like a contained note. */
.polished-report-card .report-option p.report-option-copy{
  display:block!important;
  margin:0!important;
  padding:14px 16px!important;
  border-radius:15px!important;
  background:linear-gradient(180deg,#f8fbff,#eef6ff)!important;
  border:1px solid rgba(203,213,225,.7)!important;
  color:#26364f!important;
  font-size:13.4px!important;
  line-height:1.58!important;
  text-align:center!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.75)!important;
}
.polished-report-card .report-option p.report-option-copy strong{display:none!important;}
.polished-report-card .report-option{justify-content:flex-start!important;}
.polished-report-card .report-option .btn{margin-bottom:14px!important;}

/* Detailed table-group labels: show table counts as quiet supporting text without changing row height. */
.report-table-groups-card .report-group-toggle > span:first-of-type,
.polished-groups-card .report-group-toggle > span:first-of-type{
  gap:7px!important;
  flex-wrap:wrap!important;
  text-align:center!important;
}
.report-table-groups-card .report-group-toggle > span:first-of-type small,
.polished-groups-card .report-group-toggle > span:first-of-type small{
  font-size:10px!important;
  line-height:1!important;
  font-weight:900!important;
  letter-spacing:.045em!important;
  color:#64748b!important;
  opacity:.88!important;
  white-space:nowrap!important;
}
.report-table-groups-card .report-group-toggle.locked > span:first-of-type small,
.polished-groups-card .report-group-toggle.locked > span:first-of-type small{
  display:none!important;
}

/* Topbar: keep the utility icons hard-right even when the middle topbar slot is absent. */
.topbar > .top-icons{
  grid-column:3!important;
  justify-self:end!important;
  align-self:center!important;
  margin-left:auto!important;
}
.topbar > div:first-child{grid-column:1!important;}
.top-icon.login{
  background:linear-gradient(135deg,#ecfdf5 0%,#dcfce7 100%)!important;
  color:#065f46!important;
  border:1px solid rgba(16,185,129,.28)!important;
  box-shadow:0 10px 24px rgba(16,185,129,.14), inset 0 1px 0 rgba(255,255,255,.9)!important;
  overflow:visible!important;
}
.top-icon.login span{
  font-size:13px!important;
  letter-spacing:.02em!important;
  font-weight:950!important;
}
.top-icon.login:after{
  width:9px!important;
  height:9px!important;
  right:-2px!important;
  top:-2px!important;
  bottom:auto!important;
  border:2px solid #fff!important;
  background:#22c55e!important;
  box-shadow:0 0 0 3px rgba(34,197,94,.12)!important;
}
.top-icon.login:hover{transform:none!important;}
@media(max-width:1450px){
  .topbar > .top-icons{grid-column:1!important;justify-self:start!important;}
}

/* Detailed progress: make the active pipeline stage more obvious without changing behaviour. */
.detailed-progress-card{
  border:1px solid rgba(59,130,246,.18)!important;
  background:linear-gradient(180deg,#ffffff,#f8fbff)!important;
}
.detailed-progress-card .card-title{
  color:#1e3a8a!important;
  letter-spacing:.16em!important;
}
.detailed-progress-step.running{
  background:linear-gradient(135deg,#eff6ff,#dbeafe)!important;
  border-color:rgba(37,99,235,.65)!important;
  color:#1d4ed8!important;
  box-shadow:0 0 0 2px rgba(37,99,235,.10), 0 14px 28px rgba(37,99,235,.18)!important;
}
.detailed-progress-step.running span{
  background:#2563eb!important;
  color:#fff!important;
  box-shadow:0 0 0 5px rgba(37,99,235,.14)!important;
}
.detailed-progress-step.running .detailed-progress-copy strong{
  color:#1e3a8a!important;
  font-weight:950!important;
}
.detailed-progress-step.running .detailed-progress-copy em{
  color:#2563eb!important;
  font-weight:950!important;
}
.detailed-progress-step.pending{
  background:rgba(248,250,252,.78)!important;
}

/* === 2026-05-17 Patch 20: Detailed report overlay navigation sidebar === */
.quick-report-overlay.active{
  align-items:center!important;
  justify-content:center!important;
}

.quick-report-overlay > .quick-report-shell{
  width:min(1740px, calc(100vw - 34px))!important;
  height:min(948px, calc(100vh - 34px))!important;
  display:flex!important;
  align-items:stretch!important;
  justify-content:center!important;
  gap:10px!important;
  background:transparent!important;
}

.quick-report-overlay > .quick-report-shell.nav-collapsed{
  width:min(1518px, calc(100vw - 34px))!important;
}

.quick-report-overlay > .quick-report-shell > .quick-report-window{
  width:min(1480px, calc(100vw - 330px))!important;
  height:100%!important;
  flex:1 1 auto!important;
  min-width:0!important;
}

.quick-report-overlay > .quick-report-shell.nav-collapsed > .quick-report-window,
.quick-report-overlay > .quick-report-shell > .quick-report-window:only-child{
  width:min(1480px, calc(100vw - 56px))!important;
}

.report-navigator-panel{
  width:256px!important;
  flex:0 0 256px!important;
  height:100%!important;
  display:flex!important;
  overflow:hidden!important;
  border:1px solid rgba(125,211,252,.38)!important;
  border-radius:24px!important;
  background:linear-gradient(180deg, rgba(248,250,252,.96), rgba(240,253,250,.92))!important;
  box-shadow:0 22px 62px rgba(15,23,42,.23)!important;
  backdrop-filter:blur(12px)!important;
}

.report-navigator-panel.hidden{display:none!important;}

.report-navigator-panel.collapsed{
  width:46px!important;
  flex-basis:46px!important;
}

.report-nav-rail{
  width:46px!important;
  flex:0 0 46px!important;
  display:none!important;
  align-items:flex-start!important;
  justify-content:center!important;
  padding-top:14px!important;
  background:linear-gradient(180deg,#064e3b,#0f766e)!important;
}

.report-navigator-panel.collapsed .report-nav-rail{display:flex!important;}
.report-navigator-panel.collapsed .report-nav-content{display:none!important;}

.report-nav-collapse{
  width:32px!important;
  height:32px!important;
  border-radius:12px!important;
  border:1px solid rgba(186,230,253,.65)!important;
  background:rgba(255,255,255,.82)!important;
  color:#065f46!important;
  font-weight:900!important;
  cursor:pointer!important;
  box-shadow:0 8px 18px rgba(15,23,42,.12)!important;
}

.report-nav-collapse:hover{transform:none!important;background:#ecfeff!important;}

.report-nav-content{
  min-width:0!important;
  flex:1 1 auto!important;
  display:flex!important;
  flex-direction:column!important;
  padding:14px 12px!important;
  overflow:hidden!important;
}

.report-nav-header{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  padding:8px 8px 12px!important;
  border-bottom:1px solid rgba(148,163,184,.24)!important;
}

.report-nav-header span{
  display:block!important;
  font-size:10px!important;
  font-weight:900!important;
  letter-spacing:.16em!important;
  color:#64748b!important;
  text-transform:uppercase!important;
}

.report-nav-header strong{
  display:block!important;
  margin-top:3px!important;
  font-size:18px!important;
  letter-spacing:-.04em!important;
  color:#0f172a!important;
}

.report-nav-tools{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:6px!important;
  padding:10px 4px!important;
}

.report-nav-tools button{
  height:28px!important;
  border-radius:10px!important;
  border:1px solid rgba(45,212,191,.38)!important;
  background:rgba(236,253,245,.9)!important;
  color:#047857!important;
  font-size:11px!important;
  font-weight:900!important;
  cursor:pointer!important;
}

.report-nav-tools button:hover{background:#ccfbf1!important;}

.report-nav-list{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:auto!important;
  padding:4px 2px 10px!important;
  scrollbar-width:thin!important;
}

.report-nav-group{
  border:1px solid rgba(148,163,184,.24)!important;
  border-radius:15px!important;
  background:rgba(255,255,255,.72)!important;
  margin-bottom:8px!important;
  overflow:hidden!important;
}

.report-nav-group.active-group{
  border-color:rgba(20,184,166,.48)!important;
  background:linear-gradient(135deg,rgba(240,253,250,.94),rgba(255,255,255,.82))!important;
}

.report-nav-group.not-selected{opacity:.58!important;}

.report-nav-group-head{
  width:100%!important;
  min-height:38px!important;
  display:grid!important;
  grid-template-columns:22px 1fr auto!important;
  align-items:center!important;
  gap:6px!important;
  border:0!important;
  background:transparent!important;
  padding:8px 9px!important;
  cursor:pointer!important;
  color:#0f172a!important;
  text-align:left!important;
}

.report-nav-group-head:hover{background:rgba(224,242,254,.42)!important;}
.report-nav-plus{font-size:16px!important;font-weight:900!important;color:#0891b2!important;text-align:center!important;}
.report-nav-group-title{font-size:12px!important;font-weight:900!important;line-height:1.2!important;}
.report-nav-group-count{font-size:10px!important;font-weight:900!important;color:#0f766e!important;background:#ecfdf5!important;border:1px solid #a7f3d0!important;border-radius:999px!important;padding:3px 6px!important;}
.report-nav-group.not-selected .report-nav-group-count{color:#64748b!important;background:#f1f5f9!important;border-color:#cbd5e1!important;}

.report-nav-items{
  display:none!important;
  padding:0 7px 8px!important;
}
.report-nav-group.open .report-nav-items{display:grid!important;gap:5px!important;}

.report-nav-item{
  min-height:30px!important;
  width:100%!important;
  display:grid!important;
  grid-template-columns:1fr auto!important;
  align-items:center!important;
  gap:8px!important;
  border-radius:11px!important;
  border:1px solid transparent!important;
  background:rgba(248,250,252,.78)!important;
  color:#334155!important;
  padding:6px 7px!important;
  text-align:left!important;
  cursor:pointer!important;
}

.report-nav-item:not(:disabled):hover{
  background:#eff6ff!important;
  border-color:#bfdbfe!important;
}

.report-nav-item.active{
  background:linear-gradient(135deg,#dbeafe,#ccfbf1)!important;
  border-color:#60a5fa!important;
  box-shadow:inset 3px 0 0 #0ea5e9!important;
}

.report-nav-item:disabled{cursor:not-allowed!important;opacity:.72!important;}
.report-nav-item-label{font-size:11.5px!important;font-weight:800!important;line-height:1.2!important;}
.report-nav-status{font-size:9px!important;text-transform:uppercase!important;letter-spacing:.08em!important;font-weight:900!important;border-radius:999px!important;padding:3px 5px!important;white-space:nowrap!important;}
.report-nav-status.ready{color:#047857!important;background:#dcfce7!important;}
.report-nav-status.loading{color:#1d4ed8!important;background:#dbeafe!important;position:relative!important;padding-left:14px!important;}
.report-nav-status.loading::before{
  content:""!important;
  position:absolute!important;
  left:5px!important;
  top:50%!important;
  width:5px!important;
  height:5px!important;
  margin-top:-2.5px!important;
  border-radius:50%!important;
  background:#2563eb!important;
  animation:reportNavPulse 1s infinite ease-in-out!important;
}
.report-nav-status.not-selected{color:#64748b!important;background:#f1f5f9!important;}

@keyframes reportNavPulse{
  0%,100%{opacity:.35;transform:scale(.85);}
  50%{opacity:1;transform:scale(1.25);}
}

/* Tighten detailed report main content only when the navigator is present. */
.quick-report-overlay > .quick-report-shell:not(.nav-collapsed) .summary-performance-metrics,
.quick-report-overlay > .quick-report-shell:not(.nav-collapsed) .summary-performance-card .summary-performance-top-grid,
.quick-report-overlay > .quick-report-shell:not(.nav-collapsed) .summary-performance-card .summary-performance-bottom-grid{
  gap:10px!important;
}

.quick-report-overlay > .quick-report-shell:not(.nav-collapsed) .summary-performance-tile{
  min-width:0!important;
}

.quick-report-overlay > .quick-report-shell:not(.nav-collapsed) .detail-breakdown-table th,
.quick-report-overlay > .quick-report-shell:not(.nav-collapsed) .detail-breakdown-table td{
  padding-left:9px!important;
  padding-right:9px!important;
}

@media (max-width: 1180px){
  .quick-report-overlay > .quick-report-shell{width:calc(100vw - 20px)!important;gap:0!important;}
  .report-navigator-panel{position:absolute!important;z-index:3!important;left:10px!important;top:10px!important;bottom:10px!important;height:auto!important;}
  .quick-report-overlay > .quick-report-shell > .quick-report-window{width:100%!important;}
}


/* === 2026-05-17 Patch 21: Sidebar width and collapsed rail refinement === */
.quick-report-overlay > .quick-report-shell{
  width:min(1810px, calc(100vw - 28px))!important;
  gap:10px!important;
}
.quick-report-overlay > .quick-report-shell > .quick-report-window{
  width:min(1480px, calc(100vw - 372px))!important;
}
.report-navigator-panel{
  width:296px!important;
  flex:0 0 296px!important;
}
.report-nav-content{
  padding:15px 14px!important;
}
.report-nav-group-head{
  grid-template-columns:24px 1fr auto!important;
  gap:8px!important;
  padding:9px 10px!important;
}
.report-nav-group-title{
  font-size:12.5px!important;
  line-height:1.18!important;
}
.report-nav-items{
  padding:0 8px 9px!important;
}
.report-nav-item{
  min-height:31px!important;
  padding:6px 8px!important;
}
.report-nav-item-label{
  font-size:11.75px!important;
}
.report-navigator-panel.collapsed{
  width:44px!important;
  flex:0 0 44px!important;
  height:100%!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  overflow:visible!important;
}
.report-navigator-panel.collapsed .report-nav-rail{
  display:flex!important;
  width:44px!important;
  flex:0 0 44px!important;
  height:44px!important;
  padding-top:0!important;
  align-items:center!important;
  justify-content:center!important;
  background:transparent!important;
}
.report-navigator-panel.collapsed .report-nav-collapse{
  width:34px!important;
  height:34px!important;
  border-radius:999px!important;
  background:linear-gradient(135deg,#ecfeff,#dcfce7)!important;
  border:1px solid rgba(94,234,212,.72)!important;
  box-shadow:0 10px 24px rgba(6,95,70,.22)!important;
}
.report-navigator-panel.collapsed .report-nav-collapse:hover{
  background:#ffffff!important;
  box-shadow:0 12px 28px rgba(6,95,70,.28)!important;
}
.quick-report-overlay > .quick-report-shell.nav-collapsed{
  width:min(1548px, calc(100vw - 28px))!important;
  gap:8px!important;
}
.quick-report-overlay > .quick-report-shell.nav-collapsed > .quick-report-window,
.quick-report-overlay > .quick-report-shell > .quick-report-window:only-child{
  width:min(1480px, calc(100vw - 64px))!important;
}
@media (max-width: 1180px){
  .report-navigator-panel{width:296px!important;flex-basis:296px!important;}
  .report-navigator-panel.collapsed{width:44px!important;flex-basis:44px!important;}
}


/* === 2026-05-17 Patch A: Race Profiler shell and workspace mode === */
.race-profiler-topbar {
  margin-bottom: 1rem;
}

.race-profiler-hero {
  position: relative;
  overflow: hidden;
  padding: 2rem 2.25rem;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.96), rgba(22, 101, 52, 0.94));
  color: #f8fafc;
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.16);
  margin-bottom: 1.15rem;
}

.race-profiler-hero::after {
  content: "";
  position: absolute;
  width: 22rem;
  height: 22rem;
  border-radius: 999px;
  right: -6rem;
  top: -9rem;
  background: rgba(255, 255, 255, 0.13);
}

.race-profiler-kicker {
  position: relative;
  z-index: 1;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.88;
  margin-bottom: 0.6rem;
}

.race-profiler-hero h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 0.7rem;
  font-size: clamp(1.65rem, 2.8vw, 2.7rem);
  letter-spacing: -0.04em;
}

.race-profiler-hero p {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 58rem;
  line-height: 1.65;
  color: rgba(248, 250, 252, 0.9);
}

.race-profiler-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.race-profiler-card {
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  padding: 1.35rem;
}

.race-profiler-card.active {
  border-color: rgba(16, 185, 129, 0.34);
  background: linear-gradient(180deg, rgba(240, 253, 250, 0.96), rgba(255, 255, 255, 0.94));
}

.race-profiler-card.locked {
  opacity: 0.74;
}

.race-profiler-card h3 {
  margin: 0.5rem 0 0.5rem;
  color: #0f172a;
  font-size: 1.25rem;
}

.race-profiler-card .choice-lead {
  color: #475569;
  line-height: 1.55;
  margin-bottom: 0.9rem;
}

.race-profiler-card ul {
  margin: 0 0 1.1rem;
  padding-left: 1.2rem;
  color: #334155;
  line-height: 1.55;
}

.race-profiler-open-button {
  width: 100%;
}

body[data-workspace-mode="race_profiler"] #system {
  display: none;
}

body[data-workspace-mode="race_profiler"] .builder-sticky-actions .btn.save,
body[data-workspace-mode="race_profiler"] .builder-sticky-actions .btn.load {
  display: none;
}

body[data-workspace-mode="race_profiler"] #builderContextNav .subnav a[href="#system"] {
  opacity: 0.48;
  pointer-events: none;
}

body[data-workspace-mode="race_profiler"] #builder-actions .report-actions-header {
  background: linear-gradient(135deg, #0f766e, #16a34a);
}

body[data-workspace-mode="race_profiler"] #builder-actions .report-option-copy:first-letter {
  color: inherit;
}

@media (max-width: 980px) {
  .race-profiler-choice-grid {
    grid-template-columns: 1fr;
  }
}

/* Race Profiler Patch B: guide and optional-section collapse polish */
body[data-workspace-mode="race_profiler"] .profiler-optional-section{
  border:1px solid rgba(14,165,233,.18);
  box-shadow:0 12px 28px rgba(15,23,42,.08);
}
body[data-workspace-mode="race_profiler"] .profiler-optional-section.profiler-collapsed .section-body{
  display:none!important;
}
body[data-workspace-mode="race_profiler"] .profiler-optional-section.profiler-collapsed{
  opacity:.92;
}
body[data-workspace-mode="race_profiler"] .profiler-optional-section.profiler-collapsed .section-header{
  border-radius:18px;
}
.profiler-header-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.profiler-section-toggle{
  border:1px solid rgba(255,255,255,.36);
  background:rgba(255,255,255,.18);
  color:#fff;
  border-radius:999px;
  padding:9px 13px;
  font-size:12px;
  font-weight:950;
  cursor:pointer;
  box-shadow:0 10px 20px rgba(15,23,42,.12);
  white-space:nowrap;
}
.profiler-section-toggle:hover{
  background:rgba(255,255,255,.28);
  transform:translateY(-1px);
}
body[data-workspace-mode="race_profiler"] #builder-actions .section-guide-button{
  min-width:190px;
}
body[data-workspace-mode="race_profiler"] .builder-guide-kicker{
  color:#047857;
}
body[data-workspace-mode="race_profiler"] .builder-guide-content section:nth-child(4){
  border-color:rgba(16,185,129,.25);
  background:linear-gradient(135deg,rgba(236,253,245,.94),rgba(255,255,255,.98));
}

/* Race Profiler Patch C: ID-specific collapse overrides for heavily gridded optional sections. */
body[data-workspace-mode="race_profiler"] #market.profiler-optional-section.profiler-collapsed > .section-body,
body[data-workspace-mode="race_profiler"] #changes.profiler-optional-section.profiler-collapsed > .section-body,
body[data-workspace-mode="race_profiler"] #ratings.profiler-optional-section.profiler-collapsed > .section-body,
body[data-workspace-mode="race_profiler"] #horse.profiler-optional-section.profiler-collapsed > .section-body,
body[data-workspace-mode="race_profiler"] #horse-profile-stats.profiler-optional-section.profiler-collapsed > .section-body,
body[data-workspace-mode="race_profiler"] #lto.profiler-optional-section.profiler-collapsed > .section-body,
body[data-workspace-mode="race_profiler"] #trainer-jockey.profiler-optional-section.profiler-collapsed > .section-body {
  display: none !important;
}

/* Race Profiler Patch D: compact race-cohort-first controls. */
body[data-workspace-mode="race_profiler"] #time .time-block.date-range,
body[data-workspace-mode="race_profiler"] #time [data-date-preset="last_1_year"],
body[data-workspace-mode="race_profiler"] #time [data-date-preset="last_3_years"],
body[data-workspace-mode="race_profiler"] #time [data-date-preset="custom"],
body[data-workspace-mode="race_profiler"] #time .season-grid .card:last-child,
body[data-workspace-mode="race_profiler"] #time [data-season-preset="flat_turf_season"],
body[data-workspace-mode="race_profiler"] #time [data-season-preset="aw_winter_focus"],
body[data-workspace-mode="race_profiler"] #time [data-season-preset="nh_season"],
body[data-workspace-mode="race_profiler"] #time [data-season-preset="summer_jumps"],
body[data-workspace-mode="race_profiler"] #race .meta-flat-presets,
body[data-workspace-mode="race_profiler"] #race .meta-nh-presets {
  display: none !important;
}

body[data-workspace-mode="race_profiler"] #time .time-strip {
  grid-template-columns: minmax(260px, 1.05fr) minmax(210px, .8fr) minmax(250px, 1fr);
  align-items: stretch;
}

body[data-workspace-mode="race_profiler"] #time .season-grid {
  grid-template-columns: minmax(0, 1fr);
}

body[data-workspace-mode="race_profiler"] #time .season-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

body[data-workspace-mode="race_profiler"] #race .race-meta-distance {
  grid-template-columns: minmax(0, 1fr);
}

body[data-workspace-mode="race_profiler"] #race .distance-range-card.meta-distance {
  margin-bottom: 0;
}

body[data-workspace-mode="race_profiler"] #race-conditions .runners-hybrid-card {
  border-color: rgba(16, 185, 129, 0.42);
  box-shadow: 0 18px 34px rgba(16, 185, 129, 0.12);
}

body[data-workspace-mode="race_profiler"] #time .section-description,
body[data-workspace-mode="race_profiler"] #race .section-description,
body[data-workspace-mode="race_profiler"] #race-conditions .section-description,
body[data-workspace-mode="race_profiler"] #course-profile .section-description {
  max-width: 62rem;
}


/* Race Profiler Patch E: force single-code profiling by hiding broad race-code shortcuts. */
body[data-workspace-mode="race_profiler"] #race_code_group [data-race-code="all_flat"],
body[data-workspace-mode="race_profiler"] #race_code_group [data-race-code="all_nh"] {
  display: none !important;
}

body[data-workspace-mode="race_profiler"] #race_code_card .note::after {
  content: " Race Profiler uses one race code at a time. Flat Turf is the default; choose All Weather, Hurdle, Chase or National Hunt Flat when needed.";
  display: block;
  margin-top: 6px;
  color: #047857;
  font-weight: 700;
}

@media (max-width: 980px) {
  body[data-workspace-mode="race_profiler"] #time .time-strip,
  body[data-workspace-mode="race_profiler"] #time .season-presets {
    grid-template-columns: 1fr;
  }
}


/* Race Profiler v1: visible official-rating cohort refinement */
body[data-workspace-mode="race_profiler"] .race-profiler-official-rating-slot {
  margin: 16px 0 0;
}

body[data-workspace-mode="race_profiler"] .race-profiler-rating-card {
  border-color: rgba(251, 191, 36, 0.42);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.10), rgba(15, 23, 42, 0.82));
}

body[data-workspace-mode="race_profiler"] .race-profiler-mini-note {
  margin: 6px auto 12px;
  max-width: 760px;
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.82rem;
  text-align: center;
  line-height: 1.45;
}

body[data-workspace-mode="race_profiler"] .race-profiler-rating-target {
  display: flex;
  justify-content: center;
}

body[data-workspace-mode="race_profiler"] .race-profiler-cohort-rating-control {
  width: min(100%, 420px);
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.46);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

body[data-workspace-mode="race_profiler"] .race-profiler-cohort-rating-control .pill-range-input {
  max-width: 260px;
  margin: 0 auto;
}

/* Race Profiler Patch G: robust official-rating proxy and compact course context */
body[data-workspace-mode="race_profiler"] #race_profiler_official_rating_slot {
  display: block !important;
  grid-column: 1 / -1;
  margin: 16px 0 0;
}

body[data-workspace-mode="race_profiler"] #race_profiler_official_rating_slot[hidden] {
  display: none !important;
}

body[data-workspace-mode="race_profiler"] .race-profiler-rating-card {
  border-color: rgba(251, 191, 36, 0.42);
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.96), rgba(255, 251, 235, 0.98));
}

body[data-workspace-mode="race_profiler"] .race-profiler-official-rating-inputs {
  max-width: 320px;
  margin: 0 auto;
}

body[data-workspace-mode="race_profiler"] .race-profiler-official-rating-inputs input {
  text-align: center;
  font-weight: 800;
}

body[data-workspace-mode="race_profiler"] #course-profile.profiler-course-compact .course-row1 {
  grid-template-columns: minmax(280px, 1.2fr) repeat(2, minmax(180px, 0.9fr));
}

body[data-workspace-mode="race_profiler"] #course-profile.profiler-course-advanced-hidden .course-direction-card,
body[data-workspace-mode="race_profiler"] #course-profile.profiler-course-advanced-hidden .course-topography-card,
body[data-workspace-mode="race_profiler"] #course-profile.profiler-course-advanced-hidden .course-row2,
body[data-workspace-mode="race_profiler"] #course-profile.profiler-course-advanced-hidden .course-row3 {
  display: none !important;
}

body[data-workspace-mode="race_profiler"] #course-profile.profiler-course-advanced-hidden .course-select-card {
  grid-column: 1 / -1;
}

body[data-workspace-mode="race_profiler"] .race-profiler-course-toggle {
  margin-left: 8px;
}

/* Race Profiler Patch H: race conditions compression and profiler nav */
body[data-workspace-mode="race_profiler"] #race-conditions.profiler-race-conditions-mode .section-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

body[data-workspace-mode="race_profiler"] #race-conditions.profiler-race-conditions-mode .grid.race-top {
  grid-template-columns: 1.25fr .75fr;
}

body[data-workspace-mode="race_profiler"] #race_profiler_field_size_slot {
  display: block;
}

body[data-workspace-mode="race_profiler"] #race_profiler_field_size_slot .runners-hybrid-card {
  border-color: rgba(22, 163, 74, .42);
  background: linear-gradient(180deg, #ffffff, #f0fdf4);
  box-shadow: 0 10px 26px rgba(22, 163, 74, .08);
}

body[data-workspace-mode="race_profiler"] #race-conditions.profiler-race-advanced-hidden > .section-body > .grid.lower-two {
  display: none !important;
}

body[data-workspace-mode="race_profiler"] #race-conditions.profiler-race-advanced-hidden > .section-body > .grid.two {
  display: grid !important;
}

body[data-workspace-mode="race_profiler"] #race-conditions.profiler-race-advanced-hidden #aw_surface_group {
  opacity: .55;
}

body[data-workspace-mode="race_profiler"] #race-conditions.profiler-race-conditions-mode .condition-flags-card {
  min-height: 160px;
}

body[data-workspace-mode="race_profiler"] .race-profiler-race-conditions-toggle {
  margin-left: 8px;
}

body[data-workspace-mode="race_profiler"] #builderContextNav .subnav a[hidden] {
  display: none !important;
}

body[data-workspace-mode="race_profiler"] #builderContextNav .subnav a[href^="#"] {
  font-size: 12px;
  line-height: 1.22;
}

@media(max-width: 1200px) {
  body[data-workspace-mode="race_profiler"] #race-conditions.profiler-race-conditions-mode .grid.race-top {
    grid-template-columns: 1fr;
  }
}


/* Race Profiler Patch I: workflow path and cleaner Profile Areas language */
body[data-workspace-mode="race_profiler"] #page-builder .topbar {
  margin-bottom: 14px;
}

.race-profiler-workflow-panel {
  margin: 0 0 18px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(13, 148, 136, .22);
  background: linear-gradient(135deg, rgba(240, 253, 250, .98), rgba(239, 246, 255, .96));
  box-shadow: 0 18px 44px rgba(15, 23, 42, .09);
}

.race-profiler-workflow-panel[hidden] {
  display: none !important;
}

.race-profiler-workflow-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.race-profiler-workflow-kicker {
  color: #047857;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .22em;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.race-profiler-workflow-head h2 {
  margin: 0 0 6px;
  color: #0f172a;
  font-size: 22px;
  letter-spacing: -.03em;
}

.race-profiler-workflow-head p {
  margin: 0;
  max-width: 880px;
  color: #475569;
  line-height: 1.55;
  font-size: 14px;
}

.race-profiler-workflow-guide {
  border: 1px solid rgba(13, 148, 136, .24);
  background: rgba(255, 255, 255, .82);
  color: #065f46;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
  white-space: nowrap;
}

.race-profiler-workflow-guide:hover {
  transform: translateY(-1px);
  background: #ffffff;
}

.race-profiler-workflow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.race-profiler-step-card {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  row-gap: 3px;
  align-items: center;
  padding: 12px 13px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, .22);
  background: rgba(255, 255, 255, .86);
}

.race-profiler-step-card span {
  grid-row: span 2;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0f766e, #22c55e);
  color: #fff;
  font-weight: 950;
  font-size: 12px;
}

.race-profiler-step-card strong {
  color: #0f172a;
  font-size: 13px;
  line-height: 1.15;
}

.race-profiler-step-card em {
  color: #64748b;
  font-size: 11px;
  line-height: 1.2;
  font-style: normal;
}

body[data-workspace-mode="race_profiler"] #builder-actions .builder-action-grid.report-groups-layout {
  grid-template-columns: minmax(260px, .72fr) minmax(420px, 1.28fr);
}

body[data-workspace-mode="race_profiler"] #builder-actions .system-management-card {
  display: none !important;
}

body[data-workspace-mode="race_profiler"] #builder-actions .report-control-card.polished-report-card {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border-color: rgba(14, 165, 233, .18);
}

body[data-workspace-mode="race_profiler"] #builder-actions .report-table-groups-card.polished-groups-card {
  border-color: rgba(13, 148, 136, .22);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(240,253,250,.72));
}

body[data-workspace-mode="race_profiler"] #builder-actions .report-table-groups-list {
  gap: 8px;
}

body[data-workspace-mode="race_profiler"] #builder-actions .report-group-toggle.race-profiler-report-group {
  border-color: rgba(13, 148, 136, .26);
  background: rgba(255, 255, 255, .92);
}

body[data-workspace-mode="race_profiler"] #builder-actions .report-group-toggle.race-profiler-report-group:hover {
  border-color: rgba(13, 148, 136, .42);
  background: #ffffff;
}

body[data-workspace-mode="race_profiler"] #race_profiler_official_rating_slot .race-profiler-rating-card {
  background: linear-gradient(180deg, #fff7ed, #ffffff);
  border-color: rgba(249, 115, 22, .24);
  box-shadow: 0 12px 30px rgba(249, 115, 22, .08);
}

body[data-workspace-mode="race_profiler"] #race_profiler_official_rating_slot .race-profiler-mini-note {
  color: #7c2d12;
  font-weight: 650;
}

body[data-workspace-mode="race_profiler"] #course-profile.profiler-course-advanced-hidden .course-select-card,
body[data-workspace-mode="race_profiler"] #race-conditions.profiler-race-conditions-mode .runners-hybrid-card {
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}

@media (max-width: 1220px) {
  .race-profiler-workflow-steps,
  body[data-workspace-mode="race_profiler"] #builder-actions .builder-action-grid.report-groups-layout {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .race-profiler-workflow-head {
    flex-direction: column;
  }
  .race-profiler-workflow-steps,
  body[data-workspace-mode="race_profiler"] #builder-actions .builder-action-grid.report-groups-layout {
    grid-template-columns: 1fr;
  }
}

/* Race Profiler Patch J: dedicated cohort overview deck */
.race-profiler-cohort-deck {
  margin: 0 0 20px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(11, 19, 39, 0.96), rgba(30, 53, 87, 0.88));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.race-profiler-cohort-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  margin-bottom: 16px;
}

.race-profiler-cohort-head h2 {
  margin: 4px 0 6px;
  color: #f8fafc;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.race-profiler-cohort-head p {
  max-width: 900px;
  margin: 0;
  color: rgba(226, 232, 240, 0.82);
  line-height: 1.55;
}

.race-profiler-cohort-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.race-profiler-cohort-actions button,
.race-profiler-section-map button {
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(15, 23, 42, 0.58);
  color: #e5e7eb;
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.race-profiler-cohort-actions button:hover,
.race-profiler-section-map button:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 211, 252, 0.72);
  background: rgba(14, 116, 144, 0.24);
}

.race-profiler-cohort-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}

.race-profiler-cohort-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: #dbeafe;
  font-size: 12px;
  line-height: 1.2;
}

.race-profiler-cohort-chip strong {
  color: #93c5fd;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 10px;
}

.race-profiler-section-map {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.race-profiler-section-map button {
  min-height: 92px;
  text-align: left;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 4px;
  align-items: start;
}

.race-profiler-section-map button span {
  grid-row: 1 / span 2;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.22);
  color: #bfdbfe;
  font-weight: 900;
  font-size: 12px;
}

.race-profiler-section-map button strong {
  color: #f8fafc;
  font-size: 13px;
  line-height: 1.2;
}

.race-profiler-section-map button em {
  color: rgba(203, 213, 225, 0.78);
  font-style: normal;
  font-size: 11px;
  line-height: 1.3;
}

@media (max-width: 1100px) {
  .race-profiler-section-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .race-profiler-cohort-head {
    grid-template-columns: 1fr;
  }
  .race-profiler-cohort-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .race-profiler-section-map {
    grid-template-columns: 1fr;
  }
}

/* Race Profiler Patch K: compact command centre and readiness guardrails */
.race-profiler-command-centre {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
  margin: 0 0 22px;
}

.race-profiler-command-centre[hidden] {
  display: none !important;
}

.race-profiler-command-centre .race-profiler-workflow-panel,
.race-profiler-command-centre .race-profiler-cohort-deck {
  margin: 0;
  height: 100%;
}

.race-profiler-command-centre .race-profiler-workflow-head {
  align-items: flex-start;
  gap: 14px;
}

.race-profiler-command-centre .race-profiler-workflow-head h2,
.race-profiler-command-centre .race-profiler-cohort-head h2 {
  font-size: 1.2rem;
}

.race-profiler-command-centre .race-profiler-workflow-head p,
.race-profiler-command-centre .race-profiler-cohort-head p {
  font-size: 0.86rem;
  line-height: 1.45;
}

.race-profiler-command-centre .race-profiler-workflow-steps {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.race-profiler-command-centre .race-profiler-step-card {
  min-height: 88px;
  padding: 12px;
}

.race-profiler-readiness {
  margin: 14px 0 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.13);
  background: linear-gradient(135deg, rgba(9,18,35,0.82), rgba(12,28,48,0.72));
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(220px, 1.05fr);
  gap: 12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.035);
}

.race-profiler-readiness.good {
  border-color: rgba(72, 187, 120, 0.32);
  background: linear-gradient(135deg, rgba(12,39,34,0.82), rgba(12,28,48,0.74));
}

.race-profiler-readiness.warn {
  border-color: rgba(245, 158, 11, 0.38);
  background: linear-gradient(135deg, rgba(54,38,12,0.82), rgba(12,28,48,0.74));
}

.race-profiler-readiness.note {
  border-color: rgba(96, 165, 250, 0.30);
}

.race-profiler-readiness-main strong {
  display: block;
  font-size: 1.05rem;
  color: #f8fbff;
  margin: 3px 0 5px;
}

.race-profiler-readiness-kicker {
  display: block;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.17em;
  color: rgba(190, 210, 235, 0.68);
  font-weight: 800;
}

.race-profiler-readiness-main p,
.race-profiler-readiness-note {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(220, 232, 246, 0.78);
}

.race-profiler-readiness-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.race-profiler-readiness-metrics span {
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.055);
  padding: 9px 8px;
  text-align: center;
}

.race-profiler-readiness-metrics strong {
  display: block;
  color: #ffffff;
  font-size: 1.05rem;
}

.race-profiler-readiness-metrics em {
  display: block;
  font-style: normal;
  color: rgba(214,225,239,0.72);
  font-size: 0.68rem;
  line-height: 1.2;
}

.race-profiler-readiness-note {
  grid-column: 1 / -1;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

@media (max-width: 1180px) {
  .race-profiler-command-centre {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .race-profiler-readiness {
    grid-template-columns: 1fr;
  }
  .race-profiler-readiness-metrics {
    grid-template-columns: 1fr;
  }
}

/* Race Profiler Patch N: deterministic cohort summary / confidence layer */
.race-profiler-output-layer {
  margin: 18px 0 20px;
  padding: 18px;
  border: 1px solid rgba(40, 180, 140, 0.28);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(7, 24, 48, 0.96), rgba(15, 42, 75, 0.92));
  color: #eef8ff;
  box-shadow: 0 18px 42px rgba(10, 26, 56, 0.22);
}

.race-profiler-output-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.race-profiler-output-kicker,
.race-profiler-card-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #5ff0be;
  font-weight: 900;
}

.race-profiler-output-head h3,
.race-profiler-output-card h4 {
  margin: 4px 0 0;
  color: #ffffff;
  font-weight: 900;
}

.race-profiler-market-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(95, 240, 190, 0.42);
  background: rgba(95, 240, 190, 0.12);
  color: #d9fff3;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.race-profiler-output-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.race-profiler-output-card {
  border: 1px solid rgba(163, 197, 235, 0.18);
  border-radius: 18px;
  padding: 16px;
  background: rgba(5, 17, 36, 0.68);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.race-profiler-output-card p {
  margin: 10px 0 0;
  line-height: 1.45;
  color: rgba(235, 246, 255, 0.84);
}

.race-profiler-cohort-summary,
.race-profiler-confidence-card {
  grid-column: 1 / -1;
}

.race-profiler-metric-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.race-profiler-metric-strip span {
  min-height: 72px;
  border-radius: 15px;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.09);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
}

.race-profiler-metric-strip strong {
  font-size: 1.18rem;
  color: #ffffff;
  font-weight: 950;
}

.race-profiler-metric-strip em {
  font-style: normal;
  font-size: 0.7rem;
  color: rgba(235, 246, 255, 0.72);
  font-weight: 800;
  letter-spacing: 0.03em;
}

.race-profiler-output-card.positive {
  border-color: rgba(95, 240, 190, 0.38);
  background: linear-gradient(135deg, rgba(6, 69, 56, 0.62), rgba(5, 17, 36, 0.68));
}

.race-profiler-output-card.warning {
  border-color: rgba(255, 191, 107, 0.42);
  background: linear-gradient(135deg, rgba(105, 66, 8, 0.46), rgba(5, 17, 36, 0.68));
}

.race-profiler-output-card.negative {
  border-color: rgba(255, 110, 130, 0.46);
  background: linear-gradient(135deg, rgba(95, 16, 28, 0.50), rgba(5, 17, 36, 0.68));
}

.race-profiler-output-card.placeholder-card {
  opacity: 0.96;
}

.race-profiler-warning-note {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 10px;
  color: rgba(255, 238, 203, 0.95) !important;
}

@media (max-width: 1100px) {
  .race-profiler-output-grid,
  .race-profiler-metric-strip {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .race-profiler-output-head {
    flex-direction: column;
  }
  .race-profiler-output-grid,
  .race-profiler-metric-strip {
    grid-template-columns: 1fr;
  }
}

/* Race Profiler Patch O: first-pass signal scan cards */
.race-profiler-signal-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.race-profiler-signal-row,
.race-profiler-signal-empty {
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,0.045);
}

.race-profiler-signal-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 10px;
  align-items: center;
}

.race-profiler-signal-strength {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(95, 240, 190, 0.13);
  border: 1px solid rgba(95, 240, 190, 0.28);
  color: #d9fff3;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.race-profiler-signal-main strong {
  color: #fff;
  font-weight: 950;
  min-width: 0;
}

.race-profiler-signal-main em {
  grid-column: 2;
  color: rgba(235,246,255,0.66);
  font-style: normal;
  font-size: 0.74rem;
  font-weight: 800;
}

.race-profiler-signal-evidence {
  margin-top: 9px;
  color: rgba(207,232,255,0.88);
  font-size: 0.78rem;
  font-weight: 850;
}

.race-profiler-signal-row p,
.race-profiler-signal-empty p {
  margin: 7px 0 0;
  color: rgba(235,246,255,0.78);
  font-size: 0.82rem;
}

.race-profiler-signal-empty strong {
  color: #fff;
  font-weight: 950;
}


/* Race Profiler Patch Q: safe signal framework, rule/review modals and pattern-review panel */
.race-profiler-output-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.race-profiler-rules-button,
.race-profiler-review-table-button {
  border: 1px solid rgba(16, 185, 129, 0.34);
  background: rgba(15, 23, 42, 0.72);
  color: #d1fae5;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.18);
}

.race-profiler-review-table-button {
  align-self: flex-start;
  margin-top: 4px;
  padding: 7px 10px;
  font-size: 0.78rem;
}

.race-profiler-rules-button:hover,
.race-profiler-review-table-button:hover {
  border-color: rgba(16, 185, 129, 0.7);
  background: rgba(6, 78, 59, 0.88);
}

.race-profiler-pattern-review {
  grid-column: 1 / -1;
  border-color: rgba(251, 191, 36, 0.42) !important;
  background: linear-gradient(135deg, rgba(47, 35, 6, 0.58), rgba(5, 17, 36, 0.72)) !important;
}

.race-profiler-pattern-review .race-profiler-card-kicker {
  color: #fde68a;
}

.race-profiler-signal-list--review {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.race-profiler-rules-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.race-profiler-rules-summary span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 10px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.race-profiler-rules-summary strong {
  color: #064e3b;
  font-size: 0.9rem;
}

.race-profiler-rules-summary em {
  color: #64748b;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.race-profiler-age-warning {
  border-color: rgba(245, 158, 11, 0.36) !important;
  background: rgba(254, 243, 199, 0.7) !important;
  color: #92400e !important;
}

.race-profiler-utility-modal[hidden] {
  display: none !important;
}

.race-profiler-utility-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.race-profiler-utility-backdrop {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: rgba(2, 6, 23, 0.68);
  backdrop-filter: blur(8px);
}

.race-profiler-utility-dialog {
  position: relative;
  z-index: 1;
  width: min(980px, 96vw);
  max-height: min(82vh, 760px);
  overflow: auto;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 30px 90px rgba(2, 6, 23, 0.38);
  padding: 24px;
}

.race-profiler-utility-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(248, 250, 252, 0.95);
  color: #0f172a;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.race-profiler-utility-head h3 {
  margin: 4px 42px 12px 0;
  color: #0f172a;
}

.race-profiler-modal-lead {
  margin: 0 0 14px;
  color: #334155;
  line-height: 1.55;
}

.race-profiler-rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.race-profiler-rule-grid > div {
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 16px;
  padding: 14px;
  background: rgba(248, 250, 252, 0.94);
}

.race-profiler-rule-grid strong {
  color: #064e3b;
}

.race-profiler-rule-grid p {
  margin: 7px 0 0;
  color: #475569;
  line-height: 1.45;
}

.race-profiler-review-table-wrap {
  overflow: auto;
  max-height: 56vh;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.race-profiler-review-table {
  min-width: 760px;
}

body.race-profiler-modal-open {
  overflow: hidden;
}


/* Patch Q1: readability and modal stacking fixes */
.race-profiler-confidence-card .race-profiler-rules-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.race-profiler-pattern-review .race-profiler-signal-row,
.race-profiler-pattern-review .race-profiler-signal-empty {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(251, 191, 36, 0.24);
}

.race-profiler-pattern-review .race-profiler-signal-main strong,
.race-profiler-pattern-review .race-profiler-signal-empty strong {
  color: #ffffff;
}

.race-profiler-pattern-review .race-profiler-signal-main em,
.race-profiler-pattern-review .race-profiler-signal-row p,
.race-profiler-pattern-review .race-profiler-signal-empty p {
  color: rgba(255, 247, 237, 0.82);
}

.race-profiler-pattern-review .race-profiler-signal-evidence {
  color: #dbeafe;
}

@media (max-width: 900px) {
  .race-profiler-confidence-card .race-profiler-rules-summary {
    grid-template-columns: 1fr;
  }
}

/* Patch Q3: Race Profiler evidence readability and first chart pass */
.race-profiler-signals-button {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(14, 116, 144, 0.18));
}

.race-profiler-utility-dialog {
  width: min(1220px, 96vw);
}

.race-profiler-signals-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.race-profiler-signals-review-grid > section {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.88);
  padding: 14px;
}

.race-profiler-signals-review-grid h4 {
  margin: 0 0 12px;
  color: #0f172a;
  font-weight: 950;
}

.race-profiler-signals-review-wide {
  grid-column: 1 / -1;
}

.race-profiler-expanded-signal-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 16px;
  background: #ffffff;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.race-profiler-expanded-signal-copy h4 {
  margin: 8px 0 4px;
  color: #0f172a;
  font-weight: 950;
}

.race-profiler-expanded-signal-copy em {
  display: block;
  color: #64748b;
  font-style: normal;
  font-weight: 800;
  font-size: 0.78rem;
}

.race-profiler-expanded-signal-copy p {
  color: #334155;
  line-height: 1.45;
  margin: 9px 0;
}

.race-profiler-expanded-signal-card .race-profiler-signal-evidence {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.045);
  border-radius: 12px;
  padding: 8px 10px;
}

.race-profiler-mini-chart {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.92);
  padding: 10px;
  margin: 0 0 14px;
}

.race-profiler-mini-chart-head,
.race-profiler-mini-chart-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(130px, 1.4fr) 54px 70px;
  gap: 8px;
  align-items: center;
}

.race-profiler-mini-chart-head {
  margin-bottom: 8px;
  color: #475569;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.race-profiler-mini-chart-row {
  min-height: 28px;
  font-size: 0.78rem;
  color: #0f172a;
}

.race-profiler-mini-chart-row > span {
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.race-profiler-mini-chart-row > div {
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.20);
  overflow: hidden;
}

.race-profiler-mini-chart-row i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #94a3b8;
}

.race-profiler-mini-chart-row.positive i {
  background: linear-gradient(90deg, #34d399, #2563eb);
}

.race-profiler-mini-chart-row.negative i {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.race-profiler-mini-chart-row b {
  font-weight: 950;
  color: #0f172a;
}

.race-profiler-mini-chart-row em {
  font-style: normal;
  color: #64748b;
  font-weight: 800;
}

.detail-breakdown-table tr.rp-row-positive-strong td,
.race-profiler-review-table tr.rp-row-positive-strong td {
  background: rgba(16, 185, 129, 0.16) !important;
}

.detail-breakdown-table tr.rp-row-positive-possible td,
.race-profiler-review-table tr.rp-row-positive-possible td {
  background: rgba(59, 130, 246, 0.11) !important;
}

.detail-breakdown-table tr.rp-row-negative-strong td,
.race-profiler-review-table tr.rp-row-negative-strong td {
  background: rgba(239, 68, 68, 0.13) !important;
}

.detail-breakdown-table tr.rp-row-negative-possible td,
.race-profiler-review-table tr.rp-row-negative-possible td {
  background: rgba(245, 158, 11, 0.13) !important;
}

.detail-breakdown-table tr.rp-row-low-pressure td,
.race-profiler-review-table tr.rp-row-low-pressure td {
  background: rgba(148, 163, 184, 0.10) !important;
}

.detail-breakdown-table tr[class*="rp-row-"] td:first-child,
.race-profiler-review-table tr[class*="rp-row-"] td:first-child {
  box-shadow: inset 4px 0 0 rgba(15, 23, 42, 0.14);
  font-weight: 900;
}

@media (max-width: 980px) {
  .race-profiler-signals-review-grid,
  .race-profiler-expanded-signal-card {
    grid-template-columns: 1fr;
  }
  .race-profiler-mini-chart-head,
  .race-profiler-mini-chart-row {
    grid-template-columns: minmax(100px, 1fr) minmax(100px, 1.2fr) 46px;
  }
  .race-profiler-mini-chart-row em,
  .race-profiler-mini-chart-head span {
    display: none;
  }
}

/* Patch Q3b: reapply setup warning UI and cleaner profiler review shell */
.race-profiler-warning-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(245, 158, 11, 0.48);
  background: rgba(254, 243, 199, 0.94);
  color: #92400e;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 950;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
}

.race-profiler-warning-pill.is-clear {
  border-color: rgba(16, 185, 129, 0.34);
  background: rgba(209, 250, 229, 0.88);
  color: #065f46;
}

.race-profiler-output-warning-line {
  margin: 10px 0 4px;
}

.race-profiler-warning-card-list {
  display: grid;
  gap: 12px;
}

.race-profiler-warning-card {
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-left: 5px solid rgba(245, 158, 11, 0.75);
  border-radius: 16px;
  background: rgba(255, 251, 235, 0.92);
  padding: 14px 16px;
}

.race-profiler-warning-card strong {
  display: block;
  color: #92400e;
  font-weight: 950;
  font-size: 1rem;
}

.race-profiler-warning-card span {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-weight: 850;
}

.race-profiler-warning-card p {
  margin: 9px 0 0;
  color: #334155;
  line-height: 1.45;
}

.race-profiler-warning-card em {
  display: block;
  margin-top: 8px;
  color: #166534;
  font-style: normal;
  font-weight: 850;
}

.race-profiler-cohort-actions #raceProfilerSetupWarningSlot {
  display: inline-flex;
}

.race-profiler-signals-review-grid > section {
  min-width: 0;
}

.race-profiler-expanded-signal-card {
  align-items: start;
}

@media (min-width: 1200px) {
  .race-profiler-utility-dialog {
    width: min(1320px, 94vw);
  }
}


/* Patch Q4: Race Profiler presentation/evidence pass */
body[data-workspace-mode="race_profiler"] .race-profiler-command-centre {
  width: 100%;
  max-width: none;
}

body[data-workspace-mode="race_profiler"] .race-profiler-cohort-deck {
  width: 100%;
  padding: 16px 18px 18px;
}

body[data-workspace-mode="race_profiler"] .race-profiler-cohort-head {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) auto;
  align-items: start;
  gap: 14px;
}

body[data-workspace-mode="race_profiler"] .race-profiler-cohort-head p {
  max-width: 620px;
}

body[data-workspace-mode="race_profiler"] .race-profiler-cohort-chips {
  margin-top: 12px;
}

body[data-workspace-mode="race_profiler"] .race-profiler-section-map {
  margin-top: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

body[data-workspace-mode="race_profiler"] .race-profiler-section-map button {
  min-height: 82px;
  padding: 12px 12px;
}

body[data-workspace-mode="race_profiler"] .race-profiler-readiness {
  grid-template-columns: minmax(260px, 1.2fr) minmax(300px, 1fr);
  margin: 12px 0 10px;
}

.race-profiler-utility-dialog {
  width: min(1500px, 96vw);
  max-height: min(90vh, 920px);
  padding: 26px;
}

.race-profiler-signals-review-grid {
  gap: 20px;
}

.race-profiler-signals-review-grid > section {
  padding: 18px;
  background: rgba(248, 250, 252, 0.96);
}

.race-profiler-expanded-signal-card {
  grid-template-columns: minmax(360px, 0.92fr) minmax(420px, 1.08fr);
  gap: 20px;
  padding: 18px;
  border-radius: 18px;
}

.race-profiler-expanded-signal-copy h4 {
  font-size: 1.04rem;
}

.race-profiler-expanded-signal-copy p {
  font-size: 0.92rem;
}

.race-profiler-expanded-signal-card .race-profiler-signal-evidence {
  font-size: 0.86rem;
  line-height: 1.35;
  min-height: 74px;
}

.race-profiler-mini-chart {
  padding: 14px;
  border-radius: 16px;
  background: #f8fafc;
}

.race-profiler-mini-chart-head,
.race-profiler-mini-chart-row {
  grid-template-columns: minmax(130px, 1fr) minmax(190px, 1.5fr) 60px 88px;
  gap: 10px;
}

.race-profiler-mini-chart-row {
  min-height: 32px;
}

.race-profiler-mini-chart-row > div {
  height: 12px;
}

/* Row evidence colours: bad = yellow/orange/red, good = blue/green/deeper green. */
.detail-breakdown-table tr.rp-row-good-light td,
.race-profiler-review-table tr.rp-row-good-light td {
  background: rgba(186, 230, 253, 0.45) !important;
}

.detail-breakdown-table tr.rp-row-good-medium td,
.race-profiler-review-table tr.rp-row-good-medium td {
  background: rgba(187, 247, 208, 0.52) !important;
}

.detail-breakdown-table tr.rp-row-good-strong td,
.race-profiler-review-table tr.rp-row-good-strong td {
  background: rgba(134, 239, 172, 0.68) !important;
}

.detail-breakdown-table tr.rp-row-bad-light td,
.race-profiler-review-table tr.rp-row-bad-light td {
  background: rgba(254, 240, 138, 0.48) !important;
}

.detail-breakdown-table tr.rp-row-bad-medium td,
.race-profiler-review-table tr.rp-row-bad-medium td {
  background: rgba(253, 186, 116, 0.52) !important;
}

.detail-breakdown-table tr.rp-row-bad-strong td,
.race-profiler-review-table tr.rp-row-bad-strong td {
  background: rgba(252, 165, 165, 0.62) !important;
}

.detail-breakdown-table tr.rp-row-neutral-low-pressure td,
.race-profiler-review-table tr.rp-row-neutral-low-pressure td {
  background: rgba(226, 232, 240, 0.42) !important;
}

.detail-breakdown-table tr.rp-row-good-light td:first-child,
.race-profiler-review-table tr.rp-row-good-light td:first-child { box-shadow: inset 5px 0 0 rgba(14, 165, 233, 0.75); }
.detail-breakdown-table tr.rp-row-good-medium td:first-child,
.race-profiler-review-table tr.rp-row-good-medium td:first-child { box-shadow: inset 5px 0 0 rgba(34, 197, 94, 0.75); }
.detail-breakdown-table tr.rp-row-good-strong td:first-child,
.race-profiler-review-table tr.rp-row-good-strong td:first-child { box-shadow: inset 5px 0 0 rgba(21, 128, 61, 0.85); }
.detail-breakdown-table tr.rp-row-bad-light td:first-child,
.race-profiler-review-table tr.rp-row-bad-light td:first-child { box-shadow: inset 5px 0 0 rgba(234, 179, 8, 0.85); }
.detail-breakdown-table tr.rp-row-bad-medium td:first-child,
.race-profiler-review-table tr.rp-row-bad-medium td:first-child { box-shadow: inset 5px 0 0 rgba(249, 115, 22, 0.82); }
.detail-breakdown-table tr.rp-row-bad-strong td:first-child,
.race-profiler-review-table tr.rp-row-bad-strong td:first-child { box-shadow: inset 5px 0 0 rgba(220, 38, 38, 0.82); }

@media (max-width: 1180px) {
  body[data-workspace-mode="race_profiler"] .race-profiler-section-map,
  body[data-workspace-mode="race_profiler"] .race-profiler-cohort-head,
  body[data-workspace-mode="race_profiler"] .race-profiler-readiness,
  .race-profiler-expanded-signal-card {
    grid-template-columns: 1fr;
  }
}

/* Patch Q5A: Race Profiler signals workspace, dropdown regression guard, and prompt-summary layout */
body[data-workspace-mode="race_profiler"] #page-builder {
  width: 100% !important;
  max-width: none !important;
}

body[data-workspace-mode="race_profiler"] .race-profiler-command-centre,
body[data-workspace-mode="race_profiler"] #raceProfilerCommandCentre {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  justify-self: stretch !important;
  grid-column: 1 / -1 !important;
}

body[data-workspace-mode="race_profiler"] .race-profiler-cohort-deck {
  width: 100% !important;
  max-width: none !important;
}

body[data-workspace-mode="race_profiler"] .race-profiler-cohort-head {
  grid-template-columns: minmax(520px, 1fr) auto !important;
}

body[data-workspace-mode="race_profiler"] .race-profiler-section-map button {
  min-height: 76px !important;
}

/* Defensive dropdown guard: keep course and bred lookup panels above Race Profiler overlays/cards. */
body.course-picker-is-open #page-builder,
body.bred-picker-is-open #page-builder,
body.course-picker-is-open .section,
body.bred-picker-is-open .section,
body.course-picker-is-open .section-body,
body.bred-picker-is-open .section-body,
body.course-picker-is-open .layout-grid,
body.bred-picker-is-open .layout-grid,
body.course-picker-is-open .card,
body.bred-picker-is-open .card {
  overflow: visible !important;
}

body.course-picker-is-open #course_picker,
#course_picker.open,
body.bred-picker-is-open #bred_picker,
#bred_picker.open {
  position: relative !important;
  z-index: 2147483600 !important;
  pointer-events: auto !important;
}

#course_picker.open .course-picker-panel,
body.course-picker-is-open #course_picker_panel,
#bred_picker.open .course-picker-panel,
body.bred-picker-is-open #bred_picker .course-picker-panel {
  display: flex !important;
  position: absolute !important;
  z-index: 2147483640 !important;
  pointer-events: auto !important;
  background: #fff !important;
}

/* Main report now shows prompt summaries only; the full detail lives in Signals Review. */
.race-profiler-signal-summary-shell {
  grid-column: 1 / -1;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.race-profiler-signal-summary-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 124px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(86, 229, 184, 0.22);
  background: linear-gradient(135deg, rgba(7, 17, 31, 0.92), rgba(15, 34, 56, 0.82));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
}

.race-profiler-signal-summary-card h4 {
  margin: 4px 0 8px;
  color: #f8fafc;
  font-size: 1.05rem;
}

.race-profiler-signal-summary-card p {
  margin: 0;
  color: rgba(226, 232, 240, .84);
  line-height: 1.45;
}

.race-profiler-signal-summary-examples {
  margin-top: 8px !important;
  color: rgba(191, 219, 254, .88) !important;
}

.race-profiler-signal-summary-card--winner { border-color: rgba(96, 165, 250, .32); }
.race-profiler-signal-summary-card--elimination { border-color: rgba(251, 146, 60, .32); }
.race-profiler-signal-summary-card--review { border-color: rgba(250, 204, 21, .32); }

.race-profiler-utility-modal .race-profiler-utility-dialog {
  width: min(1680px, 97vw) !important;
  max-height: min(94vh, 1040px) !important;
}

.race-profiler-signals-workspace {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.race-profiler-signals-nav {
  position: sticky;
  top: 0;
  display: grid;
  gap: 8px;
  align-self: start;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fafc, #eef6ff);
}

.race-profiler-signals-nav button {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid #d8e2ee;
  background: #fff;
  color: #0f172a;
  border-radius: 13px;
  padding: 10px 11px;
  font-weight: 900;
  cursor: pointer;
  text-align: left;
}

.race-profiler-signals-nav button.active,
.race-profiler-signals-nav button:hover {
  border-color: #22c55e;
  background: #ecfdf5;
  color: #065f46;
}

.race-profiler-signals-nav span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 0.78rem;
}

.race-profiler-signals-main {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.race-profiler-signals-main > section {
  padding: 18px;
  border: 1px solid #dbe3ef;
  border-radius: 20px;
  background: rgba(255,255,255,.96);
}

.race-profiler-signals-main > section > h4 {
  margin: 0 0 14px;
  color: #0f172a;
  font-size: 1.06rem;
}

.race-profiler-signals-overview {
  display: grid;
  gap: 12px;
}

.race-profiler-signals-overview .race-profiler-signal-summary-card {
  background: linear-gradient(135deg, #f8fafc, #eef6ff);
  border-color: #dbeafe;
}

.race-profiler-signals-overview .race-profiler-signal-summary-card h4,
.race-profiler-signals-overview .race-profiler-signal-summary-card p,
.race-profiler-signals-overview .race-profiler-signal-summary-examples {
  color: #0f172a !important;
}

.race-profiler-expanded-signal-card {
  grid-template-columns: minmax(360px, 0.78fr) minmax(460px, 1.22fr) !important;
  margin-bottom: 12px;
}

.race-profiler-expanded-signal-card:last-child { margin-bottom: 0; }

@media (max-width: 1100px) {
  body[data-workspace-mode="race_profiler"] .race-profiler-cohort-head,
  .race-profiler-signal-summary-card,
  .race-profiler-signals-workspace,
  .race-profiler-expanded-signal-card {
    grid-template-columns: 1fr !important;
  }
  .race-profiler-signals-nav {
    position: relative;
  }
}

/* Patch Q5B: Race Profiler chart workspace and table + charts view */
.race-profiler-chart-view-button {
  border: 1px solid rgba(16,185,129,.34);
  background: linear-gradient(135deg, rgba(14,116,144,.12), rgba(16,185,129,.12));
  color: #064e3b;
  border-radius: 999px;
  padding: 7px 13px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(15,23,42,.08);
}
.race-profiler-chart-view-button:hover {
  border-color: rgba(16,185,129,.74);
  background: #ecfdf5;
}
body[data-workspace-mode="race_profiler"] .detail-breakdown-header {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: start;
  gap: 16px;
}
body[data-workspace-mode="race_profiler"] .detail-breakdown-chart-slot {
  align-self: center;
  justify-self: center;
}
body[data-workspace-mode="race_profiler"] .detail-breakdown-header-ranking .detail-breakdown-chart-slot {
  grid-column: 2;
  justify-self: center;
}
.race-profiler-table-chart-view {
  display: grid;
  grid-template-columns: minmax(460px, .92fr) minmax(620px, 1.08fr);
  gap: 18px;
  align-items: start;
}
.race-profiler-table-chart-source,
.race-profiler-table-chart-charts {
  min-width: 0;
}
.race-profiler-table-chart-source h4,
.race-profiler-table-chart-charts h4 {
  margin: 0 0 10px;
  color: #0f172a;
  font-weight: 950;
}
.race-profiler-table-chart-view .race-profiler-review-table-wrap {
  max-height: 68vh;
}
.race-profiler-review-table-wrap--compact {
  max-height: 235px;
  margin: 10px 0 12px;
  border-radius: 13px;
}
.race-profiler-review-table-wrap--compact table {
  min-width: 640px;
  font-size: .76rem;
}
.race-profiler-review-table-wrap--compact th,
.race-profiler-review-table-wrap--compact td {
  padding: 6px 7px !important;
}
.race-profiler-chart-pack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.rp-chart-panel {
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  padding: 12px;
  min-width: 0;
}
.rp-chart-panel h5 {
  margin: 0 0 10px;
  color: #334155;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 950;
}
.rp-chart-line {
  display: grid;
  grid-template-columns: minmax(94px, 1fr) minmax(120px, 1.3fr) 70px;
  gap: 8px;
  align-items: center;
  min-height: 26px;
  font-size: .76rem;
}
.rp-chart-line span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #0f172a;
  font-weight: 850;
}
.rp-chart-line b {
  color: #0f172a;
  font-weight: 950;
  text-align: right;
}
.rp-chart-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: #e5eaf0;
  overflow: hidden;
}
.rp-chart-track i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: #94a3b8;
}
.rp-chart-line.positive .rp-chart-track i {
  background: linear-gradient(90deg, #38bdf8, #22c55e);
}
.rp-chart-line.negative .rp-chart-track i {
  background: linear-gradient(90deg, #fbbf24, #ef4444);
}
.rp-chart-track--ae u {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: rgba(15,23,42,.36);
  z-index: 2;
}
.rp-chart-track--diverging {
  overflow: visible;
}
.rp-chart-track--diverging::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: rgba(15,23,42,.28);
  z-index: 2;
}
.rp-chart-track--diverging i {
  z-index: 1;
}
.race-profiler-expanded-signal-card--charts {
  grid-template-columns: minmax(420px, .86fr) minmax(620px, 1.14fr) !important;
  align-items: start;
}
.race-profiler-expanded-chart-pack {
  min-width: 0;
}
.race-profiler-expanded-chart-pack .race-profiler-chart-pack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 1300px) {
  .race-profiler-table-chart-view,
  .race-profiler-expanded-signal-card--charts {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 900px) {
  body[data-workspace-mode="race_profiler"] .detail-breakdown-header,
  .race-profiler-chart-pack,
  .race-profiler-expanded-chart-pack .race-profiler-chart-pack {
    grid-template-columns: 1fr !important;
  }
  .rp-chart-line {
    grid-template-columns: minmax(90px, 1fr) minmax(110px, 1fr) 62px;
  }
}

/* Patch Q5C — Race Profiler chart workspace correction */
.race-profiler-utility-modal {
  padding: 18px !important;
}
.race-profiler-utility-dialog {
  width: min(1540px, 96vw) !important;
  max-height: min(92vh, 920px) !important;
  padding: 24px !important;
}
.race-profiler-table-chart-view,
.race-profiler-table-chart-view--stacked {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 20px !important;
  align-items: stretch !important;
}
.race-profiler-table-chart-view .race-profiler-review-table-wrap {
  max-height: none !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
}
.race-profiler-table-chart-view .race-profiler-review-table {
  width: max-content;
  min-width: 100%;
}
.race-profiler-table-chart-source,
.race-profiler-table-chart-charts {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  background: #fff;
  padding: 14px;
}
.race-profiler-table-chart-source h4,
.race-profiler-table-chart-charts h4 {
  margin: 0 0 12px !important;
}
.race-profiler-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: #f8fafc;
  color: #334155;
  font-size: .78rem;
  font-weight: 800;
}
.race-profiler-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.race-profiler-chart-legend i {
  width: 22px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}
.race-profiler-chart-legend .legend-good { background: linear-gradient(90deg, #38bdf8, #22c55e); }
.race-profiler-chart-legend .legend-bad { background: linear-gradient(90deg, #fbbf24, #ef4444); }
.race-profiler-chart-legend .legend-neutral { background: #94a3b8; }
.race-profiler-chart-pack {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
}
.rp-chart-panel--svg {
  min-height: 320px;
  padding: 14px 14px 10px !important;
}
.rp-svg-chart {
  width: 100%;
  height: 250px;
  display: block;
  overflow: visible;
}
.rp-svg-zero,
.rp-svg-ref {
  stroke: rgba(15, 23, 42, 0.26);
  stroke-width: 2;
  stroke-dasharray: 4 4;
}
.rp-svg-ref {
  stroke: rgba(20, 83, 45, 0.55);
}
.rp-svg-ref-label {
  fill: #14532d;
  font-size: 11px;
  font-weight: 900;
}
.rp-svg-bar rect {
  fill: #94a3b8;
}
.rp-svg-bar--positive rect {
  fill: url(#unused);
  fill: #22c55e;
}
.rp-svg-bar--negative rect {
  fill: #f97316;
}
.rp-svg-bar--neutral rect {
  fill: #94a3b8;
}
.rp-svg-bar text {
  fill: #334155;
  font-size: 11px;
  font-weight: 800;
}
.rp-chart-value-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 8px;
  color: #475569;
  font-size: .72rem;
}
.rp-chart-value-preview span {
  white-space: nowrap;
}
.race-profiler-expanded-signal-card--preview,
.race-profiler-expanded-signal-card--charts {
  display: block !important;
  grid-template-columns: none !important;
}
.race-profiler-expanded-signal-card--preview .race-profiler-expanded-signal-copy {
  width: 100%;
}
.race-profiler-expanded-signal-card--preview .race-profiler-review-table-wrap--compact {
  width: 100%;
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
}
.race-profiler-expanded-signal-card--preview .race-profiler-review-table-wrap--compact table {
  min-width: 900px;
  width: max-content;
}
@media (max-width: 1100px) {
  .race-profiler-chart-pack {
    grid-template-columns: 1fr !important;
  }
  .race-profiler-utility-dialog {
    width: 98vw !important;
    max-height: 94vh !important;
  }
}

/* Patch Q5D — Race Profiler chart workflow and visual polish */
.race-profiler-utility-dialog {
  width: min(1580px, 97vw) !important;
  max-height: min(94vh, 960px) !important;
  padding: 24px 28px 28px !important;
  scrollbar-gutter: stable both-edges;
}
.race-profiler-utility-close {
  position: fixed !important;
  top: 22px !important;
  right: 28px !important;
  z-index: 2147483002 !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}
.race-profiler-table-chart-source,
.race-profiler-table-chart-charts {
  border-radius: 20px !important;
}
.race-profiler-table-chart-view .race-profiler-review-table-wrap {
  border-radius: 16px !important;
}
.race-profiler-chart-pack {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 18px !important;
}
.rp-chart-panel--svg {
  min-height: 350px !important;
  padding: 16px 16px 12px !important;
  overflow: hidden;
}
.rp-svg-chart {
  height: 285px !important;
}
.rp-svg-line {
  fill: none;
  stroke: #2563eb;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rp-svg-line-area {
  fill: rgba(37, 99, 235, 0.08);
}
.rp-svg-point circle {
  fill: #94a3b8;
  stroke: #fff;
  stroke-width: 2;
}
.rp-svg-point--positive circle {
  fill: #22c55e;
}
.rp-svg-point--negative circle {
  fill: #f97316;
}
.rp-svg-point--neutral circle {
  fill: #94a3b8;
}
.rp-svg-point text,
.rp-svg-bar text {
  fill: #334155;
  font-size: 11px;
  font-weight: 850;
}
.rp-chart-panel--line h5::after {
  content: "line view";
  margin-left: 8px;
  font-size: .62rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #64748b;
}
.rp-chart-panel--pl h5::after {
  content: "profit bars";
}
.rp-chart-value-preview {
  max-height: 38px;
  overflow: hidden;
}
@media (max-width: 1150px) {
  .race-profiler-chart-pack {
    grid-template-columns: 1fr !important;
  }
  .rp-chart-panel--svg {
    min-height: 330px !important;
  }
}

/* Patch Q5E — Race Profiler UI polish + binary chart redesign */
body[data-workspace-mode="race_profiler"] .detail-breakdown-header-ranking {
  grid-template-columns: minmax(260px, 1fr) minmax(190px, auto) minmax(170px, 1fr) !important;
  grid-template-areas:
    "title badge meta"
    "description description description" !important;
}
body[data-workspace-mode="race_profiler"] .detail-breakdown-ranking-slot {
  min-width: 180px !important;
}
body[data-workspace-mode="race_profiler"] .detail-breakdown-ranking-slot .race-profiler-chart-view-button {
  padding: 9px 18px !important;
  background: linear-gradient(135deg, #d1fae5, #ecfeff) !important;
}
body[data-workspace-mode="race_profiler"] .detail-breakdown-title-row .detail-breakdown-badge.ranking-badge,
body[data-workspace-mode="race_profiler"] .detail-breakdown-ranking-slot .ranking-badge {
  display: none !important;
}

.race-profiler-utility-modal {
  padding: 24px 34px 24px 24px !important;
}
.race-profiler-utility-dialog {
  width: min(1560px, calc(100vw - 82px)) !important;
  max-height: min(94vh, 960px) !important;
  padding: 26px 34px 30px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-gutter: stable !important;
}
.race-profiler-utility-close {
  position: sticky !important;
  top: 0 !important;
  float: right !important;
  margin: -12px -18px 0 0 !important;
  transform: translate(7px, -7px) !important;
  z-index: 2147483002 !important;
  background: #f8fafc !important;
  border: 1px solid rgba(15, 23, 42, 0.14) !important;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.14) !important;
}
.race-profiler-utility-head {
  clear: both;
}

.race-profiler-signal-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.race-profiler-signal-card-head h4 {
  margin: 0 !important;
  color: #0f172a !important;
  font-size: 1.08rem !important;
}
.race-profiler-signal-strength {
  color: #ffffff !important;
  background: linear-gradient(135deg, #0f766e, #14b8a6) !important;
  border-color: rgba(20, 184, 166, .45) !important;
  text-shadow: none !important;
}
.race-profiler-signal-subline {
  display: block;
  margin: 0 0 8px;
  color: #64748b;
  font-style: normal;
  font-weight: 850;
  letter-spacing: .02em;
}
.race-profiler-signal-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: 14px;
  align-items: stretch;
  margin-top: 10px;
}
.race-profiler-signal-table-area {
  min-width: 0;
}
.race-profiler-signal-insight {
  border: 1px solid rgba(20, 184, 166, .22);
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fafc, #eefcf8);
  padding: 12px;
  min-width: 0;
}
.race-profiler-signal-insight > span {
  display: block;
  margin-bottom: 9px;
  color: #0f766e;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .68rem;
}
.race-profiler-signal-insight dl {
  margin: 0;
  display: grid;
  gap: 7px;
}
.race-profiler-signal-insight dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, .18);
  padding-bottom: 5px;
}
.race-profiler-signal-insight dt {
  color: #64748b;
  font-weight: 800;
}
.race-profiler-signal-insight dd {
  margin: 0;
  color: #0f172a;
  font-weight: 950;
  text-align: right;
}
.race-profiler-signal-insight p {
  margin: 10px 0 0 !important;
  color: #334155 !important;
  font-size: .82rem;
  line-height: 1.42;
}

.race-profiler-chart-note {
  margin: 0 0 12px;
  padding: 9px 11px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 13px;
  background: #f8fafc;
  color: #475569;
  font-size: .8rem;
  font-weight: 800;
}
.race-profiler-chart-legend {
  display: none !important;
}
.rp-chart-panel--line h5::after,
.rp-chart-panel--pl h5::after {
  content: "" !important;
  margin-left: 0 !important;
}
.rp-chart-panel h5 {
  letter-spacing: .11em !important;
}
.rp-chart-panel--svg {
  min-height: 330px !important;
}
.rp-svg-line-area {
  fill: rgba(37, 99, 235, 0.065) !important;
}
.rp-chart-panel--pl .rp-svg-line {
  stroke: #0f766e !important;
}
.rp-chart-panel--pl .rp-svg-line-area {
  fill: rgba(20, 184, 166, 0.055) !important;
}

.race-profiler-chart-pack--binary {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.rp-chart-panel--binary-gap .rp-svg-chart {
  height: 285px !important;
}
.rp-binary-axis-label,
.rp-binary-value-label,
.rp-binary-legend text {
  fill: #334155;
  font-size: 12px;
  font-weight: 850;
}
.rp-binary-gap-line {
  stroke: rgba(100, 116, 139, .65);
  stroke-width: 2.5;
}
.rp-binary-dot {
  stroke: #fff;
  stroke-width: 2;
}
.rp-binary-dot-a {
  fill: #f97316;
}
.rp-binary-dot-b {
  fill: #14b8a6;
}
.rp-chart-panel--binary-bars {
  display: grid;
  align-content: start;
  gap: 14px;
}
.rp-binary-bar-group {
  display: grid;
  gap: 7px;
}
.rp-binary-bar-group > strong {
  color: #334155;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.rp-binary-sidebar {
  display: grid;
  grid-template-columns: minmax(74px, .7fr) minmax(180px, 1.6fr) 78px;
  align-items: center;
  gap: 9px;
  min-height: 25px;
}
.rp-binary-sidebar span {
  color: #0f172a;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rp-binary-sidebar i {
  height: 12px;
  border-radius: 999px;
  background: #94a3b8;
  display: block;
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.04);
}
.rp-binary-sidebar--a i {
  background: linear-gradient(90deg, #fed7aa, #f97316);
}
.rp-binary-sidebar--b i {
  background: linear-gradient(90deg, #99f6e4, #14b8a6);
}
.rp-binary-sidebar--negative i {
  background: linear-gradient(90deg, #fdba74, #ef4444);
}
.rp-binary-sidebar b {
  text-align: right;
  color: #0f172a;
  font-weight: 950;
}

@media (max-width: 1180px) {
  .race-profiler-signal-card-body,
  .race-profiler-chart-pack--binary {
    grid-template-columns: 1fr !important;
  }
}


/* Patch Q5F: Race Profiler onboarding, setup guide and compact setup UI */
body[data-workspace-mode="race_profiler"] .race-profiler-cohort-head {
  grid-template-columns: minmax(620px, 1fr) auto !important;
  align-items: start !important;
}

body[data-workspace-mode="race_profiler"] .race-profiler-cohort-head p {
  max-width: 980px !important;
  margin-top: 8px !important;
  padding: 12px 14px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(125, 211, 252, 0.16) !important;
  background: rgba(15, 23, 42, 0.26) !important;
  color: rgba(230, 242, 255, 0.86) !important;
  line-height: 1.52 !important;
}

body[data-workspace-mode="race_profiler"] .race-profiler-cohort-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 10px !important;
  max-width: 680px !important;
}

body[data-workspace-mode="race_profiler"] .race-profiler-start-guide {
  min-width: 240px !important;
  color: #064e3b !important;
  background: linear-gradient(180deg, #d1fae5, #ecfdf5) !important;
  border-color: rgba(16, 185, 129, 0.52) !important;
  box-shadow: 0 16px 34px rgba(16, 185, 129, 0.16) !important;
}

body[data-workspace-mode="race_profiler"] .race-profiler-section-map {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

body[data-workspace-mode="race_profiler"] .race-profiler-section-map button {
  min-height: 118px !important;
  align-content: start !important;
  gap: 7px !important;
  text-align: left !important;
}

body[data-workspace-mode="race_profiler"] .race-profiler-section-map button strong {
  font-size: 0.95rem !important;
  line-height: 1.15 !important;
}

body[data-workspace-mode="race_profiler"] .race-profiler-section-map button em {
  font-size: 0.73rem !important;
  line-height: 1.38 !important;
  color: rgba(215, 229, 247, 0.82) !important;
}

body[data-workspace-mode="race_profiler"] .race-profiler-readiness {
  grid-template-columns: minmax(320px, 1.15fr) minmax(480px, 1.35fr) !important;
  align-items: stretch !important;
  margin: 12px 0 12px !important;
  padding: 14px !important;
}

body[data-workspace-mode="race_profiler"] .race-profiler-readiness-metrics {
  align-self: stretch !important;
}

body[data-workspace-mode="race_profiler"] #builder-actions .section-guide-cta {
  gap: 8px !important;
}

body[data-workspace-mode="race_profiler"] #builder-actions .section-guide-cta > span {
  display: none !important;
}

body[data-workspace-mode="race_profiler"] #builder-actions .section-description {
  max-width: 980px !important;
}

body[data-workspace-mode="race_profiler"] #builder-actions .report-groups-layout {
  grid-template-columns: minmax(260px, 0.58fr) minmax(620px, 1.42fr) !important;
  gap: 14px !important;
}

body[data-workspace-mode="race_profiler"] #builder-actions .report-option-copy {
  font-size: 0.78rem !important;
  line-height: 1.48 !important;
}

body[data-workspace-mode="race_profiler"] #builder-actions .report-table-groups-list {
  gap: 6px !important;
}

body[data-workspace-mode="race_profiler"] #builder-actions .report-group-toggle {
  min-height: 42px !important;
  padding: 8px 12px !important;
}

body[data-workspace-mode="race_profiler"] #builder-actions .report-table-groups-intro {
  font-size: 0.83rem !important;
  line-height: 1.45 !important;
}

/* Race setup: put Distance and Official Rating on one row in Race Profiler. */
body[data-workspace-mode="race_profiler"] #race .distance-range-card.meta-distance {
  grid-column: 1 / 10 !important;
  grid-row: 2 !important;
}

body[data-workspace-mode="race_profiler"] #race_profiler_official_rating_slot {
  grid-column: 10 / 13 !important;
  grid-row: 2 !important;
  margin: 0 !important;
  align-self: stretch !important;
}

body[data-workspace-mode="race_profiler"] #race_profiler_official_rating_slot .race-profiler-rating-card {
  min-height: 100% !important;
  padding: 16px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}

body[data-workspace-mode="race_profiler"] #race_profiler_official_rating_slot .race-profiler-mini-note {
  font-size: 0.75rem !important;
  line-height: 1.35 !important;
  margin: 6px 0 10px !important;
}

body[data-workspace-mode="race_profiler"] .race-profiler-official-rating-inputs {
  max-width: 230px !important;
}

/* Course / Track Context should open with track context visible in Race Profiler. */
body[data-workspace-mode="race_profiler"] #course-profile.profiler-course-compact .course-row1 {
  grid-template-columns: minmax(300px, 1.15fr) repeat(2, minmax(180px, 0.9fr)) !important;
}

body[data-workspace-mode="race_profiler"] #course-profile.profiler-course-advanced-hidden .course-direction-card,
body[data-workspace-mode="race_profiler"] #course-profile.profiler-course-advanced-hidden .course-topography-card,
body[data-workspace-mode="race_profiler"] #course-profile.profiler-course-advanced-hidden .course-row2,
body[data-workspace-mode="race_profiler"] #course-profile.profiler-course-advanced-hidden .course-row3 {
  display: revert !important;
}

/* Larger, clearer guide in Race Profiler mode. */
body[data-workspace-mode="race_profiler"] .builder-guide-panel {
  width: min(1320px, 94vw) !important;
  max-height: min(90vh, 920px) !important;
}

body[data-workspace-mode="race_profiler"] .builder-guide-content {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

body[data-workspace-mode="race_profiler"] .builder-guide-content section {
  min-height: 138px !important;
}

body[data-workspace-mode="race_profiler"] .builder-guide-content h3 {
  font-size: 0.98rem !important;
}

body[data-workspace-mode="race_profiler"] .builder-guide-content p {
  font-size: 0.87rem !important;
  line-height: 1.6 !important;
}

@media (max-width: 1180px) {
  body[data-workspace-mode="race_profiler"] .race-profiler-section-map,
  body[data-workspace-mode="race_profiler"] .race-profiler-cohort-head,
  body[data-workspace-mode="race_profiler"] .race-profiler-readiness,
  body[data-workspace-mode="race_profiler"] #builder-actions .report-groups-layout,
  body[data-workspace-mode="race_profiler"] .builder-guide-content {
    grid-template-columns: 1fr !important;
  }

  body[data-workspace-mode="race_profiler"] #race .distance-range-card.meta-distance,
  body[data-workspace-mode="race_profiler"] #race_profiler_official_rating_slot {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
  }
}

/* === 2026-05-19 UI-A: shared report chrome and status cleanup ===
   Scope: visual-only report overlay polish. Keeps progress strips and report logic intact. */
.quick-report-window-header{
  min-height: 58px !important;
  padding: 10px 18px !important;
  background:
    linear-gradient(135deg, rgba(248,250,252,.96) 0%, rgba(240,249,255,.88) 44%, rgba(255,247,237,.70) 100%) !important;
  border-bottom: 1px solid rgba(148,163,184,.22) !important;
  box-shadow: 0 10px 26px rgba(15,23,42,.055) !important;
}
.quick-report-window-kicker{
  font-size: 9.5px !important;
  letter-spacing: .12em !important;
  color: #64748b !important;
}
.quick-report-window-header h2{
  font-size: 20px !important;
  letter-spacing: -.025em !important;
}
.quick-report-window-actions .mini-button{
  height: 32px !important;
  padding: 0 12px !important;
  border-radius: 11px !important;
  background: rgba(255,255,255,.72) !important;
  border-color: rgba(148,163,184,.42) !important;
  box-shadow: 0 8px 18px rgba(15,23,42,.055), inset 0 1px 0 rgba(255,255,255,.82) !important;
}
.quick-report-window-actions .mini-button:hover{
  transform: translateY(-1px) !important;
  box-shadow: 0 10px 22px rgba(15,23,42,.085), inset 0 1px 0 rgba(255,255,255,.9) !important;
}
.quick-report-window-actions .mini-button.danger{
  background: rgba(255,241,242,.78) !important;
  border-color: rgba(244,63,94,.22) !important;
  color: #be123c !important;
}
.quick-report-window-market-slot .quick-overlay-market-mode-badge,
.quick-overlay-market-mode-badge{
  padding: 7px 15px !important;
  min-height: 30px !important;
  font-size: 12px !important;
  letter-spacing: .055em !important;
  text-transform: none !important;
  background: rgba(236,253,245,.78) !important;
  border-color: rgba(20,184,166,.24) !important;
  color: #065f46 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78) !important;
}
.quick-status-bar{
  min-height: 30px !important;
  padding: 6px 12px !important;
  border-radius: 13px !important;
  font-size: 12.5px !important;
  line-height: 1.28 !important;
  font-weight: 800 !important;
  letter-spacing: .005em !important;
  background: rgba(248,250,252,.74) !important;
  border-color: rgba(148,163,184,.22) !important;
  color: #475569 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.76) !important;
}
.quick-status-bar.status-complete,
.quick-status-bar.status-ready,
.quick-status-bar.status-compact{
  min-height: 28px !important;
  padding: 5px 11px !important;
  background: rgba(236,253,245,.56) !important;
  border-color: rgba(34,197,94,.18) !important;
  color: #166534 !important;
}
.quick-status-bar.status-running{
  background: rgba(255,247,237,.72) !important;
  border-color: rgba(245,158,11,.23) !important;
  color: #9a3412 !important;
}
.quick-status-bar.status-error{
  background: rgba(254,242,242,.84) !important;
  border-color: rgba(239,68,68,.22) !important;
  color: #991b1b !important;
}
.detailed-progress-card{
  padding: 13px 14px !important;
  border-radius: 18px !important;
  box-shadow: 0 12px 30px rgba(15,23,42,.045) !important;
}
.detailed-progress-card .card-title{
  margin-bottom: 9px !important;
  font-size: 11px !important;
  letter-spacing: .14em !important;
}
.detailed-progress-list{
  gap: 8px !important;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
}
.detailed-progress-step{
  min-height: 44px !important;
  padding: 8px 10px !important;
  border-radius: 13px !important;
}
.detailed-progress-step span{
  width: 20px !important;
  height: 20px !important;
  flex-basis: 20px !important;
  font-size: 11px !important;
}
.detailed-progress-copy strong{font-size:11.5px!important;}
.detailed-progress-copy em{font-size:9.5px!important;letter-spacing:.04em!important;}
.detailed-next-card{
  display: flex !important;
  align-items: center !important;
  gap: 10px 12px !important;
  flex-wrap: wrap !important;
  margin-top: 10px !important;
  padding: 10px 12px !important;
  border-radius: 13px !important;
  background: rgba(236,253,245,.52) !important;
  border-color: rgba(16,185,129,.20) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72) !important;
}
.detailed-next-card strong{
  font-size: 12.5px !important;
  color:#065f46 !important;
}
.detailed-next-card p{
  margin: 0 !important;
  font-size: 12.5px !important;
  line-height: 1.35 !important;
  color: #475569 !important;
}
.detailed-next-meta{
  margin-top: 0 !important;
  margin-left: auto !important;
  font-size: 11.5px !important;
  color: #047857 !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
}
@media(max-width: 980px){
  .quick-report-window-header{grid-template-columns: 1fr !important;}
  .quick-report-window-market-slot{justify-content:flex-start!important;min-width:0!important;}
  .quick-report-window-actions{justify-self:start!important;}
  .detailed-next-meta{margin-left:0!important;white-space:normal!important;}
}


/* === 2026-05-19 Patch UI-B: shared builder-page polish === */
/* Softer shared sticky action rail for Main Builder and Race Profiler. */
.builder-sticky-actions{
  left:calc(285px + 64px) !important;
  right:64px !important;
  bottom:18px !important;
  z-index:30000 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:12px !important;
  padding:8px 16px !important;
  border-radius:999px !important;
  border:1px solid rgba(148,163,184,.26) !important;
  background:rgba(248,250,252,.88) !important;
  backdrop-filter:blur(18px) saturate(1.08) !important;
  box-shadow:0 16px 38px rgba(15,23,42,.18), 0 1px 0 rgba(255,255,255,.8) inset !important;
  overflow:hidden !important;
  isolation:isolate !important;
}
.builder-sticky-actions::before{
  content:none !important;
  display:none !important;
}
.builder-sticky-actions .btn{
  min-width:132px !important;
  min-height:34px !important;
  padding:8px 16px !important;
  border-radius:999px !important;
  font-size:12px !important;
  line-height:1.05 !important;
  letter-spacing:.035em !important;
  box-shadow:none !important;
}
.builder-sticky-actions .btn.quick,
.builder-sticky-actions .btn.deep,
.builder-sticky-actions .btn.extended{
  color:#fff !important;
  border:1px solid rgba(255,255,255,.18) !important;
}
.builder-sticky-actions .btn.save,
.builder-sticky-actions .btn.load,
.builder-sticky-actions .btn.clear{
  min-width:112px !important;
  background:rgba(255,255,255,.82) !important;
  color:#334155 !important;
  border:1px solid rgba(203,213,225,.7) !important;
}
.builder-sticky-actions .btn:disabled{
  opacity:.48 !important;
  filter:saturate(.72) !important;
}
.builder-sticky-actions .sticky-divider{
  width:1px !important;
  height:22px !important;
  margin:0 2px !important;
  background:rgba(148,163,184,.35) !important;
}
body{padding-bottom:82px !important;}
.toast-message{bottom:86px !important;}

/* Shorter, more polished top report/table group selector. */
#builder-actions .section-header.report-actions-header{
  min-height:108px !important;
  padding:22px 28px !important;
}
#builder-actions .section-body{
  padding:20px 22px 22px !important;
}
#builder-actions .section-description{
  max-width:640px !important;
  font-size:13px !important;
  line-height:1.42 !important;
}
.report-actions-header .section-guide-cta{
  min-width:220px !important;
}
.report-actions-header .section-guide-button{
  min-width:220px !important;
  padding:11px 24px !important;
  font-size:11.5px !important;
}
.report-actions-header .section-guide-cta > span{
  letter-spacing:.16em !important;
}
.report-groups-layout{
  grid-template-columns:minmax(280px,.58fr) minmax(640px,1.42fr) !important;
  gap:14px !important;
  align-items:stretch !important;
}
.polished-report-card,
.polished-groups-card{
  padding:14px !important;
}
.polished-report-card .report-option-list{
  gap:10px !important;
}
.polished-report-card .report-option{
  padding:12px 13px !important;
  border-radius:15px !important;
}
.polished-report-card .report-option .btn{
  min-height:38px !important;
  margin-bottom:8px !important;
  font-size:12px !important;
}
.polished-report-card .report-option p{
  font-size:11.8px !important;
  line-height:1.42 !important;
  color:#42526b !important;
}
.polished-groups-card .report-table-groups-header{
  margin-bottom:9px !important;
  gap:10px !important;
}
.polished-groups-card .report-table-groups-intro{
  margin-top:4px !important;
  font-size:12.2px !important;
  line-height:1.38 !important;
  max-width:900px !important;
}
.polished-groups-card .report-table-groups-list{
  gap:6px !important;
}
.report-table-groups-card .report-group-toggle,
.polished-groups-card .report-group-toggle{
  min-height:34px !important;
  padding:6px 38px 6px 9px !important;
  border-radius:11px !important;
  font-size:11.4px !important;
  box-shadow:0 4px 10px rgba(15,23,42,.035) !important;
}
.polished-groups-card .report-group-toggle span:nth-of-type(1){
  font-size:11.4px !important;
  line-height:1.05 !important;
}
.polished-groups-card .report-group-toggle small{
  font-size:9.6px !important;
  opacity:.72 !important;
}
.report-group-help,
.report-group-help.report-help-trigger{
  right:9px !important;
  width:16px !important;
  height:16px !important;
  min-width:16px !important;
  min-height:16px !important;
  line-height:16px !important;
  font-size:10px !important;
}
.report-table-group-count{
  padding:6px 9px !important;
  font-size:10px !important;
}
.polished-groups-card .report-table-groups-note{
  margin-top:8px !important;
  padding:7px 10px !important;
  font-size:11.6px !important;
  line-height:1.3 !important;
}
.report-groups-layout .polished-management-card{
  grid-column:1 / -1 !important;
  grid-template-columns:auto minmax(360px,1fr) auto !important;
  gap:18px !important;
  padding:12px 16px !important;
}
.polished-management-card .management-copy{
  font-size:12px !important;
  line-height:1.35 !important;
  max-width:780px !important;
}
.polished-management-card .secondary-actions .btn{
  min-height:36px !important;
  min-width:116px !important;
  padding:8px 14px !important;
}

/* Race Profiler Profile Areas / workflow compaction without changing behaviour. */
body[data-workspace-mode="race_profiler"] #builder-actions .section-header.report-actions-header{
  min-height:104px !important;
}
body[data-workspace-mode="race_profiler"] .race-profiler-cohort-deck{
  padding:14px 16px 16px !important;
}
body[data-workspace-mode="race_profiler"] .race-profiler-cohort-head p{
  padding:10px 13px !important;
  line-height:1.42 !important;
  font-size:13px !important;
}
body[data-workspace-mode="race_profiler"] .race-profiler-readiness{
  margin:10px 0 !important;
}
body[data-workspace-mode="race_profiler"] .race-profiler-section-map{
  gap:9px !important;
  margin-top:10px !important;
}
body[data-workspace-mode="race_profiler"] .race-profiler-section-map button{
  min-height:96px !important;
  padding:10px 11px !important;
  gap:5px !important;
}
body[data-workspace-mode="race_profiler"] .race-profiler-section-map button strong{
  font-size:.88rem !important;
}
body[data-workspace-mode="race_profiler"] .race-profiler-section-map button em{
  font-size:.69rem !important;
  line-height:1.31 !important;
}
body[data-workspace-mode="race_profiler"] .report-groups-layout{
  grid-template-columns:minmax(255px,.55fr) minmax(620px,1.45fr) !important;
}
body[data-workspace-mode="race_profiler"] .report-groups-layout .polished-management-card{
  display:none !important;
}
body[data-workspace-mode="race_profiler"] .polished-report-card .report-option{
  padding:11px 12px !important;
}
body[data-workspace-mode="race_profiler"] .polished-report-card .report-option p{
  font-size:11.8px !important;
  line-height:1.38 !important;
}
body[data-workspace-mode="race_profiler"] .profiler-section-toggle{
  text-transform:none !important;
  letter-spacing:.02em !important;
}
body[data-workspace-mode="race_profiler"] .profiler-section-toggle::first-letter{
  text-transform:uppercase;
}

/* Tidy left navigation labels that used to wrap awkwardly. */
.builder-context-label{
  margin-left:18px !important;
  letter-spacing:.12em !important;
}
.current-builder-link{
  font-size:12px !important;
  line-height:1.15 !important;
}
#builderContextNav .subnav a{
  line-height:1.18 !important;
}

@media(max-width:1450px){
  .builder-sticky-actions{left:24px !important;right:24px !important;gap:10px !important;flex-wrap:wrap !important;border-radius:22px !important;}
  .builder-sticky-actions .btn{min-width:122px !important;}
  .report-groups-layout{grid-template-columns:1fr !important;}
  .report-groups-layout .polished-management-card{grid-template-columns:1fr !important;}
}
@media(max-width:760px){
  .builder-sticky-actions{left:12px !important;right:12px !important;bottom:10px !important;}
  .builder-sticky-actions .btn{min-width:104px !important;padding:8px 12px !important;}
  #builder-actions .section-header.report-actions-header{padding:18px !important;}
}

/* Patch UI-C: shared table charts, ranking-badge polish and minor Race Profiler alignment */
.detail-breakdown-chart-slot{
  align-self:center;
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:150px;
}
.detail-chart-view-button{
  font-size:12px;
  padding:8px 16px;
}
.detail-breakdown-header:not(.detail-breakdown-header-ranking){
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  align-items:start;
  gap:16px;
}
.detail-breakdown-header:not(.detail-breakdown-header-ranking) .detail-breakdown-header-meta{
  align-self:center;
}
.detail-breakdown-header-ranking{
  grid-template-columns:minmax(260px,1fr) minmax(320px,auto) minmax(170px,1fr)!important;
}
.detail-breakdown-ranking-slot{
  gap:10px!important;
  flex-wrap:wrap!important;
}
.detail-breakdown-ranking-slot .ranking-badge,
.detail-breakdown-title-row .detail-breakdown-badge.ranking-badge{
  background:rgba(236,253,245,.72)!important;
  border:1px solid rgba(16,185,129,.24)!important;
  color:#047857!important;
  box-shadow:none!important;
  font-size:10px!important;
  letter-spacing:.045em!important;
  padding:5px 10px!important;
  opacity:.86!important;
}
.detail-breakdown-ranking-slot .detail-chart-view-button{
  padding:8px 16px!important;
}
body[data-workspace-mode="race_profiler"] .detail-breakdown-ranking-slot .ranking-badge{
  display:none!important;
}
body[data-workspace-mode="race_profiler"] .profiler-optional-section.profiler-collapsed .profiler-header-actions{
  margin-left:auto!important;
  min-width:480px!important;
  justify-content:space-between!important;
  flex-wrap:nowrap!important;
}
body[data-workspace-mode="race_profiler"] .profiler-optional-section.profiler-collapsed .section-reset-button{
  width:150px!important;
  justify-content:center!important;
}
body[data-workspace-mode="race_profiler"] .profiler-optional-section.profiler-collapsed .profiler-section-toggle{
  width:172px!important;
  justify-content:center!important;
}
@media(max-width:1300px){
  .detail-breakdown-header:not(.detail-breakdown-header-ranking){grid-template-columns:1fr;}
  .detail-breakdown-chart-slot{justify-content:flex-start;}
  .detail-breakdown-header-ranking{grid-template-columns:1fr!important;grid-template-areas:"title" "badge" "meta" "description"!important;}
  body[data-workspace-mode="race_profiler"] .profiler-optional-section.profiler-collapsed .profiler-header-actions{min-width:0!important;flex-wrap:wrap!important;}
}

/* Patch UI-D: align profiler collapsed actions and ranking-table chart buttons */
body[data-workspace-mode="race_profiler"] .profiler-optional-section .profiler-header-actions{
  margin-left:auto !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:18px !important;
  flex-wrap:nowrap !important;
  min-width:0 !important;
}
body[data-workspace-mode="race_profiler"] .profiler-optional-section .profiler-section-toggle{
  order:1 !important;
  width:172px !important;
  justify-content:center !important;
}
body[data-workspace-mode="race_profiler"] .profiler-optional-section .section-reset-button{
  order:2 !important;
  width:150px !important;
  justify-content:center !important;
}
body[data-workspace-mode="race_profiler"] .profiler-optional-section.profiler-collapsed .profiler-header-actions{
  margin-left:auto !important;
  min-width:0 !important;
  justify-content:flex-end !important;
  gap:18px !important;
}
.detail-breakdown-header.detail-breakdown-header-ranking{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto auto !important;
  grid-template-areas:none !important;
  align-items:start !important;
  gap:16px !important;
}
.detail-breakdown-header.detail-breakdown-header-ranking .detail-breakdown-heading-block{
  min-width:0 !important;
}
.detail-breakdown-header.detail-breakdown-header-ranking .detail-breakdown-title-row{
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
  flex-wrap:wrap !important;
}
.detail-breakdown-header.detail-breakdown-header-ranking .detail-breakdown-chart-slot{
  align-self:center !important;
  justify-content:center !important;
}
.detail-breakdown-header.detail-breakdown-header-ranking .detail-breakdown-header-meta{
  align-self:center !important;
  justify-self:end !important;
}
.detail-breakdown-header.detail-breakdown-header-ranking .detail-breakdown-badge.ranking-badge{
  margin-left:6px !important;
}
@media(max-width:1300px){
  .detail-breakdown-header.detail-breakdown-header-ranking{
    grid-template-columns:1fr !important;
  }
  .detail-breakdown-header.detail-breakdown-header-ranking .detail-breakdown-chart-slot,
  .detail-breakdown-header.detail-breakdown-header-ranking .detail-breakdown-header-meta{
    justify-self:start !important;
  }
  body[data-workspace-mode="race_profiler"] .profiler-optional-section .profiler-header-actions{
    flex-wrap:wrap !important;
  }
}


/* Patch UI-E: final alignment fixes for optional-section controls and ranking table chart buttons */
body[data-workspace-mode="race_profiler"] .profiler-optional-section .section-header{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
}
body[data-workspace-mode="race_profiler"] .profiler-optional-section .profiler-header-actions{
  margin-left:auto !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:18px !important;
  flex:0 0 auto !important;
  min-width:0 !important;
  width:auto !important;
}
body[data-workspace-mode="race_profiler"] .profiler-optional-section .profiler-section-toggle{
  order:1 !important;
  width:172px !important;
  justify-content:center !important;
}
body[data-workspace-mode="race_profiler"] .profiler-optional-section .section-reset-button{
  order:2 !important;
  width:150px !important;
  justify-content:center !important;
  margin-left:0 !important;
}
.detail-breakdown-header.detail-breakdown-header-ranking{
  display:flex !important;
  align-items:flex-start !important;
  justify-content:flex-start !important;
  gap:16px !important;
  grid-template-columns:none !important;
  grid-template-areas:none !important;
}
.detail-breakdown-header.detail-breakdown-header-ranking .detail-breakdown-heading-block{
  flex:1 1 auto !important;
  min-width:0 !important;
}
.detail-breakdown-header.detail-breakdown-header-ranking .detail-breakdown-chart-slot{
  flex:0 0 auto !important;
  margin-left:auto !important;
  align-self:center !important;
  justify-content:flex-end !important;
}
.detail-breakdown-header.detail-breakdown-header-ranking .detail-breakdown-header-meta{
  flex:0 0 auto !important;
  align-self:center !important;
  justify-self:auto !important;
}
@media(max-width:1300px){
  .detail-breakdown-header.detail-breakdown-header-ranking{
    flex-wrap:wrap !important;
  }
  .detail-breakdown-header.detail-breakdown-header-ranking .detail-breakdown-chart-slot{
    margin-left:0 !important;
  }
  body[data-workspace-mode="race_profiler"] .profiler-optional-section .profiler-header-actions{
    flex-wrap:wrap !important;
  }
}


/* Patch UI-F: table interpretation, tooltips and confidence guidance */
.detail-table-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  margin-left: 6px;
  font-size: 11px;
  font-weight: 900;
  color: #0f172a;
  background: linear-gradient(180deg, #dbeafe, #bfdbfe);
  border: 1px solid rgba(37, 99, 235, .28);
  cursor: help;
  vertical-align: middle;
}

.detail-breakdown-guide-pills,
.detail-interpretation-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.detail-breakdown-guide-pills span,
.detail-interpretation-tags span,
.race-profiler-signal-group-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  color: #334155;
  background: rgba(226, 232, 240, .82);
  border: 1px solid rgba(148, 163, 184, .45);
}

.detail-interpretation-panel {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(59, 130, 246, .20);
  background: linear-gradient(135deg, rgba(239, 246, 255, .98), rgba(248, 250, 252, .98));
  color: #1e293b;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .06);
}

.detail-interpretation-panel.compact {
  margin: 0 14px 12px;
  padding: 12px 14px;
}

.detail-interpretation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.detail-interpretation-head span {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
  font-weight: 900;
  color: #2563eb;
}

.detail-interpretation-head strong {
  font-size: 12px;
  color: #0f172a;
}

.detail-interpretation-panel p {
  margin: 0;
  line-height: 1.5;
  font-size: 13px;
}

.race-profiler-confidence-facts,
.race-profiler-confidence-advice {
  margin-top: 8px !important;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .58);
  border: 1px solid rgba(148, 163, 184, .24);
  font-size: 12px;
  font-weight: 700;
}

.race-profiler-evidence-group {
  color: #334155;
}

.race-profiler-signal-group-chip {
  margin: 6px 0 2px;
  width: fit-content;
  background: rgba(219, 234, 254, .88);
  color: #1d4ed8;
}

.main-builder-broad-warning {
  margin: 10px 0 12px;
  padding: 13px 16px;
  border-radius: 16px;
  border: 1px solid rgba(245, 158, 11, .42);
  background: linear-gradient(135deg, rgba(255, 251, 235, .98), rgba(254, 243, 199, .96));
  color: #78350f;
  box-shadow: 0 12px 26px rgba(146, 64, 14, .10);
}

.main-builder-broad-warning strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.main-builder-broad-warning p {
  margin: 0;
  line-height: 1.45;
  font-size: 13px;
}

/* Patch UI-F hotfix: consolidated table guides */
.detail-breakdown-title-row .detail-table-help {
  display: none !important;
}
.detail-breakdown-chart-slot {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.detail-table-guide-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(59, 130, 246, .20);
  border-radius: 999px;
  background: rgba(239, 246, 255, .96);
  color: #1e3a8a;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .01em;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
}
.detail-table-guide-toggle:hover,
.detail-table-guide-toggle:focus-visible {
  background: #dbeafe;
  border-color: rgba(37, 99, 235, .35);
  outline: none;
  transform: translateY(-1px);
}
.detail-table-guides-hidden .detail-interpretation-panel {
  display: none !important;
}
.detail-interpretation-panel.compact,
.detail-interpretation-panel {
  margin: 0 0 16px !important;
  padding: 16px 18px !important;
  width: 100%;
  box-sizing: border-box;
  border-radius: 18px;
  border: 1px solid rgba(59, 130, 246, .22);
  background: linear-gradient(135deg, rgba(239, 246, 255, .98), rgba(248, 250, 252, .98));
}
.detail-interpretation-head {
  margin-bottom: 8px;
  justify-content: flex-start;
}
.detail-interpretation-description {
  margin: 0 0 10px !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  color: #475569 !important;
  font-weight: 700;
}
.detail-interpretation-copy {
  margin: 0 0 8px !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  color: #1e293b !important;
}
.detail-interpretation-guidance {
  margin: 0 0 10px !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  color: #334155 !important;
  font-weight: 800;
}
.detail-interpretation-tags {
  margin-top: 10px !important;
}
.detail-breakdown-heading-block > p,
.detail-breakdown-guide-pills {
  display: none !important;
}
@media(max-width:900px) {
  .detail-breakdown-chart-slot {
    justify-content: flex-start;
  }
  .detail-table-guide-toggle {
    padding: 9px 12px;
  }
}

/* === Patch UI-G: table-guide wording + NH race-age expansion + compact setup controls === */
/* Race setup top row: keep race-code chips on one line where desktop width allows it. */
#race #race_code_group {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 10px !important;
}
body[data-workspace-mode="race_profiler"] #race #race_code_group {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}
#race #race_code_group .chip {
  min-width: 0 !important;
  padding-left: 10px !important;
  padding-right: 10px !important;
}

/* Compact the large range cards in race setup and field-size controls. */
#race .distance-range-card.meta-distance,
#race .meta-class,
#race-conditions .runners-hybrid-card {
  min-height: 0 !important;
  padding-top: 14px !important;
  padding-bottom: 14px !important;
}
#race .distance-range-card .range-current,
#race .meta-class .range-current,
#race-conditions .runners-hybrid-card .range-current {
  margin-top: 4px !important;
  margin-bottom: 8px !important;
}
#race .range-hybrid-control,
#race .distance-hybrid-control,
#race-conditions .range-hybrid-control,
#race-conditions .compact-hybrid-control {
  gap: 14px !important;
  min-height: 0 !important;
}
#race .distance-value-card,
#race .hybrid-value-card,
#race-conditions .distance-value-card,
#race-conditions .hybrid-value-card {
  min-height: 68px !important;
  padding: 10px 12px !important;
}
#race .distance-slider-zone,
#race .hybrid-slider-zone,
#race-conditions .hybrid-slider-zone {
  padding-top: 8px !important;
}
#race .note.distance-yards-summary,
#race #class_filter_note_visible {
  margin-top: 8px !important;
}

/* Race Age layout: two clean rows, Flat on row one and National Hunt on row two. */
#race #race_age_flat_card {
  grid-column: 1 / 7 !important;
  grid-row: 4 !important;
}
#race #race_age_flat_extra_card {
  grid-column: 7 / 13 !important;
  grid-row: 4 !important;
}
#race #race_age_nh_card {
  grid-column: 1 / 7 !important;
  grid-row: 5 !important;
}
#race #race_age_nh_extra_card {
  grid-column: 7 / 13 !important;
  grid-row: 5 !important;
}
#race #race_age_flat_card .chips,
#race #race_age_flat_extra_card .chips,
#race #race_age_nh_card .chips,
#race #race_age_nh_extra_card .chips {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 10px !important;
}
#race #race_age_flat_card .chip,
#race #race_age_flat_extra_card .chip,
#race #race_age_nh_card .chip,
#race #race_age_nh_extra_card .chip {
  flex: 1 1 96px !important;
  max-width: 150px !important;
  min-width: 82px !important;
}
#race #race_age_nh_extra_card .chip {
  flex-basis: 86px !important;
}

/* Move the lower race setup row down after the expanded age section. */
#race .meta-class,
#race .section-body > .race-meta-class-row > .meta-class {
  grid-column: 1 / 6 !important;
  grid-row: 6 !important;
  min-height: 160px !important;
}
#race .meta-class-subtypes,
#race .section-body > .race-meta-class-row > .meta-class-subtypes {
  grid-column: 6 / 10 !important;
  grid-row: 6 !important;
  min-height: 160px !important;
}
#race .meta-handicap,
#race .section-body > .race-meta-row1 > .meta-handicap,
#race .race-meta-row1 .meta-handicap {
  grid-column: 10 / 13 !important;
  grid-row: 6 !important;
  min-height: 160px !important;
}

@media (max-width: 1450px) {
  #race #race_code_group,
  body[data-workspace-mode="race_profiler"] #race #race_code_group {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 1300px) {
  #race #race_age_flat_card,
  #race #race_age_flat_extra_card,
  #race #race_age_nh_card,
  #race #race_age_nh_extra_card,
  #race .meta-class,
  #race .meta-class-subtypes,
  #race .meta-handicap {
    grid-column: 1 !important;
    grid-row: auto !important;
  }
}

/* === UI-H: Race Meta alignment + Class 1 subtype wording support === */
#race .meta-country,
#race .meta-race-code {
  justify-content: flex-start !important;
  min-height: 136px !important;
}

#race .meta-country .card-title,
#race .meta-race-code .card-title {
  margin-bottom: 16px !important;
}

#race .meta-country .chips,
#race .meta-race-code .chips {
  align-items: center !important;
}

#race .meta-country .note {
  margin-top: 14px !important;
}

#race #race_code_group {
  grid-template-columns: repeat(6, minmax(116px, 1fr)) !important;
}

#race #group_grade_listed_card .chips.single-line .chip {
  min-width: 0 !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
}

@media (max-width: 1550px) {
  #race #race_code_group {
    grid-template-columns: repeat(3, minmax(128px, 1fr)) !important;
  }
}

/* === UI-I: Shared Race Meta decongestion + Course & Distance Profile layout === */
/* Distance controls now live in Course & Distance Profile, so Race Meta only carries race identity. */
#course-profile .course-distance-row,
#course-profile .course-distance-presets {
  width: 100% !important;
}

#course-profile .course-distance-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
}

#course-profile .course-distance-presets {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 16px !important;
}

#course-profile .course-distance-row .distance-range-card {
  min-height: 176px !important;
}

#course-profile .course-distance-presets .card,
#course-profile .course-direction-card,
#course-profile .course-topography-card,
#course-profile .course-race-direction-card,
#course-profile .course-style-card,
#course-profile .course-features-card {
  min-height: 88px !important;
  padding-top: 16px !important;
  padding-bottom: 16px !important;
}

#course-profile .course-distance-presets .chip,
#course-profile .course-direction-card .chip,
#course-profile .course-topography-card .chip,
#course-profile .course-race-direction-card .chip,
#course-profile .course-style-card .chip,
#course-profile .course-features-card .chip {
  min-height: 34px !important;
}

/* Race Meta row order after moving distance out. */
#race #race_age_flat_card {
  grid-column: 1 / 7 !important;
  grid-row: 2 !important;
}
#race #race_age_flat_extra_card {
  grid-column: 7 / 13 !important;
  grid-row: 2 !important;
}
#race #race_age_nh_card {
  grid-column: 1 / 7 !important;
  grid-row: 3 !important;
}
#race #race_age_nh_extra_card {
  grid-column: 7 / 13 !important;
  grid-row: 3 !important;
}

#race .meta-class,
#race .section-body > .race-meta-class-row > .meta-class {
  grid-column: 1 / 6 !important;
  grid-row: 4 !important;
  min-height: 154px !important;
}

#race .meta-class-subtypes,
#race .section-body > .race-meta-class-row > .meta-class-subtypes {
  grid-column: 6 / 11 !important;
  grid-row: 4 !important;
  min-height: 154px !important;
}

#race .meta-handicap,
#race .section-body > .race-meta-row1 > .meta-handicap,
#race .race-meta-row1 .meta-handicap {
  grid-column: 11 / 13 !important;
  grid-row: 4 !important;
  min-height: 154px !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
}

#race .meta-handicap .chips {
  grid-template-columns: repeat(2, minmax(92px, 1fr)) !important;
  gap: 10px !important;
}

#race .meta-class-subtypes .chips,
#race #group_grade_listed_card .chips.single-line {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

#race #group_grade_listed_card .chips.single-line .chip {
  white-space: nowrap !important;
  padding-left: 10px !important;
  padding-right: 10px !important;
  font-size: 13px !important;
}

/* Remove old Race Meta distance row influence now the controls are no longer in #race. */
#race .section-body > .race-meta-distance,
#race .section-body > .race-meta-presets {
  display: none !important;
}

body[data-workspace-mode="race_profiler"] #course-profile.profiler-course-compact .course-row1 {
  grid-template-columns: minmax(300px, 1.35fr) repeat(2, minmax(170px, .82fr)) !important;
}

body[data-workspace-mode="race_profiler"] #course-profile.profiler-course-advanced-hidden .course-distance-row,
body[data-workspace-mode="race_profiler"] #course-profile.profiler-course-advanced-hidden .course-distance-presets {
  display: grid !important;
}

@media (max-width: 1500px) {
  #race #group_grade_listed_card .chips.single-line .chip {
    font-size: 12.5px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}

@media (max-width: 1300px) {
  #course-profile .course-distance-presets {
    grid-template-columns: 1fr !important;
  }

  #race #race_age_flat_card,
  #race #race_age_flat_extra_card,
  #race #race_age_nh_card,
  #race #race_age_nh_extra_card,
  #race .meta-class,
  #race .meta-class-subtypes,
  #race .meta-handicap {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  #race .meta-handicap .chips {
    max-width: 420px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* === UI-J: Race setup alignment and Official Rating Range relocation === */
/* Official Rating Range now belongs in Race Conditions, not the Race Meta grid. */
#race-conditions #race_profiler_official_rating_slot {
  display: block !important;
  grid-column: auto !important;
  grid-row: auto !important;
  margin: 0 !important;
  align-self: stretch !important;
}

#race-conditions #race_profiler_official_rating_slot[hidden] {
  display: none !important;
}

#race-conditions #race_profiler_official_rating_slot .race-conditions-rating-card {
  height: 100% !important;
  min-height: 0 !important;
  padding: 18px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  border-color: rgba(249, 115, 22, .24) !important;
  background: linear-gradient(180deg, #fff7ed, #ffffff) !important;
  box-shadow: 0 12px 28px rgba(249, 115, 22, .075) !important;
}

#race-conditions #race_profiler_official_rating_slot .race-profiler-mini-note {
  margin: 6px auto 10px !important;
  max-width: 320px !important;
  color: #7c2d12 !important;
  font-size: .75rem !important;
  line-height: 1.35 !important;
  text-align: center !important;
  font-weight: 650 !important;
}

#race-conditions #race_profiler_official_rating_slot .race-profiler-official-rating-inputs {
  max-width: 230px !important;
  margin: 0 auto !important;
}

#race-conditions #race_profiler_official_rating_slot .race-profiler-official-rating-inputs input {
  text-align: center !important;
  font-weight: 800 !important;
}

/* System Builder: make room by compressing Jockey Race Type and placing Official Rating beside it. */
body[data-workspace-mode="system_builder"] #race-conditions .grid.race-top {
  grid-template-columns: minmax(0, 1.45fr) minmax(190px, .42fr) minmax(230px, .48fr) !important;
  align-items: stretch !important;
}

body[data-workspace-mode="system_builder"] #race-conditions .jockey-race-type-card {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  min-height: 0 !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
}

body[data-workspace-mode="system_builder"] #race-conditions .jockey-race-type-card .card-title {
  margin-bottom: 12px !important;
}

body[data-workspace-mode="system_builder"] #race-conditions .jockey-race-type-card .chips {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 9px !important;
  max-width: 220px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Race Profiler: pair Number of Runners with Official Rating Range in the field-size row. */
body[data-workspace-mode="race_profiler"] #race_profiler_field_size_slot {
  display: grid !important;
  grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr) !important;
  gap: 16px !important;
  align-items: stretch !important;
}

body[data-workspace-mode="race_profiler"] #race_profiler_field_size_slot .runners-hybrid-card {
  min-width: 0 !important;
}

body[data-workspace-mode="race_profiler"] #race_profiler_field_size_slot #race_profiler_official_rating_slot {
  min-width: 0 !important;
}

/* Race Meta alignment: keep Class 1 Subtypes and Handicap title/chip rows visually level. */
#race .meta-class-subtypes,
#race .meta-handicap {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
}

#race .meta-class-subtypes .card-title,
#race .meta-handicap .card-title {
  margin-top: 16px !important;
  margin-bottom: 16px !important;
  min-height: 20px !important;
}

#race .meta-class-subtypes .chips,
#race .meta-handicap .chips {
  align-items: center !important;
}

#race .meta-class-subtypes .note {
  margin-top: 14px !important;
}

@media (max-width: 1320px) {
  body[data-workspace-mode="system_builder"] #race-conditions .grid.race-top,
  body[data-workspace-mode="race_profiler"] #race_profiler_field_size_slot {
    grid-template-columns: 1fr !important;
  }

  body[data-workspace-mode="system_builder"] #race-conditions .jockey-race-type-card .chips {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    max-width: none !important;
  }
}

/* === UI-K: state repair and layout stabilisation === */
/* Race Profiler optional sections are now class-controlled only. Main Builder never displays the profiler-only toggle. */
body[data-workspace-mode="system_builder"] .profiler-section-toggle,
body:not([data-workspace-mode="race_profiler"]) .profiler-section-toggle {
  display: none !important;
}
body[data-workspace-mode="system_builder"] .section-body {
  display: block;
}

/* Race Meta: align Class 1 Subtypes and Handicap by giving both cards the same internal vertical stack. */
#race .meta-class-subtypes,
#race .meta-handicap {
  display: grid !important;
  grid-template-rows: auto auto minmax(0, 1fr) !important;
  align-content: start !important;
  justify-content: stretch !important;
  align-items: start !important;
}
#race .meta-class-subtypes .card-title,
#race .meta-handicap .card-title {
  margin: 14px 0 14px !important;
  min-height: 20px !important;
  align-self: start !important;
}
#race .meta-class-subtypes .chips,
#race .meta-handicap .chips,
#race #group_grade_listed_card .chips.single-line {
  align-self: start !important;
  width: 100% !important;
}
#race .meta-class-subtypes .note {
  margin-top: 13px !important;
  align-self: start !important;
}

/* Race Profiler: align Jockey Race Type with Condition Flags without affecting the Main Builder layout. */
body[data-workspace-mode="race_profiler"] #race-conditions.profiler-race-conditions-mode .grid.race-top {
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .9fr) !important;
  align-items: stretch !important;
}
body[data-workspace-mode="race_profiler"] #race-conditions.profiler-race-conditions-mode .jockey-race-type-card,
body[data-workspace-mode="race_profiler"] #race-conditions.profiler-race-conditions-mode .condition-flags-card {
  display: grid !important;
  grid-template-rows: auto auto auto 1fr !important;
  align-content: start !important;
  justify-content: stretch !important;
}
body[data-workspace-mode="race_profiler"] #race-conditions.profiler-race-conditions-mode .jockey-race-type-card .card-title,
body[data-workspace-mode="race_profiler"] #race-conditions.profiler-race-conditions-mode .condition-flags-card .card-title {
  margin: 0 0 14px !important;
}
body[data-workspace-mode="race_profiler"] #race-conditions.profiler-race-conditions-mode .jockey-race-type-spacer {
  visibility: hidden !important;
}
body[data-workspace-mode="race_profiler"] #race-conditions.profiler-race-conditions-mode .jockey-race-type-card .chips {
  align-self: start !important;
  margin-top: 0 !important;
}

/* Course & Distance Profile final order: compact top course-context row, middle track context, distance controls at the bottom. */
#course-profile .course-top-context-row {
  display: grid !important;
  grid-template-columns: minmax(260px, 1.25fr) minmax(160px, .62fr) minmax(150px, .52fr) minmax(170px, .62fr) !important;
  gap: 16px !important;
  align-items: stretch !important;
}
#course-profile .course-middle-context-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) !important;
  gap: 16px !important;
  align-items: stretch !important;
}
#course-profile .course-select-card,
#course-profile .course-race-direction-card,
#course-profile .course-direction-card,
#course-profile .course-topography-card,
#course-profile .course-style-card,
#course-profile .course-features-card {
  min-height: 82px !important;
  padding-top: 14px !important;
  padding-bottom: 14px !important;
}
#course-profile .course-select-card .note,
#course-profile .course-select-card .note-centered {
  font-size: 11px !important;
  line-height: 1.25 !important;
  margin-top: 8px !important;
}
#course-profile .course-race-direction-card .chips,
#course-profile .course-direction-card .equal-buttons-2,
#course-profile .course-topography-card .equal-buttons-2,
#course-profile .course-style-card .chips,
#course-profile .course-features-card .chips {
  align-self: stretch !important;
  margin-top: 0 !important;
}
#course-profile .course-race-direction-card .chip,
#course-profile .course-direction-card .chip,
#course-profile .course-topography-card .chip,
#course-profile .course-style-card .chip,
#course-profile .course-features-card .chip {
  min-height: 32px !important;
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}
#course-profile .course-style-card .condition-subtitle {
  display: none !important;
}
body[data-workspace-mode="race_profiler"] #course-profile.profiler-course-compact .course-top-context-row {
  grid-template-columns: minmax(260px, 1.25fr) minmax(160px, .62fr) minmax(150px, .52fr) minmax(170px, .62fr) !important;
}
body[data-workspace-mode="race_profiler"] #course-profile.profiler-course-advanced-hidden .course-race-direction-card,
body[data-workspace-mode="race_profiler"] #course-profile.profiler-course-advanced-hidden .course-direction-card,
body[data-workspace-mode="race_profiler"] #course-profile.profiler-course-advanced-hidden .course-topography-card,
body[data-workspace-mode="race_profiler"] #course-profile.profiler-course-advanced-hidden .course-middle-context-row {
  display: none !important;
}
body[data-workspace-mode="race_profiler"] #course-profile.profiler-course-advanced-hidden .course-select-card {
  grid-column: 1 / -1 !important;
}

@media (max-width: 1500px) {
  #course-profile .course-top-context-row,
  body[data-workspace-mode="race_profiler"] #course-profile.profiler-course-compact .course-top-context-row {
    grid-template-columns: minmax(240px, 1.2fr) repeat(3, minmax(140px, .7fr)) !important;
  }
}
@media (max-width: 1200px) {
  #course-profile .course-top-context-row,
  #course-profile .course-middle-context-row,
  body[data-workspace-mode="race_profiler"] #race-conditions.profiler-race-conditions-mode .grid.race-top {
    grid-template-columns: 1fr !important;
  }
}


/* === UI-L: movement wiring visual cleanup and final layout standardisation === */
/* Align Class 1 Subtypes and Handicap as a true title/chip pair on both workspaces. */
#race .meta-class-subtypes,
#race .meta-handicap {
  display: grid !important;
  grid-template-rows: 24px 44px 48px !important;
  align-content: center !important;
  align-items: start !important;
  justify-content: stretch !important;
  row-gap: 10px !important;
}
#race .meta-class-subtypes .card-title,
#race .meta-handicap .card-title {
  grid-row: 1 !important;
  align-self: start !important;
  justify-self: center !important;
  margin: 0 !important;
  line-height: 20px !important;
  min-height: 20px !important;
  text-align: center !important;
}
#race .meta-class-subtypes .chips,
#race .meta-handicap .chips,
#race #group_grade_listed_card .chips.single-line {
  grid-row: 2 !important;
  align-self: start !important;
  justify-self: stretch !important;
  margin-top: 0 !important;
  width: 100% !important;
}
#race .meta-class-subtypes .note {
  grid-row: 3 !important;
  margin-top: 0 !important;
  align-self: start !important;
}
#race .meta-handicap::after {
  content: "";
  grid-row: 3;
  display: block;
  min-height: 1px;
}

/* Match Class slider title placement to the other large slider cards: top-left, not centred. */
#race .meta-class > .card-title,
#race .meta-class .card-title.center {
  align-self: flex-start !important;
  justify-self: flex-start !important;
  text-align: left !important;
  margin-left: 0 !important;
  margin-bottom: 8px !important;
}

/* The Course & Distance distance slider was visually too tall after the move. */
#course-profile .course-distance-row .distance-range-card,
#course-profile .distance-range-card {
  min-height: 142px !important;
  padding-top: 14px !important;
  padding-bottom: 12px !important;
}
#course-profile .distance-range-card .distance-hybrid-control,
#course-profile .distance-range-card .range-hybrid-control,
#course-profile .distance-range-card .compact-hybrid-control {
  min-height: 86px !important;
}
#course-profile .distance-range-card .range-current {
  margin-bottom: 8px !important;
}

/* Keep compact numeric pill values vertically centred instead of sitting low/clipped. */
.pill-range-input {
  align-items: center !important;
  padding-top: 16px !important;
}
.pill-range-input input {
  height: 34px !important;
  line-height: 34px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  display: block !important;
}
.pill-range-input > span {
  align-self: center !important;
  min-height: 30px !important;
}

/* Restore clean spacing in Main Builder Race Conditions after the rating-card insertion. */
body[data-workspace-mode="system_builder"] #race-conditions .condition-flags-card .chips,
body[data-workspace-mode="system_builder"] #race-conditions .condition-flags-card .chips.fill,
body[data-workspace-mode="system_builder"] #race-conditions .condition-flags-card .chips.fill-tight {
  display: grid !important;
  gap: 14px 16px !important;
}
body[data-workspace-mode="system_builder"] #race-conditions .condition-flags-card .chip,
body[data-workspace-mode="system_builder"] #race-conditions .jockey-race-type-card .chip {
  margin: 0 !important;
}
body[data-workspace-mode="system_builder"] #race-conditions .jockey-race-type-card .chips {
  gap: 12px !important;
}

/* Race Profiler guide button in the setup-at-a-glance panel uses the same modal wiring as the section guide. */
.race-profiler-start-guide {
  cursor: pointer;
}

/* === UI-M: final visual cleanup and professional unknown labels === */
/* Race Meta: final fix for Class 1 Subtypes / Handicap.  Keep both cards top-aligned,
   with title rows and chip rows matched instead of vertically centring the shorter Handicap card. */
#race .meta-class-subtypes,
#race .meta-handicap {
  display: grid !important;
  grid-template-rows: 22px 42px auto !important;
  align-content: start !important;
  align-items: start !important;
  justify-content: stretch !important;
  row-gap: 10px !important;
  padding-top: 38px !important;
}
#race .meta-class-subtypes .card-title,
#race .meta-handicap .card-title {
  grid-row: 1 !important;
  align-self: center !important;
  justify-self: center !important;
  margin: 0 !important;
  min-height: 20px !important;
  line-height: 20px !important;
  text-align: center !important;
}
#race .meta-class-subtypes .chips,
#race .meta-handicap .chips,
#race #group_grade_listed_card .chips.single-line {
  grid-row: 2 !important;
  align-self: start !important;
  justify-self: stretch !important;
  margin: 0 !important;
  width: 100% !important;
}
#race .meta-class-subtypes .note {
  grid-row: 3 !important;
  align-self: start !important;
  margin: 10px 0 0 !important;
}
#race .meta-handicap::after {
  content: "";
  display: block;
  grid-row: 3;
  min-height: 1px;
}

/* Main Builder: restore soft vertical breathing room between stacked cards after UI-J/UK layout work. */
body[data-workspace-mode="system_builder"] #race-conditions .section-body,
body[data-workspace-mode="system_builder"] #lto .section-body {
  display: flex !important;
  flex-direction: column !important;
  gap: 18px !important;
}
body[data-workspace-mode="system_builder"] #race-conditions .section-body > .grid,
body[data-workspace-mode="system_builder"] #lto .section-body > .grid {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
body[data-workspace-mode="system_builder"] #race-conditions .card,
body[data-workspace-mode="system_builder"] #lto .card {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
body[data-workspace-mode="system_builder"] #race-conditions .condition-flags-card .chips,
body[data-workspace-mode="system_builder"] #race-conditions .condition-flags-card .chips.fill,
body[data-workspace-mode="system_builder"] #race-conditions .condition-flags-card .chips.fill-tight {
  gap: 15px 18px !important;
}

/* Distance range: a little tighter after moving into Course & Distance Profile, without changing state/payload. */
#course-profile .distance-range-card {
  min-height: 130px !important;
  padding-top: 12px !important;
  padding-bottom: 10px !important;
}
#course-profile .distance-range-card .distance-hybrid-control,
#course-profile .distance-range-card .range-hybrid-control,
#course-profile .distance-range-card .compact-hybrid-control {
  min-height: 78px !important;
}

/* Compact numeric min/max controls: keep values optically centred. */
.pill-range-input {
  display: inline-grid !important;
  grid-template-columns: minmax(58px, 1fr) minmax(58px, 1fr) !important;
  align-items: center !important;
  padding: 14px 10px 8px !important;
}
.pill-range-input input {
  align-self: center !important;
  height: 32px !important;
  line-height: 32px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  transform: translateY(-1px);
}


/* === UI-M: final cleanup after UI-L === */
/* Race Meta: hard-align Class 1 Subtypes and Handicap as matching title/chip rows. */
#race .meta-class-subtypes,
#race .meta-handicap,
#race .section-body > .race-meta-class-row > .meta-class-subtypes,
#race .section-body > .race-meta-row1 > .meta-handicap,
#race .race-meta-row1 .meta-handicap {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  align-content: stretch !important;
  padding-top: 24px !important;
}
#race .meta-class-subtypes .card-title,
#race .meta-handicap .card-title,
#race .section-body > .race-meta-class-row > .meta-class-subtypes .card-title,
#race .section-body > .race-meta-row1 > .meta-handicap .card-title {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 22px !important;
  min-height: 22px !important;
  margin: 0 0 16px !important;
  text-align: center !important;
  line-height: 20px !important;
}
#race .meta-class-subtypes .chips,
#race .meta-handicap .chips,
#race #group_grade_listed_card .chips.single-line {
  display: grid !important;
  align-items: center !important;
  align-content: center !important;
  height: 38px !important;
  min-height: 38px !important;
  margin: 0 !important;
}
#race .meta-class-subtypes .note {
  margin-top: 12px !important;
  align-self: stretch !important;
}
#race .meta-handicap::after {
  content: none !important;
  display: none !important;
}

/* Main Builder: restore soft vertical gaps between cards in Race Conditions and LTO. */
body[data-workspace-mode="system_builder"] #race-conditions .section-body > .grid,
body[data-workspace-mode="system_builder"] #race-conditions .section-body > .layout-grid,
body[data-workspace-mode="system_builder"] #lto .section-body > .grid,
body[data-workspace-mode="system_builder"] #lto .section-body > .layout-grid {
  margin-top: 16px !important;
}
body[data-workspace-mode="system_builder"] #race-conditions .section-body > .grid:first-child,
body[data-workspace-mode="system_builder"] #race-conditions .section-body > .layout-grid:first-child,
body[data-workspace-mode="system_builder"] #lto .section-body > .grid:first-child,
body[data-workspace-mode="system_builder"] #lto .section-body > .layout-grid:first-child {
  margin-top: 0 !important;
}
body[data-workspace-mode="system_builder"] #race-conditions .card,
body[data-workspace-mode="system_builder"] #lto .card {
  margin-bottom: 0 !important;
}
body[data-workspace-mode="system_builder"] #race-conditions .condition-flags-card .chips,
body[data-workspace-mode="system_builder"] #race-conditions .condition-flags-card .chips.fill,
body[data-workspace-mode="system_builder"] #race-conditions .condition-flags-card .chips.fill-tight {
  gap: 16px 18px !important;
}

/* Compact the moved distance range without making the slider feel cramped. */
#course-profile .course-distance-row .distance-range-card,
#course-profile .distance-range-card {
  min-height: 132px !important;
  padding-top: 12px !important;
  padding-bottom: 10px !important;
}
#course-profile .distance-range-card .distance-hybrid-control,
#course-profile .distance-range-card .range-hybrid-control,
#course-profile .distance-range-card .compact-hybrid-control {
  min-height: 78px !important;
}

/* Compact numeric mini-ranges: centre the values in the pill and avoid bottom clipping. */
.pill-range-input {
  display: inline-grid !important;
  grid-template-columns: minmax(62px, 1fr) 1px minmax(62px, 1fr) !important;
  align-items: center !important;
  justify-items: center !important;
  padding: 9px 12px !important;
  min-height: 44px !important;
}
.pill-range-input input {
  height: 28px !important;
  min-height: 28px !important;
  line-height: 28px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  text-align: center !important;
}
.pill-range-input > span {
  width: 1px !important;
  height: 28px !important;
  min-height: 28px !important;
  align-self: center !important;
}

/* Make the top Race Profiler guide button visually behave like a button after dynamic insertion. */
.race-profiler-start-guide {
  cursor: pointer !important;
}

/* Patch UI-N — Race Profiler Signals Review interpretation upgrade */
.race-profiler-expanded-signal-card--preview {
  position: relative;
  overflow: hidden;
  padding: 16px 16px 14px !important;
  margin-bottom: 14px !important;
  border: 1px solid rgba(148, 163, 184, 0.24) !important;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08) !important;
}
.race-profiler-expanded-signal-card--preview::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: #64748b;
}
.race-profiler-expanded-signal-card--winner {
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.98), rgba(248, 250, 252, 0.98)) !important;
}
.race-profiler-expanded-signal-card--winner::before { background: linear-gradient(180deg, #16a34a, #22c55e); }
.race-profiler-expanded-signal-card--elimination {
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.98), rgba(255, 251, 235, 0.96)) !important;
}
.race-profiler-expanded-signal-card--elimination::before { background: linear-gradient(180deg, #ea580c, #dc2626); }
.race-profiler-expanded-signal-card--review {
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(245, 243, 255, 0.96)) !important;
}
.race-profiler-expanded-signal-card--review::before { background: linear-gradient(180deg, #2563eb, #7c3aed); }
.race-profiler-expanded-signal-card--winner .race-profiler-signal-strength { background: linear-gradient(135deg, #047857, #22c55e) !important; }
.race-profiler-expanded-signal-card--elimination .race-profiler-signal-strength { background: linear-gradient(135deg, #b45309, #ef4444) !important; }
.race-profiler-expanded-signal-card--review .race-profiler-signal-strength { background: linear-gradient(135deg, #2563eb, #7c3aed) !important; }
.race-profiler-prompt-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.09);
  background: rgba(255,255,255,0.75);
  color: #334155;
  font-size: .78rem;
  font-weight: 850;
}
.race-profiler-prompt-line strong {
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .66rem;
}
.race-profiler-expanded-signal-card--preview .race-profiler-signal-evidence {
  margin: 8px 0 10px !important;
  padding: 10px 12px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(148, 163, 184, .18) !important;
  background: rgba(255, 255, 255, 0.72) !important;
  color: #1e293b !important;
  font-size: .86rem !important;
  line-height: 1.45 !important;
}
.race-profiler-expanded-signal-card--preview .race-profiler-review-table-wrap--compact {
  margin: 0 !important;
  max-height: 260px !important;
  background: rgba(255,255,255,.78) !important;
}
.race-profiler-expanded-signal-card--preview .race-profiler-review-table-button {
  margin-top: 10px !important;
}
.race-profiler-signal-card-body {
  align-items: start !important;
  gap: 12px !important;
  margin-top: 8px !important;
}
.race-profiler-signal-insight {
  min-height: 0 !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(248,250,252,0.92)) !important;
}
.race-profiler-signal-insight h5 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: .95rem;
}
.race-profiler-signal-insight--winner {
  border-color: rgba(34,197,94,.26) !important;
  background: linear-gradient(180deg, rgba(240,253,244,.96), rgba(255,255,255,.9)) !important;
}
.race-profiler-signal-insight--winner > span { color: #047857 !important; }
.race-profiler-signal-insight--elimination {
  border-color: rgba(249,115,22,.28) !important;
  background: linear-gradient(180deg, rgba(255,247,237,.96), rgba(255,255,255,.9)) !important;
}
.race-profiler-signal-insight--elimination > span { color: #b45309 !important; }
.race-profiler-signal-insight--review {
  border-color: rgba(99,102,241,.28) !important;
  background: linear-gradient(180deg, rgba(239,246,255,.96), rgba(255,255,255,.9)) !important;
}
.race-profiler-signal-insight--review > span { color: #4f46e5 !important; }
.race-profiler-signal-insight ul {
  margin: 10px 0 0 18px;
  padding: 0;
  color: #334155;
  font-size: .81rem;
  line-height: 1.42;
}
.race-profiler-signal-insight li + li { margin-top: 4px; }
.race-profiler-review-table tr.rp-row-prompted td,
.detail-breakdown-table tr.rp-row-prompted td {
  background: linear-gradient(90deg, rgba(254, 249, 195, .96), rgba(255, 255, 255, .96)) !important;
  border-top: 2px solid rgba(202, 138, 4, .45) !important;
  border-bottom: 2px solid rgba(202, 138, 4, .25) !important;
  font-weight: 900 !important;
}
.race-profiler-review-table tr.rp-row-prompted td:first-child,
.detail-breakdown-table tr.rp-row-prompted td:first-child {
  box-shadow: inset 7px 0 0 #ca8a04 !important;
  position: relative;
}
.rp-prompted-row-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid rgba(202, 138, 4, .28);
  font-size: .62rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}
@media (max-width: 980px) {
  .race-profiler-signal-card-body {
    grid-template-columns: 1fr !important;
  }
}

/* Patch UI-O — Signals Review visual cleanup after UI-N review */
.race-profiler-expanded-signal-card--preview .race-profiler-signal-card-body {
  align-items: stretch !important;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 330px) !important;
}
.race-profiler-expanded-signal-card--preview .race-profiler-signal-table-area {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  min-height: 100% !important;
}
.race-profiler-expanded-signal-card--preview .race-profiler-review-table-wrap--compact {
  flex: 1 1 auto !important;
  height: 100% !important;
  min-height: 330px !important;
  max-height: none !important;
  overflow: auto !important;
}
.race-profiler-expanded-signal-card--preview .race-profiler-signal-insight {
  height: 100% !important;
  align-self: stretch !important;
}
.race-profiler-expanded-signal-card--preview .race-profiler-signal-evidence {
  margin-bottom: 8px !important;
}
.race-profiler-expanded-signal-card--review .race-profiler-expanded-signal-copy > p {
  margin-bottom: 10px !important;
}
.race-profiler-review-table tr.rp-row-prompted td,
.detail-breakdown-table tr.rp-row-prompted td {
  background: linear-gradient(90deg, rgba(255, 251, 235, .78), rgba(255, 255, 255, .94)) !important;
  border-top: 1px solid rgba(180, 83, 9, .20) !important;
  border-bottom: 1px solid rgba(180, 83, 9, .16) !important;
  font-weight: 850 !important;
}
.race-profiler-review-table tr.rp-row-prompted td:first-child,
.detail-breakdown-table tr.rp-row-prompted td:first-child {
  box-shadow: inset 4px 0 0 rgba(180, 83, 9, .72) !important;
}
.rp-prompted-row-badge {
  margin-left: 6px !important;
  padding: 1px 6px !important;
  background: rgba(255, 247, 237, .92) !important;
  color: #9a3412 !important;
  border-color: rgba(180, 83, 9, .20) !important;
  font-size: .58rem !important;
  font-weight: 850 !important;
  letter-spacing: .045em !important;
}
@media (max-width: 1180px) {
  .race-profiler-expanded-signal-card--preview .race-profiler-signal-card-body {
    grid-template-columns: 1fr !important;
  }
  .race-profiler-expanded-signal-card--preview .race-profiler-review-table-wrap--compact {
    min-height: 260px !important;
  }
}

/* Patch Logic-P — Race Profiler Signals Intelligence v1 */
.race-profiler-metric-strip--profile-sample span {
  min-width: 120px;
}
.race-profiler-profile-type-pill {
  display: inline-flex;
  align-items: center;
  margin: 10px 0 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, .18);
  background: rgba(239, 246, 255, .82);
  color: #1d4ed8;
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .02em;
}
.race-profiler-preview-incomplete-note {
  position: sticky;
  bottom: 0;
  padding: 6px 9px;
  border-top: 1px solid rgba(148, 163, 184, .22);
  background: rgba(248, 250, 252, .96);
  color: #475569;
  font-size: .72rem;
  font-weight: 750;
}
.race-profiler-expanded-signal-card--preview .race-profiler-review-table-wrap--compact .race-profiler-preview-incomplete-note {
  font-size: .70rem;
}
.race-profiler-signal-insight p strong {
  color: #0f172a;
}
.rp-chart-panel--bars {
  min-height: 0 !important;
}
.rp-bar-chart {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.rp-bar-chart-row {
  display: grid;
  grid-template-columns: minmax(120px, 190px) minmax(120px, 1fr) 70px;
  gap: 10px;
  align-items: center;
  font-size: .78rem;
  color: #334155;
}
.rp-bar-chart-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 750;
}
.rp-bar-chart-row div {
  height: 10px;
  border-radius: 999px;
  background: rgba(226, 232, 240, .88);
  overflow: hidden;
}
.rp-bar-chart-row i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #94a3b8;
}
.rp-bar-chart-row b {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}
.rp-bar-chart-row--positive i { background: linear-gradient(90deg, #22c55e, #16a34a); }
.rp-bar-chart-row--negative i { background: linear-gradient(90deg, #f97316, #dc2626); }
.rp-bar-chart-row--neutral i { background: linear-gradient(90deg, #94a3b8, #64748b); }
@media (max-width: 760px) {
  .rp-bar-chart-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .rp-bar-chart-row b {
    text-align: left;
  }
}

/* Logic-Q: Race-context intelligence card for Signals Review */
.race-profiler-context-card {
  margin: 12px 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(79, 70, 229, .22);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(239,246,255,.96), rgba(248,250,252,.98));
  box-shadow: 0 16px 36px rgba(15, 23, 42, .07);
}
.race-profiler-context-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.race-profiler-context-card-head span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(99, 102, 241, .10);
  color: #4338ca;
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.race-profiler-context-card-head strong {
  color: #0f172a;
  font-size: 1rem;
  font-weight: 950;
}
.race-profiler-context-card-head em {
  color: #64748b;
  font-size: .82rem;
  font-style: normal;
  font-weight: 800;
}
.race-profiler-context-card p {
  margin: 0 0 10px;
  color: #334155;
  font-size: .88rem;
  line-height: 1.45;
}
.race-profiler-context-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.race-profiler-context-grid div {
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 13px;
  padding: 9px 10px;
  background: rgba(255,255,255,.74);
}
.race-profiler-context-grid b {
  display: block;
  margin-bottom: 3px;
  color: #0f172a;
  font-size: .76rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.race-profiler-context-grid span {
  color: #475569;
  font-size: .82rem;
  line-height: 1.35;
}
.race-profiler-context-note {
  border-left: 3px solid rgba(99, 102, 241, .34);
  padding-left: 9px;
  color: #334155 !important;
}
@media (max-width: 900px) {
  .race-profiler-context-grid { grid-template-columns: 1fr; }
}

/* Logic-Q1: Signals Review loading/performance feedback */
.race-profiler-signals-loading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0 4px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(248, 250, 252, 0.98));
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.race-profiler-signals-loading strong {
  display: block;
  font-size: 0.95rem;
  color: #0f172a;
  margin-bottom: 3px;
}

.race-profiler-signals-loading span {
  display: block;
  color: #475569;
  font-size: 0.84rem;
  line-height: 1.45;
}

.race-profiler-signals-spinner {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 3px solid rgba(37, 99, 235, 0.18);
  border-top-color: rgba(37, 99, 235, 0.82);
  animation: race-profiler-spin 0.8s linear infinite;
  flex: 0 0 auto;
}

@keyframes race-profiler-spin {
  to { transform: rotate(360deg); }
}

.race-profiler-context-overlay-note {
  margin: 10px 0 0;
  padding: 9px 11px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #334155;
  font-size: 0.82rem;
  line-height: 1.4;
}

/* === 2026-05-22 lookup dropdown repair: course/bred usability and readable spacing ===
   Keeps Course and Country of Breeding pickers usable in both Main Builder and Race Profiler. */
#course_picker,
#bred_picker {
  position: relative !important;
}

#course_picker.open .course-picker-panel,
body.course-picker-is-open #course_picker_panel,
#bred_picker.open .course-picker-panel,
body.bred-picker-is-open #bred_picker .course-picker-panel {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  padding: 10px 12px 12px !important;
  max-height: 420px !important;
  overflow: hidden !important;
  z-index: 2147483640 !important;
  pointer-events: auto !important;
}

#course_search,
#bred_search,
.course-picker-panel .course-search {
  min-height: 38px !important;
  padding: 9px 11px !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
  font-weight: 800 !important;
}

#course_options.course-options,
#bred_options.course-options,
#course_picker.open #course_options,
#bred_picker.open #bred_options,
body.course-picker-is-open #course_options,
body.bred-picker-is-open #bred_options {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 6px !important;
  max-height: 315px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  align-content: start !important;
}

#course_options .course-option,
#bred_options .course-option,
#course_picker.open #course_options .course-option,
#bred_picker.open #bred_options .course-option,
body.course-picker-is-open #course_options .course-option,
body.bred-picker-is-open #bred_options .course-option,
.lookup-option-row {
  min-height: 34px !important;
  padding: 8px 10px !important;
  line-height: 1.25 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  border-radius: 10px !important;
  display: grid !important;
  grid-template-columns: 24px minmax(0, 1fr) auto !important;
  column-gap: 10px !important;
  align-items: center !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

#course_options .course-option input,
#bred_options .course-option input,
.lookup-option-row input {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  pointer-events: auto !important;
}

#course_options .course-option span,
#bred_options .course-option span,
.lookup-option-row span {
  line-height: 1.25 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.lookup-option-row em {
  font-size: 12px !important;
  min-width: 64px !important;
}

#course_reset_button,
#bred_reset_button,
.dropdown-reset-button {
  min-height: 32px !important;
  margin-top: 2px !important;
}

/* Patch 02: Signals Review related-table grouping */
.race-profiler-related-signal-group {
  margin: 14px 0;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.92);
  overflow: hidden;
}

.race-profiler-related-signal-group > summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 800;
  color: #334155;
  list-style: none;
}

.race-profiler-related-signal-group > summary::-webkit-details-marker {
  display: none;
}

.race-profiler-related-signal-group > summary::after {
  content: "Show";
  float: right;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.race-profiler-related-signal-group[open] > summary::after {
  content: "Hide";
}

.race-profiler-related-signal-group-body {
  padding: 0 12px 12px;
}

/* Patch 3: Signals Review dynamic navigator */
.race-profiler-signals-workspace {
  grid-template-columns: 270px minmax(0, 1fr) !important;
}

.race-profiler-signals-nav {
  position: sticky !important;
  top: 14px !important;
  max-height: calc(min(94vh, 1040px) - 150px) !important;
  overflow: auto !important;
  align-self: start !important;
  gap: 9px !important;
  border-color: #b7f3df !important;
  background: linear-gradient(180deg, #f8fffc, #eefbf6) !important;
}

.race-profiler-signals-nav-header {
  display: grid !important;
  gap: 3px !important;
  padding: 2px 4px 6px !important;
}

.race-profiler-signals-nav-header span {
  text-transform: uppercase !important;
  letter-spacing: .18em !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  color: #64748b !important;
}

.race-profiler-signals-nav-header strong {
  font-size: 13px !important;
  font-weight: 950 !important;
  color: #0f172a !important;
}

.race-profiler-signals-nav-tools {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 6px !important;
}

.race-profiler-signals-nav-tools button,
.race-profiler-signals-nav-overview,
.race-profiler-signals-nav-group-head,
.race-profiler-signals-nav-item {
  appearance: none !important;
  font-family: inherit !important;
}

.race-profiler-signals-nav-tools button {
  border: 1px solid #99f6e4 !important;
  background: #f0fdfa !important;
  color: #0f766e !important;
  border-radius: 10px !important;
  padding: 7px 8px !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  cursor: pointer !important;
}

.race-profiler-signals-nav-overview {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 8px !important;
  border: 1px solid #bbf7d0 !important;
  background: #ffffff !important;
  color: #0f172a !important;
  border-radius: 13px !important;
  padding: 10px 11px !important;
  font-weight: 950 !important;
  cursor: pointer !important;
  text-align: left !important;
}

.race-profiler-signals-nav-overview em,
.race-profiler-signals-nav-count {
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;
  min-width: 28px !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
  background: #e0f2fe !important;
  color: #075985 !important;
  font-size: 11px !important;
  font-style: normal !important;
  font-weight: 950 !important;
}

.race-profiler-signals-nav-group {
  display: grid !important;
  gap: 5px !important;
  border: 1px solid #d1fae5 !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,.72) !important;
  padding: 6px !important;
}

.race-profiler-signals-nav-group.active-group {
  border-color: #34d399 !important;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, .14) !important;
}

.race-profiler-signals-nav-group-head {
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr) auto !important;
  gap: 7px !important;
  align-items: center !important;
  width: 100% !important;
  border: 0 !important;
  background: transparent !important;
  color: #0f172a !important;
  padding: 7px 5px !important;
  cursor: pointer !important;
  text-align: left !important;
}

.race-profiler-signals-nav-plus {
  color: #0891b2 !important;
  font-size: 16px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
}

.race-profiler-signals-nav-group-title {
  font-size: 12px !important;
  font-weight: 950 !important;
  line-height: 1.2 !important;
}

.race-profiler-signals-nav-items {
  display: none !important;
  gap: 5px !important;
}

.race-profiler-signals-nav-group.open .race-profiler-signals-nav-items {
  display: grid !important;
}

.race-profiler-signals-nav-item {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 3px !important;
  width: 100% !important;
  border: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  color: #334155 !important;
  border-radius: 10px !important;
  padding: 8px 9px !important;
  cursor: pointer !important;
  text-align: left !important;
}

.race-profiler-signals-nav-label {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  background: transparent !important;
  color: inherit !important;
  font-size: 11.5px !important;
  font-weight: 850 !important;
  padding: 0 !important;
}

.race-profiler-signals-nav-mini {
  display: block !important;
  min-width: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #64748b !important;
  font-size: 9px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: .08em !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.race-profiler-signals-nav-overview.active,
.race-profiler-signals-nav-item.active,
.race-profiler-signals-nav-tools button:hover,
.race-profiler-signals-nav-overview:hover,
.race-profiler-signals-nav-item:hover {
  border-color: #22c55e !important;
  background: #ecfdf5 !important;
  color: #065f46 !important;
}

.race-profiler-signals-nav-empty {
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  padding: 8px !important;
}

@media (max-width: 1100px) {
  .race-profiler-signals-workspace {
    grid-template-columns: 1fr !important;
  }
  .race-profiler-signals-nav {
    position: relative !important;
    top: auto !important;
    max-height: none !important;
  }
}

/* Patch 4: Signals Review navigator parity + clean visual treatment */
.race-profiler-signals-workspace {
  grid-template-columns: 296px minmax(0, 1fr) !important;
  gap: 12px !important;
}

.race-profiler-signals-nav {
  display: flex !important;
  flex-direction: column !important;
  position: sticky !important;
  top: 10px !important;
  max-height: calc(min(94vh, 1040px) - 112px) !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 14px 12px !important;
  border: 1px solid rgba(148,163,184,.24) !important;
  border-radius: 18px !important;
  background: rgba(255,255,255,.78) !important;
  box-shadow: 0 16px 38px rgba(15,23,42,.10) !important;
  backdrop-filter: blur(8px) !important;
  scrollbar-width: thin !important;
}

.race-profiler-signals-nav-header {
  display: block !important;
  padding: 8px 8px 12px !important;
  border-bottom: 1px solid rgba(148,163,184,.24) !important;
}

.race-profiler-signals-nav-header span {
  display: block !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  letter-spacing: .16em !important;
  color: #64748b !important;
  text-transform: uppercase !important;
}

.race-profiler-signals-nav-header strong {
  display: block !important;
  margin-top: 3px !important;
  font-size: 18px !important;
  letter-spacing: -.04em !important;
  color: #0f172a !important;
}

.race-profiler-signals-nav-tools {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 6px !important;
  padding: 10px 4px !important;
}

.race-profiler-signals-nav-tools button {
  height: 28px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(45,212,191,.38) !important;
  background: rgba(236,253,245,.9) !important;
  color: #047857 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  padding: 0 8px !important;
}

.race-profiler-signals-nav-tools button:hover {
  background: #ccfbf1 !important;
}

.race-profiler-signals-nav-overview {
  min-height: 34px !important;
  margin: 0 2px 8px !important;
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  align-items: center !important;
  gap: 8px !important;
  border-radius: 12px !important;
  border: 1px solid transparent !important;
  background: rgba(248,250,252,.78) !important;
  color: #334155 !important;
  padding: 7px 8px !important;
  text-align: left !important;
  cursor: pointer !important;
  font-size: 11.75px !important;
  font-weight: 900 !important;
}

.race-profiler-signals-nav-overview em,
.race-profiler-signals-nav-count {
  font-size: 10px !important;
  font-weight: 900 !important;
  color: #0f766e !important;
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
  border-radius: 999px !important;
  padding: 3px 6px !important;
  min-width: auto !important;
}

.race-profiler-signals-nav-group {
  display: block !important;
  border: 1px solid rgba(148,163,184,.24) !important;
  border-radius: 15px !important;
  background: rgba(255,255,255,.72) !important;
  margin-bottom: 8px !important;
  padding: 0 !important;
  overflow: hidden !important;
  box-shadow: none !important;
}

.race-profiler-signals-nav-group.active-group {
  border-color: rgba(20,184,166,.48) !important;
  background: linear-gradient(135deg,rgba(240,253,250,.94),rgba(255,255,255,.82)) !important;
  box-shadow: none !important;
}

.race-profiler-signals-nav-group-head {
  width: 100% !important;
  min-height: 38px !important;
  display: grid !important;
  grid-template-columns: 24px 1fr auto !important;
  align-items: center !important;
  gap: 8px !important;
  border: 0 !important;
  background: transparent !important;
  padding: 9px 10px !important;
  cursor: pointer !important;
  color: #0f172a !important;
  text-align: left !important;
}

.race-profiler-signals-nav-group-head:hover {
  background: rgba(224,242,254,.42) !important;
}

.race-profiler-signals-nav-plus {
  font-size: 16px !important;
  font-weight: 900 !important;
  color: #0891b2 !important;
  text-align: center !important;
}

.race-profiler-signals-nav-group-title {
  font-size: 12.5px !important;
  font-weight: 900 !important;
  line-height: 1.18 !important;
}

.race-profiler-signals-nav-items {
  display: none !important;
  padding: 0 8px 9px !important;
}

.race-profiler-signals-nav-group.open .race-profiler-signals-nav-items {
  display: grid !important;
  gap: 5px !important;
}

.race-profiler-signals-nav-item {
  min-height: 34px !important;
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  align-items: center !important;
  gap: 2px !important;
  border-radius: 11px !important;
  border: 1px solid transparent !important;
  background: rgba(248,250,252,.78) !important;
  color: #334155 !important;
  padding: 7px 8px !important;
  text-align: left !important;
  cursor: pointer !important;
}

.race-profiler-signals-nav-item:hover,
.race-profiler-signals-nav-overview:hover {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #334155 !important;
}

.race-profiler-signals-nav-item.active,
.race-profiler-signals-nav-overview.active {
  background: linear-gradient(135deg,#dbeafe,#ccfbf1) !important;
  border-color: #60a5fa !important;
  box-shadow: inset 3px 0 0 #0ea5e9 !important;
  color: #0f172a !important;
}

.race-profiler-signals-nav-label {
  font-size: 11.75px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  color: inherit !important;
}

.race-profiler-signals-nav-mini {
  font-size: 9px !important;
  text-transform: uppercase !important;
  letter-spacing: .08em !important;
  font-weight: 900 !important;
  color: #64748b !important;
}

@media (max-width: 1100px) {
  .race-profiler-signals-workspace {
    grid-template-columns: 1fr !important;
  }
  .race-profiler-signals-nav {
    position: relative !important;
    top: auto !important;
    max-height: none !important;
  }
}

/* Patch 5: Signals Review navigator scroll parity + compact table fit */
.race-profiler-signals-nav {
  height: calc(100dvh - 178px) !important;
  max-height: calc(100dvh - 178px) !important;
  overflow: hidden !important;
}

.race-profiler-signals-nav-list {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 4px 2px 10px !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(14, 165, 233, .55) rgba(226, 232, 240, .78) !important;
}

.race-profiler-signals-nav-list::-webkit-scrollbar {
  width: 8px !important;
}

.race-profiler-signals-nav-list::-webkit-scrollbar-track {
  background: rgba(226, 232, 240, .72) !important;
  border-radius: 999px !important;
}

.race-profiler-signals-nav-list::-webkit-scrollbar-thumb {
  background: rgba(14, 165, 233, .55) !important;
  border-radius: 999px !important;
}

.race-profiler-signals-nav-group {
  margin-right: 2px !important;
}

.race-profiler-signals-nav-item,
.race-profiler-signals-nav-overview {
  overflow: hidden !important;
}

.race-profiler-expanded-signal-card--preview .race-profiler-review-table-wrap--compact {
  overflow-x: auto !important;
  max-width: 100% !important;
}

.race-profiler-expanded-signal-card--preview .race-profiler-review-table-wrap--compact .race-profiler-review-table,
.race-profiler-expanded-signal-card--preview .race-profiler-review-table-wrap--compact .detail-breakdown-table {
  width: 100% !important;
  min-width: 820px !important;
  font-size: 11.2px !important;
}

.race-profiler-expanded-signal-card--preview .race-profiler-review-table-wrap--compact th,
.race-profiler-expanded-signal-card--preview .race-profiler-review-table-wrap--compact td {
  padding-left: 6px !important;
  padding-right: 6px !important;
}

.race-profiler-expanded-signal-card--preview .race-profiler-review-table-wrap--compact th {
  font-size: 9.7px !important;
  letter-spacing: .045em !important;
}

.race-profiler-expanded-signal-card--preview .race-profiler-review-table-wrap--compact th:first-child,
.race-profiler-expanded-signal-card--preview .race-profiler-review-table-wrap--compact td:first-child {
  max-width: 185px !important;
}

@media (max-height: 760px) {
  .race-profiler-signals-nav {
    height: calc(100dvh - 132px) !important;
    max-height: calc(100dvh - 132px) !important;
  }
}

@media (max-width: 1100px) {
  .race-profiler-signals-nav {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .race-profiler-signals-nav-list {
    overflow: visible !important;
  }
}

/* Patch 6: Signals Review top-level nav retention + Evidence Tray */
.race-profiler-signals-nav-list {
  display: flex !important;
  flex-direction: column !important;
  overflow: visible !important;
  min-height: 0 !important;
}

.race-profiler-signals-nav-group {
  flex: 0 0 auto !important;
}

.race-profiler-signals-nav-group.open.active-group {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

.race-profiler-signals-nav-group.open.active-group .race-profiler-signals-nav-items {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 3px !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(14, 165, 233, .55) rgba(226, 232, 240, .78) !important;
}

.race-profiler-signals-nav-group.open:not(.active-group) .race-profiler-signals-nav-items {
  max-height: 220px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.race-profiler-signals-nav-overview,
.race-profiler-signals-nav-group-head {
  flex: 0 0 auto !important;
}

.race-profiler-signal-card-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  align-items: center !important;
  margin-top: 10px !important;
}

.race-profiler-evidence-add-button {
  background: linear-gradient(135deg, #fef9c3, #ffedd5) !important;
  color: #9a3412 !important;
  border-color: #fed7aa !important;
}

.race-profiler-evidence-add-button:hover {
  background: linear-gradient(135deg, #fde68a, #fed7aa) !important;
}

.race-profiler-evidence-tray-toggle {
  position: fixed !important;
  right: 22px !important;
  bottom: 22px !important;
  z-index: 12050 !important;
  border: 1px solid rgba(245, 158, 11, .42) !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #fffbeb, #fed7aa) !important;
  color: #92400e !important;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .22) !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  letter-spacing: .02em !important;
  padding: 10px 14px !important;
  cursor: pointer !important;
}

.race-profiler-evidence-tray-toggle span {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 22px !important;
  margin-left: 8px !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
  background: #fff7ed !important;
  border: 1px solid #fdba74 !important;
}

.race-profiler-evidence-tray {
  position: fixed !important;
  top: 86px !important;
  right: 28px !important;
  width: min(520px, calc(100vw - 42px)) !important;
  max-height: min(76vh, 760px) !important;
  z-index: 12060 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border: 1px solid rgba(245, 158, 11, .34) !important;
  border-radius: 20px !important;
  background: rgba(255, 251, 235, .96) !important;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28) !important;
  backdrop-filter: blur(10px) !important;
}

.race-profiler-evidence-tray[hidden],
.race-profiler-evidence-tray-toggle[hidden] {
  display: none !important;
}

.race-profiler-evidence-tray.dragging {
  user-select: none !important;
  cursor: grabbing !important;
}

.race-profiler-evidence-tray-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 13px 14px !important;
  border-bottom: 1px solid rgba(245, 158, 11, .22) !important;
  background: linear-gradient(135deg, rgba(255,247,237,.96), rgba(254,243,199,.9)) !important;
  cursor: grab !important;
}

.race-profiler-evidence-tray-head span {
  display: block !important;
  text-transform: uppercase !important;
  letter-spacing: .15em !important;
  font-size: 10px !important;
  font-weight: 950 !important;
  color: #b45309 !important;
}

.race-profiler-evidence-tray-head strong {
  display: block !important;
  margin-top: 2px !important;
  font-size: 18px !important;
  font-weight: 950 !important;
  letter-spacing: -.04em !important;
  color: #111827 !important;
}

.race-profiler-evidence-tray-actions {
  display: flex !important;
  gap: 6px !important;
}

.race-profiler-evidence-tray-actions button,
.race-profiler-evidence-tray-item-head button {
  border: 1px solid rgba(245, 158, 11, .35) !important;
  border-radius: 10px !important;
  background: rgba(255,255,255,.72) !important;
  color: #92400e !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  min-height: 30px !important;
  padding: 5px 9px !important;
  cursor: pointer !important;
}

.race-profiler-evidence-tray-body {
  overflow: auto !important;
  padding: 12px !important;
}

.race-profiler-evidence-tray-empty {
  border: 1px dashed #f59e0b !important;
  border-radius: 16px !important;
  padding: 14px !important;
  background: rgba(255,255,255,.62) !important;
  color: #475569 !important;
}

.race-profiler-evidence-tray-item {
  border: 1px solid rgba(245, 158, 11, .28) !important;
  border-radius: 16px !important;
  background: rgba(255,255,255,.74) !important;
  overflow: hidden !important;
  margin-bottom: 12px !important;
}

.race-profiler-evidence-tray-item-head {
  display: flex !important;
  justify-content: space-between !important;
  gap: 10px !important;
  align-items: start !important;
  padding: 10px 12px !important;
  border-bottom: 1px solid rgba(245, 158, 11, .18) !important;
  background: rgba(255,251,235,.72) !important;
}

.race-profiler-evidence-tray-item-head span,
.race-profiler-evidence-tray-item-head em {
  display: block !important;
  font-size: 9px !important;
  font-weight: 950 !important;
  letter-spacing: .1em !important;
  text-transform: uppercase !important;
  color: #64748b !important;
  font-style: normal !important;
}

.race-profiler-evidence-tray-item-head strong {
  display: block !important;
  margin-top: 2px !important;
  font-size: 13px !important;
  color: #0f172a !important;
}

.race-profiler-evidence-tray-preview {
  max-height: 330px !important;
  overflow: auto !important;
  padding: 10px !important;
}

.race-profiler-evidence-tray-preview .race-profiler-expanded-signal-card,
.race-profiler-evidence-tray-preview .detail-breakdown-card {
  margin: 0 !important;
  box-shadow: none !important;
  border-radius: 14px !important;
}

.race-profiler-evidence-tray-preview .race-profiler-expanded-signal-copy {
  padding: 10px !important;
}

.race-profiler-evidence-tray-preview .race-profiler-signal-card-body {
  grid-template-columns: 1fr !important;
}

.race-profiler-evidence-tray-preview .detail-breakdown-header,
.race-profiler-evidence-tray-preview .detail-breakdown-header-ranking {
  grid-template-columns: 1fr !important;
}

@media (max-width: 900px) {
  .race-profiler-evidence-tray {
    top: 58px !important;
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
  }
}

/* === 2026-05-23 Patch 7: Evidence Tray working-panel refinement === */
.race-profiler-review-table-button,
.race-profiler-chart-view-button,
.detail-chart-view-button,
.race-profiler-evidence-add-button,
.race-profiler-evidence-tray-sticky-toggle,
.race-profiler-evidence-tray-toggle{
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease, color .16s ease !important;
}
.race-profiler-review-table-button:hover,
.race-profiler-chart-view-button:hover,
.detail-chart-view-button:hover,
.race-profiler-evidence-add-button:hover,
.race-profiler-evidence-tray-sticky-toggle:hover,
.race-profiler-evidence-tray-toggle:hover{
  transform: translateY(-2px) scale(1.018) !important;
  box-shadow: 0 12px 24px rgba(15,23,42,.16) !important;
}
.race-profiler-review-table-button:active,
.race-profiler-chart-view-button:active,
.detail-chart-view-button:active,
.race-profiler-evidence-add-button:active,
.race-profiler-evidence-tray-sticky-toggle:active,
.race-profiler-evidence-tray-toggle:active{
  transform: translateY(0) scale(.985) !important;
}
.race-profiler-evidence-add-button.is-added{
  background: linear-gradient(135deg,#dcfce7,#bbf7d0) !important;
  color:#166534 !important;
  border-color:#86efac !important;
}
.race-profiler-evidence-add-button.is-added:hover{
  background: linear-gradient(135deg,#bbf7d0,#86efac) !important;
}
.race-profiler-evidence-tray-sticky-toggle{
  border:1px solid rgba(245,158,11,.42) !important;
  border-radius:999px !important;
  background:linear-gradient(135deg,#fffbeb,#fed7aa) !important;
  color:#92400e !important;
  font-weight:950 !important;
  min-width:136px !important;
}
.race-profiler-evidence-tray-sticky-toggle span{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-width:22px !important;
  margin-left:7px !important;
  padding:2px 7px !important;
  border-radius:999px !important;
  background:#fff7ed !important;
  border:1px solid #fdba74 !important;
  color:#92400e !important;
}
.race-profiler-evidence-tray{
  width:min(960px, calc(100vw - 44px)) !important;
  max-height:min(82vh, 820px) !important;
  background:rgba(255,251,235,.985) !important;
}
.race-profiler-evidence-tray-body{
  padding:12px 14px 14px !important;
}
.race-profiler-evidence-tray-item{
  background:rgba(255,255,255,.82) !important;
  border-radius:18px !important;
}
.race-profiler-evidence-tray-item-head{
  padding:9px 12px !important;
}
.race-profiler-evidence-tray-preview{
  max-height:460px !important;
  overflow:auto !important;
  padding:10px 12px 12px !important;
  background:rgba(255,255,255,.62) !important;
}
.race-profiler-evidence-tray-table-first{
  display:block !important;
  width:100% !important;
}
.race-profiler-evidence-tray-mini-summary{
  display:block !important;
  margin:0 0 8px !important;
  padding:8px 10px !important;
  border-radius:12px !important;
  background:rgba(255,247,237,.9) !important;
  border:1px solid rgba(245,158,11,.18) !important;
  color:#334155 !important;
  font-size:12px !important;
  line-height:1.35 !important;
  font-weight:850 !important;
}
.race-profiler-evidence-tray-preview .race-profiler-expanded-signal-card,
.race-profiler-evidence-tray-preview .detail-breakdown-card{
  min-height:0 !important;
  height:auto !important;
  margin:0 !important;
  box-shadow:none !important;
  border-radius:14px !important;
}
.race-profiler-evidence-tray-preview .race-profiler-signal-card-body,
.race-profiler-evidence-tray-preview .race-profiler-signal-table-area{
  display:block !important;
  width:100% !important;
}
.race-profiler-evidence-tray-preview .race-profiler-review-table-wrap,
.race-profiler-evidence-tray-preview .detail-breakdown-table-wrap,
.race-profiler-evidence-tray-preview .race-profiler-review-table-wrap--compact{
  max-height:none !important;
  min-height:0 !important;
  overflow:auto !important;
  width:100% !important;
  border-radius:12px !important;
}
.race-profiler-evidence-tray-preview .detail-breakdown-table,
.race-profiler-evidence-tray-preview .race-profiler-review-table{
  width:100% !important;
  min-width:760px !important;
  font-size:11px !important;
}
.race-profiler-evidence-tray-preview .detail-breakdown-table th,
.race-profiler-evidence-tray-preview .detail-breakdown-table td,
.race-profiler-evidence-tray-preview .race-profiler-review-table th,
.race-profiler-evidence-tray-preview .race-profiler-review-table td{
  padding:6px 7px !important;
  white-space:nowrap !important;
}
.race-profiler-evidence-tray-preview .rp-prompted-row-badge{
  display:none !important;
}
.race-profiler-evidence-tray-preview .race-profiler-expanded-signal-copy,
.race-profiler-evidence-tray-preview .detail-breakdown-interpretation{
  padding:0 !important;
}
@media (max-width: 1050px){
  .race-profiler-evidence-tray{
    left:16px !important;
    right:16px !important;
    width:auto !important;
  }
}

/* === 2026-05-23 Patch 8: Review Tray minimise/header polish === */
.race-profiler-evidence-tray-actions button[data-rp-evidence-tray-minimise]{
  min-width:82px !important;
}
.race-profiler-evidence-tray-actions button:hover,
.race-profiler-evidence-tray-item-head button:hover{
  transform: translateY(-1px) scale(1.015) !important;
  box-shadow: 0 8px 18px rgba(15,23,42,.12) !important;
  background: rgba(255,255,255,.94) !important;
}
.race-profiler-evidence-tray-item-head{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto 34px !important;
  align-items:center !important;
}
.race-profiler-evidence-tray-item-title{
  min-width:0 !important;
}
.race-profiler-evidence-tray-source-type{
  align-self:center !important;
  justify-self:center !important;
  border:1px solid rgba(14,165,233,.22) !important;
  border-radius:999px !important;
  background:rgba(240,249,255,.82) !important;
  color:#0369a1 !important;
  font-size:10px !important;
  font-weight:950 !important;
  letter-spacing:.08em !important;
  line-height:1 !important;
  text-transform:uppercase !important;
  padding:7px 10px !important;
  white-space:nowrap !important;
}
.race-profiler-evidence-tray-item-head > button{
  justify-self:end !important;
}
.race-profiler-evidence-tray-item-head em:empty{
  display:none !important;
}
@media (max-width: 760px){
  .race-profiler-evidence-tray-item-head{
    grid-template-columns:minmax(0,1fr) 34px !important;
  }
  .race-profiler-evidence-tray-source-type{
    grid-column:1 / -1 !important;
    justify-self:start !important;
    margin-top:6px !important;
  }
}

/* Patch 09: Main Builder System Signals Review shortcut */
.system-signals-review-shortcut{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-top:10px;
}
.system-signals-review-shortcut span{
  font-size:12px;
  font-weight:800;
  letter-spacing:.04em;
  color:#526073;
}
.system-signals-review-button{
  box-shadow:0 10px 22px rgba(15,118,110,.12);
}
.system-signals-review-button:hover{
  transform:translateY(-1px) scale(1.02);
}

/* Patch 10: Main Builder System Signals Review placement */
.system-signals-review-button--summary{
  flex:0 0 auto;
  padding:8px 13px !important;
  border-color:rgba(45,212,191,.44) !important;
  background:linear-gradient(135deg, rgba(45,212,191,.20), rgba(59,130,246,.12)) !important;
  color:#dffcf6 !important;
  box-shadow:0 10px 22px rgba(15,118,110,.16) !important;
}
.system-signals-review-button--summary:hover{
  transform:translateY(-1px) scale(1.02);
  background:linear-gradient(135deg, rgba(45,212,191,.28), rgba(59,130,246,.18)) !important;
}
.system-signals-review-button--panel{
  border-color:rgba(95,240,190,.42) !important;
  background:rgba(95,240,190,.12) !important;
  color:#eafff8 !important;
}
.system-signals-output-layer{
  margin-top:16px;
  margin-bottom:0;
  border-color:rgba(45,212,191,.24);
  background:
    radial-gradient(circle at 12% 0%, rgba(45,212,191,.12), transparent 30%),
    linear-gradient(135deg, rgba(8, 24, 49, .97), rgba(14, 38, 70, .94));
}
.system-signals-output-layer .race-profiler-output-head{
  align-items:center;
}
.system-signals-output-layer .race-profiler-output-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.system-signals-output-grid .race-profiler-signal-summary-card{
  min-height:100%;
}
.system-signals-output-grid .race-profiler-cohort-summary,
.system-signals-output-grid .race-profiler-confidence-card{
  grid-column:1 / -1;
}
.quick-report-window-actions #quickOverlaySignals:not(.hidden){
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-color:rgba(20,184,166,.36);
  background:linear-gradient(135deg,#ecfdf5,#dbeafe);
  color:#075985;
  font-weight:950;
}
.quick-report-window-actions #quickOverlaySignals:not(.hidden):hover{
  transform:translateY(-1px) scale(1.02);
}
@media (max-width: 980px){
  .system-signals-output-layer .race-profiler-output-head{
    align-items:flex-start;
    flex-direction:column;
  }
  .system-signals-output-layer .race-profiler-output-actions{
    justify-content:flex-start;
  }
}

/* === Patch 11: Main Builder overview, guide polish, and system signals placement === */
.main-builder-overview-deck {
  margin: 0 0 24px;
  background: radial-gradient(circle at 86% 15%, rgba(34, 197, 94, 0.22), transparent 32%), linear-gradient(135deg, #082f22 0%, #0f3b31 42%, #12213a 100%);
  border-color: rgba(16, 185, 129, 0.34);
}

.main-builder-overview-deck .race-profiler-cohort-head p,
.main-builder-overview-deck .race-profiler-section-map em,
.main-builder-overview-deck .race-profiler-readiness-main p {
  color: rgba(226, 232, 240, 0.88);
}

.main-builder-overview-deck .race-profiler-cohort-chip {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(191, 219, 254, 0.18);
}

.main-builder-overview-deck .race-profiler-section-map button {
  background: rgba(15, 23, 42, 0.52);
  border-color: rgba(148, 163, 184, 0.20);
}

.main-builder-overview-deck .race-profiler-section-map button:hover {
  border-color: rgba(52, 211, 153, 0.55);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

body[data-workspace-mode="system_builder"] #mainBuilderOverviewDeck[hidden],
body[data-workspace-mode="race_profiler"] #mainBuilderOverviewDeck {
  display: none !important;
}

body[data-workspace-mode="system_builder"] .builder-guide-panel,
body[data-workspace-mode="race_profiler"] .builder-guide-panel {
  overflow: visible !important;
}

.builder-guide-close {
  top: -18px !important;
  right: -18px !important;
  z-index: 5 !important;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.24) !important;
}

.builder-guide-content {
  max-height: calc(88vh - 190px) !important;
  overflow: auto !important;
  padding-right: 8px !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.builder-guide-content section {
  min-height: 132px !important;
}

body[data-workspace-mode="system_builder"] .builder-guide-panel {
  width: min(1320px, 94vw) !important;
  max-height: min(90vh, 920px) !important;
}

body[data-workspace-mode="system_builder"] .builder-guide-kicker {
  color: #0f766e !important;
}

.system-signals-review-button--summary {
  order: -1;
  margin-right: 8px;
}

@media (max-width: 1180px) {
  .builder-guide-content,
  .main-builder-overview-deck .race-profiler-section-map,
  .main-builder-overview-deck .race-profiler-cohort-head,
  .main-builder-overview-deck .race-profiler-readiness {
    grid-template-columns: 1fr !important;
  }
}

/* === Patch 12: builder guide viewport containment and Main Builder default-count polish === */
.builder-guide-modal {
  align-items: center !important;
  justify-content: center !important;
  padding: 28px !important;
  overflow: hidden !important;
}

.builder-guide-panel {
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  max-height: calc(100vh - 56px) !important;
  overflow: visible !important;
}

.builder-guide-panel .builder-guide-kicker,
.builder-guide-panel h2,
.builder-guide-panel .builder-guide-lead {
  flex: 0 0 auto !important;
}

.builder-guide-content {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 12px !important;
  padding-bottom: 14px !important;
}

body[data-workspace-mode="system_builder"] .builder-guide-panel {
  max-height: calc(100vh - 56px) !important;
}

body[data-workspace-mode="system_builder"] .builder-guide-content {
  max-height: none !important;
}

/* Patch 13: main navigation cleanup and report overlay market controls */
#builderContextNav[hidden]{display:none!important;}
#builderContextNav{
  margin-top:8px!important;
  padding-top:2px!important;
}
#builderContextNav .builder-context-label{
  color:#93c5fd!important;
  text-transform:uppercase!important;
  letter-spacing:.13em!important;
  font-size:10px!important;
  font-weight:950!important;
  margin:10px 8px 8px!important;
}
#builderContextNav .current-builder-link{
  min-height:54px!important;
  margin-bottom:8px!important;
}
#builderContextNav .switch-builder-button{display:none!important;}
#workspaceSectionNav,
#builderContextNav .subnav{
  max-height:410px!important;
  overflow-y:auto!important;
  scrollbar-width:thin!important;
  scrollbar-color:rgba(125,211,252,.75) rgba(255,255,255,.08)!important;
  border-radius:0 0 14px 14px!important;
}
#workspaceSectionNav::-webkit-scrollbar,
#builderContextNav .subnav::-webkit-scrollbar{width:7px!important;}
#workspaceSectionNav::-webkit-scrollbar-thumb,
#builderContextNav .subnav::-webkit-scrollbar-thumb{background:rgba(125,211,252,.75)!important;border-radius:999px!important;}
#builderContextNav .subnav a{
  line-height:1.22!important;
  border:1px solid transparent!important;
}
#builderContextNav .subnav a.focus{
  background:linear-gradient(90deg,rgba(14,165,233,.26),rgba(124,58,237,.18))!important;
  border-color:rgba(147,197,253,.35)!important;
  color:#fff!important;
}
.report-nav-cluster{display:none!important;}
.quick-report-window-header .quick-report-window-market-slot{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:280px!important;
}
.overlay-market-toggle{
  transform:scale(.92)!important;
  transform-origin:center!important;
  white-space:nowrap!important;
}
.quick-report-window-actions{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  padding:7px!important;
  border:1px solid rgba(203,213,225,.7)!important;
  background:rgba(255,255,255,.72)!important;
  border-radius:16px!important;
  box-shadow:0 7px 18px rgba(15,23,42,.08)!important;
}
.quick-report-window-actions .mini-button.hidden{display:none!important;}
@media(max-width:1300px){
  .quick-report-window-header{grid-template-columns:1fr!important;align-items:start!important;}
  .quick-report-window-header .quick-report-window-market-slot{justify-content:flex-start!important;}
  .quick-report-window-actions{flex-wrap:wrap!important;}
}

/* Patch 14: Sidebar information architecture and workspace hierarchy */
.sidebar .nav-title{
  margin-top:18px!important;
  margin-bottom:9px!important;
  padding-top:14px!important;
  color:#9fb4d9!important;
}
.sidebar .nav-title.linked{
  color:#b7c7ff!important;
}
.sidebar .nav-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
  line-height:1.1;
}
.sidebar .nav-main-label{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
}
.sidebar .nav-sub-label{
  display:block;
  max-width:132px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#90a4c7;
  font-size:10.2px;
  font-weight:850;
  letter-spacing:.02em;
}
.sidebar .nav-item.active .nav-sub-label{
  color:#475569;
}
.sidebar .nav-status-pill{
  margin-left:auto;
  flex:0 0 auto;
  padding:3px 6px;
  border-radius:999px;
  border:1px solid rgba(125,211,252,.25);
  background:rgba(14,165,233,.10);
  color:#7dd3fc;
  font-size:9px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.sidebar .nav-coming-soon{
  opacity:.82;
}
.sidebar .nav-coming-soon:hover{
  opacity:1;
}
.sidebar .nav-coming-soon.active .nav-status-pill{
  border-color:rgba(124,58,237,.24);
  background:rgba(124,58,237,.10);
  color:#4c1d95;
}
#builderContextNav{
  margin:10px 0 16px!important;
  padding:10px 10px 12px!important;
  border:1px solid rgba(147,197,253,.14)!important;
  border-radius:18px!important;
  background:linear-gradient(180deg,rgba(30,41,59,.60),rgba(15,23,42,.35))!important;
}
#builderContextNav .builder-context-label{
  margin:2px 6px 8px!important;
  color:#7dd3fc!important;
  letter-spacing:.15em!important;
}
#builderContextNav .current-builder-link{
  min-height:48px!important;
  margin:0 0 8px!important;
  border:1px solid rgba(147,197,253,.16)!important;
  background:rgba(15,23,42,.55)!important;
  box-shadow:none!important;
}
#builderContextNav .current-builder-link:hover{
  background:rgba(30,64,175,.34)!important;
}
#workspaceSectionNav,
#builderContextNav .subnav{
  margin:0!important;
  padding:10px 8px!important;
  border-left:0!important;
  border-radius:14px!important;
  background:rgba(2,6,23,.28)!important;
  max-height:360px!important;
}
#builderContextNav .subnav-label{
  margin:0 4px 8px!important;
  color:#93c5fd!important;
}
#builderContextNav .subnav a{
  font-size:11.7px!important;
  padding:7px 8px!important;
  color:#c7d2fe!important;
}
#builderContextNav .subnav a.focus{
  color:#fff!important;
  box-shadow:inset 3px 0 0 #38bdf8!important;
}
body:not([data-workspace-mode="race_profiler"]) #builderContextNav .current-builder-link .nav-icon img{
  content:url("../assets/icons/nav-system-builder.svg");
}

/* Patch 15C — Saved systems / race profiles frontend */
.saved-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 16, 32, 0.58);
  z-index: 2400;
  backdrop-filter: blur(10px);
}
.saved-modal-backdrop-soft {
  background: rgba(10, 16, 32, 0.18);
  backdrop-filter: none;
}
.saved-modal-card,
.saved-floating-panel {
  position: fixed;
  z-index: 2410;
  background: #ffffff;
  color: #172033;
  border: 1px solid rgba(91, 109, 145, 0.22);
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(10, 16, 32, 0.28);
}
.saved-modal-card {
  left: 50%;
  top: 50%;
  width: min(980px, calc(100vw - 48px));
  max-height: min(860px, calc(100vh - 48px));
  transform: translate(-50%, -50%);
  padding: 24px;
  overflow: auto;
}
.saved-save-card { width: min(1060px, calc(100vw - 48px)); }
.saved-load-card { width: min(1120px, calc(100vw - 48px)); }
.saved-unsaved-card { width: min(620px, calc(100vw - 48px)); }
.saved-floating-panel {
  right: 28px;
  bottom: 92px;
  width: min(720px, calc(100vw - 48px));
  max-height: min(720px, calc(100vh - 120px));
  padding: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.saved-modal-close,
.saved-icon-button {
  border: 0;
  background: #eef2f8;
  color: #273349;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
  transition: transform .16s ease, background .16s ease;
}
.saved-modal-close {
  position: absolute;
  right: -12px;
  top: -12px;
  width: 38px;
  height: 38px;
}
.saved-icon-button { width: 34px; height: 34px; }
.saved-modal-close:hover,
.saved-icon-button:hover { transform: translateY(-1px) scale(1.04); background: #dfe7f3; }
.saved-modal-header { margin-bottom: 18px; padding-right: 20px; }
.saved-kicker {
  display: inline-flex;
  margin-bottom: 6px;
  color: #69768e;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .72rem;
  font-weight: 800;
}
.saved-modal-header h2 { margin: 0 0 8px; font-size: 1.55rem; color: #111827; }
.saved-modal-header p { margin: 0; color: #5f6b7d; line-height: 1.5; }
.saved-field { display: grid; gap: 8px; margin: 14px 0; }
.saved-field span { font-size: .82rem; font-weight: 800; color: #344054; }
.saved-field input,
.saved-field textarea,
.workspace-notes-textarea {
  width: 100%;
  border: 1px solid rgba(116, 132, 165, .38);
  border-radius: 16px;
  padding: 12px 14px;
  font: inherit;
  color: #172033;
  background: #fbfcff;
  outline: none;
}
.saved-field textarea { min-height: 96px; resize: vertical; }
.workspace-notes-textarea { min-height: 360px; resize: vertical; flex: 1; }
.saved-field input:focus,
.saved-field textarea:focus,
.workspace-notes-textarea:focus { border-color: #5468ff; box-shadow: 0 0 0 3px rgba(84, 104, 255, .12); }
.saved-two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0; }
.saved-two-column section,
.saved-notes-preview,
.saved-setup-card {
  border: 1px solid rgba(116, 132, 165, .22);
  border-radius: 18px;
  background: #f8fafd;
  padding: 16px;
}
.saved-two-column h3,
.saved-notes-preview h3 { margin: 0 0 12px; font-size: .98rem; color: #253044; }
.saved-setup-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.saved-setup-summary-grid div,
.saved-mini-metrics span {
  background: #ffffff;
  border: 1px solid rgba(116, 132, 165, .18);
  border-radius: 14px;
  padding: 10px;
}
.saved-setup-summary-grid span,
.saved-mini-metrics small { display: block; color: #728097; font-size: .72rem; font-weight: 700; }
.saved-setup-summary-grid strong,
.saved-mini-metrics strong { display: block; color: #172033; margin-top: 3px; }
.saved-mini-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.saved-notes-preview pre {
  max-height: 160px;
  overflow: auto;
  white-space: pre-wrap;
  margin: 0;
  padding: 12px;
  border-radius: 14px;
  background: #fff;
  color: #38465d;
}
.saved-modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.saved-modal-status { margin: 10px 0; color: #5f6b7d; font-weight: 700; }
.saved-modal-status.error { color: #b42318; }
.saved-warning {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff7e6;
  color: #8a5a00;
  font-weight: 700;
}
.saved-panel-header { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 12px; }
.saved-load-list { display: grid; gap: 14px; margin-top: 16px; }
.saved-card-topline { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.saved-card-topline h3 { margin: 4px 0 0; color: #111827; }
.saved-setup-card p { color: #5f6b7d; margin: 10px 0 12px; line-height: 1.45; }
.saved-type-pill,
.saved-status-pill,
.saved-card-chips span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 800;
}
.saved-type-pill { color: #44546f; background: #edf2fb; padding: 4px 8px; }
.saved-status-pill { color: #23314d; background: #e8eef8; padding: 6px 10px; white-space: nowrap; }
.saved-status-pill.tested { background: #e7f8ee; color: #0f6b3d; }
.saved-status-pill.active { background: #e8edff; color: #3444b5; }
.saved-status-pill.edited_since_test { background: #fff3dd; color: #9a5b00; }
.saved-status-pill.archived { background: #f1f1f3; color: #5b6170; }
.saved-card-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.saved-card-chips span { background: #fff; border: 1px solid rgba(116,132,165,.2); padding: 6px 9px; color: #4b5870; }
.saved-card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.saved-muted { color: #6f7c91; margin: 0; }
.btn.danger-soft { color: #a43434; background: #fff1f1; border-color: rgba(164,52,52,.18); }
.btn.notes { background: #f7f1ff; color: #57409a; border-color: rgba(87, 64, 154, .18); }
.btn.notes:hover { transform: translateY(-1px) scale(1.02); }
@media (max-width: 840px) {
  .saved-two-column { grid-template-columns: 1fr; }
  .saved-mini-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .saved-floating-panel { left: 16px; right: 16px; width: auto; }
}

/* Patch 15C-Polish — premium saved setup save/load UI */
#savedSetupModalRoot,
#savedSetupModalRoot *{
  box-sizing:border-box;
}
#savedSetupModalRoot{
  position:fixed;
  inset:0;
  z-index:50000;
  pointer-events:none;
}
#savedSetupModalRoot:has(.saved-modal-card),
#savedSetupModalRoot:has(.saved-floating-panel){
  pointer-events:auto;
}
.saved-modal-backdrop{
  z-index:50000!important;
  background:rgba(15,23,42,.62)!important;
  backdrop-filter:blur(12px)!important;
}
.saved-modal-backdrop-soft{
  background:rgba(15,23,42,.22)!important;
  backdrop-filter:none!important;
}
.saved-modal-card,
.saved-floating-panel{
  z-index:50010!important;
  box-sizing:border-box!important;
}
.saved-modal-card{
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  padding:0!important;
  max-width:calc(100vw - 72px)!important;
  max-height:calc(100vh - 72px)!important;
}
.saved-save-card,
.saved-load-card{
  width:min(1480px, calc(100vw - 72px))!important;
}
.saved-unsaved-card{
  width:min(680px, calc(100vw - 72px))!important;
  padding:28px!important;
}
.saved-modal-scroll{
  overflow-y:auto;
  overflow-x:hidden;
  padding:30px 34px 22px;
  min-height:0;
}
.saved-modal-close{
  top:14px!important;
  right:14px!important;
  width:38px!important;
  height:38px!important;
  z-index:3!important;
  background:#ffffff!important;
  border:1px solid rgba(148,163,184,.36)!important;
  color:#b42318!important;
  box-shadow:0 10px 28px rgba(15,23,42,.14)!important;
}
.saved-modal-close:hover{
  background:#fff5f5!important;
  transform:translateY(-1px) scale(1.04)!important;
}
.saved-premium-header{
  padding:0 56px 20px 0!important;
  border-bottom:1px solid rgba(148,163,184,.22);
  margin-bottom:22px!important;
}
.saved-premium-header h2{
  font-size:2rem!important;
  letter-spacing:-.03em;
}
.saved-premium-header p{
  max-width:960px;
  font-size:1rem;
}
.saved-save-layout{
  display:grid;
  grid-template-columns:minmax(360px, .78fr) minmax(520px, 1.22fr);
  gap:20px;
  align-items:start;
}
.saved-save-editor,
.saved-save-snapshot{
  min-width:0;
}
.saved-field-left{
  text-align:left!important;
}
.saved-field-left span,
.saved-field span{
  text-align:left!important;
  justify-self:start!important;
}
.saved-field input,
.saved-field textarea,
.workspace-notes-textarea{
  box-sizing:border-box!important;
}
.saved-field textarea{
  min-height:118px!important;
}
.saved-save-snapshot .saved-setup-fingerprint{
  height:100%;
}
.saved-setup-fingerprint,
.saved-performance-panel,
.saved-description-card,
.saved-notes-preview.premium{
  border:1px solid rgba(148,163,184,.22);
  border-radius:22px;
  background:linear-gradient(180deg,#ffffff,#f8fbff);
  box-shadow:0 18px 40px rgba(15,23,42,.06);
  padding:18px;
}
.saved-fingerprint-heading,
.saved-performance-hero{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:16px;
}
.saved-fingerprint-heading h3,
.saved-performance-hero h3{
  margin:0;
  color:#111827;
}
.saved-performance-hero h3{
  font-size:2.1rem;
  letter-spacing:-.04em;
}
.saved-performance-hero p{
  margin:4px 0 0;
  color:#64748b;
  font-weight:800;
}
.saved-price-pill,
.saved-performance-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  padding:8px 12px;
  font-size:.78rem;
  font-weight:900;
  white-space:nowrap;
}
.saved-price-pill{
  background:#ecfeff;
  color:#0f766e;
  border:1px solid rgba(20,184,166,.2);
}
.saved-performance-badge.positive{background:#dcfce7;color:#15803d;}
.saved-performance-badge.negative{background:#fee2e2;color:#b42318;}
.saved-performance-badge.neutral{background:#eef2ff;color:#3730a3;}
.saved-headline-chip-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-bottom:14px;
}
.saved-headline-chip-grid div,
.saved-metric-tile{
  min-width:0;
  background:#f8fafc;
  border:1px solid rgba(148,163,184,.22);
  border-radius:16px;
  padding:11px 12px;
}
.saved-headline-chip-grid span,
.saved-metric-tile small,
.saved-rule-chip-cloud small,
.saved-description-card span,
.saved-card-topline h3 span{
  display:block;
  color:#64748b;
  font-size:.72rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.saved-headline-chip-grid strong,
.saved-metric-tile strong,
.saved-rule-chip-cloud strong{
  display:block;
  margin-top:4px;
  color:#111827;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.saved-rule-block{
  border-top:1px solid rgba(148,163,184,.18);
  padding-top:14px;
}
.saved-rule-block-title{
  color:#253044;
  font-weight:900;
  margin-bottom:10px;
}
.saved-rule-chip-cloud{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.saved-rule-chip-cloud span{
  min-width:132px;
  max-width:260px;
  border:1px solid rgba(59,130,246,.16);
  background:#f8fbff;
  border-radius:14px;
  padding:9px 10px;
}
.saved-rule-chip-cloud .saved-rule-chip-more{
  background:#eef2ff;
  border-color:rgba(79,70,229,.16);
}
.saved-empty-rule-box{
  border-radius:16px;
  padding:14px;
  background:#f8fafc;
  border:1px dashed rgba(148,163,184,.42);
  color:#64748b;
  font-weight:800;
}
.saved-fingerprint-note{
  margin:14px 0 0;
  color:#64748b;
  line-height:1.45;
}
.saved-performance-panel{
  margin-top:20px;
  background:linear-gradient(135deg,#08172d,#11223e);
  color:#e5edf8;
  border-color:rgba(56,189,248,.22);
}
.saved-performance-panel.empty{
  background:#f8fafc;
  color:#172033;
}
.saved-performance-panel .saved-kicker,
.saved-performance-panel .saved-performance-hero h3{
  color:#ffffff;
}
.saved-performance-panel.empty .saved-kicker,
.saved-performance-panel.empty h3{
  color:#172033;
}
.saved-performance-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.saved-performance-grid.compact{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.saved-metric-tile{
  background:rgba(255,255,255,.08);
  border-color:rgba(255,255,255,.12);
}
.saved-metric-tile small{color:#a8b6cc;}
.saved-metric-tile strong{color:#f8fafc;}
.saved-metric-tile.positive strong{color:#4ade80;}
.saved-metric-tile.negative strong{color:#fb7185;}
.saved-metric-tile.neutral strong{color:#e5edf8;}
.saved-modal-actions-sticky{
  position:sticky;
  bottom:0;
  margin:0!important;
  padding:16px 34px;
  background:rgba(255,255,255,.94);
  border-top:1px solid rgba(148,163,184,.22);
  backdrop-filter:blur(12px);
}
.saved-notes-preview.premium{
  margin-top:16px;
}
.saved-notes-preview.premium pre{
  max-height:210px;
}
.saved-load-list.premium{
  gap:18px!important;
  padding-bottom:10px;
}
.saved-setup-card.premium-card{
  background:linear-gradient(180deg,#ffffff,#f8fbff)!important;
  border-radius:24px!important;
  padding:20px!important;
  box-shadow:0 18px 45px rgba(15,23,42,.08)!important;
}
.saved-card-topline.premium{
  align-items:flex-start;
  margin-bottom:14px;
}
.saved-card-topline.premium h3{
  margin:8px 0 0!important;
  font-size:1.35rem;
  letter-spacing:-.02em;
}
.saved-card-topline.premium h3 span{
  margin-bottom:4px;
}
.saved-description-card{
  margin:0 0 14px;
  box-shadow:none;
}
.saved-description-card p{
  margin:4px 0 0!important;
  color:#475569!important;
}
.saved-card-split{
  display:grid;
  grid-template-columns:1.15fr .85fr;
  gap:14px;
  align-items:start;
}
.saved-card-split .saved-setup-fingerprint,
.saved-card-split .saved-performance-panel{
  margin:0;
  box-shadow:none;
}
.saved-setup-fingerprint.compact .saved-headline-chip-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.saved-setup-fingerprint.compact .saved-rule-chip-cloud span{
  min-width:118px;
  max-width:220px;
}
.saved-card-meta-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
}
.saved-card-meta-row span{
  display:inline-flex;
  border-radius:999px;
  padding:7px 10px;
  background:#ffffff;
  border:1px solid rgba(148,163,184,.22);
  color:#475569;
  font-size:.76rem;
  font-weight:900;
}
.saved-card-actions.premium{
  border-top:1px solid rgba(148,163,184,.18);
  padding-top:14px;
  justify-content:flex-start;
}
.saved-empty-state{
  border:1px dashed rgba(148,163,184,.42);
  background:#f8fafc;
  border-radius:22px;
  padding:26px;
}
.saved-empty-state h3{
  margin:0 0 8px;
  color:#172033;
}
.saved-empty-state p{
  margin:0;
  color:#64748b;
  line-height:1.45;
}
body[data-workspace-mode="race_profiler"] .builder-sticky-actions .btn.save,
body[data-workspace-mode="race_profiler"] .builder-sticky-actions .btn.load{
  display:inline-flex!important;
}
@media(max-width:1180px){
  .saved-save-layout,
  .saved-card-split{grid-template-columns:1fr;}
  .saved-headline-chip-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .saved-performance-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:760px){
  .saved-modal-card{max-width:calc(100vw - 24px)!important;max-height:calc(100vh - 24px)!important;}
  .saved-modal-scroll{padding:22px 18px 14px;}
  .saved-modal-actions-sticky{padding:14px 18px;}
  .saved-headline-chip-grid,.saved-performance-grid,.saved-performance-grid.compact{grid-template-columns:1fr;}
}

/* Patch 15C-2 — Save/load trust, premium colour and modal close-button consistency */
:root{
  --modal-close-size: 38px;
  --modal-close-bg: #f8fafc;
  --modal-close-fg: #0f172a;
  --modal-close-border: rgba(15, 23, 42, .16);
}

.saved-modal-card{
  overflow: visible !important;
  background: linear-gradient(135deg, #f8fafc 0%, #ecfeff 42%, #f4f1ff 100%) !important;
  border: 1px solid rgba(20, 184, 166, .22) !important;
  box-shadow: 0 34px 100px rgba(2, 6, 23, .42) !important;
}
.saved-modal-scroll{
  max-height: calc(100vh - 168px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  background:
    radial-gradient(circle at 97% 2%, rgba(20,184,166,.16), transparent 260px),
    radial-gradient(circle at 3% 100%, rgba(99,102,241,.13), transparent 280px),
    rgba(255,255,255,.82) !important;
  border-radius: 24px 24px 0 0;
}
.saved-save-card .saved-modal-scroll,
.saved-load-card .saved-modal-scroll{
  min-height: min(740px, calc(100vh - 168px));
}
.saved-modal-close,
.builder-guide-close,
.race-profiler-utility-close{
  width: var(--modal-close-size) !important;
  height: var(--modal-close-size) !important;
  min-width: var(--modal-close-size) !important;
  min-height: var(--modal-close-size) !important;
  border-radius: 999px !important;
  border: 1px solid var(--modal-close-border) !important;
  background: var(--modal-close-bg) !important;
  color: var(--modal-close-fg) !important;
  font-size: 20px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 14px 34px rgba(15,23,42,.20) !important;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease !important;
}
.saved-modal-close:hover,
.builder-guide-close:hover,
.race-profiler-utility-close:hover{
  background: #ffffff !important;
  transform: translateY(-1px) scale(1.04) !important;
  box-shadow: 0 18px 44px rgba(15,23,42,.26) !important;
}
.saved-modal-close{
  top: -17px !important;
  right: -17px !important;
  z-index: 4 !important;
}
.builder-guide-close{
  top: -17px !important;
  right: -17px !important;
}

.saved-premium-header{
  padding: 22px 70px 22px 24px !important;
  margin: -30px -34px 24px !important;
  border-bottom: 1px solid rgba(20,184,166,.18) !important;
  background:
    linear-gradient(135deg, rgba(8,23,45,.98), rgba(10,61,76,.92) 52%, rgba(31,41,91,.86)),
    radial-gradient(circle at 96% 0%, rgba(34,197,94,.18), transparent 240px) !important;
  color: #e5f9f3 !important;
}
.saved-premium-header .saved-kicker,
.saved-premium-header h2,
.saved-premium-header p{
  color: #f8fafc !important;
}
.saved-premium-header .saved-kicker{
  color: #66f3c1 !important;
}
.saved-premium-header h2{
  text-shadow: 0 10px 24px rgba(0,0,0,.22);
}
.saved-premium-header p{
  opacity: .88;
}

.saved-identity-card,
.saved-description-card,
.saved-setup-fingerprint,
.saved-notes-preview.premium{
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,251,255,.90)) !important;
  border: 1px solid rgba(20,184,166,.16) !important;
  box-shadow: 0 18px 46px rgba(15,23,42,.07) !important;
}
.saved-identity-card{
  display: grid;
  grid-template-columns: minmax(150px, auto) 1fr;
  align-items: center;
  gap: 16px;
  width: 100%;
  border-radius: 18px;
  padding: 14px 16px;
}
.saved-identity-card span,
.saved-description-card span{
  color: #64748b;
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .10em;
  text-transform: uppercase;
}
.saved-identity-card strong{
  color: #0f172a;
  font-size: 1.28rem;
  letter-spacing: -.02em;
  overflow: hidden;
  text-overflow: ellipsis;
}
.saved-card-topline.premium{
  display: grid !important;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 14px;
}
.saved-type-pill{display:none !important;}
.saved-description-colour{
  background: linear-gradient(135deg, rgba(236,253,245,.95), rgba(239,246,255,.92)) !important;
}
.saved-setup-card-colour{
  background:
    radial-gradient(circle at 100% 0%, rgba(20,184,166,.12), transparent 230px),
    linear-gradient(180deg, #ffffff, #f8fbff) !important;
  border-color: rgba(20,184,166,.18) !important;
}
.saved-setup-fingerprint{
  background:
    radial-gradient(circle at 100% 0%, rgba(14,165,233,.10), transparent 210px),
    linear-gradient(180deg, #ffffff, #f8fbff) !important;
}
.saved-fingerprint-heading h3{
  color: #0f172a !important;
}
.saved-headline-chip-grid div,
.saved-rule-chip-cloud span,
.saved-empty-rule-box{
  background: rgba(255,255,255,.92) !important;
  border-color: rgba(59,130,246,.16) !important;
}
.saved-rule-chip-cloud span:nth-child(3n+1){border-color: rgba(20,184,166,.24) !important; background: rgba(236,253,245,.75) !important;}
.saved-rule-chip-cloud span:nth-child(3n+2){border-color: rgba(99,102,241,.22) !important; background: rgba(238,242,255,.75) !important;}
.saved-rule-chip-cloud span:nth-child(3n+3){border-color: rgba(245,158,11,.22) !important; background: rgba(255,251,235,.75) !important;}
.saved-rule-chip-cloud small{color:#475569 !important;}
.saved-rule-chip-cloud strong{white-space:normal !important; line-height:1.25;}

.saved-performance-panel{
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 12%, rgba(20,184,166,.24), transparent 220px),
    linear-gradient(135deg,#061224,#0b1c35 54%,#10254a) !important;
  box-shadow: 0 22px 58px rgba(2, 6, 23, .22) !important;
}
.saved-performance-panel::before{
  content:"";
  position:absolute;
  inset:auto -30px -70px auto;
  width:210px;
  height:210px;
  border-radius:999px;
  background:rgba(99,102,241,.14);
  pointer-events:none;
}
.saved-performance-hero,
.saved-performance-grid{
  position: relative;
  z-index: 1;
}
.saved-performance-hero h3{
  font-size: 2.45rem !important;
}
.saved-performance-grid.compact{
  grid-template-columns: repeat(2, minmax(0,1fr)) !important;
}
.saved-metric-tile{
  background: rgba(255,255,255,.09) !important;
  border-color: rgba(255,255,255,.14) !important;
  min-height: 58px;
}
.saved-metric-tile small{color:#a8b6cc !important;}
.saved-metric-tile strong{color:#f8fafc !important;}
.saved-metric-tile.positive strong{color:#4ade80 !important;}
.saved-metric-tile.negative strong{color:#fb7185 !important;}

.saved-modal-actions-sticky{
  border-radius: 0 0 24px 24px;
  background: rgba(248,250,252,.96) !important;
}
.saved-load-list.premium{
  padding-bottom: 24px !important;
}
.saved-card-split{
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr) !important;
}
.saved-card-meta-row span{
  background: rgba(255,255,255,.88) !important;
  border-color: rgba(20,184,166,.14) !important;
}
.saved-empty-state{
  background:
    radial-gradient(circle at 100% 0%, rgba(20,184,166,.12), transparent 240px),
    linear-gradient(135deg,#ffffff,#f8fbff) !important;
  border-color: rgba(20,184,166,.22) !important;
}
.saved-field input,
.saved-field textarea,
.workspace-notes-textarea{
  background:#ffffff !important;
  border-color: rgba(20,184,166,.20) !important;
}

@media(max-width:1180px){
  .saved-card-split{grid-template-columns: 1fr !important;}
}
@media(max-width:760px){
  .saved-identity-card{grid-template-columns:1fr; gap:4px;}
  .saved-premium-header{margin:-22px -18px 20px !important; padding:22px 56px 20px 20px !important;}
}

/* Patch 15C-3 — premium save/load finish, modal structure and display polish */
#savedSetupModalRoot .saved-save-card,
#savedSetupModalRoot .saved-load-card{
  background:
    radial-gradient(circle at 96% 4%, rgba(20,184,166,.18), transparent 280px),
    radial-gradient(circle at 2% 100%, rgba(99,102,241,.16), transparent 300px),
    linear-gradient(135deg,#f8fafc 0%,#eefdf8 46%,#f4f1ff 100%) !important;
}
#savedSetupModalRoot .saved-save-card{
  display:grid !important;
  grid-template-rows:minmax(0,1fr) auto !important;
  height:min(900px, calc(100vh - 72px)) !important;
  max-height:calc(100vh - 72px) !important;
  overflow:visible !important;
}
#savedSetupModalRoot .saved-save-card .saved-modal-scroll{
  min-height:0 !important;
  max-height:none !important;
  height:auto !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  border-radius:24px 24px 0 0 !important;
  padding-bottom:28px !important;
}
#savedSetupModalRoot .saved-load-card{
  height:min(900px, calc(100vh - 72px)) !important;
  max-height:calc(100vh - 72px) !important;
  overflow:visible !important;
}
#savedSetupModalRoot .saved-load-card .saved-modal-scroll{
  height:100% !important;
  max-height:none !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  border-radius:24px !important;
}
#savedSetupModalRoot .saved-modal-actions-sticky{
  position:relative !important;
  bottom:auto !important;
  grid-row:2 !important;
  flex:0 0 auto !important;
  border-radius:0 0 24px 24px !important;
  background:linear-gradient(135deg, rgba(248,250,252,.98), rgba(236,253,245,.96)) !important;
  box-shadow:0 -20px 44px rgba(15,23,42,.08) !important;
  z-index:2 !important;
}
#savedSetupModalRoot .saved-modal-close{
  top:-18px !important;
  right:-18px !important;
  color:#0f172a !important;
  background:#f8fafc !important;
}
#savedSetupModalRoot .saved-modal-close:hover{
  background:#ffffff !important;
  color:#020617 !important;
}
#savedSetupModalRoot .saved-premium-header{
  border-radius:24px 24px 0 0 !important;
  background:
    radial-gradient(circle at 90% 0%, rgba(34,197,94,.24), transparent 260px),
    linear-gradient(135deg,#061224 0%,#0b3a42 48%,#1e2f63 100%) !important;
}
#savedSetupModalRoot .saved-save-layout{
  grid-template-columns:minmax(360px,.72fr) minmax(620px,1.28fr) !important;
  gap:22px !important;
}
#savedSetupModalRoot .saved-save-editor,
#savedSetupModalRoot .saved-save-snapshot,
#savedSetupModalRoot .saved-setup-fingerprint,
#savedSetupModalRoot .saved-description-card,
#savedSetupModalRoot .saved-notes-preview.premium{
  background:
    radial-gradient(circle at 100% 0%, rgba(20,184,166,.10), transparent 220px),
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,251,255,.92)) !important;
}
#savedSetupModalRoot .saved-save-editor{
  border:1px solid rgba(20,184,166,.16) !important;
  border-radius:24px !important;
  padding:18px !important;
  box-shadow:0 18px 46px rgba(15,23,42,.06) !important;
}
#savedSetupModalRoot .saved-save-snapshot .saved-setup-fingerprint{
  min-height:100% !important;
}
#savedSetupModalRoot .saved-headline-chip-grid.saved-premium-headline-grid{
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
}
#savedSetupModalRoot .saved-headline-chip-grid div,
#savedSetupModalRoot .saved-rule-chip-cloud span{
  box-shadow:0 10px 28px rgba(15,23,42,.045) !important;
}
#savedSetupModalRoot .saved-headline-accent-race,
#savedSetupModalRoot .saved-chip-accent-race{
  background:linear-gradient(135deg, rgba(236,253,245,.95), rgba(240,253,250,.82)) !important;
  border-color:rgba(20,184,166,.28) !important;
}
#savedSetupModalRoot .saved-headline-accent-market,
#savedSetupModalRoot .saved-chip-accent-market{
  background:linear-gradient(135deg, rgba(238,242,255,.96), rgba(239,246,255,.84)) !important;
  border-color:rgba(99,102,241,.26) !important;
}
#savedSetupModalRoot .saved-headline-accent-selection,
#savedSetupModalRoot .saved-chip-accent-selection{
  background:linear-gradient(135deg, rgba(255,251,235,.96), rgba(255,247,237,.84)) !important;
  border-color:rgba(245,158,11,.28) !important;
}
#savedSetupModalRoot .saved-headline-accent-evidence,
#savedSetupModalRoot .saved-chip-accent-evidence{
  background:linear-gradient(135deg, rgba(240,249,255,.96), rgba(224,242,254,.84)) !important;
  border-color:rgba(14,165,233,.26) !important;
}
#savedSetupModalRoot .saved-rule-sections{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  border-top:1px solid rgba(148,163,184,.18);
  padding-top:14px;
}
#savedSetupModalRoot .saved-rule-sections.compact{
  grid-template-columns:1fr;
}
#savedSetupModalRoot .saved-rule-section{
  border:1px solid rgba(148,163,184,.18);
  border-radius:18px;
  padding:14px;
  background:rgba(255,255,255,.58);
}
#savedSetupModalRoot .saved-rule-section.race{
  background:linear-gradient(135deg, rgba(236,253,245,.56), rgba(255,255,255,.72));
}
#savedSetupModalRoot .saved-rule-section.runner{
  background:linear-gradient(135deg, rgba(238,242,255,.58), rgba(255,255,255,.72));
}
#savedSetupModalRoot .saved-rule-section-title{
  display:grid;
  gap:4px;
  margin-bottom:10px;
}
#savedSetupModalRoot .saved-rule-section-title strong{
  color:#0f172a;
  font-weight:950;
}
#savedSetupModalRoot .saved-rule-section-title small{
  color:#64748b;
  line-height:1.35;
  font-weight:700;
}
#savedSetupModalRoot .saved-premium-chip-cloud span strong,
#savedSetupModalRoot .saved-headline-chip-grid strong{
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
}
#savedSetupModalRoot .saved-performance-panel{
  background:
    radial-gradient(circle at 88% 10%, rgba(20,184,166,.26), transparent 230px),
    radial-gradient(circle at 100% 100%, rgba(99,102,241,.20), transparent 240px),
    linear-gradient(135deg,#061224,#0a1e38 55%,#102753) !important;
  border:1px solid rgba(56,189,248,.18) !important;
}
#savedSetupModalRoot .saved-performance-panel.empty{
  background:linear-gradient(135deg,#ffffff,#f8fbff) !important;
  color:#172033 !important;
}
#savedSetupModalRoot .saved-performance-panel.empty .saved-kicker,
#savedSetupModalRoot .saved-performance-panel.empty h3,
#savedSetupModalRoot .saved-performance-panel.empty p{
  color:#172033 !important;
}
#savedSetupModalRoot .saved-load-list.premium{
  padding:0 2px 28px !important;
}
#savedSetupModalRoot .saved-setup-card.premium-card{
  background:
    radial-gradient(circle at 100% 0%, rgba(20,184,166,.13), transparent 260px),
    linear-gradient(180deg,#ffffff,#f7fbff) !important;
}
#savedSetupModalRoot .saved-card-split{
  grid-template-columns:minmax(0,1.12fr) minmax(420px,.88fr) !important;
}
#savedSetupModalRoot .saved-modal-status.error{
  color:#7f1d1d !important;
}
#savedSetupModalRoot .saved-error-state{
  border-style:solid !important;
  border-color:rgba(239,68,68,.22) !important;
  background:linear-gradient(135deg,#fff7f7,#fff1f2) !important;
}
@media(max-width:1180px){
  #savedSetupModalRoot .saved-save-layout,
  #savedSetupModalRoot .saved-card-split,
  #savedSetupModalRoot .saved-rule-sections{
    grid-template-columns:1fr !important;
  }
  #savedSetupModalRoot .saved-headline-chip-grid.saved-premium-headline-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}

/* Patch 15C-4 — premium save/load layout finalisation */
#savedSetupModalRoot .saved-save-layout-premium{
  grid-template-columns:minmax(380px,.78fr) minmax(470px,.62fr) !important;
  align-items:stretch !important;
  margin-bottom:18px !important;
}
#savedSetupModalRoot .saved-save-performance{
  min-width:0;
  display:flex;
}
#savedSetupModalRoot .saved-save-performance .saved-performance-panel{
  margin:0 !important;
  width:100%;
  min-height:100%;
}
#savedSetupModalRoot .saved-save-snapshot-wide{
  display:block;
  margin-top:0 !important;
}
#savedSetupModalRoot .saved-save-snapshot-wide .saved-setup-fingerprint{
  min-height:auto !important;
}
#savedSetupModalRoot .saved-save-card .saved-modal-scroll{
  padding-bottom:96px !important;
}
#savedSetupModalRoot .saved-modal-actions-sticky{
  position:absolute !important;
  left:0 !important;
  right:0 !important;
  bottom:0 !important;
  padding:16px 34px !important;
  border-radius:0 0 24px 24px !important;
}
#savedSetupModalRoot .saved-save-card{
  position:fixed !important;
}
#savedSetupModalRoot .saved-save-card .saved-modal-scroll{
  height:100% !important;
  padding-bottom:112px !important;
}
#savedSetupModalRoot .saved-performance-title-row{
  display:flex;
  align-items:flex-start;
  gap:13px;
  min-width:0;
}
#savedSetupModalRoot .saved-performance-title-icon,
#savedSetupModalRoot .saved-metric-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  color:#bfdbfe;
}
#savedSetupModalRoot .saved-performance-title-icon{
  width:36px;
  height:36px;
  border-radius:14px;
  color:#7dd3fc;
  background:rgba(14,165,233,.14);
  border:1px solid rgba(125,211,252,.20);
}
#savedSetupModalRoot .saved-performance-title-icon svg,
#savedSetupModalRoot .saved-metric-icon svg{
  width:20px;
  height:20px;
  display:block;
}
#savedSetupModalRoot .saved-metric-tile{
  display:flex !important;
  align-items:center;
  gap:10px;
}
#savedSetupModalRoot .saved-metric-icon{
  width:30px;
  height:30px;
  border-radius:12px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
}
#savedSetupModalRoot .saved-metric-copy{
  display:grid;
  gap:2px;
  min-width:0;
}
#savedSetupModalRoot .saved-performance-grid.compact{
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
}
#savedSetupModalRoot .saved-card-topline-final{
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:stretch !important;
}
#savedSetupModalRoot .saved-card-top-actions{
  display:flex;
  align-items:flex-start;
  gap:10px;
  justify-content:flex-end;
}
#savedSetupModalRoot .saved-card-actions-mini{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
#savedSetupModalRoot .saved-card-actions-mini .btn,
#savedSetupModalRoot .saved-card-actions-bottom .btn{
  min-height:38px;
  transition:transform .16s ease, box-shadow .16s ease, background .16s ease !important;
}
#savedSetupModalRoot .saved-card-actions-mini .btn:hover,
#savedSetupModalRoot .saved-card-actions-bottom .btn:hover{
  transform:translateY(-1px) scale(1.025) !important;
  box-shadow:0 14px 30px rgba(15,23,42,.12) !important;
}
#savedSetupModalRoot .saved-card-actions-bottom{
  display:none !important;
}
#savedSetupModalRoot .saved-card-split-final{
  grid-template-columns:minmax(0,1.04fr) minmax(430px,.96fr) !important;
  gap:18px !important;
}
#savedSetupModalRoot .saved-setup-card.premium-card{
  padding:24px !important;
  border:1px solid rgba(20,184,166,.20) !important;
}
#savedSetupModalRoot .saved-identity-card{
  min-height:60px;
}
#savedSetupModalRoot .saved-description-card{
  padding:14px 16px !important;
}
#savedSetupModalRoot .saved-description-card p{
  margin-top:6px !important;
}
#savedSetupModalRoot .saved-rule-chip-cloud.saved-premium-chip-cloud{
  gap:9px !important;
}
#savedSetupModalRoot .saved-rule-chip-cloud.saved-premium-chip-cloud span{
  display:inline-flex !important;
  align-items:center !important;
  gap:7px !important;
  min-width:0 !important;
  max-width:100% !important;
  border-radius:999px !important;
  padding:8px 11px !important;
  box-shadow:0 8px 22px rgba(15,23,42,.045) !important;
}
#savedSetupModalRoot .saved-rule-chip-cloud.saved-premium-chip-cloud span small{
  display:inline !important;
  margin:0 !important;
  white-space:nowrap;
  color:#475569 !important;
}
#savedSetupModalRoot .saved-rule-chip-cloud.saved-premium-chip-cloud span strong{
  display:inline !important;
  margin:0 !important;
  line-height:1.15 !important;
  color:#0f172a !important;
}
#savedSetupModalRoot .saved-rule-chip-cloud.saved-premium-chip-cloud .saved-rule-chip-more{
  border-radius:14px !important;
}
#savedSetupModalRoot .saved-headline-chip-grid.saved-premium-headline-grid div{
  min-height:58px;
}
#savedSetupModalRoot .saved-fingerprint-note{
  border-top:1px solid rgba(148,163,184,.16);
  padding-top:12px;
}
#savedSetupModalRoot .saved-empty-state{
  margin-top:10px;
}
@media(max-width:1240px){
  #savedSetupModalRoot .saved-save-layout-premium,
  #savedSetupModalRoot .saved-card-split-final{
    grid-template-columns:1fr !important;
  }
  #savedSetupModalRoot .saved-card-actions-bottom{
    display:flex !important;
  }
  #savedSetupModalRoot .saved-card-actions-mini{
    display:none !important;
  }
}
@media(max-width:760px){
  #savedSetupModalRoot .saved-card-topline-final{
    grid-template-columns:1fr !important;
  }
  #savedSetupModalRoot .saved-card-top-actions{
    justify-content:space-between;
  }
  #savedSetupModalRoot .saved-modal-actions-sticky{
    padding:14px 18px !important;
  }
}

/* Patch 15C-5 — load screen aligned to premium save-screen layout */
#savedSetupModalRoot .saved-load-premium-card{
  display:block !important;
  padding:26px !important;
}
#savedSetupModalRoot .saved-load-layout-premium{
  grid-template-columns:minmax(380px,.78fr) minmax(470px,.62fr) !important;
  align-items:stretch !important;
  margin-bottom:18px !important;
}
#savedSetupModalRoot .saved-load-editor{
  display:flex !important;
  flex-direction:column !important;
  gap:14px !important;
  min-height:100% !important;
}
#savedSetupModalRoot .saved-load-titlebar{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  gap:12px !important;
  align-items:start !important;
}
#savedSetupModalRoot .saved-load-identity-card{
  min-height:60px !important;
}
#savedSetupModalRoot .saved-load-actions-mini{
  align-self:start !important;
  padding-top:2px !important;
}
#savedSetupModalRoot .saved-load-notes-preview{
  margin:0 !important;
}
#savedSetupModalRoot .saved-load-notes-preview pre{
  min-height:46px !important;
  max-height:130px !important;
  overflow:auto !important;
}
#savedSetupModalRoot .saved-load-performance{
  min-width:0 !important;
  display:flex !important;
}
#savedSetupModalRoot .saved-load-performance .saved-performance-panel{
  width:100% !important;
  min-height:100% !important;
  margin:0 !important;
}
#savedSetupModalRoot .saved-load-snapshot-wide{
  display:block !important;
  margin-top:0 !important;
}
#savedSetupModalRoot .saved-load-snapshot-wide .saved-setup-fingerprint{
  min-height:auto !important;
}
#savedSetupModalRoot .saved-load-meta-row{
  margin-top:14px !important;
}
#savedSetupModalRoot .saved-load-premium-card .saved-card-actions-bottom{
  display:none !important;
}
#savedSetupModalRoot .saved-status-pill{
  display:none !important;
}
@media(max-width:1240px){
  #savedSetupModalRoot .saved-load-layout-premium{
    grid-template-columns:1fr !important;
  }
  #savedSetupModalRoot .saved-load-premium-card .saved-load-actions-bottom{
    display:flex !important;
  }
  #savedSetupModalRoot .saved-load-actions-mini{
    display:none !important;
  }
}
@media(max-width:760px){
  #savedSetupModalRoot .saved-load-titlebar{
    grid-template-columns:1fr !important;
  }
}

/* Patch 15C-6 — make Load screens mirror the premium Save layout */
#savedSetupModalRoot .saved-load-count-line{
  display:inline-flex;
  align-items:center;
  gap:10px;
  margin:0 0 12px;
  padding:7px 11px;
  border:1px solid rgba(20,184,166,.18);
  border-radius:999px;
  background:linear-gradient(135deg,rgba(236,253,245,.92),rgba(239,246,255,.90));
  color:#334155;
  box-shadow:0 10px 28px rgba(15,23,42,.045);
}
#savedSetupModalRoot .saved-load-count-line strong{
  color:#0f766e;
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.10em;
  font-weight:950;
}
#savedSetupModalRoot .saved-load-count-line span{
  color:#475569;
  font-size:.82rem;
  font-weight:850;
}
#savedSetupModalRoot .saved-load-match-save-card{
  padding:26px !important;
  border-radius:24px !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(20,184,166,.14), transparent 290px),
    radial-gradient(circle at 0% 100%, rgba(59,130,246,.08), transparent 280px),
    linear-gradient(180deg,#ffffff,#f7fbff) !important;
  border:1px solid rgba(20,184,166,.20) !important;
  box-shadow:0 24px 62px rgba(15,23,42,.075) !important;
}
#savedSetupModalRoot .saved-load-object-header{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:stretch;
  gap:16px;
  margin-bottom:16px;
}
#savedSetupModalRoot .saved-load-object-header .saved-load-identity-full{
  min-height:66px !important;
  display:flex;
  align-items:center;
  gap:18px;
  padding:14px 18px !important;
  background:linear-gradient(135deg,#ffffff,#f4fbff) !important;
  border:1px solid rgba(20,184,166,.18) !important;
  border-radius:18px !important;
  box-shadow:0 14px 34px rgba(15,23,42,.055) !important;
}
#savedSetupModalRoot .saved-load-object-header .saved-load-identity-full span{
  flex:0 0 auto;
  margin:0 !important;
  color:#64748b !important;
  text-transform:uppercase;
  letter-spacing:.12em;
  font-size:.72rem;
  font-weight:950;
}
#savedSetupModalRoot .saved-load-object-header .saved-load-identity-full strong{
  margin:0 !important;
  color:#0f172a !important;
  font-size:1.22rem;
  line-height:1.16;
  letter-spacing:-.02em;
}
#savedSetupModalRoot .saved-load-header-actions{
  align-self:stretch !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:10px !important;
  padding:0 !important;
}
#savedSetupModalRoot .saved-load-header-actions .btn{
  min-height:44px;
  padding:0 18px;
  border-radius:11px;
  font-weight:950;
}
#savedSetupModalRoot .saved-load-match-save-layout{
  grid-template-columns:minmax(380px,.78fr) minmax(470px,.62fr) !important;
  align-items:stretch !important;
  gap:20px !important;
  margin-bottom:18px !important;
}
#savedSetupModalRoot .saved-load-copy-column{
  display:grid !important;
  grid-template-rows:auto minmax(0,1fr);
  gap:14px !important;
  min-height:100% !important;
}
#savedSetupModalRoot .saved-load-copy-column .saved-description-card,
#savedSetupModalRoot .saved-load-copy-column .saved-notes-preview{
  margin:0 !important;
}
#savedSetupModalRoot .saved-load-copy-column .saved-description-card{
  min-height:84px;
}
#savedSetupModalRoot .saved-load-copy-column .saved-notes-preview{
  display:flex;
  flex-direction:column;
}
#savedSetupModalRoot .saved-load-copy-column .saved-notes-preview pre{
  flex:1;
  min-height:82px !important;
  max-height:180px !important;
}
#savedSetupModalRoot .saved-load-performance .saved-performance-panel{
  min-height:100% !important;
}
#savedSetupModalRoot .saved-load-snapshot-wide{
  margin-top:0 !important;
}
#savedSetupModalRoot .saved-load-actions-bottom{
  display:none !important;
}
#savedSetupModalRoot .saved-load-meta-row{
  margin-top:14px !important;
  padding-top:14px !important;
  border-top:1px solid rgba(148,163,184,.16);
}
@media(max-width:1240px){
  #savedSetupModalRoot .saved-load-object-header,
  #savedSetupModalRoot .saved-load-match-save-layout{
    grid-template-columns:1fr !important;
  }
  #savedSetupModalRoot .saved-load-header-actions{
    justify-content:flex-start !important;
    flex-wrap:wrap !important;
  }
  #savedSetupModalRoot .saved-load-actions-bottom{
    display:flex !important;
  }
}
@media(max-width:760px){
  #savedSetupModalRoot .saved-load-object-header .saved-load-identity-full{
    align-items:flex-start;
    flex-direction:column;
    gap:5px;
  }
}

/* === 2026-05-24 Final handover polish: sticky save/load/reset hierarchy === */
/* Applies to the shared sticky action rail used by Main Builder and Race Profiler. */
.builder-sticky-actions .btn.save,
.builder-sticky-actions .btn.load{
  min-width:148px !important;
  background:linear-gradient(135deg,rgba(236,253,245,.98),rgba(224,242,254,.96)) !important;
  color:#075985 !important;
  border:1px solid rgba(20,184,166,.42) !important;
  box-shadow:0 8px 18px rgba(14,165,233,.10),0 1px 0 rgba(255,255,255,.9) inset !important;
}
.builder-sticky-actions .btn.save:hover,
.builder-sticky-actions .btn.load:hover{
  background:linear-gradient(135deg,rgba(209,250,229,1),rgba(219,234,254,1)) !important;
  border-color:rgba(14,165,233,.55) !important;
  color:#064e3b !important;
  transform:translateY(-1px) !important;
}
.builder-sticky-actions .btn.clear{
  position:relative !important;
  min-width:118px !important;
  margin-left:16px !important;
  background:linear-gradient(135deg,rgba(255,247,247,.98),rgba(255,241,242,.96)) !important;
  color:#991b1b !important;
  border:1px solid rgba(248,113,113,.55) !important;
  box-shadow:0 8px 18px rgba(220,38,38,.08),0 1px 0 rgba(255,255,255,.9) inset !important;
}
.builder-sticky-actions .btn.clear::before{
  content:"";
  position:absolute;
  left:-15px;
  top:7px;
  bottom:7px;
  width:1px;
  background:linear-gradient(180deg,rgba(148,163,184,.12),rgba(148,163,184,.62),rgba(148,163,184,.12));
  pointer-events:none;
}
.builder-sticky-actions .btn.clear:hover{
  background:linear-gradient(135deg,rgba(254,226,226,1),rgba(255,241,242,1)) !important;
  border-color:rgba(239,68,68,.7) !important;
  color:#7f1d1d !important;
  transform:translateY(-1px) !important;
}
@media(max-width:900px){
  .builder-sticky-actions .btn.save,
  .builder-sticky-actions .btn.load{
    min-width:124px !important;
  }
  .builder-sticky-actions .btn.clear{
    margin-left:0 !important;
  }
  .builder-sticky-actions .btn.clear::before{
    content:none !important;
    display:none !important;
  }
}

/* === PATCH 15C-7 — Horse Profile layout + clean range inputs ===
   Purpose:
   - Give Rolling Runs and Rolling Wins equal horizontal space.
   - Move Experience / Strike Rates and Previous Prize Level into the right column.
   - Reduce the visual height of condition-history rows.
   - Remove coloured input gradients that caused Min/Max clipping and visual noise. */

/* Global range/input polish: typed controls should be clean white controls, not tinted gradients. */
.inline-inputs,
.compact-inputs,
.pill-range-input{
  --input-bg:#ffffff !important;
  --input-border:#d5dde8 !important;
}

.inline-inputs input,
.inline-inputs select,
.compact-inputs input,
.compact-inputs select,
.pill-range-input input{
  background:#ffffff !important;
  box-shadow:none !important;
}

.pill-range-input{
  overflow:visible !important;
  background:#ffffff !important;
  min-height:42px !important;
  padding-top:16px !important;
}

.pill-range-input::before,
.pill-range-input::after{
  top:2px !important;
  line-height:1 !important;
  font-size:9.5px !important;
  color:#64748b !important;
  white-space:nowrap !important;
}

.pill-range-input>span{
  background:linear-gradient(180deg, transparent, #d8e1ec 18%, #d8e1ec 82%, transparent) !important;
}

/* Re-balance the Horse Profile desktop layout. */
#horse-profile-stats .horse-profile-composed-grid.hp-grid-new{
  display:grid !important;
  grid-template-columns:minmax(0, 1.36fr) minmax(430px, 1fr) !important;
  gap:18px !important;
  align-items:start !important;
}

#horse-profile-stats .horse-rolling-run-strip{
  grid-column:1 !important;
  grid-row:1 !important;
}

#horse-profile-stats .horse-rolling-win-strip{
  grid-column:1 !important;
  grid-row:2 !important;
}

#horse-profile-stats .horse-experience-strip{
  grid-column:2 !important;
  grid-row:1 !important;
}

#horse-profile-stats .horse-prize-strip{
  grid-column:2 !important;
  grid-row:2 !important;
}

#horse-profile-stats .condition-matrix-strip{
  grid-column:1 / -1 !important;
  grid-row:3 !important;
}

#horse-profile-stats .horse-condition-strike-strip{
  grid-column:1 / -1 !important;
  grid-row:4 !important;
}

#horse-profile-stats .horse-rolling-run-strip .stat-mini-grid.five,
#horse-profile-stats .horse-rolling-win-strip .stat-mini-grid.five{
  grid-template-columns:repeat(5, minmax(108px, 1fr)) !important;
}

#horse-profile-stats .horse-experience-strip .stat-mini-grid.four{
  grid-template-columns:repeat(4, minmax(116px, 1fr)) !important;
}

#horse-profile-stats .horse-prize-strip .stat-mini-grid.three,
#horse-profile-stats .horse-prize-strip .prize-level-grid{
  grid-template-columns:repeat(3, minmax(128px, 1fr)) !important;
  gap:8px !important;
}

/* Make the condition-count and condition-strike bands slimmer and less heavy. */
#horse-profile-stats .condition-matrix-row,
#horse-profile-stats .condition-rate-row{
  background:#ffffff !important;
  border-color:rgba(203,213,225,.88) !important;
  box-shadow:0 3px 10px rgba(15,23,42,.035) !important;
}

#horse-profile-stats .condition-matrix-row{
  grid-template-columns:96px repeat(3, minmax(0, 1fr)) !important;
  gap:10px !important;
  min-height:54px !important;
  padding:6px 10px !important;
}

#horse-profile-stats .condition-matrix-row .stat-mini{
  min-height:48px !important;
  padding:4px 6px !important;
}

#horse-profile-stats .condition-matrix-row .stat-mini-title{
  min-height:12px !important;
  margin-bottom:3px !important;
  font-size:10px !important;
  line-height:1 !important;
}

#horse-profile-stats .condition-matrix-row .pill-range-input.compact-pill{
  max-width:144px !important;
}

#horse-profile-stats .condition-rate-label,
#horse-profile-stats .condition-matrix-row .matrix-label,
#horse-profile-stats .matrix-label{
  width:96px !important;
  min-width:96px !important;
  max-width:96px !important;
  height:42px !important;
  min-height:42px !important;
  padding:0 8px !important;
  font-size:10.5px !important;
}

#horse-profile-stats .condition-rate-row{
  grid-template-columns:96px minmax(0, 1fr) 128px minmax(0, 1fr) !important;
  min-height:54px !important;
  height:54px !important;
  padding:6px 10px !important;
  gap:10px !important;
}

#horse-profile-stats .condition-rate-row .stat-mini-title{
  font-size:10px !important;
  line-height:1.05 !important;
}

#horse-profile-stats .condition-rate-row .pill-range-input{
  max-width:144px !important;
}

/* Keep the single-column breakpoint clean after the desktop re-order. */
@media (max-width:1500px){
  #horse-profile-stats .horse-profile-composed-grid.hp-grid-new{
    grid-template-columns:1fr !important;
  }

  #horse-profile-stats .horse-rolling-run-strip,
  #horse-profile-stats .horse-rolling-win-strip,
  #horse-profile-stats .horse-experience-strip,
  #horse-profile-stats .horse-prize-strip,
  #horse-profile-stats .condition-matrix-strip,
  #horse-profile-stats .horse-condition-strike-strip{
    grid-column:1 !important;
    grid-row:auto !important;
  }
}

@media (max-width:1250px){
  #horse-profile-stats .horse-rolling-run-strip .stat-mini-grid.five,
  #horse-profile-stats .horse-rolling-win-strip .stat-mini-grid.five,
  #horse-profile-stats .horse-experience-strip .stat-mini-grid.four,
  #horse-profile-stats .horse-prize-strip .stat-mini-grid.three,
  #horse-profile-stats .horse-prize-strip .prize-level-grid{
    grid-template-columns:repeat(2, minmax(130px, 1fr)) !important;
  }
}

/* === PATCH 15C-8 — Horse Profile compact range-control follow-up ===
   Purpose:
   - Reduce the vertical bulk of the Horse Profile range pills.
   - Keep Min/Max labels visible without bottom clipping.
   - Allow Rolling Runs / Rolling Wins / Experience / Prize cards to sit flatter.
   - Make condition matrix and condition strike rows compact without cutting off controls. */

#horse-profile-stats .horse-rolling-run-strip,
#horse-profile-stats .horse-rolling-win-strip,
#horse-profile-stats .horse-experience-strip,
#horse-profile-stats .horse-prize-strip,
#horse-profile-stats .condition-matrix-strip,
#horse-profile-stats .horse-condition-strike-strip{
  padding:8px 12px !important;
}

#horse-profile-stats .stat-strip-header{
  margin-bottom:6px !important;
  line-height:1.05 !important;
}

#horse-profile-stats .horse-rolling-run-strip .stat-mini,
#horse-profile-stats .horse-rolling-win-strip .stat-mini,
#horse-profile-stats .horse-experience-strip .stat-mini,
#horse-profile-stats .horse-prize-strip .stat-mini{
  min-height:54px !important;
  padding:0 6px 2px !important;
}

#horse-profile-stats .horse-rolling-run-strip .stat-mini-title,
#horse-profile-stats .horse-rolling-win-strip .stat-mini-title,
#horse-profile-stats .horse-experience-strip .stat-mini-title{
  min-height:18px !important;
  margin-bottom:3px !important;
  font-size:10.1px !important;
  line-height:1.05 !important;
}

#horse-profile-stats .horse-prize-strip .stat-mini-title{
  min-height:22px !important;
  margin-bottom:3px !important;
  font-size:10px !important;
  line-height:1.05 !important;
}

#horse-profile-stats .pill-range-input.compact-pill,
#horse-profile-stats .pill-range-input.wide-pill{
  min-height:34px !important;
  height:34px !important;
  padding-top:11px !important;
  gap:4px !important;
  align-items:center !important;
  overflow:visible !important;
}

#horse-profile-stats .pill-range-input.compact-pill{
  max-width:132px !important;
  grid-template-columns:minmax(40px, 1fr) 1px minmax(40px, 1fr) !important;
}

#horse-profile-stats .pill-range-input.wide-pill{
  max-width:176px !important;
  grid-template-columns:minmax(68px, 1fr) 1px minmax(68px, 1fr) !important;
}

#horse-profile-stats .pill-range-input.compact-pill::before,
#horse-profile-stats .pill-range-input.compact-pill::after,
#horse-profile-stats .pill-range-input.wide-pill::before,
#horse-profile-stats .pill-range-input.wide-pill::after{
  top:1px !important;
  font-size:8.8px !important;
  line-height:1 !important;
}

#horse-profile-stats .pill-range-input.compact-pill input,
#horse-profile-stats .pill-range-input.wide-pill input{
  height:22px !important;
  min-height:22px !important;
  padding:0 5px !important;
  font-size:12px !important;
  line-height:22px !important;
}

#horse-profile-stats .pill-range-input.compact-pill > span,
#horse-profile-stats .pill-range-input.wide-pill > span{
  min-height:22px !important;
  height:22px !important;
  align-self:center !important;
}

#horse-profile-stats .condition-matrix-grid,
#horse-profile-stats .horse-condition-strike-strip .condition-stack{
  gap:6px !important;
}

#horse-profile-stats .condition-matrix-row{
  min-height:50px !important;
  padding:5px 10px !important;
  gap:8px !important;
}

#horse-profile-stats .condition-matrix-row .stat-mini{
  min-height:44px !important;
  padding:2px 6px !important;
}

#horse-profile-stats .condition-matrix-row .stat-mini-title{
  min-height:10px !important;
  margin-bottom:2px !important;
  font-size:9.6px !important;
  line-height:1 !important;
}

#horse-profile-stats .condition-rate-label,
#horse-profile-stats .condition-matrix-row .matrix-label,
#horse-profile-stats .matrix-label{
  height:40px !important;
  min-height:40px !important;
  padding:0 8px !important;
}

#horse-profile-stats .condition-rate-row{
  min-height:50px !important;
  height:50px !important;
  padding:5px 10px !important;
  gap:8px !important;
  overflow:visible !important;
}

#horse-profile-stats .condition-rate-row .stat-mini-title{
  min-height:auto !important;
  margin:0 !important;
  font-size:9.8px !important;
  line-height:1 !important;
}

#horse-profile-stats .condition-rate-row .pill-range-input.compact-pill{
  max-width:132px !important;
}

@media (max-width:1500px){
  #horse-profile-stats .pill-range-input.compact-pill,
  #horse-profile-stats .pill-range-input.wide-pill{
    height:auto !important;
    min-height:36px !important;
  }
}

/* Patch 16D — Live Racing UI foundation */
.live-racing-topbar h1{letter-spacing:-.045em}
.live-racing-hero{position:relative;margin:0 0 22px;padding:30px 32px;border:1px solid rgba(20,184,166,.22);border-radius:30px;background:linear-gradient(135deg,rgba(15,23,42,.96),rgba(30,64,175,.88) 52%,rgba(20,184,166,.82));color:#fff;box-shadow:0 24px 70px rgba(15,23,42,.18);overflow:hidden}
.live-racing-hero:after{content:"";position:absolute;right:-80px;top:-100px;width:340px;height:340px;border-radius:999px;background:rgba(255,255,255,.12)}
.live-racing-kicker{text-transform:uppercase;letter-spacing:.15em;font-size:12px;font-weight:950;opacity:.78;margin-bottom:8px}
.live-racing-hero h2{margin:0;font-size:34px;line-height:1.02;letter-spacing:-.06em;font-weight:950;position:relative;z-index:1}
.live-racing-hero p{margin:12px 0 0;max-width:940px;font-size:14px;line-height:1.55;color:rgba(255,255,255,.86);position:relative;z-index:1}
.live-racing-workspace{display:flex;flex-direction:column;gap:16px}
.live-date-strip{display:flex;gap:8px;align-items:stretch;flex-wrap:wrap;padding:12px;border:1px solid rgba(148,163,184,.28);border-radius:20px;background:linear-gradient(180deg,#fff,#f8fafc);box-shadow:0 16px 38px rgba(15,23,42,.08)}
.live-date-chip{border:1px solid rgba(203,213,225,.9);border-radius:14px;background:#fff;color:#0f172a;padding:10px 14px;min-width:96px;font-weight:950;cursor:pointer;transition:.16s;box-shadow:0 8px 18px rgba(15,23,42,.06)}
.live-date-chip span{display:block;font-size:12px;letter-spacing:.08em}.live-date-chip small{display:block;margin-top:4px;color:#64748b;font-size:11px;font-weight:800}.live-date-chip:hover{transform:translateY(-2px);box-shadow:0 14px 26px rgba(15,23,42,.12)}.live-date-chip.active{background:var(--blue-grad);color:#fff;border-color:transparent}.live-date-chip.active small{color:rgba(255,255,255,.82)}
.live-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.live-summary-card{border:1px solid rgba(148,163,184,.28);border-radius:22px;padding:18px 20px;background:linear-gradient(180deg,#fff,#f8fafc);box-shadow:0 18px 44px rgba(15,23,42,.09);min-height:118px}.live-summary-card.active{border-color:rgba(20,184,166,.35);background:linear-gradient(135deg,rgba(240,253,250,.98),#fff)}.live-summary-kicker{text-transform:uppercase;letter-spacing:.12em;color:#64748b;font-size:11px;font-weight:950}.live-summary-card strong{display:block;margin-top:8px;font-size:34px;line-height:1;font-weight:950;letter-spacing:-.06em;color:#0f172a}.live-summary-card span{display:block;margin-top:7px;color:#475569;font-weight:750;font-size:13px}.live-summary-card.placeholder strong{color:#94a3b8}
.live-racing-toolbar{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;padding:12px;border:1px solid rgba(148,163,184,.28);border-radius:20px;background:#fff;box-shadow:0 14px 34px rgba(15,23,42,.08)}
.live-view-toggle{display:inline-flex;border:1px solid rgba(220,38,38,.35);border-radius:12px;overflow:hidden}.live-view-toggle button{border:0;background:#fff;color:#dc2626;padding:10px 18px;font-weight:950;cursor:pointer}.live-view-toggle button.active{background:var(--red-grad);color:#fff}.live-racing-status{font-weight:800;color:#64748b;font-size:13px}.live-racing-status.ok{color:#047857}.live-racing-status.error{color:#b91c1c}.live-expand-button,.live-back-button,.live-result-button{border:1px solid rgba(148,163,184,.34);border-radius:12px;background:#fff;color:#0f172a;padding:10px 14px;font-weight:950;cursor:pointer;transition:.14s}.live-expand-button:hover,.live-back-button:hover{transform:translateY(-1px);box-shadow:0 10px 22px rgba(15,23,42,.12)}.live-result-button:disabled{opacity:.55;cursor:not-allowed}
.live-racing-list{display:flex;flex-direction:column;gap:8px}.live-course-card{border:1px solid rgba(203,213,225,.72);border-radius:18px;background:#fff;overflow:hidden;box-shadow:0 12px 30px rgba(15,23,42,.07)}.live-course-header{width:100%;display:grid;grid-template-columns:120px 1fr auto 42px;gap:14px;align-items:center;border:0;background:linear-gradient(180deg,#f8fafc,#eef2f7);padding:12px 14px;text-align:left;cursor:pointer}.live-course-image-placeholder{height:44px;border-radius:12px;background:linear-gradient(135deg,#cbd5e1,#64748b);position:relative;overflow:hidden}.live-course-image-placeholder:after{content:"";position:absolute;inset:16px -20px -10px;background:rgba(255,255,255,.35);transform:rotate(-8deg)}.live-course-main strong{display:block;font-size:17px;letter-spacing:.02em;text-transform:uppercase;font-weight:950;color:#0f172a}.live-course-main small{display:block;margin-top:4px;color:#64748b;font-size:12px}.live-course-meta{display:flex;gap:14px;align-items:center;color:#0f172a;font-size:12px}.live-course-meta b,.live-course-meta span,.live-course-meta em{font-style:normal;white-space:nowrap}.live-course-toggle-symbol{font-size:28px;color:#dc2626;font-weight:400;text-align:center}.live-course-races{border-top:1px solid rgba(226,232,240,.85)}
.live-race-row{width:100%;display:grid;grid-template-columns:76px minmax(0,1fr) auto 90px 24px;gap:12px;align-items:center;padding:12px 14px;border:0;border-bottom:1px solid rgba(226,232,240,.75);background:#fff;text-align:left;cursor:pointer;transition:.12s}.live-race-row:hover{background:#f8fafc;transform:translateX(2px)}.live-race-row:last-child{border-bottom:0}.live-race-time{font-size:24px;font-weight:800;color:#0f172a}.live-race-info strong{display:block;color:#0f172a;font-size:15px;font-weight:850}.live-race-info small{display:block;margin-top:3px;color:#64748b;font-size:12px}.live-race-tags{display:flex;gap:6px;justify-content:flex-end}.live-pill{font-style:normal;border-radius:7px;padding:3px 7px;font-size:10px;font-weight:950;text-transform:uppercase}.live-pill.daily{background:#ecfdf5;color:#047857}.live-pill.advance{background:#eff6ff;color:#1d4ed8}.live-pill.blacktype{background:#111827;color:#fff}.live-race-runners{font-size:12px;color:#64748b;font-weight:900;text-align:right}.live-race-chevron{font-size:26px;color:#dc2626;text-align:right}.time-row{grid-template-columns:76px 122px minmax(0,1fr) 90px 24px}.live-race-course{font-weight:950;text-transform:uppercase;color:#0f172a;font-size:13px}
.live-racing-racecard{margin-top:12px}.live-racecard-panel{border:1px solid rgba(148,163,184,.28);border-radius:26px;background:#fff;box-shadow:0 24px 70px rgba(15,23,42,.13);overflow:hidden}.live-racecard-nav{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 16px;background:#0f172a;color:#fff}.live-meeting-strip{display:flex;align-items:center;gap:12px;min-width:0}.live-meeting-strip strong{text-transform:uppercase;white-space:nowrap}.live-time-chips{display:flex;gap:6px;overflow:auto}.live-time-chip{border:1px solid rgba(255,255,255,.22);border-radius:8px;background:rgba(255,255,255,.08);color:#fff;padding:6px 10px;font-weight:950;cursor:pointer;transition:.14s}.live-time-chip:hover{transform:translateY(-2px)}.live-time-chip.active{background:var(--blue-grad);border-color:transparent;box-shadow:0 10px 22px rgba(37,99,235,.35)}
.live-racecard-header{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:18px;padding:22px 24px;border-bottom:1px solid rgba(226,232,240,.85)}.live-race-date{display:inline-block;background:#0f3f46;color:#fff;border-radius:7px;padding:4px 8px;font-size:12px;font-weight:950;margin-bottom:8px}.live-racecard-header h2{margin:0;font-size:28px;letter-spacing:-.05em;color:#0f172a}.live-racecard-header h2 span{font-variant-numeric:tabular-nums}.live-racecard-header p{margin:6px 0 0;color:#0f172a;font-size:14px}.live-racecard-header p span{color:#64748b}.live-racecard-meta-box{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.live-racecard-meta-box span{background:#f8fafc;border:1px solid rgba(226,232,240,.9);border-radius:10px;padding:8px 10px;font-size:12px;font-weight:850;color:#334155}.live-race-conditions-card{margin:0 24px 16px;padding:16px;border-radius:14px;background:#f8fafc;border:1px solid rgba(226,232,240,.9)}.live-conditions-topline{display:flex;justify-content:space-between;gap:12px;margin-bottom:8px}.live-race-conditions-card p{margin:0;line-height:1.45;color:#334155;font-size:13px}.live-racecard-mode-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;padding:0 24px 10px}.live-racecard-mode-tabs button{border:1px solid rgba(203,213,225,.9);border-radius:8px;background:#fff;padding:9px;font-weight:950;color:#64748b}.live-racecard-mode-tabs button.active{background:#111827;color:#fff}.live-racecard-mode-tabs button:disabled{opacity:.48}
.live-runners-table{padding:0 24px 24px}.live-runner-table-head{display:grid;grid-template-columns:54px 60px minmax(260px,1fr) 70px 110px 180px 180px 80px;gap:10px;align-items:center;background:#f1f5f9;color:#64748b;text-transform:uppercase;font-size:11px;font-weight:950;padding:10px 12px;border-radius:12px 12px 0 0}.live-runner-row{border:1px solid rgba(203,213,225,.9);border-top:0;padding:12px;background:#fff}.live-runner-row:last-child{border-radius:0 0 14px 14px}.live-runner-main{display:grid;grid-template-columns:72px minmax(280px,1fr) 360px;gap:16px;align-items:center}.live-silk-placeholder{width:54px;height:54px;border-radius:10px;background:linear-gradient(135deg,#14b8a6 0 33%,#0f172a 33% 66%,#facc15 66% 100%);display:flex;align-items:center;justify-content:center;color:#fff;font-weight:950;box-shadow:inset 0 0 0 2px rgba(255,255,255,.55)}.live-runner-titleline{display:flex;align-items:baseline;gap:7px;flex-wrap:wrap}.live-runner-number{font-weight:950;color:#0f172a}.live-runner-titleline strong{font-size:17px;color:#0f3f46;font-weight:950}.live-runner-titleline em{font-style:normal;color:#64748b;font-size:11px;font-weight:950}.live-runner-titleline sup{font-size:10px;color:#0f172a}.live-headgear{font-size:11px;color:#0f172a;font-weight:950}.live-runner-subline{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-top:5px;color:#0f172a;font-size:12px}.live-cd-badge{border-radius:5px;background:#0f3f46;color:#fff;padding:2px 5px;font-size:10px;font-weight:950}.live-runner-people{display:grid;grid-template-columns:1fr;gap:5px;font-size:12px;color:#0f172a}.live-runner-people b{color:#64748b}.live-runner-secondary{display:grid;grid-template-columns:minmax(160px,1fr) 240px 260px;gap:12px;align-items:center;margin-top:9px}.live-form-figures{font-weight:950;color:#0f172a;letter-spacing:.09em}.live-form-figures span{display:inline-block;min-width:12px}.live-runner-stats{display:flex;gap:8px}.live-runner-stats span{background:#f8fafc;border:1px solid rgba(226,232,240,.9);border-radius:9px;padding:6px 9px;font-size:12px}.live-runner-stats b{display:inline-block;margin-right:5px;color:#64748b}.live-runner-actions{display:flex;gap:8px;justify-content:flex-end;align-items:center}.live-odds-placeholder{min-width:48px;text-align:center;background:#dc2626;color:#fff;border-radius:8px;padding:7px 10px;font-weight:950}.live-runner-actions button{border:1px solid rgba(203,213,225,.9);border-radius:8px;background:#fff;padding:7px 10px;font-size:11px;font-weight:950;color:#64748b}.live-loading-state,.live-empty-state,.live-error-state,.live-empty-inline{padding:18px;border:1px dashed rgba(148,163,184,.5);border-radius:18px;background:#fff;color:#64748b;font-weight:850}.live-error-state{color:#b91c1c;background:#fef2f2;border-color:#fecaca}
@media(max-width:1100px){.live-summary-grid{grid-template-columns:1fr}.live-racecard-header{grid-template-columns:1fr}.live-race-row,.time-row{grid-template-columns:72px minmax(0,1fr) 80px 22px}.live-race-course,.live-race-tags{display:none}.live-runner-table-head{display:none}.live-runner-main{grid-template-columns:64px 1fr}.live-runner-people{grid-column:2}.live-runner-secondary{grid-template-columns:1fr}.live-course-header{grid-template-columns:82px 1fr 34px}.live-course-meta{display:none}.live-racing-toolbar{grid-template-columns:1fr}.live-meeting-strip{align-items:flex-start;flex-direction:column}}


/* Patch 16D-A — racecard view should behave as its own Live Racing page state */
.live-racecard-active .live-racing-racecard{margin-top:0;}
.live-racecard-active .live-racecard-panel{box-shadow:0 26px 78px rgba(15,23,42,.16);}
.live-racecard-active .live-racecard-nav{border-radius:0;}
.live-racecard-active .live-back-button{background:#fff;color:#0f172a;}


/* Patch 16D-B — Live Racing page-state and sidebar hit-target fixes */
#page-live-racing .live-racing-hero[hidden],
#page-live-racing .live-date-strip[hidden],
#page-live-racing .live-summary-grid[hidden],
#page-live-racing .live-racing-toolbar[hidden],
#page-live-racing .live-racing-list[hidden],
#page-live-racing .live-racing-racecard[hidden]{
  display:none!important;
}

#page-live-racing.live-racecard-active .live-racing-hero,
#page-live-racing.live-racecard-active .live-date-strip,
#page-live-racing.live-racecard-active .live-summary-grid,
#page-live-racing.live-racecard-active .live-racing-toolbar,
#page-live-racing.live-racecard-active .live-racing-list{
  display:none!important;
}

#page-live-racing.live-racecard-active .live-racing-racecard{
  display:block!important;
  margin-top:0!important;
}

.sidebar .nav-button{
  width:100%!important;
  min-height:64px!important;
  position:relative!important;
  z-index:2!important;
  isolation:isolate!important;
  cursor:pointer!important;
}
.sidebar .nav-button > *{
  pointer-events:none!important;
}
.sidebar .nav-button:hover,
.sidebar .nav-button.active{
  z-index:5!important;
}
.sidebar .nav-coming-soon{
  z-index:1!important;
}
.sidebar .nav-icon[data-icon="nav-live-racing"]{
  --icon-scale:1.85!important;
}
.sidebar .nav-icon[data-icon="nav-live-racing"] img{
  transform:translateY(0) scale(calc(var(--icon-scale,1.45) * 1.05))!important;
}
.sidebar .nav-item:hover .nav-icon[data-icon="nav-live-racing"] img,
.sidebar .nav-item.active:hover .nav-icon[data-icon="nav-live-racing"] img{
  transform:translateY(-3px) scale(calc(var(--icon-scale,1.45) * 1.14))!important;
}

/* === Patch 16E-B: Live Racing non-runner display + TS === */
.live-runner-table-head{
  grid-template-columns:54px 60px minmax(260px,1fr) 70px 70px 110px 180px 180px 80px;
}
.live-runner-row.non-runner{
  background:linear-gradient(180deg,#f8fafc,#eef2f7);
  color:#64748b;
  opacity:.82;
}
.live-runner-row.non-runner .live-silk-placeholder{
  filter:grayscale(1);
  opacity:.58;
  background:linear-gradient(135deg,#cbd5e1 0 33%,#94a3b8 33% 66%,#e2e8f0 66% 100%);
  color:#475569;
}
.live-runner-row.non-runner .live-runner-titleline strong{
  color:#64748b;
  text-decoration:line-through;
  text-decoration-thickness:2px;
  text-decoration-color:rgba(100,116,139,.42);
}
.live-runner-row.non-runner .live-cd-badge{
  background:#94a3b8;
}
.live-runner-row.reserve-like:not(.non-runner){
  box-shadow:inset 4px 0 0 rgba(245,158,11,.58);
}
.live-runner-status-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  padding:3px 8px;
  font-size:9px;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
  line-height:1;
}
.live-runner-status-badge.non-runner{
  color:#fff;
  background:#64748b;
  border:1px solid rgba(71,85,105,.24);
}
.live-runner-status-badge.reserve{
  color:#92400e;
  background:#fef3c7;
  border:1px solid #fde68a;
}
.live-non-runner-note{
  margin-top:5px;
  color:#64748b;
  font-size:11px;
  font-weight:850;
}
.live-odds-placeholder.non-runner{
  background:#94a3b8;
  color:#fff;
}
.live-runner-row.non-runner .live-runner-actions button{
  background:#f1f5f9;
  color:#94a3b8;
  cursor:not-allowed;
}
.live-race-runners{
  min-width:112px;
  text-align:right;
}
@media(max-width:1100px){
  .live-runner-table-head{
    display:none;
  }
}

/* === Patch 16F: compact Live Racing controls + manual racecard state === */
.live-racing-hero{
  margin-bottom:14px!important;
  padding:24px 30px!important;
}
.live-racing-workspace{
  gap:12px!important;
}
.live-summary-card{
  min-height:96px!important;
  padding:14px 18px!important;
}
.live-summary-card strong{
  font-size:30px!important;
}
.live-racing-toolbar.compact{
  grid-template-columns:auto minmax(280px,1fr) minmax(220px,auto) auto;
  gap:12px;
  padding:10px 12px;
}
.live-racing-toolbar .live-date-strip.compact{
  padding:0!important;
  border:0!important;
  box-shadow:none!important;
  background:transparent!important;
  border-radius:0!important;
  justify-content:center;
  overflow:auto;
  flex-wrap:nowrap;
}
.live-racing-toolbar .live-date-strip.compact .live-date-chip{
  min-width:86px;
  padding:8px 11px;
  border-radius:12px;
  box-shadow:0 6px 14px rgba(15,23,42,.06);
}
.live-racing-toolbar .live-date-strip.compact .live-date-chip span{
  font-size:11px;
}
.live-racing-toolbar .live-date-strip.compact .live-date-chip small{
  font-size:10px;
  margin-top:2px;
}
.live-racecard-nav-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.live-reset-button,
.live-nr-toggle-button{
  border:1px solid rgba(255,255,255,.22);
  border-radius:10px;
  background:rgba(255,255,255,.08);
  color:#fff;
  padding:9px 12px;
  font-weight:950;
  cursor:pointer;
  transition:.14s;
}
.live-reset-button:hover,
.live-nr-toggle-button:hover{
  transform:translateY(-1px);
  background:rgba(255,255,255,.14);
}
.live-reset-button:disabled,
.live-nr-toggle-button:disabled{
  opacity:.42;
  cursor:not-allowed;
  transform:none;
}
.live-racecard-state-strip{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  padding:0 24px 10px;
}
.live-racecard-state-strip span{
  display:inline-flex;
  align-items:center;
  gap:5px;
  border:1px solid rgba(203,213,225,.9);
  border-radius:999px;
  background:#f8fafc;
  color:#475569;
  padding:6px 10px;
  font-size:11px;
  font-weight:900;
}
.live-racecard-state-strip b{
  color:#0f172a;
}
.live-runner-row.manual-excluded{
  background:linear-gradient(180deg,#fff7ed,#fffbeb);
  box-shadow:inset 4px 0 0 rgba(245,158,11,.72);
}
.live-runner-row.manual-excluded .live-runner-titleline strong{
  color:#92400e;
}
.live-runner-row.manual-excluded .live-silk-placeholder{
  filter:saturate(.72);
  opacity:.9;
}
.live-runner-status-badge.manual{
  color:#92400e;
  background:#ffedd5;
  border:1px solid #fed7aa;
}
.live-odds-placeholder.manual-excluded{
  background:#f59e0b;
  color:#111827;
}
.live-runner-row.manual-excluded .live-runner-actions button[data-live-toggle-exclude]{
  border-color:#fed7aa;
  background:#fff7ed;
  color:#92400e;
}
.live-runner-row:not(.non-runner) .live-runner-actions button[data-live-toggle-exclude]:not(:disabled){
  cursor:pointer;
}
.live-runner-row:not(.non-runner) .live-runner-actions button[data-live-toggle-exclude]:not(:disabled):hover{
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(15,23,42,.1);
}
@media(max-width:1100px){
  .live-racing-toolbar.compact{
    grid-template-columns:1fr;
  }
  .live-racing-toolbar .live-date-strip.compact{
    justify-content:flex-start;
  }
  .live-racecard-nav{
    align-items:flex-start;
    flex-direction:column;
  }
  .live-racecard-nav-actions{
    justify-content:flex-start;
  }
}


/* Patch 16G — Live Racing race-header and distance display tidy */
.live-racecard-header{
  grid-template-columns:minmax(0,1fr) 320px;
  gap:20px;
  align-items:start;
  padding:22px 24px 18px;
}
.live-racecard-title-block{min-width:0;}
.live-race-title-line{
  display:flex;
  align-items:baseline;
  flex-wrap:wrap;
  gap:4px 7px;
  margin:8px 0 0!important;
  color:#0f172a!important;
  font-size:15px!important;
  line-height:1.35;
}
.live-distance-headline{
  font-weight:950;
  color:#0f172a!important;
}
.live-distance-exact{
  font-weight:700;
  color:#64748b!important;
}
.live-race-title-name{font-weight:800;color:#0f172a!important;}
.live-race-title-context{font-weight:800;color:#475569!important;}
.live-race-info-strip{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:12px;
  color:#334155;
  font-size:13px;
  font-weight:850;
}
.live-race-info-strip span{
  position:relative;
  padding-right:12px;
}
.live-race-info-strip span:not(:last-child)::after{
  content:"";
  position:absolute;
  right:0;
  top:50%;
  width:3px;
  height:3px;
  border-radius:999px;
  background:#94a3b8;
}
.live-racecard-key-facts{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding-top:6px;
}
.live-racecard-key-facts span{
  display:flex;
  justify-content:space-between;
  gap:14px;
  border-bottom:1px solid rgba(226,232,240,.9);
  padding:0 0 8px;
  color:#334155;
  font-size:13px;
  line-height:1.3;
  text-align:right;
}
.live-racecard-key-facts b{
  color:#0f172a;
  font-size:11px;
  letter-spacing:.08em;
  text-transform:uppercase;
  text-align:left;
  white-space:nowrap;
}
.live-race-conditions-card{margin-top:0;}
.live-conditions-topline span{color:#475569;font-weight:850;}
@media(max-width:1100px){
  .live-racecard-header{grid-template-columns:1fr;}
  .live-racecard-key-facts span{text-align:left;}
}

/* Patch 16H — server-backed Live Racing racecard state, notes, and compact runner rows */
.live-notes-toggle-button{
  border:1px solid rgba(255,255,255,.22);
  border-radius:10px;
  background:rgba(255,255,255,.08);
  color:#fff;
  padding:9px 12px;
  font-weight:950;
  cursor:pointer;
  transition:.14s;
}
.live-notes-toggle-button:hover{transform:translateY(-1px);background:rgba(255,255,255,.14)}
.live-notes-toggle-button.active,
.live-notes-toggle-button.has-note{background:linear-gradient(135deg,#14b8a6,#2563eb);border-color:transparent;color:#fff;box-shadow:0 10px 22px rgba(20,184,166,.18)}
.live-race-notes-panel{
  margin:0 24px 16px;
  padding:14px;
  border:1px solid rgba(20,184,166,.25);
  border-radius:16px;
  background:linear-gradient(180deg,#f0fdfa,#ffffff);
  box-shadow:0 12px 28px rgba(15,23,42,.06);
}
.live-race-notes-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}
.live-race-notes-header strong{display:block;color:#0f172a;font-size:14px;font-weight:950}
.live-race-notes-header span{display:block;margin-top:2px;color:#64748b;font-size:12px;font-weight:850}
.live-race-notes-header button,
.live-race-notes-actions button{border:1px solid rgba(203,213,225,.9);border-radius:10px;background:#fff;color:#334155;padding:8px 11px;font-weight:950;cursor:pointer;transition:.14s}
.live-race-notes-header button:hover,
.live-race-notes-actions button:hover{transform:translateY(-1px);box-shadow:0 8px 18px rgba(15,23,42,.08)}
.live-race-notes-panel textarea{width:100%;min-height:112px;resize:vertical;border:1px solid rgba(203,213,225,.9);border-radius:12px;background:#fff;color:#0f172a;padding:12px;font:inherit;font-size:13px;line-height:1.45;outline:none}
.live-race-notes-panel textarea:focus{border-color:#14b8a6;box-shadow:0 0 0 3px rgba(20,184,166,.12)}
.live-race-notes-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px;color:#64748b;font-size:12px;font-weight:850}
.live-race-notes-actions button{background:#0f172a;color:#fff;border-color:#0f172a}
.live-race-notes-actions button:disabled{opacity:.55;cursor:wait;transform:none}
.live-runner-table-head{grid-template-columns:54px 60px minmax(260px,1fr) 70px 70px 180px 220px 80px!important}
.live-runner-row{padding:9px 12px!important}
.live-runner-main{grid-template-columns:62px minmax(260px,1fr) minmax(340px,430px)!important;gap:12px!important}
.live-silk-placeholder{width:48px!important;height:48px!important;border-radius:9px!important}
.live-runner-titleline strong{font-size:16px!important}
.live-runner-subline.compact{margin-top:4px;gap:7px;font-size:11px;color:#334155}
.live-runner-people.compact{grid-template-columns:1fr;gap:4px;font-size:12px;line-height:1.25}
.live-runner-people.compact span{white-space:normal;color:#0f172a}
.live-runner-people.compact b{display:inline-block;margin-right:4px;color:#64748b;text-transform:uppercase;font-size:10px;letter-spacing:.06em}
.live-runner-people.compact .live-person-label{margin-left:10px;color:#0f172a;font-size:11px;letter-spacing:0;text-transform:none}
.live-runner-secondary{grid-template-columns:minmax(140px,1fr) 220px 242px!important;margin-top:6px!important;gap:10px!important}
.live-runner-stats span{padding:5px 8px!important;font-size:11px!important}
.live-runner-actions button{padding:6px 9px!important}
.live-odds-placeholder{padding:6px 9px!important;min-width:46px!important}
@media(max-width:1100px){
  .live-runner-main{grid-template-columns:58px 1fr!important}
  .live-runner-people.compact{grid-column:2;max-width:none}
  .live-runner-secondary{grid-template-columns:1fr!important}
  .live-race-notes-panel{margin-left:16px;margin-right:16px}
}

/* Patch 16I — Live Racing runner polish, sorting, going cleanup, and Builder/Profile notes visual refresh */
.live-runner-table-head{
  grid-template-columns:50px 58px minmax(230px,1fr) 60px 60px 170px 190px 76px!important;
  padding:8px 10px!important;
  gap:8px!important;
}
.live-sort-header,
.live-sort-header-pair{
  min-width:0;
}
.live-sort-header{
  border:0;
  background:transparent;
  color:#64748b;
  text-align:left;
  text-transform:uppercase;
  font:inherit;
  font-size:10px;
  font-weight:950;
  letter-spacing:.04em;
  padding:0;
  cursor:pointer;
  transition:color .14s ease, transform .14s ease;
}
.live-sort-header:hover{color:#0f172a;transform:translateY(-1px)}
.live-sort-header.active{color:#2563eb}
.live-sort-header-pair{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.live-sort-header-pair .live-sort-header{font-size:9.5px;white-space:nowrap}
.live-runner-row{padding:7px 10px!important}
.live-runner-main{grid-template-columns:56px minmax(230px,1fr) minmax(285px,370px)!important;gap:10px!important}
.live-runner-secondary{grid-template-columns:minmax(128px,1fr) 180px 230px!important;margin-top:4px!important;gap:8px!important}
.live-silk-placeholder{width:48px!important;height:48px!important;border-radius:11px!important;position:relative;overflow:hidden}
.live-silk-placeholder::before{content:"♞";position:absolute;right:5px;top:0;font-size:22px;line-height:1;color:rgba(255,255,255,.28);text-shadow:0 1px 0 rgba(15,23,42,.28)}
.live-silk-placeholder span{position:relative;z-index:1;font-size:14px}
.live-runner-titleline{gap:6px!important}
.live-runner-number{font-size:16px!important;line-height:1;color:#0f172a;min-width:24px;display:inline-flex;align-items:baseline;gap:2px}
.live-runner-number em{font-size:11px!important;color:#64748b;font-weight:900;font-style:normal}
.live-runner-titleline strong{font-size:15.5px!important;letter-spacing:-.01em}
.live-runner-titleline sup{font-size:9.5px!important}
.live-runner-subline.compact{font-size:10.5px!important;margin-top:3px!important}
.live-form-figures{font-size:12px!important;letter-spacing:.075em}
.live-runner-people.compact{gap:3px!important;font-size:11.5px!important;line-height:1.22!important;max-width:370px}
.live-runner-people.compact span{display:flex;align-items:baseline;gap:5px;white-space:normal!important}
.live-runner-people.compact strong{min-width:46px;color:#0f172a;font-weight:950}
.live-runner-people.compact b.live-person-label{margin-left:4px!important;margin-right:1px!important;color:#0f172a!important;font-size:10.5px!important;font-weight:950!important;text-transform:none!important;letter-spacing:0!important}
.live-runner-stats{gap:5px!important;justify-content:flex-end}
.live-runner-stats span{padding:4px 7px!important;font-size:10.5px!important;border-radius:8px!important}
.live-runner-actions{gap:6px!important}
.live-odds-placeholder{min-width:44px!important;padding:6px 8px!important;border-radius:8px!important}
.live-runner-actions button{padding:5px 8px!important;font-size:10.5px!important;border-radius:8px!important}
.live-going-fact{align-items:flex-start!important}
.live-going-fact .live-going-main{display:block;line-height:1.25;text-align:right}
.live-going-fact strong{font-weight:950;color:#0f172a}
.live-going-fact small{display:block;margin-top:2px;color:#64748b;font-size:11px;line-height:1.25;text-align:right}
.live-going-fact small strong{color:#334155}

.saved-floating-panel.workspace-notes-panel-modern{
  width:min(760px, calc(100vw - 64px))!important;
  max-height:min(760px, calc(100vh - 104px))!important;
  padding:0!important;
  overflow:hidden!important;
  border:1px solid rgba(20,184,166,.25)!important;
  border-radius:24px!important;
  background:
    radial-gradient(circle at 100% 0%, rgba(20,184,166,.16), transparent 240px),
    linear-gradient(180deg,#ffffff,#f8fbff)!important;
  box-shadow:0 28px 72px rgba(15,23,42,.22)!important;
}
.workspace-notes-panel-modern.dragging{user-select:none;box-shadow:0 34px 90px rgba(15,23,42,.30)!important}
.workspace-notes-header{
  margin:0!important;
  padding:18px 20px 14px!important;
  border-bottom:1px solid rgba(20,184,166,.16);
  cursor:grab;
  background:linear-gradient(135deg,rgba(15,23,42,.96),rgba(30,64,175,.88));
  color:#fff;
}
.workspace-notes-panel-modern.dragging .workspace-notes-header{cursor:grabbing}
.workspace-notes-header .saved-kicker{color:#a7f3d0!important;margin:0 0 5px!important}
.workspace-notes-header strong{color:#fff!important;font-size:16px;letter-spacing:-.01em}
.workspace-notes-header .saved-icon-button{background:rgba(255,255,255,.12)!important;color:#fff!important;border:1px solid rgba(255,255,255,.20)!important}
.workspace-notes-header .saved-icon-button:hover{background:rgba(255,255,255,.20)!important}
.workspace-notes-warning{
  margin:16px 18px 12px!important;
  border:1px solid rgba(245,158,11,.18)!important;
  border-radius:14px!important;
  background:#fff7e6!important;
  color:#8a5a00!important;
}
.workspace-notes-textarea-modern{
  width:calc(100% - 36px)!important;
  margin:0 18px!important;
  min-height:340px!important;
  border-radius:18px!important;
  background:#ffffff!important;
  border:1px solid rgba(20,184,166,.22)!important;
  box-shadow:inset 0 1px 0 rgba(15,23,42,.03)!important;
  font-size:14px!important;
  line-height:1.5!important;
}
.workspace-notes-textarea-modern:focus{border-color:#14b8a6!important;box-shadow:0 0 0 3px rgba(20,184,166,.12)!important}
.workspace-notes-actions{
  margin:14px 18px 18px!important;
  align-items:center!important;
}
.workspace-notes-actions .btn.secondary{background:#fff!important;border:1px solid rgba(203,213,225,.9)!important;color:#334155!important}
.workspace-notes-actions .btn.deep{background:#0f172a!important;color:#fff!important;border-color:#0f172a!important}

@media(max-width:1100px){
  .live-runner-main{grid-template-columns:54px 1fr!important}
  .live-runner-people.compact{grid-column:2;max-width:none}
  .live-runner-secondary{grid-template-columns:1fr!important}
}

/* Patch 16I-A — compatibility and visual hotfix */
.workspace-notes-panel-modern{
  background:
    radial-gradient(circle at 100% 0%, rgba(20,184,166,.18), transparent 260px),
    linear-gradient(180deg,#f0fdfa 0%,#ffffff 48%,#f8fbff 100%)!important;
  border:1px solid rgba(20,184,166,.38)!important;
}
.workspace-notes-title-wrap{
  display:flex!important;
  flex-direction:column!important;
  gap:4px!important;
  min-width:0!important;
}
.workspace-notes-title-wrap .saved-kicker,
.workspace-notes-header .saved-kicker{
  display:block!important;
  margin:0!important;
  color:#bbf7d0!important;
  line-height:1!important;
  letter-spacing:.14em!important;
}
.workspace-notes-title-wrap strong,
.workspace-notes-header strong{
  display:block!important;
  color:#fff!important;
  font-size:20px!important;
  line-height:1.12!important;
  letter-spacing:-.02em!important;
}
.workspace-notes-warning{
  margin:16px 18px 12px!important;
  padding:12px 14px!important;
  border-color:rgba(245,158,11,.28)!important;
  background:linear-gradient(180deg,#fff7e6,#fffaf0)!important;
  color:#8a5a00!important;
  font-size:13px!important;
  line-height:1.35!important;
}
.workspace-notes-textarea-modern{
  background:#fff!important;
  border-color:rgba(20,184,166,.30)!important;
}
.workspace-notes-actions .btn.secondary:hover,
.workspace-notes-actions .btn.deep:hover{transform:translateY(-1px);box-shadow:0 10px 22px rgba(15,23,42,.10)!important}

.live-racecard-header{
  grid-template-columns:minmax(0,1fr) minmax(390px,460px)!important;
  gap:26px!important;
}
.live-racecard-key-facts{
  min-width:390px!important;
  gap:7px!important;
}
.live-racecard-key-facts span{
  display:grid!important;
  grid-template-columns:74px minmax(0,1fr)!important;
  align-items:start!important;
  column-gap:12px!important;
  text-align:left!important;
}
.live-racecard-key-facts span > :not(b){text-align:left!important}
.live-going-fact .live-going-main,
.live-going-fact small{text-align:left!important}
.live-going-fact .live-going-main{line-height:1.25!important}
.live-going-fact small{font-size:11.5px!important;margin-top:3px!important}
.live-runner-main{grid-template-columns:52px minmax(220px,1fr) minmax(270px,350px)!important}
.live-runner-secondary{grid-template-columns:minmax(118px,1fr) 170px 220px!important}
.live-runner-row{padding:6px 10px!important}
.live-runner-number{font-size:16.5px!important}
.live-runner-number em{font-size:11px!important;margin-left:2px!important}
@media(max-width:1100px){
  .live-racecard-header{grid-template-columns:1fr!important}
  .live-racecard-key-facts{min-width:0!important;width:100%!important}
}

/* Patch 16J — Live Racing Apply Race Profile foundation and going tooltip */
.live-going-fact{position:relative!important}
.live-going-fact .live-going-main{display:inline!important;line-height:1.25!important;text-align:left!important}
.live-going-treated-icon{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:17px!important;
  height:17px!important;
  margin-left:8px!important;
  border-radius:999px!important;
  background:linear-gradient(135deg,#f59e0b,#dc2626)!important;
  color:#fff!important;
  font-size:11px!important;
  font-weight:950!important;
  cursor:help!important;
  box-shadow:0 7px 16px rgba(245,158,11,.25)!important;
}
.live-profile-toggle-button,
.live-profile-reset-button{
  border:1px solid rgba(255,255,255,.22);
  border-radius:10px;
  background:rgba(255,255,255,.08);
  color:#fff;
  padding:8px 12px;
  font-weight:950;
  cursor:pointer;
  transition:.14s ease;
}
.live-profile-toggle-button:hover,
.live-profile-reset-button:hover{transform:translateY(-1px);background:rgba(255,255,255,.14)}
.live-profile-toggle-button.active,
.live-profile-toggle-button.has-profile{background:linear-gradient(135deg,#0f766e,#2563eb);border-color:transparent;box-shadow:0 10px 22px rgba(37,99,235,.26)}
.live-profile-reset-button{background:rgba(15,23,42,.62);color:#dbeafe}
.live-race-profile-panel{
  margin:0 24px 16px;
  padding:14px;
  border:1px solid rgba(37,99,235,.20);
  border-radius:18px;
  background:linear-gradient(135deg,#eff6ff 0%,#f0fdfa 100%);
  box-shadow:0 12px 30px rgba(15,23,42,.07);
}
.live-race-profile-panel-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  margin-bottom:12px;
}
.live-race-profile-panel-head strong{display:block;color:#0f172a;font-size:15px;font-weight:950;letter-spacing:-.01em}
.live-race-profile-panel-head span{display:block;margin-top:2px;color:#64748b;font-size:12px;font-weight:800}
.live-race-profile-panel-head button,
.live-profile-match-card button{
  border:1px solid rgba(203,213,225,.9);
  border-radius:10px;
  background:#fff;
  color:#0f172a;
  padding:8px 12px;
  font-weight:950;
  cursor:pointer;
}
.live-profile-match-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
  padding:13px 14px;
  border:1px solid rgba(148,163,184,.30);
  border-radius:14px;
  background:#fff;
  box-shadow:0 8px 20px rgba(15,23,42,.05);
  margin-top:8px;
}
.live-profile-match-card.applied{border-color:rgba(20,184,166,.55);background:linear-gradient(135deg,#f0fdfa,#fff)}
.live-profile-match-card strong{display:block;color:#0f3f46;font-size:14px;font-weight:950}
.live-profile-match-card span{display:block;margin-top:3px;color:#475569;font-size:12px;font-weight:750}
.live-profile-match-card small{display:block;margin-top:5px;color:#64748b;font-size:11.5px;font-weight:850}
.live-profile-match-card button{background:#0f172a;color:#fff;border-color:#0f172a}
.live-profile-match-card button:disabled{background:#e2e8f0;color:#64748b;border-color:#cbd5e1;cursor:not-allowed}
.live-profile-partial{
  display:inline-flex!important;
  width:max-content;
  margin-top:7px!important;
  padding:4px 8px;
  border-radius:999px;
  background:#fff7ed;
  color:#9a3412!important;
  border:1px solid rgba(251,146,60,.35);
  font-size:10px!important;
  font-weight:950!important;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.live-applied-profile-chip{
  border-color:rgba(37,99,235,.28)!important;
  background:#eff6ff!important;
  color:#1e3a8a!important;
}
.live-applied-profile-chip b{margin-right:6px;color:#0f172a}
.live-runner-row.profile-eliminated{background:linear-gradient(90deg,#fff7f7,#ffffff)!important;box-shadow:inset 4px 0 0 #dc2626}
.live-runner-row.profile-passed{box-shadow:inset 4px 0 0 rgba(20,184,166,.78)}
.live-runner-status-badge.profile-fail{background:#fee2e2!important;color:#991b1b!important;border:1px solid rgba(220,38,38,.24)!important;cursor:help}
.live-runner-status-badge.profile-pass{background:#dcfce7!important;color:#166534!important;border:1px solid rgba(22,163,74,.24)!important}
.live-error-state.compact,.live-loading-state.compact,.live-empty-state.compact{padding:14px!important;border-radius:12px!important;margin:0!important}
@media(max-width:1100px){
  .live-profile-match-card{grid-template-columns:1fr}
  .live-race-profile-panel{margin-left:14px;margin-right:14px}
}

/* Patch 16K — Apply System, dropdown controls, E popovers and review navigation */
#savedSetupModalRoot{
  position:relative!important;
  z-index:2147483400!important;
}
#savedSetupModalRoot .saved-modal-backdrop,
#savedSetupModalRoot .saved-setup-modal,
#savedSetupModalRoot .workspace-notes-panel,
.builder-guide-modal:not(.hidden){
  z-index:2147483500!important;
}
.mini-reset-button.select-all,
.mini-reset-button.deselect-all{
  border:1px solid rgba(37,99,235,.22)!important;
  background:#fff!important;
  color:#1d4ed8!important;
  border-radius:999px!important;
  padding:7px 12px!important;
  font-size:12px!important;
  font-weight:950!important;
  cursor:pointer!important;
  margin-right:6px!important;
}
.mini-reset-button.deselect-all{
  color:#991b1b!important;
  border-color:rgba(220,38,38,.22)!important;
}
.mini-reset-button.select-all:hover,
.mini-reset-button.deselect-all:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(15,23,42,.08)!important;
}
.live-system-toggle-button,
.live-system-reset-button{
  border:1px solid rgba(255,255,255,.16);
  border-radius:10px;
  background:rgba(15,23,42,.72);
  color:#e2e8f0;
  font-weight:950;
  padding:10px 14px;
  cursor:pointer;
  transition:.14s ease;
}
.live-system-toggle-button:hover,
.live-system-reset-button:hover{transform:translateY(-1px);background:rgba(255,255,255,.14)}
.live-system-toggle-button.active,
.live-system-toggle-button.has-system{background:linear-gradient(135deg,#0891b2,#2563eb);border-color:transparent;box-shadow:0 10px 22px rgba(8,145,178,.26)}
.live-system-reset-button{background:rgba(15,23,42,.62);color:#dbeafe}
.live-race-system-panel{
  margin:0 24px 16px;
  padding:14px;
  border:1px solid rgba(8,145,178,.22);
  border-radius:18px;
  background:linear-gradient(135deg,#ecfeff 0%,#eff6ff 100%);
  box-shadow:0 12px 30px rgba(15,23,42,.07);
}
.live-system-match-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
  padding:13px 14px;
  border:1px solid rgba(148,163,184,.30);
  border-radius:14px;
  background:#fff;
  box-shadow:0 8px 20px rgba(15,23,42,.05);
  margin-top:8px;
}
.live-system-match-card.applied{border-color:rgba(8,145,178,.55);background:linear-gradient(135deg,#ecfeff,#fff)}
.live-system-match-card strong{display:block;color:#083344;font-size:14px;font-weight:950}
.live-system-match-card span{display:block;margin-top:3px;color:#475569;font-size:12px;font-weight:750}
.live-system-match-card small{display:block;margin-top:5px;color:#64748b;font-size:11.5px;font-weight:850}
.live-system-match-card button{
  border:1px solid #0f172a;
  border-radius:10px;
  background:#0f172a;
  color:#fff;
  padding:8px 12px;
  font-weight:950;
  cursor:pointer;
}
.live-system-match-card button:disabled{background:#e2e8f0;color:#64748b;border-color:#cbd5e1;cursor:not-allowed}
.live-applied-system-chip{
  border-color:rgba(8,145,178,.28)!important;
  background:#ecfeff!important;
  color:#155e75!important;
}
.live-applied-system-chip b{margin-right:6px;color:#0f172a}
.live-runner-row.system-qualified{box-shadow:inset 4px 0 0 rgba(8,145,178,.82)}
.live-runner-status-badge.system-qualifier{background:#cffafe!important;color:#155e75!important;border:1px solid rgba(8,145,178,.28)!important}
.live-runner-status-badge.profile-fail.interactive{
  border:1px solid rgba(220,38,38,.28)!important;
  cursor:pointer!important;
  position:relative;
  transition:transform .14s ease, box-shadow .14s ease;
}
.live-runner-status-badge.profile-fail.interactive:hover{
  transform:translateY(-2px) scale(1.04);
  box-shadow:0 8px 20px rgba(220,38,38,.18);
}
.live-profile-fail-panel{
  position:relative;
  z-index:1;
  width:calc(100% - 28px);
  max-width:720px;
  margin:8px 14px 10px 70px;
  padding:12px;
  border:1px solid rgba(220,38,38,.24);
  border-radius:14px;
  background:#fff;
  box-shadow:0 10px 28px rgba(15,23,42,.10);
  text-align:left;
}
.live-runner-titleline{position:relative}
.live-profile-fail-popover-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:4px}
.live-profile-fail-popover-head strong{color:#7f1d1d!important;font-size:13px!important}
.live-profile-fail-popover-head button{border:1px solid rgba(220,38,38,.22);border-radius:999px;background:#fff;color:#991b1b;font-weight:950;cursor:pointer;width:24px;height:24px}
.live-profile-fail-popover-sub{color:#991b1b;font-size:12px;font-weight:900;margin-bottom:8px}
.live-profile-fail-rule{border-top:1px solid #fee2e2;padding:8px 0;display:grid;gap:3px}
.live-profile-fail-rule strong{color:#0f172a!important;font-size:12px!important}
.live-profile-fail-rule span{font-size:11.5px;color:#475569;font-weight:750}
.live-profile-fail-empty{font-size:12px;color:#64748b;font-weight:800}
.race-profiler-evidence-go-button{
  border-color:rgba(37,99,235,.24)!important;
  color:#1d4ed8!important;
}
.race-profiler-section-jump-highlight{
  animation:raceProfilerSectionJumpPulse 2.6s ease-in-out;
  outline:3px solid rgba(20,184,166,.55)!important;
  outline-offset:4px!important;
}
@keyframes raceProfilerSectionJumpPulse{
  0%{box-shadow:0 0 0 0 rgba(20,184,166,.45)}
  40%{box-shadow:0 0 0 14px rgba(20,184,166,.12)}
  100%{box-shadow:0 0 0 0 rgba(20,184,166,0)}
}
@media(max-width:1100px){
  .live-system-match-card{grid-template-columns:1fr}
  .live-race-system-panel{margin-left:14px;margin-right:14px}
  .live-profile-fail-panel{margin-left:0;width:100%;max-width:100%}
}
.live-runners-table,.live-runner-row,.live-runner-main,.live-runner-identity,.live-runner-titleline{overflow:visible!important;}

/* Patch 16K-A — modal stacking, dropdown layout, Review Tray navigation cleanup */
#savedSetupModalRoot{
  position:fixed!important;
  inset:0!important;
  z-index:2147483000!important;
  pointer-events:none!important;
}
body.saved-setup-modal-open #savedSetupModalRoot,
#savedSetupModalRoot:has(.saved-modal-card),
#savedSetupModalRoot:has(.saved-floating-panel){
  pointer-events:auto!important;
}
#savedSetupModalRoot .saved-modal-backdrop{
  position:fixed!important;
  inset:0!important;
  z-index:2147483001!important;
}
#savedSetupModalRoot .saved-modal-card,
#savedSetupModalRoot .saved-floating-panel,
#savedSetupModalRoot .workspace-notes-panel-modern{
  position:fixed!important;
  z-index:2147483010!important;
}
#savedSetupModalRoot .saved-modal-card{
  left:50%!important;
  top:50%!important;
  transform:translate(-50%, -50%)!important;
}
#savedSetupModalRoot .saved-floating-panel.dragging,
#savedSetupModalRoot .workspace-notes-panel-modern.dragging{
  transform:none!important;
}
body.saved-setup-modal-open #course_picker.open .course-picker-panel,
body.saved-setup-modal-open #bred_picker.open .course-picker-panel,
body.saved-setup-modal-open .course-picker-panel,
body.saved-setup-modal-open .multi-select-menu{
  display:none!important;
  pointer-events:none!important;
  z-index:1!important;
}
.lookup-bulk-controls{
  display:grid!important;
  grid-template-columns:repeat(3, minmax(0, 1fr))!important;
  gap:8px!important;
  align-items:center!important;
  width:100%!important;
  padding-top:8px!important;
  border-top:1px solid rgba(148,163,184,.20)!important;
}
.lookup-bulk-controls .mini-reset-button,
.lookup-bulk-controls #course_reset_button,
.lookup-bulk-controls #bred_reset_button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  min-width:0!important;
  min-height:34px!important;
  margin:0!important;
  padding:7px 10px!important;
  border-radius:999px!important;
  line-height:1.1!important;
  position:relative!important;
  z-index:2!important;
}
.lookup-bulk-controls #course_reset_button,
.lookup-bulk-controls #bred_reset_button{
  border-color:#bfdbfe!important;
  color:#1d4ed8!important;
}
#course_picker.open .course-picker-panel,
#bred_picker.open .course-picker-panel{
  max-height:460px!important;
}
#course_options.course-options,
#bred_options.course-options,
#course_picker.open #course_options,
#bred_picker.open #bred_options,
body.course-picker-is-open #course_options,
body.bred-picker-is-open #bred_options{
  max-height:300px!important;
}
.race-profiler-evidence-tray .race-profiler-evidence-tray-head span{
  color:#b45309!important;
}
.race-profiler-evidence-tray-item-head{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:12px!important;
  align-items:start!important;
  position:relative!important;
}
.race-profiler-evidence-tray-item-controls{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  flex-wrap:wrap!important;
}
.race-profiler-evidence-tray-source-type{
  border:0!important;
  background:transparent!important;
  color:#0369a1!important;
  padding:0!important;
  font-size:11px!important;
  font-weight:950!important;
  letter-spacing:.10em!important;
  text-transform:uppercase!important;
  white-space:nowrap!important;
}
.race-profiler-evidence-go-button{
  border:1px solid rgba(37,99,235,.34)!important;
  border-radius:999px!important;
  background:linear-gradient(135deg,#eff6ff,#dbeafe)!important;
  color:#1d4ed8!important;
  padding:8px 13px!important;
  font-size:12px!important;
  font-weight:950!important;
  cursor:pointer!important;
}
.race-profiler-evidence-remove-button,
.race-profiler-evidence-tray-item-head button[data-rp-evidence-remove]{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:30px!important;
  height:30px!important;
  border:1px solid rgba(245,158,11,.28)!important;
  border-radius:999px!important;
  background:#fffaf0!important;
  color:#b45309!important;
  font-size:15px!important;
  font-weight:950!important;
  line-height:1!important;
  cursor:pointer!important;
}
.race-profiler-evidence-tray-item-title > span{
  display:block!important;
  margin-bottom:4px!important;
  color:#64748b!important;
  font-size:11px!important;
  font-weight:950!important;
  letter-spacing:.10em!important;
  text-transform:uppercase!important;
}
.race-profiler-signal-empty,
.race-profiler-signal-empty p,
.race-profiler-signal-empty--modal,
.race-profiler-signal-empty--modal p,
.race-profiler-signals-nav-empty{
  color:#475569!important;
}
.race-profiler-signal-empty strong,
.race-profiler-signal-empty--modal strong{
  color:#0f172a!important;
}
.race-profiler-output-layer .race-profiler-signal-empty,
.system-signals-output-layer .race-profiler-signal-empty{
  color:#dbeafe!important;
}
.race-profiler-output-layer .race-profiler-signal-empty strong,
.system-signals-output-layer .race-profiler-signal-empty strong{
  color:#ffffff!important;
}
@media(max-width:760px){
  .lookup-bulk-controls{grid-template-columns:1fr!important;}
  .race-profiler-evidence-tray-item-head{grid-template-columns:1fr!important;}
  .race-profiler-evidence-tray-item-controls{justify-content:flex-start!important;}
}

/* === Patch 16K-B: compact saved-load cards and live-matching polish === */
.saved-load-compact-card{
  padding:0!important;
  overflow:hidden!important;
}
.saved-load-compact-header{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:16px!important;
  align-items:center!important;
  padding:18px 20px!important;
  border:1px solid rgba(20,184,166,.18)!important;
  border-radius:22px!important;
  background:linear-gradient(135deg,rgba(240,253,250,.92),rgba(255,255,255,.96))!important;
}
.saved-load-compact-main strong{
  display:block!important;
  margin-top:5px!important;
  color:#0f172a!important;
  font-size:18px!important;
  font-weight:950!important;
  letter-spacing:-.02em!important;
}
.saved-load-compact-main p{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  margin:8px 0 0!important;
  color:#64748b!important;
  font-size:12px!important;
  font-weight:800!important;
}
.saved-load-compact-main p span{
  padding:5px 9px!important;
  border:1px solid rgba(148,163,184,.22)!important;
  border-radius:999px!important;
  background:#fff!important;
}
.saved-load-compact-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  flex-wrap:wrap!important;
}
.saved-load-details{
  margin:0 20px 18px!important;
  border:1px solid rgba(148,163,184,.18)!important;
  border-radius:18px!important;
  background:#fff!important;
}
.saved-load-details summary{
  padding:12px 16px!important;
  cursor:pointer!important;
  color:#0f766e!important;
  font-size:12px!important;
  font-weight:950!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
}
.saved-load-detail-grid{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:14px!important;
  padding:0 16px 16px!important;
}
.saved-load-snapshot-wide.compact{
  margin:0 16px 16px!important;
  padding:14px!important;
}
.live-runner-status-badge.system-qualifier{
  background:#dbeafe!important;
  color:#1d4ed8!important;
  border-color:rgba(37,99,235,.22)!important;
  min-width:auto!important;
  padding-inline:10px!important;
}
.live-runner-status-badge.profile-fail{
  background:#fee2e2!important;
  color:#b91c1c!important;
  border-color:rgba(220,38,38,.30)!important;
  padding-inline:9px!important;
}
.live-profile-partial.manual{
  display:inline-flex!important;
  width:max-content!important;
  margin-top:6px!important;
  padding:5px 10px!important;
  border:1px solid rgba(245,158,11,.34)!important;
  border-radius:999px!important;
  background:#fff7ed!important;
  color:#9a3412!important;
  font-size:11px!important;
  font-weight:950!important;
  letter-spacing:.06em!important;
  text-transform:uppercase!important;
}
.live-runner-row.profile-eliminated{
  background:linear-gradient(90deg,rgba(254,226,226,.58),rgba(255,255,255,.96))!important;
  border-left:5px solid #ef4444!important;
}
@media(max-width:860px){
  .saved-load-compact-header{grid-template-columns:1fr!important;}
  .saved-load-compact-actions{justify-content:flex-start!important;}
  .saved-load-detail-grid{grid-template-columns:1fr!important;}
}


/* Patch 16K-C — live matching tolerance polish, evening-course order support, and overlay/dropdown guard */
body.race-profiler-evidence-tray-open #course_picker.open .course-picker-panel,
body.race-profiler-evidence-tray-open #bred_picker.open .course-picker-panel,
body.race-profiler-evidence-tray-open .course-picker-panel,
body.race-profiler-evidence-tray-open .multi-select-menu,
body.race-profiler-evidence-tray-open .lookup-panel{
  display:none!important;
  pointer-events:none!important;
  z-index:1!important;
}
.live-going-fact{align-items:center!important}
.live-going-treated-icon{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:18px!important;
  height:18px!important;
  margin-left:8px!important;
  border-radius:999px!important;
  background:linear-gradient(135deg,#f97316,#dc2626)!important;
  color:#fff!important;
  font-size:11px!important;
  font-weight:950!important;
  line-height:1!important;
  cursor:help!important;
  vertical-align:middle!important;
  transform:translateY(-1px)!important;
  box-shadow:0 8px 18px rgba(249,115,22,.22)!important;
}
.live-going-treated-icon:hover{
  transform:translateY(-2px) scale(1.05)!important;
  box-shadow:0 10px 22px rgba(220,38,38,.24)!important;
}
.race-profiler-evidence-go-button:hover{
  transform:translateY(-1px)!important;
  box-shadow:0 10px 22px rgba(37,99,235,.16)!important;
}


/* Patch 16K-D — sliding-session support UI polish, modal/dropdown stacking guard and going tooltip fix */
body.saved-setup-modal-open #course_picker,
body.saved-setup-modal-open #bred_picker,
body.saved-setup-modal-open #course_picker_panel,
body.saved-setup-modal-open #bred_picker .course-picker-panel,
body.saved-setup-modal-open #course_options,
body.saved-setup-modal-open #bred_options,
body.saved-setup-modal-open .lookup-panel,
body.saved-setup-modal-open .name-results,
body.race-profiler-evidence-tray-open #course_picker,
body.race-profiler-evidence-tray-open #bred_picker,
body.race-profiler-evidence-tray-open #course_picker_panel,
body.race-profiler-evidence-tray-open #bred_picker .course-picker-panel,
body.race-profiler-evidence-tray-open #course_options,
body.race-profiler-evidence-tray-open #bred_options,
body.race-profiler-evidence-tray-open .lookup-panel,
body.race-profiler-evidence-tray-open .name-results,
body.race-profiler-modal-open #course_picker,
body.race-profiler-modal-open #bred_picker,
body.race-profiler-modal-open #course_picker_panel,
body.race-profiler-modal-open #bred_picker .course-picker-panel,
body.race-profiler-modal-open #course_options,
body.race-profiler-modal-open #bred_options,
body.builder-guide-open #course_picker,
body.builder-guide-open #bred_picker,
body.builder-guide-open #course_picker_panel,
body.builder-guide-open #bred_picker .course-picker-panel,
body.report-overlay-open #course_picker,
body.report-overlay-open #bred_picker,
body.report-overlay-open #course_picker_panel,
body.report-overlay-open #bred_picker .course-picker-panel{
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
  z-index:0!important;
}

.live-going-fact .live-going-value{
  display:inline-flex!important;
  align-items:center!important;
  gap:8px!important;
  min-width:0!important;
  max-width:100%!important;
  line-height:1.25!important;
}
.live-going-fact .live-going-value .live-going-main{
  display:inline!important;
  text-align:left!important;
}
.live-going-treated-icon{
  position:relative!important;
  flex:0 0 auto!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:0!important;
  height:0!important;
  margin-left:2px!important;
  border-left:10px solid transparent!important;
  border-right:10px solid transparent!important;
  border-bottom:18px solid #f97316!important;
  border-radius:2px!important;
  background:transparent!important;
  color:#fff!important;
  font-size:10px!important;
  font-weight:950!important;
  line-height:1!important;
  cursor:help!important;
  transform:translateY(-1px)!important;
  box-shadow:none!important;
  text-indent:-3px!important;
  padding-top:5px!important;
  overflow:visible!important;
}
.live-going-treated-icon::before{
  content:"!";
  position:absolute;
  top:6px;
  left:-3px;
  color:#fff;
  font-size:10px;
  font-weight:950;
  line-height:1;
  text-indent:0;
}
.live-going-treated-icon::after{
  content:attr(data-live-going-tooltip);
  position:absolute;
  right:0;
  top:24px;
  width:max-content;
  max-width:320px;
  padding:9px 11px;
  border:1px solid rgba(251,146,60,.35);
  border-radius:12px;
  background:#fff7ed;
  color:#7c2d12;
  font-size:11.5px;
  font-weight:850;
  line-height:1.35;
  text-align:left;
  box-shadow:0 14px 32px rgba(15,23,42,.18);
  opacity:0;
  pointer-events:none;
  transform:translateY(-4px);
  transition:opacity .14s ease, transform .14s ease;
  z-index:2147483647;
  white-space:normal;
}
.live-going-treated-icon:hover,
.live-going-treated-icon:focus{
  transform:translateY(-2px) scale(1.08)!important;
  border-bottom-color:#dc2626!important;
}
.live-going-treated-icon:hover::after,
.live-going-treated-icon:focus::after{
  opacity:1;
  transform:translateY(0);
}

/* Patch 16K-E — live profile diagnostics, going-warning tooltip cleanup and review-tray source jump hardening */
.live-profile-near-miss-list{
  display:flex!important;
  flex-direction:column!important;
  gap:10px!important;
}
.live-profile-near-miss-intro{
  border:1px dashed rgba(245,158,11,.34)!important;
  background:linear-gradient(135deg,rgba(255,247,237,.96),rgba(255,255,255,.96))!important;
  border-radius:14px!important;
  padding:12px 14px!important;
  color:#334155!important;
}
.live-profile-near-miss-intro strong{display:block!important;color:#7c2d12!important;margin-bottom:3px!important}
.live-profile-near-miss-intro span{font-weight:800!important;color:#64748b!important}
.live-profile-near-miss-card{
  border:1px solid rgba(251,146,60,.28)!important;
  background:#fff!important;
  border-radius:14px!important;
  padding:12px 14px!important;
  display:grid!important;
  grid-template-columns:minmax(220px,.9fr) minmax(300px,1.4fr)!important;
  gap:12px!important;
  align-items:start!important;
}
.live-profile-near-miss-card strong{display:block!important;color:#0f172a!important;font-weight:950!important}
.live-profile-near-miss-card span{display:block!important;color:#b45309!important;font-weight:900!important;margin-top:3px!important}
.live-profile-near-miss-card small{display:block!important;color:#64748b!important;font-weight:800!important;margin-top:4px!important}
.live-profile-near-miss-card ul{margin:0!important;padding-left:18px!important;color:#334155!important;font-weight:750!important;line-height:1.35!important}
.live-profile-near-miss-card li+li{margin-top:4px!important}
.live-going-fact .live-going-value{position:relative!important;overflow:visible!important}
.live-going-treated-icon{
  isolation:isolate!important;
  text-indent:0!important;
  font-size:0!important;
}
.live-going-treated-icon::before{
  content:"!"!important;
  position:absolute!important;
  top:5px!important;
  left:-3px!important;
  color:#fff!important;
  font-size:10px!important;
  font-weight:1000!important;
  line-height:1!important;
  text-indent:0!important;
}
.live-going-treated-icon::after{
  content:attr(data-live-going-tooltip)!important;
  right:-4px!important;
  top:26px!important;
  max-width:300px!important;
  min-width:260px!important;
  white-space:normal!important;
  overflow:visible!important;
  z-index:2147483647!important;
}
.race-profiler-section-jump-highlight{
  animation:raceProfilerSectionJumpPulse 4.8s ease-in-out 1!important;
  outline:3px solid rgba(37,99,235,.62)!important;
  outline-offset:4px!important;
  scroll-margin-top:140px!important;
}
@keyframes raceProfilerSectionJumpPulse{
  0%{box-shadow:0 0 0 0 rgba(37,99,235,.42);transform:translateY(0)}
  10%{box-shadow:0 0 0 11px rgba(37,99,235,.14);transform:translateY(-1px)}
  20%{box-shadow:0 0 0 0 rgba(37,99,235,0);transform:translateY(0)}
  32%{box-shadow:0 0 0 11px rgba(37,99,235,.14);transform:translateY(-1px)}
  44%{box-shadow:0 0 0 0 rgba(37,99,235,0);transform:translateY(0)}
  56%{box-shadow:0 0 0 11px rgba(37,99,235,.14);transform:translateY(-1px)}
  68%{box-shadow:0 0 0 0 rgba(37,99,235,0);transform:translateY(0)}
  82%{box-shadow:0 0 0 11px rgba(37,99,235,.14);transform:translateY(-1px)}
  100%{box-shadow:0 0 0 0 rgba(37,99,235,0);transform:translateY(0)}
}
@media(max-width:980px){
  .live-profile-near-miss-card{grid-template-columns:1fr!important}
}

/* Patch 16K-F — compact profile diagnostics and review-tray jump hardening */
.live-profile-near-miss-card{
  display:block!important;
  padding:0!important;
  overflow:hidden!important;
}
.live-profile-near-miss-card summary{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  padding:12px 14px!important;
  cursor:pointer!important;
  list-style:none!important;
}
.live-profile-near-miss-card summary::-webkit-details-marker{display:none!important}
.live-profile-near-miss-summary-main{
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  gap:3px!important;
}
.live-profile-near-miss-summary-main strong{
  display:block!important;
  color:#0f172a!important;
  font-weight:950!important;
}
.live-profile-near-miss-summary-main span{
  display:block!important;
  color:#b45309!important;
  font-weight:850!important;
  margin-top:0!important;
}
.live-profile-near-miss-manual{
  display:inline-flex!important;
  width:max-content!important;
  margin-top:3px!important;
  padding:3px 8px!important;
  border:1px solid rgba(148,163,184,.28)!important;
  border-radius:999px!important;
  background:#f8fafc!important;
  color:#64748b!important;
  font-size:11px!important;
  font-weight:850!important;
}
.live-profile-near-miss-card summary em{
  flex:0 0 auto!important;
  padding:7px 11px!important;
  border:1px solid rgba(37,99,235,.18)!important;
  border-radius:999px!important;
  background:#eff6ff!important;
  color:#1d4ed8!important;
  font-size:11px!important;
  font-style:normal!important;
  font-weight:950!important;
  letter-spacing:.04em!important;
  text-transform:uppercase!important;
}
.live-profile-near-miss-card[open] summary em::before{content:"Hide "!important}
.live-profile-near-miss-detail{
  padding:0 14px 13px!important;
  border-top:1px solid rgba(251,146,60,.18)!important;
}
.live-profile-near-miss-detail ul{
  margin:10px 0 0!important;
  padding-left:18px!important;
  color:#334155!important;
  font-weight:750!important;
  line-height:1.35!important;
}
.live-profile-near-miss-detail li+li{margin-top:4px!important}
.race-profiler-expanded-signal-card[data-breakdown-key],
.detail-breakdown-card[data-breakdown-key]{scroll-margin-top:120px!important}

/* Patch 16K-G — persistent live racecard state and manual-check clarity */
.live-manual-check-list {
  margin-top: 8px;
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.92);
  padding: 7px 10px;
}

.live-manual-check-list summary {
  cursor: pointer;
  font-weight: 800;
  color: #0f4d6b;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 11px;
}

.live-manual-check-list ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.live-manual-check-list li {
  margin: 4px 0;
  color: #334155;
  font-size: 12px;
  line-height: 1.35;
}

.live-manual-check-list li span {
  color: #64748b;
}

.live-state-warning {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 10px;
}

.live-state-warning span {
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: rgba(255, 251, 235, 0.9);
  color: #92400e;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

/* Patch 16K-H — excluded-runner collapse and clearer elimination/manual-state hierarchy */
.live-runner-row.profile-eliminated,
.live-runner-row.system-eliminated{
  background:linear-gradient(90deg,rgba(254,226,226,.72),rgba(255,255,255,.98))!important;
  border-left:6px solid #dc2626!important;
}
.live-runner-row.manual-excluded{
  background:linear-gradient(90deg,rgba(255,237,213,.78),rgba(255,255,255,.98))!important;
  border-left:6px solid #f59e0b!important;
}
.live-runner-row.collapsed-excluded{
  padding:9px 12px!important;
  min-height:0!important;
}
.live-runner-row.collapsed-excluded.profile-eliminated,
.live-runner-row.collapsed-excluded.system-eliminated{
  background:linear-gradient(90deg,#fef2f2,#fff)!important;
}
.live-runner-row.collapsed-excluded.manual-excluded{
  background:linear-gradient(90deg,#fff7ed,#fff)!important;
}
.live-runner-collapsed-main{
  display:grid;
  grid-template-columns:54px minmax(260px,1fr) minmax(260px,auto);
  gap:14px;
  align-items:center;
}
.live-silk-placeholder.compact{
  width:42px!important;
  height:42px!important;
  border-radius:9px!important;
  font-size:13px!important;
}
.live-runner-collapsed-identity{
  min-width:0;
}
.live-runner-row.collapsed-excluded .live-runner-titleline strong{
  font-size:15px!important;
}
.live-runner-row.collapsed-excluded .live-runner-subline{
  margin-top:2px!important;
}
.live-collapsed-form{
  color:#0f172a!important;
  font-weight:950!important;
  letter-spacing:.08em;
}
.live-non-runner-note.inline{
  margin-top:0!important;
  font-size:10.5px!important;
}
.live-runner-actions.collapsed{
  margin-top:0!important;
  justify-content:flex-end;
}
.live-runner-status-badge.profile-fail,
.live-runner-status-badge.system-fail{
  background:#fee2e2!important;
  color:#991b1b!important;
  border:1px solid rgba(220,38,38,.30)!important;
  cursor:help;
}
.live-runner-status-badge.system-fail{
  background:#ffe4e6!important;
  color:#9f1239!important;
  border-color:rgba(225,29,72,.28)!important;
}
.live-runner-status-badge.manual{
  background:#ffedd5!important;
  color:#9a3412!important;
  border:1px solid rgba(245,158,11,.36)!important;
}
.live-runner-status-badge.profile-fail.interactive:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(220,38,38,.14);
}
.live-runner-row.profile-eliminated .live-runner-actions button[data-live-toggle-exclude]{
  display:none!important;
}
.live-runner-row.collapsed-excluded .live-profile-fail-panel{
  margin-left:68px!important;
  margin-right:12px!important;
}
@media(max-width:1100px){
  .live-runner-collapsed-main{grid-template-columns:52px 1fr;}
  .live-runner-actions.collapsed{grid-column:2;justify-content:flex-start;}
  .live-profile-fail-panel,
  .live-runner-row.collapsed-excluded .live-profile-fail-panel{margin-left:0!important;width:100%;max-width:100%;}
}

/* R-004 — qualifier manual-check warning icon */
.live-manual-warning-details{
  position:relative;
  display:inline-flex;
  align-items:center;
  margin-left:4px;
  vertical-align:middle;
}
.live-manual-warning-details summary{
  list-style:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:19px;
  height:19px;
  border-radius:999px;
  border:1px solid rgba(245,158,11,.50);
  background:#fffbeb;
  color:#b45309;
  font-size:12px;
  font-weight:950;
  line-height:1;
  cursor:pointer;
  box-shadow:0 6px 14px rgba(245,158,11,.13);
}
.live-manual-warning-details summary::-webkit-details-marker{display:none}
.live-manual-warning-details[open] summary,
.live-manual-warning-details summary:hover{
  background:#fef3c7;
  border-color:rgba(245,158,11,.72);
}
.live-manual-warning-popover{
  position:absolute;
  z-index:20;
  top:24px;
  right:0;
  width:min(340px,78vw);
  padding:11px 12px;
  border:1px solid rgba(245,158,11,.42);
  border-radius:14px;
  background:#fffdfa;
  box-shadow:0 18px 44px rgba(15,23,42,.18);
  color:#334155;
  text-transform:none;
  letter-spacing:0;
  font-size:12px;
  font-weight:750;
  line-height:1.35;
}
.live-manual-warning-popover strong{
  display:block;
  color:#92400e;
  font-size:12px;
  font-weight:950;
  margin-bottom:5px;
}
.live-manual-warning-popover p{
  margin:0 0 7px;
  color:#475569;
}
.live-manual-warning-popover ul{
  margin:0;
  padding-left:17px;
}
.live-manual-warning-popover li+li{margin-top:4px}
.live-manual-warning-popover li span{color:#64748b}


/* === R-004H2: manual-check warning close and SP-band range lock polish === */
.price-range-disabled-by-band {
  position: relative;
}
.price-range-disabled-by-band::after {
  content: "!";
  position: absolute;
  top: 12px;
  right: 14px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dc2626;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 6px 14px rgba(220, 38, 38, .22);
}
.price-range-disabled-by-band::before {
  content: "Starting Price range is disabled while SP Band Presets are active.";
  position: absolute;
  z-index: 45;
  top: 36px;
  right: 8px;
  width: min(290px, calc(100vw - 36px));
  padding: 9px 11px;
  border-radius: 11px;
  background: #fff7ed;
  border: 1px solid rgba(220, 38, 38, .28);
  color: #7c2d12;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .12s ease, transform .12s ease;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .14);
}
.price-range-disabled-by-band:hover::before {
  opacity: 1;
  transform: translateY(0);
}
.live-manual-warning-popover {
  position: absolute;
}
.live-manual-warning-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(180, 83, 9, .22);
  background: #fff;
  color: #92400e;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}
.live-manual-warning-close:hover {
  background: #fffbeb;
  transform: translateY(-1px);
}

/* === R-004H3: consistent availability warnings and small UI polish === */
#time .time-strip {
  margin-bottom: 18px;
}
#time .season-grid {
  margin-top: 18px;
}

.availability-warning,
.availability-warning-chip {
  position: relative;
}
.availability-warning::after {
  content: "!";
  position: absolute;
  top: 12px;
  right: 14px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dc2626;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 6px 14px rgba(220, 38, 38, .22);
}
.availability-warning::before {
  content: attr(data-availability-warning);
  position: absolute;
  z-index: 55;
  top: 36px;
  right: 8px;
  width: min(310px, calc(100vw - 36px));
  padding: 9px 11px;
  border-radius: 11px;
  background: #fff7ed;
  border: 1px solid rgba(220, 38, 38, .28);
  color: #7c2d12;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .12s ease, transform .12s ease;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .14);
  text-transform: none;
  letter-spacing: 0;
}
.availability-warning:hover::before {
  opacity: 1;
  transform: translateY(0);
}
.availability-warning-chip::after {
  content: "!";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  margin-left: 6px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 950;
  box-shadow: 0 5px 11px rgba(220, 38, 38, .20);
}

.live-manual-warning-popover {
  padding: 14px 42px 13px 14px;
}
.live-manual-warning-popover strong {
  padding-right: 28px;
  font-size: 13px;
}
.live-manual-warning-close {
  top: 10px;
  right: 10px;
}



/* === R-004H4: final section-collapse and race-condition tidy pass === */
/* Tighten the Time Layer gap introduced in H3 so it matches the other stacked cards. */
#time .time-strip { margin-bottom: 12px !important; }
#time .season-grid { margin-top: 12px !important; }

/* Universal section collapse: keep the coloured section header visible and hide only the card body. */
.section.collapsible-section.section-collapsed > :not(.section-header) {
  display: none !important;
}
.section.collapsible-section.section-collapsed .section-header {
  border-radius: 18px !important;
}
.section-header-actions,
.profiler-header-actions,
.criteria-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}
.profiler-section-toggle {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 172px;
}
body[data-workspace-mode="system_builder"] .profiler-section-toggle,
body:not([data-workspace-mode="race_profiler"]) .profiler-section-toggle {
  display: inline-flex !important;
}

/* Replace the old Race Profiler-only advanced buttons with the universal section controls. */
.race-profiler-race-conditions-toggle,
.race-profiler-course-toggle {
  display: none !important;
}

/* Race Conditions should use the same familiar layout in System Builder and Race Profiler. */
#race-conditions .section-body {
  display: flex !important;
  flex-direction: column !important;
  gap: 18px !important;
}
#race-conditions .section-body > .grid,
#race-conditions .section-body > .layout-grid {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
#race-conditions .grid.race-top {
  display: grid !important;
  grid-template-columns: minmax(0, 1.45fr) minmax(190px, .42fr) minmax(230px, .48fr) !important;
  gap: 16px !important;
  align-items: stretch !important;
}
#race-conditions .grid.lower-two {
  display: grid !important;
  grid-template-columns: minmax(0, 1.65fr) minmax(270px, .55fr) !important;
  gap: 16px !important;
  align-items: stretch !important;
}
#race-conditions .jockey-race-type-card {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  min-height: 0 !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
}
#race-conditions .jockey-race-type-card .chips {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 12px !important;
  max-width: 220px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
#race-conditions #race_profiler_official_rating_slot {
  grid-column: auto !important;
  grid-row: auto !important;
  align-self: stretch !important;
}
#race-conditions #num_fences_card {
  min-height: 0 !important;
  align-self: stretch !important;
}
#race-conditions #num_fences_card.availability-warning::before {
  z-index: 90;
}
@media (max-width: 1320px) {
  #race-conditions .grid.race-top,
  #race-conditions .grid.lower-two {
    grid-template-columns: 1fr !important;
  }
  #race-conditions .jockey-race-type-card .chips {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    max-width: none !important;
  }
}

/* Manual warning card: allow the close button to breathe inside the popover. */
.live-manual-warning-popover {
  padding: 16px 52px 14px 16px !important;
}
.live-manual-warning-popover strong {
  padding-right: 36px !important;
}
.live-manual-warning-close {
  top: 12px !important;
  right: 12px !important;
}


/* === R-004H5: Race Conditions layout, warning hover, chip sizing and scroll stability === */
/* Keep the full app from creating a page-level horizontal scrollbar after wide grid/card changes. */
html,
body {
  max-width: 100%;
  overflow-x: hidden !important;
}
.app,
.main,
.page,
.section,
.section-body {
  min-width: 0 !important;
  max-width: 100% !important;
}

/* Make the show/hide buttons wide enough for section-name text in both Builder and Race Profiler. */
.profiler-section-toggle {
  min-width: 240px !important;
  padding-left: 22px !important;
  padding-right: 22px !important;
  white-space: nowrap !important;
}
.section-header-actions,
.profiler-header-actions,
.criteria-header-actions {
  gap: 16px !important;
}

/* Final Race Conditions composition: Race Rating Band sits beside Jockey Race Type. */
#race-conditions .grid.race-top {
  display: grid !important;
  grid-template-columns: minmax(0, 1.36fr) minmax(230px, .44fr) minmax(250px, .50fr) !important;
  gap: 16px !important;
  align-items: stretch !important;
}
#race-conditions #race_profiler_official_rating_slot,
#race-conditions .race-conditions-official-rating-slot {
  min-width: 0 !important;
  width: 100% !important;
  align-self: stretch !important;
}
#race-conditions .race-conditions-rating-card,
#race-conditions .race-profiler-rating-card {
  height: 100% !important;
  min-height: 0 !important;
  padding: 14px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}
#race-conditions .race-profiler-mini-note {
  max-width: 260px !important;
  margin: 0 auto 10px !important;
  line-height: 1.25 !important;
}
#race-conditions .grid.lower-two {
  display: grid !important;
  grid-template-columns: minmax(0, 1.8fr) minmax(300px, .55fr) !important;
  gap: 16px !important;
  align-items: stretch !important;
}
#race-conditions #num_fences_card {
  min-height: 0 !important;
  align-self: stretch !important;
}

/* Number of Fences must keep its warning hover/click target even when the inputs are unavailable. */
#num_fences_card.control-disabled {
  opacity: .42 !important;
  filter: grayscale(.25) !important;
  pointer-events: auto !important;
  cursor: help !important;
}
#num_fences_card.control-disabled input,
#num_fences_card.control-disabled label,
#num_fences_card.control-disabled .inline-inputs {
  pointer-events: none !important;
}
#num_fences_card.availability-warning::before {
  z-index: 2147482000 !important;
}
#num_fences_card.availability-warning:hover::before {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Let the sidebar section list scroll independently and avoid page-jump feedback loops. */
#builderContextNav {
  min-height: 0 !important;
}
#workspaceSectionNav {
  max-height: min(52vh, 460px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain !important;
  scroll-behavior: auto !important;
  padding-right: 6px !important;
}
#workspaceSectionNav a {
  scroll-margin: 8px !important;
}

@media (max-width: 1450px) {
  #race-conditions .grid.race-top,
  #race-conditions .grid.lower-two {
    grid-template-columns: 1fr !important;
  }
  #race-conditions .jockey-race-type-card .chips {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    max-width: none !important;
  }
}
@media (max-width: 760px) {
  .profiler-section-toggle {
    min-width: 180px !important;
    white-space: normal !important;
  }
}

/* === R-005 companion: sidebar workspace nav should use the sidebar scroll, not a short inner viewport === */
#builderContextNav {
  flex: 0 0 auto !important;
}
#workspaceSectionNav,
#builderContextNav .subnav {
  max-height: none !important;
  overflow-y: visible !important;
  overflow-x: hidden !important;
  overscroll-behavior: auto !important;
  padding-right: 8px !important;
}
#workspaceSectionNav a,
#builderContextNav .subnav a {
  scroll-margin: 10px !important;
}


/* === R-006 companion: let the workspace section rail extend with the page === */
.sidebar {
  height: auto !important;
  min-height: 100vh !important;
  max-height: none !important;
  overflow-y: visible !important;
  overflow-x: hidden !important;
}
#builderContextNav,
#workspaceSectionNav,
#builderContextNav .subnav {
  max-height: none !important;
  overflow-y: visible !important;
  overflow-x: hidden !important;
}
#time [data-date-preset="last_20_years"].disabled,
#time [data-date-preset="last_20_years"][aria-disabled="true"] {
  opacity: .42 !important;
  cursor: help !important;
}

/* === R-007B-P2-H2: keep lookup popovers below the fixed action bar ===
   Earlier emergency z-index rules lifted the Course/Bred pickers above every
   UI layer. That made the dropdown panels render over the sticky Save/Run bar.
   The pickers still need to sit above section cards, but the action bar must
   remain the top interactive layer at the bottom of the viewport. */
#course_picker,
#course_picker.open,
#bred_picker,
#bred_picker.open {
  z-index: 1500 !important;
}

#course_picker.open .course-picker-panel,
body.course-picker-is-open #course_picker_panel,
#bred_picker.open .course-picker-panel,
body.bred-picker-is-open #bred_picker .course-picker-panel {
  z-index: 1600 !important;
}

.builder-sticky-actions {
  z-index: 5000 !important;
}


/* R007B-P3: canonical course-context dropdown and figure-of-eight direction chips */
.course-context-option{align-items:flex-start;gap:8px;}
.course-context-option span{line-height:1.2;}
.course-context-option em{display:block;margin-left:auto;padding-left:8px;max-width:48%;font-size:11px;line-height:1.25;color:#64748b;text-align:right;font-style:normal;font-weight:800;white-space:normal;}
.direction-chip-grid .chip{white-space:normal;line-height:1.12;min-height:44px;padding-left:8px;padding-right:8px;text-align:center;}
#course-profile .course-race-direction-card .equal-buttons-4{grid-template-columns:repeat(4,minmax(74px,1fr));}
#course-profile .course-direction-card .equal-buttons-3{grid-template-columns:repeat(3,minmax(88px,1fr));max-width:520px;margin:0 auto;}

/* R007B-P3-H1: course-context lookup polish and Figure-of-Eight chip layout
   Keep the section visually balanced after adding Figure of Eight while keeping
   the underlying filter value as the full canonical label. */
#course-profile .course-top-context-row {
  grid-template-columns: minmax(320px, 1.35fr) minmax(190px, .72fr) minmax(190px, .72fr) minmax(190px, .72fr) !important;
  align-items: stretch !important;
}
#course-profile .course-race-direction-card,
#course-profile .course-direction-card,
#course-profile .course-select-card {
  justify-content: flex-start !important;
}
#course-profile .course-race-direction-card .card-title,
#course-profile .course-direction-card .card-title,
#course-profile .course-select-card .card-title {
  margin-top: 0 !important;
  margin-bottom: 12px !important;
}
#course-profile .course-race-direction-card .direction-chip-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(62px, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: none !important;
  align-items: center !important;
}
#course-profile .course-direction-card .direction-chip-grid,
#course-profile .course-direction-card .equal-buttons-3 {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(76px, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: none !important;
  align-items: center !important;
}
#course-profile .course-race-direction-card [data-race-direction="Figure of Eight / Left & Right"],
#course-profile .course-direction-card [data-course-direction="Figure of Eight / Left & Right"] {
  grid-column: 1 / -1 !important;
  justify-self: stretch !important;
}
#course-profile .course-race-direction-card .chip,
#course-profile .course-direction-card .chip {
  white-space: nowrap !important;
  min-height: 32px !important;
  padding: 7px 10px !important;
  line-height: 1.05 !important;
}
#course_options .course-option em {
  max-width: 52% !important;
}
@media (max-width: 1500px) {
  #course-profile .course-top-context-row,
  body[data-workspace-mode="race_profiler"] #course-profile.profiler-course-compact .course-top-context-row {
    grid-template-columns: minmax(280px, 1.3fr) repeat(3, minmax(170px, .75fr)) !important;
  }
}
@media (max-width: 1200px) {
  #course-profile .course-top-context-row,
  body[data-workspace-mode="race_profiler"] #course-profile.profiler-course-compact .course-top-context-row {
    grid-template-columns: 1fr !important;
  }
}


/* === UI-NAV-001 recovery: dynamic workspace-context placement support ===
   Keep one normal sticky sidebar and one real Current Workspace block. The JS
   moves #builderContextNav directly below the active System Builder/Race Profiler
   nav item. The section rail itself remains the bounded scroll container because
   the scroll-spy adjusts #workspaceSectionNav, not the whole sidebar. */
body:not(.dashboard-fullscreen-mode) .sidebar {
  position: sticky !important;
  top: 0 !important;
  height: 100vh !important;
  max-height: 100vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}
#builderContextNav {
  display: block !important;
  flex: 0 0 auto !important;
  margin: 8px 0 12px !important;
  min-height: 0 !important;
}
#builderContextNav[hidden] {
  display: none !important;
}
#workspaceSectionNav,
#builderContextNav .subnav {
  max-height: 360px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain !important;
  scroll-behavior: auto !important;
  padding-right: 6px !important;
}
#workspaceSectionNav a,
#builderContextNav .subnav a {
  scroll-margin: 8px !important;
}

/* === UI-NAV-001 recovery H3: pin the full left sidebar to the viewport ===
   Desired behaviour from the old working screenshots:
   - the full dark left nav remains visible while the main workspace scrolls;
   - #builderContextNav is moved by JS under the active Builder/Race Profiler item;
   - only #workspaceSectionNav owns the section-list scroll;
   - the whole sidebar must not drift down the document with the main page. */
@media (min-width: 1001px) {
  body:not(.dashboard-fullscreen-mode) .app {
    display: block !important;
    min-height: 100vh !important;
  }

  body:not(.dashboard-fullscreen-mode) .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 310px !important;
    height: 100vh !important;
    max-height: 100vh !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 70 !important;
    overscroll-behavior: contain !important;
  }

  body:not(.dashboard-fullscreen-mode) .main {
    margin: 0 0 0 310px !important;
    width: calc(100% - 310px) !important;
    max-width: none !important;
    min-height: 100vh !important;
  }
}

@media (min-width: 1001px) and (max-width: 1250px) {
  body:not(.dashboard-fullscreen-mode) .sidebar {
    width: 250px !important;
  }

  body:not(.dashboard-fullscreen-mode) .main {
    margin-left: 250px !important;
    width: calc(100% - 250px) !important;
  }
}

@media (max-width: 1000px) {
  body:not(.dashboard-fullscreen-mode) .app {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  body:not(.dashboard-fullscreen-mode) .sidebar {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    bottom: auto !important;
    width: auto !important;
    height: auto !important;
    max-height: none !important;
    overflow-y: visible !important;
  }

  body:not(.dashboard-fullscreen-mode) .main {
    margin-left: 0 !important;
    width: auto !important;
  }
}

/* === LR-HORSE-UI-001A: Live Racing horse form modal foundation === */
body.horse-drilldown-modal-open {
  overflow: hidden;
}

body > .horse-drilldown-modal-shell {
  position: fixed !important;
  inset: 0 !important;
}

.live-horse-link,
.live-runner-titleline .live-horse-link,
.live-runner-collapsed-identity .live-horse-link {
  appearance: none !important;
  -webkit-appearance: none !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit !important;
  font: inherit !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer;
  text-align: left;
  display: inline !important;
  line-height: inherit;
  border-radius: 0 !important;
}

.live-horse-link strong,
.live-runner-titleline .live-horse-link strong {
  color: #0f3f46;
  text-decoration: none !important;
  font-size: 17px;
  font-weight: 950;
}

.live-horse-link:hover strong,
.live-horse-link:focus-visible strong {
  color: #0f3f46;
  text-decoration: none !important;
}

.live-horse-link:focus-visible {
  outline: 2px solid rgba(15, 63, 70, 0.28);
  outline-offset: 2px;
}

.horse-drilldown-modal-shell[hidden] {
  display: none !important;
}

.horse-drilldown-modal-shell {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 28px;
}

.horse-drilldown-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 13, 28, 0.68);
  backdrop-filter: blur(9px);
}

.horse-drilldown-modal {
  position: relative;
  width: min(1500px, calc(100vw - 56px));
  height: min(88vh, 980px);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.34);
  overflow: hidden;
}

.horse-drilldown-modal-shell.fullscreen {
  padding: 0;
}

.horse-drilldown-modal-shell.fullscreen .horse-drilldown-modal {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
}

.horse-drilldown-content {
  height: 100%;
  overflow: auto;
  padding: 24px;
}

.horse-drilldown-modal-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 18px 18px 16px;
  margin: -24px -24px 14px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  backdrop-filter: blur(12px);
}

.horse-drilldown-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 900;
  color: #4f46e5;
}

.horse-drilldown-modal-header h2 {
  margin: 3px 0 2px;
  color: #0f172a;
  font-size: clamp(1.4rem, 2.3vw, 2.4rem);
  letter-spacing: -0.04em;
}

.horse-drilldown-modal-header p {
  margin: 0;
  color: #64748b;
  font-weight: 700;
}

.horse-drilldown-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.horse-drilldown-actions button,
.horse-form-toolbar button,
.horse-summary-tabs button,
.horse-context-runner-list button {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
  font-weight: 900;
}

.horse-drilldown-ghost {
  padding: 10px 14px;
}

.horse-drilldown-close {
  width: 42px;
  height: 42px;
  font-size: 1.4rem;
  line-height: 1;
}

.horse-drilldown-breadcrumb {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 14px;
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 800;
}

.horse-drilldown-breadcrumb strong {
  color: #111827;
}

.horse-drilldown-loading,
.horse-drilldown-error,
.horse-drilldown-empty {
  padding: 28px;
  border-radius: 22px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #475569;
  font-weight: 800;
}

.horse-drilldown-error {
  color: #991b1b;
  background: #fef2f2;
  border-color: rgba(239, 68, 68, 0.28);
}

.horse-context-strip {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 14px;
  border-radius: 20px;
  background: #eef2ff;
  border: 1px solid rgba(99, 102, 241, 0.18);
}

.horse-context-strip > span {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4338ca;
  font-weight: 1000;
}

.horse-context-runner-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.horse-context-runner-list button {
  white-space: nowrap;
  padding: 9px 12px;
  font-size: 0.84rem;
}

.horse-context-runner-list button.active,
.horse-summary-tabs button.active,
.horse-form-filter-buttons button.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 10px 20px rgba(79, 70, 229, 0.22);
}

.horse-identity-panel,
.horse-summary-section,
.horse-form-section {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 24px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
  margin-bottom: 16px;
}

.horse-identity-panel {
  padding: 18px;
}

.horse-identity-main {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.horse-silk-placeholder {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
  display: grid;
  place-items: center;
  color: #4f46e5;
  font-weight: 1000;
  font-size: 1.3rem;
  box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.12);
}

.horse-identity-main h3 {
  margin: 0 0 4px;
  font-size: 1.45rem;
  color: #0f172a;
}

.horse-identity-main p {
  margin: 0;
  color: #64748b;
  font-weight: 800;
}

.horse-identity-muted {
  font-size: 0.82rem;
  margin-top: 3px !important;
}

.horse-identity-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.horse-identity-grid div {
  background: #f8fafc;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 16px;
  padding: 11px 12px;
  min-width: 0;
}

.horse-identity-grid span {
  display: block;
  font-size: 0.68rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 1000;
  margin-bottom: 4px;
}

.horse-identity-grid strong {
  color: #111827;
  font-size: 0.88rem;
  word-break: break-word;
}

.future-placeholder {
  color: #94a3b8 !important;
}

.horse-summary-section,
.horse-form-section {
  padding: 14px;
}

.horse-summary-tabs,
.horse-form-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.horse-summary-tabs button,
.horse-form-filter-buttons button,
.horse-form-toolbar-meta button {
  padding: 9px 12px;
  font-size: 0.84rem;
}

.horse-summary-table-wrap,
.horse-form-table-wrap {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.95);
}

.horse-summary-table,
.horse-form-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
  background: #ffffff;
}

.horse-summary-table th,
.horse-summary-table td,
.horse-form-table th,
.horse-form-table td {
  padding: 10px 11px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.78);
  text-align: left;
  vertical-align: middle;
  font-size: 0.86rem;
}

.horse-summary-table thead th,
.horse-form-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 1000;
}

.horse-form-table thead button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.horse-summary-table tbody tr.active,
.horse-form-table tbody tr:hover {
  background: #f8fafc;
}

.horse-form-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.horse-form-toolbar-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #64748b;
  font-weight: 900;
  font-size: 0.84rem;
}

.horse-form-date {
  white-space: nowrap;
  font-weight: 900;
  color: #111827;
}

.horse-form-play {
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  margin-right: 7px;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #ef4444;
  font-size: 0.55rem;
}

.horse-form-race strong,
.horse-form-result strong {
  display: block;
  color: #0f172a;
}

.horse-form-race small {
  display: block;
  color: #64748b;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.horse-form-result {
  min-width: 190px;
}

.horse-form-comment-dot {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.7rem;
  font-weight: 1000;
}

.horse-form-row {
  cursor: pointer;
}

.horse-form-empty-cell {
  text-align: center !important;
  color: #64748b;
  font-weight: 900;
  padding: 24px !important;
}

@media (max-width: 1100px) {
  .horse-drilldown-modal-shell {
    padding: 12px;
  }

  .horse-drilldown-modal {
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
    border-radius: 22px;
  }

  .horse-identity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .horse-form-toolbar,
  .horse-context-strip {
    grid-template-columns: 1fr;
    display: grid;
  }
}

/* === LR-HORSE-UI-001A-HOTFIX2: horse modal compression, ordering and form-reader density === */
.horse-drilldown-modal {
  --horse-sticky-offset: 88px;
}

.horse-drilldown-content {
  padding: 0 !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.horse-drilldown-body {
  padding: 14px 24px 24px;
}

.horse-drilldown-modal-header {
  margin: 0 !important;
  padding: 16px 24px 14px !important;
  display: grid !important;
  grid-template-columns: minmax(280px, 1fr) auto auto;
  align-items: center !important;
  gap: 16px !important;
}

.horse-drilldown-title-block {
  min-width: 0;
}

.horse-drilldown-modal-header h2 {
  font-size: clamp(1.55rem, 2.2vw, 2.25rem) !important;
  line-height: 1.02;
}

.horse-drilldown-modal-header p {
  font-size: 0.9rem;
}

.horse-drilldown-placeholder-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.horse-drilldown-ghost.muted {
  color: #64748b !important;
  background: #f8fafc !important;
  border-color: rgba(148, 163, 184, 0.32) !important;
  cursor: not-allowed !important;
  opacity: 0.78;
}

.horse-drilldown-breadcrumb {
  margin: 0 0 10px !important;
  font-size: 0.78rem !important;
}

.horse-context-strip {
  margin-bottom: 12px !important;
  padding: 10px 12px !important;
  border-radius: 18px !important;
}

.horse-context-strip.is-scrollable {
  grid-template-columns: auto 34px minmax(0, 1fr) 34px;
}

.horse-context-strip.compact-select {
  grid-template-columns: auto minmax(240px, 1fr);
}

.horse-context-strip select,
.horse-advanced-filter-panel select,
.horse-advanced-filter-panel input {
  min-height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  font-weight: 800;
  padding: 7px 10px;
  width: 100%;
}

.horse-context-runner-list {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.horse-context-runner-list::-webkit-scrollbar {
  display: none;
}

.horse-context-arrow {
  width: 34px;
  height: 34px;
  border-radius: 999px !important;
  display: grid;
  place-items: center;
  font-size: 1.25rem !important;
  padding: 0 !important;
}

.horse-context-runner-list button {
  padding: 8px 11px !important;
  font-size: 0.8rem !important;
}

.horse-identity-panel.compact {
  padding: 14px 16px !important;
}

.horse-identity-main.compact {
  display: grid !important;
  grid-template-columns: 54px minmax(220px, 0.95fr) minmax(420px, 2fr);
  gap: 14px !important;
  margin-bottom: 0 !important;
  align-items: center;
}

.horse-silk-placeholder {
  width: 52px !important;
  height: 52px !important;
  border-radius: 16px !important;
}

.horse-identity-title h3 {
  font-size: 1.32rem !important;
  margin-bottom: 2px !important;
}

.horse-identity-title p {
  font-size: 0.82rem !important;
  line-height: 1.25;
}

.horse-connections-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.horse-connections-strip div {
  background: #f8fafc;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 13px;
  padding: 8px 10px;
  min-width: 0;
}

.horse-connections-strip span,
.horse-section-heading span {
  display: block;
  font-size: 0.65rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 1000;
}

.horse-connections-strip strong {
  display: block;
  margin-top: 2px;
  color: #111827;
  font-size: 0.78rem;
  line-height: 1.14;
  overflow-wrap: anywhere;
}

.horse-summary-section.compact,
.horse-form-section {
  padding: 12px !important;
}

.horse-section-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 8px;
}

.horse-section-heading small {
  color: #64748b;
  font-weight: 800;
  font-size: 0.72rem;
}

.horse-summary-table.compact th,
.horse-summary-table.compact td {
  padding: 7px 9px !important;
  font-size: 0.76rem !important;
}

.horse-summary-table.compact thead th,
.horse-form-table.compact thead th {
  background: #edf2f7 !important;
  color: #1e293b !important;
  font-size: 0.66rem !important;
}

.horse-summary-table tbody tr.total {
  background: #f8fafc;
  font-weight: 900;
}

.horse-form-toolbar {
  margin-bottom: 9px !important;
}

.horse-form-toolbar-meta {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.horse-form-toolbar-meta button,
.horse-form-filter-buttons button {
  padding: 8px 10px !important;
  font-size: 0.78rem !important;
  border-radius: 12px !important;
}

.horse-advanced-filter-panel {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  gap: 8px;
  padding: 10px;
  margin: 0 0 10px;
  border-radius: 16px;
  border: 1px solid rgba(99, 102, 241, 0.18);
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.88), rgba(248, 250, 252, 0.94));
}

.horse-advanced-filter-panel label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.horse-advanced-filter-panel label span {
  font-size: 0.62rem;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 1000;
}

.horse-form-table-wrap {
  overflow-x: auto !important;
  overflow-y: visible !important;
  border-radius: 16px !important;
}

.horse-form-table.compact th,
.horse-form-table.compact td {
  padding: 7px 8px !important;
  font-size: 0.78rem !important;
  line-height: 1.15;
}

.horse-form-table thead th {
  top: var(--horse-sticky-offset) !important;
  z-index: 8 !important;
  box-shadow: 0 1px 0 rgba(226, 232, 240, 0.9), 0 6px 10px rgba(15, 23, 42, 0.05);
}

.horse-form-table tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.56);
}

.horse-form-date {
  font-size: 0.76rem !important;
}

.horse-form-play {
  width: 16px !important;
  height: 16px !important;
  margin-right: 5px !important;
  font-size: 0.48rem !important;
}

.horse-form-race {
  min-width: 300px;
}

.horse-form-race strong {
  font-size: 0.82rem;
}

.horse-form-race small {
  max-width: 340px !important;
  font-size: 0.68rem !important;
  line-height: 1.15;
}

.horse-form-race-meta {
  color: #334155 !important;
  font-weight: 850;
}

.horse-form-race-title {
  color: #64748b !important;
}

.horse-form-weight em {
  font-style: italic;
  font-size: 0.7em;
  font-weight: 950;
  margin-left: 2px;
  color: #0f172a;
}

.horse-form-result {
  min-width: 170px !important;
}

.horse-form-result strong {
  display: inline !important;
  font-size: 0.78rem;
  line-height: 1.12;
}

.horse-form-comment-dot {
  display: none !important;
}

@media (max-width: 1300px) {
  .horse-drilldown-modal-header {
    grid-template-columns: minmax(240px, 1fr) auto;
  }
  .horse-drilldown-placeholder-actions {
    order: 3;
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .horse-identity-main.compact {
    grid-template-columns: 52px 1fr;
  }
  .horse-connections-strip {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .horse-advanced-filter-panel {
    grid-template-columns: repeat(4, minmax(110px, 1fr));
  }
}

@media (max-width: 900px) {
  .horse-drilldown-body {
    padding: 12px 14px 18px;
  }
  .horse-connections-strip,
  .horse-advanced-filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .horse-drilldown-placeholder-actions {
    display: none;
  }
}

/* === LR-HORSE-UI-001A-HOTFIX3: premium form polish and first result drilldown === */
.horse-drilldown-modal {
  --horse-sticky-offset: 0px;
}

.horse-drilldown-placeholder-actions .horse-drilldown-ghost.muted {
  min-width: 180px;
  text-align: center;
  background: #ffffff !important;
  border-color: rgba(99, 102, 241, 0.20) !important;
  color: #475569 !important;
  cursor: default !important;
}

.horse-identity-main.compact {
  grid-template-columns: 52px minmax(220px, 0.8fr) minmax(520px, 2.2fr) !important;
}

.horse-connections-strip {
  display: none !important;
}

.horse-connections-card {
  background: linear-gradient(135deg, #f8fafc, #ffffff);
  border: 1px solid rgba(226, 232, 240, 0.98);
  border-radius: 15px;
  padding: 9px 12px;
  min-width: 0;
}

.horse-connections-card > span {
  display: block;
  font-size: 0.62rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 1000;
  margin-bottom: 6px;
}

.horse-connections-card > div {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px 12px;
}

.horse-connections-card p {
  margin: 0;
  min-width: 0;
}

.horse-connections-card em {
  display: block;
  font-style: normal;
  font-size: 0.62rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 1000;
}

.horse-connections-card strong {
  display: block;
  color: #0f172a;
  font-size: 0.77rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.horse-summary-section.compact {
  padding: 9px 10px !important;
  margin-bottom: 12px !important;
}

.horse-summary-table.compact th,
.horse-summary-table.compact td {
  padding: 5px 7px !important;
  font-size: 0.72rem !important;
  line-height: 1.05;
}

.horse-summary-table.compact thead th:not(:first-child),
.horse-summary-table.compact tbody td {
  text-align: center !important;
}

.horse-summary-table.compact tbody th {
  width: 115px;
  color: #334155;
}

.horse-section-heading {
  margin-bottom: 6px !important;
}

.horse-section-heading small {
  display: none !important;
}

.horse-form-row {
  cursor: default !important;
}

.horse-form-result button {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-weight: 950;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px dotted rgba(79, 70, 229, 0.28);
}

.horse-form-result button:hover,
.horse-form-result button:focus-visible {
  color: #4f46e5;
  border-bottom-color: rgba(79, 70, 229, 0.55);
  outline: none;
}

.horse-form-table-wrap {
  max-height: min(58vh, 620px);
  overflow-y: auto !important;
  overflow-x: auto !important;
  background: #ffffff;
}

.horse-form-table thead th {
  top: 0 !important;
  z-index: 10 !important;
}

.horse-form-table.compact th,
.horse-form-table.compact td {
  padding: 6px 8px !important;
  font-size: 0.76rem !important;
}

.horse-form-table tbody tr:hover {
  background: #f3f4ff !important;
}

.horse-form-race strong {
  font-size: 0.8rem !important;
}

.horse-form-race small {
  font-size: 0.66rem !important;
}

.horse-advanced-filter-panel.compact-groups {
  grid-template-columns: 1.05fr 0.95fr 0.8fr 0.95fr 1.05fr 1.1fr 1.15fr 1.15fr 1fr 1fr !important;
  align-items: end;
}

.horse-filter-range > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.horse-filter-range select,
.horse-filter-range input {
  min-width: 0;
  padding-inline: 8px !important;
}

.horse-result-detail-panel {
  display: grid;
  gap: 12px;
}

.horse-result-detail-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #64748b;
  font-weight: 900;
  font-size: 0.82rem;
}

.horse-result-back {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #ffffff;
  color: #0f172a;
  border-radius: 13px;
  padding: 8px 11px;
  font-weight: 950;
  cursor: pointer;
}

.horse-result-back:hover {
  background: #eef2ff;
  border-color: rgba(99, 102, 241, 0.35);
}

.horse-result-header-card {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(420px, 0.95fr);
  gap: 14px;
  padding: 14px 16px;
  border-radius: 22px;
  border: 1px solid rgba(226, 232, 240, 0.96);
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.horse-result-header-card span {
  display: block;
  color: #4f46e5;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 1000;
}

.horse-result-header-card h3 {
  margin: 3px 0;
  color: #0f172a;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.horse-result-header-card p {
  margin: 2px 0;
  color: #475569;
  font-weight: 800;
}

.horse-result-header-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.horse-result-header-stats p {
  background: #f8fafc;
  border: 1px solid rgba(226, 232, 240, 0.98);
  border-radius: 14px;
  padding: 8px 10px;
}

.horse-result-header-stats em {
  display: block;
  font-style: normal;
  color: #64748b;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 1000;
}

.horse-result-header-stats strong {
  display: block;
  color: #0f172a;
  font-size: 0.86rem;
  margin-top: 2px;
}

.horse-result-table-wrap {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: #ffffff;
  max-height: min(60vh, 640px);
}

.horse-result-table {
  width: 100%;
  min-width: 1020px;
  border-collapse: collapse;
}

.horse-result-table th,
.horse-result-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.78);
  vertical-align: top;
  font-size: 0.78rem;
}

.horse-result-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #edf2f7;
  color: #1e293b;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 1000;
  text-align: left;
}

.horse-result-table tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.58);
}

.horse-result-table tbody tr.is-highlighted {
  background: #eef2ff !important;
  box-shadow: inset 4px 0 0 #4f46e5;
}

.horse-result-position {
  font-weight: 1000;
  color: #0f172a;
  width: 60px;
}

.horse-result-runner button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: #0f172a;
  font: inherit;
  font-weight: 1000;
  cursor: pointer;
  text-align: left;
}

.horse-result-runner button:hover {
  color: #4f46e5;
}

.horse-result-table small {
  display: block;
  color: #64748b;
  font-weight: 800;
  margin-top: 2px;
}

.horse-result-comment {
  color: #334155;
  max-width: 420px;
  line-height: 1.25;
}

@media (max-width: 1400px) {
  .horse-advanced-filter-panel.compact-groups {
    grid-template-columns: repeat(5, minmax(120px, 1fr)) !important;
  }
  .horse-result-header-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1050px) {
  .horse-identity-main.compact {
    grid-template-columns: 52px 1fr !important;
  }
  .horse-connections-card {
    grid-column: 1 / -1;
  }
  .horse-connections-card > div,
  .horse-result-header-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* === LR-HORSE-UI-001A-HOTFIX4: breadcrumb path, one-scroll form, result racing identity === */
.horse-drilldown-modal {
  --horse-sticky-offset: 86px;
}

.horse-history-strip {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
}

.horse-history-strip.is-scrollable {
  grid-template-columns: 30px minmax(0, 1fr) 30px;
}

.horse-history-list {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
  padding: 2px 0 4px;
}

.horse-history-list::-webkit-scrollbar {
  display: none;
}

.horse-history-list button,
.horse-history-arrow {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #64748b;
  padding: 6px 10px;
  font-size: 0.74rem;
  font-weight: 950;
  white-space: nowrap;
}

.horse-history-list button:not(:disabled) {
  cursor: pointer;
}

.horse-history-list button.active {
  background: #eef2ff;
  color: #3730a3;
  border-color: rgba(99, 102, 241, 0.28);
}

.horse-history-separator {
  color: #94a3b8;
  font-weight: 1000;
}

.horse-history-arrow {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}

.horse-identity-main.compact {
  grid-template-columns: 48px minmax(240px, 0.92fr) minmax(460px, 1.72fr) !important;
  gap: 12px !important;
}

.horse-identity-panel.compact {
  padding: 10px 12px !important;
  margin-bottom: 10px !important;
}

.horse-silk-placeholder {
  width: 48px !important;
  height: 48px !important;
  border-radius: 15px !important;
  font-size: 1.05rem !important;
}

.horse-identity-main h3 {
  font-size: 1.12rem !important;
  margin-bottom: 2px !important;
}

.horse-identity-main p {
  font-size: 0.76rem !important;
  line-height: 1.18;
}

.horse-connections-card {
  justify-self: stretch;
  padding: 7px 10px !important;
  border-radius: 13px !important;
}

.horse-connections-card > span {
  text-align: center;
  font-size: 0.56rem !important;
  margin-bottom: 5px !important;
}

.horse-connections-card > div {
  gap: 6px 10px !important;
}

.horse-connections-card em {
  font-size: 0.55rem !important;
}

.horse-connections-card strong {
  font-size: 0.68rem !important;
  line-height: 1.1 !important;
}

.horse-form-table-wrap {
  max-height: none !important;
  overflow-y: visible !important;
  overflow-x: auto !important;
}

.horse-form-table thead th {
  top: var(--horse-sticky-offset) !important;
}

.horse-form-num,
.horse-form-table td:nth-child(3),
.horse-form-table td:nth-child(10),
.horse-form-table td:nth-child(11) {
  text-align: center !important;
}

.horse-form-result button {
  position: relative;
}

.horse-form-result button[data-horse-tooltip]::after {
  content: attr(data-horse-tooltip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 40;
  width: min(520px, 55vw);
  padding: 9px 11px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.96);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.28;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.24);
  opacity: 0;
  transform: translateY(3px);
  pointer-events: none;
  transition: opacity 0.12s ease 0.28s, transform 0.12s ease 0.28s;
}

.horse-form-result button[data-horse-tooltip]:hover::after,
.horse-form-result button[data-horse-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.horse-result-table-wrap {
  max-height: none !important;
  overflow-y: visible !important;
  overflow-x: auto !important;
}

.horse-result-table {
  min-width: 1120px !important;
}

.horse-result-table th,
.horse-result-table td {
  padding: 9px 10px !important;
}

.horse-result-position {
  width: 76px !important;
  text-align: center;
}

.horse-result-silk-badge {
  width: 46px;
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  gap: 0;
  border-radius: 13px 13px 18px 18px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: #f4f1e8;
  color: #0f172a;
  box-shadow: inset 0 -10px 18px rgba(15, 23, 42, 0.04);
}

.horse-result-silk-badge strong {
  display: block;
  font-size: 0.94rem;
  line-height: 1;
  font-weight: 1000;
}

.horse-result-silk-badge em {
  display: block;
  font-style: normal;
  font-size: 0.58rem;
  line-height: 1;
  margin-top: 2px;
  color: rgba(15, 23, 42, 0.60);
  font-weight: 950;
}

.horse-result-table tr.pos-1 .horse-result-silk-badge {
  background: linear-gradient(160deg, #fff7d6, #eac766);
}

.horse-result-table tr.pos-2 .horse-result-silk-badge {
  background: linear-gradient(160deg, #f8fafc, #cbd5e1);
}

.horse-result-table tr.pos-3 .horse-result-silk-badge {
  background: linear-gradient(160deg, #fff1df, #d7a06a);
}

.horse-result-table tr.pos-4 .horse-result-silk-badge {
  background: linear-gradient(160deg, #fffdf5, #eee5cb);
}

.horse-result-name-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.horse-result-name-line span {
  color: #64748b;
  font-weight: 850;
}

.horse-result-sp {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid rgba(226, 232, 240, 0.96);
  color: #334155;
  font-size: 0.72rem;
  font-weight: 1000;
}

.horse-result-weight em {
  font-style: italic;
  font-size: 0.66em;
  font-weight: 950;
  margin-left: 2px;
  color: #0f172a;
}

.horse-result-comment {
  max-width: 560px !important;
  line-height: 1.32 !important;
}

.horse-result-table tbody tr.is-highlighted {
  background: #eef2ff !important;
  box-shadow: inset 4px 0 0 #4f46e5;
}

@media (max-width: 1300px) {
  .horse-identity-main.compact {
    grid-template-columns: 48px 1fr !important;
  }
  .horse-connections-card {
    grid-column: 1 / -1;
  }
  .horse-connections-card > div {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* === LR-HORSE-UI-001A-HOTFIX5: form/header correctness and result polish === */
.horse-form-table thead th {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
  box-shadow: none !important;
}

.horse-form-table.compact th,
.horse-form-table.compact td {
  padding: 5px 7px !important;
  font-size: 0.71rem !important;
  line-height: 1.12 !important;
}

.horse-form-date {
  font-size: 0.70rem !important;
}

.horse-form-race strong {
  font-size: 0.74rem !important;
  line-height: 1.08 !important;
}

.horse-form-race small {
  font-size: 0.61rem !important;
  line-height: 1.10 !important;
}

.horse-form-result button {
  font-size: 0.72rem !important;
  line-height: 1.12 !important;
}

.horse-form-race-drilldown {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.horse-form-race-drilldown:hover .horse-form-race-meta,
.horse-form-race-drilldown:hover .horse-form-race-title,
.horse-form-race-drilldown:focus-visible .horse-form-race-meta,
.horse-form-race-drilldown:focus-visible .horse-form-race-title {
  color: #4f46e5 !important;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.horse-form-race-drilldown:focus-visible {
  outline: 2px solid rgba(79, 70, 229, 0.28);
  outline-offset: 2px;
  border-radius: 6px;
}

.horse-connections-card {
  padding: 6px 9px !important;
}

.horse-connections-card > span {
  font-size: 0.54rem !important;
  letter-spacing: 0.11em !important;
}

.horse-connections-card p {
  text-align: center;
}

.horse-connections-card em {
  text-align: center;
  font-size: 0.53rem !important;
  letter-spacing: 0.08em !important;
}

.horse-connections-card strong {
  font-size: 0.64rem !important;
  font-weight: 650 !important;
  line-height: 1.08 !important;
}

.horse-context-runner-list {
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.horse-context-runner-list::-webkit-scrollbar {
  display: none;
}

.horse-result-header-card {
  border-color: rgba(148, 163, 184, 0.34) !important;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08) !important;
}

.horse-result-header-stats.refined {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.horse-result-header-stats.refined p {
  display: grid;
  align-content: center;
  min-height: 58px;
  border-color: rgba(148, 163, 184, 0.26) !important;
  background: linear-gradient(180deg, #ffffff, #f8fafc) !important;
}

.horse-result-header-stats.refined small {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.15;
}

.horse-result-table-wrap {
  border: 1.5px solid rgba(148, 163, 184, 0.34) !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.horse-result-table thead th {
  background: #e9eef5 !important;
  border-bottom: 1.5px solid rgba(148, 163, 184, 0.34) !important;
}

.horse-result-table th,
.horse-result-table td {
  border-bottom-color: rgba(203, 213, 225, 0.62) !important;
}

@media (max-width: 1050px) {
  .horse-result-header-stats.refined {
    grid-template-columns: 1fr !important;
  }
}


/* LR-HORSE-UI-001A-HOTFIX6: refine horse-form result emphasis. */
.horse-form-result button {
  font-weight: 500 !important;
}

.horse-form-result .horse-result-position-part {
  display: inline !important;
  font-weight: 950 !important;
  color: #0f172a;
}

.horse-form-result .horse-result-detail-part {
  font-weight: 600 !important;
  color: #1f2937;
}

.horse-form-result button:hover .horse-result-detail-part,
.horse-form-result button:focus-visible .horse-result-detail-part {
  color: #4f46e5;
}

/* LR-RESULTS-UI-001A: standalone Racing Results workspace */
.racing-results-topbar { align-items: flex-start; }
.racing-results-hero {
  position: relative;
  margin: 18px 0 16px;
  padding: 26px 30px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(15,23,42,.96), rgba(30,64,175,.82) 58%, rgba(217,119,6,.55));
  color: #fff;
  overflow: hidden;
  box-shadow: 0 22px 55px rgba(15,23,42,.18);
}
.racing-results-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -80px;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: rgba(251,191,36,.18);
}
.racing-results-kicker {
  position: relative;
  z-index: 1;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 11px;
  font-weight: 900;
  opacity: .82;
  margin-bottom: 8px;
}
.racing-results-hero h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 8px;
  font-size: clamp(22px, 2vw, 34px);
  letter-spacing: -.03em;
}
.racing-results-hero p {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 850px;
  color: rgba(255,255,255,.84);
}
.racing-results-workspace {
  display: grid;
  gap: 14px;
}
.racing-results-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.racing-results-summary-card {
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 12px 36px rgba(15,23,42,.08);
}
.racing-results-summary-card span {
  display: block;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 10px;
  font-weight: 900;
}
.racing-results-summary-card strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 22px;
  line-height: 1;
}
.racing-results-summary-card small {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-weight: 700;
}
.racing-results-toolbar {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 20px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(148,163,184,.22);
  box-shadow: 0 12px 34px rgba(15,23,42,.08);
}
.racing-results-date-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.racing-results-date-strip::-webkit-scrollbar { display: none; }
.racing-results-date-strip button {
  flex: 0 0 auto;
  border: 1px solid rgba(148,163,184,.35);
  border-radius: 14px;
  background: #fff;
  color: #334155;
  padding: 9px 13px;
  font-weight: 900;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
  cursor: pointer;
}
.racing-results-date-strip button.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  box-shadow: 0 12px 26px rgba(79,70,229,.25);
}
.racing-results-date-strip button.select-date {
  border-color: rgba(217,119,6,.24);
  color: #92400e;
  background: #fff7ed;
}
.racing-results-date-strip button.select-date.is-open {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #d97706, #dc2626);
  box-shadow: 0 12px 24px rgba(217,119,6,.22);
}
.racing-results-date-picker {
  position: absolute;
  top: calc(100% + 10px);
  left: auto;
  right: 78px;
  z-index: 30;
  width: min(360px, calc(100vw - 48px));
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(148,163,184,.28);
  background: rgba(255,255,255,.98);
  box-shadow: 0 26px 70px rgba(15,23,42,.2);
}
.racing-results-date-picker[hidden] { display: none; }
.racing-results-picker-head {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.racing-results-picker-head strong {
  text-align: center;
  color: #0f172a;
  font-size: 15px;
}
.racing-results-picker-head button,
.racing-results-picker-foot button {
  border: 1px solid rgba(148,163,184,.28);
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  min-height: 36px;
  font-weight: 950;
  cursor: pointer;
}
.racing-results-picker-weekdays,
.racing-results-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.racing-results-picker-weekdays {
  margin-bottom: 6px;
  color: #64748b;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
  text-align: center;
}
.racing-results-picker-grid span,
.racing-results-picker-grid button {
  min-height: 36px;
  border-radius: 12px;
}
.racing-results-picker-grid button {
  border: 1px solid rgba(148,163,184,.22);
  background: #f8fafc;
  color: #334155;
  font-weight: 900;
  cursor: pointer;
}
.racing-results-picker-grid button:hover { border-color: rgba(79,70,229,.38); color: #4f46e5; }
.racing-results-picker-grid button.has-data { background: #fff; }
.racing-results-picker-grid button.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  box-shadow: 0 10px 22px rgba(79,70,229,.22);
}
.racing-results-picker-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
.racing-results-picker-foot button {
  padding: 0 14px;
}
.racing-results-picker-foot button:not(.ghost) {
  border-color: transparent;
  background: #dc2626;
  color: #fff;
}
.racing-results-status {
  justify-self: end;
  color: #475569;
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
}
.racing-results-status.ok { color: #047857; }
.racing-results-status.error { color: #b91c1c; }
.racing-results-course-list {
  display: grid;
  gap: 12px;
}
.racing-results-course-card {
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 22px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 14px 38px rgba(15,23,42,.08);
  overflow: hidden;
}
.racing-results-course-head {
  width: 100%;
  display: grid;
  grid-template-columns: 116px minmax(240px, 360px) minmax(300px, 1fr) minmax(120px, auto) auto;
  gap: 16px;
  align-items: center;
  border: 0;
  background: linear-gradient(90deg, rgba(248,250,252,.98), rgba(241,245,249,.72));
  padding: 14px 18px;
  text-align: left;
  cursor: pointer;
}
.racing-results-course-art {
  position: relative;
  display: grid;
  place-items: center;
  align-items: center;
  justify-items: center;
  height: 58px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a, #1e3a8a 56%, #d97706);
  color: #fff;
  overflow: hidden;
}
.racing-results-course-art::before {
  content: "";
  position: absolute;
  width: 100px;
  height: 32px;
  border: 2px solid rgba(255,255,255,.4);
  border-left-color: transparent;
  border-radius: 999px;
  transform: rotate(-10deg);
}
.racing-results-course-art strong {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  height: 100%;
  line-height: 1;
  font-size: 22px;
  letter-spacing: .08em;
}
.racing-results-course-title strong {
  display: block;
  color: #0f172a;
  font-size: 18px;
  letter-spacing: .02em;
}
.racing-results-course-features {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 14px;
  background: rgba(255,255,255,.58);
}
.racing-results-course-features em {
  color: #92400e;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 9px;
  font-weight: 950;
}
.racing-results-course-features strong {
  color: #0f172a;
  font-size: 12px;
  line-height: 1.1;
}
.racing-results-course-features small {
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.racing-results-course-features.is-empty { opacity: .72; }
.racing-results-course-title small,
.racing-results-course-going {
  color: #64748b;
  font-weight: 800;
  font-size: 12px;
}
.racing-results-course-going { justify-self: end; }
.racing-results-course-plus {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(148,163,184,.32);
  color: #dc2626;
  font-size: 22px;
  line-height: 1;
}
.racing-results-course-body {
  padding: 16px 18px 20px;
  display: grid;
  gap: 16px;
}
.racing-results-meeting-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.racing-results-meeting-details > div {
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 16px;
  background: #f8fafc;
  padding: 12px 14px;
}
.racing-results-meeting-details span {
  display: block;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 10px;
  font-weight: 900;
}
.racing-results-meeting-details strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
}
.racing-results-meeting-details small {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-weight: 700;
}
.racing-results-race-grid,
.racing-results-time-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.racing-results-time-grid { margin-top: 2px; }
.racing-results-race-card {
  display: grid;
  gap: 10px;
  align-content: start;
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 18px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 12px 30px rgba(15,23,42,.07);
}
.racing-results-race-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.racing-results-race-topline span {
  color: #64748b;
  font-weight: 900;
  font-size: 12px;
}
.racing-results-race-time {
  border: 0;
  background: transparent;
  color: #111827;
  font-weight: 950;
  font-size: 22px;
  padding: 0;
  cursor: pointer;
}
.racing-results-race-title {
  border: 0;
  background: transparent;
  color: #0f172a;
  padding: 0;
  text-align: left;
  font-weight: 950;
  font-size: 16px;
  line-height: 1.18;
  cursor: pointer;
}
.racing-results-race-title:hover,
.racing-results-race-time:hover { color: #4f46e5; }
.racing-results-race-meta {
  color: #475569;
  font-weight: 800;
  font-size: 12px;
  line-height: 1.45;
}
.racing-results-finishers {
  display: grid;
  gap: 5px;
  border-top: 1px solid rgba(148,163,184,.18);
  border-bottom: 1px solid rgba(148,163,184,.18);
  padding: 9px 0;
}
.racing-results-finishers button {
  border: 0;
  background: transparent;
  padding: 0;
  color: #111827;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
}
.racing-results-finishers button:hover strong { color: #4f46e5; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.racing-results-race-facts {
  display: grid;
  gap: 3px;
  color: #475569;
  font-size: 12px;
  font-weight: 750;
}
.racing-results-winner-comment {
  border-left: 3px solid rgba(217,119,6,.45);
  background: #fffbeb;
  border-radius: 12px;
  padding: 8px 10px;
  color: #475569;
  font-size: 12px;
  line-height: 1.35;
  min-height: 74px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.racing-results-winner-comment span {
  display: block;
  margin-bottom: 2px;
  color: #92400e;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.racing-results-full-result {
  margin-top: 2px;
  border: 0;
  border-radius: 12px;
  background: #dc2626;
  color: #fff;
  padding: 10px 14px;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(220,38,38,.17);
}
.racing-results-full-result:hover { filter: brightness(.97); }

@media (max-width: 1280px) {
  .racing-results-race-grid,
  .racing-results-time-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .racing-results-toolbar { grid-template-columns: 1fr; }
  .racing-results-status { justify-self: start; }
}
@media (max-width: 900px) {
  .racing-results-summary-grid,
  .racing-results-meeting-details,
  .racing-results-race-grid,
  .racing-results-time-grid { grid-template-columns: 1fr; }
  .racing-results-course-head { grid-template-columns: 82px minmax(0, 1fr) auto; }
  .racing-results-course-features { grid-column: 2 / span 2; }
  .racing-results-course-going { grid-column: 2 / span 2; justify-self: start; }
}


/* LR-RESULTS-UI-001C: Live Racing front page aligned with Racing Results */
.live-summary-card.quality-card strong{
  font-size:20px!important;
  letter-spacing:-.03em!important;
  line-height:1.08!important;
}
.live-racing-list .live-course-card-modern{
  border-color:rgba(45,212,191,.18);
}
.live-racing-list .racing-results-course-head{
  background:linear-gradient(90deg,rgba(248,250,252,.98),rgba(236,253,245,.62));
}
.live-racing-list .racing-results-course-art{
  background:linear-gradient(135deg,#0f172a,#1d4ed8 54%,#14b8a6);
}
.live-racing-list .racing-results-course-features em{
  color:#0f766e;
}
.live-racing-list .racing-results-course-plus{
  color:#dc2626;
}
.live-course-races-modern{
  padding:0!important;
  display:block;
  border-top:1px solid rgba(226,232,240,.85);
}
.live-course-races-modern .live-race-row{
  border-radius:0;
  border-left:0;
  border-right:0;
}
.live-course-races-modern .live-race-row:first-child{border-top:0;}
.live-course-races-modern .live-race-row:last-child{border-bottom:0;}
@media(max-width:1300px){
  .live-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .racing-results-course-head{grid-template-columns:92px minmax(180px,1fr) minmax(260px,1fr) auto auto;}
}

/* LR-RESULTS-UI-001D: results/live visual continuity and feature-summary refinements */
.quality-summary-pills{
  display:flex!important;
  gap:8px;
  align-items:stretch;
  flex-wrap:nowrap;
  margin-top:6px!important;
}
.quality-summary-pills > span{
  display:grid!important;
  gap:2px;
  min-width:72px;
  padding:7px 9px;
  border:1px solid rgba(148,163,184,.25);
  border-radius:12px;
  background:rgba(255,255,255,.74);
  box-shadow:0 6px 14px rgba(15,23,42,.045);
}
.quality-summary-pills b{
  color:#0f172a;
  font-size:14px;
  line-height:1;
  font-weight:950;
  letter-spacing:-.02em;
}
.quality-summary-pills em{
  color:#64748b;
  font-style:normal;
  font-size:10px;
  line-height:1.1;
  font-weight:850;
  text-transform:none;
  white-space:nowrap;
}
.racing-results-summary-card.quality-card strong,
.live-summary-card.quality-card strong{
  margin-top:6px!important;
  font-size:16px!important;
  line-height:1!important;
  letter-spacing:0!important;
}
.live-summary-card.quality-card .quality-summary-pills,
.racing-results-summary-card.quality-card .quality-summary-pills{
  margin-top:0!important;
}
.racing-results-course-head{
  grid-template-columns:116px minmax(240px,360px) minmax(360px,760px) minmax(120px,auto) auto!important;
}
.racing-results-course-features{
  width:min(680px,100%);
  justify-self:center;
  min-height:48px;
  align-content:center;
}
.racing-results-course-features small{
  max-width:100%;
}
.racing-results-course-art{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}
.racing-results-course-art strong{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  height:100%!important;
  width:100%;
  transform:translateY(1px);
}
.live-course-races-modern[hidden]{
  display:none!important;
}
.live-racing-toolbar.compact{
  grid-template-columns:auto minmax(0,1fr) auto auto!important;
}
.live-racing-toolbar .live-date-strip.compact{
  justify-content:flex-start!important;
}
.racing-results-date-picker{
  left:50%!important;
  right:auto!important;
  transform:translateX(-50%);
}
.racing-results-picker-head{
  grid-template-columns:36px 1fr 36px!important;
}
.racing-results-picker-title{
  min-height:36px;
  border:1px solid rgba(148,163,184,.28);
  border-radius:12px;
  background:#fff;
  color:#0f172a;
  font-weight:950;
  cursor:pointer;
  text-align:center;
}
.racing-results-picker-title:hover{
  border-color:rgba(79,70,229,.38);
  color:#4f46e5;
}
.racing-results-picker-years{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:6px;
  max-height:170px;
  overflow:auto;
  margin:0 0 10px;
  padding:8px;
  border:1px solid rgba(148,163,184,.2);
  border-radius:14px;
  background:#f8fafc;
}
.racing-results-picker-years button{
  border:1px solid rgba(148,163,184,.22);
  border-radius:10px;
  background:#fff;
  min-height:32px;
  color:#334155;
  font-weight:900;
  cursor:pointer;
}
.racing-results-picker-years button.active,
.racing-results-picker-years button:hover{
  color:#fff;
  border-color:transparent;
  background:linear-gradient(135deg,#4f46e5,#7c3aed);
}
.live-race-row .live-race-info small,
.live-time-list .live-race-info small{
  letter-spacing:.01em;
}
@media (max-width: 1200px){
  .racing-results-course-head{grid-template-columns:92px minmax(180px,1fr) minmax(260px,1.4fr) minmax(110px,auto) auto!important;}
  .racing-results-course-features{width:100%;}
}
@media (max-width: 900px){
  .racing-results-course-head{grid-template-columns:82px minmax(0,1fr) auto!important;}
  .racing-results-course-features{grid-column:2 / span 2;width:100%;justify-self:stretch;}
  .quality-summary-pills{flex-wrap:wrap;}
  .racing-results-date-picker{left:16px!important;right:16px!important;transform:none;width:auto!important;}
}

/* LR-RESULTS-UI-001E: final visual polish for Racing Results + Live Racing summary/course cards */
.live-racing-hero{
  margin:18px 0 16px!important;
  padding:26px 30px!important;
  border-radius:28px!important;
}
.live-racing-kicker{
  position:relative;
  z-index:1;
  letter-spacing:.18em!important;
  font-size:11px!important;
  font-weight:900!important;
  opacity:.82!important;
  margin-bottom:8px!important;
}
.live-racing-hero h2{
  margin:0 0 8px!important;
  font-size:clamp(22px,2vw,34px)!important;
  letter-spacing:-.03em!important;
  font-weight:900!important;
}
.live-racing-hero p{
  margin:0!important;
  max-width:850px!important;
}

.racing-results-summary-card,
.live-summary-card{
  text-align:center;
  border-radius:22px!important;
  border:1px solid rgba(148,163,184,.24)!important;
  box-shadow:0 14px 40px rgba(15,23,42,.085)!important;
}
.racing-results-summary-card:nth-child(1){background:linear-gradient(135deg,rgba(255,255,255,.95),rgba(248,250,252,.92))!important;}
.racing-results-summary-card:nth-child(2){background:linear-gradient(135deg,rgba(255,251,235,.64),rgba(255,255,255,.94))!important;}
.racing-results-summary-card:nth-child(3){background:linear-gradient(135deg,rgba(239,246,255,.76),rgba(255,255,255,.94))!important;}
.racing-results-summary-card:nth-child(4){background:linear-gradient(135deg,rgba(254,243,199,.46),rgba(255,255,255,.94))!important;}
.live-summary-card:nth-child(1){background:linear-gradient(135deg,rgba(240,253,250,.98),rgba(255,255,255,.94))!important;}
.live-summary-card:nth-child(2){background:linear-gradient(135deg,rgba(236,253,245,.9),rgba(255,255,255,.94))!important;}
.live-summary-card:nth-child(3){background:linear-gradient(135deg,rgba(239,246,255,.72),rgba(255,255,255,.94))!important;}
.live-summary-card:nth-child(4){background:linear-gradient(135deg,rgba(245,243,255,.72),rgba(255,255,255,.94))!important;}
.racing-results-summary-card > span,
.live-summary-kicker{
  text-align:center!important;
  letter-spacing:.15em!important;
}
.racing-results-summary-card strong,
.live-summary-card strong{
  text-align:center!important;
  justify-content:center!important;
}
.racing-results-summary-card small,
.live-summary-card span{
  text-align:center!important;
  color:#475569!important;
  font-weight:800!important;
}
.live-summary-card strong{
  font-size:30px!important;
  letter-spacing:-.04em!important;
}
.racing-results-summary-card strong{
  font-size:24px!important;
}

.summary-two-line{
  display:grid!important;
  gap:6px;
  justify-items:center;
  align-items:center;
  line-height:1.08;
}
.summary-two-line b{
  display:block;
  color:#0f172a;
  font-size:clamp(18px,1.35vw,26px);
  line-height:1.05;
  font-weight:950;
  letter-spacing:-.035em;
}
.summary-two-line em{
  display:block;
  color:#475569;
  font-style:normal;
  font-size:clamp(13px,.82vw,16px);
  line-height:1.2;
  font-weight:850;
}

.quality-summary-pills{
  justify-content:center!important;
  align-items:center!important;
  gap:10px!important;
  width:100%;
}
.quality-summary-pills > span{
  min-width:88px!important;
  padding:9px 12px!important;
  justify-items:center;
  text-align:center;
}
.quality-summary-pills b{
  font-size:14px!important;
  line-height:1.05!important;
  text-transform:none!important;
  white-space:nowrap;
}
.quality-summary-pills em{
  font-size:11px!important;
  line-height:1.1!important;
}
.racing-results-summary-card.quality-card strong,
.live-summary-card.quality-card strong{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%;
  font-size:16px!important;
}

.racing-results-course-head{
  grid-template-columns:116px minmax(240px,360px) minmax(420px,920px) 1fr auto!important;
}
.racing-results-course-features{
  width:min(820px,100%)!important;
  justify-self:start!important;
  opacity:1!important;
}
.racing-results-course-features.is-empty{
  opacity:1!important;
}
.racing-results-course-features small{
  color:#475569!important;
  font-weight:800!important;
}
.racing-results-course-going{
  justify-self:end!important;
  text-align:right!important;
  min-width:120px;
}
.racing-results-course-plus{
  justify-self:end!important;
}
.racing-results-course-art,
.racing-results-course-art strong{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}
.racing-results-course-art strong{
  transform:translateY(0)!important;
  height:100%!important;
  width:100%!important;
  line-height:1!important;
}

@media (max-width: 1200px){
  .racing-results-course-head{grid-template-columns:92px minmax(180px,1fr) minmax(300px,1.25fr) minmax(110px,auto) auto!important;}
  .racing-results-course-features{width:100%!important;}
}
@media (max-width: 900px){
  .racing-results-course-head{grid-template-columns:82px minmax(0,1fr) auto!important;}
  .racing-results-course-features{grid-column:2 / span 2;width:100%!important;justify-self:stretch!important;}
  .racing-results-course-going{grid-column:2 / span 2;justify-self:end!important;text-align:right!important;}
  .quality-summary-pills{flex-wrap:wrap!important;}
}


/* LR-RESULTS-UI-001F: final banner, summary-card and live-race metadata polish */
.racing-results-hero h2{
  margin:0 0 8px!important;
  font-size:clamp(22px,2vw,34px)!important;
  line-height:1.02!important;
  letter-spacing:-.03em!important;
  font-weight:900!important;
}
.racing-results-summary-card small,
.live-summary-card span{
  font-size:14px!important;
  line-height:1.25!important;
}
.racing-results-summary-card:first-child small{
  font-size:14.5px!important;
  font-weight:850!important;
}
.racing-results-summary-card.quality-card small,
.live-summary-card.quality-card span{
  font-size:14px!important;
  font-weight:850!important;
}
.summary-two-line b,
.summary-two-line em{
  text-transform:none!important;
}
.summary-two-line b{
  font-size:clamp(16px,1.08vw,22px)!important;
  line-height:1.05!important;
  letter-spacing:-.025em!important;
}
.summary-two-line em{
  font-size:clamp(12.5px,.75vw,14.5px)!important;
  line-height:1.2!important;
}
.racing-results-summary-card:nth-child(2) .summary-two-line b,
.racing-results-summary-card:nth-child(4) .summary-two-line b{
  font-size:clamp(16px,1.02vw,21px)!important;
}
.racing-results-summary-card:nth-child(2) .summary-two-line em,
.racing-results-summary-card:nth-child(4) .summary-two-line em{
  font-size:clamp(12px,.72vw,14px)!important;
}
.racing-results-course-features strong,
.racing-results-course-features small{
  text-transform:none!important;
}

/* === HP-EVIDENCE-001C — Live Racing Horse Profile evidence modal === */
.horse-profile-evidence,
.horse-profile-unavailable{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.horse-profile-summary-panel,
.horse-profile-unavailable-card,
.horse-profile-section-card{
  border:1px solid rgba(203,213,225,.9);
  border-radius:18px;
  background:linear-gradient(180deg,#ffffff,#f8fafc);
  box-shadow:0 16px 34px rgba(15,23,42,.08);
}

.horse-profile-summary-panel{
  display:grid;
  grid-template-columns:minmax(260px,1fr) minmax(360px,520px);
  gap:18px;
  align-items:center;
  padding:18px;
}

.horse-profile-summary-panel h3,
.horse-profile-unavailable-card h3,
.horse-profile-section-card h3{
  margin:0;
  color:#0f172a;
  font-weight:950;
  letter-spacing:-.02em;
}

.horse-profile-summary-panel p,
.horse-profile-unavailable-card p{
  margin:6px 0 0;
  color:#64748b;
  font-size:13px;
  font-weight:750;
  line-height:1.45;
}

.horse-profile-kicker{
  color:#0f766e;
  font-size:11px;
  font-weight:950;
  letter-spacing:.11em;
  text-transform:uppercase;
  margin-bottom:4px;
}

.horse-profile-summary-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}

.horse-profile-summary-grid div{
  border:1px solid rgba(226,232,240,.95);
  border-radius:14px;
  background:#fff;
  padding:12px;
  text-align:center;
}

.horse-profile-summary-grid span{
  display:block;
  color:#64748b;
  font-size:10px;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.horse-profile-summary-grid strong{
  display:block;
  color:#0f172a;
  font-size:22px;
  font-weight:950;
  margin-top:4px;
}

.horse-profile-metric-note{
  margin:0;
  border:1px solid rgba(14,116,144,.18);
  border-radius:14px;
  background:#ecfeff;
  color:#155e75;
  padding:11px 13px;
  font-size:12px;
  font-weight:800;
}

.horse-profile-section-stack{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.horse-profile-section-card header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:14px 16px;
  border-bottom:1px solid rgba(226,232,240,.95);
}

.horse-profile-table-wrap{
  overflow:auto;
  border-radius:0 0 18px 18px;
}

.horse-profile-stat-table{
  width:100%;
  min-width:980px;
  border-collapse:separate;
  border-spacing:0;
  font-size:12px;
}

.horse-profile-stat-table th,
.horse-profile-stat-table td{
  padding:10px 9px;
  border-bottom:1px solid rgba(226,232,240,.85);
  text-align:right;
  white-space:nowrap;
  color:#0f172a;
}

.horse-profile-stat-table thead th{
  background:#f8fafc;
  color:#64748b;
  font-size:10px;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.horse-profile-stat-table th:first-child,
.horse-profile-stat-table td:first-child{
  text-align:left;
}

.horse-profile-stat-table tbody th{
  min-width:230px;
  font-weight:950;
  color:#0f172a;
  background:#fff;
}

.horse-profile-stat-table tbody th span,
.horse-profile-stat-table tbody th small{
  display:block;
}

.horse-profile-stat-table tbody th small{
  margin-top:3px;
  color:#64748b;
  font-size:11px;
  font-weight:800;
}

.horse-profile-row-note{
  margin-top:5px;
  color:#92400e;
  font-size:10.5px;
  font-weight:850;
}

.horse-profile-stat-row.ok td{
  background:#ffffff;
}

.horse-profile-stat-row.no-evidence td,
.horse-profile-stat-row.no-evidence th{
  background:#fafafa;
}

.horse-profile-stat-row.no-context td,
.horse-profile-stat-row.no-context th{
  background:#f8fafc;
  color:#64748b;
}

.horse-profile-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:86px;
  border-radius:999px;
  padding:4px 8px;
  font-size:10.5px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.horse-profile-status.ok{
  background:#dcfce7;
  color:#166534;
}

.horse-profile-status.no-evidence{
  background:#f1f5f9;
  color:#475569;
}

.horse-profile-status.no-context{
  background:#fef3c7;
  color:#92400e;
}

.horse-profile-unavailable-card{
  padding:22px;
}

.horse-profile-unavailable-card dl{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin:18px 0 0;
}

.horse-profile-unavailable-card dl div{
  border:1px solid rgba(226,232,240,.95);
  border-radius:14px;
  background:#fff;
  padding:11px;
}

.horse-profile-unavailable-card dt{
  color:#64748b;
  font-size:10px;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.horse-profile-unavailable-card dd{
  margin:4px 0 0;
  color:#0f172a;
  font-weight:900;
}

@media(max-width:900px){
  .horse-profile-summary-panel{
    grid-template-columns:1fr;
  }
  .horse-profile-summary-grid,
  .horse-profile-unavailable-card dl{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:620px){
  .horse-profile-summary-grid,
  .horse-profile-unavailable-card dl{
    grid-template-columns:1fr;
  }
}

/* === HP-EVIDENCE-001C.1 — Horse Profile comparison polish === */
.horse-profile-summary-panel.hp-polished{
  grid-template-columns:minmax(280px,1fr) minmax(420px,620px);
  align-items:stretch;
}
.horse-profile-overall-card{
  border:1px solid rgba(226,232,240,.95);
  border-radius:16px;
  background:#fff;
  padding:12px;
}
.horse-profile-overall-card>span{
  display:block;
  color:#0f766e;
  font-size:10.5px;
  font-weight:950;
  letter-spacing:.09em;
  text-transform:uppercase;
  margin-bottom:8px;
}
.horse-profile-overall-grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:8px;
}
.horse-profile-overall-grid div{
  border:1px solid rgba(226,232,240,.9);
  border-radius:12px;
  background:#f8fafc;
  padding:8px 7px;
  text-align:center;
}
.horse-profile-overall-grid em{
  display:block;
  color:#64748b;
  font-size:9.5px;
  font-style:normal;
  font-weight:950;
  letter-spacing:.07em;
  text-transform:uppercase;
}
.horse-profile-overall-grid strong{
  display:block;
  color:#0f172a;
  font-size:16px;
  font-weight:950;
  margin-top:3px;
}
.horse-profile-metric-note{
  background:#f0f9ff;
  border-color:rgba(2,132,199,.16);
  color:#075985;
  font-size:11.5px;
  line-height:1.35;
  max-width:980px;
}
.horse-profile-section-card.hp-polished-section header{
  background:linear-gradient(180deg,#fff,#f8fafc);
}
.horse-profile-section-card.hp-polished-section footer{
  border-top:1px solid rgba(226,232,240,.85);
  color:#64748b;
  font-size:11px;
  font-weight:800;
  padding:9px 14px;
  background:#fbfdff;
}
.horse-profile-section-empty{
  color:#64748b;
  font-size:12px;
  font-weight:800;
  padding:18px 16px;
}
.horse-profile-stat-table.hp-comparison-table{
  min-width:1120px;
}
.horse-profile-stat-table.hp-comparison-table thead tr:first-child th{
  text-align:center;
  background:#eef2f7;
  color:#334155;
}
.horse-profile-stat-table.hp-comparison-table thead tr:first-child th:first-child{
  text-align:left;
}
.horse-profile-stat-table.hp-comparison-table thead tr:nth-child(2) th:nth-child(n+8),
.horse-profile-stat-table.hp-comparison-table tbody td:nth-child(n+8){
  background:#fbfdff;
}
.horse-profile-stat-table.hp-comparison-table tbody th{
  position:relative;
  min-width:270px;
  padding-right:34px;
}
.horse-profile-stat-table.hp-comparison-table tbody th span{
  text-transform:none;
  letter-spacing:.02em;
}
.horse-profile-stat-table.hp-comparison-table tbody th small{
  text-transform:none;
  letter-spacing:.03em;
}
.horse-profile-help{
  position:absolute;
  top:50%;
  right:9px;
  transform:translateY(-50%);
  width:20px;
  height:20px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.7);
  background:#fff;
  color:#475569;
  font-size:11px;
  font-weight:950;
  line-height:18px;
  padding:0;
  cursor:help;
}
.horse-profile-help:hover{
  border-color:#0f766e;
  color:#0f766e;
  background:#ecfdf5;
}
.horse-profile-stat-row td{
  font-variant-numeric:tabular-nums;
}
.horse-profile-stat-row.no-evidence,
.horse-profile-stat-row.no-context,
.horse-profile-stat-row.no-bsp-evidence{
  display:none;
}
@media(max-width:1100px){
  .horse-profile-summary-panel.hp-polished{
    grid-template-columns:1fr;
  }
}
@media(max-width:760px){
  .horse-profile-overall-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
@media(max-width:520px){
  .horse-profile-overall-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

/* === HP-EVIDENCE-001C.2 — Horse Profile comparison visual polish === */
.horse-profile-summary-panel.hp-polished{
  grid-template-columns:minmax(300px,1fr) minmax(400px,560px);
  gap:14px;
}
.horse-profile-overall-card>span{
  color:#0f766e;
  letter-spacing:.1em;
}
.horse-profile-metric-note{
  max-width:760px!important;
  padding:8px 11px!important;
  font-size:11px!important;
  line-height:1.32!important;
  font-weight:800!important;
}
.horse-profile-controls{
  display:flex;
  justify-content:flex-end;
  margin-top:-6px;
}
.horse-profile-controls button{
  border:1px solid rgba(148,163,184,.38);
  border-radius:999px;
  background:#fff;
  color:#475569;
  padding:6px 11px;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(15,23,42,.06);
}
.horse-profile-controls button:hover{
  border-color:rgba(20,184,166,.45);
  color:#0f766e;
  background:#f0fdfa;
}
.horse-profile-stat-table.hp-comparison-table-v2{
  min-width:1180px;
  font-size:11.5px;
}
.horse-profile-stat-table.hp-comparison-table-v2 th,
.horse-profile-stat-table.hp-comparison-table-v2 td{
  text-align:center;
  vertical-align:middle;
  padding:9px 8px;
}
.horse-profile-stat-table.hp-comparison-table-v2 tbody th{
  text-align:left;
  min-width:240px;
  max-width:300px;
  padding-right:12px;
}
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:first-child th{
  color:#0f172a;
  font-weight:950;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-today,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-zone-today{
  background:#f0fdfa;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-other,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-zone-other{
  background:#f8fafc;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-diff,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-delta{
  background:#fff7ed;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-today{
  border-left:2px solid rgba(20,184,166,.32);
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-diff{
  border-left:2px solid rgba(249,115,22,.3);
  border-right:2px solid rgba(249,115,22,.25);
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-other{
  border-left:2px solid rgba(100,116,139,.24);
}
.horse-profile-stat-table.hp-comparison-table-v2 tbody td:nth-child(2),
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th:nth-child(2){
  border-left:2px solid rgba(20,184,166,.32);
}
.horse-profile-stat-table.hp-comparison-table-v2 tbody td:nth-child(8),
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th:nth-child(8){
  border-left:2px solid rgba(249,115,22,.3);
}
.horse-profile-stat-table.hp-comparison-table-v2 tbody td:nth-child(10),
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th:nth-child(10){
  border-left:2px solid rgba(100,116,139,.24);
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-num{
  font-variant-numeric:tabular-nums;
  color:#0f172a;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-emphasis,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-delta{
  font-weight:950;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-cell-win-pct,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-cell-ae{
  color:#0f172a;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-delta{
  color:#7c2d12;
  white-space:nowrap;
}
.horse-profile-stat-label{
  display:flex!important;
  align-items:center;
  gap:6px;
}
.horse-profile-help.report-help-trigger{
  position:static!important;
  transform:none!important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  width:17px;
  height:17px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.65);
  background:#fff;
  color:#64748b;
  font-size:10px;
  font-weight:950;
  line-height:1;
  cursor:help;
  margin-left:4px;
}
.horse-profile-help.report-help-trigger:hover,
.horse-profile-help.report-help-trigger:focus-visible{
  outline:none;
  border-color:#0f766e;
  color:#0f766e;
  background:#ecfdf5;
}
.hp-ae-delta .horse-profile-help.report-help-trigger{
  margin-left:5px;
  color:#92400e;
  border-color:rgba(245,158,11,.55);
  background:#fffbeb;
}
.horse-profile-stat-row.no-evidence,
.horse-profile-stat-row.no-context,
.horse-profile-stat-row.no-bsp-evidence{
  display:table-row;
}
.horse-profile-stat-row.no-evidence td,
.horse-profile-stat-row.no-context td,
.horse-profile-stat-row.no-bsp-evidence td,
.horse-profile-stat-row.no-evidence th,
.horse-profile-stat-row.no-context th,
.horse-profile-stat-row.no-bsp-evidence th{
  color:#94a3b8;
}
.horse-profile-stat-row.no-evidence[hidden],
.horse-profile-stat-row.no-context[hidden],
.horse-profile-stat-row.no-bsp-evidence[hidden]{
  display:none!important;
}
@media(max-width:1100px){
  .horse-profile-stat-table.hp-comparison-table-v2{min-width:1100px;}
  .horse-profile-summary-panel.hp-polished{grid-template-columns:1fr;}
}

/* === HP-EVIDENCE-001C.3 — Horse Profile premium visual polish === */
.horse-profile-evidence.hp-polished-evidence{
  gap:18px;
}
.horse-profile-summary-panel.hp-polished{
  border:1px solid rgba(203,213,225,.82);
  background:linear-gradient(135deg,#ffffff 0%,#f8fbff 62%,#f1f5ff 100%);
  box-shadow:0 22px 54px rgba(15,23,42,.10);
  padding:16px 18px;
}
.horse-profile-summary-panel.hp-polished h3{
  font-size:20px;
  letter-spacing:-.035em;
}
.horse-profile-summary-panel.hp-polished p{
  color:#475569;
  font-size:12.5px;
  line-height:1.45;
  max-width:820px;
}
.horse-profile-overall-card{
  border:1px solid rgba(203,213,225,.88);
  background:linear-gradient(180deg,#ffffff,#f8fafc);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8),0 12px 26px rgba(15,23,42,.055);
}
.horse-profile-overall-card>span{
  color:#0f172a;
  font-size:10px;
  letter-spacing:.12em;
}
.horse-profile-overall-grid div{
  background:#ffffff;
  border-color:rgba(203,213,225,.82);
  box-shadow:0 6px 14px rgba(15,23,42,.035);
}
.horse-profile-overall-grid em{
  color:#64748b;
}
.horse-profile-overall-grid strong{
  font-size:17px;
}
.horse-profile-metric-note{
  max-width:860px!important;
  padding:8px 12px!important;
  border-radius:12px!important;
  background:#f8fafc!important;
  border-color:rgba(148,163,184,.24)!important;
  color:#334155!important;
  box-shadow:none!important;
}
.horse-profile-section-card.hp-polished-section{
  border:1px solid rgba(203,213,225,.82);
  border-radius:18px;
  background:#ffffff;
  box-shadow:0 16px 38px rgba(15,23,42,.075);
  overflow:hidden;
}
.horse-profile-section-card.hp-polished-section header{
  padding:13px 16px 12px;
  background:linear-gradient(180deg,#ffffff,#f8fafc)!important;
  border-bottom:1px solid rgba(203,213,225,.86);
}
.horse-profile-section-card.hp-polished-section header h3{
  font-size:17px;
  letter-spacing:-.025em;
}
.horse-profile-section-card.hp-polished-section .horse-profile-kicker{
  color:#0f766e;
  font-size:10px;
  letter-spacing:.1em;
}
.horse-profile-stat-table.hp-comparison-table-v2{
  min-width:1240px;
  border-collapse:separate;
  border-spacing:0;
  font-size:11.5px;
}
.horse-profile-stat-table.hp-comparison-table-v2 th,
.horse-profile-stat-table.hp-comparison-table-v2 td{
  border-bottom:1px solid rgba(226,232,240,.82);
  padding:8px 8px;
}
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:first-child th{
  padding:10px 8px;
  font-size:10px;
  letter-spacing:.1em;
}
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th{
  font-size:9.3px;
  letter-spacing:.09em;
  padding:7px 7px;
}
.horse-profile-stat-table.hp-comparison-table-v2 tbody th{
  background:#fff;
  min-width:250px;
  max-width:310px;
  padding:9px 12px;
}
.horse-profile-stat-table.hp-comparison-table-v2 tbody tr:hover th,
.horse-profile-stat-table.hp-comparison-table-v2 tbody tr:hover td{
  background-color:#f8fbff!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-today,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-zone-today{
  background:#eefcf8!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-other,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-zone-other{
  background:#f7f9fc!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-diff,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-delta{
  background:#f8fafc!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-today{
  border-left:3px solid rgba(20,184,166,.42)!important;
  border-right:1px solid rgba(20,184,166,.12)!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-diff{
  border-left:3px solid rgba(99,102,241,.28)!important;
  border-right:3px solid rgba(99,102,241,.22)!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-other{
  border-left:3px solid rgba(100,116,139,.25)!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 tbody td:nth-child(2),
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th:nth-child(2){
  border-left:3px solid rgba(20,184,166,.42)!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 tbody td:nth-child(8),
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th:nth-child(8){
  border-left:3px solid rgba(99,102,241,.28)!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 tbody td:nth-child(10),
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th:nth-child(10){
  border-left:3px solid rgba(100,116,139,.25)!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-emphasis{
  font-weight:950;
  color:#0f172a;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-delta{
  color:#334155!important;
  font-weight:950;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-win-delta{
  min-width:62px;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-ae-delta{
  min-width:58px;
}
.horse-profile-stat-label{
  font-size:11.5px;
  color:#0f172a;
  line-height:1.18;
}
.horse-profile-stat-table.hp-comparison-table-v2 tbody th small{
  color:#64748b;
  font-size:10.5px;
  line-height:1.2;
}
.horse-profile-help.report-help-trigger{
  width:16px!important;
  height:16px!important;
  flex:0 0 16px!important;
  font-size:9.5px!important;
  border-color:rgba(148,163,184,.62)!important;
  background:#f8fafc!important;
  color:#64748b!important;
}
.horse-profile-help.report-help-trigger:hover,
.horse-profile-help.report-help-trigger:focus-visible{
  border-color:#0f766e!important;
  background:#ecfdf5!important;
  color:#0f766e!important;
}
.hp-low-sample-warning.report-help-trigger{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  margin-left:5px;
  width:18px!important;
  height:18px!important;
  flex:0 0 18px!important;
  border-radius:999px;
  border:1px solid rgba(245,158,11,.55)!important;
  background:#fffbeb!important;
  color:#92400e!important;
  font-size:10px!important;
  line-height:1!important;
  cursor:help;
  vertical-align:middle;
}
.horse-profile-controls{
  margin-top:-4px;
}
.horse-profile-controls button{
  background:#ffffff;
  border-color:rgba(148,163,184,.34);
  color:#334155;
  box-shadow:0 8px 18px rgba(15,23,42,.055);
}
.horse-profile-controls button:hover{
  border-color:rgba(20,184,166,.5);
  box-shadow:0 10px 24px rgba(15,23,42,.08);
}
.horse-profile-section-card.hp-polished-section footer{
  color:#64748b;
  background:#f8fafc;
  font-size:11px;
}
@media(max-width:1100px){
  .horse-profile-stat-table.hp-comparison-table-v2{min-width:1180px;}
}

/* === HP-EVIDENCE-001C.4 — Horse Profile premium dashboard polish === */
.horse-drilldown-actions .hp-hidden-top-toggle{
  border-color:rgba(99,102,241,.22)!important;
  background:linear-gradient(180deg,#ffffff,#f8fafc)!important;
  color:#334155!important;
  box-shadow:0 8px 18px rgba(15,23,42,.055)!important;
}
.horse-drilldown-actions .hp-hidden-top-toggle:hover{
  border-color:rgba(99,102,241,.42)!important;
  background:#eef2ff!important;
}
.horse-profile-evidence.hp-premium-evidence{gap:20px;}
.horse-profile-summary-panel.hp-polished.hp-premium-summary{
  display:grid;
  grid-template-columns:minmax(0,1.4fr) minmax(420px,.86fr);
  gap:18px;
  align-items:stretch;
  border:1px solid rgba(191,219,254,.75);
  border-radius:22px;
  background:
    radial-gradient(circle at 2% 0%,rgba(20,184,166,.11),transparent 26%),
    radial-gradient(circle at 100% 0%,rgba(99,102,241,.11),transparent 28%),
    linear-gradient(135deg,#ffffff 0%,#f8fbff 58%,#f3f7ff 100%);
  box-shadow:0 28px 70px rgba(15,23,42,.12);
  padding:18px 20px;
}
.horse-profile-summary-main{display:flex;flex-direction:column;gap:8px;justify-content:center;min-width:0;}
.horse-profile-summary-panel.hp-premium-summary h3{font-size:23px;line-height:1.05;margin:0;}
.horse-profile-summary-panel.hp-premium-summary p{margin:0;max-width:880px;}
.horse-profile-summary-note{
  width:fit-content;
  max-width:840px!important;
  margin-top:6px!important;
  padding:7px 10px;
  border:1px solid rgba(14,165,233,.18);
  border-radius:999px;
  background:rgba(240,249,255,.74);
  color:#28506b!important;
  font-size:11.5px!important;
  line-height:1.35!important;
}
.hp-career-record-card{
  position:relative;
  overflow:hidden;
  border:1px solid rgba(15,118,110,.22)!important;
  border-radius:20px!important;
  background:
    linear-gradient(135deg,rgba(15,118,110,.09),rgba(255,255,255,.92) 42%,rgba(99,102,241,.08))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.75),0 18px 36px rgba(15,23,42,.09)!important;
  padding:14px!important;
}
.hp-career-record-card::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:5px;
  background:linear-gradient(180deg,#14b8a6,#6366f1);
  opacity:.8;
}
.hp-career-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0 0 10px 2px;}
.hp-career-head span{font-size:10px;font-weight:950;text-transform:uppercase;letter-spacing:.14em;color:#0f172a;}
.hp-career-head em{font-size:10px;font-style:normal;font-weight:800;color:#64748b;text-transform:uppercase;letter-spacing:.09em;}
.hp-career-record-card>span{display:none!important;}
.hp-career-record-card .horse-profile-overall-grid{grid-template-columns:1.2fr repeat(5,1fr);gap:8px;}
.hp-career-record-card .horse-profile-overall-grid div{
  border:1px solid rgba(203,213,225,.72)!important;
  border-radius:14px!important;
  background:rgba(255,255,255,.82)!important;
  box-shadow:0 10px 22px rgba(15,23,42,.045)!important;
  padding:9px 10px!important;
}
.hp-career-record-card .horse-profile-overall-grid .hp-career-primary,
.hp-career-record-card .horse-profile-overall-grid .hp-career-ae{
  background:linear-gradient(180deg,#ffffff,#f0fdfa)!important;
  border-color:rgba(20,184,166,.26)!important;
}
.hp-career-record-card .horse-profile-overall-grid em{font-size:9px!important;letter-spacing:.11em!important;}
.hp-career-record-card .horse-profile-overall-grid strong{font-size:18px!important;letter-spacing:-.02em;}
.horse-profile-highlights{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:14px;
  align-items:stretch;
}
.hp-highlight-card{
  border:1px solid rgba(203,213,225,.76);
  border-radius:18px;
  background:linear-gradient(180deg,#ffffff,#f8fafc);
  box-shadow:0 16px 34px rgba(15,23,42,.07);
  padding:13px 14px;
  min-width:0;
}
.hp-highlight-card h4{margin:2px 0 10px;font-size:14px;letter-spacing:-.02em;color:#0f172a;}
.hp-highlight-card ul{display:grid;gap:8px;margin:0;padding:0;list-style:none;}
.hp-highlight-card li{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 10px;align-items:center;padding:8px 9px;border-radius:12px;background:rgba(248,250,252,.92);border:1px solid rgba(226,232,240,.82);}
.hp-highlight-card li strong{font-size:11px;color:#0f172a;line-height:1.15;}
.hp-highlight-card li span{grid-column:1/2;font-size:10.5px;color:#64748b;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.hp-highlight-card li em{grid-row:1/3;grid-column:2/3;font-style:normal;font-weight:950;font-size:11px;color:#334155;white-space:nowrap;}
.hp-highlight-card p{margin:0;color:#64748b;font-size:11.5px;line-height:1.4;}
.hp-highlight-lifts{border-top:3px solid rgba(20,184,166,.45);}
.hp-highlight-concerns{border-top:3px solid rgba(99,102,241,.35);}
.hp-highlight-samples{border-top:3px solid rgba(245,158,11,.45);}
.horse-profile-section-card.hp-polished-section{
  border-radius:20px!important;
  border:1px solid rgba(203,213,225,.74)!important;
  box-shadow:0 18px 42px rgba(15,23,42,.075)!important;
}
.horse-profile-section-card.hp-polished-section header{
  background:linear-gradient(135deg,#0f766e 0%,#2563eb 100%)!important;
  border-bottom:0!important;
  color:#ffffff;
  padding:14px 18px!important;
}
.horse-profile-section-card.hp-polished-section header h3{color:#ffffff!important;font-size:17px!important;}
.horse-profile-section-card.hp-polished-section .horse-profile-kicker{color:rgba(255,255,255,.78)!important;}
.horse-profile-table-wrap{background:#f8fafc;padding:0;}
.horse-profile-stat-table.hp-comparison-table-v2{
  border-collapse:separate!important;
  border-spacing:0!important;
  background:#ffffff;
  font-size:12px!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 th,
.horse-profile-stat-table.hp-comparison-table-v2 td{
  border-left:0!important;
  border-right:0!important;
  border-bottom:1px solid rgba(226,232,240,.72)!important;
  padding:10px 9px!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:first-child th{
  padding:12px 9px!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th{
  border-left:0!important;
  border-right:0!important;
  padding:8px 7px!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 tbody th{
  min-width:270px!important;
  max-width:330px!important;
  padding:11px 14px!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-today,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-zone-today{
  background:#edfdf8!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-diff,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-delta{
  background:#eff6ff!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-other,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-zone-other{
  background:#f8fafc!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-today{border-top-left-radius:12px;}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-other{border-top-right-radius:12px;}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-today,
.horse-profile-stat-table.hp-comparison-table-v2 tbody td:nth-child(2),
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th:nth-child(2){
  border-left:1px solid rgba(20,184,166,.30)!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-diff,
.horse-profile-stat-table.hp-comparison-table-v2 tbody td:nth-child(8),
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th:nth-child(8){
  border-left:1px solid rgba(37,99,235,.24)!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-other,
.horse-profile-stat-table.hp-comparison-table-v2 tbody td:nth-child(10),
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th:nth-child(10){
  border-left:1px solid rgba(100,116,139,.18)!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-diff{border-right:1px solid rgba(37,99,235,.16)!important;}
.horse-profile-stat-table.hp-comparison-table-v2 tbody tr:hover th,
.horse-profile-stat-table.hp-comparison-table-v2 tbody tr:hover td{
  background:#f0f7ff!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 tbody tr:hover .hp-zone-today{background:#e5fbf5!important;}
.horse-profile-stat-table.hp-comparison-table-v2 tbody tr:hover .hp-delta{background:#e6f0ff!important;}
.horse-profile-stat-label{
  display:inline-flex!important;
  align-items:center;
  gap:6px;
  padding:2px 0;
  font-size:12px!important;
  font-weight:950!important;
  letter-spacing:-.01em;
}
.horse-profile-stat-label::before{
  content:"";
  width:4px;
  height:18px;
  border-radius:999px;
  background:linear-gradient(180deg,#14b8a6,#6366f1);
  opacity:.72;
}
.horse-profile-stat-table.hp-comparison-table-v2 tbody th small{
  display:inline-flex;
  width:fit-content;
  max-width:100%;
  margin-top:4px;
  padding:3px 7px;
  border-radius:999px;
  background:#f1f5f9;
  color:#475569!important;
  font-weight:800;
  letter-spacing:.01em;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-emphasis,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-cell-win-pct,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-cell-ae{
  font-weight:950!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-delta{
  color:#1e3a8a!important;
  font-weight:950!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-ae-delta{
  position:relative;
  padding-left:18px!important;
}
.hp-low-sample-warning.report-help-trigger{
  position:absolute!important;
  left:-10px;
  top:50%;
  transform:translateY(-50%);
  margin-left:0!important;
  width:16px!important;
  height:16px!important;
  font-size:9px!important;
  background:#fff7ed!important;
  border-color:rgba(251,146,60,.46)!important;
  color:#9a3412!important;
  box-shadow:0 4px 10px rgba(251,146,60,.16);
}
.horse-profile-section-card.hp-polished-section footer{
  padding:9px 14px;
  background:#f8fafc!important;
  border-top:1px solid rgba(226,232,240,.8);
}
@media(max-width:1200px){
  .horse-profile-summary-panel.hp-polished.hp-premium-summary{grid-template-columns:1fr;}
  .horse-profile-highlights{grid-template-columns:1fr;}
  .hp-career-record-card .horse-profile-overall-grid{grid-template-columns:repeat(3,1fr);}
}

/* HP-EVIDENCE-001C.5 — Horse Profile premium refinement pass */
.horse-profile-summary-panel.hp-polished.hp-premium-summary{
  grid-template-columns:minmax(0,1.48fr) minmax(380px,.78fr);
  gap:16px;
  border-color:rgba(203,213,225,.68)!important;
  border-radius:24px;
  box-shadow:0 22px 54px rgba(15,23,42,.10);
  background:
    radial-gradient(circle at 0% 0%,rgba(20,184,166,.10),transparent 28%),
    radial-gradient(circle at 100% 0%,rgba(37,99,235,.09),transparent 30%),
    linear-gradient(135deg,#ffffff 0%,#fbfdff 62%,#f5f8ff 100%);
}
.horse-profile-summary-note{
  display:inline-flex;
  align-items:center;
  max-width:none!important;
  width:fit-content;
  padding:6px 10px!important;
  border-radius:12px!important;
  white-space:normal;
  line-height:1.22!important;
  background:rgba(240,249,255,.58)!important;
  border-color:rgba(14,165,233,.14)!important;
}
.hp-career-record-card{
  padding:16px!important;
  border-color:rgba(20,184,166,.20)!important;
  background:
    linear-gradient(135deg,rgba(240,253,250,.96),rgba(255,255,255,.94) 48%,rgba(238,242,255,.74))!important;
}
.hp-career-record-card::before{width:4px;opacity:.68;}
.hp-career-record-inner{display:grid;grid-template-columns:minmax(96px,.55fr) minmax(0,1.45fr);gap:12px;align-items:stretch;}
.hp-career-lead{
  display:flex;
  flex-direction:column;
  justify-content:center;
  border-radius:18px;
  padding:12px 14px;
  background:linear-gradient(180deg,#ffffff,#ecfdf5);
  border:1px solid rgba(20,184,166,.22);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.75),0 10px 20px rgba(15,23,42,.05);
}
.hp-career-lead em{font-style:normal;text-transform:uppercase;font-size:9px;font-weight:950;letter-spacing:.12em;color:#0f766e;}
.hp-career-lead strong{font-size:34px;line-height:.95;letter-spacing:-.06em;color:#0f172a;margin-top:6px;}
.hp-career-record-card .horse-profile-overall-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:7px!important;}
.hp-career-record-card .horse-profile-overall-grid div{
  padding:10px 8px!important;
  border-radius:13px!important;
  box-shadow:none!important;
  background:rgba(255,255,255,.72)!important;
}
.hp-career-record-card .horse-profile-overall-grid strong{font-size:16px!important;}
.horse-profile-highlights.hp-highlight-dashboard{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(260px,.72fr);
  gap:14px;
  align-items:stretch;
}
.hp-highlight-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px;min-width:0;}
.hp-highlight-card{
  border-radius:18px;
  padding:12px 13px;
  box-shadow:0 14px 30px rgba(15,23,42,.065);
  background:linear-gradient(180deg,#ffffff,#fbfdff);
}
.hp-highlight-card h4{font-size:13.5px;margin:1px 0 9px;}
.hp-highlight-card .horse-profile-kicker{font-size:9px;letter-spacing:.14em;}
.hp-highlight-card li{padding:7px 8px;border-radius:11px;grid-template-columns:minmax(0,1fr) auto;background:rgba(248,250,252,.86);}
.hp-highlight-card li strong{font-size:10.8px;}
.hp-highlight-card li span{font-size:10px;}
.hp-highlight-card li em{font-size:10.8px;color:#172554;}
.hp-highlight-ae-positive,.hp-highlight-lifts{border-top:2px solid rgba(20,184,166,.42);}
.hp-highlight-ae-negative,.hp-highlight-concerns{border-top:2px solid rgba(99,102,241,.34);}
.hp-highlight-samples{border-top:2px solid rgba(245,158,11,.42);}
.hp-low-sample-lists{display:grid;gap:9px;}
.hp-low-sample-lists>div>span{display:block;margin:0 0 5px;font-size:9px;font-weight:950;letter-spacing:.12em;text-transform:uppercase;color:#64748b;}
.hp-low-sample-lists ul{gap:5px;}
.hp-low-sample-lists .hp-highlight-card li,.hp-low-sample-lists li{padding:6px 7px;}
.horse-profile-section-card.hp-polished-section{
  border-radius:20px!important;
  overflow:hidden;
  border:1px solid rgba(203,213,225,.68)!important;
  box-shadow:0 14px 34px rgba(15,23,42,.065)!important;
}
.horse-profile-section-card.hp-polished-section header{
  position:relative;
  background:linear-gradient(180deg,#ffffff,#f8fbff)!important;
  color:#0f172a!important;
  border-bottom:1px solid rgba(226,232,240,.84)!important;
  padding:13px 17px 12px!important;
}
.horse-profile-section-card.hp-polished-section header::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:4px;
  background:linear-gradient(90deg,#0f766e,#2563eb);
  opacity:.92;
}
.horse-profile-section-card.hp-polished-section header h3{color:#0f172a!important;font-size:16px!important;letter-spacing:-.02em;}
.horse-profile-section-card.hp-polished-section .horse-profile-kicker{color:#0f766e!important;font-size:9px!important;letter-spacing:.14em!important;}
.horse-profile-table-wrap{background:#ffffff!important;}
.horse-profile-stat-table.hp-comparison-table-v2{border-collapse:separate!important;border-spacing:0!important;}
.horse-profile-stat-table.hp-comparison-table-v2 th,
.horse-profile-stat-table.hp-comparison-table-v2 td{
  border-left:0!important;
  border-right:0!important;
  border-bottom:1px solid rgba(226,232,240,.58)!important;
  padding:10px 9px!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:first-child th{
  padding:11px 9px!important;
  border-bottom:0!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th{
  border-top:1px solid rgba(226,232,240,.58)!important;
  border-left:0!important;
  border-right:0!important;
  padding:7px 6px!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 tbody th{
  min-width:255px!important;
  padding:11px 13px!important;
  background:#ffffff!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-today,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-zone-today{background:#eefbf7!important;}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-diff,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-delta{background:#edf5ff!important;}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-other,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-zone-other{background:#f8fafc!important;}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-today{border-top-left-radius:10px;}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-other{border-top-right-radius:10px;}
.horse-profile-stat-table.hp-comparison-table-v2 tbody td:nth-child(2),
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th:nth-child(2){border-left:1px solid rgba(20,184,166,.18)!important;}
.horse-profile-stat-table.hp-comparison-table-v2 tbody td:nth-child(8),
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th:nth-child(8){border-left:1px solid rgba(37,99,235,.16)!important;}
.horse-profile-stat-table.hp-comparison-table-v2 tbody td:nth-child(10),
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th:nth-child(10){border-left:0!important;}
.horse-profile-stat-table.hp-comparison-table-v2 tbody td:nth-child(11),
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th:nth-child(11){border-left:1px solid rgba(100,116,139,.14)!important;}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-diff{border-right:0!important;}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-other{border-left:1px solid rgba(100,116,139,.14)!important;}
.horse-profile-stat-table.hp-comparison-table-v2 tbody tr:hover th,
.horse-profile-stat-table.hp-comparison-table-v2 tbody tr:hover td{background:#f4f9ff!important;}
.horse-profile-stat-table.hp-comparison-table-v2 tbody tr:hover .hp-zone-today{background:#e6f8f3!important;}
.horse-profile-stat-table.hp-comparison-table-v2 tbody tr:hover .hp-delta{background:#e4efff!important;}
.horse-profile-stat-table.hp-comparison-table-v2 tbody tr:hover .hp-zone-other{background:#f1f5f9!important;}
.horse-profile-stat-label{display:flex!important;align-items:center;gap:6px;font-size:12.5px!important;line-height:1.05;}
.horse-profile-stat-label::before{width:3px;height:17px;opacity:.55;}
.horse-profile-stat-table.hp-comparison-table-v2 tbody th small{display:block;width:max-content;max-width:100%;margin-top:5px;}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-delta{color:#1e3a8a!important;}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-win-delta{color:#1f3f6d!important;}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-ae-delta{position:static;padding-left:9px!important;color:#1f3f6d!important;}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-sample-cell{width:24px!important;min-width:24px!important;max-width:24px!important;padding-left:2px!important;padding-right:2px!important;text-align:center!important;}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-sample-head{width:24px!important;min-width:24px!important;max-width:24px!important;padding-left:2px!important;padding-right:2px!important;}
.hp-low-sample-warning.report-help-trigger{
  position:static!important;
  transform:none!important;
  display:inline-grid!important;
  place-items:center;
  width:16px!important;
  height:16px!important;
  margin:0 auto!important;
  background:rgba(255,247,237,.56)!important;
  border-color:rgba(251,146,60,.42)!important;
  color:#c2410c!important;
  box-shadow:none!important;
}
@media(max-width:1400px){
  .horse-profile-highlights.hp-highlight-dashboard{grid-template-columns:1fr;}
  .hp-highlight-pair{grid-template-columns:1fr 1fr;}
}
@media(max-width:900px){
  .hp-highlight-pair{grid-template-columns:1fr;}
  .hp-career-record-inner{grid-template-columns:1fr;}
}

/* === HP-EVIDENCE-001C.6 — final visual logic pass === */
.horse-profile-highlights.hp-highlight-dashboard-c6{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:18px!important;
  align-items:stretch!important;
}
.hp-highlight-dashboard-c6 .hp-highlight-group{
  position:relative;
  display:grid;
  grid-template-rows:auto 1fr;
  gap:8px;
  min-width:0;
}
.hp-highlight-dashboard-c6 .hp-highlight-delta-group{
  padding-left:18px;
  border-left:1px solid rgba(100,116,139,.22);
}
.hp-highlight-group-title{
  font-size:9px;
  font-weight:950;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:#64748b;
  padding-left:3px;
}
.hp-highlight-dashboard-c6 .hp-highlight-pair{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:12px!important;
}
.hp-highlight-dashboard-c6 .hp-highlight-card{
  min-height:142px;
  border-radius:18px!important;
  border:1px solid rgba(226,232,240,.88)!important;
  box-shadow:0 16px 34px rgba(15,23,42,.055)!important;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%)!important;
  padding:13px 14px!important;
}
.hp-highlight-dashboard-c6 .hp-highlight-ae-positive,
.hp-highlight-dashboard-c6 .hp-highlight-lifts{border-top:2px solid rgba(20,184,166,.38)!important;}
.hp-highlight-dashboard-c6 .hp-highlight-ae-negative,
.hp-highlight-dashboard-c6 .hp-highlight-concerns{border-top:2px solid rgba(37,99,235,.30)!important;}
.hp-highlight-dashboard-c6 .hp-highlight-card h4{
  font-size:13.5px!important;
  line-height:1.1;
  margin:1px 0 9px!important;
}
.hp-highlight-dashboard-c6 .hp-highlight-card li{
  grid-template-columns:minmax(0,1fr) auto!important;
  border:1px solid rgba(226,232,240,.66)!important;
  background:rgba(248,250,252,.72)!important;
  padding:7px 8px!important;
}
.hp-highlight-dashboard-c6 .hp-highlight-card li em{
  color:#0f172a!important;
  font-size:10.5px!important;
  letter-spacing:-.01em;
}

.hp-premium-summary{
  align-items:stretch!important;
}
.hp-career-record-card{
  min-width:365px!important;
  background:linear-gradient(135deg,#ffffff 0%,#f8fbff 54%,#eef7ff 100%)!important;
  border:1px solid rgba(191,219,254,.88)!important;
  box-shadow:0 18px 38px rgba(37,99,235,.075)!important;
}
.hp-career-record-inner{
  grid-template-columns:minmax(112px,.62fr) minmax(0,1.38fr)!important;
}
.hp-career-lead{
  text-align:center!important;
  justify-content:center!important;
  background:linear-gradient(180deg,rgba(236,253,245,.92),rgba(240,253,250,.74))!important;
  border-color:rgba(45,212,191,.32)!important;
}
.hp-career-record-card .horse-profile-overall-grid div{
  box-shadow:none!important;
  border-color:rgba(226,232,240,.86)!important;
}
.hp-career-record-card .horse-profile-overall-grid em{white-space:nowrap!important;}
.horse-profile-summary-note{
  max-width:760px!important;
  display:inline-flex!important;
  align-items:center;
  min-height:0!important;
  padding:6px 10px!important;
  border-radius:10px!important;
  line-height:1.25!important;
  font-size:10.5px!important;
}

.horse-profile-section-card.hp-polished-section{
  border-radius:18px!important;
  box-shadow:0 14px 32px rgba(15,23,42,.052)!important;
}
.horse-profile-section-card.hp-polished-section header{
  padding:11px 15px 10px!important;
  background:linear-gradient(180deg,#ffffff,#fbfdff)!important;
  border-bottom:1px solid rgba(226,232,240,.78)!important;
}
.horse-profile-section-card.hp-polished-section header::before{
  height:3px!important;
  opacity:.72!important;
  background:linear-gradient(90deg,#0f766e,#3b82f6)!important;
}
.horse-profile-section-card.hp-polished-section header h3{
  font-size:15.5px!important;
  color:#0f172a!important;
}
.horse-profile-section-card.hp-polished-section .horse-profile-kicker{
  color:#0f766e!important;
}

.horse-profile-stat-table.hp-comparison-table-v2{
  border-collapse:separate!important;
  border-spacing:0!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 th,
.horse-profile-stat-table.hp-comparison-table-v2 td{
  border-left:0!important;
  border-right:0!important;
  border-bottom:1px solid rgba(226,232,240,.50)!important;
  padding:10px 8px!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:first-child th{
  background:#f8fafc!important;
  border-bottom:0!important;
  padding:10px 8px!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th{
  border-top:1px solid rgba(226,232,240,.50)!important;
  border-left:0!important;
  border-right:0!important;
  padding:6px 6px!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 tbody th{
  background:#ffffff!important;
  min-width:250px!important;
  padding:12px 14px!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-today,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-zone-today{background:#eefbf7!important;}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-diff,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-delta{background:#edf5ff!important;}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-other,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-zone-other{background:#f8fafc!important;}
.horse-profile-stat-table.hp-comparison-table-v2 tbody td:nth-child(2),
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th:nth-child(2){border-left:1px solid rgba(20,184,166,.14)!important;}
.horse-profile-stat-table.hp-comparison-table-v2 tbody td:nth-child(8),
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th:nth-child(8){border-left:1px solid rgba(37,99,235,.14)!important;}
.horse-profile-stat-table.hp-comparison-table-v2 tbody td:nth-child(9),
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th:nth-child(9){border-left:1px solid rgba(100,116,139,.13)!important;}
.horse-profile-stat-table.hp-comparison-table-v2 tbody td:nth-child(10),
.horse-profile-stat-table.hp-comparison-table-v2 tbody td:nth-child(11),
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th:nth-child(10),
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th:nth-child(11){border-left:0!important;}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-other{border-left:1px solid rgba(100,116,139,.13)!important;}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-diff{border-right:0!important;}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-delta-single{
  min-width:92px!important;
  color:#172554!important;
  font-weight:950!important;
  text-align:center!important;
}
.hp-small-sample-label{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  min-width:76px;
  font-size:9px;
  font-weight:950;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:#92400e;
}
.hp-small-sample-label em{font-style:normal;}
.hp-low-sample-warning.report-help-trigger{
  width:14px!important;
  height:14px!important;
  min-width:14px!important;
  margin:0!important;
  background:rgba(251,146,60,.10)!important;
  border-color:rgba(251,146,60,.30)!important;
  color:#c2410c!important;
  font-size:8px!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 tbody tr:hover th,
.horse-profile-stat-table.hp-comparison-table-v2 tbody tr:hover td{background:#f3f8ff!important;}
.horse-profile-stat-table.hp-comparison-table-v2 tbody tr:hover .hp-zone-today{background:#e5f8f2!important;}
.horse-profile-stat-table.hp-comparison-table-v2 tbody tr:hover .hp-delta{background:#e4efff!important;}
.horse-profile-stat-table.hp-comparison-table-v2 tbody tr:hover .hp-zone-other{background:#f1f5f9!important;}
.horse-profile-stat-label{
  align-items:center!important;
  gap:6px!important;
  font-size:12.2px!important;
  letter-spacing:.01em;
}
.horse-profile-stat-label::before{
  width:3px!important;
  height:18px!important;
  opacity:.58!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 tbody th small{
  display:block!important;
  width:max-content!important;
  max-width:100%!important;
  margin-top:5px!important;
  padding:3px 8px!important;
  border-radius:999px!important;
  background:#f1f5f9!important;
  color:#475569!important;
  font-size:10px!important;
  line-height:1.1!important;
}

@media(max-width:1500px){
  .horse-profile-highlights.hp-highlight-dashboard-c6{grid-template-columns:1fr!important;}
  .hp-highlight-dashboard-c6 .hp-highlight-delta-group{padding-left:0;border-left:0;border-top:1px solid rgba(100,116,139,.18);padding-top:12px;}
}
@media(max-width:920px){
  .hp-highlight-dashboard-c6 .hp-highlight-pair{grid-template-columns:1fr!important;}
  .hp-career-record-inner{grid-template-columns:1fr!important;}
}

/* === HP-EVIDENCE-001C.7 — final Horse Profile visual cleanup === */
.horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-modal-header{
  background:#ffffff!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  z-index:120!important;
  box-shadow:0 10px 26px rgba(15,23,42,.08)!important;
}
.horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-body,
.horse-drilldown-modal-shell.is-horse-profile .horse-profile-evidence{
  position:relative;
  z-index:1;
}
.horse-drilldown-modal-shell.is-horse-profile .report-help-trigger,
.horse-drilldown-modal-shell.is-horse-profile .hp-low-sample-warning{
  z-index:1!important;
}

.hp-career-record-card{
  min-width:430px!important;
  padding:16px 18px!important;
}
.hp-career-record-inner.hp-career-record-inner-v2{
  display:grid!important;
  grid-template-columns:minmax(140px,.76fr) minmax(220px,1.16fr) minmax(118px,.62fr)!important;
  gap:10px!important;
  align-items:stretch!important;
}
.hp-career-record-card .hp-career-lead{
  min-height:92px;
  align-items:center!important;
  text-align:center!important;
}
.hp-career-record-card .hp-career-runs strong,
.hp-career-record-card .hp-career-ae-lead strong{
  font-size:35px!important;
  line-height:.95!important;
}
.hp-career-record-card .hp-career-ae-lead{
  background:linear-gradient(180deg,#ffffff,#eef6ff)!important;
  border-color:rgba(99,102,241,.24)!important;
}
.hp-career-record-card .hp-career-ae-lead em{color:#334155!important;}
.hp-career-record-card .hp-career-mid-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(102px,1fr))!important;
  grid-template-rows:repeat(2,1fr)!important;
  gap:8px!important;
}
.hp-career-record-card .hp-career-mid-grid div{
  display:flex!important;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  min-height:42px;
  padding:8px 10px!important;
  border-radius:14px!important;
}
.hp-career-record-card .hp-career-mid-grid em{
  font-size:9px!important;
  line-height:1!important;
  white-space:nowrap!important;
}
.hp-career-record-card .hp-career-mid-grid strong{
  font-size:18px!important;
  line-height:1.05!important;
}

.horse-profile-summary-note{
  max-width:100%!important;
  white-space:nowrap!important;
  align-self:flex-start!important;
}

.hp-highlight-dashboard-c6 .hp-highlight-card li em{
  font-variant-numeric:tabular-nums;
}
.hp-highlight-dashboard-c6 .hp-highlight-delta-group{
  border-left:1px solid rgba(15,23,42,.12)!important;
}
.hp-highlight-dashboard-c6 .hp-highlight-group-title{
  color:#475569!important;
}

.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th{
  border-left:0!important;
  border-right:0!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 th,
.horse-profile-stat-table.hp-comparison-table-v2 td{
  border-left:0!important;
  border-right:0!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 tbody td:nth-child(2),
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th:nth-child(2){
  border-left:1px solid rgba(20,184,166,.12)!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 tbody td:nth-child(8),
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th:nth-child(8){
  border-left:1px solid rgba(37,99,235,.12)!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 tbody td:nth-child(9),
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th:nth-child(9){
  border-left:1px solid rgba(100,116,139,.11)!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-today,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-diff,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-other{
  border-radius:0!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-delta-single{
  min-width:80px!important;
}
.hp-small-sample-label{
  gap:5px!important;
  min-width:auto!important;
  color:#9a3412!important;
  letter-spacing:.05em!important;
}
.hp-small-sample-label em{
  font-size:9px!important;
  font-weight:950!important;
}
.hp-low-sample-warning.report-help-trigger{
  background:rgba(251,146,60,.09)!important;
  border-color:rgba(251,146,60,.26)!important;
  color:#c2410c!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 tbody tr:hover th,
.horse-profile-stat-table.hp-comparison-table-v2 tbody tr:hover td{
  background:#f3f8ff!important;
}

@media(max-width:1200px){
  .hp-career-record-inner.hp-career-record-inner-v2{
    grid-template-columns:1fr!important;
  }
  .hp-career-record-card{min-width:0!important;}
}

/* === HP-EVIDENCE-001D — full-screen evidence workspace and BSP expected-wins display === */
.horse-drilldown-modal-shell.is-horse-profile.fullscreen{
  padding:0!important;
}
.horse-drilldown-modal-shell.is-horse-profile.fullscreen .horse-drilldown-modal{
  width:100vw!important;
  height:100vh!important;
  max-width:none!important;
  max-height:none!important;
  border-radius:0!important;
  border:0!important;
  box-shadow:none!important;
}
.horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-content{
  background:
    radial-gradient(circle at 0% 0%,rgba(20,184,166,.055),transparent 24%),
    radial-gradient(circle at 100% 0%,rgba(79,70,229,.055),transparent 25%),
    linear-gradient(180deg,#ffffff 0%,#f7f9fd 100%)!important;
}
.horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-modal-header{
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  padding:14px 24px!important;
}
.horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-placeholder-actions{
  display:none!important;
}
.horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-title-block{
  min-width:0;
}
.horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-modal-header h2{
  font-size:clamp(1.45rem,2vw,2.15rem)!important;
  line-height:1.02!important;
}
.horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-modal-header p{
  max-width:1100px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-body{
  padding:14px 26px 28px!important;
}
.horse-drilldown-back-racecard{
  background:linear-gradient(135deg,#0f172a,#1e293b)!important;
  color:#ffffff!important;
  border-color:rgba(15,23,42,.18)!important;
  box-shadow:0 12px 24px rgba(15,23,42,.16)!important;
}
.horse-drilldown-back-racecard:hover,
.horse-drilldown-back-racecard:focus-visible{
  background:linear-gradient(135deg,#111827,#334155)!important;
  outline:2px solid rgba(37,99,235,.22)!important;
  outline-offset:2px!important;
}
.horse-drilldown-modal-shell.is-horse-profile .horse-history-strip{
  margin-bottom:12px!important;
}
.horse-drilldown-modal-shell.is-horse-profile .horse-profile-evidence.hp-premium-evidence{
  gap:16px!important;
}
.horse-drilldown-modal-shell.is-horse-profile .horse-profile-summary-panel.hp-polished{
  grid-template-columns:minmax(360px,1fr) minmax(660px,780px)!important;
  padding:18px 20px!important;
  border-radius:24px!important;
}
.horse-drilldown-modal-shell.is-horse-profile .horse-profile-summary-main{
  align-self:center;
}
.horse-drilldown-modal-shell.is-horse-profile .horse-profile-summary-note{
  white-space:normal!important;
  width:auto!important;
  max-width:760px!important;
  display:inline-flex!important;
}
.horse-drilldown-modal-shell.is-horse-profile .hp-career-record-card{
  min-width:0!important;
  padding:16px 18px!important;
}
.horse-drilldown-modal-shell.is-horse-profile .hp-career-record-inner.hp-career-record-inner-v2{
  grid-template-columns:minmax(150px,.72fr) minmax(260px,1.12fr) minmax(180px,.82fr)!important;
  gap:12px!important;
}
.horse-drilldown-modal-shell.is-horse-profile .hp-career-record-card .hp-career-lead{
  min-height:104px!important;
  padding:13px 14px!important;
}
.horse-drilldown-modal-shell.is-horse-profile .hp-career-record-card .hp-career-runs strong,
.horse-drilldown-modal-shell.is-horse-profile .hp-career-record-card .hp-career-ae-lead strong{
  font-size:36px!important;
  line-height:.94!important;
}
.horse-drilldown-modal-shell.is-horse-profile .hp-career-ae-lead small{
  display:block;
  margin-top:6px;
  font-size:10px;
  line-height:1.15;
  color:#475569;
  font-weight:950;
  letter-spacing:.02em;
  white-space:normal;
}
.horse-drilldown-modal-shell.is-horse-profile .hp-career-record-card .hp-career-mid-grid{
  grid-template-columns:repeat(2,minmax(116px,1fr))!important;
  gap:9px!important;
}
.horse-drilldown-modal-shell.is-horse-profile .hp-career-record-card .hp-career-mid-grid div{
  min-height:46px!important;
}
.horse-drilldown-modal-shell.is-horse-profile .horse-profile-stat-table.hp-comparison-table-v2{
  min-width:1360px!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-ae-with-detail{
  min-width:92px!important;
  white-space:normal!important;
  line-height:1.08!important;
  text-align:center!important;
}
.hp-ae-main{
  display:block;
  font-weight:950;
  font-variant-numeric:tabular-nums;
  color:#0f172a;
}
.hp-ae-sub{
  display:block;
  margin-top:3px;
  font-size:8.8px;
  line-height:1.05;
  color:#475569;
  font-weight:900;
  letter-spacing:.01em;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th.hp-emphasis-head{
  white-space:normal!important;
  line-height:1.05!important;
}
.horse-drilldown-modal-shell.is-horse-profile .horse-profile-stat-table.hp-comparison-table-v2 .hp-delta-single{
  min-width:88px!important;
}
@media(max-width:1280px){
  .horse-drilldown-modal-shell.is-horse-profile .horse-profile-summary-panel.hp-polished{
    grid-template-columns:1fr!important;
  }
  .horse-drilldown-modal-shell.is-horse-profile .hp-career-record-inner.hp-career-record-inner-v2{
    grid-template-columns:minmax(140px,.8fr) minmax(260px,1.2fr) minmax(170px,.8fr)!important;
  }
}
@media(max-width:980px){
  .horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-modal-header{
    grid-template-columns:1fr!important;
  }
  .horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-actions{
    justify-content:flex-start!important;
    flex-wrap:wrap!important;
  }
  .horse-drilldown-modal-shell.is-horse-profile .hp-career-record-inner.hp-career-record-inner-v2{
    grid-template-columns:1fr!important;
  }
}

/* === HP-EVIDENCE-001E — summary clarity and Wins v Expected refinement === */
.horse-drilldown-modal-shell.is-horse-profile .horse-profile-summary-note{
  background:rgba(240,249,255,.92)!important;
  border:1px solid rgba(186,230,253,.72)!important;
  color:#334155!important;
}
.horse-drilldown-modal-shell.is-horse-profile .horse-profile-evidence.hp-premium-evidence{
  background:linear-gradient(180deg,rgba(248,250,252,.35),rgba(241,245,249,.30))!important;
}
.horse-drilldown-modal-shell.is-horse-profile .hp-highlight-dashboard-c6 .hp-highlight-card{
  min-height:154px!important;
  background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%)!important;
  box-shadow:0 18px 38px rgba(15,23,42,.065)!important;
}
.hp-highlight-dashboard-c6 .hp-highlight-card ul{
  gap:8px!important;
}
.hp-highlight-dashboard-c6 .hp-highlight-card li{
  display:block!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
}
.hp-highlight-dashboard-c6 .hp-highlight-card li button{
  width:100%;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:4px 12px;
  align-items:center;
  text-align:left;
  padding:8px 9px;
  border-radius:12px;
  border:1px solid rgba(226,232,240,.72);
  background:rgba(248,250,252,.86);
  color:#0f172a;
  cursor:pointer;
  transition:background .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease;
}
.hp-highlight-dashboard-c6 .hp-highlight-card li button:hover,
.hp-highlight-dashboard-c6 .hp-highlight-card li button:focus-visible{
  background:#ffffff;
  border-color:rgba(59,130,246,.34);
  box-shadow:0 8px 18px rgba(37,99,235,.10);
  transform:translateY(-1px);
  outline:none;
}
.hp-highlight-main{
  display:grid;
  min-width:0;
  gap:3px;
}
.hp-highlight-main strong{
  display:block;
  font-size:11px!important;
  line-height:1.15!important;
  color:#0f172a!important;
  white-space:normal!important;
}
.hp-highlight-main small{
  display:block;
  font-size:10.2px!important;
  line-height:1.15!important;
  color:#64748b!important;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.hp-highlight-dashboard-c6 .hp-highlight-card li em{
  grid-column:2;
  font-size:10.7px!important;
  line-height:1.16!important;
  color:#172554!important;
  white-space:normal!important;
  text-align:right;
  max-width:230px;
}
.horse-profile-stat-row.hp-row-pulse th,
.horse-profile-stat-row.hp-row-pulse td{
  animation:hpRowPulse 1.8s ease-out 1;
}
@keyframes hpRowPulse{
  0%{box-shadow:inset 0 0 0 999px rgba(250,204,21,.26);}
  45%{box-shadow:inset 0 0 0 999px rgba(59,130,246,.13);}
  100%{box-shadow:inset 0 0 0 999px rgba(59,130,246,0);}
}
.horse-profile-stat-table.hp-comparison-table-v2{
  min-width:1500px!important;
}
.horse-drilldown-modal-shell.is-horse-profile .horse-profile-stat-table.hp-comparison-table-v2{
  min-width:1500px!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-cell-ae,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-cell-wve{
  min-width:76px!important;
  text-align:center!important;
  font-variant-numeric:tabular-nums;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-cell-wve{
  color:#1e3a8a!important;
  font-weight:950!important;
  background-clip:padding-box;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-today,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-zone-today{background:#eefbf7!important;}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-diff,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-delta{background:#edf5ff!important;}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-other,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-zone-other{background:#f8fafc!important;}
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th,
.horse-profile-stat-table.hp-comparison-table-v2 tbody td{
  border-left:0!important;
  border-right:0!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 tbody td:nth-child(2),
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th:nth-child(2){
  border-left:1px solid rgba(20,184,166,.14)!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 tbody td:nth-child(9),
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th:nth-child(9){
  border-left:1px solid rgba(37,99,235,.16)!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 tbody td:nth-child(10),
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th:nth-child(10){
  border-left:1px solid rgba(100,116,139,.14)!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-other{
  border-left:1px solid rgba(100,116,139,.14)!important;
}
.hp-ae-main{
  display:block;
  font-weight:950;
  color:#0f172a;
  font-variant-numeric:tabular-nums;
}
.hp-ae-sub{display:none!important;}
@media(max-width:1500px){
  .hp-highlight-dashboard-c6 .hp-highlight-card li em{max-width:280px;}
}
@media(max-width:920px){
  .hp-highlight-dashboard-c6 .hp-highlight-card li button{grid-template-columns:1fr;}
  .hp-highlight-dashboard-c6 .hp-highlight-card li em{text-align:left;max-width:none;}
}

/* === HP-EVIDENCE-001F — summary/sample logic and limited-profile warning === */
.hp-profile-warning{
  display:flex;
  align-items:flex-start;
  gap:12px;
  margin:0 0 16px;
  padding:13px 16px;
  border-radius:18px;
  border:1px solid rgba(245,158,11,.34);
  background:linear-gradient(135deg,rgba(255,251,235,.96),rgba(255,255,255,.92));
  box-shadow:0 12px 28px rgba(146,64,14,.065);
  color:#334155;
}
.hp-profile-warning::before{
  content:"⚠";
  display:inline-grid;
  place-items:center;
  flex:0 0 auto;
  width:26px;
  height:26px;
  border-radius:999px;
  background:#fff7ed;
  border:1px solid rgba(251,146,60,.45);
  color:#c2410c;
  font-size:13px;
  font-weight:950;
}
.hp-profile-warning strong{
  display:block;
  margin:0 0 3px;
  color:#92400e;
  font-size:11px;
  font-weight:950;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.hp-profile-warning span{
  display:block;
  font-size:12px;
  line-height:1.35;
  font-weight:750;
}
.hp-profile-warning-severe{
  border-color:rgba(239,68,68,.32);
  background:linear-gradient(135deg,rgba(254,242,242,.96),rgba(255,255,255,.94));
}
.hp-profile-warning-severe::before{
  background:#fef2f2;
  border-color:rgba(248,113,113,.48);
  color:#b91c1c;
}
.hp-profile-warning-severe strong{color:#991b1b;}
.hp-highlight-dashboard-c6 .hp-highlight-card ul + .hp-highlight-more{
  margin-top:8px;
}
.hp-highlight-more{
  width:100%;
  min-height:32px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  border-radius:12px;
  border:1px solid rgba(148,163,184,.34);
  background:rgba(255,255,255,.84);
  color:#1e3a8a;
  font-size:11px;
  font-weight:950;
  letter-spacing:.01em;
  cursor:pointer;
  box-shadow:0 6px 14px rgba(15,23,42,.045);
  transition:background .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease;
}
.hp-highlight-more:hover,
.hp-highlight-more:focus-visible{
  outline:none;
  background:#ffffff;
  border-color:rgba(59,130,246,.44);
  box-shadow:0 10px 22px rgba(37,99,235,.10);
  transform:translateY(-1px);
}
.hp-highlight-dashboard-c6 .hp-highlight-card{
  min-height:154px;
}
@media(max-width:900px){
  .hp-profile-warning{flex-direction:row;padding:12px 13px;}
}

/* === HP-EVIDENCE-001G — evidence-basis banner, NH Flat handling and stronger row focus === */
.hp-evidence-basis-banner{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
  margin:0 0 16px;
  padding:14px 16px;
  border-radius:20px;
  border:1px solid rgba(37,99,235,.26);
  background:linear-gradient(135deg,rgba(239,246,255,.98),rgba(255,255,255,.94));
  box-shadow:0 16px 34px rgba(30,64,175,.075);
}
.hp-evidence-basis-copy{
  display:grid;
  gap:4px;
  min-width:0;
}
.hp-evidence-basis-copy span{
  display:block;
  font-size:10px;
  letter-spacing:.14em;
  text-transform:uppercase;
  font-weight:950;
  color:#1d4ed8;
}
.hp-evidence-basis-copy strong{
  display:block;
  font-size:16px;
  line-height:1.1;
  letter-spacing:-.02em;
  color:#0f172a;
}
.hp-evidence-basis-copy em{
  display:block;
  font-style:normal;
  font-size:12px;
  line-height:1.35;
  font-weight:750;
  color:#475569;
}
.hp-evidence-basis-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
.hp-evidence-basis-button{
  min-height:34px;
  padding:7px 12px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.40);
  background:rgba(255,255,255,.82);
  color:#334155;
  font-size:11px;
  font-weight:950;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(15,23,42,.055);
  transition:background .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease,color .16s ease;
}
.hp-evidence-basis-button:hover,
.hp-evidence-basis-button:focus-visible{
  outline:none;
  transform:translateY(-1px);
  border-color:rgba(37,99,235,.42);
  box-shadow:0 12px 24px rgba(37,99,235,.11);
  background:#ffffff;
  color:#1d4ed8;
}
.hp-evidence-basis-button.active{
  background:linear-gradient(135deg,#1d4ed8,#2563eb);
  border-color:rgba(37,99,235,.72);
  color:#ffffff;
  box-shadow:0 14px 28px rgba(37,99,235,.20);
}
.horse-profile-stat-row.hp-row-pulse th,
.horse-profile-stat-row.hp-row-pulse td{
  animation:hpRowPulseStrong 3.6s ease-out 1!important;
}
@keyframes hpRowPulseStrong{
  0%{box-shadow:inset 0 0 0 999px rgba(250,204,21,.42),0 0 0 2px rgba(245,158,11,.36);}
  22%{box-shadow:inset 0 0 0 999px rgba(250,204,21,.34),0 0 0 2px rgba(245,158,11,.28);}
  62%{box-shadow:inset 0 0 0 999px rgba(59,130,246,.18),0 0 0 2px rgba(37,99,235,.18);}
  100%{box-shadow:inset 0 0 0 999px rgba(59,130,246,0),0 0 0 2px rgba(37,99,235,0);}
}
@media(max-width:980px){
  .hp-evidence-basis-banner{grid-template-columns:1fr;}
  .hp-evidence-basis-actions{justify-content:flex-start;}
}


/* HP-EVIDENCE-001I1 — make fullscreen Horse Profile use a visible internal scrollbar */
.horse-drilldown-modal-shell.is-horse-profile.fullscreen .horse-drilldown-content{
  height:100vh!important;
  max-height:100vh!important;
  overflow-y:scroll!important;
  overflow-x:hidden!important;
  scrollbar-gutter:stable!important;
}
.horse-drilldown-modal-shell.is-horse-profile.fullscreen .horse-drilldown-modal{
  overflow:hidden!important;
}

/* === HP-EVIDENCE-001J — refresh-wrapper UI tidy and premium Horse Profile finish === */
.horse-drilldown-modal,
.horse-drilldown-content{
  box-sizing:border-box!important;
}
.horse-drilldown-modal{
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}
.horse-drilldown-content{
  flex:1 1 auto!important;
  min-height:0!important;
  height:auto!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  scrollbar-gutter:stable!important;
}
.horse-drilldown-modal-shell.fullscreen .horse-drilldown-content,
.horse-drilldown-modal-shell.is-horse-profile.fullscreen .horse-drilldown-content{
  height:auto!important;
  max-height:none!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
}
.horse-drilldown-modal-shell.fullscreen .horse-drilldown-modal,
.horse-drilldown-modal-shell.is-horse-profile.fullscreen .horse-drilldown-modal{
  height:100vh!important;
  max-height:100vh!important;
}
.horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-modal-header{
  background:linear-gradient(135deg,rgba(15,23,42,.97),rgba(30,41,59,.94))!important;
  color:#ffffff!important;
  border-bottom:1px solid rgba(148,163,184,.22)!important;
  box-shadow:0 16px 36px rgba(15,23,42,.22)!important;
  backdrop-filter:blur(14px)!important;
  -webkit-backdrop-filter:blur(14px)!important;
}
.horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-kicker{color:#8b5cf6!important;}
.horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-modal-header h2{color:#ffffff!important;}
.horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-modal-header p{color:rgba(226,232,240,.82)!important;}
.horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-actions .horse-drilldown-ghost,
.horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-actions .hp-hidden-top-toggle{
  border-color:rgba(255,255,255,.18)!important;
  background:rgba(255,255,255,.08)!important;
  color:#f8fafc!important;
  box-shadow:none!important;
}
.horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-actions .horse-drilldown-ghost:hover,
.horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-actions .hp-hidden-top-toggle:hover{
  background:rgba(255,255,255,.16)!important;
  border-color:rgba(255,255,255,.34)!important;
}
.horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-actions .horse-drilldown-back-racecard{
  background:#ffffff!important;
  color:#0f172a!important;
  border-color:rgba(255,255,255,.72)!important;
  box-shadow:0 12px 24px rgba(0,0,0,.16)!important;
}
.horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-close{
  background:rgba(255,255,255,.11)!important;
  color:#ffffff!important;
  border-color:rgba(255,255,255,.20)!important;
}
.horse-profile-race-context-line{
  font-size:13.2px!important;
  line-height:1.45!important;
  color:#334155!important;
  font-weight:800!important;
}
.horse-profile-race-prize-chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:2px;
}
.horse-profile-race-prize-chips span{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 9px;
  border-radius:999px;
  border:1px solid rgba(20,184,166,.22);
  background:rgba(240,253,250,.86);
  box-shadow:0 8px 16px rgba(15,118,110,.06);
}
.horse-profile-race-prize-chips em{
  font-style:normal;
  font-size:9px;
  font-weight:950;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#0f766e;
}
.horse-profile-race-prize-chips strong{
  font-size:12px;
  font-weight:950;
  color:#0f172a;
}
.hp-evidence-basis-banner.hp-evidence-basis-banner-v2{
  grid-template-columns:minmax(260px,1fr) auto minmax(260px,.85fr)!important;
  align-items:center!important;
}
.hp-evidence-basis-banner-v2 .hp-evidence-basis-actions{
  justify-content:center!important;
}
.hp-evidence-basis-bsp-note{
  justify-self:end;
  max-width:360px;
  padding:8px 10px;
  border:1px solid rgba(14,165,233,.18);
  border-radius:999px;
  background:rgba(240,249,255,.82);
  color:#28506b;
  font-size:11px;
  line-height:1.25;
  font-weight:850;
  text-align:right;
}
.hp-highlight-dashboard-c6 .hp-highlight-ae-positive{
  background:linear-gradient(180deg,rgba(240,253,250,.98),#ffffff 58%,#f8fafc 100%)!important;
  border-color:rgba(20,184,166,.22)!important;
}
.hp-highlight-dashboard-c6 .hp-highlight-ae-negative{
  background:linear-gradient(180deg,rgba(254,242,242,.98),#ffffff 58%,#f8fafc 100%)!important;
  border-color:rgba(248,113,113,.22)!important;
}
.hp-highlight-dashboard-c6 .hp-highlight-lifts{
  background:linear-gradient(180deg,rgba(239,246,255,.98),#ffffff 58%,#f8fafc 100%)!important;
  border-color:rgba(59,130,246,.20)!important;
}
.hp-highlight-dashboard-c6 .hp-highlight-concerns{
  background:linear-gradient(180deg,rgba(255,247,237,.98),#ffffff 58%,#f8fafc 100%)!important;
  border-color:rgba(251,146,60,.22)!important;
}
.horse-profile-section-card.hp-polished-section{
  background:linear-gradient(180deg,#ffffff,#f8fafc)!important;
}
.horse-profile-section-card.hp-polished-section header{
  background:linear-gradient(135deg,#f8fafc 0%,#eef2ff 50%,#ecfeff 100%)!important;
  border-bottom:1px solid rgba(203,213,225,.72)!important;
  color:#0f172a!important;
}
.horse-profile-section-card.hp-polished-section header::before{opacity:.95!important;}
.horse-profile-section-card.hp-polished-section header h3{color:#0f172a!important;}
.horse-profile-section-card.hp-polished-section .horse-profile-kicker{color:#0f766e!important;}
@media(max-width:980px){
  .hp-evidence-basis-banner.hp-evidence-basis-banner-v2{grid-template-columns:1fr!important;}
  .hp-evidence-basis-bsp-note{justify-self:start;text-align:left;border-radius:14px;}
}


/* === HP-EVIDENCE-001K — final Horse Profile tidy before Trainer/Jockey work === */
html.horse-drilldown-modal-open,
body.horse-drilldown-modal-open{
  overflow:hidden!important;
  height:100%!important;
}
.horse-drilldown-modal-shell{
  overflow:hidden!important;
  overscroll-behavior:contain!important;
}
.horse-drilldown-modal-shell.fullscreen,
.horse-drilldown-modal-shell.is-horse-profile.fullscreen{
  position:fixed!important;
  inset:0!important;
  overflow:hidden!important;
}
.horse-drilldown-modal-shell.fullscreen .horse-drilldown-modal,
.horse-drilldown-modal-shell.is-horse-profile.fullscreen .horse-drilldown-modal{
  height:100vh!important;
  max-height:100vh!important;
  overflow:hidden!important;
}
.horse-drilldown-modal-shell.fullscreen .horse-drilldown-content,
.horse-drilldown-modal-shell.is-horse-profile.fullscreen .horse-drilldown-content{
  height:100%!important;
  max-height:100%!important;
  overflow-y:scroll!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  scrollbar-gutter:stable!important;
}
.horse-drilldown-modal-shell.is-horse-profile .hp-evidence-basis-banner.hp-evidence-basis-banner-v2{
  grid-template-columns:minmax(320px,.95fr) minmax(280px,auto) minmax(360px,.82fr)!important;
  gap:18px!important;
  padding:15px 18px!important;
}
.horse-drilldown-modal-shell.is-horse-profile .hp-evidence-basis-copy{
  gap:5px!important;
}
.horse-drilldown-modal-shell.is-horse-profile .hp-evidence-basis-bsp-note{
  max-width:none!important;
  min-width:360px!important;
  white-space:nowrap!important;
  padding:9px 14px!important;
  border-radius:16px!important;
}
.horse-drilldown-modal-shell.is-horse-profile .hp-evidence-basis-actions{
  justify-content:center!important;
}
.horse-profile-race-prize-line{
  display:inline-flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:7px!important;
  margin-top:3px!important;
  padding:0!important;
}
.horse-profile-race-prize-line b{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  font-size:10px;
  font-weight:950;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#0f766e;
}
.horse-profile-race-prize-line span{
  min-height:26px;
  padding:4px 8px!important;
  border-radius:999px!important;
  background:rgba(240,253,250,.78)!important;
}
.hp-summary-horse-link{
  appearance:none;
  -webkit-appearance:none;
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  font-weight:inherit;
  letter-spacing:inherit;
  padding:0;
  margin:0;
  cursor:pointer;
  text-align:left;
  border-radius:8px;
}
.hp-summary-horse-link:hover,
.hp-summary-horse-link:focus-visible{
  color:#0f766e;
  text-decoration:underline;
  text-underline-offset:4px;
  outline:2px solid rgba(20,184,166,.18);
  outline-offset:3px;
}
.hp-highlight-dashboard-c6 .hp-highlight-card{
  border-top-width:1px!important;
}
.hp-highlight-dashboard-c6 .hp-highlight-ae-positive{
  background:linear-gradient(180deg,rgba(236,253,245,.98) 0%,rgba(255,255,255,.96) 52%,#f8fafc 100%)!important;
  box-shadow:0 18px 38px rgba(20,184,166,.075)!important;
}
.hp-highlight-dashboard-c6 .hp-highlight-ae-negative{
  background:linear-gradient(180deg,rgba(254,242,242,.98) 0%,rgba(255,255,255,.96) 52%,#f8fafc 100%)!important;
  box-shadow:0 18px 38px rgba(248,113,113,.075)!important;
}
.hp-highlight-dashboard-c6 .hp-highlight-lifts{
  background:linear-gradient(180deg,rgba(239,246,255,.98) 0%,rgba(255,255,255,.96) 52%,#f8fafc 100%)!important;
  box-shadow:0 18px 38px rgba(59,130,246,.07)!important;
}
.hp-highlight-dashboard-c6 .hp-highlight-concerns{
  background:linear-gradient(180deg,rgba(255,247,237,.98) 0%,rgba(255,255,255,.96) 52%,#f8fafc 100%)!important;
  box-shadow:0 18px 38px rgba(251,146,60,.075)!important;
}
.horse-profile-section-card.hp-polished-section header{
  background:linear-gradient(135deg,#f1f5f9 0%,#edf4ff 50%,#e8fbfb 100%)!important;
  border-bottom:1px solid rgba(148,163,184,.38)!important;
}
.horse-profile-section-card.hp-polished-section header::before{
  height:4px!important;
  opacity:1!important;
}
.horse-profile-section-card.hp-polished-section header h3{
  font-size:16px!important;
}
@media(max-width:1180px){
  .horse-drilldown-modal-shell.is-horse-profile .hp-evidence-basis-banner.hp-evidence-basis-banner-v2{
    grid-template-columns:1fr!important;
  }
  .horse-drilldown-modal-shell.is-horse-profile .hp-evidence-basis-bsp-note{
    min-width:0!important;
    width:fit-content!important;
    white-space:normal!important;
    text-align:left!important;
    justify-self:start!important;
  }
  .horse-drilldown-modal-shell.is-horse-profile .hp-evidence-basis-actions{
    justify-content:flex-start!important;
  }
}

/* === HP-EVIDENCE-001K1 — visible summary tint pass === */
.hp-highlight-dashboard-c6 .hp-highlight-card{
  border-top-width:1px!important;
}
.hp-highlight-dashboard-c6 .hp-highlight-ae-positive{
  background:linear-gradient(180deg,rgba(220,252,231,.94) 0%,rgba(240,253,244,.86) 44%,rgba(255,255,255,.98) 100%)!important;
  border-color:rgba(34,197,94,.30)!important;
  box-shadow:0 18px 42px rgba(22,163,74,.105)!important;
}
.hp-highlight-dashboard-c6 .hp-highlight-ae-negative{
  background:linear-gradient(180deg,rgba(254,226,226,.94) 0%,rgba(254,242,242,.86) 44%,rgba(255,255,255,.98) 100%)!important;
  border-color:rgba(239,68,68,.30)!important;
  box-shadow:0 18px 42px rgba(220,38,38,.105)!important;
}
.hp-highlight-dashboard-c6 .hp-highlight-lifts{
  background:linear-gradient(180deg,rgba(219,234,254,.94) 0%,rgba(239,246,255,.86) 44%,rgba(255,255,255,.98) 100%)!important;
  border-color:rgba(59,130,246,.28)!important;
  box-shadow:0 18px 42px rgba(37,99,235,.09)!important;
}
.hp-highlight-dashboard-c6 .hp-highlight-concerns{
  background:linear-gradient(180deg,rgba(255,237,213,.94) 0%,rgba(255,247,237,.86) 44%,rgba(255,255,255,.98) 100%)!important;
  border-color:rgba(249,115,22,.30)!important;
  box-shadow:0 18px 42px rgba(234,88,12,.10)!important;
}
.hp-highlight-dashboard-c6 .hp-highlight-ae-positive li button,
.hp-highlight-dashboard-c6 .hp-highlight-ae-positive li{
  background:rgba(240,253,244,.72)!important;
}
.hp-highlight-dashboard-c6 .hp-highlight-ae-negative li button,
.hp-highlight-dashboard-c6 .hp-highlight-ae-negative li{
  background:rgba(254,242,242,.72)!important;
}
.hp-highlight-dashboard-c6 .hp-highlight-lifts li button,
.hp-highlight-dashboard-c6 .hp-highlight-lifts li{
  background:rgba(239,246,255,.74)!important;
}
.hp-highlight-dashboard-c6 .hp-highlight-concerns li button,
.hp-highlight-dashboard-c6 .hp-highlight-concerns li{
  background:rgba(255,247,237,.76)!important;
}

/* UI_TIDY_001 — shared account tile, course-display polish, Horse Form alignment and racecard prize tidy */
.auth-user-avatar {
  cursor: pointer !important;
  user-select: none !important;
}
.auth-user-avatar:focus-visible {
  outline: 3px solid rgba(20, 184, 166, .32);
  outline-offset: 3px;
}
.auth-user-initials {
  position: relative;
  z-index: 1;
}

.live-racecard-key-facts span {
  border-bottom: 0 !important;
  padding-bottom: 5px !important;
}
.live-racecard-key-facts .live-going-value,
.live-racecard-key-facts .live-going-main {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}
.live-prize-fact {
  font-variant-numeric: tabular-nums;
}

.horse-identity-panel.has-source-race .horse-identity-main.compact {
  grid-template-columns: 48px minmax(210px, .82fr) minmax(360px, 1.18fr) minmax(420px, 1.35fr) !important;
  align-items: stretch !important;
}
.horse-source-race-card {
  justify-self: stretch;
  align-self: stretch;
  padding: 8px 10px !important;
  border-radius: 13px !important;
  border: 1px solid rgba(20,184,166,.22);
  background: linear-gradient(180deg, #f0fdfa, #ffffff);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5);
  min-width: 0;
}
.horse-source-race-card > span {
  display:block;
  color:#0f766e;
  font-size:.56rem;
  font-weight:1000;
  text-transform:uppercase;
  letter-spacing:.10em;
  margin-bottom:4px;
}
.horse-source-race-card > strong {
  display:block;
  color:#0f172a;
  font-size:.74rem;
  line-height:1.15;
  margin-bottom:3px;
}
.horse-source-race-card > small {
  display:block;
  color:#334155;
  font-size:.66rem;
  font-weight:900;
  line-height:1.18;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.horse-source-race-card > p {
  margin:4px 0 0 !important;
  color:#475569 !important;
  font-size:.64rem !important;
  font-weight:850 !important;
  line-height:1.25 !important;
}
.horse-source-race-prize {
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-top:6px;
}
.horse-source-race-prize span {
  display:inline-flex;
  align-items:center;
  gap:4px;
  border:1px solid rgba(20,184,166,.18);
  background:#ffffff;
  color:#0f172a;
  border-radius:999px;
  padding:3px 7px;
}
.horse-source-race-prize em {
  color:#0f766e;
  font-size:.55rem;
  font-style:normal;
  font-weight:1000;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.horse-source-race-prize strong {
  font-size:.68rem;
  font-weight:1000;
}

.horse-form-distance,
.horse-form-sp,
.horse-form-num,
.horse-form-table td:nth-child(3),
.horse-form-table td:nth-child(7),
.horse-form-table td:nth-child(10),
.horse-form-table td:nth-child(11),
.horse-form-table th:nth-child(3),
.horse-form-table th:nth-child(7),
.horse-form-table th:nth-child(10),
.horse-form-table th:nth-child(11),
.horse-form-table th:nth-child(3) button,
.horse-form-table th:nth-child(7) button,
.horse-form-table th:nth-child(10) button,
.horse-form-table th:nth-child(11) button {
  text-align: center !important;
}
.horse-form-sp-cell {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  min-width:48px;
}
.horse-form-fav-chip {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:18px;
  height:18px;
  padding:0 5px;
  border-radius:999px;
  background:#fef3c7;
  color:#92400e;
  border:1px solid rgba(245,158,11,.28);
  font-size:.58rem;
  font-weight:1000;
  letter-spacing:.04em;
}

@media (max-width: 1350px) {
  .horse-identity-panel.has-source-race .horse-identity-main.compact {
    grid-template-columns: 48px minmax(220px, 1fr) !important;
  }
  .horse-source-race-card,
  .horse-connections-card {
    grid-column: 1 / -1;
  }
}


/* UI_NAV_002 — Review Tray Go to section target polish */
#page-builder .section .race-profiler-section-jump-highlight,
#page-builder .section.race-profiler-section-jump-highlight{
  position:relative!important;
  z-index:2!important;
}

/* UI_NAV_002A — stronger Review Tray target flash tint */
.race-profiler-section-jump-highlight{
  position:relative!important;
  animation:raceProfilerSectionJumpPulse 4.8s ease-in-out 1!important;
  outline:3px solid rgba(37,99,235,.66)!important;
  outline-offset:4px!important;
  scroll-margin-top:140px!important;
}
.race-profiler-section-jump-highlight::after{
  content:"";
  position:absolute;
  inset:-1px;
  border-radius:inherit;
  pointer-events:none;
  z-index:20;
  background:linear-gradient(135deg, rgba(59,130,246,.22), rgba(20,184,166,.18));
  animation:raceProfilerSectionJumpTint 4.8s ease-in-out 1!important;
}
@keyframes raceProfilerSectionJumpTint{
  0%, 22%, 46%, 70%{opacity:.95;}
  11%, 34%, 58%, 84%, 100%{opacity:0;}
}



/* DEV_SETTINGS_001 + HP_NAV_001 */
.top-icon.settings-cog{
  border:0;
  cursor:pointer;
  font:inherit;
}
.nav-icon[data-icon="nav-developer-settings"] img{
  width:100%;
  height:100%;
  display:block;
}
.developer-settings-topbar,
.developer-settings-hero,
.developer-settings-workspace{
  max-width: 1780px;
}
.developer-settings-hero{
  margin: 20px 0 18px;
  padding: 34px 38px;
  border-radius: 26px;
  background: linear-gradient(135deg, #0f172a 0%, #123b45 52%, #115e59 100%);
  color:#f8fafc;
  box-shadow: 0 24px 60px rgba(15,23,42,.18);
}
.developer-settings-kicker{
  text-transform: uppercase;
  letter-spacing: .28em;
  color:#5eead4;
  font-weight:900;
  font-size:13px;
  margin-bottom: 8px;
}
.developer-settings-kicker.small{
  font-size:11px;
  margin-bottom:4px;
}
.developer-settings-hero h2{
  margin:0 0 8px;
  font-size:34px;
  line-height:1.05;
}
.developer-settings-hero p{
  margin:0;
  color:#dbeafe;
  max-width:980px;
  line-height:1.55;
}
.developer-settings-status{
  margin: 0 0 14px;
  padding: 12px 16px;
  border-radius: 14px;
  background:#f8fafc;
  border:1px solid #dbe4ee;
  color:#334155;
  font-weight:800;
}
.developer-settings-status.is-success{background:#ecfdf5;border-color:#bbf7d0;color:#047857;}
.developer-settings-status.is-error{background:#fef2f2;border-color:#fecaca;color:#b91c1c;}
.developer-settings-status.is-loading{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8;}
.developer-settings-grid{
  display:grid;
  grid-template-columns:minmax(0, 1.55fr) minmax(280px, .75fr);
  gap:18px;
}
.developer-settings-card{
  background:#ffffff;
  border:1px solid #dfe7ef;
  border-radius:24px;
  box-shadow:0 18px 50px rgba(15,23,42,.08);
  padding:24px;
}
.developer-card-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.developer-settings-card h3{
  margin:0;
  color:#0f172a;
  font-size:24px;
}
.developer-card-copy,
.future-tools-card p,
.developer-warning-note{
  color:#475569;
  line-height:1.55;
}
.developer-refresh-button{
  border:1px solid #cbd5e1;
  border-radius:14px;
  background:#f8fafc;
  color:#0f172a;
  font-weight:900;
  padding:10px 14px;
  cursor:pointer;
}
.developer-form-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:14px;
  margin-top:16px;
}
.developer-form-grid label{
  display:flex;
  flex-direction:column;
  gap:7px;
  color:#334155;
  font-weight:900;
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.developer-form-grid select,
.developer-form-grid input{
  border:1px solid #cbd5e1;
  border-radius:14px;
  padding:12px 13px;
  font-weight:800;
  color:#0f172a;
  background:#fff;
  min-width:0;
}
.developer-display-field,
.developer-note-field{grid-column: span 3;}
.developer-race-field.is-hidden,
.developer-scope-target-field.is-hidden{display:none;}
.developer-current-panel{
  margin-top:18px;
  border:1px solid #dbe4ee;
  background:#f8fafc;
  border-radius:18px;
  padding:14px;
  color:#475569;
  font-weight:800;
}
.developer-preview-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
  color:#0f172a;
}
.developer-preview-summary span{color:#64748b;font-weight:900;}
.developer-current-list{display:grid;gap:10px;}
.developer-current-race{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:8px 14px;
  align-items:center;
  padding:10px 12px;
  border-radius:14px;
  background:#fff;
  border:1px solid #e2e8f0;
}
.developer-current-race strong{color:#0f172a;}
.developer-current-race span{color:#115e59;font-weight:900;}
.developer-current-race small{grid-column:1 / -1;color:#64748b;}
.developer-override-pill{
  display:inline-block;
  margin-left:6px;
  padding:3px 7px;
  border-radius:999px;
  background:#d1fae5;
  color:#047857;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.developer-action-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:18px;
}
.live-going-override-tip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-left:6px;
  width:17px;
  height:17px;
  border-radius:50%;
  background:#dcfce7;
  color:#047857;
  font-size:11px;
  font-weight:900;
  vertical-align:middle;
}
.horse-drilldown-modal-shell.is-horse-profile .horse-context-strip{
  margin: 16px 0;
  border:1px solid rgba(148,163,184,.32);
  box-shadow:0 12px 34px rgba(15,23,42,.08);
}

.hp-evidence-basis-action-row{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
}

.horse-profile-basis-actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
}
.horse-profile-race-actions{
  display:inline-flex;
  align-items:center;
  gap:10px;
  margin-left:4px;
}
.horse-profile-action-divider{
  width:1px;
  height:28px;
  background:linear-gradient(to bottom, transparent, #94a3b8, transparent);
}
.horse-profile-exclude-button{
  border:1px solid #fecaca;
  background:#fff7ed;
  color:#9a3412;
  border-radius:999px;
  padding:9px 14px;
  font-size:12px;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
  cursor:pointer;
}
.horse-profile-exclude-button.is-excluded{
  background:#fee2e2;
  border-color:#fca5a5;
  color:#991b1b;
}
.horse-profile-exclude-button:disabled{
  opacity:.5;
  cursor:not-allowed;
}
@media (max-width: 1100px){
  .developer-settings-grid{grid-template-columns:1fr;}
  .developer-form-grid{grid-template-columns:1fr;}
  .developer-display-field,
  .developer-note-field{grid-column:auto;}
  .developer-current-race{grid-template-columns:1fr;}
}


/* DEV_SETTINGS_001D — going override rebuild, tooltip and clipping cleanup */
.racing-results-course-going,
.live-going-value,
.live-going-fact,
.live-racecard-key-facts,
.horse-form-result,
.horse-form-result button{
  overflow:visible!important;
}
.racing-results-course-going .live-going-value,
.live-going-fact .live-going-value{
  display:inline-flex!important;
  align-items:center!important;
  gap:6px!important;
  min-width:0!important;
  max-width:100%!important;
}
.live-going-treated-icon,
.live-going-override-icon{
  position:relative!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  min-height:18px!important;
  margin-left:4px!important;
  padding:0!important;
  border:1px solid rgba(245,158,11,.38)!important;
  border-radius:999px!important;
  background:#fff7ed!important;
  color:#b45309!important;
  font-size:11px!important;
  font-weight:1000!important;
  line-height:1!important;
  text-indent:0!important;
  transform:none!important;
  box-shadow:0 6px 14px rgba(245,158,11,.14)!important;
  cursor:help!important;
  vertical-align:middle!important;
  isolation:auto!important;
}
.live-going-override-icon{
  border-color:rgba(5,150,105,.32)!important;
  background:#ecfdf5!important;
  color:#047857!important;
  box-shadow:0 6px 14px rgba(5,150,105,.12)!important;
}
.live-going-treated-icon::before,
.live-going-treated-icon::after,
.live-going-override-icon::before,
.live-going-override-icon::after{
  content:none!important;
  display:none!important;
}
.live-going-treated-icon:hover,
.live-going-treated-icon:focus-visible,
.live-going-override-icon:hover,
.live-going-override-icon:focus-visible{
  transform:translateY(-1px)!important;
  box-shadow:0 9px 18px rgba(15,23,42,.16)!important;
  outline:2px solid rgba(59,130,246,.22)!important;
  outline-offset:2px!important;
}
.horse-form-result button[data-horse-tooltip]::after,
.horse-form-result button[data-tooltip]::after{
  content:none!important;
  display:none!important;
}
.global-report-tooltip{
  position:fixed!important;
  z-index:2147483647!important;
  max-width:min(520px,calc(100vw - 32px))!important;
  white-space:normal!important;
  overflow:visible!important;
  pointer-events:none!important;
}
#developerSettingsStatus.is-success{
  position:relative!important;
  border-color:rgba(20,184,166,.28)!important;
  background:#ecfdf5!important;
  color:#065f46!important;
}
#developerApplyGoingOverrideButton.is-busy,
#developerClearGoingOverrideButton.is-busy{
  opacity:.78!important;
  cursor:wait!important;
}

/* DEV_SETTINGS_002 — user management controls */
.developer-settings-stack{
  grid-template-columns:minmax(0, 1fr)!important;
}
.developer-card-header-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
.developer-collapse-button,
.developer-small-action{
  border:1px solid #cbd5e1;
  border-radius:999px;
  background:#ffffff;
  color:#0f172a;
  font-weight:950;
  padding:9px 13px;
  cursor:pointer;
  box-shadow:0 6px 16px rgba(15,23,42,.06);
}
.developer-small-action{
  padding:7px 11px;
  font-size:12px;
}
.developer-collapse-button:hover,
.developer-small-action:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(15,23,42,.10);
}
.developer-collapsible-card.is-collapsed .developer-card-body{
  display:none;
}
.developer-user-status{
  margin:14px 0;
  padding:11px 14px;
  border-radius:14px;
  background:#f8fafc;
  border:1px solid #dbe4ee;
  color:#334155;
  font-weight:850;
}
.developer-user-status.is-success{background:#ecfdf5;border-color:#bbf7d0;color:#047857;}
.developer-user-status.is-error{background:#fef2f2;border-color:#fecaca;color:#b91c1c;}
.developer-user-status.is-loading{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8;}
.developer-users-layout{
  display:grid;
  grid-template-columns:minmax(320px,.72fr) minmax(0,1.28fr);
  gap:18px;
  align-items:start;
}
.developer-user-create-panel,
.developer-users-management-panel,
.developer-user-panel{
  border:1px solid #dbe4ee;
  border-radius:20px;
  background:#f8fafc;
  padding:16px;
}
.developer-user-create-panel h4,
.developer-users-management-panel h4,
.developer-password-reset-panel h4,
.developer-selected-user-heading h4{
  margin:0 0 10px;
  color:#0f172a;
}
.developer-user-form-grid,
.developer-user-edit-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.developer-password-field{grid-column:span 1;}
.developer-users-list{
  margin-bottom:16px;
}
.developer-user-table-wrap{
  overflow:auto;
  border:1px solid #e2e8f0;
  border-radius:16px;
  background:#fff;
}
.developer-user-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  min-width:860px;
}
.developer-user-table th,
.developer-user-table td{
  padding:12px 13px;
  border-bottom:1px solid #edf2f7;
  text-align:left;
  vertical-align:middle;
  color:#334155;
  font-weight:800;
}
.developer-user-table th{
  background:#f1f5f9;
  color:#0f172a;
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  position:sticky;
  top:0;
  z-index:1;
}
.developer-user-table tr:last-child td{border-bottom:0;}
.developer-user-table tr.is-selected td{background:#ecfeff;}
.developer-user-table td strong{
  display:block;
  color:#0f172a;
  font-weight:950;
}
.developer-user-table td small{
  display:block;
  margin-top:3px;
  color:#64748b;
  font-weight:750;
}
.developer-role-pill,
.developer-status-pill{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:5px 9px;
  font-size:11px;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
  background:#e0f2fe;
  color:#075985;
}
.developer-status-pill{background:#f1f5f9;color:#475569;}
.developer-status-active{background:#d1fae5;color:#047857;}
.developer-status-inactive{background:#fef3c7;color:#92400e;}
.developer-status-deleted{background:#fee2e2;color:#991b1b;}
.developer-selected-user-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}
.developer-user-meta-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-bottom:14px;
}
.developer-user-meta-grid div{
  border:1px solid #e2e8f0;
  border-radius:14px;
  background:#ffffff;
  padding:10px 12px;
}
.developer-user-meta-grid span{
  display:block;
  color:#64748b;
  font-size:11px;
  font-weight:900;
  letter-spacing:.10em;
  text-transform:uppercase;
  margin-bottom:4px;
}
.developer-user-meta-grid strong{color:#0f172a;font-weight:950;}
.developer-password-reset-panel{
  margin-top:16px;
  border-top:1px solid #dbe4ee;
  padding-top:16px;
}
.developer-password-reset-panel p{
  color:#64748b;
  font-weight:750;
  line-height:1.5;
  margin:0 0 12px;
}
.developer-delete-user-button{
  border-color:#fecaca!important;
  color:#991b1b!important;
  background:#fff7ed!important;
}
#developerCreateUserButton.is-busy,
#developerSaveUserButton.is-busy,
#developerResetPasswordButton.is-busy,
#developerDeleteUserButton.is-busy{
  opacity:.78!important;
  cursor:wait!important;
}
@media (max-width: 1220px){
  .developer-users-layout{grid-template-columns:1fr;}
  .developer-user-meta-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width: 760px){
  .developer-card-header{flex-direction:column;align-items:stretch;}
  .developer-card-header-actions{justify-content:flex-start;}
  .developer-user-form-grid,
  .developer-user-edit-grid{grid-template-columns:1fr;}
  .developer-password-field{grid-column:auto;}
  .developer-user-meta-grid{grid-template-columns:1fr;}
}

/* === TRAINER-STATS-001: Live Racing Trainer Stats modal === */
.horse-drilldown-modal-shell.is-trainer-stats .horse-drilldown-modal-header{
  background:linear-gradient(135deg,#111827 0%,#1e1b4b 48%,#0f766e 100%);
}
.horse-drilldown-modal-shell.is-trainer-stats .horse-drilldown-kicker{color:#99f6e4;}
.trainer-stats-evidence{--trainer-accent:#14b8a6;--trainer-accent-dark:#0f766e;--trainer-soft:#ecfeff;--trainer-soft-2:#f0fdfa;--trainer-line:#99f6e4;display:flex;flex-direction:column;gap:18px;}
.trainer-stats-summary-panel{display:grid;grid-template-columns:minmax(320px,1.35fr) minmax(360px,1fr) minmax(300px,.9fr);gap:14px;align-items:stretch;background:linear-gradient(135deg,#f0fdfa 0%,#eef2ff 52%,#fff7ed 100%);border:1px solid rgba(20,184,166,.22);border-radius:22px;padding:18px;box-shadow:0 18px 45px rgba(15,23,42,.08);}
.trainer-summary-main{display:flex;flex-direction:column;justify-content:center;gap:8px;min-width:0;}
.trainer-kicker{color:#0f766e !important;letter-spacing:.22em;}
.trainer-summary-main h3{margin:0;color:#111827;font-size:clamp(28px,2.1vw,42px);line-height:1;font-weight:950;letter-spacing:-.04em;}
.trainer-runner-context{margin:0;color:#475569;font-weight:850;}
.trainer-condition-chip-row{display:flex;flex-wrap:wrap;gap:7px;margin-top:4px;}
.trainer-condition-chip-row span{display:inline-flex;align-items:center;border:1px solid rgba(20,184,166,.28);background:rgba(255,255,255,.72);color:#0f766e;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:950;text-transform:uppercase;letter-spacing:.08em;}
.trainer-overall-card,.trainer-form-pulse-card{background:rgba(255,255,255,.82);border:1px solid rgba(148,163,184,.28);border-radius:18px;padding:14px;box-shadow:0 12px 28px rgba(15,23,42,.05);}
.trainer-form-pulse-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:10px;}
.trainer-metric-small{border:1px solid rgba(20,184,166,.18);background:linear-gradient(180deg,#ffffff,#f8fafc);border-radius:14px;padding:11px 10px;min-width:0;}
.trainer-metric-small span{display:block;color:#64748b;font-size:10px;text-transform:uppercase;letter-spacing:.14em;font-weight:950;}
.trainer-metric-small strong{display:block;color:#111827;font-size:25px;font-weight:950;line-height:1.1;margin-top:3px;}
.trainer-metric-small em{display:block;color:#334155;font-style:normal;font-size:11px;font-weight:800;line-height:1.35;margin-top:4px;}
.trainer-highlight-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;}
.trainer-highlight-card{background:#fff;border:1px solid rgba(148,163,184,.28);border-left:5px solid var(--trainer-accent,#14b8a6);border-radius:17px;padding:14px 15px;box-shadow:0 13px 30px rgba(15,23,42,.06);min-height:112px;}
.trainer-highlight-card span{display:block;color:#64748b;font-size:10px;text-transform:uppercase;letter-spacing:.16em;font-weight:950;}
.trainer-highlight-card strong{display:block;color:#0f172a;font-size:17px;font-weight:950;line-height:1.15;margin-top:7px;}
.trainer-highlight-card em{display:block;color:#334155;font-size:12px;font-weight:850;font-style:normal;margin-top:8px;line-height:1.35;}
.trainer-highlight-card.partnership{border-left-color:#8b5cf6;}
.trainer-highlight-card.form{border-left-color:#f97316;}
.trainer-stats-basis-banner{border-color:rgba(20,184,166,.24) !important;background:linear-gradient(135deg,#f0fdfa,#eff6ff) !important;}
.trainer-race-actions .horse-profile-action-divider{background:rgba(20,184,166,.35);}
.trainer-exclude-button{border-color:rgba(249,115,22,.35) !important;background:#fff7ed !important;color:#9a3412 !important;}
.trainer-exclude-button.is-excluded{background:#fed7aa !important;color:#7c2d12 !important;}
.trainer-stats-section-stack{display:flex;flex-direction:column;gap:14px;}
.trainer-stats-section-card{border-top:4px solid var(--trainer-accent,#14b8a6);}
.trainer-stats-section-card header h3{letter-spacing:-.02em;}
.trainer-stat-card-stack{display:grid;grid-template-columns:1fr;gap:10px;}
.trainer-stat-row-card{display:grid;grid-template-columns:minmax(240px,.72fr) minmax(520px,1.28fr);gap:14px;align-items:center;background:linear-gradient(90deg,#ffffff 0%,#f8fafc 100%);border:1px solid rgba(148,163,184,.25);border-radius:15px;padding:12px 14px;}
.trainer-stat-row-card.ok{background:linear-gradient(90deg,#ffffff 0%,#f0fdfa 100%);}
.trainer-stat-row-card.no_evidence,.trainer-stat-row-card.no_context{opacity:.7;}
.trainer-stat-row-main span{display:block;color:#64748b;font-size:10px;text-transform:uppercase;letter-spacing:.15em;font-weight:950;}
.trainer-stat-row-main strong{display:block;color:#111827;font-size:15px;font-weight:950;margin-top:4px;}
.trainer-stat-row-main em{display:block;color:#64748b;font-size:11px;font-style:normal;font-weight:700;margin-top:4px;line-height:1.35;}
.trainer-stat-metrics{display:grid;grid-template-columns:repeat(7,minmax(58px,1fr));gap:7px;}
.trainer-stat-metrics div{background:rgba(255,255,255,.86);border:1px solid rgba(148,163,184,.2);border-radius:11px;padding:8px 7px;text-align:center;}
.trainer-stat-metrics span{display:block;color:#64748b;font-size:9px;text-transform:uppercase;letter-spacing:.12em;font-weight:950;}
.trainer-stat-metrics strong{display:block;color:#0f172a;font-size:14px;font-weight:950;margin-top:3px;}
.horse-context-runner-list .trainer-context-runner{min-width:148px;display:flex;flex-direction:column;align-items:flex-start;gap:2px;line-height:1.1;}
.horse-context-runner-list .trainer-context-runner strong{font-size:12px;}
.horse-context-runner-list .trainer-context-runner small{font-size:10px;color:#475569;font-weight:800;white-space:nowrap;}
.horse-context-runner-list .trainer-context-runner.active small{color:#ede9fe;}
.trainer-stats-unavailable .horse-profile-unavailable-card{border-color:rgba(20,184,166,.25);}
.live-runner-actions [data-live-open-trainer-stats]{border-color:rgba(20,184,166,.32);background:#f0fdfa;color:#0f766e;font-weight:900;}
.live-runner-actions [data-live-open-trainer-stats]:hover{background:#ccfbf1;color:#115e59;}
@media (max-width:1400px){.trainer-stats-summary-panel{grid-template-columns:1fr;}.trainer-highlight-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.trainer-stat-row-card{grid-template-columns:1fr;}.trainer-stat-metrics{grid-template-columns:repeat(4,minmax(0,1fr));}}
@media (max-width:760px){.trainer-highlight-grid{grid-template-columns:1fr;}.trainer-form-pulse-grid{grid-template-columns:1fr;}.trainer-stat-metrics{grid-template-columns:repeat(2,minmax(0,1fr));}.trainer-stats-summary-panel{padding:13px;}}

/* === TRAINER-STATS-001A: premium polish, scoped trainer basis and racecard action layout === */
.horse-drilldown-modal-shell.is-trainer-stats .horse-drilldown-modal-header{
  background:linear-gradient(135deg,#0f172a 0%,#134e4a 54%,#0f766e 100%)!important;
  box-shadow:0 10px 26px rgba(15,23,42,.12)!important;
}
.trainer-stats-evidence{
  --trainer-accent:#0f766e;
  --trainer-accent-dark:#115e59;
  --trainer-soft:#ecfdf5;
  --trainer-soft-2:#f0fdfa;
  gap:16px!important;
}
.trainer-stats-summary-panel{
  grid-template-columns:minmax(360px,1.42fr) minmax(360px,.98fr) minmax(330px,.92fr)!important;
  background:linear-gradient(135deg,#f8fffd 0%,#eefbf7 44%,#f8fafc 100%)!important;
  border-color:rgba(15,118,110,.20)!important;
  box-shadow:0 16px 42px rgba(15,23,42,.075)!important;
}
.trainer-summary-main h3{
  font-size:clamp(25px,1.85vw,36px)!important;
  font-weight:920!important;
  letter-spacing:-.035em!important;
}
.trainer-runner-context,
.trainer-summary-main .horse-profile-race-context-line{
  font-weight:780!important;
}
.trainer-overall-card .hp-career-record-inner-v2{
  grid-template-columns:minmax(118px,.72fr) minmax(220px,1.18fr) minmax(112px,.62fr)!important;
}
.trainer-overall-card .hp-career-runs strong{
  font-size:28px!important;
  font-weight:820!important;
}
.trainer-overall-card .hp-career-mid-grid strong{
  font-size:16px!important;
  font-weight:780!important;
}
.trainer-overall-card .hp-career-mid-grid div:nth-child(3) strong,
.trainer-overall-card .hp-career-ae-lead strong{
  font-weight:950!important;
}
.trainer-overall-card .hp-career-ae-lead strong{
  font-size:31px!important;
}
.trainer-form-pulse-card .trainer-metric-small strong{
  font-size:22px!important;
  font-weight:820!important;
}
.trainer-form-pulse-card .trainer-metric-small em{
  font-weight:760!important;
}
.trainer-stats-basis-banner .hp-evidence-basis-action-row{
  align-items:center!important;
}
.trainer-race-actions{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  flex-wrap:wrap!important;
  justify-content:flex-end!important;
}
.trainer-record-scope-buttons{
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  flex-wrap:wrap!important;
}
.trainer-record-scope-buttons button{
  border:1px solid rgba(15,118,110,.22)!important;
  background:#ffffff!important;
  color:#0f766e!important;
  border-radius:999px!important;
  padding:7px 11px!important;
  font-size:11px!important;
  font-weight:950!important;
  letter-spacing:.03em!important;
}
.trainer-record-scope-buttons button.active{
  background:linear-gradient(135deg,#14b8a6,#0f766e)!important;
  color:#ffffff!important;
  border-color:rgba(15,118,110,.44)!important;
  box-shadow:0 8px 18px rgba(15,118,110,.18)!important;
}
.trainer-today-dashboard{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:14px!important;
}
.trainer-today-dashboard .trainer-highlight-card{
  min-height:0!important;
  padding:15px 16px!important;
}
.trainer-today-dashboard .trainer-highlight-card ul{
  margin:8px 0 0!important;
  padding:0!important;
  list-style:none!important;
  display:grid!important;
  gap:7px!important;
}
.trainer-today-dashboard .trainer-highlight-card li{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  border:1px solid rgba(226,232,240,.82)!important;
  background:rgba(255,255,255,.76)!important;
  border-radius:12px!important;
  padding:9px 10px!important;
}
.trainer-highlight-main{display:flex!important;flex-direction:column!important;gap:2px!important;min-width:0!important;}
.trainer-highlight-main strong{font-size:12px!important;font-weight:920!important;color:#0f172a!important;line-height:1.1!important;}
.trainer-highlight-main small{font-size:10px!important;font-weight:760!important;color:#64748b!important;line-height:1.1!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:320px;}
.trainer-today-dashboard .trainer-highlight-card li em{font-size:11px!important;font-weight:850!important;color:#334155!important;font-style:normal!important;white-space:nowrap!important;}
.trainer-stat-row-card{
  grid-template-columns:minmax(240px,.68fr) minmax(560px,1.32fr)!important;
  padding:11px 13px!important;
  background:linear-gradient(90deg,#ffffff 0%,#f8fffd 100%)!important;
}
.trainer-stat-row-main strong{font-weight:850!important;}
.trainer-stat-metrics div{padding:7px 7px!important;}
.trainer-stat-metrics strong{font-size:13px!important;font-weight:720!important;}
.trainer-stat-metrics .is-focus strong{font-weight:950!important;color:#0f172a!important;}
.trainer-stat-row-card.no_evidence,.trainer-stat-row-card.no_context{display:none;}
.horse-drilldown-modal-shell.is-trainer-stats.show-hidden-trainer-checks .trainer-stat-row-card.no_evidence,
.horse-drilldown-modal-shell.is-trainer-stats.show-hidden-trainer-checks .trainer-stat-row-card.no_context{display:grid;}
.live-runner-main{
  grid-template-columns:52px minmax(220px,1fr) minmax(230px,310px) minmax(270px,350px)!important;
  align-items:center!important;
}
.live-runner-profile-actions{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-width:0;
}
.live-runner-profile-actions button{
  border:1px solid rgba(99,102,241,.20);
  border-radius:999px;
  padding:8px 13px;
  background:linear-gradient(135deg,#ffffff,#f8fafc);
  color:#312e81;
  font-size:11px;
  font-weight:950;
  letter-spacing:.02em;
  box-shadow:0 9px 18px rgba(15,23,42,.06);
  white-space:nowrap;
}
.live-runner-profile-actions button[data-live-open-trainer-stats]{
  border-color:rgba(15,118,110,.26);
  color:#0f766e;
  background:linear-gradient(135deg,#ffffff,#ecfdf5);
}
.live-runner-profile-actions button:not(:disabled):hover{
  transform:translateY(-1px);
  box-shadow:0 12px 24px rgba(15,23,42,.10);
}
.live-runner-profile-actions button:disabled{opacity:.46;cursor:not-allowed;box-shadow:none;}
.live-trainer-link{
  appearance:none;
  border:0;
  background:transparent;
  padding:0;
  margin:0;
  color:#0f766e;
  font:inherit;
  font-weight:900;
  cursor:pointer;
  text-decoration:none;
  border-bottom:1px solid rgba(15,118,110,.30);
}
.live-trainer-link:hover{color:#115e59;border-bottom-color:#115e59;}
.live-runner-secondary{grid-template-columns:minmax(140px,1fr) 220px 140px!important;}
.live-runner-actions{justify-content:flex-end!important;}
@media(max-width:1280px){
  .live-runner-main{grid-template-columns:54px 1fr!important;}
  .live-runner-profile-actions,.live-runner-people.compact{grid-column:2;justify-content:flex-start;}
  .trainer-today-dashboard{grid-template-columns:1fr!important;}
}
@media(max-width:760px){
  .trainer-record-scope-buttons{width:100%;justify-content:flex-start!important;}
  .trainer-race-actions{justify-content:flex-start!important;}
  .live-runner-profile-actions{flex-wrap:wrap;}
}
.trainer-highlight-main{text-transform:none!important;letter-spacing:0!important;color:inherit!important;}

/* === TRAINER-STATS-001B: header readability and trainer-summary horse link === */
.horse-drilldown-modal-shell.is-trainer-stats .horse-drilldown-modal-header h2{
  color:#ffffff!important;
  text-shadow:0 2px 16px rgba(0,0,0,.24)!important;
}
.horse-drilldown-modal-shell.is-trainer-stats .horse-drilldown-modal-header p{
  color:rgba(226,232,240,.86)!important;
}
.horse-drilldown-modal-shell.is-trainer-stats .horse-drilldown-actions .horse-drilldown-ghost,
.horse-drilldown-modal-shell.is-trainer-stats .horse-drilldown-actions .hp-hidden-top-toggle{
  border-color:rgba(255,255,255,.18)!important;
  background:rgba(255,255,255,.08)!important;
  color:#f8fafc!important;
  box-shadow:none!important;
}
.horse-drilldown-modal-shell.is-trainer-stats .horse-drilldown-actions .horse-drilldown-ghost:hover,
.horse-drilldown-modal-shell.is-trainer-stats .horse-drilldown-actions .hp-hidden-top-toggle:hover{
  background:rgba(255,255,255,.16)!important;
  border-color:rgba(255,255,255,.34)!important;
}
.horse-drilldown-modal-shell.is-trainer-stats .horse-drilldown-actions .horse-drilldown-back-racecard{
  background:#ffffff!important;
  color:#0f172a!important;
  border-color:rgba(255,255,255,.72)!important;
  box-shadow:0 12px 24px rgba(0,0,0,.16)!important;
}
.horse-drilldown-modal-shell.is-trainer-stats .horse-drilldown-close{
  background:rgba(255,255,255,.11)!important;
  color:#ffffff!important;
  border-color:rgba(255,255,255,.20)!important;
}
.trainer-summary-horse-link{
  appearance:none;
  border:0;
  background:transparent;
  padding:0;
  margin:0;
  color:#334155;
  font:inherit;
  font-weight:950;
  cursor:pointer;
  text-decoration:none;
  border-bottom:1px solid rgba(15,118,110,.32);
}
.trainer-summary-horse-link:hover{
  color:#0f766e;
  border-bottom-color:#0f766e;
}

/* === LIVE-SIRE-003A — Sire Stats overlay + shared exclude polish === */
.horse-profile-exclude-button:not(:disabled){
  transition:transform .14s ease, box-shadow .14s ease, background-color .14s ease, border-color .14s ease, color .14s ease;
}
.horse-profile-exclude-button:not(:disabled):hover{
  transform:translateY(-2px);
  box-shadow:0 10px 24px rgba(154,52,18,.18);
}
.horse-profile-exclude-button:not(:disabled):active{
  transform:translateY(0);
}
.horse-drilldown-modal-shell.is-sire-stats .horse-drilldown-modal-header{
  background:linear-gradient(135deg,#111827 0%,#312e81 48%,#7c3aed 100%);
}
.horse-drilldown-modal-shell.is-sire-stats .horse-drilldown-kicker{color:#ddd6fe;}
.sire-stats-evidence{--sire-accent:#7c3aed;--sire-accent-dark:#5b21b6;--sire-soft:#f5f3ff;--sire-soft-2:#eef2ff;--sire-line:#c4b5fd;display:flex;flex-direction:column;gap:18px;}
.sire-stats-summary-panel{background:linear-gradient(135deg,#f5f3ff 0%,#eff6ff 52%,#f0fdfa 100%);border-color:rgba(124,58,237,.22);}
.sire-kicker{color:#5b21b6 !important;letter-spacing:.22em;}
.sire-summary-main h3{color:#111827;}
.sire-baseline-card{border-color:rgba(124,58,237,.24);}
.sire-stats-basis-banner{border-color:rgba(124,58,237,.24) !important;background:linear-gradient(135deg,#f5f3ff,#eff6ff) !important;}
.sire-race-actions .horse-profile-action-divider{background:rgba(124,58,237,.35);}
.sire-exclude-button{border-color:rgba(249,115,22,.35) !important;background:#fff7ed !important;color:#9a3412 !important;}
.sire-exclude-button.is-excluded{background:#fee2e2 !important;border-color:#fca5a5 !important;color:#991b1b !important;}
.sire-context-runner strong{color:#312e81;}
.sire-context-runner.active strong{color:#fff;}
.sire-stats-section-card{border-top:4px solid var(--sire-accent,#7c3aed);}
.sire-stats-table .sire-stat-row.weak_zero,
.sire-stats-table .sire-stat-row.weak_win_pct,
.sire-stats-table .sire-stat-row.weak_ae{background:linear-gradient(90deg,#fff 0%,#fff1f2 100%);}
.sire-stats-table .sire-stat-row.limited,
.sire-stats-table .sire-stat-row.very_limited{opacity:.82;}
.sire-today-dashboard{grid-template-columns:repeat(3,minmax(0,1fr));}
.sire-today-dashboard .sire-weak-card{border-left-color:#ef4444;}
.sire-today-dashboard .sire-drop-card{border-left-color:#f97316;}
.sire-today-dashboard .sire-lift-card{border-left-color:#22c55e;}
.sire-baseline-tooltip{display:block;margin-top:5px;color:#475569;font-size:11px;font-weight:750;line-height:1.35;}
.sire-stats-basis-buttons button.is-disabled,
.sire-stats-basis-buttons button:disabled{
  opacity:.56;
  cursor:not-allowed;
  filter:grayscale(.25);
}
.sire-stats-basis-buttons button.is-disabled:hover,
.sire-stats-basis-buttons button:disabled:hover{
  transform:none !important;
  box-shadow:none !important;
}

/* === LIVE-SIRE-003B — visual alignment with Horse Profile === */
.horse-drilldown-modal-shell.is-sire-stats .hp-evidence-basis-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
.horse-drilldown-modal-shell.is-sire-stats .hp-evidence-basis-button{
  min-height:34px;
  padding:7px 12px;
  border-radius:999px;
}
.horse-drilldown-modal-shell.is-sire-stats .hp-evidence-basis-button.is-disabled,
.horse-drilldown-modal-shell.is-sire-stats .hp-evidence-basis-button:disabled{
  opacity:.48;
  cursor:not-allowed;
  filter:grayscale(.35);
  background:rgba(255,255,255,.78);
  color:#64748b;
}
.horse-drilldown-modal-shell.is-sire-stats .hp-evidence-basis-button.is-disabled:hover,
.horse-drilldown-modal-shell.is-sire-stats .hp-evidence-basis-button:disabled:hover{
  transform:none!important;
  box-shadow:0 8px 18px rgba(15,23,42,.055)!important;
  border-color:rgba(148,163,184,.40)!important;
  color:#64748b!important;
}
.horse-drilldown-modal-shell.is-sire-stats .hp-evidence-basis-action-row{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
.sire-today-dashboard{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.sire-today-dashboard .hp-highlight-card li button{
  width:100%;
}
.sire-stats-table .horse-profile-stat-label{
  letter-spacing:.01em;
}
.sire-stats-table .horse-profile-stat-label + small{
  max-width:520px;
  white-space:normal;
}
.sire-stats-table .hp-small-sample-label em:empty{
  display:none;
}


/* === LIVE-SIRE-003C — Sire Stats rule/formatting polish and shared runner-chip state === */
.horse-context-runner-list button{
  position:relative;
}
.horse-context-runner-list .horse-profile-context-runner strong,
.horse-context-runner-list .trainer-context-runner strong{
  max-width:100%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.horse-context-runner-list button.is-context-excluded{
  border-color:rgba(248,113,113,.72)!important;
  background:linear-gradient(135deg,#fff7f7,#fee2e2)!important;
  color:#7f1d1d!important;
  opacity:.88;
}
.horse-context-runner-list button.is-context-excluded strong,
.horse-context-runner-list button.is-context-excluded small{
  color:#7f1d1d!important;
}
.horse-context-runner-list button.active.is-context-excluded{
  background:linear-gradient(135deg,#7f1d1d,#dc2626)!important;
  border-color:rgba(248,113,113,.90)!important;
  color:#ffffff!important;
  box-shadow:0 12px 26px rgba(220,38,38,.26)!important;
}
.horse-context-runner-list button.active.is-context-excluded strong,
.horse-context-runner-list button.active.is-context-excluded small{
  color:#ffffff!important;
}
.context-excluded-pill{
  position:absolute;
  right:7px;
  top:5px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:14px;
  padding:1px 5px;
  border-radius:999px;
  background:#991b1b;
  color:#ffffff!important;
  font-size:8px!important;
  line-height:1;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-weight:950;
  pointer-events:none;
}
.horse-context-runner-list button.is-context-excluded strong{
  padding-right:52px;
}

.horse-drilldown-modal-shell.is-sire-stats .sire-stats-table{
  table-layout:fixed;
  min-width:1580px!important;
}
.horse-drilldown-modal-shell.is-sire-stats .sire-stats-table th:first-child,
.horse-drilldown-modal-shell.is-sire-stats .sire-stats-table td:first-child{
  width:290px!important;
  max-width:290px!important;
}
.horse-drilldown-modal-shell.is-sire-stats .sire-stats-table .horse-profile-stat-label{
  display:block;
  max-width:260px;
  white-space:normal!important;
  overflow-wrap:anywhere;
  line-height:1.16;
}
.horse-drilldown-modal-shell.is-sire-stats .sire-stats-table .horse-profile-stat-label + small{
  display:block;
  max-width:260px!important;
  white-space:normal!important;
  overflow-wrap:anywhere;
  line-height:1.18;
}
.horse-drilldown-modal-shell.is-sire-stats .sire-stats-table .sire-wvexp-cell{
  font-weight:760!important;
  color:#334155!important;
}
.horse-drilldown-modal-shell.is-sire-stats .sire-stats-table .sire-stat-row.weak_zero > th,
.horse-drilldown-modal-shell.is-sire-stats .sire-stats-table .sire-stat-row.weak_zero > td,
.horse-drilldown-modal-shell.is-sire-stats .sire-stats-table .sire-stat-row.weak_win_pct > th,
.horse-drilldown-modal-shell.is-sire-stats .sire-stats-table .sire-stat-row.weak_win_pct > td,
.horse-drilldown-modal-shell.is-sire-stats .sire-stats-table .sire-stat-row.weak_ae > th,
.horse-drilldown-modal-shell.is-sire-stats .sire-stats-table .sire-stat-row.weak_ae > td{
  background:linear-gradient(90deg,rgba(254,226,226,.98) 0%,rgba(255,241,242,.96) 54%,rgba(255,247,237,.88) 100%)!important;
}
.horse-drilldown-modal-shell.is-sire-stats .sire-stats-table .sire-stat-row.weak_zero > th,
.horse-drilldown-modal-shell.is-sire-stats .sire-stats-table .sire-stat-row.weak_win_pct > th,
.horse-drilldown-modal-shell.is-sire-stats .sire-stats-table .sire-stat-row.weak_ae > th{
  border-left:4px solid rgba(220,38,38,.82)!important;
}
.sire-today-dashboard .hp-highlight-card li button{
  grid-template-columns:minmax(0,1.4fr) auto;
  align-items:center;
}
.sire-today-dashboard .hp-highlight-main strong{
  white-space:normal!important;
  overflow-wrap:anywhere;
  line-height:1.13!important;
}
.sire-today-dashboard .hp-highlight-main small{
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.sire-today-dashboard .hp-highlight-card li em{
  white-space:normal!important;
  line-height:1.16!important;
  max-width:260px;
}
@media(max-width:1200px){
  .sire-today-dashboard .hp-highlight-card li button{grid-template-columns:1fr;}
  .sire-today-dashboard .hp-highlight-card li em{text-align:left;max-width:none;}
}


/* === DESIGN_SYSTEM_001A — wording, modal-header, tooltip and runner-strip baseline ===
   Scope: visual/state clarity only. No schema, endpoint or racecard logic changes. */
.horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-modal-header,
.horse-drilldown-modal-shell.is-trainer-stats .horse-drilldown-modal-header,
.horse-drilldown-modal-shell.is-sire-stats .horse-drilldown-modal-header{
  background:linear-gradient(135deg,var(--ds-modal-header-start,#0f172a),var(--ds-modal-header-end,#334155))!important;
  border-bottom:1px solid rgba(255,255,255,.16)!important;
  box-shadow:0 16px 34px rgba(15,23,42,.18)!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
.horse-drilldown-modal-shell.is-horse-profile{--ds-modal-header-start:#0f172a;--ds-modal-header-end:#2563eb;}
.horse-drilldown-modal-shell.is-trainer-stats{--ds-modal-header-start:#052e2b;--ds-modal-header-end:#0f766e;}
.horse-drilldown-modal-shell.is-sire-stats{--ds-modal-header-start:#111827;--ds-modal-header-end:#7c3aed;}
.horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-kicker,
.horse-drilldown-modal-shell.is-trainer-stats .horse-drilldown-kicker,
.horse-drilldown-modal-shell.is-sire-stats .horse-drilldown-kicker{
  color:rgba(219,234,254,.92)!important;
}
.horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-modal-header h2,
.horse-drilldown-modal-shell.is-trainer-stats .horse-drilldown-modal-header h2,
.horse-drilldown-modal-shell.is-sire-stats .horse-drilldown-modal-header h2{
  color:#ffffff!important;
  text-shadow:0 2px 16px rgba(0,0,0,.25)!important;
}
.horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-modal-header p,
.horse-drilldown-modal-shell.is-trainer-stats .horse-drilldown-modal-header p,
.horse-drilldown-modal-shell.is-sire-stats .horse-drilldown-modal-header p{
  color:rgba(241,245,249,.88)!important;
}
.horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-actions .horse-drilldown-ghost,
.horse-drilldown-modal-shell.is-trainer-stats .horse-drilldown-actions .horse-drilldown-ghost,
.horse-drilldown-modal-shell.is-sire-stats .horse-drilldown-actions .horse-drilldown-ghost,
.horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-actions .hp-hidden-top-toggle,
.horse-drilldown-modal-shell.is-trainer-stats .horse-drilldown-actions .hp-hidden-top-toggle,
.horse-drilldown-modal-shell.is-sire-stats .horse-drilldown-actions .hp-hidden-top-toggle{
  background:rgba(255,255,255,.10)!important;
  border-color:rgba(255,255,255,.24)!important;
  color:#f8fafc!important;
  box-shadow:none!important;
}
.horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-actions .horse-drilldown-ghost:hover,
.horse-drilldown-modal-shell.is-trainer-stats .horse-drilldown-actions .horse-drilldown-ghost:hover,
.horse-drilldown-modal-shell.is-sire-stats .horse-drilldown-actions .horse-drilldown-ghost:hover,
.horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-actions .hp-hidden-top-toggle:hover,
.horse-drilldown-modal-shell.is-trainer-stats .horse-drilldown-actions .hp-hidden-top-toggle:hover,
.horse-drilldown-modal-shell.is-sire-stats .horse-drilldown-actions .hp-hidden-top-toggle:hover{
  background:rgba(255,255,255,.18)!important;
  border-color:rgba(255,255,255,.42)!important;
}
.horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-actions .horse-drilldown-back-racecard,
.horse-drilldown-modal-shell.is-trainer-stats .horse-drilldown-actions .horse-drilldown-back-racecard,
.horse-drilldown-modal-shell.is-sire-stats .horse-drilldown-actions .horse-drilldown-back-racecard{
  background:#ffffff!important;
  color:#0f172a!important;
  border-color:rgba(255,255,255,.86)!important;
  box-shadow:0 12px 24px rgba(0,0,0,.16)!important;
}
.horse-drilldown-modal-shell.is-horse-profile .horse-drilldown-close,
.horse-drilldown-modal-shell.is-trainer-stats .horse-drilldown-close,
.horse-drilldown-modal-shell.is-sire-stats .horse-drilldown-close{
  background:rgba(255,255,255,.12)!important;
  color:#ffffff!important;
  border-color:rgba(255,255,255,.25)!important;
}
.global-report-tooltip{
  background:linear-gradient(180deg,#eff6ff,#dbeafe)!important;
  color:#0f172a!important;
  border:1px solid rgba(59,130,246,.30)!important;
  border-radius:13px!important;
  box-shadow:0 18px 46px rgba(15,23,42,.20)!important;
  font-size:12px!important;
  line-height:1.42!important;
  font-weight:750!important;
}
.global-report-tooltip::before{
  border-bottom-color:#dbeafe!important;
  border-top-color:#dbeafe!important;
}
.report-help-trigger,
.info-dot,
.help-icon{
  transition:transform .10s ease, box-shadow .10s ease, background-color .10s ease, border-color .10s ease!important;
}
.report-help-trigger:hover,
.info-dot:hover,
.help-icon:hover,
.report-help-trigger:focus-visible,
.info-dot:focus-visible,
.help-icon:focus-visible{
  transform:translateY(-1px);
}
.live-manual-warning-popover{
  background:linear-gradient(180deg,#fff7ed,#ffedd5)!important;
  border-color:rgba(249,115,22,.38)!important;
  color:#7c2d12!important;
  box-shadow:0 22px 50px rgba(154,52,18,.20)!important;
}
.live-manual-warning-popover strong{color:#7c2d12!important;}
.horse-context-runner-list button{
  min-width:136px;
  max-width:192px;
  min-height:48px;
  padding:11px 14px 9px!important;
}
.horse-context-runner-list button strong,
.horse-context-runner-list button small{
  display:block;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.horse-context-runner-list button.is-context-excluded,
.horse-context-runner-list button.is-context-non-runner{
  padding-top:19px!important;
}
.horse-context-runner-list button.is-context-non-runner{
  border-color:rgba(100,116,139,.48)!important;
  background:linear-gradient(135deg,#f8fafc,#e2e8f0)!important;
  color:#475569!important;
  opacity:.82;
  cursor:not-allowed!important;
  filter:grayscale(.15);
}
.horse-context-runner-list button.is-context-non-runner strong,
.horse-context-runner-list button.is-context-non-runner small{
  color:#475569!important;
}
.horse-context-runner-list button.active.is-context-non-runner{
  background:linear-gradient(135deg,#334155,#64748b)!important;
  color:#ffffff!important;
  box-shadow:0 12px 26px rgba(51,65,85,.24)!important;
}
.horse-context-runner-list button.active.is-context-non-runner strong,
.horse-context-runner-list button.active.is-context-non-runner small{color:#ffffff!important;}
.context-status-pill,
.context-excluded-pill,
.context-non-runner-pill{
  position:absolute;
  right:7px;
  top:4px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  max-width:calc(100% - 14px);
  min-height:15px;
  padding:2px 6px;
  border-radius:999px;
  color:#ffffff!important;
  font-size:8px!important;
  line-height:1;
  letter-spacing:.075em;
  text-transform:uppercase;
  font-weight:950;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  pointer-events:none;
}
.context-excluded-pill{background:#991b1b;}
.context-non-runner-pill{background:#475569;}
.horse-context-runner-list button.is-context-excluded strong,
.horse-context-runner-list button.is-context-non-runner strong{
  padding-right:82px;
}
.horse-context-runner-list button.is-context-excluded small,
.horse-context-runner-list button.is-context-non-runner small{
  padding-right:28px;
}
.hp-evidence-basis-button:disabled,
.hp-evidence-basis-button.is-disabled,
.horse-profile-basis-buttons button:disabled,
.horse-profile-basis-buttons button.is-disabled{
  cursor:not-allowed!important;
  opacity:.56!important;
  filter:grayscale(.28)!important;
}
.hp-evidence-basis-button:disabled:hover,
.hp-evidence-basis-button.is-disabled:hover,
.horse-profile-basis-buttons button:disabled:hover,
.horse-profile-basis-buttons button.is-disabled:hover{
  transform:none!important;
  box-shadow:none!important;
}

/* === DESIGN_SYSTEM_001B — evidence visibility + non-runner runner-strip refinement === */
.horse-context-runner-list button.is-context-non-runner{
  position:relative!important;
  overflow:hidden!important;
  padding:11px 14px 9px!important;
  border-color:rgba(100,116,139,.42)!important;
  background:linear-gradient(135deg,#f8fafc 0%,#eef2f7 100%)!important;
  color:#475569!important;
  opacity:.78;
  cursor:not-allowed!important;
  filter:grayscale(.18);
}
.horse-context-runner-list button.is-context-non-runner::after{
  content:"NON-RUNNER";
  position:absolute;
  left:50%;
  top:50%;
  z-index:0;
  transform:translate(-50%,-50%) rotate(-12deg);
  font-size:15px;
  line-height:1;
  font-weight:950;
  letter-spacing:.12em;
  color:rgba(71,85,105,.18);
  white-space:nowrap;
  pointer-events:none;
}
.horse-context-runner-list button.is-context-non-runner strong,
.horse-context-runner-list button.is-context-non-runner small{
  position:relative;
  z-index:1;
  padding-right:0!important;
  color:#475569!important;
}
.horse-context-runner-list button.active.is-context-non-runner{
  background:linear-gradient(135deg,#475569,#64748b)!important;
  border-color:rgba(100,116,139,.72)!important;
  box-shadow:0 10px 22px rgba(71,85,105,.20)!important;
}
.horse-context-runner-list button.active.is-context-non-runner::after{
  color:rgba(255,255,255,.20);
}
.horse-context-runner-list button.active.is-context-non-runner strong,
.horse-context-runner-list button.active.is-context-non-runner small{
  color:#ffffff!important;
}
.context-non-runner-pill{
  display:none!important;
}

.hp-polished-section footer{
  color:#475569;
}

/* === DESIGN_SYSTEM_001C — evidence workspace refinement ===
   Scope: evidence workspace visual refinement only. No endpoint, schema or racecard logic changes. */
.horse-context-runner-list button.is-context-excluded,
.horse-context-runner-list button.is-context-non-runner{
  position:relative!important;
  overflow:hidden!important;
  padding:11px 14px 9px!important;
}
.horse-context-runner-list button.is-context-excluded{
  border-color:rgba(185,28,28,.34)!important;
  background:linear-gradient(135deg,#fff7f7 0%,#fee2e2 100%)!important;
  color:#7f1d1d!important;
  opacity:.86;
}
.horse-context-runner-list button.is-context-excluded::after{
  content:"EXCLUDED";
  position:absolute;
  left:50%;
  top:50%;
  z-index:2;
  transform:translate(-50%,-50%) rotate(-12deg);
  font-size:15px;
  line-height:1;
  font-weight:950;
  letter-spacing:.14em;
  color:rgba(153,27,27,.18);
  white-space:nowrap;
  pointer-events:none;
}
.horse-context-runner-list button.is-context-non-runner::after{
  z-index:2!important;
  color:rgba(71,85,105,.18)!important;
}
.horse-context-runner-list button.active.is-context-excluded{
  background:linear-gradient(135deg,#7f1d1d,#dc2626)!important;
  border-color:rgba(248,113,113,.78)!important;
  color:#ffffff!important;
  box-shadow:0 10px 22px rgba(220,38,38,.22)!important;
}
.horse-context-runner-list button.active.is-context-excluded::after{
  color:rgba(255,255,255,.18)!important;
}
.horse-context-runner-list button.is-context-excluded strong,
.horse-context-runner-list button.is-context-excluded small,
.horse-context-runner-list button.is-context-non-runner strong,
.horse-context-runner-list button.is-context-non-runner small{
  position:relative;
  z-index:1;
  padding-right:0!important;
}
.horse-context-runner-list button.active.is-context-excluded strong,
.horse-context-runner-list button.active.is-context-excluded small{
  color:#ffffff!important;
}
.context-excluded-pill,
.context-non-runner-pill{
  display:none!important;
}

.horse-drilldown-modal-shell:not(.fullscreen).is-horse-profile .horse-profile-highlights.hp-highlight-dashboard-c6,
.horse-drilldown-modal-shell:not(.fullscreen).is-trainer-stats .horse-profile-highlights.hp-highlight-dashboard-c6,
.horse-drilldown-modal-shell:not(.fullscreen).is-sire-stats .horse-profile-highlights.hp-highlight-dashboard-c6,
.horse-drilldown-modal-shell:not(.fullscreen).is-sire-stats .sire-today-dashboard{
  grid-template-columns:1fr!important;
}
.horse-drilldown-modal-shell:not(.fullscreen).is-horse-profile .hp-highlight-dashboard-c6 .hp-highlight-pair,
.horse-drilldown-modal-shell:not(.fullscreen).is-trainer-stats .hp-highlight-dashboard-c6 .hp-highlight-pair,
.horse-drilldown-modal-shell:not(.fullscreen).is-sire-stats .hp-highlight-dashboard-c6 .hp-highlight-pair{
  grid-template-columns:1fr!important;
}
.horse-drilldown-modal-shell:not(.fullscreen).is-sire-stats .hp-highlight-dashboard-c6 .hp-highlight-delta-group,
.horse-drilldown-modal-shell:not(.fullscreen).is-horse-profile .hp-highlight-dashboard-c6 .hp-highlight-delta-group,
.horse-drilldown-modal-shell:not(.fullscreen).is-trainer-stats .hp-highlight-dashboard-c6 .hp-highlight-delta-group{
  padding-left:0!important;
  border-left:0!important;
  border-top:1px solid rgba(100,116,139,.18)!important;
  padding-top:12px!important;
}
.horse-drilldown-modal-shell:not(.fullscreen).is-sire-stats .sire-today-dashboard .hp-highlight-card{
  min-height:0!important;
}
.horse-drilldown-modal-shell:not(.fullscreen).is-sire-stats .sire-today-dashboard .hp-highlight-card li button{
  grid-template-columns:1fr!important;
}
.horse-drilldown-modal-shell:not(.fullscreen).is-sire-stats .sire-today-dashboard .hp-highlight-card li em{
  text-align:left!important;
  max-width:none!important;
}
.sire-sample-warning{
  margin-top:-2px;
  margin-bottom:12px;
}
.horse-drilldown-modal-shell.is-sire-stats .sire-stats-table .hp-low-sample-warning{
  display:none!important;
}

/* === DESIGN_SYSTEM_001D — Sire Stats wording and header-card refinement ===
   Scope: Sire Stats visual/wording refinement only. No endpoint, schema or racecard logic changes. */
.horse-drilldown-modal-shell.is-sire-stats .sire-stats-summary-panel{
  grid-template-columns:minmax(0,1fr) minmax(560px,640px)!important;
  align-items:center!important;
  gap:22px!important;
}
.horse-drilldown-modal-shell.is-sire-stats .sire-summary-main{
  min-width:0!important;
}
.horse-drilldown-modal-shell.is-sire-stats .sire-baseline-card{
  justify-self:end!important;
  width:100%!important;
  max-width:640px!important;
  min-width:0!important;
  overflow:visible!important;
  padding:16px 18px!important;
}
.horse-drilldown-modal-shell.is-sire-stats .sire-baseline-card .hp-career-head{
  align-items:flex-start!important;
  gap:16px!important;
}
.horse-drilldown-modal-shell.is-sire-stats .sire-baseline-card .hp-career-head span{
  max-width:240px!important;
  line-height:1.18!important;
}
.horse-drilldown-modal-shell.is-sire-stats .sire-baseline-card .hp-career-head em{
  text-align:right!important;
  max-width:220px!important;
  line-height:1.18!important;
}
.horse-drilldown-modal-shell.is-sire-stats .sire-baseline-card .hp-career-record-inner-v2{
  grid-template-columns:minmax(128px,.72fr) minmax(250px,1.22fr) minmax(148px,.78fr)!important;
  gap:12px!important;
}
.horse-drilldown-modal-shell.is-sire-stats .sire-baseline-card .hp-career-ae-lead{
  min-width:142px!important;
  overflow:visible!important;
}
.horse-drilldown-modal-shell.is-sire-stats .sire-baseline-card .hp-career-ae-lead strong{
  font-size:clamp(30px,2.15vw,38px)!important;
  letter-spacing:-.035em!important;
  white-space:nowrap!important;
}
.horse-drilldown-modal-shell.is-sire-stats .sire-baseline-card .hp-career-runs strong{
  font-size:clamp(30px,2.15vw,38px)!important;
  letter-spacing:-.035em!important;
}
.horse-drilldown-modal-shell.is-sire-stats .sire-baseline-card .hp-career-mid-grid{
  grid-template-columns:repeat(2,minmax(108px,1fr))!important;
}
.horse-drilldown-modal-shell.is-sire-stats .sire-baseline-card .hp-career-mid-grid div{
  min-width:0!important;
}
.horse-drilldown-modal-shell.is-sire-stats .sire-baseline-card .hp-career-mid-grid strong{
  white-space:nowrap!important;
}
@media (max-width:1180px){
  .horse-drilldown-modal-shell.is-sire-stats .sire-stats-summary-panel{
    grid-template-columns:1fr!important;
  }
  .horse-drilldown-modal-shell.is-sire-stats .sire-baseline-card{
    justify-self:stretch!important;
    max-width:none!important;
  }
}
@media (max-width:760px){
  .horse-drilldown-modal-shell.is-sire-stats .sire-baseline-card .hp-career-record-inner-v2{
    grid-template-columns:1fr!important;
  }
  .horse-drilldown-modal-shell.is-sire-stats .sire-baseline-card .hp-career-head{
    flex-direction:column!important;
    align-items:flex-start!important;
  }
  .horse-drilldown-modal-shell.is-sire-stats .sire-baseline-card .hp-career-head em{
    text-align:left!important;
  }
}


/* === DESIGN_SYSTEM_001E: evidence table wording/readability refinement === */
.sire-stats-table .horse-profile-stat-label{
  max-width:100%!important;
  white-space:normal!important;
  line-height:1.12!important;
  letter-spacing:-.01em!important;
}
.sire-stats-table tbody th{
  min-width:310px!important;
  max-width:440px!important;
}
.sire-stats-table tbody th small{
  display:inline-block!important;
  width:auto!important;
  max-width:100%!important;
  white-space:normal!important;
  line-height:1.18!important;
  padding:4px 9px!important;
  border-radius:999px!important;
}

/* === DESIGN_SYSTEM_001F: evidence table layout and metric-density standard ===
   Scope: evidence table readability only. No endpoint, schema, evidence or racecard logic changes. */
.horse-profile-stat-table.hp-comparison-table-v2{
  table-layout:fixed!important;
  width:max-content!important;
  min-width:1620px!important;
  max-width:none!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 col.hp-col-check{
  width:520px!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 col.hp-col-metric{
  width:66px!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 col.hp-col-delta{
  width:82px!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:first-child th:first-child,
.horse-profile-stat-table.hp-comparison-table-v2 tbody th{
  width:520px!important;
  min-width:520px!important;
  max-width:520px!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th,
.horse-profile-stat-table.hp-comparison-table-v2 tbody td{
  width:66px!important;
  min-width:66px!important;
  max-width:66px!important;
  padding-left:6px!important;
  padding-right:6px!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th.hp-head-diff,
.horse-profile-stat-table.hp-comparison-table-v2 tbody td.hp-delta-single,
.horse-profile-stat-table.hp-comparison-table-v2 tbody td.hp-delta{
  width:82px!important;
  min-width:82px!important;
  max-width:82px!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 tbody th{
  padding:14px 18px!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .horse-profile-stat-label{
  display:block!important;
  max-width:100%!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  font-size:14px!important;
  line-height:1.14!important;
  letter-spacing:-.015em!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 tbody th small{
  display:inline-block!important;
  max-width:100%!important;
  white-space:normal!important;
  line-height:1.18!important;
  margin-top:7px!important;
  padding:4px 10px!important;
  border-radius:999px!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-num,
.horse-profile-stat-table.hp-comparison-table-v2 tbody td{
  font-variant-numeric:tabular-nums!important;
  white-space:nowrap!important;
}
.horse-profile-table-wrap{
  overflow-x:auto!important;
}
.trainer-stat-row-card{
  grid-template-columns:minmax(360px,.92fr) minmax(500px,1.08fr)!important;
}
.trainer-stat-row-main strong{
  font-size:15px!important;
  line-height:1.18!important;
}
.trainer-stat-row-main em{
  max-width:520px!important;
}
.trainer-stat-metrics{
  grid-template-columns:repeat(7,minmax(62px,78px))!important;
  justify-content:end!important;
}
@media (max-width:1500px){
  .horse-profile-stat-table.hp-comparison-table-v2{
    min-width:1540px!important;
  }
  .horse-profile-stat-table.hp-comparison-table-v2 col.hp-col-check,
  .horse-profile-stat-table.hp-comparison-table-v2 thead tr:first-child th:first-child,
  .horse-profile-stat-table.hp-comparison-table-v2 tbody th{
    width:460px!important;
    min-width:460px!important;
    max-width:460px!important;
  }
}
@media (max-width:1100px){
  .trainer-stat-row-card{grid-template-columns:1fr!important;}
  .trainer-stat-metrics{justify-content:stretch!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;}
}

/* === DESIGN_SYSTEM_001G: grouped responsive evidence-table layout ===
   Scope: remove evidence-table horizontal scrolling and balance metric density.
   No endpoint, schema, evidence or racecard logic changes. */
.horse-profile-table-wrap{
  width:100%!important;
  max-width:100%!important;
  overflow-x:hidden!important;
  overflow-y:visible!important;
}
.horse-profile-stat-table.hp-comparison-table-v2{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  table-layout:fixed!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 col.hp-col-check{
  width:30%!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 col.hp-col-metric{
  width:4.5%!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 col.hp-col-delta{
  width:7%!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:first-child th:first-child,
.horse-profile-stat-table.hp-comparison-table-v2 tbody th{
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th,
.horse-profile-stat-table.hp-comparison-table-v2 tbody td,
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th.hp-head-diff,
.horse-profile-stat-table.hp-comparison-table-v2 tbody td.hp-delta-single,
.horse-profile-stat-table.hp-comparison-table-v2 tbody td.hp-delta{
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th,
.horse-profile-stat-table.hp-comparison-table-v2 tbody td{
  padding-left:4px!important;
  padding-right:4px!important;
  font-size:11px!important;
  line-height:1.18!important;
  overflow:hidden!important;
  text-overflow:clip!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:first-child th{
  font-size:11px!important;
  letter-spacing:.105em!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 tbody th{
  padding:13px 16px!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .horse-profile-stat-label{
  font-size:14px!important;
  line-height:1.16!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 tbody th small{
  max-width:100%!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-cell-runs,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-cell-wins,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-cell-places,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-cell-win-pct,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-cell-place-pct,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-cell-ae,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-cell-wve{
  text-align:center!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-cell-wve,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-delta-single{
  font-size:10.5px!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-today,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-zone-today{
  box-shadow:inset 1px 0 rgba(20,184,166,.08)!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-diff,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-delta{
  box-shadow:inset 1px 0 rgba(37,99,235,.12), inset -1px 0 rgba(37,99,235,.12)!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-head-other,
.horse-profile-stat-table.hp-comparison-table-v2 .hp-zone-other,
.horse-profile-stat-table.hp-comparison-table-v2 .other{
  box-shadow:inset 1px 0 rgba(100,116,139,.07)!important;
}
.horse-profile-section-card.hp-polished-section{
  overflow:hidden!important;
}

/* Modal-width evidence tables: protect readability without horizontal bars. */
.horse-drilldown-modal-shell:not(.fullscreen) .horse-profile-stat-table.hp-comparison-table-v2 col.hp-col-check{
  width:34%!important;
}
.horse-drilldown-modal-shell:not(.fullscreen) .horse-profile-stat-table.hp-comparison-table-v2 col.hp-col-metric{
  width:4.15%!important;
}
.horse-drilldown-modal-shell:not(.fullscreen) .horse-profile-stat-table.hp-comparison-table-v2 col.hp-col-delta{
  width:7.9%!important;
}
.horse-drilldown-modal-shell:not(.fullscreen) .horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th,
.horse-drilldown-modal-shell:not(.fullscreen) .horse-profile-stat-table.hp-comparison-table-v2 tbody td{
  padding-left:3px!important;
  padding-right:3px!important;
  font-size:10.25px!important;
}
.horse-drilldown-modal-shell:not(.fullscreen) .horse-profile-stat-table.hp-comparison-table-v2 thead tr:first-child th{
  font-size:10px!important;
  letter-spacing:.09em!important;
}
.horse-drilldown-modal-shell:not(.fullscreen) .horse-profile-stat-table.hp-comparison-table-v2 tbody th{
  padding:12px 13px!important;
}
.horse-drilldown-modal-shell:not(.fullscreen) .horse-profile-stat-table.hp-comparison-table-v2 .horse-profile-stat-label{
  font-size:13px!important;
}
.horse-drilldown-modal-shell:not(.fullscreen) .horse-profile-stat-table.hp-comparison-table-v2 tbody th small{
  font-size:9.5px!important;
  padding:3px 7px!important;
}

/* Fullscreen evidence tables: keep wide layouts balanced; prevent any one metric from ballooning. */
.horse-drilldown-modal-shell.fullscreen .horse-profile-stat-table.hp-comparison-table-v2 col.hp-col-check{
  width:31%!important;
}
.horse-drilldown-modal-shell.fullscreen .horse-profile-stat-table.hp-comparison-table-v2 col.hp-col-metric{
  width:4.4%!important;
}
.horse-drilldown-modal-shell.fullscreen .horse-profile-stat-table.hp-comparison-table-v2 col.hp-col-delta{
  width:7.4%!important;
}
.horse-drilldown-modal-shell.fullscreen .horse-profile-stat-table.hp-comparison-table-v2 tbody td{
  font-size:11px!important;
}

/* Very narrow desktop panels: keep all evidence columns visible rather than adding horizontal scroll. */
@media (max-width:1180px){
  .horse-profile-stat-table.hp-comparison-table-v2 col.hp-col-check{width:36%!important;}
  .horse-profile-stat-table.hp-comparison-table-v2 col.hp-col-metric{width:4%!important;}
  .horse-profile-stat-table.hp-comparison-table-v2 col.hp-col-delta{width:8%!important;}
  .horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th,
  .horse-profile-stat-table.hp-comparison-table-v2 tbody td{font-size:9.5px!important;padding-left:2px!important;padding-right:2px!important;}
  .horse-profile-stat-table.hp-comparison-table-v2 .horse-profile-stat-label{font-size:12px!important;}
  .horse-profile-stat-table.hp-comparison-table-v2 tbody th small{font-size:9px!important;}
}


/* === DESIGN_SYSTEM_001H: racecard base-card visual hierarchy + modal evidence table fit ===
   Scope: Live Racing racecard visual hierarchy and modal-width evidence table fit only.
   No endpoint, schema, evidence, dashboard or advanced-racecard logic changes. */

/* Carry-forward from 001G: in normal modal view the Stats Check column must shrink enough
   for all metric/baseline columns to remain visible without a horizontal scrollbar. */
.horse-drilldown-modal-shell:not(.fullscreen) .horse-profile-table-wrap{
  overflow-x:hidden!important;
}
.horse-drilldown-modal-shell:not(.fullscreen) .horse-profile-stat-table.hp-comparison-table-v2{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  table-layout:fixed!important;
}
.horse-drilldown-modal-shell:not(.fullscreen) .horse-profile-stat-table.hp-comparison-table-v2 col.hp-col-check{
  width:27.5%!important;
}
.horse-drilldown-modal-shell:not(.fullscreen) .horse-profile-stat-table.hp-comparison-table-v2 col.hp-col-metric{
  width:4.72%!important;
}
.horse-drilldown-modal-shell:not(.fullscreen) .horse-profile-stat-table.hp-comparison-table-v2 col.hp-col-delta{
  width:6.42%!important;
}
.horse-drilldown-modal-shell:not(.fullscreen) .horse-profile-stat-table.hp-comparison-table-v2 tbody th{
  padding:11px 10px!important;
}
.horse-drilldown-modal-shell:not(.fullscreen) .horse-profile-stat-table.hp-comparison-table-v2 .horse-profile-stat-label{
  font-size:12.15px!important;
  line-height:1.13!important;
}
.horse-drilldown-modal-shell:not(.fullscreen) .horse-profile-stat-table.hp-comparison-table-v2 tbody th small{
  font-size:8.8px!important;
  line-height:1.12!important;
  padding:3px 6px!important;
}
.horse-drilldown-modal-shell:not(.fullscreen) .horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th,
.horse-drilldown-modal-shell:not(.fullscreen) .horse-profile-stat-table.hp-comparison-table-v2 tbody td{
  font-size:9.45px!important;
  padding-left:2px!important;
  padding-right:2px!important;
}
.horse-drilldown-modal-shell:not(.fullscreen) .horse-profile-stat-table.hp-comparison-table-v2 .hp-cell-wve,
.horse-drilldown-modal-shell:not(.fullscreen) .horse-profile-stat-table.hp-comparison-table-v2 .hp-delta-single{
  font-size:9.15px!important;
}

/* Racecard page chrome: make the base card feel deliberate and premium without adding
   advanced overlay tiles/signals. */
.live-racecard-panel{
  border-radius:24px!important;
  border:1px solid rgba(148,163,184,.30)!important;
  background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%)!important;
  box-shadow:0 28px 80px rgba(15,23,42,.14)!important;
}
.live-racecard-nav{
  display:grid!important;
  grid-template-columns:auto minmax(260px,1fr) auto!important;
  gap:14px!important;
  align-items:center!important;
  padding:14px 18px!important;
  background:linear-gradient(135deg,#10203d 0%,#172554 58%,#1e3a8a 100%)!important;
  border-bottom:1px solid rgba(255,255,255,.10)!important;
}
.live-back-button{
  border:1px solid rgba(255,255,255,.24)!important;
  border-radius:999px!important;
  padding:8px 13px!important;
  font-weight:950!important;
  letter-spacing:.01em!important;
  box-shadow:0 10px 22px rgba(15,23,42,.20)!important;
}
.live-meeting-strip{
  justify-content:center!important;
  min-width:0!important;
}
.live-meeting-strip strong{
  color:#e0f2fe!important;
  letter-spacing:.12em!important;
  font-size:11px!important;
}
.live-time-chips{
  scrollbar-width:thin;
}
.live-time-chip{
  border-radius:999px!important;
  padding:6px 10px!important;
  font-size:11px!important;
}
.live-racecard-nav-actions{
  display:flex!important;
  flex-wrap:wrap!important;
  justify-content:flex-end!important;
  gap:8px!important;
}
.live-racecard-nav-actions button{
  border-radius:999px!important;
  font-weight:950!important;
  letter-spacing:.01em!important;
}
.live-racecard-header{
  grid-template-columns:minmax(0,1.1fr) minmax(330px,.72fr)!important;
  gap:22px!important;
  padding:24px 26px!important;
  background:linear-gradient(135deg,#f8fffd 0%,#ffffff 48%,#f3f7ff 100%)!important;
  border-bottom:1px solid rgba(203,213,225,.70)!important;
}
.live-racecard-title-block{
  min-width:0!important;
}
.live-race-date{
  background:#0f766e!important;
  color:#ecfdf5!important;
  border-radius:999px!important;
  padding:5px 10px!important;
  letter-spacing:.045em!important;
  text-transform:uppercase!important;
}
.live-racecard-header h2{
  margin-top:3px!important;
  font-size:34px!important;
  line-height:.98!important;
  color:#0f172a!important;
  letter-spacing:-.055em!important;
}
.live-racecard-header h2 span{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:84px!important;
  margin-right:7px!important;
  padding:4px 10px!important;
  border-radius:14px!important;
  color:#111827!important;
  background:#eef6ff!important;
  border:1px solid rgba(59,130,246,.20)!important;
  font-size:.82em!important;
}
.live-racecard-header p,
.live-race-title-line{
  max-width:980px!important;
  color:#334155!important;
  font-weight:850!important;
}
.live-race-info-strip{
  gap:8px!important;
  margin-top:12px!important;
}
.live-race-info-strip span{
  display:inline-flex!important;
  align-items:center!important;
  border-radius:999px!important;
  background:#eef2ff!important;
  border:1px solid rgba(99,102,241,.14)!important;
  color:#3730a3!important;
  padding:5px 10px!important;
  font-size:11px!important;
  font-weight:950!important;
}
.live-racecard-key-facts{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
  align-self:stretch!important;
}
.live-racecard-key-facts span{
  border-radius:16px!important;
  border:1px solid rgba(203,213,225,.78)!important;
  background:rgba(255,255,255,.82)!important;
  box-shadow:0 12px 26px rgba(15,23,42,.055)!important;
  min-height:54px!important;
  padding:11px 12px!important;
}
.live-racecard-key-facts b{
  color:#64748b!important;
  letter-spacing:.09em!important;
}
.live-going-fact{
  border-color:rgba(20,184,166,.28)!important;
  background:linear-gradient(135deg,#ecfdf5,#ffffff)!important;
}
.live-race-conditions-card{
  margin:18px 26px!important;
  padding:16px 18px!important;
  border-radius:18px!important;
  border:1px solid rgba(148,163,184,.24)!important;
  background:linear-gradient(135deg,#ffffff,#f8fafc)!important;
  box-shadow:0 12px 26px rgba(15,23,42,.045)!important;
}
.live-conditions-topline strong{
  font-size:12px!important;
  letter-spacing:.11em!important;
  text-transform:uppercase!important;
  color:#0f766e!important;
}
.live-conditions-topline span{
  border-radius:999px!important;
  background:#eef2ff!important;
  color:#3730a3!important;
  padding:4px 9px!important;
  font-size:10px!important;
  font-weight:950!important;
}
.live-racecard-mode-tabs{
  display:none!important;
}
.live-racecard-state-strip{
  margin:0 26px 14px!important;
  border-radius:16px!important;
  border:1px solid rgba(203,213,225,.78)!important;
  background:#ffffff!important;
  box-shadow:0 10px 22px rgba(15,23,42,.04)!important;
}
.live-racecard-state-strip span{
  background:#f8fafc!important;
  border:1px solid rgba(226,232,240,.8)!important;
}
.live-runners-table{
  padding:0 26px 28px!important;
}
.live-runner-table-head{
  display:grid!important;
  grid-template-columns:60px 66px minmax(260px,1.2fr) 74px 74px minmax(190px,.72fr) minmax(210px,.82fr) 96px!important;
  gap:10px!important;
  align-items:center!important;
  border:1px solid rgba(203,213,225,.80)!important;
  border-bottom:0!important;
  background:linear-gradient(180deg,#f8fafc,#eef4fb)!important;
  border-radius:18px 18px 0 0!important;
  padding:12px 14px!important;
  color:#475569!important;
}
.live-runner-table-head button,
.live-runner-table-head span{
  font-size:10.5px!important;
  letter-spacing:.10em!important;
}
.live-runner-row{
  position:relative!important;
  border:1px solid rgba(203,213,225,.80)!important;
  border-top:0!important;
  padding:15px 16px!important;
  background:#ffffff!important;
  transition:background .16s ease,box-shadow .16s ease,border-color .16s ease!important;
}
.live-runner-row:hover{
  background:#fbfdff!important;
  box-shadow:inset 4px 0 0 rgba(59,130,246,.28),0 8px 20px rgba(15,23,42,.045)!important;
}
.live-runner-row:last-child{
  border-radius:0 0 18px 18px!important;
}
.live-runner-main{
  grid-template-columns:58px minmax(270px,1.18fr) minmax(270px,.72fr) minmax(260px,.78fr)!important;
  gap:14px!important;
  align-items:center!important;
}
.live-silk-placeholder{
  width:50px!important;
  height:50px!important;
  border-radius:14px!important;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.60),0 10px 20px rgba(15,23,42,.10)!important;
}
.live-runner-titleline{
  gap:8px!important;
  align-items:center!important;
}
.live-runner-number{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:30px!important;
  height:24px!important;
  padding:0 7px!important;
  border-radius:999px!important;
  background:#f1f5f9!important;
  color:#0f172a!important;
  font-size:12px!important;
}
.live-runner-titleline strong{
  font-size:19px!important;
  line-height:1.05!important;
  color:#0f172a!important;
  letter-spacing:-.025em!important;
}
.live-horse-link{
  text-align:left!important;
  max-width:100%!important;
}
.live-runner-subline{
  color:#475569!important;
}
.live-runner-people.compact{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:7px!important;
  padding:10px 12px!important;
  border-radius:14px!important;
  background:#f8fafc!important;
  border:1px solid rgba(226,232,240,.82)!important;
}
.live-runner-people.compact span{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.live-person-label{
  color:#64748b!important;
  letter-spacing:.06em!important;
}
.live-runner-profile-actions{
  justify-content:flex-start!important;
  display:grid!important;
  grid-template-columns:repeat(3,minmax(86px,1fr))!important;
  gap:7px!important;
}
.live-runner-profile-actions button{
  min-height:34px!important;
  padding:7px 9px!important;
  border-radius:11px!important;
  font-size:10.5px!important;
  line-height:1!important;
  text-align:center!important;
}
.live-runner-profile-actions button[data-live-open-horse-profile]{
  border-color:rgba(37,99,235,.26)!important;
  color:#1d4ed8!important;
  background:linear-gradient(135deg,#ffffff,#eff6ff)!important;
}
.live-runner-profile-actions button[data-live-open-trainer-stats]{
  border-color:rgba(15,118,110,.28)!important;
  color:#0f766e!important;
  background:linear-gradient(135deg,#ffffff,#ecfdf5)!important;
}
.live-runner-profile-actions button[data-live-open-sire-stats]{
  border-color:rgba(124,58,237,.26)!important;
  color:#6d28d9!important;
  background:linear-gradient(135deg,#ffffff,#f5f3ff)!important;
}
.live-runner-secondary{
  grid-template-columns:minmax(160px,1fr) minmax(180px,.60fr) minmax(120px,.34fr)!important;
  gap:12px!important;
  align-items:center!important;
  margin-top:10px!important;
  padding-top:10px!important;
  border-top:1px solid rgba(226,232,240,.72)!important;
}
.live-form-figures{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:3px!important;
  align-items:center!important;
  letter-spacing:0!important;
}
.live-form-figures span{
  min-width:18px!important;
  height:20px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:6px!important;
  background:#f8fafc!important;
  border:1px solid rgba(226,232,240,.76)!important;
  font-size:11px!important;
}
.live-runner-stats{
  justify-content:flex-end!important;
  flex-wrap:wrap!important;
}
.live-runner-stats span{
  border-radius:999px!important;
  padding:6px 9px!important;
  background:#f8fafc!important;
}
.live-runner-actions{
  gap:8px!important;
}
.live-odds-placeholder{
  min-width:54px!important;
  border-radius:11px!important;
  padding:8px 11px!important;
}
.live-runner-actions button{
  border-radius:999px!important;
  min-height:32px!important;
  padding:7px 11px!important;
}
.live-runner-status-badge{
  border-radius:999px!important;
  font-size:9px!important;
  letter-spacing:.08em!important;
}
.live-runner-row.manual-excluded{
  background:linear-gradient(90deg,#fff7ed,#ffffff)!important;
  box-shadow:inset 4px 0 0 rgba(234,88,12,.24)!important;
}
.live-runner-row.non-runner{
  background:linear-gradient(90deg,#f1f5f9,#ffffff)!important;
  box-shadow:inset 4px 0 0 rgba(100,116,139,.32)!important;
}
.live-runner-row.reserve-like:not(.non-runner){
  background:linear-gradient(90deg,#fffbeb,#ffffff)!important;
  box-shadow:inset 4px 0 0 rgba(245,158,11,.26)!important;
}
.live-runner-collapsed-main{
  grid-template-columns:52px minmax(0,1fr) auto!important;
  gap:14px!important;
}
.live-runner-actions.collapsed{
  flex-wrap:wrap!important;
  max-width:360px!important;
}
.live-runner-actions.collapsed button[data-live-open-sire-stats]{
  display:inline-flex!important;
}
@media(max-width:1360px){
  .live-racecard-nav{grid-template-columns:1fr!important;align-items:start!important;}
  .live-meeting-strip{justify-content:flex-start!important;}
  .live-racecard-nav-actions{justify-content:flex-start!important;}
  .live-runner-main{grid-template-columns:54px minmax(0,1fr)!important;}
  .live-runner-profile-actions,
  .live-runner-people.compact{grid-column:2!important;}
  .live-runner-profile-actions{max-width:420px!important;}
  .live-runner-secondary{grid-template-columns:1fr!important;}
  .live-runner-stats,.live-runner-actions{justify-content:flex-start!important;}
}
@media(max-width:920px){
  .live-racecard-header{grid-template-columns:1fr!important;}
  .live-racecard-key-facts{grid-template-columns:1fr!important;}
  .live-runners-table{padding-left:14px!important;padding-right:14px!important;}
  .live-runner-profile-actions{grid-template-columns:1fr!important;}
}

/* === DESIGN_SYSTEM_001I_RACECARD_REBUILD_FROM_CLEAN_BASELINE_20260610 === */
/* Rebuild the Live Racing base racecard towards a cleaner, horse-first card layout. */
.live-racecard-header{
  grid-template-columns:1fr!important;
  gap:12px!important;
  padding:22px 24px 18px!important;
  border-radius:22px!important;
  background:linear-gradient(135deg,#ffffff 0%,#f8fafc 100%)!important;
  border:1px solid rgba(226,232,240,.9)!important;
  box-shadow:0 12px 28px rgba(15,23,42,.07)!important;
}
.live-racecard-title-block{max-width:100%!important;}
.live-racecard-header h2{font-size:34px!important;line-height:1.04!important;margin-bottom:7px!important;}
.live-racecard-header h2 span{font-size:.92em!important;}
.live-racecard-header p{font-size:15px!important;line-height:1.42!important;}
.live-race-info-strip{margin-top:11px!important;}
.live-racecard-key-facts{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  align-items:center!important;
  padding:11px 0 0!important;
  border-top:1px solid rgba(226,232,240,.84)!important;
  background:transparent!important;
  box-shadow:none!important;
  border-radius:0!important;
}
.live-racecard-key-facts span{
  display:inline-flex!important;
  align-items:center!important;
  gap:7px!important;
  min-height:0!important;
  padding:6px 10px!important;
  border:1px solid rgba(203,213,225,.86)!important;
  border-radius:999px!important;
  background:#fff!important;
  box-shadow:none!important;
  font-size:12px!important;
  line-height:1.1!important;
  color:#334155!important;
}
.live-racecard-key-facts b{
  display:inline!important;
  margin:0!important;
  font-size:10px!important;
  line-height:1!important;
  letter-spacing:.09em!important;
  color:#64748b!important;
}
.live-racecard-key-facts .live-going-value,
.live-racecard-key-facts .live-going-main{display:inline!important;}
.live-race-conditions-card{margin-top:12px!important;}

.live-runner-table-head{
  grid-template-columns:88px minmax(260px,1fr) minmax(245px,290px) minmax(230px,260px) minmax(110px,140px)!important;
  gap:16px!important;
  padding:0 16px 8px!important;
}
.live-runner-table-head button:nth-child(1),
.live-runner-table-head button:nth-child(2){display:none!important;}
.live-runner-table-head button:nth-child(3)::before{content:"No / draw";display:block;font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:#94a3b8;margin-bottom:2px;}
.live-runner-table-head button:nth-child(4),
.live-runner-table-head button:nth-child(5){display:none!important;}

.live-runner-row{
  padding:16px 18px!important;
  border-radius:18px!important;
  border:1px solid rgba(226,232,240,.92)!important;
  box-shadow:0 8px 20px rgba(15,23,42,.055)!important;
}
.live-runner-main{
  display:grid!important;
  grid-template-columns:88px minmax(260px,1fr) minmax(245px,290px) minmax(230px,260px) minmax(110px,140px)!important;
  gap:16px!important;
  align-items:center!important;
}
.live-runner-left-id{
  display:grid!important;
  grid-template-columns:1fr!important;
  justify-items:center!important;
  align-content:center!important;
  gap:5px!important;
  min-width:0!important;
}
.live-runner-card-number{
  display:block!important;
  font-size:30px!important;
  line-height:.96!important;
  font-weight:950!important;
  letter-spacing:-.08em!important;
  color:#0f172a!important;
}
.live-runner-horse-icon{
  display:inline-flex!important;
  width:34px!important;
  height:34px!important;
  border-radius:999px!important;
  align-items:center!important;
  justify-content:center!important;
  background:linear-gradient(135deg,#eff6ff 0%,#e0f2fe 100%)!important;
  border:1px solid rgba(37,99,235,.16)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8),0 5px 12px rgba(37,99,235,.12)!important;
}
.live-runner-horse-icon svg{width:24px!important;height:24px!important;fill:#1e3a8a!important;display:block!important;}
.live-runner-draw-chip{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:3px 7px!important;
  border-radius:999px!important;
  border:1px solid rgba(203,213,225,.84)!important;
  background:#fff!important;
  color:#475569!important;
  font-size:10px!important;
  font-weight:850!important;
  line-height:1!important;
  white-space:nowrap!important;
}
.live-runner-titleline{
  gap:7px!important;
  align-items:center!important;
  flex-wrap:wrap!important;
}
.live-runner-titleline .live-runner-number{display:none!important;}
.live-runner-titleline strong{font-size:20px!important;line-height:1.05!important;letter-spacing:-.03em!important;}
.live-runner-titleline > em{font-size:12px!important;color:#64748b!important;font-style:normal!important;}
.live-headgear{font-size:10.5px!important;padding:2px 7px!important;}
.live-runner-subline{margin-top:5px!important;}
.live-runner-sex-colour{font-size:13px!important;font-weight:750!important;color:#475569!important;}
.live-form-figures{
  margin-top:8px!important;
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:2px!important;
  color:#1f2937!important;
}
.live-form-figures span{
  min-width:auto!important;
  width:auto!important;
  height:auto!important;
  padding:0 1px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  font-size:13px!important;
  line-height:1.1!important;
  font-weight:850!important;
  color:#334155!important;
}
.live-runner-people.compact{
  display:grid!important;
  grid-template-columns:72px 92px minmax(0,1.2fr) minmax(0,1.2fr)!important;
  gap:8px 14px!important;
  align-items:center!important;
  padding:12px 14px!important;
  background:#f8fafc!important;
  border:1px solid rgba(226,232,240,.88)!important;
  border-radius:16px!important;
}
.live-runner-people.compact span{
  display:flex!important;
  flex-direction:column!important;
  gap:3px!important;
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:12px!important;
  color:#334155!important;
}
.live-runner-people.compact span strong{font-size:13px!important;line-height:1.1!important;color:#0f172a!important;}
.live-person-label{
  display:block!important;
  margin:0!important;
  color:#64748b!important;
  font-size:9px!important;
  line-height:1!important;
  letter-spacing:.1em!important;
  text-transform:uppercase!important;
}
.live-trainer-link{font-size:12px!important;line-height:1.1!important;}
.live-runner-profile-actions.live-runner-evidence-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(104px,1fr))!important;
  gap:8px!important;
  align-self:stretch!important;
  justify-content:stretch!important;
  max-width:none!important;
}
.live-runner-profile-actions.live-runner-evidence-grid button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:35px!important;
  padding:7px 8px!important;
  border-radius:12px!important;
  font-size:11px!important;
  line-height:1.05!important;
  font-weight:900!important;
  white-space:nowrap!important;
}
.live-evidence-horse{order:1!important;}
.live-evidence-trainer{order:2!important;}
.live-evidence-sire{order:3!important;}
.live-evidence-jockey{order:4!important;}
.live-runner-profile-actions button.live-evidence-horse{border-color:rgba(37,99,235,.28)!important;background:linear-gradient(135deg,#ffffff,#eff6ff)!important;color:#1d4ed8!important;}
.live-runner-profile-actions button.live-evidence-trainer{border-color:rgba(15,118,110,.3)!important;background:linear-gradient(135deg,#ffffff,#ecfdf5)!important;color:#0f766e!important;}
.live-runner-profile-actions button.live-evidence-sire{border-color:rgba(124,58,237,.28)!important;background:linear-gradient(135deg,#ffffff,#f5f3ff)!important;color:#6d28d9!important;}
.live-runner-profile-actions button.live-evidence-jockey{border-color:rgba(100,116,139,.26)!important;background:linear-gradient(135deg,#ffffff,#f8fafc)!important;color:#64748b!important;}
.live-runner-profile-actions button.live-evidence-jockey:disabled{opacity:.7!important;cursor:not-allowed!important;}
.live-runner-actions{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  justify-content:center!important;
  gap:8px!important;
  min-width:0!important;
}
.live-odds-placeholder{
  min-width:0!important;
  width:100%!important;
  justify-content:center!important;
  border-radius:12px!important;
  padding:9px 10px!important;
  font-size:15px!important;
  font-weight:950!important;
}
.live-runner-actions button{
  min-height:32px!important;
  border-radius:999px!important;
  padding:7px 10px!important;
  font-size:11px!important;
}
.live-runner-secondary{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:10px!important;
  margin-top:10px!important;
  padding:8px 0 0 104px!important;
  border-top:1px solid rgba(226,232,240,.66)!important;
}
.live-runner-stats{justify-content:flex-start!important;gap:6px!important;}
.live-runner-stats span{padding:5px 8px!important;font-size:11px!important;border-radius:999px!important;background:#f8fafc!important;}
.live-runner-row.collapsed-excluded .live-runner-main{opacity:.9!important;}
.live-runner-row.collapsed-excluded .live-runner-identity,
.live-runner-row.collapsed-excluded .live-runner-people.compact,
.live-runner-row.collapsed-excluded .live-runner-profile-actions{filter:saturate(.82)!important;}
.live-runner-row.manual-excluded .live-runner-profile-actions,
.live-runner-row.profile-eliminated .live-runner-profile-actions,
.live-runner-row.system-eliminated .live-runner-profile-actions{display:grid!important;}
.live-runner-row.manual-excluded .live-evidence-sire,
.live-runner-row.manual-excluded .live-evidence-jockey{display:inline-flex!important;}

/* Lift evidence-table metric text one step while retaining 001G/001H no-scroll sizing. */
.horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th,
.horse-profile-stat-table.hp-comparison-table-v2 tbody td{
  font-size:11.6px!important;
  line-height:1.25!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .hp-num,
.horse-profile-stat-table.hp-comparison-table-v2 tbody td{
  font-weight:800!important;
}
.horse-profile-stat-table.hp-comparison-table-v2 .horse-profile-stat-label{font-size:13.3px!important;line-height:1.2!important;}
.horse-profile-stat-table.hp-comparison-table-v2 tbody th small{font-size:10.2px!important;line-height:1.2!important;}
.horse-drilldown-modal-shell:not(.fullscreen) .horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th,
.horse-drilldown-modal-shell:not(.fullscreen) .horse-profile-stat-table.hp-comparison-table-v2 tbody td{
  font-size:10.7px!important;
  padding-left:2px!important;
  padding-right:2px!important;
}
.horse-drilldown-modal-shell:not(.fullscreen) .horse-profile-stat-table.hp-comparison-table-v2 .horse-profile-stat-label{font-size:12.8px!important;}
.horse-drilldown-modal-shell.fullscreen .horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th,
.horse-drilldown-modal-shell.fullscreen .horse-profile-stat-table.hp-comparison-table-v2 tbody td{
  font-size:12.2px!important;
}
.horse-drilldown-modal-shell.fullscreen .horse-profile-stat-table.hp-comparison-table-v2 .horse-profile-stat-label{font-size:14px!important;}

@media(max-width:1500px){
  .live-runner-main{grid-template-columns:84px minmax(230px,1fr) minmax(230px,270px) minmax(220px,248px) minmax(104px,130px)!important;gap:13px!important;}
  .live-runner-table-head{grid-template-columns:84px minmax(230px,1fr) minmax(230px,270px) minmax(220px,248px) minmax(104px,130px)!important;gap:13px!important;}
  .live-runner-people.compact{grid-template-columns:64px 84px minmax(0,1fr) minmax(0,1fr)!important;gap:8px 10px!important;}
  .live-runner-profile-actions.live-runner-evidence-grid{grid-template-columns:repeat(2,minmax(96px,1fr))!important;}
  .live-runner-profile-actions.live-runner-evidence-grid button{font-size:10.5px!important;}
}
@media(max-width:1180px){
  .live-runner-table-head{display:none!important;}
  .live-runner-main{grid-template-columns:78px minmax(0,1fr)!important;align-items:start!important;}
  .live-runner-people.compact,
  .live-runner-profile-actions.live-runner-evidence-grid,
  .live-runner-actions{grid-column:2!important;}
  .live-runner-actions{flex-direction:row!important;justify-content:flex-start!important;flex-wrap:wrap!important;}
  .live-odds-placeholder{width:auto!important;min-width:70px!important;}
  .live-runner-secondary{padding-left:94px!important;justify-content:flex-start!important;}
}
@media(max-width:760px){
  .live-runner-main{grid-template-columns:70px minmax(0,1fr)!important;gap:10px!important;}
  .live-runner-card-number{font-size:26px!important;}
  .live-runner-horse-icon{width:30px!important;height:30px!important;}
  .live-runner-profile-actions.live-runner-evidence-grid{grid-template-columns:1fr!important;}
  .live-runner-people.compact{grid-template-columns:1fr 1fr!important;}
  .live-runner-secondary{padding-left:80px!important;}
}

/* === DESIGN_SYSTEM_001J_RACECARD_ROW_ALIGNMENT_AND_HEADER_FACTS_FIX_20260610 === */
/* Re-anchor race facts to the race header right side; remove the floating centre stack. */
.live-racecard-header{
  grid-template-columns:minmax(0,1fr) minmax(460px,620px)!important;
  align-items:start!important;
  gap:24px!important;
  padding:22px 26px 18px!important;
  border-bottom:0!important;
  min-height:0!important;
}
.live-racecard-title-block{align-self:start!important;}
.live-racecard-key-facts{
  display:flex!important;
  flex-wrap:wrap!important;
  justify-content:flex-end!important;
  align-content:flex-start!important;
  align-items:flex-start!important;
  justify-self:end!important;
  align-self:start!important;
  gap:8px!important;
  width:100%!important;
  max-width:620px!important;
  margin-top:6px!important;
}
.live-racecard-key-facts span{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:7px!important;
  width:auto!important;
  min-width:0!important;
  min-height:0!important;
  max-width:100%!important;
  padding:6px 10px!important;
  border-radius:999px!important;
  box-shadow:none!important;
  background:#ffffff!important;
  border:1px solid rgba(203,213,225,.78)!important;
  font-size:11px!important;
  line-height:1.15!important;
  white-space:nowrap!important;
}
.live-racecard-key-facts b{
  display:inline!important;
  margin:0!important;
  font-size:9.5px!important;
  line-height:1!important;
  letter-spacing:.09em!important;
  color:#64748b!important;
  text-transform:uppercase!important;
}
.live-racecard-key-facts .live-going-value,
.live-racecard-key-facts .live-going-main{
  display:inline!important;
  white-space:normal!important;
}
.live-going-fact{
  background:linear-gradient(135deg,#ecfdf5,#ffffff)!important;
  border-color:rgba(20,184,166,.28)!important;
}
.live-race-conditions-card{margin-top:8px!important;}

/* Restore useful racecard column headers to match the refined row structure. */
.live-runner-table-head{
  display:grid!important;
  grid-template-columns:56px minmax(310px,1fr) minmax(220px,260px) minmax(290px,340px) minmax(92px,120px)!important;
  gap:14px!important;
  align-items:center!important;
  padding:10px 14px!important;
}
.live-runner-table-head button,
.live-runner-table-head span,
.live-runner-head-static{
  display:inline-flex!important;
  align-items:center!important;
  width:auto!important;
  min-width:0!important;
  color:#64748b!important;
  font-size:10.5px!important;
  font-weight:950!important;
  letter-spacing:.10em!important;
  text-transform:uppercase!important;
  background:transparent!important;
  border:0!important;
  padding:0!important;
  box-shadow:none!important;
}
.live-runner-table-head button:nth-child(1),
.live-runner-table-head button:nth-child(2),
.live-runner-table-head button:nth-child(3),
.live-runner-table-head button:nth-child(4),
.live-runner-table-head button:nth-child(5),
.live-runner-table-head button:nth-child(6){display:inline-flex!important;}
.live-runner-table-head button::before{content:none!important;display:none!important;}
.live-sort-header-pair{display:flex!important;flex-direction:column!important;gap:2px!important;align-items:flex-start!important;}

/* Runner row: standard card rhythm, no duplicated number/icon stack, profile buttons away from odds. */
.live-runner-row{padding:14px 16px!important;}
.live-runner-main{
  display:grid!important;
  grid-template-columns:56px minmax(310px,1fr) minmax(220px,260px) minmax(290px,340px) minmax(92px,120px)!important;
  gap:14px!important;
  align-items:center!important;
}
.live-runner-left-id{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:58px!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.live-runner-card-number{
  font-size:30px!important;
  line-height:1!important;
  font-weight:950!important;
  color:#0f172a!important;
  letter-spacing:-.06em!important;
}
.live-runner-titleline{
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
  flex-wrap:wrap!important;
}
.live-runner-horse-icon{
  flex:0 0 auto!important;
  width:27px!important;
  height:27px!important;
  border-radius:999px!important;
  background:linear-gradient(135deg,#eff6ff,#dbeafe)!important;
  border:1px solid rgba(37,99,235,.18)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.82),0 5px 12px rgba(37,99,235,.10)!important;
}
.live-runner-horse-icon svg{width:19px!important;height:19px!important;fill:#1d4ed8!important;}
.live-runner-draw-chip{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  color:#475569!important;
  font-size:13px!important;
  font-weight:900!important;
  line-height:1!important;
  white-space:nowrap!important;
}
.live-form-figures{
  margin-top:7px!important;
  display:block!important;
  font-size:13px!important;
  line-height:1.1!important;
  letter-spacing:.02em!important;
  color:#334155!important;
  font-weight:900!important;
}
.live-form-figures span{display:inline!important;border:0!important;background:transparent!important;padding:0!important;min-width:0!important;height:auto!important;}
.live-runner-ratings-inline,
.live-runner-stats{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:6px!important;
  flex-wrap:wrap!important;
  margin-top:8px!important;
}
.live-runner-ratings-inline span,
.live-runner-stats span{
  display:inline-flex!important;
  align-items:center!important;
  gap:4px!important;
  border-radius:999px!important;
  padding:4px 8px!important;
  background:#f8fafc!important;
  border:1px solid rgba(226,232,240,.86)!important;
  color:#0f172a!important;
  font-size:11px!important;
  font-weight:850!important;
}
.live-runner-ratings-inline b,
.live-runner-stats b{color:#64748b!important;font-weight:950!important;margin-right:0!important;}
.live-runner-profile-actions.live-runner-evidence-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(96px,1fr))!important;
  gap:8px!important;
  padding:0 14px!important;
  border-left:1px solid rgba(226,232,240,.78)!important;
  border-right:1px solid rgba(226,232,240,.78)!important;
  align-self:center!important;
}
.live-runner-profile-actions.live-runner-evidence-grid button{
  min-height:34px!important;
  font-size:10.8px!important;
  border-radius:11px!important;
}
.live-runner-people.compact{
  display:grid!important;
  grid-template-columns:82px minmax(0,1fr)!important;
  gap:14px!important;
  align-items:center!important;
  padding:0 0 0 2px!important;
  border:0!important;
  background:transparent!important;
  border-radius:0!important;
  box-shadow:none!important;
  min-width:0!important;
}
.live-runner-age-weight,
.live-runner-connections{
  display:flex!important;
  flex-direction:column!important;
  gap:4px!important;
  min-width:0!important;
}
.live-runner-age-weight span{
  display:block!important;
  color:#0f172a!important;
  font-size:13px!important;
  line-height:1.1!important;
  font-weight:900!important;
  white-space:nowrap!important;
}
.live-runner-connections span{
  display:block!important;
  min-width:0!important;
  color:#0f172a!important;
  font-size:12.3px!important;
  line-height:1.18!important;
  font-weight:750!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.live-runner-connections b{
  color:#64748b!important;
  font-weight:950!important;
  margin-right:3px!important;
}
.live-trainer-link{font-size:inherit!important;line-height:inherit!important;}
.live-runner-actions{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  justify-content:center!important;
  gap:8px!important;
}
.live-runner-secondary{display:none!important;}

@media(max-width:1500px){
  .live-racecard-header{grid-template-columns:minmax(0,1fr) minmax(390px,540px)!important;}
  .live-runner-main,
  .live-runner-table-head{grid-template-columns:52px minmax(260px,1fr) minmax(200px,232px) minmax(248px,300px) minmax(88px,112px)!important;gap:12px!important;}
  .live-runner-profile-actions.live-runner-evidence-grid{grid-template-columns:repeat(2,minmax(88px,1fr))!important;padding:0 10px!important;}
  .live-runner-profile-actions.live-runner-evidence-grid button{font-size:10.2px!important;padding-left:6px!important;padding-right:6px!important;}
  .live-runner-people.compact{grid-template-columns:72px minmax(0,1fr)!important;gap:10px!important;}
}
@media(max-width:1180px){
  .live-racecard-header{grid-template-columns:1fr!important;}
  .live-racecard-key-facts{justify-content:flex-start!important;max-width:none!important;}
  .live-runner-table-head{display:none!important;}
  .live-runner-main{grid-template-columns:58px minmax(0,1fr)!important;align-items:start!important;}
  .live-runner-profile-actions.live-runner-evidence-grid,
  .live-runner-people.compact,
  .live-runner-actions{grid-column:2!important;}
  .live-runner-profile-actions.live-runner-evidence-grid{border-left:0!important;border-right:0!important;padding:0!important;max-width:430px!important;}
  .live-runner-actions{flex-direction:row!important;justify-content:flex-start!important;flex-wrap:wrap!important;}
  .live-odds-placeholder{width:auto!important;min-width:70px!important;}
}
@media(max-width:760px){
  .live-runner-main{grid-template-columns:48px minmax(0,1fr)!important;gap:10px!important;}
  .live-runner-card-number{font-size:25px!important;}
  .live-runner-profile-actions.live-runner-evidence-grid{grid-template-columns:1fr!important;}
  .live-runner-people.compact{grid-template-columns:1fr!important;}
}

/* === DESIGN_SYSTEM_001K_RACECARD_RESTORE_STRUCTURE_AND_TARGETED_REFINEMENT_20260610 === */
/* Restore the stronger pre-redesign racecard grammar, then retain only the targeted improvements:
   2x2 evidence buttons, Jockey Stats placeholder, cleaner age/weight + J/T alignment, and evidence-table fixes. */
.live-racecard-header{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 360px!important;
  gap:18px!important;
  align-items:start!important;
  padding:22px 24px!important;
  border:0!important;
  border-bottom:1px solid rgba(226,232,240,.85)!important;
  border-radius:0!important;
  background:#ffffff!important;
  box-shadow:none!important;
  min-height:0!important;
}
.live-racecard-title-block{max-width:none!important;min-width:0!important;align-self:start!important;}
.live-race-date{display:inline-block!important;background:#0f766e!important;color:#fff!important;border-radius:8px!important;padding:4px 9px!important;font-size:12px!important;font-weight:950!important;margin-bottom:8px!important;letter-spacing:.04em!important;text-transform:uppercase!important;}
.live-racecard-header h2{margin:0!important;font-size:30px!important;line-height:1.05!important;letter-spacing:-.05em!important;color:#0f172a!important;}
.live-racecard-header h2 span{display:inline!important;min-width:0!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;color:inherit!important;font-size:inherit!important;}
.live-racecard-header p,.live-race-title-line{margin:6px 0 0!important;color:#0f172a!important;font-size:14px!important;font-weight:850!important;line-height:1.35!important;max-width:none!important;}
.live-racecard-header p span{color:#64748b!important;}
.live-race-info-strip{display:flex!important;flex-wrap:wrap!important;gap:8px!important;margin-top:8px!important;}
.live-race-info-strip span{display:inline-flex!important;align-items:center!important;border-radius:999px!important;background:#eef2ff!important;border:1px solid rgba(99,102,241,.14)!important;color:#3730a3!important;padding:4px 9px!important;font-size:11px!important;font-weight:950!important;}
.live-racecard-key-facts{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:0!important;
  align-self:start!important;
  justify-self:stretch!important;
  width:100%!important;
  max-width:360px!important;
  margin:0!important;
  padding:4px 0 0!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}
.live-racecard-key-facts span{
  display:grid!important;
  grid-template-columns:92px minmax(0,1fr)!important;
  align-items:center!important;
  gap:10px!important;
  width:100%!important;
  max-width:100%!important;
  min-height:0!important;
  padding:8px 0!important;
  border:0!important;
  border-bottom:1px solid rgba(226,232,240,.95)!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#334155!important;
  font-size:12px!important;
  line-height:1.2!important;
  white-space:normal!important;
}
.live-racecard-key-facts b{display:block!important;margin:0!important;color:#475569!important;font-size:10px!important;font-weight:950!important;letter-spacing:.095em!important;text-transform:uppercase!important;}
.live-going-fact{background:transparent!important;border-color:rgba(226,232,240,.95)!important;}
.live-racecard-key-facts .live-going-value,.live-racecard-key-facts .live-going-main{display:inline!important;white-space:normal!important;}
.live-race-conditions-card{margin:0 24px 16px!important;padding:16px!important;border-radius:14px!important;background:#f8fafc!important;border:1px solid rgba(226,232,240,.9)!important;box-shadow:none!important;}
.live-conditions-topline strong{font-size:12px!important;letter-spacing:.09em!important;text-transform:uppercase!important;color:#0f766e!important;}
.live-conditions-topline span{border-radius:999px!important;background:#eef2ff!important;color:#3730a3!important;padding:4px 9px!important;font-size:10px!important;font-weight:950!important;}
.live-racecard-mode-tabs{display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:4px!important;padding:0 24px 10px!important;}
.live-racecard-mode-tabs button{border:1px solid rgba(203,213,225,.9)!important;border-radius:8px!important;background:#fff!important;padding:9px!important;font-weight:950!important;color:#64748b!important;}
.live-racecard-mode-tabs button.active{background:#111827!important;color:#fff!important;}
.live-racecard-mode-tabs button:disabled{opacity:.48!important;}
.live-racecard-state-strip{margin:0 24px 12px!important;border-radius:12px!important;border:1px solid rgba(203,213,225,.9)!important;background:#fff!important;box-shadow:none!important;}
.live-runners-table{padding:0 24px 24px!important;}
.live-runner-table-head{
  display:grid!important;
  grid-template-columns:54px 60px minmax(250px,1fr) 56px 56px minmax(250px,330px) minmax(170px,220px) minmax(190px,250px) 86px!important;
  gap:10px!important;
  align-items:center!important;
  background:#f1f5f9!important;
  color:#64748b!important;
  text-transform:uppercase!important;
  font-size:11px!important;
  font-weight:950!important;
  padding:10px 12px!important;
  border:1px solid rgba(203,213,225,.85)!important;
  border-bottom:0!important;
  border-radius:12px 12px 0 0!important;
}
.live-runner-table-head button,.live-runner-table-head span,.live-runner-head-static{display:inline-flex!important;align-items:center!important;width:auto!important;min-width:0!important;color:#64748b!important;font-size:11px!important;font-weight:950!important;letter-spacing:.08em!important;text-transform:uppercase!important;background:transparent!important;border:0!important;padding:0!important;box-shadow:none!important;}
.live-runner-table-head button::before{content:none!important;display:none!important;}
.live-sort-header-pair{display:flex!important;flex-direction:column!important;gap:2px!important;align-items:flex-start!important;}
.live-runner-row{border:1px solid rgba(203,213,225,.9)!important;border-top:0!important;padding:12px!important;background:#fff!important;border-radius:0!important;box-shadow:none!important;}
.live-runner-row:hover{background:#fbfdff!important;box-shadow:inset 3px 0 0 rgba(59,130,246,.16)!important;}
.live-runner-row:last-child{border-radius:0 0 14px 14px!important;}
.live-runner-main{display:grid!important;grid-template-columns:72px minmax(250px,1fr) minmax(250px,330px) minmax(360px,430px)!important;gap:16px!important;align-items:center!important;}
.live-silk-placeholder{width:54px!important;height:54px!important;border-radius:10px!important;background:linear-gradient(135deg,#14b8a6 0 33%,#0f172a 33% 66%,#facc15 66% 100%)!important;display:flex!important;align-items:center!important;justify-content:center!important;color:#fff!important;font-weight:950!important;box-shadow:inset 0 0 0 2px rgba(255,255,255,.55)!important;position:relative!important;overflow:hidden!important;}
.live-silk-placeholder::before{content:none!important;}
.live-silk-placeholder span{position:relative!important;z-index:1!important;font-size:14px!important;color:#fff!important;}
.live-runner-left-id,.live-runner-card-number,.live-runner-horse-icon,.live-runner-draw-chip{display:none!important;}
.live-runner-titleline{display:flex!important;align-items:baseline!important;gap:7px!important;flex-wrap:wrap!important;}
.live-runner-titleline .live-runner-number,.live-runner-number{display:inline!important;min-width:0!important;height:auto!important;padding:0!important;border-radius:0!important;background:transparent!important;color:#0f172a!important;font-size:13px!important;font-weight:950!important;line-height:1!important;}
.live-runner-number em{font-style:normal!important;color:#475569!important;font-size:12px!important;font-weight:950!important;margin-left:3px!important;}
.live-runner-titleline strong{font-size:17px!important;color:#0f3f46!important;font-weight:950!important;letter-spacing:-.02em!important;line-height:1.1!important;}
.live-runner-titleline > em{font-style:normal!important;color:#64748b!important;font-size:11px!important;font-weight:950!important;}
.live-runner-titleline sup{font-size:10px!important;color:#0f172a!important;}
.live-headgear{font-size:11px!important;color:#0f172a!important;font-weight:950!important;padding:0!important;background:transparent!important;border:0!important;}
.live-runner-subline{display:flex!important;gap:9px!important;align-items:center!important;flex-wrap:wrap!important;margin-top:5px!important;color:#0f172a!important;font-size:12.5px!important;}
.live-runner-sex-colour{font-size:12.5px!important;font-weight:800!important;color:#0f172a!important;}
.live-cd-badge{border-radius:5px!important;background:#0f3f46!important;color:#fff!important;padding:2px 5px!important;font-size:10px!important;font-weight:950!important;}
.live-runner-profile-actions.live-runner-evidence-grid{display:grid!important;grid-template-columns:repeat(2,minmax(102px,1fr))!important;gap:7px!important;align-self:center!important;justify-content:stretch!important;padding:0 14px!important;border-left:1px solid rgba(226,232,240,.75)!important;border-right:1px solid rgba(226,232,240,.75)!important;max-width:none!important;}
.live-runner-profile-actions.live-runner-evidence-grid button{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:32px!important;padding:7px 8px!important;border-radius:10px!important;font-size:10.6px!important;line-height:1!important;font-weight:900!important;white-space:nowrap!important;}
.live-evidence-horse{order:1!important;}.live-evidence-trainer{order:2!important;}.live-evidence-sire{order:3!important;}.live-evidence-jockey{order:4!important;}
.live-runner-profile-actions button.live-evidence-horse{border-color:rgba(37,99,235,.28)!important;background:linear-gradient(135deg,#ffffff,#eff6ff)!important;color:#1d4ed8!important;}
.live-runner-profile-actions button.live-evidence-trainer{border-color:rgba(15,118,110,.3)!important;background:linear-gradient(135deg,#ffffff,#ecfdf5)!important;color:#0f766e!important;}
.live-runner-profile-actions button.live-evidence-sire{border-color:rgba(124,58,237,.28)!important;background:linear-gradient(135deg,#ffffff,#f5f3ff)!important;color:#6d28d9!important;}
.live-runner-profile-actions button.live-evidence-jockey{border-color:rgba(100,116,139,.26)!important;background:linear-gradient(135deg,#ffffff,#f8fafc)!important;color:#64748b!important;opacity:.72!important;cursor:not-allowed!important;}
.live-runner-people.compact{display:grid!important;grid-template-columns:1fr!important;gap:5px!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;font-size:12px!important;color:#0f172a!important;line-height:1.25!important;max-width:none!important;}
.live-runner-people.compact > span{display:flex!important;align-items:baseline!important;gap:6px!important;min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;color:#0f172a!important;font-size:12px!important;line-height:1.25!important;}
.live-runner-people.compact strong{display:inline-block!important;min-width:52px!important;color:#0f172a!important;font-weight:950!important;font-size:12.5px!important;line-height:1.1!important;}
.live-person-label,.live-runner-people.compact b.live-person-label{display:inline-block!important;margin:0 2px 0 0!important;color:#64748b!important;font-size:11px!important;font-weight:950!important;text-transform:none!important;letter-spacing:0!important;}
.live-trainer-link{font-size:inherit!important;line-height:inherit!important;}
.live-runner-secondary{display:grid!important;grid-template-columns:minmax(160px,1fr) 220px 240px!important;gap:12px!important;align-items:center!important;margin-top:9px!important;padding:0!important;border-top:0!important;}
.live-form-figures{display:block!important;margin:0!important;font-weight:950!important;color:#0f172a!important;letter-spacing:.09em!important;font-size:13px!important;line-height:1.15!important;}
.live-form-figures span{display:inline-block!important;min-width:12px!important;width:auto!important;height:auto!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:#0f172a!important;font-size:13px!important;font-weight:950!important;}
.live-runner-stats{display:flex!important;justify-content:flex-start!important;gap:8px!important;flex-wrap:wrap!important;margin:0!important;}
.live-runner-stats span{background:#f8fafc!important;border:1px solid rgba(226,232,240,.9)!important;border-radius:9px!important;padding:6px 9px!important;font-size:12px!important;color:#0f172a!important;}
.live-runner-stats b{display:inline-block!important;margin-right:5px!important;color:#64748b!important;}
.live-runner-actions{display:flex!important;flex-direction:row!important;gap:8px!important;justify-content:flex-end!important;align-items:center!important;min-width:0!important;}
.live-odds-placeholder{min-width:48px!important;width:auto!important;text-align:center!important;background:#dc2626!important;color:#fff!important;border-radius:8px!important;padding:7px 10px!important;font-weight:950!important;font-size:13px!important;}
.live-runner-actions button{border:1px solid rgba(203,213,225,.9)!important;border-radius:8px!important;background:#fff!important;padding:7px 10px!important;font-size:11px!important;font-weight:950!important;color:#64748b!important;min-height:0!important;}
.live-runner-collapsed-main{display:grid!important;grid-template-columns:52px minmax(0,1fr) auto!important;gap:14px!important;align-items:center!important;}
.live-runner-actions.collapsed{flex-wrap:wrap!important;max-width:520px!important;}
.live-runner-actions.collapsed .live-runner-profile-actions{display:grid!important;grid-template-columns:repeat(2,minmax(92px,1fr))!important;min-width:220px!important;border:0!important;padding:0!important;}
@media(max-width:1500px){
  .live-racecard-header{grid-template-columns:minmax(0,1fr) 330px!important;}
  .live-racecard-key-facts{max-width:330px!important;}
  .live-runner-main{grid-template-columns:64px minmax(220px,1fr) minmax(224px,290px) minmax(310px,380px)!important;gap:12px!important;}
  .live-runner-table-head{grid-template-columns:46px 50px minmax(220px,1fr) 48px 48px minmax(224px,290px) minmax(140px,180px) minmax(170px,220px) 82px!important;gap:8px!important;}
  .live-runner-profile-actions.live-runner-evidence-grid{grid-template-columns:repeat(2,minmax(92px,1fr))!important;padding:0 10px!important;}
  .live-runner-profile-actions.live-runner-evidence-grid button{font-size:10px!important;padding-left:6px!important;padding-right:6px!important;}
  .live-runner-people.compact strong{min-width:46px!important;}
}
@media(max-width:1180px){
  .live-racecard-header{grid-template-columns:1fr!important;}
  .live-racecard-key-facts{max-width:none!important;}
  .live-runner-table-head{display:none!important;}
  .live-runner-main{grid-template-columns:64px minmax(0,1fr)!important;align-items:start!important;}
  .live-runner-profile-actions.live-runner-evidence-grid,.live-runner-people.compact{grid-column:2!important;border-left:0!important;border-right:0!important;padding:0!important;max-width:430px!important;}
  .live-runner-secondary{grid-template-columns:1fr!important;padding-left:80px!important;}
  .live-runner-actions{justify-content:flex-start!important;flex-wrap:wrap!important;}
}
@media(max-width:760px){
  .live-runner-main{grid-template-columns:56px minmax(0,1fr)!important;gap:10px!important;}
  .live-runner-profile-actions.live-runner-evidence-grid{grid-template-columns:1fr!important;}
  .live-runner-secondary{padding-left:66px!important;}
}

/* === DESIGN_SYSTEM_001L_RACECARD_ROW_DENSITY_AND_COLUMN_ALIGNMENT_20260610 ===
   Surgical row-density pass after 001K. Restores compact racecard rhythm while keeping
   the 2x2 evidence buttons and evidence-table fixes. Frontend-only. */
.live-runner-table-head.live-runner-table-head-001l{
  display:grid!important;
  grid-template-columns:50px 58px minmax(270px,1fr) 70px minmax(238px,300px) 88px minmax(210px,260px) 92px!important;
  gap:10px!important;
  align-items:center!important;
  padding:9px 12px!important;
}
.live-runner-table-head-001l .live-sort-header-pair{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  gap:1px!important;
  line-height:1.05!important;
}
.live-runner-table-head-001l button,
.live-runner-table-head-001l span,
.live-runner-table-head-001l .live-runner-head-static{
  font-size:10.5px!important;
  line-height:1.05!important;
  white-space:normal!important;
}
.live-runner-row{
  padding:8px 12px!important;
}
.live-runner-main.live-runner-main-001l{
  display:grid!important;
  grid-template-columns:72px minmax(270px,1fr) 70px minmax(238px,300px) 86px minmax(210px,260px) 92px!important;
  gap:12px!important;
  align-items:center!important;
  min-height:76px!important;
}
.live-runner-main-001l .live-silk-placeholder{
  width:48px!important;
  height:48px!important;
  align-self:center!important;
}
.live-runner-main-001l .live-silk-placeholder span{
  font-size:14px!important;
}
.live-runner-main-001l .live-runner-identity{
  min-width:0!important;
  align-self:center!important;
}
.live-runner-main-001l .live-runner-titleline{
  gap:6px!important;
  align-items:baseline!important;
  line-height:1.1!important;
}
.live-runner-main-001l .live-runner-titleline strong{
  font-size:16px!important;
  line-height:1.05!important;
}
.live-runner-main-001l .live-runner-number{
  font-size:12.5px!important;
  line-height:1!important;
}
.live-runner-main-001l .live-runner-number em{
  font-size:12px!important;
}
.live-runner-main-001l .live-runner-subline{
  margin-top:3px!important;
  gap:7px!important;
  font-size:12px!important;
  line-height:1.1!important;
}
.live-runner-main-001l .live-form-inline{
  margin-top:7px!important;
  font-size:13px!important;
  line-height:1!important;
  letter-spacing:.09em!important;
}
.live-runner-main-001l .live-form-inline span{
  font-size:13px!important;
  min-width:11px!important;
  line-height:1!important;
}
.live-runner-ratings-stack{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:5px!important;
  align-self:center!important;
  justify-self:start!important;
}
.live-runner-ratings-stack span{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  min-width:56px!important;
  padding:4px 7px!important;
  border:1px solid rgba(226,232,240,.95)!important;
  border-radius:999px!important;
  background:#f8fafc!important;
  color:#0f172a!important;
  font-size:11.5px!important;
  line-height:1!important;
  font-weight:850!important;
  white-space:nowrap!important;
}
.live-runner-ratings-stack b{
  margin-right:5px!important;
  color:#64748b!important;
  font-weight:950!important;
  font-size:10px!important;
  letter-spacing:.04em!important;
}
.live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid{
  align-self:center!important;
  justify-self:stretch!important;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(98px,1fr))!important;
  gap:6px!important;
  padding:0 12px!important;
  border-left:1px solid rgba(226,232,240,.82)!important;
  border-right:1px solid rgba(226,232,240,.82)!important;
  max-width:none!important;
}
.live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid button{
  min-height:28px!important;
  padding:6px 7px!important;
  border-radius:9px!important;
  font-size:10.1px!important;
  line-height:1!important;
}
.live-runner-age-weight{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:center!important;
  gap:4px!important;
  color:#0f172a!important;
  font-size:12.5px!important;
  font-weight:950!important;
  line-height:1.05!important;
  white-space:nowrap!important;
}
.live-runner-connections{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:center!important;
  gap:4px!important;
  color:#0f172a!important;
  font-size:12px!important;
  font-weight:750!important;
  line-height:1.1!important;
  min-width:0!important;
}
.live-runner-connections span{
  display:flex!important;
  align-items:baseline!important;
  gap:5px!important;
  white-space:nowrap!important;
  min-width:0!important;
  max-width:100%!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.live-runner-connections .live-person-label{
  flex:0 0 auto!important;
  margin:0!important;
  color:#64748b!important;
  font-size:11px!important;
  font-weight:950!important;
  line-height:1!important;
}
.live-runner-actions.live-runner-actions-001l{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  align-self:center!important;
  justify-self:end!important;
  min-width:0!important;
}
.live-runner-actions-001l .live-odds-placeholder{
  min-width:58px!important;
  padding:8px 10px!important;
  font-size:13px!important;
  line-height:1!important;
}
.live-runner-actions-001l button{
  min-width:58px!important;
  padding:6px 9px!important;
  font-size:10.5px!important;
  line-height:1!important;
}
.live-runner-main-001l + .live-runner-secondary{
  display:none!important;
}
.live-runner-main-001l .live-runner-stats,
.live-runner-main-001l .live-runner-people.compact{
  display:none!important;
}
@media(max-width:1500px){
  .live-runner-table-head.live-runner-table-head-001l{
    grid-template-columns:44px 48px minmax(230px,1fr) 62px minmax(212px,260px) 78px minmax(170px,220px) 84px!important;
    gap:8px!important;
  }
  .live-runner-main.live-runner-main-001l{
    grid-template-columns:62px minmax(230px,1fr) 62px minmax(212px,260px) 76px minmax(170px,220px) 84px!important;
    gap:10px!important;
  }
  .live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid{
    grid-template-columns:repeat(2,minmax(88px,1fr))!important;
    padding:0 9px!important;
  }
  .live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid button{font-size:9.8px!important;}
  .live-runner-connections{font-size:11.5px!important;}
}
@media(max-width:1180px){
  .live-runner-table-head.live-runner-table-head-001l{display:none!important;}
  .live-runner-main.live-runner-main-001l{
    grid-template-columns:58px minmax(0,1fr)!important;
    align-items:start!important;
  }
  .live-runner-main-001l .live-runner-ratings-stack,
  .live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid,
  .live-runner-age-weight,
  .live-runner-connections,
  .live-runner-actions.live-runner-actions-001l{
    grid-column:2!important;
    justify-self:start!important;
    margin-top:7px!important;
  }
  .live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid{
    border-left:0!important;
    border-right:0!important;
    padding:0!important;
    max-width:430px!important;
  }
  .live-runner-ratings-stack{grid-template-columns:repeat(2,max-content)!important;}
  .live-runner-actions.live-runner-actions-001l{flex-direction:row!important;align-items:center!important;}
}
@media(max-width:760px){
  .live-runner-main.live-runner-main-001l{grid-template-columns:52px minmax(0,1fr)!important;gap:9px!important;}
  .live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid{grid-template-columns:1fr!important;}
}

/* === DESIGN_SYSTEM_001M_RACECARD_FINAL_ALIGNMENT_EXCLUDED_ROWS_AND_DISTANCE_DISPLAY_20260610 ===
   Final racecard alignment pass from 001L baseline. Frontend-only.
   Goals: OR/TS after Jockey/Trainer, larger profile buttons, same-format excluded rows,
   clipped state-strip fix and distance-display standardisation support. */
.live-racecard-state-strip{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:7px!important;
  min-height:0!important;
  height:auto!important;
  padding:8px 11px!important;
  overflow:visible!important;
}
.live-racecard-state-strip span{
  display:inline-flex!important;
  align-items:center!important;
  min-height:24px!important;
  line-height:1.15!important;
  white-space:nowrap!important;
}
.live-racecard-key-facts .live-going-value,
.live-racecard-key-facts .live-going-main{
  border:0!important;
  border-bottom:0!important;
  box-shadow:none!important;
  text-decoration:none!important;
}
.live-runner-table-head.live-runner-table-head-001l{
  grid-template-columns:50px 58px minmax(320px,1.35fr) minmax(270px,.9fr) 82px minmax(210px,.78fr) 70px 92px!important;
  gap:14px!important;
  padding:9px 12px!important;
}
.live-runner-main.live-runner-main-001l{
  grid-template-columns:72px minmax(320px,1.35fr) minmax(270px,.9fr) 82px minmax(210px,.78fr) 70px 92px!important;
  gap:14px!important;
  align-items:center!important;
  min-height:70px!important;
}
.live-runner-main-001l .live-runner-identity{
  align-self:center!important;
}
.live-runner-main-001l .live-form-inline{
  margin-top:5px!important;
}
.live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid{
  justify-self:stretch!important;
  align-self:center!important;
  grid-template-columns:repeat(2,minmax(118px,1fr))!important;
  gap:7px!important;
  padding:0 16px!important;
  border-left:1px solid rgba(226,232,240,.82)!important;
  border-right:1px solid rgba(226,232,240,.82)!important;
}
.live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid button{
  min-height:31px!important;
  padding:7px 9px!important;
  font-size:11.2px!important;
  line-height:1!important;
  border-radius:10px!important;
}
.live-runner-age-weight{
  justify-self:start!important;
  align-self:center!important;
  gap:4px!important;
  font-size:12.5px!important;
}
.live-runner-connections{
  justify-self:start!important;
  align-self:center!important;
  gap:4px!important;
  font-size:12px!important;
}
.live-runner-connections span{
  display:flex!important;
  align-items:baseline!important;
  gap:5px!important;
  white-space:nowrap!important;
}
.live-runner-ratings-stack{
  justify-self:start!important;
  align-self:center!important;
  grid-template-columns:1fr!important;
  gap:5px!important;
}
.live-runner-ratings-stack span{
  min-width:56px!important;
  padding:4px 7px!important;
}
.live-runner-actions.live-runner-actions-001l{
  justify-self:end!important;
  align-self:center!important;
  gap:6px!important;
}
.live-runner-actions-001l .live-runner-static-action:disabled{
  opacity:.72!important;
  cursor:not-allowed!important;
  color:#64748b!important;
  background:#f8fafc!important;
  border-color:rgba(203,213,225,.95)!important;
}
.live-runner-row.manual-excluded,
.live-runner-row.profile-eliminated,
.live-runner-row.system-eliminated{
  opacity:1!important;
}
.live-runner-row.manual-excluded .live-runner-main-001l,
.live-runner-row.profile-eliminated .live-runner-main-001l,
.live-runner-row.system-eliminated .live-runner-main-001l{
  filter:saturate(.88)!important;
}
.live-runner-row.manual-excluded .live-runner-profile-actions.live-runner-evidence-grid,
.live-runner-row.profile-eliminated .live-runner-profile-actions.live-runner-evidence-grid,
.live-runner-row.system-eliminated .live-runner-profile-actions.live-runner-evidence-grid{
  display:grid!important;
}
@media(max-width:1500px){
  .live-runner-table-head.live-runner-table-head-001l{
    grid-template-columns:44px 48px minmax(255px,1.25fr) minmax(236px,.95fr) 74px minmax(178px,.8fr) 64px 84px!important;
    gap:10px!important;
  }
  .live-runner-main.live-runner-main-001l{
    grid-template-columns:62px minmax(255px,1.25fr) minmax(236px,.95fr) 74px minmax(178px,.8fr) 64px 84px!important;
    gap:10px!important;
  }
  .live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid{
    grid-template-columns:repeat(2,minmax(98px,1fr))!important;
    padding:0 10px!important;
  }
  .live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid button{
    font-size:10.4px!important;
    min-height:29px!important;
    padding-left:6px!important;
    padding-right:6px!important;
  }
}
@media(max-width:1180px){
  .live-runner-table-head.live-runner-table-head-001l{display:none!important;}
  .live-runner-main.live-runner-main-001l{
    grid-template-columns:58px minmax(0,1fr)!important;
    gap:9px!important;
    align-items:start!important;
  }
  .live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid,
  .live-runner-age-weight,
  .live-runner-connections,
  .live-runner-ratings-stack,
  .live-runner-actions.live-runner-actions-001l{
    grid-column:2!important;
    justify-self:start!important;
    margin-top:7px!important;
  }
  .live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid{
    border-left:0!important;
    border-right:0!important;
    padding:0!important;
    max-width:460px!important;
  }
  .live-runner-ratings-stack{grid-template-columns:repeat(2,max-content)!important;}
  .live-runner-actions.live-runner-actions-001l{flex-direction:row!important;align-items:center!important;}
}


/* === DESIGN_SYSTEM_001N_FINAL_VISUAL_POLISH_20260610 ===
   Final visual polish pass after accepted 001M racecard baseline.
   Scope: racecard alignment/wording, going warning placement, left runner readability,
   Horse Form drilldown typography and minor label cleanup. Frontend-only. */
.live-racecard-key-facts{
  align-self:start!important;
}
.live-racecard-key-facts span{
  min-height:28px!important;
}
.live-racecard-key-facts .live-going-fact{
  overflow:visible!important;
}
.live-going-value{
  display:inline-flex!important;
  align-items:center!important;
  gap:6px!important;
  flex-wrap:nowrap!important;
  min-width:0!important;
  vertical-align:middle!important;
}
.live-going-main{
  display:inline!important;
  white-space:normal!important;
  line-height:1.15!important;
}
.live-going-treated-icon,
.live-going-override-icon{
  flex:0 0 auto!important;
  align-self:center!important;
  margin-left:2px!important;
  transform:none!important;
}
.live-race-conditions-card p{
  font-size:13px!important;
  font-weight:750!important;
  color:#334155!important;
  line-height:1.35!important;
}
.live-conditions-topline strong,
.live-conditions-topline span{
  font-size:11.5px!important;
}
.live-runner-table-head.live-runner-table-head-001l{
  grid-template-columns:50px 58px minmax(360px,1.45fr) minmax(288px,.95fr) 86px minmax(220px,.82fr) 72px 94px!important;
  gap:16px!important;
}
.live-runner-table-head-001l .live-runner-head-static{
  justify-self:center!important;
  text-align:center!important;
  width:100%!important;
}
.live-runner-table-head-001l .live-sort-header-pair,
.live-runner-table-head-001l button[data-live-sort="odds"]{
  justify-self:center!important;
  text-align:center!important;
}
.live-runner-table-head-001l button[data-live-sort="odds"]{
  justify-self:end!important;
  padding-right:10px!important;
}
.live-runner-main.live-runner-main-001l{
  grid-template-columns:72px minmax(360px,1.45fr) minmax(288px,.95fr) 86px minmax(220px,.82fr) 72px 94px!important;
  gap:16px!important;
}
.live-runner-main-001l .live-runner-titleline{
  gap:7px!important;
  align-items:baseline!important;
}
.live-runner-main-001l .live-runner-titleline strong{
  font-size:17px!important;
  letter-spacing:-.025em!important;
}
.live-runner-main-001l .live-runner-draw-inline{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:0!important;
  padding:0!important;
  color:#0f172a!important;
  font-size:13.2px!important;
  font-weight:950!important;
  line-height:1!important;
}
.live-runner-main-001l .live-runner-number{display:none!important;}
.live-runner-main-001l .live-runner-subline{
  font-size:12.6px!important;
  gap:8px!important;
}
.live-runner-main-001l .live-cd-badge,
.live-runner-main-001l .live-headgear{
  font-size:11px!important;
  line-height:1!important;
}
.live-runner-main-001l .live-form-inline{
  font-size:13.2px!important;
  margin-top:6px!important;
}
.live-runner-main-001l .live-form-inline span{
  font-size:13.2px!important;
}
.live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid{
  transform:translateX(-6px)!important;
  padding-left:12px!important;
  padding-right:14px!important;
}
.live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid button{
  min-height:32px!important;
  font-size:11.5px!important;
}
.live-runner-age-weight,
.live-runner-connections,
.live-runner-ratings-stack{
  transform:translateX(-8px)!important;
}
.live-runner-age-weight{font-size:12.8px!important;}
.live-runner-connections{font-size:12.3px!important;}
.live-runner-ratings-stack span{font-size:10.8px!important;}
.live-runner-actions.live-runner-actions-001l{justify-self:end!important;}
@media(max-width:1500px){
  .live-runner-table-head.live-runner-table-head-001l{
    grid-template-columns:44px 48px minmax(276px,1.34fr) minmax(248px,.95fr) 74px minmax(188px,.82fr) 64px 84px!important;
    gap:11px!important;
  }
  .live-runner-main.live-runner-main-001l{
    grid-template-columns:62px minmax(276px,1.34fr) minmax(248px,.95fr) 74px minmax(188px,.82fr) 64px 84px!important;
    gap:11px!important;
  }
  .live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid{
    transform:translateX(-4px)!important;
    grid-template-columns:repeat(2,minmax(102px,1fr))!important;
  }
  .live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid button{
    font-size:10.8px!important;
  }
  .live-runner-age-weight,
  .live-runner-connections,
  .live-runner-ratings-stack{transform:translateX(-5px)!important;}
}
.horse-drilldown-modal-shell:not(.is-horse-profile) .horse-drilldown-modal,
.horse-drilldown-modal-shell:not(.is-horse-profile) .horse-drilldown-content{
  font-size:13px!important;
}
.horse-identity-panel.compact .horse-identity-title h3{
  font-size:18px!important;
}
.horse-identity-panel.compact .horse-identity-title p,
.horse-source-race-card,
.horse-source-race-card small,
.horse-source-race-card p{
  font-size:12.6px!important;
  line-height:1.35!important;
}
.horse-connections-card{
  font-size:12.8px!important;
}
.horse-connections-card span{
  font-size:10.8px!important;
}
.horse-connections-card p em{
  font-size:10.4px!important;
}
.horse-connections-card p strong{
  font-size:12.4px!important;
}
.horse-form-table.compact thead th,
.horse-form-table thead th,
.horse-form-table thead button{
  font-size:11.4px!important;
  line-height:1.15!important;
}
.horse-form-table.compact td,
.horse-form-table.compact th{
  font-size:12px!important;
  line-height:1.25!important;
}
.horse-form-date,
.horse-form-race strong,
.horse-form-result button{
  font-size:12.4px!important;
}
.horse-form-race small,
.horse-form-race-meta,
.horse-form-race-title{
  font-size:11.4px!important;
  line-height:1.2!important;
}
.horse-form-result .horse-result-detail-part{
  margin-left:4px!important;
}
.horse-summary-table.compact th,
.horse-summary-table.compact td{
  font-size:inherit;
}


/* === DESIGN_SYSTEM_001O_FINAL_VISUAL_HOTFIX_ALIGNMENT_AND_FORM_SCROLL_20260610 ===
   Corrective hotfix after 001N. Scope: racecard column/header alignment and Horse Form
   fullscreen scroll/position alignment only. Frontend-only; no structural rebuild. */
.live-runner-table-head.live-runner-table-head-001l{
  grid-template-columns:50px 58px minmax(330px,1.18fr) minmax(300px,.9fr) 118px minmax(245px,.78fr) 88px 96px!important;
  gap:22px!important;
  align-items:center!important;
}
.live-runner-main.live-runner-main-001l{
  grid-template-columns:72px minmax(330px,1.18fr) minmax(300px,.9fr) 118px minmax(245px,.78fr) 88px 96px!important;
  gap:22px!important;
  align-items:center!important;
}
.live-runner-table-head-001l .live-runner-head-static,
.live-runner-table-head-001l .live-sort-header{
  white-space:nowrap!important;
  line-height:1!important;
  text-align:center!important;
}
.live-runner-table-head-001l .live-runner-head-static{
  justify-self:stretch!important;
  width:100%!important;
  padding-left:0!important;
  padding-right:0!important;
}
.live-runner-table-head-001l button[data-live-sort="age"],
.live-runner-table-head-001l button[data-live-sort="jockey"],
.live-runner-table-head-001l button[data-live-sort="or"]{
  justify-self:center!important;
  width:100%!important;
}
.live-runner-table-head-001l button[data-live-sort="odds"]{
  justify-self:end!important;
  width:96px!important;
  text-align:center!important;
  padding-right:0!important;
}
.live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid{
  transform:none!important;
  justify-self:stretch!important;
  padding-left:10px!important;
  padding-right:10px!important;
}
.live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid button{
  min-height:32px!important;
  font-size:11.4px!important;
}
.live-runner-age-weight,
.live-runner-connections,
.live-runner-ratings-stack{
  transform:none!important;
}
.live-runner-age-weight{
  justify-self:center!important;
  min-width:86px!important;
}
.live-runner-connections{
  justify-self:start!important;
  min-width:0!important;
}
.live-runner-connections span{
  white-space:nowrap!important;
}
.live-runner-ratings-stack{
  justify-self:center!important;
}
.live-runner-actions.live-runner-actions-001l{
  justify-self:end!important;
  width:96px!important;
}
.live-runner-actions-001l .live-odds-placeholder,
.live-runner-actions-001l button{
  width:68px!important;
  max-width:68px!important;
}

@media(max-width:1500px){
  .live-runner-table-head.live-runner-table-head-001l{
    grid-template-columns:44px 48px minmax(262px,1.14fr) minmax(250px,.92fr) 96px minmax(190px,.78fr) 74px 84px!important;
    gap:13px!important;
  }
  .live-runner-main.live-runner-main-001l{
    grid-template-columns:62px minmax(262px,1.14fr) minmax(250px,.92fr) 96px minmax(190px,.78fr) 74px 84px!important;
    gap:13px!important;
  }
  .live-runner-table-head-001l button[data-live-sort="odds"],
  .live-runner-actions.live-runner-actions-001l{width:84px!important;}
  .live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid{
    grid-template-columns:repeat(2,minmax(104px,1fr))!important;
    padding-left:8px!important;
    padding-right:8px!important;
  }
  .live-runner-age-weight{min-width:76px!important;}
  .live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid button{
    font-size:10.6px!important;
  }
}

/* Horse Form fullscreen scroll fix: keep top drilldown header above the scrolling table. */
.horse-drilldown-modal-shell.fullscreen .horse-drilldown-modal-header{
  position:sticky!important;
  top:0!important;
  z-index:120!important;
  background:#ffffff!important;
  box-shadow:0 1px 0 rgba(226,232,240,.96),0 10px 20px rgba(15,23,42,.045)!important;
}
.horse-drilldown-modal-shell.fullscreen .horse-drilldown-body{
  position:relative!important;
  z-index:1!important;
}
.horse-drilldown-modal-shell.fullscreen .horse-form-table thead th{
  z-index:18!important;
}

/* Horse Form position column alignment: same size, better baseline and spacing. */
.horse-form-result button{
  display:inline-flex!important;
  align-items:baseline!important;
  gap:5px!important;
  line-height:1.15!important;
}
.horse-form-result .horse-result-position-part,
.horse-form-result .horse-result-detail-part{
  line-height:1.15!important;
}
.horse-form-result .horse-result-detail-part{
  margin-left:0!important;
  transform:translateY(1px)!important;
}

/* PRO_SYSTEM_BUILDER_001F - Phase 1D raw SIRE query grid */
.pro-sire-query-grid-panel{
  margin-top:16px;
  border:1px solid rgba(20,184,166,.25);
  border-radius:20px;
  background:linear-gradient(180deg,rgba(255,255,255,.94),rgba(241,248,255,.92));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.75);
  padding:16px;
}
.pro-sire-query-grid-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:12px;
}
.pro-sire-query-grid-header p{
  margin:4px 0 0;
  color:#475569;
  font-size:13px;
  line-height:1.45;
}
.pro-sire-query-grid-summary{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:0 0 12px;
}
.pro-sire-query-grid-summary span{
  border:1px solid rgba(14,165,233,.18);
  border-radius:999px;
  background:rgba(240,249,255,.9);
  color:#17324d;
  font-size:12px;
  font-weight:800;
  padding:7px 10px;
}
.pro-sire-query-grid-scroll{
  max-height:520px;
  overflow:auto;
  border:1px solid rgba(148,163,184,.25);
  border-radius:16px;
  background:#fff;
}
.pro-sire-query-grid-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  min-width:1180px;
  font-size:12px;
}
.pro-sire-query-grid-table th{
  position:sticky;
  top:0;
  z-index:1;
  background:#f8fafc;
  color:#334155;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:10px;
  padding:10px 9px;
  border-bottom:1px solid rgba(148,163,184,.28);
  text-align:right;
  white-space:nowrap;
}
.pro-sire-query-grid-table th:first-child,
.pro-sire-query-grid-table td:first-child{
  text-align:left;
}
.pro-sire-query-grid-table td{
  padding:9px;
  border-bottom:1px solid rgba(226,232,240,.88);
  color:#1e293b;
  font-weight:750;
  text-align:right;
  vertical-align:middle;
  white-space:nowrap;
}
.pro-sire-query-grid-table tr:hover td{
  background:#f8fbff;
}
.pro-sire-query-cell strong{
  display:inline-block;
  font-size:13px;
  color:#0f172a;
  margin-bottom:4px;
}
.pro-sire-query-cell small{
  display:block;
  max-width:360px;
  overflow:hidden;
  text-overflow:ellipsis;
  color:#64748b;
  font-weight:700;
  white-space:nowrap;
}
.pro-sire-query-chips{
  display:inline-flex;
  flex-wrap:wrap;
  gap:4px;
  margin-left:6px;
  vertical-align:middle;
}
.pro-sire-query-chips span,
.pro-sire-status-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  border:1px solid rgba(14,165,233,.24);
  background:#ecfeff;
  color:#075985;
  font-size:10px;
  font-weight:900;
  letter-spacing:.04em;
  padding:3px 6px;
}
.pro-sire-status-pill{
  background:#f8fafc;
  border-color:rgba(148,163,184,.35);
  color:#64748b;
}
.pro-sire-money.positive{color:#047857;}
.pro-sire-money.negative{color:#b91c1c;}
.pro-sire-money.neutral{color:#475569;}
@media (max-width:900px){
  .pro-sire-query-grid-header{flex-direction:column;}
  .pro-sire-query-grid-scroll{max-height:460px;}
}


.pro-sire-settings-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:10px 0 12px;
  padding:10px 12px;
  border:1px solid rgba(14,165,233,.18);
  border-radius:14px;
  background:linear-gradient(180deg,#f8fdff,#f1f8ff);
}
.pro-sire-settings-toolbar[hidden]{display:none!important;}
.pro-sire-settings-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.pro-sire-settings-toolbar p{
  margin:0;
  color:#475569;
  font-size:12px;
  font-weight:700;
  text-align:right;
}
.pro-sire-control-cell{
  text-align:center!important;
}
.pro-sire-active-input{
  width:18px;
  height:18px;
  accent-color:#0ea5e9;
}
.pro-sire-threshold-input{
  width:72px;
  border:1px solid rgba(148,163,184,.42);
  border-radius:10px;
  background:#fff;
  color:#0f172a;
  font-weight:850;
  padding:6px 8px;
  text-align:right;
}
.pro-sire-threshold-input:focus{
  outline:2px solid rgba(14,165,233,.28);
  border-color:#0ea5e9;
}
.pro-sire-applied-summary{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin:12px 0;
}
.pro-sire-applied-summary[hidden]{display:none!important;}
.pro-sire-summary-card{
  border:1px solid rgba(16,185,129,.2);
  border-radius:16px;
  background:linear-gradient(180deg,#f0fdf4,#ffffff);
  padding:12px;
  color:#0f172a;
}
.pro-sire-summary-card>strong{
  display:block;
  font-size:13px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#065f46;
  margin-bottom:3px;
}
.pro-sire-summary-card>span{
  display:block;
  font-size:12px;
  color:#64748b;
  font-weight:750;
  margin-bottom:10px;
}
.pro-sire-summary-metrics{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:8px;
}
.pro-sire-summary-metrics span{
  display:flex;
  flex-direction:column;
  gap:3px;
  padding:8px;
  border-radius:12px;
  border:1px solid rgba(226,232,240,.9);
  background:#fff;
  min-width:0;
}
.pro-sire-summary-metrics b{
  font-size:14px;
  color:#0f172a;
  white-space:nowrap;
}
.pro-sire-summary-metrics em{
  font-style:normal;
  font-size:10px;
  color:#64748b;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
}
@media (max-width:1100px){
  .pro-sire-applied-summary{grid-template-columns:1fr;}
  .pro-sire-summary-metrics{grid-template-columns:repeat(2,minmax(0,1fr));}
  .pro-sire-settings-toolbar{align-items:flex-start;flex-direction:column;}
  .pro-sire-settings-toolbar p{text-align:left;}
}

/* PRO_SYSTEM_BUILDER_001I - Phase 1E visual/workflow cleanup */
.pro-sire-analysis-card{
  overflow:hidden;
}
.pro-sire-analysis-card .report-option-copy{
  line-height:1.45;
}
.pro-sire-analysis-card .report-group-toggle.locked,
.pro-sire-analysis-card .report-group-toggle.pro-sire-stage-card{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  min-height:46px!important;
  padding:10px 12px!important;
  cursor:default!important;
}
.pro-sire-analysis-card .report-group-toggle.locked > span:first-of-type,
.pro-sire-analysis-card .report-group-toggle.pro-sire-stage-card > span:first-of-type{
  display:block!important;
  overflow:visible!important;
  text-overflow:clip!important;
  white-space:normal!important;
  min-width:0!important;
  padding-right:0!important;
  justify-self:start!important;
  text-align:left!important;
  line-height:1.2!important;
}
.pro-sire-analysis-card .report-group-toggle.locked em,
.pro-sire-analysis-card .report-group-toggle.pro-sire-stage-card em{
  position:static!important;
  transform:none!important;
  flex:0 0 auto!important;
  white-space:nowrap!important;
}
.pro-sire-analysis-card #proSnapshotStatus,
.pro-sire-analysis-card #proSireApplyStatus{
  white-space:normal!important;
  line-height:1.35!important;
  padding:10px 12px!important;
}
.pro-sire-query-grid-panel{
  overflow:hidden;
  padding:18px!important;
}
.pro-sire-query-grid-header{
  align-items:center!important;
}
.pro-sire-query-grid-header .card-title{
  letter-spacing:.14em;
}
.pro-sire-query-grid-summary{
  align-items:center;
}
.pro-sire-query-grid-summary span{
  line-height:1.2;
}
.pro-sire-settings-toolbar{
  overflow:hidden;
}
.pro-sire-settings-toolbar p{
  max-width:680px;
  line-height:1.35;
}
.pro-sire-query-grid-scroll{
  width:100%;
  max-width:100%;
  overflow:auto;
  scrollbar-gutter:stable;
}
.pro-sire-query-grid-table{
  min-width:1320px;
}
.pro-sire-query-grid-table th,
.pro-sire-query-grid-table td{
  padding:8px 7px;
}
.pro-sire-query-cell small{
  max-width:320px;
}
.pro-sire-applied-summary{
  align-items:stretch;
}
.pro-sire-summary-card{
  min-width:0;
  overflow:hidden;
}
.pro-sire-summary-metrics{
  grid-template-columns:repeat(auto-fit,minmax(112px,1fr));
}
.pro-sire-summary-metrics span{
  min-width:0;
}
.pro-sire-summary-metrics b{
  overflow:hidden;
  text-overflow:ellipsis;
}
@media (max-width:1200px){
  .pro-sire-applied-summary{grid-template-columns:1fr;}
  .pro-sire-settings-toolbar{align-items:flex-start;flex-direction:column;}
  .pro-sire-settings-toolbar p{text-align:left;max-width:none;}
}


/* PRO_SYSTEM_BUILDER_001J — SIRE undo / since-last-change panel */
.pro-sire-delta-card{
  border-color:rgba(59,130,246,.24);
  background:linear-gradient(180deg,#eff6ff,#ffffff);
}
.pro-sire-delta-card>strong{
  color:#1d4ed8;
}
.pro-sire-delta-metrics{
  grid-template-columns:repeat(5,minmax(0,1fr));
}
.pro-sire-delta{
  white-space:nowrap;
}
#proSireUndoButton:disabled{
  opacity:.5;
  cursor:not-allowed;
}
@media (max-width:1100px){
  .pro-sire-delta-metrics{grid-template-columns:repeat(2,minmax(0,1fr));}
}

/* PRO_SYSTEM_BUILDER_001N — dedicated SIRE Stats workspace shell */
.pro-sire-workspace-launch{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:12px 0 0;
  padding:13px 14px;
  border:1px solid rgba(14,165,233,.22);
  border-radius:16px;
  background:linear-gradient(135deg,#eefcff,#f8fbff 54%,#eef2ff);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8),0 8px 18px rgba(15,23,42,.05);
}
.pro-sire-workspace-launch[hidden]{display:none!important;}
.pro-sire-workspace-launch-copy{
  display:flex;
  flex-direction:column;
  gap:3px;
  min-width:0;
}
.pro-sire-workspace-launch-copy strong{
  color:#075985;
  font-size:13px;
  font-weight:950;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.pro-sire-workspace-launch-copy span{
  color:#475569;
  font-size:12px;
  font-weight:750;
  line-height:1.35;
}
.pro-sire-workspace-top{
  display:none;
}
.pro-sire-workspace-overview{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(130px,1fr));
  gap:10px;
  margin:0 0 16px;
}
.pro-sire-workspace-overview[hidden]{display:none!important;}
.pro-sire-workspace-overview div{
  min-width:0;
  padding:10px 12px;
  border:1px solid rgba(226,232,240,.95);
  border-radius:14px;
  background:#fff;
  box-shadow:0 1px 0 rgba(15,23,42,.03);
}
.pro-sire-workspace-overview b{
  display:block;
  color:#0f172a;
  font-size:15px;
  font-weight:950;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.pro-sire-workspace-overview em{
  display:block;
  margin-top:3px;
  color:#64748b;
  font-size:10px;
  font-style:normal;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
}
body.pro-sire-workspace-open{
  overflow:hidden;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open{
  position:fixed;
  inset:18px;
  z-index:5000;
  display:block!important;
  overflow:auto;
  padding:22px!important;
  border-radius:24px;
  border:1px solid rgba(14,165,233,.30);
  background:linear-gradient(180deg,#f8fdff 0%,#ffffff 42%,#f8fbff 100%);
  box-shadow:0 28px 90px rgba(15,23,42,.34),inset 0 1px 0 rgba(255,255,255,.86);
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-top{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:18px;
  margin:0 0 18px;
  padding:16px;
  border:1px solid rgba(37,99,235,.15);
  border-radius:20px;
  background:linear-gradient(135deg,#172554,#2563eb 55%,#14b8a6);
  color:white;
  box-shadow:0 14px 30px rgba(37,99,235,.17);
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-title-block{
  min-width:0;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-title-block .section-kicker{
  color:rgba(219,234,254,.9);
  margin:0 0 5px;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-title-block h2{
  margin:0;
  color:white;
  font-size:28px;
  line-height:1.08;
  letter-spacing:-.04em;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-title-block p{
  margin:6px 0 0;
  color:rgba(239,246,255,.88);
  font-size:13px;
  font-weight:750;
  line-height:1.4;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open #closeProSireWorkspaceButton{
  background:rgba(255,255,255,.96);
  border-color:rgba(255,255,255,.35);
  color:#1e3a8a;
  white-space:nowrap;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .report-table-group-count{
  background:rgba(255,255,255,.92);
  color:#075985;
  border-color:rgba(255,255,255,.55);
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-header,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-settings-toolbar,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-applied-summary,
.pro-sire-query-grid-panel.pro-sire-workspace-open .quick-status-bar,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-summary,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-scroll{
  max-width:100%;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-applied-summary{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-delta-card{
  grid-column:1 / -1;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-scroll{
  max-height:52vh;
  border-radius:18px;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table{
  min-width:1420px;
}
body.pro-sire-workspace-open .bottom-action-bar,
body.pro-sire-workspace-open .sticky-action-bar,
body.pro-sire-workspace-open .floating-action-bar{
  display:none!important;
}
@media(max-width:1100px){
  .pro-sire-workspace-launch{align-items:flex-start;flex-direction:column;}
  .pro-sire-query-grid-panel.pro-sire-workspace-open{inset:10px;padding:14px!important;border-radius:18px;}
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-top{grid-template-columns:1fr;align-items:flex-start;}
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-applied-summary{grid-template-columns:1fr;}
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-scroll{max-height:48vh;}
}

/* PRO_SYSTEM_BUILDER_001O — SIRE workspace containment + report setup cleanup */
.pro-sire-analysis-card .report-option-list{
  gap:10px!important;
}
.pro-sire-analysis-card .report-option{
  grid-template-columns:minmax(230px,320px) minmax(0,1fr)!important;
  align-items:center!important;
  padding:12px!important;
}
.pro-sire-analysis-card #proSnapshotStatus{
  margin-top:0!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  line-height:1.38!important;
}
.pro-sire-analysis-card .pro-sire-workspace-launch{
  margin:10px 0 0!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-root:not(.pro-sire-workspace-open){
  display:none!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-root.pro-sire-workspace-open{
  position:fixed!important;
  inset:18px!important;
  width:auto!important;
  height:auto!important;
  max-width:none!important;
  max-height:none!important;
  z-index:9000!important;
  transform:none!important;
  contain:layout paint!important;
  overscroll-behavior:contain!important;
  will-change:auto!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-root.pro-sire-workspace-open .pro-sire-query-grid-scroll{
  max-height:calc(100vh - 350px)!important;
  min-height:260px!important;
  overflow:auto!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-root.pro-sire-workspace-open .pro-sire-query-grid-table{
  min-width:1480px!important;
}
body.pro-sire-workspace-open{
  overflow:hidden!important;
}
body.pro-sire-workspace-open::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:8999;
  background:rgba(15,23,42,.28);
  backdrop-filter:blur(2px);
  pointer-events:none;
}
body.pro-sire-workspace-open .pro-sire-query-grid-panel.pro-sire-workspace-root.pro-sire-workspace-open{
  pointer-events:auto;
}
@media(max-width:900px){
  .pro-sire-analysis-card .report-option{
    grid-template-columns:1fr!important;
  }
  .pro-sire-query-grid-panel.pro-sire-workspace-root.pro-sire-workspace-open{
    inset:10px!important;
  }
}

/* PRO_SYSTEM_BUILDER_001P — SIRE visual restructure and full-screen workspace polish */
body[data-workspace-mode="pro_system_builder"] #builder-actions .builder-action-grid.report-groups-layout{
  grid-template-columns:minmax(360px,.76fr) minmax(620px,1.24fr)!important;
  gap:18px!important;
  align-items:start!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .polished-management-card{
  grid-column:1 / -1!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-analysis-card{
  min-height:0!important;
  padding:16px!important;
  align-self:start!important;
}
.pro-sire-setup-compact{
  display:grid;
  gap:10px;
}
.pro-sire-setup-action-row{
  display:grid;
  grid-template-columns:minmax(210px,320px) minmax(0,1fr);
  align-items:center;
  gap:14px;
  padding:12px;
  border:1px solid rgba(226,232,240,.92);
  border-radius:16px;
  background:linear-gradient(180deg,#ffffff,#f8fbff);
}
.pro-sire-setup-action-row .btn{
  width:100%;
  min-height:42px!important;
  margin:0!important;
}
.pro-sire-setup-action-row .report-option-copy{
  margin:0!important;
  max-width:none!important;
  text-align:left!important;
  font-size:12.5px!important;
  line-height:1.45!important;
}
.pro-sire-analysis-card #proSnapshotStatus{
  border-radius:14px!important;
  font-size:12.5px!important;
  padding:10px 12px!important;
}
.pro-sire-analysis-card .pro-sire-workspace-launch{
  margin:0!important;
  min-height:0!important;
  padding:11px 12px!important;
  border-radius:14px!important;
}
.pro-sire-analysis-card .pro-sire-workspace-launch-copy strong{
  font-size:12px!important;
}
.pro-sire-analysis-card .pro-sire-workspace-launch-copy span{
  font-size:11.5px!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .report-control-card:not(.pro-sire-analysis-card){
  align-self:start!important;
}

body.pro-sire-workspace-open{
  overflow:hidden!important;
}
body.pro-sire-workspace-open::after{
  display:none!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-root:not(.pro-sire-workspace-open){
  display:none!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-root.pro-sire-workspace-open{
  position:fixed!important;
  inset:0!important;
  width:100vw!important;
  height:100vh!important;
  max-width:none!important;
  max-height:none!important;
  z-index:12000!important;
  display:flex!important;
  flex-direction:column!important;
  gap:10px!important;
  overflow:hidden!important;
  padding:16px 18px!important;
  border:0!important;
  border-radius:0!important;
  background:linear-gradient(180deg,#f8fdff 0%,#ffffff 42%,#f8fbff 100%)!important;
  box-shadow:none!important;
  contain:layout paint!important;
  overscroll-behavior:contain!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-top{
  flex:0 0 auto!important;
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr) auto!important;
  gap:16px!important;
  align-items:center!important;
  margin:0!important;
  padding:14px 16px!important;
  border:1px solid rgba(37,99,235,.15)!important;
  border-radius:18px!important;
  background:linear-gradient(135deg,#172554,#2563eb 55%,#14b8a6)!important;
  color:#fff!important;
  box-shadow:0 12px 28px rgba(37,99,235,.15)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-title-block h2{
  font-size:24px!important;
  letter-spacing:-.035em!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-title-block p{
  display:none!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-overview{
  flex:0 0 auto!important;
  display:grid!important;
  grid-template-columns:repeat(9,minmax(96px,1fr))!important;
  gap:8px!important;
  margin:0!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-overview[hidden]{display:none!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-overview div{
  padding:8px 10px!important;
  border-radius:12px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-overview b{
  font-size:14px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-overview em{
  font-size:9px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-header{
  flex:0 0 auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  margin:0!important;
  padding:10px 12px!important;
  border:1px solid rgba(226,232,240,.92)!important;
  border-radius:14px!important;
  background:#fff!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-header p{
  margin-top:3px!important;
  max-width:900px!important;
  font-size:12px!important;
  line-height:1.35!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-summary{
  flex:0 0 auto!important;
  margin:0!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-settings-toolbar{
  flex:0 0 auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  margin:0!important;
  padding:10px 12px!important;
  border-radius:14px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-settings-toolbar p{
  max-width:760px!important;
  font-size:11.5px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-applied-summary{
  flex:0 0 auto!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:10px!important;
  margin:0!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-applied-summary[hidden]{display:none!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-summary-card{
  padding:10px 12px!important;
  border-radius:14px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-summary-card>strong{
  font-size:13px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-summary-card>span{
  margin-bottom:8px!important;
  font-size:11.5px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-summary-metrics{
  gap:8px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-summary-metrics span{
  padding:8px 9px!important;
  border-radius:11px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-summary-metrics b{
  font-size:13.5px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-summary-metrics em{
  font-size:8.7px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-delta-card{
  grid-column:1 / -1!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .quick-status-bar{
  flex:0 0 auto!important;
  margin:0!important;
  padding:9px 12px!important;
  border-radius:13px!important;
  font-size:12px!important;
}
.pro-sire-query-filter-bar{
  flex:0 0 auto;
  display:grid;
  grid-template-columns:minmax(280px,1fr) 170px 190px auto;
  gap:10px;
  align-items:end;
  padding:10px 12px;
  border:1px solid rgba(226,232,240,.92);
  border-radius:14px;
  background:linear-gradient(180deg,#ffffff,#f8fbff);
}
.pro-sire-query-filter-bar[hidden]{display:none!important;}
.pro-sire-query-filter-bar label{
  display:grid;
  gap:4px;
  color:#475569;
  font-size:9px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.07em;
}
.pro-sire-query-filter-bar input,
.pro-sire-query-filter-bar select{
  min-height:34px;
  border:1px solid rgba(203,213,225,.95);
  border-radius:10px;
  background:#fff;
  padding:0 10px;
  color:#0f172a;
  font-size:12px;
  font-weight:850;
  outline:none;
}
.pro-sire-query-filter-bar input:focus,
.pro-sire-query-filter-bar select:focus{
  border-color:#38bdf8;
  box-shadow:0 0 0 3px rgba(14,165,233,.12);
}
#proSireQueryFilterCount{
  justify-self:end;
  align-self:center;
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:0 12px;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:11px;
  font-weight:950;
  white-space:nowrap;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-scroll{
  flex:1 1 auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:auto!important;
  border:1px solid rgba(226,232,240,.94)!important;
  border-radius:16px!important;
  background:#fff!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table{
  min-width:1480px!important;
  width:100%!important;
  border-collapse:separate!important;
  border-spacing:0!important;
  font-size:11.5px!important;
}
.pro-sire-query-grid-table th,
.pro-sire-query-grid-table td{
  text-align:center!important;
  vertical-align:middle!important;
  white-space:nowrap!important;
}
.pro-sire-query-grid-table th:first-child,
.pro-sire-query-grid-table td:first-child{
  text-align:left!important;
}
.pro-sire-query-grid-table thead th{
  position:sticky;
  top:0;
  z-index:4;
  border-bottom:1px solid rgba(203,213,225,.95)!important;
}
.pro-sire-query-grid-table thead tr:nth-child(2) th{
  top:34px;
  z-index:5;
}
.pro-sire-query-grid-table .pro-sire-group-head th{
  padding:9px 8px!important;
  background:#f8fafc!important;
  color:#334155!important;
  font-size:9.5px!important;
  letter-spacing:.1em!important;
}
.pro-sire-query-grid-table .pro-sire-sub-head th{
  padding:7px 7px!important;
  background:#ffffff!important;
  color:#475569!important;
  font-size:9px!important;
  letter-spacing:.08em!important;
}
.pro-sire-query-grid-table tbody th,
.pro-sire-query-grid-table tbody td{
  padding:8px 8px!important;
  border-bottom:1px solid rgba(226,232,240,.82)!important;
}
.pro-sire-query-grid-table tbody tr:hover th,
.pro-sire-query-grid-table tbody tr:hover td{
  background:#f8fbff!important;
}
.pro-sire-query-cell{
  min-width:250px!important;
  max-width:320px!important;
  background:#fff!important;
}
.pro-sire-query-main{
  display:flex;
  align-items:center;
  gap:7px;
  margin-bottom:5px;
}
.pro-sire-query-main strong{
  display:inline-flex;
  align-items:center;
  min-width:36px;
  color:#0f172a;
  font-size:13px;
  font-weight:950;
}
.pro-sire-query-help,
.pro-sire-table-help{
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  border:1px solid rgba(14,165,233,.34)!important;
  background:#e0f7ff!important;
  color:#0369a1!important;
  font-size:11px!important;
  cursor:help!important;
}
.pro-sire-table-help{
  display:inline-flex!important;
  vertical-align:middle!important;
  margin-left:4px!important;
}
.pro-sire-query-chips{
  display:flex;
  flex-wrap:wrap;
  gap:4px;
}
.pro-sire-query-chips span{
  padding:3px 7px!important;
  border-radius:999px!important;
  background:#ecfeff!important;
  border:1px solid rgba(14,165,233,.22)!important;
  color:#0369a1!important;
  font-size:9.5px!important;
  font-weight:900!important;
  letter-spacing:.02em!important;
}
.pro-sire-threshold-input{
  width:72px!important;
  min-height:34px!important;
  text-align:center!important;
  border-radius:10px!important;
}
.pro-sire-active-input{
  transform:scale(1.12);
}
.pro-sire-status-pill{display:none!important;}
@media(max-width:1300px){
  body[data-workspace-mode="pro_system_builder"] #builder-actions .builder-action-grid.report-groups-layout{grid-template-columns:1fr!important;}
  .pro-sire-setup-action-row{grid-template-columns:1fr!important;}
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-overview{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
  .pro-sire-query-filter-bar{grid-template-columns:1fr 1fr!important;}
  #proSireQueryFilterCount{justify-self:start;}
}
@media(max-width:900px){
  .pro-sire-query-grid-panel.pro-sire-workspace-root.pro-sire-workspace-open{padding:10px!important;}
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-top{grid-template-columns:1fr!important;}
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-applied-summary{grid-template-columns:1fr!important;}
  .pro-sire-query-filter-bar{grid-template-columns:1fr!important;}
}

/* PRO_SYSTEM_BUILDER_001Q — premium layout pass: Report Setup balance, true SIRE workspace, component filters */
body[data-workspace-mode="pro_system_builder"] #builder-actions .builder-action-grid.report-groups-layout{
  grid-template-columns:repeat(3,minmax(260px,1fr))!important;
  gap:18px!important;
  align-items:start!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .report-control-card:not(.pro-sire-analysis-card){
  grid-column:span 2!important;
  min-height:0!important;
  padding:16px!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .report-control-card:not(.pro-sire-analysis-card) .report-option-list{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:14px!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .report-control-card:not(.pro-sire-analysis-card) .report-option{
  margin:0!important;
  min-height:142px!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:flex-start!important;
  gap:12px!important;
  border:1px solid rgba(226,232,240,.95)!important;
  border-radius:18px!important;
  padding:14px!important;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9)!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .report-control-card:not(.pro-sire-analysis-card) .report-option .btn{
  margin:0!important;
  width:100%!important;
  min-height:40px!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .report-control-card:not(.pro-sire-analysis-card) .report-option-copy{
  flex:1 1 auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:64px!important;
  margin:0!important;
  padding:10px 12px!important;
  font-size:12px!important;
  line-height:1.45!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-analysis-card{
  grid-column:auto!important;
  min-height:0!important;
  height:auto!important;
  padding:16px!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-analysis-card .pro-sire-setup-action-row{
  grid-template-columns:1fr!important;
  min-height:142px!important;
  align-content:start!important;
  gap:12px!important;
  padding:14px!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-analysis-card .pro-sire-setup-action-row .btn{
  min-height:40px!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-analysis-card .pro-sire-setup-action-row .report-option-copy{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:64px!important;
  text-align:center!important;
  padding:10px 12px!important;
  border-radius:14px!important;
  background:linear-gradient(180deg,#f8fbff,#eef6ff)!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-analysis-card #proSnapshotStatus{
  min-height:38px!important;
  display:flex!important;
  align-items:center!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .report-table-groups-card,
body[data-workspace-mode="pro_system_builder"] #builder-actions .polished-management-card{
  grid-column:1 / -1!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .report-table-groups-card .report-table-groups-list{
  grid-template-columns:repeat(3,minmax(220px,1fr))!important;
}

html.pro-sire-workspace-open,
body.pro-sire-workspace-open{
  width:100%!important;
  height:100%!important;
  overflow:hidden!important;
}
body.pro-sire-workspace-open .app-shell{
  visibility:hidden!important;
  pointer-events:none!important;
}
body.pro-sire-workspace-open #proSireQueryGridPanel{
  visibility:visible!important;
  pointer-events:auto!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-root.pro-sire-workspace-open{
  position:fixed!important;
  inset:0!important;
  width:100dvw!important;
  height:100dvh!important;
  max-width:none!important;
  max-height:none!important;
  z-index:2147483000!important;
  display:grid!important;
  grid-template-rows:auto auto auto auto auto auto minmax(0,1fr)!important;
  gap:10px!important;
  overflow:hidden!important;
  margin:0!important;
  padding:12px 14px 14px!important;
  border:0!important;
  border-radius:0!important;
  background:linear-gradient(180deg,#f8fdff 0%,#ffffff 48%,#f6fbff 100%)!important;
  box-shadow:none!important;
  contain:none!important;
  isolation:isolate!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-top{
  min-height:72px!important;
  padding:12px 16px!important;
  border-radius:18px!important;
  grid-template-columns:auto minmax(0,1fr) auto!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open #closeProSireWorkspaceButton{
  min-height:36px!important;
  padding:0 14px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-title-block h2{
  font-size:22px!important;
  line-height:1!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-overview{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:10px!important;
  margin:0!important;
}
.pro-sire-cockpit-card{
  border:1px solid rgba(203,213,225,.85)!important;
  border-radius:16px!important;
  padding:10px 12px!important;
  background:linear-gradient(180deg,#ffffff,#f8fbff)!important;
  box-shadow:0 8px 20px rgba(15,23,42,.045)!important;
}
.pro-sire-cockpit-card strong{
  display:block!important;
  margin-bottom:8px!important;
  color:#0f172a!important;
  font-size:12px!important;
  font-weight:950!important;
  letter-spacing:.09em!important;
  text-transform:uppercase!important;
}
.pro-sire-cockpit-metrics{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:7px!important;
}
.pro-sire-cockpit-metrics span{
  min-width:0!important;
  padding:7px 8px!important;
  border:1px solid rgba(226,232,240,.95)!important;
  border-radius:12px!important;
  background:#fff!important;
}
.pro-sire-cockpit-metrics b{
  display:block!important;
  color:#0f172a!important;
  font-size:13px!important;
  font-weight:950!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.pro-sire-cockpit-metrics em{
  display:block!important;
  margin-top:2px!important;
  color:#64748b!important;
  font-size:8.5px!important;
  font-style:normal!important;
  font-weight:950!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-header{
  padding:8px 12px!important;
  border-radius:14px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-header p{
  font-size:11px!important;
  margin-top:2px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-summary{
  display:flex!important;
  gap:7px!important;
  flex-wrap:wrap!important;
  margin:0!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-summary span{
  min-height:28px!important;
  padding:0 10px!important;
  font-size:11px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-settings-toolbar{
  padding:8px 10px!important;
  border-radius:14px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-settings-actions{
  display:flex!important;
  gap:8px!important;
  flex-wrap:wrap!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-settings-actions .btn{
  min-height:34px!important;
  padding:0 12px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-settings-toolbar p{
  max-width:680px!important;
  font-size:10.8px!important;
  line-height:1.35!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-applied-summary{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-delta-card{
  grid-column:1 / -1!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-summary-card,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-delta-card{
  padding:9px 10px!important;
  border-radius:14px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-summary-metrics,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-delta-metrics{
  gap:7px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-summary-metrics span,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-delta{
  padding:7px 8px!important;
  min-height:50px!important;
}
.pro-sire-query-filter-bar{
  grid-template-columns:220px 132px 150px minmax(360px,1fr) 150px auto!important;
  gap:8px!important;
  align-items:end!important;
  padding:9px 10px!important;
  border-radius:14px!important;
}
.pro-sire-filter-field{
  min-width:0!important;
  display:grid!important;
  gap:4px!important;
}
.pro-sire-filter-field label,
.pro-sire-filter-label-row span{
  color:#475569!important;
  font-size:8.5px!important;
  font-weight:950!important;
  text-transform:uppercase!important;
  letter-spacing:.08em!important;
}
.pro-sire-filter-label-row{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
}
#proSireQueryComponentClear{
  border:0!important;
  background:transparent!important;
  color:#2563eb!important;
  font-size:9px!important;
  font-weight:950!important;
  cursor:pointer!important;
}
.pro-sire-query-filter-bar input,
.pro-sire-query-filter-bar select{
  min-height:32px!important;
  border-radius:9px!important;
  font-size:11.5px!important;
}
.pro-sire-component-filter-list{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:5px!important;
  min-height:32px!important;
  padding:4px!important;
  border:1px solid rgba(203,213,225,.95)!important;
  border-radius:10px!important;
  background:#fff!important;
}
.pro-sire-component-filter-chip{
  display:inline-flex!important;
  align-items:center!important;
  gap:4px!important;
  min-height:23px!important;
  padding:0 7px!important;
  border-radius:999px!important;
  border:1px solid rgba(14,165,233,.24)!important;
  background:#ecfeff!important;
  color:#075985!important;
  font-size:9.5px!important;
  font-weight:900!important;
  text-transform:none!important;
  letter-spacing:0!important;
  cursor:pointer!important;
}
.pro-sire-component-filter-chip input{
  width:12px!important;
  height:12px!important;
  min-height:0!important;
  accent-color:#0891b2!important;
}
.pro-sire-component-filter-chip:has(input:checked){
  border-color:rgba(37,99,235,.42)!important;
  background:#dbeafe!important;
  color:#1d4ed8!important;
}
#proSireQueryFilterCount{
  min-height:30px!important;
  font-size:10.5px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-scroll{
  min-height:0!important;
  max-height:none!important;
  overflow:auto!important;
  border-radius:14px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table{
  min-width:1560px!important;
  font-size:11px!important;
}
.pro-sire-query-grid-table thead th{
  top:0!important;
  z-index:8!important;
}
.pro-sire-query-grid-table thead tr:nth-child(2) th{
  top:30px!important;
  z-index:9!important;
}
.pro-sire-query-grid-table .pro-sire-group-head th{
  padding:7px 7px!important;
  font-size:8.5px!important;
}
.pro-sire-query-grid-table .pro-sire-sub-head th{
  padding:6px 6px!important;
  font-size:8.4px!important;
}
.pro-sire-query-grid-table tbody th,
.pro-sire-query-grid-table tbody td{
  padding:7px 7px!important;
}
.pro-sire-query-grid-table th:nth-child(1),
.pro-sire-query-grid-table td:nth-child(1){
  position:sticky!important;
  left:0!important;
  z-index:6!important;
  background:#fff!important;
  box-shadow:1px 0 0 rgba(226,232,240,.86)!important;
}
.pro-sire-query-grid-table th:nth-child(2),
.pro-sire-query-grid-table td:nth-child(2){
  position:sticky!important;
  left:240px!important;
  z-index:6!important;
  background:#fff!important;
  box-shadow:1px 0 0 rgba(226,232,240,.86)!important;
}
.pro-sire-query-grid-table thead th:nth-child(1),
.pro-sire-query-grid-table thead th:nth-child(2){
  z-index:12!important;
  background:#f8fafc!important;
}
.pro-sire-query-cell{
  min-width:240px!important;
  max-width:240px!important;
  width:240px!important;
}
.pro-sire-query-main{
  margin-bottom:4px!important;
}
.pro-sire-query-chips{
  flex-wrap:nowrap!important;
  overflow:hidden!important;
  gap:3px!important;
  max-width:218px!important;
}
.pro-sire-query-chips span{
  flex:0 0 auto!important;
  padding:2px 6px!important;
  font-size:8.7px!important;
}
.pro-sire-threshold-input{
  width:64px!important;
  min-height:30px!important;
  border-radius:9px!important;
  font-size:11px!important;
}
.pro-sire-active-input{
  width:18px!important;
  height:18px!important;
  transform:none!important;
  accent-color:#0891b2!important;
}
@media(max-width:1400px){
  body[data-workspace-mode="pro_system_builder"] #builder-actions .builder-action-grid.report-groups-layout{grid-template-columns:1fr!important;}
  body[data-workspace-mode="pro_system_builder"] #builder-actions .report-control-card:not(.pro-sire-analysis-card),
  body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-analysis-card{grid-column:1 / -1!important;}
  body[data-workspace-mode="pro_system_builder"] #builder-actions .report-table-groups-card .report-table-groups-list{grid-template-columns:repeat(2,minmax(220px,1fr))!important;}
  .pro-sire-query-filter-bar{grid-template-columns:180px 120px 135px 1fr 135px!important;}
  #proSireQueryFilterCount{grid-column:1 / -1!important;justify-self:start!important;}
}
@media(max-width:1000px){
  body[data-workspace-mode="pro_system_builder"] #builder-actions .report-control-card:not(.pro-sire-analysis-card) .report-option-list{grid-template-columns:1fr!important;}
  body[data-workspace-mode="pro_system_builder"] #builder-actions .report-table-groups-card .report-table-groups-list{grid-template-columns:1fr!important;}
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-top{grid-template-columns:1fr!important;}
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-overview{grid-template-columns:1fr!important;}
  .pro-sire-cockpit-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .pro-sire-query-filter-bar{grid-template-columns:1fr!important;}
}

/* PRO_SYSTEM_BUILDER_001R — layout reset and SIRE workspace visual correction */
body[data-workspace-mode="pro_system_builder"] #builder-actions .builder-action-grid.report-groups-layout{
  grid-template-columns:minmax(0,2fr) minmax(340px,1fr)!important;
  grid-template-rows:auto auto auto!important;
  gap:18px!important;
  align-items:stretch!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .report-table-groups-card{
  grid-column:1!important;
  grid-row:1 / 4!important;
  min-height:100%!important;
  align-self:stretch!important;
  display:flex!important;
  flex-direction:column!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .report-table-groups-card .report-table-groups-list{
  grid-template-columns:repeat(2,minmax(240px,1fr))!important;
  gap:10px!important;
  flex:1 1 auto!important;
  align-content:start!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .report-control-card:not(.pro-sire-analysis-card){
  grid-column:2!important;
  grid-row:1!important;
  padding:14px!important;
  min-height:0!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .report-control-card:not(.pro-sire-analysis-card) .report-option-list{
  grid-template-columns:1fr!important;
  gap:10px!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .report-control-card:not(.pro-sire-analysis-card) .report-option{
  min-height:0!important;
  padding:12px!important;
  gap:9px!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .report-control-card:not(.pro-sire-analysis-card) .report-option-copy{
  min-height:0!important;
  padding:9px 10px!important;
  font-size:11.5px!important;
  line-height:1.38!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-analysis-card{
  grid-column:2!important;
  grid-row:2!important;
  padding:14px!important;
  align-self:start!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-analysis-card .pro-sire-setup-action-row{
  min-height:0!important;
  padding:12px!important;
  gap:10px!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-analysis-card .pro-sire-setup-action-row .report-option-copy{
  min-height:0!important;
  padding:9px 10px!important;
  font-size:11.5px!important;
  line-height:1.38!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-analysis-card #proSnapshotStatus{
  min-height:0!important;
  max-height:none!important;
  padding:9px 10px!important;
  font-size:11.5px!important;
  line-height:1.35!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-analysis-card .pro-sire-workspace-launch{
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:10px!important;
  padding:10px!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-analysis-card .pro-sire-workspace-launch-copy span{
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .polished-management-card{
  grid-column:2!important;
  grid-row:3!important;
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:10px!important;
  align-self:start!important;
  padding:14px!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .polished-management-card .management-copy{
  font-size:11.5px!important;
  line-height:1.38!important;
  text-align:left!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .polished-management-card .action-row{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:8px!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .polished-management-card .btn{
  min-height:34px!important;
  padding:0 10px!important;
  font-size:11px!important;
}

/* Full-screen SIRE workspace: tighter cockpit, stable content, no pseudo-modal feel */
.pro-sire-query-grid-panel.pro-sire-workspace-root.pro-sire-workspace-open{
  grid-template-rows:auto auto auto auto auto minmax(0,1fr)!important;
  padding:10px 12px 12px!important;
  gap:8px!important;
  background:linear-gradient(180deg,#f7fcff 0%,#ffffff 48%,#f7fbff 100%)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-top{
  min-height:64px!important;
  padding:10px 14px!important;
  border-radius:16px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-title-block h2{
  font-size:21px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-overview{
  grid-template-columns:1.1fr 1.15fr 1fr!important;
  gap:8px!important;
}
.pro-sire-cockpit-card{
  padding:9px 10px!important;
  border-radius:14px!important;
}
.pro-sire-cockpit-card strong{
  margin-bottom:7px!important;
  font-size:11px!important;
}
.pro-sire-cockpit-metrics{
  gap:6px!important;
}
.pro-sire-cockpit-metrics span{
  padding:7px 8px!important;
  border-radius:11px!important;
}
.pro-sire-cockpit-metrics b{
  font-size:14px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-header{
  padding:8px 10px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-summary:empty{
  display:none!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .quick-status-bar{
  padding:8px 10px!important;
  font-size:11.5px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-applied-summary{
  grid-template-columns:1fr 1fr!important;
  gap:8px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-summary-card{
  border-radius:16px!important;
  padding:10px 12px!important;
  box-shadow:0 8px 22px rgba(15,23,42,.04)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-summary-card>strong{
  font-size:12px!important;
  letter-spacing:.09em!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-summary-metrics span{
  min-height:46px!important;
  padding:7px 8px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-summary-metrics b{
  font-size:14px!important;
}
.pro-sire-query-filter-bar{
  grid-template-columns:190px 118px 138px minmax(420px,1fr) 130px auto!important;
  padding:8px 10px!important;
}
.pro-sire-component-filter-list{
  max-height:60px!important;
  overflow:auto!important;
  align-content:flex-start!important;
}
.pro-sire-component-filter-chip{
  font-size:9px!important;
  padding:0 6px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table{
  min-width:1580px!important;
  font-size:11px!important;
}
.pro-sire-query-grid-table th:nth-child(1),
.pro-sire-query-grid-table td:nth-child(1){
  width:290px!important;
  min-width:290px!important;
  max-width:290px!important;
}
.pro-sire-query-grid-table th:nth-child(2),
.pro-sire-query-grid-table td:nth-child(2){
  width:74px!important;
  min-width:74px!important;
  max-width:74px!important;
  left:290px!important;
}
.pro-sire-query-cell{
  width:290px!important;
  min-width:290px!important;
  max-width:290px!important;
}
.pro-sire-query-main{
  margin-bottom:3px!important;
}
.pro-sire-query-main strong{
  font-size:13px!important;
  min-width:35px!important;
}
.pro-sire-query-brief{
  max-width:250px!important;
  color:#334155!important;
  font-size:10.5px!important;
  font-weight:850!important;
  line-height:1.25!important;
  white-space:normal!important;
  overflow:hidden!important;
  display:-webkit-box!important;
  -webkit-line-clamp:2!important;
  -webkit-box-orient:vertical!important;
}
.pro-sire-query-chips{display:none!important;}
.pro-sire-query-grid-table tbody th,
.pro-sire-query-grid-table tbody td{
  padding:7px 8px!important;
}
.pro-sire-query-grid-table .pro-sire-group-head th{
  font-size:8.2px!important;
}
.pro-sire-query-grid-table .pro-sire-sub-head th{
  font-size:8.2px!important;
}
.pro-sire-threshold-input{
  width:70px!important;
  min-width:70px!important;
}

@media(max-width:1400px){
  body[data-workspace-mode="pro_system_builder"] #builder-actions .builder-action-grid.report-groups-layout{
    grid-template-columns:1fr!important;
  }
  body[data-workspace-mode="pro_system_builder"] #builder-actions .report-table-groups-card,
  body[data-workspace-mode="pro_system_builder"] #builder-actions .report-control-card:not(.pro-sire-analysis-card),
  body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-analysis-card,
  body[data-workspace-mode="pro_system_builder"] #builder-actions .polished-management-card{
    grid-column:1!important;
    grid-row:auto!important;
  }
  body[data-workspace-mode="pro_system_builder"] #builder-actions .report-control-card:not(.pro-sire-analysis-card) .report-option-list{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:1000px){
  body[data-workspace-mode="pro_system_builder"] #builder-actions .report-table-groups-card .report-table-groups-list,
  body[data-workspace-mode="pro_system_builder"] #builder-actions .report-control-card:not(.pro-sire-analysis-card) .report-option-list{
    grid-template-columns:1fr!important;
  }
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-overview,
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-applied-summary{
    grid-template-columns:1fr!important;
  }
}

/* PRO_SYSTEM_BUILDER_001S — tuning controls, layout balance and workspace polish */
body[data-workspace-mode="pro_system_builder"] #builder-actions .builder-action-grid.report-groups-layout{
  grid-template-columns:minmax(0,2fr) minmax(360px,1fr)!important;
  grid-template-rows:auto auto auto!important;
  align-items:start!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .report-table-groups-card{
  grid-column:1!important;
  grid-row:1 / 3!important;
  align-self:stretch!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .system-management-card{
  grid-column:1!important;
  grid-row:3!important;
  align-self:start!important;
  padding:16px!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .system-management-card .action-row{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .report-control-card:not(.pro-sire-analysis-card){
  grid-column:2!important;
  grid-row:1!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-analysis-card{
  grid-column:2!important;
  grid-row:2!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-analysis-card #proSnapshotStatus.status-complete{
  color:#075985!important;
  background:linear-gradient(180deg,#f8fdff,#eef9ff)!important;
  border-color:rgba(14,165,233,.18)!important;
  font-weight:850!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-workspace-launch-copy span{
  font-size:11px!important;
  color:#64748b!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-workspace-launch-copy strong{
  font-size:12px!important;
}

.pro-sire-settings-toolbar{
  align-items:center!important;
  padding:9px 10px!important;
}
.pro-sire-settings-toolbar #proSireDraftStateMessage{
  text-align:right!important;
  max-width:560px!important;
}
.pro-sire-dirty-message{
  color:#92400e!important;
  font-weight:950!important;
}
#proSireApplyChangesButton:disabled{
  opacity:.5!important;
  cursor:not-allowed!important;
  filter:grayscale(.2)!important;
}
#proSireApplyChangesButton.is-dirty:not(:disabled){
  box-shadow:0 8px 20px rgba(37,99,235,.18)!important;
}
.pro-sire-bulk-tuning{
  margin:0 0 10px!important;
  padding:10px!important;
  border:1px solid rgba(14,165,233,.20)!important;
  border-radius:14px!important;
  background:linear-gradient(180deg,#f8fdff,#f2fbff)!important;
  display:grid!important;
  grid-template-columns:190px minmax(0,1fr)!important;
  gap:10px!important;
  align-items:start!important;
}
.pro-sire-bulk-tuning[hidden]{display:none!important;}
.pro-sire-bulk-title strong{
  display:block!important;
  color:#075985!important;
  font-size:11px!important;
  text-transform:uppercase!important;
  letter-spacing:.12em!important;
  margin-bottom:3px!important;
}
.pro-sire-bulk-title span{
  display:block!important;
  color:#475569!important;
  font-size:11px!important;
  line-height:1.35!important;
  font-weight:750!important;
}
.pro-sire-bulk-grid{
  display:grid!important;
  grid-template-columns:150px repeat(3,minmax(150px,1fr)) auto!important;
  gap:8px!important;
  align-items:end!important;
}
.pro-sire-bulk-field,
.pro-sire-bulk-rule-card{
  display:grid!important;
  gap:5px!important;
  min-width:0!important;
}
.pro-sire-bulk-field span,
.pro-sire-bulk-rule-card label{
  color:#334155!important;
  font-size:10px!important;
  font-weight:950!important;
  text-transform:uppercase!important;
  letter-spacing:.06em!important;
}
.pro-sire-bulk-rule-card label{
  display:flex!important;
  gap:6px!important;
  align-items:center!important;
}
.pro-sire-bulk-rule-card label input{
  width:14px!important;
  height:14px!important;
  accent-color:#0891b2!important;
}
.pro-sire-bulk-rule-card div{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:6px!important;
}
.pro-sire-bulk-grid select,
.pro-sire-bulk-grid input{
  min-height:30px!important;
  border:1px solid rgba(203,213,225,.95)!important;
  border-radius:9px!important;
  background:#fff!important;
  color:#0f172a!important;
  font-size:11px!important;
  font-weight:850!important;
  padding:5px 7px!important;
}
#proSireApplyBulkButton{
  min-height:30px!important;
  align-self:end!important;
  white-space:nowrap!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open{
  padding:8px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-top{
  margin-bottom:6px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-overview{
  gap:6px!important;
  margin-bottom:7px!important;
}
.pro-sire-cockpit-card{
  padding:8px!important;
  border-radius:12px!important;
}
.pro-sire-cockpit-card h3{
  font-size:10.5px!important;
  margin-bottom:5px!important;
}
.pro-sire-cockpit-metrics{
  gap:5px!important;
}
.pro-sire-cockpit-metrics span{
  min-height:38px!important;
  padding:7px 8px!important;
}
.pro-sire-cockpit-metrics b{
  font-size:13px!important;
}
.pro-sire-cockpit-metrics em{
  font-size:8.4px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-header{
  padding:7px 9px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-header p{
  display:none!important;
}
.pro-sire-query-filter-bar{
  grid-template-columns:155px 116px 132px minmax(360px,1fr) 132px auto!important;
  gap:7px!important;
  padding:8px!important;
  margin:0 0 8px!important;
}
.pro-sire-filter-components .pro-sire-component-filter-list{
  max-height:62px!important;
  overflow:auto!important;
}
.pro-sire-component-filter-chip{
  font-size:9px!important;
  min-height:21px!important;
  padding:0 6px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-scroll{
  border-radius:12px!important;
  min-height:0!important;
  overflow:auto!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table{
  min-width:1880px!important;
  font-size:10.7px!important;
}
.pro-sire-query-grid-table thead tr:nth-child(2) th{
  top:28px!important;
}
.pro-sire-query-grid-table .pro-sire-group-head th{
  padding:6px 6px!important;
  font-size:8.2px!important;
}
.pro-sire-query-grid-table .pro-sire-sub-head th{
  padding:5px 5px!important;
  font-size:8px!important;
}
.pro-sire-query-grid-table tbody th,
.pro-sire-query-grid-table tbody td{
  padding:6px 6px!important;
}
.pro-sire-query-cell{
  min-width:178px!important;
  max-width:178px!important;
  width:178px!important;
}
.pro-sire-query-main strong{
  font-size:11.5px!important;
}
.pro-sire-query-brief{
  max-width:150px!important;
  white-space:normal!important;
  line-height:1.13!important;
  font-size:9.6px!important;
  text-transform:none!important;
  letter-spacing:.01em!important;
  color:#0f172a!important;
  font-weight:850!important;
}
.pro-sire-query-grid-table th:nth-child(1),
.pro-sire-query-grid-table td:nth-child(1){
  left:0!important;
  min-width:178px!important;
  max-width:178px!important;
}
.pro-sire-query-grid-table th:nth-child(2),
.pro-sire-query-grid-table td:nth-child(2){
  left:178px!important;
  min-width:58px!important;
  max-width:58px!important;
  width:58px!important;
}
.pro-sire-rule-toggle-cell{
  min-width:86px!important;
  width:86px!important;
}
.pro-sire-rule-toggle-cell label{
  display:inline-flex!important;
  align-items:center!important;
  gap:2px!important;
  margin:0 2px!important;
  font-size:8.5px!important;
  font-weight:950!important;
  color:#075985!important;
}
.pro-sire-rule-toggle-cell input{
  width:13px!important;
  height:13px!important;
  accent-color:#0891b2!important;
}
.pro-sire-threshold-input{
  width:58px!important;
  min-height:28px!important;
  padding:5px 6px!important;
  font-size:10.5px!important;
}
.pro-sire-active-input{
  width:16px!important;
  height:16px!important;
}
.pro-sire-applied-summary{
  margin:8px 0!important;
  gap:8px!important;
}
.pro-sire-summary-card{
  padding:9px!important;
}
.pro-sire-summary-metrics span{
  min-height:42px!important;
  padding:7px!important;
}
@media(max-width:1400px){
  body[data-workspace-mode="pro_system_builder"] #builder-actions .builder-action-grid.report-groups-layout{
    grid-template-columns:1fr!important;
  }
  body[data-workspace-mode="pro_system_builder"] #builder-actions .report-table-groups-card,
  body[data-workspace-mode="pro_system_builder"] #builder-actions .system-management-card,
  body[data-workspace-mode="pro_system_builder"] #builder-actions .report-control-card:not(.pro-sire-analysis-card),
  body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-analysis-card{
    grid-column:1!important;
    grid-row:auto!important;
  }
  .pro-sire-bulk-tuning{grid-template-columns:1fr!important;}
  .pro-sire-bulk-grid{grid-template-columns:1fr 1fr!important;}
}
@media(max-width:900px){
  .pro-sire-bulk-grid{grid-template-columns:1fr!important;}
  body[data-workspace-mode="pro_system_builder"] #builder-actions .system-management-card .action-row{grid-template-columns:1fr!important;}
}

/* PRO_SYSTEM_BUILDER_001T — premium SIRE workspace consolidation */
/* Report Setup: evidence and system management left, run/SIRE actions right */
body[data-workspace-mode="pro_system_builder"] #builder-actions .builder-action-grid.report-groups-layout{
  grid-template-columns:minmax(0,2fr) minmax(380px,1fr)!important;
  grid-template-rows:auto auto auto!important;
  gap:18px!important;
  align-items:start!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .report-table-groups-card{
  grid-column:1!important;
  grid-row:1 / 3!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .system-management-card,
body[data-workspace-mode="pro_system_builder"] #builder-actions .polished-management-card{
  grid-column:1!important;
  grid-row:3!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .report-control-card:not(.pro-sire-analysis-card){
  grid-column:2!important;
  grid-row:1!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-analysis-card{
  grid-column:2!important;
  grid-row:2!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-analysis-card #proSnapshotStatus.status-complete{
  color:#075985!important;
  background:linear-gradient(180deg,#ffffff,#f8fdff)!important;
  border-color:rgba(14,165,233,.18)!important;
  font-size:11.5px!important;
  font-weight:850!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-workspace-launch{
  background:linear-gradient(180deg,#ffffff,#eff6ff)!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-workspace-launch-copy span{
  display:none!important;
}

/* Workspace shell */
.pro-sire-query-grid-panel.pro-sire-workspace-root.pro-sire-workspace-open{
  grid-template-rows:auto auto auto auto minmax(0,1fr)!important;
  gap:8px!important;
  padding:10px 12px 12px!important;
  background:linear-gradient(180deg,#f6fbff 0%,#ffffff 46%,#f8fdff 100%)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-top{
  min-height:60px!important;
  padding:10px 14px!important;
  border-radius:16px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-title-block h2{
  font-size:21px!important;
  line-height:1.02!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-title-block .section-kicker{
  opacity:.82!important;
}

/* Decision cockpit: four meaningful cards */
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-overview{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:8px!important;
  margin:0!important;
}
.pro-sire-cockpit-card{
  min-width:0!important;
  padding:10px 11px!important;
  border-radius:16px!important;
  border:1px solid rgba(203,213,225,.82)!important;
  background:linear-gradient(180deg,#ffffff,#f8fbff)!important;
  box-shadow:0 10px 26px rgba(15,23,42,.045)!important;
}
.pro-sire-cockpit-negative{
  background:linear-gradient(180deg,#fff,#fff7f7)!important;
  border-color:rgba(248,113,113,.24)!important;
}
.pro-sire-cockpit-system{
  background:linear-gradient(180deg,#fff,#f0fdf4)!important;
  border-color:rgba(34,197,94,.18)!important;
}
.pro-sire-cockpit-delta{
  background:linear-gradient(180deg,#fff,#f5f3ff)!important;
  border-color:rgba(124,58,237,.16)!important;
}
.pro-sire-card-eyebrow{
  margin-bottom:2px!important;
  color:#0f766e!important;
  font-size:8.5px!important;
  font-weight:950!important;
  letter-spacing:.14em!important;
  text-transform:uppercase!important;
}
.pro-sire-cockpit-card strong{
  display:block!important;
  margin-bottom:7px!important;
  color:#0f172a!important;
  font-size:14px!important;
  font-weight:950!important;
  letter-spacing:-.015em!important;
  text-transform:none!important;
}
.pro-sire-cockpit-metrics{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:6px!important;
}
.pro-sire-cockpit-metrics span{
  min-height:42px!important;
  padding:7px 8px!important;
  border:1px solid rgba(226,232,240,.92)!important;
  border-radius:12px!important;
  background:rgba(255,255,255,.9)!important;
}
.pro-sire-cockpit-metrics b{
  display:block!important;
  color:#0f172a!important;
  font-size:15px!important;
  font-weight:950!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.pro-sire-cockpit-metrics em{
  display:block!important;
  color:#64748b!important;
  font-size:8.5px!important;
  font-style:normal!important;
  font-weight:950!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
}

/* Header/action strip */
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-header{
  padding:8px 10px!important;
  border-radius:14px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-header p,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-summary,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-applied-summary{
  display:none!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-settings-toolbar{
  padding:8px 10px!important;
  border:1px solid rgba(203,213,225,.78)!important;
  border-radius:14px!important;
  background:linear-gradient(180deg,#ffffff,#f8fbff)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-settings-actions .btn{
  min-height:32px!important;
  padding:0 12px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-settings-toolbar #proSireDraftStateMessage{
  max-width:520px!important;
  color:#475569!important;
  font-size:11px!important;
}

/* Bulk/filter deck */
.pro-sire-workspace-control-deck{gap:8px!important;
  align-items:stretch!important;
  min-height:0!important;
}
.pro-sire-bulk-tuning{
  margin:0!important;
  padding:10px!important;
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:8px!important;
  border:1px solid rgba(14,165,233,.20)!important;
  border-radius:16px!important;
  background:linear-gradient(180deg,#f8fdff,#ffffff)!important;
  box-shadow:0 8px 20px rgba(15,23,42,.035)!important;
}
.pro-sire-bulk-title strong,
.pro-sire-filter-title strong{
  display:block!important;
  color:#075985!important;
  font-size:10.5px!important;
  font-weight:950!important;
  letter-spacing:.12em!important;
  text-transform:uppercase!important;
}
.pro-sire-bulk-title span,
.pro-sire-filter-title span{
  display:block!important;
  margin-top:2px!important;
  color:#64748b!important;
  font-size:10.8px!important;
  line-height:1.25!important;
  font-weight:750!important;
}
.pro-sire-bulk-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr)) auto!important;
  gap:7px!important;
  align-items:end!important;
}
.pro-sire-bulk-scope{
  grid-column:1 / -1!important;
}
.pro-sire-bulk-rule-card{
  min-width:0!important;
  padding:7px!important;
  border:1px solid rgba(203,213,225,.72)!important;
  border-radius:12px!important;
  background:#fff!important;
}
.pro-sire-rule-switch{
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
  margin-bottom:6px!important;
  color:#0f172a!important;
  font-size:10px!important;
  font-weight:950!important;
  letter-spacing:.06em!important;
  text-transform:uppercase!important;
}
.pro-sire-rule-switch input{
  width:15px!important;
  height:15px!important;
  accent-color:#0891b2!important;
}
.pro-sire-bulk-minmax{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:5px!important;
}
.pro-sire-bulk-minmax label{
  display:grid!important;
  gap:3px!important;
  color:#64748b!important;
  font-size:8.5px!important;
  font-weight:950!important;
  text-transform:uppercase!important;
}
.pro-sire-bulk-grid select,
.pro-sire-bulk-grid input{
  min-height:28px!important;
  border-radius:8px!important;
  font-size:10.5px!important;
}
#proSireApplyBulkButton{
  min-height:30px!important;
  padding:0 10px!important;
}

.pro-sire-query-filter-bar{
  margin:0!important;
  padding:10px!important;
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:8px!important;
  align-items:start!important;
  border:1px solid rgba(203,213,225,.82)!important;
  border-radius:16px!important;
  background:linear-gradient(180deg,#ffffff,#f8fbff)!important;
  box-shadow:0 8px 20px rgba(15,23,42,.035)!important;
}
.pro-sire-filter-grid{
  display:grid!important;
  grid-template-columns:170px minmax(130px,.6fr) minmax(150px,.7fr) minmax(0,1.8fr) 130px auto!important;
  gap:7px!important;
  align-items:end!important;
}
.pro-sire-filter-field{min-width:0!important;}
.pro-sire-filter-field label,
.pro-sire-filter-label-row span{
  color:#475569!important;
  font-size:8.5px!important;
  font-weight:950!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
}
.pro-sire-query-filter-bar input,
.pro-sire-query-filter-bar select{
  min-height:30px!important;
  border-radius:9px!important;
  font-size:11px!important;
}
.pro-sire-chip-select-list,
.pro-sire-component-filter-groups{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:5px!important;
  min-height:30px!important;
  padding:4px!important;
  border:1px solid rgba(203,213,225,.88)!important;
  border-radius:10px!important;
  background:#fff!important;
}
.pro-sire-component-filter-groups{
  max-height:84px!important;
  overflow:auto!important;
}
.pro-sire-component-filter-group{
  display:flex!important;
  align-items:center!important;
  gap:5px!important;
  flex-wrap:wrap!important;
  padding-right:7px!important;
  border-right:1px solid rgba(226,232,240,.9)!important;
}
.pro-sire-component-filter-group strong{
  color:#334155!important;
  font-size:8px!important;
  font-weight:950!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
}
.pro-sire-component-filter-group div{
  display:flex!important;
  gap:4px!important;
  flex-wrap:wrap!important;
}
.pro-sire-component-filter-chip{
  min-height:22px!important;
  padding:0 7px!important;
  border-radius:999px!important;
  border:1px solid rgba(14,165,233,.20)!important;
  background:#f0fdff!important;
  color:#075985!important;
  font-size:9px!important;
  font-weight:900!important;
  cursor:pointer!important;
}
.pro-sire-component-filter-chip input{
  width:11px!important;
  height:11px!important;
  accent-color:#2563eb!important;
}
.pro-sire-component-filter-chip:has(input:checked){
  background:#2563eb!important;
  border-color:#2563eb!important;
  color:#fff!important;
}
#proSireQueryFilterCount{
  min-height:28px!important;
  padding:0 9px!important;
  font-size:10px!important;
}

/* Premium table: compact, readable, sortable */
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-scroll{
  border-radius:14px!important;
  border:1px solid rgba(203,213,225,.90)!important;
  background:#fff!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table{
  min-width:1360px!important;
  width:100%!important;
  font-size:10.8px!important;
}
.pro-sire-query-grid-table thead tr:nth-child(2) th{top:28px!important;}
.pro-sire-query-grid-table .pro-sire-group-head th{
  padding:6px 7px!important;
  font-size:8.1px!important;
  letter-spacing:.09em!important;
}
.pro-sire-query-grid-table .pro-sire-sub-head th{
  padding:5px 6px!important;
  font-size:8px!important;
  letter-spacing:.06em!important;
}
.pro-sire-query-grid-table .is-sortable{
  cursor:pointer!important;
  user-select:none!important;
}
.pro-sire-query-grid-table .is-sortable::after{
  content:"↕";
  margin-left:4px;
  color:#94a3b8;
  font-size:9px;
}
.pro-sire-query-grid-table .is-sortable.is-active-sort::after{
  content:"↓";
  color:#2563eb;
}
.pro-sire-query-grid-table tbody th,
.pro-sire-query-grid-table tbody td{
  padding:6px 7px!important;
  height:54px!important;
  border-bottom:1px solid rgba(226,232,240,.74)!important;
}
.pro-sire-query-grid-table th:nth-child(1),
.pro-sire-query-grid-table td:nth-child(1){
  width:335px!important;
  min-width:335px!important;
  max-width:335px!important;
  left:0!important;
}
.pro-sire-query-grid-table th:nth-child(2),
.pro-sire-query-grid-table td:nth-child(2){
  width:58px!important;
  min-width:58px!important;
  max-width:58px!important;
  left:335px!important;
}
.pro-sire-query-cell{
  width:335px!important;
  min-width:335px!important;
  max-width:335px!important;
  background:#fff!important;
}
.pro-sire-query-main{
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
  margin-bottom:3px!important;
}
.pro-sire-query-main strong{
  min-width:36px!important;
  font-size:12.5px!important;
  font-weight:950!important;
}
.pro-sire-query-brief{
  max-width:300px!important;
  white-space:normal!important;
  overflow:hidden!important;
  display:-webkit-box!important;
  -webkit-line-clamp:2!important;
  -webkit-box-orient:vertical!important;
  color:#334155!important;
  font-size:10.6px!important;
  line-height:1.22!important;
  font-weight:850!important;
}
.pro-sire-threshold-bundle{
  min-width:126px!important;
  width:126px!important;
}
.pro-sire-row-rule-switch{
  display:inline-flex!important;
  align-items:center!important;
  gap:4px!important;
  margin-bottom:3px!important;
  color:#075985!important;
  font-size:8.5px!important;
  font-weight:950!important;
  text-transform:uppercase!important;
}
.pro-sire-row-rule-switch input{
  width:12px!important;
  height:12px!important;
  accent-color:#0891b2!important;
}
.pro-sire-row-minmax{
  display:inline-grid!important;
  grid-template-columns:48px auto 48px!important;
  gap:3px!important;
  align-items:center!important;
}
.pro-sire-row-minmax span{
  color:#94a3b8!important;
  font-size:8px!important;
  font-weight:900!important;
}
.pro-sire-threshold-input{
  width:48px!important;
  min-width:48px!important;
  min-height:25px!important;
  padding:3px 4px!important;
  border-radius:7px!important;
  font-size:10px!important;
}
.pro-sire-threshold-bundle.is-rule-off .pro-sire-row-minmax{
  display:none!important;
}
.pro-sire-rule-off-label{
  display:none!important;
  min-height:25px!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0 10px!important;
  border:1px dashed rgba(148,163,184,.8)!important;
  border-radius:999px!important;
  color:#64748b!important;
  background:#f8fafc!important;
  font-size:9px!important;
  font-weight:950!important;
  text-transform:uppercase!important;
}
.pro-sire-threshold-bundle.is-rule-off .pro-sire-rule-off-label{
  display:inline-flex!important;
}
.pro-sire-inspect-button{
  min-height:28px!important;
  padding:0 10px!important;
  border:1px solid rgba(37,99,235,.22)!important;
  border-radius:999px!important;
  background:#eff6ff!important;
  color:#1d4ed8!important;
  font-size:10px!important;
  font-weight:950!important;
  cursor:pointer!important;
}
.pro-sire-inspect-button:hover{background:#dbeafe!important;}

@media(max-width:1500px){
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-overview{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .pro-sire-workspace-control-deck{}
  .pro-sire-filter-grid{grid-template-columns:160px 1fr 1fr!important;}
  .pro-sire-filter-components{grid-column:1 / -1!important;}
  #proSireQueryFilterCount{justify-self:start!important;}
}
@media(max-width:1100px){
  body[data-workspace-mode="pro_system_builder"] #builder-actions .builder-action-grid.report-groups-layout{grid-template-columns:1fr!important;}
  body[data-workspace-mode="pro_system_builder"] #builder-actions .report-table-groups-card,
  body[data-workspace-mode="pro_system_builder"] #builder-actions .system-management-card,
  body[data-workspace-mode="pro_system_builder"] #builder-actions .polished-management-card,
  body[data-workspace-mode="pro_system_builder"] #builder-actions .report-control-card:not(.pro-sire-analysis-card),
  body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-analysis-card{grid-column:1!important;grid-row:auto!important;}
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-overview{grid-template-columns:1fr!important;}
  .pro-sire-filter-grid,.pro-sire-bulk-grid{grid-template-columns:1fr!important;}
}

/* PRO_SYSTEM_BUILDER_001U — premium cockpit + layout rescue + rule-family pause controls */
.pro-sire-query-grid-panel.pro-sire-workspace-root.pro-sire-workspace-open{
  display:flex!important;
  flex-direction:column!important;
  gap:10px!important;
  overflow:hidden!important;
  padding:12px 14px!important;
  background:linear-gradient(180deg,#f3fbff 0%,#ffffff 44%,#f7fbff 100%)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-top,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-overview,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-header,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-settings-toolbar,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-control-deck,
.pro-sire-query-grid-panel.pro-sire-workspace-open .quick-status-bar{
  flex:0 0 auto!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-summary:empty,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-applied-summary{
  display:none!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-scroll{
  flex:1 1 auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:auto!important;
  border-radius:18px!important;
  border:1px solid rgba(191,219,254,.86)!important;
  background:#fff!important;
  box-shadow:0 16px 40px rgba(15,23,42,.055)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-top{
  min-height:66px!important;
  border-radius:18px!important;
  background:linear-gradient(135deg,#172554 0%,#1d4ed8 58%,#0faaa4 100%)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-title-block h2{
  font-size:23px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-title-block p{
  display:block!important;
  margin-top:4px!important;
  max-width:980px!important;
  color:rgba(239,246,255,.84)!important;
  font-size:11px!important;
  line-height:1.25!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-overview{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-overview[hidden]{display:none!important;}
.pro-sire-cockpit-card{
  position:relative!important;
  overflow:hidden!important;
  min-width:0!important;
  padding:13px!important;
  border-radius:18px!important;
  border:1px solid rgba(203,213,225,.80)!important;
  background:linear-gradient(180deg,#ffffff,#f8fbff)!important;
  box-shadow:0 12px 30px rgba(15,23,42,.055), inset 0 1px 0 rgba(255,255,255,.92)!important;
}
.pro-sire-cockpit-card::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  background:linear-gradient(180deg,#22c55e,#14b8a6);
  opacity:.85;
}
.pro-sire-cockpit-before{background:linear-gradient(180deg,#ffffff,#eef6ff)!important;border-color:rgba(59,130,246,.18)!important;}
.pro-sire-cockpit-before::before{background:linear-gradient(180deg,#2563eb,#06b6d4)!important;}
.pro-sire-cockpit-system{background:linear-gradient(180deg,#ffffff,#f0fdf4)!important;border-color:rgba(34,197,94,.22)!important;}
.pro-sire-cockpit-system::before{background:linear-gradient(180deg,#16a34a,#22c55e)!important;}
.pro-sire-cockpit-negative{background:linear-gradient(180deg,#ffffff,#fff1f2)!important;border-color:rgba(244,63,94,.22)!important;}
.pro-sire-cockpit-negative::before{background:linear-gradient(180deg,#f43f5e,#fb7185)!important;}
.pro-sire-cockpit-delta{background:linear-gradient(180deg,#ffffff,#f5f3ff)!important;border-color:rgba(124,58,237,.18)!important;}
.pro-sire-cockpit-delta::before{background:linear-gradient(180deg,#7c3aed,#2563eb)!important;}
.pro-sire-card-eyebrow{
  margin:0 0 3px 2px!important;
  color:#0f766e!important;
  font-size:9px!important;
  font-weight:950!important;
  letter-spacing:.14em!important;
  text-transform:uppercase!important;
}
.pro-sire-cockpit-card strong{
  display:block!important;
  margin:0 0 10px 2px!important;
  color:#0f172a!important;
  font-size:16px!important;
  line-height:1.05!important;
  font-weight:950!important;
  letter-spacing:-.025em!important;
  text-transform:none!important;
}
.pro-sire-cockpit-metrics{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:7px!important;
}
.pro-sire-cockpit-metrics span{
  min-width:0!important;
  min-height:48px!important;
  padding:7px 8px!important;
  border:1px solid rgba(226,232,240,.92)!important;
  border-radius:13px!important;
  background:rgba(255,255,255,.88)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8)!important;
}
.pro-sire-cockpit-metrics b{
  display:block!important;
  color:#0f172a!important;
  font-size:15px!important;
  line-height:1.05!important;
  font-weight:950!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.pro-sire-cockpit-metrics em{
  display:block!important;
  margin-top:4px!important;
  color:#64748b!important;
  font-size:8.5px!important;
  line-height:1.05!important;
  font-style:normal!important;
  font-weight:950!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-header{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  min-height:42px!important;
  padding:9px 12px!important;
  border-radius:16px!important;
  border:1px solid rgba(191,219,254,.72)!important;
  background:linear-gradient(180deg,#ffffff,#f8fbff)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-header p{
  display:block!important;
  margin-top:2px!important;
  color:#475569!important;
  font-size:11.5px!important;
  line-height:1.25!important;
}
.pro-sire-family-pause-bar{
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:7px!important;
  padding:8px!important;
  border:1px solid rgba(14,165,233,.16)!important;
  border-radius:13px!important;
  background:linear-gradient(180deg,#ffffff,#f0fdff)!important;
}
.pro-sire-family-pause-bar .btn{
  min-height:30px!important;
  border-color:rgba(14,165,233,.26)!important;
  background:#fff!important;
  color:#075985!important;
}
.pro-sire-family-pause-bar .btn.is-paused{
  background:linear-gradient(180deg,#fff7ed,#ffedd5)!important;
  border-color:rgba(249,115,22,.35)!important;
  color:#9a3412!important;
  box-shadow:0 8px 18px rgba(249,115,22,.10)!important;
}
.pro-sire-workspace-control-deck{gap:10px!important;
  align-items:stretch!important;
  min-height:0!important;
}
.pro-sire-bulk-tuning,
.pro-sire-query-filter-bar{
  border-radius:18px!important;
  box-shadow:0 10px 24px rgba(15,23,42,.045)!important;
}
.pro-sire-bulk-grid{
  grid-template-columns:repeat(3,minmax(0,1fr)) auto!important;
}
.pro-sire-bulk-scope{grid-column:1 / -1!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table{
  min-width:1280px!important;
  width:100%!important;
  font-size:11.4px!important;
}
.pro-sire-query-grid-table th:nth-child(1),
.pro-sire-query-grid-table td:nth-child(1){
  width:390px!important;
  min-width:390px!important;
  max-width:390px!important;
  left:0!important;
}
.pro-sire-query-grid-table th:nth-child(2),
.pro-sire-query-grid-table td:nth-child(2){
  width:64px!important;
  min-width:64px!important;
  max-width:64px!important;
  left:390px!important;
}
.pro-sire-query-cell{
  width:390px!important;
  min-width:390px!important;
  max-width:390px!important;
  background:#fff!important;
}
.pro-sire-query-main{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  margin-bottom:6px!important;
}
.pro-sire-query-inspect-chip{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:28px!important;
  padding:0 12px!important;
  border:1px solid rgba(37,99,235,.25)!important;
  border-radius:999px!important;
  background:linear-gradient(180deg,#eff6ff,#dbeafe)!important;
  color:#1d4ed8!important;
  font-size:12px!important;
  font-weight:950!important;
  letter-spacing:-.01em!important;
  cursor:pointer!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.88)!important;
}
.pro-sire-query-inspect-chip:hover{
  border-color:rgba(37,99,235,.44)!important;
  background:linear-gradient(180deg,#dbeafe,#bfdbfe)!important;
  color:#1e3a8a!important;
}
.pro-sire-query-brief{
  max-width:350px!important;
  color:#1e293b!important;
  font-size:11.4px!important;
  line-height:1.25!important;
  font-weight:850!important;
  -webkit-line-clamp:2!important;
}
.pro-sire-query-grid-table tbody th,
.pro-sire-query-grid-table tbody td{
  height:62px!important;
  padding:8px 9px!important;
}
.pro-sire-threshold-bundle{
  min-width:132px!important;
  width:132px!important;
}
.pro-sire-row-minmax{
  grid-template-columns:52px auto 52px!important;
}
.pro-sire-threshold-input{
  width:52px!important;
  min-width:52px!important;
  min-height:27px!important;
}
@media(max-width:1500px){
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-overview{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .pro-sire-workspace-control-deck{}
}
@media(max-width:1000px){
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-overview{grid-template-columns:1fr!important;}
  .pro-sire-cockpit-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .pro-sire-bulk-grid{grid-template-columns:1fr!important;}
}

/* PRO_SYSTEM_BUILDER_001V — consolidated SIRE control hub + baseline metric rescue */
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-header{
  display:none!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-settings-toolbar{
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.pro-sire-hub-layout{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:10px!important;
}
.pro-sire-hub-section{
  min-width:0!important;
  padding:10px!important;
  border:1px solid rgba(203,213,225,.78)!important;
  border-radius:15px!important;
  background:linear-gradient(180deg,#ffffff,#f8fbff)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.86)!important;
}
.pro-sire-hub-section-actions{
  border-color:rgba(37,99,235,.18)!important;
  background:linear-gradient(180deg,#ffffff,#eff6ff)!important;
}
.pro-sire-hub-section-pause{
  border-color:rgba(14,165,233,.18)!important;
  background:linear-gradient(180deg,#ffffff,#ecfeff)!important;
}
.pro-sire-hub-section-bulk{
  border-color:rgba(15,23,42,.10)!important;
  background:linear-gradient(180deg,#ffffff,#f8fafc)!important;
}
.pro-sire-hub-section-title{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:10px!important;
  margin-bottom:8px!important;
}
.pro-sire-hub-section-title strong{
  display:block!important;
  color:#0f172a!important;
  font-size:11px!important;
  font-weight:950!important;
  letter-spacing:.12em!important;
  text-transform:uppercase!important;
  white-space:nowrap!important;
}
.pro-sire-hub-section-title span{
  display:block!important;
  max-width:520px!important;
  color:#64748b!important;
  font-size:10.5px!important;
  line-height:1.25!important;
  font-weight:750!important;
  text-align:right!important;
}
.pro-sire-settings-actions{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:7px!important;
}
.pro-sire-settings-actions .btn,
.pro-sire-family-pause-bar .btn,
#proSireApplyBulkButton{
  min-height:32px!important;
  border-radius:11px!important;
  font-size:10.5px!important;
  font-weight:950!important;
}
#proSireApplyChangesButton{
  min-width:150px!important;
  background:linear-gradient(135deg,#0ea5e9,#2563eb)!important;
  box-shadow:0 8px 18px rgba(37,99,235,.18)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-settings-toolbar #proSireDraftStateMessage{
  margin:8px 0 0!important;
  padding:7px 9px!important;
  max-width:none!important;
  border:1px solid rgba(191,219,254,.70)!important;
  border-radius:10px!important;
  background:rgba(255,255,255,.82)!important;
  color:#334155!important;
  font-size:10.8px!important;
  line-height:1.25!important;
  text-align:left!important;
}
.pro-sire-family-pause-bar{
  padding:0!important;
  border:0!important;
  background:transparent!important;
}
.pro-sire-bulk-tuning{
  padding:12px!important;
}
.pro-sire-bulk-title{
  padding:0 2px 2px!important;
}
.pro-sire-bulk-grid{
  grid-template-columns:repeat(3,minmax(0,1fr)) auto!important;
  gap:8px!important;
}
.pro-sire-bulk-field.pro-sire-bulk-scope{
  padding:0!important;
  border:0!important;
  background:transparent!important;
}
.pro-sire-bulk-rule-card{
  padding:9px!important;
  border-radius:13px!important;
}
.pro-sire-bulk-grid select,
.pro-sire-bulk-grid input{
  min-height:31px!important;
}
.pro-sire-query-filter-bar{
  align-self:stretch!important;
}
@media(max-width:1500px){
  .pro-sire-hub-section-title{display:block!important;}
  .pro-sire-hub-section-title span{max-width:none!important;text-align:left!important;margin-top:3px!important;}
}


/* PRO_SYSTEM_BUILDER_001W — rule-family labs, filter compression and table rescue */
.pro-sire-query-grid-panel.pro-sire-workspace-root.pro-sire-workspace-open{
  grid-template-rows:auto auto auto minmax(0,1fr)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-control-deck{gap:12px!important;
  align-items:stretch!important;
}
.pro-sire-query-filter-bar{
  display:grid!important;
  grid-template-rows:auto auto minmax(0,1fr)!important;
  gap:9px!important;
  min-height:0!important;
}
.pro-sire-lab-board{
  display:grid!important;
  grid-template-columns:220px minmax(0,1fr)!important;
  gap:8px!important;
  align-items:stretch!important;
  padding:8px!important;
  border:1px solid rgba(14,165,233,.16)!important;
  border-radius:15px!important;
  background:linear-gradient(180deg,#f0fdff,#ffffff)!important;
}
.pro-sire-lab-mode-strip{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:6px!important;
  align-content:start!important;
}
.pro-sire-lab-mode{
  min-height:34px!important;
  padding:0 10px!important;
  border:1px solid rgba(191,219,254,.85)!important;
  border-radius:999px!important;
  background:#fff!important;
  color:#075985!important;
  font-size:10.5px!important;
  font-weight:950!important;
  cursor:pointer!important;
  white-space:nowrap!important;
}
.pro-sire-lab-mode.is-active{
  color:#fff!important;
  border-color:rgba(37,99,235,.34)!important;
  background:linear-gradient(135deg,#0ea5e9,#2563eb)!important;
  box-shadow:0 8px 18px rgba(37,99,235,.18)!important;
}
.pro-sire-lab-status-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:6px!important;
}
.pro-sire-lab-family-card{
  min-width:0!important;
  padding:8px 9px!important;
  border:1px solid rgba(203,213,225,.78)!important;
  border-radius:13px!important;
  background:rgba(255,255,255,.92)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.86)!important;
}
.pro-sire-lab-family-card strong{
  display:block!important;
  color:#0f172a!important;
  font-size:10px!important;
  font-weight:950!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
}
.pro-sire-lab-family-card span,
.pro-sire-lab-family-card em{
  display:block!important;
  margin-top:3px!important;
  font-style:normal!important;
  color:#64748b!important;
  font-size:10px!important;
  font-weight:850!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.pro-sire-lab-family-card b{
  color:#0f172a!important;
  font-size:13px!important;
  font-weight:950!important;
}
.pro-sire-lab-family-card.is-focused{
  border-color:rgba(37,99,235,.34)!important;
  background:linear-gradient(180deg,#eff6ff,#ffffff)!important;
  box-shadow:0 8px 18px rgba(37,99,235,.08)!important;
}
.pro-sire-lab-family-card.is-paused{
  border-color:rgba(249,115,22,.35)!important;
  background:linear-gradient(180deg,#fff7ed,#ffffff)!important;
}
.pro-sire-lab-family-card.is-paused em{
  color:#9a3412!important;
}
.pro-sire-filter-grid{
  display:grid!important;
  grid-template-columns:180px 150px 170px minmax(0,1fr) 150px auto!important;
  gap:8px!important;
  align-items:end!important;
}
.pro-sire-filter-components{
  min-width:0!important;
}
.pro-sire-component-filter-groups{
  max-height:58px!important;
  overflow:auto!important;
  align-content:flex-start!important;
}
.pro-sire-component-filter-group{
  border-right:0!important;
  padding-right:0!important;
}
.pro-sire-component-filter-group strong{
  min-width:auto!important;
  margin-right:2px!important;
}
.pro-sire-component-filter-chip{
  min-height:24px!important;
  padding:0 8px!important;
  border-radius:999px!important;
  font-size:9.6px!important;
}
#proSireQueryFilterCount{
  align-self:center!important;
  justify-self:end!important;
  min-height:30px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
}
.pro-sire-bulk-grid{
  grid-template-columns:1fr!important;
  gap:9px!important;
}
.pro-sire-bulk-rule-card{
  display:grid!important;
  grid-template-columns:125px minmax(0,1fr)!important;
  gap:8px!important;
  align-items:center!important;
  padding:9px 10px!important;
}
.pro-sire-bulk-minmax{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:8px!important;
}
.pro-sire-bulk-minmax input,
.pro-sire-bulk-grid select{
  width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
  font-size:12px!important;
  padding:6px 8px!important;
}
#proSireApplyBulkButton{
  justify-self:end!important;
  min-width:150px!important;
}
.pro-sire-family-pause-bar .btn.is-paused{
  background:linear-gradient(180deg,#fff7ed,#ffedd5)!important;
  color:#9a3412!important;
  border-color:rgba(249,115,22,.38)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-scroll{
  position:relative!important;
  overflow:auto!important;
  border:1px solid rgba(191,219,254,.8)!important;
  border-radius:16px!important;
  background:#fff!important;
  max-height:none!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table{
  min-width:1500px!important;
  width:max-content!important;
  border-collapse:separate!important;
  border-spacing:0!important;
  table-layout:fixed!important;
}
.pro-sire-query-grid-table thead th{
  position:sticky!important;
  top:0!important;
  z-index:30!important;
  background:linear-gradient(180deg,#f8fbff,#eef6ff)!important;
  box-shadow:0 1px 0 rgba(203,213,225,.82)!important;
}
.pro-sire-query-grid-table thead tr.pro-sire-sub-head th{
  top:32px!important;
  z-index:31!important;
  background:linear-gradient(180deg,#ffffff,#f8fbff)!important;
}
.pro-sire-query-grid-table th:nth-child(1),
.pro-sire-query-grid-table td:nth-child(1){
  position:sticky!important;
  left:0!important;
  z-index:25!important;
  width:430px!important;
  min-width:430px!important;
  max-width:430px!important;
  background:#fff!important;
  box-shadow:1px 0 0 rgba(191,219,254,.75)!important;
}
.pro-sire-query-grid-table thead th:nth-child(1){
  z-index:42!important;
  background:linear-gradient(180deg,#f8fbff,#eef6ff)!important;
}
.pro-sire-query-grid-table th:nth-child(2),
.pro-sire-query-grid-table td:nth-child(2){
  position:sticky!important;
  left:430px!important;
  z-index:24!important;
  width:82px!important;
  min-width:82px!important;
  max-width:82px!important;
  background:#fff!important;
  box-shadow:1px 0 0 rgba(191,219,254,.72)!important;
}
.pro-sire-query-grid-table thead th:nth-child(2){
  z-index:41!important;
  background:linear-gradient(180deg,#f8fbff,#eef6ff)!important;
}
.pro-sire-query-cell{
  width:430px!important;
  min-width:430px!important;
  max-width:430px!important;
  white-space:normal!important;
}
.pro-sire-query-inspect-chip{
  min-height:30px!important;
  padding:0 14px!important;
  font-size:12.5px!important;
}
.pro-sire-query-brief{
  max-width:390px!important;
  font-size:12px!important;
  line-height:1.32!important;
  -webkit-line-clamp:3!important;
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  overflow:hidden!important;
}
.pro-sire-query-grid-table tbody th,
.pro-sire-query-grid-table tbody td{
  height:72px!important;
  padding:10px 10px!important;
  vertical-align:middle!important;
}
.pro-sire-threshold-bundle{
  width:150px!important;
  min-width:150px!important;
}
.pro-sire-row-minmax{
  display:grid!important;
  grid-template-columns:58px 14px 58px!important;
  gap:4px!important;
  align-items:center!important;
}
.pro-sire-threshold-input{
  width:58px!important;
  min-width:58px!important;
  box-sizing:border-box!important;
  font-size:11px!important;
  padding:5px 5px!important;
}
.pro-sire-row-rule-switch{
  justify-content:flex-start!important;
}
.pro-sire-active-input{
  width:18px!important;
  height:18px!important;
}
.pro-sire-query-grid-panel[data-pro-sire-lab="ae"] .pro-sire-threshold-bundle:not([data-rule-family="ae"]),
.pro-sire-query-grid-panel[data-pro-sire-lab="win"] .pro-sire-threshold-bundle:not([data-rule-family="win"]),
.pro-sire-query-grid-panel[data-pro-sire-lab="zero"] .pro-sire-threshold-bundle:not([data-rule-family="zero"]){
  opacity:.38!important;
  background:linear-gradient(180deg,#f8fafc,#ffffff)!important;
}
.pro-sire-query-grid-panel[data-pro-sire-lab="ae"] .pro-sire-threshold-bundle[data-rule-family="ae"],
.pro-sire-query-grid-panel[data-pro-sire-lab="win"] .pro-sire-threshold-bundle[data-rule-family="win"],
.pro-sire-query-grid-panel[data-pro-sire-lab="zero"] .pro-sire-threshold-bundle[data-rule-family="zero"]{
  background:linear-gradient(180deg,#ecfeff,#ffffff)!important;
  box-shadow:inset 0 0 0 1px rgba(14,165,233,.24)!important;
}
@media(max-width:1500px){
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-control-deck{}
  .pro-sire-lab-board{grid-template-columns:1fr!important;}
  .pro-sire-filter-grid{grid-template-columns:1fr 1fr!important;}
}
@media(max-width:1000px){
  .pro-sire-lab-status-grid{grid-template-columns:1fr 1fr!important;}
  .pro-sire-filter-grid{grid-template-columns:1fr!important;}
  .pro-sire-bulk-rule-card{grid-template-columns:1fr!important;}
}


/* PRO_SYSTEM_BUILDER_001X — threshold input readability and query-table rescue */
.pro-sire-bulk-grid{
  gap:10px!important;
}
.pro-sire-bulk-rule-card{
  display:grid!important;
  grid-template-columns:150px minmax(320px,1fr)!important;
  align-items:center!important;
  gap:14px!important;
  min-height:58px!important;
  padding:10px 12px!important;
  overflow:visible!important;
}
.pro-sire-bulk-rule-card .pro-sire-rule-switch{
  margin:0!important;
  min-width:0!important;
}
.pro-sire-bulk-minmax{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(150px,190px))!important;
  justify-content:start!important;
  gap:16px!important;
  align-items:center!important;
}
.pro-sire-bulk-minmax label{
  display:grid!important;
  grid-template-columns:42px 104px!important;
  gap:8px!important;
  align-items:center!important;
  justify-content:start!important;
  min-width:0!important;
  margin:0!important;
  color:#475569!important;
  font-size:10px!important;
  font-weight:950!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
}
.pro-sire-bulk-minmax label span{
  text-align:right!important;
  white-space:nowrap!important;
}
.pro-sire-bulk-minmax input,
.pro-sire-bulk-grid select{
  width:104px!important;
  min-width:104px!important;
  height:34px!important;
  min-height:34px!important;
  padding:6px 9px!important;
  border:1px solid rgba(148,163,184,.48)!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#0f172a!important;
  font-size:13px!important;
  font-weight:900!important;
  line-height:1.1!important;
  text-align:center!important;
  box-sizing:border-box!important;
  opacity:1!important;
}
.pro-sire-bulk-grid select{
  width:100%!important;
  min-width:0!important;
  text-align:left!important;
}
.pro-sire-bulk-minmax input:focus,
.pro-sire-bulk-grid select:focus{
  outline:3px solid rgba(14,165,233,.18)!important;
  border-color:#0ea5e9!important;
}
#proSireApplyBulkButton{
  min-height:36px!important;
  padding:0 18px!important;
}

.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-scroll{
  min-height:0!important;
  height:100%!important;
  max-height:none!important;
  overflow:auto!important;
  scrollbar-gutter:stable both-edges!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table{
  width:100%!important;
  min-width:1760px!important;
  max-width:none!important;
  table-layout:fixed!important;
  border-collapse:separate!important;
  border-spacing:0!important;
}
.pro-sire-query-grid-table thead th{
  position:sticky!important;
  top:0!important;
  z-index:30!important;
  background:linear-gradient(180deg,#f8fbff,#eef6ff)!important;
  color:#334155!important;
  white-space:normal!important;
  line-height:1.15!important;
}
.pro-sire-query-grid-table thead tr.pro-sire-sub-head th{
  top:38px!important;
  z-index:31!important;
  background:linear-gradient(180deg,#ffffff,#f8fbff)!important;
}
.pro-sire-query-grid-table thead tr.pro-sire-sub-head th:nth-child(1),
.pro-sire-query-grid-table thead tr.pro-sire-sub-head th:nth-child(2){
  left:auto!important;
  position:sticky!important;
}
.pro-sire-query-grid-table .pro-sire-group-head th{
  height:38px!important;
  min-height:38px!important;
  padding:10px 9px!important;
}
.pro-sire-query-grid-table .pro-sire-sub-head th{
  height:40px!important;
  min-height:40px!important;
  padding:9px 8px!important;
}
.pro-sire-query-grid-table th:nth-child(1),
.pro-sire-query-grid-table td:nth-child(1){
  width:360px!important;
  min-width:360px!important;
  max-width:360px!important;
}
.pro-sire-query-grid-table th:nth-child(2),
.pro-sire-query-grid-table td:nth-child(2){
  width:76px!important;
  min-width:76px!important;
  max-width:76px!important;
}
.pro-sire-query-grid-table thead tr.pro-sire-group-head th.pro-sire-sticky-query-head,
.pro-sire-query-grid-table tbody th:nth-child(1),
.pro-sire-query-grid-table tbody td:nth-child(1){
  position:sticky!important;
  left:0!important;
  z-index:35!important;
  background:#fff!important;
  box-shadow:2px 0 0 rgba(191,219,254,.78)!important;
}
.pro-sire-query-grid-table thead tr.pro-sire-group-head th.pro-sire-sticky-selected-head,
.pro-sire-query-grid-table tbody td:nth-child(2),
.pro-sire-query-grid-table tbody th:nth-child(2){
  position:sticky!important;
  left:360px!important;
  z-index:34!important;
  background:#fff!important;
  box-shadow:2px 0 0 rgba(191,219,254,.72)!important;
}
.pro-sire-query-grid-table thead tr.pro-sire-group-head th.pro-sire-sticky-query-head{
  z-index:60!important;
  background:linear-gradient(180deg,#f8fbff,#eef6ff)!important;
}
.pro-sire-query-grid-table thead tr.pro-sire-group-head th.pro-sire-sticky-selected-head{
  z-index:59!important;
  background:linear-gradient(180deg,#f8fbff,#eef6ff)!important;
}
.pro-sire-query-grid-table tbody th,
.pro-sire-query-grid-table tbody td{
  height:82px!important;
  min-height:82px!important;
  padding:11px 10px!important;
  overflow:visible!important;
  vertical-align:middle!important;
}
.pro-sire-query-cell{
  width:360px!important;
  min-width:360px!important;
  max-width:360px!important;
}
.pro-sire-query-main{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  margin-bottom:5px!important;
}
.pro-sire-query-inspect-chip{
  min-width:78px!important;
  min-height:32px!important;
  padding:0 13px!important;
  font-size:12px!important;
}
.pro-sire-query-brief{
  max-width:320px!important;
  font-size:12px!important;
  line-height:1.34!important;
  white-space:normal!important;
}
.pro-sire-control-cell{
  text-align:center!important;
}
.pro-sire-active-input{
  width:19px!important;
  height:19px!important;
}
.pro-sire-threshold-bundle{
  width:180px!important;
  min-width:180px!important;
  max-width:180px!important;
  overflow:visible!important;
  padding:10px 9px!important;
}
.pro-sire-row-rule-switch{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:6px!important;
  margin:0 0 8px!important;
  font-size:10px!important;
  color:#075985!important;
}
.pro-sire-row-rule-switch input{
  width:16px!important;
  height:16px!important;
  flex:0 0 auto!important;
}
.pro-sire-row-minmax{
  display:grid!important;
  grid-template-columns:70px 18px 70px!important;
  gap:6px!important;
  align-items:center!important;
  justify-content:start!important;
  width:100%!important;
}
.pro-sire-row-minmax span{
  display:block!important;
  color:#94a3b8!important;
  font-size:10px!important;
  font-weight:900!important;
  text-align:center!important;
  line-height:1!important;
}
.pro-sire-threshold-input{
  display:block!important;
  width:70px!important;
  min-width:70px!important;
  max-width:70px!important;
  height:34px!important;
  min-height:34px!important;
  padding:6px 7px!important;
  box-sizing:border-box!important;
  border:1px solid rgba(148,163,184,.5)!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#0f172a!important;
  font-size:12px!important;
  font-weight:900!important;
  text-align:center!important;
  line-height:1.1!important;
  opacity:1!important;
}
.pro-sire-threshold-input:focus{
  outline:3px solid rgba(14,165,233,.18)!important;
  border-color:#0ea5e9!important;
}
.pro-sire-query-grid-panel[data-pro-sire-lab="ae"] .pro-sire-threshold-bundle:not([data-rule-family="ae"]),
.pro-sire-query-grid-panel[data-pro-sire-lab="win"] .pro-sire-threshold-bundle:not([data-rule-family="win"]),
.pro-sire-query-grid-panel[data-pro-sire-lab="zero"] .pro-sire-threshold-bundle:not([data-rule-family="zero"]){
  opacity:.62!important;
  background:linear-gradient(180deg,#f8fafc,#ffffff)!important;
}
.pro-sire-query-grid-panel[data-pro-sire-lab="ae"] .pro-sire-threshold-bundle[data-rule-family="ae"],
.pro-sire-query-grid-panel[data-pro-sire-lab="win"] .pro-sire-threshold-bundle[data-rule-family="win"],
.pro-sire-query-grid-panel[data-pro-sire-lab="zero"] .pro-sire-threshold-bundle[data-rule-family="zero"]{
  opacity:1!important;
  background:linear-gradient(180deg,#ecfeff,#ffffff)!important;
  box-shadow:inset 0 0 0 1px rgba(14,165,233,.28)!important;
}
.pro-sire-query-grid-table .is-sortable{
  cursor:pointer!important;
}
@media(max-width:1500px){
  .pro-sire-bulk-rule-card{grid-template-columns:1fr!important;}
  .pro-sire-bulk-minmax{grid-template-columns:repeat(2,minmax(132px,1fr))!important;}
  .pro-sire-bulk-minmax label{grid-template-columns:38px 96px!important;}
  .pro-sire-bulk-minmax input{width:96px!important;min-width:96px!important;}
}

/* PRO_SYSTEM_BUILDER_001Y — Pro SIRE query-table foundation reset
   Purpose: stop inherited Horse Profile table rules and accumulated sticky/header overrides
   from clipping the Pro Builder SIRE tuning grid. This block deliberately owns the
   Pro SIRE workspace scroll model and table component. */
html.pro-sire-workspace-open,
body.pro-sire-workspace-open{
  width:100%!important;
  height:100%!important;
  overflow:hidden!important;
}

.pro-sire-query-grid-panel.pro-sire-workspace-root.pro-sire-workspace-open{
  position:fixed!important;
  inset:0!important;
  width:100dvw!important;
  height:100dvh!important;
  max-width:none!important;
  max-height:none!important;
  z-index:2147483000!important;
  display:flex!important;
  flex-direction:column!important;
  gap:10px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding:12px 14px 18px!important;
  box-sizing:border-box!important;
  background:linear-gradient(180deg,#f3fbff 0%,#ffffff 46%,#f7fbff 100%)!important;
  scrollbar-gutter:stable!important;
}

.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-top,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-overview,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-control-deck,
.pro-sire-query-grid-panel.pro-sire-workspace-open .quick-status-bar,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-applied-summary{
  flex:0 0 auto!important;
}

.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-scroll{
  flex:0 0 auto!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  border:1px solid rgba(191,219,254,.88)!important;
  border-radius:16px!important;
  background:#ffffff!important;
  box-shadow:0 14px 34px rgba(15,23,42,.055)!important;
  scrollbar-gutter:stable!important;
}

.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table{
  width:2030px!important;
  min-width:2030px!important;
  max-width:none!important;
  table-layout:fixed!important;
  border-collapse:separate!important;
  border-spacing:0!important;
  margin:0!important;
  background:#ffffff!important;
  font-variant-numeric:tabular-nums!important;
}

.pro-sire-query-grid-table col.pro-sire-col-query{width:380px!important;}
.pro-sire-query-grid-table col.pro-sire-col-selected{width:86px!important;}
.pro-sire-query-grid-table col.pro-sire-col-rule{width:205px!important;}
.pro-sire-query-grid-table col.pro-sire-col-trigger{width:110px!important;}
.pro-sire-query-grid-table col.pro-sire-col-metric{width:120px!important;}
.pro-sire-query-grid-table col.pro-sire-col-money{width:140px!important;}

.pro-sire-query-grid-table th,
.pro-sire-query-grid-table td{
  box-sizing:border-box!important;
  overflow:visible!important;
  white-space:normal!important;
  border-right:1px solid rgba(226,232,240,.92)!important;
  border-bottom:1px solid rgba(226,232,240,.82)!important;
  color:#0f172a!important;
}

.pro-sire-query-grid-table thead th{
  position:sticky!important;
  top:0!important;
  z-index:30!important;
  height:50px!important;
  min-height:50px!important;
  padding:11px 10px!important;
  vertical-align:middle!important;
  background:linear-gradient(180deg,#f8fbff 0%,#eef6ff 100%)!important;
  color:#334155!important;
  font-size:10.5px!important;
  font-weight:950!important;
  letter-spacing:.075em!important;
  text-transform:uppercase!important;
  line-height:1.16!important;
  box-shadow:0 1px 0 rgba(203,213,225,.92),0 6px 16px rgba(15,23,42,.04)!important;
}

.pro-sire-query-grid-table thead tr.pro-sire-sub-head th,
.pro-sire-query-grid-table thead tr.pro-sire-group-head th{
  top:0!important;
  height:50px!important;
  min-height:50px!important;
  padding:11px 10px!important;
}

.pro-sire-query-grid-table thead tr.pro-sire-single-head th.pro-sire-threshold-head-win,
.pro-sire-query-grid-table tbody td[data-rule-family="win"]{
  background:linear-gradient(180deg,#f0fdfa,#ffffff)!important;
}
.pro-sire-query-grid-table thead tr.pro-sire-single-head th.pro-sire-threshold-head-zero,
.pro-sire-query-grid-table tbody td[data-rule-family="zero"]{
  background:linear-gradient(180deg,#f8fafc,#ffffff)!important;
}
.pro-sire-query-grid-table thead tr.pro-sire-single-head th.pro-sire-threshold-head-ae,
.pro-sire-query-grid-table tbody td[data-rule-family="ae"]{
  background:linear-gradient(180deg,#ecfeff,#ffffff)!important;
}
.pro-sire-query-grid-table thead tr.pro-sire-single-head th.pro-sire-trigger-head{
  background:linear-gradient(180deg,#f8fafc,#f1f5f9)!important;
}
.pro-sire-query-grid-table thead tr.pro-sire-single-head th.pro-sire-performance-head{
  background:linear-gradient(180deg,#eef6ff,#eaf2ff)!important;
}

.pro-sire-query-grid-table thead th:first-child,
.pro-sire-query-grid-table tbody th.pro-sire-query-cell{
  position:sticky!important;
  left:0!important;
  z-index:42!important;
  width:380px!important;
  min-width:380px!important;
  max-width:380px!important;
  background:#ffffff!important;
  box-shadow:2px 0 0 rgba(191,219,254,.95)!important;
}
.pro-sire-query-grid-table thead th:first-child{
  z-index:60!important;
  background:linear-gradient(180deg,#f8fbff 0%,#eef6ff 100%)!important;
}

.pro-sire-query-grid-table th:nth-child(2),
.pro-sire-query-grid-table td:nth-child(2),
.pro-sire-query-grid-table thead th:nth-child(2),
.pro-sire-query-grid-table tbody th:nth-child(2){
  position:static!important;
  left:auto!important;
  z-index:auto!important;
  box-shadow:none!important;
}

.pro-sire-query-grid-table tbody th,
.pro-sire-query-grid-table tbody td{
  height:auto!important;
  min-height:0!important;
  padding:13px 12px!important;
  vertical-align:top!important;
  font-size:12px!important;
  line-height:1.3!important;
  background:#ffffff!important;
}
.pro-sire-query-grid-table tbody tr:nth-child(even) th,
.pro-sire-query-grid-table tbody tr:nth-child(even) td{
  background:#f8fbff!important;
}
.pro-sire-query-grid-table tbody tr:hover th,
.pro-sire-query-grid-table tbody tr:hover td{
  background:#eff6ff!important;
}

.pro-sire-query-cell{
  width:380px!important;
  min-width:380px!important;
  max-width:380px!important;
  padding:13px 14px!important;
  white-space:normal!important;
}
.pro-sire-query-main{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  margin-bottom:6px!important;
}
.pro-sire-query-inspect-chip{
  min-width:82px!important;
  min-height:32px!important;
  padding:0 14px!important;
  border-radius:999px!important;
  font-size:12px!important;
  font-weight:950!important;
  white-space:nowrap!important;
}
.pro-sire-query-brief{
  max-width:340px!important;
  display:block!important;
  -webkit-line-clamp:unset!important;
  -webkit-box-orient:initial!important;
  overflow:visible!important;
  white-space:normal!important;
  color:#0f172a!important;
  font-size:12px!important;
  line-height:1.34!important;
}

.pro-sire-control-cell{
  text-align:center!important;
  vertical-align:middle!important;
}
.pro-sire-active-input{
  width:20px!important;
  height:20px!important;
  min-width:20px!important;
  min-height:20px!important;
}

.pro-sire-threshold-bundle{
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  padding:12px 12px!important;
  overflow:visible!important;
  vertical-align:top!important;
}
.pro-sire-row-rule-switch{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:7px!important;
  margin:0 0 9px!important;
  color:#075985!important;
  font-size:10.5px!important;
  font-weight:950!important;
  letter-spacing:.025em!important;
  text-transform:uppercase!important;
}
.pro-sire-row-rule-switch input{
  width:17px!important;
  height:17px!important;
  min-width:17px!important;
  min-height:17px!important;
  flex:0 0 auto!important;
}
.pro-sire-row-minmax{
  display:grid!important;
  grid-template-columns:76px 18px 76px!important;
  align-items:center!important;
  justify-content:start!important;
  gap:6px!important;
  width:176px!important;
  max-width:176px!important;
}
.pro-sire-row-minmax span{
  display:block!important;
  color:#64748b!important;
  font-size:10px!important;
  font-weight:900!important;
  text-align:center!important;
  line-height:1!important;
}
.pro-sire-threshold-input{
  display:block!important;
  width:76px!important;
  min-width:76px!important;
  max-width:76px!important;
  height:34px!important;
  min-height:34px!important;
  padding:6px 8px!important;
  box-sizing:border-box!important;
  border:1px solid rgba(148,163,184,.52)!important;
  border-radius:10px!important;
  background:#ffffff!important;
  color:#0f172a!important;
  font-size:12px!important;
  font-weight:950!important;
  text-align:center!important;
  line-height:1.1!important;
  opacity:1!important;
}
.pro-sire-threshold-input:focus{
  outline:3px solid rgba(14,165,233,.2)!important;
  border-color:#0ea5e9!important;
}
.pro-sire-rule-off-label{
  display:none!important;
  margin-top:6px!important;
  color:#991b1b!important;
  font-size:10px!important;
  font-weight:900!important;
  text-transform:uppercase!important;
}
.pro-sire-threshold-bundle.is-rule-off .pro-sire-rule-off-label{
  display:inline-flex!important;
}
.pro-sire-threshold-bundle.is-rule-off .pro-sire-row-minmax{
  opacity:.45!important;
}

.pro-sire-query-grid-panel[data-pro-sire-lab="ae"] .pro-sire-threshold-bundle:not([data-rule-family="ae"]),
.pro-sire-query-grid-panel[data-pro-sire-lab="win"] .pro-sire-threshold-bundle:not([data-rule-family="win"]),
.pro-sire-query-grid-panel[data-pro-sire-lab="zero"] .pro-sire-threshold-bundle:not([data-rule-family="zero"]){
  opacity:.82!important;
  background:linear-gradient(180deg,#f8fafc,#ffffff)!important;
}
.pro-sire-query-grid-panel[data-pro-sire-lab="ae"] .pro-sire-threshold-bundle[data-rule-family="ae"],
.pro-sire-query-grid-panel[data-pro-sire-lab="win"] .pro-sire-threshold-bundle[data-rule-family="win"],
.pro-sire-query-grid-panel[data-pro-sire-lab="zero"] .pro-sire-threshold-bundle[data-rule-family="zero"]{
  opacity:1!important;
  background:linear-gradient(180deg,#ecfeff,#ffffff)!important;
  box-shadow:inset 0 0 0 2px rgba(14,165,233,.22)!important;
}

.pro-sire-query-grid-table tbody td:nth-child(n+6){
  text-align:center!important;
  font-weight:850!important;
  vertical-align:middle!important;
}
.pro-sire-query-grid-table .pro-sire-money{
  text-align:right!important;
  font-weight:950!important;
  padding-right:18px!important;
}
.pro-sire-query-grid-table .is-sortable{
  cursor:pointer!important;
  user-select:none!important;
}
.pro-sire-query-grid-table .is-sortable::after{
  content:" ↕"!important;
  color:#94a3b8!important;
  font-size:10px!important;
}
.pro-sire-query-grid-table .is-sortable.is-active-sort::after{
  color:#0369a1!important;
}

@media(max-width:1200px){
  .pro-sire-query-grid-panel.pro-sire-workspace-root.pro-sire-workspace-open{
    padding:10px!important;
  }
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table{
    width:1980px!important;
    min-width:1980px!important;
  }
}

/* PRO_SYSTEM_BUILDER_001Z — interaction rescue, visual polish and control compaction
   Purpose: preserve the stable 001Y table foundation while restoring broken button/filter
   interactions and making the workspace feel more compact and premium. */
.pro-sire-query-grid-panel.pro-sire-workspace-root.pro-sire-workspace-open{
  gap:8px!important;
  padding:10px 12px 18px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-overview{
  gap:10px!important;
}
.pro-sire-cockpit-card{
  border-radius:16px!important;
  box-shadow:0 10px 26px rgba(15,23,42,.055), inset 0 1px 0 rgba(255,255,255,.88)!important;
}
.pro-sire-cockpit-card>strong{
  font-size:18px!important;
  letter-spacing:-.025em!important;
}
.pro-sire-cockpit-metrics{
  gap:7px!important;
}
.pro-sire-cockpit-metrics span{
  min-height:50px!important;
  padding:8px 10px!important;
}
.pro-sire-cockpit-metrics b{
  font-size:17px!important;
}
.pro-sire-cockpit-metrics em{
  font-size:9.5px!important;
  letter-spacing:.06em!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-control-deck{gap:10px!important;
  align-items:start!important;
}
.pro-sire-bulk-tuning,
.pro-sire-query-filter-bar{
  min-height:0!important;
  align-self:start!important;
  border-radius:16px!important;
  box-shadow:0 10px 26px rgba(15,23,42,.045)!important;
}
.pro-sire-bulk-title,
.pro-sire-filter-title{
  margin-bottom:7px!important;
}
.pro-sire-bulk-title strong,
.pro-sire-filter-title strong{
  font-size:12px!important;
  letter-spacing:.12em!important;
}
.pro-sire-bulk-title span,
.pro-sire-filter-title span{
  font-size:11px!important;
}
.pro-sire-hub-layout{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:8px!important;
}
.pro-sire-hub-section{
  min-height:0!important;
  padding:9px!important;
  border-radius:14px!important;
}
.pro-sire-hub-section-bulk{
  grid-column:1 / -1!important;
}
.pro-sire-hub-section-title{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:8px!important;
  margin-bottom:7px!important;
}
.pro-sire-hub-section-title strong{
  font-size:11px!important;
  letter-spacing:.14em!important;
}
.pro-sire-hub-section-title span{
  max-width:360px!important;
  font-size:10.5px!important;
  text-align:right!important;
  line-height:1.25!important;
}
.pro-sire-settings-toolbar{
  gap:8px!important;
}
.pro-sire-settings-actions,
.pro-sire-family-pause-bar{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:7px!important;
}
.pro-sire-settings-actions .btn,
.pro-sire-family-pause-bar .btn,
#proSireApplyBulkButton{
  min-height:32px!important;
  border-radius:10px!important;
  font-size:11px!important;
  font-weight:950!important;
  cursor:pointer!important;
  pointer-events:auto!important;
}
#proSireApplyChangesButton.is-dirty{
  background:linear-gradient(135deg,#0ea5e9,#2563eb)!important;
  color:#fff!important;
  border-color:rgba(37,99,235,.42)!important;
  box-shadow:0 8px 18px rgba(37,99,235,.2)!important;
}
#proSireDraftStateMessage{
  min-height:30px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:6px 10px!important;
  border-radius:10px!important;
  background:#f8fafc!important;
  border:1px solid rgba(203,213,225,.86)!important;
  color:#334155!important;
  font-size:10.5px!important;
  font-weight:850!important;
  text-align:center!important;
}
#proSireDraftStateMessage.pro-sire-dirty-message{
  background:#eff6ff!important;
  border-color:rgba(37,99,235,.25)!important;
  color:#1d4ed8!important;
}
.pro-sire-bulk-grid{
  display:grid!important;
  grid-template-columns:minmax(160px,.8fr) repeat(3,minmax(170px,1fr)) auto!important;
  gap:8px!important;
  align-items:stretch!important;
}
.pro-sire-bulk-field.pro-sire-bulk-scope{
  min-height:72px!important;
  display:grid!important;
  align-content:center!important;
  gap:5px!important;
  padding:9px!important;
  border:1px solid rgba(203,213,225,.78)!important;
  border-radius:13px!important;
  background:#fff!important;
}
.pro-sire-bulk-rule-card{
  display:grid!important;
  grid-template-columns:1fr!important;
  align-content:center!important;
  gap:7px!important;
  min-height:72px!important;
  padding:9px!important;
  border-radius:13px!important;
  background:linear-gradient(180deg,#ffffff,#f8fbff)!important;
}
.pro-sire-bulk-minmax{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:7px!important;
}
.pro-sire-bulk-minmax label{
  display:grid!important;
  grid-template-columns:34px 1fr!important;
  gap:5px!important;
  align-items:center!important;
}
.pro-sire-bulk-minmax label span,
.pro-sire-bulk-field span{
  font-size:9.5px!important;
  font-weight:950!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
  color:#64748b!important;
}
.pro-sire-bulk-minmax input,
.pro-sire-bulk-grid select{
  width:100%!important;
  min-width:0!important;
  height:34px!important;
  min-height:34px!important;
  padding:6px 9px!important;
  border-radius:10px!important;
  font-size:12px!important;
  font-weight:950!important;
  pointer-events:auto!important;
}
#proSireApplyBulkButton{
  align-self:end!important;
  justify-self:end!important;
  min-width:126px!important;
  height:34px!important;
}
.pro-sire-query-filter-bar{
  display:grid!important;
  grid-template-rows:auto auto auto!important;
  gap:8px!important;
  padding:10px!important;
}
.pro-sire-lab-board{
  grid-template-columns:190px minmax(0,1fr)!important;
  padding:7px!important;
  gap:7px!important;
}
.pro-sire-lab-mode{
  min-height:31px!important;
  font-size:10.5px!important;
}
.pro-sire-lab-status-grid{
  gap:7px!important;
}
.pro-sire-lab-family-card{
  padding:8px 10px!important;
  min-height:58px!important;
}
.pro-sire-filter-grid{
  display:grid!important;
  grid-template-columns:170px 130px 150px minmax(260px,1fr) 130px auto!important;
  gap:7px!important;
  align-items:end!important;
}
.pro-sire-filter-field label,
.pro-sire-filter-label-row span{
  font-size:9.5px!important;
  letter-spacing:.11em!important;
}
.pro-sire-query-filter-bar input,
.pro-sire-query-filter-bar select{
  min-height:32px!important;
  pointer-events:auto!important;
}
.pro-sire-component-filter-groups{
  max-height:62px!important;
  overflow:auto!important;
  padding:3px!important;
  border:1px solid rgba(203,213,225,.7)!important;
  border-radius:11px!important;
  background:#fff!important;
  pointer-events:auto!important;
}
.pro-sire-component-filter-chip{
  min-height:23px!important;
  padding:0 8px!important;
  pointer-events:auto!important;
  user-select:none!important;
}
.pro-sire-component-filter-chip input{
  pointer-events:auto!important;
}
#proSireQueryComponentClear{
  pointer-events:auto!important;
  cursor:pointer!important;
}
#proSireQueryFilterCount{
  white-space:nowrap!important;
  min-height:30px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .quick-status-bar{
  min-height:34px!important;
  padding:8px 12px!important;
  border-radius:12px!important;
  font-size:12px!important;
  font-weight:850!important;
}
.pro-sire-query-grid-table thead th{
  font-size:10.8px!important;
  background:linear-gradient(180deg,#f1f7ff,#e7f0ff)!important;
}
.pro-sire-query-grid-table thead tr.pro-sire-single-head th.pro-sire-threshold-head-win,
.pro-sire-query-grid-table tbody td[data-rule-family="win"]{
  border-left:1px solid rgba(45,212,191,.25)!important;
}
.pro-sire-query-grid-table thead tr.pro-sire-single-head th.pro-sire-trigger-head{
  border-left:1px solid rgba(148,163,184,.35)!important;
}
.pro-sire-query-grid-table thead tr.pro-sire-single-head th.pro-sire-performance-head{
  border-left:1px solid rgba(96,165,250,.28)!important;
}
.pro-sire-query-grid-table tbody tr:hover .pro-sire-query-cell,
.pro-sire-query-grid-table tbody tr:hover td{
  background:#eef6ff!important;
}
@media(max-width:1500px){
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-control-deck{}
  .pro-sire-bulk-grid{grid-template-columns:1fr 1fr!important;}
  #proSireApplyBulkButton{grid-column:1 / -1!important;}
  .pro-sire-filter-grid{grid-template-columns:1fr 1fr!important;}
  .pro-sire-filter-components{grid-column:1 / -1!important;}
}


/* PRO_SYSTEM_BUILDER_001AA — visual polish and control compaction
   Purpose: keep 001Y/001Z functionality stable while moving the workspace toward a premium command-console UI. */
.pro-sire-query-grid-panel.pro-sire-workspace-root.pro-sire-workspace-open{
  background:linear-gradient(180deg,#eef8ff 0%,#f8fbff 42%,#ffffff 100%)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-top{
  min-height:58px!important;
  border-radius:18px!important;
  box-shadow:0 14px 34px rgba(15,23,42,.12)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-overview{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:8px!important;
}
.pro-sire-cockpit-card{
  padding:10px!important;
  border-radius:17px!important;
  min-height:138px!important;
  background:linear-gradient(180deg,#ffffff,#f8fbff)!important;
  border:1px solid rgba(191,219,254,.9)!important;
}
.pro-sire-cockpit-before{box-shadow:inset 4px 0 0 rgba(14,165,233,.8),0 10px 24px rgba(15,23,42,.045)!important;}
.pro-sire-cockpit-system{box-shadow:inset 4px 0 0 rgba(34,197,94,.72),0 10px 24px rgba(15,23,42,.045)!important;}
.pro-sire-cockpit-negative{box-shadow:inset 4px 0 0 rgba(244,63,94,.68),0 10px 24px rgba(15,23,42,.045)!important;}
.pro-sire-cockpit-delta{box-shadow:inset 4px 0 0 rgba(99,102,241,.7),0 10px 24px rgba(15,23,42,.045)!important;}
.pro-sire-card-eyebrow{
  display:inline-flex!important;
  align-items:center!important;
  min-height:21px!important;
  padding:3px 8px!important;
  border-radius:999px!important;
  background:rgba(240,249,255,.95)!important;
  border:1px solid rgba(186,230,253,.86)!important;
  color:#0369a1!important;
  font-size:9px!important;
  font-weight:950!important;
  letter-spacing:.14em!important;
  text-transform:uppercase!important;
  margin-bottom:6px!important;
}
.pro-sire-cockpit-card>strong{
  display:block!important;
  font-size:19px!important;
  line-height:1.05!important;
  margin:0 0 8px!important;
  color:#0f172a!important;
}
.pro-sire-cockpit-metrics{
  display:grid!important;
  grid-template-columns:1.15fr 1fr 1fr!important;
  gap:6px!important;
}
.pro-sire-cockpit-metrics span{
  min-height:45px!important;
  padding:7px 9px!important;
  border-radius:12px!important;
  background:#fff!important;
  border:1px solid rgba(203,213,225,.82)!important;
}
.pro-sire-cockpit-metrics span.pro-sire-hero-metric{
  grid-row:span 2!important;
  min-height:96px!important;
  align-content:center!important;
  background:linear-gradient(180deg,#f8fafc,#ffffff)!important;
  border-color:rgba(147,197,253,.78)!important;
}
.pro-sire-cockpit-metrics span.pro-sire-hero-metric b,
.pro-sire-cockpit-metrics span.pro-sire-hero-metric .pro-sire-money{
  font-size:25px!important;
  letter-spacing:-.045em!important;
}
.pro-sire-cockpit-metrics b{font-size:16px!important;line-height:1.05!important;}
.pro-sire-cockpit-metrics em{font-size:8.8px!important;letter-spacing:.09em!important;}

.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-control-deck{gap:8px!important;
}
.pro-sire-bulk-tuning,
.pro-sire-query-filter-bar{
  border-radius:17px!important;
  border:1px solid rgba(186,230,253,.82)!important;
  background:linear-gradient(180deg,#ffffff,#f8fdff)!important;
}
.pro-sire-bulk-title,
.pro-sire-filter-title{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:10px!important;
  margin-bottom:6px!important;
}
.pro-sire-bulk-title strong,
.pro-sire-filter-title strong{font-size:12px!important;color:#075985!important;}
.pro-sire-bulk-title span,
.pro-sire-filter-title span{max-width:520px!important;text-align:right!important;line-height:1.25!important;}
.pro-sire-hub-layout{
  grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr)!important;
  gap:8px!important;
}
.pro-sire-hub-section-actions,
.pro-sire-hub-section-pause{
  min-height:138px!important;
}
.pro-sire-hub-section-bulk{grid-column:1 / -1!important;}
.pro-sire-hub-section{
  background:rgba(255,255,255,.86)!important;
  border:1px solid rgba(203,213,225,.72)!important;
}
.pro-sire-settings-toolbar{
  display:grid!important;
  grid-template-columns:minmax(190px,.72fr) minmax(180px,1fr)!important;
  gap:9px!important;
  align-items:stretch!important;
}
.pro-sire-settings-actions{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:6px!important;
  align-content:start!important;
}
.pro-sire-settings-actions .btn{
  width:100%!important;
  justify-content:center!important;
  min-height:30px!important;
}
#proSireDraftStateMessage{
  min-height:100%!important;
  align-self:stretch!important;
  font-size:10.7px!important;
  line-height:1.25!important;
  background:linear-gradient(180deg,#f8fbff,#ffffff)!important;
}
.pro-sire-family-pause-bar{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
}
.pro-sire-family-pause-bar .btn{
  min-height:36px!important;
  background:#fff!important;
  border:1px solid rgba(14,165,233,.25)!important;
  box-shadow:0 6px 15px rgba(14,165,233,.08)!important;
}
.pro-sire-family-pause-bar .btn.is-paused{
  background:linear-gradient(135deg,#fff7ed,#ffedd5)!important;
  border-color:rgba(251,146,60,.45)!important;
  color:#9a3412!important;
}

.pro-sire-bulk-grid{
  grid-template-columns:minmax(180px,.9fr) repeat(3,minmax(170px,1fr)) 132px!important;
  gap:8px!important;
  align-items:stretch!important;
}
.pro-sire-bulk-rule-card{
  min-height:76px!important;
  padding:10px!important;
  grid-template-columns:1fr!important;
  border:1px solid rgba(186,230,253,.75)!important;
  background:linear-gradient(180deg,#ffffff,#f0fdfa)!important;
}
.pro-sire-bulk-rule-card .pro-sire-rule-switch{
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  min-height:20px!important;
}
.pro-sire-bulk-minmax{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(82px,1fr))!important;
  gap:8px!important;
}
.pro-sire-bulk-minmax label{
  display:grid!important;
  grid-template-columns:30px minmax(72px,1fr)!important;
  gap:6px!important;
  align-items:center!important;
}
.pro-sire-bulk-minmax input,
.pro-sire-bulk-grid select{
  height:34px!important;
  min-height:34px!important;
  width:100%!important;
  min-width:72px!important;
  max-width:none!important;
  padding:6px 9px!important;
  border-radius:10px!important;
  font-size:13px!important;
  font-weight:950!important;
  text-align:center!important;
  color:#0f172a!important;
  background:#fff!important;
  border:1px solid rgba(148,163,184,.72)!important;
  opacity:1!important;
  visibility:visible!important;
}
.pro-sire-bulk-field.pro-sire-bulk-scope{
  min-height:76px!important;
  padding:10px!important;
  background:linear-gradient(180deg,#ffffff,#f8fafc)!important;
}
#proSireApplyBulkButton{
  align-self:stretch!important;
  justify-self:stretch!important;
  min-width:0!important;
  height:auto!important;
  min-height:76px!important;
  border-radius:13px!important;
}

.pro-sire-query-filter-bar{
  grid-template-rows:auto auto auto auto!important;
  gap:7px!important;
}
.pro-sire-lab-board{
  grid-template-columns:180px minmax(0,1fr)!important;
  gap:8px!important;
  background:rgba(240,249,255,.7)!important;
}
.pro-sire-lab-status-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;}
.pro-sire-filter-grid{
  grid-template-columns:160px 125px 145px minmax(260px,1fr) 125px auto!important;
  gap:7px!important;
  align-items:end!important;
}
.pro-sire-filter-field,
.pro-sire-component-filter-groups{
  background:#fff!important;
}
.pro-sire-component-filter-groups{
  max-height:50px!important;
  overflow:auto!important;
}
.pro-sire-tuning-state-panel{
  display:grid!important;
  gap:7px!important;
  padding:8px!important;
  border:1px solid rgba(147,197,253,.7)!important;
  border-radius:14px!important;
  background:linear-gradient(135deg,#eff6ff,#f8fafc)!important;
}
.pro-sire-tuning-state-head{
  display:flex!important;
  justify-content:space-between!important;
  align-items:center!important;
  gap:10px!important;
}
.pro-sire-tuning-state-head strong{
  font-size:11px!important;
  font-weight:950!important;
  letter-spacing:.13em!important;
  color:#075985!important;
  text-transform:uppercase!important;
}
.pro-sire-tuning-state-head span{
  font-size:11px!important;
  font-weight:850!important;
  color:#334155!important;
}
.pro-sire-tuning-state-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:6px!important;
}
.pro-sire-tuning-state-grid span{
  min-height:44px!important;
  padding:7px 8px!important;
  border-radius:11px!important;
  background:#fff!important;
  border:1px solid rgba(203,213,225,.82)!important;
  display:grid!important;
  align-content:center!important;
  gap:2px!important;
}
.pro-sire-tuning-state-grid b{
  font-size:12px!important;
  font-weight:950!important;
  color:#0f172a!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.pro-sire-tuning-state-grid em{
  font-size:8.5px!important;
  font-style:normal!important;
  font-weight:900!important;
  color:#64748b!important;
  letter-spacing:.09em!important;
  text-transform:uppercase!important;
}

.pro-sire-query-grid-table thead th{
  color:#0f172a!important;
  letter-spacing:.09em!important;
  border-bottom:1px solid rgba(147,197,253,.9)!important;
}
.pro-sire-query-grid-table thead tr.pro-sire-single-head th.pro-sire-threshold-head-win,
.pro-sire-query-grid-table tbody td[data-rule-family="win"]{
  background:linear-gradient(180deg,#f0fdfa,#ffffff)!important;
}
.pro-sire-query-grid-table thead tr.pro-sire-single-head th.pro-sire-threshold-head-zero,
.pro-sire-query-grid-table tbody td[data-rule-family="zero"]{
  background:linear-gradient(180deg,#f8fafc,#ffffff)!important;
}
.pro-sire-query-grid-table thead tr.pro-sire-single-head th.pro-sire-threshold-head-ae,
.pro-sire-query-grid-table tbody td[data-rule-family="ae"]{
  background:linear-gradient(180deg,#ecfeff,#ffffff)!important;
}
.pro-sire-query-grid-table thead tr.pro-sire-single-head th.pro-sire-trigger-head{
  background:linear-gradient(180deg,#f8fafc,#f1f5f9)!important;
}
.pro-sire-query-grid-table thead tr.pro-sire-single-head th.pro-sire-performance-head,
.pro-sire-query-grid-table tbody td:nth-child(n+9){
  background:linear-gradient(180deg,#f0f7ff,#ffffff)!important;
}
.pro-sire-query-grid-table tbody tr:nth-child(even) td:nth-child(n+9),
.pro-sire-query-grid-table tbody tr:nth-child(even) th{
  background:#f7fbff!important;
}
.pro-sire-query-grid-table tbody td:last-child .pro-sire-money,
.pro-sire-query-grid-table tbody td:last-child{
  font-size:13px!important;
  font-weight:950!important;
}
.pro-sire-query-chip{
  box-shadow:0 5px 13px rgba(37,99,235,.1)!important;
}
.pro-sire-query-grid-table th:nth-child(2),
.pro-sire-query-grid-table td:nth-child(2){
  background:linear-gradient(180deg,#f8fbff,#ffffff)!important;
}
@media(max-width:1500px){
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-overview{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-control-deck{}
  .pro-sire-bulk-grid{grid-template-columns:1fr 1fr!important;}
  .pro-sire-bulk-rule-card{min-height:88px!important;}
  .pro-sire-bulk-minmax input{min-width:86px!important;}
  #proSireApplyBulkButton{grid-column:1 / -1!important;min-height:42px!important;}
  .pro-sire-tuning-state-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}

/* PRO_SYSTEM_BUILDER_001AB — visual hierarchy, chip filters and table control polish */
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-control-deck{gap:8px!important;
}
.pro-sire-bulk-tuning,
.pro-sire-query-filter-bar{
  box-shadow:0 10px 28px rgba(15,23,42,.045)!important;
  border-color:rgba(186,230,253,.68)!important;
}
.pro-sire-hub-layout{
  grid-template-columns:minmax(260px,.72fr) minmax(260px,.9fr)!important;
  gap:7px!important;
}
.pro-sire-hub-section{
  border-color:rgba(203,213,225,.52)!important;
  box-shadow:none!important;
}
.pro-sire-hub-section-actions,
.pro-sire-hub-section-pause{
  min-height:108px!important;
}
.pro-sire-hub-section-pause{
  align-content:start!important;
}
.pro-sire-hub-section-title{
  margin-bottom:6px!important;
}
.pro-sire-hub-section-title span{
  font-size:9.8px!important;
  line-height:1.15!important;
}
.pro-sire-settings-toolbar{
  grid-template-columns:minmax(165px,.65fr) minmax(170px,1fr)!important;
  gap:7px!important;
}
.pro-sire-settings-actions .btn{
  min-height:27px!important;
  font-size:10px!important;
}
#proSireDraftStateMessage{
  min-height:92px!important;
  padding:10px!important;
}
.pro-sire-family-pause-bar{
  gap:7px!important;
}
.pro-sire-family-pause-bar .btn{
  min-height:34px!important;
}
.pro-sire-hub-section-bulk{
  padding-bottom:9px!important;
}
.pro-sire-bulk-grid{
  grid-template-columns:minmax(210px,.95fr) repeat(3,minmax(154px,1fr)) 132px!important;
  gap:7px!important;
}
.pro-sire-bulk-field.pro-sire-bulk-scope,
.pro-sire-bulk-rule-card{
  min-height:66px!important;
  padding:9px!important;
}
.pro-sire-bulk-minmax{
  gap:7px!important;
}
.pro-sire-bulk-minmax label{
  grid-template-columns:28px minmax(70px,1fr)!important;
}
.pro-sire-bulk-minmax input,
.pro-sire-bulk-grid select{
  height:30px!important;
  min-height:30px!important;
  font-size:12.5px!important;
  border-radius:9px!important;
}
#proSireApplyBulkButton{
  min-height:66px!important;
}

.pro-sire-query-filter-bar{
  grid-template-rows:auto auto auto auto!important;
  gap:6px!important;
}
.pro-sire-filter-title{
  margin-bottom:4px!important;
}
.pro-sire-lab-board{
  grid-template-columns:170px minmax(0,1fr)!important;
  gap:7px!important;
  padding:6px!important;
  border:1px solid rgba(186,230,253,.62)!important;
  border-radius:14px!important;
}
.pro-sire-lab-mode-strip{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:5px!important;
}
.pro-sire-lab-mode{
  min-height:27px!important;
  border-radius:999px!important;
  font-size:10px!important;
}
.pro-sire-lab-status-grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:6px!important;
}
.pro-sire-lab-family-card{
  min-height:48px!important;
  padding:8px 9px!important;
  border-color:rgba(203,213,225,.66)!important;
  background:linear-gradient(180deg,#ffffff,#f8fafc)!important;
}
.pro-sire-tuning-state-panel{
  padding:7px!important;
  gap:6px!important;
}
.pro-sire-tuning-state-grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:5px!important;
}
.pro-sire-tuning-state-grid span{
  min-height:38px!important;
  padding:6px 7px!important;
}
.pro-sire-tuning-state-grid b{
  font-size:11.3px!important;
}

.pro-sire-advanced-filters{
  border:1px solid rgba(186,230,253,.72)!important;
  border-radius:14px!important;
  background:linear-gradient(180deg,#ffffff,#f8fdff)!important;
  overflow:hidden!important;
}
.pro-sire-advanced-filters summary{
  list-style:none!important;
  cursor:pointer!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  min-height:36px!important;
  padding:8px 11px!important;
  color:#075985!important;
  font-size:11px!important;
  font-weight:950!important;
  letter-spacing:.1em!important;
  text-transform:uppercase!important;
}
.pro-sire-advanced-filters summary::-webkit-details-marker{display:none!important;}
.pro-sire-advanced-filters summary::before{
  content:'▸';
  margin-right:4px!important;
  color:#0284c7!important;
}
.pro-sire-advanced-filters[open] summary::before{content:'▾';}
.pro-sire-advanced-filters summary span{margin-right:auto!important;}
.pro-sire-advanced-filters summary em{
  font-style:normal!important;
  color:#2563eb!important;
  background:#eff6ff!important;
  border:1px solid rgba(147,197,253,.72)!important;
  border-radius:999px!important;
  padding:4px 8px!important;
  letter-spacing:0!important;
  text-transform:none!important;
  font-size:10.5px!important;
}
.pro-sire-advanced-filters .pro-sire-filter-grid{
  padding:8px!important;
  border-top:1px solid rgba(226,232,240,.8)!important;
  grid-template-columns:165px 130px 145px minmax(280px,1fr) 126px auto!important;
  gap:7px!important;
}
.pro-sire-filter-field,
.pro-sire-component-filter-groups{
  border-color:rgba(203,213,225,.55)!important;
  box-shadow:none!important;
}
.pro-sire-component-filter-groups{
  max-height:none!important;
  overflow:visible!important;
  display:flex!important;
  flex-wrap:wrap!important;
  gap:5px!important;
}
.pro-sire-component-filter-group{
  display:contents!important;
}
.pro-sire-component-filter-group strong{
  display:none!important;
}
.pro-sire-component-filter-group div,
.pro-sire-chip-select-list{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:5px!important;
}
.pro-sire-component-filter-chip input{display:none!important;}
.pro-sire-filter-token{
  border:1px solid rgba(14,165,233,.28)!important;
  background:#f8feff!important;
  color:#075985!important;
  border-radius:999px!important;
  padding:6px 10px!important;
  min-height:28px!important;
  font-size:10px!important;
  font-weight:900!important;
  line-height:1!important;
  cursor:pointer!important;
  box-shadow:0 5px 11px rgba(14,165,233,.055)!important;
}
.pro-sire-filter-token:hover{
  border-color:rgba(37,99,235,.42)!important;
  background:#eff6ff!important;
}
.pro-sire-filter-token.is-active,
.pro-sire-filter-token[aria-pressed='true']{
  background:linear-gradient(135deg,#2563eb,#0891b2)!important;
  border-color:rgba(37,99,235,.8)!important;
  color:#fff!important;
  box-shadow:0 8px 18px rgba(37,99,235,.18)!important;
}

.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-scroll{
  width:100%!important;
  max-width:none!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table{
  width:100%!important;
  min-width:2030px!important;
  max-width:none!important;
}
.pro-sire-row-rule-switch{display:none!important;}
.pro-sire-rule-off-label{display:none!important;}
.pro-sire-row-rule-toggle{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:4px!important;
  margin-bottom:6px!important;
  width:100%!important;
}
.pro-sire-row-rule-toggle input{
  position:absolute!important;
  opacity:0!important;
  pointer-events:none!important;
  width:1px!important;
  height:1px!important;
}
.pro-sire-rule-toggle-button{
  appearance:none!important;
  border:1px solid rgba(148,163,184,.48)!important;
  background:#fff!important;
  color:#64748b!important;
  border-radius:999px!important;
  min-height:24px!important;
  padding:4px 8px!important;
  font-size:9.5px!important;
  font-weight:950!important;
  text-transform:uppercase!important;
  cursor:pointer!important;
}
.pro-sire-rule-toggle-button.is-active{
  color:#fff!important;
  border-color:transparent!important;
}
.pro-sire-rule-toggle-on.is-active{
  background:linear-gradient(135deg,#0891b2,#0ea5e9)!important;
  box-shadow:0 5px 13px rgba(14,165,233,.2)!important;
}
.pro-sire-rule-toggle-off.is-active{
  background:linear-gradient(135deg,#f97316,#ea580c)!important;
  box-shadow:0 5px 13px rgba(249,115,22,.18)!important;
}
.pro-sire-threshold-bundle.is-rule-off .pro-sire-row-minmax{
  opacity:.55!important;
}
.pro-sire-query-grid-table tbody td[data-rule-family]{
  padding-top:9px!important;
}
.pro-sire-query-grid-table th,
.pro-sire-query-grid-table td{
  border-right:1px solid rgba(226,232,240,.7)!important;
}
.pro-sire-query-grid-table thead th{
  background:linear-gradient(180deg,#f8fbff,#eaf3ff)!important;
}
.pro-sire-query-grid-table tbody td:nth-child(n+6){
  text-align:center!important;
}
@media(max-width:1500px){
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-control-deck{}
  .pro-sire-advanced-filters .pro-sire-filter-grid{grid-template-columns:1fr 1fr!important;}
  .pro-sire-filter-components{grid-column:1 / -1!important;}
}

/* PRO_SYSTEM_BUILDER_001AC — apply/filter drawer/rule-toggle rescue */
.pro-sire-advanced-filters{
  margin-top:10px!important;
  border:1px solid rgba(14,165,233,.22)!important;
  border-radius:16px!important;
  background:linear-gradient(180deg,#f8feff,#eef8ff)!important;
  overflow:hidden!important;
}
.pro-sire-advanced-filter-toggle{
  width:100%!important;
  min-height:38px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  padding:9px 13px!important;
  border:0!important;
  background:transparent!important;
  color:#075985!important;
  font-size:11px!important;
  font-weight:950!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
  cursor:pointer!important;
}
.pro-sire-advanced-filter-toggle:hover{
  background:rgba(14,165,233,.07)!important;
}
.pro-sire-advanced-filter-toggle span::before{
  content:'▸';
  display:inline-block;
  margin-right:8px;
  transition:transform .16s ease;
}
.pro-sire-advanced-filter-toggle[aria-expanded='true'] span::before{
  transform:rotate(90deg);
}
.pro-sire-advanced-filter-toggle em,
#proSireQueryFilterCount{
  border-radius:999px!important;
  background:#e8f3ff!important;
  color:#2563eb!important;
  padding:5px 9px!important;
  font-style:normal!important;
  font-weight:950!important;
  white-space:nowrap!important;
}
#proSireAdvancedFilterPanel{
  border-top:1px solid rgba(14,165,233,.18)!important;
  padding:12px!important;
}
#proSireAdvancedFilterPanel[hidden]{display:none!important;}
.pro-sire-filter-token{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  min-height:30px!important;
  padding:7px 12px!important;
  border-radius:999px!important;
  border:1px solid rgba(14,165,233,.26)!important;
  background:#fff!important;
  color:#075985!important;
  cursor:pointer!important;
  user-select:none!important;
}
.pro-sire-filter-token::before{display:none!important;content:none!important;}
.pro-sire-filter-token.is-active,
.pro-sire-filter-token[aria-pressed='true']{
  color:#fff!important;
  background:linear-gradient(135deg,#2563eb,#0891b2)!important;
  border-color:transparent!important;
}
.pro-sire-row-rule-toggle{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:6px!important;
  align-items:center!important;
  margin:0 0 8px!important;
}
.pro-sire-rule-toggle-button{
  min-height:28px!important;
  padding:6px 10px!important;
  line-height:1!important;
  pointer-events:auto!important;
}
.pro-sire-row-minmax{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
}
.pro-sire-row-minmax .pro-sire-threshold-input,
.pro-sire-threshold-input{
  min-width:68px!important;
  height:32px!important;
  text-align:center!important;
}
.pro-sire-family-paused-pill{
  display:none!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:62px!important;
  width:100%!important;
  border-radius:14px!important;
  border:1px solid rgba(245,158,11,.32)!important;
  background:linear-gradient(135deg,#fff7ed,#ffedd5)!important;
  color:#9a3412!important;
  font-size:11px!important;
  font-weight:950!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
}
.pro-sire-threshold-bundle.is-family-paused .pro-sire-family-paused-pill{
  display:flex!important;
}
.pro-sire-threshold-bundle.is-family-paused .pro-sire-row-rule-toggle,
.pro-sire-threshold-bundle.is-family-paused .pro-sire-row-minmax{
  display:none!important;
}
.pro-sire-threshold-bundle.is-rule-off .pro-sire-row-minmax{
  opacity:.42!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-scroll{
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table{
  width:100%!important;
  min-width:1780px!important;
}
.pro-sire-query-grid-table tbody td,
.pro-sire-query-grid-table tbody th{
  vertical-align:middle!important;
}
.pro-sire-query-grid-table tbody td:nth-child(n+6){
  text-align:center!important;
}
.pro-sire-control-hub,
.pro-sire-query-filter-bar{
  box-shadow:0 10px 26px rgba(15,23,42,.045)!important;
}
.pro-sire-lab-board,
.pro-sire-tuning-state-panel{
  border-width:1px!important;
}

/* === DESIGN_SYSTEM_001P — restore fullscreen drilldown header gradients ===
   Scope: visual-only repair for Live Racing drilldown fullscreen headers.
   Reason: DESIGN_SYSTEM_001O's generic fullscreen scroll fix reasserted a white
   header after the evidence-page gradient rules, making white title text unreadable.
   This patch deliberately sits later in the cascade and restores page-specific
   header colour without changing data, endpoints, runner strips or evidence tables. */
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-horse-form{
  --lr-drilldown-header-start:#0f172a;
  --lr-drilldown-header-mid:#1e3a8a;
  --lr-drilldown-header-end:#0f766e;
  --lr-drilldown-header-shadow:rgba(15,23,42,.24);
}
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-horse-profile{
  --lr-drilldown-header-start:#083344;
  --lr-drilldown-header-mid:#0f766e;
  --lr-drilldown-header-end:#2563eb;
  --lr-drilldown-header-shadow:rgba(14,116,144,.23);
}
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-trainer-stats{
  --lr-drilldown-header-start:#052e2b;
  --lr-drilldown-header-mid:#0f766e;
  --lr-drilldown-header-end:#14b8a6;
  --lr-drilldown-header-shadow:rgba(15,118,110,.24);
}
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-sire-stats{
  --lr-drilldown-header-start:#1e1b4b;
  --lr-drilldown-header-mid:#5b21b6;
  --lr-drilldown-header-end:#7c3aed;
  --lr-drilldown-header-shadow:rgba(91,33,182,.25);
}
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-horse-form .horse-drilldown-modal-header,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-horse-profile .horse-drilldown-modal-header,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-trainer-stats .horse-drilldown-modal-header,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-sire-stats .horse-drilldown-modal-header{
  background:
    radial-gradient(circle at 12% -70%,rgba(255,255,255,.30) 0%,rgba(255,255,255,.12) 24%,transparent 48%),
    radial-gradient(circle at 92% -40%,rgba(255,255,255,.18) 0%,transparent 42%),
    linear-gradient(135deg,var(--lr-drilldown-header-start) 0%,var(--lr-drilldown-header-mid) 54%,var(--lr-drilldown-header-end) 100%)!important;
  border-bottom:1px solid rgba(255,255,255,.18)!important;
  box-shadow:0 16px 34px var(--lr-drilldown-header-shadow),0 1px 0 rgba(255,255,255,.10) inset!important;
  color:#ffffff!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-horse-form .horse-drilldown-kicker,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-horse-profile .horse-drilldown-kicker,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-trainer-stats .horse-drilldown-kicker,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-sire-stats .horse-drilldown-kicker{
  color:rgba(224,242,254,.92)!important;
  text-shadow:0 1px 10px rgba(0,0,0,.18)!important;
}
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-horse-form .horse-drilldown-modal-header h2,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-horse-profile .horse-drilldown-modal-header h2,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-trainer-stats .horse-drilldown-modal-header h2,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-sire-stats .horse-drilldown-modal-header h2{
  color:#ffffff!important;
  text-shadow:0 2px 16px rgba(0,0,0,.28)!important;
}
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-horse-form .horse-drilldown-modal-header p,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-horse-profile .horse-drilldown-modal-header p,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-trainer-stats .horse-drilldown-modal-header p,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-sire-stats .horse-drilldown-modal-header p{
  color:rgba(241,245,249,.88)!important;
}
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-horse-form .horse-drilldown-actions .horse-drilldown-ghost,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-horse-profile .horse-drilldown-actions .horse-drilldown-ghost,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-trainer-stats .horse-drilldown-actions .horse-drilldown-ghost,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-sire-stats .horse-drilldown-actions .horse-drilldown-ghost,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-horse-profile .horse-drilldown-actions .hp-hidden-top-toggle,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-trainer-stats .horse-drilldown-actions .hp-hidden-top-toggle,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-sire-stats .horse-drilldown-actions .hp-hidden-top-toggle{
  background:rgba(255,255,255,.12)!important;
  border-color:rgba(255,255,255,.26)!important;
  color:#f8fafc!important;
  box-shadow:none!important;
}
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-horse-form .horse-drilldown-actions .horse-drilldown-ghost:hover,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-horse-profile .horse-drilldown-actions .horse-drilldown-ghost:hover,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-trainer-stats .horse-drilldown-actions .horse-drilldown-ghost:hover,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-sire-stats .horse-drilldown-actions .horse-drilldown-ghost:hover,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-horse-profile .horse-drilldown-actions .hp-hidden-top-toggle:hover,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-trainer-stats .horse-drilldown-actions .hp-hidden-top-toggle:hover,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-sire-stats .horse-drilldown-actions .hp-hidden-top-toggle:hover{
  background:rgba(255,255,255,.20)!important;
  border-color:rgba(255,255,255,.44)!important;
}
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-horse-profile .horse-drilldown-actions .horse-drilldown-back-racecard,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-trainer-stats .horse-drilldown-actions .horse-drilldown-back-racecard,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-sire-stats .horse-drilldown-actions .horse-drilldown-back-racecard{
  background:#ffffff!important;
  color:#0f172a!important;
  border-color:rgba(255,255,255,.88)!important;
  box-shadow:0 12px 26px rgba(0,0,0,.18)!important;
}
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-horse-form .horse-drilldown-close,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-horse-profile .horse-drilldown-close,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-trainer-stats .horse-drilldown-close,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-sire-stats .horse-drilldown-close{
  background:rgba(255,255,255,.14)!important;
  color:#ffffff!important;
  border-color:rgba(255,255,255,.30)!important;
  box-shadow:none!important;
}
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-horse-form .horse-drilldown-close:hover,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-horse-profile .horse-drilldown-close:hover,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-trainer-stats .horse-drilldown-close:hover,
#liveHorseFormModal.horse-drilldown-modal-shell.fullscreen.is-sire-stats .horse-drilldown-close:hover{
  background:rgba(255,255,255,.22)!important;
  border-color:rgba(255,255,255,.48)!important;
}

/* === DESIGN_SYSTEM_001Q_LIVE_RESULTS_BAR_AND_COURSE_CARD_POLISH_20260612 ===
   Scope: visual-only front-page polish for Live Racing and Racing Results.
   Restores safe chip-hover clearance, widens date chips, and separates page colour
   language for course cards/features. No backend, schema, endpoint or racecard logic changes. */

/* Shared toolbar clearance: allow lifted chips to breathe instead of clipping into the white bar. */
#page-live-racing .live-racing-toolbar.compact,
#page-racing-results .racing-results-toolbar{
  min-height:74px!important;
  padding-top:16px!important;
  padding-bottom:16px!important;
  overflow:visible!important;
}

#page-live-racing .live-racing-toolbar .live-date-strip.compact,
#page-racing-results .racing-results-date-strip{
  align-items:center!important;
  gap:10px!important;
  padding-top:4px!important;
  padding-bottom:4px!important;
  overflow:visible!important;
}

/* Live Racing date chips: uniform, more purposeful, and hover-safe. */
#page-live-racing .live-racing-toolbar .live-date-strip.compact .live-date-chip{
  box-sizing:border-box!important;
  flex:0 0 126px!important;
  width:126px!important;
  min-width:126px!important;
  min-height:52px!important;
  display:grid!important;
  place-items:center!important;
  padding:10px 16px!important;
  border-radius:14px!important;
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease!important;
}

#page-live-racing .live-racing-toolbar .live-date-strip.compact .live-date-chip:hover{
  transform:translateY(-3px)!important;
  box-shadow:0 16px 30px rgba(15,23,42,.14)!important;
}

/* Racing Results date chips: match Live Racing sizing and add the same hover lift. */
#page-racing-results .racing-results-date-strip button{
  box-sizing:border-box!important;
  flex:0 0 126px!important;
  width:126px!important;
  min-width:126px!important;
  min-height:52px!important;
  display:grid!important;
  place-items:center!important;
  padding:10px 16px!important;
  border-radius:14px!important;
  line-height:1.05!important;
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,background .16s ease!important;
}

#page-racing-results .racing-results-date-strip button:hover,
#page-racing-results .racing-results-date-strip button:focus-visible{
  transform:translateY(-3px)!important;
  box-shadow:0 16px 30px rgba(15,23,42,.14)!important;
}

#page-racing-results .racing-results-date-strip button.active:hover,
#page-racing-results .racing-results-date-strip button.select-date.is-open:hover{
  box-shadow:0 16px 30px rgba(79,70,229,.22)!important;
}

/* Live Racing course cards: keep the cyan/teal identity but make the card tint visible. */
#page-live-racing .live-racing-list .racing-results-course-card.live-course-card-modern{
  border-color:rgba(20,184,166,.26)!important;
  background:linear-gradient(90deg,rgba(219,250,244,.90),rgba(236,253,245,.72))!important;
}

#page-live-racing .live-racing-list .racing-results-course-head.live-course-header-modern{
  background:linear-gradient(90deg,rgba(209,250,242,.96) 0%,rgba(226,248,246,.86) 54%,rgba(239,246,255,.72) 100%)!important;
}

#page-live-racing .live-racing-list .racing-results-course-head.live-course-header-modern:hover{
  background:linear-gradient(90deg,rgba(190,242,233,.98) 0%,rgba(217,245,241,.9) 54%,rgba(226,240,255,.78) 100%)!important;
}

#page-live-racing .live-racing-list .racing-results-course-features{
  background:linear-gradient(135deg,rgba(255,241,242,.88),rgba(255,247,247,.72))!important;
  border-color:rgba(251,113,133,.26)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.65)!important;
}

#page-live-racing .live-racing-list .racing-results-course-features em{
  color:#0f766e!important;
}

/* Racing Results course cards: separate from Live Racing with a soft orange card and light-blue features panel. */
#page-racing-results .racing-results-course-card{
  border-color:rgba(217,119,6,.22)!important;
  background:linear-gradient(90deg,rgba(255,247,237,.86),rgba(255,251,235,.62))!important;
}

#page-racing-results .racing-results-course-head{
  background:linear-gradient(90deg,rgba(255,247,237,.96) 0%,rgba(255,251,235,.86) 56%,rgba(255,255,255,.74) 100%)!important;
}

#page-racing-results .racing-results-course-head:hover{
  background:linear-gradient(90deg,rgba(254,235,200,.98) 0%,rgba(255,247,214,.92) 56%,rgba(255,255,255,.78) 100%)!important;
}

#page-racing-results .racing-results-course-features{
  background:linear-gradient(135deg,rgba(239,246,255,.92),rgba(248,251,255,.76))!important;
  border-color:rgba(96,165,250,.26)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.70)!important;
}

#page-racing-results .racing-results-course-features em{
  color:#b45309!important;
}

@media(max-width:900px){
  #page-live-racing .live-racing-toolbar.compact,
  #page-racing-results .racing-results-toolbar{
    min-height:0!important;
  }

  #page-live-racing .live-racing-toolbar .live-date-strip.compact,
  #page-racing-results .racing-results-date-strip{
    overflow-x:auto!important;
    overflow-y:visible!important;
  }
}

/* PRO_SYSTEM_BUILDER_001AD — Phase 1R SIRE workspace information-architecture reset
   Purpose: rebuild the SIRE workspace around commercial cockpit, compact workbench, single active control deck, and mode-specific query table. */

.pro-sire-process-card .pro-sire-setup-compact{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.pro-sire-process-steps{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:7px;
  margin-bottom:2px;
}
.pro-sire-process-steps span{
  display:flex;
  align-items:center;
  gap:7px;
  padding:7px 8px;
  border:1px solid rgba(17,126,171,.18);
  border-radius:12px;
  background:linear-gradient(180deg,rgba(240,251,255,.96),rgba(255,255,255,.96));
  font-size:10px;
  font-weight:850;
  letter-spacing:.04em;
  color:#123f68;
  text-transform:uppercase;
}
.pro-sire-process-steps b{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  border-radius:999px;
  background:#117eab;
  color:#fff;
  font-size:10px;
}
.pro-sire-process-note{
  margin:0;
  padding:8px 10px;
  border-radius:12px;
  background:#fff8e8;
  border:1px solid rgba(227,151,35,.24);
  color:#62420d;
  font-size:11px;
  line-height:1.35;
}

body.pro-sire-workspace-open .pro-sire-query-grid-panel.pro-sire-workspace-root{
  background:#f6fbff;
}
.pro-sire-workspace-open .pro-sire-workspace-top{
  min-height:54px;
  padding:12px 16px;
  gap:14px;
  border-bottom:1px solid rgba(255,255,255,.35);
}
.pro-sire-workspace-title-block h2{
  font-size:20px;
  line-height:1;
  letter-spacing:.03em;
}
.pro-sire-workspace-title-block p{
  margin-top:3px;
  font-size:11px;
  opacity:.88;
}

.pro-sire-workspace-overview{
  padding:8px 10px 0;
}
.pro-sire-premium-cockpit{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
.pro-sire-cockpit-card{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:8px;
  min-height:126px;
  padding:12px 13px;
  border-radius:15px;
  background:rgba(255,255,255,.97);
  border:1px solid rgba(20,127,180,.18);
  box-shadow:0 10px 22px rgba(17,62,105,.07);
  overflow:hidden;
}
.pro-sire-cockpit-card::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  background:#119bd2;
  opacity:.85;
}
.pro-sire-cockpit-system::before{background:#1f6fed;}
.pro-sire-cockpit-negative::before{background:#dc4967;}
.pro-sire-cockpit-context::before{background:#7561d9;}
.pro-sire-card-eyebrow{
  display:inline-flex;
  align-self:flex-start;
  padding:3px 8px;
  border-radius:999px;
  background:#eef9ff;
  color:#096c9b;
  border:1px solid rgba(17,126,171,.18);
  font-size:9px;
  text-transform:uppercase;
  letter-spacing:.13em;
  font-weight:900;
}
.pro-sire-cockpit-title-row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
}
.pro-sire-cockpit-title-row strong{
  color:#061b37;
  font-size:16px;
  line-height:1.05;
}
.pro-sire-cockpit-title-row span{
  color:#58718d;
  font-weight:850;
  font-size:10px;
  text-align:right;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.pro-sire-cockpit-hero{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:10px;
  padding:2px 0 4px;
}
.pro-sire-cockpit-hero b{
  font-size:28px;
  line-height:1;
  font-weight:950;
  letter-spacing:-.04em;
}
.pro-sire-cockpit-hero em{
  font-size:9px;
  color:#58718d;
  text-transform:uppercase;
  letter-spacing:.12em;
  font-style:normal;
  font-weight:900;
  text-align:right;
}
.pro-sire-cockpit-rail{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:auto;
}
.pro-sire-cockpit-rail span{
  min-width:calc(33.333% - 4px);
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
  gap:1px;
  padding:5px 7px;
  border-radius:9px;
  background:#f7fbff;
  border:1px solid rgba(126,165,204,.18);
}
.pro-sire-cockpit-rail b{
  color:#0d2848;
  font-size:12px;
  font-weight:950;
}
.pro-sire-cockpit-rail em{
  color:#657b94;
  font-size:8.5px;
  font-style:normal;
  text-transform:uppercase;
  letter-spacing:.1em;
  font-weight:900;
}
.pro-sire-cockpit-card.is-awaiting .pro-sire-cockpit-hero b,
.pro-sire-cockpit-card.is-awaiting .pro-sire-cockpit-rail b{
  color:#8a9bb0;
}

.pro-sire-workflow-note{
  display:flex;
  align-items:center;
  gap:10px;
  margin:8px 10px 0;
  padding:8px 12px;
  border-radius:13px;
  background:#fff9eb;
  border:1px solid rgba(222,164,65,.24);
  color:#62420d;
  font-size:11px;
}
.pro-sire-workflow-note strong{
  flex:0 0 auto;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.12em;
  color:#8a5b09;
}

.pro-sire-workspace-control-deck{
  margin:8px 10px 0;
  border:1px solid rgba(23,127,184,.16);
  background:#fff;
  border-radius:17px;
  box-shadow:0 10px 24px rgba(17,62,105,.06);
  overflow:hidden;
}
.pro-sire-action-bar{
  display:grid;
  grid-template-columns:minmax(0,1.4fr) minmax(320px,.9fr);
  gap:0;
  border-bottom:1px solid rgba(19,123,181,.14);
}
.pro-sire-action-group{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
}
.pro-sire-action-group + .pro-sire-action-group{
  border-left:1px solid rgba(19,123,181,.12);
}
.pro-sire-action-label{
  display:flex;
  flex-direction:column;
  gap:3px;
  min-width:190px;
}
.pro-sire-action-label strong{
  font-size:11px;
  color:#062144;
  text-transform:uppercase;
  letter-spacing:.14em;
}
.pro-sire-action-label span,
#proSireDraftStateMessage{
  font-size:11px;
  color:#506b86;
  line-height:1.25;
}
.pro-sire-settings-toolbar{
  flex:1 1 auto;
}
.pro-sire-settings-actions{
  display:flex !important;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:7px;
}
.pro-sire-settings-actions .btn,
.pro-sire-family-pause-bar .btn{
  min-height:31px;
  border-radius:10px;
  font-weight:900;
}
.pro-sire-apply-primary{
  min-width:160px;
  box-shadow:0 8px 16px rgba(23,101,227,.20);
}
.pro-sire-family-pause-bar{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.pro-sire-family-pause-bar .is-paused{
  background:#fff1d9 !important;
  color:#8a4b00 !important;
  border-color:#efbd72 !important;
}

.pro-sire-workbench-strip{
  display:grid;
  grid-template-columns:390px minmax(0,1fr);
  gap:10px;
  align-items:center;
  padding:10px 14px;
  background:#f7fbff;
  border-bottom:1px solid rgba(19,123,181,.12);
}
.pro-sire-lab-mode-strip{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:7px;
}
.pro-sire-lab-mode{
  min-height:31px;
  border-radius:999px;
  border:1px solid rgba(30,137,199,.24);
  background:#fff;
  color:#0b5d89;
  font-size:10px;
  font-weight:950;
  letter-spacing:.04em;
  cursor:pointer;
}
.pro-sire-lab-mode.is-active{
  color:#fff;
  background:linear-gradient(135deg,#107ab1,#2563eb);
  border-color:transparent;
  box-shadow:0 8px 16px rgba(16,122,177,.22);
}
.pro-sire-workbench-status{
  display:grid;
  grid-template-columns:repeat(8,minmax(0,1fr));
  gap:6px;
}
.pro-sire-workbench-status span{
  padding:7px 8px;
  border-radius:10px;
  border:1px solid rgba(126,165,204,.18);
  background:#fff;
  min-width:0;
}
.pro-sire-workbench-status b{
  display:block;
  color:#0a2948;
  font-size:11px;
  font-weight:950;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.pro-sire-workbench-status em{
  display:block;
  margin-top:1px;
  color:#6b7f93;
  font-size:8px;
  font-style:normal;
  text-transform:uppercase;
  letter-spacing:.1em;
  font-weight:900;
}
.pro-sire-workbench-draft b{color:#235de2;}

.pro-sire-deck-tabs{
  display:flex;
  gap:6px;
  padding:10px 14px 0;
  background:#fff;
}
.pro-sire-deck-tab{
  border:1px solid rgba(26,131,189,.22);
  background:#f7fbff;
  color:#0b5d89;
  min-height:31px;
  padding:0 14px;
  border-radius:12px 12px 0 0;
  font-size:10px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.09em;
  cursor:pointer;
}
.pro-sire-deck-tab.is-active{
  background:#e9f8ff;
  color:#06365c;
  border-bottom-color:#e9f8ff;
}
.pro-sire-deck-panel{
  padding:12px 14px 14px;
  background:#e9f8ff;
  border-top:1px solid rgba(26,131,189,.16);
}
.pro-sire-deck-panel[hidden]{display:none !important;}
.pro-sire-deck-copy{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:10px;
}
.pro-sire-deck-copy strong{
  color:#061f40;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.14em;
}
.pro-sire-deck-copy span{
  color:#526b83;
  font-size:11px;
  text-align:right;
}
.pro-sire-lab-status-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
.pro-sire-lab-family-card{
  border:1px solid rgba(117,164,207,.20);
  background:#fff;
  border-radius:12px;
  padding:8px 10px;
}
.pro-sire-lab-family-card strong,
.pro-sire-lab-family-card span,
.pro-sire-lab-family-card em{
  display:block;
}
.pro-sire-lab-family-card strong{font-size:11px;color:#062144;}
.pro-sire-lab-family-card span{font-size:10px;color:#2d536f;margin-top:2px;}
.pro-sire-lab-family-card em{font-size:9px;color:#6c8097;font-style:normal;margin-top:2px;}
.pro-sire-lab-family-card.is-paused{
  background:#fff5e6;
  border-color:#efbd72;
}
.pro-sire-lab-family-card.is-focused{
  box-shadow:inset 0 0 0 2px rgba(16,122,177,.22);
}

.pro-sire-bulk-grid{
  display:grid !important;
  grid-template-columns:minmax(210px,.85fr) repeat(3,minmax(210px,1fr)) minmax(160px,.7fr);
  gap:8px;
  align-items:stretch;
}
.pro-sire-bulk-field,
.pro-sire-bulk-rule-card,
#proSireApplyBulkButton{
  border-radius:12px !important;
}
.pro-sire-workspace-control-deck[data-pro-sire-lab="ae"] .pro-sire-bulk-rule-card[data-rule-family]:not([data-rule-family="ae"]),
.pro-sire-workspace-control-deck[data-pro-sire-lab="win"] .pro-sire-bulk-rule-card[data-rule-family]:not([data-rule-family="win"]),
.pro-sire-workspace-control-deck[data-pro-sire-lab="zero"] .pro-sire-bulk-rule-card[data-rule-family]:not([data-rule-family="zero"]){
  opacity:.38;
  filter:grayscale(.25);
}
.pro-sire-workspace-control-deck[data-pro-sire-lab="ae"] .pro-sire-bulk-rule-card[data-rule-family="ae"],
.pro-sire-workspace-control-deck[data-pro-sire-lab="win"] .pro-sire-bulk-rule-card[data-rule-family="win"],
.pro-sire-workspace-control-deck[data-pro-sire-lab="zero"] .pro-sire-bulk-rule-card[data-rule-family="zero"]{
  box-shadow:0 0 0 2px rgba(16,122,177,.22),0 8px 18px rgba(17,62,105,.08);
}

.pro-sire-query-filter-bar{
  display:block;
}
.pro-sire-filter-grid{
  display:grid !important;
  grid-template-columns:minmax(180px,.8fr) minmax(160px,.65fr) minmax(180px,.75fr) minmax(460px,1.8fr) minmax(160px,.65fr) auto;
  gap:8px;
  align-items:stretch;
}
.pro-sire-filter-field,
.pro-sire-filter-grid #proSireQueryFilterCount{
  border-radius:12px !important;
}
.pro-sire-chip-select-list,
.pro-sire-component-filter-groups{
  gap:5px;
}
.pro-sire-filter-token{
  min-height:24px;
  border-radius:999px;
  font-size:9px;
  font-weight:900;
}
.pro-sire-filter-token.is-active{
  background:#107ab1;
  color:#fff;
  border-color:#107ab1;
}
.pro-sire-view-guide-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
.pro-sire-view-guide-grid span{
  padding:10px 12px;
  border-radius:12px;
  background:#fff;
  border:1px solid rgba(117,164,207,.20);
}
.pro-sire-view-guide-grid b,
.pro-sire-view-guide-grid em{display:block;}
.pro-sire-view-guide-grid b{font-size:11px;color:#062144;}
.pro-sire-view-guide-grid em{font-size:10px;color:#5f748a;font-style:normal;margin-top:3px;line-height:1.3;}

#proSireApplyStatus{
  margin:8px 10px 0;
  border-radius:12px;
}
.pro-sire-query-grid-scroll{
  margin:8px 10px 12px;
  border-radius:16px;
  box-shadow:0 10px 24px rgba(17,62,105,.06);
}
.pro-sire-query-grid-table th,
.pro-sire-query-grid-table td{
  vertical-align:middle;
}
.pro-sire-query-cell{
  min-width:300px;
}
.pro-sire-control-cell{
  text-align:center;
}
.pro-sire-threshold-bundle{
  min-width:166px;
}
.pro-sire-family-paused-pill{
  display:none;
}
.pro-sire-threshold-bundle.is-family-paused{
  background:#fff5e6 !important;
  border-color:#efbd72 !important;
  text-align:center;
}
.pro-sire-threshold-bundle.is-family-paused .pro-sire-family-paused-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  min-width:92px;
  padding:5px 12px;
  border-radius:999px;
  background:#fff1d9;
  border:1px solid #efbd72;
  color:#8a4b00;
  font-size:10px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.12em;
}
.pro-sire-threshold-bundle.is-family-paused .pro-sire-row-rule-toggle,
.pro-sire-threshold-bundle.is-family-paused .pro-sire-row-minmax{
  display:none !important;
}
.pro-sire-row-rule-toggle{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:4px;
}
.pro-sire-row-rule-toggle .pro-sire-rule-input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.pro-sire-rule-toggle-button{
  cursor:pointer;
  min-height:24px;
  border-radius:999px;
}
.pro-sire-rule-toggle-button.is-active{
  background:#109ed2 !important;
  color:#fff !important;
}
.pro-sire-row-minmax{
  margin-top:5px;
}

#proSireQueryGridPanel[data-pro-sire-lab="combined"] .pro-sire-col-rule,
#proSireQueryGridPanel[data-pro-sire-lab="combined"] .pro-sire-col-trigger,
#proSireQueryGridPanel[data-pro-sire-lab="combined"] .pro-sire-threshold-head,
#proSireQueryGridPanel[data-pro-sire-lab="combined"] .pro-sire-threshold-bundle,
#proSireQueryGridPanel[data-pro-sire-lab="combined"] .pro-sire-trigger-head,
#proSireQueryGridPanel[data-pro-sire-lab="combined"] .pro-sire-trigger-cell{
  display:none !important;
}
#proSireQueryGridPanel[data-pro-sire-lab="ae"] .pro-sire-col-win,
#proSireQueryGridPanel[data-pro-sire-lab="ae"] .pro-sire-col-zero,
#proSireQueryGridPanel[data-pro-sire-lab="ae"] .pro-sire-col-trigger-win,
#proSireQueryGridPanel[data-pro-sire-lab="ae"] .pro-sire-col-trigger-zero,
#proSireQueryGridPanel[data-pro-sire-lab="ae"] .pro-sire-threshold-head-win,
#proSireQueryGridPanel[data-pro-sire-lab="ae"] .pro-sire-threshold-head-zero,
#proSireQueryGridPanel[data-pro-sire-lab="ae"] .pro-sire-threshold-bundle[data-rule-family="win"],
#proSireQueryGridPanel[data-pro-sire-lab="ae"] .pro-sire-threshold-bundle[data-rule-family="zero"],
#proSireQueryGridPanel[data-pro-sire-lab="ae"] [data-pro-sire-sort="win_rule"],
#proSireQueryGridPanel[data-pro-sire-lab="ae"] [data-pro-sire-sort="zero_rule"],
#proSireQueryGridPanel[data-pro-sire-lab="ae"] .pro-sire-win-trigger-cell,
#proSireQueryGridPanel[data-pro-sire-lab="ae"] .pro-sire-zero-trigger-cell,
#proSireQueryGridPanel[data-pro-sire-lab="win"] .pro-sire-col-ae,
#proSireQueryGridPanel[data-pro-sire-lab="win"] .pro-sire-col-zero,
#proSireQueryGridPanel[data-pro-sire-lab="win"] .pro-sire-col-trigger-ae,
#proSireQueryGridPanel[data-pro-sire-lab="win"] .pro-sire-col-trigger-zero,
#proSireQueryGridPanel[data-pro-sire-lab="win"] .pro-sire-threshold-head-ae,
#proSireQueryGridPanel[data-pro-sire-lab="win"] .pro-sire-threshold-head-zero,
#proSireQueryGridPanel[data-pro-sire-lab="win"] .pro-sire-threshold-bundle[data-rule-family="ae"],
#proSireQueryGridPanel[data-pro-sire-lab="win"] .pro-sire-threshold-bundle[data-rule-family="zero"],
#proSireQueryGridPanel[data-pro-sire-lab="win"] [data-pro-sire-sort="ae_rule"],
#proSireQueryGridPanel[data-pro-sire-lab="win"] [data-pro-sire-sort="zero_rule"],
#proSireQueryGridPanel[data-pro-sire-lab="win"] .pro-sire-ae-trigger-cell,
#proSireQueryGridPanel[data-pro-sire-lab="win"] .pro-sire-zero-trigger-cell,
#proSireQueryGridPanel[data-pro-sire-lab="zero"] .pro-sire-col-ae,
#proSireQueryGridPanel[data-pro-sire-lab="zero"] .pro-sire-col-win,
#proSireQueryGridPanel[data-pro-sire-lab="zero"] .pro-sire-col-trigger-ae,
#proSireQueryGridPanel[data-pro-sire-lab="zero"] .pro-sire-col-trigger-win,
#proSireQueryGridPanel[data-pro-sire-lab="zero"] .pro-sire-threshold-head-ae,
#proSireQueryGridPanel[data-pro-sire-lab="zero"] .pro-sire-threshold-head-win,
#proSireQueryGridPanel[data-pro-sire-lab="zero"] .pro-sire-threshold-bundle[data-rule-family="ae"],
#proSireQueryGridPanel[data-pro-sire-lab="zero"] .pro-sire-threshold-bundle[data-rule-family="win"],
#proSireQueryGridPanel[data-pro-sire-lab="zero"] [data-pro-sire-sort="ae_rule"],
#proSireQueryGridPanel[data-pro-sire-lab="zero"] [data-pro-sire-sort="win_rule"],
#proSireQueryGridPanel[data-pro-sire-lab="zero"] .pro-sire-ae-trigger-cell,
#proSireQueryGridPanel[data-pro-sire-lab="zero"] .pro-sire-win-trigger-cell{
  display:none !important;
}
#proSireQueryGridPanel[data-pro-sire-lab="ae"] .pro-sire-threshold-head-ae,
#proSireQueryGridPanel[data-pro-sire-lab="ae"] .pro-sire-ae-trigger-cell,
#proSireQueryGridPanel[data-pro-sire-lab="win"] .pro-sire-threshold-head-win,
#proSireQueryGridPanel[data-pro-sire-lab="win"] .pro-sire-win-trigger-cell,
#proSireQueryGridPanel[data-pro-sire-lab="zero"] .pro-sire-threshold-head-zero,
#proSireQueryGridPanel[data-pro-sire-lab="zero"] .pro-sire-zero-trigger-cell{
  background:#eef9ff;
}

@media (max-width: 1450px){
  .pro-sire-premium-cockpit{grid-template-columns:repeat(2,minmax(0,1fr));}
  .pro-sire-action-bar{grid-template-columns:1fr;}
  .pro-sire-action-group + .pro-sire-action-group{border-left:0;border-top:1px solid rgba(19,123,181,.12);}
  .pro-sire-workbench-strip{grid-template-columns:1fr;}
  .pro-sire-workbench-status{grid-template-columns:repeat(4,minmax(0,1fr));}
  .pro-sire-bulk-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .pro-sire-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}

/* PRO_SYSTEM_BUILDER_001AE — layout repair and negative-source clarity
   Frontend-only patch over 001AD installed state. Keeps 001Y table foundation and 001AC interaction logic. */
.pro-sire-query-grid-panel.pro-sire-workspace-root.pro-sire-workspace-open{
  display:flex!important;
  flex-direction:column!important;
  gap:8px!important;
  padding:10px 12px 12px!important;
  overflow:hidden!important;
  background:linear-gradient(180deg,#f3fbff 0%,#ffffff 42%,#f7fbff 100%)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-top{
  flex:0 0 auto!important;
  min-height:58px!important;
  padding:9px 12px!important;
  border-radius:15px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-title-block h2{
  font-size:20px!important;
  line-height:1.02!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-title-block p{
  max-width:980px!important;
  font-size:10.5px!important;
  line-height:1.22!important;
}

/* Full-width cockpit: the 001AD wrapper is a single child of overview, so force it to occupy all width. */
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-overview{
  display:block!important;
  flex:0 0 auto!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-overview > .pro-sire-premium-cockpit{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-premium-cockpit .pro-sire-cockpit-card{
  min-width:0!important;
  min-height:116px!important;
  display:grid!important;
  grid-template-rows:auto auto auto!important;
  align-content:start!important;
  gap:6px!important;
  padding:12px 14px!important;
  border-radius:16px!important;
  border:1px solid rgba(191,219,254,.72)!important;
  background:linear-gradient(180deg,#ffffff,#f8fbff)!important;
  box-shadow:0 8px 20px rgba(17,62,105,.045)!important;
  overflow:hidden!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-premium-cockpit .pro-sire-cockpit-card > div,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-premium-cockpit .pro-sire-cockpit-title-row,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-premium-cockpit .pro-sire-cockpit-hero,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-premium-cockpit .pro-sire-cockpit-rail{
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-cockpit-system{
  border-color:rgba(34,197,94,.26)!important;
  background:linear-gradient(180deg,#ffffff,#f0fdf4)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-cockpit-negative{
  border-color:rgba(248,113,113,.28)!important;
  background:linear-gradient(180deg,#ffffff,#fff7f7)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-cockpit-context{
  border-color:rgba(14,165,233,.24)!important;
  background:linear-gradient(180deg,#ffffff,#effaff)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-card-eyebrow{
  margin:0!important;
  color:#0f766e!important;
  font-size:8.5px!important;
  line-height:1!important;
  font-weight:950!important;
  letter-spacing:.13em!important;
  text-transform:uppercase!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-cockpit-title-row{
  display:flex!important;
  align-items:baseline!important;
  justify-content:space-between!important;
  gap:10px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-cockpit-title-row strong{
  margin:0!important;
  color:#0f172a!important;
  font-size:15px!important;
  line-height:1.05!important;
  font-weight:950!important;
  letter-spacing:-.02em!important;
  text-transform:none!important;
  white-space:nowrap!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-cockpit-title-row span{
  color:#64748b!important;
  font-size:9px!important;
  font-weight:950!important;
  text-transform:uppercase!important;
  letter-spacing:.06em!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-cockpit-hero{
  display:flex!important;
  align-items:flex-end!important;
  justify-content:space-between!important;
  gap:10px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-cockpit-hero b{
  color:#0f172a!important;
  font-size:24px!important;
  line-height:1!important;
  font-weight:950!important;
  white-space:nowrap!important;
  overflow:visible!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-cockpit-hero em{
  margin:0!important;
  color:#64748b!important;
  font-size:8.5px!important;
  font-style:normal!important;
  font-weight:950!important;
  text-align:right!important;
  text-transform:uppercase!important;
  letter-spacing:.07em!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-cockpit-rail{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:6px 10px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-cockpit-rail span{
  display:inline-flex!important;
  align-items:baseline!important;
  gap:4px!important;
  min-width:auto!important;
  min-height:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  white-space:nowrap!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-cockpit-rail b{
  display:inline!important;
  color:#0f172a!important;
  font-size:12px!important;
  line-height:1!important;
  font-weight:950!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-cockpit-rail em{
  display:inline!important;
  margin:0!important;
  color:#64748b!important;
  font-size:8.5px!important;
  line-height:1!important;
  font-style:normal!important;
  font-weight:900!important;
  text-transform:uppercase!important;
  letter-spacing:.05em!important;
}

/* The workflow note should inform, not interrupt. */
.pro-sire-workflow-note{
  flex:0 0 auto!important;
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  margin:0!important;
  padding:6px 10px!important;
  min-height:28px!important;
  border-radius:10px!important;
  font-size:10.2px!important;
}
.pro-sire-workflow-note strong{font-size:9.5px!important;white-space:nowrap!important;}
.pro-sire-workflow-note span{line-height:1.25!important;}

/* Command/workbench/control deck: one column, one clear workbench, one panel at a time. */
.pro-sire-workspace-control-deck{
  flex:0 0 auto!important;
gap:7px!important;
  width:100%!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  border:1px solid rgba(191,219,254,.68)!important;
  border-radius:16px!important;
  overflow:hidden!important;
  background:#ffffff!important;
  box-shadow:0 8px 18px rgba(17,62,105,.035)!important;
}
.pro-sire-action-bar{
  display:grid!important;
  grid-template-columns:minmax(0,1.15fr) minmax(360px,.85fr)!important;
  gap:0!important;
  min-height:0!important;
  border-bottom:1px solid rgba(191,219,254,.65)!important;
  background:linear-gradient(180deg,#ffffff,#f8fcff)!important;
}
.pro-sire-action-group{
  min-width:0!important;
  padding:9px 12px!important;
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr)!important;
  gap:10px!important;
  align-items:center!important;
  border:0!important;
  background:transparent!important;
}
.pro-sire-action-group + .pro-sire-action-group{border-left:1px solid rgba(191,219,254,.65)!important;}
.pro-sire-action-label strong{font-size:10px!important;white-space:nowrap!important;}
.pro-sire-action-label span{font-size:9.6px!important;line-height:1.2!important;}
.pro-sire-settings-toolbar,
.pro-sire-settings-actions,
.pro-sire-family-pause-bar{
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.pro-sire-settings-actions,
.pro-sire-family-pause-bar{
  display:flex!important;
  flex-wrap:wrap!important;
  justify-content:flex-end!important;
  gap:6px!important;
}
.pro-sire-settings-actions .btn,
.pro-sire-family-pause-bar .btn{
  min-height:30px!important;
  padding:0 10px!important;
  border-radius:10px!important;
  font-size:10px!important;
  font-weight:950!important;
}
.pro-sire-apply-primary{min-width:154px!important;}
.pro-sire-workbench-strip{
  display:grid!important;
  grid-template-columns:360px minmax(0,1fr)!important;
  gap:8px!important;
  align-items:stretch!important;
  padding:7px 10px!important;
  border-bottom:1px solid rgba(191,219,254,.65)!important;
  background:#f8fcff!important;
}
.pro-sire-lab-mode-strip{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:5px!important;
}
.pro-sire-lab-mode{
  min-height:28px!important;
  padding:0 8px!important;
  font-size:9.7px!important;
  border-radius:999px!important;
}
.pro-sire-workbench-status{
  display:grid!important;
  grid-template-columns:repeat(8,minmax(0,1fr))!important;
  gap:5px!important;
}
.pro-sire-workbench-status span{
  min-width:0!important;
  min-height:28px!important;
  padding:4px 7px!important;
  border-radius:9px!important;
}
.pro-sire-workbench-status b{font-size:10.5px!important;line-height:1.05!important;}
.pro-sire-workbench-status em{font-size:7.5px!important;line-height:1!important;}
.pro-sire-deck-tabs{
  display:flex!important;
  gap:4px!important;
  padding:7px 10px 0!important;
  background:#ffffff!important;
}
.pro-sire-deck-tab{
  min-height:28px!important;
  padding:0 10px!important;
  border-radius:10px 10px 0 0!important;
  font-size:9.5px!important;
}
.pro-sire-deck-panel{
  padding:10px!important;
  background:#e9f8ff!important;
  border-top:1px solid rgba(26,131,189,.16)!important;
}
.pro-sire-deck-copy{
  margin-bottom:8px!important;
}
.pro-sire-deck-copy strong{font-size:10px!important;}
.pro-sire-deck-copy span{font-size:10px!important;line-height:1.25!important;}
.pro-sire-bulk-tuning,
.pro-sire-query-filter-bar{
  width:100%!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.pro-sire-bulk-grid{
  display:grid!important;
  grid-template-columns:minmax(210px,.8fr) repeat(3,minmax(180px,1fr)) minmax(145px,.65fr)!important;
  gap:8px!important;
  align-items:stretch!important;
}
.pro-sire-bulk-scope{
  grid-column:auto!important;
  min-width:0!important;
}
.pro-sire-bulk-rule-card{
  min-width:0!important;
  padding:8px 9px!important;
  border-radius:12px!important;
}
.pro-sire-bulk-minmax{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important;}
.pro-sire-bulk-grid select,
.pro-sire-bulk-grid input{min-height:30px!important;font-size:11px!important;border-radius:8px!important;}
#proSireApplyBulkButton{min-height:30px!important;min-width:140px!important;align-self:stretch!important;}
.pro-sire-filter-grid{
  grid-template-columns:180px 170px 180px minmax(0,1fr) 150px auto!important;
  gap:8px!important;
  align-items:stretch!important;
}
.pro-sire-component-filter-groups{max-height:64px!important;}

/* Table source clarity: Combined view remains calm but does not hide why a query is negative. */
.pro-sire-col-source{width:170px!important;min-width:170px!important;}
.pro-sire-source-head,
.pro-sire-source-cell{
  width:170px!important;
  min-width:170px!important;
  max-width:170px!important;
  text-align:center!important;
}
.pro-sire-source-mix{
  display:flex!important;
  flex-wrap:wrap!important;
  justify-content:center!important;
  gap:4px!important;
}
.pro-sire-source-chip{
  display:inline-grid!important;
  grid-template-columns:auto auto!important;
  align-items:center!important;
  gap:4px!important;
  min-height:23px!important;
  padding:0 7px!important;
  border-radius:999px!important;
  border:1px solid rgba(203,213,225,.85)!important;
  background:#f8fafc!important;
  color:#64748b!important;
}
.pro-sire-source-chip b,
.pro-sire-source-chip em{
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  font-style:normal!important;
  line-height:1!important;
}
.pro-sire-source-chip b{font-size:8.2px!important;font-weight:950!important;text-transform:uppercase!important;letter-spacing:.04em!important;}
.pro-sire-source-chip em{font-size:10px!important;font-weight:950!important;}
.pro-sire-source-chip.is-hit[data-source-family="zero"]{background:#fff7ed!important;border-color:#fed7aa!important;color:#9a3412!important;}
.pro-sire-source-chip.is-hit[data-source-family="win"]{background:#eff6ff!important;border-color:#bfdbfe!important;color:#1d4ed8!important;}
.pro-sire-source-chip.is-hit[data-source-family="ae"]{background:#f0fdf4!important;border-color:#bbf7d0!important;color:#15803d!important;}
#proSireQueryGridPanel[data-pro-sire-lab="ae"] .pro-sire-col-source,
#proSireQueryGridPanel[data-pro-sire-lab="ae"] .pro-sire-source-head,
#proSireQueryGridPanel[data-pro-sire-lab="ae"] .pro-sire-source-cell,
#proSireQueryGridPanel[data-pro-sire-lab="win"] .pro-sire-col-source,
#proSireQueryGridPanel[data-pro-sire-lab="win"] .pro-sire-source-head,
#proSireQueryGridPanel[data-pro-sire-lab="win"] .pro-sire-source-cell,
#proSireQueryGridPanel[data-pro-sire-lab="zero"] .pro-sire-col-source,
#proSireQueryGridPanel[data-pro-sire-lab="zero"] .pro-sire-source-head,
#proSireQueryGridPanel[data-pro-sire-lab="zero"] .pro-sire-source-cell{
  display:none!important;
}
#proSireQueryGridPanel[data-pro-sire-lab="combined"] .pro-sire-col-trigger,
#proSireQueryGridPanel[data-pro-sire-lab="combined"] .pro-sire-trigger-head,
#proSireQueryGridPanel[data-pro-sire-lab="combined"] .pro-sire-trigger-cell{
  display:none!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-scroll{
  flex:1 1 auto!important;
  min-height:280px!important;
  margin:0!important;
  border-radius:14px!important;
  overflow:auto!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table{
  min-width:1320px!important;
  width:max-content!important;
}
#proSireQueryGridPanel[data-pro-sire-lab="combined"] .pro-sire-query-grid-table{
  min-width:1050px!important;
  width:100%!important;
}

@media(max-width:1500px){
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-overview > .pro-sire-premium-cockpit{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .pro-sire-action-bar{grid-template-columns:1fr!important;}
  .pro-sire-action-group + .pro-sire-action-group{border-left:0!important;border-top:1px solid rgba(191,219,254,.65)!important;}
  .pro-sire-workbench-strip{grid-template-columns:1fr!important;}
  .pro-sire-workbench-status{grid-template-columns:repeat(4,minmax(0,1fr))!important;}
  .pro-sire-bulk-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .pro-sire-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:900px){
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-overview > .pro-sire-premium-cockpit{grid-template-columns:1fr!important;}
  .pro-sire-workbench-status{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .pro-sire-bulk-grid,.pro-sire-filter-grid{grid-template-columns:1fr!important;}
}

/* PRO_SYSTEM_BUILDER_001AF — rule-source integrity, workbench stabilisation and density repair */
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-control-deck{
  display:block!important;
  width:100%!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  border:1px solid rgba(191,219,254,.72)!important;
  border-radius:14px!important;
  overflow:hidden!important;
  background:#ffffff!important;
  box-shadow:0 6px 18px rgba(15,23,42,.035)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-action-bar{
  display:grid!important;
  grid-template-columns:minmax(420px,1fr) minmax(380px,.82fr)!important;
  gap:0!important;
  width:100%!important;
  border-bottom:1px solid rgba(191,219,254,.7)!important;
  background:linear-gradient(180deg,#ffffff,#f8fcff)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-action-group{
  display:grid!important;
  grid-template-columns:minmax(210px,.7fr) minmax(260px,1fr)!important;
  align-items:center!important;
  gap:10px!important;
  min-height:64px!important;
  padding:8px 12px!important;
  border:0!important;
  background:transparent!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-action-group + .pro-sire-action-group{
  border-left:1px solid rgba(191,219,254,.7)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-action-label{
  display:grid!important;
  gap:4px!important;
  min-width:0!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-action-label strong{
  font-size:10px!important;
  letter-spacing:.12em!important;
  text-transform:uppercase!important;
  color:#0f172a!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-action-label span{
  display:block!important;
  min-height:0!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  font-size:10.5px!important;
  line-height:1.25!important;
  color:#2563eb!important;
  font-weight:850!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-settings-toolbar{
  display:block!important;
  width:100%!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  background:transparent!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-settings-actions{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(95px,1fr)) minmax(150px,1.25fr)!important;
  gap:6px!important;
  width:100%!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-settings-actions .btn,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-family-pause-bar .btn{
  min-height:30px!important;
  width:100%!important;
  padding:0 9px!important;
  border-radius:9px!important;
  font-size:9.8px!important;
  line-height:1.05!important;
  font-weight:950!important;
  justify-content:center!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-apply-primary{
  min-width:0!important;
  background:linear-gradient(135deg,#0ea5e9,#2563eb)!important;
  color:#fff!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-family-pause-bar{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:6px!important;
  width:100%!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-family-pause-bar .btn.is-paused{
  background:linear-gradient(135deg,#fff7ed,#ffedd5)!important;
  border-color:#fdba74!important;
  color:#9a3412!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workbench-strip{
  display:grid!important;
  grid-template-columns:minmax(330px,.7fr) minmax(0,1.3fr)!important;
  align-items:center!important;
  gap:8px!important;
  width:100%!important;
  padding:7px 10px!important;
  border-bottom:1px solid rgba(191,219,254,.7)!important;
  background:#f8fcff!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-lab-mode-strip{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:5px!important;
  width:100%!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-lab-mode{
  min-height:28px!important;
  padding:0 8px!important;
  border-radius:999px!important;
  font-size:9.7px!important;
  font-weight:950!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workbench-status{
  display:grid!important;
  grid-template-columns:repeat(8,minmax(0,1fr))!important;
  gap:5px!important;
  width:100%!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workbench-status span{
  min-height:28px!important;
  padding:4px 7px!important;
  border:1px solid rgba(203,213,225,.74)!important;
  border-radius:9px!important;
  background:#fff!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workbench-status b{
  font-size:10.3px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workbench-status em{
  font-size:7.4px!important;
  white-space:nowrap!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-deck-tabs{
  display:flex!important;
  gap:4px!important;
  width:100%!important;
  padding:7px 10px 0!important;
  border-bottom:1px solid rgba(186,230,253,.5)!important;
  background:#ffffff!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-deck-tab{
  min-height:28px!important;
  padding:0 10px!important;
  border-radius:9px 9px 0 0!important;
  font-size:9.4px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-deck-panel{
  display:block!important;
  width:100%!important;
  padding:8px 10px!important;
  margin:0!important;
  border:0!important;
  border-top:0!important;
  background:#eefaff!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-deck-panel:not(.is-active){
  display:none!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-deck-copy{
  display:flex!important;
  justify-content:space-between!important;
  align-items:center!important;
  gap:12px!important;
  margin:0 0 7px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-deck-copy strong{
  font-size:10px!important;
  letter-spacing:.11em!important;
  text-transform:uppercase!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-deck-copy span{
  max-width:760px!important;
  text-align:right!important;
  font-size:9.7px!important;
  line-height:1.2!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-bulk-tuning,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-filter-bar{
  display:block!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-bulk-grid{
  display:grid!important;
  grid-template-columns:minmax(190px,.8fr) repeat(3,minmax(170px,1fr)) minmax(130px,.55fr)!important;
  align-items:stretch!important;
  gap:7px!important;
  width:100%!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-bulk-field.pro-sire-bulk-scope,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-bulk-rule-card{
  min-height:50px!important;
  padding:7px 8px!important;
  border-radius:10px!important;
  border:1px solid rgba(186,230,253,.78)!important;
  background:#ffffff!important;
  display:grid!important;
  align-content:center!important;
  gap:5px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-bulk-rule-card .pro-sire-rule-switch{
  min-height:16px!important;
  font-size:9.4px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-bulk-minmax{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:5px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-bulk-minmax label{
  display:grid!important;
  grid-template-columns:26px minmax(58px,1fr)!important;
  gap:4px!important;
  align-items:center!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-bulk-grid select,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-bulk-grid input{
  height:28px!important;
  min-height:28px!important;
  padding:4px 7px!important;
  border-radius:8px!important;
  font-size:11.5px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open #proSireApplyBulkButton{
  min-height:50px!important;
  width:100%!important;
  align-self:stretch!important;
  justify-self:stretch!important;
  border-radius:10px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-filter-grid{
  display:grid!important;
  grid-template-columns:180px 160px 170px minmax(300px,1fr) 145px auto!important;
  gap:7px!important;
  width:100%!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-source-chip{
  min-height:24px!important;
  grid-template-columns:auto auto!important;
  gap:5px!important;
  padding:0 7px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-source-chip em{
  display:flex!important;
  align-items:center!important;
  gap:3px!important;
  font-size:9.7px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-source-chip em span,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-source-chip em small{
  display:inline!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  font-size:9.7px!important;
  font-weight:950!important;
  line-height:1!important;
  color:inherit!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-source-chip em small{opacity:.72!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-source-head,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-source-cell,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-col-source{
  width:210px!important;
  min-width:210px!important;
  max-width:210px!important;
}
#proSireQueryGridPanel[data-pro-sire-lab="combined"] .pro-sire-query-grid-table{
  min-width:1160px!important;
}
@media(max-width:1500px){
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-action-bar{grid-template-columns:1fr!important;}
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-action-group + .pro-sire-action-group{border-left:0!important;border-top:1px solid rgba(191,219,254,.7)!important;}
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workbench-strip{grid-template-columns:1fr!important;}
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workbench-status{grid-template-columns:repeat(4,minmax(0,1fr))!important;}
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-bulk-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:900px){
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-action-group{grid-template-columns:1fr!important;}
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-settings-actions{grid-template-columns:1fr!important;}
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-family-pause-bar{grid-template-columns:1fr!important;}
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workbench-status{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-bulk-grid,
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-filter-grid{grid-template-columns:1fr!important;}
}

/* PRO_SYSTEM_BUILDER_001AG — query-grid control restoration, source-damage columns and dense sticky table */
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-scroll{
  overflow:auto!important;
  max-height:none!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table{
  table-layout:fixed!important;
  width:max-content!important;
  min-width:1680px!important;
  border-collapse:separate!important;
  border-spacing:0!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-col-query{width:390px!important;min-width:390px!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-col-rule{width:142px!important;min-width:142px!important;display:table-column!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-col-source-damage{width:92px!important;min-width:92px!important;display:table-column!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-col-metric{width:104px!important;min-width:104px!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-col-money{width:118px!important;min-width:118px!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table thead th{
  position:sticky!important;
  top:0!important;
  z-index:40!important;
  height:38px!important;
  padding:6px 8px!important;
  background:linear-gradient(180deg,#f7fbff,#eaf6ff)!important;
  border-bottom:1px solid rgba(147,197,253,.8)!important;
  box-shadow:0 1px 0 rgba(147,197,253,.45)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table thead th:first-child{
  z-index:60!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table tbody th,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table tbody td{
  height:54px!important;
  min-height:54px!important;
  padding:5px 8px!important;
  vertical-align:middle!important;
  font-size:11px!important;
  line-height:1.12!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-cell{
  width:390px!important;
  min-width:390px!important;
  max-width:390px!important;
  padding-left:10px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-main{
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  margin-bottom:3px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-active-switch{
  display:inline-flex!important;
  align-items:center!important;
  gap:4px!important;
  min-height:21px!important;
  padding:0 7px!important;
  border:1px solid rgba(147,197,253,.85)!important;
  border-radius:999px!important;
  background:#f8fbff!important;
  color:#1e3a8a!important;
  font-size:8.7px!important;
  font-weight:950!important;
  letter-spacing:.04em!important;
  text-transform:uppercase!important;
  cursor:pointer!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-active-switch input{
  width:13px!important;
  height:13px!important;
  margin:0!important;
  accent-color:#0ea5e9!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-active-switch:has(input:checked){
  background:linear-gradient(135deg,#e0f2fe,#dbeafe)!important;
  border-color:#38bdf8!important;
  color:#075985!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-inspect-chip{
  min-height:22px!important;
  padding:0 9px!important;
  font-size:10px!important;
  line-height:1!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-brief{
  display:-webkit-box!important;
  -webkit-line-clamp:2!important;
  -webkit-box-orient:vertical!important;
  overflow:hidden!important;
  max-height:27px!important;
  font-size:10.6px!important;
  line-height:1.22!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-threshold-head,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-threshold-bundle{
  display:table-cell!important;
  width:142px!important;
  min-width:142px!important;
  max-width:142px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-rule-line{
  display:grid!important;
  grid-template-rows:auto auto!important;
  gap:4px!important;
  justify-items:center!important;
  align-items:center!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-row-rule-toggle{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  width:100%!important;
  max-width:116px!important;
  height:22px!important;
  border-radius:999px!important;
  overflow:hidden!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-rule-toggle-button{
  min-height:22px!important;
  padding:0 6px!important;
  font-size:8.8px!important;
  line-height:1!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-row-minmax{
  display:grid!important;
  grid-template-columns:minmax(42px,1fr) 12px minmax(42px,1fr)!important;
  align-items:center!important;
  gap:3px!important;
  width:100%!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-row-minmax span{
  font-size:10px!important;
  color:#64748b!important;
  text-align:center!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-threshold-input{
  height:24px!important;
  min-height:24px!important;
  width:100%!important;
  min-width:0!important;
  padding:2px 5px!important;
  border-radius:7px!important;
  font-size:10.4px!important;
  text-align:center!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-source-damage-head,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-source-damage-cell{
  display:table-cell!important;
  width:92px!important;
  min-width:92px!important;
  max-width:92px!important;
  text-align:center!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-source-damage-cell b,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-source-damage-cell span{
  display:block!important;
  margin:0!important;
  line-height:1.05!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-source-damage-cell b{
  font-size:11px!important;
  font-weight:950!important;
  color:#0f172a!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-source-damage-cell span{
  margin-top:3px!important;
  font-size:10px!important;
  font-weight:850!important;
  color:#64748b!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-source-damage-cell[data-source-family="zero"]{background:#fffaf2!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-source-damage-cell[data-source-family="win"]{background:#f5fbff!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-source-damage-cell[data-source-family="ae"]{background:#f4fff8!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-performance-cell{
  font-size:11px!important;
  font-weight:900!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-family-paused-pill{
  height:28px!important;
  align-content:center!important;
  font-size:9px!important;
}
#proSireQueryGridPanel[data-pro-sire-lab="combined"] .pro-sire-col-rule,
#proSireQueryGridPanel[data-pro-sire-lab="combined"] .pro-sire-col-win,
#proSireQueryGridPanel[data-pro-sire-lab="combined"] .pro-sire-col-zero,
#proSireQueryGridPanel[data-pro-sire-lab="combined"] .pro-sire-col-ae{
  display:table-column!important;
}
#proSireQueryGridPanel[data-pro-sire-lab="combined"] .pro-sire-threshold-head,
#proSireQueryGridPanel[data-pro-sire-lab="combined"] .pro-sire-threshold-bundle{
  display:table-cell!important;
}
#proSireQueryGridPanel[data-pro-sire-lab="combined"] .pro-sire-query-grid-table{
  min-width:1680px!important;
  width:max-content!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-col-selected,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-selected-head,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-cell,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-col-source,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-source-head,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-source-cell,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-col-trigger,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-trigger-head,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-trigger-cell{
  display:none!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-bulk-rule-card .pro-sire-rule-switch span::before{
  content:"";
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-bulk-rule-card .pro-sire-rule-switch{
  color:#1e3a8a!important;
}
@media(max-width:1500px){
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table,
  #proSireQueryGridPanel[data-pro-sire-lab="combined"] .pro-sire-query-grid-table{min-width:1600px!important;}
}


/* PRO_SYSTEM_BUILDER_001AH — workspace refinement, wider query grid and clearer source damage */
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-action-bar{
  display:grid!important;
  grid-template-columns:minmax(0,1.1fr) minmax(420px,.9fr)!important;
  gap:10px!important;
  align-items:stretch!important;
  margin-bottom:6px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-action-group{
  min-height:82px!important;
  padding:10px 12px!important;
  border-radius:14px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-action-group-primary{
  display:grid!important;
  grid-template-columns:minmax(280px,.9fr) minmax(430px,1.1fr)!important;
  gap:12px!important;
  align-items:center!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-action-label{
  min-height:0!important;
  padding:0!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-action-label strong{
  font-size:10px!important;
  letter-spacing:.12em!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-action-label span{
  font-size:11.5px!important;
  line-height:1.25!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-settings-actions{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px!important;
  max-width:540px!important;
  margin-left:auto!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-settings-actions .btn,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-family-pause-bar .btn{
  min-height:31px!important;
  border-radius:10px!important;
  font-size:10.2px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-family-pause-bar{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(110px,1fr))!important;
  gap:8px!important;
  align-items:center!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workbench-strip{
  display:grid!important;
  grid-template-columns:minmax(430px,.8fr) minmax(0,1.2fr)!important;
  gap:10px!important;
  align-items:center!important;
  margin:0 0 8px!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-lab-mode-strip{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:8px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-lab-mode{
  min-height:32px!important;
  border-radius:999px!important;
  font-size:10.5px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workbench-status{
  display:grid!important;
  grid-template-columns:1.35fr repeat(6,minmax(72px,1fr)) 1.35fr!important;
  gap:7px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workbench-status span{
  min-height:30px!important;
  padding:5px 8px!important;
  border-radius:9px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workbench-status b{font-size:10.8px!important;line-height:1!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workbench-status em{font-size:7.8px!important;letter-spacing:.09em!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-deck-tabs{
  margin-top:4px!important;
  gap:6px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-deck-tab{
  min-height:30px!important;
  padding:0 13px!important;
  font-size:10px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-premium-cockpit .pro-sire-cockpit-card{
  min-height:126px!important;
  padding:14px 16px 13px!important;
  border-radius:15px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-cockpit-hero em{
  opacity:.82!important;
  letter-spacing:.06em!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-cockpit-rail span{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  padding:0!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-bulk-grid{
  display:grid!important;
  grid-template-columns:minmax(220px,.75fr) repeat(3,minmax(260px,1fr)) minmax(170px,.55fr)!important;
  gap:10px!important;
  align-items:stretch!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-bulk-rule-card{
  min-height:58px!important;
  padding:9px 11px!important;
  border-radius:12px!important;
}

/* 001AH table sizing: fill the workspace, widen query/rule controls and keep the source damage readable. */
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-scroll{
  width:100%!important;
  overflow:auto!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table,
#proSireQueryGridPanel[data-pro-sire-lab="combined"] .pro-sire-query-grid-table{
  width:100%!important;
  min-width:2200px!important;
  max-width:none!important;
  table-layout:fixed!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-col-query{width:27%!important;min-width:520px!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-col-rule{width:10%!important;min-width:176px!important;display:table-column!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-col-source-damage{width:6.4%!important;min-width:112px!important;display:table-column!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-col-metric{width:5.3%!important;min-width:96px!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-col-money{width:5.1%!important;min-width:112px!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table th:nth-child(1),
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table td:nth-child(1){
  width:27%!important;
  min-width:520px!important;
  max-width:none!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table th:nth-child(2),
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table td:nth-child(2),
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table th:nth-child(3),
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table td:nth-child(3),
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table th:nth-child(4),
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table td:nth-child(4){
  width:10%!important;
  min-width:176px!important;
  max-width:none!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-cell{
  width:auto!important;
  min-width:520px!important;
  max-width:none!important;
  padding-left:12px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-main{
  gap:8px!important;
  margin-bottom:4px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-brief{
  max-width:470px!important;
  font-size:10.9px!important;
  line-height:1.22!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-active-switch{
  position:relative!important;
  min-width:74px!important;
  height:24px!important;
  padding:0!important;
  justify-content:center!important;
  overflow:hidden!important;
  border-radius:999px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-active-switch input{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  opacity:0!important;
  cursor:pointer!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-active-state{
  display:none!important;
  font-size:9.2px!important;
  font-weight:950!important;
  letter-spacing:.06em!important;
  text-transform:uppercase!important;
  line-height:1!important;
  pointer-events:none!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-active-switch .pro-sire-active-state-off{display:inline!important;color:#64748b!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-active-switch:has(input:checked) .pro-sire-active-state-off{display:none!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-active-switch:has(input:checked) .pro-sire-active-state-on{display:inline!important;color:#075985!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-active-switch:not(:has(input:checked)){
  background:#f8fafc!important;
  border-color:rgba(148,163,184,.55)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-active-switch:has(input:checked){
  background:linear-gradient(135deg,#e0f2fe,#dbeafe)!important;
  border-color:#38bdf8!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-threshold-head,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-threshold-bundle{
  width:auto!important;
  min-width:176px!important;
  max-width:none!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-rule-line{
  min-height:46px!important;
  justify-content:center!important;
  justify-items:center!important;
  gap:4px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-row-rule-toggle{
  max-width:134px!important;
  height:24px!important;
  margin:0 auto!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-rule-toggle-button{
  min-height:24px!important;
  font-size:9.2px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-row-minmax{
  grid-template-columns:minmax(52px,1fr) 14px minmax(52px,1fr)!important;
  max-width:150px!important;
  margin:0 auto!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-threshold-input{
  height:25px!important;
  font-size:10.8px!important;
  border-radius:8px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-source-damage-head,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-source-damage-cell{
  width:auto!important;
  min-width:112px!important;
  max-width:none!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-source-damage-cell b{
  font-size:10.8px!important;
  white-space:nowrap!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-source-damage-cell span{
  font-size:10.4px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table tbody th,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table tbody td{
  height:58px!important;
  min-height:58px!important;
  padding:5px 8px!important;
}
@media(max-width:1500px){
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-action-bar{grid-template-columns:1fr!important;}
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-action-group-primary{grid-template-columns:1fr!important;}
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workbench-strip{grid-template-columns:1fr!important;}
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workbench-status{grid-template-columns:repeat(4,minmax(0,1fr))!important;}
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-bulk-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}

/* PRO_SYSTEM_BUILDER_001AI — table density, pause-state stabilisation and workbench visual refinement */
:root{
  --pro-sire-win:#0ea5e9;
  --pro-sire-zero:#f59e0b;
  --pro-sire-ae:#22c55e;
  --pro-sire-danger:#fca5a5;
  --pro-sire-success:#86efac;
  --pro-sire-partial:#facc15;
}

/* Middle command centre refinement */
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-action-bar{
  grid-template-columns:minmax(0,1fr) minmax(480px,.85fr)!important;
  gap:12px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-action-group{
  min-height:66px!important;
  padding:9px 12px!important;
  background:linear-gradient(180deg,#ffffff,#f8fbff)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-action-group-primary{
  grid-template-columns:minmax(260px,.75fr) minmax(420px,1.25fr)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-settings-actions{
  grid-template-columns:repeat(2,minmax(160px,1fr))!important;
  gap:6px!important;
  max-width:620px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-settings-actions .btn,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-family-pause-bar .btn{
  min-height:29px!important;
  font-size:10px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workbench-strip{
  grid-template-columns:minmax(500px,.95fr) minmax(0,1.05fr)!important;
  gap:12px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-lab-mode-strip{
  padding:6px!important;
  border:1px solid rgba(147,197,253,.55)!important;
  border-radius:15px!important;
  background:#fff!important;
  box-shadow:0 6px 16px rgba(15,23,42,.04)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workbench-status{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  padding:6px!important;
  border:1px solid rgba(147,197,253,.42)!important;
  border-radius:15px!important;
  background:#fff!important;
  box-shadow:0 6px 16px rgba(15,23,42,.035)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workbench-status span{
  min-height:29px!important;
  padding:4px 7px!important;
  background:#f8fbff!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workbench-status b{font-size:10.5px!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workbench-status em{font-size:7.5px!important;}

/* Query filters: rounder cards and clearer reset/count area */
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-filter-grid{
  grid-template-columns:minmax(185px,.85fr) minmax(175px,.75fr) minmax(180px,.75fr) minmax(520px,2fr) minmax(165px,.7fr) minmax(160px,.7fr)!important;
  gap:10px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-filter-field,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-filter-grid #proSireQueryFilterCount{
  border-radius:18px!important;
  background:linear-gradient(180deg,#ffffff,#f7fbff)!important;
  border:1px solid rgba(147,197,253,.55)!important;
  box-shadow:0 8px 16px rgba(15,23,42,.035)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-filter-label-row button,
.pro-sire-query-grid-panel.pro-sire-workspace-open #proSireQueryComponentClear{
  min-height:26px!important;
  padding:0 12px!important;
  border-radius:999px!important;
  background:#fff7ed!important;
  border:1px solid #fdba74!important;
  color:#9a3412!important;
  font-weight:950!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open #proSireQueryFilterCount{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  color:#2563eb!important;
  font-size:10px!important;
  font-weight:950!important;
}

/* Bulk edit: chip scope instead of FileMaker-style select */
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-bulk-grid{
  grid-template-columns:minmax(340px,1.05fr) repeat(3,minmax(240px,1fr)) minmax(165px,.55fr)!important;
  gap:10px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-bulk-scope{
  display:grid!important;
  grid-template-rows:auto 1fr!important;
  gap:7px!important;
}
.pro-sire-bulk-scope-chips{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:6px!important;
}
.pro-sire-bulk-scope-chip{
  min-height:32px!important;
  border-radius:999px!important;
  border:1px solid rgba(147,197,253,.75)!important;
  background:#fff!important;
  color:#075985!important;
  font-size:9.5px!important;
  font-weight:950!important;
  cursor:pointer!important;
}
.pro-sire-bulk-scope-chip.is-active{
  background:linear-gradient(135deg,#0ea5e9,#2563eb)!important;
  color:#fff!important;
  border-color:transparent!important;
  box-shadow:0 8px 14px rgba(37,99,235,.18)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-bulk-rule-card[data-rule-family="win"]{border-color:rgba(14,165,233,.35)!important;background:#f5fbff!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-bulk-rule-card[data-rule-family="zero"]{border-color:rgba(245,158,11,.35)!important;background:#fffaf2!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-bulk-rule-card[data-rule-family="ae"]{border-color:rgba(34,197,94,.35)!important;background:#f4fff8!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-bulk-minmax input,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-threshold-input{
  text-align:center!important;
}

/* Table density and cleaner query cell */
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-scroll{
  border-radius:16px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table,
#proSireQueryGridPanel[data-pro-sire-lab="combined"] .pro-sire-query-grid-table{
  min-width:2160px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-col-query{width:31%!important;min-width:660px!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-col-rule{width:9.4%!important;min-width:168px!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-col-source-damage{width:5.6%!important;min-width:102px!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-col-metric{width:4.8%!important;min-width:90px!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-col-money{width:5.3%!important;min-width:110px!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table th:nth-child(1),
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table td:nth-child(1){
  width:31%!important;min-width:660px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-cell{
  min-width:660px!important;
  padding:4px 10px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-main-inline{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  margin:0!important;
  min-width:0!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-active-switch{
  flex:0 0 auto!important;
  min-width:auto!important;
  width:auto!important;
  height:auto!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  overflow:visible!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-active-switch input{
  position:absolute!important;
  opacity:0!important;
  width:1px!important;
  height:1px!important;
}
.pro-sire-query-active-chip{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:86px!important;
  height:28px!important;
  padding:0 14px!important;
  border-radius:999px!important;
  border:1px solid rgba(148,163,184,.45)!important;
  color:#475569!important;
  background:#f8fafc!important;
  font-size:11px!important;
  font-weight:950!important;
  letter-spacing:.02em!important;
  white-space:nowrap!important;
  cursor:pointer!important;
}
.pro-sire-query-active-chip.is-query-active{
  background:#dcfce7!important;
  border-color:#86efac!important;
  color:#166534!important;
}
.pro-sire-query-active-chip.is-query-partial{
  background:#fef3c7!important;
  border-color:#facc15!important;
  color:#92400e!important;
}
.pro-sire-query-active-chip.is-query-off{
  background:#fee2e2!important;
  border-color:#fca5a5!important;
  color:#991b1b!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-help{
  flex:0 0 auto!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-brief{
  flex:1 1 auto!important;
  max-width:none!important;
  display:block!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:12px!important;
  line-height:1.15!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table tbody th,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table tbody td{
  height:48px!important;
  min-height:48px!important;
  padding:4px 7px!important;
  font-size:12px!important;
}

/* Rule family colours and compact pause watermark */
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-threshold-head-win,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-threshold-bundle[data-rule-family="win"]{background:#f5fbff!important;border-left:1px solid rgba(14,165,233,.18)!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-threshold-head-zero,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-threshold-bundle[data-rule-family="zero"]{background:#fffaf2!important;border-left:1px solid rgba(245,158,11,.18)!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-threshold-head-ae,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-threshold-bundle[data-rule-family="ae"]{background:#f4fff8!important;border-left:1px solid rgba(34,197,94,.18)!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-threshold-bundle{
  position:relative!important;
  min-width:168px!important;
  padding-top:4px!important;
  padding-bottom:4px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-rule-line{
  min-height:38px!important;
  gap:3px!important;
  opacity:1!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-row-rule-toggle{
  height:20px!important;
  max-width:118px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-rule-toggle-button{
  min-height:20px!important;
  font-size:8.8px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-row-minmax{
  grid-template-columns:minmax(48px,1fr) 12px minmax(48px,1fr)!important;
  max-width:136px!important;
  margin-top:3px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-threshold-input{
  height:22px!important;
  min-height:22px!important;
  font-size:10.8px!important;
  padding:1px 4px!important;
}
.pro-sire-family-paused-watermark{display:none!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-threshold-bundle.is-family-paused{
  background-image:linear-gradient(135deg,rgba(251,146,60,.10),rgba(255,255,255,.58))!important;
  border-color:rgba(251,146,60,.35)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-threshold-bundle.is-family-paused .pro-sire-family-paused-watermark{
  display:flex!important;
  position:absolute!important;
  inset:4px 7px!important;
  align-items:center!important;
  justify-content:center!important;
  color:rgba(154,52,18,.22)!important;
  font-size:24px!important;
  font-weight:950!important;
  text-transform:uppercase!important;
  letter-spacing:.16em!important;
  pointer-events:none!important;
  z-index:1!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-threshold-bundle.is-family-paused .pro-sire-rule-line{
  opacity:.72!important;
  filter:saturate(.72)!important;
  position:relative!important;
  z-index:2!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-threshold-bundle.is-family-paused .pro-sire-row-rule-toggle,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-threshold-bundle.is-family-paused .pro-sire-row-minmax{
  display:grid!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-threshold-bundle.is-family-paused .pro-sire-threshold-input{
  background:rgba(255,255,255,.82)!important;
  color:#475569!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-threshold-bundle.is-rule-off .pro-sire-row-minmax{
  opacity:.55!important;
}

/* Compact headers: prevent help/sort icons wrapping onto second line */
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table thead th{
  white-space:nowrap!important;
  font-size:10px!important;
  font-weight:850!important;
  height:34px!important;
  padding:5px 7px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table thead th .info-dot,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-table-help{
  display:inline-flex!important;
  vertical-align:middle!important;
  margin-left:3px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-performance-head[data-pro-sire-sort="neg_runners"],
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-performance-head[data-pro-sire-sort="neg_wins"]{
  font-weight:750!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-performance-head[data-pro-sire-sort="win_pct"],
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-performance-head[data-pro-sire-sort="ae"],
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-performance-head[data-pro-sire-sort="lay_pl"]{
  font-weight:950!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-money.positive{color:#047857!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-money.negative{color:#b91c1c!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-money.neutral{color:#64748b!important;}

@media(max-width:1500px){
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-action-bar,
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-action-group-primary,
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workbench-strip{grid-template-columns:1fr!important;}
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table,
  #proSireQueryGridPanel[data-pro-sire-lab="combined"] .pro-sire-query-grid-table{min-width:1900px!important;}
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-col-query,
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table th:nth-child(1),
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table td:nth-child(1),
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-cell{min-width:560px!important;}
}

/* PRO_SYSTEM_BUILDER_001AJ — command centre / control deck split and bulk-control stabilisation */
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-control-deck.pro-sire-command-deck-v2{
  display:block!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:visible!important;
}
.pro-sire-workbench-layout-v2{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:12px!important;
  align-items:stretch!important;
  width:100%!important;
  padding:8px 10px!important;
  background:#f8fcff!important;
  border-top:1px solid rgba(191,219,254,.68)!important;
  border-bottom:1px solid rgba(191,219,254,.68)!important;
}
.pro-sire-command-centre-v2,
.pro-sire-control-deck-card-v2{
  min-width:0!important;
  border:1px solid rgba(147,197,253,.58)!important;
  border-radius:18px!important;
  background:linear-gradient(180deg,#ffffff,#f8fbff)!important;
  box-shadow:0 8px 18px rgba(15,23,42,.04)!important;
  overflow:hidden!important;
}
.pro-sire-command-centre-v2{
  display:grid!important;
  grid-template-rows:auto auto auto auto auto!important;
  gap:7px!important;
  padding:9px!important;
}
.pro-sire-command-status-v2{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  min-height:34px!important;
  padding:7px 11px!important;
  border-radius:13px!important;
  background:linear-gradient(135deg,#eef6ff,#ffffff)!important;
  border:1px solid rgba(147,197,253,.52)!important;
}
.pro-sire-command-status-v2 strong,
.pro-sire-family-row-v2 .pro-sire-action-label strong{
  font-size:10px!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
  color:#0f4c81!important;
  white-space:nowrap!important;
}
.pro-sire-command-status-v2 span,
.pro-sire-family-row-v2 .pro-sire-action-label span{
  font-size:10.5px!important;
  font-weight:850!important;
  color:#1d4ed8!important;
  line-height:1.15!important;
}
.pro-sire-command-centre-v2 .pro-sire-settings-toolbar{
  display:block!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.pro-sire-command-row-v2,
.pro-sire-command-centre-v2 .pro-sire-settings-actions,
.pro-sire-command-centre-v2 .pro-sire-lab-mode-strip{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:8px!important;
  align-items:stretch!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.pro-sire-command-centre-v2 .pro-sire-settings-actions .btn,
.pro-sire-command-centre-v2 .pro-sire-lab-mode,
.pro-sire-command-centre-v2 .pro-sire-family-pause-bar .btn{
  width:100%!important;
  min-width:0!important;
  min-height:38px!important;
  padding:0 10px!important;
  border-radius:999px!important;
  font-size:11px!important;
  font-weight:950!important;
  text-align:center!important;
  white-space:nowrap!important;
}
.pro-sire-command-centre-v2 .pro-sire-apply-primary{
  min-width:0!important;
  box-shadow:0 8px 14px rgba(37,99,235,.18)!important;
}
.pro-sire-family-row-v2{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:8px!important;
  align-items:stretch!important;
}
.pro-sire-family-row-v2 .pro-sire-action-label{
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  gap:2px!important;
  min-height:38px!important;
  padding:6px 10px!important;
  border-radius:13px!important;
  background:#ffffff!important;
  border:1px solid rgba(191,219,254,.70)!important;
}
.pro-sire-family-row-v2 .pro-sire-family-pause-bar{
  grid-column:2 / 5!important;
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.pro-sire-command-status-grid-v2{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:7px!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.pro-sire-command-status-grid-v2 span{
  min-height:34px!important;
  padding:5px 8px!important;
  border-radius:12px!important;
  background:#fff!important;
  border:1px solid rgba(191,219,254,.72)!important;
  box-shadow:none!important;
}
.pro-sire-command-status-grid-v2 b{
  font-size:10.8px!important;
  line-height:1.05!important;
  color:#0f172a!important;
}
.pro-sire-command-status-grid-v2 em{
  margin-top:2px!important;
  font-size:7.8px!important;
  line-height:1!important;
  letter-spacing:.08em!important;
  color:#64748b!important;
}
.pro-sire-control-deck-card-v2{
  display:flex!important;
  flex-direction:column!important;
  min-height:100%!important;
  padding:0!important;
}
.pro-sire-control-deck-card-v2 .pro-sire-deck-tabs{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:7px!important;
  padding:9px 10px 0!important;
  background:linear-gradient(180deg,#ffffff,#f8fcff)!important;
}
.pro-sire-control-deck-card-v2 .pro-sire-deck-tab{
  min-height:36px!important;
  border-radius:13px 13px 0 0!important;
  padding:0 10px!important;
  font-size:10.5px!important;
  font-weight:950!important;
  text-align:center!important;
}
.pro-sire-control-deck-card-v2 .pro-sire-deck-panel{
  flex:1 1 auto!important;
  min-height:0!important;
  padding:10px!important;
  border-top:1px solid rgba(147,197,253,.38)!important;
  background:#eaf8ff!important;
}
.pro-sire-control-deck-card-v2 .pro-sire-deck-copy{
  margin:0 0 8px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
}
.pro-sire-control-deck-card-v2 .pro-sire-deck-copy strong{
  font-size:10.5px!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
  color:#0f4c81!important;
}
.pro-sire-control-deck-card-v2 .pro-sire-deck-copy span{
  font-size:9.6px!important;
  color:#475569!important;
  text-align:right!important;
  max-width:560px!important;
}
.pro-sire-control-deck-card-v2 .pro-sire-bulk-grid{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:8px!important;
  align-items:stretch!important;
}
.pro-sire-control-deck-card-v2 .pro-sire-bulk-field.pro-sire-bulk-scope{
  grid-column:1 / -1!important;
}
.pro-sire-control-deck-card-v2 .pro-sire-bulk-rule-card{
  min-height:80px!important;
  padding:9px 10px!important;
  border-radius:15px!important;
}
.pro-sire-control-deck-card-v2 #proSireApplyBulkButton{
  grid-column:1 / -1!important;
  min-height:36px!important;
  width:100%!important;
  align-self:stretch!important;
  border-radius:999px!important;
  font-size:10.5px!important;
  font-weight:950!important;
}
.pro-sire-control-deck-card-v2 .pro-sire-rule-switch{
  cursor:pointer!important;
  user-select:none!important;
}
.pro-sire-control-deck-card-v2 .pro-sire-rule-switch input{
  width:16px!important;
  height:16px!important;
  min-width:16px!important;
  opacity:1!important;
  pointer-events:auto!important;
  cursor:pointer!important;
}
.pro-sire-control-deck-card-v2 .pro-sire-bulk-rule-card.is-included{
  box-shadow:inset 0 0 0 2px rgba(37,99,235,.16),0 8px 14px rgba(37,99,235,.06)!important;
}
.pro-sire-control-deck-card-v2 .pro-sire-bulk-scope-chips{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
}
.pro-sire-control-deck-card-v2 .pro-sire-bulk-scope-chip{
  min-height:36px!important;
  font-size:10.2px!important;
  border-radius:999px!important;
}
.pro-sire-control-deck-card-v2 .pro-sire-filter-grid{
  display:grid!important;
  grid-template-columns:minmax(155px,.75fr) minmax(120px,.6fr) minmax(140px,.65fr) minmax(0,1.6fr) minmax(120px,.55fr)!important;
  gap:8px!important;
  align-items:stretch!important;
}
.pro-sire-control-deck-card-v2 #proSireQueryFilterCount{
  grid-column:1 / -1!important;
  min-height:28px!important;
}
.pro-sire-control-deck-card-v2 .pro-sire-filter-field{
  border-radius:16px!important;
}
@media(max-width:1500px){
  .pro-sire-workbench-layout-v2{grid-template-columns:1fr!important;}
  .pro-sire-control-deck-card-v2 .pro-sire-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:900px){
  .pro-sire-command-centre-v2 .pro-sire-settings-actions,
  .pro-sire-command-centre-v2 .pro-sire-lab-mode-strip,
  .pro-sire-family-row-v2,
  .pro-sire-command-status-grid-v2{grid-template-columns:1fr 1fr!important;}
  .pro-sire-family-row-v2 .pro-sire-action-label{grid-column:1 / -1!important;}
  .pro-sire-family-row-v2 .pro-sire-family-pause-bar{grid-column:1 / -1!important;grid-template-columns:1fr!important;}
  .pro-sire-control-deck-card-v2 .pro-sire-bulk-grid,
  .pro-sire-control-deck-card-v2 .pro-sire-filter-grid{grid-template-columns:1fr!important;}
}
.pro-sire-command-centre-v2 .pro-sire-settings-toolbar[hidden],
.pro-sire-control-deck-card-v2 .pro-sire-bulk-tuning[hidden],
.pro-sire-control-deck-card-v2 .pro-sire-query-filter-bar[hidden]{display:none!important;}

/* PRO_SYSTEM_BUILDER_001AK — grid restoration, command-centre polish and bulk/control interaction layout
   Purpose: preserve 001AJ's two-column command/deck idea while restoring the full query grid underneath
   and making the command controls symmetrical, compact and usable. */
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-control-deck.pro-sire-command-deck-v2{
  flex:0 0 auto!important;
  width:100%!important;
  margin:0!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workbench-layout-v2{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:10px!important;
  align-items:stretch!important;
  width:100%!important;
  padding:8px 0!important;
  background:#f8fcff!important;
  border-top:1px solid rgba(191,219,254,.68)!important;
  border-bottom:1px solid rgba(191,219,254,.68)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-centre-v2,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  border-radius:17px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-centre-v2{
  display:grid!important;
  grid-template-rows:auto auto auto auto auto!important;
  gap:7px!important;
  padding:8px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-status-v2{
  display:grid!important;
  grid-template-columns:150px minmax(0,1fr)!important;
  gap:10px!important;
  align-items:center!important;
  min-height:28px!important;
  padding:5px 9px!important;
  border-radius:12px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-status-v2 strong{
  text-align:left!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open #proSireDraftStateMessage{
  min-height:22px!important;
  height:auto!important;
  padding:2px 8px!important;
  border:0!important;
  background:transparent!important;
  justify-content:flex-start!important;
  text-align:left!important;
  font-size:10.5px!important;
  line-height:1.15!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open #proSireSettingsToolbar,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-centre-v2 .pro-sire-settings-toolbar{
  display:block!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open #proSireSettingsToolbar[hidden]{display:none!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open #proSireSettingsToolbar .pro-sire-settings-actions.pro-sire-command-row-v2,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-centre-v2 .pro-sire-settings-actions,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-centre-v2 .pro-sire-lab-mode-strip{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:7px!important;
  align-items:stretch!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-centre-v2 .pro-sire-settings-actions .btn,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-centre-v2 .pro-sire-lab-mode,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-centre-v2 .pro-sire-family-pause-bar .btn{
  min-width:0!important;
  width:100%!important;
  min-height:34px!important;
  height:34px!important;
  padding:0 8px!important;
  border-radius:999px!important;
  font-size:10.6px!important;
  font-weight:950!important;
  line-height:1!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  white-space:nowrap!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-family-row-v2{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:7px!important;
  align-items:stretch!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-family-row-v2 .pro-sire-action-label{
  min-height:34px!important;
  padding:4px 8px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:1px!important;
  text-align:center!important;
  border-radius:13px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-family-row-v2 .pro-sire-action-label strong{
  font-size:9.2px!important;
  line-height:1!important;
  text-align:center!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-family-row-v2 .pro-sire-action-label span{
  font-size:9.2px!important;
  line-height:1.05!important;
  text-align:center!important;
  color:#2563eb!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-family-row-v2 .pro-sire-family-pause-bar{
  grid-column:2 / 5!important;
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:7px!important;
  margin:0!important;
  padding:0!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-status-grid-v2{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:6px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-status-grid-v2 span{
  min-height:28px!important;
  padding:4px 7px!important;
  border-radius:11px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-status-grid-v2 b{font-size:10.4px!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-status-grid-v2 em{font-size:7.4px!important;}

/* Right-side control deck: keep the panel contained, balanced and aligned. */
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-deck-tabs{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:7px!important;
  padding:8px 9px 0!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-deck-tab{
  min-height:32px!important;
  height:32px!important;
  border-radius:12px 12px 0 0!important;
  font-size:10.2px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-deck-panel{
  padding:8px 9px!important;
  min-height:0!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-bulk-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
  align-items:stretch!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-bulk-scope{
  grid-column:1 / -1!important;
  min-height:58px!important;
  padding:8px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-bulk-scope-chips{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-bulk-scope-chip{
  min-width:0!important;
  width:100%!important;
  min-height:34px!important;
  height:34px!important;
  padding:0 10px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-bulk-rule-card{
  min-height:70px!important;
  height:auto!important;
  padding:8px 10px!important;
  display:grid!important;
  align-content:center!important;
  justify-items:stretch!important;
  gap:7px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-rule-switch{
  justify-content:center!important;
  text-align:center!important;
  gap:7px!important;
  min-height:20px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-bulk-minmax{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-bulk-minmax label{
  grid-template-columns:30px minmax(58px,1fr)!important;
  justify-content:center!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 #proSireApplyBulkButton{
  grid-column:1 / -1!important;
  justify-self:center!important;
  align-self:center!important;
  width:min(320px,46%)!important;
  min-width:220px!important;
  min-height:34px!important;
  height:34px!important;
  border-radius:999px!important;
}

/* Query filters fit inside the right-side deck without hard clipping. */
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-filter-grid{
  display:grid!important;
  grid-template-columns:minmax(130px,.7fr) minmax(118px,.55fr) minmax(132px,.6fr) minmax(0,1.4fr) minmax(116px,.52fr)!important;
  gap:7px!important;
  align-items:stretch!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-component-filter-groups{
  max-height:none!important;
  overflow:visible!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open #proSireQueryComponentClear{
  min-height:26px!important;
  border-radius:999px!important;
  padding:0 12px!important;
}

/* Restore and pin the query grid directly under the workbench. */
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-applied-summary,
.pro-sire-query-grid-panel.pro-sire-workspace-open .quick-status-bar,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-scroll{
  flex:0 0 auto!important;
  width:100%!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-scroll{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  margin:6px 0 0!important;
  min-height:280px!important;
  max-height:calc(100dvh - 520px)!important;
  overflow:auto!important;
  border:1px solid rgba(147,197,253,.72)!important;
  border-radius:16px!important;
  background:#fff!important;
  box-shadow:0 10px 24px rgba(15,23,42,.05)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table{
  display:table!important;
  width:100%!important;
  min-width:2160px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open #proSireQueryGridBody{
  display:table-row-group!important;
  visibility:visible!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table thead th{
  position:sticky!important;
  top:0!important;
  z-index:45!important;
}

@media(max-width:1500px){
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workbench-layout-v2{grid-template-columns:1fr!important;}
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-scroll{max-height:48dvh!important;}
}

/* PRO_SYSTEM_BUILDER_001AL — grid containment, command-chip polish and bulk-edit chip fix
   Frontend-only patch over 001AK installed state. */
#proSireQueryGridPanel[hidden],
#proSireQueryGridPanel:not(.pro-sire-workspace-open){
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open{
  display:flex!important;
  visibility:visible!important;
  pointer-events:auto!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-root.pro-sire-workspace-open{
  position:fixed!important;
  inset:0!important;
  width:100dvw!important;
  height:100dvh!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  display:flex!important;
  flex-direction:column!important;
  gap:8px!important;
  padding:10px 12px 18px!important;
  box-sizing:border-box!important;
  background:linear-gradient(180deg,#f7fcff 0%,#ffffff 48%,#f7fbff 100%)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-control-deck.pro-sire-command-deck-v2{
  flex:0 0 auto!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-scroll{
  display:block!important;
  flex:0 0 auto!important;
  width:100%!important;
  min-height:320px!important;
  max-height:none!important;
  margin:8px 0 0!important;
  overflow:auto!important;
  border:1px solid rgba(147,197,253,.72)!important;
  border-radius:16px!important;
  background:#fff!important;
  box-shadow:0 10px 24px rgba(15,23,42,.05)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table{
  display:table!important;
  width:100%!important;
  min-width:2160px!important;
  table-layout:fixed!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open #proSireQueryGridBody{
  display:table-row-group!important;
}

/* Command centre sizing: slimmer status, single-row action chips, colour-separated action/lab/family rows. */
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-centre-v2{
  gap:6px!important;
  padding:7px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-status-v2{
  min-height:22px!important;
  grid-template-columns:130px minmax(0,1fr)!important;
  padding:3px 8px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-status-v2 strong{
  font-size:9.2px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open #proSireDraftStateMessage{
  min-height:18px!important;
  padding:0 6px!important;
  font-size:10px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-centre-v2 .pro-sire-settings-actions .btn,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-centre-v2 .pro-sire-lab-mode,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-centre-v2 .pro-sire-family-pause-bar .btn{
  min-height:32px!important;
  height:32px!important;
  transform:none!important;
  transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease!important;
  overflow:visible!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-centre-v2 .pro-sire-settings-actions .btn:hover,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-centre-v2 .pro-sire-lab-mode:hover,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-centre-v2 .pro-sire-family-pause-bar .btn:hover{
  transform:translateY(-1px)!important;
  box-shadow:0 8px 16px rgba(15,23,42,.10)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-centre-v2 .pro-sire-lab-mode{
  background:linear-gradient(180deg,#ecfdf5,#ffffff)!important;
  border-color:rgba(20,184,166,.36)!important;
  color:#047857!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-centre-v2 .pro-sire-lab-mode.is-active{
  color:#fff!important;
  background:linear-gradient(135deg,#10b981,#0ea5e9)!important;
  border-color:transparent!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-centre-v2 .pro-sire-family-pause-bar .btn{
  background:linear-gradient(180deg,#f8fcff,#ffffff)!important;
  border-color:rgba(14,165,233,.24)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-centre-v2 .pro-sire-family-pause-bar .btn.is-paused{
  background:linear-gradient(180deg,#fff7ed,#ffedd5)!important;
  color:#9a3412!important;
  border-color:#fed7aa!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-family-row-v2 .pro-sire-action-label{
  min-height:32px!important;
  line-height:1!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-family-row-v2 .pro-sire-action-label strong,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-family-row-v2 .pro-sire-action-label span{
  text-align:center!important;
}

/* Right deck: better width use and card polish. */
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workbench-layout-v2{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  padding-left:4px!important;
  padding-right:4px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-centre-v2{
  overflow:visible!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-deck-panel{
  overflow:visible!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-bulk-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-bulk-rule-card{
  min-height:66px!important;
  padding:8px 12px!important;
  cursor:pointer!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-rule-switch{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  width:100%!important;
  cursor:pointer!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-rule-switch input[type="checkbox"]{
  position:absolute!important;
  opacity:0!important;
  pointer-events:none!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-rule-switch span{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:26px!important;
  min-width:150px!important;
  padding:0 14px!important;
  border-radius:999px!important;
  border:1px solid rgba(148,163,184,.42)!important;
  background:#fff!important;
  color:#0f4d75!important;
  font-size:10px!important;
  font-weight:950!important;
  letter-spacing:.04em!important;
  text-transform:uppercase!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-bulk-rule-card.is-included .pro-sire-rule-switch span{
  background:linear-gradient(135deg,#0ea5e9,#2563eb)!important;
  border-color:transparent!important;
  color:#fff!important;
  box-shadow:0 8px 16px rgba(37,99,235,.18)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 #proSireApplyBulkButton{
  width:min(260px,42%)!important;
  min-width:190px!important;
  min-height:32px!important;
  height:32px!important;
  justify-self:center!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:999px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-bulk-scope-chip:hover,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-rule-switch span:hover,
.pro-sire-query-grid-panel.pro-sire-workspace-open #proSireApplyBulkButton:hover{
  transform:translateY(-1px)!important;
  box-shadow:0 8px 16px rgba(15,23,42,.09)!important;
}

/* Query filters: cleaner card spacing; keep reset/clear as a visible chip. */
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-filter-grid{
  grid-template-columns:minmax(140px,.75fr) minmax(120px,.55fr) minmax(140px,.62fr) minmax(0,1.45fr) minmax(120px,.52fr)!important;
  gap:9px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-filter-field{
  border-radius:18px!important;
  padding:10px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open #proSireQueryComponentClear{
  min-height:28px!important;
  min-width:70px!important;
  border-radius:999px!important;
  font-weight:950!important;
  background:#fff7ed!important;
  border:1px solid #fed7aa!important;
  color:#c2410c!important;
}
body:not(.pro-sire-workspace-open) #proSireQueryGridPanel.pro-sire-workspace-root{
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}

/* PRO_SYSTEM_BUILDER_001AM — grid DOM containment repair and fine visual polish
   Root cause: an extra closing div above the SIRE grid had left the grid outside
   #proSireQueryGridPanel in the parsed DOM, so it leaked onto non-workspace pages.
   This section keeps the command/deck polish but stops hover clipping and tightens bulk edit. */
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-centre-v2,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2{
  overflow:visible!important;
  padding:10px 12px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workbench-layout-v2{
  gap:12px!important;
  padding-left:2px!important;
  padding-right:2px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-status-v2{
  min-height:24px!important;
  padding:3px 10px!important;
  overflow:visible!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-row-v2,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-settings-actions,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-family-row-v2,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-family-pause-bar{
  overflow:visible!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-lab-mode-strip{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  padding:0!important;
  min-height:36px!important;
  overflow:visible!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-centre-v2 .pro-sire-settings-actions .btn,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-centre-v2 .pro-sire-lab-mode,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-centre-v2 .pro-sire-family-pause-bar .btn{
  min-height:34px!important;
  height:34px!important;
  border-radius:999px!important;
  overflow:visible!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-centre-v2 .pro-sire-settings-actions .btn:hover,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-centre-v2 .pro-sire-lab-mode:hover,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-command-centre-v2 .pro-sire-family-pause-bar .btn:hover{
  transform:translateY(-1px)!important;
  box-shadow:0 8px 15px rgba(15,23,42,.10)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-bulk-rule-card{
  min-height:76px!important;
  padding:10px 12px!important;
  align-content:center!important;
  justify-items:center!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-bulk-minmax{
  width:100%!important;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
  align-items:center!important;
  justify-items:center!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-bulk-minmax label{
  width:100%!important;
  display:grid!important;
  grid-template-columns:32px minmax(62px,88px)!important;
  justify-content:center!important;
  align-items:center!important;
  gap:6px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-bulk-minmax input,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-threshold-input{
  text-align:center!important;
  justify-self:center!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 #proSireApplyBulkButton{
  width:min(300px,38%)!important;
  min-width:210px!important;
  margin-top:2px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-scroll{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  width:100%!important;
  margin-top:8px!important;
}
#proSireQueryGridPanel:not(.pro-sire-workspace-open) .pro-sire-query-grid-scroll,
#proSireQueryGridPanel[hidden] .pro-sire-query-grid-scroll{
  display:none!important;
  visibility:hidden!important;
}

/* PRO_SYSTEM_BUILDER_001AN — Bulk Edit interaction stabilisation and light polish */
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-bulk-rule-card{
  user-select:none!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-bulk-rule-card.is-included{
  transform:translateY(-1px)!important;
  box-shadow:0 10px 18px rgba(15,23,42,.075)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-bulk-rule-card[data-rule-family="win"].is-included{
  background:linear-gradient(180deg,#eff6ff,#ffffff)!important;
  border-color:rgba(37,99,235,.35)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-bulk-rule-card[data-rule-family="zero"].is-included{
  background:linear-gradient(180deg,#fff7ed,#ffffff)!important;
  border-color:rgba(245,158,11,.38)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-bulk-rule-card[data-rule-family="ae"].is-included{
  background:linear-gradient(180deg,#ecfdf5,#ffffff)!important;
  border-color:rgba(16,185,129,.35)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-bulk-minmax label{
  justify-content:center!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-bulk-minmax input{
  text-align:center!important;
}

/* ========================================================================== 
   PRO_SYSTEM_BUILDER_001AO — SIRE query-grid CSS rebase
   Purpose: remove old selected-column assumptions from the current Pro SIRE grid.
   The current grid has no separate selected/use-in-draft column. Column 2 is Win % Rule.
   Therefore no second column may be sticky, 58px wide, or left-offset.
   ========================================================================== */

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-scroll{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  overflow:auto!important;
  isolation:isolate!important;
  contain:layout paint!important;
  border:1px solid rgba(147,197,253,.72)!important;
  border-radius:16px!important;
  background:#fff!important;
}

#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table,
#proSireQueryGridPanel.pro-sire-workspace-open[data-pro-sire-lab="combined"] .pro-sire-query-grid-table{
  display:table!important;
  table-layout:fixed!important;
  width:100%!important;
  min-width:1904px!important;
  max-width:none!important;
  border-collapse:separate!important;
  border-spacing:0!important;
}

/* Current 12-column layout — class based only. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table col.pro-sire-col-query{
  width:560px!important;
  min-width:560px!important;
  max-width:560px!important;
  display:table-column!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table col.pro-sire-col-rule{
  width:165px!important;
  min-width:165px!important;
  max-width:165px!important;
  display:table-column!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table col.pro-sire-col-source-damage{
  width:118px!important;
  min-width:118px!important;
  max-width:118px!important;
  display:table-column!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table col.pro-sire-col-metric{
  width:95px!important;
  min-width:95px!important;
  max-width:95px!important;
  display:table-column!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table col.pro-sire-col-money{
  width:114px!important;
  min-width:114px!important;
  max-width:114px!important;
  display:table-column!important;
}

/* Neutralise legacy selected-column styling. Column 2 is now Win % Rule, not Active/Selected. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table th:nth-child(2),
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table td:nth-child(2),
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table tbody th:nth-child(2),
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th:nth-child(2){
  position:static!important;
  left:auto!important;
  z-index:auto!important;
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  transform:none!important;
  display:table-cell!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead tr.pro-sire-group-head th.pro-sire-sticky-selected-head,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table .pro-sire-sticky-selected-head,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table .pro-sire-col-selected,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table .pro-sire-selected-head,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table .pro-sire-control-cell{
  display:none!important;
  position:static!important;
  left:auto!important;
}

/* Sticky model: header row + first/query column only. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th{
  position:sticky!important;
  top:0!important;
  left:auto!important;
  z-index:40!important;
  height:38px!important;
  padding:7px 8px!important;
  vertical-align:middle!important;
  white-space:nowrap!important;
  overflow:visible!important;
  text-align:center!important;
  background:linear-gradient(180deg,#f8fcff,#eef8ff)!important;
  border-bottom:1px solid rgba(147,197,253,.72)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th:first-child{
  left:0!important;
  z-index:55!important;
  text-align:left!important;
  min-width:560px!important;
  width:560px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table tbody th.pro-sire-query-cell{
  position:sticky!important;
  left:0!important;
  z-index:25!important;
  min-width:560px!important;
  width:560px!important;
  max-width:560px!important;
  background:linear-gradient(180deg,#ffffff,#f8fcff)!important;
  border-right:1px solid rgba(59,130,246,.30)!important;
  padding:6px 10px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table tbody td{
  position:static!important;
  left:auto!important;
  z-index:auto!important;
  padding:6px 7px!important;
  vertical-align:middle!important;
  text-align:center!important;
  min-width:0!important;
  max-width:none!important;
}

/* Restore the current rule/source/metric columns explicitly. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th.pro-sire-threshold-head,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table tbody td.pro-sire-threshold-bundle,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th.pro-sire-source-damage-head,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table tbody td.pro-sire-source-damage-cell,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th.pro-sire-performance-head,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table tbody td.pro-sire-performance-cell{
  display:table-cell!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th.pro-sire-threshold-head-win,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table tbody td[data-rule-family="win"]{
  background:#f5fbff!important;
  border-left:1px solid rgba(14,165,233,.18)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th.pro-sire-threshold-head-zero,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table tbody td[data-rule-family="zero"]{
  background:#fffaf2!important;
  border-left:1px solid rgba(245,158,11,.20)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th.pro-sire-threshold-head-ae,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table tbody td[data-rule-family="ae"]{
  background:#f4fff8!important;
  border-left:1px solid rgba(34,197,94,.18)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table tbody td.pro-sire-source-damage-cell[data-source-family="zero"]{background:#fffaf2!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table tbody td.pro-sire-source-damage-cell[data-source-family="win"]{background:#f5fbff!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table tbody td.pro-sire-source-damage-cell[data-source-family="ae"]{background:#f4fff8!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table tbody td.pro-sire-performance-cell{
  background:#f8fbff!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table tbody tr:nth-child(even) td.pro-sire-performance-cell{
  background:#f2f8ff!important;
}

/* Compact, centred rule controls inside the now-correct rule columns. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-threshold-bundle{
  min-width:0!important;
  max-width:none!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-line{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:3px!important;
  min-height:42px!important;
  width:100%!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-row-rule-toggle{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:116px!important;
  margin:0 auto!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-row-minmax{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  width:132px!important;
  margin:0 auto!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-threshold-input,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-minmax input{
  text-align:center!important;
  width:52px!important;
  min-width:52px!important;
  max-width:52px!important;
  height:22px!important;
  padding:0 4px!important;
  box-sizing:border-box!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-paused-watermark{
  inset:4px 6px!important;
  border-radius:12px!important;
  pointer-events:none!important;
}

/* Query cell: one-line chip/help/description with readable text and reduced height. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-main-inline{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  min-width:0!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-active-switch{
  flex:0 0 auto!important;
  width:auto!important;
  min-width:0!important;
  height:auto!important;
  overflow:visible!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-active-chip{
  min-width:86px!important;
  height:28px!important;
  padding:0 14px!important;
  line-height:28px!important;
  white-space:nowrap!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-help{
  flex:0 0 auto!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-brief{
  flex:1 1 auto!important;
  min-width:0!important;
  max-width:none!important;
  font-size:11px!important;
  line-height:1.2!important;
  white-space:normal!important;
}

/* Keep metric typography deliberate but not over-heavy. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-source-damage-cell b,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-performance-cell{
  font-weight:850!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-neg-runners-cell,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-neg-wins-cell{
  font-weight:700!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-neg-win-pct-cell,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-neg-ae-cell,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-money{
  font-weight:950!important;
}

/* Defensive visibility: older lab filters must not hide the current combined-grid control columns. */
#proSireQueryGridPanel[data-pro-sire-lab="combined"].pro-sire-workspace-open .pro-sire-col-rule,
#proSireQueryGridPanel[data-pro-sire-lab="combined"].pro-sire-workspace-open .pro-sire-col-win,
#proSireQueryGridPanel[data-pro-sire-lab="combined"].pro-sire-workspace-open .pro-sire-col-zero,
#proSireQueryGridPanel[data-pro-sire-lab="combined"].pro-sire-workspace-open .pro-sire-col-ae,
#proSireQueryGridPanel[data-pro-sire-lab="combined"].pro-sire-workspace-open .pro-sire-col-source-damage,
#proSireQueryGridPanel[data-pro-sire-lab="combined"].pro-sire-workspace-open .pro-sire-threshold-head,
#proSireQueryGridPanel[data-pro-sire-lab="combined"].pro-sire-workspace-open .pro-sire-threshold-bundle,
#proSireQueryGridPanel[data-pro-sire-lab="combined"].pro-sire-workspace-open .pro-sire-source-damage-head,
#proSireQueryGridPanel[data-pro-sire-lab="combined"].pro-sire-workspace-open .pro-sire-source-damage-cell{
  display:table-cell!important;
}
#proSireQueryGridPanel[data-pro-sire-lab="combined"].pro-sire-workspace-open col.pro-sire-col-rule,
#proSireQueryGridPanel[data-pro-sire-lab="combined"].pro-sire-workspace-open col.pro-sire-col-source-damage{
  display:table-column!important;
}


/* ========================================================================== 
   PRO_SYSTEM_BUILDER_001AP — table pause/sort/filter polish
   Scope: frontend-only finishing pass after 001AO grid CSS rebase.
   ========================================================================== */

/* 001AP: stable table scroll context and sticky single-row header. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-scroll{
  max-height:calc(100vh - 430px)!important;
  min-height:260px!important;
  overflow:auto!important;
  overscroll-behavior:contain!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th{
  position:sticky!important;
  top:0!important;
  z-index:80!important;
  cursor:pointer!important;
  user-select:none!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th:first-child{
  z-index:95!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th.is-active-sort{
  background:linear-gradient(180deg,#e0f2fe,#f8fcff)!important;
  color:#0f4c81!important;
  box-shadow:inset 0 -2px 0 rgba(14,165,233,.45)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th.is-active-sort::after{
  opacity:1!important;
  color:#0284c7!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th:hover{
  background:linear-gradient(180deg,#ecfeff,#f8fcff)!important;
}

/* 001AP: paused state belongs in the column header, not in body-cell watermarks. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-paused-watermark{
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-threshold-head .pro-sire-header-paused-label{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  margin-left:6px!important;
  padding:2px 7px!important;
  border-radius:999px!important;
  border:1px solid rgba(248,113,113,.55)!important;
  background:#fee2e2!important;
  color:#991b1b!important;
  font-size:8px!important;
  line-height:1!important;
  text-transform:uppercase!important;
  letter-spacing:.08em!important;
  font-weight:950!important;
  vertical-align:middle!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-threshold-head .pro-sire-header-paused-label[hidden]{
  display:none!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-threshold-head.is-family-paused{
  background:linear-gradient(180deg,#fee2e2,#fff7ed)!important;
  color:#7f1d1d!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-threshold-bundle.is-family-paused{
  opacity:.54!important;
  filter:saturate(.35)!important;
  background:#f8fafc!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-threshold-bundle.is-family-paused .pro-sire-rule-line{
  opacity:.72!important;
  transform:none!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-threshold-bundle.is-family-paused .pro-sire-rule-toggle-button,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-threshold-bundle.is-family-paused .pro-sire-threshold-input{
  pointer-events:none!important;
  cursor:not-allowed!important;
  transform:none!important;
  box-shadow:none!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-threshold-bundle.is-family-paused:hover,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-threshold-bundle.is-family-paused *:hover{
  transform:none!important;
}

/* 001AP: keep query text readable and balanced after JS splits labels. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-brief{
  display:block!important;
  font-size:11.5px!important;
  line-height:1.28!important;
  white-space:normal!important;
  overflow:visible!important;
  color:#111827!important;
  font-weight:760!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-main-inline{
  align-items:center!important;
}

/* 001AP: improve query filter deck without changing the working filter logic. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-deck-panel-filters .pro-sire-query-filter-bar{
  padding:10px 12px 14px!important;
  background:linear-gradient(180deg,#ecfeff,#f8fcff)!important;
  border-radius:16px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-filter-grid{
  display:grid!important;
  grid-template-columns:minmax(132px,.85fr) minmax(106px,.62fr) minmax(128px,.74fr) minmax(300px,1.8fr) minmax(128px,.72fr)!important;
  gap:10px!important;
  align-items:stretch!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-filter-field,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-filter-grid #proSireQueryFilterCount{
  border-radius:18px!important;
  background:linear-gradient(180deg,#ffffff,#f8fcff)!important;
  border:1px solid rgba(147,197,253,.70)!important;
  box-shadow:0 10px 24px rgba(15,23,42,.055)!important;
  padding:10px!important;
  min-height:88px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-filter-components{
  min-width:0!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireQueryComponentFilters{
  max-height:none!important;
  overflow:visible!important;
  align-content:stretch!important;
  padding-right:0!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireQueryComponentFilters .pro-sire-filter-token{
  margin-bottom:3px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-reset-chip{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:82px!important;
  height:28px!important;
  border-radius:999px!important;
  border:1px solid rgba(251,146,60,.60)!important;
  background:#fff7ed!important;
  color:#c2410c!important;
  font-weight:950!important;
  font-size:10px!important;
  letter-spacing:.02em!important;
  cursor:pointer!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-reset-chip:hover{
  transform:translateY(-1px)!important;
  box-shadow:0 8px 16px rgba(251,146,60,.16)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-activation .pro-sire-activation-chip-list{
  display:flex!important;
  flex-direction:column!important;
  gap:6px!important;
  align-items:stretch!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-activation-filter-token{
  justify-content:center!important;
  width:100%!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-visually-hidden-select{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  opacity:0!important;
  pointer-events:none!important;
  overflow:hidden!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 #proSireQueryFilterCount{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:42px!important;
  height:auto!important;
  border-radius:999px!important;
  color:#1d4ed8!important;
  font-weight:950!important;
  background:#eff6ff!important;
  border-color:rgba(59,130,246,.30)!important;
  grid-column:5!important;
}

/* 001AP: bulk-edit min/max controls centred inside each family card. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-rule-card{
  align-items:center!important;
  justify-items:center!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-minmax{
  width:100%!important;
  justify-content:center!important;
  align-items:center!important;
  gap:22px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-minmax label{
  flex:0 0 auto!important;
  justify-content:center!important;
  align-items:center!important;
  text-align:center!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-minmax input{
  text-align:center!important;
}

@media(max-width:1280px){
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-filter-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-components,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-activation,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 #proSireQueryFilterCount{
    grid-column:auto!important;
  }
}

/* ========================================================================== 
   PRO_SYSTEM_BUILDER_001AQ — rule activation deck and sticky-header repair
   Scope: frontend-only refinement after 001AP.
   ========================================================================== */

/* Left command centre now has only the two version actions. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-version-action-row{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
  align-items:center!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-version-action-row .btn{
  min-height:34px!important;
  height:34px!important;
  border-radius:999px!important;
  font-size:11px!important;
  font-weight:950!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireUndoButton:not(:disabled){
  background:linear-gradient(135deg,#eef2ff,#ffffff)!important;
  border-color:rgba(99,102,241,.42)!important;
  color:#3730a3!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireUndoButton:disabled{
  opacity:.62!important;
}

/* Right-side deck now has five tabs including Rule Activation. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-deck-tabs{
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:6px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-panel-activation{
  background:linear-gradient(180deg,#ecfeff,#f8fcff)!important;
  border-radius:16px!important;
  padding:10px 12px 14px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-hub{
  display:block!important;
  width:100%!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-grid{
  display:grid!important;
  grid-template-columns:1.15fr 1.65fr repeat(3,minmax(112px,.9fr))!important;
  gap:10px!important;
  align-items:stretch!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-card{
  min-height:70px!important;
  border:1px solid rgba(147,197,253,.65)!important;
  border-radius:16px!important;
  background:linear-gradient(180deg,#ffffff,#f8fcff)!important;
  box-shadow:0 10px 24px rgba(15,23,42,.045)!important;
  padding:10px 12px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  text-align:center!important;
  user-select:none!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-card > span,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-card .pro-sire-rule-switch span{
  text-transform:uppercase!important;
  letter-spacing:.08em!important;
  font-size:9px!important;
  font-weight:950!important;
  color:#1e3a8a!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-chips{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  width:100%!important;
  gap:7px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-scope .pro-sire-rule-activation-chips{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-chip,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-scope-chip{
  border:1px solid rgba(125,211,252,.8)!important;
  background:#ffffff!important;
  border-radius:999px!important;
  min-height:30px!important;
  padding:0 10px!important;
  color:#075985!important;
  font-size:10px!important;
  font-weight:950!important;
  cursor:pointer!important;
  transition:transform .14s ease, box-shadow .14s ease, background .14s ease, border-color .14s ease!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-chip:hover,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-scope-chip:hover,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family:hover{
  transform:translateY(-1px)!important;
  box-shadow:0 10px 18px rgba(15,23,42,.075)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-chip.is-active,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-scope-chip.is-active{
  background:linear-gradient(135deg,#0ea5e9,#2563eb)!important;
  border-color:rgba(37,99,235,.65)!important;
  color:#ffffff!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family[data-rule-family="win"]{
  background:linear-gradient(180deg,#f5fbff,#ffffff)!important;
  border-color:rgba(14,165,233,.30)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family[data-rule-family="zero"]{
  background:linear-gradient(180deg,#fffaf2,#ffffff)!important;
  border-color:rgba(245,158,11,.38)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family[data-rule-family="ae"]{
  background:linear-gradient(180deg,#f4fff8,#ffffff)!important;
  border-color:rgba(34,197,94,.34)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family.is-included{
  transform:translateY(-1px)!important;
  box-shadow:0 10px 18px rgba(15,23,42,.075)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family.is-included[data-rule-family="win"]{
  border-color:rgba(37,99,235,.55)!important;
  box-shadow:0 10px 18px rgba(37,99,235,.10)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family.is-included[data-rule-family="zero"]{
  border-color:rgba(245,158,11,.65)!important;
  box-shadow:0 10px 18px rgba(245,158,11,.12)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family.is-included[data-rule-family="ae"]{
  border-color:rgba(16,185,129,.55)!important;
  box-shadow:0 10px 18px rgba(16,185,129,.12)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family input[type="checkbox"]{
  width:15px!important;
  height:15px!important;
  margin:0 7px 0 0!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyRuleActivationButton{
  grid-column:1 / -1!important;
  width:min(320px,42%)!important;
  min-width:220px!important;
  justify-self:center!important;
  border-radius:999px!important;
  height:32px!important;
  font-weight:950!important;
}

/* Sticky header fix: use the page scroll context for vertical sticky behaviour.
   Keep horizontal overflow for the wide table, but do not make the wrapper a vertical scroll trap. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-scroll{
  max-height:none!important;
  min-height:0!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  contain:none!important;
  isolation:isolate!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead tr,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th{
  overflow:visible!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th{
  position:sticky!important;
  top:0!important;
  z-index:120!important;
  background:linear-gradient(180deg,#f8fcff,#eaf6ff)!important;
  box-shadow:0 2px 0 rgba(147,197,253,.72),0 8px 16px rgba(15,23,42,.06)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th:first-child{
  z-index:140!important;
}

@media(max-width:1280px){
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyRuleActivationButton{
    grid-column:1 / -1!important;
    width:min(320px,80%)!important;
  }
}


/* ========================================================================== 
   PRO_SYSTEM_BUILDER_001AR — rule activation tab and table scroll fix
   Scope: frontend-only correction after 001AQ.
   ========================================================================== */

/* 001AR: restore a bounded table scroll context so the single-row header can
   stick reliably while preserving horizontal scrolling for the wide grid. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-scroll{
  position:relative!important;
  display:block!important;
  max-height:clamp(340px, 52vh, 640px)!important;
  min-height:320px!important;
  overflow:auto!important;
  overflow-x:auto!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  contain:none!important;
  isolation:isolate!important;
  -webkit-overflow-scrolling:touch!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table{
  border-collapse:separate!important;
  border-spacing:0!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead tr{
  overflow:visible!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th{
  position:sticky!important;
  top:0!important;
  z-index:160!important;
  background:linear-gradient(180deg,#f8fcff,#eaf6ff)!important;
  box-shadow:0 2px 0 rgba(147,197,253,.75),0 8px 16px rgba(15,23,42,.06)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th:first-child{
  z-index:190!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table tbody th.pro-sire-query-cell{
  z-index:75!important;
}

/* 001AR: make the two true SIRE version actions fill the left command row. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-version-action-row{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:14px!important;
  align-items:center!important;
  justify-items:stretch!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-version-action-row .btn{
  width:100%!important;
  min-height:40px!important;
  height:40px!important;
  border-radius:999px!important;
  font-size:12px!important;
  font-weight:950!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyChangesButton{
  background:linear-gradient(135deg,#2563eb,#0ea5e9)!important;
  box-shadow:0 12px 22px rgba(37,99,235,.18)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireUndoButton:not(:disabled){
  background:linear-gradient(135deg,#eef2ff,#ffffff)!important;
  border-color:rgba(99,102,241,.48)!important;
  color:#3730a3!important;
  box-shadow:0 10px 18px rgba(99,102,241,.10)!important;
}

@media(max-width:1280px){
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-scroll{
    max-height:50vh!important;
    min-height:300px!important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-version-action-row{
    grid-template-columns:1fr!important;
  }
}


/* ========================================================================== 
   PRO_SYSTEM_BUILDER_001AS — Rule Activation family chips and panel polish
   Scope: frontend-only correction after 001AR.
   ========================================================================== */

/* Keep the good 001AR command-centre structure, but make the two version actions
   feel intentionally centred rather than like missing four-button controls. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-version-action-row{
  width:min(100%, 760px)!important;
  margin:0 auto!important;
  grid-template-columns:repeat(2,minmax(220px,1fr))!important;
  gap:18px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-version-action-row .btn{
  min-height:42px!important;
  height:42px!important;
}

/* Rule Activation now deliberately mirrors the successful Bulk Edit grammar:
   choose action + scope, choose families, then apply. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-panel-activation{
  padding:12px 14px 16px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-grid-v2,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-grid{
  display:grid!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:12px!important;
  align-items:stretch!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-action{
  grid-column:1 / span 2!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-scope{
  grid-column:3 / span 4!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family{
  grid-column:span 2!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-card{
  min-height:104px!important;
  padding:14px 16px!important;
  border-radius:18px!important;
  gap:11px!important;
  cursor:pointer!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-card > span{
  display:block!important;
  min-height:12px!important;
  line-height:1!important;
  margin:0!important;
  color:#334155!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-chips{
  gap:10px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-chip,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-scope-chip,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family-chip{
  min-height:42px!important;
  border-radius:999px!important;
  padding:0 16px!important;
  font-size:11px!important;
  font-weight:950!important;
  letter-spacing:.015em!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  cursor:pointer!important;
  user-select:none!important;
  transition:transform .14s ease, box-shadow .14s ease, background .14s ease, border-color .14s ease, color .14s ease!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family-chip{
  border:1px solid rgba(125,211,252,.82)!important;
  background:#ffffff!important;
  color:#075985!important;
  box-shadow:0 4px 12px rgba(15,23,42,.035)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family-chip:hover{
  transform:translateY(-2px)!important;
  box-shadow:0 12px 22px rgba(15,23,42,.10)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family-chip.is-active{
  color:#ffffff!important;
  background:linear-gradient(135deg,#0ea5e9,#2563eb)!important;
  border-color:rgba(37,99,235,.72)!important;
  box-shadow:0 14px 26px rgba(37,99,235,.16)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family[data-rule-family="zero"] .pro-sire-rule-activation-family-chip.is-active{
  background:linear-gradient(135deg,#f59e0b,#f97316)!important;
  border-color:rgba(249,115,22,.72)!important;
  box-shadow:0 14px 26px rgba(249,115,22,.15)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family[data-rule-family="ae"] .pro-sire-rule-activation-family-chip.is-active{
  background:linear-gradient(135deg,#10b981,#0ea5e9)!important;
  border-color:rgba(16,185,129,.72)!important;
  box-shadow:0 14px 26px rgba(16,185,129,.15)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-hidden-input,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family input[type="checkbox"]{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  opacity:0!important;
  pointer-events:none!important;
  margin:0!important;
  padding:0!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyRuleActivationButton{
  grid-column:1 / -1!important;
  width:min(420px, 46%)!important;
  min-width:260px!important;
  justify-self:center!important;
  align-self:center!important;
  min-height:42px!important;
  height:42px!important;
  border-radius:999px!important;
  color:#ffffff!important;
  border:0!important;
  background:linear-gradient(135deg,#0891b2,#2563eb)!important;
  box-shadow:0 14px 28px rgba(37,99,235,.18)!important;
  font-size:12px!important;
  font-weight:950!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyRuleActivationButton:hover{
  transform:translateY(-2px)!important;
  box-shadow:0 18px 34px rgba(37,99,235,.23)!important;
}

/* Conservative sticky-header reinforcement only. Do not rebuild the table or add
   grouped headers; keep the current successful table look and bounded scroll. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-scroll{
  scrollbar-gutter:stable!important;
  position:relative!important;
  overflow:auto!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead{
  position:sticky!important;
  top:0!important;
  z-index:180!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead tr{
  position:sticky!important;
  top:0!important;
  z-index:181!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th{
  position:sticky!important;
  top:0!important;
  z-index:182!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th:first-child{
  z-index:210!important;
}

@media(max-width:1280px){
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-grid-v2,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-action,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-scope,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family,
  #proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyRuleActivationButton{
    grid-column:auto!important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyRuleActivationButton{
    grid-column:1 / -1!important;
    width:min(420px, 86%)!important;
  }
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-card{
  position:relative!important;
}

/* ========================================================================== 
   PRO_SYSTEM_BUILDER_001AT — final workspace polish and table focus mode
   Scope: frontend-only. Keep working table/sort/bulk/filter logic intact.
   ========================================================================== */

/* Left command centre: two true version actions, wide and deliberately centred. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-version-action-row{
  width:min(96%, 860px)!important;
  max-width:860px!important;
  margin:0 auto!important;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(300px,1fr))!important;
  gap:18px!important;
  align-items:center!important;
  justify-items:stretch!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-version-action-row .btn{
  width:100%!important;
  min-height:42px!important;
  height:42px!important;
  border-radius:999px!important;
  font-size:12px!important;
  font-weight:950!important;
}

/* Stop the right deck from resizing the whole workspace when tabs change. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workbench-layout-v2{
  align-items:stretch!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-command-centre-v2,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2{
  height:286px!important;
  min-height:286px!important;
  max-height:286px!important;
  overflow:hidden!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2{
  display:grid!important;
  grid-template-rows:36px minmax(0,1fr)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-deck-tabs{
  height:36px!important;
  min-height:36px!important;
  align-items:end!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-deck-tab{
  min-height:34px!important;
  height:34px!important;
  padding:0 10px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-deck-panel{
  height:250px!important;
  min-height:250px!important;
  max-height:250px!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-deck-panel:not(.is-active){
  display:none!important;
}

/* Rule Activation: same visual weight as Bulk Edit, not taller/chunkier. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-panel-activation{
  padding:8px 12px 10px!important;
  background:linear-gradient(180deg,#ecfeff,#f8fcff)!important;
  border-radius:16px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-panel-activation .pro-sire-deck-copy{
  margin:0 0 6px!important;
  min-height:18px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-grid-v2,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-grid{
  display:grid!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:9px!important;
  align-items:stretch!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-action{grid-column:1 / span 2!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-scope{grid-column:3 / span 4!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family{grid-column:span 2!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-card{
  min-height:76px!important;
  padding:9px 12px!important;
  border-radius:17px!important;
  gap:7px!important;
  justify-content:center!important;
  align-items:center!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-card > span{
  min-height:10px!important;
  font-size:9px!important;
  line-height:1!important;
  margin:0!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-chips{
  gap:8px!important;
  width:100%!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-chip,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-scope-chip,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family-chip{
  min-height:32px!important;
  height:32px!important;
  padding:0 12px!important;
  font-size:10.5px!important;
  border-radius:999px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyRuleActivationButton{
  grid-column:1 / -1!important;
  width:min(380px, 42%)!important;
  min-width:250px!important;
  min-height:34px!important;
  height:34px!important;
  margin:0 auto!important;
  justify-self:center!important;
  align-self:center!important;
  border-radius:999px!important;
  color:#ffffff!important;
  background:linear-gradient(135deg,#0891b2,#2563eb)!important;
  box-shadow:0 12px 24px rgba(37,99,235,.16)!important;
}

/* Query Filters: make the count a slim centred status line instead of a tall chip. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-deck-panel-filters .pro-sire-query-filter-bar{
  height:100%!important;
  padding:8px 12px 10px!important;
  box-sizing:border-box!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-filter-grid{
  grid-template-columns:minmax(132px,.9fr) minmax(106px,.62fr) minmax(128px,.74fr) minmax(300px,1.8fr) minmax(128px,.72fr)!important;
  gap:9px!important;
  align-items:stretch!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 #proSireQueryFilterCount{
  grid-column:1 / -1!important;
  min-height:18px!important;
  height:18px!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  color:#2563eb!important;
  font-size:10.5px!important;
  font-weight:900!important;
  letter-spacing:.01em!important;
}

/* Table tools and focus mode. The same table is used; no duplicate/cloned table. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-table-tools{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  padding:8px 12px!important;
  margin:6px 0 0!important;
  border:1px solid rgba(147,197,253,.55)!important;
  border-radius:14px 14px 0 0!important;
  background:linear-gradient(180deg,#f8fcff,#eef9ff)!important;
  box-shadow:0 8px 18px rgba(15,23,42,.045)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-table-tools-copy{
  display:flex!important;
  flex-direction:column!important;
  gap:2px!important;
  min-width:0!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-table-tools-copy strong{
  text-transform:uppercase!important;
  letter-spacing:.09em!important;
  font-size:10px!important;
  color:#075985!important;
  font-weight:950!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-table-tools-copy span{
  font-size:11px!important;
  color:#475569!important;
  font-weight:700!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-table-focus-toggle{
  min-width:150px!important;
  min-height:32px!important;
  border-radius:999px!important;
  border:1px solid rgba(14,165,233,.48)!important;
  background:linear-gradient(135deg,#ffffff,#ecfeff)!important;
  color:#075985!important;
  font-size:11px!important;
  font-weight:950!important;
  cursor:pointer!important;
  box-shadow:0 8px 18px rgba(14,165,233,.10)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-table-focus-toggle:hover{
  transform:translateY(-1px)!important;
  box-shadow:0 12px 24px rgba(14,165,233,.16)!important;
}
html.pro-sire-table-focus-mode,
body.pro-sire-table-focus-mode{
  overflow:hidden!important;
}
/* D4-H4: retired obsolete fixed-offset table-focus geometry. */

@media(max-width:1280px){
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-command-centre-v2,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2{
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-deck-panel{
    height:auto!important;
    min-height:220px!important;
    max-height:none!important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-version-action-row{
    grid-template-columns:1fr!important;
    width:min(96%, 520px)!important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-grid-v2,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-action,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-scope,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family,
  #proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyRuleActivationButton{
    grid-column:auto!important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyRuleActivationButton{
    grid-column:1 / -1!important;
    width:min(420px, 86%)!important;
  }
}


/* ========================================================================== 
   PRO_SYSTEM_BUILDER_001AU — final micro-polish after 001AT
   Scope: CSS only. Keep working table, sorting, Bulk Edit, Rule Activation,
   Query Filters and Apply/Undo logic intact.
   ========================================================================== */

/* Left command centre: centre the two important SIRE version actions and give
   them enough width to look intentional inside the larger command card. */
#proSireQueryGridPanel.pro-sire-workspace-open #proSireSettingsToolbar .pro-sire-settings-actions.pro-sire-version-action-row.pro-sire-command-row-v2{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(280px,1fr))!important;
  width:min(78%, 780px)!important;
  max-width:780px!important;
  margin:0 auto!important;
  gap:20px!important;
  align-items:center!important;
  justify-content:center!important;
  justify-items:stretch!important;
  padding:0!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireSettingsToolbar .pro-sire-settings-actions.pro-sire-version-action-row.pro-sire-command-row-v2 .btn{
  width:100%!important;
  min-width:0!important;
  min-height:42px!important;
  height:42px!important;
  border-radius:999px!important;
}

/* Query Filters: remove the visual card from the query count and anchor it as
   one slim centred line under the five filter cards. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-deck-panel-filters .pro-sire-query-filter-bar{
  position:relative!important;
  overflow:hidden!important;
  padding-bottom:24px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-deck-panel-filters .pro-sire-filter-grid{
  height:calc(100% - 18px)!important;
  min-height:0!important;
  align-items:stretch!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-deck-panel-filters #proSireQueryFilterCount{
  position:absolute!important;
  left:0!important;
  right:0!important;
  bottom:5px!important;
  top:auto!important;
  width:auto!important;
  max-width:none!important;
  min-width:0!important;
  min-height:14px!important;
  height:14px!important;
  line-height:14px!important;
  padding:0!important;
  margin:0!important;
  grid-column:auto!important;
  justify-self:auto!important;
  align-self:auto!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
  outline:0!important;
  display:block!important;
  text-align:center!important;
  color:#2563eb!important;
  font-size:10px!important;
  font-weight:900!important;
  letter-spacing:.01em!important;
  white-space:nowrap!important;
  pointer-events:none!important;
}

/* D4-H4: retired obsolete fixed-offset table-focus geometry. */

@media(max-width:1280px){
  #proSireQueryGridPanel.pro-sire-workspace-open #proSireSettingsToolbar .pro-sire-settings-actions.pro-sire-version-action-row.pro-sire-command-row-v2{
    width:min(96%, 560px)!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
  }
/* D4-H4: retired obsolete fixed-offset table-focus geometry. */
}


/* ==========================================================================
   PRO_SYSTEM_BUILDER_001AV — final handoff polish
   Scope: normal page table flow, Rule Activation default tab/order and safe
   no-version all-off starting state. Keep focus mode, sorting and controls.
   ========================================================================== */

/* Normal workspace: the query grid now flows down the page. The inner vertical
   table scrollbar is deliberately removed because Table Focus handles the
   large-table working mode. */
#proSireQueryGridPanel.pro-sire-workspace-open:not(.pro-sire-table-focus-mode) .pro-sire-query-grid-scroll{
  position:relative!important;
  display:block!important;
  height:auto!important;
  max-height:none!important;
  min-height:0!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  scrollbar-gutter:auto!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open:not(.pro-sire-table-focus-mode) .pro-sire-query-grid-table{
  margin-bottom:18px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open:not(.pro-sire-table-focus-mode) .pro-sire-query-grid-table thead,
#proSireQueryGridPanel.pro-sire-workspace-open:not(.pro-sire-table-focus-mode) .pro-sire-query-grid-table thead tr,
#proSireQueryGridPanel.pro-sire-workspace-open:not(.pro-sire-table-focus-mode) .pro-sire-query-grid-table thead th{
  position:static!important;
  top:auto!important;
}

/* D4-H4: retired obsolete fixed-offset table-focus geometry. */

/* Left command centre: final centre/widen pass for the two true version actions. */
#proSireQueryGridPanel.pro-sire-workspace-open #proSireSettingsToolbar .pro-sire-settings-actions.pro-sire-version-action-row.pro-sire-command-row-v2{
  width:min(86%, 920px)!important;
  max-width:920px!important;
  margin-left:auto!important;
  margin-right:auto!important;
  grid-template-columns:repeat(2,minmax(320px,1fr))!important;
  gap:24px!important;
  justify-content:center!important;
  justify-items:stretch!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireSettingsToolbar .pro-sire-settings-actions.pro-sire-version-action-row.pro-sire-command-row-v2 .btn{
  min-height:44px!important;
  height:44px!important;
}

/* Right-deck tab order/default polish: Rule Activation is now the lead tab. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2 .pro-sire-deck-tabs{
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
}

@media(max-width:1280px){
  #proSireQueryGridPanel.pro-sire-workspace-open #proSireSettingsToolbar .pro-sire-settings-actions.pro-sire-version-action-row.pro-sire-command-row-v2{
    width:min(96%, 620px)!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
  }
}

/* ========================================================================== 
   PRO_SYSTEM_BUILDER_001AY — normal-page table wheel target correction
   Scope: restore normal horizontal table overflow while routing vertical wheel
   movement to #proSireQueryGridPanel in JavaScript. Focus Mode stays internal.
   ========================================================================== */

#proSireQueryGridPanel.pro-sire-workspace-open:not(.pro-sire-table-focus-mode) .pro-sire-query-grid-scroll{
  overflow-x:auto!important;
  overflow-y:visible!important;
  overscroll-behavior:auto!important;
  -webkit-overflow-scrolling:auto!important;
}

body.pro-sire-table-focus-mode #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-scroll{
  overflow:auto!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
}


/* PRO_SYSTEM_BUILDER_002A — baseline-first SIRE workflow shell */
body[data-workspace-mode="pro_system_builder"] #builder-actions .section-kicker{
  color:#075985!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .report-card-heading{
  letter-spacing:.16em!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .report-control-card:not(.pro-sire-analysis-card) .report-option:first-child .btn{
  background:linear-gradient(135deg,#0f766e,#2563eb)!important;
  color:#fff!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .report-control-card:not(.pro-sire-analysis-card) .report-option:first-child .report-option-copy::before{
  content:"Step 1 — Commit the baseline. ";
  color:#0f766e;
  font-weight:950;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .report-control-card:not(.pro-sire-analysis-card) .report-option:nth-child(2) .report-option-copy::before{
  content:"Diagnostic only. ";
  color:#7c2d12;
  font-weight:950;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-process-card{
  border-color:rgba(16,185,129,.32)!important;
  background:linear-gradient(180deg,#f0fdfa 0%,#ffffff 52%,#eff6ff 100%)!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-process-card .report-card-heading{
  color:#065f46!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-process-steps span:nth-child(2),
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-process-steps span:nth-child(3){
  border-color:rgba(16,185,129,.30)!important;
  background:linear-gradient(180deg,#ecfdf5,#ffffff)!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-process-steps span:nth-child(2) b,
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-process-steps span:nth-child(3) b{
  background:#10b981!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions #buildProSnapshotButton{
  background:linear-gradient(135deg,#10b981,#0ea5e9,#2563eb)!important;
  color:#fff!important;
  box-shadow:0 16px 34px rgba(14,165,233,.20)!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions #buildProSnapshotButton:disabled{
  opacity:.68!important;
  cursor:wait!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-workspace-launch{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  border-color:rgba(16,185,129,.26)!important;
  background:linear-gradient(135deg,#ecfdf5,#f8fbff 60%,#eff6ff)!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-workspace-launch.is-disabled{
  border-color:rgba(148,163,184,.32)!important;
  background:linear-gradient(135deg,#f8fafc,#ffffff)!important;
  opacity:.82!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-workspace-launch.is-disabled #openProSireWorkspaceButton{
  background:#e2e8f0!important;
  color:#64748b!important;
  border-color:#cbd5e1!important;
  box-shadow:none!important;
  cursor:not-allowed!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-workspace-launch.is-ready{
  border-color:rgba(16,185,129,.42)!important;
  box-shadow:0 12px 26px rgba(16,185,129,.10)!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-workspace-launch.is-ready #openProSireWorkspaceButton,
.quick-report-window-actions .mini-button.pro-sire-quick-action{
  background:linear-gradient(135deg,#16a34a,#10b981)!important;
  color:#fff!important;
  border:1px solid rgba(21,128,61,.25)!important;
  box-shadow:0 10px 22px rgba(22,163,74,.20)!important;
}
.quick-report-window-actions .mini-button.pro-sire-quick-action:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 28px rgba(22,163,74,.26)!important;
}
.quick-report-window-actions .mini-button.pro-sire-quick-action:disabled,
.quick-report-window-actions .mini-button.pro-sire-quick-action.is-disabled,
.quick-report-window-actions .mini-button.pro-sire-quick-action[aria-disabled="true"]{
  background:#e2e8f0!important;
  color:#64748b!important;
  border-color:#cbd5e1!important;
  box-shadow:none!important;
  cursor:not-allowed!important;
  opacity:.82!important;
  transform:none!important;
}
.quick-report-window-actions .mini-button.pro-sire-quick-action:disabled:hover,
.quick-report-window-actions .mini-button.pro-sire-quick-action.is-disabled:hover,
.quick-report-window-actions .mini-button.pro-sire-quick-action[aria-disabled="true"]:hover{
  transform:none!important;
  box-shadow:none!important;
}
.quick-report-window-actions .mini-button.pro-sire-quick-action.hidden{display:none!important;}
@media(max-width:1000px){
  body[data-workspace-mode="pro_system_builder"] #builder-actions .pro-sire-workspace-launch{grid-template-columns:1fr!important;}
}

/* PRO_SYSTEM_BUILDER_002A — ordered Pro action path refinements */
#builder-actions .report-option.pro-only{display:none!important;}
body[data-workspace-mode="pro_system_builder"] #builder-actions .report-option.pro-only{display:grid!important;}
body[data-workspace-mode="pro_system_builder"] #builder-actions .report-control-card:not(.pro-sire-analysis-card) .report-option:nth-child(2) .report-option-copy::before{
  content:"Step 2 — Prepare SIRE. "!important;
  color:#047857!important;
  font-weight:950!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .report-control-card:not(.pro-sire-analysis-card) .report-option:nth-child(3) .report-option-copy::before{
  content:"Diagnostic only. "!important;
  color:#7c2d12!important;
  font-weight:950!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .report-control-card:not(.pro-sire-analysis-card) .report-option.pro-sire-baseline-option{
  border-color:rgba(16,185,129,.32)!important;
  background:linear-gradient(135deg,#ecfdf5,#ffffff 58%,#eff6ff)!important;
}
body[data-workspace-mode="pro_system_builder"] #builder-actions .report-control-card:not(.pro-sire-analysis-card) #buildProSnapshotButton{
  background:linear-gradient(135deg,#10b981,#0ea5e9,#2563eb)!important;
  color:#fff!important;
  box-shadow:0 16px 34px rgba(14,165,233,.18)!important;
}

/* PRO_SYSTEM_BUILDER_002D — applied SIRE report context banner */
.pro-sire-report-context-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  margin: 0 0 12px;
  border: 1px solid rgba(16, 185, 129, 0.32);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(14, 165, 233, 0.10));
  color: #075f4f;
  font-weight: 800;
}

.pro-sire-report-context-banner span {
  font-size: 12px;
  color: #31576d;
  font-weight: 700;
  text-align: right;
}

@media (max-width: 900px) {
  .pro-sire-report-context-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .pro-sire-report-context-banner span {
    text-align: left;
  }
}


/* 002F — Pro SIRE working-draft leave guard */
.pro-sire-unsaved-dialog {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.pro-sire-unsaved-dialog.hidden { display: none; }
.pro-sire-unsaved-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 16, 32, 0.48);
  backdrop-filter: blur(8px);
}
.pro-sire-unsaved-dialog-panel {
  position: relative;
  width: min(520px, calc(100vw - 48px));
  border-radius: 22px;
  padding: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border: 1px solid rgba(14, 165, 233, 0.25);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
  color: #12233f;
}
.pro-sire-unsaved-kicker {
  display: block;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #0f8fb8;
  margin-bottom: 8px;
}
.pro-sire-unsaved-dialog-panel h3 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.15;
}
.pro-sire-unsaved-dialog-panel p {
  margin: 0 0 18px;
  color: #506078;
  font-size: 14px;
  line-height: 1.45;
}
.pro-sire-unsaved-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 0.8fr;
  gap: 10px;
}
.pro-sire-unsaved-actions .btn {
  min-height: 40px;
}
@media (max-width: 640px) {
  .pro-sire-unsaved-actions { grid-template-columns: 1fr; }
}

/* PRO_SYSTEM_BUILDER_002G — Pro SIRE preparation progress strip */
.quick-status-bar.pro-sire-prep-progress-bar {
  padding: 12px;
}
.pro-sire-prep-progress-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}
.pro-sire-prep-step {
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 12px;
  padding: 8px 9px;
  background: rgba(15, 23, 42, 0.04);
  min-height: 54px;
}
.pro-sire-prep-step b,
.pro-sire-prep-step em {
  display: block;
  line-height: 1.2;
}
.pro-sire-prep-step b {
  font-size: 12px;
  font-weight: 800;
}
.pro-sire-prep-step em {
  margin-top: 4px;
  font-size: 11px;
  font-style: normal;
  opacity: 0.78;
}
.pro-sire-prep-step.is-complete {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.11);
}
.pro-sire-prep-step.is-running {
  border-color: rgba(59, 130, 246, 0.55);
  background: rgba(59, 130, 246, 0.11);
}
.pro-sire-prep-step.is-skipped {
  opacity: 0.68;
  background: rgba(148, 163, 184, 0.10);
}
.pro-sire-prep-progress-bar p {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}
@media (max-width: 1100px) {
  .pro-sire-prep-progress-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .pro-sire-prep-progress-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* PRO_SYSTEM_BUILDER_002H — SIRE preparation progress belongs in report overlay, using detailed-analysis progress card styling */
.pro-sire-prep-card.hidden {
  display: none !important;
}
.pro-sire-prep-card {
  border-color: rgba(34, 197, 94, 0.22) !important;
  background: rgba(240, 253, 250, 0.44) !important;
}
.pro-sire-prep-card .card-title {
  color: #065f46 !important;
}
.detailed-progress-step.skipped {
  opacity: 0.74;
  border-color: rgba(148, 163, 184, 0.32);
  background: rgba(248, 250, 252, 0.82);
  color: #64748b;
}
.detailed-progress-step.skipped span {
  background: rgba(148, 163, 184, 0.16);
}
.quick-status-bar.pro-sire-prep-progress-bar .pro-sire-prep-progress-grid {
  display: none !important;
}

/* ==========================================================================
   PRO_SYSTEM_BUILDER_002J — SIRE query-grid impact selector and source sort fix
   ========================================================================== */
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-table-tools{
  display:grid!important;
  grid-template-columns:minmax(220px,1fr) minmax(540px,auto) auto!important;
  gap:10px!important;
  align-items:center!important;
}
.pro-sire-impact-basis-tools{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:6px!important;
  flex-wrap:wrap!important;
}
.pro-sire-impact-basis-tools > span{
  font-size:10px!important;
  font-weight:900!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
  color:#0f4c81!important;
  margin-right:2px!important;
}
.pro-sire-impact-basis-chip{
  appearance:none!important;
  border:1px solid rgba(14,165,233,.28)!important;
  background:#fff!important;
  color:#0f4c81!important;
  border-radius:999px!important;
  min-height:28px!important;
  padding:0 10px!important;
  font-size:10px!important;
  font-weight:900!important;
  cursor:pointer!important;
  box-shadow:0 3px 8px rgba(15,76,129,.05)!important;
}
.pro-sire-impact-basis-chip:hover{
  background:#eff6ff!important;
  border-color:rgba(37,99,235,.45)!important;
}
.pro-sire-impact-basis-chip.is-active{
  color:#fff!important;
  border-color:rgba(37,99,235,.62)!important;
  background:linear-gradient(135deg,#0ea5e9,#2563eb)!important;
  box-shadow:0 6px 14px rgba(37,99,235,.18)!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-bulk-card-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  margin-bottom:6px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-bulk-card-head .pro-sire-rule-switch{
  margin:0!important;
}
.pro-sire-bulk-reset-button{
  border:1px solid rgba(14,165,233,.24)!important;
  background:#fff!important;
  color:#0f4c81!important;
  border-radius:999px!important;
  min-height:24px!important;
  padding:0 8px!important;
  font-size:9px!important;
  font-weight:900!important;
  cursor:pointer!important;
  white-space:nowrap!important;
}
.pro-sire-bulk-reset-button:hover{
  background:#eff6ff!important;
  border-color:rgba(37,99,235,.45)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-minmax{
  grid-template-columns:repeat(2,minmax(118px,1fr))!important;
  gap:8px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-minmax label{
  grid-template-columns:42px minmax(86px,1fr)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-minmax input{
  width:86px!important;
  min-width:86px!important;
  max-width:96px!important;
}
@media(max-width:1300px){
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-table-tools{
    grid-template-columns:1fr!important;
  }
  .pro-sire-impact-basis-tools{
    justify-content:flex-start!important;
  }
}

/* PRO_SYSTEM_BUILDER_002K — impact-basis semantics and rule-activation pending state */
#proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyRuleActivationButton[disabled],
#proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyRuleActivationButton[aria-disabled="true"]{
  opacity:.48!important;
  cursor:not-allowed!important;
  filter:grayscale(.25)!important;
  box-shadow:none!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyRuleActivationButton.is-dirty:not([disabled]){
  opacity:1!important;
  cursor:pointer!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-impact-basis-tools{
  flex-wrap:wrap!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-impact-basis-chip[title]{
  cursor:pointer;
}

/* ==========================================================================
   PRO_SYSTEM_BUILDER_002L — SIRE workspace layout and family comparison
   ========================================================================== */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-premium-cockpit-3{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-card{
  min-height:128px!important;
  padding:14px 16px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-hero b{
  font-size:25px!important;
  line-height:1!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-rail-wide{
  display:grid!important;
  grid-template-columns:repeat(7,minmax(70px,1fr))!important;
  gap:8px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-rail-wide span{
  min-width:0!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-rail-wide span b{
  font-size:13px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-rail-wide span em{
  font-size:8px!important;
  letter-spacing:.07em!important;
}
#proSireWorkflowNote{display:none!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-apply-strip{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:10px!important;
  align-items:center!important;
  margin:8px 8px 12px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-apply-strip .quick-status-bar{
  margin:0!important;
  min-height:34px!important;
  display:flex!important;
  align-items:center!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-apply-strip-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-apply-strip-actions .btn{
  min-height:32px!important;
  padding:0 18px!important;
  border-radius:999px!important;
  font-size:10px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workbench-layout-v2{
  grid-template-columns:minmax(420px,.92fr) minmax(680px,1.58fr)!important;
  gap:12px!important;
  margin:0 8px 12px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-comparison-card{
  min-height:176px!important;
  align-content:start!important;
}
.pro-sire-family-comparison-panel{
  display:block!important;
  margin-top:8px!important;
}
.pro-sire-family-comparison-empty{
  border:1px dashed rgba(14,116,144,.28)!important;
  background:linear-gradient(135deg,rgba(240,253,250,.9),rgba(239,246,255,.9))!important;
  color:#0f4c81!important;
  border-radius:14px!important;
  padding:16px!important;
  font-size:11px!important;
  font-weight:800!important;
  line-height:1.35!important;
}
.pro-sire-family-comparison-note{
  color:#475569!important;
  font-size:10px!important;
  line-height:1.35!important;
  font-weight:800!important;
  margin:0 0 8px!important;
}
.pro-sire-family-comparison-table{
  width:100%!important;
  border-collapse:separate!important;
  border-spacing:0!important;
  overflow:hidden!important;
  border:1px solid rgba(14,165,233,.18)!important;
  border-radius:14px!important;
  background:#fff!important;
  font-size:10px!important;
}
.pro-sire-family-comparison-table th,
.pro-sire-family-comparison-table td{
  padding:8px 7px!important;
  border-bottom:1px solid rgba(226,232,240,.9)!important;
  text-align:right!important;
  white-space:nowrap!important;
}
.pro-sire-family-comparison-table th:first-child,
.pro-sire-family-comparison-table td:first-child{
  text-align:left!important;
}
.pro-sire-family-comparison-table thead th{
  background:#f0f9ff!important;
  color:#0f4c81!important;
  font-size:8px!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
  font-weight:950!important;
}
.pro-sire-family-comparison-table tbody th{
  color:#12324a!important;
  font-weight:950!important;
}
.pro-sire-family-comparison-table tr.is-combined th,
.pro-sire-family-comparison-table tr.is-combined td{
  background:#ecfeff!important;
  font-weight:950!important;
  border-top:1px solid rgba(14,165,233,.25)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-pause-focus-layout{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:12px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-pause-focus-block{
  border:1px solid rgba(14,165,233,.18)!important;
  background:rgba(255,255,255,.72)!important;
  border-radius:14px!important;
  padding:12px!important;
  display:grid!important;
  gap:8px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-pause-focus-block > strong{
  color:#0f4c81!important;
  font-size:10px!important;
  text-transform:uppercase!important;
  letter-spacing:.1em!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-pause-focus-block > span{
  color:#475569!important;
  font-size:10px!important;
  line-height:1.35!important;
  font-weight:750!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-pause-focus-block .pro-sire-lab-mode-strip,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-pause-focus-block .pro-sire-family-pause-bar{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-setup-diagnostics{
  margin-top:10px!important;
  display:grid!important;
  gap:8px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-copy-compact{
  padding:8px 10px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-table-tools{
  grid-template-columns:minmax(260px,360px) minmax(0,1fr) auto!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-table-tools-copy{
  min-width:260px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-impact-basis-tools{
  justify-content:center!important;
  min-width:640px!important;
}
@media(max-width:1500px){
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workbench-layout-v2{grid-template-columns:1fr!important;}
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-premium-cockpit-3{grid-template-columns:1fr!important;}
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-rail-wide{grid-template-columns:repeat(4,minmax(0,1fr))!important;}
}
@media(max-width:1200px){
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-pause-focus-layout{grid-template-columns:1fr!important;}
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-table-tools{grid-template-columns:1fr!important;}
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-impact-basis-tools{justify-content:flex-start!important;min-width:0!important;}
}

/* ========================================================================
   PRO_SYSTEM_BUILDER_002M — SIRE workspace visual tidy and control alignment
   ======================================================================== */
#proSireQueryGridPanel.pro-sire-workspace-open{
  --sire-win-bg:#eef6ff;
  --sire-win-border:#bfdbfe;
  --sire-win-text:#1e3a8a;
  --sire-zero-bg:#fff7ed;
  --sire-zero-border:#fed7aa;
  --sire-zero-text:#92400e;
  --sire-ae-bg:#f5f3ff;
  --sire-ae-border:#ddd6fe;
  --sire-ae-text:#5b21b6;
  --sire-tab-active-bg:#fff7ed;
  --sire-tab-active-border:#fdba74;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-top{
  min-height:76px!important;
  padding:12px 16px!important;
  gap:12px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:10px!important;
  margin-left:auto!important;
  min-width:max-content!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-actions .btn{
  min-height:34px!important;
  padding:0 18px!important;
  border-radius:999px!important;
  font-size:10.5px!important;
  font-weight:950!important;
  box-shadow:0 10px 22px rgba(15,23,42,.14)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-actions .report-table-group-count{
  min-height:28px!important;
  display:inline-flex!important;
  align-items:center!important;
  margin-right:4px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyChangesButton:disabled,
#proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyChangesButton[aria-disabled="true"]{
  opacity:.45!important;
  cursor:not-allowed!important;
  filter:grayscale(.35)!important;
  box-shadow:none!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyChangesButton.is-dirty:not(:disabled){
  opacity:1!important;
  cursor:pointer!important;
  filter:none!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyStatus.pro-sire-hidden-status{
  display:none!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-apply-strip{
  display:none!important;
}

/* Larger, calmer top cockpit cards */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-premium-cockpit-3{
  gap:14px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-card{
  min-height:154px!important;
  padding:18px 20px!important;
  border-radius:20px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-card-eyebrow{
  margin-bottom:5px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-title-row{
  margin-bottom:4px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-title-row strong{
  font-size:17px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-hero{
  margin:4px 0 12px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-hero b{
  font-size:31px!important;
  letter-spacing:-.035em!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-rail-wide{
  grid-template-columns:repeat(7,minmax(74px,1fr))!important;
  gap:9px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-rail-wide span{
  min-height:42px!important;
  padding:7px 8px!important;
}

/* Control deck: remove the heavy blue slab and make tabs obvious */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-panel,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-panel.is-active{
  background:transparent!important;
  box-shadow:none!important;
  overflow:visible!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-panel{
  border:1px solid rgba(191,219,254,.70)!important;
  border-radius:16px!important;
  padding:14px 16px!important;
  margin-top:-1px!important;
  background:linear-gradient(180deg,#ffffff,#f8fdff)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-copy{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:10px!important;
  text-align:center!important;
  padding:0 0 10px!important;
  background:transparent!important;
  border:0!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-copy strong{
  display:none!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-copy span{
  max-width:900px!important;
  color:#475569!important;
  font-size:10.5px!important;
  line-height:1.35!important;
  font-weight:800!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-tab{
  background:#f8fbff!important;
  border:1px solid rgba(191,219,254,.84)!important;
  color:#0f4c81!important;
  transition:background .15s ease,border-color .15s ease,transform .15s ease!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-tab.is-active{
  background:var(--sire-tab-active-bg)!important;
  border-color:var(--sire-tab-active-border)!important;
  color:#7c2d12!important;
  box-shadow:0 10px 24px rgba(251,146,60,.18), inset 0 1px 0 rgba(255,255,255,.92)!important;
  transform:translateY(-1px)!important;
}

/* Pause/focus: two clear rows, fixed Win → 0-from → A/E family order */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-pause-focus-layout{
  grid-template-columns:1fr!important;
  gap:12px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-pause-focus-block{
  padding:13px 14px!important;
  gap:8px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-pause-focus-block .pro-sire-lab-mode-strip{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-pause-focus-block .pro-sire-family-pause-bar{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:10px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-mode,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-pause-bar .btn{
  min-height:32px!important;
  border-radius:12px!important;
  font-size:10px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-mode[data-pro-sire-lab="win"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-pause-bar [data-pro-sire-family-pause="win"]{background:var(--sire-win-bg)!important;border-color:var(--sire-win-border)!important;color:var(--sire-win-text)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-mode[data-pro-sire-lab="zero"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-pause-bar [data-pro-sire-family-pause="zero"]{background:var(--sire-zero-bg)!important;border-color:var(--sire-zero-border)!important;color:var(--sire-zero-text)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-mode[data-pro-sire-lab="ae"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-pause-bar [data-pro-sire-family-pause="ae"]{background:var(--sire-ae-bg)!important;border-color:var(--sire-ae-border)!important;color:var(--sire-ae-text)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-mode[data-pro-sire-lab="combined"].is-active{
  background:linear-gradient(135deg,#e0f2fe,#dbeafe)!important;
  border-color:#93c5fd!important;
  color:#1e3a8a!important;
}

/* Family colour system and lighter control chips */
#proSireQueryGridPanel.pro-sire-workspace-open [data-rule-family="win"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-threshold-head-win,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-col-win,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-source-damage-cell[data-source-family="win"]{
  background:var(--sire-win-bg)!important;
  border-color:var(--sire-win-border)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open [data-rule-family="zero"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-threshold-head-zero,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-col-zero,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-source-damage-cell[data-source-family="zero"]{
  background:var(--sire-zero-bg)!important;
  border-color:var(--sire-zero-border)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open [data-rule-family="ae"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-threshold-head-ae,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-col-ae,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-source-damage-cell[data-source-family="ae"]{
  background:var(--sire-ae-bg)!important;
  border-color:var(--sire-ae-border)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-card,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-rule-card{
  padding:10px 12px!important;
  border-radius:15px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-grid-v2{
  gap:10px!important;
  align-items:center!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-chip,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-scope-chip,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family-chip,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-scope-chip{
  min-height:29px!important;
  border-radius:12px!important;
  font-size:10px!important;
  box-shadow:none!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-chip.is-active,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-scope-chip.is-active,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-scope-chip.is-active{
  background:#e0f2fe!important;
  border-color:#93c5fd!important;
  color:#075985!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family-chip[data-pro-sire-rule-family="win"].is-active,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family-chip[data-pro-sire-rule-family="win"][aria-pressed="true"]{background:var(--sire-win-bg)!important;border-color:var(--sire-win-border)!important;color:var(--sire-win-text)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family-chip[data-pro-sire-rule-family="zero"].is-active,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family-chip[data-pro-sire-rule-family="zero"][aria-pressed="true"]{background:var(--sire-zero-bg)!important;border-color:var(--sire-zero-border)!important;color:var(--sire-zero-text)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family-chip[data-pro-sire-rule-family="ae"].is-active,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family-chip[data-pro-sire-rule-family="ae"][aria-pressed="true"]{background:var(--sire-ae-bg)!important;border-color:var(--sire-ae-border)!important;color:var(--sire-ae-text)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyRuleActivationButton,
#proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyBulkButton{
  min-height:30px!important;
  padding:0 18px!important;
  border-radius:999px!important;
}

/* Table family read columns in consistent Win → 0-from → A/E order/colour */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead .pro-sire-threshold-head-win,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table tbody .pro-sire-threshold-bundle[data-rule-family="win"]{background:var(--sire-win-bg)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead .pro-sire-threshold-head-zero,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table tbody .pro-sire-threshold-bundle[data-rule-family="zero"]{background:var(--sire-zero-bg)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead .pro-sire-threshold-head-ae,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table tbody .pro-sire-threshold-bundle[data-rule-family="ae"]{background:var(--sire-ae-bg)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th[data-pro-sire-sort="win_rule"]{background:var(--sire-win-bg)!important;color:var(--sire-win-text)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th[data-pro-sire-sort="zero_rule"]{background:var(--sire-zero-bg)!important;color:var(--sire-zero-text)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th[data-pro-sire-sort="ae_rule"]{background:var(--sire-ae-bg)!important;color:var(--sire-ae-text)!important;}

/* Rule family comparison can now show one family plus combined unique */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-comparison-card{
  min-height:194px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-comparison-table tbody tr[data-family="win"] th,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-comparison-table tbody tr[data-family="win"] td{background:var(--sire-win-bg)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-comparison-table tbody tr[data-family="zero"] th,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-comparison-table tbody tr[data-family="zero"] td{background:var(--sire-zero-bg)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-comparison-table tbody tr[data-family="ae"] th,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-comparison-table tbody tr[data-family="ae"] td{background:var(--sire-ae-bg)!important;}

@media(max-width:1500px){
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-actions{flex-wrap:wrap!important;justify-content:flex-start!important;}
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-rail-wide{grid-template-columns:repeat(4,minmax(0,1fr))!important;}
}
@media(max-width:1200px){
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-pause-focus-block .pro-sire-lab-mode-strip,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-pause-focus-block .pro-sire-family-pause-bar{grid-template-columns:1fr!important;}
}
/* 002M closeout: keep the old text status node non-visual; state is represented by the header buttons and comparison card. */
#proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyStatus{
  display:none!important;
}


/* ========================================================================
   PRO_SYSTEM_BUILDER_002N — SIRE workspace design-system and clipping fix
   Frontend-only visual consolidation. Do not alter SIRE Apply logic or grid scroll.
   ======================================================================== */
#proSireQueryGridPanel.pro-sire-workspace-open{
  --sire-win-bg:#eef6ff;
  --sire-win-bg-strong:#e1efff;
  --sire-win-border:#9ec5fe;
  --sire-win-text:#1d4ed8;
  --sire-zero-bg:#fff7ed;
  --sire-zero-bg-strong:#ffedd5;
  --sire-zero-border:#fdba74;
  --sire-zero-text:#9a3412;
  --sire-ae-bg:#f5f3ff;
  --sire-ae-bg-strong:#ede9fe;
  --sire-ae-border:#c4b5fd;
  --sire-ae-text:#6d28d9;
  --sire-panel-border:#bfdbfe;
  --sire-soft-blue:#f8fbff;
  --sire-active-tab-bg:#fff7ed;
  --sire-active-tab-border:#fb923c;
  --sire-active-tab-text:#7c2d12;
}

/* Premium top action bar: stable action group, no status-strip dependency. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-top{
  grid-template-columns:auto minmax(360px,1fr) auto!important;
  min-height:84px!important;
  padding:14px 18px!important;
  gap:14px!important;
  align-items:center!important;
  overflow:visible!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-title-block h2{font-size:22px!important;letter-spacing:-.02em!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-title-block p{font-size:11px!important;line-height:1.3!important;opacity:.88!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-actions{
  display:grid!important;
  grid-template-columns:auto auto auto!important;
  gap:10px!important;
  align-items:center!important;
  justify-content:end!important;
  min-width:0!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-actions .report-table-group-count{
  height:30px!important;
  padding:0 14px!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.9)!important;
  border:1px solid rgba(255,255,255,.72)!important;
  color:#075985!important;
  box-shadow:0 8px 18px rgba(15,23,42,.12)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireUndoButton,
#proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyChangesButton{
  height:34px!important;
  min-height:34px!important;
  padding:0 18px!important;
  border-radius:999px!important;
  font-size:10px!important;
  letter-spacing:.02em!important;
  white-space:nowrap!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireUndoButton{
  background:rgba(255,255,255,.72)!important;
  color:#075985!important;
  border:1px solid rgba(186,230,253,.9)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyChangesButton:disabled,
#proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyChangesButton[aria-disabled="true"]{
  background:#dbe8ef!important;
  color:#7c95a8!important;
  border:1px solid #cbd5e1!important;
  opacity:1!important;
  cursor:not-allowed!important;
  box-shadow:none!important;
  filter:none!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyChangesButton.is-dirty:not(:disabled){
  background:linear-gradient(135deg,#16a34a,#0ea5e9)!important;
  color:#fff!important;
  border:1px solid rgba(255,255,255,.22)!important;
  box-shadow:0 12px 28px rgba(14,165,233,.28)!important;
}

/* Top cockpit cards: more height, clearer metric rhythm. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-overview{padding:14px 10px 8px!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-premium-cockpit-3{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:16px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-card{
  min-height:176px!important;
  padding:20px 22px!important;
  border-radius:22px!important;
  border:1px solid rgba(191,219,254,.92)!important;
  background:linear-gradient(180deg,#fff 0%,#f8fbff 100%)!important;
  box-shadow:0 14px 34px rgba(15,23,42,.08)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-card-eyebrow{font-size:9.5px!important;letter-spacing:.105em!important;margin-bottom:8px!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-title-row{align-items:flex-start!important;margin-bottom:8px!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-title-row strong{font-size:18px!important;letter-spacing:-.02em!important;line-height:1.08!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-title-row span{font-size:9px!important;letter-spacing:.09em!important;line-height:1.25!important;text-align:right!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-hero{margin:8px 0 14px!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-hero b{font-size:34px!important;letter-spacing:-.045em!important;line-height:.95!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-hero em{font-size:8.5px!important;letter-spacing:.08em!important;margin-top:4px!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-rail-wide{
  grid-template-columns:repeat(7,minmax(64px,1fr))!important;
  gap:8px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-rail-wide span{
  min-height:46px!important;
  border-radius:14px!important;
  padding:8px 7px!important;
  background:rgba(248,250,252,.86)!important;
  border:1px solid rgba(226,232,240,.82)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-rail-wide b{font-size:13px!important;line-height:1.05!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-rail-wide em{font-size:7.5px!important;letter-spacing:.075em!important;line-height:1.12!important;}

/* The workbench must be stable: no clipped tab bodies or boxes protruding out of the deck. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workbench-layout-v2{
  grid-template-columns:minmax(420px,.92fr) minmax(760px,1.68fr)!important;
  gap:14px!important;
  align-items:stretch!important;
  margin:0 10px 14px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-comparison-card,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2{
  min-height:224px!important;
  border-radius:20px!important;
  border:1px solid rgba(191,219,254,.88)!important;
  background:linear-gradient(180deg,#fff,#f8fdff)!important;
  box-shadow:0 12px 30px rgba(15,23,42,.06)!important;
  overflow:hidden!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-comparison-card{padding:14px!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2{padding:14px 14px 16px!important;display:grid!important;grid-template-rows:auto 1fr!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-command-status-v2{
  min-height:32px!important;
  padding:0 2px 8px!important;
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-command-status-v2 strong{font-size:10px!important;letter-spacing:.1em!important;color:#075985!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-command-status-v2 span{font-size:9.5px!important;color:#64748b!important;line-height:1.25!important;}

/* Tabs: one clean strip, obvious active tab, no negative body overlap. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-tabs{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:8px!important;
  align-items:end!important;
  margin:0!important;
  padding:0 6px!important;
  position:relative!important;
  z-index:2!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-tab{
  min-height:38px!important;
  border-radius:16px 16px 0 0!important;
  padding:0 10px!important;
  background:#f8fbff!important;
  border:1px solid rgba(191,219,254,.95)!important;
  border-bottom-color:#bfdbfe!important;
  color:#0f4c81!important;
  font-size:10px!important;
  font-weight:950!important;
  letter-spacing:.085em!important;
  box-shadow:none!important;
  transform:none!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-tab.is-active{
  background:linear-gradient(180deg,#fff7ed,#fffbeb)!important;
  border-color:#fb923c!important;
  border-bottom-color:#fff7ed!important;
  color:#7c2d12!important;
  box-shadow:0 -2px 0 #fb923c inset,0 8px 16px rgba(251,146,60,.12)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-panel{
  display:block!important;
  min-height:178px!important;
  margin:0!important;
  padding:18px 18px 20px!important;
  border:1px solid rgba(191,219,254,.95)!important;
  border-radius:16px!important;
  background:linear-gradient(180deg,#ffffff 0%,#f8fdff 100%)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9)!important;
  overflow:hidden!important;
  position:relative!important;
  z-index:1!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-panel[hidden]{display:none!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-copy{
  min-height:24px!important;
  padding:0 0 12px!important;
  margin:0!important;
  border:0!important;
  background:transparent!important;
  justify-content:center!important;
  text-align:center!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-copy span{font-size:10px!important;line-height:1.35!important;max-width:980px!important;color:#475569!important;}

/* Family colour consistency — Win %, 0-from, A/E, never red/green family coding. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-card[data-rule-family="win"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-rule-card[data-rule-family="win"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-family-card[data-pro-sire-family-card="win"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-comparison-table tbody tr[data-family="win"] th,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-comparison-table tbody tr[data-family="win"] td,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-threshold-bundle[data-rule-family="win"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-source-damage-cell[data-source-family="win"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th.pro-sire-threshold-head-win,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th[data-pro-sire-sort="win_rule"]{
  background:var(--sire-win-bg)!important;
  border-color:var(--sire-win-border)!important;
  color:var(--sire-win-text)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-card[data-rule-family="zero"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-rule-card[data-rule-family="zero"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-family-card[data-pro-sire-family-card="zero"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-comparison-table tbody tr[data-family="zero"] th,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-comparison-table tbody tr[data-family="zero"] td,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-threshold-bundle[data-rule-family="zero"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-source-damage-cell[data-source-family="zero"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th.pro-sire-threshold-head-zero,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th[data-pro-sire-sort="zero_rule"]{
  background:var(--sire-zero-bg)!important;
  border-color:var(--sire-zero-border)!important;
  color:var(--sire-zero-text)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-card[data-rule-family="ae"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-rule-card[data-rule-family="ae"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-family-card[data-pro-sire-family-card="ae"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-comparison-table tbody tr[data-family="ae"] th,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-comparison-table tbody tr[data-family="ae"] td,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-threshold-bundle[data-rule-family="ae"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-source-damage-cell[data-source-family="ae"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th.pro-sire-threshold-head-ae,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th[data-pro-sire-sort="ae_rule"]{
  background:var(--sire-ae-bg)!important;
  border-color:var(--sire-ae-border)!important;
  color:var(--sire-ae-text)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table tbody td[data-rule-family],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-source-damage-cell{box-shadow:inset 1px 0 rgba(148,163,184,.08), inset -1px 0 rgba(148,163,184,.08)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-source-damage-cell b,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-source-damage-cell span{color:inherit!important;}

/* Pause / Focus: horizontal, readable, no protruding slab. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-pause-focus-layout{display:grid!important;grid-template-columns:1fr!important;gap:14px!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-pause-focus-block{
  display:grid!important;
  gap:10px!important;
  padding:14px!important;
  border-radius:16px!important;
  border:1px solid rgba(191,219,254,.85)!important;
  background:rgba(255,255,255,.74)!important;
  overflow:hidden!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-pause-focus-block > strong{font-size:10px!important;letter-spacing:.11em!important;color:#0f4c81!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-pause-focus-block > span{font-size:10px!important;line-height:1.35!important;color:#475569!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-mode-strip{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-pause-bar{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-mode,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-pause-bar .btn{height:34px!important;min-height:34px!important;border-radius:13px!important;font-size:10px!important;box-shadow:none!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-mode[data-pro-sire-lab="win"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-pause-bar [data-pro-sire-family-pause="win"]{background:var(--sire-win-bg)!important;border-color:var(--sire-win-border)!important;color:var(--sire-win-text)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-mode[data-pro-sire-lab="zero"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-pause-bar [data-pro-sire-family-pause="zero"]{background:var(--sire-zero-bg)!important;border-color:var(--sire-zero-border)!important;color:var(--sire-zero-text)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-mode[data-pro-sire-lab="ae"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-pause-bar [data-pro-sire-family-pause="ae"]{background:var(--sire-ae-bg)!important;border-color:var(--sire-ae-border)!important;color:var(--sire-ae-text)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-mode.is-active{box-shadow:inset 0 0 0 2px rgba(37,99,235,.22)!important;}

/* Rule activation: no clipping, lighter chips. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-grid-v2{
  display:grid!important;
  grid-template-columns:minmax(260px,.9fr) minmax(420px,1.55fr)!important;
  gap:12px!important;
  align-items:stretch!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-action{grid-column:1!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-scope{grid-column:2!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family{min-height:78px!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-grid-v2 > #proSireApplyRuleActivationButton{grid-column:1 / -1!important;justify-self:center!important;min-width:300px!important;margin:0!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-card{
  padding:11px 12px!important;
  border-radius:16px!important;
  min-height:72px!important;
  display:grid!important;
  gap:8px!important;
  align-content:center!important;
  overflow:hidden!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-card > span,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-field > span{font-size:8.5px!important;letter-spacing:.105em!important;color:#475569!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-chips,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-scope-chips{gap:9px!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-chip,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-scope-chip,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family-chip,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-scope-chip{
  height:30px!important;
  min-height:30px!important;
  border-radius:12px!important;
  background:#fff!important;
  color:#075985!important;
  border:1px solid #bae6fd!important;
  box-shadow:none!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-chip.is-active,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-scope-chip.is-active,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-scope-chip.is-active{background:#e0f2fe!important;color:#075985!important;border-color:#7dd3fc!important;}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyRuleActivationButton:disabled{opacity:.55!important;cursor:not-allowed!important;box-shadow:none!important;}

/* Bulk edit: solve bottom clipping and align family cards. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-tuning{display:block!important;overflow:visible!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-tuning[hidden]{display:none!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:14px!important;
  align-items:stretch!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-scope{grid-column:1 / -1!important;min-height:70px!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-rule-card{
  min-height:104px!important;
  padding:13px 14px!important;
  border-radius:16px!important;
  overflow:hidden!important;
  display:grid!important;
  grid-template-rows:auto 1fr!important;
  gap:10px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-card-head{display:flex!important;align-items:center!important;justify-content:center!important;gap:10px!important;min-height:28px!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-reset-button{height:26px!important;min-height:26px!important;border-radius:999px!important;padding:0 10px!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-minmax{display:grid!important;grid-template-columns:1fr 1fr!important;gap:12px!important;align-items:center!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-minmax label{display:grid!important;grid-template-columns:42px minmax(92px,1fr)!important;gap:8px!important;align-items:center!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-minmax input{height:34px!important;min-width:92px!important;width:100%!important;}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyBulkButton{grid-column:1 / -1!important;justify-self:center!important;min-width:320px!important;height:34px!important;min-height:34px!important;margin:0!important;}

/* Query Filters: symmetrical, no right-hand protrusion, consistent pill tokens. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-grid{
  display:grid!important;
  grid-template-columns:minmax(220px,1fr) minmax(170px,.7fr) minmax(220px,.85fr) minmax(190px,.7fr)!important;
  grid-template-areas:
    "search time scope activation"
    "components components components activation"
    "count count count count"!important;
  gap:14px!important;
  align-items:stretch!important;
  overflow:hidden!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-field{
  min-width:0!important;
  border-radius:16px!important;
  border:1px solid rgba(191,219,254,.88)!important;
  background:rgba(255,255,255,.84)!important;
  padding:14px!important;
  overflow:hidden!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-field:nth-child(1){grid-area:search!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-field:nth-child(2){grid-area:time!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-field:nth-child(3){grid-area:scope!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-components{grid-area:components!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-activation{grid-area:activation!important;}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireQueryFilterCount{grid-area:count!important;justify-self:center!important;color:#2563eb!important;font-size:10px!important;font-weight:950!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-chip-select-list,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-component-filter-groups{display:flex!important;flex-wrap:wrap!important;gap:8px!important;align-items:center!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-token,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-reset-chip,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-activation-filter-token{
  height:32px!important;
  min-height:32px!important;
  border-radius:999px!important;
  padding:0 14px!important;
  font-size:10px!important;
  line-height:1!important;
  background:#fff!important;
  border:1px solid #bae6fd!important;
  color:#075985!important;
  box-shadow:none!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-token.is-active,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-activation-filter-token.is-active{background:linear-gradient(135deg,#0ea5e9,#2563eb)!important;color:#fff!important;border-color:#38bdf8!important;}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireQuerySearch{height:42px!important;border-radius:12px!important;}

/* Rule setup: calm diagnostic status, consistent family order. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-status-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-family-card{min-height:74px!important;border-radius:15px!important;padding:12px!important;overflow:hidden!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-family-card strong{font-size:12px!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-setup-diagnostics{margin-top:14px!important;display:grid!important;gap:10px!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-command-status-grid-v2{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-command-status-grid-v2 span{min-height:38px!important;border-radius:12px!important;}

/* Table header family colours and tooltip affordance. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-table-help,
#proSireQueryGridPanel.pro-sire-workspace-open .report-help-trigger.pro-sire-table-help{box-shadow:0 0 0 2px rgba(186,230,253,.7)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-table-tools{
  grid-template-columns:minmax(300px,420px) minmax(680px,1fr) auto!important;
  gap:14px!important;
  align-items:center!important;
  padding:12px 14px!important;
  border-radius:16px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-impact-basis-tools{justify-content:center!important;gap:8px!important;min-width:0!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-impact-basis-chip{height:28px!important;min-height:28px!important;border-radius:999px!important;padding:0 12px!important;}

@media(max-width:1500px){
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workbench-layout-v2{grid-template-columns:1fr!important;}
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-premium-cockpit-3{grid-template-columns:1fr!important;}
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-grid{grid-template-columns:1fr 1fr!important;grid-template-areas:"search time" "scope activation" "components components" "count count"!important;}
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-table-tools{grid-template-columns:1fr!important;}
}
@media(max-width:1100px){
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-top{grid-template-columns:1fr!important;align-items:start!important;}
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workspace-actions{justify-content:start!important;grid-template-columns:1fr!important;width:100%!important;}
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-tabs{grid-template-columns:1fr!important;}
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-grid-v2,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-grid,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-grid,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-status-grid,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-command-status-grid-v2{grid-template-columns:1fr!important;grid-template-areas:none!important;}
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-field,
  #proSireQueryGridPanel.pro-sire-workspace-open #proSireQueryFilterCount{grid-area:auto!important;}
}

/* ========================================================================
   PRO_SYSTEM_BUILDER_002O — SIRE workspace control-deck layout fix
   Frontend-only. Fix clipping, spacing, filter layout and top-card responsiveness.
   Keep SIRE Apply logic, evidence loading and query-grid scroll foundation untouched.
   ======================================================================== */
#proSireQueryGridPanel.pro-sire-workspace-open{
  --sire-zero-bg:#f7f4e8;
  --sire-zero-bg-strong:#efe7d2;
  --sire-zero-border:#d7c493;
  --sire-zero-text:#5f4b16;
  --sire-active-tab-bg:#fff5eb;
  --sire-active-tab-border:#fb923c;
  --sire-active-tab-text:#7c2d12;
}

/* Top cockpit: allow the removed-runner card and long labels to breathe. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-premium-cockpit-3{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.14fr)!important;
  gap:16px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-card{
  min-height:188px!important;
  padding:21px 22px 20px!important;
  overflow:hidden!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-title-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:10px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-title-row strong,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-title-row span{
  min-width:0!important;
  overflow-wrap:anywhere!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-rail-wide{
  grid-template-columns:repeat(7,minmax(58px,1fr))!important;
  gap:7px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-rail-wide span{
  min-width:0!important;
  min-height:48px!important;
  padding:8px 6px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-rail-wide b,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-rail-wide em{
  white-space:normal!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
  text-align:center!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-cockpit-rail-wide em{
  font-size:7.2px!important;
  line-height:1.05!important;
}

/* Workbench: make the right control deck a real workspace zone rather than a shallow tray. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workbench-layout-v2{
  grid-template-columns:minmax(390px,.82fr) minmax(900px,1.88fr)!important;
  gap:16px!important;
  align-items:stretch!important;
  margin:0 10px 16px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-comparison-card,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2{
  min-height:338px!important;
  overflow:visible!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2{
  padding:14px 16px 18px!important;
  grid-template-rows:auto minmax(0,1fr)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-panel{
  min-height:276px!important;
  padding:18px 20px 22px!important;
  overflow:visible!important;
  display:block!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-panel[hidden]{display:none!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-copy{
  padding:0 0 14px!important;
  min-height:28px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-copy strong{display:none!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-copy span{
  display:block!important;
  max-width:980px!important;
  margin:0 auto!important;
  text-align:center!important;
}

/* Tabs: selected state stays distinct from rule-family colours. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-tab.is-active{
  background:linear-gradient(180deg,var(--sire-active-tab-bg),#fffaf4)!important;
  border-color:var(--sire-active-tab-border)!important;
  border-bottom-color:var(--sire-active-tab-bg)!important;
  color:var(--sire-active-tab-text)!important;
  box-shadow:0 -2px 0 var(--sire-active-tab-border) inset,0 8px 16px rgba(251,146,60,.10)!important;
}

/* Pause / Focus: eliminate bottom clipping and keep rows readable. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-pause-focus-layout{
  grid-template-columns:1fr!important;
  gap:16px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-pause-focus-block{
  min-height:92px!important;
  padding:15px 16px!important;
  gap:10px!important;
  overflow:visible!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-mode-strip{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-pause-bar{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:10px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-mode,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-pause-bar .btn{
  min-height:36px!important;
  height:36px!important;
  border-radius:12px!important;
}

/* Rule Activation: compact rows, no giant wasted cards, no clipped apply button. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-hub{
  display:block!important;
  overflow:visible!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-grid-v2{
  display:grid!important;
  grid-template-columns:minmax(230px,.75fr) minmax(420px,1.35fr) minmax(210px,.55fr)!important;
  grid-template-areas:
    "action scope apply"
    "win zero ae"!important;
  gap:14px!important;
  align-items:stretch!important;
  overflow:visible!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-action{grid-area:action!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-scope{grid-area:scope!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family[data-rule-family="win"]{grid-area:win!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family[data-rule-family="zero"]{grid-area:zero!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family[data-rule-family="ae"]{grid-area:ae!important;}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyRuleActivationButton{
  grid-area:apply!important;
  align-self:stretch!important;
  justify-self:stretch!important;
  min-width:0!important;
  width:100%!important;
  min-height:64px!important;
  height:auto!important;
  border-radius:16px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-card{
  min-height:72px!important;
  padding:12px 14px!important;
  gap:8px!important;
  align-content:center!important;
  overflow:visible!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family{
  min-height:76px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-chips{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(110px,1fr))!important;
  gap:10px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-scope .pro-sire-rule-activation-chips{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family-chip,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-chip,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-scope-chip{
  min-height:32px!important;
  height:32px!important;
}

/* Bulk Edit: two clean rows plus a centred apply button inside the panel. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-tuning{overflow:visible!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  grid-template-areas:
    "scope scope scope"
    "win zero ae"
    "apply apply apply"!important;
  gap:14px!important;
  overflow:visible!important;
  align-items:stretch!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-scope{grid-area:scope!important;min-height:68px!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-rule-card[data-rule-family="win"]{grid-area:win!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-rule-card[data-rule-family="zero"]{grid-area:zero!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-rule-card[data-rule-family="ae"]{grid-area:ae!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-rule-card{
  min-height:112px!important;
  padding:14px 16px!important;
  overflow:visible!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyBulkButton{
  grid-area:apply!important;
  justify-self:center!important;
  align-self:center!important;
  min-width:360px!important;
  min-height:36px!important;
  height:36px!important;
  margin:0!important;
  border-radius:14px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-minmax input{
  min-width:94px!important;
}

/* Query Filters: stop right-side overflow and make the layout symmetrical. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-filter-bar{
  display:block!important;
  overflow:visible!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-grid{
  display:grid!important;
  grid-template-columns:minmax(230px,1fr) minmax(170px,.7fr) minmax(220px,.8fr) minmax(300px,1.05fr)!important;
  grid-template-areas:
    "search time scope activation"
    "components components components activation"
    "count count count count"!important;
  gap:14px!important;
  align-items:stretch!important;
  overflow:visible!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-field{
  min-width:0!important;
  min-height:88px!important;
  overflow:visible!important;
  display:grid!important;
  align-content:start!important;
  gap:10px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-components{
  min-height:102px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-activation{
  min-height:100%!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-activation-chip-list{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:9px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-component-filter-groups{
  overflow:visible!important;
  max-height:none!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireQueryFilterCount{
  align-self:center!important;
  min-height:20px!important;
  padding:0!important;
}

/* Rule Setup: compact diagnostic grid with enough vertical room. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-panel-rule{
  min-height:286px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-status-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:14px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-family-card{
  min-height:74px!important;
  padding:13px 14px!important;
  display:grid!important;
  align-content:center!important;
  gap:4px!important;
  overflow:visible!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-setup-diagnostics{
  margin-top:16px!important;
  gap:12px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-command-status-grid-v2{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-command-status-grid-v2 span{
  min-height:44px!important;
  padding:8px 10px!important;
  overflow:hidden!important;
}

/* Family colours and table columns: keep 0-from away from the active-tab colour. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-card[data-rule-family="zero"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-rule-card[data-rule-family="zero"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-family-card[data-pro-sire-family-card="zero"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-comparison-table tbody tr[data-family="zero"] th,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-comparison-table tbody tr[data-family="zero"] td,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-threshold-bundle[data-rule-family="zero"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-source-damage-cell[data-source-family="zero"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th.pro-sire-threshold-head-zero,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th[data-pro-sire-sort="zero_rule"]{
  background:var(--sire-zero-bg)!important;
  border-color:var(--sire-zero-border)!important;
  color:var(--sire-zero-text)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-mode[data-pro-sire-lab="zero"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-pause-bar [data-pro-sire-family-pause="zero"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family-chip[data-pro-sire-rule-family="zero"][aria-pressed="true"]{
  background:var(--sire-zero-bg)!important;
  border-color:var(--sire-zero-border)!important;
  color:var(--sire-zero-text)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th[data-pro-sire-sort="win_rule"]{background:var(--sire-win-bg)!important;color:var(--sire-win-text)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th[data-pro-sire-sort="zero_rule"]{background:var(--sire-zero-bg)!important;color:var(--sire-zero-text)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-table thead th[data-pro-sire-sort="ae_rule"]{background:var(--sire-ae-bg)!important;color:var(--sire-ae-text)!important;}

@media(max-width:1500px){
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workbench-layout-v2{grid-template-columns:1fr!important;}
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-premium-cockpit-3{grid-template-columns:1fr!important;}
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-grid{
    grid-template-columns:1fr 1fr!important;
    grid-template-areas:"search time" "scope activation" "components components" "count count"!important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-grid-v2{
    grid-template-columns:1fr 1fr!important;
    grid-template-areas:"action scope" "win zero" "ae apply"!important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyRuleActivationButton{min-height:76px!important;}
}
@media(max-width:1100px){
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-grid-v2,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-grid,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-grid,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-status-grid,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-command-status-grid-v2{
    grid-template-columns:1fr!important;
    grid-template-areas:none!important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-field,
  #proSireQueryGridPanel.pro-sire-workspace-open #proSireQueryFilterCount,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-action,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-scope,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family,
  #proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyRuleActivationButton,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-scope,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-rule-card,
  #proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyBulkButton{
    grid-area:auto!important;
  }
}

/* ========================================================================
   PRO_SYSTEM_BUILDER_002P — SIRE workspace final control-deck stabilisation
   Frontend-only. Resolve remaining clipping by giving the control deck a
   fixed, fit-for-purpose working zone and simplifying each tab layout.
   Backend logic, evidence loading, table scroll and Table Focus Mode untouched.
   ======================================================================== */
#proSireQueryGridPanel.pro-sire-workspace-open{
  --sire-zero-bg:#f5f1e3;
  --sire-zero-bg-strong:#ede4c8;
  --sire-zero-border:#cdbb82;
  --sire-zero-text:#594817;
}

/* Create a dependable workbench height. The table loses a little vertical
   space, but all control tabs remain visible and trustworthy. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workbench-layout-v2{
  grid-template-columns:minmax(420px,.86fr) minmax(960px,1.86fr)!important;
  gap:16px!important;
  align-items:stretch!important;
  margin:0 10px 14px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-comparison-card,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2{
  min-height:430px!important;
  height:430px!important;
  max-height:430px!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2{
  display:grid!important;
  grid-template-rows:42px minmax(0,1fr)!important;
  padding:14px 16px 16px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-tabs{
  height:42px!important;
  align-items:end!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-tab{
  min-height:38px!important;
  height:38px!important;
  padding:0 12px!important;
  border-radius:16px 16px 0 0!important;
  white-space:nowrap!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-panel,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-panel.is-active{
  min-height:0!important;
  height:100%!important;
  max-height:none!important;
  padding:16px 18px 18px!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
  border-radius:0 0 18px 18px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-panel[hidden]{display:none!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-copy{
  min-height:0!important;
  padding:0 0 10px!important;
  margin:0!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-copy span{
  font-size:11px!important;
  line-height:1.25!important;
  max-width:none!important;
}

/* Pause / Focus: two calm rows that fit inside the deck. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-pause-focus-layout{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:14px!important;
  height:auto!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-pause-focus-block{
  min-height:0!important;
  padding:14px 16px!important;
  gap:8px!important;
  overflow:hidden!important;
  border-radius:16px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-pause-focus-block strong{
  font-size:11px!important;
  letter-spacing:.09em!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-pause-focus-block span{
  font-size:10.8px!important;
  line-height:1.3!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-mode-strip,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-pause-bar{
  display:grid!important;
  gap:10px!important;
  align-items:center!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-mode-strip{grid-template-columns:repeat(4,minmax(0,1fr))!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-pause-bar{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-mode,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-pause-bar .btn{
  height:34px!important;
  min-height:34px!important;
  border-radius:12px!important;
  padding:0 10px!important;
}

/* Rule Activation: remove the giant cards. Use compact control strips. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-hub{
  height:100%!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr)!important;
  overflow:hidden!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-grid-v2{
  display:grid!important;
  grid-template-columns:1fr 1.55fr .9fr!important;
  grid-template-rows:82px 92px!important;
  grid-template-areas:
    "action scope apply"
    "win zero ae"!important;
  gap:12px!important;
  align-items:stretch!important;
  overflow:hidden!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-action{grid-area:action!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-scope{grid-area:scope!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family[data-rule-family="win"]{grid-area:win!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family[data-rule-family="zero"]{grid-area:zero!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family[data-rule-family="ae"]{grid-area:ae!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-card{
  min-height:0!important;
  height:100%!important;
  padding:10px 12px!important;
  border-radius:15px!important;
  display:grid!important;
  align-content:center!important;
  gap:8px!important;
  overflow:hidden!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-card > span{
  font-size:9.5px!important;
  letter-spacing:.1em!important;
  margin:0!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-chips{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(96px,1fr))!important;
  gap:8px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-scope .pro-sire-rule-activation-chips{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-chip,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-scope-chip,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family-chip{
  height:30px!important;
  min-height:30px!important;
  border-radius:12px!important;
  padding:0 8px!important;
  font-size:10px!important;
  position:static!important;
  transform:none!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyRuleActivationButton{
  grid-area:apply!important;
  position:static!important;
  transform:none!important;
  align-self:stretch!important;
  justify-self:stretch!important;
  width:100%!important;
  min-width:0!important;
  height:100%!important;
  min-height:0!important;
  margin:0!important;
  padding:0 12px!important;
  border-radius:15px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  white-space:normal!important;
  line-height:1.15!important;
  z-index:auto!important;
}

/* Bulk Edit: everything visible without relying on overflow. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-tuning{
  height:100%!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr)!important;
  overflow:hidden!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  grid-template-rows:58px 118px 40px!important;
  grid-template-areas:
    "scope scope scope"
    "win zero ae"
    "apply apply apply"!important;
  gap:12px!important;
  overflow:hidden!important;
  align-items:stretch!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-scope{grid-area:scope!important;min-height:0!important;height:100%!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-rule-card[data-rule-family="win"]{grid-area:win!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-rule-card[data-rule-family="zero"]{grid-area:zero!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-rule-card[data-rule-family="ae"]{grid-area:ae!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-field,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-rule-card{
  min-height:0!important;
  height:100%!important;
  padding:10px 12px!important;
  border-radius:15px!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-scope-chips{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:9px!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-scope-chip,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-reset-button,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-switch span{
  height:28px!important;
  min-height:28px!important;
  border-radius:999px!important;
  padding:0 10px!important;
  font-size:10px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-card-head{min-height:30px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-minmax{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;align-items:center!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-minmax label{display:grid!important;grid-template-columns:34px minmax(76px,1fr)!important;gap:6px!important;align-items:center!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-minmax input{height:32px!important;min-width:0!important;width:100%!important;}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyBulkButton{
  grid-area:apply!important;
  position:static!important;
  justify-self:center!important;
  align-self:center!important;
  min-width:340px!important;
  height:34px!important;
  min-height:34px!important;
  margin:0!important;
  border-radius:14px!important;
}

/* Query Filters: activation no longer spans the whole height; components get a full row. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-filter-bar{
  height:100%!important;
  display:block!important;
  overflow:hidden!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-grid{
  display:grid!important;
  grid-template-columns:1fr .75fr .95fr 1.15fr!important;
  grid-template-rows:88px 116px 22px!important;
  grid-template-areas:
    "search time scope activation"
    "components components components components"
    "count count count count"!important;
  gap:12px!important;
  align-items:stretch!important;
  overflow:hidden!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-field{
  min-height:0!important;
  height:100%!important;
  padding:12px!important;
  border-radius:15px!important;
  display:grid!important;
  align-content:start!important;
  gap:9px!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-search{grid-area:search!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-chip-group:nth-of-type(2){grid-area:time!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-chip-group:nth-of-type(3){grid-area:scope!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-components{grid-area:components!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-activation{grid-area:activation!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-chip-select-list,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-component-filter-groups{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  align-content:flex-start!important;
  overflow:hidden!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-activation-chip-list{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;align-content:start!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-token,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-activation-filter-token,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-reset-chip{
  height:30px!important;
  min-height:30px!important;
  border-radius:999px!important;
  padding:0 12px!important;
  font-size:10px!important;
  line-height:1!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireQuerySearch{height:38px!important;min-height:38px!important;}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireQueryFilterCount{
  grid-area:count!important;
  justify-self:center!important;
  align-self:center!important;
  height:20px!important;
  min-height:20px!important;
  margin:0!important;
  line-height:20px!important;
}

/* Rule Setup: fit diagnostics in a deliberate status grid. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-panel-rule{
  display:grid!important;
  grid-template-rows:auto 88px auto minmax(0,1fr)!important;
  gap:12px!important;
  overflow:hidden!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-status-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:12px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-lab-family-card{
  min-height:0!important;
  height:88px!important;
  padding:12px!important;
  display:grid!important;
  align-content:center!important;
  gap:4px!important;
  overflow:hidden!important;
  border-radius:15px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-setup-diagnostics{
  margin:0!important;
  display:grid!important;
  gap:10px!important;
  overflow:hidden!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-command-status-grid-v2{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:9px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-command-status-grid-v2 span{
  min-height:40px!important;
  height:40px!important;
  padding:7px 9px!important;
  border-radius:12px!important;
  overflow:hidden!important;
}

/* Keep the table tools immediately below the now-taller deck with no wasted void. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-table-tools{margin-top:0!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-grid-scroll{min-height:260px!important;}

@media(max-width:1500px){
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workbench-layout-v2{grid-template-columns:1fr!important;}
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-comparison-card,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2{height:auto!important;max-height:none!important;min-height:390px!important;}
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-grid-v2{grid-template-columns:1fr 1fr!important;grid-template-rows:auto!important;grid-template-areas:"action scope" "win zero" "ae apply"!important;}
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-bulk-grid{grid-template-columns:1fr 1fr!important;grid-template-rows:auto!important;grid-template-areas:"scope scope" "win zero" "ae ae" "apply apply"!important;}
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-grid{grid-template-columns:1fr 1fr!important;grid-template-rows:auto!important;grid-template-areas:"search time" "scope activation" "components components" "count count"!important;}
}

/* ========================================================================== 
   PRO_SYSTEM_BUILDER_002Q — SIRE control deck final tab tidy
   Scope: frontend-only CSS correction after 002P.
   Goals: remove the remaining Rule Activation blue overlay/clipping, make the
   Query Filters controls fit cleanly, and give the workbench cards enough
   height without touching SIRE logic, evidence loading, table structure,
   Table Focus Mode or scroll behaviour.
   ========================================================================== */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-workbench-layout-v2{
  grid-template-columns:minmax(440px,.92fr) minmax(980px,1.92fr)!important;
  gap:18px!important;
  align-items:stretch!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-family-comparison-card,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2{
  min-height:520px!important;
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-card-v2{
  display:grid!important;
  grid-template-rows:44px auto!important;
  padding:16px 18px 18px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-panel,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-panel.is-active{
  min-height:442px!important;
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
  padding:18px 20px 20px!important;
  box-sizing:border-box!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-panel[hidden]{display:none!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-table-tools{
  margin-top:16px!important;
}

/* Rule Activation: one deliberate compact command panel.
   Top: scope. Middle: family selection. Bottom: action + apply. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-hub{
  height:auto!important;
  display:block!important;
  overflow:visible!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-deck-panel-activation{
  background:linear-gradient(180deg,#fbfdff,#f8fcff)!important;
  overflow:visible!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-grid-v2,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  grid-template-rows:72px 102px 74px!important;
  grid-template-areas:
    "scope scope scope"
    "win zero ae"
    "action action apply"!important;
  gap:14px!important;
  align-items:stretch!important;
  overflow:visible!important;
  width:100%!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-action{grid-area:action!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-scope{grid-area:scope!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family[data-rule-family="win"]{grid-area:win!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family[data-rule-family="zero"]{grid-area:zero!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family[data-rule-family="ae"]{grid-area:ae!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-card{
  min-height:0!important;
  height:100%!important;
  padding:14px 16px!important;
  border-radius:18px!important;
  display:grid!important;
  align-content:center!important;
  justify-content:stretch!important;
  gap:10px!important;
  overflow:hidden!important;
  transform:none!important;
  box-sizing:border-box!important;
  cursor:default!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-action,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-scope{
  background:linear-gradient(180deg,#ffffff,#f7fbff)!important;
  border:1px solid rgba(147,197,253,.68)!important;
  box-shadow:0 10px 20px rgba(15,23,42,.045)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-card > span{
  text-align:center!important;
  color:#334155!important;
  letter-spacing:.1em!important;
  font-size:10px!important;
  line-height:1!important;
  margin:0!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-chips{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
  width:100%!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-scope .pro-sire-rule-activation-chips{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-chip,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-scope-chip,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family-chip{
  height:40px!important;
  min-height:40px!important;
  border-radius:999px!important;
  padding:0 14px!important;
  font-size:11px!important;
  line-height:1!important;
  width:100%!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  position:static!important;
  transform:none!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family-chip{
  background:#ffffff!important;
  border:1px solid rgba(125,211,252,.82)!important;
  color:#075985!important;
  box-shadow:0 5px 12px rgba(15,23,42,.035)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family[data-rule-family="win"]{
  background:var(--sire-win-bg)!important;
  border-color:var(--sire-win-border)!important;
  color:var(--sire-win-text)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family[data-rule-family="zero"]{
  background:var(--sire-zero-bg)!important;
  border-color:var(--sire-zero-border)!important;
  color:var(--sire-zero-text)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family[data-rule-family="ae"]{
  background:var(--sire-ae-bg)!important;
  border-color:var(--sire-ae-border)!important;
  color:var(--sire-ae-text)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family[data-rule-family="win"] .pro-sire-rule-activation-family-chip{color:var(--sire-win-text)!important;border-color:var(--sire-win-border)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family[data-rule-family="zero"] .pro-sire-rule-activation-family-chip{color:var(--sire-zero-text)!important;border-color:var(--sire-zero-border)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family[data-rule-family="ae"] .pro-sire-rule-activation-family-chip{color:var(--sire-ae-text)!important;border-color:var(--sire-ae-border)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyRuleActivationButton{
  grid-area:apply!important;
  grid-column:auto!important;
  position:static!important;
  transform:none!important;
  justify-self:stretch!important;
  align-self:stretch!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  height:100%!important;
  min-height:0!important;
  margin:0!important;
  padding:0 14px!important;
  border-radius:18px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  white-space:normal!important;
  text-align:center!important;
  line-height:1.18!important;
  z-index:1!important;
  box-shadow:0 12px 22px rgba(37,99,235,.14)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyRuleActivationButton:disabled,
#proSireQueryGridPanel.pro-sire-workspace-open #proSireApplyRuleActivationButton.is-disabled{
  background:linear-gradient(135deg,#dbeafe,#cbd5e1)!important;
  color:#64748b!important;
  border:1px solid rgba(148,163,184,.42)!important;
  box-shadow:none!important;
  cursor:not-allowed!important;
}

/* Query Filters: make every selectable item visible and keep the card balanced. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-query-filter-bar{
  height:auto!important;
  min-height:0!important;
  display:block!important;
  overflow:visible!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-grid{
  display:grid!important;
  grid-template-columns:1.15fr .8fr .95fr 1.35fr!important;
  grid-template-rows:92px 112px 24px!important;
  grid-template-areas:
    "search time scope activation"
    "components components components components"
    "count count count count"!important;
  gap:14px!important;
  overflow:visible!important;
  align-items:stretch!important;
  width:100%!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-field{
  min-height:0!important;
  height:100%!important;
  padding:14px!important;
  border-radius:17px!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr)!important;
  align-content:stretch!important;
  gap:10px!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
  background:linear-gradient(180deg,#ffffff,#fbfdff)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-components{
  min-height:112px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-label-row{
  min-height:18px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-chip-select-list,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-component-filter-groups{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  align-content:flex-start!important;
  gap:8px!important;
  overflow:visible!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-activation-chip-list{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
  align-items:center!important;
  align-content:center!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-token,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-activation-filter-token,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-reset-chip{
  height:34px!important;
  min-height:34px!important;
  border-radius:999px!important;
  padding:0 14px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  white-space:nowrap!important;
  line-height:1!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open #proSireQueryFilterCount{
  grid-area:count!important;
  justify-self:center!important;
  align-self:center!important;
  height:24px!important;
  line-height:24px!important;
  margin:0!important;
  position:static!important;
  transform:none!important;
}

@media(max-width:1500px){
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-grid-v2,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-grid{
    grid-template-columns:1fr 1fr!important;
    grid-template-rows:auto!important;
    grid-template-areas:
      "scope scope"
      "win zero"
      "ae ae"
      "action apply"!important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-filter-grid{
    grid-template-columns:1fr 1fr!important;
    grid-template-rows:auto!important;
    grid-template-areas:
      "search time"
      "scope activation"
      "components components"
      "count count"!important;
  }
}

/* ========================================================================
   PRO_SYSTEM_BUILDER_002S — Pro SIRE right-deck visual consolidation
   Frontend-only. Replaces failed 002R control-deck reset with one scoped
   right-deck implementation. Keeps existing IDs/data attributes and avoids
   backend, evidence-loading and query-grid table changes.
   ======================================================================== */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated{
  --pro-sire-deck-border:rgba(125,183,245,.72);
  --pro-sire-deck-border-soft:rgba(191,219,254,.78);
  --pro-sire-deck-blue:#0f5fb8;
  --pro-sire-deck-blue-soft:#eaf5ff;
  --pro-sire-deck-text:#0f2544;
  --pro-sire-deck-muted:#64748b;
  --pro-sire-chip-h:32px;
  --pro-sire-chip-radius:999px;
  --sire-win-bg:#eef6ff;
  --sire-win-bg-strong:#dceeff;
  --sire-win-border:#93c5fd;
  --sire-win-text:#1d4ed8;
  --sire-zero-bg:#fff8e7;
  --sire-zero-bg-strong:#fef0c7;
  --sire-zero-border:#e6c774;
  --sire-zero-text:#8a5b00;
  --sire-ae-bg:#f4f0ff;
  --sire-ae-bg-strong:#ebe3ff;
  --sire-ae-border:#c4b5fd;
  --sire-ae-text:#6d28d9;
  display:block!important;
  margin-top:18px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-workbench-layout-v2{
  display:grid!important;
  grid-template-columns:minmax(380px,.48fr) minmax(760px,1fr)!important;
  gap:18px!important;
  align-items:stretch!important;
  width:100%!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-family-comparison-card,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-control-deck-card-v3{
  min-height:340px!important;
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
  border:1px solid var(--pro-sire-deck-border)!important;
  border-radius:18px!important;
  background:linear-gradient(180deg,#ffffff 0%,#fafdff 100%)!important;
  box-shadow:0 12px 28px rgba(15,23,42,.055)!important;
  box-sizing:border-box!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-family-comparison-card{
  padding:16px!important;
  display:grid!important;
  grid-template-rows:auto 1fr!important;
  gap:14px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-control-deck-card-v3{
  padding:0!important;
  display:grid!important;
  grid-template-rows:auto 1fr!important;
}

/* Tab rail: equal, attached, calmer active state. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-tabs{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:0!important;
  margin:0!important;
  padding:12px 14px 0!important;
  border:0!important;
  background:transparent!important;
  align-items:end!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-tab{
  height:38px!important;
  min-height:38px!important;
  width:100%!important;
  margin:0!important;
  padding:0 12px!important;
  border:1px solid var(--pro-sire-deck-border)!important;
  border-bottom-color:var(--pro-sire-deck-border)!important;
  border-radius:14px 14px 0 0!important;
  background:linear-gradient(180deg,#f7fbff,#edf7ff)!important;
  color:#16446f!important;
  box-shadow:none!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  font-size:11px!important;
  font-weight:850!important;
  line-height:1!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
  position:relative!important;
  transform:none!important;
  box-sizing:border-box!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-tab + .pro-sire-deck-tab{
  margin-left:-1px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-tab.is-active{
  background:#ffffff!important;
  color:#0f3f6f!important;
  border-color:#f59e0b!important;
  border-bottom-color:#ffffff!important;
  box-shadow:0 -1px 0 #ffffff inset!important;
  z-index:3!important;
}

/* Shared panel shell. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel.is-active{
  min-height:282px!important;
  height:auto!important;
  max-height:none!important;
  margin:10px 12px 10px 10px!important;
  padding:16px!important;
  border:1px solid var(--pro-sire-deck-border)!important;
  border-radius:16px!important;
  background:linear-gradient(180deg,#ffffff 0%,#f8fcff 100%)!important;
  box-shadow:none!important;
  overflow:visible!important;
  box-sizing:border-box!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel[hidden],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel:not(.is-active){
  display:none!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-copy{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:10px!important;
  margin:0 0 16px!important;
  padding:0!important;
  min-height:22px!important;
  text-align:center!important;
  color:var(--pro-sire-deck-text)!important;
  border:0!important;
  background:transparent!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-copy strong{
  font-size:11px!important;
  line-height:1.1!important;
  letter-spacing:.1em!important;
  text-transform:uppercase!important;
  color:#0f3f6f!important;
  white-space:nowrap!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-copy span{
  font-size:12px!important;
  line-height:1.4!important;
  color:var(--pro-sire-deck-muted)!important;
  font-weight:700!important;
}

/* Shared chip/button grammar inside the right control deck. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-chip,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-scope-chip,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-family-chip,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-bulk-scope-chip,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-filter-token,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-filter-reset-chip,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-lab-mode,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-family-pause-bar .btn,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-bulk-reset-button,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-switch span{
  height:var(--pro-sire-chip-h)!important;
  min-height:var(--pro-sire-chip-h)!important;
  max-height:var(--pro-sire-chip-h)!important;
  padding:0 16px!important;
  border-radius:var(--pro-sire-chip-radius)!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  white-space:nowrap!important;
  text-align:center!important;
  font-size:11px!important;
  font-weight:850!important;
  line-height:1!important;
  letter-spacing:.02em!important;
  box-sizing:border-box!important;
  position:relative!important;
  inset:auto!important;
  transform:none!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .is-active,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated [aria-pressed="true"]{
  box-shadow:0 7px 16px rgba(37,99,235,.12)!important;
}

/* Pause / Focus. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-pause-focus-layout{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:14px!important;
  width:100%!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-pause-focus-block{
  padding:14px 16px!important;
  border:1px solid var(--pro-sire-deck-border-soft)!important;
  border-radius:16px!important;
  background:linear-gradient(180deg,#ffffff,#f8fcff)!important;
  box-shadow:none!important;
  display:grid!important;
  gap:10px!important;
  overflow:visible!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-pause-focus-block > strong{
  font-size:10px!important;
  letter-spacing:.12em!important;
  color:#0f5fb8!important;
  text-transform:uppercase!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-pause-focus-block > span{
  font-size:12px!important;
  color:#64748b!important;
  line-height:1.35!important;
  font-weight:650!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-lab-mode-strip,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-family-pause-bar{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
  width:100%!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-family-pause-bar{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-lab-mode[data-pro-sire-lab="win"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated [data-pro-sire-family-pause="win"]{background:var(--sire-win-bg)!important;border-color:var(--sire-win-border)!important;color:var(--sire-win-text)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-lab-mode[data-pro-sire-lab="zero"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated [data-pro-sire-family-pause="zero"]{background:var(--sire-zero-bg)!important;border-color:var(--sire-zero-border)!important;color:var(--sire-zero-text)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-lab-mode[data-pro-sire-lab="ae"],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated [data-pro-sire-family-pause="ae"]{background:var(--sire-ae-bg)!important;border-color:var(--sire-ae-border)!important;color:var(--sire-ae-text)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-lab-mode[data-pro-sire-lab="combined"]{background:#eef6ff!important;border-color:#93c5fd!important;color:#16446f!important;}

/* Rule Activation: three clean rows, fixed family order, real apply button. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-hub{
  display:block!important;
  height:auto!important;
  min-height:0!important;
  overflow:visible!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-grid{
  display:grid!important;
  grid-template-columns:1fr 1.1fr 1.1fr!important;
  grid-template-rows:auto auto auto!important;
  grid-template-areas:
    "action scope scope"
    "win zero ae"
    "apply apply apply"!important;
  gap:12px!important;
  width:100%!important;
  min-height:0!important;
  height:auto!important;
  padding:0!important;
  margin:0!important;
  overflow:visible!important;
  align-items:stretch!important;
  box-sizing:border-box!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-action{grid-area:action!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-scope{grid-area:scope!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-family[data-rule-family="win"]{grid-area:win!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-family[data-rule-family="zero"]{grid-area:zero!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-family[data-rule-family="ae"]{grid-area:ae!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated #proSireApplyRuleActivationButton{grid-area:apply!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-card{
  min-width:0!important;
  min-height:0!important;
  height:auto!important;
  padding:12px!important;
  border-radius:16px!important;
  border:1px solid var(--pro-sire-deck-border-soft)!important;
  background:#ffffff!important;
  box-shadow:none!important;
  overflow:visible!important;
  display:grid!important;
  grid-template-rows:auto auto!important;
  gap:10px!important;
  align-content:start!important;
  align-items:stretch!important;
  box-sizing:border-box!important;
  position:relative!important;
  transform:none!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-card > span{
  display:block!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  text-align:center!important;
  color:#475569!important;
  font-size:10px!important;
  line-height:1.1!important;
  letter-spacing:.12em!important;
  text-transform:uppercase!important;
  font-weight:900!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-chips{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
  width:100%!important;
  min-height:0!important;
  height:auto!important;
  align-items:center!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-scope .pro-sire-rule-activation-chips{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-family{
  display:grid!important;
  grid-template-rows:auto auto!important;
  gap:10px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-family-chip{
  width:100%!important;
  min-width:0!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-family[data-rule-family="win"]{background:var(--sire-win-bg)!important;border-color:var(--sire-win-border)!important;color:var(--sire-win-text)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-family[data-rule-family="zero"]{background:var(--sire-zero-bg)!important;border-color:var(--sire-zero-border)!important;color:var(--sire-zero-text)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-family[data-rule-family="ae"]{background:var(--sire-ae-bg)!important;border-color:var(--sire-ae-border)!important;color:var(--sire-ae-text)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-family[data-rule-family="win"] .pro-sire-rule-activation-family-chip{background:#fff!important;border-color:var(--sire-win-border)!important;color:var(--sire-win-text)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-family[data-rule-family="zero"] .pro-sire-rule-activation-family-chip{background:#fff!important;border-color:var(--sire-zero-border)!important;color:var(--sire-zero-text)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-family[data-rule-family="ae"] .pro-sire-rule-activation-family-chip{background:#fff!important;border-color:var(--sire-ae-border)!important;color:var(--sire-ae-text)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-family-chip.is-active,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-family-chip[aria-pressed="true"]{
  color:#ffffff!important;
  border-color:transparent!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-family[data-rule-family="win"] .pro-sire-rule-activation-family-chip.is-active,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-family[data-rule-family="win"] .pro-sire-rule-activation-family-chip[aria-pressed="true"]{background:#2563eb!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-family[data-rule-family="zero"] .pro-sire-rule-activation-family-chip.is-active,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-family[data-rule-family="zero"] .pro-sire-rule-activation-family-chip[aria-pressed="true"]{background:#b7791f!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-family[data-rule-family="ae"] .pro-sire-rule-activation-family-chip.is-active,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-family[data-rule-family="ae"] .pro-sire-rule-activation-family-chip[aria-pressed="true"]{background:#7c3aed!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated #proSireApplyRuleActivationButton{
  justify-self:center!important;
  align-self:center!important;
  width:300px!important;
  max-width:100%!important;
  min-width:0!important;
  height:36px!important;
  min-height:36px!important;
  max-height:36px!important;
  margin:2px 0 0!important;
  padding:0 22px!important;
  border-radius:999px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  white-space:nowrap!important;
  font-size:11px!important;
  font-weight:900!important;
  letter-spacing:.02em!important;
  background:linear-gradient(180deg,#ffffff,#eef6ff)!important;
  border:1px solid var(--pro-sire-deck-border)!important;
  color:#0f3f6f!important;
  box-shadow:0 8px 18px rgba(15,23,42,.06)!important;
  position:relative!important;
  inset:auto!important;
  transform:none!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated #proSireApplyRuleActivationButton:disabled{
  opacity:.55!important;
  box-shadow:none!important;
  background:#eef2f7!important;
  color:#64748b!important;
  cursor:not-allowed!important;
}

/* Bulk Edit: same shell rhythm, less empty space. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-bulk-tuning{
  display:block!important;
  min-height:0!important;
  height:auto!important;
  overflow:visible!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-bulk-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  grid-template-areas:"scope scope scope" "win zero ae" "apply apply apply"!important;
  gap:12px!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  background:transparent!important;
  min-height:0!important;
  height:auto!important;
  overflow:visible!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-bulk-scope{grid-area:scope!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-bulk-rule-card[data-rule-family="win"]{grid-area:win!important;background:var(--sire-win-bg)!important;border-color:var(--sire-win-border)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-bulk-rule-card[data-rule-family="zero"]{grid-area:zero!important;background:var(--sire-zero-bg)!important;border-color:var(--sire-zero-border)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-bulk-rule-card[data-rule-family="ae"]{grid-area:ae!important;background:var(--sire-ae-bg)!important;border-color:var(--sire-ae-border)!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated #proSireApplyBulkButton{grid-area:apply!important;justify-self:center!important;width:300px!important;height:36px!important;min-height:36px!important;margin:0!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-bulk-field,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-bulk-rule-card{
  min-height:0!important;
  height:auto!important;
  padding:12px!important;
  border-radius:16px!important;
  display:grid!important;
  gap:10px!important;
  overflow:visible!important;
  box-shadow:none!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-bulk-scope-chips,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-bulk-card-head,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-bulk-minmax{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:10px!important;
  align-items:center!important;
  width:100%!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-bulk-card-head{grid-template-columns:1fr auto!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-bulk-minmax{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-bulk-minmax label{
  display:grid!important;
  grid-template-columns:auto 1fr!important;
  gap:10px!important;
  align-items:center!important;
  margin:0!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-bulk-minmax input{
  height:34px!important;
  min-height:34px!important;
  border-radius:8px!important;
}

/* Query Filters: no clipping, grouped cards, compact count. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-query-filter-bar{
  display:block!important;
  min-height:0!important;
  height:auto!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  overflow:visible!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-filter-grid{
  display:grid!important;
  grid-template-columns:1.25fr .78fr .9fr!important;
  grid-template-areas:
    "search time scope"
    "components components activation"
    "count count count"!important;
  gap:12px!important;
  width:100%!important;
  min-height:0!important;
  height:auto!important;
  padding:0!important;
  margin:0!important;
  background:transparent!important;
  border:0!important;
  overflow:visible!important;
  align-items:stretch!important;
  box-sizing:border-box!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-filter-search{grid-area:search!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-filter-chip-group:nth-of-type(2){grid-area:time!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-filter-chip-group:nth-of-type(3){grid-area:scope!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-filter-components{grid-area:components!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-filter-activation{grid-area:activation!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated #proSireQueryFilterCount{grid-area:count!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-filter-field{
  min-width:0!important;
  min-height:0!important;
  height:auto!important;
  padding:12px!important;
  border-radius:16px!important;
  display:grid!important;
  grid-template-rows:auto auto!important;
  gap:10px!important;
  align-content:start!important;
  align-items:start!important;
  overflow:visible!important;
  background:#ffffff!important;
  border:1px solid var(--pro-sire-deck-border-soft)!important;
  box-shadow:none!important;
  box-sizing:border-box!important;
  position:relative!important;
  transform:none!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-filter-label-row{
  min-height:0!important;
  margin:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  color:#475569!important;
  font-size:10px!important;
  font-weight:900!important;
  line-height:1.1!important;
  letter-spacing:.12em!important;
  text-transform:uppercase!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-filter-search label{
  color:#475569!important;
  font-size:10px!important;
  font-weight:900!important;
  letter-spacing:.12em!important;
  text-transform:uppercase!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated #proSireQuerySearch{
  width:100%!important;
  min-width:0!important;
  height:36px!important;
  min-height:36px!important;
  padding:0 14px!important;
  border-radius:10px!important;
  font-size:12px!important;
  box-sizing:border-box!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-chip-select-list,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-component-filter-groups{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  align-content:flex-start!important;
  justify-content:flex-start!important;
  gap:8px!important;
  width:100%!important;
  min-width:0!important;
  overflow:visible!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-component-filter-groups{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-component-filter-group{
  min-width:0!important;
  padding:10px!important;
  border-radius:14px!important;
  border:1px dashed rgba(147,197,253,.72)!important;
  background:#f8fcff!important;
  display:grid!important;
  gap:8px!important;
  align-content:start!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-component-filter-group strong{
  color:#0f5fb8!important;
  font-size:10px!important;
  text-transform:uppercase!important;
  letter-spacing:.1em!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-component-filter-group > div{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:7px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-activation-chip-list{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated #proSireQueryFilterCount{
  position:static!important;
  transform:none!important;
  justify-self:center!important;
  align-self:center!important;
  width:auto!important;
  height:26px!important;
  min-height:26px!important;
  margin:0!important;
  padding:0 14px!important;
  border-radius:999px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  color:#2563eb!important;
  background:#eff6ff!important;
  border:1px solid var(--pro-sire-deck-border-soft)!important;
  font-size:11px!important;
  font-weight:850!important;
  line-height:1!important;
}

/* Rule Setup: compact diagnostic layout. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-lab-status-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:12px!important;
  margin:0 0 14px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-lab-family-card{
  min-height:76px!important;
  height:auto!important;
  padding:14px!important;
  border-radius:16px!important;
  display:grid!important;
  gap:6px!important;
  align-content:center!important;
  overflow:visible!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-setup-diagnostics{
  display:grid!important;
  gap:12px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-command-status-grid-v2{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
  margin:0!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-command-status-grid-v2 span{
  min-height:48px!important;
  padding:10px!important;
  border-radius:14px!important;
}

@media(max-width:1500px){
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-workbench-layout-v2{
    grid-template-columns:1fr!important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-grid{
    grid-template-columns:1fr 1fr!important;
    grid-template-areas:"action scope" "win zero" "ae ae" "apply apply"!important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-filter-grid{
    grid-template-columns:1fr 1fr!important;
    grid-template-areas:"search time" "scope activation" "components components" "count count"!important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-component-filter-groups{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}



/* ========================================================================
   PRO_SYSTEM_BUILDER_002T — Pro SIRE right-deck follow-up polish
   Frontend-only. Fixes Query Filters overflow, adds local Apply SIRE Changes
   mirrors, stabilises impact-basis chip position and gives threshold inputs
   enough width for number-spinner controls.
   ======================================================================== */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel.is-active{
  min-height:300px!important;
  overflow:visible!important;
}

/* Query Filters: flatten the component filter area so it stays inside the panel. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel-filters,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-query-filter-bar,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-filter-grid{
  overflow:visible!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-filter-grid{
  grid-template-columns:1.1fr .7fr .8fr!important;
  grid-template-areas:
    "search time scope"
    "components components activation"
    "count count count"!important;
  align-items:start!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-filter-components{
  min-height:0!important;
  max-height:none!important;
  padding:12px!important;
  overflow:visible!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-component-filter-groups{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:flex-start!important;
  align-content:flex-start!important;
  gap:8px!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-component-filter-group{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:7px!important;
  min-width:0!important;
  width:auto!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-component-filter-group strong{
  display:none!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-component-filter-group > div{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:7px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-filter-activation{
  align-self:start!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated #proSireQueryFilterCount{
  margin-top:0!important;
}

/* Rule Activation / Bulk Edit local action rows. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-action-pair{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:14px!important;
  width:100%!important;
  margin:2px auto 0!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-rule-activation-apply-row{grid-area:apply!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-bulk-apply-row{grid-area:apply!important;}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated #proSireApplyRuleActivationButton,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated #proSireApplyBulkButton,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-apply-mirror{
  width:220px!important;
  min-width:220px!important;
  max-width:220px!important;
  height:36px!important;
  min-height:36px!important;
  border-radius:999px!important;
  margin:0!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-apply-mirror{
  background:linear-gradient(135deg,#10b981,#059669)!important;
  border:1px solid rgba(16,185,129,.58)!important;
  color:#ffffff!important;
  box-shadow:0 8px 18px rgba(5,150,105,.18)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-apply-mirror:disabled,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-apply-mirror[aria-disabled="true"]{
  background:#eef2f7!important;
  border-color:#d7e0ea!important;
  color:#7c8da3!important;
  box-shadow:none!important;
  cursor:not-allowed!important;
  opacity:.78!important;
}

/* Query grid min/max number boxes: slightly wider so values and spinner controls do not clip. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-row-minmax{
  width:150px!important;
  gap:7px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-threshold-input{
  width:60px!important;
  min-width:60px!important;
  max-width:60px!important;
  height:24px!important;
  min-height:24px!important;
  padding:0 3px!important;
  line-height:24px!important;
}

/* Keep the impact-basis chip bank fixed even when the explanatory text changes. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-table-tools{
  grid-template-columns:540px minmax(760px,1fr) 132px!important;
  align-items:center!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-table-tools-copy{
  width:540px!important;
  min-width:540px!important;
  max-width:540px!important;
  overflow:hidden!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-table-tools-copy span{
  display:block!important;
  max-width:100%!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-impact-basis-tools{
  justify-content:center!important;
  min-width:760px!important;
  width:100%!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-impact-basis-tools > span{
  flex:0 0 120px!important;
  width:120px!important;
  min-width:120px!important;
  margin-right:4px!important;
  text-align:right!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-impact-basis-chip{
  flex:0 0 auto!important;
}

@media(max-width:1500px){
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-filter-grid{
    grid-template-columns:1fr 1fr!important;
    grid-template-areas:"search time" "scope activation" "components components" "count count"!important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-table-tools,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-table-tools-copy,
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-impact-basis-tools{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-table-tools{
    grid-template-columns:1fr!important;
  }
}


/* ========================================================================
   PRO_SYSTEM_BUILDER_002U — Pro SIRE right-deck border/filter finish
   Frontend-only. Tightens the active panel within the outer card, removes
   Query Filters blue slab, enlarges filter chips, aligns filter cards, and
   moves Reset filters to a separate bottom-right action.
   ======================================================================== */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-control-deck-card-v3{
  overflow:hidden!important;
  box-sizing:border-box!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel.is-active{
  width:auto!important;
  max-width:none!important;
  margin:10px 12px 10px 10px!important;
  overflow:hidden!important;
  background:#ffffff!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel > *{
  max-width:100%!important;
  box-sizing:border-box!important;
}

/* Query Filters: clean white panel, no blue slab, no right-edge spill. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel-filters,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel-filters.is-active,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel-filters .pro-sire-query-filter-bar{
  background:#ffffff!important;
  overflow:hidden!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel-filters .pro-sire-filter-grid{
  grid-template-columns:1.22fr .78fr .9fr!important;
  grid-template-areas:
    "search time scope"
    "components components activation"
    "count count reset"!important;
  gap:12px!important;
  width:100%!important;
  max-width:100%!important;
  overflow:hidden!important;
  background:#ffffff!important;
  align-items:stretch!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel-filters .pro-sire-filter-field{
  min-height:76px!important;
  height:100%!important;
  align-content:start!important;
  background:#ffffff!important;
  overflow:hidden!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel-filters .pro-sire-filter-components,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel-filters .pro-sire-filter-activation{
  min-height:84px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel-filters .pro-sire-chip-select-list{
  display:grid!important;
  gap:8px!important;
  width:100%!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel-filters .pro-sire-filter-chip-group .pro-sire-chip-select-list{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel-filters .pro-sire-activation-chip-list{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel-filters .pro-sire-filter-token{
  width:100%!important;
  min-width:0!important;
  height:34px!important;
  min-height:34px!important;
  padding:0 14px!important;
  font-size:11px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel-filters .pro-sire-component-filter-groups{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  grid-template-rows:repeat(2,48px)!important;
  grid-auto-flow:row!important;
  gap:10px!important;
  width:100%!important;
  max-width:100%!important;
  max-height:none!important;
  overflow:visible!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel-filters .pro-sire-component-filter-group,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel-filters .pro-sire-component-filter-group > div{
  display:contents!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel-filters .pro-sire-component-filter-group strong{
  display:none!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel-filters #proSireQueryFilterCount{
  grid-area:count!important;
  justify-self:center!important;
  align-self:center!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel-filters .pro-sire-filter-reset-action{
  grid-area:reset!important;
  justify-self:end!important;
  align-self:center!important;
  min-width:150px!important;
  height:34px!important;
  min-height:34px!important;
  padding:0 18px!important;
  border-radius:999px!important;
  border:1px solid rgba(245,158,11,.55)!important;
  background:linear-gradient(180deg,#fff7ed,#ffedd5)!important;
  color:#9a3412!important;
  font-weight:900!important;
  box-shadow:0 6px 14px rgba(245,158,11,.12)!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel-filters .pro-sire-filter-reset-action:hover{
  background:linear-gradient(180deg,#ffedd5,#fed7aa)!important;
  color:#7c2d12!important;
}
@media(max-width:1500px){
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel-filters .pro-sire-filter-grid{
    grid-template-columns:1fr 1fr!important;
    grid-template-areas:"search time" "scope activation" "components components" "count reset"!important;
  }
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel-filters .pro-sire-component-filter-groups{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
}

/* ========================================================================
   PRO_SYSTEM_BUILDER_002V — Query Detail solo threshold laboratory
   Read-only sandbox workspace for one SIRE query. Keeps the main query grid,
   Apply SIRE Changes, Table Focus Mode and backend apply logic isolated.
   ======================================================================== */
#proSireQueryGridPanel.pro-sire-query-detail-open .pro-sire-workspace-overview,
#proSireQueryGridPanel.pro-sire-query-detail-open .pro-sire-query-grid-summary,
#proSireQueryGridPanel.pro-sire-query-detail-open .pro-sire-workspace-control-deck,
#proSireQueryGridPanel.pro-sire-query-detail-open .pro-sire-applied-summary,
#proSireQueryGridPanel.pro-sire-query-detail-open .pro-sire-table-tools,
#proSireQueryGridPanel.pro-sire-query-detail-open .pro-sire-query-grid-scroll{
  display:none!important;
}
.pro-sire-query-cell .pro-sire-query-main-inline{
  cursor:pointer;
}
.pro-sire-query-detail-workspace{
  display:block;
  padding:20px 24px 34px;
  background:#f8fafc;
}
.pro-sire-query-detail-workspace[hidden]{display:none!important;}
.pro-sire-query-detail-shell{
  max-width:1680px;
  margin:0 auto;
  display:grid;
  gap:18px;
}
.pro-sire-query-detail-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:18px;
  border:1px solid rgba(15,23,42,.1);
  border-radius:22px;
  background:linear-gradient(135deg,#ffffff,#f8fafc);
  box-shadow:0 16px 34px rgba(15,23,42,.08);
}
.pro-sire-query-detail-title-block{
  display:grid;
  gap:6px;
  min-width:0;
}
.pro-sire-query-detail-kicker{
  color:#64748b;
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.pro-sire-query-detail-title-block h2{
  margin:0;
  color:#0f172a;
  font-size:25px;
  line-height:1.12;
}
.pro-sire-query-detail-title-block p{
  margin:0;
  color:#475569;
  font-size:13px;
  max-width:900px;
}
.pro-sire-query-detail-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.pro-sire-query-detail-warning{
  display:inline-flex;
  align-items:center;
  border:1px solid rgba(37,99,235,.2);
  background:#eff6ff;
  color:#1e3a8a;
  border-radius:999px;
  padding:7px 12px;
  font-size:11px;
  font-weight:900;
}
.pro-sire-query-passport-grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:12px;
}
.pro-sire-query-passport-card,
.pro-sire-query-lab-card,
.pro-sire-query-combined-card,
.pro-sire-query-read-card{
  border:1px solid rgba(15,23,42,.1);
  border-radius:18px;
  background:#ffffff;
  box-shadow:0 10px 24px rgba(15,23,42,.06);
}
.pro-sire-query-passport-card{
  padding:13px 14px;
  display:grid;
  gap:5px;
}
.pro-sire-query-passport-card span{
  color:#64748b;
  font-size:10px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.pro-sire-query-passport-card strong{
  color:#0f172a;
  font-size:15px;
  line-height:1.25;
}
.pro-sire-query-passport-card em{
  color:#64748b;
  font-size:11px;
  font-style:normal;
}
.pro-sire-query-lab-stack{
  display:grid;
  gap:16px;
}
.pro-sire-query-lab-card,
.pro-sire-query-combined-card,
.pro-sire-query-read-card{
  padding:16px;
  display:grid;
  gap:14px;
}
.pro-sire-query-lab-card[data-family="win"]{border-top:4px solid #2563eb;}
.pro-sire-query-lab-card[data-family="zero"]{border-top:4px solid #d97706;}
.pro-sire-query-lab-card[data-family="ae"]{border-top:4px solid #7c3aed;}
.pro-sire-query-lab-head,
.pro-sire-query-combined-head{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:flex-start;
}
.pro-sire-query-lab-head h3,
.pro-sire-query-combined-head h3{
  margin:0;
  color:#0f172a;
  font-size:19px;
}
.pro-sire-query-lab-head p,
.pro-sire-query-combined-head p{
  margin:4px 0 0;
  color:#64748b;
  font-size:12px;
}
.pro-sire-query-lab-controls{
  display:grid;
  grid-template-columns:190px 1fr auto;
  align-items:end;
  gap:12px;
  padding:12px;
  border:1px solid rgba(15,23,42,.08);
  border-radius:16px;
  background:#f8fafc;
}
.pro-sire-query-lab-control-field{
  display:grid;
  gap:6px;
}
.pro-sire-query-lab-control-field span,
.pro-sire-query-lab-toggle span{
  color:#64748b;
  font-size:10px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.pro-sire-query-lab-toggle{
  display:grid;
  gap:7px;
}
.pro-sire-query-lab-toggle button{
  border:1px solid rgba(15,23,42,.14);
  border-radius:999px;
  padding:9px 12px;
  background:#fff;
  color:#334155;
  font-weight:900;
  cursor:pointer;
}
.pro-sire-query-lab-toggle button.is-on{
  color:#065f46;
  border-color:rgba(16,185,129,.45);
  background:#ecfdf5;
}
.pro-sire-query-lab-minmax{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.pro-sire-query-lab-minmax label{
  display:grid;
  gap:5px;
  color:#64748b;
  font-size:10px;
  font-weight:900;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.pro-sire-query-lab-minmax input{
  width:100%;
  border:1px solid rgba(15,23,42,.14);
  border-radius:10px;
  padding:8px 10px;
  font-size:13px;
  font-weight:800;
  color:#0f172a;
  background:#fff;
}
.pro-sire-query-copy-button{
  min-width:245px;
  border-radius:999px!important;
  padding:10px 16px!important;
  font-size:12px!important;
  font-weight:900!important;
}
.pro-sire-query-copy-note{
  display:block;
  margin-top:5px;
  color:#64748b;
  font-size:10px;
  font-weight:700;
  text-align:center;
}
.pro-sire-query-lab-results{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:14px;
}
.pro-sire-query-table-block{
  min-width:0;
  border:1px solid rgba(15,23,42,.08);
  border-radius:16px;
  overflow:hidden;
  background:#fff;
}
.pro-sire-query-table-title{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-bottom:1px solid rgba(15,23,42,.08);
  background:#f8fafc;
}
.pro-sire-query-table-title strong{
  color:#0f172a;
  font-size:13px;
}
.pro-sire-query-table-title span{
  color:#64748b;
  font-size:11px;
  font-weight:800;
}
.pro-sire-query-detail-table-wrap{
  overflow:auto;
}
.pro-sire-query-detail-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  min-width:760px;
}
.pro-sire-query-detail-table th,
.pro-sire-query-detail-table td{
  padding:8px 9px;
  border-bottom:1px solid rgba(15,23,42,.07);
  text-align:right;
  white-space:nowrap;
  font-size:11px;
}
.pro-sire-query-detail-table th:first-child,
.pro-sire-query-detail-table td:first-child{
  text-align:left;
}
.pro-sire-query-detail-table th{
  color:#475569;
  background:#f8fafc;
  font-size:10px;
  font-weight:900;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.pro-sire-query-detail-table td{
  color:#0f172a;
  font-weight:750;
}
.pro-sire-query-combined-card{border-top:4px solid #0f766e;}
.pro-sire-query-combined-card .pro-sire-query-detail-table{min-width:980px;}
.pro-sire-query-read-card{
  background:linear-gradient(135deg,#ffffff,#f8fafc);
}
.pro-sire-query-read-card h3{
  margin:0;
  font-size:17px;
  color:#0f172a;
}
.pro-sire-query-read-list{
  margin:0;
  padding-left:18px;
  color:#334155;
  font-size:13px;
  line-height:1.55;
}
.pro-sire-query-detail-loading,
.pro-sire-query-detail-error{
  padding:22px;
  border:1px solid rgba(15,23,42,.1);
  border-radius:18px;
  background:#fff;
  color:#334155;
  font-weight:800;
}
.pro-sire-query-detail-error{
  border-color:rgba(220,38,38,.25);
  background:#fef2f2;
  color:#991b1b;
}
@media(max-width:1300px){
  .pro-sire-query-passport-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
  .pro-sire-query-lab-controls{grid-template-columns:1fr;}
  .pro-sire-query-copy-button{min-width:0;width:100%;}
  .pro-sire-query-lab-results{grid-template-columns:1fr;}
}


/* ========================================================================
   PRO_SYSTEM_BUILDER_002W — Query Detail launch/display hotfix
   Fixes 002V workspace placement inside the fixed Pro SIRE grid shell and
   makes the Query N chip the launch control. Backend/query maths unchanged.
   ======================================================================== */
#proSireQueryGridPanel.pro-sire-query-detail-open{
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr)!important;
  gap:10px!important;
  overflow:hidden!important;
}
#proSireQueryGridPanel.pro-sire-query-detail-open .pro-sire-workspace-top{
  grid-row:1!important;
}
#proSireQueryGridPanel.pro-sire-query-detail-open .pro-sire-query-detail-workspace{
  grid-row:2!important;
  min-height:0!important;
  height:100%!important;
  max-height:none!important;
  overflow:auto!important;
  padding:18px 22px 34px!important;
  border-top:1px solid rgba(15,23,42,.08)!important;
}
#proSireQueryGridPanel.pro-sire-query-detail-open .pro-sire-query-detail-shell{
  min-height:0!important;
}
.pro-sire-query-detail-chip{
  min-width:112px!important;
  cursor:pointer!important;
  box-shadow:0 1px 0 rgba(255,255,255,.9) inset!important;
}
.pro-sire-query-detail-chip:hover,
.pro-sire-query-detail-chip:focus-visible{
  outline:none!important;
  transform:translateY(-1px)!important;
  box-shadow:0 8px 18px rgba(15,23,42,.12)!important;
}
.pro-sire-query-detail-button{
  display:none!important;
}

/* ========================================================================
   PRO_SYSTEM_BUILDER_002X — Query Detail focus / visibility correction
   Keeps the Pro SIRE workspace visible and aria-exposed while Query Detail
   is open. Prevents the browser blocking aria-hidden when focus remains
   inside the workspace shell.
   ======================================================================== */
#proSireQueryGridPanel.pro-sire-query-detail-open{
  display:grid!important;
  visibility:visible!important;
  opacity:1!important;
}
#proSireQueryDetailWorkspace:focus{
  outline:none!important;
}


/* ========================================================================
   PRO_SYSTEM_BUILDER_002Y — Query Detail true full-screen overlay fix
   Query Detail was rendering but remained trapped behind/inside the SIRE
   table layer. 002Y moves the existing workspace node to body in JS and
   gives it an explicit viewport-level overlay stacking context.
   ======================================================================== */
html.pro-sire-query-detail-active,
body.pro-sire-query-detail-active{
  overflow:hidden!important;
}
body.pro-sire-query-detail-active #proSireQueryDetailWorkspace{
  position:fixed!important;
  inset:0!important;
  z-index:2147483600!important;
  width:100vw!important;
  height:100vh!important;
  max-width:none!important;
  max-height:none!important;
  display:block!important;
  overflow:auto!important;
  box-sizing:border-box!important;
  padding:24px 28px 48px!important;
  background:linear-gradient(180deg,#f8fafc 0%,#eef6ff 100%)!important;
  border:0!important;
}
body.pro-sire-query-detail-active #proSireQueryDetailWorkspace[hidden]{
  display:none!important;
}
body.pro-sire-query-detail-active #proSireQueryDetailWorkspace .pro-sire-query-detail-shell{
  max-width:1720px!important;
  margin:0 auto!important;
  min-height:100%!important;
}
body.pro-sire-query-detail-active #proSireQueryDetailWorkspace .pro-sire-query-detail-header{
  position:sticky!important;
  top:0!important;
  z-index:3!important;
}
body.pro-sire-query-detail-active #proSireQueryGridPanel.pro-sire-query-detail-open{
  visibility:visible!important;
  opacity:1!important;
}


/* ========================================================================
   PRO_SYSTEM_BUILDER_002Z — Query Detail polish pass
   Header containment, compact query naming, premium loading, compact grouped
   detail headers and total rows. Main SIRE query grid/table unchanged.
   ======================================================================== */
body.pro-sire-query-detail-active #proSireQueryDetailWorkspace::before{
  content:"";
  position:fixed;
  top:0;
  left:0;
  right:0;
  height:22px;
  z-index:2147483601;
  background:linear-gradient(180deg,#f8fafc 0%,rgba(248,250,252,.96) 100%);
  pointer-events:none;
}
body.pro-sire-query-detail-active #proSireQueryDetailWorkspace .pro-sire-query-detail-header{
  z-index:2147483602!important;
  background:linear-gradient(135deg,#ffffff 0%,#f8fbff 100%)!important;
  box-shadow:0 18px 38px rgba(15,23,42,.14)!important;
  overflow:hidden!important;
}
body.pro-sire-query-detail-active #proSireQueryDetailWorkspace .pro-sire-query-detail-title-block h2{
  font-size:23px!important;
  line-height:1.16!important;
  max-width:1160px!important;
}
body.pro-sire-query-detail-active #proSireQueryDetailWorkspace .pro-sire-query-detail-title-block p{
  max-width:1160px!important;
  font-size:12px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.pro-sire-query-detail-loading-card{
  min-height:360px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:22px;
  border:1px solid rgba(37,99,235,.16);
  border-radius:26px;
  background:linear-gradient(135deg,#ffffff 0%,#eef6ff 100%);
  box-shadow:0 24px 60px rgba(15,23,42,.14);
  color:#0f172a;
}
.pro-sire-query-detail-loading-card span{
  display:block;
  color:#2563eb;
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.pro-sire-query-detail-loading-card h2{
  margin:5px 0 6px;
  font-size:26px;
}
.pro-sire-query-detail-loading-card p{
  margin:0;
  color:#64748b;
  font-weight:800;
}
.pro-sire-query-detail-spinner{
  width:42px;
  height:42px;
  border-radius:999px;
  border:4px solid rgba(37,99,235,.18);
  border-top-color:#2563eb;
  animation:proSireQueryDetailSpin .8s linear infinite;
  flex:0 0 auto;
}
@keyframes proSireQueryDetailSpin{to{transform:rotate(360deg);}}
.pro-sire-query-detail-busy{
  position:fixed;
  inset:0;
  z-index:2147483603;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:10px;
  background:rgba(248,250,252,.72);
  backdrop-filter:blur(3px);
  color:#0f172a;
  font-weight:900;
}
.pro-sire-query-detail-busy[hidden]{display:none!important;}
.pro-sire-query-detail-busy span{
  color:#64748b;
  font-size:12px;
  font-weight:800;
}
.pro-sire-query-detail-table-wrap{
  overflow-x:hidden!important;
  overflow-y:auto!important;
}
.pro-sire-query-detail-table{
  min-width:0!important;
  table-layout:fixed!important;
}
.pro-sire-query-detail-table col.c-key{width:13%;}
.pro-sire-query-detail-table col.c-small{width:7.5%;}
.pro-sire-query-detail-table col.c-med{width:8.5%;}
.pro-sire-query-detail-table col.c-money{width:8.5%;}
.pro-sire-query-detail-table col.c-worst{width:11%;}
.pro-sire-query-detail-table th,
.pro-sire-query-detail-table td{
  padding:7px 6px!important;
  font-size:10.5px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.pro-sire-query-detail-table thead tr.pro-sire-detail-head-groups th{
  text-align:center!important;
  background:#eef6ff!important;
  color:#1e3a8a!important;
  border-bottom:1px solid rgba(37,99,235,.18)!important;
}
.pro-sire-query-detail-table thead tr.pro-sire-detail-head-sub th{
  text-align:right!important;
  background:#f8fafc!important;
  color:#475569!important;
  font-size:9.5px!important;
  letter-spacing:.04em!important;
}
.pro-sire-query-detail-table thead tr.pro-sire-detail-head-sub th:first-child,
.pro-sire-query-detail-table thead tr.pro-sire-detail-head-groups th:first-child{
  text-align:left!important;
}
.pro-sire-query-detail-table tfoot .pro-sire-query-total-row td{
  background:#f1f5f9!important;
  border-top:2px solid rgba(15,23,42,.16)!important;
  color:#0f172a!important;
  font-weight:950!important;
}
.pro-sire-query-detail-table-ladder .pro-sire-query-total-row{display:none!important;}
@media(max-width:1200px){
  body.pro-sire-query-detail-active #proSireQueryDetailWorkspace .pro-sire-query-detail-title-block p{white-space:normal!important;}
  .pro-sire-query-detail-table th,
  .pro-sire-query-detail-table td{font-size:10px!important;padding:6px 4px!important;}
}

/* ========================================================================
   PRO_SYSTEM_BUILDER_002AA — Query Detail polish / usable sandbox controls
   Frontend-only: confirmation toast, manual threshold update, compact table
   headers, ladder sorting controls and family-colour lab cards.
   ======================================================================== */
body.pro-sire-query-detail-active #proSireQueryDetailWorkspace{
  background:linear-gradient(180deg,#f8fafc 0%,#edf6ff 46%,#f8fafc 100%)!important;
}
body.pro-sire-query-detail-active #proSireQueryDetailWorkspace .pro-sire-query-detail-header{
  backdrop-filter:blur(6px)!important;
}
#proSireQueryDetailBackButton{
  white-space:nowrap!important;
}
.pro-sire-query-lab-card[data-family="win"]{
  border-top-color:#2563eb!important;
  background:linear-gradient(180deg,#eff6ff 0%,#ffffff 34%,#ffffff 100%)!important;
}
.pro-sire-query-lab-card[data-family="zero"]{
  border-top-color:#d97706!important;
  background:linear-gradient(180deg,#fff7ed 0%,#ffffff 34%,#ffffff 100%)!important;
}
.pro-sire-query-lab-card[data-family="ae"]{
  border-top-color:#7c3aed!important;
  background:linear-gradient(180deg,#f5f3ff 0%,#ffffff 34%,#ffffff 100%)!important;
}
.pro-sire-query-lab-card[data-family="win"] .pro-sire-query-lab-controls{background:rgba(239,246,255,.72)!important;border-color:rgba(37,99,235,.16)!important;}
.pro-sire-query-lab-card[data-family="zero"] .pro-sire-query-lab-controls{background:rgba(255,247,237,.75)!important;border-color:rgba(217,119,6,.2)!important;}
.pro-sire-query-lab-card[data-family="ae"] .pro-sire-query-lab-controls{background:rgba(245,243,255,.76)!important;border-color:rgba(124,58,237,.18)!important;}
.pro-sire-query-lab-controls{
  grid-template-columns:170px max-content auto auto!important;
  align-items:end!important;
  gap:12px!important;
  padding:12px 14px!important;
}
.pro-sire-query-lab-minmax{
  display:grid!important;
  grid-template-columns:repeat(2,150px)!important;
  gap:10px!important;
  align-items:end!important;
}
.pro-sire-query-lab-minmax label{
  gap:5px!important;
  max-width:150px!important;
}
.pro-sire-query-lab-minmax input{
  height:34px!important;
  width:150px!important;
  border-radius:999px!important;
  padding:6px 12px!important;
  font-size:13px!important;
  line-height:1!important;
  box-shadow:0 1px 0 rgba(255,255,255,.9) inset,0 4px 10px rgba(15,23,42,.04)!important;
}
.pro-sire-query-lab-update,
.pro-sire-query-lab-copy{
  display:grid!important;
  justify-items:center!important;
  gap:5px!important;
}
.pro-sire-query-update-button{
  min-width:142px!important;
  border-radius:999px!important;
  padding:9px 14px!important;
  font-size:11px!important;
  font-weight:900!important;
}
.pro-sire-query-copy-button{
  min-width:230px!important;
  max-width:260px!important;
  padding:9px 14px!important;
  font-size:11px!important;
}
.pro-sire-query-copy-note{
  max-width:260px!important;
  line-height:1.25!important;
}
.pro-sire-query-lab-results{
  grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)!important;
}
.pro-sire-query-detail-table-wrap{
  overflow-x:hidden!important;
}
.pro-sire-query-detail-table-year col.c-key{width:8.5%!important;}
.pro-sire-query-detail-table-year col.c-small{width:7.2%!important;}
.pro-sire-query-detail-table-year col.c-med{width:8%!important;}
.pro-sire-query-detail-table-year col.c-money{width:8.2%!important;}
.pro-sire-query-detail-table-ladder col.c-key{width:12%!important;}
.pro-sire-query-detail-table-ladder col.c-small{width:7%!important;}
.pro-sire-query-detail-table-ladder col.c-med{width:7.8%!important;}
.pro-sire-query-detail-table-ladder col.c-money{width:8%!important;}
.pro-sire-query-detail-table-ladder col.c-worst{width:10.2%!important;}
.pro-sire-query-detail-table th,
.pro-sire-query-detail-table td{
  padding:6px 5px!important;
  vertical-align:middle!important;
  line-height:1.12!important;
}
.pro-sire-query-detail-table thead th{
  height:28px!important;
  vertical-align:middle!important;
  background:#eef6ff!important;
  color:#1e3a8a!important;
}
.pro-sire-query-detail-table thead tr.pro-sire-detail-head-groups th,
.pro-sire-query-detail-table thead tr.pro-sire-detail-head-sub th{
  background:#eef6ff!important;
  color:#1e3a8a!important;
  vertical-align:middle!important;
  border-bottom:1px solid rgba(37,99,235,.18)!important;
}
.pro-sire-query-detail-table thead tr.pro-sire-detail-head-sub th{
  font-size:9.6px!important;
  letter-spacing:.035em!important;
}
.pro-sire-query-detail-table thead tr.pro-sire-detail-head-groups th[rowspan="2"]{
  padding-top:0!important;
  padding-bottom:0!important;
}
.pro-sire-detail-sort-button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:3px!important;
  width:100%!important;
  min-width:0!important;
  border:0!important;
  background:transparent!important;
  color:#1e3a8a!important;
  font:inherit!important;
  font-weight:950!important;
  text-transform:uppercase!important;
  letter-spacing:.035em!important;
  cursor:pointer!important;
  padding:0!important;
}
.pro-sire-detail-sort-button span{
  font-size:9px!important;
  opacity:.62!important;
}
.pro-sire-detail-sort-button:hover,
.pro-sire-detail-sort-button:focus-visible{
  color:#0f172a!important;
  outline:none!important;
  text-decoration:underline!important;
}
.pro-sire-detail-sort-button[data-sort-active="asc"] span::after{content:" ↑";}
.pro-sire-detail-sort-button[data-sort-active="desc"] span::after{content:" ↓";}
.pro-sire-query-copy-confirm{
  position:fixed!important;
  top:92px!important;
  right:34px!important;
  z-index:2147483605!important;
  width:min(420px,calc(100vw - 48px))!important;
  padding:15px 17px!important;
  border:1px solid rgba(16,185,129,.34)!important;
  border-radius:18px!important;
  background:linear-gradient(135deg,#ecfdf5 0%,#ffffff 100%)!important;
  box-shadow:0 24px 52px rgba(15,23,42,.18)!important;
  color:#064e3b!important;
}
.pro-sire-query-copy-confirm[hidden]{display:none!important;}
.pro-sire-query-copy-confirm strong{
  display:block!important;
  font-size:14px!important;
  font-weight:950!important;
  margin-bottom:4px!important;
}
.pro-sire-query-copy-confirm span{
  display:block!important;
  color:#065f46!important;
  font-size:12px!important;
  font-weight:800!important;
  line-height:1.4!important;
}
@media(max-width:1380px){
  .pro-sire-query-lab-controls{grid-template-columns:1fr 1fr!important;}
  .pro-sire-query-lab-minmax{grid-template-columns:repeat(2,minmax(120px,1fr))!important;}
  .pro-sire-query-lab-minmax label,
  .pro-sire-query-lab-minmax input{max-width:none!important;width:100%!important;}
  .pro-sire-query-lab-results{grid-template-columns:1fr!important;}
}
@media(max-width:900px){
  .pro-sire-query-lab-controls{grid-template-columns:1fr!important;}
  .pro-sire-query-copy-confirm{top:76px!important;right:18px!important;}
}


/* === JOCKEY-STATS-001: like-for-like Trainer Stats duplicate with jockey accent === */
.horse-drilldown-modal-shell.is-jockey-stats .horse-drilldown-modal-header{
  background:linear-gradient(135deg,#0f172a 0%,#312e81 54%,#7c3aed 100%)!important;
  box-shadow:0 10px 26px rgba(15,23,42,.12)!important;
}
.horse-drilldown-modal-shell.is-jockey-stats .horse-drilldown-modal-header h2{
  color:#ffffff!important;
  text-shadow:0 2px 16px rgba(0,0,0,.24)!important;
}
.horse-drilldown-modal-shell.is-jockey-stats .horse-drilldown-modal-header p{color:rgba(226,232,240,.86)!important;}
.horse-drilldown-modal-shell.is-jockey-stats .horse-drilldown-kicker{color:#ddd6fe!important;}
.horse-drilldown-modal-shell.is-jockey-stats .horse-drilldown-actions .horse-drilldown-ghost,
.horse-drilldown-modal-shell.is-jockey-stats .horse-drilldown-actions .hp-hidden-top-toggle{
  border-color:rgba(255,255,255,.18)!important;
  background:rgba(255,255,255,.08)!important;
  color:#f8fafc!important;
  box-shadow:none!important;
}
.horse-drilldown-modal-shell.is-jockey-stats .horse-drilldown-actions .horse-drilldown-ghost:hover,
.horse-drilldown-modal-shell.is-jockey-stats .horse-drilldown-actions .hp-hidden-top-toggle:hover{
  background:rgba(255,255,255,.16)!important;
  border-color:rgba(255,255,255,.34)!important;
}
.horse-drilldown-modal-shell.is-jockey-stats .horse-drilldown-actions .horse-drilldown-back-racecard{
  background:#ffffff!important;
  color:#0f172a!important;
  border-color:rgba(255,255,255,.72)!important;
  box-shadow:0 12px 24px rgba(0,0,0,.16)!important;
}
.horse-drilldown-modal-shell.is-jockey-stats .horse-drilldown-close{
  background:rgba(255,255,255,.11)!important;
  color:#ffffff!important;
  border-color:rgba(255,255,255,.20)!important;
}
.horse-drilldown-modal-shell.is-jockey-stats .trainer-stats-evidence{
  --trainer-accent:#7c3aed;
  --trainer-accent-dark:#5b21b6;
  --trainer-soft:#f5f3ff;
  --trainer-soft-2:#eef2ff;
  --trainer-line:#c4b5fd;
}
.horse-drilldown-modal-shell.is-jockey-stats .trainer-stats-summary-panel{
  background:linear-gradient(135deg,#fbfaff 0%,#f5f3ff 44%,#f8fafc 100%)!important;
  border-color:rgba(124,58,237,.20)!important;
}
.horse-drilldown-modal-shell.is-jockey-stats .trainer-kicker{color:#5b21b6!important;}
.horse-drilldown-modal-shell.is-jockey-stats .trainer-condition-chip-row span{
  border-color:rgba(124,58,237,.24)!important;
  color:#5b21b6!important;
}
.horse-drilldown-modal-shell.is-jockey-stats .trainer-metric-small{border-color:rgba(124,58,237,.16)!important;}
.horse-drilldown-modal-shell.is-jockey-stats .trainer-stats-basis-banner{
  border-color:rgba(124,58,237,.24)!important;
  background:linear-gradient(135deg,#f5f3ff,#eff6ff)!important;
}
.horse-drilldown-modal-shell.is-jockey-stats .trainer-race-actions .horse-profile-action-divider{background:rgba(124,58,237,.35)!important;}
.horse-drilldown-modal-shell.is-jockey-stats .trainer-record-scope-buttons button{
  border-color:rgba(124,58,237,.22)!important;
  color:#5b21b6!important;
}
.horse-drilldown-modal-shell.is-jockey-stats .trainer-record-scope-buttons button.active{
  background:linear-gradient(135deg,#8b5cf6,#7c3aed)!important;
  color:#ffffff!important;
  border-color:rgba(124,58,237,.44)!important;
  box-shadow:0 8px 18px rgba(124,58,237,.18)!important;
}
.horse-drilldown-modal-shell.is-jockey-stats .trainer-stats-section-card{border-top-color:#7c3aed!important;}
.horse-drilldown-modal-shell.is-jockey-stats .trainer-stat-row-card.ok{background:linear-gradient(90deg,#ffffff 0%,#f5f3ff 100%)!important;}
.horse-drilldown-modal-shell.is-jockey-stats.show-hidden-jockey-checks .trainer-stat-row-card.no_evidence,
.horse-drilldown-modal-shell.is-jockey-stats.show-hidden-jockey-checks .trainer-stat-row-card.no_context{display:grid;}
.horse-drilldown-modal-shell.is-jockey-stats .trainer-stats-unavailable .horse-profile-unavailable-card{border-color:rgba(124,58,237,.25)!important;}
.live-runner-profile-actions button[data-live-open-jockey-stats]{
  border-color:rgba(124,58,237,.26);
  color:#5b21b6;
  background:linear-gradient(135deg,#ffffff,#f5f3ff);
}
.live-jockey-link{
  appearance:none;
  border:0;
  background:transparent;
  padding:0;
  margin:0;
  color:#5b21b6;
  font:inherit;
  font-weight:900;
  cursor:pointer;
  text-decoration:none;
  border-bottom:1px solid rgba(91,33,182,.30);
}
.live-jockey-link:hover{color:#4c1d95;border-bottom-color:#4c1d95;}


/* LIVE_RACING_OVERLAY_PREP_001 — Jockey Stats active racecard button polish.
   Jockey Stats now has a live endpoint; active buttons must not inherit the old disabled/no-entry cursor. */
.live-runner-profile-actions button.live-evidence-jockey:not(:disabled) {
  border-color: rgba(59, 130, 246, .24) !important;
  background: linear-gradient(135deg, #ffffff, #eef6ff) !important;
  color: #1e40af !important;
  opacity: 1 !important;
  cursor: pointer !important;
}
.live-runner-profile-actions button.live-evidence-jockey:not(:disabled),
.live-runner-profile-actions button.live-evidence-jockey:not(:disabled) * {
  cursor: pointer !important;
}
.live-runner-profile-actions button.live-evidence-jockey:not(:disabled):hover {
  border-color: rgba(37, 99, 235, .38) !important;
  background: linear-gradient(135deg, #f8fbff, #dbeafe) !important;
  color: #1d4ed8 !important;
}

/* LIVE_RACING_002AC — Racecard Overlays tab shell and local settings panel. */
.live-racecard-mode-tabs button:not(:disabled){cursor:pointer;}
.live-racecard-overlays{
  padding:0 24px 24px;
  display:grid;
  gap:14px;
  background:#f8fafc;
}
.live-overlay-settings-panel{
  border:1px solid rgba(37,99,235,.16);
  border-radius:18px;
  background:linear-gradient(135deg,#ffffff 0%,#eff6ff 100%);
  box-shadow:0 12px 32px rgba(15,23,42,.08);
  padding:16px;
}
.live-overlay-settings-panel header{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
  margin-bottom:12px;
}
.live-overlay-settings-panel h3{margin:2px 0 4px;font-size:18px;color:#0f172a;letter-spacing:-.02em;}
.live-overlay-settings-panel p{margin:0;color:#475569;font-size:12px;line-height:1.45;}
.live-overlay-kicker{font-size:11px;font-weight:950;text-transform:uppercase;letter-spacing:.08em;color:#2563eb;}
.live-overlay-rule-profile{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  border:1px solid rgba(37,99,235,.22);
  background:#fff;
  color:#1e3a8a;
  padding:6px 10px;
  font-size:11px;
  font-weight:950;
  white-space:nowrap;
}
.live-overlay-settings-grid{display:grid;gap:12px;}
.live-overlay-settings-group{
  border:1px solid rgba(203,213,225,.78);
  border-radius:14px;
  background:rgba(255,255,255,.82);
  padding:12px;
}
.live-overlay-settings-group>strong{
  display:block;
  color:#0f172a;
  font-size:12px;
  margin-bottom:8px;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.live-overlay-toggle-row,.live-overlay-setting-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;}
.live-overlay-toggle{
  display:inline-flex;
  align-items:center;
  gap:7px;
  border:1px solid rgba(148,163,184,.34);
  border-radius:999px;
  background:#fff;
  padding:7px 10px;
  font-size:12px;
  font-weight:900;
  color:#334155;
  cursor:pointer;
}
.live-overlay-toggle input{accent-color:#2563eb;}
.live-overlay-setting-field{
  display:grid;
  grid-template-columns:1fr 74px auto;
  align-items:center;
  gap:6px;
  border:1px solid rgba(148,163,184,.28);
  border-radius:10px;
  padding:7px 8px;
  background:#fff;
  min-width:210px;
}
.live-overlay-setting-field span{font-size:11px;font-weight:900;color:#475569;white-space:nowrap;}
.live-overlay-setting-field input{
  width:74px;
  border:1px solid rgba(148,163,184,.45);
  border-radius:8px;
  padding:5px 6px;
  font-weight:900;
  color:#0f172a;
}
.live-overlay-setting-field em{font-size:11px;font-style:normal;font-weight:800;color:#64748b;}
.live-overlay-settings-panel footer{margin-top:10px;color:#64748b;font-size:11px;line-height:1.35;}
.live-overlay-explainer{
  border:1px dashed rgba(37,99,235,.25);
  border-radius:14px;
  background:#fff;
  padding:10px 12px;
  color:#334155;
  font-size:12px;
}
.live-overlay-runner-list{display:grid;gap:12px;}
.live-overlay-runner-row{
  border:1px solid rgba(203,213,225,.82);
  border-radius:18px;
  background:#fff;
  box-shadow:0 12px 28px rgba(15,23,42,.07);
  overflow:hidden;
}
.live-overlay-runner-row.non-runner{opacity:.58;background:#f8fafc;}
.live-overlay-runner-row.manual-excluded{background:linear-gradient(90deg,#fff7ed 0%,#ffffff 100%);}
.live-overlay-runner-topline{
  display:grid;
  grid-template-columns:48px minmax(0,1fr) minmax(190px,260px);
  gap:12px;
  align-items:center;
  padding:12px 14px;
  border-bottom:1px solid rgba(226,232,240,.9);
}
.live-overlay-runner-identity{min-width:0;}
.live-overlay-runner-subline{display:flex;flex-wrap:wrap;gap:8px 12px;color:#475569;font-size:12px;margin-top:4px;}
.live-overlay-runner-subline b{color:#0f172a;}
.live-overlay-mini-evidence-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-self:stretch;
}
.live-overlay-mini-evidence-grid .live-evidence-button{font-size:10px!important;padding:5px 6px!important;border-radius:8px!important;min-height:0!important;}
.live-overlay-family-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  padding:12px 14px 14px;
}
.live-overlay-family-card{
  border:1px solid rgba(203,213,225,.86);
  border-radius:14px;
  background:#f8fafc;
  padding:10px;
  display:grid;
  gap:8px;
  min-width:0;
}
.live-overlay-family-card header{display:flex;justify-content:space-between;gap:8px;align-items:flex-start;}
.live-overlay-family-card header strong{font-size:13px;color:#0f172a;}
.live-overlay-family-card header small{font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.04em;color:#64748b;text-align:right;}
.live-overlay-family-card.horse{background:linear-gradient(135deg,#ffffff,#eff6ff);border-color:rgba(59,130,246,.20);}
.live-overlay-family-card.sire{background:linear-gradient(135deg,#ffffff,#f0fdf4);border-color:rgba(22,163,74,.20);}
.live-overlay-family-card.trainer{background:linear-gradient(135deg,#ffffff,#fff7ed);border-color:rgba(249,115,22,.20);}
.live-overlay-family-card.jockey{background:linear-gradient(135deg,#ffffff,#f5f3ff);border-color:rgba(124,58,237,.20);}
.live-overlay-bucket-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;}
.live-overlay-bucket-grid.two{grid-template-columns:1fr;}
.live-overlay-bucket{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
  border:1px solid rgba(226,232,240,.85);
  border-radius:10px;
  background:rgba(255,255,255,.82);
  padding:6px 7px;
  min-width:0;
}
.live-overlay-bucket span:first-child{font-size:11px;font-weight:900;color:#334155;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.live-overlay-marker{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:24px;
  min-height:22px;
  border-radius:999px;
  font-size:13px;
  font-weight:1000;
  border:1px solid rgba(148,163,184,.38);
  background:#f8fafc;
  color:#475569;
}
.live-overlay-marker.ok{background:#ecfdf5;color:#047857;border-color:rgba(16,185,129,.30);}
.live-overlay-marker.unknown{background:#fffbeb;color:#92400e;border-color:rgba(245,158,11,.30);}
.live-overlay-marker.bad{background:#fef2f2;color:#b91c1c;border-color:rgba(239,68,68,.32);}
.live-overlay-marker.muted{background:#f1f5f9;color:#94a3b8;border-color:rgba(148,163,184,.28);}
.live-overlay-card-note{margin:0;color:#64748b;font-size:10.5px;line-height:1.35;font-weight:750;}
.live-overlay-empty-card{padding:16px;border-radius:14px;background:#fff;border:1px dashed rgba(148,163,184,.45);font-weight:850;color:#64748b;}
@media(max-width:1320px){.live-overlay-family-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.live-overlay-runner-topline{grid-template-columns:42px minmax(0,1fr);}.live-overlay-mini-evidence-grid{grid-column:2;grid-template-columns:repeat(4,minmax(0,1fr))!important;}}
@media(max-width:760px){.live-racecard-overlays{padding:0 12px 16px}.live-overlay-family-grid{grid-template-columns:1fr}.live-overlay-settings-panel header{display:grid}.live-overlay-setting-field{min-width:100%;}.live-overlay-mini-evidence-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}.live-overlay-runner-topline{grid-template-columns:38px minmax(0,1fr);}}

/* LIVE_RACING_002AD — Overlay evidence wiring, compact settings, and runner-head polish. */
.live-overlay-settings-panel.is-collapsed{
  padding:10px 12px;
  border-radius:14px;
  box-shadow:0 8px 22px rgba(15,23,42,.055);
}
.live-overlay-settings-panel.is-collapsed header{
  margin-bottom:8px;
  align-items:center;
}
.live-overlay-settings-panel.is-collapsed h3{
  font-size:15px;
  margin:0 0 2px;
}
.live-overlay-settings-panel.is-collapsed p{
  font-size:11px;
}
.live-overlay-settings-actions{
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
}
.live-overlay-settings-toggle{
  border:1px solid rgba(37,99,235,.22);
  border-radius:999px;
  background:#0f172a;
  color:#fff;
  font-size:11px;
  font-weight:950;
  padding:7px 10px;
  cursor:pointer;
}
.live-overlay-settings-toggle:hover{filter:brightness(1.08);}
.live-overlay-settings-summary{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  color:#475569;
  font-size:11px;
  font-weight:850;
}
.live-overlay-settings-summary span{
  display:inline-flex;
  align-items:center;
  border:1px solid rgba(148,163,184,.24);
  border-radius:999px;
  background:#fff;
  padding:5px 8px;
}
.live-overlay-explainer{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}
.live-overlay-explainer span{color:#64748b;font-weight:800;}
.live-overlay-runner-topline{
  grid-template-columns:44px minmax(260px,1fr) minmax(170px,220px);
  gap:10px;
  padding:10px 12px;
}
.live-overlay-runner-identity .live-runner-titleline{
  align-items:center;
}
.live-overlay-odds-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:#fee2e2;
  color:#991b1b;
  border:1px solid rgba(220,38,38,.22);
  padding:3px 7px;
  font-size:10px;
  font-weight:950;
  line-height:1;
}
.live-overlay-family-grid{
  gap:8px;
  padding:10px 12px 12px;
}
.live-overlay-family-card{
  padding:8px;
  gap:7px;
}
.live-overlay-family-card header strong{font-size:12px;}
.live-overlay-family-card header small{font-size:9px;}
.live-overlay-bucket-grid{gap:5px;}
.live-overlay-bucket{
  padding:5px 6px;
  border-radius:8px;
}
.live-overlay-bucket span:first-child{font-size:10.5px;}
.live-overlay-marker{
  min-width:24px;
  min-height:20px;
  padding:0 5px;
  font-size:12px;
}
.live-overlay-card-note{font-size:9.8px;}
.live-overlay-marker.bad{
  min-width:32px;
}
@media(max-width:1500px){
  .live-overlay-runner-topline{grid-template-columns:42px minmax(0,1fr) minmax(150px,190px);}
  .live-overlay-mini-evidence-grid .live-evidence-button{font-size:9.5px!important;padding:4px 5px!important;}
}
@media(max-width:1320px){
  .live-overlay-runner-topline{grid-template-columns:42px minmax(0,1fr);}
  .live-overlay-mini-evidence-grid{grid-column:1 / -1;grid-template-columns:repeat(4,minmax(0,1fr))!important;}
}

/* LIVE_RACING_002AE — Overlay visual polish, popovers, settings drawer, and compact card grammar. */
.live-racecard-state-strip{
  align-items:center;
}
.live-overlay-state-settings-button{
  border:1px solid rgba(37,99,235,.22);
  border-radius:999px;
  background:#0f172a;
  color:#fff;
  font-size:11px;
  font-weight:950;
  padding:6px 10px;
  cursor:pointer;
  box-shadow:0 6px 14px rgba(15,23,42,.12);
}
.live-overlay-state-settings-button:hover{filter:brightness(1.08);}
.live-racecard-overlays{
  gap:10px;
}
.live-overlay-settings-panel.is-open{
  padding:14px;
  border-radius:16px;
  background:linear-gradient(135deg,#ffffff 0%,#f8fbff 100%);
  box-shadow:0 10px 26px rgba(15,23,42,.065);
}
.live-overlay-settings-panel.is-open header{
  margin-bottom:10px;
  align-items:center;
}
.live-overlay-settings-panel.is-open h3{
  font-size:16px;
  margin:1px 0 2px;
}
.live-overlay-settings-panel.is-open p{
  font-size:11.5px;
}
.live-overlay-settings-grid.compact{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:10px;
}
.live-overlay-settings-grid.compact .live-overlay-settings-group{
  padding:10px;
  border-radius:12px;
}
.live-overlay-settings-grid.compact .live-overlay-settings-group.families{
  grid-column:span 2;
}
.live-overlay-settings-grid.compact .live-overlay-settings-group.sire-win,
.live-overlay-settings-grid.compact .live-overlay-settings-group.trainer-jockey-settings{
  grid-column:span 2;
}
.live-overlay-settings-grid.compact .live-overlay-settings-group.sire-zero,
.live-overlay-settings-grid.compact .live-overlay-settings-group.sire-course{
  grid-column:span 2;
}
.live-overlay-setting-field{
  min-width:160px;
  grid-template-columns:1fr 62px auto;
  padding:6px 7px;
}
.live-overlay-setting-field input{width:62px;}
.live-overlay-toggle{
  padding:6px 9px;
  font-size:11px;
}
.live-overlay-explainer{
  padding:7px 10px;
  font-size:11px;
}
.live-overlay-runner-row{
  overflow:visible;
  border-radius:16px;
}
.live-overlay-runner-topline{
  grid-template-columns:44px minmax(0,1fr);
  padding:9px 12px;
  gap:10px;
}
.live-overlay-runner-subline{
  gap:7px 14px;
  font-size:11.5px;
}
.live-overlay-undo-exclude{
  border:1px solid rgba(249,115,22,.28);
  border-radius:999px;
  background:#fff7ed;
  color:#9a3412;
  font-size:10px;
  font-weight:950;
  padding:3px 7px;
  cursor:pointer;
}
.live-overlay-undo-exclude:hover{background:#ffedd5;}
.live-overlay-family-grid{
  grid-template-columns:1.05fr 1.05fr 1fr .95fr;
  gap:7px;
  padding:8px 12px 10px;
}
.live-overlay-family-card{
  padding:7px;
  gap:6px;
  border-radius:12px;
  box-shadow:none;
}
.live-overlay-family-card header{
  align-items:center;
}
.live-overlay-family-card header strong{
  font-size:12px;
}
.live-overlay-family-card header small,
.live-overlay-card-note{
  display:none!important;
}
.live-overlay-family-open{
  border:1px solid rgba(148,163,184,.30);
  border-radius:999px;
  background:#fff;
  color:#334155;
  font-size:9.5px;
  font-weight:950;
  padding:3px 7px;
  cursor:pointer;
  line-height:1.1;
}
.live-overlay-family-open:hover{filter:brightness(.98);box-shadow:0 4px 10px rgba(15,23,42,.08);}
.live-overlay-family-open:disabled{opacity:.45;cursor:not-allowed;box-shadow:none;}
.live-overlay-family-open.horse{color:#1d4ed8;border-color:rgba(37,99,235,.24);}
.live-overlay-family-open.sire{color:#6d28d9;border-color:rgba(124,58,237,.24);}
.live-overlay-family-open.trainer{color:#047857;border-color:rgba(16,185,129,.24);}
.live-overlay-family-open.jockey{color:#1d4ed8;border-color:rgba(59,130,246,.24);}
.live-overlay-bucket-grid{
  gap:4px;
}
.live-overlay-bucket{
  padding:4px 6px;
  min-height:28px;
}
.live-overlay-bucket span:first-child{
  font-size:10px;
}
.live-overlay-marker-wrap{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}
.live-overlay-marker-wrap.has-detail .live-overlay-marker{
  cursor:pointer;
}
.live-overlay-marker{
  min-width:22px;
  min-height:20px;
  padding:0 5px;
  font-size:12px;
}
.live-overlay-marker.bad{
  min-width:22px;
}
.live-overlay-popover{
  position:absolute;
  z-index:80;
  right:0;
  top:calc(100% + 8px);
  width:min(360px,calc(100vw - 48px));
  max-height:320px;
  overflow:auto;
  border:1px solid rgba(148,163,184,.32);
  border-radius:16px;
  background:#fff;
  box-shadow:0 20px 42px rgba(15,23,42,.20);
  padding:10px;
  opacity:0;
  visibility:hidden;
  transform:translateY(-4px);
  transition:opacity .08s ease, transform .08s ease, visibility .08s ease;
  pointer-events:none;
  text-align:left;
}
.live-overlay-marker-wrap.has-detail:hover .live-overlay-popover,
.live-overlay-marker-wrap.has-detail:focus-within .live-overlay-popover{
  opacity:1;
  visibility:visible;
  transform:translateY(0);
  pointer-events:auto;
}
.live-overlay-popover-block{
  border:1px solid rgba(226,232,240,.92);
  border-radius:12px;
  background:#f8fafc;
  padding:8px 9px;
  margin-top:7px;
}
.live-overlay-popover-block.first{
  margin-top:0;
  background:linear-gradient(135deg,#fff,#f8fafc);
}
.live-overlay-popover-block strong{
  display:block;
  color:#0f172a;
  font-size:12px;
  line-height:1.25;
  margin-bottom:3px;
}
.live-overlay-popover-block p{
  margin:0;
  color:#475569;
  font-size:11px;
  line-height:1.35;
  font-weight:750;
}
@media(max-width:1500px){
  .live-overlay-family-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .live-overlay-settings-grid.compact{grid-template-columns:repeat(2,minmax(0,1fr));}
  .live-overlay-settings-grid.compact .live-overlay-settings-group{grid-column:span 1!important;}
}
@media(max-width:760px){
  .live-overlay-family-grid{grid-template-columns:1fr;}
  .live-overlay-settings-grid.compact{grid-template-columns:1fr;}
  .live-overlay-setting-field{min-width:100%;}
  .live-overlay-popover{left:auto;right:-4px;width:min(320px,calc(100vw - 36px));}
}

/* LIVE_RACING_002AF — Overlay modal settings, viewport popovers, label polish and card balance. */
.live-overlay-settings-modal-layer{
  position:fixed;
  inset:0;
  z-index:1200;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(15,23,42,.36);
  backdrop-filter:blur(8px);
}
.live-overlay-settings-modal{
  width:min(1120px,calc(100vw - 44px));
  max-height:min(820px,calc(100vh - 48px));
  overflow:auto;
  border:1px solid rgba(148,163,184,.32);
  border-radius:24px;
  background:linear-gradient(135deg,#ffffff 0%,#f8fbff 48%,#f5f3ff 100%);
  box-shadow:0 30px 80px rgba(15,23,42,.28);
  padding:18px;
}
.live-overlay-settings-modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:14px;
}
.live-overlay-settings-modal-head h3{
  margin:2px 0 4px;
  font-size:22px;
  line-height:1.05;
  letter-spacing:-.035em;
  color:#0f172a;
}
.live-overlay-settings-modal-head p{
  margin:0;
  color:#64748b;
  font-size:12px;
  font-weight:750;
}
.live-overlay-reset-button{
  border:1px solid rgba(37,99,235,.22);
  border-radius:999px;
  background:#fff;
  color:#1d4ed8;
  font-size:11px;
  font-weight:950;
  padding:8px 11px;
  cursor:pointer;
}
.live-overlay-reset-button:hover{background:#eff6ff;}
.live-overlay-settings-modal-grid{
  display:grid;
  gap:12px;
}
.live-overlay-settings-split{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.live-overlay-settings-modal .live-overlay-settings-group{
  position:relative;
  border:1px solid rgba(203,213,225,.82);
  border-radius:18px;
  background:rgba(255,255,255,.86);
  box-shadow:0 10px 24px rgba(15,23,42,.05);
  padding:14px;
}
.live-overlay-settings-modal .live-overlay-settings-group>strong{
  display:block;
  margin-bottom:10px;
  color:#0f172a;
  font-size:12px;
  letter-spacing:.075em;
  text-transform:uppercase;
}
.live-overlay-settings-modal .families{
  background:linear-gradient(135deg,#ffffff,#eff6ff);
}
.live-overlay-settings-modal .handicap-settings{
  background:linear-gradient(135deg,#ffffff,#f0fdf4);
  border-color:rgba(16,185,129,.20);
}
.live-overlay-settings-modal .nonhandicap-settings{
  background:linear-gradient(135deg,#ffffff,#fff7ed);
  border-color:rgba(249,115,22,.22);
}
.live-overlay-settings-modal .sire-global-settings{
  background:linear-gradient(135deg,#ffffff,#f5f3ff);
  border-color:rgba(124,58,237,.22);
}
.live-overlay-settings-modal .trainer-caution-settings{
  background:linear-gradient(135deg,#ffffff,#fff7ed);
  border-color:rgba(249,115,22,.22);
}
.live-overlay-settings-modal .jockey-caution-settings{
  background:linear-gradient(135deg,#ffffff,#eff6ff);
  border-color:rgba(59,130,246,.22);
}
.live-overlay-chip-row{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.live-overlay-family-chip{
  border:1px solid rgba(148,163,184,.34);
  border-radius:16px;
  background:#fff;
  color:#334155;
  padding:12px 14px;
  min-height:48px;
  font-size:13px;
  font-weight:1000;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(15,23,42,.055);
}
.live-overlay-family-chip.active{
  border-color:rgba(37,99,235,.28);
  background:linear-gradient(135deg,#1d4ed8,#7c3aed);
  color:#fff;
  box-shadow:0 12px 24px rgba(59,130,246,.22);
}
.live-overlay-family-chip:not(.active):hover{background:#f8fafc;}
.live-overlay-settings-modal .live-overlay-setting-row{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
}
.live-overlay-settings-modal .sire-global-settings .live-overlay-setting-row{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.live-overlay-settings-modal .live-overlay-setting-field{
  min-width:0;
  width:100%;
  grid-template-columns:1fr 72px auto;
  background:rgba(255,255,255,.92);
  border-radius:14px;
  padding:9px 10px;
}
.live-overlay-settings-modal .live-overlay-setting-field span{
  color:#334155;
  font-size:11px;
}
.live-overlay-settings-modal .live-overlay-setting-field input{
  width:72px;
  font-size:13px;
}
.live-overlay-settings-panel{display:none;}
.live-overlay-family-grid{
  grid-template-columns:1.18fr 1.04fr .92fr .62fr;
  align-items:stretch;
}
.live-overlay-family-card header strong{
  display:flex;
  align-items:baseline;
  gap:4px;
  min-width:0;
  font-size:12px;
  white-space:nowrap;
}
.live-overlay-family-card header strong em{
  max-width:120px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-style:normal;
  color:#64748b;
  font-size:10.5px;
  font-weight:900;
}
.live-overlay-family-card.horse .live-overlay-bucket-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.live-overlay-family-card.jockey .live-overlay-bucket-grid.two{
  grid-template-columns:1fr;
}
.live-overlay-family-card.jockey .live-overlay-bucket{min-height:33px;}
.live-overlay-bucket-label{
  display:grid;
  gap:1px;
  min-width:0;
  line-height:1.05;
}
.live-overlay-bucket-label strong{
  font-size:10.5px;
  color:#0f172a;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}
.live-overlay-bucket-label small{
  font-size:9px;
  font-weight:850;
  color:#64748b;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}
.live-overlay-family-open{
  border-radius:999px;
  padding:5px 9px;
  font-size:10px;
  min-width:max-content;
  box-shadow:0 5px 12px rgba(15,23,42,.06);
}
.live-overlay-family-open.horse{background:#eff6ff;color:#1d4ed8;border-color:rgba(37,99,235,.26);}
.live-overlay-family-open.sire{background:#f5f3ff;color:#6d28d9;border-color:rgba(124,58,237,.26);}
.live-overlay-family-open.trainer{background:#ecfdf5;color:#047857;border-color:rgba(16,185,129,.26);}
.live-overlay-family-open.jockey{background:#eff6ff;color:#1d4ed8;border-color:rgba(59,130,246,.26);}
.live-overlay-person-link{
  border:0;
  background:transparent;
  color:#334155;
  font:inherit;
  font-weight:850;
  padding:0;
  cursor:pointer;
}
.live-overlay-person-link:hover{
  color:#1d4ed8;
  text-decoration:underline;
  text-underline-offset:2px;
}
.live-overlay-marker-wrap .live-overlay-popover{display:none!important;}
.live-overlay-marker-wrap.has-detail .live-overlay-marker:hover,
.live-overlay-marker-wrap.has-detail .live-overlay-marker:focus{
  transform:translateY(-1px);
  box-shadow:0 6px 14px rgba(15,23,42,.12);
  outline:none;
}
.live-overlay-floating-popover{
  position:fixed;
  z-index:4000;
  max-height:min(460px,calc(100vh - 28px));
  overflow:auto;
  border:1px solid rgba(148,163,184,.34);
  border-radius:20px;
  background:#fff;
  box-shadow:0 28px 70px rgba(15,23,42,.26);
  padding:12px;
  opacity:0;
  transform:translateY(-4px);
  transition:opacity .07s ease, transform .07s ease;
  pointer-events:none;
}
.live-overlay-floating-popover.visible{opacity:1;transform:translateY(0);}
.live-overlay-floating-popover.bad{
  background:linear-gradient(135deg,#fff,#fff1f2);
  border-color:rgba(248,113,113,.32);
}
.live-overlay-floating-popover.ok{
  background:linear-gradient(135deg,#fff,#ecfdf5);
  border-color:rgba(16,185,129,.30);
}
.live-overlay-floating-popover.unknown{
  background:linear-gradient(135deg,#fff,#fffbeb);
  border-color:rgba(245,158,11,.30);
}
.live-overlay-floating-popover .live-overlay-popover-block{
  border:1px solid rgba(226,232,240,.88);
  border-radius:16px;
  background:rgba(255,255,255,.88);
  padding:11px 12px;
  margin-top:10px;
}
.live-overlay-floating-popover .live-overlay-popover-block.first{
  margin-top:0;
  background:rgba(255,255,255,.70);
}
.live-overlay-floating-popover .live-overlay-popover-block strong{
  display:block;
  color:#0f172a;
  font-size:13px;
  line-height:1.25;
  margin-bottom:5px;
}
.live-overlay-floating-popover .live-overlay-popover-block p{
  margin:0;
  color:#475569;
  font-size:11.5px;
  line-height:1.45;
  font-weight:800;
}
@media(max-width:1500px){
  .live-overlay-family-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:860px){
  .live-overlay-settings-modal{width:calc(100vw - 24px);padding:14px;}
  .live-overlay-settings-modal-head{display:grid;}
  .live-overlay-settings-split{grid-template-columns:1fr;}
  .live-overlay-chip-row{grid-template-columns:repeat(2,minmax(0,1fr));}
  .live-overlay-settings-modal .live-overlay-setting-row,
  .live-overlay-settings-modal .sire-global-settings .live-overlay-setting-row{grid-template-columns:1fr;}
}

/* LIVE_RACING_002AG — overlay racecard header restoration, class/field polish, responsive wrapping, and evidence-popover refinement. */
.live-overlay-runner-topline{
  grid-template-columns:46px minmax(280px,1.35fr) minmax(360px,.95fr) minmax(96px,120px)!important;
  align-items:center;
  gap:12px;
  padding:11px 13px!important;
}
.live-overlay-runner-identity .live-runner-titleline{
  gap:6px;
  min-width:0;
}
.live-overlay-runner-identity .live-horse-link strong{
  font-size:16px;
  letter-spacing:-.02em;
}
.live-overlay-runner-subline{
  align-items:center;
  gap:6px 14px!important;
  margin-top:4px;
}
.live-overlay-runner-facts{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:6px;
  min-width:0;
}
.live-overlay-runner-facts>span,
.live-overlay-form-figures{
  display:inline-flex;
  align-items:center;
  gap:5px;
  min-height:25px;
  border:1px solid rgba(203,213,225,.78);
  border-radius:999px;
  background:#fff;
  padding:4px 8px;
  font-size:10.5px;
  font-weight:900;
  color:#334155;
}
.live-overlay-runner-facts b{
  color:#64748b;
  font-size:9.5px;
  text-transform:uppercase;
  letter-spacing:.045em;
}
.live-overlay-form-figures{
  gap:2px;
  padding:4px 7px;
}
.live-overlay-form-figures span{
  min-width:12px;
  text-align:center;
}
.live-overlay-ratings{
  border:0!important;
  padding:0!important;
  background:transparent!important;
  gap:4px!important;
}
.live-overlay-ratings>span{
  display:inline-flex;
  align-items:center;
  gap:4px;
  min-height:25px;
  border:1px solid rgba(203,213,225,.78);
  border-radius:999px;
  background:#fff;
  padding:4px 8px;
  font-size:10.5px;
  font-weight:900;
  color:#334155;
}
.live-overlay-ratings b{
  color:#64748b;
}
.live-overlay-runner-actions{
  display:grid;
  justify-items:end;
  gap:6px;
  min-width:0;
}
.live-overlay-runner-action{
  border:1px solid rgba(148,163,184,.32);
  border-radius:999px;
  background:#fff;
  color:#334155;
  font-size:10.5px;
  font-weight:950;
  padding:5px 10px;
  cursor:pointer;
  box-shadow:0 6px 14px rgba(15,23,42,.055);
}
.live-overlay-runner-action.exclude{
  color:#9a3412;
  border-color:rgba(249,115,22,.28);
  background:#fff7ed;
}
.live-overlay-runner-action.undo{
  color:#9a3412;
  border-color:rgba(249,115,22,.28);
  background:#ffedd5;
}
.live-overlay-runner-action:hover{filter:brightness(.98);box-shadow:0 8px 18px rgba(15,23,42,.09);}
.live-overlay-family-grid{
  grid-template-columns:minmax(330px,1.18fr) minmax(280px,1.02fr) minmax(250px,.92fr) minmax(190px,.58fr)!important;
}
.live-overlay-family-card{
  min-width:0;
}
.live-overlay-family-card header{
  min-width:0;
  gap:8px;
}
.live-overlay-family-card header strong{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
}
.live-overlay-family-open{
  font-size:10.5px!important;
  padding:6px 11px!important;
  white-space:nowrap;
}
.live-overlay-bucket{
  min-width:0;
  overflow:hidden;
}
.live-overlay-bucket-label small{
  max-width:100%;
}
.live-overlay-floating-popover{
  padding:14px;
  border-radius:22px;
}
.live-overlay-floating-popover.bad{
  background:linear-gradient(135deg,#fff7f7 0%,#fff1f2 100%);
  border-color:rgba(248,113,113,.42);
}
.live-overlay-floating-popover.ok{
  background:linear-gradient(135deg,#f8fffb 0%,#ecfdf5 100%);
}
.live-overlay-floating-popover.unknown{
  background:linear-gradient(135deg,#fffefa 0%,#fffbeb 100%);
}
.live-overlay-floating-popover .live-overlay-popover-block{
  border-radius:18px;
  padding:13px 15px;
  margin-top:12px;
  background:rgba(255,255,255,.90);
  box-shadow:0 8px 22px rgba(15,23,42,.045);
}
.live-overlay-floating-popover.bad .live-overlay-popover-block{
  border-color:rgba(248,113,113,.30);
  background:rgba(255,255,255,.72);
}
.live-overlay-floating-popover .live-overlay-popover-block.first{
  background:rgba(255,255,255,.82);
  border-color:rgba(203,213,225,.88);
}
.live-overlay-floating-popover .live-overlay-popover-block strong{
  font-size:15px;
  letter-spacing:-.02em;
  line-height:1.22;
  margin-bottom:7px;
}
.live-overlay-floating-popover .live-overlay-popover-block p{
  font-size:13px;
  line-height:1.48;
  font-weight:850;
  color:#475569;
}
.live-overlay-floating-popover.bad .live-overlay-popover-block p strong,
.live-overlay-floating-popover.bad .live-overlay-popover-block strong{
  color:#0f172a;
}
@media(max-width:1540px){
  .live-overlay-runner-topline{
    grid-template-columns:44px minmax(250px,1fr) minmax(320px,.9fr) minmax(90px,110px)!important;
  }
  .live-overlay-family-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:1180px){
  .live-overlay-runner-topline{
    grid-template-columns:44px minmax(0,1fr) minmax(88px,110px)!important;
  }
  .live-overlay-runner-facts{
    grid-column:2 / -1;
    justify-content:flex-start;
  }
  .live-overlay-family-grid{
    grid-template-columns:1fr!important;
  }
  .live-overlay-family-card.jockey .live-overlay-bucket-grid.two{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:760px){
  .live-overlay-runner-topline{
    grid-template-columns:40px minmax(0,1fr)!important;
  }
  .live-overlay-runner-actions,
  .live-overlay-runner-facts{
    grid-column:1 / -1;
    justify-content:flex-start;
    justify-items:start;
  }
  .live-overlay-runner-actions{
    display:flex;
    flex-wrap:wrap;
  }
  .live-overlay-family-card.jockey .live-overlay-bucket-grid.two{
    grid-template-columns:1fr;
  }
}

/* LIVE_RACING_002AH — overlay header alignment and course-traits popover cleanup. */
.live-overlay-runner-topline.live-overlay-runner-topline-002ah{
  grid-template-columns:46px minmax(250px,1.12fr) minmax(72px,88px) minmax(168px,.72fr) minmax(92px,112px) minmax(90px,108px)!important;
  align-items:center!important;
  gap:12px!important;
  padding:11px 13px!important;
}
.live-overlay-runner-topline-002ah .live-overlay-runner-identity{
  display:grid;
  align-content:center;
  gap:2px;
  min-width:0;
}
.live-overlay-runner-topline-002ah .live-runner-titleline{
  gap:6px;
  min-width:0;
}
.live-overlay-runner-topline-002ah .live-runner-titleline .live-horse-link strong{
  font-size:17px;
  letter-spacing:-.02em;
}
.live-overlay-runner-meta-line{
  margin-top:0!important;
  min-height:14px;
  font-size:10.5px!important;
  font-weight:850;
  color:#475569;
}
.live-overlay-formline-002ah{
  justify-self:start;
  margin-top:2px;
  min-height:27px!important;
  padding:4px 9px!important;
  gap:2px!important;
  border-radius:999px!important;
  font-size:13px!important;
  font-weight:950!important;
  color:#0f172a!important;
  border-color:rgba(203,213,225,.86)!important;
  background:#fff!important;
}
.live-overlay-formline-002ah span{
  min-width:13px;
  text-align:center;
}
.live-overlay-runner-age-weight-002ah,
.live-overlay-runner-connections-002ah,
.live-overlay-runner-ratings-002ah{
  display:grid;
  align-content:center;
  gap:4px;
  min-width:0;
}
.live-overlay-runner-age-weight-002ah{
  justify-items:start;
  color:#0f172a;
  font-size:14px;
  font-weight:950;
  line-height:1.08;
}
.live-overlay-runner-connections-002ah{
  justify-items:start;
  color:#334155;
  font-size:12.5px;
  font-weight:850;
  line-height:1.18;
}
.live-overlay-runner-connections-002ah span{
  display:flex;
  align-items:center;
  gap:4px;
  min-width:0;
  white-space:nowrap;
}
.live-overlay-runner-connections-002ah b{
  color:#64748b;
  font-weight:950;
}
.live-overlay-runner-ratings-002ah{
  justify-items:end;
}
.live-overlay-runner-ratings-002ah > span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  min-height:25px;
  min-width:68px;
  border:1px solid rgba(203,213,225,.78);
  border-radius:999px;
  background:#fff;
  padding:4px 8px;
  color:#0f172a;
  font-size:11.5px;
  font-weight:950;
  line-height:1;
}
.live-overlay-runner-ratings-002ah b{
  color:#64748b;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.045em;
}
.live-overlay-runner-topline-002ah .live-overlay-runner-actions{
  justify-items:end;
  align-content:center;
}
.live-runner-actions-001l .live-racecard-exclude-action{
  width:68px!important;
  max-width:68px!important;
  min-height:28px!important;
  padding:5px 9px!important;
  border-radius:999px!important;
  color:#9a3412!important;
  border:1px solid rgba(249,115,22,.28)!important;
  background:#fff7ed!important;
  font-size:10.5px!important;
  font-weight:950!important;
  box-shadow:0 6px 14px rgba(15,23,42,.055)!important;
}
.live-runner-actions-001l .live-racecard-exclude-action.undo{
  background:#ffedd5!important;
}
.live-runner-actions-001l .live-racecard-exclude-action:hover{
  filter:brightness(.98);
  box-shadow:0 8px 18px rgba(15,23,42,.09)!important;
}
.live-overlay-floating-popover.ok .live-overlay-popover-block.first strong,
.live-overlay-floating-popover.ok .live-overlay-popover-block.first p{
  color:#0f172a;
}
.live-overlay-floating-popover .live-overlay-popover-block p br + br{
  display:none;
}
@media(max-width:1540px){
  .live-overlay-runner-topline.live-overlay-runner-topline-002ah{
    grid-template-columns:44px minmax(240px,1fr) minmax(72px,84px) minmax(156px,.75fr) minmax(88px,104px) minmax(86px,102px)!important;
    gap:10px!important;
  }
}
@media(max-width:1180px){
  .live-overlay-runner-topline.live-overlay-runner-topline-002ah{
    grid-template-columns:44px minmax(0,1fr) minmax(150px,.72fr) minmax(88px,108px)!important;
  }
  .live-overlay-runner-age-weight-002ah,
  .live-overlay-runner-ratings-002ah{
    grid-column:auto;
  }
  .live-overlay-runner-connections-002ah{
    grid-column:2 / 3;
  }
  .live-overlay-runner-ratings-002ah{
    justify-items:start;
  }
}
@media(max-width:760px){
  .live-overlay-runner-topline.live-overlay-runner-topline-002ah{
    grid-template-columns:40px minmax(0,1fr)!important;
  }
  .live-overlay-runner-age-weight-002ah,
  .live-overlay-runner-connections-002ah,
  .live-overlay-runner-ratings-002ah,
  .live-overlay-runner-topline-002ah .live-overlay-runner-actions{
    grid-column:1 / -1;
    justify-items:start;
  }
  .live-overlay-runner-age-weight-002ah,
  .live-overlay-runner-connections-002ah,
  .live-overlay-runner-ratings-002ah{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
  }
}

/* LIVE_RACING_002AI — overlay exclusion consistency, evidence-page context states, and action-button polish. */
.live-overlay-runner-row.profile-eliminated,
.live-overlay-runner-row.system-eliminated{
  background:linear-gradient(90deg,#fef2f2,#ffffff)!important;
  border-left:6px solid #dc2626!important;
}
.live-overlay-runner-row.manual-excluded{
  background:linear-gradient(90deg,#fff7ed,#ffffff)!important;
  border-left:6px solid #f59e0b!important;
}
.live-overlay-runner-row.overlay-excluded .live-overlay-runner-topline{
  border-bottom:0!important;
}
.live-overlay-runner-row.overlay-excluded .live-silk-placeholder,
.live-overlay-runner-row.overlay-excluded .live-overlay-runner-identity,
.live-overlay-runner-row.overlay-excluded .live-overlay-runner-age-weight-002ah,
.live-overlay-runner-row.overlay-excluded .live-overlay-runner-connections-002ah,
.live-overlay-runner-row.overlay-excluded .live-overlay-runner-ratings-002ah{
  filter:saturate(.86);
}
.live-overlay-runner-row.profile-eliminated .live-runner-titleline strong,
.live-overlay-runner-row.system-eliminated .live-runner-titleline strong{
  color:#991b1b!important;
}
.live-overlay-runner-row.manual-excluded .live-runner-titleline strong{
  color:#92400e!important;
}
.live-overlay-runner-topline-002ah .live-overlay-runner-actions{
  display:grid!important;
  grid-template-rows:27px 27px;
  align-content:center!important;
  align-items:center!important;
  justify-items:end!important;
  gap:5px!important;
}
.live-overlay-odds-chip{
  min-width:68px!important;
  min-height:27px!important;
  border-radius:999px!important;
  font-size:11px!important;
  padding:5px 10px!important;
}
.live-overlay-odds-chip.profile-excluded,
.live-overlay-odds-chip.system-excluded{
  background:#fee2e2!important;
  color:#991b1b!important;
  border-color:rgba(220,38,38,.30)!important;
}
.live-overlay-odds-chip.manual-excluded{
  background:#ffedd5!important;
  color:#9a3412!important;
  border-color:rgba(245,158,11,.34)!important;
}
.live-overlay-runner-action,
.live-overlay-runner-topline-002ah .live-racecard-exclude-action{
  min-width:68px!important;
  min-height:27px!important;
  padding:5px 10px!important;
  border-radius:999px!important;
  font-size:10.5px!important;
  line-height:1!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
}
.live-overlay-runner-topline-002ah .live-racecard-exclude-action.profile-system:disabled{
  min-width:104px!important;
  color:#991b1b!important;
  background:#fee2e2!important;
  border-color:rgba(220,38,38,.30)!important;
  opacity:.86!important;
}
.live-overlay-formline-002ah{
  border:0!important;
  background:transparent!important;
  border-radius:0!important;
  padding:0!important;
  min-height:0!important;
  margin-top:6px!important;
  letter-spacing:.09em!important;
  box-shadow:none!important;
}
.live-overlay-formline-002ah span{
  font-size:13.2px!important;
  min-width:11px!important;
}
.live-overlay-marker.bad{
  background:#fee2e2!important;
  color:#991b1b!important;
  border-color:rgba(220,38,38,.55)!important;
  box-shadow:inset 0 0 0 1px rgba(220,38,38,.10);
}
.live-overlay-marker-wrap.has-detail .live-overlay-marker.bad:hover,
.live-overlay-marker-wrap.has-detail .live-overlay-marker.bad:focus{
  box-shadow:0 7px 16px rgba(220,38,38,.20)!important;
}
.horse-context-runner-list .is-context-excluded:not(.active){
  background:linear-gradient(90deg,#fef2f2,#ffffff)!important;
  border-color:rgba(220,38,38,.24)!important;
}
.horse-context-runner-list .is-context-profile-excluded:not(.active),
.horse-context-runner-list .is-context-system-excluded:not(.active){
  box-shadow:inset 4px 0 0 rgba(220,38,38,.72)!important;
}
.context-profile-excluded-pill,
.context-system-excluded-pill{
  color:#991b1b!important;
  background:#fee2e2!important;
  border:1px solid rgba(220,38,38,.30)!important;
}
.live-system-toggle-button:not(.active):not(.has-system){
  border-color:rgba(255,255,255,.22)!important;
  background:rgba(255,255,255,.08)!important;
  color:#fff!important;
  box-shadow:none!important;
}
.live-system-toggle-button:not(.active):not(.has-system):hover{
  background:rgba(255,255,255,.14)!important;
}

/* LIVE_RACING_002AJ — Race Tools and card/overlay consistency pass. */
.live-racecard-nav-spacer{
  min-width:130px;
  height:1px;
}
.live-race-tools-card-002aj{
  margin:0 24px 14px!important;
  padding:12px 14px!important;
  border-radius:16px!important;
  border:1px solid rgba(203,213,225,.78)!important;
  background:linear-gradient(135deg,#ffffff 0%,#f8fbff 52%,#f5f7ff 100%)!important;
  box-shadow:0 12px 30px rgba(15,23,42,.055)!important;
  display:grid!important;
  grid-template-columns:minmax(190px,.35fr) minmax(0,1fr)!important;
  gap:14px!important;
  align-items:center!important;
}
.live-race-tools-head-002aj{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  min-width:0!important;
}
.live-race-tools-head-002aj strong{
  display:block!important;
  color:#0f766e!important;
  font-size:11px!important;
  line-height:1!important;
  font-weight:950!important;
  letter-spacing:.14em!important;
  text-transform:uppercase!important;
}
.live-race-tools-head-002aj span{
  display:block!important;
  margin-top:5px!important;
  color:#0f172a!important;
  font-size:12px!important;
  line-height:1.2!important;
  font-weight:850!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.live-race-tools-category-002aj{
  flex:0 0 auto!important;
  margin-top:0!important;
  max-width:180px!important;
  padding:5px 9px!important;
  border-radius:999px!important;
  background:#eef2ff!important;
  color:#4338ca!important;
  font-size:10.5px!important;
  font-weight:950!important;
  white-space:nowrap!important;
}
.live-race-tools-actions-002aj{
  display:flex!important;
  justify-content:flex-end!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  min-width:0!important;
}
.live-race-tools-actions-002aj button{
  border-radius:999px!important;
  min-height:31px!important;
  padding:7px 12px!important;
  font-size:11px!important;
  font-weight:950!important;
  line-height:1!important;
  letter-spacing:.005em!important;
  border:1px solid rgba(148,163,184,.45)!important;
  box-shadow:0 8px 18px rgba(15,23,42,.055)!important;
}
.live-race-tools-actions-002aj .live-system-toggle-button,
.live-race-tools-actions-002aj .live-notes-toggle-button,
.live-race-tools-actions-002aj .live-profile-toggle-button,
.live-race-tools-actions-002aj .live-reset-button,
.live-race-tools-actions-002aj .live-nr-toggle-button,
.live-race-tools-actions-002aj .live-result-button,
.live-race-tools-actions-002aj .live-create-race-profile-button,
.live-race-tools-actions-002aj .live-system-reset-button,
.live-race-tools-actions-002aj .live-profile-reset-button{
  background:#ffffff!important;
  color:#1e293b!important;
}
.live-race-tools-actions-002aj .live-system-toggle-button.active,
.live-race-tools-actions-002aj .live-system-toggle-button.has-system,
.live-race-tools-actions-002aj .live-notes-toggle-button.active,
.live-race-tools-actions-002aj .live-notes-toggle-button.has-note,
.live-race-tools-actions-002aj .live-profile-toggle-button.active,
.live-race-tools-actions-002aj .live-profile-toggle-button.has-profile{
  background:linear-gradient(135deg,#0f766e,#2563eb)!important;
  color:#ffffff!important;
  border-color:transparent!important;
}
.live-race-tools-actions-002aj button:disabled{
  opacity:.48!important;
  cursor:not-allowed!important;
  box-shadow:none!important;
}
.live-racecard-mode-tabs{padding-top:0!important;}
.live-overlay-table-head-002aj{
  margin:0 0 0!important;
  border-radius:12px 12px 0 0!important;
  grid-template-columns:50px 58px minmax(330px,1.18fr) minmax(300px,.9fr) 118px minmax(245px,.78fr) 88px 96px!important;
  gap:22px!important;
}
.live-racecard-overlays .live-overlay-runner-list{
  padding-top:0!important;
}
.live-racecard-overlays .live-overlay-table-head-002aj + .live-overlay-runner-list .live-overlay-runner-row:first-child{
  border-top-left-radius:0!important;
  border-top-right-radius:0!important;
}
.live-overlay-odds-chip,
.live-odds-placeholder{
  background:#dc2626!important;
  color:#ffffff!important;
  border-color:#dc2626!important;
  border-radius:8px!important;
  font-weight:950!important;
}
.live-overlay-odds-chip.profile-excluded,
.live-overlay-odds-chip.system-excluded,
.live-overlay-odds-chip.manual-excluded{
  background:#dc2626!important;
  color:#ffffff!important;
  border-color:#dc2626!important;
}
.live-overlay-runner-topline-002ah .live-racecard-exclude-action.profile-system:disabled,
.live-runner-actions-001l .live-racecard-exclude-action.profile-system:disabled,
.live-runner-actions-001l .live-runner-static-action.live-racecard-exclude-action:disabled{
  width:68px!important;
  max-width:68px!important;
  min-width:68px!important;
  min-height:27px!important;
  padding:5px 9px!important;
  border-radius:999px!important;
  background:#f8fafc!important;
  color:#94a3b8!important;
  border:1px solid rgba(203,213,225,.85)!important;
  font-size:10.5px!important;
  font-weight:950!important;
  opacity:1!important;
  cursor:not-allowed!important;
  box-shadow:none!important;
}
.live-overlay-runner-topline-002ah .live-racecard-exclude-action.undo,
.live-runner-actions-001l .live-racecard-exclude-action.undo{
  background:#fff7ed!important;
  color:#9a3412!important;
  border-color:rgba(249,115,22,.34)!important;
}
.horse-context-runner-list .context-profile-excluded-pill,
.horse-context-runner-list .context-system-excluded-pill,
.horse-context-runner-list .context-excluded-pill{
  display:none!important;
}
@media(max-width:1500px){
  .live-race-tools-card-002aj{
    grid-template-columns:1fr!important;
    gap:10px!important;
  }
  .live-race-tools-actions-002aj{justify-content:flex-start!important;}
  .live-overlay-table-head-002aj{
    grid-template-columns:44px 48px minmax(262px,1.14fr) minmax(250px,.92fr) 96px minmax(190px,.78fr) 74px 84px!important;
    gap:13px!important;
  }
}
@media(max-width:1100px){
  .live-racecard-nav-spacer{display:none!important;}
  .live-race-tools-card-002aj{margin-left:14px!important;margin-right:14px!important;}
  .live-overlay-table-head-002aj{display:none!important;}
}
.live-race-tools-head-002aj .live-race-tools-category-002aj{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  margin-top:0!important;
  max-width:180px!important;
  padding:5px 9px!important;
  border-radius:999px!important;
  background:#eef2ff!important;
  color:#4338ca!important;
  font-size:10.5px!important;
  font-weight:950!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.live-race-tools-head-002aj > div{min-width:0!important;}


/* LIVE_RACING_002AK — Create Race Profile handoff and imported-context banner. */
.live-race-tools-actions-002aj .live-create-race-profile-button{
  border-color:rgba(13,148,136,.42)!important;
  background:linear-gradient(135deg,#0f766e,#2563eb)!important;
  color:#fff!important;
  box-shadow:0 9px 20px rgba(13,148,136,.18)!important;
}
.live-race-tools-actions-002aj .live-create-race-profile-button:hover:not(:disabled){
  transform:translateY(-1px)!important;
  box-shadow:0 12px 24px rgba(37,99,235,.22)!important;
}
.live-race-tools-actions-002aj .live-create-race-profile-button:disabled{
  opacity:.65!important;
  cursor:wait!important;
}
.race-profiler-import-banner{
  margin:0 0 12px!important;
  padding:12px 14px!important;
  border-radius:14px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  border:1px solid rgba(16,185,129,.34)!important;
  background:linear-gradient(135deg,rgba(236,253,245,.98),rgba(239,246,255,.98))!important;
  color:#0f172a!important;
}
.race-profiler-import-banner[hidden]{display:none!important;}
.race-profiler-import-banner.warning{
  align-items:flex-start!important;
  border-color:rgba(245,158,11,.48)!important;
  background:linear-gradient(135deg,#fffbeb,#fff7ed)!important;
}
.race-profiler-import-banner-copy{min-width:0!important;}
.race-profiler-import-banner-copy span{
  display:block!important;
  margin-bottom:4px!important;
  color:#047857!important;
  font-size:10px!important;
  font-weight:950!important;
  letter-spacing:.12em!important;
  text-transform:uppercase!important;
}
.race-profiler-import-banner.warning .race-profiler-import-banner-copy span{color:#b45309!important;}
.race-profiler-import-banner-copy strong{
  display:block!important;
  font-size:14px!important;
  font-weight:950!important;
  color:#0f172a!important;
}
.race-profiler-import-banner-copy p{
  margin:4px 0 0!important;
  color:#475569!important;
  font-size:11.5px!important;
  font-weight:750!important;
}
.race-profiler-import-banner-status{
  flex:0 0 auto!important;
  padding:7px 10px!important;
  border-radius:999px!important;
  background:#d1fae5!important;
  color:#065f46!important;
  font-size:10.5px!important;
  font-weight:900!important;
}
.race-profiler-import-banner ul{
  margin:0!important;
  padding-left:18px!important;
  max-width:58%!important;
  color:#92400e!important;
  font-size:11px!important;
  font-weight:750!important;
  line-height:1.45!important;
}
@media (max-width:900px){
  .race-profiler-import-banner{align-items:flex-start!important;flex-direction:column!important;}
  .race-profiler-import-banner ul{max-width:none!important;}
}

/* LIVE_RACING_002AN — OpenWeather forecast display. */
#page-live-racing .racing-results-course-head.live-course-header-modern{
  grid-template-columns:116px minmax(220px,340px) minmax(340px,1fr) minmax(112px,150px) minmax(110px,140px) auto!important;
}
.live-course-weather-brief{
  justify-self:end!important;
  display:grid!important;
  gap:2px!important;
  min-width:108px!important;
  padding:7px 10px!important;
  border:1px solid rgba(14,116,144,.22)!important;
  border-radius:12px!important;
  background:rgba(240,249,255,.82)!important;
  text-align:right!important;
}
.live-course-weather-brief b{
  color:#0f172a!important;
  font-size:13px!important;
  font-weight:950!important;
  line-height:1!important;
}
.live-course-weather-brief small{
  color:#0369a1!important;
  font-size:10px!important;
  font-weight:850!important;
  line-height:1.15!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.live-racecard-key-facts .live-weather-fact{
  position:relative!important;
  display:grid!important;
  grid-template-columns:92px minmax(0,1fr)!important;
  align-items:center!important;
  gap:10px!important;
  width:100%!important;
  max-width:100%!important;
  min-height:0!important;
  padding:8px 0!important;
  border:0!important;
  border-bottom:1px solid rgba(226,232,240,.95)!important;
  background:transparent!important;
  color:#334155!important;
  overflow:visible!important;
  cursor:help!important;
  outline:none!important;
}
.live-racecard-key-facts .live-weather-fact > b{
  display:block!important;
  margin:0!important;
  color:#475569!important;
  font-size:10px!important;
  font-weight:950!important;
  letter-spacing:.095em!important;
  text-transform:uppercase!important;
}
.live-racecard-key-facts .live-weather-fact:focus-visible{
  box-shadow:0 0 0 3px rgba(14,165,233,.22)!important;
}
.live-weather-main{
  display:flex!important;
  align-items:baseline!important;
  gap:6px!important;
  min-width:0!important;
}
.live-weather-main strong{
  color:#0f172a!important;
  font-size:14px!important;
  font-weight:950!important;
  white-space:nowrap!important;
}
.live-weather-main em{
  min-width:0!important;
  color:#0369a1!important;
  font-size:11px!important;
  font-style:normal!important;
  font-weight:850!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.live-weather-popover{
  display:none!important;
  position:absolute!important;
  right:0!important;
  top:calc(100% + 10px)!important;
  z-index:2147482000!important;
  width:310px!important;
  max-width:min(310px,calc(100vw - 32px))!important;
  padding:14px!important;
  border:1px solid rgba(14,116,144,.28)!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:0 22px 50px rgba(15,23,42,.24)!important;
  color:#0f172a!important;
  text-align:left!important;
}
.live-weather-fact:hover .live-weather-popover,
.live-weather-fact:focus .live-weather-popover,
.live-weather-fact:focus-within .live-weather-popover{
  display:block!important;
}
.live-weather-popover > strong{
  display:block!important;
  margin-bottom:3px!important;
  color:#0f172a!important;
  font-size:14px!important;
  font-weight:950!important;
}
.live-weather-popover p{
  margin:3px 0!important;
  color:#64748b!important;
  font-size:10.5px!important;
  font-weight:750!important;
  line-height:1.35!important;
}
.live-weather-popover dl{
  display:grid!important;
  gap:6px!important;
  margin:10px 0!important;
}
.live-weather-popover dl > div{
  display:grid!important;
  grid-template-columns:92px minmax(0,1fr)!important;
  gap:8px!important;
  padding-top:6px!important;
  border-top:1px solid #e2e8f0!important;
}
.live-weather-popover dt{
  color:#475569!important;
  font-size:10px!important;
  font-weight:900!important;
}
.live-weather-popover dd{
  margin:0!important;
  color:#0f172a!important;
  font-size:10.5px!important;
  font-weight:850!important;
  text-align:right!important;
}
.live-weather-popover small{
  display:block!important;
  margin-top:9px!important;
  padding-top:8px!important;
  border-top:1px solid #e2e8f0!important;
  color:#0369a1!important;
  font-size:9.5px!important;
  font-weight:900!important;
}
@media(max-width:1200px){
  #page-live-racing .racing-results-course-head.live-course-header-modern{
    grid-template-columns:92px minmax(180px,1fr) minmax(260px,1fr) minmax(105px,130px) minmax(105px,130px) auto!important;
  }
}
@media(max-width:900px){
  #page-live-racing .racing-results-course-head.live-course-header-modern{
    grid-template-columns:82px minmax(0,1fr) auto!important;
  }
  #page-live-racing .live-course-weather-brief{
    grid-column:2!important;
    justify-self:start!important;
    min-width:0!important;
    width:auto!important;
    text-align:left!important;
  }
  #page-live-racing .racing-results-course-going{
    grid-column:2 / span 2!important;
  }
  .live-weather-popover{
    right:auto!important;
    left:0!important;
  }
}


/* === LIVE_RACING_002AO_WEATHER_COURSE_MATCHING_AND_LAYOUT_FIX_20260617 ===
   Keep the course-card weather column stable when unavailable and compact the
   opened racecard facts into Going/Weather over Added/1st. */
.live-course-weather-brief.is-unavailable{
  opacity:.72!important;
  border-style:dashed!important;
  background:rgba(248,250,252,.78)!important;
}
.live-course-weather-brief.is-unavailable b{
  color:#64748b!important;
}
.live-course-weather-brief.is-unavailable small{
  color:#64748b!important;
}

@media(min-width:1181px){
  .live-racecard-header{
    grid-template-columns:minmax(0,1fr) 470px!important;
  }
}
.live-racecard-key-facts{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  column-gap:18px!important;
  row-gap:0!important;
  width:100%!important;
  max-width:470px!important;
}
.live-racecard-key-facts > span,
.live-racecard-key-facts > .live-weather-fact{
  display:grid!important;
  grid-template-columns:68px minmax(0,1fr)!important;
  align-items:center!important;
  gap:8px!important;
  min-width:0!important;
  width:100%!important;
  padding:8px 0!important;
  border-bottom:1px solid rgba(226,232,240,.95)!important;
}
.live-racecard-key-facts > .live-weather-fact{
  cursor:help!important;
}
.live-racecard-key-facts > .live-weather-fact > b{
  font-size:10px!important;
}
.live-racecard-key-facts .live-weather-main{
  min-width:0!important;
}
.live-racecard-key-facts .live-weather-main em{
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
@media(max-width:700px){
  .live-racecard-key-facts{
    grid-template-columns:1fr!important;
    max-width:none!important;
  }
}

/* === LIVE-DAMSIRE-002A — Dam-sire page + compact 2x3 racecard evidence tools ===
   Scope: racecard action grid and Dam-sire button styling only. Overlay layout remains unchanged. */
.live-runner-profile-actions.live-runner-evidence-grid,
.live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(72px,1fr))!important;
  gap:5px!important;
  min-width:228px!important;
  max-width:286px!important;
  padding:0!important;
  transform:none!important;
}
.live-runner-profile-actions.live-runner-evidence-grid button,
.live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid button{
  min-height:28px!important;
  padding:5px 6px!important;
  border-radius:8px!important;
  font-size:9.6px!important;
  line-height:1.05!important;
  white-space:normal!important;
}
.live-runner-profile-actions button[data-live-open-dam-sire-stats]{
  border-color:rgba(79,70,229,.28)!important;
  color:#4338ca!important;
  background:linear-gradient(135deg,#ffffff,#eef2ff)!important;
}
.live-runner-profile-actions button[data-live-open-dam-sire-stats]:not(:disabled):hover{
  border-color:rgba(67,56,202,.52)!important;
  background:#e0e7ff!important;
  color:#3730a3!important;
}
.live-runner-profile-actions button[data-live-draw-stats-placeholder]{
  border-style:dashed!important;
  border-color:rgba(100,116,139,.28)!important;
  color:#94a3b8!important;
  background:linear-gradient(135deg,#f8fafc,#f1f5f9)!important;
  cursor:not-allowed!important;
}
.horse-drilldown-modal-shell.is-dam-sire-stats{
  --ds-modal-header-start:#111827;
  --ds-modal-header-end:#4338ca;
}
.horse-drilldown-modal-shell.is-dam-sire-stats .horse-drilldown-kicker{
  color:#c7d2fe!important;
}
@media(max-width:1500px){
  .live-runner-profile-actions.live-runner-evidence-grid,
  .live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid{
    grid-template-columns:repeat(3,minmax(68px,1fr))!important;
    min-width:214px!important;
    max-width:258px!important;
  }
  .live-runner-profile-actions.live-runner-evidence-grid button,
  .live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid button{
    font-size:9.2px!important;
    padding:5px 4px!important;
  }
}
@media(max-width:920px){
  .live-runner-actions.collapsed .live-runner-profile-actions.live-runner-evidence-grid,
  .live-runner-profile-actions.live-runner-evidence-grid{
    grid-template-columns:repeat(3,minmax(70px,1fr))!important;
    min-width:224px!important;
    max-width:100%!important;
  }
}


/* === LIVE_RACING_002AP — two-row analytical overlay deck, Dam-sire family, and runner collapse controls ===
   Scope: Live Racing Overlays only. Excluded/non-runner rows retain the accepted 002AI/002AJ treatment. */

.live-overlay-settings-modal .live-overlay-chip-row{grid-template-columns:repeat(5,minmax(0,1fr));}
.live-overlay-state-collapse-button-002ap{
  border:1px solid rgba(37,99,235,.22);
  border-radius:999px;
  background:#fff;
  color:#1e3a8a;
  font-size:11px;
  font-weight:950;
  padding:6px 10px;
  cursor:pointer;
  box-shadow:0 6px 14px rgba(15,23,42,.06);
}
.live-overlay-state-collapse-button-002ap:hover{background:#eff6ff;}
.live-racecard-overlays-002ap .live-overlay-runner-list{gap:11px;}
.live-overlay-layout-head-002ap{
  display:grid;
  grid-template-columns:minmax(250px,300px) minmax(650px,1fr) minmax(440px,490px);
  gap:12px;
  align-items:center;
  padding:8px 14px;
  border:1px solid rgba(203,213,225,.82);
  border-radius:13px 13px 0 0;
  background:linear-gradient(135deg,#f8fafc,#eef2ff);
  color:#64748b;
  font-size:10px;
  font-weight:950;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.live-racecard-overlays-002ap .live-overlay-layout-head-002ap + .live-overlay-runner-list .live-overlay-runner-row:first-child{
  border-top-left-radius:0!important;
  border-top-right-radius:0!important;
}
.live-overlay-runner-shell-002ap{
  display:grid;
  grid-template-columns:minmax(250px,300px) minmax(650px,1fr) minmax(440px,490px);
  gap:12px;
  align-items:stretch;
  padding:11px 12px;
}
.live-overlay-runner-shell-002ap.is-collapsed{
  grid-template-columns:minmax(300px,1fr) minmax(440px,490px);
  align-items:center;
  min-height:80px;
}
.live-overlay-runner-identity-rail-002ap{
  display:grid;
  align-content:center;
  gap:8px;
  min-width:0;
  padding-right:4px;
}
.live-overlay-runner-identity-main-002ap{
  display:grid;
  grid-template-columns:46px minmax(0,1fr);
  gap:10px;
  align-items:center;
  min-width:0;
}
.live-overlay-runner-identity-main-002ap .live-overlay-runner-identity{
  display:grid;
  align-content:center;
  gap:2px;
  min-width:0;
}
.live-overlay-runner-identity-main-002ap .live-runner-titleline{gap:6px;min-width:0;}
.live-overlay-runner-identity-main-002ap .live-horse-link strong{font-size:16.5px;letter-spacing:-.02em;}
.live-overlay-row-collapse-002ap{
  justify-self:start;
  margin-left:56px;
  border:1px solid rgba(148,163,184,.34);
  border-radius:999px;
  background:#f8fafc;
  color:#475569;
  min-height:25px;
  padding:5px 9px;
  font-size:10px;
  font-weight:950;
  cursor:pointer;
}
.live-overlay-row-collapse-002ap:hover{background:#eef2ff;color:#3730a3;border-color:rgba(99,102,241,.28);}
.live-overlay-evidence-deck-002ap{
  display:grid;
  grid-template-rows:auto auto;
  gap:8px;
  min-width:0;
}
.live-overlay-evidence-row-002ap{
  display:grid;
  gap:8px;
  align-items:stretch;
  min-width:0;
}
.live-overlay-evidence-row-002ap .live-overlay-family-card{
  min-width:0;
  padding:9px!important;
  gap:8px!important;
  border-width:1px!important;
  border-style:solid!important;
  border-radius:14px!important;
  box-shadow:0 8px 20px rgba(15,23,42,.045)!important;
  overflow:hidden;
}
.live-overlay-evidence-row-002ap .live-overlay-family-card.horse{
  background:linear-gradient(135deg,#ffffff 0%,#eff6ff 100%)!important;
  border-color:rgba(59,130,246,.30)!important;
}
.live-overlay-evidence-row-002ap .live-overlay-family-card.trainer{
  background:linear-gradient(135deg,#ffffff 0%,#fff7ed 100%)!important;
  border-color:rgba(249,115,22,.30)!important;
}
.live-overlay-evidence-row-002ap .live-overlay-family-card.jockey{
  background:linear-gradient(135deg,#ffffff 0%,#f5f3ff 100%)!important;
  border-color:rgba(124,58,237,.30)!important;
}
.live-overlay-evidence-row-002ap .live-overlay-family-card.sire{
  background:linear-gradient(135deg,#ffffff 0%,#ecfdf5 100%)!important;
  border-color:rgba(16,185,129,.30)!important;
}
.live-overlay-evidence-row-002ap .live-overlay-family-card.dam-sire{
  background:linear-gradient(135deg,#ffffff 0%,#eef2ff 100%)!important;
  border-color:rgba(79,70,229,.30)!important;
}
.live-overlay-evidence-row-002ap .live-overlay-family-card header{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:9px!important;
  min-width:0!important;
  margin:-9px -9px 0!important;
  padding:8px 9px 7px!important;
  border-bottom:1px solid rgba(148,163,184,.18)!important;
  border-radius:13px 13px 0 0!important;
}
.live-overlay-evidence-row-002ap .live-overlay-family-card.horse header{background:rgba(219,234,254,.56)!important;}
.live-overlay-evidence-row-002ap .live-overlay-family-card.trainer header{background:rgba(255,237,213,.58)!important;}
.live-overlay-evidence-row-002ap .live-overlay-family-card.jockey header{background:rgba(237,233,254,.62)!important;}
.live-overlay-evidence-row-002ap .live-overlay-family-card.sire header{background:rgba(209,250,229,.58)!important;}
.live-overlay-evidence-row-002ap .live-overlay-family-card.dam-sire header{background:rgba(224,231,255,.62)!important;}
.live-overlay-evidence-row-002ap .live-overlay-family-card header strong{
  display:flex!important;
  align-items:baseline!important;
  gap:5px!important;
  min-width:0!important;
  color:#0f172a!important;
  font-size:13.5px!important;
  font-weight:1000!important;
  letter-spacing:-.015em!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.live-overlay-evidence-row-002ap .live-overlay-family-card header strong em{
  min-width:0!important;
  max-width:170px!important;
  color:#475569!important;
  font-size:10.5px!important;
  font-style:normal!important;
  font-weight:900!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.live-overlay-family-open.dam-sire{
  background:#eef2ff!important;
  color:#4338ca!important;
  border-color:rgba(79,70,229,.28)!important;
}
.live-overlay-evidence-row-002ap .live-overlay-family-open{
  flex:0 0 auto!important;
  font-size:9.8px!important;
  padding:5px 8px!important;
  box-shadow:0 4px 10px rgba(15,23,42,.045)!important;
}
.live-overlay-evidence-row-002ap .live-overlay-bucket-grid{
  display:grid!important;
  gap:0!important;
  overflow:hidden!important;
  border:1px solid rgba(203,213,225,.66)!important;
  border-radius:11px!important;
  background:rgba(255,255,255,.60)!important;
}
.live-overlay-evidence-row-002ap .live-overlay-family-card.horse .live-overlay-bucket-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
.live-overlay-evidence-row-002ap .live-overlay-family-card.trainer .live-overlay-bucket-grid,
.live-overlay-evidence-row-002ap .live-overlay-family-card.sire .live-overlay-bucket-grid,
.live-overlay-evidence-row-002ap .live-overlay-family-card.dam-sire .live-overlay-bucket-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
.live-overlay-evidence-row-002ap .live-overlay-family-card.jockey .live-overlay-bucket-grid.two{
  grid-template-columns:1fr!important;
}
.live-overlay-evidence-row-002ap .live-overlay-bucket{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:6px!important;
  min-width:0!important;
  min-height:34px!important;
  padding:6px 7px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.live-overlay-evidence-row-002ap .live-overlay-bucket:not(:nth-child(1)){
  border-left:1px solid rgba(203,213,225,.58)!important;
}
.live-overlay-evidence-row-002ap .live-overlay-family-card.horse .live-overlay-bucket:nth-child(4),
.live-overlay-evidence-row-002ap .live-overlay-family-card.trainer .live-overlay-bucket:nth-child(3),
.live-overlay-evidence-row-002ap .live-overlay-family-card.sire .live-overlay-bucket:nth-child(3),
.live-overlay-evidence-row-002ap .live-overlay-family-card.dam-sire .live-overlay-bucket:nth-child(3){
  border-left:0!important;
}
.live-overlay-evidence-row-002ap .live-overlay-family-card.horse .live-overlay-bucket:nth-child(n+4),
.live-overlay-evidence-row-002ap .live-overlay-family-card.trainer .live-overlay-bucket:nth-child(n+3),
.live-overlay-evidence-row-002ap .live-overlay-family-card.sire .live-overlay-bucket:nth-child(n+3),
.live-overlay-evidence-row-002ap .live-overlay-family-card.dam-sire .live-overlay-bucket:nth-child(n+3),
.live-overlay-evidence-row-002ap .live-overlay-family-card.jockey .live-overlay-bucket:nth-child(n+2){
  border-top:1px solid rgba(203,213,225,.58)!important;
}
.live-overlay-evidence-row-002ap .live-overlay-family-card.jockey .live-overlay-bucket:nth-child(n+2){border-left:0!important;}
.live-overlay-evidence-row-002ap .live-overlay-bucket-label strong{
  color:#1e293b!important;
  font-size:10.3px!important;
  font-weight:950!important;
}
.live-overlay-evidence-row-002ap .live-overlay-bucket-label small{
  color:#64748b!important;
  font-size:8.8px!important;
  font-weight:850!important;
}
.live-overlay-runner-facts-rail-002ap{
  display:grid;
  grid-template-columns:minmax(72px,84px) minmax(158px,184px) minmax(84px,104px) minmax(76px,92px);
  gap:10px;
  align-items:center;
  min-width:0;
}
.live-overlay-runner-facts-rail-002ap .live-overlay-runner-age-weight-002ah,
.live-overlay-runner-facts-rail-002ap .live-overlay-runner-connections-002ah,
.live-overlay-runner-facts-rail-002ap .live-overlay-runner-ratings-002ah,
.live-overlay-runner-facts-rail-002ap .live-overlay-runner-actions{
  min-width:0!important;
}
.live-overlay-runner-facts-rail-002ap .live-overlay-runner-connections-002ah span{
  overflow:hidden;
  text-overflow:ellipsis;
}
.live-overlay-runner-facts-rail-002ap .live-overlay-runner-ratings-002ah,
.live-overlay-runner-facts-rail-002ap .live-overlay-runner-actions{justify-items:end!important;}
.live-overlay-runner-shell-002ap.is-collapsed .live-overlay-row-collapse-002ap{
  background:#eef2ff;
  color:#3730a3;
  border-color:rgba(99,102,241,.28);
}
@media(max-width:1780px){
  .live-overlay-layout-head-002ap,
  .live-overlay-runner-shell-002ap{
    grid-template-columns:minmax(235px,270px) minmax(560px,1fr) minmax(405px,455px);
    gap:10px;
  }
  .live-overlay-runner-facts-rail-002ap{
    grid-template-columns:72px minmax(142px,166px) 88px 76px;
    gap:8px;
  }
  .live-overlay-evidence-row-002ap{gap:6px;}
}
@media(max-width:1460px){
  .live-overlay-layout-head-002ap{display:none;}
  .live-overlay-runner-shell-002ap,
  .live-overlay-runner-shell-002ap.is-collapsed{
    grid-template-columns:minmax(230px,1fr) minmax(395px,455px);
  }
  .live-overlay-evidence-deck-002ap{
    grid-column:1 / -1;
    grid-row:2;
  }
  .live-overlay-runner-facts-rail-002ap{grid-column:2;grid-row:1;}
}
@media(max-width:1040px){
  .live-overlay-runner-shell-002ap,
  .live-overlay-runner-shell-002ap.is-collapsed{
    grid-template-columns:1fr;
  }
  .live-overlay-runner-facts-rail-002ap{
    grid-column:1;
    grid-row:auto;
    grid-template-columns:72px minmax(150px,1fr) 88px 76px;
  }
  .live-overlay-evidence-deck-002ap{grid-column:1;grid-row:auto;}
}
@media(max-width:760px){
  .live-overlay-runner-shell-002ap{padding:10px;}
  .live-overlay-evidence-row-002ap{grid-template-columns:1fr!important;}
  .live-overlay-runner-facts-rail-002ap{
    grid-template-columns:repeat(2,minmax(0,1fr));
    align-items:start;
  }
  .live-overlay-runner-facts-rail-002ap .live-overlay-runner-ratings-002ah,
  .live-overlay-runner-facts-rail-002ap .live-overlay-runner-actions{justify-items:start!important;}
  .live-overlay-evidence-row-002ap .live-overlay-family-card.horse .live-overlay-bucket-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .live-overlay-evidence-row-002ap .live-overlay-family-card.horse .live-overlay-bucket:nth-child(3),
  .live-overlay-evidence-row-002ap .live-overlay-family-card.horse .live-overlay-bucket:nth-child(5){border-left:0!important;border-top:1px solid rgba(203,213,225,.58)!important;}
  .live-overlay-evidence-row-002ap .live-overlay-family-card.horse .live-overlay-bucket:nth-child(4),
  .live-overlay-evidence-row-002ap .live-overlay-family-card.horse .live-overlay-bucket:nth-child(6){border-left:1px solid rgba(203,213,225,.58)!important;}
  .live-overlay-evidence-row-002ap .live-overlay-family-card.horse .live-overlay-bucket:nth-child(n+3){border-top:1px solid rgba(203,213,225,.58)!important;}
  .live-overlay-settings-modal .live-overlay-chip-row{grid-template-columns:repeat(2,minmax(0,1fr));}
}

/* LIVE_RACING_002AQ — overlay visual balance, two-tier race facts and larger runner hierarchy. */
.live-racecard-overlays-002ap .live-overlay-runner-shell-002ap{
  grid-template-columns:minmax(280px,320px) minmax(650px,1fr) minmax(370px,410px);
  gap:13px;
  padding:13px 14px;
}
.live-racecard-overlays-002ap .live-overlay-layout-head-002ap{
  grid-template-columns:minmax(280px,320px) minmax(650px,1fr) minmax(370px,410px);
  gap:13px;
}
.live-racecard-overlays-002ap .live-overlay-runner-shell-002ap.is-collapsed{
  grid-template-columns:minmax(330px,1fr) minmax(370px,410px);
  min-height:94px;
}
.live-racecard-overlays-002ap .live-overlay-runner-identity-main-002ap{
  grid-template-columns:62px minmax(0,1fr);
  gap:12px;
}
.live-racecard-overlays-002ap .live-overlay-runner-identity-main-002ap .live-silk-placeholder.compact{
  width:62px!important;
  height:62px!important;
  border-radius:13px!important;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.62),0 7px 16px rgba(15,23,42,.10)!important;
}
.live-racecard-overlays-002ap .live-overlay-runner-identity-main-002ap .live-silk-placeholder.compact span{
  font-size:18px!important;
}
.live-racecard-overlays-002ap .live-overlay-runner-identity-main-002ap .live-horse-link strong{
  font-size:19px!important;
  line-height:1.08!important;
  letter-spacing:-.025em!important;
}
.live-racecard-overlays-002ap .live-overlay-runner-identity-main-002ap .live-runner-titleline > em{
  font-size:11.7px!important;
}
.live-racecard-overlays-002ap .live-overlay-runner-identity-main-002ap .live-runner-titleline sup,
.live-racecard-overlays-002ap .live-overlay-runner-identity-main-002ap .live-headgear,
.live-racecard-overlays-002ap .live-overlay-runner-identity-main-002ap .live-cd-badge{
  font-size:10.8px!important;
}
.live-racecard-overlays-002ap .live-overlay-runner-meta-line{
  font-size:11.2px!important;
}
.live-racecard-overlays-002ap .live-overlay-formline-002ah span{
  font-size:14px!important;
  min-width:12px!important;
}
.live-racecard-overlays-002ap .live-overlay-row-collapse-002ap{
  margin-left:74px;
  min-height:28px;
  padding:6px 11px;
  font-size:10.7px;
}
.live-racecard-overlays-002ap .live-overlay-evidence-row-002ap .live-overlay-family-card header strong{
  font-size:14.5px!important;
}
.live-racecard-overlays-002ap .live-overlay-evidence-row-002ap .live-overlay-family-card header strong em{
  max-width:190px!important;
  font-size:11.2px!important;
}
.live-racecard-overlays-002ap .live-overlay-evidence-row-002ap .live-overlay-family-open{
  min-height:25px!important;
  padding:5px 9px!important;
  font-size:10.3px!important;
}
.live-racecard-overlays-002ap .live-overlay-evidence-row-002ap .live-overlay-bucket{
  min-height:37px!important;
  padding:7px 8px!important;
}
.live-racecard-overlays-002ap .live-overlay-evidence-row-002ap .live-overlay-bucket-label strong{
  font-size:11.1px!important;
}
.live-racecard-overlays-002ap .live-overlay-evidence-row-002ap .live-overlay-bucket-label small{
  font-size:9.5px!important;
  line-height:1.15!important;
}
.live-racecard-overlays-002ap .live-overlay-evidence-row-002ap .live-overlay-marker{
  width:20px!important;
  height:20px!important;
  min-width:20px!important;
  font-size:11px!important;
}
.live-racecard-overlays-002ap .live-overlay-runner-facts-rail-002ap{
  display:grid;
  grid-template-columns:minmax(165px,1fr) minmax(76px,88px) minmax(78px,92px);
  grid-template-rows:minmax(0,1fr) minmax(0,1fr);
  column-gap:11px;
  row-gap:8px;
  align-items:stretch;
  min-width:0;
}
.live-racecard-overlays-002ap .live-overlay-runner-facts-rail-002ap .live-overlay-runner-age-weight-002ah{
  grid-column:1;
  grid-row:1;
  align-content:center;
  justify-items:start;
  padding:4px 8px;
  border-radius:11px;
  background:rgba(248,250,252,.72);
  font-size:15px!important;
  line-height:1.12!important;
}
.live-racecard-overlays-002ap .live-overlay-runner-facts-rail-002ap .live-overlay-runner-connections-002ah{
  grid-column:1;
  grid-row:2;
  align-content:center;
  justify-items:start;
  padding:4px 8px;
  border-radius:11px;
  background:rgba(248,250,252,.72);
  font-size:13.3px!important;
  line-height:1.22!important;
}
.live-racecard-overlays-002ap .live-overlay-runner-facts-rail-002ap .live-overlay-runner-ratings-002ah{
  grid-column:2;
  grid-row:1 / 3;
  align-content:center;
  justify-items:center!important;
}
.live-racecard-overlays-002ap .live-overlay-runner-facts-rail-002ap .live-overlay-runner-actions{
  grid-column:3;
  grid-row:1 / 3;
  display:grid!important;
  grid-template-rows:auto auto;
  align-content:center!important;
  align-items:center!important;
  justify-items:end!important;
  gap:7px!important;
}
.live-racecard-overlays-002ap .live-overlay-runner-facts-rail-002ap .live-overlay-runner-ratings-002ah > span{
  min-width:72px;
  min-height:28px;
  padding:5px 9px;
  font-size:12px;
}
.live-racecard-overlays-002ap .live-overlay-runner-facts-rail-002ap .live-overlay-runner-ratings-002ah b{
  font-size:10.5px;
}
.live-racecard-overlays-002ap .live-overlay-odds-chip{
  min-width:76px!important;
  min-height:31px!important;
  padding:6px 12px!important;
  font-size:12px!important;
}
.live-racecard-overlays-002ap .live-overlay-runner-action,
.live-racecard-overlays-002ap .live-racecard-exclude-action{
  min-width:76px!important;
  min-height:31px!important;
  padding:6px 12px!important;
  font-size:11.3px!important;
}
.live-racecard-overlays-002ap .live-overlay-person-link{
  font-size:inherit!important;
}

@media(max-width:1780px){
  .live-racecard-overlays-002ap .live-overlay-layout-head-002ap,
  .live-racecard-overlays-002ap .live-overlay-runner-shell-002ap{
    grid-template-columns:minmax(260px,300px) minmax(560px,1fr) minmax(350px,390px);
    gap:10px;
  }
  .live-racecard-overlays-002ap .live-overlay-runner-facts-rail-002ap{
    grid-template-columns:minmax(150px,1fr) 78px 78px;
    column-gap:8px;
  }
}
@media(max-width:1460px){
  .live-racecard-overlays-002ap .live-overlay-runner-shell-002ap,
  .live-racecard-overlays-002ap .live-overlay-runner-shell-002ap.is-collapsed{
    grid-template-columns:minmax(260px,1fr) minmax(360px,410px);
  }
  .live-racecard-overlays-002ap .live-overlay-runner-facts-rail-002ap{
    grid-template-columns:minmax(150px,1fr) 78px 78px;
  }
}
@media(max-width:1040px){
  .live-racecard-overlays-002ap .live-overlay-runner-shell-002ap,
  .live-racecard-overlays-002ap .live-overlay-runner-shell-002ap.is-collapsed{
    grid-template-columns:1fr;
  }
  .live-racecard-overlays-002ap .live-overlay-runner-facts-rail-002ap{
    grid-column:1;
    grid-row:auto;
    grid-template-columns:minmax(170px,1fr) 84px 84px;
  }
}
@media(max-width:760px){
  .live-racecard-overlays-002ap .live-overlay-runner-identity-main-002ap{
    grid-template-columns:56px minmax(0,1fr);
  }
  .live-racecard-overlays-002ap .live-overlay-runner-identity-main-002ap .live-silk-placeholder.compact{
    width:56px!important;
    height:56px!important;
  }
  .live-racecard-overlays-002ap .live-overlay-row-collapse-002ap{margin-left:68px;}
  .live-racecard-overlays-002ap .live-overlay-runner-facts-rail-002ap{
    grid-template-columns:minmax(0,1fr) minmax(92px,auto);
    grid-template-rows:auto auto;
    gap:8px 10px;
  }
  .live-racecard-overlays-002ap .live-overlay-runner-facts-rail-002ap .live-overlay-runner-age-weight-002ah{
    grid-column:1;
    grid-row:1;
  }
  .live-racecard-overlays-002ap .live-overlay-runner-facts-rail-002ap .live-overlay-runner-connections-002ah{
    grid-column:1;
    grid-row:2;
  }
  .live-racecard-overlays-002ap .live-overlay-runner-facts-rail-002ap .live-overlay-runner-ratings-002ah{
    grid-column:2;
    grid-row:1;
    justify-items:end!important;
  }
  .live-racecard-overlays-002ap .live-overlay-runner-facts-rail-002ap .live-overlay-runner-actions{
    grid-column:2;
    grid-row:2;
    justify-items:end!important;
  }
}


/* LIVE_RACING_002AR — identity-line consistency, canonical T/J course support shell, and compact Race Tools consolidation. */
.live-racecard-overlays-002ap .live-overlay-runner-meta-line{
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:4px 10px!important;
  min-height:17px!important;
}
.live-racecard-overlays-002ap .live-overlay-runner-meta-line > span:first-child{
  white-space:nowrap!important;
}
.live-racecard-overlays-002ap .live-overlay-runner-meta-badges-002ar{
  display:inline-flex!important;
  align-items:center!important;
  gap:4px!important;
  white-space:nowrap!important;
}
.live-racecard-overlays-002ap .live-overlay-runner-meta-badges-002ar .live-cd-badge{
  margin:0!important;
}
.live-racecard-mode-tabs{
  padding-bottom:8px!important;
}
.live-race-tools-card-002aj.live-race-tools-card-002ar{
  margin:0 24px 12px!important;
  padding:8px 10px!important;
  border-radius:13px!important;
  display:grid!important;
  grid-template-columns:auto minmax(260px,1fr) auto!important;
  gap:10px!important;
  align-items:center!important;
  box-shadow:0 8px 20px rgba(15,23,42,.04)!important;
}
.live-race-tools-head-002ar{
  min-width:auto!important;
  justify-content:flex-start!important;
  padding:0 2px!important;
}
.live-race-tools-head-002ar strong{
  font-size:11px!important;
  white-space:nowrap!important;
}
.live-race-tools-status-002ar{
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:6px!important;
  min-width:0!important;
}
.live-race-tools-status-002ar > span,
.live-race-tools-status-002ar > button{
  display:inline-flex!important;
  align-items:center!important;
  min-height:25px!important;
  padding:5px 9px!important;
  border-radius:999px!important;
  border:1px solid rgba(203,213,225,.85)!important;
  background:#f8fafc!important;
  color:#475569!important;
  font-size:10.5px!important;
  font-weight:900!important;
  line-height:1!important;
  white-space:nowrap!important;
  box-shadow:none!important;
}
.live-race-tools-status-002ar > span b{
  color:#0f172a!important;
}
.live-race-tools-status-002ar > .live-overlay-state-collapse-button-002ap{
  background:#ffffff!important;
  border-color:rgba(37,99,235,.24)!important;
  color:#1d4ed8!important;
  cursor:pointer!important;
}
.live-race-tools-status-002ar > .live-overlay-state-settings-button{
  background:#0f172a!important;
  border-color:#0f172a!important;
  color:#ffffff!important;
  cursor:pointer!important;
}
.live-race-tools-card-002ar .live-race-tools-actions-002aj{
  flex-wrap:nowrap!important;
  gap:6px!important;
}
.live-race-tools-card-002ar .live-race-tools-actions-002aj button{
  min-height:29px!important;
  padding:6px 10px!important;
  font-size:10.5px!important;
}
@media(max-width:1680px){
  .live-race-tools-card-002aj.live-race-tools-card-002ar{
    grid-template-columns:auto minmax(0,1fr)!important;
  }
  .live-race-tools-card-002ar .live-race-tools-actions-002aj{
    grid-column:1 / -1!important;
    justify-content:flex-start!important;
    flex-wrap:wrap!important;
  }
}
@media(max-width:1100px){
  .live-race-tools-card-002aj.live-race-tools-card-002ar{
    margin-left:14px!important;
    margin-right:14px!important;
    grid-template-columns:1fr!important;
  }
  .live-race-tools-status-002ar,
  .live-race-tools-card-002ar .live-race-tools-actions-002aj{
    grid-column:1!important;
  }
}
.live-race-tools-status-002ar > .live-applied-system-chip{
  border-color:rgba(8,145,178,.28)!important;
  background:#ecfeff!important;
  color:#155e75!important;
}
.live-race-tools-status-002ar > .live-applied-profile-chip{
  border-color:rgba(37,99,235,.28)!important;
  background:#eff6ff!important;
  color:#1e3a8a!important;
}

/* LIVE_RACING_002AS — larger normal-card Profile Stats controls and stronger meeting navigation header.
   Scope: visual sizing only. No racecard data, evidence, exclusion, overlay, endpoint or state behaviour changes. */

/* Normal Card: give the six Profile Stats actions a more deliberate desktop footprint. */
.live-runner-table-head.live-runner-table-head-001l{
  grid-template-columns:50px 58px minmax(300px,1.05fr) minmax(360px,1.05fr) 108px minmax(220px,.76fr) 82px 96px!important;
  gap:16px!important;
}
.live-runner-main.live-runner-main-001l{
  grid-template-columns:72px minmax(300px,1.05fr) minmax(360px,1.05fr) 108px minmax(220px,.76fr) 82px 96px!important;
  gap:16px!important;
}
.live-runner-profile-actions.live-runner-evidence-grid,
.live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid{
  grid-template-columns:repeat(3,minmax(110px,1fr))!important;
  gap:8px!important;
  min-width:350px!important;
  max-width:380px!important;
  padding-left:8px!important;
  padding-right:8px!important;
}
.live-runner-profile-actions.live-runner-evidence-grid button,
.live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid button{
  min-height:36px!important;
  padding:8px 10px!important;
  border-radius:10px!important;
  font-size:11.2px!important;
  line-height:1.05!important;
  white-space:nowrap!important;
}

/* Open-race meeting header: slightly more depth and clearer course/time controls. */
.live-racecard-nav{
  min-height:60px!important;
  padding:16px 20px!important;
}
.live-meeting-strip{
  gap:14px!important;
}
.live-meeting-strip strong{
  font-size:13px!important;
  line-height:1!important;
  letter-spacing:.13em!important;
}
.live-time-chips{
  gap:7px!important;
}
.live-time-chip{
  min-height:34px!important;
  padding:7px 12px!important;
  border-radius:999px!important;
  font-size:11.8px!important;
  line-height:1!important;
}

@media(max-width:1500px){
  .live-runner-table-head.live-runner-table-head-001l{
    grid-template-columns:44px 48px minmax(240px,1fr) minmax(300px,1fr) 92px minmax(180px,.72fr) 70px 84px!important;
    gap:11px!important;
  }
  .live-runner-main.live-runner-main-001l{
    grid-template-columns:62px minmax(240px,1fr) minmax(300px,1fr) 92px minmax(180px,.72fr) 70px 84px!important;
    gap:11px!important;
  }
  .live-runner-profile-actions.live-runner-evidence-grid,
  .live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid{
    grid-template-columns:repeat(2,minmax(118px,1fr))!important;
    min-width:260px!important;
    max-width:330px!important;
    gap:7px!important;
  }
  .live-runner-profile-actions.live-runner-evidence-grid button,
  .live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid button{
    min-height:34px!important;
    padding:7px 9px!important;
    font-size:10.8px!important;
  }
}

@media(max-width:1100px){
  .live-racecard-nav{
    min-height:56px!important;
    padding:14px!important;
  }
  .live-meeting-strip strong{font-size:12.2px!important;}
  .live-time-chip{
    min-height:32px!important;
    padding:7px 11px!important;
    font-size:11.2px!important;
  }
  .live-runner-profile-actions.live-runner-evidence-grid,
  .live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid{
    grid-template-columns:repeat(2,minmax(112px,1fr))!important;
    min-width:0!important;
    max-width:460px!important;
    padding-left:0!important;
    padding-right:0!important;
  }
}

@media(max-width:620px){
  .live-runner-profile-actions.live-runner-evidence-grid,
  .live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid{
    grid-template-columns:1fr!important;
    max-width:280px!important;
  }
}


/* === LIVE_RACING_002AT — evidence-page exclusion continuity, stable runner switching,
   aligned race facts and clear Card/Overlays interaction states. === */

/* One shared evidence-page Exclude / Excluded control language. */
.horse-profile-exclude-button,
.trainer-exclude-button,
.sire-exclude-button,
.horse-drilldown-modal-shell.is-dam-sire-stats .horse-profile-exclude-button{
  min-width:96px!important;
  min-height:36px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:1px solid rgba(249,115,22,.38)!important;
  background:#fff7ed!important;
  color:#9a3412!important;
  box-shadow:0 5px 14px rgba(154,52,18,.08)!important;
}
.horse-profile-exclude-button.is-excluded,
.trainer-exclude-button.is-excluded,
.sire-exclude-button.is-excluded,
.horse-drilldown-modal-shell.is-dam-sire-stats .horse-profile-exclude-button.is-excluded{
  border-color:#f9a8b4!important;
  background:#ffe4e6!important;
  color:#9f1239!important;
  box-shadow:0 5px 14px rgba(159,18,57,.10)!important;
}
.horse-profile-exclude-button:not(:disabled):hover,
.trainer-exclude-button:not(:disabled):hover,
.sire-exclude-button:not(:disabled):hover{
  border-color:#fb923c!important;
  box-shadow:0 9px 22px rgba(154,52,18,.16)!important;
}
.horse-profile-exclude-button.is-excluded:not(:disabled):hover,
.trainer-exclude-button.is-excluded:not(:disabled):hover,
.sire-exclude-button.is-excluded:not(:disabled):hover{
  border-color:#fb7185!important;
  box-shadow:0 9px 22px rgba(159,18,57,.16)!important;
}

/* Keep the Race runners strip mounted while only the selected evidence body changes. */
.horse-context-switch-status{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  min-height:34px;
  margin:8px 0 2px;
  border:1px solid rgba(37,99,235,.18);
  border-radius:11px;
  background:linear-gradient(90deg,rgba(239,246,255,.96),rgba(248,250,252,.96));
  color:#1e3a8a;
  font-size:11.5px;
  font-weight:900;
  letter-spacing:.02em;
}
.horse-context-switch-status.is-error{
  border-color:rgba(225,29,72,.24);
  background:#fff1f2;
  color:#9f1239;
}
.horse-context-switch-spinner{
  width:15px;
  height:15px;
  border-radius:999px;
  border:2px solid rgba(37,99,235,.22);
  border-top-color:#2563eb;
  animation:horse-context-switch-spin .72s linear infinite;
}
@keyframes horse-context-switch-spin{to{transform:rotate(360deg)}}
.horse-drilldown-modal-shell.is-context-switching .horse-context-strip{
  opacity:1!important;
  visibility:visible!important;
}
.horse-drilldown-modal-shell.is-context-switching .horse-context-runner-list button.active{
  box-shadow:0 0 0 3px rgba(59,130,246,.18),0 8px 18px rgba(15,23,42,.12)!important;
}
@media (prefers-reduced-motion:reduce){
  .horse-context-switch-spinner{animation:none}
}

/* Open-race facts: exact two-by-two alignment and clearer First Place label. */
.live-racecard-key-facts{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-auto-rows:minmax(44px,auto)!important;
  column-gap:20px!important;
  row-gap:0!important;
}
.live-racecard-key-facts > span,
.live-racecard-key-facts > .live-weather-fact,
.live-racecard-key-facts .live-weather-fact{
  grid-template-columns:88px minmax(0,1fr)!important;
  align-items:center!important;
  min-height:44px!important;
  padding:9px 0!important;
  gap:10px!important;
}
.live-racecard-key-facts > span > b,
.live-racecard-key-facts > .live-weather-fact > b,
.live-racecard-key-facts .live-weather-fact > b{
  width:88px!important;
  margin:0!important;
  align-self:center!important;
  white-space:nowrap!important;
}
.live-racecard-key-facts .live-going-value,
.live-racecard-key-facts .live-weather-main{
  min-width:0!important;
  align-self:center!important;
}
.live-racecard-key-facts .live-weather-main{
  display:flex!important;
  align-items:baseline!important;
  gap:6px!important;
}

/* Card and Overlays are live controls; Stats and Form remain visibly disabled. */
.live-racecard-mode-tabs button[data-live-racecard-tab]{
  cursor:pointer!important;
  color:#1d4ed8!important;
  border-color:rgba(37,99,235,.30)!important;
  background:linear-gradient(180deg,#ffffff 0%,#eff6ff 100%)!important;
  box-shadow:0 3px 10px rgba(37,99,235,.05)!important;
  transition:background .16s ease,color .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease!important;
}
.live-racecard-mode-tabs button[data-live-racecard-tab]:hover{
  color:#1e3a8a!important;
  border-color:rgba(37,99,235,.52)!important;
  box-shadow:0 7px 18px rgba(37,99,235,.12)!important;
  transform:translateY(-1px)!important;
}
.live-racecard-mode-tabs button[data-live-racecard-tab].active{
  color:#ffffff!important;
  border-color:#1e40af!important;
  background:linear-gradient(105deg,#111f46 0%,#183b82 55%,#2853b8 100%)!important;
  box-shadow:0 8px 20px rgba(30,64,175,.22)!important;
}
.live-racecard-mode-tabs button:disabled{
  cursor:not-allowed!important;
  color:#94a3b8!important;
  border-color:rgba(203,213,225,.72)!important;
  background:#f8fafc!important;
  box-shadow:none!important;
  opacity:.62!important;
  transform:none!important;
}

@media(max-width:700px){
  .live-racecard-key-facts{
    grid-template-columns:1fr!important;
    grid-auto-rows:minmax(42px,auto)!important;
  }
  .live-racecard-key-facts > span,
  .live-racecard-key-facts > .live-weather-fact,
  .live-racecard-key-facts .live-weather-fact{
    grid-template-columns:82px minmax(0,1fr)!important;
  }
  .live-racecard-key-facts > span > b,
  .live-racecard-key-facts > .live-weather-fact > b,
  .live-racecard-key-facts .live-weather-fact > b{
    width:82px!important;
  }
}

/* =====================================================================
   DASHBOARD V2 001 — GLASS COMMAND CENTRE
   Authoritative production layout. The specification rail and catalogue
   are intentional visible parts of the workspace, not developer overlays.
   ===================================================================== */
body.dashboard-fullscreen-mode {
  overflow: hidden !important;
  background: #020817 !important;
}

body.dashboard-fullscreen-mode .app,
body.dashboard-fullscreen-mode .main,
body.dashboard-fullscreen-mode #page-dashboard {
  display: block !important;
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  max-width: none !important;
}

body.dashboard-fullscreen-mode .sidebar,
body.dashboard-fullscreen-mode #dashboardAuthUserAvatar {
  display: none !important;
}

body.dashboard-fullscreen-mode .dashboard-v2 {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  color: #fff !important;
  background:
    radial-gradient(circle at 16% 27%, rgba(0, 214, 235, .16), transparent 30%),
    radial-gradient(circle at 83% 26%, rgba(126, 76, 255, .22), transparent 36%),
    linear-gradient(135deg, #020914 0%, #031425 38%, #070d25 66%, #191138 100%) !important;
  isolation: isolate;
}

body.dashboard-fullscreen-mode .dashboard-v2::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .32;
  background-image:
    linear-gradient(rgba(98, 223, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(98, 223, 255, .035) 1px, transparent 1px);
  background-size: 74px 74px;
  mask-image: linear-gradient(to bottom, transparent 5%, black 38%, black 82%, transparent 100%);
}

body.dashboard-fullscreen-mode .dashboard-v2::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(1, 7, 18, .34), transparent 20%, transparent 80%, rgba(10, 4, 29, .28)),
    linear-gradient(180deg, rgba(255,255,255,.018), transparent 25%, rgba(0,0,0,.18));
}

body.dashboard-fullscreen-mode .dashboard-v2-webgl {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .88;
  overflow: hidden;
}

body.dashboard-fullscreen-mode .dashboard-v2-webgl canvas {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  filter: none !important;
}

body.dashboard-fullscreen-mode .dashboard-v2-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 64%, rgba(38, 210, 255, .10), transparent 30%),
    radial-gradient(ellipse at 54% 68%, rgba(159, 89, 255, .12), transparent 42%);
}

body.dashboard-fullscreen-mode .dashboard-v2-layout {
  position: relative !important;
  z-index: 5 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 352px !important;
  gap: 10px !important;
  padding: 8px !important;
  pointer-events: auto !important;
  overflow: hidden !important;
  box-sizing: border-box;
}

.dashboard-v2-main,
.dashboard-v2-spec-panel,
.dashboard-v2-catalogue {
  border: 1px solid rgba(160, 207, 255, .17);
  background: linear-gradient(145deg, rgba(5, 15, 35, .62), rgba(8, 10, 31, .50));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 24px 70px rgba(0,0,0,.18);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
}

.dashboard-v2-main {
  min-width: 0;
  min-height: 0;
  border-radius: 17px;
  display: grid;
  grid-template-rows: auto auto minmax(410px, 1fr) auto;
  gap: 10px;
  padding: 22px 26px 8px;
  overflow: hidden;
}

.dashboard-v2-header {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.dashboard-v2-heading {
  min-width: 0;
  max-width: 780px;
}

.dashboard-v2-eyebrow {
  margin-bottom: 9px;
  color: rgba(226, 238, 255, .78);
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .18em;
}

.dashboard-v2-heading h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(34px, 3vw, 58px);
  line-height: .98;
  font-weight: 900;
  letter-spacing: -.045em;
  text-shadow: 0 18px 60px rgba(0,0,0,.28);
}

.dashboard-v2-heading p {
  margin: 13px 0 0;
  color: rgba(224, 234, 252, .72);
  font-size: 15px;
  line-height: 1.45;
}

.dashboard-v2-user {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 36px auto 18px;
  align-items: center;
  gap: 11px;
  min-width: 194px;
  padding: 8px 11px;
  border: 1px solid rgba(154, 202, 255, .22);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(12, 28, 57, .70), rgba(7, 12, 31, .56));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.dashboard-v2-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #eaffff;
  font-weight: 900;
  font-size: 11px;
  background: linear-gradient(145deg, #21d4d4, #22b98f);
  border: 1px solid rgba(194,255,250,.56);
  box-shadow: 0 0 18px rgba(41, 235, 215, .25);
}

.dashboard-v2-user-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dashboard-v2-user-copy strong {
  font-size: 12px;
  color: #fff;
}

.dashboard-v2-user-copy small,
.dashboard-v2-user-chevron {
  color: rgba(224, 234, 252, .62);
  font-size: 10px;
}

.dashboard-v2-status-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(320px, 1fr) minmax(250px, 1fr);
  align-items: center;
  min-height: 34px;
}

.dashboard-v2-system-status {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid rgba(82, 231, 216, .20);
  border-radius: 999px;
  background: rgba(5, 33, 47, .58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 0 24px rgba(40, 226, 209, .07);
}

.dashboard-v2-system-status > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #31e6c3;
  box-shadow: 0 0 12px rgba(49,230,195,.72);
}

.dashboard-v2-system-status b {
  color: rgba(245, 250, 255, .88);
  font-size: 9px;
  letter-spacing: .15em;
}

.dashboard-v2-system-status em {
  color: #56e6cf;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
}

.dashboard-v2-drag-hint {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 19px;
  color: rgba(234, 240, 255, .72);
}

.dashboard-v2-drag-hint span {
  color: #73e8ff;
  font-size: 24px;
  text-shadow: 0 0 16px rgba(115,232,255,.40);
}

.dashboard-v2-drag-hint span:last-child {
  color: #c187ff;
  text-shadow: 0 0 16px rgba(193,135,255,.42);
}

.dashboard-v2-drag-hint b {
  font-size: 9px;
  letter-spacing: .18em;
}

.dashboard-v2-stage {
  position: relative;
  min-width: 0;
  min-height: 410px;
  overflow: hidden;
  border-radius: 15px;
  background:
    radial-gradient(ellipse at 50% 74%, rgba(69, 215, 255, .12), transparent 28%),
    radial-gradient(ellipse at 53% 72%, rgba(173, 91, 255, .12), transparent 44%);
}

.dashboard-v2-stage::before,
.dashboard-v2-stage::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 17px;
  transform: translateX(-50%);
  border: 1px solid rgba(77, 216, 255, .30);
  border-radius: 50%;
  pointer-events: none;
}

.dashboard-v2-stage::before {
  width: 70%;
  height: 105px;
  box-shadow: 0 0 32px rgba(52, 209, 255, .10);
}

.dashboard-v2-stage::after {
  width: 53%;
  height: 70px;
  border-color: rgba(170, 104, 255, .33);
  box-shadow: 0 0 32px rgba(170, 104, 255, .09);
}

body.dashboard-fullscreen-mode .dashboard-v2 #dashboard-3d-container {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 4 !important;
  overflow: hidden !important;
  perspective: 1700px !important;
  perspective-origin: 50% 48% !important;
  cursor: grab !important;
  pointer-events: auto !important;
  filter: none !important;
  touch-action: pan-y;
  user-select: none;
  outline: none;
}

body.dashboard-fullscreen-mode .dashboard-v2 #dashboard-3d-container.is-dragging {
  cursor: grabbing !important;
}

.dashboard-v2-cards {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.dashboard-v2-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(430px, 39vw, 620px);
  height: clamp(300px, 31vw, 410px);
  transform-origin: center center;
  transform-style: preserve-3d;
  border-radius: 31px;
  will-change: transform, opacity;
  color: #fff;
}

.dashboard-v2-card-glass {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--card-accent) 58%, rgba(255,255,255,.55));
  background:
    linear-gradient(142deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,.045) 26%, rgba(19, 44, 83, .40) 58%, rgba(75, 39, 113, .34) 100%),
    linear-gradient(180deg, rgba(5, 22, 48, .62), rgba(5, 10, 32, .68));
  box-shadow:
    0 0 0 5px rgba(255,255,255,.018),
    0 0 0 9px color-mix(in srgb, var(--card-accent-2) 16%, transparent),
    inset 0 1px 0 rgba(255,255,255,.36),
    inset 0 -1px 0 color-mix(in srgb, var(--card-accent-2) 48%, transparent),
    0 0 38px color-mix(in srgb, var(--card-accent) 26%, transparent),
    0 32px 90px rgba(0,0,0,.42);
  backdrop-filter: blur(25px) saturate(145%);
  -webkit-backdrop-filter: blur(25px) saturate(145%);
}

.dashboard-v2-card-glass::before {
  content: "";
  position: absolute;
  inset: 2px 6% auto;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.72), var(--card-accent), transparent);
  opacity: .75;
}

.dashboard-v2-card-glass::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -6px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--card-accent), var(--card-accent-2));
  opacity: .40;
  filter: blur(14px);
}

.dashboard-v2-card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  grid-template-rows: auto auto 1px 1fr auto;
  gap: 15px;
  padding: clamp(27px, 3vw, 42px);
  box-sizing: border-box;
}

.dashboard-v2-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.dashboard-v2-card-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  border: 1px solid color-mix(in srgb, var(--card-accent) 62%, rgba(255,255,255,.24));
  background: rgba(7, 27, 56, .64);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 26px color-mix(in srgb, var(--card-accent) 24%, transparent);
}

.dashboard-v2-card-icon img {
  width: 31px;
  height: 31px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(88%) sepia(26%) saturate(1604%) hue-rotate(150deg) brightness(102%) contrast(103%);
}

.dashboard-v2-card-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 13px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  border: 1px solid rgba(255,255,255,.11);
}

.dashboard-v2-card-status.active {
  color: #62f5d3;
  background: rgba(14, 83, 82, .34);
  border-color: rgba(80, 236, 213, .25);
}

.dashboard-v2-card-status.soon {
  color: rgba(229, 236, 250, .62);
  background: rgba(115, 127, 152, .16);
}

.dashboard-v2-card-heading h2 {
  margin: 0;
  max-width: 92%;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.02;
  letter-spacing: -.035em;
  color: #fff;
  text-shadow: 0 12px 38px rgba(0,0,0,.28);
}

.dashboard-v2-card-heading p {
  max-width: 88%;
  margin: 13px 0 0;
  color: rgba(239, 244, 255, .82);
  font-size: clamp(13px, 1vw, 16px);
  line-height: 1.5;
}

.dashboard-v2-card-rule {
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.26), rgba(255,255,255,.06));
}

.dashboard-v2-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
}

.dashboard-v2-metric {
  min-width: 0;
  min-height: 74px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 0 17px;
  border-right: 1px solid rgba(255,255,255,.10);
}

.dashboard-v2-metric:first-child { padding-left: 0; }
.dashboard-v2-metric:last-child { border-right: 0; }
.dashboard-v2-metric small {
  color: rgba(228, 236, 251, .68);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .14em;
}
.dashboard-v2-metric strong {
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  font-size: clamp(19px, 2vw, 29px);
  line-height: 1;
}

.dashboard-v2-open {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 24px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1px solid rgba(188, 222, 255, .30);
  color: #fff;
  background: linear-gradient(145deg, rgba(111, 156, 224, .26), rgba(47, 63, 117, .38));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 14px 34px rgba(0,0,0,.20);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.dashboard-v2-open:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--card-accent) 60%, white);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 0 24px color-mix(in srgb, var(--card-accent) 20%, transparent);
}

.dashboard-v2-open:disabled {
  color: rgba(230, 236, 249, .52);
  cursor: default;
  background: rgba(111, 123, 151, .12);
}

.dashboard-v2-card.is-adjacent .dashboard-v2-card-content {
  opacity: .86;
}

.dashboard-v2-card.is-far .dashboard-v2-card-content {
  opacity: .55;
}

body.dashboard-fullscreen-mode .dashboard-v2 .dashboard-carousel-control.dashboard-v2-arrow {
  position: absolute !important;
  top: 50% !important;
  z-index: 130 !important;
  width: 45px !important;
  height: 45px !important;
  min-width: 45px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  border: 1px solid rgba(112, 220, 255, .45) !important;
  color: #fff !important;
  background: rgba(4, 38, 69, .70) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 0 22px rgba(43, 198, 255, .13) !important;
  backdrop-filter: blur(12px) !important;
  transform: translateY(-50%) !important;
  font-size: 31px !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

body.dashboard-fullscreen-mode .dashboard-v2 .dashboard-carousel-control.dashboard-v2-arrow:hover {
  transform: translateY(-50%) scale(1.06) !important;
  border-color: rgba(170, 130, 255, .70) !important;
}

body.dashboard-fullscreen-mode .dashboard-v2 .dashboard-carousel-control.left { left: 13px !important; }
body.dashboard-fullscreen-mode .dashboard-v2 .dashboard-carousel-control.right { right: 13px !important; }

body.dashboard-fullscreen-mode .dashboard-v2 .dashboard-dots.dashboard-v2-dots {
  position: absolute !important;
  left: 50% !important;
  bottom: 7px !important;
  z-index: 140 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  transform: translateX(-50%) !important;
  pointer-events: auto !important;
}

body.dashboard-fullscreen-mode .dashboard-v2 .dashboard-dot {
  width: 8px !important;
  height: 8px !important;
  min-width: 8px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  opacity: .46 !important;
  background: rgba(185, 203, 231, .52) !important;
  box-shadow: none !important;
  cursor: pointer;
}

body.dashboard-fullscreen-mode .dashboard-v2 .dashboard-dot.active {
  width: 21px !important;
  opacity: 1 !important;
  background: linear-gradient(90deg, #53e2f5, #9f71ff) !important;
  box-shadow: 0 0 14px rgba(83,226,245,.32) !important;
}

.dashboard-v2-catalogue {
  min-width: 0;
  border-radius: 14px;
  padding: 12px 14px 13px;
}

.dashboard-v2-catalogue h2,
.dashboard-v2-spec-panel h2 {
  margin: 0;
  color: rgba(238, 245, 255, .86);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .17em;
}

.dashboard-v2-catalogue-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.dashboard-v2-catalogue-item {
  min-width: 0;
  min-height: 52px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border-radius: 10px;
  border: 1px solid rgba(152, 193, 244, .18);
  color: #fff;
  background: linear-gradient(145deg, rgba(11, 28, 57, .64), rgba(9, 13, 34, .62));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.dashboard-v2-catalogue-item:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--tile-accent) 50%, rgba(255,255,255,.18));
}

.dashboard-v2-catalogue-item.is-selected {
  border-color: color-mix(in srgb, var(--tile-accent) 74%, white);
  background: linear-gradient(145deg, color-mix(in srgb, var(--tile-accent) 15%, rgba(11,28,57,.82)), color-mix(in srgb, var(--tile-accent-2) 12%, rgba(9,13,34,.82)));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 0 18px color-mix(in srgb, var(--tile-accent) 22%, transparent);
}

.dashboard-v2-catalogue-icon {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--tile-accent) 34%, transparent);
  background: color-mix(in srgb, var(--tile-accent) 9%, rgba(7,20,43,.74));
}

.dashboard-v2-catalogue-icon img {
  width: 19px;
  height: 19px;
  object-fit: contain;
}

.dashboard-v2-catalogue-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dashboard-v2-catalogue-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1.12;
}

.dashboard-v2-catalogue-copy small {
  color: #52e5c8;
  font-size: 8px;
}

.dashboard-v2-catalogue-item.is-placeholder .dashboard-v2-catalogue-copy small {
  color: #b182ff;
}

.dashboard-v2-spec {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
  overflow: hidden;
}

.dashboard-v2-spec-panel {
  min-width: 0;
  border-radius: 15px;
  padding: 22px 20px;
}

.dashboard-v2-spec-main {
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 211, 242, .28) transparent;
}

.dashboard-v2-spec-section {
  margin-top: 21px;
}

.dashboard-v2-spec-section h3 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 12px;
}

.dashboard-v2-glass-diagram {
  position: relative;
  min-height: 135px;
  display: grid;
  grid-template-columns: 142px 1fr;
  align-items: center;
  gap: 14px;
}

.dashboard-v2-mini-glass {
  position: relative;
  width: 125px;
  height: 112px;
  margin-left: 5px;
  border-radius: 13px;
  border: 1px solid rgba(166, 217, 255, .44);
  background: linear-gradient(145deg, rgba(255,255,255,.14), rgba(78,103,161,.12) 45%, rgba(113,63,170,.18));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 0 0 8px rgba(111,161,218,.05), 0 0 24px rgba(94,203,255,.12);
}

.dashboard-v2-mini-glass::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -4px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(90deg, #4be2ff, #9d6bff);
  filter: blur(7px);
  opacity: .65;
}

.dashboard-v2-mini-shine {
  position: absolute;
  left: 20%;
  right: 20%;
  top: 6px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #f6fdff, #4ee5ff, transparent);
}

.dashboard-v2-mini-content {
  position: absolute;
  inset: 44% 12% 13%;
  border-radius: 8px;
  border: 1px solid rgba(133, 181, 233, .12);
  background: rgba(10, 28, 58, .22);
}

.dashboard-v2-callouts {
  height: 115px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: rgba(224, 234, 250, .74);
  font-size: 8px;
}

.dashboard-v2-callouts span {
  position: relative;
  padding-left: 13px;
  white-space: nowrap;
}

.dashboard-v2-callouts span::before {
  content: "";
  position: absolute;
  left: -36px;
  top: 50%;
  width: 42px;
  height: 1px;
  background: linear-gradient(90deg, #4ee5ff, rgba(78,229,255,.14));
}

.dashboard-v2-callouts span::after {
  content: "";
  position: absolute;
  left: -39px;
  top: calc(50% - 2px);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #4ee5ff;
  box-shadow: 0 0 7px rgba(78,229,255,.65);
}

.dashboard-v2-state-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-v2-state-item {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.state-card {
  width: 100%;
  aspect-ratio: 1.15;
  border-radius: 9px;
  border: 1px solid rgba(157, 205, 255, .20);
  background: linear-gradient(145deg, rgba(255,255,255,.11), rgba(65,91,145,.12));
}

.state-card.active {
  border-color: rgba(67, 220, 255, .62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 0 15px rgba(67,220,255,.20), inset 0 -1px 0 rgba(165,93,255,.44);
}

.state-card.adjacent {
  transform: perspective(100px) rotateY(-8deg) scale(.92);
  opacity: .72;
}

.state-card.inactive {
  transform: perspective(100px) rotateY(-14deg) scale(.82);
  opacity: .40;
}

.dashboard-v2-state-item b {
  color: rgba(244, 248, 255, .84);
  font-size: 8px;
}

.dashboard-v2-state-item small {
  color: rgba(214, 225, 244, .54);
  font-size: 7px;
  line-height: 1.45;
}

.dashboard-v2-material-grid,
.dashboard-v2-interaction-list {
  display: grid;
  grid-template-columns: 25px minmax(86px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 8px 9px;
}

.material-swatch {
  width: 23px;
  height: 23px;
  border-radius: 4px;
  border: 1px solid rgba(190, 217, 255, .22);
}

.material-swatch.glass { background: rgba(255,255,255,.08); box-shadow: inset 0 1px 0 rgba(255,255,255,.30); }
.material-swatch.edge { background: linear-gradient(135deg, #53e4f7, #986eff); }
.material-swatch.background { background: linear-gradient(135deg, #020914, #171035); }
.material-swatch.primary { background: #fff; }
.material-swatch.secondary { background: rgba(255,255,255,.70); }

.dashboard-v2-material-grid b,
.dashboard-v2-interaction-list b {
  color: rgba(244, 248, 255, .84);
  font-size: 8px;
}

.dashboard-v2-material-grid small,
.dashboard-v2-interaction-list small {
  color: rgba(214, 225, 244, .54);
  font-size: 7px;
  line-height: 1.35;
}

.dashboard-v2-interaction-list > span {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: #dffcff;
  background: rgba(79, 141, 206, .17);
  border: 1px solid rgba(124, 189, 245, .17);
  font-size: 11px;
}

.dashboard-v2-tech-panel {
  padding-top: 16px;
  padding-bottom: 16px;
}

.dashboard-v2-tech-panel ul {
  margin: 13px 0 0;
  padding-left: 17px;
  color: rgba(222, 231, 247, .67);
  font-size: 8px;
  line-height: 1.55;
}

body.dashboard-fullscreen-mode .dashboard-v2 .dashboard-login-overlay {
  position: absolute !important;
  inset: 0 !important;
  z-index: 500 !important;
  display: grid !important;
  place-items: center !important;
  padding: 20px !important;
  pointer-events: auto !important;
  background: rgba(1, 5, 16, .52) !important;
  backdrop-filter: blur(12px) saturate(70%) !important;
}

body.dashboard-fullscreen-mode .dashboard-v2:not(.dashboard-locked) .dashboard-login-overlay {
  display: none !important;
}

body.dashboard-fullscreen-mode .dashboard-v2.dashboard-locked .dashboard-v2-layout {
  filter: blur(6px) brightness(.66) saturate(.70);
  pointer-events: none !important;
}

body.dashboard-fullscreen-mode .dashboard-v2 .dashboard-login-card {
  width: min(430px, 92vw) !important;
  border: 1px solid rgba(117, 215, 255, .34) !important;
  background: linear-gradient(145deg, rgba(12, 32, 63, .94), rgba(15, 12, 42, .94)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 28px 90px rgba(0,0,0,.55), 0 0 42px rgba(78,210,255,.10) !important;
}

@media (max-width: 1500px) {
  body.dashboard-fullscreen-mode .dashboard-v2-layout {
    grid-template-columns: minmax(0, 1fr) 310px !important;
  }
  .dashboard-v2-main { padding-left: 18px; padding-right: 18px; }
  .dashboard-v2-catalogue-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .dashboard-v2-catalogue { max-height: 182px; overflow: auto; }
  .dashboard-v2-card { width: clamp(410px, 42vw, 560px); }
}

@media (max-width: 1180px) {
  body.dashboard-fullscreen-mode { overflow: auto !important; }
  body.dashboard-fullscreen-mode .app,
  body.dashboard-fullscreen-mode .main,
  body.dashboard-fullscreen-mode #page-dashboard,
  body.dashboard-fullscreen-mode .dashboard-v2 {
    position: relative !important;
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
  }
  body.dashboard-fullscreen-mode .dashboard-v2-layout {
    height: auto !important;
    grid-template-columns: 1fr !important;
    overflow: visible !important;
  }
  .dashboard-v2-main { min-height: 880px; }
  .dashboard-v2-spec { grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: auto; overflow: visible; }
  .dashboard-v2-spec-main { overflow: visible; }
  .dashboard-v2-catalogue-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .dashboard-v2-main {
    min-height: 860px;
    grid-template-rows: auto auto minmax(430px, 1fr) auto;
    padding: 17px 13px 8px;
  }
  .dashboard-v2-header { flex-direction: column; gap: 14px; }
  .dashboard-v2-user { align-self: flex-end; }
  .dashboard-v2-heading h1 { font-size: 36px; }
  .dashboard-v2-status-row { grid-template-columns: 1fr; gap: 9px; }
  .dashboard-v2-system-status,
  .dashboard-v2-drag-hint { justify-self: center; }
  .dashboard-v2-stage { min-height: 430px; }
  .dashboard-v2-card { width: min(88vw, 500px); height: 365px; }
  .dashboard-v2-card-content { padding: 25px; }
  .dashboard-v2-card-heading h2 { font-size: 31px; }
  .dashboard-v2-catalogue-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-v2-spec { grid-template-columns: 1fr; }
  body.dashboard-fullscreen-mode .dashboard-v2 .dashboard-carousel-control.dashboard-v2-arrow { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-v2-card,
  .dashboard-v2-catalogue-item,
  .dashboard-v2-open {
    transition: none !important;
  }
}

@media (max-height: 860px) and (min-width: 1181px) {
  .dashboard-v2-main {
    grid-template-rows: auto auto minmax(325px, 1fr) auto;
    gap: 7px;
    padding-top: 14px;
  }
  .dashboard-v2-heading h1 { font-size: clamp(31px, 2.55vw, 44px); }
  .dashboard-v2-heading p { margin-top: 8px; font-size: 13px; }
  .dashboard-v2-eyebrow { margin-bottom: 6px; }
  .dashboard-v2-stage { min-height: 325px; }
  .dashboard-v2-card { width: clamp(405px, 35vw, 520px); height: clamp(280px, 26vw, 335px); }
  .dashboard-v2-card-content { gap: 10px; padding: 25px 29px; }
  .dashboard-v2-card-icon { width: 46px; height: 46px; border-radius: 14px; }
  .dashboard-v2-card-icon img { width: 26px; height: 26px; }
  .dashboard-v2-card-heading h2 { font-size: clamp(26px, 2.5vw, 35px); }
  .dashboard-v2-card-heading p { margin-top: 8px; font-size: 12px; line-height: 1.4; }
  .dashboard-v2-metric { min-height: 56px; }
  .dashboard-v2-open { min-height: 41px; }
  .dashboard-v2-catalogue { padding-top: 8px; padding-bottom: 8px; }
  .dashboard-v2-catalogue-grid { margin-top: 7px; gap: 6px; }
  .dashboard-v2-catalogue-item { min-height: 42px; padding-top: 6px; padding-bottom: 6px; }
  .dashboard-v2-catalogue-icon { width: 25px; height: 25px; }
  .dashboard-v2-catalogue-icon img { width: 16px; height: 16px; }
  .dashboard-v2-spec-panel { padding-top: 15px; padding-bottom: 15px; }
  .dashboard-v2-spec-section { margin-top: 14px; }
}


/* =====================================================================
   DASHBOARD V2 002 — 2K / LARGE-DESKTOP SCALE AND LAYOUT
   Dedicated enhancement for wide, high-resolution command-centre screens.
   Existing 1920px, laptop and narrow-screen rules remain authoritative below
   this breakpoint. No copy, route, status or catalogue-order changes.
   ===================================================================== */
@media (min-width: 1900px) and (min-height: 900px) {
  body.dashboard-fullscreen-mode .dashboard-v2-layout {
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    grid-template-columns: minmax(0, 1fr) clamp(390px, 19vw, 450px) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    gap: 14px !important;
    padding: 10px !important;
    align-items: stretch !important;
  }

  .dashboard-v2-main,
  .dashboard-v2-spec {
    height: 100% !important;
    min-height: 0 !important;
    align-self: stretch !important;
  }

  .dashboard-v2-main {
    grid-template-rows: auto auto minmax(500px, 1fr) auto;
    gap: 12px;
    padding: 27px 32px 12px;
    border-radius: 19px;
  }

  .dashboard-v2-header {
    gap: 30px;
  }

  .dashboard-v2-heading {
    max-width: 940px;
  }

  .dashboard-v2-eyebrow {
    margin-bottom: 10px;
    font-size: 12px;
  }

  .dashboard-v2-heading h1 {
    font-size: clamp(50px, 3.2vw, 72px);
  }

  .dashboard-v2-heading p {
    margin-top: 14px;
    font-size: 16px;
  }

  .dashboard-v2-user {
    grid-template-columns: 42px auto 20px;
    gap: 12px;
    min-width: 220px;
    padding: 10px 13px;
    border-radius: 12px;
  }

  .dashboard-v2-user-avatar {
    width: 40px;
    height: 40px;
    font-size: 12px;
  }

  .dashboard-v2-user-copy strong {
    font-size: 13px;
  }

  .dashboard-v2-user-copy small,
  .dashboard-v2-user-chevron {
    font-size: 11px;
  }

  .dashboard-v2-status-row {
    grid-template-columns: minmax(300px, 1fr) minmax(430px, 1.3fr) minmax(300px, 1fr);
    min-height: 42px;
  }

  .dashboard-v2-system-status {
    gap: 11px;
    padding: 10px 16px;
  }

  .dashboard-v2-system-status b,
  .dashboard-v2-drag-hint b {
    font-size: 10px;
  }

  .dashboard-v2-system-status em {
    font-size: 11px;
  }

  .dashboard-v2-drag-hint {
    gap: 23px;
  }

  .dashboard-v2-drag-hint span {
    font-size: 29px;
  }

  .dashboard-v2-stage {
    min-height: 500px;
    border-radius: 18px;
  }

  .dashboard-v2-stage::before {
    width: 76%;
    height: 138px;
    bottom: 22px;
  }

  .dashboard-v2-stage::after {
    width: 58%;
    height: 91px;
    bottom: 22px;
  }

  body.dashboard-fullscreen-mode .dashboard-v2 #dashboard-3d-container {
    perspective: 2100px !important;
    perspective-origin: 50% 49% !important;
  }

  .dashboard-v2-card {
    width: clamp(760px, 40vw, 840px);
    height: clamp(445px, 23vw, 505px);
    border-radius: 35px;
  }

  .dashboard-v2-card-content {
    gap: 15px;
    padding: 39px 44px 35px;
  }

  .dashboard-v2-card-icon {
    width: 62px;
    height: 62px;
    border-radius: 18px;
  }

  .dashboard-v2-card-icon img {
    width: 35px;
    height: 35px;
  }

  .dashboard-v2-card-status {
    min-width: 92px;
    min-height: 31px;
    padding: 7px 13px;
    font-size: 10px;
  }

  .dashboard-v2-card-heading h2 {
    font-size: clamp(42px, 2.35vw, 54px);
  }

  .dashboard-v2-card-heading p {
    max-width: 620px;
    margin-top: 11px;
    font-size: 16px;
    line-height: 1.5;
  }

  .dashboard-v2-card-rule {
    margin: 1px 0 0;
  }

  .dashboard-v2-card-metrics {
    gap: 12px;
  }

  .dashboard-v2-metric {
    min-height: 76px;
    padding: 8px 18px;
  }

  .dashboard-v2-metric small {
    font-size: 10px;
  }

  .dashboard-v2-metric strong {
    margin-top: 7px;
    font-size: 25px;
  }

  .dashboard-v2-open {
    min-width: 190px;
    min-height: 50px;
    padding: 12px 19px;
    border-radius: 14px;
    font-size: 13px;
  }

  body.dashboard-fullscreen-mode .dashboard-v2 .dashboard-carousel-control.dashboard-v2-arrow {
    width: 56px !important;
    height: 56px !important;
    font-size: 35px !important;
  }

  body.dashboard-fullscreen-mode .dashboard-v2 .dashboard-carousel-control.left {
    left: 18px !important;
  }

  body.dashboard-fullscreen-mode .dashboard-v2 .dashboard-carousel-control.right {
    right: 18px !important;
  }

  body.dashboard-fullscreen-mode .dashboard-v2 .dashboard-dots.dashboard-v2-dots {
    bottom: 20px !important;
    gap: 8px !important;
  }

  body.dashboard-fullscreen-mode .dashboard-v2 .dashboard-dot {
    width: 9px !important;
    min-width: 9px !important;
    height: 9px !important;
  }

  body.dashboard-fullscreen-mode .dashboard-v2 .dashboard-dot.active {
    width: 25px !important;
  }

  .dashboard-v2-catalogue {
    padding: 14px 16px 15px;
    border-radius: 16px;
  }

  .dashboard-v2-catalogue h2,
  .dashboard-v2-spec-panel h2 {
    font-size: 10px;
  }

  .dashboard-v2-catalogue-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    margin-top: 11px;
  }

  .dashboard-v2-catalogue-item {
    min-height: 60px;
    grid-template-columns: 35px minmax(0, 1fr);
    gap: 10px;
    padding: 9px 11px;
    border-radius: 11px;
  }

  .dashboard-v2-catalogue-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }

  .dashboard-v2-catalogue-icon img {
    width: 22px;
    height: 22px;
  }

  .dashboard-v2-catalogue-copy strong {
    font-size: 11px;
  }

  .dashboard-v2-catalogue-copy small {
    font-size: 9px;
  }

  .dashboard-v2-spec {
    gap: 12px;
  }

  .dashboard-v2-spec-panel {
    border-radius: 17px;
    padding: 25px 23px;
  }

  .dashboard-v2-spec-section {
    margin-top: 24px;
  }

  .dashboard-v2-spec-section h3 {
    margin-bottom: 14px;
    font-size: 13px;
  }

  .dashboard-v2-glass-diagram {
    min-height: 165px;
    grid-template-columns: 168px 1fr;
    gap: 17px;
  }

  .dashboard-v2-mini-glass {
    width: 148px;
    height: 134px;
    border-radius: 15px;
  }

  .dashboard-v2-callouts {
    height: 137px;
    font-size: 9px;
  }

  .dashboard-v2-state-grid {
    gap: 10px;
  }

  .dashboard-v2-state-item {
    gap: 8px;
  }

  .dashboard-v2-state-item b {
    font-size: 9px;
  }

  .dashboard-v2-state-item small {
    font-size: 8px;
  }

  .dashboard-v2-material-grid,
  .dashboard-v2-interaction-list {
    grid-template-columns: 29px minmax(96px, auto) minmax(0, 1fr);
    gap: 9px 10px;
  }

  .material-swatch,
  .dashboard-v2-interaction-list > span {
    width: 27px;
    height: 27px;
  }

  .dashboard-v2-material-grid b,
  .dashboard-v2-interaction-list b {
    font-size: 9px;
  }

  .dashboard-v2-material-grid small,
  .dashboard-v2-interaction-list small {
    font-size: 8px;
  }

  .dashboard-v2-tech-panel {
    padding-top: 19px;
    padding-bottom: 19px;
  }

  .dashboard-v2-tech-panel ul {
    margin-top: 14px;
    font-size: 9px;
    line-height: 1.62;
  }
}


@media (min-width: 2400px) and (min-height: 1200px) {
  .dashboard-v2-card {
    width: 940px;
    height: 580px;
  }

  .dashboard-v2-card-content {
    padding: 43px 49px 39px;
  }

  .dashboard-v2-card-heading h2 {
    font-size: 58px;
  }

  .dashboard-v2-card-heading p {
    max-width: 700px;
    font-size: 17px;
  }

  .dashboard-v2-metric strong {
    font-size: 28px;
  }

  .dashboard-v2-open {
    min-width: 210px;
    min-height: 54px;
    font-size: 14px;
  }
}


/* =====================================================================
   DASHBOARD V2 003 — ROUTING, CARD CLICK AND CAROUSEL SPACING
   Makes live centre cards fully clickable, preserves placeholder lock state,
   and gives the glass carousel more separation at desktop/2K widths.
   ===================================================================== */
.dashboard-v2-card.is-live.is-centre,
.dashboard-v2-card.is-adjacent {
  cursor: pointer;
}

.dashboard-v2-card.is-placeholder.is-centre {
  cursor: default;
}

.dashboard-v2-card.is-centre:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--card-accent) 78%, white);
  outline-offset: 8px;
}

.dashboard-v2-card.is-live.is-centre:hover .dashboard-v2-card-glass {
  border-color: color-mix(in srgb, var(--card-accent) 68%, white);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.34),
    0 0 0 1px color-mix(in srgb, var(--card-accent-2) 38%, transparent),
    0 28px 78px rgba(0,0,0,.44),
    0 0 42px color-mix(in srgb, var(--card-accent) 22%, transparent);
}


/* === LIVE_RACING_002AU — glass workspace visual experiment for Live Racing landing page and opened racecard.
   Scope: visual-only CSS enhancement for #page-live-racing, including the opened racecard.
   No backend, JS, route or data changes. === */
#page-live-racing{
  --lr-glass-bg: rgba(255,255,255,.70);
  --lr-glass-bg-strong: rgba(255,255,255,.84);
  --lr-glass-bg-soft: rgba(244,248,255,.72);
  --lr-glass-line: rgba(99,125,255,.18);
  --lr-glass-line-strong: rgba(74,108,248,.28);
  --lr-glass-shadow: 0 20px 54px rgba(17,24,39,.10);
  --lr-glass-shadow-soft: 0 12px 30px rgba(17,24,39,.08);
  --lr-glass-highlight: rgba(255,255,255,.56);
  --lr-glass-blur: blur(18px) saturate(140%);
  background:
    radial-gradient(circle at 7% 11%, rgba(56,189,248,.08), transparent 22%),
    radial-gradient(circle at 94% 6%, rgba(139,92,246,.09), transparent 24%),
    linear-gradient(180deg, #f6f9ff 0%, #f2f6ff 42%, #f8fbff 100%);
  border-radius: 28px;
  position: relative;
  isolation: isolate;
}
#page-live-racing .topbar,
#page-live-racing .live-racing-hero,
#page-live-racing .live-racing-workspace{position:relative;z-index:1}

#page-live-racing .live-racing-hero{
  border:1px solid rgba(95,122,255,.22);
  background:
    linear-gradient(135deg, rgba(15,23,42,.94), rgba(29,78,216,.84) 58%, rgba(45,212,191,.68)),
    linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0));
  box-shadow: 0 28px 72px rgba(15,23,42,.18), inset 0 1px 0 rgba(255,255,255,.22);
  overflow:hidden;
}
#page-live-racing .live-racing-hero::before{
  content:"";
  position:absolute;
  inset:1px;
  border-radius:29px;
  background:linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0) 38%);
  pointer-events:none;
}
#page-live-racing .live-racing-hero::after{
  width:390px;
  height:390px;
  right:-62px;
  top:-116px;
  background:radial-gradient(circle, rgba(255,255,255,.17), rgba(255,255,255,.04) 58%, rgba(255,255,255,0) 72%);
}
#page-live-racing .live-racing-hero h2{font-size:36px}
#page-live-racing .live-racing-hero p{max-width:980px;color:rgba(255,255,255,.88)}

#page-live-racing .live-summary-card,
#page-live-racing .live-racing-toolbar.compact,
#page-live-racing .live-date-strip.compact,
#page-live-racing .live-racing-list .racing-results-course-card.live-course-card-modern,
#page-live-racing .live-racecard-panel,
#page-live-racing .live-race-conditions-card,
#page-live-racing .live-racecard-meta-box span,
#page-live-racing .live-runner-table-head,
#page-live-racing .live-runner-row,
#page-live-racing .live-overlay-runner-shell-002ap,
#page-live-racing .live-overlay-family-card,
#page-live-racing .live-overlay-empty-card,
#page-live-racing .live-profile-match-card,
#page-live-racing .live-system-match-card,
#page-live-racing .live-race-profile-panel,
#page-live-racing .live-race-system-panel,
#page-live-racing .live-race-notes-panel{
  background:linear-gradient(180deg, var(--lr-glass-bg-strong), var(--lr-glass-bg));
  border:1px solid var(--lr-glass-line);
  box-shadow: var(--lr-glass-shadow-soft), inset 0 1px 0 rgba(255,255,255,.55);
  -webkit-backdrop-filter: var(--lr-glass-blur);
  backdrop-filter: var(--lr-glass-blur);
}

#page-live-racing .live-summary-grid{gap:16px}
#page-live-racing .live-summary-card{
  min-height:124px;
  border-radius:24px;
}
#page-live-racing .live-summary-card.active{
  background:linear-gradient(145deg, rgba(242,250,255,.92), rgba(255,255,255,.82));
  border-color:rgba(45,212,191,.24);
  box-shadow:0 18px 48px rgba(30,64,175,.10), inset 0 1px 0 rgba(255,255,255,.6);
}
#page-live-racing .live-summary-card strong{color:#13233f}
#page-live-racing .live-summary-card span{color:#4b5e79}
#page-live-racing .quality-summary-pills > span{
  background:linear-gradient(180deg, rgba(255,255,255,.92), rgba(242,247,255,.78));
  border-color:rgba(110,133,255,.18);
}

#page-live-racing .live-racing-toolbar.compact{
  border-radius:22px;
  padding:14px;
  box-shadow:var(--lr-glass-shadow), inset 0 1px 0 rgba(255,255,255,.58);
}
#page-live-racing .live-view-toggle,
#page-live-racing .live-date-strip.compact{
  border-color:rgba(98,114,255,.18);
}
#page-live-racing .live-view-toggle button,
#page-live-racing .live-date-chip,
#page-live-racing .live-expand-button,
#page-live-racing .live-back-button,
#page-live-racing .live-result-button{
  border:1px solid rgba(101,123,255,.18);
  background:linear-gradient(180deg, rgba(255,255,255,.86), rgba(243,247,255,.76));
  box-shadow:0 10px 24px rgba(17,24,39,.05), inset 0 1px 0 rgba(255,255,255,.62);
}
#page-live-racing .live-view-toggle button{color:#1d3f86}
#page-live-racing .live-view-toggle button.active,
#page-live-racing .live-date-chip.active{
  background:linear-gradient(135deg, #0f172a, #2948d1 56%, #3cc7d8);
  color:#fff;
  border-color:transparent;
  box-shadow:0 14px 26px rgba(37,99,235,.22);
}
#page-live-racing .live-date-chip.active small{color:rgba(255,255,255,.84)}
#page-live-racing .live-expand-button:hover,
#page-live-racing .live-back-button:hover,
#page-live-racing .live-result-button:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 26px rgba(20,33,61,.11), inset 0 1px 0 rgba(255,255,255,.7);
}
#page-live-racing .live-racing-status{color:#38517a}

#page-live-racing .live-racing-list{gap:12px}
#page-live-racing .live-racing-list .racing-results-course-card.live-course-card-modern{
  border-radius:24px;
  border-color:rgba(73,126,255,.16);
  overflow:visible;
}
#page-live-racing .live-racing-list .racing-results-course-card.live-course-card-modern::before,
#page-live-racing .live-racecard-panel::before{
  content:"";
  position:absolute;
  inset:1px;
  border-radius:inherit;
  background:linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0) 42%);
  pointer-events:none;
}
#page-live-racing .live-racing-list .racing-results-course-card.live-course-card-modern{position:relative}
#page-live-racing .live-racing-list .racing-results-course-head.live-course-header-modern{
  background:linear-gradient(135deg, rgba(245,250,255,.92), rgba(230,247,246,.78) 52%, rgba(236,240,255,.74));
  border-radius:24px;
}
#page-live-racing .live-racing-list .racing-results-course-art.live-course-art{
  box-shadow:0 16px 32px rgba(15,23,42,.16), inset 0 1px 0 rgba(255,255,255,.18);
  background:linear-gradient(135deg, #081735, #2345c7 54%, #3fd5dc);
}
#page-live-racing .racing-results-course-title strong{color:#10213f}
#page-live-racing .racing-results-course-title small,
#page-live-racing .racing-results-course-going{color:#56708e}
#page-live-racing .racing-results-course-features,
#page-live-racing .live-course-weather-brief,
#page-live-racing .live-weather-popover{
  background:linear-gradient(180deg, rgba(255,255,255,.88), rgba(246,248,255,.72));
  border-color:rgba(102,121,255,.16);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.58);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
  backdrop-filter: blur(16px) saturate(135%);
}
#page-live-racing .racing-results-course-features strong{color:#10213f}
#page-live-racing .racing-results-course-features small{color:#5b708a}
#page-live-racing .racing-results-course-plus{
  background:linear-gradient(180deg, rgba(255,255,255,.90), rgba(244,248,255,.78));
  border-color:rgba(106,128,255,.18);
  box-shadow:0 10px 20px rgba(17,24,39,.05);
}
#page-live-racing .live-course-races-modern{
  border-top:1px solid rgba(110,126,255,.12);
  background:linear-gradient(180deg, rgba(255,255,255,.38), rgba(255,255,255,.08));
}
#page-live-racing .live-race-row{
  background:rgba(255,255,255,.02);
  transition:.16s;
}
#page-live-racing .live-race-row:hover{
  background:linear-gradient(90deg, rgba(255,255,255,.24), rgba(245,248,255,.55));
}
#page-live-racing .live-pill{
  border-color:rgba(104,127,255,.16);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.42);
}

#page-live-racing .live-racecard-panel{
  position:relative;
  border-radius:30px;
  overflow:hidden;
  box-shadow:0 24px 70px rgba(17,24,39,.12), inset 0 1px 0 rgba(255,255,255,.56);
}
#page-live-racing .live-racecard-nav{
  background:linear-gradient(135deg, rgba(7,17,39,.96), rgba(26,52,145,.90) 62%, rgba(39,177,192,.72));
  border-bottom:1px solid rgba(255,255,255,.08);
}
#page-live-racing .live-meeting-strip strong,
#page-live-racing .live-time-chip{letter-spacing:.02em}
#page-live-racing .live-time-chip{
  background:rgba(255,255,255,.08);
  border-color:rgba(255,255,255,.24);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12);
}
#page-live-racing .live-time-chip.active{
  background:linear-gradient(135deg, rgba(111,97,255,.92), rgba(41,133,245,.92));
  box-shadow:0 10px 22px rgba(45,97,243,.34);
}
#page-live-racing .live-racecard-header{
  background:linear-gradient(180deg, rgba(255,255,255,.34), rgba(255,255,255,.10));
  border-bottom:1px solid rgba(110,128,255,.14);
}
#page-live-racing .live-racecard-header h2,
#page-live-racing .live-racecard-header p{color:#11213d}
#page-live-racing .live-racecard-header p span{color:#546b87}
#page-live-racing .live-race-date{
  background:linear-gradient(135deg, #0f4450, #1870a8);
  box-shadow:0 10px 22px rgba(15,68,80,.18);
}
#page-live-racing .live-racecard-meta-box span,
#page-live-racing .live-race-conditions-card{
  color:#31445f;
}
#page-live-racing .live-race-conditions-card{
  margin-bottom:18px;
}
#page-live-racing .live-racecard-mode-tabs{
  gap:8px;
  padding-bottom:16px;
}
#page-live-racing .live-racecard-mode-tabs button{
  border-color:rgba(104,124,255,.18);
  border-radius:12px;
  background:linear-gradient(180deg, rgba(255,255,255,.90), rgba(244,247,255,.76));
  color:#3f5680;
  box-shadow:0 8px 18px rgba(17,24,39,.05), inset 0 1px 0 rgba(255,255,255,.58);
}
#page-live-racing .live-racecard-mode-tabs button.active{
  background:linear-gradient(135deg, rgba(15,23,42,.96), rgba(39,74,211,.92) 56%, rgba(52,201,214,.84));
  color:#fff;
  box-shadow:0 14px 28px rgba(30,64,175,.18);
}
#page-live-racing .live-runner-table-head{
  border-radius:16px 16px 0 0;
  color:#516987;
  background:linear-gradient(180deg, rgba(246,249,255,.92), rgba(236,241,250,.78));
}
#page-live-racing .live-runner-row{
  border-color:rgba(116,137,255,.14);
  background:linear-gradient(180deg, rgba(255,255,255,.82), rgba(247,249,255,.64));
}
#page-live-racing .live-runner-row:last-child{border-radius:0 0 16px 16px}
#page-live-racing .live-runner-main,
#page-live-racing .live-runner-meta,
#page-live-racing .live-runner-odds{
  color:#11213d;
}
#page-live-racing .live-silk-placeholder,
#page-live-racing .live-silk-placeholder.compact{
  box-shadow:0 10px 18px rgba(17,24,39,.10), inset 0 1px 0 rgba(255,255,255,.20);
}

#page-live-racing .live-overlay-runner-shell-002ap{
  border-radius:26px;
  border-color:rgba(101,125,255,.16);
  overflow:hidden;
}
#page-live-racing .live-overlay-runner-identity-rail-002ap,
#page-live-racing .live-overlay-runner-facts-rail-002ap{
  background:linear-gradient(180deg, rgba(255,255,255,.24), rgba(255,255,255,.06));
}
#page-live-racing .live-overlay-evidence-deck-002ap{
  padding-top:2px;
}
#page-live-racing .live-overlay-family-card{
  border-radius:18px;
  border-color:rgba(103,124,255,.14);
}
#page-live-racing .live-overlay-family-card.horse{
  background:linear-gradient(180deg, rgba(242,248,255,.86), rgba(255,255,255,.72));
}
#page-live-racing .live-overlay-family-card.sire{
  background:linear-gradient(180deg, rgba(236,253,245,.82), rgba(255,255,255,.72));
}
#page-live-racing .live-overlay-family-card.dam-sire{
  background:linear-gradient(180deg, rgba(242,242,255,.84), rgba(255,255,255,.72));
}
#page-live-racing .live-overlay-family-card.trainer{
  background:linear-gradient(180deg, rgba(255,248,237,.82), rgba(255,255,255,.72));
}
#page-live-racing .live-overlay-family-card.jockey{
  background:linear-gradient(180deg, rgba(248,243,255,.82), rgba(255,255,255,.72));
}
#page-live-racing .live-evidence-button,
#page-live-racing .live-runner-static-action,
#page-live-racing .live-overlay-runner-action,
#page-live-racing .live-overlay-family-open{
  border:1px solid rgba(104,124,255,.16);
  background:linear-gradient(180deg, rgba(255,255,255,.88), rgba(246,248,255,.74));
  box-shadow:0 8px 16px rgba(17,24,39,.04), inset 0 1px 0 rgba(255,255,255,.56);
}
#page-live-racing .live-overlay-runner-action.exclude,
#page-live-racing .live-runner-static-action.live-racecard-exclude-action{
  background:linear-gradient(180deg, rgba(255,247,240,.92), rgba(255,238,231,.84));
}
#page-live-racing .live-overlay-runner-action.undo,
#page-live-racing .live-runner-static-action.live-racecard-exclude-action.excluded{
  background:linear-gradient(180deg, rgba(255,238,244,.92), rgba(255,225,236,.86));
}

#page-live-racing .live-race-profile-panel,
#page-live-racing .live-race-system-panel,
#page-live-racing .live-race-notes-panel{
  border-radius:22px;
}
#page-live-racing .live-race-profile-panel-head,
#page-live-racing .live-race-notes-header{
  border-bottom:1px solid rgba(102,124,255,.14);
}
#page-live-racing .live-profile-match-card,
#page-live-racing .live-system-match-card{
  border-radius:18px;
}
#page-live-racing .live-empty-state,
#page-live-racing .live-loading-state,
#page-live-racing .live-error-state{
  border-radius:22px;
  background:linear-gradient(180deg, rgba(255,255,255,.82), rgba(246,248,255,.70));
  border:1px solid rgba(101,124,255,.14);
  box-shadow:0 14px 28px rgba(17,24,39,.06);
}

@media (max-width: 1400px){
  #page-live-racing .live-racecard-header{grid-template-columns:minmax(0,1fr) 320px}
}
@media (max-width: 1180px){
  #page-live-racing .live-racing-hero h2{font-size:32px}
  #page-live-racing .live-summary-card{min-height:118px}
}

/* === LIVE_RACING_002AV — glass landing-page polish and dedicated Time-view treatment.
   Visual-only follow-up to 002AU. No JavaScript, backend, route, SQL or data changes. === */

/* Give the pale summary cards a slightly firmer lower edge on bright monitors. */
#page-live-racing .live-summary-card{
  border-bottom-color:rgba(67,91,180,.22);
  box-shadow:0 19px 46px rgba(30,45,80,.10), 0 2px 0 rgba(255,255,255,.68) inset;
}

/* Neutralise the meeting surface slightly so cyan reads as refraction rather than a solid mint wash. */
#page-live-racing .live-racing-list .racing-results-course-head.live-course-header-modern{
  background:
    radial-gradient(circle at 5% 50%, rgba(45,212,191,.16), transparent 25%),
    linear-gradient(135deg, rgba(249,252,255,.95), rgba(239,247,252,.88) 53%, rgba(244,243,255,.84));
}
#page-live-racing .live-racing-list .racing-results-course-card.live-course-card-modern{
  border-color:rgba(68,119,214,.18);
}

/* Bring the Features well into the cool glass palette. */
#page-live-racing .racing-results-course-features{
  background:linear-gradient(180deg, rgba(255,255,255,.90), rgba(246,249,255,.76));
  border-color:rgba(87,112,205,.18);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.68), 0 8px 20px rgba(26,45,88,.035);
}
#page-live-racing .racing-results-course-features em{
  color:#07816f;
}

/* Improve right-side scanning without changing the layout. */
#page-live-racing .racing-results-course-going{
  color:#435b78;
  font-weight:900;
}
#page-live-racing .live-course-weather-brief{
  color:#223a59;
}
#page-live-racing .live-weather-main strong{
  color:#12233f;
}

/* Expanded course rows: maintain one list, but make row boundaries easier to scan. */
#page-live-racing .live-course-races-modern .live-race-row{
  border-bottom:1px solid rgba(70,94,155,.13);
  background:linear-gradient(180deg, rgba(255,255,255,.19), rgba(246,250,255,.10));
}
#page-live-racing .live-course-races-modern .live-race-row:nth-child(even){
  background:linear-gradient(180deg, rgba(242,248,255,.31), rgba(250,252,255,.16));
}
#page-live-racing .live-course-races-modern .live-race-row:hover{
  background:linear-gradient(90deg, rgba(226,243,255,.70), rgba(245,248,255,.68));
  transform:none;
}
#page-live-racing .live-course-races-modern .live-race-time{
  color:#10213d;
}

/* Time view: treat the chronological race list as one operational glass panel. */
#page-live-racing .live-time-list{
  position:relative;
  overflow:hidden;
  border:1px solid rgba(81,108,199,.18);
  border-radius:24px;
  background:linear-gradient(180deg, rgba(255,255,255,.78), rgba(244,248,255,.66));
  box-shadow:0 20px 54px rgba(21,35,68,.09), inset 0 1px 0 rgba(255,255,255,.68);
  -webkit-backdrop-filter:blur(18px) saturate(138%);
  backdrop-filter:blur(18px) saturate(138%);
}
#page-live-racing .live-time-list::before{
  content:"";
  position:absolute;
  inset:1px;
  border-radius:23px;
  background:
    radial-gradient(circle at 8% 0%, rgba(45,212,191,.09), transparent 25%),
    radial-gradient(circle at 92% 0%, rgba(124,92,246,.08), transparent 27%),
    linear-gradient(180deg, rgba(255,255,255,.17), transparent 34%);
  pointer-events:none;
}
#page-live-racing .live-time-list .live-race-row.time-row{
  position:relative;
  z-index:1;
  min-height:58px;
  grid-template-columns:86px 132px minmax(0,1fr) 96px 24px;
  gap:14px;
  padding:11px 16px;
  border:0;
  border-bottom:1px solid rgba(72,95,157,.13);
  background:rgba(255,255,255,.08);
  transition:background .16s ease, box-shadow .16s ease;
}
#page-live-racing .live-time-list .live-race-row.time-row:nth-child(even){
  background:rgba(238,245,255,.20);
}
#page-live-racing .live-time-list .live-race-row.time-row:last-child{
  border-bottom:0;
}
#page-live-racing .live-time-list .live-race-row.time-row:hover{
  background:linear-gradient(90deg, rgba(222,242,255,.72), rgba(239,240,255,.58));
  box-shadow:inset 4px 0 0 rgba(45,126,235,.52);
  transform:none;
}
#page-live-racing .live-time-list .live-race-time{
  font-size:22px;
  letter-spacing:-.025em;
  color:#10213d;
}
#page-live-racing .live-time-list .live-race-course{
  color:#1d2f4e;
  font-size:12px;
  letter-spacing:.035em;
}
#page-live-racing .live-time-list .live-race-info strong{
  color:#12213c;
  font-size:14px;
}
#page-live-racing .live-time-list .live-race-info small{
  color:#6b7f99;
}
#page-live-racing .live-time-list .live-race-runners{
  color:#536b88;
  font-weight:950;
}
#page-live-racing .live-time-list .live-race-chevron{
  color:#e43b55;
}

@media (max-width:1100px){
  #page-live-racing .live-time-list .live-race-row.time-row{
    grid-template-columns:76px minmax(0,1fr) 84px 22px;
    padding:10px 13px;
  }
  #page-live-racing .live-time-list .live-race-course{
    display:none;
  }
}

/* === LIVE_RACING_002AW — stronger Dashboard-inspired glass treatment experiment.
   Visual-only follow-up to 002AV. Intentionally more cinematic and premium.
   No JavaScript, backend, routes, SQL, schema or data changes. === */

/* Stronger spatial background: still light enough for operational use. */
#page-live-racing{
  background:
    radial-gradient(circle at 3% 7%, rgba(34,211,238,.13), transparent 23%),
    radial-gradient(circle at 94% 5%, rgba(124,58,237,.15), transparent 26%),
    radial-gradient(circle at 52% 100%, rgba(59,130,246,.08), transparent 34%),
    linear-gradient(180deg, #f4f7ff 0%, #eef4ff 46%, #f7faff 100%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8);
  overflow:hidden;
}
#page-live-racing::before,
#page-live-racing::after{
  content:"";
  position:absolute;
  z-index:0;
  pointer-events:none;
  filter:blur(3px);
  opacity:.8;
}
#page-live-racing::before{
  width:420px;
  height:420px;
  left:-185px;
  top:150px;
  border-radius:44% 56% 58% 42%;
  background:linear-gradient(135deg, rgba(37,99,235,.13), rgba(34,211,238,.06) 52%, rgba(255,255,255,0));
  transform:rotate(18deg);
}
#page-live-racing::after{
  width:500px;
  height:500px;
  right:-245px;
  top:290px;
  border-radius:57% 43% 38% 62%;
  background:linear-gradient(145deg, rgba(124,58,237,.12), rgba(59,130,246,.06) 58%, rgba(255,255,255,0));
  transform:rotate(-14deg);
}

/* Hero: more like a command-centre glass slab. */
#page-live-racing .live-racing-hero{
  border:1px solid rgba(115,140,255,.42);
  background:
    radial-gradient(circle at 84% 18%, rgba(45,212,191,.26), transparent 34%),
    radial-gradient(circle at 36% 110%, rgba(99,102,241,.34), transparent 48%),
    linear-gradient(132deg, rgba(6,17,39,.98), rgba(24,47,139,.95) 50%, rgba(43,99,213,.92) 75%, rgba(41,198,194,.83));
  box-shadow:
    0 34px 88px rgba(15,23,42,.25),
    0 0 0 1px rgba(255,255,255,.05) inset,
    0 1px 0 rgba(255,255,255,.28) inset;
}
#page-live-racing .live-racing-hero::before{
  background:
    linear-gradient(112deg, rgba(255,255,255,.19), rgba(255,255,255,0) 28%),
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0) 44%);
}
#page-live-racing .live-racing-hero::after{
  width:470px;
  height:470px;
  right:-92px;
  top:-152px;
  background:
    radial-gradient(circle at 42% 42%, rgba(255,255,255,.24), rgba(125,211,252,.10) 34%, rgba(167,139,250,.06) 55%, transparent 72%);
}
#page-live-racing .live-racing-hero h2{
  text-shadow:0 4px 24px rgba(0,0,0,.24);
}
#page-live-racing .live-racing-hero p{
  text-shadow:0 2px 12px rgba(0,0,0,.20);
}

/* Summary cards: more refractive edges and a clearer floating-glass feel. */
#page-live-racing .live-summary-card{
  position:relative;
  overflow:hidden;
  background:
    linear-gradient(145deg, rgba(255,255,255,.88), rgba(239,246,255,.73) 60%, rgba(241,239,255,.66));
  border-color:rgba(91,119,237,.28);
  box-shadow:
    0 22px 52px rgba(28,43,84,.13),
    0 0 0 1px rgba(255,255,255,.48) inset,
    0 1px 0 rgba(255,255,255,.85) inset;
}
#page-live-racing .live-summary-card::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(116deg, rgba(255,255,255,.30), transparent 28%),
    radial-gradient(circle at 95% 0%, rgba(124,58,237,.10), transparent 34%),
    radial-gradient(circle at 0% 100%, rgba(34,211,238,.09), transparent 30%);
}
#page-live-racing .live-summary-card > *{position:relative;z-index:1}
#page-live-racing .live-summary-card:hover{
  transform:translateY(-2px);
  border-color:rgba(76,112,255,.38);
  box-shadow:0 26px 60px rgba(31,45,95,.16), 0 0 0 1px rgba(255,255,255,.55) inset;
}

/* Toolbar and active controls: stronger Dashboard chrome. */
#page-live-racing .live-racing-toolbar.compact{
  background:
    linear-gradient(145deg, rgba(255,255,255,.83), rgba(239,245,255,.72) 58%, rgba(242,238,255,.65));
  border-color:rgba(92,115,229,.27);
  box-shadow:0 22px 56px rgba(25,39,78,.12), inset 0 1px 0 rgba(255,255,255,.78);
}
#page-live-racing .live-view-toggle button,
#page-live-racing .live-date-chip,
#page-live-racing .live-expand-button,
#page-live-racing .live-back-button,
#page-live-racing .live-result-button{
  border-color:rgba(91,118,226,.25);
  background:
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(235,243,255,.77));
  box-shadow:0 11px 24px rgba(26,42,86,.08), inset 0 1px 0 rgba(255,255,255,.78);
}
#page-live-racing .live-view-toggle button.active,
#page-live-racing .live-date-chip.active{
  background:
    radial-gradient(circle at 78% 16%, rgba(34,211,238,.28), transparent 42%),
    linear-gradient(135deg, #0b1632, #243fba 52%, #5b45dd 78%, #22b8c7);
  box-shadow:
    0 16px 34px rgba(37,76,205,.30),
    0 1px 0 rgba(255,255,255,.25) inset;
}

/* Meeting cards: stronger glass shell and gentle floating interaction. */
#page-live-racing .live-racing-list .racing-results-course-card.live-course-card-modern{
  border-color:rgba(69,108,221,.25);
  box-shadow:
    0 18px 42px rgba(27,44,84,.10),
    0 0 0 1px rgba(255,255,255,.42) inset,
    0 1px 0 rgba(255,255,255,.72) inset;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
#page-live-racing .live-racing-list .racing-results-course-card.live-course-card-modern:hover{
  transform:translateY(-2px);
  border-color:rgba(70,112,242,.38);
  box-shadow:
    0 24px 56px rgba(30,49,96,.15),
    0 0 0 1px rgba(255,255,255,.56) inset,
    0 0 34px rgba(34,211,238,.06);
}
#page-live-racing .live-racing-list .racing-results-course-head.live-course-header-modern{
  background:
    radial-gradient(circle at 2% 50%, rgba(34,211,238,.20), transparent 24%),
    radial-gradient(circle at 98% 0%, rgba(124,58,237,.12), transparent 30%),
    linear-gradient(135deg, rgba(250,253,255,.94), rgba(232,244,255,.85) 52%, rgba(241,238,255,.81));
}
#page-live-racing .live-racing-list .racing-results-course-art.live-course-art{
  background:
    radial-gradient(circle at 78% 18%, rgba(34,211,238,.34), transparent 35%),
    linear-gradient(135deg, #07142f, #223eaf 53%, #5a43d9 78%, #21b4c1);
  border:1px solid rgba(139,174,255,.36);
  box-shadow:
    0 18px 36px rgba(15,23,42,.20),
    0 0 24px rgba(34,211,238,.10),
    inset 0 1px 0 rgba(255,255,255,.25);
}
#page-live-racing .racing-results-course-features{
  border-color:rgba(87,114,219,.25);
  background:
    linear-gradient(150deg, rgba(255,255,255,.91), rgba(239,246,255,.76));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8), 0 10px 24px rgba(31,47,88,.06);
}
#page-live-racing .live-course-weather-brief{
  border-color:rgba(81,123,228,.24);
  background:linear-gradient(150deg, rgba(255,255,255,.90), rgba(232,245,255,.75));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.76), 0 10px 24px rgba(28,44,84,.05);
}
#page-live-racing .racing-results-course-plus{
  border-color:rgba(87,116,224,.26);
  box-shadow:0 10px 22px rgba(29,44,86,.08), 0 0 18px rgba(96,165,250,.06);
}

/* Time view: slightly deeper, more command-centre-like outer glass. */
#page-live-racing .live-time-list{
  border-color:rgba(77,106,217,.28);
  background:
    radial-gradient(circle at 3% 0%, rgba(34,211,238,.10), transparent 24%),
    radial-gradient(circle at 96% 0%, rgba(124,58,237,.10), transparent 26%),
    linear-gradient(180deg, rgba(252,253,255,.83), rgba(235,242,255,.70));
  box-shadow:
    0 24px 66px rgba(22,36,76,.13),
    0 0 0 1px rgba(255,255,255,.52) inset,
    0 1px 0 rgba(255,255,255,.82) inset;
}
#page-live-racing .live-time-list::before{
  background:
    linear-gradient(112deg, rgba(255,255,255,.25), transparent 27%),
    radial-gradient(circle at 8% 0%, rgba(34,211,238,.13), transparent 28%),
    radial-gradient(circle at 92% 0%, rgba(124,58,237,.11), transparent 29%),
    linear-gradient(180deg, rgba(255,255,255,.18), transparent 36%);
}
#page-live-racing .live-time-list .live-race-row.time-row{
  border-bottom-color:rgba(65,90,159,.16);
  background:linear-gradient(180deg, rgba(255,255,255,.19), rgba(240,245,255,.09));
}
#page-live-racing .live-time-list .live-race-row.time-row:nth-child(even){
  background:linear-gradient(180deg, rgba(236,243,255,.29), rgba(246,248,255,.13));
}
#page-live-racing .live-time-list .live-race-row.time-row:hover{
  background:
    linear-gradient(90deg, rgba(214,240,255,.82), rgba(232,235,255,.68));
  box-shadow:inset 5px 0 0 rgba(43,108,235,.70), inset 0 1px 0 rgba(255,255,255,.42);
}

/* Opened racecard: stronger glass shell and navigation, still light inside. */
#page-live-racing .live-racecard-panel{
  border-color:rgba(79,109,226,.29);
  box-shadow:
    0 32px 88px rgba(19,31,69,.18),
    0 0 0 1px rgba(255,255,255,.54) inset,
    0 1px 0 rgba(255,255,255,.82) inset;
}
#page-live-racing .live-racecard-nav{
  background:
    radial-gradient(circle at 82% 0%, rgba(34,211,238,.22), transparent 34%),
    linear-gradient(135deg, rgba(5,14,33,.99), rgba(25,45,134,.96) 55%, rgba(81,59,207,.91) 78%, rgba(38,179,190,.80));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.13), 0 16px 34px rgba(16,24,56,.18);
}
#page-live-racing .live-racecard-header{
  background:
    radial-gradient(circle at 95% 0%, rgba(124,58,237,.08), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,.53), rgba(244,248,255,.20));
}
#page-live-racing .live-racecard-mode-tabs button.active{
  background:
    radial-gradient(circle at 82% 15%, rgba(34,211,238,.24), transparent 38%),
    linear-gradient(135deg, rgba(11,22,50,.98), rgba(36,64,187,.94) 58%, rgba(83,66,216,.92) 80%, rgba(37,178,190,.84));
  box-shadow:0 16px 34px rgba(33,65,171,.24), inset 0 1px 0 rgba(255,255,255,.20);
}
#page-live-racing .live-runner-row{
  border-color:rgba(91,117,218,.18);
  background:linear-gradient(180deg, rgba(255,255,255,.88), rgba(242,247,255,.69));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.60);
}
#page-live-racing .live-runner-row:hover{
  background:linear-gradient(180deg, rgba(250,253,255,.98), rgba(232,241,255,.78));
}

/* Overlay: stronger material depth while preserving family colours. */
#page-live-racing .live-overlay-runner-shell-002ap{
  border-color:rgba(82,111,219,.24);
  box-shadow:0 22px 54px rgba(24,38,76,.11), inset 0 1px 0 rgba(255,255,255,.58);
}
#page-live-racing .live-overlay-family-card{
  border-color:rgba(91,115,215,.20);
  box-shadow:0 10px 24px rgba(22,38,78,.06), inset 0 1px 0 rgba(255,255,255,.72);
}
#page-live-racing .live-overlay-family-card.horse{
  background:linear-gradient(155deg, rgba(235,246,255,.92), rgba(255,255,255,.76));
}
#page-live-racing .live-overlay-family-card.sire{
  background:linear-gradient(155deg, rgba(228,252,241,.90), rgba(255,255,255,.76));
}
#page-live-racing .live-overlay-family-card.dam-sire{
  background:linear-gradient(155deg, rgba(235,235,255,.91), rgba(255,255,255,.76));
}
#page-live-racing .live-overlay-family-card.trainer{
  background:linear-gradient(155deg, rgba(255,244,229,.90), rgba(255,255,255,.76));
}
#page-live-racing .live-overlay-family-card.jockey{
  background:linear-gradient(155deg, rgba(246,237,255,.90), rgba(255,255,255,.76));
}

/* Keep the stronger experiment controlled on smaller screens. */
@media (max-width: 1180px){
  #page-live-racing::before,
  #page-live-racing::after{opacity:.48}
  #page-live-racing .live-summary-card:hover,
  #page-live-racing .live-racing-list .racing-results-course-card.live-course-card-modern:hover{
    transform:none;
  }
}

/* === LIVE_RACING_002AX — premium Features capsule and Live Racing title clipping correction.
   Visual-only follow-up to 002AW. No JavaScript, backend, route, SQL, schema or data changes. === */

/* The stronger page shell clips a few pixels of the h1 glyph at the top edge on some displays.
   Retain the contained background while giving the Live Racing heading a safe internal gutter. */
#page-live-racing .live-racing-topbar{
  padding-top:6px;
}

/* Replace the warm/pink-looking Features well with a cool inset command capsule. */
#page-live-racing .racing-results-course-features{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  gap:4px;
  min-height:50px;
  padding:9px 15px 9px 17px;
  border:1px solid rgba(76,111,221,.25);
  border-radius:15px;
  background:
    radial-gradient(circle at 92% 5%, rgba(124,58,237,.08), transparent 34%),
    radial-gradient(circle at 0% 100%, rgba(34,211,238,.10), transparent 38%),
    linear-gradient(145deg, rgba(255,255,255,.94), rgba(238,246,255,.82) 62%, rgba(242,239,255,.76));
  box-shadow:
    0 11px 26px rgba(29,45,88,.07),
    0 1px 0 rgba(255,255,255,.86) inset,
    0 0 0 1px rgba(255,255,255,.30) inset;
  -webkit-backdrop-filter:blur(16px) saturate(145%);
  backdrop-filter:blur(16px) saturate(145%);
}
#page-live-racing .racing-results-course-features::before{
  content:"";
  position:absolute;
  z-index:-1;
  left:0;
  top:7px;
  bottom:7px;
  width:4px;
  border-radius:0 999px 999px 0;
  background:linear-gradient(180deg, #22d3ee, #3b82f6 52%, #8b5cf6);
  box-shadow:0 0 18px rgba(59,130,246,.24);
}
#page-live-racing .racing-results-course-features::after{
  content:"";
  position:absolute;
  pointer-events:none;
  left:9%;
  right:8%;
  top:0;
  height:1px;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.95), rgba(125,211,252,.52), transparent);
}
#page-live-racing .racing-results-course-features em{
  position:relative;
  z-index:1;
  display:inline-flex;
  align-items:center;
  width:max-content;
  min-height:18px;
  padding:3px 8px;
  border:1px solid rgba(122,166,255,.30);
  border-radius:999px;
  background:
    radial-gradient(circle at 80% 10%, rgba(34,211,238,.24), transparent 42%),
    linear-gradient(135deg, rgba(8,23,55,.98), rgba(39,69,186,.95) 58%, rgba(92,61,211,.90));
  color:#fff;
  box-shadow:0 7px 16px rgba(28,58,155,.18), inset 0 1px 0 rgba(255,255,255,.22);
  font-size:8px;
  line-height:1;
  letter-spacing:.14em;
  text-shadow:0 1px 5px rgba(0,0,0,.24);
}
#page-live-racing .racing-results-course-features strong,
#page-live-racing .racing-results-course-features small{
  position:relative;
  z-index:1;
}
#page-live-racing .racing-results-course-features strong{
  color:#14284a;
  font-size:12px;
  line-height:1.15;
  font-weight:950;
  letter-spacing:-.012em;
}
#page-live-racing .racing-results-course-features small{
  color:#526a88;
  font-size:10.5px;
  line-height:1.15;
  font-weight:800;
}
#page-live-racing .racing-results-course-features.is-empty{
  opacity:.78;
}

@media (max-width:1180px){
  #page-live-racing .live-racing-topbar{padding-top:5px}
  #page-live-racing .racing-results-course-features{
    padding:8px 12px 8px 15px;
  }
}

/* === LIVE_RACING_002AY — premium intelligence panel, race-day telemetry,
   race-quality glass indicators, utility dock and definitive heading clip fix.
   Visual-only CSS follow-up to 002AX. No JavaScript, backend, route, SQL,
   schema or data changes. === */

/* Definitive title-safe area: fix the glyph itself rather than relying only on outer padding. */
#page-live-racing{
  padding-top:5px;
  overflow:visible;
}
#page-live-racing .live-racing-topbar{
  padding-top:8px;
  overflow:visible;
}
#page-live-racing .live-racing-topbar > div:first-child{
  padding-top:2px;
  overflow:visible;
}
#page-live-racing .live-racing-topbar h1{
  display:block;
  padding:3px 0 2px;
  line-height:1.15;
  overflow:visible;
  text-rendering:geometricPrecision;
}

/* Top-right controls become one coherent glass utility dock. */
#page-live-racing .live-racing-topbar .top-icons{
  display:flex;
  align-items:center;
  gap:5px;
  padding:5px;
  border:1px solid rgba(92,119,224,.20);
  border-radius:20px;
  background:
    radial-gradient(circle at 88% 5%, rgba(139,92,246,.10), transparent 42%),
    linear-gradient(145deg, rgba(255,255,255,.80), rgba(238,245,255,.66));
  box-shadow:
    0 16px 38px rgba(24,39,78,.10),
    inset 0 1px 0 rgba(255,255,255,.86),
    inset 0 0 0 1px rgba(255,255,255,.24);
  -webkit-backdrop-filter:blur(18px) saturate(150%);
  backdrop-filter:blur(18px) saturate(150%);
}
#page-live-racing .live-racing-topbar .top-icon{
  width:38px;
  height:38px;
  min-width:38px;
  border:1px solid transparent;
  border-radius:13px;
  background:rgba(255,255,255,.34);
  color:#233d78;
  box-shadow:none;
  font-size:16px;
  transition:transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease;
}
#page-live-racing .live-racing-topbar .top-icon:hover,
#page-live-racing .live-racing-topbar .top-icon:focus-visible{
  transform:translateY(-1px);
  border-color:rgba(80,119,235,.28);
  background:linear-gradient(145deg, rgba(255,255,255,.92), rgba(226,239,255,.80));
  color:#173a92;
  box-shadow:0 9px 20px rgba(32,62,151,.12), inset 0 1px 0 rgba(255,255,255,.88);
  outline:none;
}
#page-live-racing .live-racing-topbar .top-icon.login{
  width:40px;
  min-width:40px;
  background:linear-gradient(145deg, rgba(222,255,244,.92), rgba(181,246,224,.78))!important;
  border-color:rgba(16,185,129,.24)!important;
  color:#056147!important;
  box-shadow:0 8px 18px rgba(16,185,129,.10), inset 0 1px 0 rgba(255,255,255,.84)!important;
}

/* Race Quality: compact premium classification indicators, not ordinary form buttons. */
#page-live-racing .live-summary-card.quality-card{
  background:
    radial-gradient(circle at 8% 20%, rgba(34,211,238,.07), transparent 35%),
    radial-gradient(circle at 92% 10%, rgba(139,92,246,.08), transparent 38%),
    linear-gradient(145deg, rgba(255,255,255,.89), rgba(241,246,255,.76));
}
#page-live-racing .quality-summary-pills{
  gap:7px;
  align-items:center;
  justify-content:center;
}
#page-live-racing .quality-summary-pills > span{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  min-width:76px;
  min-height:43px;
  padding:7px 10px 6px;
  border:1px solid rgba(116,159,255,.28);
  border-radius:13px;
  background:
    radial-gradient(circle at 82% 5%, rgba(34,211,238,.26), transparent 38%),
    linear-gradient(145deg, rgba(9,25,59,.98), rgba(40,70,186,.94) 60%, rgba(84,61,207,.90));
  box-shadow:
    0 10px 22px rgba(30,58,149,.15),
    inset 0 1px 0 rgba(255,255,255,.22);
}
#page-live-racing .quality-summary-pills > span::before{
  content:"";
  position:absolute;
  z-index:-1;
  inset:0;
  background:linear-gradient(112deg, rgba(255,255,255,.16), transparent 35%);
}
#page-live-racing .quality-summary-pills > span:nth-child(2){
  background:
    radial-gradient(circle at 82% 5%, rgba(96,165,250,.24), transparent 38%),
    linear-gradient(145deg, rgba(17,24,64,.98), rgba(58,66,190,.94) 58%, rgba(111,66,212,.90));
}
#page-live-racing .quality-summary-pills > span:nth-child(3){
  background:
    radial-gradient(circle at 82% 5%, rgba(196,181,253,.25), transparent 38%),
    linear-gradient(145deg, rgba(30,24,72,.98), rgba(89,61,184,.94) 58%, rgba(48,126,202,.88));
}
#page-live-racing .quality-summary-pills b{
  color:#fff;
  font-size:12px;
  line-height:1.05;
  letter-spacing:.01em;
  text-shadow:0 1px 6px rgba(0,0,0,.22);
}
#page-live-racing .quality-summary-pills em{
  color:rgba(224,238,255,.90);
  font-size:9px;
  line-height:1.05;
  font-weight:900;
}

/* Replace the remaining coral-looking feature well with a true embedded intelligence panel. */
#page-live-racing .racing-results-course-features{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  display:grid;
  align-content:center;
  gap:3px;
  min-height:52px;
  padding:8px 14px 8px 17px;
  border:1px solid rgba(86,141,235,.32);
  border-radius:15px;
  background:
    radial-gradient(circle at 95% 0%, rgba(34,211,238,.18), transparent 37%),
    radial-gradient(circle at 5% 100%, rgba(139,92,246,.16), transparent 40%),
    linear-gradient(145deg, rgba(7,20,48,.97), rgba(29,54,145,.94) 58%, rgba(69,55,172,.91));
  box-shadow:
    0 13px 28px rgba(26,48,126,.18),
    inset 0 1px 0 rgba(255,255,255,.24),
    inset 0 0 0 1px rgba(255,255,255,.05);
  -webkit-backdrop-filter:blur(16px) saturate(145%);
  backdrop-filter:blur(16px) saturate(145%);
}
#page-live-racing .racing-results-course-features::before{
  content:"";
  position:absolute;
  z-index:-1;
  inset:0 auto 0 0;
  width:5px;
  border-radius:15px 0 0 15px;
  background:linear-gradient(180deg, #31d9ec, #4f8df7 48%, #9b62ef);
  box-shadow:0 0 22px rgba(68,160,255,.48);
}
#page-live-racing .racing-results-course-features::after{
  content:"";
  position:absolute;
  pointer-events:none;
  left:9%;
  right:8%;
  top:0;
  height:1px;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.78), rgba(103,232,249,.42), transparent);
}
#page-live-racing .racing-results-course-features em{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:max-content;
  min-height:17px;
  padding:3px 8px;
  border:1px solid rgba(103,232,249,.30);
  border-radius:999px;
  background:rgba(10,31,74,.68);
  color:#baf7ff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.14), 0 6px 14px rgba(0,0,0,.14);
  font-size:8.5px;
  line-height:1;
  font-weight:950;
  letter-spacing:.16em;
  text-shadow:0 1px 7px rgba(0,0,0,.30);
}
#page-live-racing .racing-results-course-features strong{
  color:#fff;
  font-size:12px;
  line-height:1.12;
  font-weight:950;
  letter-spacing:-.012em;
  text-shadow:0 1px 8px rgba(0,0,0,.23);
}
#page-live-racing .racing-results-course-features small{
  color:rgba(221,236,255,.91);
  font-size:10px;
  line-height:1.14;
  font-weight:760;
  text-shadow:0 1px 7px rgba(0,0,0,.18);
}
#page-live-racing .racing-results-course-features.is-empty{
  opacity:.92;
}

/* Race-day telemetry: Weather and Going become a coordinated premium pair. */
#page-live-racing .live-course-weather-brief,
#page-live-racing .racing-results-course-going{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  min-height:52px;
  border-radius:14px;
  -webkit-backdrop-filter:blur(15px) saturate(145%);
  backdrop-filter:blur(15px) saturate(145%);
}
#page-live-racing .live-course-weather-brief{
  display:grid!important;
  align-content:center;
  justify-items:end;
  gap:2px!important;
  min-width:112px!important;
  padding:15px 11px 7px!important;
  border:1px solid rgba(70,151,235,.30)!important;
  background:
    radial-gradient(circle at 88% 5%, rgba(34,211,238,.22), transparent 42%),
    linear-gradient(145deg, rgba(7,23,53,.97), rgba(26,72,147,.93) 62%, rgba(26,126,164,.88))!important;
  box-shadow:0 12px 26px rgba(23,75,143,.16), inset 0 1px 0 rgba(255,255,255,.22)!important;
  text-align:right!important;
}
#page-live-racing .live-course-weather-brief::before{
  content:"WEATHER";
  position:absolute;
  top:5px;
  right:10px;
  color:rgba(186,245,255,.88);
  font-size:7px;
  line-height:1;
  font-weight:950;
  letter-spacing:.15em;
}
#page-live-racing .live-course-weather-brief b{
  color:#fff!important;
  font-size:14px!important;
  line-height:1!important;
  text-shadow:0 1px 7px rgba(0,0,0,.24);
}
#page-live-racing .live-course-weather-brief small{
  color:#baf3ff!important;
  max-width:100px;
  font-size:9px!important;
  line-height:1.08!important;
  text-shadow:0 1px 6px rgba(0,0,0,.20);
}
#page-live-racing .racing-results-course-going{
  display:grid!important;
  align-content:center;
  justify-items:end;
  gap:3px;
  min-width:122px;
  padding:16px 11px 8px;
  border:1px solid rgba(105,118,221,.24);
  background:
    radial-gradient(circle at 92% 0%, rgba(139,92,246,.11), transparent 42%),
    linear-gradient(145deg, rgba(255,255,255,.90), rgba(233,240,255,.76));
  color:#2b466d!important;
  box-shadow:0 11px 24px rgba(35,51,100,.08), inset 0 1px 0 rgba(255,255,255,.82);
  font-size:10px;
  line-height:1.18;
  font-weight:900;
  text-align:right;
}
#page-live-racing .racing-results-course-going::before{
  content:"GOING";
  position:absolute;
  top:5px;
  right:10px;
  color:#6575a6;
  font-size:7px;
  line-height:1;
  font-weight:950;
  letter-spacing:.15em;
}
#page-live-racing .live-course-weather-brief.is-unavailable{
  background:linear-gradient(145deg, rgba(43,55,89,.94), rgba(73,84,128,.86))!important;
}
#page-live-racing .live-course-weather-brief.is-unavailable b,
#page-live-racing .live-course-weather-brief.is-unavailable small{
  color:rgba(235,243,255,.85)!important;
}

/* Keep the telemetry and premium panels compact on reduced desktop widths. */
@media (max-width:1350px){
  #page-live-racing .racing-results-course-features{
    padding-right:11px;
  }
  #page-live-racing .live-course-weather-brief{
    min-width:104px!important;
  }
  #page-live-racing .racing-results-course-going{
    min-width:110px;
  }
}
@media (max-width:1180px){
  #page-live-racing{padding-top:3px}
  #page-live-racing .live-racing-topbar{padding-top:7px}
  #page-live-racing .live-racing-topbar .top-icons{
    padding:4px;
  }
  #page-live-racing .racing-results-course-features{
    min-height:49px;
    padding:8px 11px 8px 15px;
  }
}

/* === LIVE_RACING_002AZ — final dark Features intelligence panel and Going contrast refinement.
   Scope: CSS-only landing-page refinement over 002AY. === */

/* Force the meeting Features area to become the dark embedded intelligence panel.
   !important is intentional here because earlier Live Racing generations contain
   competing pale/coral background declarations. */
#page-live-racing .live-racing-list .racing-results-course-card.live-course-card-modern .racing-results-course-features,
#page-live-racing .racing-results-course-head.live-course-header-modern .racing-results-course-features{
  position:relative!important;
  isolation:isolate!important;
  overflow:hidden!important;
  display:grid!important;
  align-content:center!important;
  gap:4px!important;
  min-height:56px!important;
  padding:9px 15px 9px 19px!important;
  opacity:1!important;
  color:#fff!important;
  border:1px solid rgba(83,170,244,.44)!important;
  border-radius:16px!important;
  background:
    radial-gradient(circle at 92% 4%, rgba(34,211,238,.22), transparent 39%),
    radial-gradient(circle at 4% 98%, rgba(147,93,255,.20), transparent 42%),
    linear-gradient(143deg, rgba(5,18,44,.985), rgba(24,53,132,.965) 54%, rgba(62,49,154,.945))!important;
  box-shadow:
    0 14px 30px rgba(20,45,118,.22),
    inset 0 1px 0 rgba(255,255,255,.27),
    inset 0 0 0 1px rgba(255,255,255,.055)!important;
  -webkit-backdrop-filter:blur(17px) saturate(150%)!important;
  backdrop-filter:blur(17px) saturate(150%)!important;
}
#page-live-racing .live-racing-list .racing-results-course-card.live-course-card-modern .racing-results-course-features::before,
#page-live-racing .racing-results-course-head.live-course-header-modern .racing-results-course-features::before{
  content:""!important;
  position:absolute!important;
  z-index:-1!important;
  inset:0 auto 0 0!important;
  width:6px!important;
  border-radius:16px 0 0 16px!important;
  background:linear-gradient(180deg,#5df2ff 0%,#4f8df7 48%,#a56cf2 100%)!important;
  box-shadow:0 0 25px rgba(82,182,255,.62)!important;
}
#page-live-racing .live-racing-list .racing-results-course-card.live-course-card-modern .racing-results-course-features::after,
#page-live-racing .racing-results-course-head.live-course-header-modern .racing-results-course-features::after{
  content:""!important;
  position:absolute!important;
  pointer-events:none!important;
  left:8%!important;
  right:7%!important;
  top:0!important;
  height:1px!important;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.88),rgba(99,225,250,.48),transparent)!important;
}

/* High-contrast capsule label. */
#page-live-racing .live-racing-list .racing-results-course-card.live-course-card-modern .racing-results-course-features > em,
#page-live-racing .racing-results-course-head.live-course-header-modern .racing-results-course-features > em{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:max-content!important;
  min-height:18px!important;
  margin:0!important;
  padding:3px 9px!important;
  border:1px solid rgba(116,236,255,.42)!important;
  border-radius:999px!important;
  background:linear-gradient(135deg,rgba(13,55,104,.92),rgba(37,84,182,.86))!important;
  color:#fff!important;
  font-size:8.5px!important;
  line-height:1!important;
  font-style:normal!important;
  font-weight:950!important;
  letter-spacing:.16em!important;
  text-transform:uppercase!important;
  text-shadow:0 1px 8px rgba(0,0,0,.42)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22),0 7px 15px rgba(0,0,0,.17)!important;
}

/* Clearer two-line information hierarchy. */
#page-live-racing .live-racing-list .racing-results-course-card.live-course-card-modern .racing-results-course-features > strong,
#page-live-racing .racing-results-course-head.live-course-header-modern .racing-results-course-features > strong{
  display:block!important;
  margin:0!important;
  color:#fff!important;
  font-size:12.5px!important;
  line-height:1.14!important;
  font-weight:950!important;
  letter-spacing:-.012em!important;
  text-shadow:0 1px 9px rgba(0,0,0,.34)!important;
}
#page-live-racing .live-racing-list .racing-results-course-card.live-course-card-modern .racing-results-course-features > small,
#page-live-racing .racing-results-course-head.live-course-header-modern .racing-results-course-features > small{
  display:block!important;
  margin:0!important;
  color:rgba(226,239,255,.94)!important;
  font-size:10.25px!important;
  line-height:1.18!important;
  font-weight:760!important;
  text-shadow:0 1px 7px rgba(0,0,0,.26)!important;
}
#page-live-racing .racing-results-course-features.is-empty{
  opacity:1!important;
}

/* Small final lift for the Going telemetry capsule so it balances the dark Weather tile. */
#page-live-racing .racing-results-course-going{
  border-color:rgba(103,116,224,.34)!important;
  background:
    radial-gradient(circle at 92% 0%,rgba(139,92,246,.15),transparent 44%),
    linear-gradient(145deg,rgba(255,255,255,.96),rgba(224,234,255,.84))!important;
  color:#203c68!important;
  box-shadow:0 12px 25px rgba(47,58,126,.11),inset 0 1px 0 rgba(255,255,255,.94)!important;
}
#page-live-racing .racing-results-course-going::before{
  color:#52649b!important;
}

@media (max-width:1350px){
  #page-live-racing .live-racing-list .racing-results-course-card.live-course-card-modern .racing-results-course-features,
  #page-live-racing .racing-results-course-head.live-course-header-modern .racing-results-course-features{
    min-height:53px!important;
    padding:8px 12px 8px 17px!important;
  }
}

/* === LIVE_RACING_002BA — opened racecard premium workspace, aligned header facts,
   premium Card and Overlays surfaces. Visual-only CSS; no behaviour/data changes. === */

/* ---------------------------------------------------------------------
   OPENED RACECARD SHELL AND MEETING NAVIGATION
   --------------------------------------------------------------------- */
#page-live-racing .live-racecard-panel{
  position:relative!important;
  overflow:visible!important;
  border:1px solid rgba(75,108,226,.30)!important;
  border-radius:28px!important;
  background:
    radial-gradient(circle at 96% 0%,rgba(124,58,237,.095),transparent 31%),
    radial-gradient(circle at 3% 8%,rgba(34,211,238,.08),transparent 28%),
    linear-gradient(180deg,rgba(255,255,255,.86),rgba(244,248,255,.72))!important;
  box-shadow:
    0 30px 82px rgba(20,34,75,.17),
    inset 0 1px 0 rgba(255,255,255,.82),
    inset 0 0 0 1px rgba(255,255,255,.25)!important;
  -webkit-backdrop-filter:blur(18px) saturate(140%);
  backdrop-filter:blur(18px) saturate(140%);
}
#page-live-racing .live-racecard-panel::before{
  border-radius:27px!important;
  background:
    linear-gradient(112deg,rgba(255,255,255,.22),transparent 28%),
    linear-gradient(180deg,rgba(255,255,255,.12),transparent 34%)!important;
}
#page-live-racing .live-racecard-nav{
  border-radius:27px 27px 0 0!important;
  border-bottom:1px solid rgba(255,255,255,.12)!important;
  background:
    radial-gradient(circle at 84% -12%,rgba(40,220,224,.29),transparent 34%),
    radial-gradient(circle at 46% 120%,rgba(124,58,237,.25),transparent 43%),
    linear-gradient(132deg,rgba(5,16,38,.99),rgba(25,48,137,.97) 54%,rgba(52,77,167,.94) 76%,rgba(43,151,191,.87))!important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 16px 38px rgba(15,27,68,.19)!important;
}
#page-live-racing .live-back-button{
  border-color:rgba(255,255,255,.34)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.94),rgba(235,243,255,.86))!important;
  color:#10213d!important;
  box-shadow:0 8px 20px rgba(4,15,38,.18),inset 0 1px 0 rgba(255,255,255,.82)!important;
}
#page-live-racing .live-meeting-strip strong{
  color:#f4f8ff!important;
  text-shadow:0 1px 9px rgba(0,0,0,.28)!important;
}
#page-live-racing .live-time-chip{
  color:#f5f8ff!important;
  background:rgba(255,255,255,.095)!important;
  border-color:rgba(255,255,255,.27)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 5px 13px rgba(4,14,42,.14)!important;
}
#page-live-racing .live-time-chip:hover{
  background:rgba(255,255,255,.17)!important;
  border-color:rgba(124,222,255,.58)!important;
}
#page-live-racing .live-time-chip.active{
  color:#fff!important;
  border-color:rgba(151,205,255,.68)!important;
  background:
    radial-gradient(circle at 78% 5%,rgba(72,226,236,.38),transparent 40%),
    linear-gradient(135deg,#6960f2,#3d82ed 63%,#28b9ca)!important;
  box-shadow:0 10px 24px rgba(53,91,230,.36),inset 0 1px 0 rgba(255,255,255,.30)!important;
}

/* ---------------------------------------------------------------------
   RACECARD HEADER — ALIGNED 2x2 FACT GRID AND SAFE WEATHER WIDTH
   --------------------------------------------------------------------- */
#page-live-racing .live-racecard-header{
  grid-template-columns:minmax(0,1fr) minmax(440px,500px)!important;
  column-gap:32px!important;
  align-items:center!important;
  padding:22px 52px 22px 24px!important;
  background:
    radial-gradient(circle at 97% 0%,rgba(124,58,237,.085),transparent 30%),
    radial-gradient(circle at 3% 2%,rgba(34,211,238,.07),transparent 32%),
    linear-gradient(180deg,rgba(255,255,255,.78),rgba(247,250,255,.55))!important;
  border-bottom:1px solid rgba(89,115,218,.16)!important;
}
#page-live-racing .live-racecard-title-block{
  align-self:center!important;
  padding-left:2px!important;
}
#page-live-racing .live-race-date{
  border:1px solid rgba(91,222,220,.35)!important;
  background:linear-gradient(135deg,#0f4e58,#177f99 58%,#4e6cd4)!important;
  box-shadow:0 8px 19px rgba(15,78,88,.17),inset 0 1px 0 rgba(255,255,255,.22)!important;
}
#page-live-racing .live-racecard-header h2{
  color:#10213d!important;
  text-shadow:0 1px 0 rgba(255,255,255,.70)!important;
}
#page-live-racing .live-race-info-strip span{
  border-color:rgba(74,108,248,.18)!important;
  background:linear-gradient(180deg,rgba(241,246,255,.94),rgba(232,238,255,.78))!important;
  color:#3047a3!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.65)!important;
}
#page-live-racing .live-racecard-key-facts{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-auto-rows:minmax(56px,auto)!important;
  gap:10px 12px!important;
  width:100%!important;
  max-width:500px!important;
  justify-self:end!important;
  align-self:center!important;
  margin:0 8px 0 0!important;
  padding:0!important;
}
#page-live-racing .live-racecard-key-facts > span,
#page-live-racing .live-racecard-key-facts > .live-weather-fact,
#page-live-racing .live-racecard-key-facts .live-weather-fact{
  position:relative!important;
  display:grid!important;
  grid-template-columns:72px minmax(0,1fr)!important;
  align-items:center!important;
  min-width:0!important;
  min-height:56px!important;
  padding:10px 12px!important;
  gap:8px!important;
  border:1px solid rgba(86,112,220,.18)!important;
  border-radius:14px!important;
  background:linear-gradient(180deg,rgba(255,255,255,.90),rgba(240,246,255,.72))!important;
  box-shadow:0 10px 24px rgba(25,44,91,.07),inset 0 1px 0 rgba(255,255,255,.75)!important;
  color:#203653!important;
  overflow:visible!important;
}
#page-live-racing .live-racecard-key-facts > span::before,
#page-live-racing .live-racecard-key-facts > .live-weather-fact::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:3px;
  border-radius:14px 0 0 14px;
  background:linear-gradient(180deg,#5be7ee,#5f7cf3 56%,#9c6fee);
  opacity:.68;
}
#page-live-racing .live-racecard-key-facts > span > b,
#page-live-racing .live-racecard-key-facts > .live-weather-fact > b,
#page-live-racing .live-racecard-key-facts .live-weather-fact > b{
  width:auto!important;
  margin:0!important;
  align-self:center!important;
  color:#5b6d8a!important;
  font-size:9.5px!important;
  line-height:1.15!important;
  letter-spacing:.12em!important;
  text-transform:uppercase!important;
  white-space:nowrap!important;
}
#page-live-racing .live-racecard-key-facts .live-going-value,
#page-live-racing .live-racecard-key-facts .live-going-main,
#page-live-racing .live-racecard-key-facts > span > :not(b){
  min-width:0!important;
  color:#132746!important;
  font-weight:900!important;
  line-height:1.18!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
#page-live-racing .live-racecard-key-facts .live-going-fact{
  border-color:rgba(107,92,246,.22)!important;
  background:
    radial-gradient(circle at 92% 0%,rgba(125,92,246,.10),transparent 42%),
    linear-gradient(180deg,rgba(255,255,255,.94),rgba(242,243,255,.76))!important;
}
#page-live-racing .live-racecard-key-facts > .live-weather-fact,
#page-live-racing .live-racecard-key-facts > span:nth-child(2){
  border-color:rgba(66,170,240,.45)!important;
  background:
    radial-gradient(circle at 90% 0%,rgba(34,211,238,.24),transparent 42%),
    linear-gradient(143deg,rgba(5,18,44,.98),rgba(23,57,139,.96) 58%,rgba(36,109,172,.93))!important;
  box-shadow:0 13px 29px rgba(20,57,129,.22),inset 0 1px 0 rgba(255,255,255,.24)!important;
}
#page-live-racing .live-racecard-key-facts > .live-weather-fact::before,
#page-live-racing .live-racecard-key-facts > span:nth-child(2)::before{
  background:linear-gradient(180deg,#65f1f5,#4f8df7 58%,#8e6ff0)!important;
  opacity:1!important;
  box-shadow:0 0 15px rgba(82,182,255,.46)!important;
}
#page-live-racing .live-racecard-key-facts > .live-weather-fact > b,
#page-live-racing .live-racecard-key-facts > span:nth-child(2) > b{
  color:rgba(211,232,255,.86)!important;
}
#page-live-racing .live-racecard-key-facts .live-weather-main{
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr)!important;
  align-items:center!important;
  gap:7px!important;
  min-width:0!important;
  color:#fff!important;
}
#page-live-racing .live-racecard-key-facts .live-weather-main strong{
  color:#fff!important;
  font-size:13px!important;
  line-height:1!important;
  font-weight:950!important;
  white-space:nowrap!important;
}
#page-live-racing .live-racecard-key-facts .live-weather-main em{
  min-width:0!important;
  color:rgba(224,240,255,.96)!important;
  font-size:10.5px!important;
  line-height:1.16!important;
  font-style:normal!important;
  font-weight:850!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
#page-live-racing .live-racecard-key-facts > span:nth-child(3),
#page-live-racing .live-racecard-key-facts > span:nth-child(4){
  background:
    radial-gradient(circle at 94% 0%,rgba(93,114,245,.08),transparent 44%),
    linear-gradient(180deg,rgba(255,255,255,.91),rgba(240,246,255,.72))!important;
}

/* ---------------------------------------------------------------------
   MODE TABS AND RACE TOOLS — PREMIUM CONTROL DECK
   --------------------------------------------------------------------- */
#page-live-racing .live-racecard-mode-tabs{
  gap:8px!important;
  padding:12px 24px 10px!important;
  background:linear-gradient(180deg,rgba(255,255,255,.35),rgba(245,248,255,.20))!important;
}
#page-live-racing .live-racecard-mode-tabs button[data-live-racecard-tab]{
  min-height:40px!important;
  border-radius:12px!important;
  border-color:rgba(77,109,226,.24)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.92),rgba(236,243,255,.78))!important;
  color:#3457bd!important;
  box-shadow:0 8px 19px rgba(24,43,91,.06),inset 0 1px 0 rgba(255,255,255,.78)!important;
}
#page-live-racing .live-racecard-mode-tabs button[data-live-racecard-tab].active{
  border-color:rgba(92,166,244,.48)!important;
  background:
    radial-gradient(circle at 84% 0%,rgba(34,211,238,.25),transparent 42%),
    linear-gradient(135deg,rgba(7,20,47,.99),rgba(35,64,181,.96) 60%,rgba(68,73,199,.94) 82%,rgba(39,158,187,.88))!important;
  color:#fff!important;
  box-shadow:0 15px 31px rgba(29,65,171,.24),inset 0 1px 0 rgba(255,255,255,.23)!important;
}
#page-live-racing .live-racecard-mode-tabs button:disabled{
  color:#9aa9bd!important;
  background:linear-gradient(180deg,rgba(248,250,253,.84),rgba(239,243,249,.68))!important;
  border-color:rgba(198,209,224,.68)!important;
}
#page-live-racing .live-race-tools-card-002aj.live-race-tools-card-002ar{
  position:relative!important;
  overflow:hidden!important;
  border:1px solid rgba(82,110,218,.20)!important;
  border-radius:16px!important;
  background:
    radial-gradient(circle at 96% 0%,rgba(124,58,237,.07),transparent 32%),
    linear-gradient(180deg,rgba(255,255,255,.88),rgba(239,245,255,.71))!important;
  box-shadow:0 13px 30px rgba(25,43,86,.08),inset 0 1px 0 rgba(255,255,255,.76)!important;
}
#page-live-racing .live-race-tools-card-002aj.live-race-tools-card-002ar::before{
  content:"";
  position:absolute;
  inset:0 0 auto;
  height:1px;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.94),rgba(82,211,235,.38),transparent);
}
#page-live-racing .live-race-tools-head-002ar strong{
  color:#0f6670!important;
  text-shadow:0 1px 0 rgba(255,255,255,.65)!important;
}
#page-live-racing .live-race-tools-status-002ar > span,
#page-live-racing .live-race-tools-status-002ar > button{
  border-color:rgba(84,110,218,.16)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.91),rgba(238,244,255,.75))!important;
  color:#385171!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72)!important;
}
#page-live-racing .live-race-tools-status-002ar > .live-overlay-state-settings-button{
  border-color:rgba(84,89,218,.36)!important;
  background:linear-gradient(135deg,#111d42,#354fb4 64%,#6755c7)!important;
  color:#fff!important;
  box-shadow:0 8px 18px rgba(47,63,159,.20),inset 0 1px 0 rgba(255,255,255,.17)!important;
}
#page-live-racing .live-race-tools-actions-002aj button{
  border-color:rgba(80,107,219,.18)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.92),rgba(239,245,255,.74))!important;
  color:#29446d!important;
  box-shadow:0 6px 15px rgba(22,39,81,.05),inset 0 1px 0 rgba(255,255,255,.72)!important;
}
#page-live-racing .live-race-tools-actions-002aj button:hover:not(:disabled){
  border-color:rgba(67,115,230,.40)!important;
  background:linear-gradient(180deg,#fff,rgba(229,239,255,.90))!important;
  box-shadow:0 10px 22px rgba(30,67,151,.12),inset 0 1px 0 rgba(255,255,255,.82)!important;
  transform:translateY(-1px)!important;
}

/* ---------------------------------------------------------------------
   NORMAL CARD — DENSE PREMIUM TABLE, NOT A COLLECTION OF FLOATING CARDS
   --------------------------------------------------------------------- */
#page-live-racing .live-runners-table{
  margin:0 24px 24px!important;
  padding:0!important;
  border:1px solid rgba(76,107,218,.20)!important;
  border-radius:17px!important;
  background:linear-gradient(180deg,rgba(255,255,255,.66),rgba(241,246,255,.52))!important;
  box-shadow:0 17px 40px rgba(23,40,81,.09),inset 0 1px 0 rgba(255,255,255,.72)!important;
  overflow:hidden!important;
}
#page-live-racing .live-runner-table-head.live-runner-table-head-001l{
  border:0!important;
  border-bottom:1px solid rgba(255,255,255,.12)!important;
  border-radius:16px 16px 0 0!important;
  background:
    radial-gradient(circle at 82% 0%,rgba(34,211,238,.21),transparent 39%),
    linear-gradient(132deg,rgba(7,20,47,.98),rgba(34,59,151,.95) 62%,rgba(71,70,181,.93))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.17),0 12px 24px rgba(23,42,104,.12)!important;
  color:#edf5ff!important;
}
#page-live-racing .live-runner-table-head-001l button,
#page-live-racing .live-runner-table-head-001l span,
#page-live-racing .live-runner-table-head-001l .live-runner-head-static{
  color:#e9f2ff!important;
  text-shadow:0 1px 7px rgba(0,0,0,.22)!important;
}
#page-live-racing .live-runner-table-head-001l button:hover{
  color:#fff!important;
}
#page-live-racing .live-runner-row{
  border:0!important;
  border-bottom:1px solid rgba(87,112,200,.15)!important;
  border-radius:0!important;
  background:linear-gradient(180deg,rgba(255,255,255,.88),rgba(245,249,255,.72))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.54)!important;
}
#page-live-racing .live-runner-row:nth-of-type(even){
  background:linear-gradient(180deg,rgba(248,252,255,.91),rgba(238,245,255,.70))!important;
}
#page-live-racing .live-runner-row:hover{
  background:
    radial-gradient(circle at 2% 50%,rgba(34,211,238,.10),transparent 19%),
    linear-gradient(180deg,rgba(255,255,255,.97),rgba(230,241,255,.82))!important;
  box-shadow:inset 4px 0 0 rgba(57,125,235,.60),inset 0 1px 0 rgba(255,255,255,.72)!important;
}
#page-live-racing .live-runner-row:last-child{
  border-bottom:0!important;
  border-radius:0 0 16px 16px!important;
}
#page-live-racing .live-runner-profile-actions.live-runner-evidence-grid{
  border-left:1px solid rgba(82,108,205,.13)!important;
  border-right:1px solid rgba(82,108,205,.13)!important;
}
#page-live-racing .live-runner-profile-actions.live-runner-evidence-grid button{
  border:1px solid rgba(83,110,216,.18)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.94),rgba(237,244,255,.78))!important;
  box-shadow:0 5px 13px rgba(24,41,84,.04),inset 0 1px 0 rgba(255,255,255,.78)!important;
  transition:transform .14s ease,border-color .14s ease,box-shadow .14s ease!important;
}
#page-live-racing .live-runner-profile-actions.live-runner-evidence-grid button:hover:not(:disabled){
  transform:translateY(-1px)!important;
  border-color:rgba(58,111,230,.42)!important;
  box-shadow:0 9px 18px rgba(31,69,150,.11),inset 0 1px 0 rgba(255,255,255,.84)!important;
}
#page-live-racing .live-runner-profile-actions .live-evidence-horse{
  color:#1455c0!important;
  background:linear-gradient(180deg,rgba(241,248,255,.98),rgba(225,238,255,.78))!important;
}
#page-live-racing .live-runner-profile-actions .live-evidence-trainer{
  color:#0f766e!important;
  background:linear-gradient(180deg,rgba(239,253,249,.98),rgba(222,247,239,.78))!important;
}
#page-live-racing .live-runner-profile-actions .live-evidence-sire{
  color:#6540c6!important;
  background:linear-gradient(180deg,rgba(249,245,255,.98),rgba(239,230,255,.80))!important;
}
#page-live-racing .live-runner-profile-actions .live-evidence-dam-sire{
  color:#394bc7!important;
  background:linear-gradient(180deg,rgba(244,245,255,.98),rgba(230,233,255,.80))!important;
}
#page-live-racing .live-runner-profile-actions .live-evidence-jockey{
  color:#1765b8!important;
  background:linear-gradient(180deg,rgba(240,249,255,.98),rgba(224,241,255,.80))!important;
}
#page-live-racing .live-runner-profile-actions .live-evidence-draw-placeholder:disabled{
  color:#a4afbe!important;
  border-color:rgba(184,196,212,.55)!important;
  background:linear-gradient(180deg,rgba(249,250,252,.85),rgba(239,242,247,.70))!important;
  opacity:.72!important;
}
#page-live-racing .live-runner-age-weight,
#page-live-racing .live-runner-connections{
  padding:7px 9px!important;
  border:1px solid rgba(89,113,207,.11)!important;
  border-radius:11px!important;
  background:linear-gradient(180deg,rgba(255,255,255,.68),rgba(239,245,255,.48))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.68)!important;
}
#page-live-racing .live-runner-ratings-stack span{
  border-color:rgba(71,107,218,.18)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.94),rgba(237,243,255,.76))!important;
  color:#28456d!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.76)!important;
}
#page-live-racing .live-odds-placeholder,
#page-live-racing .live-overlay-odds-chip{
  box-shadow:0 8px 16px rgba(186,33,42,.15),inset 0 1px 0 rgba(255,255,255,.18)!important;
}

/* ---------------------------------------------------------------------
   OVERLAYS — PREMIUM ANALYTICAL DECK WITH FAMILY IDENTITY PRESERVED
   --------------------------------------------------------------------- */
#page-live-racing .live-racecard-overlays-002ap{
  padding-bottom:24px!important;
}
#page-live-racing .live-overlay-explainer{
  margin:0 24px 10px!important;
  border:1px solid rgba(73,111,221,.20)!important;
  border-radius:13px!important;
  background:linear-gradient(180deg,rgba(249,252,255,.92),rgba(235,243,255,.73))!important;
  box-shadow:0 8px 20px rgba(24,43,90,.06),inset 0 1px 0 rgba(255,255,255,.74)!important;
  color:#3b5577!important;
}
#page-live-racing .live-overlay-layout-head-002ap{
  border:0!important;
  border-radius:14px!important;
  background:
    radial-gradient(circle at 82% 0%,rgba(34,211,238,.20),transparent 39%),
    linear-gradient(132deg,rgba(7,20,47,.98),rgba(34,59,151,.95) 62%,rgba(71,70,181,.93))!important;
  box-shadow:0 12px 27px rgba(22,43,105,.13),inset 0 1px 0 rgba(255,255,255,.17)!important;
}
#page-live-racing .live-overlay-layout-head-002ap span{
  color:#eaf3ff!important;
  text-shadow:0 1px 7px rgba(0,0,0,.22)!important;
}
#page-live-racing .live-overlay-runner-shell-002ap{
  border:1px solid rgba(75,108,220,.22)!important;
  border-radius:22px!important;
  background:
    radial-gradient(circle at 97% 0%,rgba(124,58,237,.055),transparent 30%),
    linear-gradient(180deg,rgba(255,255,255,.90),rgba(241,247,255,.70))!important;
  box-shadow:0 19px 46px rgba(24,42,86,.10),inset 0 1px 0 rgba(255,255,255,.78)!important;
}
#page-live-racing .live-overlay-runner-identity-rail-002ap{
  border:1px solid rgba(84,110,211,.12)!important;
  border-radius:16px!important;
  background:
    radial-gradient(circle at 8% 3%,rgba(34,211,238,.08),transparent 38%),
    linear-gradient(180deg,rgba(255,255,255,.76),rgba(237,245,255,.54))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72)!important;
}
#page-live-racing .live-overlay-row-collapse-002ap{
  border-color:rgba(70,104,216,.18)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.94),rgba(232,241,255,.76))!important;
  color:#3458a8!important;
  box-shadow:0 6px 14px rgba(24,43,90,.05),inset 0 1px 0 rgba(255,255,255,.75)!important;
}
#page-live-racing .live-overlay-family-card{
  overflow:hidden!important;
  border:1px solid rgba(79,108,214,.18)!important;
  border-radius:16px!important;
  box-shadow:0 9px 22px rgba(22,40,83,.065),inset 0 1px 0 rgba(255,255,255,.74)!important;
}
#page-live-racing .live-overlay-family-card header{
  min-height:34px!important;
  padding:7px 8px 7px 10px!important;
  border-bottom:1px solid rgba(78,105,205,.12)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72)!important;
}
#page-live-racing .live-overlay-family-card.horse header{
  background:linear-gradient(90deg,rgba(214,234,255,.94),rgba(239,246,255,.72))!important;
}
#page-live-racing .live-overlay-family-card.trainer header{
  background:linear-gradient(90deg,rgba(255,232,199,.90),rgba(255,246,231,.72))!important;
}
#page-live-racing .live-overlay-family-card.jockey header{
  background:linear-gradient(90deg,rgba(232,218,255,.90),rgba(247,241,255,.72))!important;
}
#page-live-racing .live-overlay-family-card.sire header{
  background:linear-gradient(90deg,rgba(205,246,228,.92),rgba(237,253,246,.72))!important;
}
#page-live-racing .live-overlay-family-card.dam-sire header{
  background:linear-gradient(90deg,rgba(218,222,255,.92),rgba(241,243,255,.72))!important;
}
#page-live-racing .live-overlay-family-card header strong{
  color:#132747!important;
}
#page-live-racing .live-overlay-family-card header strong em{
  color:#526887!important;
}
#page-live-racing .live-overlay-family-open{
  border-color:rgba(77,107,218,.18)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(237,243,255,.79))!important;
  box-shadow:0 5px 13px rgba(24,42,85,.05),inset 0 1px 0 rgba(255,255,255,.78)!important;
}
#page-live-racing .live-overlay-bucket-grid{
  background:linear-gradient(180deg,rgba(255,255,255,.67),rgba(244,248,255,.54))!important;
}
#page-live-racing .live-overlay-bucket{
  border-color:rgba(91,113,196,.13)!important;
  background:rgba(255,255,255,.28)!important;
}
#page-live-racing .live-overlay-bucket:hover{
  background:rgba(232,242,255,.54)!important;
}
#page-live-racing .live-overlay-runner-facts-rail-002ap .live-overlay-runner-age-weight-002ah,
#page-live-racing .live-overlay-runner-facts-rail-002ap .live-overlay-runner-connections-002ah{
  border:1px solid rgba(83,109,211,.12)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.78),rgba(236,243,255,.58))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72)!important;
}
#page-live-racing .live-overlay-runner-ratings-002ah > span{
  border-color:rgba(72,106,218,.18)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.94),rgba(237,243,255,.76))!important;
  color:#28456d!important;
}

/* ---------------------------------------------------------------------
   EXCLUSION / NON-RUNNER STATES — PRESERVE THEIR ESTABLISHED MEANING
   --------------------------------------------------------------------- */
#page-live-racing .live-runner-row.manual-excluded{
  border-left:6px solid #f59e0b!important;
  background:
    radial-gradient(circle at 2% 50%,rgba(251,191,36,.11),transparent 23%),
    linear-gradient(90deg,rgba(255,247,237,.97),rgba(255,255,255,.84))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.70)!important;
}
#page-live-racing .live-runner-row.profile-eliminated,
#page-live-racing .live-runner-row.system-eliminated{
  border-left:6px solid #dc2626!important;
  background:
    radial-gradient(circle at 2% 50%,rgba(244,63,94,.095),transparent 23%),
    linear-gradient(90deg,rgba(255,241,242,.97),rgba(255,255,255,.84))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.70)!important;
}
#page-live-racing .live-runner-row.non-runner{
  border-left:6px solid #94a3b8!important;
  background:linear-gradient(90deg,rgba(241,245,249,.96),rgba(255,255,255,.80))!important;
}
#page-live-racing .live-overlay-runner-row.manual-excluded,
#page-live-racing .live-overlay-runner-row.profile-eliminated,
#page-live-racing .live-overlay-runner-row.system-eliminated,
#page-live-racing .live-overlay-runner-row.non-runner{
  border-radius:18px!important;
  box-shadow:0 12px 28px rgba(27,41,72,.08),inset 0 1px 0 rgba(255,255,255,.66)!important;
  overflow:hidden!important;
}
#page-live-racing .live-overlay-runner-row.manual-excluded{
  border:1px solid rgba(245,158,11,.32)!important;
  border-left:6px solid #f59e0b!important;
  background:linear-gradient(90deg,rgba(255,247,237,.98),rgba(255,255,255,.86))!important;
}
#page-live-racing .live-overlay-runner-row.profile-eliminated,
#page-live-racing .live-overlay-runner-row.system-eliminated{
  border:1px solid rgba(220,38,38,.27)!important;
  border-left:6px solid #dc2626!important;
  background:linear-gradient(90deg,rgba(255,241,242,.98),rgba(255,255,255,.86))!important;
}
#page-live-racing .live-overlay-runner-row.non-runner{
  border:1px solid rgba(148,163,184,.34)!important;
  border-left:6px solid #94a3b8!important;
  background:linear-gradient(90deg,rgba(241,245,249,.98),rgba(255,255,255,.84))!important;
}

/* ---------------------------------------------------------------------
   RESPONSIVE SAFETY
   --------------------------------------------------------------------- */
@media(max-width:1500px){
  #page-live-racing .live-racecard-header{
    grid-template-columns:minmax(0,1fr) minmax(400px,450px)!important;
    column-gap:22px!important;
    padding-right:34px!important;
  }
  #page-live-racing .live-racecard-key-facts{
    max-width:450px!important;
    margin-right:0!important;
  }
  #page-live-racing .live-racecard-key-facts > span,
  #page-live-racing .live-racecard-key-facts > .live-weather-fact,
  #page-live-racing .live-racecard-key-facts .live-weather-fact{
    grid-template-columns:65px minmax(0,1fr)!important;
    padding-left:10px!important;
    padding-right:10px!important;
  }
}
@media(max-width:1240px){
  #page-live-racing .live-racecard-header{
    grid-template-columns:1fr!important;
    align-items:start!important;
    padding:20px 24px!important;
  }
  #page-live-racing .live-racecard-key-facts{
    max-width:none!important;
    justify-self:stretch!important;
    margin:4px 0 0!important;
  }
}
@media(max-width:760px){
  #page-live-racing .live-racecard-panel{
    border-radius:20px!important;
  }
  #page-live-racing .live-racecard-nav{
    border-radius:19px 19px 0 0!important;
  }
  #page-live-racing .live-racecard-key-facts{
    grid-template-columns:1fr!important;
  }
  #page-live-racing .live-racecard-key-facts > span,
  #page-live-racing .live-racecard-key-facts > .live-weather-fact,
  #page-live-racing .live-racecard-key-facts .live-weather-fact{
    grid-template-columns:76px minmax(0,1fr)!important;
  }
  #page-live-racing .live-runners-table{
    margin-left:12px!important;
    margin-right:12px!important;
  }
}

@media(prefers-reduced-motion:reduce){
  #page-live-racing .live-race-tools-actions-002aj button,
  #page-live-racing .live-runner-profile-actions.live-runner-evidence-grid button{
    transition:none!important;
  }
}

/* === LIVE_RACING_002BB — overlay headers, spacing and compact fact tiles.
   Scope: visual/markup refinement only. No data, evidence, exclusion or route logic changes. === */

/* Robust count spacing in Race Tools. */
#page-live-racing .live-race-tools-status-002ar > .live-race-tools-count-chip{
  display:inline-flex!important;
  align-items:center!important;
  gap:5px!important;
  white-space:nowrap!important;
}
#page-live-racing .live-race-tools-status-002ar > .live-race-tools-count-chip b{
  margin:0!important;
  line-height:1!important;
}
#page-live-racing .live-race-tools-status-002ar > .live-race-tools-count-chip em{
  margin:0!important;
  color:inherit!important;
  font:inherit!important;
  font-style:normal!important;
  line-height:1!important;
}

/* Header fact values are real grid items so Added / First Place can never run into the value. */
#page-live-racing .live-racecard-key-facts .live-prize-fact{
  column-gap:10px!important;
}
#page-live-racing .live-racecard-key-facts .live-prize-fact > strong{
  display:block!important;
  min-width:0!important;
  margin:0!important;
  color:#132746!important;
  font-size:11.5px!important;
  font-weight:900!important;
  line-height:1.18!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}

/* Overlay header now uses the familiar Card terminology while respecting the two-tier facts geometry. */
#page-live-racing .live-overlay-layout-head-002bb{
  align-items:stretch!important;
  padding:0 14px!important;
  min-height:42px!important;
}
#page-live-racing .live-overlay-layout-head-002bb > *{
  min-width:0!important;
}
#page-live-racing .live-overlay-head-identity-002bb{
  display:grid!important;
  grid-template-columns:64px 54px minmax(0,1fr)!important;
  align-items:center!important;
  min-width:0!important;
}
#page-live-racing .live-overlay-head-identity-002bb > span{
  display:flex!important;
  align-items:center!important;
  height:100%!important;
  padding:0 8px!important;
  border-right:1px solid rgba(255,255,255,.11)!important;
}
#page-live-racing .live-overlay-head-identity-002bb > span:last-child{
  border-right:0!important;
}
#page-live-racing .live-overlay-head-profile-002bb{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:0!important;
  padding:0 10px!important;
  border-left:1px solid rgba(255,255,255,.10)!important;
  border-right:1px solid rgba(255,255,255,.10)!important;
}
#page-live-racing .live-overlay-head-facts-002bb{
  display:grid!important;
  grid-template-columns:minmax(165px,1fr) minmax(76px,88px) minmax(78px,92px)!important;
  align-items:stretch!important;
  min-width:0!important;
}
#page-live-racing .live-overlay-head-facts-002bb > span{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:0!important;
  padding:0 7px!important;
  border-right:1px solid rgba(255,255,255,.11)!important;
  text-align:center!important;
}
#page-live-racing .live-overlay-head-facts-002bb > span:last-child{
  border-right:0!important;
}
#page-live-racing .live-overlay-head-fact-stack-002bb{
  display:grid!important;
  grid-template-rows:1fr 1fr!important;
  align-items:stretch!important;
  padding:0!important;
}
#page-live-racing .live-overlay-head-fact-stack-002bb small{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:0!important;
  padding:2px 6px!important;
  color:inherit!important;
  font:inherit!important;
  font-size:8.5px!important;
  font-weight:950!important;
  letter-spacing:.075em!important;
  line-height:1.05!important;
  text-transform:uppercase!important;
  white-space:nowrap!important;
}
#page-live-racing .live-overlay-head-fact-stack-002bb small + small{
  border-top:1px solid rgba(255,255,255,.11)!important;
}

/* The two contextual fact tiles stay aligned to the evidence tiers but no longer stretch into bulky slabs. */
#page-live-racing .live-overlay-runner-facts-rail-002ap .live-overlay-runner-age-weight-002ah,
#page-live-racing .live-overlay-runner-facts-rail-002ap .live-overlay-runner-connections-002ah{
  align-self:center!important;
  justify-self:stretch!important;
  display:grid!important;
  align-content:center!important;
  gap:5px!important;
  height:auto!important;
  min-height:58px!important;
  padding:9px 11px 9px 13px!important;
  border-left:3px solid rgba(77,112,228,.54)!important;
  border-radius:12px!important;
  background:
    radial-gradient(circle at 100% 0%,rgba(104,91,238,.07),transparent 45%),
    linear-gradient(180deg,rgba(255,255,255,.87),rgba(235,243,255,.64))!important;
  box-shadow:0 7px 17px rgba(24,43,90,.045),inset 0 1px 0 rgba(255,255,255,.78)!important;
}
#page-live-racing .live-overlay-runner-facts-rail-002ap .live-overlay-runner-connections-002ah{
  border-left-color:rgba(33,174,175,.55)!important;
}
#page-live-racing .live-overlay-runner-facts-rail-002ap .live-overlay-runner-age-weight-002ah span,
#page-live-racing .live-overlay-runner-facts-rail-002ap .live-overlay-runner-connections-002ah span{
  display:block!important;
  min-width:0!important;
  margin:0!important;
  line-height:1.22!important;
}

/* Match the normal Card's Age/Weight and Connections material exactly. */
#page-live-racing .live-runner-age-weight,
#page-live-racing .live-runner-connections{
  display:grid!important;
  align-content:center!important;
  gap:4px!important;
  min-height:52px!important;
  padding:8px 10px!important;
  border:1px solid rgba(83,109,211,.13)!important;
  border-radius:11px!important;
  background:
    radial-gradient(circle at 100% 0%,rgba(104,91,238,.055),transparent 48%),
    linear-gradient(180deg,rgba(255,255,255,.78),rgba(237,244,255,.56))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72)!important;
}
#page-live-racing .live-runner-age-weight span,
#page-live-racing .live-runner-connections span{
  margin:0!important;
  line-height:1.22!important;
}

@media(max-width:1780px){
  #page-live-racing .live-overlay-head-identity-002bb{
    grid-template-columns:58px 48px minmax(0,1fr)!important;
  }
  #page-live-racing .live-overlay-head-facts-002bb{
    grid-template-columns:minmax(150px,1fr) 78px 78px!important;
  }
  #page-live-racing .live-overlay-head-fact-stack-002bb small{
    font-size:8px!important;
    letter-spacing:.055em!important;
  }
}

/* === LIVE_RACING_002BC — shared premium evidence-workspace system.
   Scope: Horse Profile, Trainer Stats, Jockey Stats, Sire Stats and Dam-sire Stats.
   Visual-only CSS. Horse Form is deliberately excluded for the separate follow-up patch. === */

/* ---------------------------------------------------------------------
   FAMILY TOKENS
   --------------------------------------------------------------------- */
.horse-drilldown-modal-shell.is-horse-profile{
  --evidence-accent:#0f9fa4;
  --evidence-accent-dark:#0b5f72;
  --evidence-accent-soft:rgba(34,211,238,.12);
  --evidence-accent-line:rgba(45,212,191,.30);
  --evidence-active:linear-gradient(135deg,#0c3347 0%,#117e88 52%,#3b82f6 100%);
  --evidence-header:
    radial-gradient(circle at 88% 12%,rgba(45,212,191,.26),transparent 32%),
    linear-gradient(132deg,#07172d 0%,#0d5d68 50%,#2563c8 100%);
}
.horse-drilldown-modal-shell.is-trainer-stats{
  --evidence-accent:#0f9f87;
  --evidence-accent-dark:#0d665e;
  --evidence-accent-soft:rgba(20,184,166,.12);
  --evidence-accent-line:rgba(20,184,166,.30);
  --evidence-active:linear-gradient(135deg,#0d3e42 0%,#0f8f7c 58%,#24b9ae 100%);
  --evidence-header:
    radial-gradient(circle at 87% 12%,rgba(45,212,191,.27),transparent 33%),
    linear-gradient(132deg,#071b2d 0%,#0d5b56 51%,#16a394 100%);
}
.horse-drilldown-modal-shell.is-jockey-stats{
  --evidence-accent:#635bdf;
  --evidence-accent-dark:#3730a3;
  --evidence-accent-soft:rgba(99,102,241,.12);
  --evidence-accent-line:rgba(124,92,246,.30);
  --evidence-active:linear-gradient(135deg,#172554 0%,#4f46c7 52%,#7c3aed 100%);
  --evidence-header:
    radial-gradient(circle at 88% 10%,rgba(56,189,248,.23),transparent 31%),
    linear-gradient(132deg,#0b1733 0%,#303a9f 49%,#7042d7 100%);
}
.horse-drilldown-modal-shell.is-sire-stats{
  --evidence-accent:#157b86;
  --evidence-accent-dark:#164e63;
  --evidence-accent-soft:rgba(14,165,164,.11);
  --evidence-accent-line:rgba(45,170,184,.28);
  --evidence-active:linear-gradient(135deg,#12354c 0%,#147f87 52%,#4f46d7 100%);
  --evidence-header:
    radial-gradient(circle at 86% 10%,rgba(45,212,191,.23),transparent 31%),
    linear-gradient(132deg,#071a2f 0%,#0e6670 47%,#4d42c8 100%);
}
.horse-drilldown-modal-shell.is-dam-sire-stats{
  --evidence-accent:#7357da;
  --evidence-accent-dark:#4c1d95;
  --evidence-accent-soft:rgba(124,58,237,.11);
  --evidence-accent-line:rgba(139,92,246,.31);
  --evidence-active:linear-gradient(135deg,#25154f 0%,#6335bf 52%,#9b5df2 100%);
  --evidence-header:
    radial-gradient(circle at 88% 10%,rgba(56,189,248,.20),transparent 31%),
    linear-gradient(132deg,#16112f 0%,#5427a5 50%,#8b46e8 100%);
}

/* ---------------------------------------------------------------------
   PREMIUM MODAL SHELL + FAMILY HEADER
   --------------------------------------------------------------------- */
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-drilldown-backdrop{
  background:
    radial-gradient(circle at 12% 10%,rgba(56,189,248,.16),transparent 28%),
    radial-gradient(circle at 90% 10%,rgba(124,58,237,.16),transparent 28%),
    rgba(7,14,31,.70)!important;
  -webkit-backdrop-filter:blur(12px) saturate(125%)!important;
  backdrop-filter:blur(12px) saturate(125%)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-drilldown-modal{
  background:
    radial-gradient(circle at 5% 4%,rgba(34,211,238,.075),transparent 22%),
    radial-gradient(circle at 96% 3%,rgba(124,58,237,.085),transparent 24%),
    linear-gradient(180deg,#f7faff 0%,#f1f6ff 47%,#f8fbff 100%)!important;
  border:1px solid rgba(111,137,255,.30)!important;
  box-shadow:0 38px 105px rgba(7,15,34,.38),inset 0 1px 0 rgba(255,255,255,.72)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-drilldown-content{
  background:transparent!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-drilldown-modal-header{
  align-items:center!important;
  min-height:92px!important;
  margin:-24px -24px 14px!important;
  padding:16px 18px!important;
  color:#fff!important;
  background:var(--evidence-header)!important;
  border-bottom:1px solid rgba(255,255,255,.13)!important;
  box-shadow:0 18px 42px rgba(10,24,56,.18),inset 0 1px 0 rgba(255,255,255,.23)!important;
  -webkit-backdrop-filter:blur(18px) saturate(145%)!important;
  backdrop-filter:blur(18px) saturate(145%)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-drilldown-modal-header::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:1px;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.84),rgba(92,230,246,.48),transparent);
  pointer-events:none;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-drilldown-kicker{
  color:rgba(224,247,255,.92)!important;
  font-size:10px!important;
  letter-spacing:.18em!important;
  text-shadow:0 1px 8px rgba(0,0,0,.22)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-drilldown-modal-header h2{
  color:#fff!important;
  margin:3px 0 2px!important;
  font-size:clamp(27px,2vw,42px)!important;
  line-height:1.02!important;
  text-shadow:0 2px 14px rgba(0,0,0,.24)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-drilldown-modal-header p{
  color:rgba(232,242,255,.88)!important;
  font-size:12px!important;
  text-shadow:0 1px 8px rgba(0,0,0,.18)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-drilldown-actions{
  gap:7px!important;
  padding:6px!important;
  border:1px solid rgba(255,255,255,.18)!important;
  border-radius:18px!important;
  background:rgba(255,255,255,.10)!important;
  box-shadow:0 12px 28px rgba(3,12,31,.16),inset 0 1px 0 rgba(255,255,255,.18)!important;
  -webkit-backdrop-filter:blur(14px) saturate(145%)!important;
  backdrop-filter:blur(14px) saturate(145%)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-drilldown-actions button{
  border:1px solid rgba(255,255,255,.19)!important;
  background:rgba(255,255,255,.12)!important;
  color:#fff!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.16)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-drilldown-actions button:first-child{
  background:rgba(255,255,255,.96)!important;
  color:#14213d!important;
  border-color:rgba(255,255,255,.70)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-drilldown-actions button:hover{
  transform:translateY(-1px)!important;
  background:rgba(255,255,255,.20)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-drilldown-actions button:first-child:hover{
  background:#fff!important;
}

/* Breadcrumb / history path */
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-history-strip{
  margin:0 0 14px!important;
  padding:7px 8px!important;
  border:1px solid rgba(99,125,255,.16)!important;
  border-radius:16px!important;
  background:linear-gradient(180deg,rgba(255,255,255,.84),rgba(245,248,255,.70))!important;
  box-shadow:0 9px 22px rgba(17,24,39,.055),inset 0 1px 0 rgba(255,255,255,.70)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-history-list button{
  border-color:rgba(105,127,235,.16)!important;
  background:rgba(255,255,255,.72)!important;
  color:#435b78!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-history-list button.active{
  background:var(--evidence-accent-soft)!important;
  border-color:var(--evidence-accent-line)!important;
  color:var(--evidence-accent-dark)!important;
}

/* ---------------------------------------------------------------------
   SUMMARY / IDENTITY DECK
   --------------------------------------------------------------------- */
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) :is(.horse-profile-summary-panel.hp-premium-summary,.trainer-stats-summary-panel.trainer-premium-summary){
  position:relative!important;
  overflow:hidden!important;
  border:1px solid rgba(93,124,235,.18)!important;
  border-radius:24px!important;
  background:
    radial-gradient(circle at 4% 5%,var(--evidence-accent-soft),transparent 34%),
    radial-gradient(circle at 96% 4%,rgba(124,58,237,.07),transparent 34%),
    linear-gradient(180deg,rgba(255,255,255,.89),rgba(245,249,255,.74))!important;
  box-shadow:0 22px 54px rgba(21,35,68,.10),inset 0 1px 0 rgba(255,255,255,.74)!important;
  -webkit-backdrop-filter:blur(18px) saturate(140%)!important;
  backdrop-filter:blur(18px) saturate(140%)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) :is(.horse-profile-summary-panel.hp-premium-summary,.trainer-stats-summary-panel.trainer-premium-summary)::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:5px;
  background:linear-gradient(180deg,#58efff,var(--evidence-accent),#8b5cf6);
  box-shadow:0 0 24px var(--evidence-accent-line);
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) :is(.trainer-summary-main,.horse-profile-summary-main){
  padding-left:5px!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) :is(.trainer-summary-main,.horse-profile-summary-main) h3{
  color:#10213d!important;
  font-weight:950!important;
  letter-spacing:-.035em!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-profile-kicker{
  color:var(--evidence-accent-dark)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) :is(.horse-profile-race-context-line,.trainer-runner-context,.horse-profile-summary-note){
  color:#435b78!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) :is(.hp-career-record-card,.trainer-form-pulse-card){
  border:1px solid rgba(98,122,218,.17)!important;
  border-radius:19px!important;
  background:linear-gradient(180deg,rgba(255,255,255,.92),rgba(240,246,255,.70))!important;
  box-shadow:0 14px 32px rgba(24,42,87,.075),inset 0 1px 0 rgba(255,255,255,.76)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .hp-career-record-card::before{
  background:linear-gradient(180deg,#58efff,var(--evidence-accent),#8b5cf6)!important;
  opacity:.88!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) :is(.hp-career-lead,.horse-profile-overall-grid div,.trainer-metric-small){
  border:1px solid rgba(98,122,218,.13)!important;
  background:
    radial-gradient(circle at 100% 0%,var(--evidence-accent-soft),transparent 55%),
    linear-gradient(180deg,rgba(255,255,255,.94),rgba(241,246,255,.72))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) :is(.hp-career-runs,.hp-career-ae-lead){
  border-color:var(--evidence-accent-line)!important;
  box-shadow:0 10px 24px rgba(23,46,102,.07),inset 0 1px 0 rgba(255,255,255,.78)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .trainer-condition-chip-row span{
  border-color:var(--evidence-accent-line)!important;
  background:rgba(255,255,255,.80)!important;
  color:var(--evidence-accent-dark)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72)!important;
}

/* ---------------------------------------------------------------------
   RACE-RUNNER RAIL
   --------------------------------------------------------------------- */
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-context-strip{
  grid-template-columns:auto auto minmax(0,1fr) auto!important;
  gap:8px!important;
  padding:9px 10px!important;
  margin-bottom:16px!important;
  border:1px solid rgba(92,119,236,.18)!important;
  border-radius:19px!important;
  background:
    radial-gradient(circle at 2% 50%,var(--evidence-accent-soft),transparent 25%),
    linear-gradient(180deg,rgba(255,255,255,.88),rgba(237,243,255,.70))!important;
  box-shadow:0 14px 34px rgba(22,38,78,.08),inset 0 1px 0 rgba(255,255,255,.76)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-context-strip > span{
  color:var(--evidence-accent-dark)!important;
  letter-spacing:.15em!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-context-runner-list{
  gap:7px!important;
  scrollbar-width:thin!important;
  scrollbar-color:rgba(94,109,210,.32) transparent!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-context-runner-list button{
  min-height:49px!important;
  border:1px solid rgba(100,120,211,.17)!important;
  border-radius:13px!important;
  background:linear-gradient(180deg,rgba(255,255,255,.92),rgba(245,248,255,.76))!important;
  color:#172554!important;
  box-shadow:0 8px 18px rgba(21,34,72,.045),inset 0 1px 0 rgba(255,255,255,.70)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-context-runner-list button.active{
  background:var(--evidence-active)!important;
  color:#fff!important;
  border-color:rgba(255,255,255,.20)!important;
  box-shadow:0 13px 28px rgba(35,51,143,.22),inset 0 1px 0 rgba(255,255,255,.18)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-context-runner-list button.active small{
  color:rgba(237,244,255,.88)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-context-arrow{
  width:36px!important;
  height:36px!important;
  border:1px solid var(--evidence-accent-line)!important;
  border-radius:12px!important;
  background:rgba(255,255,255,.84)!important;
  color:var(--evidence-accent-dark)!important;
  box-shadow:0 8px 17px rgba(21,34,72,.06)!important;
}
/* Preserve current exclusion/non-runner semantics in the navigation strip. */
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-context-runner-list button.is-context-excluded:not(.active){
  border-color:rgba(245,158,11,.34)!important;
  background:linear-gradient(180deg,rgba(255,249,237,.96),rgba(255,243,219,.80))!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-context-runner-list button.is-context-profile-excluded:not(.active),
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-context-runner-list button.is-context-system-excluded:not(.active){
  border-color:rgba(225,29,72,.28)!important;
  background:linear-gradient(180deg,rgba(255,244,247,.96),rgba(255,232,239,.80))!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-context-runner-list button.is-context-non-runner{
  opacity:.62!important;
  border-color:rgba(148,163,184,.30)!important;
  background:rgba(241,245,249,.88)!important;
}

/* ---------------------------------------------------------------------
   BASIS / CONTROL SURFACE
   --------------------------------------------------------------------- */
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) :is(.hp-evidence-basis-banner.hp-evidence-basis-banner-v2,.trainer-stats-basis-banner,.sire-stats-basis-banner){
  border:1px solid rgba(92,119,236,.18)!important;
  border-radius:20px!important;
  background:
    radial-gradient(circle at 3% 50%,var(--evidence-accent-soft),transparent 26%),
    linear-gradient(180deg,rgba(255,255,255,.88),rgba(239,246,255,.72))!important;
  box-shadow:0 14px 34px rgba(22,38,78,.075),inset 0 1px 0 rgba(255,255,255,.75)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .hp-evidence-basis-copy > span{
  color:var(--evidence-accent-dark)!important;
  letter-spacing:.15em!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .hp-evidence-basis-copy strong{
  color:#10213d!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .hp-evidence-basis-copy :is(em,small){
  color:#435b78!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) :is(.horse-profile-basis-buttons button,.trainer-record-scope-buttons button,.hp-evidence-basis-button){
  border:1px solid var(--evidence-accent-line)!important;
  background:rgba(255,255,255,.88)!important;
  color:var(--evidence-accent-dark)!important;
  box-shadow:0 7px 16px rgba(23,40,82,.05),inset 0 1px 0 rgba(255,255,255,.78)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) :is(.horse-profile-basis-buttons button.active,.trainer-record-scope-buttons button.active,.hp-evidence-basis-button.active){
  background:var(--evidence-active)!important;
  color:#fff!important;
  border-color:transparent!important;
  box-shadow:0 11px 23px rgba(37,57,142,.18)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-profile-action-divider{
  background:rgba(104,118,191,.22)!important;
}

/* ---------------------------------------------------------------------
   WARNINGS + EVIDENCE SUMMARY CARDS
   --------------------------------------------------------------------- */
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .hp-profile-warning{
  border-radius:18px!important;
  border:1px solid rgba(244,63,94,.22)!important;
  background:
    radial-gradient(circle at 3% 50%,rgba(251,113,133,.10),transparent 25%),
    linear-gradient(180deg,rgba(255,250,250,.92),rgba(255,242,244,.74))!important;
  box-shadow:0 12px 28px rgba(90,30,45,.07),inset 0 1px 0 rgba(255,255,255,.72)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) :is(.hp-highlight-card,.trainer-highlight-card){
  border-radius:19px!important;
  border:1px solid rgba(102,122,214,.15)!important;
  box-shadow:0 14px 32px rgba(22,38,78,.075),inset 0 1px 0 rgba(255,255,255,.70)!important;
  overflow:hidden!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) :is(.hp-highlight-ae-positive,.trainer-strong-card){
  background:linear-gradient(180deg,rgba(238,255,248,.94),rgba(222,250,238,.72))!important;
  border-top:3px solid rgba(16,185,129,.48)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) :is(.hp-highlight-ae-negative,.trainer-weak-card){
  background:linear-gradient(180deg,rgba(255,246,248,.94),rgba(255,229,235,.72))!important;
  border-top:3px solid rgba(244,63,94,.40)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .hp-highlight-lifts{
  background:linear-gradient(180deg,rgba(240,247,255,.95),rgba(225,238,255,.74))!important;
  border-top:3px solid rgba(59,130,246,.42)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .hp-highlight-concerns{
  background:linear-gradient(180deg,rgba(255,250,240,.95),rgba(255,239,218,.75))!important;
  border-top:3px solid rgba(245,158,11,.44)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) :is(.hp-highlight-card li,.trainer-highlight-card li){
  border:1px solid rgba(100,119,204,.12)!important;
  background:rgba(255,255,255,.72)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.70)!important;
}

/* ---------------------------------------------------------------------
   DETAILED EVIDENCE SECTIONS
   --------------------------------------------------------------------- */
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) :is(.horse-profile-section-card.hp-polished-section,.trainer-stats-section-card){
  overflow:hidden!important;
  border:1px solid rgba(93,119,221,.16)!important;
  border-radius:20px!important;
  background:linear-gradient(180deg,rgba(255,255,255,.91),rgba(246,249,255,.78))!important;
  box-shadow:0 15px 36px rgba(20,35,75,.075),inset 0 1px 0 rgba(255,255,255,.72)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) :is(.horse-profile-section-card.hp-polished-section,.trainer-stats-section-card) > header{
  position:relative!important;
  min-height:48px!important;
  padding:11px 15px!important;
  color:#fff!important;
  background:
    radial-gradient(circle at 92% 0%,rgba(45,212,191,.20),transparent 36%),
    linear-gradient(112deg,#10233f 0%,#28469d 60%,#4d56c7 100%)!important;
  border-bottom:1px solid rgba(255,255,255,.12)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) :is(.horse-profile-section-card.hp-polished-section,.trainer-stats-section-card) > header::before{
  background:linear-gradient(180deg,#59efff,var(--evidence-accent),#9b5df2)!important;
  opacity:1!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) :is(.horse-profile-section-card.hp-polished-section,.trainer-stats-section-card) > header h3{
  color:#fff!important;
  font-size:16px!important;
  text-shadow:0 1px 8px rgba(0,0,0,.20)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) :is(.horse-profile-section-card.hp-polished-section,.trainer-stats-section-card) > header .horse-profile-kicker{
  color:rgba(224,241,255,.86)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .trainer-stat-card-stack{
  gap:8px!important;
  padding:10px!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .trainer-stat-row-card{
  border:1px solid rgba(99,119,211,.13)!important;
  border-radius:14px!important;
  background:linear-gradient(90deg,rgba(255,255,255,.94),rgba(241,247,255,.76))!important;
  box-shadow:0 7px 18px rgba(22,38,78,.045),inset 0 1px 0 rgba(255,255,255,.72)!important;
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .trainer-stat-row-card:hover{
  transform:translateY(-1px)!important;
  border-color:var(--evidence-accent-line)!important;
  box-shadow:0 11px 25px rgba(22,38,78,.075),inset 0 1px 0 rgba(255,255,255,.76)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .trainer-stat-metrics div{
  border-color:rgba(100,119,204,.12)!important;
  background:rgba(255,255,255,.78)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.70)!important;
}

/* Dense comparison tables stay light and operational. */
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-sire-stats) .horse-profile-table-wrap{
  background:rgba(255,255,255,.74)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-sire-stats) .horse-profile-stat-table.hp-comparison-table-v2{
  background:#fff!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-sire-stats) .horse-profile-stat-table.hp-comparison-table-v2 thead tr:first-child th{
  color:#fff!important;
  background:linear-gradient(112deg,#10233f,#2f4ca4 60%,#4e5fc9)!important;
  border-color:rgba(255,255,255,.09)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-sire-stats) .horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th{
  color:#40536e!important;
  background:#eef3fb!important;
  border-color:rgba(99,119,204,.11)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-sire-stats) .horse-profile-stat-table.hp-comparison-table-v2 tbody th,
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-sire-stats) .horse-profile-stat-table.hp-comparison-table-v2 tbody td{
  border-color:rgba(100,119,204,.10)!important;
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-sire-stats) .horse-profile-stat-table.hp-comparison-table-v2 tbody tr:nth-child(even) th,
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-sire-stats) .horse-profile-stat-table.hp-comparison-table-v2 tbody tr:nth-child(even) td{
  filter:saturate(.98) brightness(.995);
}
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-profile-section-empty,
.horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-drilldown-empty{
  border:1px solid rgba(99,119,211,.15)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.88),rgba(241,246,255,.72))!important;
  box-shadow:0 10px 24px rgba(22,38,78,.055)!important;
}

/* Responsive safety */
@media(max-width:1200px){
  .horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-drilldown-modal-header{
    align-items:flex-start!important;
  }
  .horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-drilldown-actions{
    flex-wrap:wrap!important;
    justify-content:flex-end!important;
  }
}
@media(max-width:760px){
  .horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-drilldown-modal-header{
    min-height:0!important;
    padding:14px!important;
  }
  .horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-drilldown-actions{
    width:100%!important;
    justify-content:flex-start!important;
  }
  .horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-context-strip{
    grid-template-columns:auto minmax(0,1fr)!important;
  }
  .horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) .horse-context-arrow{
    display:none!important;
  }
}
@media(prefers-reduced-motion:reduce){
  .horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) *{
    scroll-behavior:auto!important;
  }
  .horse-drilldown-modal-shell:is(.is-horse-profile,.is-trainer-stats,.is-jockey-stats,.is-sire-stats) :is(.trainer-stat-row-card,.horse-drilldown-actions button){
    transition:none!important;
  }
}

/* === LIVE_RACING_002BD — evidence-page header and section-hierarchy correction.
   Scope: Horse Profile, Trainer Stats, Jockey Stats, Sire Stats and Dam-sire Stats.
   Visual-only CSS. Fixes full-bleed header clipping/line clutter and removes the
   double-dark section/table-header stack. === */

/* Include Dam-sire explicitly even where the legacy page also carries Sire classes. */
.horse-drilldown-modal-shell:is(
  .is-horse-profile,
  .is-trainer-stats,
  .is-jockey-stats,
  .is-sire-stats,
  .is-dam-sire-stats
) .horse-drilldown-modal-header{
  /* The header keeps its full-bleed -24px margin, so 40px left padding gives
     the title block a true 16px safe gutter instead of placing glyphs off-screen. */
  padding:16px 24px 16px 40px!important;
  border-top:0!important;
  border-right:0!important;
  border-left:0!important;
  border-bottom:1px solid rgba(255,255,255,.16)!important;
  outline:0!important;
  box-shadow:0 16px 34px rgba(10,24,56,.18),inset 0 1px 0 rgba(255,255,255,.17)!important;
  overflow:visible!important;
}
.horse-drilldown-modal-shell:is(
  .is-horse-profile,
  .is-trainer-stats,
  .is-jockey-stats,
  .is-sire-stats,
  .is-dam-sire-stats
) .horse-drilldown-modal-header::before,
.horse-drilldown-modal-shell:is(
  .is-horse-profile,
  .is-trainer-stats,
  .is-jockey-stats,
  .is-sire-stats,
  .is-dam-sire-stats
) .horse-drilldown-modal-header::after{
  content:none!important;
  display:none!important;
}
.horse-drilldown-modal-shell:is(
  .is-horse-profile,
  .is-trainer-stats,
  .is-jockey-stats,
  .is-sire-stats,
  .is-dam-sire-stats
) .horse-drilldown-title-block{
  min-width:0!important;
  padding-left:0!important;
  overflow:visible!important;
}
.horse-drilldown-modal-shell:is(
  .is-horse-profile,
  .is-trainer-stats,
  .is-jockey-stats,
  .is-sire-stats,
  .is-dam-sire-stats
) :is(.horse-drilldown-kicker,.horse-drilldown-modal-header h2,.horse-drilldown-modal-header p){
  margin-left:0!important;
  padding-left:0!important;
  overflow:visible!important;
}
.horse-drilldown-modal-shell:is(
  .is-horse-profile,
  .is-trainer-stats,
  .is-jockey-stats,
  .is-sire-stats,
  .is-dam-sire-stats
) .horse-drilldown-modal-header h2{
  line-height:1.08!important;
  padding-top:1px!important;
  padding-bottom:2px!important;
}

/* One clean family-colour line beneath the header rather than several competing
   borders/pseudo-elements. */
.horse-drilldown-modal-shell:is(
  .is-horse-profile,
  .is-trainer-stats,
  .is-jockey-stats,
  .is-sire-stats,
  .is-dam-sire-stats
) .horse-drilldown-modal-header{
  background-image:
    linear-gradient(90deg,rgba(78,235,245,.72),rgba(122,92,246,.76)),
    var(--evidence-header)!important;
  background-size:100% 2px,100% 100%!important;
  background-position:left bottom,left top!important;
  background-repeat:no-repeat!important;
}

/* ---------------------------------------------------------------------
   SECTION HIERARCHY
   The section title is now a light premium orientation strip. The analytical
   table group header remains dark, so the two layers no longer read as two
   stacked navy title bars.
   --------------------------------------------------------------------- */
.horse-drilldown-modal-shell:is(
  .is-horse-profile,
  .is-trainer-stats,
  .is-jockey-stats,
  .is-sire-stats,
  .is-dam-sire-stats
) :is(.horse-profile-section-card.hp-polished-section,.trainer-stats-section-card) > header{
  min-height:50px!important;
  padding:10px 18px 10px 26px!important;
  color:#10213f!important;
  background:
    radial-gradient(circle at 94% 0%,var(--evidence-accent-soft),transparent 38%),
    linear-gradient(180deg,rgba(250,253,255,.98),rgba(231,241,255,.90))!important;
  border-top:1px solid rgba(255,255,255,.86)!important;
  border-bottom:1px solid rgba(89,112,210,.16)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.82),0 7px 16px rgba(28,43,84,.045)!important;
  text-shadow:none!important;
}
.horse-drilldown-modal-shell:is(
  .is-horse-profile,
  .is-trainer-stats,
  .is-jockey-stats,
  .is-sire-stats,
  .is-dam-sire-stats
) :is(.horse-profile-section-card.hp-polished-section,.trainer-stats-section-card) > header::before{
  content:""!important;
  display:block!important;
  position:absolute!important;
  left:0!important;
  top:0!important;
  bottom:0!important;
  width:6px!important;
  height:auto!important;
  border-radius:0 5px 5px 0!important;
  background:linear-gradient(180deg,#59efff,var(--evidence-accent),#9b5df2)!important;
  opacity:1!important;
}
.horse-drilldown-modal-shell:is(
  .is-horse-profile,
  .is-trainer-stats,
  .is-jockey-stats,
  .is-sire-stats,
  .is-dam-sire-stats
) :is(.horse-profile-section-card.hp-polished-section,.trainer-stats-section-card) > header h3{
  color:#10213f!important;
  font-size:17px!important;
  line-height:1.12!important;
  text-shadow:none!important;
  margin:2px 0 0!important;
}
.horse-drilldown-modal-shell:is(
  .is-horse-profile,
  .is-trainer-stats,
  .is-jockey-stats,
  .is-sire-stats,
  .is-dam-sire-stats
) :is(.horse-profile-section-card.hp-polished-section,.trainer-stats-section-card) > header .horse-profile-kicker{
  color:var(--evidence-accent-dark)!important;
  font-size:9px!important;
  line-height:1.15!important;
  letter-spacing:.14em!important;
  text-shadow:none!important;
}

/* Table hierarchy: keep the grouped analytical heading dark, but slightly
   calmer and better padded than the previous stacked-header treatment. */
.horse-drilldown-modal-shell:is(
  .is-horse-profile,
  .is-sire-stats,
  .is-dam-sire-stats
) .horse-profile-stat-table.hp-comparison-table-v2 thead tr:first-child th{
  min-height:42px!important;
  padding:11px 12px!important;
  background:
    radial-gradient(circle at 92% 0%,rgba(56,189,248,.14),transparent 34%),
    linear-gradient(112deg,#12223e,#304b9c 60%,#535fc3)!important;
  border-top:0!important;
  border-bottom:1px solid rgba(255,255,255,.14)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.13)!important;
  line-height:1.15!important;
}
.horse-drilldown-modal-shell:is(
  .is-horse-profile,
  .is-sire-stats,
  .is-dam-sire-stats
) .horse-profile-stat-table.hp-comparison-table-v2 thead tr:first-child th:first-child{
  padding-left:20px!important;
  text-align:left!important;
}
.horse-drilldown-modal-shell:is(
  .is-horse-profile,
  .is-sire-stats,
  .is-dam-sire-stats
) .horse-profile-stat-table.hp-comparison-table-v2 thead tr:nth-child(2) th{
  padding-top:9px!important;
  padding-bottom:9px!important;
  background:linear-gradient(180deg,#f4f7fc,#e8eef8)!important;
}
.horse-drilldown-modal-shell:is(
  .is-horse-profile,
  .is-sire-stats,
  .is-dam-sire-stats
) .horse-profile-stat-table.hp-comparison-table-v2 tbody th{
  padding-left:20px!important;
}

/* Trainer/Jockey detail cards use a matching light section orientation strip. */
.horse-drilldown-modal-shell:is(.is-trainer-stats,.is-jockey-stats) .trainer-stats-section-card > header{
  padding-left:26px!important;
}

/* Fullscreen and compact responsive safety. */
@media(max-width:1200px){
  .horse-drilldown-modal-shell:is(
    .is-horse-profile,
    .is-trainer-stats,
    .is-jockey-stats,
    .is-sire-stats,
    .is-dam-sire-stats
  ) .horse-drilldown-modal-header{
    padding-left:36px!important;
  }
}
@media(max-width:760px){
  .horse-drilldown-modal-shell:is(
    .is-horse-profile,
    .is-trainer-stats,
    .is-jockey-stats,
    .is-sire-stats,
    .is-dam-sire-stats
  ) .horse-drilldown-modal-header{
    margin:-24px -24px 12px!important;
    padding:14px 14px 14px 34px!important;
  }
  .horse-drilldown-modal-shell:is(
    .is-horse-profile,
    .is-trainer-stats,
    .is-jockey-stats,
    .is-sire-stats,
    .is-dam-sire-stats
  ) :is(.horse-profile-section-card.hp-polished-section,.trainer-stats-section-card) > header{
    padding-left:23px!important;
  }
}

/* === LIVE_RACING_002BE — Sire/Dam-sire evidence-page group exclusion.
   Adds a second exclusion control beside the existing single-runner action.
   It deliberately reuses the accepted Exclude/Excluded colour and state language. === */
.horse-drilldown-modal-shell:is(.is-sire-stats,.is-dam-sire-stats) .breeding-group-exclude-button{
  min-width:190px!important;
  max-width:100%!important;
  padding-left:16px!important;
  padding-right:16px!important;
  white-space:nowrap!important;
}
@media(max-width:760px){
  .horse-drilldown-modal-shell:is(.is-sire-stats,.is-dam-sire-stats) .sire-race-actions{
    width:100%!important;
    justify-content:flex-start!important;
  }
  .horse-drilldown-modal-shell:is(.is-sire-stats,.is-dam-sire-stats) .breeding-group-exclude-button{
    min-width:0!important;
    white-space:normal!important;
  }
}


/* =====================================================================
   DRAW_STATS_001A — PREMIUM RACE-LEVEL DRAW STATS WORKSPACE
   Component-scoped only. No global application grid or sidebar overrides.
   ===================================================================== */
#page-live-racing .live-runner-profile-actions .live-evidence-draw{
  color:#0f6d8f!important;
  background:
    radial-gradient(circle at 92% 0%,rgba(34,211,238,.16),transparent 38%),
    linear-gradient(180deg,rgba(239,252,255,.98),rgba(221,244,250,.82))!important;
  border-color:rgba(23,151,184,.24)!important;
}
#page-live-racing .live-runner-profile-actions .live-evidence-draw:hover:not(:disabled){
  color:#07546f!important;
  border-color:rgba(14,165,195,.48)!important;
  box-shadow:0 9px 20px rgba(14,116,144,.15),inset 0 1px 0 rgba(255,255,255,.9)!important;
}

.horse-drilldown-modal-shell.is-draw-stats{
  --draw-navy:#071a3d;
  --draw-blue:#2354b9;
  --draw-cyan:#22d3ee;
  --draw-violet:#7c3aed;
  --draw-text:#12213a;
  --draw-muted:#64748b;
  --draw-line:rgba(77,105,204,.18);
}
.horse-drilldown-modal-shell.is-draw-stats .horse-drilldown-modal{
  width:min(1780px,97vw)!important;
  max-width:1780px!important;
  background:
    radial-gradient(circle at 3% 7%,rgba(34,211,238,.13),transparent 23%),
    radial-gradient(circle at 94% 5%,rgba(124,58,237,.15),transparent 26%),
    radial-gradient(circle at 52% 100%,rgba(59,130,246,.08),transparent 34%),
    linear-gradient(180deg,#f4f7ff 0%,#eef4ff 46%,#f7faff 100%)!important;
}
.horse-drilldown-modal-shell.is-draw-stats .horse-drilldown-modal-header{
  position:relative!important;
  overflow:hidden!important;
  margin:-24px -24px 16px!important;
  padding:20px 28px 20px 42px!important;
  border-bottom:1px solid rgba(115,140,255,.26)!important;
  background:
    radial-gradient(circle at 84% 18%,rgba(45,212,191,.24),transparent 34%),
    radial-gradient(circle at 36% 110%,rgba(99,102,241,.30),transparent 48%),
    linear-gradient(132deg,rgba(6,17,39,.99),rgba(24,47,139,.96) 50%,rgba(43,99,213,.93) 75%,rgba(41,198,194,.84))!important;
  box-shadow:0 24px 54px rgba(15,23,42,.20),inset 0 1px 0 rgba(255,255,255,.24)!important;
}
.horse-drilldown-modal-shell.is-draw-stats .horse-drilldown-modal-header:before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:7px;
  background:linear-gradient(180deg,#5df2ff 0%,#4f8df7 48%,#a56cf2 100%);
  box-shadow:0 0 25px rgba(82,182,255,.62);
}
.horse-drilldown-modal-shell.is-draw-stats .horse-drilldown-modal-header :is(h2,p,.horse-drilldown-kicker){color:#fff!important;}
.horse-drilldown-modal-shell.is-draw-stats .horse-drilldown-modal-header p{color:rgba(226,239,255,.82)!important;}
.horse-drilldown-modal-shell.is-draw-stats .horse-drilldown-ghost{
  color:#fff!important;
  border-color:rgba(255,255,255,.30)!important;
  background:rgba(255,255,255,.10)!important;
}
.horse-drilldown-modal-shell.is-draw-stats .horse-drilldown-ghost:hover{background:rgba(255,255,255,.18)!important;}
.horse-drilldown-modal-shell.is-draw-stats .horse-context-strip{
  border:1px solid rgba(87,112,200,.18)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.84),rgba(245,249,255,.72))!important;
  box-shadow:0 12px 30px rgba(17,24,39,.08),inset 0 1px 0 rgba(255,255,255,.56)!important;
}
.horse-drilldown-modal-shell.is-draw-stats .draw-context-runner strong{color:#0e7490!important;}

.draw-stats-evidence{
  display:grid;
  gap:16px;
  color:var(--draw-text);
}
.draw-stats-locked-context,
.draw-stats-filter-deck,
.draw-stats-chart-card,
.draw-stats-table-card,
.draw-stats-method-note{
  border:1px solid var(--draw-line)!important;
  border-radius:18px!important;
  background:linear-gradient(180deg,rgba(255,255,255,.84),rgba(255,255,255,.70))!important;
  box-shadow:0 12px 30px rgba(17,24,39,.08),inset 0 1px 0 rgba(255,255,255,.56)!important;
  backdrop-filter:blur(18px) saturate(140%);
  -webkit-backdrop-filter:blur(18px) saturate(140%);
}
.draw-stats-locked-context{padding:16px 18px;}
.draw-stats-context-title{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:16px;
  margin-bottom:12px;
}
.draw-stats-context-title span{
  font-size:11px;
  font-weight:900;
  letter-spacing:.13em;
  text-transform:uppercase;
  color:#2755b5;
}
.draw-stats-context-title small{color:var(--draw-muted);font-weight:650;}
.draw-stats-context-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:10px;
}
.draw-stats-context-grid article{
  min-width:0;
  padding:11px 12px;
  border:1px solid rgba(82,108,205,.14);
  border-radius:13px;
  background:linear-gradient(180deg,rgba(255,255,255,.91),rgba(239,245,255,.68));
}
.draw-stats-context-grid span{display:block;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:#6b7892;}
.draw-stats-context-grid strong{display:block;margin-top:4px;font-size:14px;color:#17315d;white-space:normal;overflow-wrap:anywhere;}

.draw-stats-filter-deck{padding:0 18px 18px!important;overflow:hidden;}
.draw-stats-filter-deck>header,
.draw-stats-chart-card>header,
.draw-stats-table-card>header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin:0 -18px 16px;
  padding:14px 18px 13px 26px;
  border-bottom:1px solid rgba(78,105,202,.14);
  background:linear-gradient(90deg,rgba(229,239,255,.92),rgba(248,251,255,.72));
  box-shadow:inset 6px 0 0 rgba(35,116,219,.68),inset 0 1px 0 rgba(255,255,255,.74);
}
.draw-stats-filter-deck>header h3,
.draw-stats-chart-card>header h3,
.draw-stats-table-card>header h3{margin:2px 0 0;font-size:18px;color:#152a4b;}
.draw-stats-filter-deck>header p,
.draw-stats-table-card>header p{max-width:620px;margin:0;color:#66758f;font-size:12px;line-height:1.45;text-align:right;}
.draw-stats-filter-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.draw-stats-filter-group{
  padding:13px;
  border:1px solid rgba(85,111,205,.14);
  border-radius:14px;
  background:rgba(247,250,255,.70);
}
.draw-stats-filter-group.is-wide{grid-column:1/-1;}
.draw-stats-filter-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:9px;}
.draw-stats-filter-heading strong{font-size:12px;color:#243a62;}
.draw-stats-filter-heading small{font-size:10px;color:#7b879c;}
.draw-stats-chip-row{display:flex;flex-wrap:wrap;gap:8px;}
.draw-stats-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:34px;
  padding:7px 11px;
  border:1px solid rgba(79,104,195,.20);
  border-radius:999px;
  background:linear-gradient(180deg,rgba(255,255,255,.95),rgba(235,242,253,.78));
  color:#40516f;
  font-size:11px;
  font-weight:800;
  cursor:pointer;
  transition:transform .14s ease,border-color .14s ease,box-shadow .14s ease,background .14s ease;
}
.draw-stats-chip em{
  min-width:22px;
  padding:2px 6px;
  border-radius:999px;
  background:rgba(82,104,175,.10);
  color:#66728a;
  font-size:9px;
  font-style:normal;
  text-align:center;
}
.draw-stats-chip:hover{transform:translateY(-1px);border-color:rgba(38,114,220,.44);box-shadow:0 7px 15px rgba(26,65,139,.10);}
.draw-stats-chip.active{
  color:#fff;
  border-color:rgba(89,211,244,.48);
  background:
    radial-gradient(circle at 88% 0%,rgba(45,212,191,.28),transparent 40%),
    linear-gradient(126deg,#102a5a,#3159c0 58%,#6951c9);
  box-shadow:0 9px 20px rgba(35,73,156,.22),inset 0 1px 0 rgba(255,255,255,.24);
}
.draw-stats-chip.active em{background:rgba(255,255,255,.16);color:#fff;}
.draw-stats-chip.is-empty:not(.active){opacity:.48;}

.draw-stats-intelligence{
  position:relative;
  overflow:hidden;
  display:grid;
  grid-template-columns:minmax(260px,.9fr) minmax(520px,1.6fr);
  gap:22px;
  padding:22px 24px 22px 30px;
  border:1px solid rgba(83,170,244,.44);
  border-radius:20px;
  background:
    radial-gradient(circle at 92% 4%,rgba(34,211,238,.22),transparent 39%),
    radial-gradient(circle at 4% 98%,rgba(147,93,255,.20),transparent 42%),
    linear-gradient(143deg,rgba(5,18,44,.985),rgba(24,53,132,.965) 54%,rgba(62,49,154,.945));
  box-shadow:0 14px 30px rgba(20,45,118,.22),inset 0 1px 0 rgba(255,255,255,.27),inset 0 0 0 1px rgba(255,255,255,.055);
  color:#fff;
}
.draw-stats-intelligence:before{
  content:"";position:absolute;inset:0 auto 0 0;width:6px;
  background:linear-gradient(180deg,#5df2ff 0%,#4f8df7 48%,#a56cf2 100%);
  box-shadow:0 0 25px rgba(82,182,255,.62);
}
.draw-stats-intelligence .horse-profile-kicker{color:#7cecff!important;}
.draw-stats-intelligence-copy h3{margin:5px 0 7px;font-size:25px;color:#fff;}
.draw-stats-intelligence-copy p{margin:0;color:rgba(220,235,255,.78);line-height:1.5;}
.draw-stats-intelligence-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}
.draw-stats-intelligence-grid article{
  padding:13px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:14px;
  background:rgba(255,255,255,.08);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12);
}
.draw-stats-intelligence-grid span{display:block;font-size:9px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:rgba(190,218,255,.72);}
.draw-stats-intelligence-grid strong{display:block;margin-top:6px;font-size:15px;color:#fff;line-height:1.25;}
.draw-stats-intelligence-grid small{display:block;margin-top:5px;color:rgba(215,230,255,.70);font-size:10px;}

.draw-stats-chart-card{padding:0 18px 14px!important;overflow:hidden;}
.draw-stats-chart-card>header{align-items:center;}
.draw-stats-metric-tabs{display:flex;flex-wrap:wrap;gap:6px;}
.draw-stats-metric-tabs button{
  padding:7px 10px;border:1px solid rgba(73,99,191,.18);border-radius:999px;
  background:rgba(255,255,255,.72);color:#485a78;font-size:10px;font-weight:850;cursor:pointer;
}
.draw-stats-metric-tabs button.active{color:#fff;border-color:rgba(69,184,229,.46);background:linear-gradient(126deg,#153979,#3667d2 58%,#7254cb);}
.draw-stats-chart-scroll{overflow-x:auto;overflow-y:hidden;padding:4px 0 0;}
.draw-stats-chart{display:block;min-width:820px;width:100%;height:auto;}
.draw-stats-chart-axis{stroke:rgba(57,78,132,.28);stroke-width:1.3;}
.draw-stats-chart-neutral{stroke:rgba(100,116,139,.44);stroke-width:1.2;stroke-dasharray:7 7;}
.draw-stats-chart-neutral-label,.draw-stats-chart-y-label{fill:#64748b;font-size:11px;font-weight:700;}
.draw-stats-chart-line{fill:none;stroke:#315fd0;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 6px 8px rgba(49,95,208,.18));}
.draw-stats-chart-point circle{fill:#fff;stroke:#315fd0;stroke-width:4;}
.draw-stats-chart-point.active circle{fill:#22d3ee;stroke:#172b6a;stroke-width:4;filter:drop-shadow(0 0 8px rgba(34,211,238,.7));}
.draw-stats-chart-point text{fill:#41516d;font-size:11px;font-weight:800;}

.draw-stats-zone-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;}
.draw-stats-zone-card{
  padding:16px;border:1px solid rgba(82,108,205,.16);border-radius:16px;
  background:linear-gradient(180deg,rgba(255,255,255,.88),rgba(239,245,255,.70));
  box-shadow:0 10px 24px rgba(25,44,91,.07),inset 0 1px 0 rgba(255,255,255,.72);
}
.draw-stats-zone-card.low{box-shadow:inset 5px 0 0 #35b7d2,0 10px 24px rgba(25,44,91,.07);}
.draw-stats-zone-card.middle{box-shadow:inset 5px 0 0 #4f75db,0 10px 24px rgba(25,44,91,.07);}
.draw-stats-zone-card.high{box-shadow:inset 5px 0 0 #8b5fd3,0 10px 24px rgba(25,44,91,.07);}
.draw-stats-zone-card h4{margin:5px 0 12px;font-size:18px;color:#17315d;}
.draw-stats-zone-card dl{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:0;}
.draw-stats-zone-card dl div{padding:8px;border-radius:10px;background:rgba(235,242,253,.72);}
.draw-stats-zone-card dt{font-size:8px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:#758198;}
.draw-stats-zone-card dd{margin:3px 0 0;font-size:12px;font-weight:850;color:#263e68;}

.draw-stats-table-card{padding:0 0 12px!important;overflow:hidden;}
.draw-stats-table-card>header{margin:0 0 0;padding-right:20px;}
.draw-stats-table-wrap{overflow:auto;max-width:100%;}
.draw-stats-table{width:100%;min-width:1120px;border-collapse:separate;border-spacing:0;font-size:11px;}
.draw-stats-table thead th{
  position:sticky;top:0;z-index:2;padding:11px 10px;
  background:linear-gradient(112deg,#12223e,#304b9c 60%,#535fc3);
  color:#fff;text-align:right;white-space:nowrap;border-bottom:1px solid rgba(255,255,255,.12);
}
.draw-stats-table thead th:first-child{text-align:left;padding-left:18px;}
.draw-stats-table tbody th,.draw-stats-table tbody td{padding:10px;border-bottom:1px solid rgba(86,109,188,.12);text-align:right;background:rgba(255,255,255,.70);}
.draw-stats-table tbody th{text-align:left;padding-left:18px;color:#17315d;font-size:13px;}
.draw-stats-table tbody tr:nth-child(even) :is(th,td){background:rgba(241,246,255,.78);}
.draw-stats-table tbody tr.is-current-stall :is(th,td){background:linear-gradient(90deg,rgba(198,248,255,.90),rgba(228,235,255,.86));font-weight:850;}
.draw-stats-table tbody tr.is-current-stall th{box-shadow:inset 5px 0 0 #10bcd5;color:#075b75;}
.draw-stats-method-note{display:flex;gap:12px;padding:13px 16px;color:#627087;font-size:11px;line-height:1.5;}
.draw-stats-method-note strong{color:#234d9b;text-transform:uppercase;letter-spacing:.08em;font-size:9px;}

@media(max-width:1200px){
  .draw-stats-context-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
  .draw-stats-intelligence{grid-template-columns:1fr;}
  .draw-stats-intelligence-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .draw-stats-filter-grid{grid-template-columns:1fr;}
  .draw-stats-filter-group.is-wide{grid-column:auto;}
}
@media(max-width:760px){
  .horse-drilldown-modal-shell.is-draw-stats .horse-drilldown-modal-header{margin:-24px -24px 12px!important;padding:14px 14px 14px 34px!important;}
  .draw-stats-context-grid,.draw-stats-zone-grid{grid-template-columns:1fr;}
  .draw-stats-intelligence-grid{grid-template-columns:1fr 1fr;}
  .draw-stats-filter-deck>header,.draw-stats-chart-card>header,.draw-stats-table-card>header{align-items:flex-start;flex-direction:column;}
  .draw-stats-filter-deck>header p,.draw-stats-table-card>header p{text-align:left;}
}

/* =====================================================================
   DRAW_STATS_002A — SIMPLE-TO-COMPLEX PAGE + CONTEXTUAL VERDICT
   Scoped to Draw Stats. Does not alter the shared evidence-page geometry.
   ===================================================================== */
.horse-drilldown-modal-shell.is-draw-stats.fullscreen{
  padding:14px!important;
  place-items:center!important;
}
.horse-drilldown-modal-shell.is-draw-stats.fullscreen .horse-drilldown-modal{
  width:calc(100vw - 28px)!important;
  max-width:1780px!important;
  height:calc(100dvh - 28px)!important;
  max-height:calc(100dvh - 28px)!important;
  border-radius:22px!important;
  border:1px solid rgba(119,145,228,.28)!important;
}
.horse-drilldown-modal-shell.is-draw-stats.fullscreen .horse-drilldown-content{
  height:100%!important;
  max-height:100%!important;
}
.horse-drilldown-modal-shell.is-draw-stats .horse-context-strip{display:none!important;}
.draw-stats-evidence{position:relative;}
.draw-stats-evidence.is-refreshing{opacity:.72;pointer-events:none;}
.draw-stats-evidence.is-refreshing:after{
  content:"Refreshing evidence…";
  position:fixed;right:34px;bottom:30px;z-index:20;
  padding:9px 13px;border-radius:999px;color:#fff;font-size:11px;font-weight:850;
  background:linear-gradient(126deg,#153979,#3667d2 58%,#7254cb);
  box-shadow:0 12px 28px rgba(25,52,126,.24);
}
.draw-stats-zone-section,
.draw-stats-diagnostics{
  border:1px solid var(--draw-line)!important;
  border-radius:18px!important;
  background:linear-gradient(180deg,rgba(255,255,255,.84),rgba(255,255,255,.70))!important;
  box-shadow:0 12px 30px rgba(17,24,39,.08),inset 0 1px 0 rgba(255,255,255,.56)!important;
  backdrop-filter:blur(18px) saturate(140%);
  -webkit-backdrop-filter:blur(18px) saturate(140%);
}
.draw-stats-zone-section,
.draw-stats-diagnostics{padding:0 18px 18px!important;overflow:hidden;}
.draw-stats-zone-section>header,
.draw-stats-diagnostics>header{
  display:flex;align-items:flex-end;justify-content:space-between;gap:18px;
  margin:0 -18px 16px;padding:14px 18px 13px 26px;
  border-bottom:1px solid rgba(78,105,202,.14);
  background:linear-gradient(90deg,rgba(229,239,255,.92),rgba(248,251,255,.72));
  box-shadow:inset 6px 0 0 rgba(35,116,219,.68),inset 0 1px 0 rgba(255,255,255,.74);
}
.draw-stats-zone-section>header h3,
.draw-stats-diagnostics>header h3{margin:2px 0 0;font-size:18px;color:#152a4b;}
.draw-stats-zone-section>header p,
.draw-stats-diagnostics>header p{max-width:650px;margin:0;color:#66758f;font-size:12px;line-height:1.45;text-align:right;}
.draw-stats-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
.draw-stats-filter-group{min-width:0;}
.draw-stats-intelligence{
  display:block!important;
  padding:22px 24px 24px 30px!important;
}
.draw-stats-intelligence-heading{margin-bottom:15px;}
.draw-stats-intelligence-heading h3{margin:5px 0 0;font-size:27px;color:#fff;line-height:1.16;}
.draw-stats-intelligence-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important;}
.draw-stats-written-summary{
  position:relative;margin:16px 0 0;padding:16px 18px 16px 20px;
  border:1px solid rgba(255,255,255,.14);border-radius:14px;
  background:rgba(255,255,255,.075);color:rgba(232,241,255,.91);
  font-size:13px;line-height:1.65;box-shadow:inset 0 1px 0 rgba(255,255,255,.10);
}
.draw-stats-zone-card dl{grid-template-columns:repeat(4,minmax(0,1fr))!important;}
.draw-stats-zone-card dl div{min-width:0;}
.draw-stats-zone-card dd{overflow-wrap:anywhere;}
.draw-stats-table-card>header{align-items:flex-end;}
.draw-stats-table-legend{display:flex;flex-wrap:wrap;gap:10px 18px;padding:10px 18px;border-bottom:1px solid rgba(86,109,188,.10);font-size:10px;font-weight:800;color:#40516f;background:rgba(247,250,255,.72);}
.draw-stats-table-legend span:before{content:"";display:inline-block;width:8px;height:8px;margin-right:6px;border-radius:50%;background:#40516f;}
.draw-stats-table-legend .is-positive:before{background:#138a58;}
.draw-stats-table-legend .is-negative:before{background:#c2414f;}
.draw-stats-table-legend .is-insufficient:before{background:#9aa5b5;}
.draw-stats-table{min-width:1030px!important;table-layout:fixed;}
.draw-stats-table thead th{white-space:normal!important;line-height:1.12;vertical-align:middle;}
.draw-stats-table thead th:nth-child(1){width:66px;}
.draw-stats-table thead th:nth-child(2),
.draw-stats-table thead th:nth-child(3),
.draw-stats-table thead th:nth-child(5),
.draw-stats-table thead th:nth-child(11){width:74px;}
.draw-stats-table thead th:nth-child(4),
.draw-stats-table thead th:nth-child(6),
.draw-stats-table thead th:nth-child(7),
.draw-stats-table thead th:nth-child(8),
.draw-stats-table thead th:nth-child(9),
.draw-stats-table thead th:nth-child(10){width:92px;}
.draw-stats-metric-cell{font-weight:760;color:#263e68;}
.draw-stats-metric-cell.is-positive{color:#08764a!important;background:rgba(218,247,233,.78)!important;}
.draw-stats-metric-cell.is-negative{color:#b1263d!important;background:rgba(255,231,235,.78)!important;}
.draw-stats-metric-cell.is-neutral{color:#263e68!important;}
.draw-stats-metric-cell.is-insufficient{color:#9aa5b5!important;background:rgba(244,246,249,.72)!important;}
.draw-stats-help{
  position:relative;display:inline-grid;place-items:center;width:16px;height:16px;margin-left:5px;
  border:1px solid rgba(172,207,255,.48);border-radius:50%;color:inherit;font-size:10px;font-weight:900;
  cursor:help;vertical-align:middle;outline:none;
}
.draw-stats-help:after{
  content:attr(data-draw-tooltip);position:absolute;left:50%;bottom:calc(100% + 9px);z-index:30;
  width:260px;padding:10px 12px;border-radius:10px;transform:translate(-50%,6px);
  background:#071a3d;color:#fff;font-size:11px;font-weight:650;line-height:1.45;text-align:left;
  box-shadow:0 14px 32px rgba(4,12,32,.30);opacity:0;visibility:hidden;pointer-events:none;
  transition:opacity .15s ease,transform .15s ease,visibility .15s ease;
}
.draw-stats-help:hover:after,.draw-stats-help:focus:after{opacity:1;visibility:visible;transform:translate(-50%,0);}
.draw-stats-chart-card{order:initial;}
.draw-stats-chart-card>header{align-items:flex-start!important;}
.draw-stats-chart-controls{display:flex;flex-direction:column;align-items:flex-end;gap:8px;max-width:70%;}
.draw-stats-view-tabs,.draw-stats-metric-tabs{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px;}
.draw-stats-view-tabs button{
  padding:7px 11px;border:1px solid rgba(73,99,191,.18);border-radius:999px;
  background:rgba(255,255,255,.72);color:#485a78;font-size:10px;font-weight:850;cursor:pointer;
}
.draw-stats-view-tabs button.active{color:#fff;border-color:rgba(69,184,229,.46);background:linear-gradient(126deg,#0d617b,#2688a8 58%,#456bc0);}
.draw-stats-metric-tabs button{display:inline-flex!important;align-items:center;gap:1px;}
.draw-stats-chart-neutral-band{fill:rgba(108,129,183,.11);}
.draw-stats-chart-point.is-low-sample circle{fill:#fff;stroke:#9aa8bf;stroke-dasharray:3 2;opacity:.72;}
.draw-stats-chart-point.is-low-sample text{fill:#8b96a8;}
.draw-stats-diagnostic-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;}
.draw-stats-diagnostic-grid article{padding:14px;border:1px solid rgba(82,108,205,.15);border-radius:14px;background:linear-gradient(180deg,rgba(255,255,255,.88),rgba(239,245,255,.70));}
.draw-stats-diagnostic-grid span{display:block;font-size:9px;font-weight:850;letter-spacing:.09em;text-transform:uppercase;color:#6c7892;}
.draw-stats-diagnostic-grid strong{display:block;margin-top:6px;color:#17315d;font-size:14px;line-height:1.3;}
.draw-stats-diagnostic-grid small{display:block;margin-top:7px;color:#66758f;font-size:10px;line-height:1.45;}
@media(max-width:1280px){
  .draw-stats-intelligence-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
  .draw-stats-diagnostic-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:1000px){
  .horse-drilldown-modal-shell.is-draw-stats.fullscreen{padding:8px!important;}
  .horse-drilldown-modal-shell.is-draw-stats.fullscreen .horse-drilldown-modal{width:calc(100vw - 16px)!important;height:calc(100dvh - 16px)!important;max-height:calc(100dvh - 16px)!important;border-radius:16px!important;}
  .draw-stats-filter-grid{grid-template-columns:1fr!important;}
  .draw-stats-intelligence-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .draw-stats-chart-controls{max-width:100%;align-items:flex-start;}
  .draw-stats-view-tabs,.draw-stats-metric-tabs{justify-content:flex-start;}
}
@media(max-width:760px){
  .draw-stats-zone-section>header,.draw-stats-diagnostics>header{align-items:flex-start;flex-direction:column;}
  .draw-stats-zone-section>header p,.draw-stats-diagnostics>header p{text-align:left;}
  .draw-stats-intelligence-grid,.draw-stats-diagnostic-grid{grid-template-columns:1fr!important;}
  .draw-stats-zone-card dl{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
.draw-stats-table thead .draw-stats-help:after{top:calc(100% + 8px);bottom:auto;}


/* =====================================================================
   DRAW_STATS_002B — OBSERVED PATTERN / CONFIDENCE SPLIT + TOP SAFE AREA
   Scoped to Draw Stats only. No shared modal or application-grid changes.
   ===================================================================== */
.horse-drilldown-modal-shell.is-draw-stats.fullscreen{
  box-sizing:border-box!important;
  padding:20px 14px 14px!important;
  place-items:center!important;
}
.horse-drilldown-modal-shell.is-draw-stats.fullscreen .horse-drilldown-modal{
  width:min(1780px,calc(100vw - 28px))!important;
  height:100%!important;
  max-height:100%!important;
  border-radius:22px!important;
  overflow:hidden!important;
}
.horse-drilldown-modal-shell.is-draw-stats .horse-drilldown-modal-header{
  margin:0!important;
  padding:20px 28px 20px 42px!important;
  border-radius:20px 20px 0 0!important;
  flex:0 0 auto!important;
}
.horse-drilldown-modal-shell.is-draw-stats .horse-drilldown-body{
  padding-top:14px!important;
}
.draw-stats-intelligence-grid article small{
  line-height:1.4;
}
@media(max-width:1000px){
  .horse-drilldown-modal-shell.is-draw-stats.fullscreen{
    padding:14px 8px 8px!important;
  }
  .horse-drilldown-modal-shell.is-draw-stats.fullscreen .horse-drilldown-modal{
    width:calc(100vw - 16px)!important;
    height:100%!important;
    max-height:100%!important;
    border-radius:16px!important;
  }
  .horse-drilldown-modal-shell.is-draw-stats .horse-drilldown-modal-header{
    border-radius:14px 14px 0 0!important;
  }
}
@supports(padding:max(0px)){
  .horse-drilldown-modal-shell.is-draw-stats.fullscreen{
    padding-top:max(20px,env(safe-area-inset-top))!important;
    padding-right:max(14px,env(safe-area-inset-right))!important;
    padding-bottom:max(14px,env(safe-area-inset-bottom))!important;
    padding-left:max(14px,env(safe-area-inset-left))!important;
  }
}

/* =====================================================================
   DRAW_STATS_002C — UNIFIED STALL HEADER + VISIBLE NEUTRAL-RANGE LEGEND
   Scoped to Draw Stats only.
   ===================================================================== */
.draw-stats-table thead tr{
  background:#263f83;
}
.draw-stats-table thead th{
  background:#263f83!important;
  border-right:0!important;
  box-shadow:none!important;
}
.draw-stats-table thead th:first-child{
  border-top-left-radius:14px;
}
.draw-stats-table thead th:last-child{
  border-top-right-radius:14px;
}

.draw-stats-table-legend{
  align-items:center;
  gap:8px 10px!important;
}
.draw-stats-table-legend span{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:26px;
  padding:5px 9px;
  border:1px solid rgba(48,67,106,.13);
  border-radius:999px;
  background:rgba(234,240,250,.80);
  color:#33496e;
  line-height:1.15;
}
.draw-stats-table-legend span:before{
  width:10px!important;
  height:10px!important;
  margin-right:0!important;
  flex:0 0 10px;
  background:#304366!important;
  box-shadow:0 0 0 3px rgba(48,67,102,.10);
}
.draw-stats-table-legend .is-positive{
  color:#087247;
  border-color:rgba(19,138,88,.22);
  background:rgba(219,247,233,.82);
}
.draw-stats-table-legend .is-positive:before{
  background:#138a58!important;
  box-shadow:0 0 0 3px rgba(19,138,88,.12);
}
.draw-stats-table-legend .is-negative{
  color:#a92d40;
  border-color:rgba(194,65,79,.22);
  background:rgba(255,232,236,.84);
}
.draw-stats-table-legend .is-negative:before{
  background:#c2414f!important;
  box-shadow:0 0 0 3px rgba(194,65,79,.12);
}
.draw-stats-table-legend .is-insufficient{
  color:#707b8d;
  border-color:rgba(154,165,181,.28);
  background:rgba(242,245,248,.90);
}
.draw-stats-table-legend .is-insufficient:before{
  background:#9aa5b5!important;
  box-shadow:0 0 0 3px rgba(154,165,181,.13);
}

/* =====================================================================
   DRAW_STATS_002D — SAMPLE DEPTH + ZONE/STALL METRIC COLOURING
   Direction and evidence depth are separate. Scoped to Draw Stats only.
   ===================================================================== */
.draw-stats-table-legend .is-limited{
  color:#98620b;
  border-color:rgba(211,139,25,.28);
  background:rgba(255,245,218,.92);
}
.draw-stats-table-legend .is-limited:before{
  background:#d38b19!important;
  box-shadow:0 0 0 3px rgba(211,139,25,.14);
}

.draw-stats-metric-cell,
.draw-stats-zone-metric{
  position:relative;
}
.draw-stats-metric-cell.is-positive,
.draw-stats-zone-metric.is-positive{
  color:#08764a!important;
  background:rgba(218,247,233,.82)!important;
}
.draw-stats-metric-cell.is-negative,
.draw-stats-zone-metric.is-negative{
  color:#b1263d!important;
  background:rgba(255,231,235,.84)!important;
}
.draw-stats-metric-cell.is-neutral,
.draw-stats-zone-metric.is-neutral{
  color:#263e68!important;
  background:rgba(235,242,253,.72)!important;
}
.draw-stats-metric-cell.is-insufficient,
.draw-stats-zone-metric.is-insufficient{
  color:#9aa5b5!important;
  background:rgba(244,246,249,.78)!important;
}
.draw-stats-metric-cell.is-limited:after,
.draw-stats-zone-metric.is-limited:after{
  content:"";
  position:absolute;
  top:5px;
  right:5px;
  width:7px;
  height:7px;
  border-radius:50%;
  background:#d38b19;
  box-shadow:0 0 0 2px rgba(255,255,255,.80),0 0 0 3px rgba(211,139,25,.18);
}
.draw-stats-zone-card dl div{
  overflow:hidden;
}
.draw-stats-zone-card .draw-stats-zone-metric{
  margin:3px -4px -4px;
  padding:5px 4px 4px;
  border-radius:7px;
}
.draw-stats-chart-point.is-limited-sample circle{
  fill:#fff;
  stroke:#d38b19;
  stroke-dasharray:3 2;
  opacity:.90;
}
.draw-stats-chart-point.is-limited-sample text{
  fill:#8d671e;
}
.draw-stats-chart-point.is-insufficient-sample circle{
  fill:#f4f6f9;
  stroke:#9aa8bf;
  stroke-dasharray:3 2;
  opacity:.62;
}
.draw-stats-chart-point.is-insufficient-sample text{
  fill:#9aa5b5;
}

/* =====================================================================
   DRAW_STATS_002E — READABLE TYPOGRAPHY + RESPONSIVE FULLSCREEN TABLE
   Draw Stats only. Preserves the current default-fullscreen interaction.
   ===================================================================== */

/* Use more of a 2K/large desktop viewport while retaining a bounded premium shell. */
.horse-drilldown-modal-shell.is-draw-stats.fullscreen .horse-drilldown-modal{
  width:min(2200px,calc(100vw - 28px))!important;
  max-width:2200px!important;
}

/* General Draw Stats content: one readable step up without changing hierarchy. */
.draw-stats-context-title span{font-size:12px;}
.draw-stats-context-title small{font-size:12px;}
.draw-stats-context-grid span{font-size:11px;}
.draw-stats-context-grid strong{font-size:15px;}

.draw-stats-filter-deck>header h3,
.draw-stats-chart-card>header h3,
.draw-stats-table-card>header h3,
.draw-stats-zone-section>header h3,
.draw-stats-diagnostics>header h3{font-size:19px;}

.draw-stats-filter-deck>header p,
.draw-stats-table-card>header p,
.draw-stats-zone-section>header p,
.draw-stats-diagnostics>header p{font-size:13px;}

.draw-stats-filter-heading strong{font-size:13px;}
.draw-stats-filter-heading small{font-size:11px;}
.draw-stats-chip{min-height:36px;font-size:12px;padding:8px 12px;}
.draw-stats-chip em{font-size:10px;}

.draw-stats-intelligence-grid span{font-size:10px;}
.draw-stats-intelligence-grid strong{font-size:16px;}
.draw-stats-intelligence-grid small{font-size:11px;}
.draw-stats-written-summary{font-size:14px;line-height:1.62;}

.draw-stats-view-tabs button,
.draw-stats-metric-tabs button{font-size:11px;}
.draw-stats-chart-neutral-label,
.draw-stats-chart-y-label,
.draw-stats-chart-point text{font-size:12px;}

.draw-stats-diagnostic-grid span{font-size:10px;}
.draw-stats-diagnostic-grid strong{font-size:15px;}
.draw-stats-diagnostic-grid small{font-size:11px;}
.draw-stats-method-note{font-size:12px;}
.draw-stats-method-note strong{font-size:10px;}

/* Low / Middle / High cards: labels +1px, principal numbers +2px. */
.draw-stats-zone-card .horse-profile-kicker{font-size:12px;}
.draw-stats-zone-card h4{font-size:20px;}
.draw-stats-zone-card dt{font-size:9px;}
.draw-stats-zone-card dd{font-size:14px;line-height:1.2;}
.draw-stats-zone-card .draw-stats-zone-metric{padding-top:6px;padding-bottom:5px;}

/* Legend and table values: readable without shrinking the analytical content. */
.draw-stats-table-legend{font-size:11px;}
.draw-stats-table{
  min-width:1120px!important;
  font-size:12px;
}
.draw-stats-table thead th{
  height:58px;
  padding:10px 8px;
  font-size:11px;
  line-height:1.08!important;
  vertical-align:middle!important;
}
.draw-stats-table thead th>span{
  display:inline-block;
  vertical-align:middle;
}
.draw-stats-table thead .draw-stats-help{
  width:17px;
  height:17px;
  margin-left:4px;
  font-size:10px;
  vertical-align:middle;
}
.draw-stats-table tbody th,
.draw-stats-table tbody td{
  padding:11px 9px;
  font-size:12px;
  line-height:1.25;
}
.draw-stats-table tbody th{font-size:14px;}

/* Wide fullscreen: keep compact technical headers on one aligned row. */
@media(min-width:1500px){
  .horse-drilldown-modal-shell.is-draw-stats.fullscreen .draw-stats-table{
    min-width:1180px!important;
    font-size:13px;
  }
  .horse-drilldown-modal-shell.is-draw-stats.fullscreen .draw-stats-table thead th{
    height:50px;
    padding:10px 9px;
    font-size:12px;
    white-space:nowrap!important;
    line-height:1.2!important;
  }
  .horse-drilldown-modal-shell.is-draw-stats.fullscreen .draw-stats-table thead th br{
    display:none;
  }
  .horse-drilldown-modal-shell.is-draw-stats.fullscreen .draw-stats-table tbody th,
  .horse-drilldown-modal-shell.is-draw-stats.fullscreen .draw-stats-table tbody td{
    font-size:13px;
  }
  .horse-drilldown-modal-shell.is-draw-stats.fullscreen .draw-stats-table tbody th{
    font-size:14px;
  }
}

/* Laptop/tablet: retain readable type and let only the table own horizontal overflow. */
@media(max-width:1200px){
  .draw-stats-zone-card dl{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .draw-stats-table-wrap{
    overflow-x:auto;
    overscroll-behavior-x:contain;
    scrollbar-gutter:stable;
  }
  .draw-stats-table{min-width:1060px!important;}
  .draw-stats-table thead th{height:58px;}
}

@media(max-width:760px){
  .draw-stats-chip{font-size:11px;}
  .draw-stats-written-summary{font-size:13px;}
  .draw-stats-zone-card h4{font-size:19px;}
  .draw-stats-zone-card dd{font-size:14px;}
  .draw-stats-table{font-size:12px;}
}


/* PRO_CANVAS_PHASE2_D3 — read-only Apply experiment history */
.pro-experiment-history-compact{margin-top:14px;padding-top:14px;border-top:1px solid rgba(99,125,255,.16)}
.pro-experiment-history-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.pro-experiment-history-heading>div{display:flex;flex-direction:column;gap:2px}
.pro-experiment-history-heading strong{color:#10213d;font-size:13px}
.pro-experiment-history-heading span{color:#6b7f99;font-size:10px;font-weight:700}
.pro-experiment-history-compact-list{display:grid;gap:8px;max-height:460px;overflow:auto;padding-right:3px}
.pro-experiment-history-empty{padding:18px;border:1px dashed rgba(99,125,255,.24);border-radius:14px;background:rgba(255,255,255,.55);color:#6b7f99;font-size:11px;font-weight:750;text-align:center}
.pro-experiment-history-empty.is-error{color:#9f1239;border-color:rgba(225,29,72,.24);background:rgba(255,241,242,.78)}
.pro-experiment-card{border:1px solid rgba(99,125,255,.18);border-radius:18px;background:linear-gradient(180deg,rgba(255,255,255,.88),rgba(244,248,255,.74));box-shadow:0 12px 30px rgba(17,24,39,.07),inset 0 1px 0 rgba(255,255,255,.65);padding:14px}
.pro-experiment-card.is-compact{padding:11px;border-radius:14px}
.pro-experiment-card header{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.pro-experiment-card header>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.pro-experiment-card header strong{font-size:11px;color:#10213d}
.pro-experiment-card header em{font-size:10px;color:#6b7f99;font-style:normal;font-weight:800}
.pro-experiment-entity{display:inline-flex;align-items:center;min-height:23px;padding:3px 8px;border-radius:999px;background:linear-gradient(135deg,#0f172a,#2948d1 56%,#3cc7d8);color:#fff;font-size:9px;font-weight:950;letter-spacing:.08em;text-transform:uppercase}
.pro-experiment-entity[data-entity="DAMSIRE"]{background:linear-gradient(135deg,#24104f,#6d28d9 58%,#c026d3)}
.pro-experiment-summary{margin:8px 0;color:#435b78;font-size:10.5px;line-height:1.45;font-weight:720}
.pro-experiment-changes{display:grid;gap:7px;margin:8px 0}
.pro-experiment-query-change{padding:8px 10px;border-radius:11px;background:rgba(237,243,255,.75);border:1px solid rgba(99,125,255,.12)}
.pro-experiment-query-change strong{font-size:10px;color:#1d3f86;margin-right:6px}
.pro-experiment-query-change>span{font-size:9px;color:#6b7f99}
.pro-experiment-query-change ul{margin:5px 0 0 16px;padding:0;color:#435b78;font-size:9.5px;line-height:1.4}
.pro-experiment-more,.pro-experiment-no-change{font-size:9.5px;color:#6b7f99;font-weight:750}
.pro-experiment-metrics{overflow:auto;border:1px solid rgba(99,125,255,.12);border-radius:11px}
.pro-experiment-metrics table{width:100%;border-collapse:collapse;font-size:9.5px}
.pro-experiment-metrics th,.pro-experiment-metrics td{padding:6px 7px;border-bottom:1px solid rgba(99,125,255,.10);text-align:right;white-space:nowrap}
.pro-experiment-metrics th{text-align:left;color:#435b78;background:rgba(239,244,255,.72)}
.pro-experiment-metrics thead th{text-align:right;color:#1d3f86;font-weight:900}
.pro-experiment-metrics thead th:first-child{text-align:left}
.pro-experiment-metrics tr:last-child th,.pro-experiment-metrics tr:last-child td{border-bottom:0}
.pro-experiment-metrics .is-positive{color:#047857;font-weight:900}.pro-experiment-metrics .is-negative{color:#be123c;font-weight:900}.pro-experiment-metrics .is-neutral{color:#6b7f99}
.pro-experiment-detail-button{margin-top:8px;border:0;background:transparent;color:#1d4ed8;font-size:10px;font-weight:900;cursor:pointer;padding:3px 0}
.pro-experiment-history-modal{position:fixed;inset:0;z-index:10030;display:grid;place-items:center;padding:18px}
.pro-experiment-history-modal.hidden{display:none}
.pro-experiment-history-backdrop{position:absolute;inset:0;background:rgba(5,13,31,.66);backdrop-filter:blur(8px)}
.pro-experiment-history-dialog{position:relative;display:flex;flex-direction:column;width:min(1180px,96vw);height:min(900px,94vh);overflow:hidden;border-radius:28px;border:1px solid rgba(115,140,255,.42);background:radial-gradient(circle at 3% 7%,rgba(34,211,238,.10),transparent 23%),radial-gradient(circle at 94% 5%,rgba(124,58,237,.13),transparent 26%),linear-gradient(180deg,#f4f7ff 0%,#eef4ff 46%,#f7faff 100%);box-shadow:0 34px 88px rgba(15,23,42,.34),inset 0 1px 0 rgba(255,255,255,.72)}
.pro-experiment-history-dialog-header{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;padding:18px 20px;border-bottom:1px solid rgba(99,125,255,.18);background:rgba(255,255,255,.72)}
.pro-experiment-history-dialog-header h2{margin:3px 0;color:#10213d}.pro-experiment-history-dialog-header p{margin:0;color:#435b78;font-size:11px}
.pro-experiment-history-filters{display:flex;gap:7px;padding:11px 20px;border-bottom:1px solid rgba(99,125,255,.14)}
.pro-experiment-history-filters button{border:1px solid rgba(99,125,255,.20);border-radius:999px;background:rgba(255,255,255,.78);color:#1d3f86;font-size:10px;font-weight:900;padding:7px 12px;cursor:pointer}
.pro-experiment-history-filters button.is-active{background:linear-gradient(135deg,#0f172a,#2948d1 56%,#3cc7d8);color:#fff;border-color:transparent}
.pro-experiment-history-full-list{flex:1;overflow:auto;display:grid;align-content:start;gap:12px;padding:16px 20px}
.pro-experiment-history-dialog footer{padding:11px 20px;border-top:1px solid rgba(99,125,255,.14);text-align:center;background:rgba(255,255,255,.68)}
body.pro-experiment-history-open{overflow:hidden}
@media(max-width:900px){.pro-experiment-history-dialog{width:98vw;height:96vh;border-radius:20px}.pro-experiment-history-dialog-header{padding:14px;flex-direction:column}.pro-experiment-history-full-list{padding:12px}.pro-experiment-card header{flex-direction:column}.pro-experiment-metrics table{min-width:540px}}


/* ========================================================================
   PRO CANVAS PHASE 2 D3-H1 — Experiment History layout, modal and scope fix
   Moves compact history into the existing right control deck, keeps the query
   grid visible, lifts full history above the workspace, and adds user-wide
   read-only history while retaining current-run filtering.
   ======================================================================== */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-tabs{
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel-history,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel-history.is-active{
  height:300px!important;
  min-height:300px!important;
  max-height:300px!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr)!important;
  gap:10px!important;
  overflow:hidden!important;
  padding:14px 16px 16px!important;
}
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel-history[hidden],
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-panel-history:not(.is-active){
  display:none!important;
}
.pro-experiment-history-tab-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  min-width:0;
}
.pro-experiment-history-tab-toolbar .pro-sire-deck-copy{
  justify-content:flex-start!important;
  text-align:left!important;
  margin:0!important;
  min-width:0;
}
.pro-experiment-history-tab-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex:0 0 auto;
}
.pro-experiment-history-scope,
.pro-experiment-history-filter-group{
  display:flex;
  align-items:center;
  gap:6px;
}
.pro-experiment-history-scope button,
.pro-experiment-history-filter-group button{
  border:1px solid rgba(99,125,255,.20);
  border-radius:999px;
  background:rgba(255,255,255,.86);
  color:#1d3f86;
  font-size:10px;
  font-weight:900;
  padding:7px 11px;
  cursor:pointer;
}
.pro-experiment-history-scope button.is-active,
.pro-experiment-history-filter-group button.is-active{
  background:linear-gradient(135deg,#0f172a,#2948d1 56%,#3cc7d8);
  border-color:transparent;
  color:#fff;
}
#proSireQueryGridPanel .pro-sire-deck-panel-history .pro-experiment-history-compact-list{
  min-height:0;
  max-height:none;
  height:100%;
  overflow:auto;
  padding:1px 4px 1px 1px;
  align-content:start;
}
#proSireQueryGridPanel .pro-sire-deck-panel-history .pro-experiment-card.is-compact{
  margin:0;
}
.pro-experiment-run{
  display:inline-flex;
  align-items:center;
  min-height:20px;
  padding:3px 8px;
  border-radius:999px;
  background:rgba(226,232,240,.88);
  color:#334155;
  font-size:9px;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.pro-experiment-history-modal{
  z-index:2147483646!important;
}
.pro-experiment-history-filter-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:11px 20px;
  border-bottom:1px solid rgba(99,125,255,.14);
  background:rgba(255,255,255,.52);
}
.pro-experiment-history-filter-group span{
  color:#64748b;
  font-size:9px;
  font-weight:950;
  letter-spacing:.1em;
  text-transform:uppercase;
}
@media(max-width:1100px){
  #proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-control-deck-consolidated .pro-sire-deck-tabs{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  .pro-experiment-history-tab-toolbar,
  .pro-experiment-history-filter-bar{
    align-items:stretch;
    flex-direction:column;
  }
  .pro-experiment-history-tab-actions{
    justify-content:space-between;
  }
}


/* D3-H2 — keep the genuine unsaved-change navigation guard above the full-screen breeding workspace. */
.pro-sire-unsaved-dialog{z-index:2147483645!important}

/* ========================================================================== */
/* PRO CANVAS D4 — visual hierarchy + applied Component Performance           */
/* Scope is deliberately local to the full Pro breeding workspace.            */
/* ========================================================================== */

.pro-sire-query-grid-panel.pro-sire-workspace-open{
  --pro-d4-line: rgba(74,108,248,.20);
  --pro-d4-soft: rgba(245,248,255,.86);
  --pro-d4-text: #10213d;
  --pro-d4-muted: #5b6f8d;
  --pro-d4-shadow: 0 14px 34px rgba(17,24,39,.08);
}

.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-top{
  min-height: 82px!important;
  padding: 10px 16px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-title-block h2{
  font-size: 19px!important;
  line-height: 1.05!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-title-block p{
  font-size: 10.5px!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-summary{
  margin: 8px 0 10px!important;
}

.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-main-stage{
  display:grid;
  grid-template-columns:minmax(300px,28%) minmax(0,1fr);
  gap:12px;
  align-items:stretch;
  margin:0 0 12px;
}

.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-overview{
  display:block!important;
  margin:0!important;
  min-width:0;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-overview[hidden]{display:none!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-outcome-rail-list{
  height:100%;
  display:grid;
  grid-template-rows:repeat(3,minmax(0,1fr));
  gap:8px;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-outcome-card{
  position:relative;
  min-width:0;
  padding:11px 13px 10px 15px;
  border:1px solid var(--pro-d4-line);
  border-radius:16px;
  background:linear-gradient(145deg,rgba(255,255,255,.93),rgba(244,248,255,.80));
  box-shadow:var(--pro-d4-shadow),inset 0 1px 0 rgba(255,255,255,.75);
  overflow:hidden;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-outcome-card::before{
  content:"";
  position:absolute;
  left:0;top:0;bottom:0;width:5px;
  background:linear-gradient(180deg,#58d9ff,#4a71ed);
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-outcome-card.is-after::before{background:linear-gradient(180deg,#44d7a8,#0ea879);}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-outcome-card.is-negative::before{background:linear-gradient(180deg,#ff6884,#ec3e69);}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-outcome-card header{
  display:flex;align-items:flex-start;justify-content:space-between;gap:8px;
  margin:0 0 5px;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-outcome-card header div{display:grid;gap:1px;min-width:0;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-outcome-card header span{
  color:#19738a;font-size:8.5px;font-weight:900;letter-spacing:.12em;text-transform:uppercase;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-outcome-card header strong{
  color:var(--pro-d4-text);font-size:13.5px;line-height:1.05;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-outcome-card header em{
  color:var(--pro-d4-muted);font-size:9px;font-style:normal;font-weight:800;white-space:nowrap;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-outcome-value{
  display:flex;align-items:baseline;gap:8px;margin:0 0 6px;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-outcome-value .pro-sire-money{
  font-size:22px!important;line-height:1!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-outcome-value small{
  color:var(--pro-d4-muted);font-size:8.5px;font-weight:850;letter-spacing:.06em;text-transform:uppercase;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-outcome-metrics{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-outcome-metrics>span{
  display:grid;gap:1px;padding:5px 6px;border:1px solid rgba(97,121,189,.14);border-radius:9px;background:rgba(248,251,255,.88);min-width:0;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-outcome-metrics b{
  color:var(--pro-d4-text);font-size:10.5px;line-height:1;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-outcome-metrics em{
  color:var(--pro-d4-muted);font-size:7.5px;font-style:normal;font-weight:850;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}

.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-control-deck{
  margin:0!important;
  min-width:0;
  border:1px solid var(--pro-d4-line)!important;
  border-radius:18px!important;
  background:linear-gradient(180deg,rgba(255,255,255,.88),rgba(246,249,255,.76))!important;
  box-shadow:var(--pro-d4-shadow),inset 0 1px 0 rgba(255,255,255,.72)!important;
  overflow:hidden;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v3{
  height:100%;min-height:326px;border:0!important;background:transparent!important;box-shadow:none!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-deck-tabs{
  display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:0!important;border-bottom:1px solid rgba(83,116,209,.20);background:rgba(237,244,255,.72);
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-deck-tab{
  min-height:38px!important;padding:8px 6px!important;border:0!important;border-right:1px solid rgba(83,116,209,.18)!important;border-radius:0!important;
  background:transparent!important;color:#25446f!important;font-size:9.5px!important;font-weight:900!important;letter-spacing:.06em!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-deck-tab:last-child{border-right:0!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-deck-tab.is-active{
  color:#10213d!important;background:rgba(255,255,255,.95)!important;box-shadow:inset 0 -3px 0 #2f62d5!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-deck-panel{
  min-height:286px!important;max-height:326px!important;padding:10px 12px!important;overflow:auto!important;background:transparent!important;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-performance-head{
  display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-deck-copy strong{font-size:11px!important;color:var(--pro-d4-text);}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-deck-copy span{font-size:9.5px!important;color:var(--pro-d4-muted);}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-performance-view-switch{
  display:flex;gap:4px;padding:3px;border:1px solid rgba(67,105,206,.20);border-radius:12px;background:rgba(235,242,255,.8);flex:none;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-performance-view-switch button{
  border:0;border-radius:9px;padding:6px 12px;background:transparent;color:#36557f;font-size:9.5px;font-weight:900;cursor:pointer;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-performance-view-switch button.is-active{
  background:linear-gradient(135deg,#12244d,#315fd7 70%,#27a8c9);color:#fff;box-shadow:0 7px 16px rgba(37,99,235,.20);
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-performance-view[hidden]{display:none!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-family-comparison-panel{margin:0!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-family-comparison-note,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-component-performance-note{
  margin:0 0 6px;color:var(--pro-d4-muted);font-size:9px;line-height:1.25;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-family-comparison-table,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-component-performance-table,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-component-query-table{
  width:100%;border-collapse:separate;border-spacing:0;font-size:9.5px;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-family-comparison-table th,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-family-comparison-table td,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-component-performance-table th,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-component-performance-table td,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-component-query-table th,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-component-query-table td{
  padding:6px 7px!important;border-bottom:1px solid rgba(78,101,170,.12);text-align:right;white-space:nowrap;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-family-comparison-table th:first-child,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-component-performance-table th:first-child,
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-component-query-table th:first-child{text-align:left;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-component-group{margin:0 0 8px;border:1px solid rgba(74,108,248,.14);border-radius:12px;overflow:hidden;background:rgba(255,255,255,.72);}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-component-group>header{padding:6px 8px;background:rgba(232,240,255,.76);border-bottom:1px solid rgba(74,108,248,.14);}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-component-group>header strong{font-size:9px;letter-spacing:.10em;text-transform:uppercase;color:#264a82;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-component-summary-row>th button{
  width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px;border:0;background:transparent;padding:0;color:#193d78;font:inherit;font-weight:850;cursor:pointer;text-align:left;
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-component-summary-row>th button em{font-size:8px;color:#687c99;font-style:normal;font-weight:750;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-component-summary-row.is-expanded{background:rgba(228,239,255,.65);}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-component-detail-row[hidden]{display:none!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-component-detail-row>td{padding:8px!important;background:#f7f9ff;text-align:left!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-component-query-table th{white-space:normal!important;min-width:180px;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-component-query-table th button{border:0;background:transparent;color:#174ea6;font-weight:900;cursor:pointer;padding:0 5px 0 0;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-component-query-table th span{display:block;color:#64738b;font-size:8px;font-weight:650;margin-top:2px;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-component-performance-empty{padding:20px;text-align:center;color:#657894;font-size:10px;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-component-performance-empty.is-error{color:#b42335;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-focus-tools{margin-top:8px;border-top:1px solid rgba(74,108,248,.14);padding-top:6px;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-focus-tools>summary{cursor:pointer;color:#34547c;font-size:9px;font-weight:850;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-focus-tools[open]>summary{margin-bottom:7px;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-focus-tools .pro-sire-pause-focus-layout{padding:7px;border-radius:10px;background:rgba(240,245,255,.72);}

.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-table-tools{
  margin-top:0!important;padding:8px 10px!important;border-radius:14px 14px 0 0!important;
  position:sticky;top:0;z-index:14;background:rgba(247,251,255,.96)!important;backdrop-filter:blur(10px) saturate(130%);
}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-table-tools-copy strong{font-size:10px!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-table-tools-copy span{font-size:8.5px!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-grid-primary-actions{display:flex;gap:7px;align-items:center;flex:none;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table{font-size:11px!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table thead th{font-size:9px!important;letter-spacing:.04em!important;}
.pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-query-grid-table td{padding-top:7px!important;padding-bottom:7px!important;}

/* Experiment History master-detail */
.pro-experiment-history-dialog{
  width:min(1560px,95vw)!important;height:min(900px,90vh)!important;max-width:none!important;
}
.pro-experiment-history-master-detail{
  min-height:0;display:grid;grid-template-columns:minmax(280px,330px) minmax(0,1fr);gap:0;flex:1;overflow:hidden;border-top:1px solid rgba(80,110,185,.16);
}
.pro-experiment-history-timeline-shell{display:flex;flex-direction:column;min-height:0;border-right:1px solid rgba(80,110,185,.18);background:rgba(241,246,255,.78);}
.pro-experiment-history-timeline{min-height:0;overflow:auto;padding:10px;display:grid;align-content:start;gap:7px;}
.pro-experiment-history-timeline-shell footer{padding:8px;border-top:1px solid rgba(80,110,185,.16);}
.pro-experiment-timeline-item{display:grid;gap:5px;width:100%;padding:10px;border:1px solid rgba(83,112,190,.16);border-radius:12px;background:rgba(255,255,255,.82);color:#183559;text-align:left;cursor:pointer;}
.pro-experiment-timeline-item:hover{background:#fff;border-color:rgba(49,95,215,.34);}
.pro-experiment-timeline-item.is-selected{border-color:#315fd7;background:linear-gradient(145deg,#fff,#edf3ff);box-shadow:inset 4px 0 0 #315fd7,0 8px 18px rgba(37,99,235,.10);}
.pro-experiment-timeline-item>span{display:flex;justify-content:space-between;gap:6px;align-items:center;}
.pro-experiment-timeline-item>span b{font-size:9px;text-transform:uppercase;letter-spacing:.08em;color:#174ea6;}
.pro-experiment-timeline-item>span em{font-size:8.5px;font-style:normal;color:#6a7890;}
.pro-experiment-timeline-item>strong{font-size:10px;line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.pro-experiment-timeline-item>small{font-size:8.5px;color:#6a7890;}
.pro-experiment-timeline-item>div{display:flex;gap:10px;color:#405a7e;font-size:8.5px;font-weight:800;}
.pro-experiment-history-detail{min-height:0;overflow:auto;padding:14px 16px;background:linear-gradient(180deg,#fbfcff,#f5f8ff);}
.pro-experiment-detail>header{display:grid;gap:7px;margin-bottom:14px;padding-bottom:12px;border-bottom:1px solid rgba(80,110,185,.17);}
.pro-experiment-detail>header>div{display:flex;align-items:center;gap:9px;flex-wrap:wrap;}
.pro-experiment-detail>header strong{font-size:12px;color:#10213d;}
.pro-experiment-detail>header em{font-size:9px;color:#62728c;font-style:normal;font-weight:800;}
.pro-experiment-detail>header p{margin:0;color:#405673;font-size:10px;line-height:1.35;}
.pro-experiment-detail section{margin:0 0 16px;}
.pro-experiment-detail h3{margin:0 0 7px;color:#153b78;font-size:10px;letter-spacing:.08em;text-transform:uppercase;}
.pro-experiment-change-table{width:100%;border-collapse:separate;border-spacing:0;font-size:9.5px;border:1px solid rgba(80,110,185,.16);border-radius:12px;overflow:hidden;background:#fff;}
.pro-experiment-change-table th,.pro-experiment-change-table td{padding:7px 8px;border-bottom:1px solid rgba(80,110,185,.12);text-align:left;}
.pro-experiment-change-table thead th{background:#edf3ff;color:#21477f;font-size:8.5px;text-transform:uppercase;letter-spacing:.07em;}
.pro-experiment-change-table tbody th{width:220px;color:#164a99;}
.pro-experiment-change-table tbody th span{display:block;font-size:8px;color:#697a95;font-weight:600;margin-top:2px;}
.pro-experiment-detail .pro-experiment-metrics table{font-size:10px;}

@media (max-width:1450px){
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-main-stage{grid-template-columns:minmax(285px,32%) minmax(0,1fr);}
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-outcome-metrics{grid-template-columns:repeat(2,minmax(0,1fr));}
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-control-deck-card-v3{min-height:358px;}
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-deck-panel{max-height:358px;}
}
@media (max-width:1100px){
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-workspace-main-stage{grid-template-columns:1fr;}
  .pro-sire-query-grid-panel.pro-sire-workspace-open .pro-sire-outcome-rail-list{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:1fr;}
  .pro-experiment-history-master-detail{grid-template-columns:1fr;grid-template-rows:210px minmax(0,1fr);}
  .pro-experiment-history-timeline-shell{border-right:0;border-bottom:1px solid rgba(80,110,185,.18);}
}


/* ========================================================================== */
/* PRO CANVAS D4-H2 — usability, confirmation and history refinement          */
/* ========================================================================== */
/* D4-H4: the obsolete D4-H2 header/deck geometry was retired.
   The authoritative component-local layout now lives in proBreedingCanvas.css. */
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family-chip.is-active,
#proSireQueryGridPanel.pro-sire-workspace-open .pro-sire-rule-activation-family-chip[aria-pressed="true"]{color:#fff!important;text-shadow:0 1px 4px rgba(0,0,0,.34)!important;font-weight:950!important;}
.pro-breeding-apply-toast{position:fixed;left:50%;top:46%;z-index:2147483646;display:grid;gap:5px;min-width:min(520px,82vw);padding:20px 26px;border:1px solid rgba(111,183,255,.48);border-radius:20px;background:linear-gradient(135deg,rgba(8,27,66,.98),rgba(39,83,201,.97) 58%,rgba(24,176,188,.94));box-shadow:0 26px 70px rgba(6,18,48,.42),inset 0 1px 0 rgba(255,255,255,.28);color:#fff;text-align:center;transform:translate(-50%,-50%) scale(.94);opacity:0;pointer-events:none;transition:opacity .2s ease,transform .2s ease;}
.pro-breeding-apply-toast.is-visible{opacity:1;transform:translate(-50%,-50%) scale(1);}
.pro-breeding-apply-toast strong{font-size:24px;line-height:1.15;}
.pro-breeding-apply-toast span{font-size:12px;font-weight:800;color:rgba(235,247,255,.92);}
.pro-experiment-headline-deltas{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:8px 0;}
.pro-experiment-headline-deltas>span{display:grid;gap:2px;padding:8px 9px;border:1px solid rgba(80,110,185,.16);border-radius:10px;background:rgba(248,251,255,.92);}
.pro-experiment-headline-deltas em{font-size:9px;font-style:normal;font-weight:800;color:#63748e;}
.pro-experiment-headline-deltas b{font-size:12px;color:#173c77;}
.pro-experiment-compact-detail,.pro-experiment-detail-changes{margin-top:8px;border:1px solid rgba(80,110,185,.16);border-radius:11px;background:rgba(246,249,255,.78);}
.pro-experiment-compact-detail>summary,.pro-experiment-detail-changes>summary{cursor:pointer;padding:9px 11px;color:#244d89;font-size:10px;font-weight:900;}
.pro-experiment-compact-detail[open]>summary,.pro-experiment-detail-changes[open]>summary{border-bottom:1px solid rgba(80,110,185,.14);}
.pro-experiment-compact-detail .pro-experiment-changes,.pro-experiment-compact-detail .pro-experiment-metrics{padding:9px;}
.pro-experiment-detail-changes>section{padding:12px;margin:0!important;}
.pro-experiment-card.is-compact .pro-experiment-summary{font-size:10.5px!important;line-height:1.4!important;}
.pro-experiment-detail>header strong{font-size:14px!important;}
.pro-experiment-detail>header p{font-size:12px!important;line-height:1.45!important;}
.pro-experiment-detail h3{font-size:11px!important;}
.pro-experiment-change-table{font-size:11px!important;}
.pro-experiment-change-table thead th{font-size:9.5px!important;}
.pro-experiment-change-table th,.pro-experiment-change-table td{padding:9px 10px!important;}
.pro-experiment-detail .pro-experiment-metrics table{font-size:11.5px!important;}
.pro-experiment-timeline-item>strong{font-size:11px!important;}
.pro-experiment-timeline-item>small,.pro-experiment-timeline-item>div{font-size:9.5px!important;}
@media(max-width:1200px){
  .pro-experiment-headline-deltas{grid-template-columns:repeat(2,minmax(0,1fr));}
}

/* PRO_CANVAS_PHASE4_B1: explicit dual-range drag handles.
   Native pseudo-element thumbs remain keyboard inputs but no longer own pointer dragging. */
.dual-range.has-explicit-range-handles input[type="range"] {
  pointer-events: none !important;
}
.dual-range.has-explicit-range-handles input[type="range"]::-webkit-slider-thumb {
  opacity: 0 !important;
  pointer-events: none !important;
}
.dual-range.has-explicit-range-handles input[type="range"]::-moz-range-thumb {
  opacity: 0 !important;
  pointer-events: none !important;
}
.dual-range-explicit-handle {
  position: absolute;
  top: 50%;
  z-index: 8;
  width: 18px;
  height: 18px;
  border: 4px solid #0891b2;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(15,23,42,.22);
  transform: translate(-50%, -50%);
  cursor: ew-resize;
  touch-action: none;
  pointer-events: auto;
}
.dual-range-explicit-handle.is-max { border-color: #dc2626; }
.dual-range.is-range-dragging .dual-range-explicit-handle { box-shadow: 0 0 0 5px rgba(14,165,233,.13), 0 5px 14px rgba(15,23,42,.22); }
.dual-range.is-range-dragging .dual-range-explicit-handle.is-max { box-shadow: 0 0 0 5px rgba(220,38,38,.10), 0 5px 14px rgba(15,23,42,.22); }


/* =====================================================================
   LIVE_RACING_002BP — Race Profile manual-check containment and race-level
   Draw Stats tab. Component-scoped; no global application-grid overrides.
   ===================================================================== */

/* Five runner evidence actions: H | S | DS | T | J. Draw Stats is race-level. */
#page-live-racing .live-runner-profile-actions.live-runner-evidence-grid,
#page-live-racing .live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid{
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:7px!important;
  min-width:0!important;
  max-width:none!important;
  padding-left:8px!important;
  padding-right:8px!important;
  border-left:1px solid rgba(82,108,205,.13)!important;
  border-right:0!important;
}
#page-live-racing .live-runner-profile-actions.live-runner-evidence-grid button,
#page-live-racing .live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid button{
  min-width:0!important;
  min-height:34px!important;
  padding:7px 5px!important;
  white-space:nowrap!important;
}
@media(max-width:1500px){
  #page-live-racing .live-runner-profile-actions.live-runner-evidence-grid,
  #page-live-racing .live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid{
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    max-width:none!important;
  }
}
@media(max-width:1100px){
  #page-live-racing .live-runner-profile-actions.live-runner-evidence-grid,
  #page-live-racing .live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid{
    grid-template-columns:repeat(5,minmax(44px,1fr))!important;
  }
}
@media(max-width:620px){
  #page-live-racing .live-runner-profile-actions.live-runner-evidence-grid,
  #page-live-racing .live-runner-main-001l .live-runner-profile-actions.live-runner-evidence-grid{
    grid-template-columns:repeat(3,minmax(52px,1fr))!important;
    max-width:100%!important;
  }
}

/* Card | Overlays | Draw Stats | Stats | Form. */
#page-live-racing .live-racecard-mode-tabs{
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
}

/* Draw Stats is now a full page inside the selected Live Racing race. */
#page-live-racing .live-draw-stats-page{
  --draw-navy:#071a3d;
  --draw-blue:#2354b9;
  --draw-cyan:#22d3ee;
  --draw-violet:#7c3aed;
  --draw-text:#12213a;
  --draw-muted:#64748b;
  --draw-line:rgba(77,105,204,.18);
  min-height:calc(100dvh - 250px);
  margin:0 24px 24px;
  border:1px solid rgba(79,108,216,.20);
  border-radius:18px;
  overflow:hidden;
  background:
    radial-gradient(circle at 4% 2%,rgba(34,211,238,.07),transparent 26%),
    radial-gradient(circle at 96% 0%,rgba(124,58,237,.07),transparent 28%),
    linear-gradient(180deg,rgba(255,255,255,.94),rgba(240,246,255,.82));
  box-shadow:0 20px 46px rgba(26,45,91,.10),inset 0 1px 0 rgba(255,255,255,.82);
}
#page-live-racing .live-draw-stats-page-header{
  display:flex;
  align-items:center;
  min-height:88px;
  padding:18px 24px;
  color:#fff;
  background:
    radial-gradient(circle at 90% 0%,rgba(34,211,238,.28),transparent 34%),
    linear-gradient(128deg,#071a3d,#2449aa 57%,#386fd0 78%,#29aeb8);
  border-bottom:1px solid rgba(255,255,255,.16);
}
#page-live-racing .live-draw-stats-page-header span{
  display:block;
  margin-bottom:4px;
  color:#9ff4ff;
  font-size:10px;
  font-weight:950;
  letter-spacing:.14em;
  text-transform:uppercase;
}
#page-live-racing .live-draw-stats-page-header h2{
  margin:0;
  color:#fff;
  font-size:28px;
  line-height:1.08;
  letter-spacing:-.035em;
}
#page-live-racing .live-draw-stats-page-header p{
  margin:6px 0 0;
  color:rgba(232,241,255,.88);
  font-size:12px;
  font-weight:760;
}
#page-live-racing .live-draw-stats-page-body{
  padding:14px;
}
#page-live-racing .live-draw-stats-page .draw-stats-evidence{
  padding:0!important;
}
#page-live-racing .live-draw-stats-page .horse-drilldown-loading,
#page-live-racing .live-draw-stats-page .horse-drilldown-error{
  min-height:300px;
  border-radius:16px;
}
@media(max-width:900px){
  #page-live-racing .live-draw-stats-page{margin:0 12px 16px;border-radius:15px;}
  #page-live-racing .live-draw-stats-page-header{min-height:76px;padding:15px 17px;}
  #page-live-racing .live-draw-stats-page-header h2{font-size:23px;}
  #page-live-racing .live-draw-stats-page-body{padding:9px;}
}

/* Viewport-level manual-check panel: never clipped by the runner table. */
.live-manual-warning-trigger{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:19px;
  height:19px;
  margin-left:4px;
  padding:0;
  border-radius:999px;
  border:1px solid rgba(245,158,11,.50);
  background:#fffbeb;
  color:#b45309;
  font-size:12px;
  font-weight:950;
  line-height:1;
  cursor:pointer;
  vertical-align:middle;
  box-shadow:0 6px 14px rgba(245,158,11,.13);
}
.live-manual-warning-trigger:hover,
.live-manual-warning-trigger:focus-visible{
  background:#fef3c7;
  border-color:rgba(245,158,11,.72);
  outline:none;
}
.live-manual-warning-portal{
  position:fixed;
  inset:0;
  z-index:210000;
  pointer-events:none;
}
.live-manual-warning-portal-backdrop{
  position:absolute;
  inset:0;
  pointer-events:auto;
  background:transparent;
}
.live-manual-warning-portal-panel{
  position:fixed;
  z-index:1;
  overflow:auto;
  pointer-events:auto;
  padding:15px 40px 15px 16px;
  border:1px solid rgba(249,115,22,.38);
  border-radius:15px;
  background:linear-gradient(180deg,#fff7ed,#ffedd5);
  color:#7c2d12;
  box-shadow:0 24px 60px rgba(124,45,18,.24);
  font-size:12px;
  font-weight:750;
  line-height:1.4;
}
.live-manual-warning-portal-panel strong{
  display:block;
  margin-bottom:6px;
  color:#7c2d12;
  font-size:13px;
  font-weight:950;
}
.live-manual-warning-portal-panel p{margin:0 0 9px;color:#9a3412;}
.live-manual-warning-portal-panel ul{margin:0;padding-left:18px;}
.live-manual-warning-portal-panel li+li{margin-top:6px;}
.live-manual-warning-portal-panel li span{display:block;margin-top:2px;color:#7c4a2d;}
.live-manual-warning-portal-panel .live-manual-warning-close{
  position:absolute;
  top:9px;
  right:9px;
}
