/* Base: safe resets only (no layout rules on bare elements, see Pencilino guidance). */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 90px;
}

body {
	margin: 0;
	background: var(--tch-cream);
	color: var(--tch-olive-text);
	font-family: var(--tch-font-body);
	font-size: var(--tch-fs-body);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 0.5em;
	color: var(--tch-olive);
	font-family: var(--tch-font-heading);
	font-weight: 600;
	line-height: 1.15;
}

p {
	margin: 0 0 1em;
}

a {
	color: var(--tch-green-700);
}

a:hover {
	color: var(--tch-green-900);
}

img,
svg,
video {
	max-width: 100%;
	height: auto;
	vertical-align: middle;
}

blockquote {
	margin: 0;
}

:focus-visible {
	outline: 2px solid var(--tch-green-700);
	outline-offset: 3px;
}

::selection {
	background: var(--tch-accent);
	color: var(--tch-white);
}

.tch-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.tch-skip-link {
	position: absolute;
	left: 1rem;
	top: -100px;
	z-index: 1000;
	padding: .75rem 1rem;
	background: var(--tch-white);
	border-radius: var(--tch-radius);
}

.tch-skip-link:focus {
	top: 1rem;
}

/* Rich text output (Pencilino and post content) */
.pencil-richtext > :last-child,
.tch-prose > :last-child {
	margin-bottom: 0;
}

.pencil-richtext ul,
.pencil-richtext ol,
.tch-prose ul,
.tch-prose ol {
	margin: 0 0 1em;
	padding-left: 1.25em;
}

.pencil-richtext li,
.tch-prose li {
	margin-bottom: .4em;
}

.pencil-richtext li > p {
	margin: 0;
}

.pencil-richtext strong,
.pencil-richtext b {
	color: var(--tch-olive);
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
