/* Fonts, base typography and the browser surfaces we theme from the palette. */
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-display: swap;
	font-weight: 100 900;
	src: url("../../fonts/inter-latin-wght-normal.woff2") format("woff2-variations"), url("../../fonts/inter-latin-wght-normal.woff2") format("woff2");
}

html {
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 100%;
	scroll-padding-top: calc(var(--header-h) + 16px);
	overflow-x: clip;
	accent-color: var(--accent);
	scrollbar-color: var(--accent) var(--surface);
	scrollbar-width: thin;
}

body {
	min-height: 100dvh;
	font-size: var(--fs-body);
	font-weight: 400;
	line-height: 1.55;
	caret-color: var(--accent);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}

h1,
h2,
h3 {
	font-family: var(--font-display);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.15;
}

h1 {
	font-size: var(--fs-h1);
}

h2 {
	font-size: var(--fs-h2);
}

h3 {
	font-size: var(--fs-h3);
}

p {
	text-wrap: pretty;
}

.accent {
	color: var(--accent);
}

/* Browser surfaces */
::selection {
	background: var(--accent-tint);
	color: var(--ink);
}

a {
	text-underline-offset: 0.22em;
	text-decoration-thickness: 1px;
}

:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 3px;
	border-radius: 4px;
}

::-webkit-scrollbar {
	width: 12px;
	height: 12px;
}

::-webkit-scrollbar-track {
	background: var(--surface);
}

::-webkit-scrollbar-thumb {
	background: var(--accent);
	border-radius: var(--r-pill);
	border: 3px solid var(--surface);
}

::placeholder {
	color: var(--muted);
	opacity: 1;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: fixed;
	inset-block-start: 8px;
	inset-inline-start: 8px;
	z-index: 100;
	padding: 12px 20px;
	background: var(--ink);
	color: var(--on-dark);
	border-radius: var(--r-btn);
	font-weight: 600;
	text-decoration: none;
	transform: translateY(-200%);
	transition: transform var(--t-fast) var(--ease-out);
}

.skip-link:focus-visible {
	transform: none;
	outline-color: var(--accent-tint);
}

/* Long-form copy */
.prose {
	max-inline-size: 65ch;
}

.prose > * + * {
	margin-block-start: 1.1em;
}

.prose a {
	color: var(--accent);
}

.prose h2,
.prose h3 {
	margin-block-start: 1.6em;
}

.prose .actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm);
}

/* Fluid scale for large screens (2026-11-11). From 1600px wide the root size grows with the
   viewport, so every rem-based size (type, spacing, panels) scales up together:
   16px at 1600, about 18px at 1920, 22px at 2560 and beyond. */
@media (min-width: 1600px) {
	html {
		font-size: clamp(16px, calc(16px + (100vw - 1600px) * 0.00625), 22px);
	}
}
