/* Native SVG cursors use the site's palette without a pointer-following effect. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) and (forced-colors: none) {
  body {
    cursor: url("../images/cursor-default.svg") 3 3, auto;
  }

  /* Retain the familiar text caret wherever the page presents selectable copy. */
  body :where(p, h1, h2, h3, h4, h5, h6, li, dt, dd, blockquote, figcaption, label, pre, code, td, th),
  body :where([contenteditable=""], [contenteditable="true"], [contenteditable="plaintext-only"]) {
    cursor: text;
  }

  /* Include descendants so a label or a heading inside a link remains clickable. */
  body :is(a[href], button, summary, [role="button"], [role="link"]):not(:disabled):not([aria-disabled="true"]),
  body :is(a[href], button, summary, [role="button"], [role="link"]):not(:disabled):not([aria-disabled="true"]) * {
    cursor: url("../images/cursor-pointer.svg") 11 3, pointer;
  }

  /* Let native widgets keep their selection, caret and resize cursor behavior. */
  body :is(input, textarea, select),
  body :is(input, textarea, select) *,
  body :is([contenteditable=""], [contenteditable="true"], [contenteditable="plaintext-only"]) * {
    cursor: auto;
  }

  body :is(:disabled, [aria-disabled="true"]),
  body :is(:disabled, [aria-disabled="true"]) * {
    cursor: not-allowed;
  }

  body [draggable="true"],
  body [draggable="true"] * {
    cursor: grab;
  }

  body [draggable="true"]:active,
  body [draggable="true"]:active * {
    cursor: grabbing;
  }
}
