:root {
  --brand-light-tint: color-mix(in srgb, var(--brand-action) 5%, var(--background));
  --brand-selected-tint: color-mix(in srgb, var(--brand-action) 10%, var(--background));
}

.health-toc,
.health-cta,
main:has(#allergen-filter-help) :is(thead, div:has(> fieldset)) {
  background-color: var(--brand-light-tint);
}

.health-toc a,
.health-cta .health-allergens,
.health-cta div a:nth-child(2),
fieldset[aria-describedby="allergen-filter-help"] legend,
main:has(#allergen-filter-help) :is(section h3, fieldset + button) {
  color: var(--brand-action);
}

.health-cta div a:nth-child(2) {
  border-color: var(--brand-action);
}

.health-toc a:hover,
.health-cta :is(.health-allergens, div a:nth-child(2)):hover {
  color: var(--brand-action-hover);
}

.health-cta div a:nth-child(2):hover {
  background-color: var(--brand-selected-tint);
}

fieldset[aria-describedby="allergen-filter-help"] input[type="checkbox"] {
  accent-color: var(--brand-action);
}

fieldset[aria-describedby="allergen-filter-help"] label:has(input:checked) {
  background-color: var(--brand-selected-tint);
  border-color: var(--brand-action);
}

:is(.health-toc, .health-cta) a:focus-visible,
main:has(#allergen-filter-help) :is(input, select, fieldset + button):focus-visible {
  outline: 2px solid var(--brand-action);
  outline-offset: 2px;
}
