/* The same square is a usable CSS fallback until the canvas has painted. */
@media (hover: hover) and (pointer: fine) {
  html, html *, html *::before, html *::after, html dialog::backdrop {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9' viewBox='0 0 9 9'%3E%3Cpath fill='%238345d8' d='M0 0h9v9H0z'/%3E%3C/svg%3E") 4 4, auto !important;
  }
  /* Meaningful native fallbacks also work before JavaScript or without canvas. */
  html :where(a[href], area[href], button, summary, [role="button"], [role="link"], [role="menuitem"], [role="tab"], [role="checkbox"], [role="radio"], [role="switch"], [role="option"]),
  html :where(a[href], button, summary, [role="button"], [role="link"], [role="menuitem"], [role="tab"], [role="checkbox"], [role="radio"], [role="switch"], [role="option"]) * { cursor: pointer !important; }
  html.site-cursor-active, html.site-cursor-active *,
  html.site-cursor-active *::before, html.site-cursor-active *::after,
  html.site-cursor-active dialog::backdrop { cursor: none !important; }
  html :is(input, select) { cursor: auto !important; }
  html :is(textarea, input:not([type]), input[type="text"], input[type="email"], input[type="search"], input[type="tel"], input[type="url"], input[type="password"], input[type="number"], [role="textbox"], [contenteditable]:not([contenteditable="false"])),
  html :is([role="textbox"], [contenteditable]:not([contenteditable="false"])) * { cursor: text !important; }
  html :is(input[type="button"], input[type="submit"], input[type="reset"], input[type="checkbox"], input[type="radio"], input[type="file"], select) { cursor: pointer !important; }
  html :is(:disabled, [aria-disabled="true"]), html :is(:disabled, [aria-disabled="true"]) * { cursor: not-allowed !important; }
}
/* The existing tender-work pointer now replaces the desktop native cursor. */
canvas.site-cursor {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  pointer-events: none;
  user-select: none;
}
canvas.site-cursor[hidden] { display: none; }
@media (hover: none), (pointer: coarse) {
  canvas.site-cursor { display: none; }
}
