I guess my take on this is a little different. I view "righteous" as a person who does "right" things.
As defined above this would include things that are decent and upstanding.
People can rise to this mark through diligent attention to what they do and dont do. They may/may not however be "good" in their heart of hearts.
There seems to be separate functions at work there.
Perhaps a person is living a very upstanding life due to their political career or pressure from family or some other source. That doesnt speak to what they would really do if they thought they could get away with it. That side of them is their heart.
What is that old saying? "Reputation is what you do when you think people are watching, character is what you do whenyou think theyre not?"
I think of the Pharisees where they bragged about giving the tenth of the mint and the dill and so on...they congratulated themselves on being right according to the laws standards.
On the other hand. in Ro. 5:7 we have the contrast between a "righteous" and a "good" person.
7 Very rarely will anyone die for a righteous person, though for a good person someone might possibly dare to die.
this seems to indicate a contrast in how people "sense" the difference. Good people do not always get it right. A lot of times they live lives that are riddled with flaws and bad decisions. That is why we will hear people say "he/she was such a good person - its really too bad...." when this kind of person dies of a drug overdose or some other sad event occurs.
Sometimes a righteous person appears good because of their deeds. But humans have the inherent ability to be able to tell when someone simply has a good heart.
These are the people that everyone can identify above and beyond what their actions are saying.
I have always thought that contrast in Romans was very thought provoking in its implication that we can tell the difference in the two.