Reading this maze
Two-key courtyard starts at row 1, column 7. Of the 42 grid positions, 33 are paintable and 9 are walls. The start is already painted; the other 32 tiles remain to be reached.
Diamond A at row 2, column 6 toggles the gate marked A. Diamond B at row 1, column 5 toggles the gate marked B. Start down and stop at row 2, column 7. A and B keep independent states; a diamond only changes its matching letter. The first slide covers 2 of 33 target tiles.
The verified opening crosses 1 tiles before stopping. A breadth-first search proves a 25-slide finish from this exact starting board; that is a reference target, not a move limit. You may revisit any painted tile.
Diamonds A and B control separate gate groups. Each letter toggles only its matching barred gate; the other group keeps its current state. Changes take effect during the same slide. Undo restores both groups, and Hint searches from both gate states and the painted floor.