/* DELTA-SIERRA MARS premium closure - site-wide visual/premium closure.
   Loaded after previous Mars contracts. Scope: presentation only; no editorial content.
*/
:root{--ds-premium-ink:#24384d;--ds-premium-heading:#17345a;--ds-premium-muted:#455a70;--ds-premium-paper:#fffdf8;--ds-premium-gold:#f1c75b;--ds-premium-dark:#0b1a2b;--ds-premium-link:#115f9f;}
html#ds-mars-root body{--ds-premium-reading:82ch;}
@media(min-width:1025px){
 html#ds-mars-root body main.mars-portal-frame{column-gap:clamp(1.25rem,2vw,2.2rem)!important;}
 html#ds-mars-root body .mars-portal-main{padding-left:clamp(1.7rem,2.8vw,3rem)!important;padding-right:clamp(1.5rem,2.5vw,2.8rem)!important;}
}
html#ds-mars-root body .mars-portal-main{box-sizing:border-box!important;min-width:0!important;}
html#ds-mars-root body :is(.people-book,.organisation-book,.history-book,.mars-longread-book,.mars-book-deepening,.mars-monograph-depth,.mars-research-essay,.mars-article,article[data-ds-book]) :is(p,li){font-size:clamp(1rem,.28vw + .91rem,1.075rem)!important;line-height:1.74!important;}
html#ds-mars-root body :is(.people-book,.organisation-book,.history-book,.mars-longread-book,.mars-book-deepening,.mars-monograph-depth,.mars-research-essay,article[data-ds-book]) > :is(p,ul,ol,blockquote),
html#ds-mars-root body :is(.people-book,.organisation-book,.history-book,.mars-longread-book,.mars-book-deepening,.mars-monograph-depth,.mars-research-essay,article[data-ds-book]) section > :is(p,ul,ol,blockquote){max-width:var(--ds-premium-reading)!important;}
html#ds-mars-root body :is(.people-hero,.organisation-hero,.org-portal-header,.history-book-header,.mars-hero,.mars-bible-hero,.mars-system-hero){box-sizing:border-box!important;overflow:hidden!important;}
html#ds-mars-root body :is(.people-hero,.organisation-hero,.org-portal-header,.history-book-header,.mars-hero,.mars-bible-hero,.mars-system-hero)[data-ds-text-surface="dark"],
html#ds-mars-root body .mars-portal-main[data-ds-text-surface="dark"] > :is(.people-hero,.organisation-hero,.org-portal-header,.history-book-header,.mars-hero,.mars-bible-hero,.mars-system-hero){color:#f7fbff!important;-webkit-text-fill-color:#f7fbff!important;}
html#ds-mars-root body :is(.people-hero,.organisation-hero,.org-portal-header,.history-book-header,.mars-hero,.mars-bible-hero,.mars-system-hero) :is(h1,h2,h3,p,span,strong,em,small,a){color:#f7fbff!important;-webkit-text-fill-color:#f7fbff!important;text-shadow:none!important;opacity:1!important;}
html#ds-mars-root body :is(.people-hero,.organisation-hero,.org-portal-header,.history-book-header,.mars-hero,.mars-bible-hero,.mars-system-hero) :is(.people-kicker,.org-kicker,.history-kicker,.eyebrow,.kicker){color:#ffe08a!important;-webkit-text-fill-color:#ffe08a!important;font-weight:850!important;letter-spacing:.08em!important;}
html#ds-mars-root body .people-hero h1{font-size:clamp(2.15rem,3.15vw,3.45rem)!important;line-height:1.04!important;margin:.55rem 0 .85rem!important;}
html#ds-mars-root body .people-hero .people-deck{max-width:72ch!important;font-size:clamp(1.05rem,.45vw + .96rem,1.18rem)!important;line-height:1.72!important;}
html#ds-mars-root body .org-portal-header h1,html#ds-mars-root body .organisation-hero h1,html#ds-mars-root body .history-book-header h1{font-size:clamp(2.05rem,3vw,3.35rem)!important;line-height:1.06!important;}
html#ds-mars-root body .people-facts,html#ds-mars-root body .org-origin-facts{gap:1rem!important;margin:1.45rem 0 2rem!important;}
html#ds-mars-root body .people-fact,html#ds-mars-root body .org-origin-fact{padding:1rem 1.05rem!important;background:#f8fbff!important;color:#24384d!important;-webkit-text-fill-color:#24384d!important;box-shadow:0 6px 18px rgba(15,37,58,.055)!important;}
html#ds-mars-root body .people-fact :is(small,strong,span),html#ds-mars-root body .org-origin-fact :is(small,strong,span){opacity:1!important;text-shadow:none!important;}
html#ds-mars-root body figure{max-width:100%;}
html#ds-mars-root body figure :is(.mars-bible-zoom-hint,.ds-figure-zoom-button){display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:38px!important;margin:.65rem auto 0!important;padding:.48rem .75rem!important;border:1px solid #9fb3c5!important;border-radius:8px!important;background:#f5f9fd!important;color:#124f83!important;-webkit-text-fill-color:#124f83!important;font-weight:800!important;text-decoration:none!important;opacity:1!important;text-shadow:none!important;box-shadow:0 3px 10px rgba(15,37,58,.08)!important;}
html#ds-mars-root body figure :is(.mars-bible-zoom-hint,.ds-figure-zoom-button):hover,html#ds-mars-root body figure :is(.mars-bible-zoom-hint,.ds-figure-zoom-button):focus-visible{background:#173d61!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:#d8af4d!important;outline:3px solid rgba(216,175,77,.35)!important;outline-offset:2px!important;}
html#ds-mars-root body [data-ds-text-surface="light"]{color:var(--ds-premium-ink)!important;}
html#ds-mars-root body [data-ds-text-surface="light"] :is(p,li,dd,dt,td,th,span,strong,em,small,label,figcaption):not([data-ds-text-surface="dark"] *){color:var(--ds-premium-ink)!important;-webkit-text-fill-color:var(--ds-premium-ink)!important;opacity:1!important;text-shadow:none!important;}
html#ds-mars-root body [data-ds-text-surface="light"] :is(h1,h2,h3,h4,h5,h6):not([data-ds-text-surface="dark"] *){color:var(--ds-premium-heading)!important;-webkit-text-fill-color:var(--ds-premium-heading)!important;opacity:1!important;text-shadow:none!important;}
html#ds-mars-root body [data-ds-text-surface="light"] a:not(.ds-btn):not([class*="button"]):not([class*="btn"]):not([data-ds-text-surface="dark"] *){color:var(--ds-premium-link)!important;-webkit-text-fill-color:var(--ds-premium-link)!important;text-decoration-thickness:.075em!important;text-underline-offset:.14em!important;opacity:1!important;}
html#ds-mars-root body :is(.mars-hero,.people-hero,.organisation-hero,.org-portal-header,.history-book-header) .ds-btn,
html#ds-mars-root body :is(.mars-hero,.people-hero,.organisation-hero,.org-portal-header,.history-book-header) a[class*="button"],
html#ds-mars-root body :is(.mars-hero,.people-hero,.organisation-hero,.org-portal-header,.history-book-header) a[class*="btn"]{background:#f7fbff!important;color:#17345a!important;-webkit-text-fill-color:#17345a!important;border-color:#d8af4d!important;opacity:1!important;text-shadow:none!important;}
html#ds-mars-root body :is(.mars-hero,.people-hero,.organisation-hero,.org-portal-header,.history-book-header) .ds-btn:hover,
html#ds-mars-root body :is(.mars-hero,.people-hero,.organisation-hero,.org-portal-header,.history-book-header) a[class*="button"]:hover,
html#ds-mars-root body :is(.mars-hero,.people-hero,.organisation-hero,.org-portal-header,.history-book-header) a[class*="btn"]:hover{background:#ffe08a!important;color:#15263a!important;-webkit-text-fill-color:#15263a!important;}
html#ds-mars-root body .mars-sidebar-library a.ds-sidebar-library__cover{display:block!important;width:min(100%,220px)!important;margin:.85rem auto .75rem!important;border-radius:10px!important;overflow:hidden!important;box-shadow:0 8px 20px rgba(0,0,0,.28)!important;}
html#ds-mars-root body .mars-sidebar-library a.ds-sidebar-library__cover img{display:block!important;width:100%!important;height:auto!important;margin:0!important;}
html#ds-mars-root body .mars-sidebar-library a.ds-sidebar-library__cta{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:42px!important;margin:.55rem auto 0!important;padding:.55rem .8rem!important;border:1px solid #d8af4d!important;border-radius:8px!important;background:#f1c75b!important;color:#14273b!important;-webkit-text-fill-color:#14273b!important;font-weight:850!important;text-decoration:none!important;}
html#ds-mars-root body .mars-sidebar-library a.ds-sidebar-library__cta:hover,html#ds-mars-root body .mars-sidebar-library a.ds-sidebar-library__cta:focus-visible{background:#ffe08a!important;outline:3px solid rgba(255,224,138,.3)!important;outline-offset:2px!important;}
html#ds-mars-root body.academy-module-page .academy-wrap{max-width:1080px!important;padding:clamp(1.45rem,2.8vw,2.65rem)!important;}
html#ds-mars-root body.academy-module-page .academy-wrap :is(p,li){font-size:clamp(1rem,.25vw + .94rem,1.07rem)!important;line-height:1.74!important;}
html#ds-mars-root body.academy-module-page .academy-wrap h2{margin-top:2.35rem!important;padding-top:.9em!important;}
html#ds-mars-root body.academy-module-page .academy-solution{padding:1rem 1.15rem!important;border-left-width:5px!important;line-height:1.68!important;}
html#ds-mars-root body.academy-module-page .academy-formula{font-size:.98rem!important;line-height:1.6!important;}
html#ds-mars-root body .ds-academy-depth{margin:3rem 0 1.8rem!important;padding-top:1.2rem!important;border-top:2px solid #d3b269!important;}
html#ds-mars-root body .ds-academy-depth .ds-academy-orientation{padding:1.1rem 1.2rem!important;border:1px solid #cbd8e6!important;border-radius:14px!important;background:#f7fbff!important;}
html#ds-mars-root body .ds-academy-depth .ds-academy-worked{margin:1.2rem 0!important;padding:1.05rem 1.15rem!important;border:1px solid #d7c59b!important;border-radius:12px!important;background:#fffaf0!important;}
html#ds-mars-root body .ds-academy-depth .academy-solution{margin-top:.8rem!important;background:#eef8ed!important;color:#20354f!important;-webkit-text-fill-color:#20354f!important;}
html#ds-mars-root body .ds-academy-depth table{width:100%!important;max-width:100%!important;border-collapse:collapse!important;margin:1rem 0!important;}
html#ds-mars-root body .ds-academy-depth th,html#ds-mars-root body .ds-academy-depth td{padding:.65rem .7rem!important;border:1px solid #cbd8e6!important;vertical-align:top!important;}
@media(max-width:1024px){html#ds-mars-root body .mars-portal-main{padding-left:clamp(1.1rem,3.2vw,1.7rem)!important;padding-right:clamp(1.1rem,3.2vw,1.7rem)!important;}}
@media(max-width:760px){html#ds-mars-root body .mars-portal-main{padding-left:1rem!important;padding-right:1rem!important;}html#ds-mars-root body .people-hero h1{font-size:clamp(1.85rem,8vw,2.35rem)!important;}html#ds-mars-root body.academy-module-page .academy-wrap{padding:1.1rem!important;}}

/* Final authority for dark hero text after inherited light-surface contracts. */
html#ds-mars-root body .mars-portal-main[data-ds-text-surface="light"] .mars-hero > .mars-shell > div :is(h1,h2,h3,p,span,strong,em,small),
html#ds-mars-root body .mars-portal-main .history-book > .history-book-header :is(h1,h2,h3,p,span,strong,em,small),
html#ds-mars-root body .mars-portal-main .people-book > .people-hero :is(h1,h2,h3,p,span,strong,em,small),
html#ds-mars-root body .mars-portal-main .organisation-book > .organisation-hero :is(h1,h2,h3,p,span,strong,em,small){color:#f7fbff!important;-webkit-text-fill-color:#f7fbff!important;opacity:1!important;text-shadow:none!important;}
html#ds-mars-root body .mars-portal-main[data-ds-text-surface="light"] .mars-hero > .mars-shell > div :is(.mars-kicker,.eyebrow,.kicker),
html#ds-mars-root body .mars-portal-main .history-book > .history-book-header .history-kicker,
html#ds-mars-root body .mars-portal-main .people-book > .people-hero .people-kicker,
html#ds-mars-root body .mars-portal-main .organisation-book > .organisation-hero .org-kicker{color:#ffe08a!important;-webkit-text-fill-color:#ffe08a!important;opacity:1!important;}
html#ds-mars-root body .mars-portal-main[data-ds-text-surface="light"] .mars-hero a.mars-button{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:44px!important;padding:.68rem 1rem!important;border:1px solid #d8af4d!important;border-radius:9px!important;background:#f7fbff!important;color:#17345a!important;-webkit-text-fill-color:#17345a!important;font-weight:850!important;text-decoration:none!important;opacity:1!important;}
html#ds-mars-root body .mars-portal-main[data-ds-text-surface="light"] .mars-hero a.mars-button:hover,html#ds-mars-root body .mars-portal-main[data-ds-text-surface="light"] .mars-hero a.mars-button:focus-visible{background:#ffe08a!important;color:#15263a!important;-webkit-text-fill-color:#15263a!important;outline:3px solid rgba(255,224,138,.35)!important;outline-offset:2px!important;}

/* Status labels must read as separate labels, never as concatenated words. */
html#ds-mars-root body .mars-bible-status{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:.45rem .55rem!important;margin:.75rem 0 1rem!important;}
html#ds-mars-root body .mars-bible-status > span{display:inline-flex!important;align-items:center!important;min-height:30px!important;padding:.34rem .58rem!important;border:1px solid #b8c8d8!important;border-radius:999px!important;background:#f7fbff!important;color:#27415b!important;-webkit-text-fill-color:#27415b!important;font-size:.78rem!important;font-weight:800!important;letter-spacing:.035em!important;line-height:1.2!important;white-space:normal!important;}
/* Direct-child Mars Bible heroes also sit inside light main surfaces. */
html#ds-mars-root body .mars-portal-main[data-ds-text-surface="light"] > .mars-hero > :is(h1,h2,h3,p,span,strong,em,small),
html#ds-mars-root body .mars-portal-main[data-ds-text-surface="light"] > .mars-hero > div:not([data-ds-text-surface="light"]) :is(h1,h2,h3,p,span,strong,em,small){color:#f7fbff!important;-webkit-text-fill-color:#f7fbff!important;opacity:1!important;text-shadow:none!important;}
html#ds-mars-root body .mars-portal-main[data-ds-text-surface="light"] > .mars-hero > :is(.mars-kicker,.eyebrow,.kicker),
html#ds-mars-root body .mars-portal-main[data-ds-text-surface="light"] > .mars-hero > div:not([data-ds-text-surface="light"]) :is(.mars-kicker,.eyebrow,.kicker){color:#ffe08a!important;-webkit-text-fill-color:#ffe08a!important;}
/* Mobile citations remain legible; source markers must never drop below the visual QA floor. */
html#ds-mars-root body a.ds-cite-note{font-size:.72rem!important;line-height:1.25!important;}

/* Qualified contrast closure for dark/light editorial surfaces. */
html#ds-mars-root body .mars-portal-main .mars-hero{
  background:linear-gradient(135deg,#10213a 0%,#172f52 62%,#6b3b2e 100%)!important;
  color:#f7fbff!important;-webkit-text-fill-color:#f7fbff!important;
}
html#ds-mars-root body .mars-portal-main .mars-hero :is(.mars-eyebrow,.mars-lead,.mars-hero__meta li){
  color:#f7fbff!important;-webkit-text-fill-color:#f7fbff!important;opacity:1!important;text-shadow:none!important;
}
html#ds-mars-root body .mars-portal-main .mars-hero :is(.mars-hero__actions,.mars-cta-row) a,
html#ds-mars-root body .mars-portal-main .mars-hero a.mars-btn,
html#ds-mars-root body .mars-portal-main .mars-hero a.mars-button{
  background:#f7fbff!important;color:#17345a!important;-webkit-text-fill-color:#17345a!important;
  border:1px solid #d8af4d!important;text-decoration:none!important;font-weight:850!important;
}
html#ds-mars-root body .mars-portal-main .mars-hero :is(.mars-hero__actions,.mars-cta-row) a:hover,
html#ds-mars-root body .mars-portal-main .mars-hero :is(.mars-hero__actions,.mars-cta-row) a:focus-visible,
html#ds-mars-root body .mars-portal-main .mars-hero a.mars-btn:hover,
html#ds-mars-root body .mars-portal-main .mars-hero a.mars-btn:focus-visible{
  background:#ffe08a!important;color:#14273b!important;-webkit-text-fill-color:#14273b!important;
}
html#ds-mars-root body .mars-engineering-check{
  color:#f5f9fd!important;-webkit-text-fill-color:#f5f9fd!important;
}
html#ds-mars-root body .mars-engineering-check :is(h2,h3,h4,h5,h6,p,li,strong,span,em,small){
  color:#f5f9fd!important;-webkit-text-fill-color:#f5f9fd!important;opacity:1!important;text-shadow:none!important;
}
html#ds-mars-root body .mars-engineering-check :is(a,a:visited){
  color:#d7eaff!important;-webkit-text-fill-color:#d7eaff!important;
}
html#ds-mars-root body .mars-engineering-check .mars-symbols{
  color:#f5f9fd!important;-webkit-text-fill-color:#f5f9fd!important;
}
html#ds-mars-root body.history-book-page:not(.ds-agency-profile-v638) .history-book-header{
  padding:clamp(1.55rem,3vw,2.65rem)!important;margin:0 0 2rem!important;border-radius:22px!important;
  background:linear-gradient(135deg,#10213a 0%,#172f52 62%,#6b3b2e 100%)!important;
  color:#f7fbff!important;-webkit-text-fill-color:#f7fbff!important;box-shadow:0 16px 38px rgba(4,17,31,.15)!important;
}
html#ds-mars-root body.history-book-page:not(.ds-agency-profile-v638) .history-book-header :is(h1,.history-dek){
  color:#f7fbff!important;-webkit-text-fill-color:#f7fbff!important;opacity:1!important;text-shadow:none!important;
}
html#ds-mars-root body.history-book-page:not(.ds-agency-profile-v638) .history-book-header .history-kicker{
  color:#ffe08a!important;-webkit-text-fill-color:#ffe08a!important;opacity:1!important;
}
html#ds-mars-root body .ds-live-archive a.ds-live-archive__card,
html#ds-mars-root body .ds-live-archive a.ds-live-archive__card:visited{
  color:#e8f1fb!important;-webkit-text-fill-color:#e8f1fb!important;
}
html#ds-mars-root body .ds-live-archive a.ds-live-archive__card :is(h2,h3,h4,p,strong,span,small){
  color:inherit!important;-webkit-text-fill-color:inherit!important;
}
html#ds-mars-root body .mars-book-band{
  background:#fff8e8!important;color:#24384d!important;-webkit-text-fill-color:#24384d!important;
}
html#ds-mars-root body .mars-book-band :is(p,li,strong,span,small){color:#24384d!important;-webkit-text-fill-color:#24384d!important;}
html#ds-mars-root body .mars-book-band a{color:#124f83!important;-webkit-text-fill-color:#124f83!important;}
/* Gold controls use a darker link tone than editorial links. */
html#ds-mars-root body :is(.mars-hero__actions,.mars-cta-row) a[style*="background"],
html#ds-mars-root body a.ds-sidebar-library__cta{color:#14273b!important;-webkit-text-fill-color:#14273b!important;}

