/* Shared helpline + footer-pains + hide leftover sticky CTA.
   Mobile: 56px SOS button, fixed bottom-right, with safe-area and body padding.
   Desktop: in-flow pill in .hf-helpline-slot, not fixed, does not cover text. */

:root {
  --hl-accent: var(--signal, #e5484d);
  --hl-ink: var(--on, #111111);
  --hl-paper: var(--paper, #0b1220);
  --hl-line: var(--line, rgba(255,255,255,.12));
}

.hf-helpline[data-site="devhero"] { --hl-accent: #c6f432; --hl-ink: #111111; }
.hf-helpline[data-site="contentum"] { --hl-accent: #e5484d; --hl-ink: #111111; }
.hf-helpline[data-site="rescuecatalog"] { --hl-accent: #FF5F15; --hl-ink: #14181D; }

/* Hide the old full-width sticky CTA everywhere. Only the SOS button may float. */
.sticky-cta { display: none !important; }
body[data-page="pains-hub"],
body[data-page="pains"],
body[data-page="home"] { padding-bottom: 0; }
@media (max-width: 799px) {
  body { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}

/* Slot is in normal flow under the header on desktop; collapses on mobile because the button is fixed. */
.hf-helpline-slot {
  position: relative;
  z-index: 5;
  padding: 10px 0 0;
}
.hf-helpline-slot .wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: flex-start;
}

.hf-helpline {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--hl-ink);
  background: var(--hl-accent);
  border-radius: 999px;
  padding: 10px 18px 10px 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
  max-width: 100%;
}
.hf-helpline:hover,
.hf-helpline:focus-visible {
  filter: brightness(1.06);
  outline: 2px solid var(--hl-accent);
  outline-offset: 3px;
}
.hf-helpline-sos {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--hl-ink);
  color: var(--hl-accent);
  font-family: Anton, Impact, "Arial Narrow Bold", Arial, sans-serif;
  font-size: 13px;
  letter-spacing: .04em;
  line-height: 1;
}
.hf-helpline-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.hf-helpline-copy strong {
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
}
.hf-helpline-copy span {
  font-size: 14px;
  line-height: 1.25;
  font-weight: 650;
}

@media (max-width: 799px) {
  .hf-helpline-slot {
    height: 0;
    padding: 0;
    margin: 0;
    overflow: visible;
    /* The fixed SOS must not sit in a low stacking context under other FABs. */
    z-index: 40;
  }
  .hf-helpline-slot .wrap { padding: 0; }
  .hf-helpline {
    position: fixed;
    z-index: 36;
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
    width: 56px;
    height: 56px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    box-shadow: 0 10px 28px rgba(0,0,0,.4);
  }
  .hf-helpline-sos {
    width: 56px;
    height: 56px;
    font-size: 16px;
    background: var(--hl-accent);
    color: var(--hl-ink);
  }
  .hf-helpline-copy {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
}

/* Prominent Helpline item in the mobile menu */
.mnav nav a.hf-helpline-nav,
.mnav-panel a.hf-helpline-nav,
details.mnav a.hf-helpline-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 999px;
  background: var(--signal, var(--hl-accent, #e5484d));
  color: var(--on, #111111);
  font-weight: 700;
  text-decoration: none;
}
.mnav nav a.hf-helpline-nav::before,
.mnav-panel a.hf-helpline-nav::before,
details.mnav a.hf-helpline-nav::before {
  content: "SOS";
  font-size: 11px;
  letter-spacing: .04em;
  font-weight: 800;
}

/* Desktop header link */
header.top nav a.hf-helpline-nav {
  font-weight: 700;
}

/* Footer: Pain Hub + Help Hub lists.
   Both blocks use class footer-pains (help also has footer-help). */
footer.site .footer-pains,
footer.site .footer-help {
  width: 100%;
  margin: 12px 0 8px;
  border-top: 1px solid var(--line, var(--hl-line));
  padding-top: 12px;
}
footer.site .footer-pains > summary,
footer.site .footer-help > summary {
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--signal, var(--hl-accent));
}
footer.site .footer-pains > summary::-webkit-details-marker,
footer.site .footer-help > summary::-webkit-details-marker { display: none; }
footer.site .footer-pains-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 18px;
}
footer.site .footer-pains-list a {
  color: inherit;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.35;
}
footer.site .footer-pains-list a:hover { text-decoration: underline; }
footer.site .footer-pains-all {
  display: inline-block;
  margin-top: 8px;
  font-size: 14px;
}
footer.site .fextra {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  width: 100%;
  padding: 8px 0 12px;
  font-size: 14px;
}
@media (min-width: 800px) {
  footer.site .footer-pains-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Helpline page */
.hf-helpline-page { padding: 28px 0 48px; }
.hf-helpline-page h1 { margin: 0 0 12px; }
.hf-helpline-page .lead { max-width: 42rem; }
.hf-helpline-page .cases {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  margin: 20px 0;
  padding: 0;
  list-style: none;
  max-width: 40rem;
}
.hf-helpline-page .cases li {
  border: 1px solid var(--line, var(--hl-line));
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 650;
}
@media (max-width: 599px) {
  .hf-helpline-page .cases { grid-template-columns: 1fr; }
}

/* RescueCatalog HelpMap: keep SOS clear of the Ask HELPOS FAB on mobile. */
@media (max-width: 799px) {
  .hf-helpline[data-site="rescuecatalog"] {
    bottom: calc(16px + 44px + 12px + env(safe-area-inset-bottom, 0px));
  }
  body:has(.hf-helpline[data-site="rescuecatalog"]) {
    padding-bottom: calc(56px + 44px + 16px + 24px + env(safe-area-inset-bottom, 0px));
  }
}


/* Mobile header: the WhatsApp top button must show an icon, never an empty colored box.
   Label is hidden in needs.css at max-width 759px. */
@media (max-width: 759px) {
  header.top a.topbtn,
  header.top a.cartbtn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 38px;
    min-width: 40px;
    padding: 0 !important;
    gap: 0;
    border-radius: var(--r, 8px);
    background: var(--signal, var(--hl-accent));
    color: var(--on, var(--hl-ink, #111111));
    text-decoration: none;
    position: relative;
    overflow: hidden;
  }
  header.top a.topbtn .lbl,
  header.top a.cartbtn .lbl {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    display: block !important;
  }
  header.top a.topbtn::before,
  header.top a.cartbtn::before {
    content: "";
    width: 22px;
    height: 22px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M19.05 4.91A9.82 9.82 0 0 0 12.04 2C6.58 2 2.13 6.45 2.13 11.91c0 1.75.46 3.45 1.32 4.95L2.05 22l5.25-1.38c1.45.79 3.08 1.21 4.74 1.21 5.46 0 9.91-4.45 9.91-9.91 0-2.65-1.03-5.14-2.9-7.01zm-7.01 15.24c-1.48 0-2.93-.4-4.2-1.15l-.3-.18-3.12.82.83-3.04-.2-.31a8.2 8.2 0 0 1-1.26-4.38c0-4.54 3.7-8.24 8.25-8.24 2.2 0 4.27.86 5.82 2.42a8.18 8.18 0 0 1 2.41 5.83c0 4.54-3.7 8.23-8.23 8.23zm4.52-6.16c-.25-.12-1.47-.72-1.7-.81-.23-.08-.4-.12-.56.12-.17.25-.64.81-.78.97-.14.17-.29.19-.54.06-.25-.12-1.05-.39-2-1.23-.74-.66-1.23-1.47-1.38-1.72-.14-.25-.02-.38.11-.51.11-.11.25-.29.37-.43.12-.14.17-.25.25-.41.08-.17.04-.31-.02-.43-.06-.12-.56-1.35-.76-1.84-.2-.48-.4-.42-.56-.42h-.48c-.17 0-.43.06-.66.31-.23.25-.87.85-.87 2.07 0 1.22.89 2.4 1.01 2.56.12.17 1.75 2.67 4.23 3.74 1.76.76 2.12.82 2.88.69.44-.08 1.47-.6 1.67-1.18.21-.58.21-1.07.14-1.18-.06-.1-.23-.17-.48-.29z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M19.05 4.91A9.82 9.82 0 0 0 12.04 2C6.58 2 2.13 6.45 2.13 11.91c0 1.75.46 3.45 1.32 4.95L2.05 22l5.25-1.38c1.45.79 3.08 1.21 4.74 1.21 5.46 0 9.91-4.45 9.91-9.91 0-2.65-1.03-5.14-2.9-7.01zm-7.01 15.24c-1.48 0-2.93-.4-4.2-1.15l-.3-.18-3.12.82.83-3.04-.2-.31a8.2 8.2 0 0 1-1.26-4.38c0-4.54 3.7-8.24 8.25-8.24 2.2 0 4.27.86 5.82 2.42a8.18 8.18 0 0 1 2.41 5.83c0 4.54-3.7 8.23-8.23 8.23zm4.52-6.16c-.25-.12-1.47-.72-1.7-.81-.23-.08-.4-.12-.56.12-.17.25-.64.81-.78.97-.14.17-.29.19-.54.06-.25-.12-1.05-.39-2-1.23-.74-.66-1.23-1.47-1.38-1.72-.14-.25-.02-.38.11-.51.11-.11.25-.29.37-.43.12-.14.17-.25.25-.41.08-.17.04-.31-.02-.43-.06-.12-.56-1.35-.76-1.84-.2-.48-.4-.42-.56-.42h-.48c-.17 0-.43.06-.66.31-.23.25-.87.85-.87 2.07 0 1.22.89 2.4 1.01 2.56.12.17 1.75 2.67 4.23 3.74 1.76.76 2.12.82 2.88.69.44-.08 1.47-.6 1.67-1.18.21-.58.21-1.07.14-1.18-.06-.1-.23-.17-.48-.29z'/%3E%3C/svg%3E") center / contain no-repeat;
  }
}

/* Keep the last footer line clear of the fixed SOS button on mobile. */
@media (max-width: 799px) {
  footer.site,
  footer.foot,
  footer {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* Footer chrome for app pages that do not load the full Human First CSS. */
footer.site {
  font-family: var(--body, inherit);
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--dim, var(--muted, rgba(243,241,234,.7)));
  border-top: 1px solid var(--line, rgba(255,255,255,.12));
  background: var(--paper, transparent);
}
footer.site .wrap {
  display: grid;
  gap: 12px 28px;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}
footer.site .fwm {
  display: block;
  width: 100%;
  padding: clamp(34px, 5vw, 72px) 0 clamp(18px, 2.5vw, 34px);
  font-size: clamp(52px, 17.2vw, 300px);
  line-height: .85;
  letter-spacing: .14em;
  color: rgba(243,241,234,.1);
  white-space: nowrap;
  overflow: hidden;
  user-select: none;
  font-weight: 700;
}
footer.site .footer-slogan,
footer.site p.slogan {
  margin: 0 0 4px;
}
footer.site .fmain {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  width: 100%;
  padding-bottom: 14px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--line2, var(--line, rgba(255,255,255,.12)));
}
footer.site .fmain a {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted, inherit);
  text-decoration: none;
}
footer.site .fmain a:hover { color: var(--signal, var(--hl-accent)); }
footer.site nav.legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  width: 100%;
}
footer.site nav.legal a,
footer.site nav.legal button {
  color: inherit;
  opacity: .85;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}
footer.site .langs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  width: 100%;
  padding-top: 14px;
  border-top: 1px solid var(--line2, var(--line, rgba(255,255,255,.12)));
}
footer.site .langs a {
  text-decoration: none;
  color: var(--muted, inherit);
  font-size: 12px;
}
footer.site .langs a[aria-current] { color: var(--signal, var(--hl-accent)); }
footer.site a { color: inherit; }

/* Short hub labels in the header: keep the bar to one line on desktop. */
header.top nav a,
details.mnav a.hf-helphub-nav,
footer.site a.hf-helphub-nav { white-space: nowrap; }
header.top nav { flex-wrap: nowrap; }
@media (min-width: 1024px) {
  header.top .wrap > nav { display: flex !important; flex-wrap: nowrap; white-space: nowrap; gap: 18px; }
  header.top details.mnav { display: none !important; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  header.top .wrap { gap: 12px; }
  header.top nav { gap: 12px; }
  header.top nav a { letter-spacing: .06em; }
}

/* Help Hub + Pain Hub index: one-column hero, H1 not oversized, tight stack with the lead and CTA.
   Pain *topic* pages already use .hero-grid / .hero-main. */
body[data-page="help"] .hero,
body[data-page="help-hub"] .hero,
body[data-page="hub"] .hero {
  padding: clamp(28px, 3.5vw, 56px) 0 clamp(24px, 3vw, 40px);
}
body[data-page="help"] .hero .wrap,
body[data-page="help-hub"] .hero .wrap,
body[data-page="hub"] .hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px 0;
  align-items: start;
}
body[data-page="help"] .hero h1,
body[data-page="help-hub"] .hero h1,
body[data-page="hub"] .hero h1 {
  font-size: clamp(36px, 4.6vw, 64px);
  line-height: 1.08;
  letter-spacing: .02em;
  font-weight: 400;
  margin: .12em 0 .08em;
  color: var(--ink, #fff);
  max-width: 22ch;
}
body[data-page="help"] .hero .lead,
body[data-page="help-hub"] .hero .lead,
body[data-page="hub"] .hero .lead {
  font-size: clamp(17px, 1.35vw, 20px);
  max-width: 58ch;
  color: #cfd7e6;
  margin: 0 0 6px;
}
body[data-page="help"] .hero .sub,
body[data-page="help-hub"] .hero .sub,
body[data-page="hub"] .hero .sub { margin: 0 0 4px; max-width: 58ch; }
body[data-page="help"] .hero .hero-cta,
body[data-page="help-hub"] .hero .hero-cta,
body[data-page="hub"] .hero .hero-cta { margin-top: 8px; }
body[data-page="help"] :is(h1,h2) .hl,
body[data-page="help-hub"] :is(h1,h2) .hl,
body[data-page="hub"] :is(h1,h2) .hl {
  color: var(--signal) !important;
  -webkit-text-stroke: 0 !important;
}
