/* BupaWeb 2026 — sticky in-page navigation + scrollspy v2
   Sticky requires every ancestor to keep overflow visible. */
body.bw-internal{overflow-x:clip}
.bw-seo-landing main,
.bw-internal main,
.bw-internal .editorial-layout,
.bw-internal article.prose{
  overflow:visible !important;
}

.bw-internal .editorial-layout > .article-nav{
  position:-webkit-sticky !important;
  position:sticky !important;
  top:calc(var(--bw-header-height, 82px) + 22px) !important;
  align-self:start !important;
  z-index:80 !important;
  max-height:calc(100vh - var(--bw-header-height, 82px) - 44px);
  overflow-y:auto;
  overscroll-behavior:contain;
}
.bw-internal .article-nav a{
  position:relative;
  transition:color .18s ease,background .18s ease,border-color .18s ease,padding-left .18s ease !important;
}
.bw-internal .article-nav a.is-active,
.bw-internal .article-nav a[aria-current="location"]{
  color:#087f6c !important;
  font-weight:850 !important;
  padding-left:12px !important;
}
.bw-internal .article-nav a.is-active::before,
.bw-internal .article-nav a[aria-current="location"]::before{
  content:"";
  position:absolute;
  left:0;
  top:50%;
  width:6px;
  height:6px;
  border-radius:999px;
  background:#20b99f;
  transform:translateY(-50%);
}
.bw-internal article.prose > section[id],
.bw-internal .prose section[id]{
  scroll-margin-top:calc(var(--bw-header-height, 82px) + 34px) !important;
}

@media (max-width:980px){
  .bw-internal .editorial-layout > .article-nav{
    position:-webkit-sticky !important;
    position:sticky !important;
    top:var(--bw-header-height, 72px) !important;
    z-index:1190 !important;
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    gap:8px !important;
    width:100% !important;
    max-width:none !important;
    max-height:none !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    white-space:nowrap;
    padding:10px 14px !important;
    margin:0 0 28px !important;
    border:1px solid rgba(8,38,44,.10) !important;
    border-left:0 !important;
    border-right:0 !important;
    background:rgba(247,246,241,.97) !important;
    -webkit-backdrop-filter:blur(14px);
    backdrop-filter:blur(14px);
    box-shadow:0 8px 22px rgba(8,38,44,.07) !important;
    scrollbar-width:none;
  }
  .bw-internal .article-nav::-webkit-scrollbar{display:none}
  .bw-internal .article-nav strong{display:none !important}
  .bw-internal .article-nav a{
    flex:0 0 auto;
    padding:9px 12px !important;
    border:1px solid rgba(8,38,44,.12) !important;
    border-radius:999px !important;
    background:#fff !important;
    color:#536267 !important;
    font-size:12px !important;
    line-height:1.15 !important;
  }
  .bw-internal .article-nav a::before{display:none !important}
  .bw-internal .article-nav a.is-active,
  .bw-internal .article-nav a[aria-current="location"]{
    padding-left:12px !important;
    background:#20b99f !important;
    border-color:#20b99f !important;
    color:#06242b !important;
  }
  .bw-internal article.prose > section[id],
  .bw-internal .prose section[id]{
    scroll-margin-top:calc(var(--bw-header-height, 72px) + 78px) !important;
  }
}