/* Cascade-specificity hardening: dark components nested inside a light main surface. */
html#ds-mars-root body .mars-portal-main[data-ds-text-surface="light"] .mars-engineering-check.mars-engineering-check,
html#ds-mars-root body .mars-portal-main[data-ds-text-surface="light"] .mars-calc-box.mars-calc-box{
  background:linear-gradient(135deg,#102e57,#173d6d)!important;
  color:#f7fbff!important;-webkit-text-fill-color:#f7fbff!important;
}
html#ds-mars-root body .mars-portal-main[data-ds-text-surface="light"] :is(.mars-engineering-check.mars-engineering-check,.mars-calc-box.mars-calc-box) :is(h1,h2,h3,h4,h5,h6,p,li,dd,dt,span,strong,em,small,sub,sup){
  color:#f7fbff!important;-webkit-text-fill-color:#f7fbff!important;opacity:1!important;text-shadow:none!important;
}
html#ds-mars-root body .mars-portal-main[data-ds-text-surface="light"] :is(.mars-engineering-check.mars-engineering-check,.mars-calc-box.mars-calc-box) :is(h4,strong,.mars-equation){
  color:#ffe08a!important;-webkit-text-fill-color:#ffe08a!important;
}
html#ds-mars-root body .mars-portal-main[data-ds-text-surface="light"] :is(.mars-engineering-check.mars-engineering-check,.mars-calc-box.mars-calc-box) a{
  color:#d7eaff!important;-webkit-text-fill-color:#d7eaff!important;
}
html#ds-mars-root body .mars-portal-main[data-ds-text-surface="light"] .mars-hero.mars-hero .mars-hero__box.mars-hero__box{
  background:#10213a!important;background-image:linear-gradient(135deg,#10213a 0%,#172f52 62%,#6b3b2e 100%)!important;
  color:#f7fbff!important;-webkit-text-fill-color:#f7fbff!important;
}
html#ds-mars-root body .mars-portal-main[data-ds-text-surface="light"] .mars-hero.mars-hero .mars-hero__box.mars-hero__box :is(h1,h2,h3,h4,p,li,span,strong,em,small){
  color:#f7fbff!important;-webkit-text-fill-color:#f7fbff!important;opacity:1!important;text-shadow:none!important;
}
html#ds-mars-root body .mars-portal-main[data-ds-text-surface="light"] .mars-hero.mars-hero .mars-hero__box.mars-hero__box :is(.mars-eyebrow,.mars-kicker,.eyebrow,.kicker){
  color:#ffe08a!important;-webkit-text-fill-color:#ffe08a!important;
}
html#ds-mars-root body .mars-portal-main[data-ds-text-surface="light"] .mars-hero.mars-hero .mars-hero__box.mars-hero__box a.mars-btn.mars-btn,
html#ds-mars-root body .mars-portal-main[data-ds-text-surface="light"] .mars-hero.mars-hero .mars-hero__box.mars-hero__box .mars-cta-row a{
  background:#f7fbff!important;color:#17345a!important;-webkit-text-fill-color:#17345a!important;border-color:#d8af4d!important;
}
html#ds-mars-root body .mars-portal-main[data-ds-text-surface="light"] .ds-live-archive.ds-live-archive a.ds-live-archive__card.ds-live-archive__card,
html#ds-mars-root body .mars-portal-main[data-ds-text-surface="light"] .ds-live-archive.ds-live-archive a.ds-live-archive__card.ds-live-archive__card:visited{
  color:#f4f8fc!important;-webkit-text-fill-color:#f4f8fc!important;
}
html#ds-mars-root body .mars-portal-main[data-ds-text-surface="light"] .ds-live-archive.ds-live-archive a.ds-live-archive__card.ds-live-archive__card :is(strong,span,p,small){
  color:#f4f8fc!important;-webkit-text-fill-color:#f4f8fc!important;
}


