The article in 'il cui / la cui / i cui / le cui' agrees with the NOUN THAT FOLLOWS 'cui', not with the antecedent. Ask: what gender and number is the noun after 'cui'?
Il Cui / La Cui / I Cui / Le Cui — Form 11 / 10
Il paese ___ economia dipende dal turismo è in difficoltà.