/* Executive Summary owns each foreground/surface pair, including mixed Branding.
   Keep this separate from #tab-executive (Revenue Intelligence). */
#tab-executive-summary {
  --exec-surface: var(--surface-primary, #f5f8fc);
  --exec-ink: var(--text-primary, #0b172a);
  color: var(--exec-ink);
}
#tab-executive-summary :is(.riExecHeader, .panel, .riSignal, .riPdfMini) {
  --exec-surface: var(--card-background, var(--surface-secondary, #fff));
  --exec-ink: var(--card-text, var(--text-primary, #0b172a));
  background: var(--exec-surface) !important;
  color: var(--exec-ink) !important;
}
#tab-executive-summary :is(.riKpiCard, .clevelCard, .execRankRow, .scoreRow,
  .execScoreAverage, .riFichaMiniHero, .riOppCard, .riObjProjection, .riKamDetailHero > div) {
  --exec-surface: var(--vcard-background, var(--card-background, var(--surface-secondary, #fff)));
  --exec-ink: var(--vcard-text, var(--card-text, var(--text-primary, #0b172a)));
  background: var(--exec-surface) !important;
  color: var(--exec-ink) !important;
}
#tab-executive-summary .riTrendChart {
  --exec-surface: var(--chart-background, var(--card-background, var(--surface-secondary, #fff)));
  --exec-ink: var(--chart-text, var(--card-text, var(--text-primary, #0b172a)));
  background: var(--exec-surface) !important;
  color: var(--exec-ink) !important;
}
#tab-executive-summary :is(h2, h3, h4, p, label, span, strong, b, em, small, th, td,
  .eyebrow, .notice, .big, .riFunnelRate, .riHourTitle, .riFichaMeta > div, .companyPulseEmpty) {
  color: var(--exec-ink) !important;
  -webkit-text-fill-color: currentColor !important;
}
#tab-executive-summary .riExecHeader :is(h2, p, .eyebrow) {
  color: var(--exec-ink) !important;
  text-shadow: none !important;
}
#tab-executive-summary :is(small, .riCalWeek b, .riHourTitle, .barDate, .riFunnelRate) {
  color: color-mix(in srgb, var(--exec-ink) 85%, var(--exec-surface)) !important;
  opacity: 1 !important;
}
#tab-executive-summary :is(.notice, .barRow, .riActionBtn, .riStagePill, .riDays) {
  background: var(--exec-surface) !important;
  color: var(--exec-ink) !important;
}
#tab-executive-summary .execRankRow strong,
#tab-executive-summary .execRankRow::before {
  background: var(--exec-surface) !important;
  color: var(--exec-ink) !important;
  -webkit-text-fill-color: currentColor !important;
}
/* The donut's painted hole is a pseudo-element, not an ancestor background.
   Pair it explicitly with the center label, without changing the ring/data. */
#tab-executive-summary .riMiniDonut::after {
  background: var(--exec-surface) !important;
}
#tab-executive-summary .riMiniDonut > div {
  background: var(--exec-surface) !important;
  color: var(--exec-ink) !important;
}
/* Labels have a backing on multicolor graphics; bar widths/colors remain data. */
#tab-executive-summary .riFunnelStage :is(strong, span) {
  background: #fff !important; color: #0b172a !important;
  border-radius: 3px; padding: 1px 3px;
}
#tab-executive-summary .riFunnelGroup{display:grid;gap:.35rem;padding:.75rem;border:1px solid var(--border,#d8e2ef);border-radius:14px;background:var(--surface,#fff)}
#tab-executive-summary .riFunnelGroup+ .riFunnelGroup{margin-top:.75rem}
#tab-executive-summary .riFunnelGroup h4{margin:0;color:var(--text,#172033)}
#tab-executive-summary .riFunnelGroup>small{display:block;margin-bottom:.35rem;color:var(--muted,#5f6b7a);overflow-wrap:anywhere}
@media (max-width:720px){#tab-executive-summary .riFunnelGroup{padding:.55rem}.riFunnelStage{max-width:100%}}
#tab-executive-summary .riTrendBar:hover::after {
  background: #0b172a !important; color: #fff !important;
  -webkit-text-fill-color: currentColor !important;
}
#tab-executive-summary .riCalDay:not(.riCalEmpty) {
  --exec-surface: #0b1b2a; --exec-ink: #fff;
  background: var(--exec-surface) !important;
  color: var(--exec-ink) !important;
  opacity: 1 !important;
}
#tab-executive-summary .riCalDay.riCalLevel1 { --exec-surface: #103246; }
#tab-executive-summary .riCalDay.riCalLevel2 { --exec-surface: #105260; }
#tab-executive-summary .riCalDay.riCalLevel3 { --exec-surface: #08776f; }
#tab-executive-summary .riCalDay.riCalLevel4 { --exec-surface: #08a98f; --exec-ink: #0b172a; }
#tab-executive-summary .riCalDay :is(span, strong, small) { color: var(--exec-ink) !important; }
#tab-executive-summary :is(.execGrowthUp, .execGrowthDown, .scoreBadge, .riScorePill) {
  --exec-surface: #e8f1ff; --exec-ink: #0759c7;
  background: var(--exec-surface) !important;
  color: var(--exec-ink) !important;
  border-radius: 5px; padding: 3px 5px;
}
#tab-executive-summary :is(.execGrowthUp, .scoreHigh, .riScorePill.high) { --exec-surface: #dcfce7; --exec-ink: #166534; }
#tab-executive-summary :is(.execGrowthDown, .scoreLow, .riScorePill.low) { --exec-surface: #fee2e2; --exec-ink: #991b1b; }
#tab-executive-summary :is(.scoreMid, .riScorePill.mid) { --exec-surface: #fef3c7; --exec-ink: #854d0e; }
#tab-executive-summary :is(input, select, textarea) {
  background: var(--input-background, #fff) !important;
  color: var(--input-text, #0b172a) !important;
  -webkit-text-fill-color: currentColor !important;
}
#tab-executive-summary :is(input, textarea)::placeholder {
  color: var(--input-text, #0b172a) !important;
  -webkit-text-fill-color: var(--input-text, #0b172a) !important;
  opacity: .75 !important;
}
/* Pulse faces are status indicators: exclude them from generic button styling. */
#tab-executive-summary :is(button, .btn):not(.companyPulseDay) {
  background: #fff !important; color: #0759c7 !important;
  -webkit-text-fill-color: currentColor !important; border-color: #7296c9 !important;
}
#tab-executive-summary button:not(.companyPulseDay) :is(span, strong, small) { color: inherit !important; }
#tab-executive-summary :is(button, input, select, textarea):focus-visible {
  outline: 2px solid currentColor !important; outline-offset: 3px;
}
/* Executive-only overlays also need independent pairs when mounted under body. */
#tab-executive-summary .companyPulsePopover,
body[data-active-tab="executive-summary"] :is(.companyPulseDetail, #clevelBackdrop .clevelModal, #clevelBackdrop .clevelOption) {
  background: var(--card-background, var(--surface-secondary, #fff)) !important;
  color: var(--card-text, var(--text-primary, #0b172a)) !important;
}
#tab-executive-summary .companyPulsePopover :is(h4, p, li, small, span, b),
body[data-active-tab="executive-summary"] :is(.companyPulseDetail, #clevelBackdrop) :is(h3, h4, p, li, small, label, span, b) {
  color: var(--card-text, var(--text-primary, #0b172a)) !important;
  -webkit-text-fill-color: currentColor !important;
}
body[data-active-tab="executive-summary"] :is(.companyPulseDetail, #clevelBackdrop) button {
  background: #fff !important; color: #0759c7 !important;
  -webkit-text-fill-color: currentColor !important; border-color: #7296c9 !important;
}
