Fix _layout stylesheet conditions, simplify logic and relative paths