javascript:(function(){
	if (window.__imageAuditOverlay) {
		window.__imageAuditOverlay.remove();
		window.__imageAuditOverlay = null;
		return;
	}
	
	const overlay = document.createElement("div");
	overlay.style.position = "absolute";
	overlay.style.left = "0";
	overlay.style.top = "0";
	overlay.style.width = document.documentElement.scrollWidth + "px";
	overlay.style.height = document.documentElement.scrollHeight + "px";
	overlay.style.pointerEvents = "none";
	overlay.style.zIndex = "9999999";
	
	const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
	svg.style.position = "absolute";
	svg.style.left = "0";
	svg.style.top = "0";
	svg.style.width = "100%";
	svg.style.height = "100%";
	
	overlay.appendChild(svg);
	document.body.appendChild(overlay);
	window.__imageAuditOverlay = overlay;
	
	const elements = document.querySelectorAll('img, svg[role="img"], [role="img"]');
	elements.forEach(el => {
		const rect = el.getBoundingClientRect();
		const docLeft = rect.left + window.scrollX;
		const docTop = rect.top + window.scrollY;
		const alt = el.getAttribute("alt");
		const ariaLabel = el.getAttribute("aria-label");
		const labelledby = el.getAttribute("aria-labelledby");
		const ariaHidden = el.getAttribute("aria-hidden");
		const role = el.getAttribute("role");
		
		el.style.border = "2px dotted #e00";
		
		let status = "";
		let bg = "";
		
		if (ariaHidden === "true" || role === "presentation" || alt === "") {
			status = "";
			bg = "#fff3b0";
		} else if (alt || ariaLabel || labelledby) {
			status = "";
			bg = "#c8f7c5";
		} else {
			status = "НЕМАЄ ALT!";
			bg = "#ffb3b3";
		}
		
		const label = document.createElement("div");
		
		label.textContent =
			status +
			(alt !== null ? 'alt="' + alt + '"' : "") +
			(ariaLabel ? 'aria-label="' + ariaLabel + '"' : "") +
			(labelledby ? 'aria-labelledby="' + labelledby + '"' : "");
		
		label.style.position = "absolute";
		label.style.left = docLeft + "px";
		label.style.top = (docTop - 22) + "px";
		label.style.background = bg;
		label.style.color = "#000";
		label.style.fontSize = "14px";
		label.style.fontFamily = "monospace";
		label.style.fontWeight = "bold";
		label.style.padding = "3px 6px";
		label.style.border = "2px solid #e00";
		label.style.cursor = "move";
		label.style.pointerEvents = "auto";
		label.style.userSelect = "none";
		label.style.maxWidth = "500px";
		
		overlay.appendChild(label);
		
		const line = document.createElementNS("http://www.w3.org/2000/svg", "line");
		line.setAttribute("stroke", "#e00");
		line.setAttribute("stroke-dasharray", "4 4");
		line.setAttribute("stroke-width", "1");
		
		svg.appendChild(line);
		
		function updateLine() {
			const imgRect = el.getBoundingClientRect();
			const labelRect = label.getBoundingClientRect();

			const x1 = labelRect.left + labelRect.width / 2 + window.scrollX;
			const y1 = labelRect.bottom + window.scrollY;

			const x2 = imgRect.left + imgRect.width / 2 + window.scrollX;
			const y2 = imgRect.top + imgRect.height / 2 + window.scrollY;

			line.setAttribute("x1", x1);
			line.setAttribute("y1", y1);
			line.setAttribute("x2", x2);
			line.setAttribute("y2", y2);
		}
		
		updateLine();
		
		let dragging = false;
		let offsetX = 0;
		let offsetY = 0;
		
		label.addEventListener("mousedown", (e) => {
			const rect = label.getBoundingClientRect();
			const labelLeft = rect.left + window.scrollX;
			const labelTop = rect.top + window.scrollY;
			offsetX = e.pageX - labelLeft;
			offsetY = e.pageY - labelTop;
			dragging = true;
			e.preventDefault();
		});
		
		document.addEventListener("mousemove", (e) => {
			if (!dragging) return;
			const newLeft = e.pageX - offsetX;
			const newTop = e.pageY - offsetY;
			label.style.left = newLeft + "px";
			label.style.top = newTop + "px";
			updateLine();
		});
	
		document.addEventListener("mouseup", () => {
			dragging = false;
		});
	});
})();