/* ==========================================================================
   2 · BASE — plain HTML elements. Article text from the editor needs no classes.
   ========================================================================== */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 6rem; /* menu jumps stop below the sticky header */
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: var(--font-sans);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
	margin: 0;
	color: var(--heading);
	font-family: var(--font-serif);
	font-weight: 500;
	line-height: var(--lh-tight);
	text-wrap: balance;
}

h1 { font-size: var(--fs-hero); line-height: 1.04; letter-spacing: -0.01em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.2; }
h4 { font-size: var(--fs-feature); line-height: var(--lh-snug); }

/* One word of a headline in teal italic: wrap it in <em> (editors type *word*). */
:is(h1, h2, h3) em {
	color: var(--accent);
	font-style: italic;
}

p,
ul,
ol,
blockquote,
figure {
	margin: 0;
}

p { text-wrap: pretty; }

a {
	color: var(--link);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
	transition: color 0.15s var(--ease);
}
a:hover { color: var(--accent); text-decoration-thickness: 2px; }

strong, b { font-weight: 700; }

img,
svg,
video,
iframe {
	display: block;
	max-width: 100%;
	height: auto;
}

:focus-visible {
	outline: none;
	box-shadow: var(--focus-ring);
	border-radius: 4px;
}

::selection {
	background: var(--aqua);
	color: var(--navy);
}

/* Accessibility helpers */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 1000;
	width: auto;
	height: auto;
	clip: auto;
	padding: 0.75rem 1.25rem;
	background: var(--white);
	color: var(--navy);
	border-radius: var(--radius-pill);
	box-shadow: var(--shadow-lift);
}

@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;
	}
}
