/* Keep the text pointer independent of the Windows/browser pointer palette.
   Do not replace button, select, resize, drag or disabled-control cursors. */
:root {
  --flow-text-caret: #111111;
  --flow-text-pointer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M9 5h6M12 5v14M9 19h6' fill='none' stroke='%23ffffff' stroke-width='3'/%3E%3Cpath d='M9 5h6M12 5v14M9 19h6' fill='none' stroke='%23111111' stroke-width='1.5'/%3E%3C/svg%3E") 12 12, text;
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --flow-text-caret: #f3f4f6;
  --flow-text-pointer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M9 5h6M12 5v14M9 19h6' fill='none' stroke='%23111111' stroke-width='3'/%3E%3Cpath d='M9 5h6M12 5v14M9 19h6' fill='none' stroke='%23f3f4f6' stroke-width='1.5'/%3E%3C/svg%3E") 12 12, text;
}

html :is(
  input:not([type]), input[type="text"], input[type="search"],
  input[type="email"], input[type="password"], input[type="tel"],
  input[type="url"], input[type="number"], textarea,
  [contenteditable=""], [contenteditable="true"], [contenteditable="plaintext-only"]
):not(:disabled) {
  cursor: var(--flow-text-pointer);
  caret-color: var(--flow-text-caret);
}

/* Respect the user's high-contrast/accessibility cursor in forced-colors mode. */
@media (forced-colors: active) {
  :root, :root[data-theme] { --flow-text-pointer: text; --flow-text-caret: auto; }
}
