How is correct to write :hover before the element or after?

There have any rules that like for input elements the input:focus need to be first and after that the input element or can be second only? Or matter?

Thanks!

input{background: red;}
input:focus{background: green;}

or
input:focus{background: green;}
input{background: red;}

Any rules for the order list?

I ask this because like on :hover versus :active is for that have an order list:

( :active MUST come after :hover (if present) in the CSS definition in order to be effective!)

Found nothing about this thing on net. Some person write first some after first element property.

a:link {color: blue;}
a:visited {color: purple;}
a:hover {color: red;}
a:active {color: yellow;}

&

Note: a:hover MUST come after a:link and a:visited in the CSS definition in order to be effective! a:active MUST come after a:hover in the CSS definition in order to be effective! Pseudo-class names are not case-sensitive.

Yes got that.

But what about :hover :)? As standard?