/* Defaults for the three homepage patterns. Preset colors follow Global Styles. */
:where(.ug-home-section) {
	scroll-margin-top: 2rem;
}

:where(.ug-topics, .ug-news) {
	padding-block: clamp(2.75rem, 5.5vw, 5.5rem);
}

:where(.ug-section-kicker) {
	font-weight: 700;
	letter-spacing: .12em;
	line-height: 1.4;
	text-transform: uppercase;
}

:where(.ug-section-kicker) + .ug-section-heading {
	margin-block-start: .55rem;
}

:where(.ug-home-section) .ug-section-heading {
	line-height: 1.08;
	letter-spacing: -.042em;
}

.ug-topics :where(.ug-topic-grid) {
	gap: clamp(1rem, 1.6vw, 1.5rem);
	margin-block: clamp(1.45rem, 2.5vw, 2.2rem) 0;
}

.ug-topic-grid :where(.ug-topic-card) {
	border: 1px solid var(--wp--preset--color--line);
	padding: clamp(1.25rem, 2.2vw, 2.1rem);
}

.ug-topic-card :where(.ug-topic-icon) {
	margin: 0 0 1.35rem;
}

.ug-topic-card :where(.ug-topic-icon img) {
	box-sizing: border-box;
	display: block;
	width: 3.25rem;
	height: auto;
	border-radius: .65rem;
	padding: .6rem;
	background: var(--wp--preset--color--tint);
}

.ug-topic-card :where(.ug-topic-title) {
	line-height: 1.12;
	margin: 0;
	font-size: var(--wp--preset--font-size--large);
	letter-spacing: -.038em;
	hyphens: auto;
}

.ug-topic-card :where(.ug-topic-intro) {
	margin-block: .72rem 0;
	line-height: 1.55;
}

.ug-topic-card :where(.ug-topic-details) {
	margin-block: 1.15rem 0;
}

.ug-topic-details > :where(summary) {
	display: flex;
	align-items: center;
	gap: .55em;
	width: fit-content;
	min-height: 2.75rem;
	color: var(--wp--preset--color--accent);
	font-size: .9em;
	font-weight: 650;
	line-height: 1.35;
	list-style: none;
	cursor: pointer;
}

.ug-topic-details > summary::-webkit-details-marker {
	display: none;
}

.ug-topic-details > summary::after {
	content: '';
	width: .43em;
	height: .43em;
	flex: 0 0 .43em;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-.1em) rotate(45deg);
}

.ug-topic-details[open] > summary::after {
	transform: translateY(.15em) rotate(225deg);
}

.ug-topic-details > summary:hover, .ug-topic-details > summary:focus-visible {
	text-decoration: underline;
	text-underline-offset: .22em;
}

.ug-topic-details > summary:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: .12rem;
}

.ug-topic-details > :where(p) {
	margin-block: .55rem 0;
	line-height: 1.55;
}

.ug-news :where(.ug-news-query) {
	margin-block-start: clamp(1.5rem, 2.7vw, 2.4rem);
}

.ug-news-query :where(.wp-block-post-template) {
	margin: 0;
	padding: 0;
}

.ug-news-query :where(.wp-block-post-template > li) {
	margin-block: 0;
	border-top: 1px solid var(--wp--preset--color--line);
}

.ug-news-query :where(.wp-block-post-template > li:last-child) {
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.ug-news-query :where(.ug-news-row) {
	display: grid;
	grid-template-columns: minmax(8rem, 1fr) minmax(0, 3fr);
	gap: 1rem;
	align-items: baseline;
	padding-block: clamp(1.45rem, 2.5vw, 2.2rem);
}

.ug-news-row :where(.ug-news-story) {
	max-width: 46rem;
	margin: 0;
}

.ug-news-row :where(.wp-block-post-title) {
	margin: 0;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.14;
	letter-spacing: -.035em;
	overflow-wrap: anywhere;
}

.ug-news-row :where(.wp-block-post-title a) {
	color: inherit;
	text-decoration-thickness: 1px;
	text-decoration-color: var(--wp--preset--color--line);
	text-underline-offset: .14em;
}

.ug-news-row :where(.wp-block-post-title a:hover, .wp-block-post-title a:focus-visible) {
	color: var(--wp--preset--color--accent);
	text-decoration: underline;
}

.ug-news-row :where(.wp-block-post-excerpt) {
	margin-block-start: .5rem;
}

.ug-news-query :where(.wp-block-query-pagination) {
	margin-block-start: 1rem;
}

.ug-news-query :where(.wp-block-query-pagination a) {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
}

.ug-contact.wp-block-group.has-background {
	padding: clamp(1.55rem, 5vw, 4.5rem);
	margin-block: 0 clamp(2.5rem, 5vw, 5rem);
}

.ug-contact :where(.ug-section-heading) {
	max-width: 18em;
}

.ug-contact :where(p:not(.ug-section-kicker)) {
	max-width: 44rem;
}

.ug-contact :where(.wp-block-buttons) {
	margin-block-start: 1.55rem;
}

@media (max-width: 781px) {
	.ug-topic-grid :where(.ug-topic-card) {
		padding: 1.35rem;
	}

	.ug-topic-card :where(.ug-topic-icon) {
		margin-block-end: 1rem;
	}
}

@media (max-width: 580px) {
	.ug-news-query :where(.ug-news-row) {
		grid-template-columns: minmax(0, 1fr);
		gap: .45rem;
	}
}
