/* Public pages and intro previews use the filled cursor. */
.kg-cursor {
	--kg-cursor-loaded: 1;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 2147483646;
	display: none;
	width: 0;
	height: 0;
	color: var(--kg-color-red, #b72b30);
	pointer-events: none;
}

.kg-cursor,
.kg-cursor * {
	box-sizing: border-box;
	pointer-events: none;
}

.kg-cursor[hidden] { display: none; }

.kg-cursor__ring,
.kg-cursor__dot {
	position: absolute;
	top: 0;
	left: 0;
	border-radius: 50%;
	transform: translate(-50%, -50%);
}

.kg-cursor__ring {
	width: 24px;
	height: 24px;
	border: 2px solid currentColor;
	/* A narrow light edge keeps the red visible on dark or red photographs. */
	box-shadow: 0 0 0 1px rgb(255 255 255 / .65), inset 0 0 0 1px rgb(255 255 255 / .4);
	transition: width 220ms ease-out, height 220ms ease-out, background-color 220ms ease-out;
}

.kg-cursor-trail .kg-cursor__dot { display: none; }

.kg-cursor-fill .kg-cursor__ring {
	display: none;
}

.kg-cursor-fill .kg-cursor__dot {
	width: 14px;
	height: 14px;
	background: currentColor;
	opacity: 1;
	transition: width 220ms ease-out, height 220ms ease-out, opacity 220ms ease-out;
}

.kg-cursor-fill .kg-cursor.is-hover .kg-cursor__dot {
	width: 20px;
	height: 20px;
	opacity: .65;
}

.kg-cursor-trail .kg-cursor.is-hover .kg-cursor__ring {
	width: 46px;
	height: 46px;
	background: color-mix(in srgb, currentColor 9%, transparent);
}

.kg-cursor-stamp .kg-cursor__dot {
	width: 12px;
	height: 12px;
	background: currentColor;
	box-shadow: 0 0 0 1px rgb(255 255 255 / .75);
}

.kg-cursor-stamp .kg-cursor__ring {
	width: 28px;
	height: 28px;
}

.kg-cursor-stamp .kg-cursor.is-hover .kg-cursor__ring {
	width: 48px;
	height: 48px;
	background: color-mix(in srgb, currentColor 9%, transparent);
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
	:is(.kg-cursor-fill, .kg-cursor-trail, .kg-cursor-stamp).kg-cursor-active > .kg-cursor { display: block; }
	/* This class exists only after JS has drawn a valid, visible replacement. */
	body.kg-cursor-stamp.kg-cursor-active,
	body.kg-cursor-stamp.kg-cursor-active * { cursor: none; }
	body.kg-cursor-stamp.kg-cursor-active :is(input, textarea, [contenteditable]:not([contenteditable="false"]), [role="textbox"]) { cursor: text; }
	body.kg-cursor-stamp.kg-cursor-active :is(select, option, label) { cursor: auto; }
}
