@layer base {
	html {
		color-scheme: light dark;
		scroll-behavior: smooth;
	}

	body {
		background-color: var(--surface);
		font-family: var(--font-body);
		font-size: var(--font-size-body);
		line-height: 1.5;
		color: var(--text);
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
	}

	h1,
	h2,
	h3 {
		font-weight: 600;
		line-height: var(--leading-tight);
		color: var(--text-strong);
		text-wrap: balance;
	}

	h1,
	h2 {
		font-family: var(--font-display);
	}

	h1 {
		font-size: var(--font-size-title);
		letter-spacing: -0.02em;
	}

	h2 {
		font-size: var(--font-size-subtitle);
	}

	h3 {
		font-size: var(--font-size-heading);
	}

	a {
		color: inherit;
		text-decoration: none;
	}

	:focus-visible {
		outline: 2px solid var(--focus-ring);
		outline-offset: 2px;
	}

	code,
	kbd,
	samp,
	pre {
		font-family: var(--font-code);
		font-size: var(--font-size-small);
	}

	:where(input:not([type]), input[type="text"], input[type="search"], input[type="url"], input[type="email"], input[type="number"], select, textarea) {
		width: 100%;
		padding: var(--space-xs) var(--space-s);
		border: 1px solid var(--border-input);
		border-radius: var(--radius);
		background-color: var(--surface-raised);
		color: var(--text-strong);

		&[aria-invalid="true"] {
			border-color: var(--danger-fg);
		}
	}

	input[type="checkbox"] {
		accent-color: var(--accent);
	}

	table {
		width: 100%;
		border-collapse: collapse;
	}

	th {
		font-weight: 600;
		text-align: start;
	}

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

		*,
		*::before,
		*::after {
			animation-duration: 0.01ms !important;
			animation-iteration-count: 1 !important;
			transition-duration: 0.01ms !important;
		}
	}
}
