/* DELTA-SIERRA MARS V6.28 — cumulative global visual contract, FR + EN */
:root{
  --ds-v625-paper:#fffdf8;
  --ds-v625-ink:#23384f;
  --ds-v625-sidebar:#071522;
  --ds-v625-sidebar-line:#243c4d;
  --ds-v625-gold:#d7ad58;
}

/* Real breathing room between the left sidebar and the reading column. */
body.mars-page .mars-portal-main,
body.mars-site .mars-portal-main,
body.mars-page .academy-portal-main,
body.mars-site .academy-portal-main{
  box-sizing:border-box!important;
  padding-left:clamp(1.55rem,3vw,3.35rem)!important;
  padding-right:clamp(1.55rem,3vw,3.35rem)!important;
}
body.mars-page .mars-portal-main > *,
body.mars-site .mars-portal-main > *{
  box-sizing:border-box;
}
@media(max-width:900px){
  body.mars-page .mars-portal-main,
  body.mars-site .mars-portal-main,
  body.mars-page .academy-portal-main,
  body.mars-site .academy-portal-main{
    padding-left:clamp(1rem,4vw,1.35rem)!important;
    padding-right:clamp(1rem,4vw,1.35rem)!important;
  }
}

/* Sidebar typography: no yellow/bold blocks. Gold is an accent only. */
body .mars-system-sidebar{
  background:var(--ds-v625-sidebar)!important;
}
body .mars-system-sidebar .mars-sidebar-title{font-weight:540!important;}
body .mars-system-sidebar details.mars-sidebar-group > summary,
body .mars-system-sidebar details > summary{
  position:relative!important;
  color:#e9eff4!important;
  -webkit-text-fill-color:#e9eff4!important;
  background:#0c1b27!important;
  border-color:var(--ds-v625-sidebar-line)!important;
  font-weight:450!important;
  letter-spacing:.002em!important;
  line-height:1.28!important;
}
body .mars-system-sidebar details.mars-sidebar-group > summary::before,
body .mars-system-sidebar details > summary::before{
  color:var(--ds-v625-gold)!important;
}
body .mars-system-sidebar details.mars-sidebar-group > summary:hover,
body .mars-system-sidebar details.mars-sidebar-group > summary:focus-visible,
body .mars-system-sidebar details > summary:hover,
body .mars-system-sidebar details > summary:focus-visible{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  background:#163047!important;
}
body .mars-system-sidebar details.mars-sidebar-group.is-current-group > summary,
body .mars-system-sidebar details[open].is-current-group > summary{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  background:#35241f!important;
  border-left-color:var(--ds-v625-gold)!important;
  font-weight:500!important;
}
body .mars-system-sidebar nav a,
body .mars-system-sidebar details a{
  font-size:.89rem!important;
  line-height:1.32!important;
}
body .mars-system-sidebar strong,
body .mars-system-sidebar .mars-sidebar-academy > strong{font-weight:500!important;}
body .mars-system-sidebar .mars-sidebar-academy__eyebrow,
body .mars-system-sidebar .mars-sidebar-reference-tools-v68__label{
  font-weight:480!important;
  color:#b9c8d2!important;
  -webkit-text-fill-color:#b9c8d2!important;
}

/* INFO tooltip: Chrome text-fill must be explicit or the text can become invisible. */
.ds-core-tooltip{
  background:#071018!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  border:1px solid #d1aa58!important;
  opacity:1!important;
  visibility:visible!important;
  font-weight:400!important;
  line-height:1.52!important;
  box-shadow:0 16px 48px rgba(0,0,0,.48)!important;
}
.ds-core-tooltip[hidden]{display:none!important;}
.ds-core-info-trigger,.ds-auto-glossary-term,[data-ds-tip]{
  text-decoration-line:underline!important;
  text-decoration-style:dotted!important;
  text-decoration-color:#a44a39!important;
  text-decoration-thickness:.08em!important;
  text-underline-offset:.16em!important;
  cursor:help!important;
}

/* Captions: never white/light text on the white reading sheet. */
body .mars-portal-main figure figcaption,
body .academy-portal-main figure figcaption,
body .organisation-visual-v623 figcaption,
body .people-editorial-figure figcaption,
body .history-book figure figcaption,
body article figure figcaption{
  color:#43566a!important;
  -webkit-text-fill-color:#43566a!important;
  text-shadow:none!important;
  font-weight:400!important;
  line-height:1.55!important;
  opacity:1!important;
}
body :is(.mars-dark,.ds-dark,.dark,.mars-shell) figure figcaption{
  color:#e8eff5!important;
  -webkit-text-fill-color:#e8eff5!important;
}

