What does that mean? If they were gases they would mix (as the atmosphere, where you don’t see layers of gasses of different densities but an essentially homogeneous mixture).
I think the point still stands that the separation contributes to a decrease in entropy, however it enables another effect which increases entropy even more.
If we were allowed to mix it up evenly by adding energy from the outside to lift the heavier material up (constant temperature), then we'd get an even higher entropy, agree?
Anyway, to increase the entropy you don’t just need to add energy, it has to be in the form of heat (something you can’t extract work from later). If you move the “heavy” layer on top of the “light” layer the (potential) energy has increased but if the temperature remains constant the entropy doesn’t change.
I mean that ceteris paribus the layering (separation of materials) causes a decrease in entropy. However, the system still does this, because it gains more entropy through a different "channel".
If we could destroy the layering, thereby evenly mixing things up, but not changing anything else that affects entropy, we could increase the entropy. So it show that the layered version is lower entropy as long as all else is the same. The catch is, this would require adding extra energy into the system, because the mixed version has more potential energy. We could also imagine a mixed up configuration that has the same total energy, but then the temperature would be lower since more of the energy would be used up as potential energy, leaving less for heat. In that case the entropy would be lower.
Main point: the layering, just the fact that it is layered, this property, if we know nothing else, is still something that is a low entropy thing. So our intuition is not broken that order corresponds to low entropy.
But it doesn’t, which is the reason why it happens. Because that intuition of “oh, there are two phases, this means order and entropy is disorder so the entropy is lower” doesn’t correspond to the reality of the physical concept of entropy (the thing that is maximized for a thermodynamic system In equilibrium). That’s the point of the article.
Note that the discussion about potential energy is a red herring, phase separation does also happen in absence of gravity (you get droplets which don’t coalesce as easily, but it happens nevertheless).
And the reason it happens is because it doesn't magically get the corresponding external energy. However if we artificially, like gods, arranged everything to be non layered but the same temperature, the entropy would be higher than if layered and same temperature.
What factors? Imagine you could place the particles as you wished, and being encouraged by my first sentence you decide to mix it all up to achieve higher entropy. To make it all mixed up, you'd have to move the heavier, denser material towards the top, increasing the total potential energy. This would need the introduction of external energy into the system. We cannot do that with a closed system. We could only take the energy as heat from the salad, making it all colder. However, in making it colder, the motion of the particles becomes less uncertain, leading to a decrease in entropy. Ultimately the method of mixing it up fails to increase the entropy, showing that the separated configuration is indeed lower entropy.
However it is not because of the separation, but in a certain sense despite it. The separation helps bring the particles into a higher inner-energy state, because the potential energy decreases as the denser material moves down. Without paying attention to the micro situation the effect wouldn't make sense.