Malbim Ayelet HaShachar Klal 517
Can copy this into an AI, or connect the whole library to your assistant. For deeper learning, you can directly use the original seforim, sites, and apps.
יש הבדל בין משפט ובין צדק. המשפט הוא כפי שורת הדין, והצדק ישקיף על הענין והנידון והנדונים וכפי צורך הזמן והמקום והיושר וכדומה (קדושים סימן כב).
Ayelet Hashachar, translated by Betzalel Avraham Feinstein, 2021
There is a difference between משפט (law) and צדק (justice): משפט is according to the letter of the law, while צדק focuses on the matter at hand and the ones being judged according to the needs of the time, place, and what is right, etc.
וכשבא שם "צדק" לתאר שם "משפט" – יכוין שהמשפט לא יהיה נלוז מן הצדק והאמת (קדושים ס' לט).
Ayelet Hashachar, translated by Betzalel Avraham Feinstein, 2021
And when the noun צדק comes to modify the noun משפט, it means that the law will not deviate from justice and truth.