// Tiny enhancer for the Inversion cards: tap-to-flip on touch devices,
// keeps :hover behavior on desktops. Also wires the aria-pressed state
// for screen readers.
(function () {
  const cards = document.querySelectorAll(".iv-card");
  cards.forEach((c) => {
    c.addEventListener("click", () => {
      const flipped = c.classList.toggle("flipped");
      c.setAttribute("aria-pressed", flipped ? "true" : "false");
    });
  });
})();
