/*
 * LDG ESG v4.5.4.2 — Practice Surface Contrast Refactor
 * Scope: explicit light/dark surfaces only. No layout, grid, width, margin, padding, position or JS changes.
 */
:root{
  --ldg4542-dark:#073b67;
  --ldg4542-dark-2:#05263d;
  --ldg4542-light:#ffffff;
  --ldg4542-light-2:#f7fbfe;
  --ldg4542-ink:#071f35;
  --ldg4542-text:#12334d;
  --ldg4542-muted:#405f76;
  --ldg4542-subtle:#eaf4ff;
  --ldg4542-line:#d7e7f2;
  --ldg4542-success:#287d4c;
  --ldg4542-success-bg:#ecf8e8;
  --ldg4542-warn:#8a4b00;
  --ldg4542-warn-bg:#fff7e8;
  --ldg4542-danger:#b42318;
  --ldg4542-danger-bg:#fdecec;
}

/* Default app text on light workspace. */
.ldg40-root.ldg4542-practice-surface-refactor,
.ldg40-root.ldg4542-practice-surface-refactor main,
.ldg40-root.ldg4542-practice-surface-refactor .ldg40-content{
  color:var(--ldg4542-ink)!important;
}

/* Explicit dark surfaces. */
.ldg40-root.ldg4542-practice-surface-refactor .ldg-surface-dark,
.ldg40-root.ldg4542-practice-surface-refactor .ldg4542-surface-dark,
.ldg40-root.ldg4542-practice-surface-refactor .ldg40-hero,
.ldg40-root.ldg4542-practice-surface-refactor .ldg40-sidebar,
.ldg40-root.ldg4542-practice-surface-refactor .ldg42-priority,
.ldg40-root.ldg4542-practice-surface-refactor .ldg450-boundary-grid > article{
  background-color:var(--ldg4542-dark)!important;
  color:#ffffff!important;
  border-color:rgba(255,255,255,.24)!important;
}
.ldg40-root.ldg4542-practice-surface-refactor .ldg-surface-dark :is(h1,h2,h3,h4,h5,h6,p,span,small,strong,b,em,i,li,dd,dt,label,summary,a,div),
.ldg40-root.ldg4542-practice-surface-refactor .ldg4542-surface-dark :is(h1,h2,h3,h4,h5,h6,p,span,small,strong,b,em,i,li,dd,dt,label,summary,a,div),
.ldg40-root.ldg4542-practice-surface-refactor .ldg40-hero :is(h1,h2,h3,h4,h5,h6,p,span,small,strong,b,em,i,li,dd,dt,label,summary,a,div),
.ldg40-root.ldg4542-practice-surface-refactor .ldg40-sidebar :is(h1,h2,h3,h4,h5,h6,p,span,small,strong,b,em,i,li,dd,dt,label,summary,a,div),
.ldg40-root.ldg4542-practice-surface-refactor .ldg42-priority :is(h1,h2,h3,h4,h5,h6,p,span,small,strong,b,em,i,li,dd,dt,label,summary,a,div),
.ldg40-root.ldg4542-practice-surface-refactor .ldg450-boundary-grid > article :is(h1,h2,h3,h4,h5,h6,p,span,small,strong,b,em,i,li,dd,dt,label,summary,a,div){
  color:#ffffff!important;
}
.ldg40-root.ldg4542-practice-surface-refactor .ldg-surface-dark :is(p,span,small,em,li,dd,dt),
.ldg40-root.ldg4542-practice-surface-refactor .ldg4542-surface-dark :is(p,span,small,em,li,dd,dt),
.ldg40-root.ldg4542-practice-surface-refactor .ldg40-hero :is(p,span,small,em,li,dd,dt),
.ldg40-root.ldg4542-practice-surface-refactor .ldg40-sidebar :is(p,span,small,em,li,dd,dt),
.ldg40-root.ldg4542-practice-surface-refactor .ldg450-boundary-grid > article :is(p,span,small,em,li,dd,dt){
  color:var(--ldg4542-subtle)!important;
}

