Text this: Insights into phase transitions and entanglement from density functional theory