/* DELTA-SIERRA MARS V6.36 — FIRST VIEWPORT + INFO + READING CONTRACT
   Loaded last. Central cross-site contract; do not copy page by page. */
html#ds-mars-root body [data-ds-desktop-menu-redundant="1"]{display:none!important}
.ds-page-toc.has-external-toggle .ds-page-toc__toggle{display:none!important}

/* Desktop header: brand occupies the left instead of leaving a dead banner. */
@media (min-width:1180px){
  html#ds-mars-root body .mars-header__inner.site-header__actions{
    display:grid!important;
    grid-template-columns:minmax(245px,290px) minmax(0,1fr) auto!important;
    grid-template-areas:"brand spacer language" "nav nav support"!important;
    align-items:center!important;
    gap:.62rem 1rem!important;
    width:100%!important;
    max-width:none!important;
    padding:.7rem clamp(1rem,2.2vw,2.4rem) .62rem!important;
    box-sizing:border-box!important;
  }
  html#ds-mars-root body .mars-header__inner .ds-mars-home-brand{grid-area:brand!important;justify-self:start!important;margin:0!important;position:relative!important;inset:auto!important;transform:none!important}
  html#ds-mars-root body .mars-header__inner .site-language-switcher{grid-area:language!important;justify-self:end!important;margin:0!important;position:relative!important;inset:auto!important;transform:none!important}
  html#ds-mars-root body .mars-header__inner .site-nav{grid-area:nav!important;justify-self:start!important;width:min(100%,1180px)!important;max-width:1180px!important;margin:0!important;position:relative!important;inset:auto!important;transform:none!important}
  html#ds-mars-root body .mars-header__inner .site-nav__inner{justify-content:flex-start!important;flex-wrap:wrap!important}
  html#ds-mars-root body .mars-header__inner .btn-soutien{grid-area:support!important;justify-self:end!important;align-self:center!important;margin:0!important;position:relative!important;inset:auto!important;transform:none!important}
  html#ds-mars-root body .mars-header :is(.site-menu-toggle,.site-nav-toggle,.global-menu-toggle,.menu-toggle,.hamburger,.hamburger-button){display:none!important}
}
@media (min-width:901px) and (max-width:1179px){
  html#ds-mars-root body .mars-header__inner.site-header__actions{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:.55rem .8rem!important;padding:.65rem 1rem!important}
  html#ds-mars-root body .mars-header__inner .ds-mars-home-brand{order:1!important;margin-right:auto!important;position:relative!important;inset:auto!important;transform:none!important}
  html#ds-mars-root body .mars-header__inner .site-language-switcher{order:2!important;position:relative!important;inset:auto!important;transform:none!important}
  html#ds-mars-root body .mars-header__inner .btn-soutien{order:3!important;position:relative!important;inset:auto!important;transform:none!important}
  html#ds-mars-root body .mars-header__inner .site-nav{order:4!important;flex:1 1 100%!important;width:100%!important;position:relative!important;inset:auto!important;transform:none!important}
}

