One of the functions of Categories Dressing is to add dividers in any desired locations. Its readme file describes how to use it.

You can make a bottom border to each top category using just your stylesheet, but if the name wraps to two lines, both lines get underlined and you're back to confusion. If you can positively avoid wrapping, this will do it for you (although the underline will only extend as far as the text):

a.category-top {border-bottom: 1px dotted #aaaaaa;}

Other variations are possible.