but I don't know about the detail
Initial findings and guesses
The number of techs/civics has a ceiling and floor unlock cost
When you change civics, the next turn they cost the ceiling price to change
Every turn after that they degrade by 15/10/5 (may be higher on later levels)
They stop degrading when they hit the floor price.
Unlocking and changing civics bumps them back up to their max
... so if you finish a civic but do not change civics, it is pretty cheap to unlock lateras it is using the floor price or close to it.
You cannot buy an unlock the same turn as you have changed civics
Pillaging and eureka completions immediately up the price by 5/10
Difficuly has no effect, maybe speed does, need to check.
So finding ceilings and floors is next I guess. Many values degrade by a turn before you see them due to EOT or just oddness so mabe the base is number of civics*5 and the ceiling is 100+ techs+civics*5 or the greater of the two. It will be around here somewhere
Just initial findings but thought I would provide some stats to start
This one from the start of being able to buy, testing unlocking and depreciation