/* Scoped palette corrections for small text on the site's light reading panels.
   The primary CTA and footer palettes remain controlled by their own styles. */
@layer sd-inter-light {
 /* Fully opaque, stronger body ink keeps Inter Light clear on reading surfaces.
    Dark panels, controls, badges and status colours retain their own palettes. */
 html:root body:is(.sd-lean-page,.home-rebuilt) main#main-content :is(.sd-body-copy,p,li,dt,dd,figcaption,caption,blockquote,label,td,th,small):not(:where(
  .lr-kicker,.lr-eyebrow,[class*="kicker"],[class*="eyebrow"],[class$="-number"],[class*="status"],[role="status"],[role="alert"],
  .lr-tags *,[class*="badge"],[class*="pill"],.lm-card-price,.lm-card-price *,.lr-button *,button *,a.lr-link *,pre *,code *,
  .lr-explore-controls *,.nr-current *,.nr-next *,.lm-controls *,.lm-filter-grid *,.li-filters *,.hp-domain-tabs *,.mt-process-flow *,
  .hp-connected-dark *,.fcte-dark *,.lr-footer *
 )){color:#0a3a66!important;opacity:1!important;}
 html:root body:is(.sd-lean-page,.home-rebuilt) main#main-content :is(p,li,dt,dd,figcaption,caption,blockquote,label,td,th) > :is(span,small,em,strong):not(:where(
  [class*="badge"],[class*="pill"],[class*="status"],.lr-kicker *,[class*="eyebrow"] *,
  .lr-tags *,.lm-card-price *,.lr-button *,button *,a.lr-link *,pre *,code *,
  .lr-explore-controls *,.nr-current *,.nr-next *,.lm-controls *,.lm-filter-grid *,.li-filters *,.hp-domain-tabs *,.mt-process-flow *,
  .hp-connected-dark *,.fcte-dark *
 )){color:inherit!important;opacity:1!important;}
 html:root body.sd-lean-page main#main-content :is(.lm-results-status,.lpr-preview-placeholder p){color:#0a3a66!important;opacity:1!important;}
 html:root body.home-rebuilt main#main-content :is(.hp-work-uses,.hp-published-datasets) :is(p.sd-body-copy,.hp-work-applications > p,.hp-work-tailored p){color:#0a3a66!important;opacity:1!important;}
 body.sd-lean-page main#main-content .lr-tags > *,
 body.sd-lean-page main#main-content .lr-event-copy .lr-badge,
 body.sd-lean-page main#main-content .hcr-link,
 body.sd-lean-page main#main-content .co-catalogue-update a,
 body.sd-lean-page main#main-content .lr-semantic-audit .lsa-chapters a[aria-current],
 body.home-rebuilt main#main-content .hp-published-datasets .hp-published-tags > li,
 body.sd-lean-page main#main-content .lr-kicker:not(:where(.nr-current *, .nr-next *)),
 body.sd-lean-page main#main-content a.lr-link:not(.lr-button):not(:where(.nr-current *, .nr-next *)),
 body.sd-lean-page main#main-content .lr-button-secondary:not(:where(.nr-current *, .nr-next *)),
 body.sd-lean-page.lr-app-page main#main-content .lc-button:not(.lc-button-primary),
 body.sd-lean-page.lr-app-page main#main-content .lc-trust a,
 body.sd-lean-page.lr-methodology-page main#main-content .mt-link,
 body.sd-lean-page.lr-purchase-terms-page main#main-content a.xp-link,
 body.sd-lean-page main#main-content #topics .li-topic-count,
 body.sd-lean-page main#main-content .lean-source-document :is(.finding-tag, .resolved-badge),
 body.sd-lean-page.lr-assumptions-register-page main#main-content .ar-section-number {
  color:#006e78!important;
 }
 body.sd-lean-page main#main-content .lr-event-audit {
  --lea-review:#765824!important;
 }
 body.sd-lean-page main#main-content .li-filters button[type=submit]{color:#fff!important;}
 body.sd-lean-page main#main-content .lr-event-audit :is(.lea-chapters a > span, .lea-event-number),
 body.sd-lean-page.lr-domain-checks-page main#main-content .lr-domain-checks .audit-disabled {
  color:#526575!important;
 }
}

