Righteousness exists in three forms. It can refer to right standing before God. It can mean recognition by other men as an upright individual, or it can denote an internal heart evaluation which assesses that we operate in accordance with what is right and proper in accordance with our own conscience.
The great emphasis of the church has been on the first of these elements. They have concluded that the great need of humanity is to be judged righteous and acceptable by God so that we can escape his divine wrath and the threat of hellfire.
Of course, since achieving righteousness before God has always involved following prescribed pious acts, the church’s notion of righteousness before God also answers to the need to be recognized as righteous before men. Thus Christian Orthodoxy’s concept of salvation and its righteousness means that anyone claiming to be saved can simultaneously claim righteousness before men. If salvation is granted based on right knowledge and right behaviors and/or proper procedure then those who achieved that salvation can be judged and judge themselves as wiser and more dedicated than otherwise. The saved claim the right to be viewed by others as exceptional in the eyes of God.
The last concept of righteousness is little considered in Christian theology. How we are judged by our own conscience is thought to be irrelevant, since our consciences can be seared and lead us astray. I feel quite certain that deep down inside our consciences know what is right, even when our conscious mind forgets or has been misled.
I believe that this last concept of righteousness or what is right and proper is the real motivation behind most human behavior. We like to believe that fear of divine or legal retribution is an effective restraint on behavior or that public disapproval will discourage misbehavior. These have their effect but the beliefs, assumptions, and experiences of the individual conscience is the ultimate arbiter of what anyone thinks is right and therefore allows themselves to act upon.