/**
 * Overdrive mobile experience + RPM layer — V3.4.
 *
 * This file never hides, shrinks or removes an ad. It improves the space around
 * the existing inventory, keeps publisher controls clear of a measured anchor
 * and gives the article a faster, calmer phone layout.
 */

@media (max-width: 767px) {
	:root {
		--pad: max(16px, env(safe-area-inset-left), env(safe-area-inset-right));
	}

	html {
		scroll-padding-block-start: calc(var(--go-header-compact-height, 54px) + 12px);
		scroll-padding-block-end: calc(var(--go-bottom-anchor-space, 0px) + env(safe-area-inset-bottom, 0px) + 16px);
	}

	body.go-verge {
		-webkit-tap-highlight-color: rgba(216, 255, 56, .16);
		text-size-adjust: 100%;
	}

	body.go-verge :is(a, button, summary, input, select, textarea) {
		touch-action: manipulation;
	}

	body.single-post .go-article {
		padding-block: 18px 50px;
	}

	body.single-post .go-article__breadcrumb-strip--prehero {
		margin-bottom: 14px !important;
	}

	body.single-post .go-article__title {
		max-width: none;
		font-size: clamp(2rem, 8.45vw, 2.5rem);
		line-height: 1.045;
		letter-spacing: -.035em;
		text-wrap: balance;
	}

	body.single-post .go-article__deck {
		margin-top: 12px;
		font-size: clamp(1.03rem, 4.3vw, 1.12rem);
		line-height: 1.5;
		text-wrap: pretty;
	}

	body.single-post .go-article__hero {
		margin-top: 18px;
	}

	body.single-post .go-article__posthero-bar.go-article__posthero-bar--reader-tools {
		padding-block: 10px 12px !important;
	}

	body.single-post .go-article__meta--below-hero {
		line-height: 1.45;
	}

	body.single-post .go-article-layout {
		margin-top: 18px !important;
	}

	body.single-post .go-article__content {
		font-size: clamp(1.075rem, 4.55vw, 1.16rem);
		line-height: 1.72;
		letter-spacing: 0;
	}

	body.single-post .go-article__content > :is(p, ul, ol) {
		margin-block-end: 1.38em;
	}

	body.single-post .go-article__content :is(h2, h3, h4, [id]) {
		scroll-margin-block-start: calc(var(--go-header-compact-height, 54px) + 14px);
	}

	/* The visual stays compact; the real coarse-pointer target is at least 44px. */
	body.single-post .go-article__posthero-bar--reader-tools :is(
		.go-share-more__toggle--label,
		.go-save-button,
		[data-go-save],
		.go-article-audio__play,
		.go-article-audio__secondary,
		select
	) {
		min-height: 44px !important;
	}

	body.single-post .go-share-more__menu :is(a, button) {
		min-height: 44px;
	}

	/* The reading shortcut is a publisher control, so it clears either anchor. */
	body.go-has-bottom-anchor.single-post .go-reading-top {
		bottom: var(--go-bottom-anchor-control) !important;
		inset-block-end: var(--go-bottom-anchor-control) !important;
	}

	body.go-verge :is(input, select, textarea) {
		font-size: max(1rem, 16px);
	}

	body.go-verge :is(.go-table-scroll, .wp-block-table) {
		scrollbar-gutter: stable;
		overscroll-behavior-inline: contain;
		-webkit-overflow-scrolling: touch;
	}

	body.home.go-verge .go-section,
	body.home.go-verge .go-home-section {
		padding-block: clamp(34px, 9vw, 44px);
	}
}

@media (max-width: 380px) {
	body.single-post .go-article__title {
		font-size: clamp(1.92rem, 8.6vw, 2.16rem);
	}

	body.single-post .go-article__deck {
		font-size: 1.02rem;
	}
}

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

@media print {
	body.go-has-bottom-anchor.single-post .go-reading-top {
		display: none !important;
	}
}
