/*
 * Skip link. Fixed and clipped until focused so it takes no space and
 * does not catch clicks. Colors match each layout's existing palette.
 */

body a.skip-link {
	position: fixed;
	top: max(0.75rem, env(safe-area-inset-top, 0px));
	left: max(0.75rem, env(safe-area-inset-left, 0px));
	z-index: 100;
	box-sizing: border-box;
	display: block;
	width: 1px;
	height: 1px;
	margin: 0;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	border: 0;
	background: #f4f1ea;
	color: #1a1a1a;
	font-family: Atkinson, system-ui, sans-serif;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: normal;
	text-decoration: none;
	white-space: nowrap;
	pointer-events: none;
	transition: none;
}

body a.skip-link:focus,
body a.skip-link:focus-visible {
	width: auto;
	height: auto;
	padding: 0.75rem 1rem;
	overflow: visible;
	clip: auto;
	clip-path: none;
	pointer-events: auto;
	outline: 2px solid #1a1a1a;
	outline-offset: 3px;
}

/* Arcade, Swarm Breaker, and Age of Pokémon. Panel, ink, and focus yellow. */
body.has-arcade a.skip-link {
	background: #1a1433;
	color: #f4f1ff;
}

body.has-arcade a.skip-link:focus,
body.has-arcade a.skip-link:focus-visible {
	outline: 3px solid #ffd23f;
	outline-offset: 3px;
}

#main:focus {
	outline: none;
}

@media (prefers-reduced-motion: reduce) {
	body a.skip-link {
		transition: none;
	}
}
