/* Paratope cursors (Justin, Dec 5): A's squared arrow everywhere, B's
   viewfinder over anything you can click, A's squared I-beam in text fields.
   Black over light areas; white over black ones: cursor.js looks at what is
   under the pointer and sets html[data-cursor="dark"] while it is over a
   black section (or a photo or video), so the colour changes on the fly.
   Without the script the black set stays, each with a white edge that keeps
   it readable on black. Computers only: touch screens have no cursor.
   !important beats the inline cursor:pointer the exported pages use.
   Hotspots: arrow tip 4,3; viewfinder and I-beam centre 16,16. */
@media (hover: hover) and (pointer: fine) {
  html, body { cursor: url("/assets/cursor/arrow-black.svg") 4 3, auto; }
  a[href],
  button:not(:disabled),
  summary,
  select,
  label[for],
  label:has(> input),
  input[type="checkbox"],
  input[type="radio"],
  input[type="submit"],
  input[type="button"],
  input[type="file"],
  [role="button"],
  [role="link"],
  [role="tab"],
  [role="switch"],
  [style*="cursor:pointer"],
  [style*="cursor: pointer"] {
    cursor: url("/assets/cursor/viewfinder-black.svg") 16 16, pointer !important;
  }
  input:not([type]),
  input[type="text"],
  input[type="email"],
  input[type="url"],
  input[type="search"],
  input[type="password"],
  input[type="tel"],
  input[type="number"],
  textarea,
  [contenteditable="true"] {
    cursor: url("/assets/cursor/text-black.svg") 16 16, text !important;
  }
  html[data-cursor="dark"], html[data-cursor="dark"] body { cursor: url("/assets/cursor/arrow-white.svg") 4 3, auto; }
  html[data-cursor="dark"] a[href],
  html[data-cursor="dark"] button:not(:disabled),
  html[data-cursor="dark"] summary,
  html[data-cursor="dark"] select,
  html[data-cursor="dark"] label[for],
  html[data-cursor="dark"] label:has(> input),
  html[data-cursor="dark"] input[type="checkbox"],
  html[data-cursor="dark"] input[type="radio"],
  html[data-cursor="dark"] input[type="submit"],
  html[data-cursor="dark"] input[type="button"],
  html[data-cursor="dark"] input[type="file"],
  html[data-cursor="dark"] [role="button"],
  html[data-cursor="dark"] [role="link"],
  html[data-cursor="dark"] [role="tab"],
  html[data-cursor="dark"] [role="switch"],
  html[data-cursor="dark"] [style*="cursor:pointer"],
  html[data-cursor="dark"] [style*="cursor: pointer"] {
    cursor: url("/assets/cursor/viewfinder-white.svg") 16 16, pointer !important;
  }
  html[data-cursor="dark"] input:not([type]),
  html[data-cursor="dark"] input[type="text"],
  html[data-cursor="dark"] input[type="email"],
  html[data-cursor="dark"] input[type="url"],
  html[data-cursor="dark"] input[type="search"],
  html[data-cursor="dark"] input[type="password"],
  html[data-cursor="dark"] input[type="tel"],
  html[data-cursor="dark"] input[type="number"],
  html[data-cursor="dark"] textarea,
  html[data-cursor="dark"] [contenteditable="true"] {
    cursor: url("/assets/cursor/text-white.svg") 16 16, text !important;
  }
}
