Scope of syntax theme

How can I know what elements I can style in syntax theme? Are tab titles part of syntax or of UI theme?

What is order of applying themes? UI first, then syntax?

To see the scope of an element, place the cursor inside a syntax element and run the Editor: Log Cursor Scope command (shortcut on macOS is Cmd+Option+P)