I remember max CR what you can have is 26 and you can lower your class levels to minimum 4. So CR 22 base creature and 4 class levels. Normal class level is 6 (and base creature is CR 20). But you can get up to 8 class levels (lowering base creature to CR 18). At least this way it went.