Have a look at the classes that are applied to the body tag on various pages - moodle adds a lot of useful classes that you might be able to make use of. For example, within lesson modules the "mod-lesson" class is added so you can isolate styles to apply only within the lesson module like this:
.mod-lesson h1 {
display: none;
}
that should only hide level 1 headings within the lesson module.
Simon