Righteousness changes based on the relationship and expectations. The expectations I have for a relationship with my friends are different than the expectations I have for a relationship with a wife. In any of those relationships, righteousness would be living up to the expectations that is yielded by the relationship. When the Bible talks about being righteous, it is for those who live up to the expectations that God has set for His people. These are found in the Law and then is given to us through relationship with Jesus.