/*
 * Base — resets and default styling for plain HTML elements (body, headings,
 * links, code). No component classes here; those live in their own files.
 */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background-color: var(--bg);
	color: var(--text-body);
	font-family: var(--font-sans);
	font-size: var(--text-md);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
	color: var(--text);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }

a {
	color: var(--accent);
	text-decoration: none;
	transition: color var(--transition);
}

a:hover {
	color: var(--text);
}

code,
pre {
	font-family: var(--font-mono);
	font-size: 0.9em;
}

::selection {
	background: var(--accent-glow);
	color: var(--text);
}

/* Visible focus ring for keyboard users, in the accent color */
:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/*
 * The hidden attribute always hides — even when a component's own CSS sets display: flex or grid,
 * which would otherwise override the browser's built-in [hidden] rule and keep it visible.
 */
[hidden] {
	display: none !important;
}

/* Utility: text only screen readers see */
.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.muted {
	color: var(--text-muted);
}

.mono {
	font-family: var(--font-mono);
}