/* R10-R11 premium biography closure: broaden book rhythm, restore side breathing room,
   and make wide documentary figures feel deliberate rather than edge-to-edge. */
html#ds-mars-root body.history-book-page article.people-book,
html#ds-mars-root body.history-book-page article.history-book,
html#ds-mars-root body.history-book-page article.organisation-book,
html#ds-mars-root body.history-book-page .history-book{
  max-width:min(1160px,100%)!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding:clamp(1.35rem,2.5vw,2.6rem)!important;
  box-sizing:border-box!important;
}
html#ds-mars-root body.history-book-page article.people-book > :is(.people-hero,.people-facts,.people-section,.people-answer,.people-editorial-figure,.bio-editorial-figure,.bio-inline-figure,.history-book-figure,.mars-editorial-visual),
html#ds-mars-root body.history-book-page article.people-book > section.people-section,
html#ds-mars-root body.history-book-page article.people-book > figure,
html#ds-mars-root body.history-book-page .history-book > :is(.history-book-header,section,figure){
  margin-left:auto!important;
  margin-right:auto!important;
}
html#ds-mars-root body.history-book-page article.people-book > :is(.people-section,.people-answer),
html#ds-mars-root body.history-book-page .history-book > section{
  max-width:min(100%,1000px)!important;
  padding-left:clamp(.55rem,1vw,.95rem)!important;
  padding-right:clamp(.55rem,1vw,.95rem)!important;
  box-sizing:border-box!important;
}
html#ds-mars-root body.history-book-page article.people-book > .people-hero{
  position:relative!important;
  isolation:isolate!important;
  overflow:hidden!important;
  padding:clamp(1.8rem,3vw,2.95rem)!important;
  min-height:clamp(260px,30vw,420px)!important;
}
html#ds-mars-root body.history-book-page article.people-book > .people-hero::before{
  content:"";
  position:absolute;
  inset:auto 5% 18% auto;
  width:clamp(240px,28vw,410px);
  height:clamp(240px,28vw,410px);
  border-radius:50%;
  background:radial-gradient(circle at 50% 50%,rgba(247,198,91,.22) 0%,rgba(247,198,91,.12) 24%,rgba(247,198,91,0) 67%);
  filter:blur(2px);
  pointer-events:none;
  z-index:0;
}
html#ds-mars-root body.history-book-page article.people-book > .people-hero::after{
  content:"";
  position:absolute;
  right:clamp(1rem,4vw,2.2rem);
  bottom:clamp(1rem,3vw,2rem);
  width:clamp(210px,22vw,330px);
  height:clamp(120px,16vw,210px);
  border-radius:999px;
  border:1px solid rgba(255,230,169,.24);
  background:
    radial-gradient(circle at 22% 45%,rgba(255,255,255,.14),transparent 38%),
    linear-gradient(135deg,rgba(255,255,255,.08),rgba(255,255,255,0));
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.02),0 0 0 28px rgba(255,255,255,.015),0 0 0 56px rgba(255,255,255,.01);
  pointer-events:none;
  z-index:0;
}
html#ds-mars-root body.history-book-page article.people-book > .people-hero > *{position:relative!important;z-index:1!important}
html#ds-mars-root body.history-book-page article.people-book > .people-hero .people-deck{max-width:68ch!important;margin-right:auto!important}
html#ds-mars-root body.history-book-page article.people-book :is(.people-editorial-figure,.bio-editorial-figure,.bio-inline-figure,.history-book-figure,.mars-editorial-visual){
  max-width:min(100%,1020px)!important;
  padding:clamp(.8rem,1.5vw,1.15rem)!important;
  border-radius:24px!important;
  border:1px solid #d3dde7!important;
  background:linear-gradient(180deg,#f8fbff 0%,#eef4f9 100%)!important;
  box-shadow:0 16px 38px rgba(7,23,40,.10)!important;
  box-sizing:border-box!important;
}
html#ds-mars-root body.history-book-page article.people-book :is(.people-editorial-figure,.bio-editorial-figure,.bio-inline-figure,.history-book-figure,.mars-editorial-visual) img{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  height:auto!important;
  margin:0 auto!important;
  border-radius:16px!important;
  background:#0b1727!important;
}
html#ds-mars-root body.history-book-page article.people-book .people-editorial-figure--opening,
html#ds-mars-root body.history-book-page article.people-book .people-editorial-identity{
  max-width:min(100%,680px)!important;
}
html#ds-mars-root body.history-book-page article.people-book .people-editorial-figure--wide,
html#ds-mars-root body.history-book-page article.people-book .people-documentary-map{
  max-width:min(100%,1060px)!important;
}
html#ds-mars-root body.history-book-page article.people-book :is(.people-editorial-figure,.bio-editorial-figure,.bio-inline-figure,.history-book-figure,.mars-editorial-visual) figcaption,
html#ds-mars-root body.history-book-page article.people-book :is(.people-editorial-figure,.bio-editorial-figure,.bio-inline-figure,.history-book-figure,.mars-editorial-visual) > figcaption{
  max-width:78ch!important;
  margin:.85rem auto 0!important;
  padding:0 .35rem!important;
  color:#43566a!important;
  -webkit-text-fill-color:#43566a!important;
}
html#ds-mars-root body.history-book-page article.people-book .people-facts{
  max-width:min(100%,1040px)!important;
}
@media(min-width:1280px){
  html#ds-mars-root body.history-book-page article.people-book,
  html#ds-mars-root body.history-book-page .history-book{max-width:1180px!important}
}
@media(max-width:900px){
  html#ds-mars-root body.history-book-page article.people-book,
  html#ds-mars-root body.history-book-page .history-book{padding:1.1rem!important}
  html#ds-mars-root body.history-book-page article.people-book > :is(.people-section,.people-answer),
  html#ds-mars-root body.history-book-page .history-book > section{padding-left:.35rem!important;padding-right:.35rem!important}
  html#ds-mars-root body.history-book-page article.people-book > .people-hero{min-height:auto!important}
  html#ds-mars-root body.history-book-page article.people-book > .people-hero::before,
  html#ds-mars-root body.history-book-page article.people-book > .people-hero::after{display:none!important}
}