/* Portal hero: enforce readable typography over any photograph/cascade inherited from legacy CSS. */
html#ds-mars-root body .mars-hero{position:relative!important;isolation:isolate!important;overflow:hidden!important}
html#ds-mars-root body .mars-hero::before{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(90deg,rgba(4,11,19,.94) 0%,rgba(4,11,19,.82) 34%,rgba(4,11,19,.35) 66%,rgba(4,11,19,.08) 100%)!important}
html#ds-mars-root body .mars-hero .mars-hero__grid{position:relative!important;z-index:2!important}
html#ds-mars-root body .mars-hero .mars-hero__grid>div:first-child{position:relative!important;z-index:3!important;max-width:760px!important;padding:clamp(1rem,2.2vw,2rem)!important;background:linear-gradient(90deg,rgba(5,14,24,.80),rgba(5,14,24,.42) 75%,transparent)!important;border-radius:18px!important}
html#ds-mars-root body .mars-hero :is(h1,h2){color:#fff!important;-webkit-text-fill-color:#fff!important;text-shadow:0 2px 14px rgba(0,0,0,.76)!important}
html#ds-mars-root body .mars-hero .mars-kicker{color:#ffd977!important;-webkit-text-fill-color:#ffd977!important;text-shadow:0 1px 8px rgba(0,0,0,.72)!important}
html#ds-mars-root body .mars-hero .mars-lead{color:#f6f9fc!important;-webkit-text-fill-color:#f6f9fc!important;text-shadow:0 1px 9px rgba(0,0,0,.78)!important;font-weight:520!important;line-height:1.65!important}
@media(max-width:900px){html#ds-mars-root body .mars-hero::before{background:linear-gradient(180deg,rgba(4,11,19,.88),rgba(4,11,19,.58))!important}html#ds-mars-root body .mars-hero .mars-hero__grid>div:first-child{max-width:none!important;background:rgba(5,14,24,.70)!important}}

/* Long history pages use book-like measure. Tables and figures may still use wider space. */
html#ds-mars-root body .history-book :is(p,ul,ol,blockquote,dl),
html#ds-mars-root body article.history-book :is(p,ul,ol,blockquote,dl){max-width:76ch!important;margin-left:auto!important;margin-right:auto!important}
html#ds-mars-root body .history-book :is(table,figure,.ds-table-scroll-v634,.mars-wide-figure){max-width:100%!important}

/* INFO: long explanations remain readable and available on keyboard/touch. */
html#ds-mars-root body .ds-core-tooltip{max-width:min(560px,calc(100vw - 24px))!important;max-height:min(70vh,620px)!important;overflow:auto!important;padding:.95rem 1rem!important;font-size:.96rem!important;line-height:1.58!important;border-color:#e6bf63!important;background:#07131f!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
html#ds-mars-root body .ds-core-info-trigger{outline-offset:3px!important;text-decoration-style:dotted!important;text-decoration-thickness:.08em!important;text-underline-offset:.16em!important}
html#ds-mars-root body .ds-core-info-trigger:focus-visible{outline:3px solid #e8bf5e!important;border-radius:3px!important}

/* Keep table words intact: the table region scrolls; words do not break arbitrarily. */
@media(max-width:430px){html#ds-mars-root body table :is(th,td){overflow-wrap:normal!important;word-break:normal!important;hyphens:auto!important}}


/* DELTA-SIERRA MARS V6.38 — TYPOGRAPHIC CONVERGENCE + AGENCY HERO + ACADEMY CENTRALIZATION
   Central override loaded last on all 276 Mars/Academy HTML pages.
   Goal: NASA-like editorial density without copying NASA pixel-for-pixel. */
html#ds-mars-root{
  --ds-v638-body:1rem;
  --ds-v638-body-leading:1.72;
  --ds-v638-dek:1.10rem;
  --ds-v638-h1-min:2.15rem;
  --ds-v638-h1-max:3.10rem;
  --ds-v638-h2-min:1.55rem;
  --ds-v638-h2-max:2rem;
  --ds-v638-h3-min:1.18rem;
  --ds-v638-h3-max:1.42rem;
  --ds-v638-paper:#fffaf2;
  --ds-v638-ink:#26394f;
  --ds-v638-blue:#17345a;
  --ds-v638-copper:#a35430;
  --ds-v638-gold:#ffe08a;
}

/* One reading scale for the major long-form families. */
html#ds-mars-root body :is(.organisation-book,.people-book,.history-book,.academy-wrap) :is(p,li){
  font-size:var(--ds-v638-body)!important;
  line-height:var(--ds-v638-body-leading)!important;
}
html#ds-mars-root body :is(.organisation-book,.people-book,.history-book,.academy-wrap) h1{
  font-size:clamp(var(--ds-v638-h1-min),3.45vw,var(--ds-v638-h1-max))!important;
  line-height:1.06!important;
  text-wrap:balance;
}
html#ds-mars-root body :is(.organisation-book,.people-book,.history-book,.academy-wrap) h2{
  font-size:clamp(var(--ds-v638-h2-min),2.15vw,var(--ds-v638-h2-max))!important;
  line-height:1.16!important;
  text-wrap:balance;
}
html#ds-mars-root body :is(.organisation-book,.people-book,.history-book,.academy-wrap) h3{
  font-size:clamp(var(--ds-v638-h3-min),1.55vw,var(--ds-v638-h3-max))!important;
  line-height:1.24!important;
}

/* Hero titles: stop the 72–80 px poster effect. */
html#ds-mars-root body :is(.organisation-hero,.people-hero,.history-book-header) h1{
  font-size:clamp(2.2rem,3.35vw,3.1rem)!important;
  line-height:1.06!important;
  letter-spacing:-.025em!important;
  margin:.42rem 0 .72rem!important;
  max-width:22ch!important;
}
html#ds-mars-root body :is(.organisation-hero .dek,.people-hero .people-deck,.history-book-header .history-dek){
  font-size:clamp(1.02rem,1.12vw,1.12rem)!important;
  line-height:1.62!important;
  max-width:72ch!important;
}
html#ds-mars-root body :is(.org-kicker,.people-kicker,.history-kicker,.academy-kicker){
  font-size:.76rem!important;
  line-height:1.25!important;
  letter-spacing:.13em!important;
}

