/* ==========================================================================
   02-base.css — default look of plain HTML elements.
   Selectors use :where() so they have ZERO specificity: any component or page
   rule overrides them without a fight.
   ========================================================================== */

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

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

body {
	background: var(--dba-canvas);
	color: var(--dba-ink);
	font-family: var(--dba-font-body);
	font-size: var(--dba-text-base);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

:where(strong, b) {
	font-weight: 600; /* 600 reads better than 700 for sub-headings and labels */
}

:where(h1, h2, h3, h4, h5, h6) {
	font-family: var(--dba-font-display);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

:where(h1) { font-size: var(--dba-text-xxxl); }
:where(h2) { font-size: var(--dba-text-xxl); }
:where(h3) { font-size: var(--dba-text-xl); }
:where(h4) { font-size: var(--dba-text-lg); }

:where(p) {
	text-wrap: pretty;
}

:where(a) {
	color: inherit;
	text-underline-offset: 0.2em;
}

:where(a:hover) {
	color: var(--dba-accent);
}

:where(hr) {
	border: 0;
	border-top: 1px solid var(--dba-line);
}

:focus-visible {
	outline: 2px solid var(--dba-accent);
	outline-offset: 3px;
}

::selection {
	background: var(--dba-accent);
	color: var(--dba-accent-ink);
}

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

.skip-link:focus {
	position: fixed !important;
	top: var(--dba-space-xs);
	left: var(--dba-space-xs);
	z-index: var(--dba-z-toast);
	width: auto;
	height: auto;
	margin: 0;
	padding: var(--dba-space-xs) var(--dba-space-s);
	clip-path: none;
	background: var(--dba-surface);
	color: var(--dba-ink);
	border-radius: var(--dba-radius-s);
	box-shadow: var(--dba-shadow-m);
}
