How to vary classes depending on content type?
Not sure about page.html.twig. Would have to dig around...

In node.html.twig:

{%
  set newClassNameVar = [
    node.type.entity.label == 'Program' ? 'Program' : 'Not Program'
  ]
%}

&lt;div{{ attributes.addClass(newClassNameVar) }}&gt;&lt;/div&gt;


or:

{%
  set newClassNameVar = [
    node.bundle == 'content__type' ? 'set-yes-class' : 'set-no-class'
  ]
%}

&lt;div{{ attributes.addClass(newClassNameVar) }}&gt;&lt;/div&gt;


use debug such as {{ dump(_context | keys) }} to see what is available and best suits your use case.