/* V5.3.5 Sidebar State Matrix & Certification Residual Closure */

/*
 * Canonical sidebar badge contract.
 * A marker displayed on a blue/navy sidebar surface always uses white ink.
 * Semantic state may change card border/background, never badge foreground.
 * Deliberately independent from body classes: the v5.3.4 regression was caused by
 * a body-class-dependent override not matching every runtime surface.
 */
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a > em,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a:link > em,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a:visited > em,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a:hover > em,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a:focus > em,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a:focus-visible > em,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a.active > em,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a.is-active > em,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a.current > em,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a[aria-current="page"] > em,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a.state-todo > em,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a.state-blocked > em,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a.state-disabled > em,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a.state-conditional > em,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a.state-not-required > em,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a.state-overdue > em,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a.state-complete > em,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a[class*="state-"] > em{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  text-shadow:none!important;
  font-size:12.5px!important;
  font-weight:900!important;
}

/* Active/current markers use a deterministic blue fill with white ink in every state combination. */
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a.active > em,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a.is-active > em,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a.current > em,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a[aria-current="page"] > em,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a.active[class*="state-"] > em,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a.is-active[class*="state-"] > em{
  background:#12689b!important;
  background-color:#12689b!important;
  background-image:none!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  border-color:rgba(255,255,255,.18)!important;
}

/* Entire navigation label remains readable regardless of state/interaction. */
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a:link,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a:visited,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a:hover,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a:focus,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a:focus-visible,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a strong,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a small,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a span{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  text-shadow:none!important;
}

/* Global/New-practice sidebar used 11px markers; align them with the practice shell. */
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar.is-global nav a > em,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar[class*="is-global"] nav a > em{
  min-width:34px!important;
  min-height:34px!important;
  font-size:12.5px!important;
  line-height:1!important;
}

/* Explicit certification sentinels: Report 10, conditional modules and New (+). */
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a[data-ldg-view="relazioni"] > em,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a[data-ldg-view="carbon"] > em,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a[data-ldg-view="lca"] > em,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a[data-ldg-view="fornitori"] > em,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a[data-ldg-view="nuovo"] > em,
html body .ldg40-root.ldg535-sidebar-state-matrix aside.ldg40-sidebar nav a[href*="ldg_view=nuovo"] > em{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

/* Small status/required labels on the global New Practice surface: remove audit-only tiny text residue. */
html body .ldg40-root.ldg535-sidebar-state-matrix .ldg40-content :is(.ldg40-required,.required,[class*="required"],[class*="obbligatorio"]),
html body .ldg40-root.ldg535-sidebar-state-matrix .ldg40-hero :is(small,span,em){
  font-size:max(12.5px,1em)!important;
}

/* New-practice residual tiny labels observed by Audit V2.2.1. */
html body .ldg40-root.ldg535-sidebar-state-matrix[data-view="nuovo"] .ldg40-hero aside > small,
html body .ldg40-root.ldg535-sidebar-state-matrix[data-view="nuovo"] .ldg40-hero aside > strong,
html body .ldg40-root.ldg535-sidebar-state-matrix[data-view="nuovo"] .ldg40-hero aside > em,
html body .ldg40-root.ldg535-sidebar-state-matrix[data-view="nuovo"] .ldg40-content label > b,
html body .ldg40-root.ldg535-sidebar-state-matrix[data-view="nuovo"] .ldg523-registry-card label > b{
  font-size:12.5px!important;
  line-height:1.2!important;
}


/* V5.3.6 residual closure: the new-practice section eyebrow was still rendered at 9.5px
 * by the older canonical SPA stylesheet.  Keep the change scoped to the v5.3.6 root. */
html body .ldg40-root.ldg536-legacy-sidebar-authority-neutralized[data-view="nuovo"] .ldg40-section-head > span,
html body .ldg40-root.ldg536-legacy-sidebar-authority-neutralized[data-view="nuovo"] .ldg44-panel-head > div > span,
html body .ldg40-root.ldg536-legacy-sidebar-authority-neutralized[data-view="nuovo"] .ldg450-pill {
  font-size:12.5px!important;
  line-height:1.25!important;
}
