/* Base: reset, typography, links, focus, skip link, Hebrew, reduced motion. */

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

* {
	margin: 0;
	padding: 0;
}

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

body {
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-sans);
	font-size: 1rem;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.serif {
	font-family: var(--font-serif);
	font-weight: 500;
	line-height: 1.25;
}

img,
svg {
	max-width: 100%;
}

ul {
	list-style: none;
}

a {
	color: inherit;
}

/* Links inside running text are underlined so colour is never the only cue (WCAG 1.4.1). */
.entry-content a,
.skeleton-note a,
.site-main p a {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

/* Visible focus everywhere (WCAG 2.4.7). Light backgrounds use navy; dark areas override below. */
:focus-visible {
	outline: 2px solid var(--focus-light);
	outline-offset: 2px;
}

.site-header :focus-visible {
	outline-color: var(--focus-dark);
}

main:focus {
	outline: none; /* programmatic focus target of the skip link only */
}

/* Skip link: first focusable element, visible on focus. */
.skip-link {
	position: absolute;
	left: 8px;
	top: -100px;
	z-index: 1000;
	background: var(--navy-deep);
	color: var(--paper-raised);
	padding: 10px 16px;
	border-radius: var(--radius);
	font-weight: 600;
	text-decoration: underline;
}

.skip-link:focus {
	top: 8px;
	outline: 2px solid var(--focus-dark);
	outline-offset: 2px;
}

/* Hebrew runs: no italic (Hebrew has none), slightly more line height. */
[lang="he"] {
	font-style: normal;
	line-height: 1.6;
}

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

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
