/*
 * LDG ESG v4.5.4.4 — Runtime Contrast Sentinel
 * Scope: final component contrast only. No grid, routing, CRUD, DB, report logic or structural layout changes.
 */
:root{
  --ldg4544-ink:#071f35;
  --ldg4544-text:#12334d;
  --ldg4544-muted:#385971;
  --ldg4544-dark:#073b67;
  --ldg4544-dark-2:#05263d;
  --ldg4544-white:#ffffff;
  --ldg4544-pale:#eaf4ff;
  --ldg4544-line:#d7e7f2;
}

/* Buttons/pills that are visibly dark must never inherit ink colors. */
html body .ldg40-root.ldg4544-runtime-contrast-sentinel :is(
  .ldg42-action-link,
  a.ldg42-action-link,
  button.ldg42-action-link,
  .ldg42-action-dark,
  .ldg42-gold-actionbar details > summary,
  .ldg453-actionbar details > summary,
  .ldg40-primary,
  .ldg42-primary,
  .ldg451-primary,
  .ldg453-primary,
  .ldg40-switch .ldg42-action-link,
  .ldg42-action-menu > a
){
  background:var(--ldg4544-dark)!important;
  border-color:var(--ldg4544-dark)!important;
  color:var(--ldg4544-white)!important;
  -webkit-text-fill-color:var(--ldg4544-white)!important;
  text-shadow:none!important;
}
html body .ldg40-root.ldg4544-runtime-contrast-sentinel :is(
  .ldg42-action-link,
  a.ldg42-action-link,
  button.ldg42-action-link,
  .ldg42-action-dark,
  .ldg42-gold-actionbar details > summary,
  .ldg453-actionbar details > summary,
  .ldg40-primary,
  .ldg42-primary,
  .ldg451-primary,
  .ldg453-primary,
  .ldg40-switch .ldg42-action-link,
  .ldg42-action-menu > a
) *{
  color:var(--ldg4544-white)!important;
  -webkit-text-fill-color:var(--ldg4544-white)!important;
  background:transparent!important;
  text-shadow:none!important;
}

/* System Boundary Map final strategy: light cards only. This beats older high-specificity h3 dark-bar rules. */
html body .ldg40-root.ldg4544-runtime-contrast-sentinel .ldg450-boundary-grid > article,
html body .ldg40-root.ldg453-recovery.ldg4544-runtime-contrast-sentinel .ldg450-boundary-grid > article,
html body .ldg40-root.ldg4544-runtime-contrast-sentinel .ldg450-boundary-grid > article.ldg4544-boundary-safe,
html body .ldg40-root.ldg4544-runtime-contrast-sentinel .ldg450-boundary-grid > article.ldg4543-boundary-safe,
html body .ldg40-root.ldg4544-runtime-contrast-sentinel .ldg450-boundary-grid > article.ldg-surface-light,
html body .ldg40-root.ldg4544-runtime-contrast-sentinel .ldg450-boundary-grid > article.ldg-surface-dark{
  background:var(--ldg4544-white)!important;
  color:var(--ldg4544-ink)!important;
  -webkit-text-fill-color:var(--ldg4544-ink)!important;
  border:1px solid var(--ldg4544-line)!important;
  border-top:4px solid var(--ldg4544-dark)!important;
  box-shadow:0 14px 32px rgba(7,59,103,.05)!important;
  text-shadow:none!important;
}
html body .ldg40-root.ldg4544-runtime-contrast-sentinel .ldg450-boundary-grid > article :is(h1,h2,h3,h4,h5,h6,strong,b,label,summary,dt,div),
html body .ldg40-root.ldg453-recovery.ldg4544-runtime-contrast-sentinel .ldg450-boundary-grid > article :is(h1,h2,h3,h4,h5,h6,strong,b,label,summary,dt,div),
html body .ldg40-root.ldg4544-runtime-contrast-sentinel .ldg450-boundary-grid > article.ldg4544-boundary-safe :is(h1,h2,h3,h4,h5,h6,strong,b,label,summary,dt,div){
  background:transparent!important;
  color:var(--ldg4544-ink)!important;
  -webkit-text-fill-color:var(--ldg4544-ink)!important;
  text-shadow:none!important;
}
html body .ldg40-root.ldg4544-runtime-contrast-sentinel .ldg450-boundary-grid > article :is(p,span,small,li,dd),
html body .ldg40-root.ldg453-recovery.ldg4544-runtime-contrast-sentinel .ldg450-boundary-grid > article :is(p,span,small,li,dd),
html body .ldg40-root.ldg4544-runtime-contrast-sentinel .ldg450-boundary-grid > article.ldg4544-boundary-safe :is(p,span,small,li,dd){
  background:transparent!important;
  color:var(--ldg4544-muted)!important;
  -webkit-text-fill-color:var(--ldg4544-muted)!important;
  text-shadow:none!important;
}
html body .ldg40-root.ldg4544-runtime-contrast-sentinel .ldg450-boundary-grid > article em,
html body .ldg40-root.ldg453-recovery.ldg4544-runtime-contrast-sentinel .ldg450-boundary-grid > article em,
html body .ldg40-root.ldg4544-runtime-contrast-sentinel .ldg450-boundary-grid > article.ldg4544-boundary-safe em{
  display:inline-flex!important;
  align-items:center!important;
  width:auto!important;
  background:var(--ldg4544-pale)!important;
  color:var(--ldg4544-dark)!important;
  -webkit-text-fill-color:var(--ldg4544-dark)!important;
  border:1px solid #d4eaff!important;
  border-radius:999px!important;
  text-shadow:none!important;
}
html body .ldg40-root.ldg4544-runtime-contrast-sentinel .ldg450-boundary-grid > article em *{
  background:transparent!important;
  color:var(--ldg4544-dark)!important;
  -webkit-text-fill-color:var(--ldg4544-dark)!important;
}

