
/* DermPrep Idea 9.40 — definitive two-variant footer system */
:root{
  --dp940-bg:#083A32;
  --dp940-bg-alt:#0B4A3F;
  --dp940-text:#F7F1E7;
  --dp940-muted:rgba(247,241,231,.78);
  --dp940-utility:rgba(247,241,231,.64);
  --dp940-coral:#F07A62;
  --dp940-gold:#B99A5E;
  --dp940-divider:rgba(247,241,231,.15);
  --dp940-logo-width:172px;
  --dp940-max:1220px;
}

/* Site-bottom ownership. */
html{background:var(--dp940-bg);}
body{margin-bottom:0!important;}
.dp-footer-v940{
  width:100%!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  background:var(--dp940-bg)!important;
  color:var(--dp940-text)!important;
  font-family:"DM Sans",Arial,sans-serif!important;
}
.dp940-footer-shell{
  width:min(var(--dp940-max),calc(100% - 64px));
  margin:0 auto;
}
.dp940-logo-plate{
  display:inline-flex!important;
  align-items:center;
  padding:7px 11px!important;
  border:0!important;
  border-radius:8px!important;
  background:#F7F1E7!important;
  box-shadow:none!important;
  text-decoration:none!important;
}
.dp940-logo{
  display:block!important;
  width:var(--dp940-logo-width)!important;
  max-width:var(--dp940-logo-width)!important;
  height:auto!important;
  object-fit:contain!important;
  filter:none!important;
  opacity:1!important;
}
.dp940-brand{min-width:0;}
.dp940-descriptor{
  max-width:46ch;
  margin:14px 0 0!important;
  color:var(--dp940-muted)!important;
  -webkit-text-fill-color:var(--dp940-muted)!important;
  font:500 14px/1.55 "DM Sans",Arial,sans-serif!important;
}
.dp940-brand-signature{
  margin:8px 0 0!important;
  color:var(--dp940-utility)!important;
  -webkit-text-fill-color:var(--dp940-utility)!important;
  font:700 11px/1.4 "DM Sans",Arial,sans-serif!important;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.dp940-rule{
  height:1px;
  margin:24px 0 16px;
  background:var(--dp940-divider);
}
.dp940-rule-utility{margin-top:18px;}
.dp940-utility{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:28px;
}
.dp940-copyright,
.dp940-disclaimer{
  margin:0!important;
  color:var(--dp940-utility)!important;
  -webkit-text-fill-color:var(--dp940-utility)!important;
  font:500 11.5px/1.5 "DM Sans",Arial,sans-serif!important;
}
.dp940-disclaimer{margin-top:4px!important;}
.dp940-email{
  white-space:nowrap;
  color:var(--dp940-text)!important;
  -webkit-text-fill-color:var(--dp940-text)!important;
  font:700 12.5px/1.4 "DM Sans",Arial,sans-serif!important;
  text-decoration:underline;
  text-decoration-color:rgba(247,241,231,.32);
  text-underline-offset:3px;
}
.dp-footer-v940 a,
.dp-footer-v940 a:link,
.dp-footer-v940 a:visited{
  color:var(--dp940-text)!important;
  -webkit-text-fill-color:var(--dp940-text)!important;
}
.dp-footer-v940 a:hover,
.dp-footer-v940 a:focus-visible{
  color:var(--dp940-coral)!important;
  -webkit-text-fill-color:var(--dp940-coral)!important;
  text-decoration-color:var(--dp940-coral)!important;
}
.dp-footer-v940 a:focus-visible,
.dp-footer-v940 button:focus-visible{
  outline:3px solid var(--dp940-coral)!important;
  outline-offset:3px!important;
}

/* Compact educational footer. */
.dp-footer-compact{
  padding:30px 0 20px!important;
}
.dp940-compact-top{
  display:grid;
  grid-template-columns:minmax(430px,1.2fr) minmax(420px,.8fr);
  gap:44px;
  align-items:start;
}
.dp940-compact-nav{
  display:flex!important;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:6px 20px;
  padding-top:5px;
}
.dp940-compact-nav a{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  color:var(--dp940-text)!important;
  text-decoration:none!important;
  font:700 13px/1.3 "DM Sans",Arial,sans-serif!important;
}

/* Full institutional footer. */
.dp-footer-institutional{
  padding:36px 0 20px!important;
}
.dp940-institutional-grid{
  display:grid;
  grid-template-columns:minmax(250px,3fr) minmax(145px,2fr) minmax(215px,3fr) minmax(165px,2fr) minmax(145px,2fr);
  gap:28px;
  align-items:start;
}
.dp940-brand-full{padding-right:8px;}
.dp940-group{min-width:0;}
.dp940-group-toggle{
  width:100%;
  min-height:28px;
  margin:0 0 10px;
  padding:0;
  border:0;
  background:transparent!important;
  color:var(--dp940-gold)!important;
  -webkit-text-fill-color:var(--dp940-gold)!important;
  font:800 10.5px/1.25 "DM Sans",Arial,sans-serif!important;
  letter-spacing:.1em;
  text-align:left;
  text-transform:uppercase;
  cursor:default;
}
.dp940-chevron{display:none;}
.dp940-group-links{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:7px;
}
.dp940-group-links a{
  color:var(--dp940-text)!important;
  text-decoration:none!important;
  font:600 12.5px/1.35 "DM Sans",Arial,sans-serif!important;
}
.dp940-trust-zone{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:30px;
  align-items:end;
}
.dp940-trust-zone .dp940-disclaimer{
  margin:0!important;
}
.dp940-closing{
  margin:0!important;
  color:var(--dp940-text)!important;
  -webkit-text-fill-color:var(--dp940-text)!important;
  font:500 16px/1.25 "Playfair Display",Georgia,serif!important;
}

/* Never allow previous footer architectures to render beside v940. */
body:has(.dp-footer-v940) .dp-footer-signature:not(.dp-footer-v940),
body:has(.dp-footer-v940) .dp-footer-v6:not(.dp-footer-v940),
body:has(.dp-footer-v940) .dp-footer-brand-band:not(.dp940-brand),
body:has(.dp-footer-v940) > footer:not(.dp-footer-v940){
  display:none!important;
}

/* Prevent card-like/legal-box regressions. */
.dp-footer-v940 .dp940-disclaimer,
.dp-footer-v940 .dp940-copyright,
.dp-footer-v940 .dp940-email,
.dp-footer-v940 .dp940-group,
.dp-footer-v940 .dp940-trust-zone{
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}
.dp-footer-v940 .dp940-disclaimer,
.dp-footer-v940 .dp940-copyright{
  background:transparent!important;
  padding:0!important;
}

/* Tablet */
@media(max-width:1024px){
  .dp940-footer-shell{width:min(var(--dp940-max),calc(100% - 48px));}
  .dp940-compact-top{
    grid-template-columns:1fr;
    gap:18px;
  }
  .dp940-compact-nav{justify-content:flex-start;}
  .dp940-institutional-grid{
    grid-template-columns:1fr 1fr;
    gap:26px 36px;
  }
  .dp940-brand-full{grid-column:1/-1;max-width:560px;}
  .dp940-trust-zone{
    grid-template-columns:1fr;
    gap:7px;
  }
}

/* Mobile */
@media(max-width:767px){
  .dp940-footer-shell{width:calc(100% - 32px);}
  .dp-footer-compact{padding:26px 0 18px!important;}
  .dp-footer-institutional{padding:28px 0 18px!important;}
  .dp940-logo{width:min(var(--dp940-logo-width),48vw)!important;}
  .dp940-descriptor{max-width:42ch;font-size:13.5px!important;}
  .dp940-compact-nav{
    display:grid!important;
    grid-template-columns:1fr 1fr;
    gap:0 14px;
    margin-top:4px;
  }
  .dp940-compact-nav a{
    min-height:44px;
  }
  .dp940-institutional-grid{
    display:block;
  }
  .dp940-brand-full{
    margin-bottom:20px;
    padding-right:0;
  }
  .dp940-group{
    border-top:1px solid var(--dp940-divider)!important;
  }
  .dp940-group:last-child{
    border-bottom:1px solid var(--dp940-divider)!important;
  }
  .dp940-group-toggle{
    min-height:48px;
    margin:0;
    display:flex;
    align-items:center;
    justify-content:space-between;
    cursor:pointer;
    color:var(--dp940-text)!important;
    -webkit-text-fill-color:var(--dp940-text)!important;
  }
  .dp940-chevron{
    display:inline!important;
    color:var(--dp940-coral)!important;
    -webkit-text-fill-color:var(--dp940-coral)!important;
    font-size:16px;
  }
  .dp940-group-links{
    display:none;
    padding:0 0 14px 12px;
    gap:0;
  }
  .dp940-group.is-open .dp940-group-links{
    display:flex;
  }
  .dp940-group-links a{
    display:flex;
    align-items:center;
    width:100%;
    min-height:44px;
    font-size:13px!important;
  }
  .dp940-rule{margin:20px 0 14px;}
  .dp940-trust-zone{
    display:block;
  }
  .dp940-closing{
    margin-top:8px!important;
    font-size:15px!important;
  }
  .dp940-utility{
    flex-direction:column;
    align-items:flex-start;
    gap:12px;
  }
  .dp940-email{white-space:normal;}
}

/* Small mobile */
@media(max-width:390px){
  .dp940-compact-nav{
    grid-template-columns:1fr;
  }
}

/* Reduced motion */
@media(prefers-reduced-motion:reduce){
  .dp-footer-v940 *{
    transition:none!important;
    animation:none!important;
  }
}

/* Print */
@media print{
  .dp-footer-v940{
    background:#fff!important;
    color:#111!important;
    border-top:1px solid #aaa!important;
  }
  .dp-footer-v940 *{
    color:#111!important;
    -webkit-text-fill-color:#111!important;
  }
  .dp940-logo-plate{background:#fff!important;padding:0!important;}
  .dp940-group{display:none!important;}
  .dp940-closing{display:none!important;}
}


/* DermPrep Idea 9.40.1 — footer centering, balance, and lower-row repair */

/* Critical reset: older footer rules can set footer itself to grid and squeeze v940 into one column. */
.dp-global-footer.dp-footer-v940,
footer.dp-footer-v940{
  display:block!important;
  grid-template-columns:none!important;
  grid-template-rows:none!important;
  align-items:initial!important;
  justify-items:initial!important;
  place-items:initial!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  padding-left:0!important;
  padding-right:0!important;
  margin-left:0!important;
  margin-right:0!important;
}

/* Center the composition, not the text. */
.dp-footer-v940 .dp940-footer-shell{
  display:block!important;
  width:min(1120px,calc(100% - 64px))!important;
  max-width:1120px!important;
  margin-inline:auto!important;
  padding-inline:0!important;
  box-sizing:border-box!important;
}

/* Full institutional footer: balanced editorial grid. */
.dp-footer-v940 .dp940-institutional-grid{
  width:100%!important;
  display:grid!important;
  grid-template-columns:
    minmax(220px,1.35fr)
    minmax(135px,.85fr)
    minmax(205px,1.25fr)
    minmax(155px,1fr)
    minmax(145px,.9fr)!important;
  column-gap:34px!important;
  row-gap:0!important;
  align-items:start!important;
  justify-content:stretch!important;
}

/* Keep brand readable. */
.dp-footer-v940 .dp940-brand-full{
  min-width:220px!important;
  max-width:280px!important;
  width:100%!important;
}
.dp-footer-v940 .dp940-brand-full .dp940-descriptor{
  max-width:280px!important;
  min-width:0!important;
}

/* Group baseline + link rhythm. */
.dp-footer-v940 .dp940-group{
  align-self:start!important;
  min-width:0!important;
}
.dp-footer-v940 .dp940-group-toggle{
  margin:0 0 12px!important;
  min-height:24px!important;
  line-height:1.2!important;
}
.dp-footer-v940 .dp940-group-links{
  gap:8px!important;
}
.dp-footer-v940 .dp940-group-links a{
  line-height:1.35!important;
}

/* Full-width lower footer rows. */
.dp-footer-v940 .dp940-rule{
  display:block!important;
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
}
.dp-footer-v940 .dp940-trust-zone{
  width:100%!important;
  max-width:none!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:32px!important;
}
.dp-footer-v940 .dp940-trust-zone .dp940-disclaimer{
  justify-self:start!important;
  text-align:left!important;
}
.dp-footer-v940 .dp940-closing{
  justify-self:end!important;
  text-align:right!important;
  white-space:nowrap;
}

/* Copyright + email across the full width. */
.dp-footer-v940 .dp940-utility{
  width:100%!important;
  max-width:none!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:32px!important;
}
.dp-footer-v940 .dp940-copyright{
  max-width:720px!important;
}
.dp-footer-v940 .dp940-email{
  margin-left:auto!important;
  text-align:right!important;
}

/* Correct vertical rhythm. */
.dp-footer-institutional{
  padding-top:34px!important;
  padding-bottom:22px!important;
}
.dp-footer-institutional .dp940-rule{
  margin-top:26px!important;
  margin-bottom:16px!important;
}
.dp-footer-institutional .dp940-rule-utility{
  margin-top:18px!important;
  margin-bottom:14px!important;
}

/* Compact footer: same centered shell. */
.dp-footer-compact .dp940-compact-top{
  width:100%!important;
  grid-template-columns:minmax(360px,1fr) auto!important;
  gap:42px!important;
  align-items:start!important;
}
.dp-footer-compact .dp940-brand{
  min-width:0!important;
  max-width:500px!important;
}
.dp-footer-compact .dp940-compact-nav{
  align-self:start!important;
}

/* Prevent inherited sticky-footer auto-margin from creating a giant cream gap. */
body.dp937-page > .dp-global-footer,
body.dp936-page > .dp-global-footer,
body.dp937-page #root > .dp-global-footer,
body.dp936-page #root > .dp-global-footer{
  margin-top:0!important;
}

/* Tablet */
@media(max-width:1100px){
  .dp-footer-v940 .dp940-footer-shell{
    width:min(100% - 48px,960px)!important;
  }
  .dp-footer-v940 .dp940-institutional-grid{
    grid-template-columns:1fr 1fr!important;
    gap:28px 42px!important;
  }
  .dp-footer-v940 .dp940-brand-full{
    grid-column:1/-1!important;
    max-width:520px!important;
  }
  .dp-footer-v940 .dp940-brand-full .dp940-descriptor{
    max-width:46ch!important;
  }
  .dp-footer-v940 .dp940-trust-zone{
    grid-template-columns:1fr!important;
    gap:8px!important;
  }
  .dp-footer-v940 .dp940-closing{
    justify-self:start!important;
    text-align:left!important;
    white-space:normal!important;
  }
}

/* Mobile */
@media(max-width:767px){
  .dp-footer-v940 .dp940-footer-shell{
    width:calc(100% - 32px)!important;
    max-width:none!important;
  }
  .dp-footer-v940 .dp940-brand-full{
    min-width:0!important;
    max-width:100%!important;
  }
  .dp-footer-v940 .dp940-compact-top{
    grid-template-columns:1fr!important;
    gap:18px!important;
  }
  .dp-footer-v940 .dp940-utility{
    flex-direction:column!important;
    align-items:flex-start!important;
    gap:12px!important;
  }
  .dp-footer-v940 .dp940-email{
    margin-left:0!important;
    text-align:left!important;
  }
}


/* DermPrep Idea 9.40.2 — page-end / subpage footer flow correction
   Goal: content flows naturally into the green footer and nothing light appears after it. */

html,
body{
  margin-bottom:0!important;
  padding-bottom:0!important;
  background:#083A32!important;
}

/* Retire old sticky/min-height shell behavior on static educational pages.
   This removes artificial blank cream space before the footer. */
body.dp937-page,
body.dp936-page{
  min-height:0!important;
  height:auto!important;
  display:block!important;
  background:#083A32!important;
}

/* Keep actual page content cream/white while the document exterior remains footer green. */
body.dp937-page > main,
body.dp936-page > main{
  min-height:0!important;
  height:auto!important;
  flex:none!important;
  background:#FFFDF8!important;
}

/* Root SPA/institutional pages: do not force a viewport-height cream root after the footer. */
body.dp937-page #root,
body.dp936-page #root,
#root{
  min-height:0!important;
  height:auto!important;
  background:#083A32!important;
}
body.dp937-page #root > main,
body.dp936-page #root > main,
#root > main{
  min-height:0!important;
  height:auto!important;
  flex:none!important;
  background:#FFFDF8!important;
}

/* Footer must remain in normal document flow and be the final visual surface. */
.dp-global-footer.dp-footer-v940,
footer.dp-footer-v940{
  position:relative!important;
  inset:auto!important;
  margin-top:0!important;
  margin-bottom:0!important;
  padding-bottom:max(22px,env(safe-area-inset-bottom))!important;
  flex:none!important;
}

/* If a browser leaves any viewport after a short document, continue the footer color,
   never cream or white. */
body.dp937-page::after,
body.dp936-page::after,
#root::after,
.dp-footer-v940::after{
  content:none!important;
  display:none!important;
}

/* Remove common trailing-space sources after the footer. */
.dp-footer-v940 + *:not(script){
  display:none!important;
}

/* Preserve the intended compact/full footer spacing without any outside bottom gap. */
.dp-footer-compact,
.dp-footer-institutional{
  border-bottom:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}

/* At all viewport sizes, the page terminates visually in deep forest. */
@media(max-width:1100px){
  html,body,#root{background:#083A32!important;}
}
@media(max-width:767px){
  html,body,#root{background:#083A32!important;}
}
