Thanks, that's helpful. Other people on the Reddit expat forums have scoffed at the idea of hiring a lawyer, but i would feel more comfortable having someone else work out the tricky stuff for me provided I could afford it.
Yes, it seems Portugal and other EU countries are more progressive, so...