/* Keep the Library Resources subject filter independent from the older
   Browse-by-Subject .subject-cloud styles used elsewhere on the homepage. */
#library-resources .subject-cloud{
  display:block !important;
  grid-template-columns:none !important;
  gap:0 !important;
  width:100% !important;
  padding:20px 22px !important;
}

#library-resources .subject-head{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:20px !important;
  width:100% !important;
  margin:0 0 15px !important;
}

#library-resources .subject-head h3{
  margin:0 !important;
  flex:0 0 auto !important;
}

#library-resources .subject-head span{
  margin-left:auto !important;
  text-align:right !important;
}

#library-resources .subject-chips{
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:9px !important;
  width:100% !important;
}

#library-resources .subject-chip{
  width:auto !important;
  min-width:0 !important;
  margin:0 !important;
  white-space:nowrap !important;
}

@media (max-width:760px){
  #library-resources .subject-head{
    display:block !important;
  }
  #library-resources .subject-head span{
    display:block !important;
    margin:5px 0 0 !important;
    text-align:left !important;
  }
  #library-resources .subject-chips{
    gap:8px !important;
  }
}

@media (max-width:520px){
  #library-resources .subject-cloud{
    padding:17px 16px !important;
  }
  #library-resources .subject-chip{
    white-space:normal !important;
  }
}
