When third-tier or higher habitat structures are destroyed (either manually or due to TL reversion on independent world), they become ruins. A ruins is basically a habitat structure that does not supply population benefits. The presence of a ruins allows a player to directly build a higher-level habitat structure, rather than building through the entire habitat structure chain.
The habitat structures chain is a one-way ratchet on planets without a biosphere. When one of these planets regresses, the hab structure becomes a ruins but lower-level hab structures will never again be buildable. The only way to get such a planet above base population again is to raise it to the TL of the ruined structure or higher. This makes it harder to make use of low-TL worlds in a long-running game - most autonomous worlds were owned at one time and have a ruins, which means that habitat structures become unobtainable on most worlds without raising them to TL7.
On planets with a biosphere world, planetary arcology ruins result in a weird phenomenon. The presence of ruins allows a player to build the lowest- and highest-level habitat structures simultaneously (e.g., a hypermetropolis and a planetary arcology can be built at the same time). This is because the lowest-level hab structures on biosphere worlds have no preceding structure. If constructed, both structures will be present on the planet (normally the hypermetropolis would be replaced by an urban arcology, which would be replaced by a planetary arcology. However, the game doesn't recognize that the planetary arcology should should preclude the existence of a hypermetropolis, so they can coexist.) The max population cap won't get raised above that of the more advanced structure, but the planet will still have a slight advantage over a normally developed world: the lower-TL hab structure will remain functional at lower TLs if the world ever reverts (due to foundation trade route disruption, for example.)
Players can spitefully demolish habitat structures when other players are invading their worlds, in order to prevent the planet from being useful to an attacker.
First, disallow the construction of more than one role:LifeSupport structure at a time.
Second, role:LifeSupport structure should check for and destroy all other role:LifeSupport structures and ruins that exist on a planet when they are built.
Third, ruins should not be a role:LifeSupport structure at all. When a hab structure is ruined, the planet should generate the ruins but also restore the life support structure defined in its worldClass. The ruins can exist and upgrade directly to whatever the ruined structure was, giving players a choice of either bypassing the hab structure chain by upgrading the ruin or of just building a 2nd-tier hab structure. However, the ruins itself should not provide life support and should not be an upgrade to any life support structure.
I'm going to defer this because I've run out of time in Era 4.
In Era 5 I would like to re-visit all of these improvements to add some trade-off/choice for the player. At that point, I think I can fix this.
The simplest solution might be to allow lower-level improvements to be built on higher-level ruins. For example, if a planet has Shielded Arcology Ruins, it should be possible to build a Shielded Habitat (or, if the tech level is high enough, build a Shielded City or Shielded Arcology).
In addition, we need to fix the problem with Hypermetropolises, possibly by having a new Hypermetropolis destroy any Planetary Arcology Ruins/