According to the Catholic Church, is it a sin to marry your cousin? According to the Catholic church, is it a sin to marry your distant cousin?

I am looking for two-three answers from someone who is knowledgeable in Catholic ecclesiastical laws:

(1) What degree of cousin marriages are allowed?

(2) How does the Catholic Church calculate the cousin's degree?

(3) What is the reason for the Catholic church changing its stances throughout its history? Is it merely political, or is there a moral reason also, in terms of distant (and not close) cousins?
"Consanguinity is a diriment impediment of marriage as far as
the fourth degree of kinship inclusive."
See the table at the end of this article for how 4° kinship is
determined, or this table:
The Council of Trent's session on marriage defined the dogma that the Church has the authority to make impediments:Canon IV.—If any one saith, that the Church could not establish impediments dissolving marriage; or, that she has erred in establishing them: let him be anathema.