/*! NBC v6.692 — Surface Ownership Contract
    Defines explicit paper/dark material ownership for nested components and preserves evidence pairing after global ambient transparency.
    Foundation only: no motion or content changes. */
:root{
  --nbc-evidence-paper:#f3f0e8;
  --nbc-evidence-paper-2:#ebe8e0;
  --nbc-evidence-ink:#111711;
  --nbc-evidence-muted:#525c54;
  --nbc-evidence-link:#356e46;
  --nbc-dark-copy:#eef3ef;
  --nbc-dark-muted:rgba(238,243,239,.72);
}

/* Evidence is a paper surface everywhere except the intentionally dark home narrative
   and the article diagnostic instrument, which is a dark nested instrument by design. */
body.page.design-system-executive[data-ambilight-contract="v6660"]:not(.page-home)
main.nbc-page-shell [data-ambient="evidence"]:not(.article-diagnostic-context){
  background:linear-gradient(180deg,var(--nbc-evidence-paper),var(--nbc-evidence-paper-2))!important;
  color:var(--nbc-evidence-ink)!important;
}

body.page.design-system-executive[data-ambilight-contract="v6660"]:not(.page-home)
main.nbc-page-shell [data-ambient="evidence"]:not(.article-diagnostic-context)
:is(h1,h2,h3,h4,h5,h6,strong,b,dt,summary,th){
  color:var(--nbc-evidence-ink)!important;
  -webkit-text-fill-color:currentColor!important;
}

body.page.design-system-executive[data-ambilight-contract="v6660"]:not(.page-home)
main.nbc-page-shell [data-ambient="evidence"]:not(.article-diagnostic-context)
:is(p,li,dd,small,figcaption,td){
  color:var(--nbc-evidence-muted)!important;
  -webkit-text-fill-color:currentColor!important;
}

body.page.design-system-executive[data-ambilight-contract="v6660"]:not(.page-home)
main.nbc-page-shell [data-ambient="evidence"]:not(.article-diagnostic-context) a:not(.btn):not([class*="button"]){
  color:var(--nbc-evidence-link);
}

