I'm asking for an explanation. In terms of design what is distress supposed to do? This question sounds condescending because frankly I've asked it nicely like 20 times and you haven't answered. I'm not asking you to change anything in the mod, I assume there is something I'm missing because I cannot make sense of the feature at all.
I genuinely haven't seen you ask it until today.
My rules for this system:
1. Cities will always suffer some amount of unhappiness from a few sources, in many cases a bit of each. This is by design. It should be rare for a city to be wholly free of unhappiness.
2. Specialists should be a prize earned by cities with excess happiness, not a natural goal for every city. Some cities will never be able to 'naturally' run specialists.
3. Median-based unhappiness exists, as you say, as an 'x per citizen' penalty. All medians follow this, in that the system is shaped by population and the disparity, but the fact that it can vary from city to city is what makes it different. You note concerns about scaling as you move from 20->25->30 pop, etc. Modifiers play a role in this, to be sure, as they create a goal line that moves faster than your city. That goal line is intentional - unhappiness should never be a 'solved problem' in any game.
4.The 'point' of this system is the variability and the unpredictability. I realize that this variability can be frustrating because it can be hard to predict - I think the system is far, far more predictable now than it used to be, and the impact of 'missing' something is far less substantial now than before. Vanilla civ suffers on the 'internal development' front because there's no meat on the bones of pop = unhappy. It is flat and bland. The median model, while (in the grand meta) resulting in a similar end, allows for individual cities to have problems tailored to their terrain and build order.
5. For distress specifically, the connection of food+production is largely a legacy of the more erratic global system (having both as a model helped control swings) - as I've said earlier, I'd be fine with looking into separating it out (either removing food or production), but I don't think the concept is flawed at heart. All cities should have 'base' yield standards to meet.
6. Unhappiness should matter. It should be a bit frustrating. It should force you to stop, look at a city, and think 'how can I fix this' and 'why won't these citizens do what I want!' Can't run specialists in a city you want specialists in? Tough. There should be consequences if you don't take action against unhappiness.
NOW, as I've said many, many times, AI tests are fruitless when it comes to the 'mouth-feel' of this system. Feedback on this is vital and valued, and said feedback has shaped the bigger changes in this system over the past few months. I don't feel that 1-5 are contentious, but I know 6 is. See solutions:
a. I imagine part of the issue is modifiers - since we shifted buildings to a 'flat reduction' system, a lot of the old means of reducing modifiers went away. As such, those numbers climb and you can't do much about it. The numbers themselves are lower now than ever before, but I do imagine they could be made lower. The consequence of this, of course, is that small empires will have few unhappiness issues. Maybe. We have two values - tech and pop - that are the biggest factor. We could increase tech and greatly reduce pop, which would make all cities have similar problems. Or we could flip it, but that would hurt growth a lot.
b. Another part is that the system is a 'per citizen' model - each additional citizen increases the yield division, making it harder and harder to hit the values needed. This is a knock-on effect with a.
I'd rather keep Distress than keep modifiers as they are now. If you'd prefer to see lower modifiers, we could try it, but I fear it will trivialize some aspects of the late-game. The other option would be to make unhappiness stem from total yield production in the city instead of per citizen, however this would alienate smaller cities quite a bit. There's no easy solution for that.
G