.tmi-page,
.tmi-page * {
	box-sizing: border-box;
}

.tmi-page {
	max-width: none !important;
	/* clip (not hidden) prevents horizontal overflow from full-bleed sections
	   WITHOUT establishing a scroll container — so scroll-driven view()
	   reveals measure against the viewport, not this element. */
	overflow-x: clip;
	background: var(--tmi-white);
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.wp-site-blocks > .tmi-page,
.tmi-page > * {
	width: 100% !important;
	max-width: none !important;
	margin-block-start: 0 !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.tmi-page > .alignfull,
.tmi-page .alignfull {
	width: 100% !important;
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.tmi-page .wp-block-template-part,
.tmi-page .acf-block-preview {
	max-width: none !important;
}

.tmi-section {
	padding: 56px;
}

.tmi-pattern {
	background-color: var(--tmi-dark-200);
	background-image: url("../images/figma/background-1.webp");
	background-repeat: repeat;
	background-size: 100% auto;
	background-position: center top;
}

.tmi-section-heading {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	text-align: center;
}

.tmi-section-heading img {
	width: 166px;
	height: auto;
}

.tmi-card {
	background: var(--tmi-white);
	box-shadow: var(--tmi-card-shadow);
	overflow: hidden;
}

.tmi-card.is-dark {
	background: var(--tmi-dark);
	color: var(--tmi-white);
}

.tmi-card-link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.tmi-card-image {
	position: relative;
	height: 240px;
	overflow: hidden;
}

.tmi-card.is-featured .tmi-card-image {
	height: 400px;
}

/* Images whose parent has a fixed height fill it. The find-out-more cards own
   their image sizing in their own stylesheet (their card height is content-
   based, so height:100% here would collapse to natural aspect). */
.tmi-card-image img,
.tmi-avatar img,
.tmi-contributor-avatar img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tmi-card-date {
	position: absolute;
	top: 16px;
	right: 16px;
	padding: 12px 16px;
	border-radius: 8px;
	background: rgba(9, 11, 12, 0.55);
	color: var(--tmi-white);
}

.tmi-card-body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	gap: 24px;
	padding: 24px;
	min-height: 216px;
}

.tmi-card.is-large .tmi-card-body {
	padding: 40px;
	min-height: 245px;
}

.tmi-card.is-featured .tmi-card-body {
	align-items: center;
	text-align: center;
}

.tmi-card-kicker {
	color: var(--tmi-muted);
}

.tmi-card.is-dark .tmi-card-kicker,
.tmi-card.is-dark .tmi-card-excerpt,
.tmi-card.is-dark .tmi-publisher-label {
	color: var(--tmi-dark-400);
}

.tmi-card-title {
	margin: 0;
	color: inherit;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.tmi-card-excerpt {
	margin: 0;
	color: var(--tmi-muted);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.tmi-publisher {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
}

.tmi-card.is-featured .tmi-publisher {
	justify-content: center;
}

.tmi-avatar,
.tmi-avatar-fallback {
	width: 40px;
	height: 40px;
	border: 1px solid var(--tmi-dark-100);
	border-radius: 999px;
	overflow: hidden;
	flex: 0 0 auto;
}

.tmi-avatar-fallback {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--tmi-dark-400);
	color: var(--tmi-dark);
}

.tmi-publisher-text {
	display: flex;
	flex-direction: column;
	color: var(--tmi-dark);
}

.tmi-card.is-dark .tmi-publisher-text {
	color: var(--tmi-white);
}

.tmi-publisher-label {
	color: var(--tmi-muted);
	font-size: 12px;
	letter-spacing: -0.04em;
	line-height: 1.35;
}

.tmi-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 12px 24px;
	background: var(--tmi-dark);
	color: var(--tmi-white);
	text-decoration: none;
	border: 0;
	cursor: pointer;
}

.tmi-button img {
	width: 22px;
	height: 22px;
}

.tmi-logo {
	display: inline-flex;
	line-height: 0;
	text-decoration: none;
}

.tmi-logo-img {
	display: block;
	width: 200px;
	height: auto;
}

.tmi-logo.is-footer .tmi-logo-img {
	width: 240px;
}

@media (max-width: 1100px) {
	.tmi-section {
		padding: 40px 24px;
	}
}

@media (max-width: 700px) {
	.tmi-section {
		padding: 32px 18px;
	}

	.tmi-card.is-featured .tmi-card-image,
	.tmi-card.is-large .tmi-card-image,
	.tmi-card-image {
		height: 220px;
	}

	.tmi-card-body,
	.tmi-card.is-large .tmi-card-body {
		padding: 24px;
	}

	.tmi-logo-img {
		width: 150px;
	}

	.tmi-logo.is-footer .tmi-logo-img {
		width: 200px;
	}
}
