
// Responsive utilities — shared across all pages
function useW() {
  const [w, setW] = React.useState(window.innerWidth);
  React.useEffect(() => {
    const h = () => setW(window.innerWidth);
    window.addEventListener('resize', h);
    return () => window.removeEventListener('resize', h);
  }, []);
  return w;
}

// Returns responsive grid columns string
function cols(desktop, tablet, mobile, w) {
  if (w < 600) return mobile;
  if (w < 960) return tablet;
  return desktop;
}

Object.assign(window, { useW, cols });