/* R10-R12 hero-width closure: remove artificially narrow mono-column hero decks across biographies,
   organisations, and history pages. The owner explicitly wants the paragraph to use the available width,
   not a 68ch block decorated by empty space. */
html#ds-mars-root body :is(.people-hero .people-deck,.organisation-hero .dek,.history-book-header .history-dek){
  width:100%!important;
  max-width:min(100%,98ch)!important;
  margin-right:0!important;
}
html#ds-mars-root body.history-book-page article.people-book > .people-hero .people-deck{
  max-width:min(100%,102ch)!important;
}
html#ds-mars-root body :is(.organisation-hero,.history-book-header) :is(.dek,.history-dek){
  max-width:min(100%,96ch)!important;
}
html#ds-mars-root body.history-book-page article.people-book > .people-hero::before,
html#ds-mars-root body.history-book-page article.people-book > .people-hero::after{
  display:none!important;
  content:none!important;
}
html#ds-mars-root body.history-book-page article.people-book > .people-hero{
  min-height:auto!important;
}
@media (min-width:1180px){
  html#ds-mars-root body.history-book-page article.people-book > .people-hero .people-deck,
  html#ds-mars-root body .organisation-hero .dek,
  html#ds-mars-root body .history-book-header .history-dek{
    max-width:min(100%,104ch)!important;
  }
}


/* R10-R13 content-box safety: variable-length fact cards must size to their content.
   No fixed row/height assumptions; text must stay inside every card at every viewport. */
html#ds-mars-root body :is(.people-facts,.org-origin-facts){
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))!important;
  grid-auto-rows:max-content!important;
  align-items:stretch!important;
  gap:1rem!important;
  width:100%!important;
  max-width:min(100%,1060px)!important;
  margin:1.5rem auto 2.1rem!important;
  padding:0 .15rem!important;
  box-sizing:border-box!important;
}
html#ds-mars-root body :is(.people-fact,.org-origin-fact){
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:flex-start!important;
  gap:.42rem!important;
  width:100%!important;
  min-width:0!important;
  min-height:0!important;
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
  padding:1rem 1.05rem 1.08rem!important;
  box-sizing:border-box!important;
}
html#ds-mars-root body :is(.people-fact,.org-origin-fact) :is(small,strong,span){
  display:block!important;
  max-width:100%!important;
  min-width:0!important;
  white-space:normal!important;
  overflow:visible!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  hyphens:auto!important;
  box-sizing:border-box!important;
}
html#ds-mars-root body :is(.people-fact,.org-origin-fact) small{
  line-height:1.28!important;
  margin:0!important;
}
html#ds-mars-root body :is(.people-fact,.org-origin-fact) strong{
  line-height:1.42!important;
  margin:0!important;
}
@media(max-width:1180px){
  html#ds-mars-root body :is(.people-facts,.org-origin-facts){grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr))!important;}
}
@media(max-width:760px){
  html#ds-mars-root body :is(.people-facts,.org-origin-facts){grid-template-columns:1fr!important;gap:.75rem!important;padding:0!important;}
  html#ds-mars-root body :is(.people-fact,.org-origin-fact){padding:.9rem .95rem 1rem!important;}
}


/* R10-R15 FINAL HERO WIDTH AUTHORITY — all 92 People/Organisation/History heroes are mono-column.
   Owner requirement: no artificial ch ceiling and no dead right-hand surface. */
html#ds-mars-root body .people-hero .people-deck,
html#ds-mars-root body .organisation-hero .dek,
html#ds-mars-root body .history-book-header .history-dek,
html#ds-mars-root body.history-book-page article.people-book > .people-hero .people-deck,
html#ds-mars-root body :is(.organisation-hero,.history-book-header) :is(.dek,.history-dek){
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin-left:0!important;
  margin-right:0!important;
  box-sizing:border-box!important;
}
@media (min-width:1180px){
  html#ds-mars-root body.history-book-page article.people-book > .people-hero .people-deck,
  html#ds-mars-root body .organisation-hero .dek,
  html#ds-mars-root body .history-book-header .history-dek{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
    box-sizing:border-box!important;
  }
}
html#ds-mars-root body .people-hero .people-deck,
html#ds-mars-root body .organisation-hero .dek,
html#ds-mars-root body .history-book-header .history-dek{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin-left:0!important;
  margin-right:0!important;
  box-sizing:border-box!important;
}

/* R10-R16 — unified biography reading column. Hero stays full width; narrative always returns to one measure. */
html#ds-mars-root body.history-book-page article.people-book{--ds-bio-reading:44rem}
html#ds-mars-root body.history-book-page article.people-book :is(p,ul,ol,blockquote,h2,h3,h4):not(:where(.people-hero *,.people-facts *,figure *,table *,.mars-library-v623 *,.mars-system-flow *,.mars-io-grid *,.mars-relations-grid *,.people-grid *,.people-card *)){
  width:100%!important;max-width:var(--ds-bio-reading)!important;margin-left:auto!important;margin-right:auto!important;box-sizing:border-box!important;text-align:left!important;hyphens:auto!important;overflow-wrap:break-word!important;text-wrap:pretty!important;
}
html#ds-mars-root body.history-book-page article.people-book :is(h2,h3,h4):not(:where(.people-hero *,.people-facts *,figure *,table *,.mars-library-v623 *,.mars-system-flow *,.mars-io-grid *,.mars-relations-grid *,.people-grid *,.people-card *)){
  padding-left:0!important;padding-right:0!important;
}
@media(max-width:900px){
 html#ds-mars-root body.history-book-page article.people-book{--ds-bio-reading:100%}
 html#ds-mars-root body.history-book-page article.people-book :is(p,ul,ol,blockquote,h2,h3,h4):not(:where(.people-hero *,.people-facts *,figure *,table *,.mars-library-v623 *,.mars-system-flow *,.mars-io-grid *,.mars-relations-grid *,.people-grid *,.people-card *)){text-align:left!important;hyphens:auto!important}
}

/* R51 — READABILITY / TYPOGRAPHY / EDGE-SAFETY CONTRACT
   Human visual QA response: screen-only so Academy print/PDF layout remains unchanged.
   Goals: modern readable type, stable reading measure, generous gutters, no text kissing borders,
   and predictable reflow from 1920 px down to 320 px. */
