The split
Where the macronutrients come from
Protein first
It is set on body weight and not as a share of calories: 2.2 g per kg when losing, 2 g when gaining, 1.8 g when maintaining. A percentage would lower protein at the exact moment the deficit makes it most useful.
Fat next
25 percent of calories when losing as much as when gaining, 30 when maintaining. The fat floor matters: going too low touches hormonal balance and the absorption of fat-soluble vitamins.
Carbs last
They take what is left of the target once protein and fat are set. It is the most flexible slot, and the one that adjusts without breaking anything else in the day.
Grams convert with the Atwater coefficients: 4 kcal per gram of protein and carbs, 9 for fat. The three add up to the target shown, give or take the rounding.