/* Dark chips inside lifecycle and report cards: force actual glyph fill to white, not only color. */
html body .ldg40-root.ldg4544-runtime-contrast-sentinel .ldg450-stage-grid .ldg450-stage > b,
html body .ldg40-root.ldg4544-runtime-contrast-sentinel .ldg450-stage-grid .ldg450-stage b,
html body .ldg40-root.ldg4544-runtime-contrast-sentinel .ldg450-report-grid > a > b,
html body .ldg40-root.ldg4544-runtime-contrast-sentinel .ldg450-report-grid a b,
html body .ldg40-root.ldg4544-runtime-contrast-sentinel .ldg43-checks b,
html body .ldg40-root.ldg4544-runtime-contrast-sentinel .ldg44-carbon-steps article b{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:var(--ldg4544-dark)!important;
  border-color:var(--ldg4544-dark)!important;
  color:var(--ldg4544-white)!important;
  -webkit-text-fill-color:var(--ldg4544-white)!important;
  text-shadow:none!important;
  overflow:hidden!important;
}
html body .ldg40-root.ldg4544-runtime-contrast-sentinel .ldg450-stage-grid .ldg450-stage > b *,
html body .ldg40-root.ldg4544-runtime-contrast-sentinel .ldg450-stage-grid .ldg450-stage b *,
html body .ldg40-root.ldg4544-runtime-contrast-sentinel .ldg450-report-grid > a > b *,
html body .ldg40-root.ldg4544-runtime-contrast-sentinel .ldg450-report-grid a b *{
  background:transparent!important;
  color:var(--ldg4544-white)!important;
  -webkit-text-fill-color:var(--ldg4544-white)!important;
}

/* Report chips no longer display long words that overflow the dark chip. PHP shortens labels; CSS locks geometry. */
html body .ldg40-root.ldg4544-runtime-contrast-sentinel .ldg450-report-grid > a > b,
html body .ldg40-root.ldg4544-runtime-contrast-sentinel .ldg450-report-grid a b{
  min-width:44px!important;
  width:44px!important;
  max-width:44px!important;
  height:44px!important;
  padding:0!important;
  white-space:nowrap!important;
  font-size:.78rem!important;
  font-weight:800!important;
  line-height:1!important;
}
html body .ldg40-root.ldg4544-runtime-contrast-sentinel .ldg450-report-grid > a :is(strong,h3,h4,label){
  color:var(--ldg4544-ink)!important;
  -webkit-text-fill-color:var(--ldg4544-ink)!important;
  background:transparent!important;
}
html body .ldg40-root.ldg4544-runtime-contrast-sentinel .ldg450-report-grid > a :is(p,span,small){
  color:var(--ldg4544-muted)!important;
  -webkit-text-fill-color:var(--ldg4544-muted)!important;
  background:transparent!important;
}

/* Last-mile sentinel classes set by JS if computed contrast is wrong. */
html body .ldg40-root .ldg4544-force-light,
html body .ldg40-root .ldg4544-force-light *{
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
  text-shadow:none!important;
}
html body .ldg40-root .ldg4544-force-dark,
html body .ldg40-root .ldg4544-force-dark *{
  color:#071f35!important;
  -webkit-text-fill-color:#071f35!important;
  text-shadow:none!important;
}
html body .ldg40-root .ldg4544-bg-light{background:#ffffff!important;}
html body .ldg40-root .ldg4544-bg-dark{background:#073b67!important;}