@media screen {
  html#ds-mars-root body .mars-portal-main{
    --ds-r51-font:"Segoe UI",system-ui,-apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;
    --ds-r51-reading:78ch;
    --ds-r51-wide:72rem;
    --ds-r51-gutter:clamp(1.35rem,2.4vw,2.75rem);
    --ds-r51-card-pad-y:clamp(1.2rem,1.7vw,1.7rem);
    --ds-r51-card-pad-x:clamp(1.25rem,2vw,1.9rem);
    font-family:var(--ds-r51-font)!important;
    font-size:17px!important;
    line-height:1.68!important;
    letter-spacing:.002em;
    text-rendering:optimizeLegibility;
    -webkit-font-smoothing:antialiased;
  }

  html#ds-mars-root body .mars-portal-main :is(h1,h2,h3,h4,h5,h6,p,li,dd,dt,th,td,caption,figcaption,label,summary,button,input,select,textarea){
    font-family:var(--ds-r51-font)!important;
  }
  html#ds-mars-root body .mars-portal-main :is(p,li,dd){
    font-size:clamp(1.02rem,.18vw + .985rem,1.10rem)!important;
    line-height:1.72!important;
  }
  html#ds-mars-root body .mars-portal-main p{
    margin-top:0!important;
    margin-bottom:1.05rem!important;
    text-wrap:pretty;
  }
  html#ds-mars-root body .mars-portal-main li + li{margin-top:.38rem!important;}

  html#ds-mars-root body .mars-portal-main h1{
    font-weight:780!important;
    letter-spacing:-.028em!important;
    text-wrap:balance;
  }
  html#ds-mars-root body .mars-portal-main h2{
    font-size:clamp(1.68rem,1.35vw + 1.18rem,2.15rem)!important;
    line-height:1.17!important;
    font-weight:760!important;
    letter-spacing:-.018em!important;
    text-wrap:balance;
    margin-bottom:.85rem!important;
  }
  html#ds-mars-root body .mars-portal-main h3{
    font-size:clamp(1.28rem,.75vw + 1.04rem,1.58rem)!important;
    line-height:1.24!important;
    font-weight:730!important;
    letter-spacing:-.012em!important;
    text-wrap:balance;
    margin-bottom:.65rem!important;
  }
  html#ds-mars-root body .mars-portal-main h4{
    font-size:clamp(1.10rem,.35vw + 1rem,1.28rem)!important;
    line-height:1.30!important;
    font-weight:720!important;
  }

  /* Wider usable page, while keeping prose on a humane reading measure. */
  html#ds-mars-root body .mars-portal-main > .mars-hero .mars-shell,
  html#ds-mars-root body .mars-portal-main > .mars-shell,
  html#ds-mars-root body .mars-portal-main .mars-shell.mars-content{
    width:min(var(--ds-r51-wide),calc(100% - 2 * var(--ds-r51-gutter)))!important;
    max-width:100%!important;
    margin-left:auto!important;
    margin-right:auto!important;
    box-sizing:border-box!important;
  }
  html#ds-mars-root body .mars-portal-main .mars-content{
    padding-top:clamp(2rem,3vw,3.1rem)!important;
    padding-bottom:clamp(3.5rem,5vw,5.5rem)!important;
  }
  html#ds-mars-root body .mars-portal-main .mars-content > :is(p,ul,ol,blockquote):not([class]),
  html#ds-mars-root body .mars-portal-main .mars-content > section:not(.mars-section):not([class]) > :is(p,ul,ol,blockquote),
  html#ds-mars-root body .mars-portal-main .mars-section > :is(p,ul,ol,blockquote):not(.ds-table-scroll-v634){
    max-width:var(--ds-r51-reading)!important;
  }

  /* Card and panel gutters: text must never touch borders. */
  html#ds-mars-root body .mars-portal-main :is(.mars-section,.mars-evidence,.mars-calc,.mars-panel,.ds-tool-card,.ds-v625-sourcebox,.ds-v625-equation,.academy-formula--lesson,.academy-worked-lab,.academy-exercise,.academy-solution,.academy-page1-contract-r22,.academy-page1-node,.ds-academy-orientation,.ds-academy-worked){
    box-sizing:border-box!important;
    min-width:0!important;
  }
  html#ds-mars-root body .mars-portal-main .mars-section{
    padding:var(--ds-r51-card-pad-y) var(--ds-r51-card-pad-x)!important;
    margin-bottom:1.55rem!important;
    border-radius:16px!important;
  }
  html#ds-mars-root body .mars-portal-main :is(.mars-evidence,.mars-calc,.mars-panel,.ds-v625-sourcebox){
    padding:clamp(1.15rem,1.8vw,1.55rem) clamp(1.2rem,2vw,1.75rem)!important;
  }
  html#ds-mars-root body .mars-portal-main .mars-source-card{
    display:block!important;
    box-sizing:border-box!important;
    min-width:0!important;
    padding:.95rem 1.08rem!important;
    line-height:1.58!important;
    overflow-wrap:anywhere!important;
  }
  html#ds-mars-root body .mars-portal-main :is(.ds-tool-card,.mars-related a,.mars-cards a){
    padding:1rem 1.08rem!important;
    min-width:0!important;
    overflow-wrap:anywhere!important;
  }
  html#ds-mars-root body .mars-portal-main .ds-v625-equation{
    padding:1rem 1.15rem!important;
    font-family:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace!important;
    font-size:clamp(.94rem,.13vw + .92rem,1rem)!important;
    line-height:1.62!important;
  }

  /* Tables stay spacious on desktop and become contained scroll regions on narrow screens. */
  html#ds-mars-root body .mars-portal-main table{
    max-width:100%!important;
    border-collapse:collapse!important;
    font-size:clamp(.96rem,.12vw + .94rem,1.02rem)!important;
    line-height:1.48!important;
  }
  html#ds-mars-root body .mars-portal-main table :is(th,td){
    padding:.78rem .88rem!important;
    vertical-align:top!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
  html#ds-mars-root body .mars-portal-main :is(.ds-table-scroll-v634,.academy-table){
    max-width:100%!important;
    overflow-x:auto!important;
    -webkit-overflow-scrolling:touch;
    scrollbar-gutter:stable;
  }

  /* Academy receives the same readable screen contract without altering print. */
  html#ds-mars-root body.academy-module-page .academy-wrap{
    width:min(100%,72rem)!important;
    max-width:72rem!important;
    padding:clamp(1.6rem,2.5vw,2.8rem)!important;
    font-family:var(--ds-r51-font)!important;
  }
  html#ds-mars-root body.academy-module-page .academy-wrap :is(p,li,dd){
    font-size:clamp(1.02rem,.18vw + .985rem,1.09rem)!important;
    line-height:1.72!important;
  }
  html#ds-mars-root body.academy-module-page .academy-wrap :is(.academy-formula--lesson,.academy-worked-lab,.academy-exercise,.academy-solution,.academy-page1-contract-r22){
    padding:clamp(1.15rem,1.8vw,1.55rem) clamp(1.2rem,2vw,1.75rem)!important;
  }
  html#ds-mars-root body.academy-module-page .ds-tech-map__node{
    padding:.9rem .85rem!important;
    font-size:.95rem!important;
    line-height:1.38!important;
  }

  /* Hero copy should look editorial, not like browser-default Times. */
  html#ds-mars-root body .mars-portal-main .mars-hero{
    font-family:var(--ds-r51-font)!important;
  }
  html#ds-mars-root body .mars-portal-main .mars-hero .mars-kicker{
    font-size:.78rem!important;
    line-height:1.35!important;
    font-weight:800!important;
    letter-spacing:.10em!important;
  }
  html#ds-mars-root body .mars-portal-main .mars-hero .mars-lead{
    font-size:clamp(1.08rem,.25vw + 1.02rem,1.20rem)!important;
    line-height:1.66!important;
    max-width:62ch!important;
  }

  /* Protect all bordered descendants against edge collisions and long tokens. */
  html#ds-mars-root body .mars-portal-main :is(section,aside,article,div,figure,blockquote,details){min-width:0;}
  html#ds-mars-root body .mars-portal-main :is(a,code,kbd,samp,.formula-display){overflow-wrap:anywhere;}
}

@media screen and (max-width:1180px){
  html#ds-mars-root body .mars-portal-main{
    --ds-r51-gutter:clamp(1.15rem,3vw,1.8rem);
  }
  html#ds-mars-root body .mars-portal-main > .mars-hero .mars-shell,
  html#ds-mars-root body .mars-portal-main > .mars-shell,
  html#ds-mars-root body .mars-portal-main .mars-shell.mars-content{
    width:calc(100% - 2 * var(--ds-r51-gutter))!important;
  }
}
@media screen and (max-width:760px){
  html#ds-mars-root body .mars-portal-main{
    --ds-r51-gutter:clamp(.85rem,4vw,1.1rem);
    --ds-r51-card-pad-y:1.08rem;
    --ds-r51-card-pad-x:1.08rem;
    font-size:16px!important;
  }
  html#ds-mars-root body .mars-portal-main :is(p,li,dd){font-size:1rem!important;line-height:1.70!important;}
  html#ds-mars-root body .mars-portal-main .mars-section{border-radius:13px!important;}
  html#ds-mars-root body .mars-portal-main table :is(th,td){padding:.68rem .72rem!important;}
  html#ds-mars-root body.academy-module-page .academy-wrap{padding:1.05rem!important;}
}
@media screen and (max-width:430px){
  html#ds-mars-root body .mars-portal-main{--ds-r51-gutter:.75rem;}
  html#ds-mars-root body .mars-portal-main :is(.mars-evidence,.mars-calc,.mars-panel,.ds-v625-sourcebox,.mars-section){padding-left:1rem!important;padding-right:1rem!important;}
  html#ds-mars-root body .mars-portal-main h2{font-size:1.48rem!important;}
  html#ds-mars-root body .mars-portal-main h3{font-size:1.22rem!important;}
}

