RNRB, impact of variation

The deceased Will includes a lifetime interest trust for civil partner. Leaving 50% of home to x3 children of the deceased upon death of civil partner. Children are all from previous marriage.

The full estate value (including 50% of the home) is c. 800k.

Is inhertitance tax payable at time of death of civil partner? (Or the deceased’s)?
Is RNRB applicable (so 500k threshold on 800k estate…rather than 325k threshold).?

Secondly - if a variation were to be enstated to change to a right to reside for surviving civil partner for 5 years.

In this scenario is inhertitance tax payable at time of death of civil partner? (Or the deceased’s)?
Does the 500k threshold apply (as opposed to the 325k tax threshold)