/* Canonical chapter-aware progress wash for the top navigation.
   The visible fill is a child of the native x-scroller so it moves with the
   chips on mobile and desktop. The older absolute-page gradient is neutralized. */

.nav-scroll{
  --v32-progress:0%!important;
  /* Mobile's established vertical rail padding is .06rem / .16rem. Their
     average is the visual breathing gap used by the progress cap. */
  --chapter-progress-cap-inset:.11rem;
}

.nav-scroll > .nav-chapter-progress{
  position:absolute!important;
  /* script-9 owns the measured left coordinate. Do not mark left !important:
     doing so would override the inline measurement and pin the wash to 0px. */
  left:0;
  top:0!important;
  bottom:0!important;
  display:block!important;
  width:0;
  min-width:0!important;
  height:auto!important;
  margin:0 0 0 calc(var(--chapter-progress-cap-inset) * -1)!important;
  padding:0 0 0 var(--chapter-progress-cap-inset)!important;
  box-sizing:content-box!important;
  border:0!important;
  border-radius:999px!important;
  outline:0!important;
  overflow:hidden!important;
  clip-path:inset(0 round 999px)!important;
  background:linear-gradient(90deg,rgba(64,129,239,.24),rgba(64,129,239,.16))!important;
  box-shadow:none!important;
  opacity:1!important;
  visibility:visible!important;
  pointer-events:none!important;
  z-index:0!important;
  transform:none!important;
  transition:none!important;
  will-change:left,width;
}

/* The measured progress begins at the first chip. The negative margin plus
   equal left padding extends only the visible left cap by the same amount as
   the rail's vertical breathing room, while preserving the JS-calculated
   completion point on the right. */

html[data-theme="dark"] .nav-scroll > .nav-chapter-progress{
  background:linear-gradient(90deg,rgba(73,145,255,.38),rgba(73,145,255,.24))!important;
}

/* The progress wash must stay below the moving liquid chip and labels. */
.nav-scroll > .nav-v33-indicator{
  z-index:6!important;
}
.nav-scroll > .nav-chip{
  z-index:8!important;
}

@media (min-width:1024px){
  .nav-scroll{--chapter-progress-cap-inset:.34rem}
  .nav-shell .nav-scroll > .nav-v33-indicator{z-index:30!important}
  .nav-shell .nav-scroll > .nav-chip{z-index:40!important}
}