/* Preserve the more deliberate paper recipes on case pages. */
body.page-template-case-detail[data-case-layout="v6692"] [data-p74-case-act="decision"][data-ambient="evidence"]{
  background:linear-gradient(180deg,var(--case-final-paper,#f2f0e9),var(--case-final-paper-2,#ebe8e0))!important;
}
body.page-template-case-detail[data-case-layout="v6692"] [data-p74-case-act="evidence"][data-ambient="evidence"]{
  background:linear-gradient(180deg,#eef0e9,var(--case-final-paper-2,#ebe8e0))!important;
}
body.page-template-case-index[data-case-layout="v6692"] .case2-index-library[data-ambient="evidence"]{
  background:linear-gradient(180deg,var(--case-final-paper,#f2f0e9),var(--case-final-paper-2,#ebe8e0))!important;
}

/* Keep existing family-specific paper variables where they exist. */
body.page-industry-hub .bi-proof[data-ambient="evidence"],
body.page-regional .local-proof[data-ambient="evidence"],
body.page-service .service-case-proof[data-ambient="evidence"]{
  background:var(--p73-paper,var(--p3-paper,var(--nbc-evidence-paper)))!important;
  color:var(--p73-paper-ink,var(--p3-paper-ink,var(--nbc-evidence-ink)))!important;
}

/* Regional evidence lead had a legacy dark gradient plus the paper text tokens.
   Make its surface contract explicit too. */
body.page-regional-gateway .local-economy[data-ambient="evidence"]{
  background:linear-gradient(180deg,#f3f0e8,#ece9e1)!important;
  color:var(--nbc-evidence-ink)!important;
}

/* Article Decision Ledger: outer surface is paper, but its table rows/cards are dark instruments.
   Restore light copy inside those dark nested surfaces. */
body.page-article .ep-decision-ledger[data-ambient="evidence"] .ep-table-wrap,
body.page-article .ep-decision-ledger[data-ambient="evidence"] .ep-decision-table tr,
body.page-article .ep-decision-ledger[data-ambient="evidence"] .ep-responsibility-ledger article{
  color:var(--nbc-dark-copy)!important;
}
body.page-article .ep-decision-ledger[data-ambient="evidence"] .ep-table-wrap :is(td,strong,b),
body.page-article .ep-decision-ledger[data-ambient="evidence"] .ep-decision-table tr :is(td,strong,b),
body.page-article .ep-decision-ledger[data-ambient="evidence"] .ep-responsibility-ledger article :is(strong,b){
  color:var(--nbc-dark-copy)!important;
  -webkit-text-fill-color:currentColor!important;
}
body.page-article .ep-decision-ledger[data-ambient="evidence"] .ep-responsibility-ledger article p{
  color:var(--nbc-dark-muted)!important;
  -webkit-text-fill-color:currentColor!important;
}
body.page-article .ep-decision-ledger[data-ambient="evidence"] .ep-decision-table th,
body.page-article .ep-decision-ledger[data-ambient="evidence"] .ep-decision-table td::before,
body.page-article .ep-decision-ledger[data-ambient="evidence"] .ep-responsibility-ledger article>span{
  color:var(--ep-green,#8bcf9a)!important;
}

/* Article diagnostic context is intentionally a dark instrument despite its evidence semantic. */
body.page-article .article-diagnostic-context[data-ambient="evidence"]{
  color:var(--nbc-dark-copy)!important;
}
body.page-article .article-diagnostic-context[data-ambient="evidence"] :is(h1,h2,h3,h4,strong,b,dt,summary){
  color:var(--nbc-dark-copy)!important;
  -webkit-text-fill-color:currentColor!important;
}
body.page-article .article-diagnostic-context[data-ambient="evidence"] :is(p,li,dd,small){
  color:var(--nbc-dark-muted)!important;
  -webkit-text-fill-color:currentColor!important;
}
body.page-article .article-diagnostic-context[data-ambient="evidence"] :is(.mono,.nbc-eyebrow,span){
  color:var(--kds-green,#8bcf9a)!important;
}

/* Home was intentionally authored as a continuous dark narrative in v6.687+.
   Reassert that contract so this shared patch cannot regress it. */
body.page-home [data-ambient="evidence"]{
  color:inherit;
}

@media (prefers-contrast:more){
  body.page.design-system-executive[data-ambilight-contract="v6660"]:not(.page-home)
  main.nbc-page-shell [data-ambient="evidence"]:not(.article-diagnostic-context){
    --nbc-evidence-muted:#3f4841;
  }
}

/* Specificity shield: the historical evidence token rule is deliberately strong.
   Dark nested ledger instruments must beat it with the same full contract prefix. */
body.page.page-article.design-system-executive[data-ambilight-contract="v6660"]
main.nbc-page-shell .ep-decision-ledger[data-ambient="evidence"] .ep-decision-table :is(td,strong,b){
  color:var(--nbc-dark-copy)!important;
  -webkit-text-fill-color:currentColor!important;
}
body.page.page-article.design-system-executive[data-ambilight-contract="v6660"]
main.nbc-page-shell .ep-decision-ledger[data-ambient="evidence"] .ep-decision-table td::before{
  color:var(--ep-green,#8bcf9a)!important;
}
@media (min-width:761px){
  body.page.page-article.design-system-executive[data-ambilight-contract="v6660"]
  main.nbc-page-shell .ep-decision-ledger[data-ambient="evidence"] .ep-responsibility-ledger article :is(strong,b){
    color:var(--nbc-dark-copy)!important;
    -webkit-text-fill-color:currentColor!important;
  }
  body.page.page-article.design-system-executive[data-ambilight-contract="v6660"]
  main.nbc-page-shell .ep-decision-ledger[data-ambient="evidence"] .ep-responsibility-ledger article p{
    color:var(--nbc-dark-muted)!important;
    -webkit-text-fill-color:currentColor!important;
  }
}

/* Static/no-JS home fallback: this section is a dark narrative, never a paper sheet. */
body.page-home #persoenlich.home-attitude[data-ambient="evidence"]{
  background:linear-gradient(180deg,rgba(255,255,255,0),rgba(255,255,255,.012))!important;
  color:#f2f5f1!important;
}
body.page-home #persoenlich.home-attitude[data-ambient="evidence"] :is(h2,h3,strong){
  color:#f2f5f1!important;
  -webkit-text-fill-color:currentColor!important;
}
body.page-home #persoenlich.home-attitude[data-ambient="evidence"] :is(p,li,small){
  color:rgba(229,238,232,.68)!important;
  -webkit-text-fill-color:currentColor!important;
}
body.page-home #persoenlich.home-attitude[data-ambient="evidence"] :is(.mono,.nbc-eyebrow,a){
  color:#9adbac!important;
}


/* ================================================================
   v6.692 explicit material ownership
   Nested components own their text palette even inside evidence parents.
   Component owners keep control of their authored background material.
   ================================================================ */
body.page.design-system-executive[data-ambilight-contract="v6660"] main.nbc-page-shell [data-surface="paper"]{color:var(--nbc-evidence-ink)!important}
body.page.design-system-executive[data-ambilight-contract="v6660"] main.nbc-page-shell [data-surface="paper"] :is(h1,h2,h3,h4,h5,h6,strong,b,dt,summary,th){color:var(--nbc-evidence-ink)!important;-webkit-text-fill-color:currentColor!important}
body.page.design-system-executive[data-ambilight-contract="v6660"] main.nbc-page-shell [data-surface="paper"] :is(p,li,dd,small,figcaption,td){color:var(--nbc-evidence-muted)!important;-webkit-text-fill-color:currentColor!important}
body.page.design-system-executive[data-ambilight-contract="v6660"] main.nbc-page-shell [data-surface="paper"] a:not(.btn):not([class*="button"]){color:var(--nbc-evidence-link)!important}

body.page.design-system-executive[data-ambilight-contract="v6660"] main.nbc-page-shell [data-surface="dark"]{color:var(--nbc-dark-copy)!important}
body.page.design-system-executive[data-ambilight-contract="v6660"] main.nbc-page-shell [data-surface="dark"] :is(h1,h2,h3,h4,h5,h6,dt,summary,th){color:var(--nbc-dark-copy)!important;-webkit-text-fill-color:currentColor!important}
body.page.design-system-executive[data-ambilight-contract="v6660"] main.nbc-page-shell [data-surface="dark"] :is(p,li,dd,small,figcaption,td){color:var(--nbc-dark-muted)!important;-webkit-text-fill-color:currentColor!important}
body.page.design-system-executive[data-ambilight-contract="v6660"] main.nbc-page-shell [data-surface="dark"] a:not(.btn):not([class*="button"]){color:#a6ddb1!important}

body.page-regional-gateway .local-context-grid [data-surface="dark"] .mono,
body.page-regional-gateway .local-proof-grid [data-surface="dark"] :is(.mono,em){color:var(--local-green,#86c895)!important}
body.page-regional-intelligence [data-surface="dark"] :is(.regional-matrix__cell strong,.regional-radius-card>span,.regional-principles span){color:rgb(var(--regional-green))!important}

/* Case material remains owned by the active case layout, not by the generic paper palette. */
body.page-template-case-index[data-case-layout="v6692"] .case2-index-library[data-surface="paper"]{background:linear-gradient(180deg,var(--case-final-paper,#f2f0e9),var(--case-final-paper-2,#ebe8e0))!important}
body.page-template-case-detail[data-case-layout="v6692"] [data-p74-case-act="decision"][data-surface="paper"]{background:linear-gradient(180deg,var(--case-final-paper,#f2f0e9),var(--case-final-paper-2,#ebe8e0))!important}
body.page-template-case-detail[data-case-layout="v6692"] [data-p74-case-act="evidence"][data-surface="paper"]{background:linear-gradient(180deg,#eef0e9,var(--case-final-paper-2,#ebe8e0))!important}
