/* Base: reset, type and utilities. */

/*
 * WordPress adds a 24px gap above every block inside a group. The designs set
 * their own spacing section by section, so that gap is switched off here.
 * These sit first and carry no extra weight, so any class below can still set
 * a margin.
 */
:root :where(.is-layout-flow, .is-layout-constrained) > * {
	margin-block-start: 0;
	margin-block-end: 0;
}

:where(.te-blocks) :where(p, h1, h2, h3, h4, figure, ul, ol, blockquote) {
	margin: 0;
}

:where(.te-blocks) :where(h1, h2, h3, h4) {
	font-family: var(--hf);
	font-weight: var(--hw);
	letter-spacing: var(--ht);
	text-wrap: balance;
}

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

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

body {
	margin: 0;
	background: var(--te-warm-white);
	color: var(--te-text);
	font-family: var(--te-font);
	font-size: 16px;
	line-height: 24px;
	-webkit-font-smoothing: antialiased;
}

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

img {
	height: auto;
}

a {
	color: inherit;
	text-underline-offset: 0.2em;
	text-decoration-thickness: 1px;
}

address {
	font-style: normal;
}

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

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

[id] {
	scroll-margin-top: var(--te-header-offset);
}

main:focus {
	outline: none;
}

[hidden] {
	display: none !important;
}

/* Visually hidden, still read by screen readers. */
.vh {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.te-skip {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 100;
	padding: 12px 18px;
	border-radius: var(--r-s);
	background: var(--te-meteorite);
	color: var(--te-on-dark);
	transform: translateY(-200%);
}

.te-skip:focus {
	transform: none;
}

/* Headings */
.v-h {
	font-family: var(--hf);
	font-weight: var(--hw);
	letter-spacing: var(--ht);
	text-wrap: balance;
}

.te-h1 {
	margin: 0;
	font-size: clamp(48px, 5.4vw, 80px);
	line-height: 0.98;
}

.te-h2 {
	margin: 18px 0 0;
	font-size: clamp(36px, 3.8vw, 52px);
	line-height: 1;
}

/* The small heading above a title, and on cards, panels and the footer. */
.te-small-heading {
	display: block;
	margin: 0;
	font-size: 20px;
	line-height: 26px;
	font-weight: 500;
}

/* Sections */
.v-sec {
	padding: var(--te-section) var(--te-gutter);
}

.te-sechead {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 16px 24px;
	margin: 0 0 28px;
}

.te-sechead--baseline {
	align-items: baseline;
	gap: 8px 24px;
}

.te-sechead--tight {
	margin-bottom: 20px;
}

.te-sechead .te-h2 {
	margin-top: 18px;
}

.te-btnrow {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.te-btnrow--tight {
	gap: 8px;
	margin-top: 24px;
}

.te-events__all {
	margin-top: 28px;
}

.te-orrery__cta {
	margin-top: 28px;
}

/* Card grids: three or four across, a swipeable rail on phones. */
.te-cardgrid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.te-cardgrid > li {
	display: flex;
}

.m-only {
	display: none !important;
}

/* Text pages */
.te-prose-wrap {
	background: var(--te-warm-white);
}

.te-prose {
	max-width: 720px;
	font-size: 17px;
	line-height: 28px;
}

.te-prose > :first-child {
	margin-top: 0;
}

.te-prose h2 {
	margin: 44px 0 0;
	font-family: var(--hf);
	font-weight: var(--hw);
	letter-spacing: var(--ht);
	font-size: 32px;
	line-height: 36px;
}

.te-prose h3 {
	margin: 28px 0 0;
	font-family: var(--hf);
	font-weight: var(--hw);
	letter-spacing: var(--ht);
	font-size: 21px;
	line-height: 26px;
}

.te-prose p,
.te-prose ul,
.te-prose ol {
	margin: 16px 0 0;
}

.te-prose li::marker {
	color: var(--te-orange-text);
}

.te-postlist {
	max-width: 720px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.te-postlist li {
	padding: 24px 0;
	border-top: 1px solid var(--te-rule);
}

.te-postlist h2 {
	margin: 8px 0 0;
	font-size: 24px;
	line-height: 28px;
}

.te-postlist .te-small-heading {
	color: var(--te-text-3);
}

.te-admin-note {
	margin: 12px 0 0;
	padding: 10px 14px;
	border-radius: var(--r-s);
	background: var(--te-white);
	color: var(--te-text);
	font-size: 14px;
	line-height: 20px;
}

@media (max-width: 600px) {
	.m-hide {
		display: none !important;
	}

	.m-only {
		display: inline-flex !important;
	}

	/* Rails: swipe sideways, one card and a bit showing. */
	.m-rail {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: 80%;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding: 0 var(--te-gutter);
		margin: 0 calc(var(--te-gutter) * -1);
		padding: 0 var(--te-gutter) 10px;
		gap: 12px;
		scrollbar-width: none;
	}

	.m-rail > * {
		scroll-snap-align: start;
		min-width: 0;
	}
}

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

/* Show a block on phones only, or everywhere but phones. Used for the two hero announcements. */
.te-phone-only {
	display: none !important;
}

@media (max-width: 600px) {
	.te-phone-only {
		display: inline-flex !important;
	}

	.te-not-phone {
		display: none !important;
	}
}
