The journey from Nigla to Nistar that demonstrates the unity in the Torah.
Various Gemaros and the Zohar (Raia Meheimna Parshas Mishpatim (117b)).
The classic definitions for צדיק בינוני רשע address their judgement and reward or punishment.
The more involved terms of צדיק וטוב לו, צדיק ורע לו and רשע וטוב לו לו רשע ורע לו address the apparent inequity in Hashem’s world and why some צדיקים suffer while some רשעים seem to prosper; that it has to do with imperfection that needs repairing.
The זהר, רעי’ מהימנא פרשת משפטים קיז,ב which completely redefines these terms: A רשע has evil which is subservient to good.
This opens the פנימיות התורה window.
It is supported by the נגלה- גמרא ברכות סא, ב where רבה calls himself a בינוני which cannot even be an acceptable mistake based on the נגלה paradigm.