/* R51b — narrow-screen table containment and deep-chapter breathing room. */
@media screen and (max-width:760px){
  html#ds-mars-root body .mars-portal-main table:not(.ds-tech-map){
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    overflow-x:auto!important;
    overflow-y:visible!important;
    -webkit-overflow-scrolling:touch!important;
  }
  html#ds-mars-root body .mars-portal-main table :is(th,td){
    font-size:.96rem!important;
    line-height:1.48!important;
  }
  html#ds-mars-root body .mars-portal-main .mars-deep-chapter{
    padding-left:1.15rem!important;
    padding-right:1.15rem!important;
  }
  html#ds-mars-root body .mars-portal-main .mars-deep-chapter > *{
    max-width:100%!important;
    box-sizing:border-box!important;
  }
}

/* R51c — edge-contact closure discovered by 372-page rendered corpus pass. */
@media screen {
  html#ds-mars-root body .mars-portal-main :is(p,li,dd,dt,td,th,caption,figcaption){
    overflow-wrap:anywhere!important;
  }
  html#ds-mars-root body .mars-portal-main table :is(th,td){
    font-size:1rem!important;
  }
  html#ds-mars-root body.academy-module-page .academy-wrap,
  html#ds-mars-root body.academy-module-page .academy-wrap :is(section,div,dl,dd,dt,p,ul,ol,li){
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }
  html#ds-mars-root body.academy-module-page .academy-formula--lesson :is(.academy-proof,dt,dd,p,li,code,strong,span),
  html#ds-mars-root body.academy-module-page .academy-zero-prereq :is(.zero-concept,.academy-exercise,.academy-solution,.academy-worked-lab,p,li,code,strong,span){
    overflow-wrap:anywhere!important;
    word-break:normal!important;
    max-width:100%!important;
    min-width:0!important;
  }
}
@media screen and (max-width:430px){
  html#ds-mars-root body.history-book-page .mars-portal-main :is(.history-book,.people-book) .mars-section.mars-deep-chapter,
  html#ds-mars-root body.history-book-page .mars-portal-main :is(.history-book,.people-book) .mars-section.history-human-support{
    padding-left:1.05rem!important;
    padding-right:1.05rem!important;
  }
  html#ds-mars-root body.history-book-page .mars-portal-main :is(.history-book,.people-book) .mars-section.mars-deep-chapter > *,
  html#ds-mars-root body.history-book-page .mars-portal-main :is(.history-book,.people-book) .mars-section.history-human-support > *{
    width:100%!important;
    max-width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
  }
  html#ds-mars-root body.academy-module-page .academy-zero-prereq{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    padding:.9rem!important;
    overflow:hidden!important;
  }
  html#ds-mars-root body.academy-module-page .academy-zero-prereq :is(.zero-concept,.academy-formula,.academy-exercise,.academy-solution,.academy-worked-lab){
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    padding:1rem!important;
  }
}


/* R51d — mobile action dock: controls must never sit on top of lesson text. */
@media screen and (max-width:760px){
  html#ds-mars-root body .mars-portal-main{
    padding-bottom:4.9rem!important;
  }
  #ds-mars-floating-ui-v58.ds-mars-floating-ui-v58{
    top:auto!important;
    bottom:max(.6rem,env(safe-area-inset-bottom))!important;
    right:50%!important;
    left:auto!important;
    transform:translateX(50%)!important;
    flex-direction:row!important;
    gap:.38rem!important;
    padding:.34rem .44rem!important;
    border:1px solid rgba(255,255,255,.22)!important;
    border-radius:999px!important;
    background:rgba(8,29,54,.92)!important;
    box-shadow:0 10px 30px rgba(0,0,0,.34)!important;
    backdrop-filter:blur(8px);
  }
  #ds-mars-floating-ui-v58>[data-ds-action]{
    width:2.45rem!important;
    min-width:2.45rem!important;
    height:2.45rem!important;
    min-height:2.45rem!important;
    font-size:1.02rem!important;
  }
  #ds-mars-floating-ui-v58>[data-ds-action]:hover,
  #ds-mars-floating-ui-v58>[data-ds-action]:focus-visible{
    transform:translateY(-2px) scale(1.03)!important;
  }
  #ds-mars-floating-toc-v58.ds-mars-floating-toc-v58{
    top:auto!important;
    bottom:4.45rem!important;
    left:.7rem!important;
    right:.7rem!important;
    width:auto!important;
    max-height:min(68vh,34rem)!important;
  }
}
@media screen and (max-width:390px){
  #ds-mars-floating-ui-v58.ds-mars-floating-ui-v58{gap:.28rem!important;padding:.3rem .38rem!important;}
  #ds-mars-floating-ui-v58>[data-ds-action]{width:2.3rem!important;min-width:2.3rem!important;height:2.3rem!important;min-height:2.3rem!important;}
}


/* R51e — zero-overlap mobile action toolbar.
   On small screens the action controls join document flow directly below the Mars menu toggle.
   They are no longer fixed over lesson text; desktop keeps the floating rail. */
@media screen and (max-width:760px){
  html#ds-mars-root body .mars-portal-main{padding-bottom:clamp(2.5rem,7vw,4rem)!important;}
  #ds-mars-floating-ui-v58.ds-mars-floating-ui-v58{
    position:static!important;
    top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;
    transform:none!important;
    width:max-content!important;
    max-width:calc(100% - 1.5rem)!important;
    margin:.15rem auto 1rem!important;
    flex-direction:row!important;
    z-index:20!important;
  }
}

/* Tablet and narrow-screen layout authority. This block is deliberately last in the cascade. */
@media screen and (min-width:1101px) and (max-width:1180px){
  html#ds-mars-root body main.mars-portal-frame{
    display:grid!important;
    grid-template-columns:minmax(228px,260px) minmax(0,1fr)!important;
    column-gap:clamp(.9rem,1.7vw,1.35rem)!important;
    align-items:start!important;
    width:100%!important;
    max-width:1600px!important;
    min-width:0!important;
    margin-inline:auto!important;
  }
  html#ds-mars-root body main.mars-portal-frame > .mars-system-sidebar{
    width:100%!important;
    max-width:260px!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }
  html#ds-mars-root body main.mars-portal-frame > .mars-portal-main{
    grid-column:2!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
  }
}