/* Harmonized premium gradient for organisation/company identity pages. */
html#ds-mars-root body .organisation-hero,
html#ds-mars-root body.ds-agency-profile-v638 .history-book-header{
  position:relative!important;
  isolation:isolate!important;
  overflow:hidden!important;
  padding:clamp(1.65rem,3.3vw,2.75rem)!important;
  margin:0 0 2.3rem!important;
  border-radius:22px!important;
  background:linear-gradient(135deg,#0d1b2d 0%,#1b3153 60%,#9b5132 100%)!important;
  color:#fff!important;
  box-shadow:0 16px 38px rgba(4,17,31,.16)!important;
}
html#ds-mars-root body .organisation-hero::after,
html#ds-mars-root body.ds-agency-profile-v638 .history-book-header::after{
  content:"";
  position:absolute;
  z-index:0;
  width:58%;
  height:110%;
  right:-15%;
  bottom:-52%;
  border-radius:50%;
  background:radial-gradient(circle,rgba(244,160,92,.24),rgba(244,160,92,0) 68%);
  pointer-events:none;
}
html#ds-mars-root body .organisation-hero > *,
html#ds-mars-root body.ds-agency-profile-v638 .history-book-header > *{position:relative!important;z-index:1!important}
html#ds-mars-root body .organisation-hero :is(h1,.dek),
html#ds-mars-root body.ds-agency-profile-v638 .history-book-header :is(h1,.history-dek){
  color:#f7f9fc!important;-webkit-text-fill-color:#f7f9fc!important;
}
html#ds-mars-root body .organisation-hero .org-kicker,
html#ds-mars-root body.ds-agency-profile-v638 .history-book-header .history-kicker{
  color:var(--ds-v638-gold)!important;-webkit-text-fill-color:var(--ds-v638-gold)!important;
}

/* NASA and SpaceX are historical dossiers but are reached from the organisations menu.
   Keep their URLs/content while giving them the same first-view identity contract as JPL/ESA/etc. */
html#ds-mars-root body.ds-agency-profile-v638 .history-book{
  max-width:1020px!important;
  margin:0 auto!important;
  padding:clamp(1.35rem,3.5vw,3.4rem)!important;
  border-radius:26px!important;
  background:linear-gradient(180deg,#fffdf8,#fffaf2)!important;
  box-shadow:0 18px 48px rgba(3,16,30,.16)!important;
  color:var(--ds-v638-ink)!important;
}
html#ds-mars-root body.ds-agency-profile-v638 .history-book-header h1{max-width:24ch!important}

/* Biographies use the same visual language, with a slightly darker copper endpoint. */
html#ds-mars-root body .people-hero{
  padding:clamp(1.65rem,3.3vw,2.85rem)!important;
  border-radius:22px!important;
  background:linear-gradient(135deg,#0b1727 0%,#18304f 61%,#86472e 100%)!important;
  box-shadow:0 16px 38px rgba(4,17,31,.15)!important;
}

/* Normal history pages keep their book identity, but no longer use billboard-sized typography. */
html#ds-mars-root body .history-book-header:not(.organisation-hero){
  padding-bottom:1.65rem!important;
  margin-bottom:1.8rem!important;
}
html#ds-mars-root body .history-book-header:not(.organisation-hero) h1{max-width:24ch!important}

