/*
 * Reset "clean" do tema Douglas Taira.
 *
 * Tudo dentro de :where() tem especificidade zero, então os Common Styles
 * e as classes do CrocoBuilder sempre vencem. Cobre só o que os Common Styles
 * do site ainda não cobrem (html, *, body, img, h1–h6, p, a e campos já existem lá).
 */

:where(html) {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	hanging-punctuation: first last;
}

:where(*, *::before, *::after) {
	box-sizing: border-box;
}

:where(body) {
	margin: 0;
	min-height: 100vh;
}

/* Margens padrão do navegador */
:where(h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, figure, blockquote, pre, hr) {
	margin: 0;
}

:where(ul[role="list"], ol[role="list"], nav ul, nav ol) {
	list-style: none;
	padding: 0;
}

/* Texto */
:where(h1, h2, h3, h4, h5, h6) {
	text-wrap: balance;
	overflow-wrap: break-word;
}

:where(p, li, figcaption) {
	text-wrap: pretty;
	overflow-wrap: break-word;
}

:where(a:not([class])) {
	text-decoration-skip-ink: auto;
}

/* Mídia */
:where(img, picture, video, canvas, svg) {
	display: block;
	max-width: 100%;
}

:where(img, video) {
	height: auto;
}

/* Formulários e botões */
:where(input, button, textarea, select) {
	font: inherit;
	color: inherit;
	letter-spacing: inherit;
}

:where(button) {
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}

:where(button:disabled, [aria-disabled="true"]) {
	cursor: not-allowed;
}

:where(textarea) {
	resize: vertical;
}

/* Tabelas */
:where(table) {
	border-collapse: collapse;
	border-spacing: 0;
}

:where(hr) {
	border: 0;
	border-top: 1px solid currentColor;
	color: inherit;
}

/* Acessibilidade */
:where([hidden]:not([hidden="until-found"])) {
	display: none !important;
}

:where(:target) {
	scroll-margin-block: 5ex;
}

@media (prefers-reduced-motion: reduce) {
	:where(html) {
		scroll-behavior: auto;
	}

	:where(*, *::before, *::after) {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