@media screen and (max-width:1100px){
  html#ds-mars-root body main.mars-portal-frame,
  html#ds-mars-root body .mars-portal-frame{
    display:block!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-auto-columns:minmax(0,1fr)!important;
    column-gap:0!important;
    row-gap:0!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
    overflow:visible!important;
  }
  html#ds-mars-root body main.mars-portal-frame > .mars-portal-main,
  html#ds-mars-root body .mars-portal-frame > .mars-portal-main,
  html#ds-mars-root body main.mars-portal-frame > main,
  html#ds-mars-root body .mars-portal-main{
    grid-column:1 / -1!important;
    grid-row:auto!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    box-sizing:border-box!important;
    overflow:visible!important;
    padding-left:clamp(1rem,3vw,1.55rem)!important;
    padding-right:clamp(1rem,3vw,1.55rem)!important;
  }

  /* The navigation drawer must leave the document flow completely while closed. */
  html#ds-mars-root body main.mars-portal-frame > .mars-system-sidebar,
  html#ds-mars-root body .mars-portal-frame > .mars-system-sidebar,
  html#ds-mars-root body .mars-system-sidebar{
    display:block!important;
    position:fixed!important;
    inset:0 auto 0 0!important;
    width:min(88vw,340px)!important;
    max-width:340px!important;
    min-width:0!important;
    height:100dvh!important;
    max-height:100dvh!important;
    margin:0!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    transform:translateX(-110%)!important;
    visibility:hidden!important;
    pointer-events:none!important;
    opacity:0!important;
    transition:transform .22s ease,opacity .18s ease,visibility 0s linear .22s!important;
    box-sizing:border-box!important;
    z-index:120!important;
  }
  html#ds-mars-root body .mars-system-sidebar.is-mobile-open,
  html#ds-mars-root body.ds-sidebar-open .mars-system-sidebar{
    transform:translateX(0)!important;
    visibility:visible!important;
    pointer-events:auto!important;
    opacity:1!important;
    transition:transform .22s ease,opacity .18s ease,visibility 0s!important;
  }
  html#ds-mars-root body.ds-sidebar-open{overflow:hidden!important;}
  html#ds-mars-root body.ds-sidebar-open::after{
    content:"";
    position:fixed;
    inset:0;
    z-index:110;
    background:rgba(1,8,15,.58);
    backdrop-filter:blur(2px);
  }

  html#ds-mars-root body :is(.ds-mobile-sidebar-toggle,.mars-mobile-sidebar-toggle){
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:.45rem!important;
    position:relative!important;
    inset:auto!important;
    transform:none!important;
    width:max-content!important;
    max-width:calc(100% - 1rem)!important;
    min-width:44px!important;
    min-height:44px!important;
    margin:.75rem .5rem .9rem!important;
    padding:.68rem .88rem!important;
    border:1px solid #a87431!important;
    border-radius:9px!important;
    background:#0d2538!important;
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
    font:800 .92rem/1.2 var(--ds-r51-font,system-ui,sans-serif)!important;
    text-decoration:none!important;
    white-space:normal!important;
    box-shadow:0 7px 18px rgba(0,0,0,.15)!important;
    z-index:55!important;
  }
  html#ds-mars-root body :is(.ds-mobile-sidebar-toggle,.mars-mobile-sidebar-toggle):focus-visible{
    outline:3px solid #ffd36e!important;
    outline-offset:3px!important;
  }
  html#ds-mars-root body .ds-mobile-sidebar-close{
    display:flex!important;
    visibility:visible!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-height:44px!important;
    margin:0 0 .65rem!important;
    padding:.7rem .85rem!important;
    border:0!important;
    border-bottom:1px solid #3b5366!important;
    background:#10283d!important;
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
    font:850 .92rem/1.1 var(--ds-r51-font,system-ui,sans-serif)!important;
  }

  /* Hero recomposition: tablet is a true one-column composition, never compressed desktop. */
  html#ds-mars-root body .mars-portal-main .mars-hero,
  html#ds-mars-root body .mars-portal-main > .mars-hero{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    min-height:0!important;
    height:auto!important;
    margin-left:0!important;
    margin-right:0!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
  html#ds-mars-root body .mars-portal-main .mars-hero > .mars-shell,
  html#ds-mars-root body .mars-portal-main .mars-hero .mars-shell.mars-hero__grid,
  html#ds-mars-root body .mars-portal-main .mars-hero__grid{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-auto-columns:minmax(0,1fr)!important;
    align-items:start!important;
    gap:clamp(1rem,2.8vw,1.6rem)!important;
    width:calc(100% - 2 * var(--ds-r51-gutter,1rem))!important;
    max-width:100%!important;
    min-width:0!important;
    min-height:0!important;
    height:auto!important;
    margin-left:auto!important;
    margin-right:auto!important;
    box-sizing:border-box!important;
  }
  html#ds-mars-root body .mars-portal-main .mars-hero__grid > *,
  html#ds-mars-root body .mars-portal-main .mars-hero > .mars-shell > *{
    grid-column:1!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
    box-sizing:border-box!important;
  }
  html#ds-mars-root body .mars-portal-main .mars-hero__grid > div{
    padding:clamp(1.55rem,4vw,2.5rem) 0!important;
  }
  html#ds-mars-root body .mars-portal-main .mars-hero h1{
    width:100%!important;
    max-width:18ch!important;
    min-width:0!important;
    margin:.18em 0 .35em!important;
    font-size:clamp(2.15rem,6vw,3.65rem)!important;
    line-height:1.02!important;
    letter-spacing:-.03em!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
    hyphens:auto!important;
    text-wrap:balance!important;
  }
  html#ds-mars-root body .mars-portal-main .mars-hero :is(.mars-lead,.people-deck,.dek,.history-dek){
    width:100%!important;
    max-width:62ch!important;
    min-width:0!important;
    font-size:clamp(1rem,.45vw + .96rem,1.12rem)!important;
    line-height:1.65!important;
  }
  html#ds-mars-root body .mars-portal-main .mars-hero figure{
    max-width:min(100%,30rem)!important;
    margin:0 auto clamp(1.3rem,4vw,2.2rem)!important;
  }
  html#ds-mars-root body .mars-portal-main .mars-hero figure :is(img,picture,video,svg){
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    object-fit:contain!important;
  }

  /* Reading surfaces and media remain inside the main column. */
  html#ds-mars-root body .mars-portal-main :is(section,article,aside,figure,div,form,fieldset,details,summary,blockquote,dl,ul,ol){
    min-width:0!important;
    max-width:100%;
    box-sizing:border-box!important;
  }
  html#ds-mars-root body .mars-portal-main :is(img,picture,video,canvas,svg,iframe){
    max-width:100%!important;
    box-sizing:border-box!important;
  }
  html#ds-mars-root body .mars-portal-main :is(img,picture,video){height:auto!important;}
  html#ds-mars-root body .mars-portal-main iframe{width:100%!important;}

  /* Wide data stays usable via local scrolling rather than widening the document. */
  html#ds-mars-root body .mars-portal-main :is(.ds-table-scroll-v634,.academy-table,.table-scroll,.table-responsive,[data-table-scroll]){
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow-x:auto!important;
    overflow-y:visible!important;
    overscroll-behavior-inline:contain!important;
    -webkit-overflow-scrolling:touch!important;
    scrollbar-gutter:stable!important;
  }
  html#ds-mars-root body .mars-portal-main table:not(.ds-tech-map){
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow-x:auto!important;
    overflow-y:visible!important;
    -webkit-overflow-scrolling:touch!important;
  }
  html#ds-mars-root body .mars-portal-main table:not(.ds-tech-map) :is(thead,tbody,tfoot,tr){
    min-width:max-content;
  }
  html#ds-mars-root body .mars-portal-main table :is(th,td){
    font-size:max(.96rem,15.5px)!important;
    line-height:1.48!important;
  }

  /* Diagrams and card grids recompute instead of shrinking text. */
  html#ds-mars-root body .mars-portal-main :is(.ds-tech-map,.mars-io-grid,.mars-relations-grid,.mars-library-v623,.people-grid,.mars-cards,.mars-related,.ds-tool-grid,.calculator-grid,.mars-calc-grid){
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }
  html#ds-mars-root body .mars-portal-main .ds-tech-map{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:.75rem!important;
  }
  html#ds-mars-root body .mars-portal-main :is(.mars-io-grid,.mars-relations-grid,.mars-library-v623,.people-grid,.mars-cards,.mars-related,.ds-tool-grid){
    grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr))!important;
  }

  /* Long technical tokens scroll or wrap locally; they never create a page-wide overflow. */
  html#ds-mars-root body .mars-portal-main :is(pre,.formula-display,.academy-formula,.ds-v625-equation,.mars-equation){
    max-width:100%!important;
    min-width:0!important;
    overflow-x:auto!important;
    overscroll-behavior-inline:contain!important;
    box-sizing:border-box!important;
  }
  html#ds-mars-root body .mars-portal-main :is(code,kbd,samp,var,a){overflow-wrap:anywhere;}

  /* A readable minimum for supporting text on tablet. */
  html#ds-mars-root body .mars-portal-main :is(small,figcaption,caption,.ds-cite-note,.mars-caption,.academy-caption){
    font-size:max(.80rem,13px)!important;
    line-height:1.45!important;
  }
  html#ds-mars-root body .mars-portal-main :is(button,input,select,textarea,[role="button"]){
    max-width:100%!important;
    min-height:44px;
    box-sizing:border-box!important;
  }
}

@media screen and (max-width:696px){
  html#ds-mars-root body .mars-portal-main{
    padding-left:.85rem!important;
    padding-right:.85rem!important;
  }
  html#ds-mars-root body .mars-portal-main .mars-hero > .mars-shell,
  html#ds-mars-root body .mars-portal-main .mars-hero .mars-shell.mars-hero__grid,
  html#ds-mars-root body .mars-portal-main .mars-hero__grid{
    width:calc(100% - 1rem)!important;
  }
  html#ds-mars-root body .mars-portal-main .mars-hero h1{
    max-width:100%!important;
    font-size:clamp(1.95rem,9vw,2.85rem)!important;
    line-height:1.04!important;
  }
  html#ds-mars-root body .mars-portal-main .ds-tech-map,
  html#ds-mars-root body .mars-portal-main :is(.mars-io-grid,.mars-relations-grid,.mars-library-v623,.people-grid,.mars-cards,.mars-related,.ds-tool-grid,.calculator-grid,.mars-calc-grid){
    grid-template-columns:minmax(0,1fr)!important;
  }
  html#ds-mars-root body .mars-portal-main :is(.mars-section,.mars-panel,.mars-evidence,.mars-calc,.ds-tool-card,.academy-formula--lesson,.academy-worked-lab,.academy-exercise,.academy-solution){
    padding-left:clamp(.9rem,4vw,1.1rem)!important;
    padding-right:clamp(.9rem,4vw,1.1rem)!important;
  }
}

@media screen and (max-width:430px){
  html#ds-mars-root body .mars-portal-main{padding-left:.65rem!important;padding-right:.65rem!important;}
  html#ds-mars-root body .mars-portal-main .mars-hero h1{font-size:clamp(1.8rem,9.5vw,2.45rem)!important;}
  html#ds-mars-root body :is(.ds-mobile-sidebar-toggle,.mars-mobile-sidebar-toggle){margin-left:.35rem!important;margin-right:.35rem!important;}
}

/* Interaction and motion safeguards shared by every responsive band. */
@media screen {
  html#ds-mars-root body .mars-portal-main a:focus-visible,
  html#ds-mars-root body .mars-portal-main button:focus-visible,
  html#ds-mars-root body .mars-portal-main [tabindex]:focus-visible{
    outline:3px solid #d99a22!important;
    outline-offset:3px!important;
    border-radius:max(4px,.25em);
  }
  html#ds-mars-root body .mars-portal-main :target{scroll-margin-top:6rem;}
}
@media (prefers-reduced-motion:reduce){
  html#ds-mars-root *,html#ds-mars-root *::before,html#ds-mars-root *::after{
    scroll-behavior:auto!important;
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
  }
}

