Your findings are correct, and they are official W3C specification.
Two classes on the element itself have the same 'origin'. Also, the selectors have the same 'weight'.
Since these and other rules don't determine which style has priority, the order of the style sheet determines the overrule.
See Cascading Style Sheets, level 1, paragraph 3.2 for the rule that specifies this. 3.2.1 through 3.2.4 don't differentiate between any of the two styles. It is 3.2.5 that prevails.
I will cite the rules here, although you may want to read the document to place them in context.
Conflicting rules are intrinsic to the CSS mechanism. To find the value for an element/property combination, the following algorithm must be followed:
- Find all declarations that apply to the element/property in question. Declarations apply if the selector matches the element in
question. If no declarations apply, the inherited value is used. If
there is no inherited value (this is the case for the 'HTML' element
and for properties that do not inherit), the initial value is used.
- Sort the declarations by explicit weight: declarations marked '!important' carry more weight than unmarked (normal) declarations.
- Sort by origin: the author's style sheets override the reader's style sheet which override the UA's default values. An imported style
sheet has the same origin as the style sheet from which it is
imported.
- Sort by specificity of selector: more specific selectors will override more general ones. To find the specificity, count the number
of ID attributes in the selector (a), the number of CLASS attributes
in the selector (b), and the number of tag names in the selector (c).
Concatenating the three numbers (in a number system with a large base)
gives the specificity.
- Sort by order specified: if two rules have the same weight, the latter specified wins. Rules in imported style sheets are considered
to be before any rules in the style sheet itself.
Summarizing
We can translate the common sense rule itens in the W3C CSS1 rule 3.2 itens,
«use class="a" if it is defined, or use class="b" if it is defined, or use BOTH if both defined» is equivalemnt to 3.2.1, «Declarations apply if the selector matches the element in question».
«the last CSS definition overrides the others» is equivalemnt to 3.2.5 , «the latter specified wins».
Not changed with new standars: CSS2, CSS2.1 and CSS3 use the same rules.