When multiple rules target the same element, specificity decides which wins:
/* Specificity: (inline, id, class, element) */
* {} /* 0,0,0,0 */
p {} /* 0,0,0,1 */
.card {} /* 0,0,1,0 */
#header {} /* 0,1,0,0 */
style="" /* 1,0,0,0 */
!important /* overrides all */
/* Higher number wins */
/* Same specificity — last rule wins */