/* Organization illustrations: show the complete composition; never fake-fill portrait sides with blur. */
.organisation-visual-v623{
  width:min(100%,920px)!important;
  margin:2.1rem auto 2.45rem!important;
}
.organisation-visual-v623 img{
  display:block!important;
  width:auto!important;
  max-width:100%!important;
  height:auto!important;
  max-height:900px!important;
  object-fit:contain!important;
  object-position:center!important;
  margin:0 auto!important;
  border-radius:16px!important;
  background:#0a1622!important;
  box-shadow:0 18px 48px rgba(7,18,30,.18)!important;
}

/* Premium editorial grids: replace the old childlike dark blocks with a sober magazine treatment. */
body .mars-master-grid,
body .mars-bible-grid,
body .mars-link-grid,
body .mars-evidence-grid,
body .ds-tool-grid,
body .mars-book-grid,
body .mars-cards{
  gap:clamp(.75rem,1.5vw,1.15rem)!important;
}
body :is(.mars-master-grid,.mars-bible-grid,.mars-link-grid,.mars-evidence-grid,.ds-tool-grid,.mars-book-grid,.mars-cards) > *{
  background:#fbfcfd!important;
  color:#25394d!important;
  border:1px solid #c8d3dc!important;
  border-radius:12px!important;
  box-shadow:0 5px 16px rgba(24,46,66,.07)!important;
}
body :is(.mars-master-grid,.mars-bible-grid,.mars-link-grid,.mars-evidence-grid,.ds-tool-grid,.mars-book-grid,.mars-cards) > a,
body :is(.mars-master-grid,.mars-bible-grid,.mars-link-grid,.mars-evidence-grid,.ds-tool-grid,.mars-book-grid,.mars-cards) > article,
body :is(.mars-master-grid,.mars-bible-grid,.mars-link-grid,.mars-evidence-grid,.ds-tool-grid,.mars-book-grid,.mars-cards) > div{
  padding:1rem 1.05rem!important;
}
body :is(.mars-master-grid,.mars-bible-grid,.mars-link-grid,.mars-evidence-grid,.ds-tool-grid,.mars-book-grid,.mars-cards) h2,
body :is(.mars-master-grid,.mars-bible-grid,.mars-link-grid,.mars-evidence-grid,.ds-tool-grid,.mars-book-grid,.mars-cards) h3,
body :is(.mars-master-grid,.mars-bible-grid,.mars-link-grid,.mars-evidence-grid,.ds-tool-grid,.mars-book-grid,.mars-cards) strong{
  color:#1b3854!important;
  -webkit-text-fill-color:#1b3854!important;
}
body :is(.mars-master-grid,.mars-bible-grid,.mars-link-grid,.mars-evidence-grid,.ds-tool-grid,.mars-book-grid,.mars-cards) p,
body :is(.mars-master-grid,.mars-bible-grid,.mars-link-grid,.mars-evidence-grid,.ds-tool-grid,.mars-book-grid,.mars-cards) span,
body :is(.mars-master-grid,.mars-bible-grid,.mars-link-grid,.mars-evidence-grid,.ds-tool-grid,.mars-book-grid,.mars-cards) small{
  color:#485c70!important;
  -webkit-text-fill-color:#485c70!important;
}

/* Existing hero/status boxes stay useful but stop looking like dense schematics. */
body .mars-stat-grid > *,body .mars-grid > *{
  border-radius:10px!important;
  box-shadow:none!important;
}
body .mars-stat-grid{gap:.8rem!important;}

/* Right-side contents: compact labels, readable density, active section follows the reader. */
.ds-page-toc{top:clamp(112px,14vh,178px)!important;right:1rem!important;}
.ds-page-toc__panel{
  width:min(286px,calc(100vw - 2rem))!important;
  max-height:min(72vh,680px)!important;
  border-radius:14px!important;
  background:#07131f!important;
}
.ds-page-toc__header{padding:.78rem .85rem!important;}
.ds-page-toc__header strong{
  color:#f0cc78!important;
  -webkit-text-fill-color:#f0cc78!important;
  font-size:.94rem!important;
  font-weight:620!important;
}
.ds-page-toc__nav{padding:.45rem 0 .65rem!important;scroll-behavior:smooth!important;}
.ds-page-toc__nav a{
  padding:.45rem .78rem!important;
  font-size:.84rem!important;
  line-height:1.24!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
}
.ds-page-toc__nav li.is-sub a{padding-left:1.18rem!important;font-size:.8rem!important;}
.ds-page-toc__nav a.is-current{border-left-width:4px!important;}
.ds-page-toc__toggle{font-weight:600!important;}
@media(max-width:900px){
  .ds-page-toc__panel{width:min(320px,calc(100vw - 1.5rem))!important;max-height:min(64vh,520px)!important;}
}