@media screen and (max-width:1100px){
  html#ds-mars-root body:not(.ds-sidebar-open) .mars-system-sidebar:not(.is-mobile-open){
    transform:translateX(-110%)!important;
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
  }
  html#ds-mars-root body.ds-sidebar-open .mars-system-sidebar.is-mobile-open{
    transform:translateX(0)!important;
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
  }
}


/* R52 final — semantic table containment, readable wrapping and closed-drawer hardening. */
@media screen {
  html#ds-mars-root body .mars-portal-main :is(p,li,dd,dt,caption,figcaption){
    overflow-wrap:break-word!important;
    word-break:normal!important;
    hyphens:auto!important;
  }
  html#ds-mars-root body .mars-portal-main :is(td,th){overflow-wrap:anywhere!important;word-break:normal!important;}
  html#ds-mars-root body .mars-portal-main .ds-table-scroll-r52{
    display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;
    overflow-x:auto!important;overflow-y:visible!important;overscroll-behavior-inline:contain!important;
    -webkit-overflow-scrolling:touch!important;scrollbar-gutter:stable!important;
    margin-block:1rem 1.35rem!important;border-radius:10px!important;
  }
  html#ds-mars-root body .mars-portal-main .ds-table-scroll-r52 > table:not(.ds-tech-map){
    display:table!important;width:max-content!important;min-width:100%!important;max-width:none!important;
    overflow:visible!important;margin:0!important;
  }
  html#ds-mars-root body .mars-portal-main .ds-table-scroll-r52[data-ds-overflowing="true"]:focus-visible{
    outline:3px solid #d99a22!important;outline-offset:3px!important;
  }
}
@media screen and (max-width:1100px){
  html#ds-mars-root body:not(.ds-sidebar-open) .mars-system-sidebar[aria-hidden="true"]{
    transform:translateX(-110%)!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important;
  }
  html#ds-mars-root body.ds-sidebar-open .mars-system-sidebar[aria-hidden="false"]{
    transform:translateX(0)!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important;
  }
}


/* R55 — table readability gate: preserve words and prefer local horizontal scrolling to squeezed columns. */
@media screen {
  html#ds-mars-root body .mars-portal-main .ds-table-scroll-r52{
    display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;
    overflow-x:auto!important;overflow-y:visible!important;overscroll-behavior-inline:contain!important;
    -webkit-overflow-scrolling:touch!important;scrollbar-gutter:stable!important;
  }
  html#ds-mars-root body .mars-portal-main .ds-table-scroll-r52 > table:not(.ds-tech-map){
    display:table!important;width:max(100%,var(--ds-table-min-inline,0px))!important;min-width:max(100%,var(--ds-table-min-inline,0px))!important;max-width:none!important;
    table-layout:auto!important;overflow:visible!important;margin-inline:0!important;
  }
  html#ds-mars-root body .mars-portal-main .ds-table-scroll-r52 :is(th,td){
    overflow-wrap:normal!important;word-break:normal!important;hyphens:auto!important;
    min-width:7.5rem;
  }
  html#ds-mars-root body .mars-portal-main .ds-table-scroll-r52 :is(code,kbd,samp,var,a){
    overflow-wrap:anywhere!important;word-break:normal!important;
  }
  html#ds-mars-root body .mars-portal-main .academy-formula-expression-r22{
    display:block!important;max-width:100%!important;white-space:normal!important;
    overflow-wrap:anywhere!important;word-break:normal!important;hyphens:none!important;
  }
}
@media screen and (max-width:430px){
  html#ds-mars-root body .mars-portal-main .ds-table-scroll-r52{scrollbar-gutter:auto!important;}
}


/* R56 — desktop grid closure after independent R55 visual counter-audit.
   The sidebar owns its 300 px grid track including padding/border; the main column
   always consumes only the remaining track. This removes the 29 px academy-hub
   overshoot observed at 1440 px without clipping content or shrinking typography. */
@media screen and (min-width:1181px){
  html#ds-mars-root body main.mars-portal-frame{
    display:grid!important;
    grid-template-columns:300px minmax(0,1fr)!important;
    column-gap:clamp(1rem,2vw,2rem)!important;
    width:min(100%,1600px)!important;
    max-width:1600px!important;
    min-width:0!important;
    margin-inline:auto!important;
    overflow:visible!important;
    box-sizing:border-box!important;
  }
  html#ds-mars-root body main.mars-portal-frame > .mars-system-sidebar{
    grid-column:1!important;
    width:300px!important;
    max-width:300px!important;
    min-width:0!important;
    margin:0!important;
    box-sizing:border-box!important;
  }
  html#ds-mars-root body main.mars-portal-frame > .mars-portal-main{
    grid-column:2!important;
    width:auto!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    box-sizing:border-box!important;
  }
  html#ds-mars-root body.ds-academy-hub-page main.mars-portal-frame > .mars-portal-main{
    width:auto!important;
    max-width:100%!important;
  }
}

/* R57 — Academy formula dark-surface contrast closure.
   Independent R56 visual counter-audit found long formula dossiers with #24384d
   text inheriting onto #102b3c. Every .academy-formula is now an explicit dark
   semantic surface in the HTML; this screen-only contract is the final cascade
   authority for formula prose, labels, equations and links. */
@media screen {
  html#ds-mars-root body.mars-site.academy-module-page main.mars-portal-frame .mars-portal-main .academy-formula[data-ds-text-surface="dark"]{
    background:#102b3c!important;
    color:#f8fafc!important;
    -webkit-text-fill-color:#f8fafc!important;
    opacity:1!important;
    text-shadow:none!important;
  }
  html#ds-mars-root body.mars-site.academy-module-page main.mars-portal-frame .mars-portal-main .academy-formula[data-ds-text-surface="dark"] :is(p,li,dd,span,strong,em,code,kbd,samp,var,sub,sup){
    color:#f8fafc!important;
    -webkit-text-fill-color:#f8fafc!important;
    opacity:1!important;
    text-shadow:none!important;
  }
  html#ds-mars-root body.mars-site.academy-module-page main.mars-portal-frame .mars-portal-main .academy-formula[data-ds-text-surface="dark"] :is(h1,h2,h3,h4,h5,h6,dt){
    color:#ffe08a!important;
    -webkit-text-fill-color:#ffe08a!important;
    opacity:1!important;
    text-shadow:none!important;
  }
  html#ds-mars-root body.mars-site.academy-module-page main.mars-portal-frame .mars-portal-main .academy-formula[data-ds-text-surface="dark"] :is(.formula-display,.academy-formula-expression-r22){
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
    opacity:1!important;
    text-shadow:none!important;
  }
  html#ds-mars-root body.mars-site.academy-module-page main.mars-portal-frame .mars-portal-main .academy-formula[data-ds-text-surface="dark"] .formula-display{
    background:#071424!important;
  }
  html#ds-mars-root body.mars-site.academy-module-page main.mars-portal-frame .mars-portal-main .academy-formula[data-ds-text-surface="dark"] a,
  html#ds-mars-root body.mars-site.academy-module-page main.mars-portal-frame .mars-portal-main .academy-formula[data-ds-text-surface="dark"] a:visited{
    color:#9fe4ff!important;
    -webkit-text-fill-color:#9fe4ff!important;
    text-decoration-color:#9fe4ff!important;
    opacity:1!important;
  }
}

/* R59 — nested exercise corrections inside dark Academy formula dossiers.
   Native <details> keeps the autonomous correction repliable on the Web while
   preserving the R57 dark-surface contrast contract when opened. */
@media screen {
  html#ds-mars-root body.mars-site.academy-module-page main.mars-portal-frame .mars-portal-main .academy-formula[data-ds-text-surface="dark"] :is(.r59-guided-correction,.r59-autonomous-solution){
    background:#071424!important;
    color:#f8fafc!important;
    -webkit-text-fill-color:#f8fafc!important;
    border:1px solid #45657f!important;
    border-radius:10px!important;
    padding:.72rem .82rem!important;
    margin:.72rem 0!important;
    box-shadow:none!important;
  }
  html#ds-mars-root body.mars-site.academy-module-page main.mars-portal-frame .mars-portal-main .academy-formula[data-ds-text-surface="dark"] .r59-autonomous-solution > summary{
    color:#ffe08a!important;
    -webkit-text-fill-color:#ffe08a!important;
    background:#102b3c!important;
    border-radius:7px!important;
    padding:.5rem .6rem!important;
    cursor:pointer!important;
    font-weight:800!important;
  }
  html#ds-mars-root body.mars-site.academy-module-page main.mars-portal-frame .mars-portal-main .academy-formula[data-ds-text-surface="dark"] .r59-autonomous-solution[open] > summary{
    margin-bottom:.55rem!important;
  }
  html#ds-mars-root body.mars-site.academy-module-page main.mars-portal-frame .mars-portal-main .academy-formula[data-ds-text-surface="dark"] .r59-calc-steps code{
    background:#071424!important;
    color:#f8fafc!important;
    -webkit-text-fill-color:#f8fafc!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
}
@media screen and (max-width:430px){
  html#ds-mars-root body.mars-site.academy-module-page main.mars-portal-frame .mars-portal-main p.academy-formula[data-ds-text-surface="dark"]{
    max-width:100%!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
  }
}
