Custom css per category and per single post belong in each category

Category archive pages can be styled using the body class as per your example – WordPress does this out of the box. But for single pages, you need to add this to functions.php:

function add_category_name($classes="") {
   if(is_single()) {
      $category = get_the_category();
      $classes[] = 'category-'.$category[0]->slug; 
   }
   return $classes;
}
add_filter('body_class','add_category_name');

This will add the body class to the single post, and you can style it with CSS.
In order to change the header text, you’ll need to use a conditional statement in your archive page template.

if (in_category('this')) { 
    echo 'this';
} elseif (in_category('that')) { 
    echo 'that';
} else { }