The problem was that stylesheets were being transcluded in inline mode
(rather than block mode), which meant that triple backticks were not
being interpreted as block mode markup, but rather as a series of
single backticks.
Move the CSS macros into global macros, and allow the colour macro to
fallback to the vanilla palette if the required colour isn’t found in
the current palette.
By rearranging the `[all[]]` operator we are able to ensure that shadow
tiddlers get processed before ordinary tiddlers. This makes it easier
to create custom stylesheets that override the core.