/* Space Academy: formerly duplicated inline CSS on 34/34 pages, now centralized here. */
html#ds-mars-root body.academy-module-page{
  margin:0!important;
  background:#071018!important;
  color:#17252f!important;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif!important;
}
html#ds-mars-root body.academy-module-page .academy-head{
  background:#071018!important;color:#fff!important;border-bottom:1px solid #9d672f!important;
  padding:16px clamp(18px,4vw,52px)!important;display:flex!important;justify-content:space-between!important;
  gap:18px!important;align-items:center!important;flex-wrap:wrap!important;
}
html#ds-mars-root body.academy-module-page .academy-head strong{font-size:1.04rem!important;letter-spacing:.08em!important}
html#ds-mars-root body.academy-module-page .academy-wrap{
  max-width:1000px!important;margin:0 auto!important;background:#fffaf2!important;min-height:100vh!important;
  padding:clamp(22px,3.5vw,46px)!important;
}
html#ds-mars-root body.academy-module-page .academy-kicker{color:#7b3824!important;font-weight:850!important;text-transform:uppercase!important}
html#ds-mars-root body.academy-module-page .academy-wrap h1{color:#0b2434!important;margin:.28em 0 .55em!important;max-width:24ch!important}
html#ds-mars-root body.academy-module-page .academy-wrap h2{color:#153d57!important;margin-top:2.05em!important;border-top:1px solid #ddcaa8!important;padding-top:.82em!important}
html#ds-mars-root body.academy-module-page .academy-wrap h3{color:#7b3824!important;margin-top:1.5em!important}
html#ds-mars-root body.academy-module-page .academy-local{display:flex!important;flex-wrap:wrap!important;gap:8px!important;margin:20px 0 30px!important}
html#ds-mars-root body.academy-module-page .academy-figure{margin:26px 0!important;padding:14px!important;background:#071018!important;border-radius:12px!important}
html#ds-mars-root body.academy-module-page .academy-figure img{display:block!important;width:100%!important;max-width:100%!important;height:auto!important}
html#ds-mars-root body.academy-module-page :is(.academy-note,.academy-exercise,.academy-solution){border-left:5px solid #b86c35!important;padding:14px 18px!important;margin:20px 0!important;background:#fff1d7!important}
html#ds-mars-root body.academy-module-page .academy-exercise{border-color:#1d6c7d!important;background:#edf9fb!important}
html#ds-mars-root body.academy-module-page .academy-solution{border-color:#417346!important;background:#eef8ed!important}
html#ds-mars-root body.academy-module-page .academy-formula{font-family:ui-monospace,SFMono-Regular,Consolas,monospace!important;background:#102b3c!important;color:#fff!important;padding:15px!important;border-radius:8px!important;overflow-x:auto!important;white-space:pre-wrap!important;overflow-wrap:normal!important;word-break:normal!important}
html#ds-mars-root body.academy-module-page .academy-table{width:100%!important;display:block!important;overflow-x:auto!important;border-collapse:collapse!important;margin:1.2rem 0!important;table-layout:auto!important}
html#ds-mars-root body.academy-module-page .academy-table :is(th,td){border:1px solid #cbbfae!important;padding:.62rem!important;vertical-align:top!important;overflow-wrap:normal!important;word-break:normal!important}
html#ds-mars-root body.academy-module-page .academy-table th{background:#efe2cc!important;text-align:left!important}
html#ds-mars-root body.academy-module-page .academy-sources{background:#f4eee2!important;padding:18px!important;border-radius:10px!important}
html#ds-mars-root body.academy-module-page .academy-check{background:#f7f1e5!important;padding:16px 20px!important;border-radius:10px!important}
html#ds-mars-root body.academy-module-page .academy-check li{margin:.45rem 0!important}

/* Mobile: smaller but never miniature. */
@media(max-width:760px){
  html#ds-mars-root body :is(.organisation-hero,.people-hero,.history-book-header) h1,
  html#ds-mars-root body.academy-module-page .academy-wrap h1{font-size:clamp(2rem,9vw,2.55rem)!important;line-height:1.08!important;max-width:none!important}
  html#ds-mars-root body :is(.organisation-book,.people-book,.history-book,.academy-wrap) h2{font-size:clamp(1.45rem,6.5vw,1.82rem)!important}
  html#ds-mars-root body :is(.organisation-book,.people-book,.history-book,.academy-wrap) h3{font-size:clamp(1.14rem,5vw,1.32rem)!important}
  html#ds-mars-root body.ds-agency-profile-v638 .history-book{padding:1.05rem!important;border-radius:18px!important}
  html#ds-mars-root body .organisation-hero,
  html#ds-mars-root body.ds-agency-profile-v638 .history-book-header,
  html#ds-mars-root body .people-hero{padding:1.4rem!important;border-radius:18px!important}
  html#ds-mars-root body.academy-module-page .academy-wrap{padding:18px 16px!important}
}