/* Body copy uses fully opaque ink; dark panels keep their readable palette. */
@layer sd-inter-light {
 body main :is(p,li,dt,dd,figcaption,caption,blockquote,label,td,th){opacity:1!important;}
 body.home-rebuilt main#main-content .hp-hero .v2-hero-deck{color:#0a3a66!important;opacity:1!important;}
}

/* Decorative footer cards are removed on every page. */
@layer sd-inter-light {
 footer:is(.lr-footer,.rb-footer)::before{content:none!important;display:none!important;background:none!important;}
 footer :is(.hp-footer-health-engraving,.sd-footer-card,.lr-footer-card){display:none!important;}
 body footer:is(.lr-footer,.rb-footer) p{color:#fff!important;opacity:1!important;}
}

/* Link arrows stay next to the label, including full-width reading rows. */
@layer sd-inter-light {
 html:root body[class] :is(main#main-content,header.lr-header,footer.lr-footer) :is(a,a :is(span,div)):has(>span[aria-hidden="true"]){justify-content:flex-start!important;column-gap:8px!important;}
 html:root body[class] :is(main#main-content,header.lr-header,footer.lr-footer) a span[aria-hidden="true"]{margin-inline:0!important;flex:0 0 auto!important;}
 html:root body[class] :is(main#main-content,header.lr-header,footer.lr-footer) a:is(.btn,[class*="button"],[role="button"]):has(>span[aria-hidden="true"]){justify-content:center!important;}
 html:root body[class] :is(main#main-content,header.lr-header,footer.lr-footer) :is(a,a :is(span,div)):has(>span[aria-hidden="true"])>span:not([aria-hidden="true"]){flex:0 1 auto!important;}
 html:root body.sd-lean-page main#main-content .ev-stage-navigation a{grid-template-columns:32px minmax(0,max-content) 16px!important;}
}

/* Audit previews follow the existing Evidence library city tabs. */
@layer sd-inter-light {
 html:root body.sd-lean-page main#main-content [data-ev-city-panel]>.apdf-section{padding:28px 0 0!important;margin-top:24px;border-top:1px solid #bedbe5;}
 html:root body.sd-lean-page main#main-content [data-ev-city-panel]>.apdf-section>.apdf-shell{width:100%;max-width:none;padding-inline:0!important;}
}

/* The FCTE release process shares the footer's full-width navy surface. */
@layer sd-inter-light {
 html:root body.sd-lean-page main#main-content #process:has(.lr-fcte-release-flow){background:#061b2b!important;width:100%;max-width:none;}
 html:root body.sd-lean-page main#main-content #process:has(.lr-fcte-release-flow) :is(h2,h3,p,li){color:#fff!important;opacity:1!important;}
 html:root body.sd-lean-page main#main-content #process:has(.lr-fcte-release-flow) .lr-fcte-release-step{border-color:#315063!important;}
 html:root body.sd-lean-page main#main-content #process:has(.lr-fcte-release-flow) :is(.lr-fcte-step-marker,.lr-fcte-step-count){color:#48dacf!important;}
 html:root body.sd-lean-page main#main-content #process:has(.lr-fcte-release-flow) .lr-fcte-step-marker svg{stroke:#48dacf!important;}
}

/* Evidence sample checks share the footer navy palette. */
@layer sd-inter-light {
 html:root body.sd-lean-page main#main-content #samples.ev-section{background:#061b2b!important;width:100%;max-width:none;}
 html:root body.sd-lean-page main#main-content #samples.ev-section :is(h2,h3,p,li){color:#fff!important;opacity:1!important;}
 html:root body.sd-lean-page main#main-content #samples.ev-section :is(a.lr-link,.ev-flow-marker,.ev-section-index,.ev-card-icon){color:#48dacf!important;border-color:#48dacf!important;}
 html:root body.sd-lean-page main#main-content #samples.ev-section svg{stroke:#48dacf!important;}
 html:root body.sd-lean-page main#main-content #samples.ev-section .ev-download-band{border-color:#315063!important;}
 html:root body.sd-lean-page main#main-content #samples.ev-section .ev-flow-marker::after{border-color:#315063!important;}
}

/* Homepage evidence uses the footer's full-width navy surface. */
@layer sd-inter-light {
 html:root body.home-rebuilt main#main-content .hp-evidence-adoption{background:#061b2b!important;border-color:#315063!important;width:100%;max-width:none;}
 html:root body.home-rebuilt main#main-content .hp-evidence-adoption::before{mix-blend-mode:screen!important;opacity:.035!important;}
 html:root body.home-rebuilt main#main-content .hp-evidence-adoption #hpChecksTitle{color:#fff!important;}
 html:root body.home-rebuilt main#main-content .hp-evidence-adoption :is(h2,h3,p,.hp-release-links>span){color:#fff!important;opacity:1!important;}
 html:root body.home-rebuilt main#main-content .hp-evidence-adoption :is(.sd-eyebrow,.hp-check-number,.hp-check-action,.hp-release-links a){color:#48dacf!important;border-color:#48dacf!important;}
 html:root body.home-rebuilt main#main-content .hp-evidence-adoption .hp-check-card{background:transparent!important;border-color:#315063!important;}
 html:root body.home-rebuilt main#main-content .hp-evidence-adoption .hp-check-card:hover{background:#0b2a3e!important;border-color:#48dacf!important;}
 html:root body.home-rebuilt main#main-content .hp-evidence-adoption .hp-check-card:focus-visible{outline-color:#48dacf!important;}
 html:root body.home-rebuilt main#main-content .hp-evidence-adoption .hp-release-links{border-color:#315063!important;}
}

@layer sd-inter-light {
 html:root body.sd-lean-page main#main-content #samples.ev-section .ev-flow-marker{background:#061b2b!important;}
 html:root body.home-rebuilt main#main-content .hp-evidence-adoption :is(.hp-check-action,.hp-release-links a)>span[aria-hidden="true"]{color:#48dacf!important;}
}

@layer sd-inter-light {
 html:root body.sd-lean-page main#main-content #samples.ev-section .ev-sample-flow li+li::before{background:#061b2b!important;color:#48dacf!important;}
 html:root body.sd-lean-page main#main-content #samples.ev-section :is(.ev-sample-flow,.ev-sample-flow li){border-color:#315063!important;}
}

/* Explorer control labels remain white on the footer-navy form panel. */
@layer sd-inter-light {
 html:root body.sd-lean-page main#main-content #lrExplorer .lr-explore-controls :is(label,legend){color:#fff!important;opacity:1!important;}
}

/* About: the operator and legal notices stay visible on footer navy. */
@layer sd-inter-light {
 html:root body.sd-lean-page main#main-content #operator:has(.lr-operator-notices){background:#061b2b!important;width:100%;max-width:none;}
 html:root body.sd-lean-page main#main-content #operator:has(.lr-operator-notices) :is(h2,h3,p){color:#fff!important;opacity:1!important;}
 html:root body.sd-lean-page main#main-content #operator:has(.lr-operator-notices) a.lr-link{color:#48dacf!important;border-color:#48dacf!important;}
 html:root body.sd-lean-page main#main-content #operator:has(.lr-operator-notices) .lr-operator-notices{margin-top:28px;}
 html:root body.sd-lean-page main#main-content #operator:has(.lr-operator-notices) .lr-operator-notices h3{font-size:20px!important;margin-bottom:12px;}
}

/* Delivery package file trees use the footer navy background. */
@layer sd-inter-light {
 html:root body.sd-lean-page main#main-content .dsg-tree-grid .dsg-tree{background:#061b2b!important;color:#fff!important;border-color:#315063!important;opacity:1!important;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace!important;}
}

/* Share header and panel rows so desktop file trees align at both edges. */
@layer sd-inter-light {
 @media(min-width:761px){
  html:root body.sd-lean-page main#main-content .dsg-tree-grid{align-items:stretch;row-gap:0;}
  html:root body.sd-lean-page main#main-content .dsg-tree-grid .dsg-tree-card{display:grid;grid-row:span 2;grid-template-rows:subgrid;row-gap:0;}
 }
}

/* Keep the Explorer portrait and citizen identity in one compact row. */
@layer sd-inter-light {
 html:root body.sd-lean-page main#main-content #lrExplorer .lr-citizen-summary-heading{display:flex;align-items:center;gap:24px;}
 html:root body.sd-lean-page main#main-content #lrExplorer .lr-citizen-summary-copy{min-width:0;flex:1;}
 html:root body.sd-lean-page main#main-content #lrExplorer .lr-summary-avatar{order:-1;display:block;flex:0 0 112px;width:112px;height:112px;object-fit:cover;margin:0;}
 @media(max-width:760px){
  html:root body.sd-lean-page main#main-content #lrExplorer .lr-citizen-summary-heading{gap:16px;}
  html:root body.sd-lean-page main#main-content #lrExplorer .lr-summary-avatar{flex-basis:72px;width:72px;height:72px;}
  html:root body.sd-lean-page main#main-content #lrExplorer .lr-citizen-summary-copy h2{font-size:24px!important;line-height:1.2!important;}
 }
}

/* Give the citizen row breathing room and separate its download badges. */
@layer sd-inter-light {
 html:root body.sd-lean-page main#main-content #lrExplorer .lr-citizen-summary{padding-block:32px!important;}
 html:root body.sd-lean-page main#main-content #lrExplorer .lr-citizen-summary [data-lr-downloads]{margin-top:0!important;padding-top:24px!important;}
 @media(max-width:760px){
  html:root body.sd-lean-page main#main-content #lrExplorer .lr-citizen-summary{padding-block:24px!important;}
 }
}

/* Separate downloads from the domain cards with space instead of a divider. */
@layer sd-inter-light {
 html:root body.sd-lean-page main#main-content #lrExplorer .lr-citizen-summary{border-bottom:0!important;padding-top:40px!important;padding-bottom:48px!important;}
 @media(max-width:760px){
  html:root body.sd-lean-page main#main-content #lrExplorer .lr-citizen-summary{padding-top:32px!important;padding-bottom:40px!important;}
 }
}

/* Frame the citizen identity separately from the download badges. */
@layer sd-inter-light {
 html:root body.sd-lean-page main#main-content #lrExplorer .lr-citizen-summary-heading{border:1px solid #b7dce5!important;padding:24px!important;box-sizing:border-box;}
 @media(max-width:760px){
  html:root body.sd-lean-page main#main-content #lrExplorer .lr-citizen-summary-heading{padding:16px!important;}
 }
 @media(max-width:360px){
  html:root body.sd-lean-page main#main-content #lrExplorer .lr-citizen-summary-heading{padding:12px!important;gap:12px;}
 }
}

/* Desktop downloads share the profile row; mobile downloads remain below it. */
@layer sd-inter-light {
 @media(min-width:1025px){
  html:root body.sd-lean-page main#main-content #lrExplorer .lr-citizen-summary{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:32px;}
  html:root body.sd-lean-page main#main-content #lrExplorer .lr-citizen-summary [data-lr-downloads]{min-width:0;width:auto;padding-top:0!important;}
 }
}