/* Headings become reliable scroll targets below the sticky header. */
body main :is(h2,h3)[id]{scroll-margin-top:120px;}


/* V6.27 — SIDEBAR NON-INTERACTIVE CONTRAST CONTRACT
   Complements the unique link/button contract. It deliberately ignores historical
   sidebar version tokens so every FR/EN page receives the same readable chrome. */
body .mars-system-sidebar{color:#e6edf3!important;-webkit-text-fill-color:#e6edf3!important}
body .mars-system-sidebar .mars-sidebar-search-help,
body .mars-system-sidebar .mars-sidebar-academy p,
body .mars-system-sidebar .mars-sidebar-library p{color:#cbd8e1!important;-webkit-text-fill-color:#cbd8e1!important;font-weight:400!important}
body .mars-system-sidebar .mars-sidebar-academy{background:#152b3d!important;border:1px solid #4f6b7f!important;box-shadow:none!important}
body .mars-system-sidebar .mars-sidebar-academy__eyebrow,
body .mars-system-sidebar .mars-sidebar-library__eyebrow,
body .mars-system-sidebar .mars-sidebar-reference-tools-v68__label{color:#c9d9e5!important;-webkit-text-fill-color:#c9d9e5!important;font-weight:480!important}
body .mars-system-sidebar .mars-sidebar-academy>strong,
body .mars-system-sidebar .mars-sidebar-library>strong{color:#fff!important;-webkit-text-fill-color:#fff!important;font-weight:500!important}
body .mars-system-sidebar details>summary{color:#edf3f7!important;-webkit-text-fill-color:#edf3f7!important;font-weight:500!important}
body .mars-system-sidebar .mars-sidebar-subgroup-v621>strong,
body .mars-system-sidebar .mars-risks-v20308>strong{color:#f0d898!important;-webkit-text-fill-color:#f0d898!important;font-weight:500!important}
body .mars-system-sidebar input[type="search"]{color:#17232d!important;-webkit-text-fill-color:#17232d!important;background:#fffaf2!important;border-color:#8fa4b1!important}
body .mars-system-sidebar input[type="search"]::placeholder{color:#4b5c68!important;opacity:1!important}


/* V6.28 — additions: bottom books, documentary deepening and mobile organisation containment. */
.mars-books-promo-v628{margin:3rem auto 1.8rem;padding:1rem 1rem 1.1rem;max-width:760px;text-align:center;border-top:1px solid rgba(255,255,255,.08)}
.mars-books-promo-v628__link{display:block;width:min(100%,620px);margin:0 auto;border-radius:14px;overflow:hidden;box-shadow:0 12px 28px rgba(7,21,34,.18)}
.mars-books-promo-v628__link img{display:block;width:100%;height:auto;aspect-ratio:auto;object-fit:contain}
.ds-v628-depth{margin-top:2.2rem}
.ds-v628-depth>h2{margin-top:2.4rem}
.ds-v628-depth p{max-width:78ch}
.ds-v628-depth-sources{margin:1.25rem 0 1.8rem;padding:1rem 1.1rem;background:#f4f7f9;border:1px solid #d3dde5;border-radius:10px}
.ds-v628-depth-sources strong{display:block;margin-bottom:.45rem;color:#17324d}
.ds-v628-depth-sources ul{margin:.3rem 0 0 1.2rem;padding:0}
.ds-v628-depth-sources li{margin:.28rem 0}
@media(max-width:720px){.mars-books-promo-v628{margin-top:2.1rem;padding:.8rem .35rem}.mars-books-promo-v628__link{width:min(100%,520px)}.ds-v628-depth p{max-width:none}}
@media(max-width:760px){
  .mars-portal-main .organisation-book{box-sizing:border-box;width:100%;max-width:100%;margin-left:0;margin-right:0}
  .mars-portal-main .organisation-book *{box-sizing:border-box;max-width:100%}
  .mars-portal-main .organisation-hero{max-width:100%}
}
/* Footer copy remains readable on the dark shell. */
.mars-footer,.mars-footer p,.mars-footer small,.mars-footer span{color:#cbd6e0!important;-webkit-text-fill-color:#cbd6e0!important}

/* V6.28 QA pass — non-interactive text contrast, verified by rendered DOM.
   These are shared surface contracts, not page-local patches. */
#ds-mars-root .history-book-page .mars-portal-main > :is(h2,h3,p),
.history-book-page .mars-portal-main > :is(h2,h3,p){color:#e8eff5!important;-webkit-text-fill-color:#e8eff5!important}
#ds-mars-root .history-book-page .mars-portal-main > :is(h2,h3),
.history-book-page .mars-portal-main > :is(h2,h3){color:#f4d88f!important;-webkit-text-fill-color:#f4d88f!important}
#ds-mars-root .mars-v20312-parity :is(h2,h3,p,strong,div),
.mars-v20312-parity :is(h2,h3,p,strong,div){color:#edf3f7!important;-webkit-text-fill-color:#edf3f7!important}
#ds-mars-root .mars-v20312-parity-sources :is(p,strong,div),
.mars-v20312-parity-sources :is(p,strong,div){color:#edf3f7!important;-webkit-text-fill-color:#edf3f7!important}

/* Figure captions on paper/light figures: dark ink. */
#ds-mars-root .mars-portal-main :is(.mars-premium-figure,.mars-editorial-visual,.mars-inline-thumb,.mars-reading-figure,.mars-diagram,.mars-hero-visual,.mars-figure,.mars-deep-figure) > figcaption,
.mars-portal-main :is(.mars-premium-figure,.mars-editorial-visual,.mars-inline-thumb,.mars-reading-figure,.mars-diagram,.mars-hero-visual,.mars-figure,.mars-deep-figure) > figcaption{color:#354b5d!important;-webkit-text-fill-color:#354b5d!important}
/* Opening people figures and Academy figures use dark panels: light caption. */
#ds-mars-root .people-editorial-figure > figcaption,
#ds-mars-root .academy-figure > figcaption,
.people-editorial-figure > figcaption,.academy-figure > figcaption{color:#e8eff5!important;-webkit-text-fill-color:#e8eff5!important}

/* Breadcrumbs rendered on dark Mars chrome. */
#ds-mars-root .mars-breadcrumb,.mars-breadcrumb{color:#dce6ee!important;-webkit-text-fill-color:#dce6ee!important}

/* V6.28 rendered-surface annotations. The Builder records a component's actual light/dark
   surface in HTML; this shared file alone decides readable non-interactive ink. */
.mars-portal-main[data-ds-text-surface="dark"] > :is(h1,h2,h3,h4,p,strong,span,abbr){color:#edf3f7!important;-webkit-text-fill-color:#edf3f7!important}
.mars-portal-main[data-ds-text-surface="light"] > :is(h1,h2,h3,h4,p,strong,span,abbr){color:#20354f!important;-webkit-text-fill-color:#20354f!important}
.mars-synthesis[data-ds-text-surface="dark"] :is(h1,h2,h3,h4,p,strong,span,abbr){color:#edf3f7!important;-webkit-text-fill-color:#edf3f7!important}
.mars-synthesis[data-ds-text-surface="light"] :is(h1,h2,h3,h4,p,strong,span,abbr){color:#20354f!important;-webkit-text-fill-color:#20354f!important}
.mars-section[data-ds-text-surface="dark"] > :is(h1,h2,h3,h4,p,strong,span,abbr,div){color:#edf3f7!important;-webkit-text-fill-color:#edf3f7!important}
.mars-section[data-ds-text-surface="light"] > :is(h1,h2,h3,h4,p,strong,span,abbr,div){color:#20354f!important;-webkit-text-fill-color:#20354f!important}
.mars-v20312-parity[data-ds-text-surface="dark"] :is(h1,h2,h3,h4,p,strong,span,abbr,div){color:#edf3f7!important;-webkit-text-fill-color:#edf3f7!important}
.mars-v20312-parity[data-ds-text-surface="light"] :is(h1,h2,h3,h4,p,strong,span,abbr,div){color:#20354f!important;-webkit-text-fill-color:#20354f!important}
.mars-v20312-parity-sources[data-ds-text-surface="dark"] :is(p,strong,span,abbr,div),.mars-v20313-parity-source[data-ds-text-surface="dark"] :is(p,strong,span,abbr,div){color:#edf3f7!important;-webkit-text-fill-color:#edf3f7!important}
.mars-v20312-parity-sources[data-ds-text-surface="light"] :is(p,strong,span,abbr,div),.mars-v20313-parity-source[data-ds-text-surface="light"] :is(p,strong,span,abbr,div){color:#20354f!important;-webkit-text-fill-color:#20354f!important}
figure[data-ds-text-surface="dark"] > figcaption{color:#edf3f7!important;-webkit-text-fill-color:#edf3f7!important}
figure[data-ds-text-surface="light"] > figcaption{color:#354b5d!important;-webkit-text-fill-color:#354b5d!important}
.mars-breadcrumb[data-ds-text-surface="dark"]{color:#dce6ee!important;-webkit-text-fill-color:#dce6ee!important}
.mars-breadcrumb[data-ds-text-surface="light"]{color:#354b5d!important;-webkit-text-fill-color:#354b5d!important}

/* V6.28 high-specificity final surface gate. These selectors intentionally outrank
   historical !important rules while still depending only on shared surface metadata. */
#ds-mars-root .mars-portal-main[data-ds-text-surface="dark"] > :is(h1,h2,h3,h4,p,strong,span,abbr){color:#edf3f7!important;-webkit-text-fill-color:#edf3f7!important}
#ds-mars-root .mars-portal-main[data-ds-text-surface="light"] > :is(h1,h2,h3,h4,p,strong,span,abbr){color:#20354f!important;-webkit-text-fill-color:#20354f!important}
#ds-mars-root .mars-synthesis[data-ds-text-surface="dark"] :is(h1,h2,h3,h4,p,strong,span,abbr){color:#edf3f7!important;-webkit-text-fill-color:#edf3f7!important}
#ds-mars-root .mars-synthesis[data-ds-text-surface="light"] :is(h1,h2,h3,h4,p,strong,span,abbr){color:#20354f!important;-webkit-text-fill-color:#20354f!important}
#ds-mars-root .mars-section[data-ds-text-surface="dark"] > :is(h1,h2,h3,h4,p,strong,span,abbr,div){color:#edf3f7!important;-webkit-text-fill-color:#edf3f7!important}
#ds-mars-root .mars-section[data-ds-text-surface="light"] > :is(h1,h2,h3,h4,p,strong,span,abbr,div){color:#20354f!important;-webkit-text-fill-color:#20354f!important}
#ds-mars-root .mars-v20312-parity[data-ds-text-surface="dark"],
#ds-mars-root .mars-v20312-parity[data-ds-text-surface="dark"] :is(h1,h2,h3,h4,p,strong,span,abbr,div){color:#edf3f7!important;-webkit-text-fill-color:#edf3f7!important}
#ds-mars-root .mars-v20312-parity[data-ds-text-surface="light"],
#ds-mars-root .mars-v20312-parity[data-ds-text-surface="light"] :is(h1,h2,h3,h4,p,strong,span,abbr,div){color:#20354f!important;-webkit-text-fill-color:#20354f!important}
#ds-mars-root .mars-v20312-parity-sources[data-ds-text-surface="dark"],#ds-mars-root .mars-v20313-parity-source[data-ds-text-surface="dark"]{color:#edf3f7!important;-webkit-text-fill-color:#edf3f7!important}
#ds-mars-root .mars-v20312-parity-sources[data-ds-text-surface="light"],#ds-mars-root .mars-v20313-parity-source[data-ds-text-surface="light"]{color:#20354f!important;-webkit-text-fill-color:#20354f!important}
#ds-mars-root .mars-portal-main figure[data-ds-text-surface="dark"] > figcaption{color:#edf3f7!important;-webkit-text-fill-color:#edf3f7!important}
#ds-mars-root .mars-portal-main figure[data-ds-text-surface="light"] > figcaption{color:#354b5d!important;-webkit-text-fill-color:#354b5d!important}
#ds-mars-root .mars-breadcrumb[data-ds-text-surface="dark"]{color:#dce6ee!important;-webkit-text-fill-color:#dce6ee!important}
#ds-mars-root .mars-breadcrumb[data-ds-text-surface="light"]{color:#354b5d!important;-webkit-text-fill-color:#354b5d!important}