/* DELTA-SIERRA MARS V6.39 — TYPOGRAPHIC REPAIR + LONG-TITLE STRESS + ZERO INLINE PRESENTATION */
html#ds-mars-root{--ds-v639-body:1rem;--ds-v639-h1-history-max:2.08rem;--ds-v639-h1-profile-max:2.72rem;--ds-v639-h1-academy-max:2.72rem;--ds-v639-h2-academy-max:1.50rem;--ds-v639-h3-academy-max:1.18rem}
html#ds-mars-root body.history-book-page:not(.ds-agency-profile-v638) .history-book-header h1{font-size:clamp(1.82rem,2.25vw,var(--ds-v639-h1-history-max))!important;line-height:1.08!important;max-width:34ch!important}
html#ds-mars-root body :is(.organisation-hero,.people-hero) h1,html#ds-mars-root body.ds-agency-profile-v638 .history-book-header h1{font-size:clamp(2rem,2.85vw,var(--ds-v639-h1-profile-max))!important;line-height:1.07!important;max-width:30ch!important}
html#ds-mars-root body.ds-title-long-v639 :is(.organisation-hero,.people-hero,.history-book-header) h1{font-size:clamp(1.86rem,2.55vw,2.46rem)!important;max-width:32ch!important}
html#ds-mars-root body.ds-title-xlong-v639 :is(.organisation-hero,.people-hero,.history-book-header) h1{font-size:clamp(1.72rem,2.28vw,2.22rem)!important;max-width:35ch!important;letter-spacing:-.018em!important}
html#ds-mars-root body.academy-module-page .academy-wrap h1{font-size:clamp(2rem,2.8vw,var(--ds-v639-h1-academy-max))!important;line-height:1.08!important;max-width:30ch!important}
html#ds-mars-root body.academy-module-page .academy-wrap h2{font-size:clamp(1.36rem,1.65vw,var(--ds-v639-h2-academy-max))!important;line-height:1.20!important;margin-top:2.15rem!important;margin-bottom:.72rem!important}
html#ds-mars-root body.academy-module-page .academy-wrap h3{font-size:clamp(1.08rem,1.28vw,var(--ds-v639-h3-academy-max))!important;line-height:1.25!important}
html#ds-mars-root body.academy-module-page .academy-wrap :is(p,li){font-size:1rem!important;line-height:1.72!important}
html#ds-mars-root .ds-media-fluid-v639{display:block!important;width:100%!important;height:auto!important}
html#ds-mars-root .ds-figure-980-v639{max-width:980px!important;margin:1.5rem auto 2rem!important}
html#ds-mars-root .ds-figure-980-clear-v639{max-width:980px!important;margin:1.6rem auto 2rem!important;clear:both!important}
html#ds-mars-root .ds-live-poster-science-exploration-v639{--ds-live-poster-image:url('/mars-assets/img/premium-v64/full/science-exploration-fr.jpg')}
html#ds-mars-root .ds-live-poster-transport-v639{--ds-live-poster-image:url('/mars-assets/img/premium-v64/full/earth-mars-transport-fr.jpg')}
html#ds-mars-root .ds-live-poster-edl-v639{--ds-live-poster-image:url('/mars-assets/img/premium-v64/full/entry-descent-landing-fr.jpg')}
html#ds-mars-root .ds-live-poster-propellants-v639{--ds-live-poster-image:url('/mars-assets/img/premium-v64/full/propellants-on-mars-fr.jpg')}
html#ds-mars-root .ds-live-poster-reliability-v639{--ds-live-poster-image:url('/mars-assets/img/premium-v64/full/reliability-maintenance-fr.jpg')}
html#ds-mars-root .ds-live-poster-communications-v639{--ds-live-poster-image:url('/mars-assets/img/premium-v64/full/communications-navigation-fr.jpg')}
html#ds-mars-root .ds-live-poster-permanent-settlement-v639{--ds-live-poster-image:url('/mars-assets/img/premium-v64/full/permanent-settlement-fr.jpg')}
html#ds-mars-root .ds-live-poster-habitats-radiation-v639{--ds-live-poster-image:url('/mars-assets/img/premium-v64/full/habitats-radiation-fr.jpg')}
@media(max-width:600px){html#ds-mars-root body :is(.organisation-hero,.people-hero) h1,html#ds-mars-root body .history-book-header h1,html#ds-mars-root body.academy-module-page .academy-wrap h1{font-size:clamp(1.72rem,8.6vw,2.08rem)!important;max-width:none!important;line-height:1.10!important}html#ds-mars-root body.ds-title-long-v639 :is(.organisation-hero,.people-hero,.history-book-header) h1,html#ds-mars-root body.ds-title-xlong-v639 :is(.organisation-hero,.people-hero,.history-book-header) h1{font-size:clamp(1.58rem,7.8vw,1.92rem)!important;max-width:none!important}html#ds-mars-root body.academy-module-page .academy-wrap h2{font-size:1.34rem!important}html#ds-mars-root body.academy-module-page .academy-wrap h3{font-size:1.08rem!important}}
