﻿/**
 * Reset, typography and utilities.
 */

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

/* The browser's own [hidden] rule is a UA style, so any author `display` on the
   same element beats it — a .pl-grid or a flex panel stays on screen with the
   attribute set. Scripts here toggle `el.hidden`, so that has to hold. */
[hidden] { display: none !important; }

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	/* Sticky header must not cover anchored headings. */
	scroll-padding-top: calc(var(--pl-header-h) + 1rem);
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}

body {
	margin: 0;
	background: var(--pl-bg-white);
	color: var(--pl-text-primary);
	font-family: var(--pl-font-sans);
	font-size: var(--pl-fs-body);
	line-height: var(--pl-lh-body);
	-webkit-font-smoothing: antialiased;
	/* Nothing may scroll sideways at any width. */
	overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0;
	font-weight: 700;
	line-height: var(--pl-lh-tight);
	letter-spacing: var(--pl-track-tight);
	color: var(--pl-text-primary);
	text-wrap: balance;
}

p { margin: 0; }
p + p { margin-top: 0.75em; }

ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

a {
	color: inherit;
	text-decoration: none;
	transition: color var(--pl-dur-fast) var(--pl-ease);
}

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

button, input, select, textarea {
	font: inherit;
	color: inherit;
}

button { cursor: pointer; background: none; border: 0; padding: 0; }

/* Visible, consistent focus for keyboard users only. */
:focus-visible {
	outline: 2px solid var(--pl-primary-ink);
	outline-offset: 2px;
	border-radius: var(--pl-radius-sm);
}

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

.pl-skip-link {
	position: absolute;
	left: 50%;
	top: 0;
	transform: translate(-50%, -120%);
	z-index: var(--pl-z-modal);
	padding: 0.625rem 1.25rem;
	background: var(--pl-primary);
	color: var(--pl-on-primary);
	border-radius: 0 0 var(--pl-radius) var(--pl-radius);
	font-size: var(--pl-fs-sm);
	font-weight: 600;
	transition: transform var(--pl-dur) var(--pl-ease);
}

.pl-skip-link:focus { transform: translate(-50%, 0); }

/* ---- type helpers ---- */

.pl-eyebrow {
	margin: 0 0 0.375rem;
	font-size: var(--pl-fs-xs);
	font-weight: 700;
	letter-spacing: var(--pl-track-eyebrow);
	text-transform: uppercase;
	color: var(--pl-text-muted);
}

.pl-muted { color: var(--pl-text-muted); }
.pl-secondary { color: var(--pl-text-secondary); }

/* Clamp card copy to a fixed number of lines so grids stay aligned. */
.pl-clamp-1,
.pl-clamp-2,
.pl-clamp-3 {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.pl-clamp-1 { -webkit-line-clamp: 1; }
.pl-clamp-2 { -webkit-line-clamp: 2; }
.pl-clamp-3 { -webkit-line-clamp: 3; }