/* Dark surface sub-panels. */
.ldg40-root.ldg4542-practice-surface-refactor .ldg40-hero aside,
.ldg40-root.ldg4542-practice-surface-refactor .ldg40-sidebar .ldg40-access,
.ldg40-root.ldg4542-practice-surface-refactor .ldg450-boundary-grid > article em{
  background:rgba(255,255,255,.14)!important;
  color:#ffffff!important;
  border-color:rgba(255,255,255,.28)!important;
}
.ldg40-root.ldg4542-practice-surface-refactor .ldg40-hero aside *,
.ldg40-root.ldg4542-practice-surface-refactor .ldg40-sidebar .ldg40-access *,
.ldg40-root.ldg4542-practice-surface-refactor .ldg450-boundary-grid > article em *{
  color:#ffffff!important;
}

/* Exception: white pills inside dark sidebar/access blocks. */
.ldg40-root.ldg4542-practice-surface-refactor .ldg40-sidebar .ldg40-access span,
.ldg40-root.ldg4542-practice-surface-refactor .ldg40-sidebar .ldg40-access span *,
.ldg40-root.ldg4542-practice-surface-refactor .ldg-surface-dark .ldg-light-pill,
.ldg40-root.ldg4542-practice-surface-refactor .ldg-surface-dark .ldg-light-pill *{
  background:#ffffff!important;
  color:var(--ldg4542-dark-2)!important;
}

/* Explicit light surfaces. */
.ldg40-root.ldg4542-practice-surface-refactor .ldg-surface-light,
.ldg40-root.ldg4542-practice-surface-refactor .ldg4542-surface-light,
.ldg40-root.ldg4542-practice-surface-refactor .ldg40-card:not(.ldg40-hero),
.ldg40-root.ldg4542-practice-surface-refactor .ldg43-panel,
.ldg40-root.ldg4542-practice-surface-refactor .ldg450-card,
.ldg40-root.ldg4542-practice-surface-refactor .ldg451-view,
.ldg40-root.ldg4542-practice-surface-refactor .ldg42-gold-actionbar{
  background-color:#ffffff!important;
  color:var(--ldg4542-ink)!important;
  border-color:var(--ldg4542-line)!important;
}
.ldg40-root.ldg4542-practice-surface-refactor .ldg-surface-light :is(h1,h2,h3,h4,h5,h6,strong,b,label,summary,dt),
.ldg40-root.ldg4542-practice-surface-refactor .ldg4542-surface-light :is(h1,h2,h3,h4,h5,h6,strong,b,label,summary,dt),
.ldg40-root.ldg4542-practice-surface-refactor .ldg40-card:not(.ldg40-hero) :is(h1,h2,h3,h4,h5,h6,strong,b,label,summary,dt){
  color:var(--ldg4542-ink)!important;
}
.ldg40-root.ldg4542-practice-surface-refactor .ldg-surface-light :is(p,span,small,em,li,dd,div),
.ldg40-root.ldg4542-practice-surface-refactor .ldg4542-surface-light :is(p,span,small,em,li,dd,div),
.ldg40-root.ldg4542-practice-surface-refactor .ldg40-card:not(.ldg40-hero) :is(p,span,small,em,li,dd,div){
  color:var(--ldg4542-muted)!important;
}

/* Lifecycle stage cards are light; only icon chips are dark. */
.ldg40-root.ldg4542-practice-surface-refactor .ldg450-stage,
.ldg40-root.ldg4542-practice-surface-refactor .ldg450-quality-grid > article,
.ldg40-root.ldg4542-practice-surface-refactor .ldg450-report-grid > a,
.ldg40-root.ldg4542-practice-surface-refactor .ldg450-impact-list > div,
.ldg40-root.ldg4542-practice-surface-refactor .ldg450-scenario-grid > article,
.ldg40-root.ldg4542-practice-surface-refactor .ldg450-boundary-facts > div{
  background:#ffffff!important;
  color:var(--ldg4542-ink)!important;
  border-color:var(--ldg4542-line)!important;
}
.ldg40-root.ldg4542-practice-surface-refactor .ldg450-stage :is(h3,strong,span,small,p,em,div),
.ldg40-root.ldg4542-practice-surface-refactor .ldg450-quality-grid > article :is(h3,strong,span,small,p,em,div),
.ldg40-root.ldg4542-practice-surface-refactor .ldg450-report-grid > a :is(h3,strong,span,small,p,em,div),
.ldg40-root.ldg4542-practice-surface-refactor .ldg450-impact-list > div :is(h3,strong,span,small,p,em,div),
.ldg40-root.ldg4542-practice-surface-refactor .ldg450-scenario-grid > article :is(h3,strong,span,small,p,em,div),
.ldg40-root.ldg4542-practice-surface-refactor .ldg450-boundary-facts > div :is(h3,strong,span,small,p,em,div){
  color:var(--ldg4542-ink)!important;
}
.ldg40-root.ldg4542-practice-surface-refactor .ldg450-stage b,
.ldg40-root.ldg4542-practice-surface-refactor .ldg450-report-grid > a b,
.ldg40-root.ldg4542-practice-surface-refactor .ldg43-checks b,
.ldg40-root.ldg4542-practice-surface-refactor .ldg44-carbon-steps article b{
  background:var(--ldg4542-dark)!important;
  color:#ffffff!important;
}
.ldg40-root.ldg4542-practice-surface-refactor .ldg450-stage b *,
.ldg40-root.ldg4542-practice-surface-refactor .ldg450-report-grid > a b *,
.ldg40-root.ldg4542-practice-surface-refactor .ldg43-checks b *,
.ldg40-root.ldg4542-practice-surface-refactor .ldg44-carbon-steps article b *{
  color:#ffffff!important;
}

