I'm italian but I haven't studied grammar in ages and now I barely know how to refer to grammatical elements. I tried to use the search function but without success and I decided to directly put the example in the title, please edit it if needed and please link me a similar question if already existing.
Basically I can't find an explanation for the use of a male pronoun to refer to a female person. For example, a dialogue between two people, A and B, talking about a female named Anna could be:
A: "Anna è molto simpatica!" B: "Sì, lo è!"
and I am 99.99999% sure it is correct but I would like to know why it is correct. Another example could be A and B speaking about a group of people:
A: "Loro sono molto simpatici!" B: "Sì, lo sono!"
or also
A: "Noi siamo molto simpatiche!" B: "Sì, lo siete!"
so I can see that "lo" just stays "lo" because it refers to the fact that Anna or the groups are funny, so "lo" is the "parte nominale" maybe? and the thing that got me confused is its placement in the sentence.
Any clue is appreciated, thanks! Please suggest proper tags also.
EDIT a friend found a solution: https://accademiadellacrusca.it/it/consulenza/%C3%A8-una-domanda-interessante-s%C3%AC-lo-%C3%A8-o-la-%C3%A8/825 and in short "lo" is just a box that contains "something" and just stays "lo" but there are other examples in which the box is "la", and in some regional variants also the box is declined for female people: in the link you can find the tecnnical terms. Thank you!