/* Client logo and placeholders: white box must always use dark text. */
.ldg40-root.ldg4542-practice-surface-refactor :is(.ldg441-brand-chip,.ldg441-empty-logo,.ldg441-logo-frame,.ldg441-preview-box,.ldg441-logo-box,.ldg441-brand-strip),
.ldg40-root.ldg4542-practice-surface-refactor :is(.ldg441-brand-chip,.ldg441-empty-logo,.ldg441-logo-frame,.ldg441-preview-box,.ldg441-logo-box,.ldg441-brand-strip) *{
  background-color:#ffffff!important;
  color:var(--ldg4542-ink)!important;
}
.ldg40-root.ldg4542-practice-surface-refactor :is(.ldg441-brand-chip,.ldg441-empty-logo,.ldg441-logo-frame,.ldg441-preview-box,.ldg441-logo-box,.ldg441-brand-strip) :is(small,span,em,p){
  color:var(--ldg4542-muted)!important;
}

/* Tables remain light with dark text; headers are dark with white text. */
.ldg40-root.ldg4542-practice-surface-refactor table,
.ldg40-root.ldg4542-practice-surface-refactor tbody,
.ldg40-root.ldg4542-practice-surface-refactor td{
  background:#ffffff!important;
  color:var(--ldg4542-ink)!important;
}
.ldg40-root.ldg4542-practice-surface-refactor td *{color:var(--ldg4542-ink)!important;}
.ldg40-root.ldg4542-practice-surface-refactor thead,
.ldg40-root.ldg4542-practice-surface-refactor th{
  background:var(--ldg4542-dark)!important;
  color:#ffffff!important;
}
.ldg40-root.ldg4542-practice-surface-refactor th *{color:#ffffff!important;}

/* Status colors are intentionally light surfaces with dark readable text. */
.ldg40-root.ldg4542-practice-surface-refactor :is(.tone-danger,.status-danger,.ldg44-badge.tone-danger){background:var(--ldg4542-danger-bg)!important;color:var(--ldg4542-danger)!important;}
.ldg40-root.ldg4542-practice-surface-refactor :is(.tone-warning,.status-warn,.ldg44-badge.tone-warning){background:var(--ldg4542-warn-bg)!important;color:var(--ldg4542-warn)!important;}
.ldg40-root.ldg4542-practice-surface-refactor :is(.tone-success,.status-ok,.ldg44-badge.tone-success){background:var(--ldg4542-success-bg)!important;color:var(--ldg4542-success)!important;}
.ldg40-root.ldg4542-practice-surface-refactor :is(.tone-danger,.status-danger,.ldg44-badge.tone-danger,.tone-warning,.status-warn,.ldg44-badge.tone-warning,.tone-success,.status-ok,.ldg44-badge.tone-success) *{color:inherit!important;}

/* PDF/print in browser: explicit surfaces survive without gradients. */
@media print{
  .ldg40-root.ldg4542-practice-surface-refactor .ldg-surface-dark,
  .ldg40-root.ldg4542-practice-surface-refactor .ldg-surface-dark *{background:#073b67!important;color:#ffffff!important;}
  .ldg40-root.ldg4542-practice-surface-refactor .ldg-surface-light,
  .ldg40-root.ldg4542-practice-surface-refactor .ldg-surface-light *{background:#ffffff!important;color:#071f35!important;}
}
