@media (max-width: 48rem) {

	.ds-site-header .ds-header-row {
		grid-template-columns: minmax(0, 1fr) auto;
		column-gap: var(--wp--preset--spacing--20);
		row-gap: 0;
		padding-block: var(--wp--preset--spacing--10);
		min-height: var(--wp--custom--header--height-mobile);
		padding-inline: var(--wp--custom--layout--edge-mobile);
	}

	.ds-language-switcher {
		grid-column: 2;
		grid-row: 1;
	}
	.ds-language-switcher__options { inset-inline-end: var(--wp--custom--layout--edge-mobile); }

	.ds-dateline {
		grid-column: 1 / -1;
		grid-row: 2;
		text-align: start;
		font-size: var(--wp--preset--font-size--micro) !important;
	}

	.ds-home-hero__inner {
		justify-content: flex-start;
		min-height: 0;
		padding: var(--wp--preset--spacing--60) var(--wp--custom--layout--edge-mobile);
	}

	.ds-home-hero__copy {
		margin-block-end: var(--wp--preset--spacing--40);
	}

	.ds-home-title {
		font-size: clamp(2.65rem, 11vw, 3.25rem) !important;
		transform: none;
		width: auto;
	}

	.ds-home-lede {
		font-size: var(--wp--preset--font-size--small) !important;
		margin-block-start: var(--wp--preset--spacing--20);
	}

	/* The same five direct destinations as desktop, with a compact touch layout. */
	.ds-pill-nav,
	.ds-pill-nav[data-state="compact"] {
		width: min(calc(100vw - var(--wp--custom--layout--edge-mobile) * 2), var(--wp--custom--navigation--compact-width));
		bottom: calc(var(--wp--preset--spacing--40) + env(safe-area-inset-bottom, 0rem));
	}
	.ds-pill-nav__link {
		justify-content: center;
		gap: 0;
		min-height: var(--wp--custom--navigation--height);
		padding-inline: var(--wp--custom--navigation--panel-inset);
		padding-block: var(--wp--preset--spacing--20);
	}

	/* Icon-only from first paint, including touch, focus and no-JS states.
	 * Every link retains its explicit aria-label and native title. */
	.ds-pill-nav__label { display: none; }
	.ds-pill-nav.is-ready .ds-pill-nav__link.is-indicated { transform: none; }

	.ds-register-card,
	.ds-archive-entry {
		grid-template-columns: 1fr;
		min-height: 0;
	}

	.ds-register-card__swatch,
	.ds-archive-entry__swatch {
		min-height: 9rem;
	}
	.ds-register-card__swatch:has(img),
	.ds-archive-entry__swatch:has(img) {
		min-height: 0;
		aspect-ratio: var(--wp--custom--card-media--ratio);
	}

	.ds-register-card__body,
	.ds-archive-entry__body {
		min-height: 13rem;
		padding: var(--wp--preset--spacing--40) var(--wp--custom--layout--edge-mobile);
	}

	.ds-register-card__title,
	.ds-archive-entry__title {
		font-size: clamp(1.8rem, 9vw, 2.75rem);
	}

	.ds-project-hero,
	.ds-project-hero__inner {
		min-height: var(--wp--custom--story--project-hero);
	}

	.ds-project-hero__inner {
		padding-block: var(--wp--preset--spacing--50) calc(
			var(--wp--custom--navigation--height) +
			var(--wp--custom--layout--edge-mobile) +
			var(--wp--preset--spacing--40)
		);
	}

	.ds-project-hero__inner,
	.ds-project-brief__inner,
	.ds-project-body,
	.ds-article-hero__inner,
	.ds-article-body,
	.ds-single-nav,
	.ds-motion-header__inner,
	.ds-editorial-mast,
	.ds-editorial-content,
	.ds-archive-mast,
	.ds-linkodromo-shell {
		padding-inline: var(--wp--custom--layout--edge-mobile);
	}

	.ds-project-title,
	.ds-article-title {
		font-size: clamp(2.75rem, 12vw, 4.5rem) !important;
		line-height: 0.92;
	}

	.ds-editorial-title,
	.ds-archive-title,
	.ds-motion-header__title {
		font-size: clamp(3rem, 13vw, 4.5rem) !important;
		line-height: 0.92;
	}

	.ds-motion-header--height-immersive {
		min-height: min(38rem, 70svh);
	}

	.ds-project-brief .ds-project-facts {
		grid-template-columns: repeat(12, minmax(0, 1fr));
		gap: var(--wp--preset--spacing--30);
	}

	.ds-project-brief .ds-project-fact {
		grid-column: span 6;
	}

	.ds-project-brief .ds-project-fact--disciplina,
	.ds-project-brief .ds-project-fact--equipo,
	.ds-project-brief .ds-project-fact--metric {
		grid-column: 1 / -1;
	}

	.ds-project-brief .ds-project-fact--metric {
		min-height: 8rem;
	}

	.ds-article-body {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--wp--preset--spacing--50);
	}

	.ds-article-rail {
		position: static;
	}

	.ds-entry-meta__list {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ds-entry-meta__fact:last-child:nth-child(odd) {
		grid-column: 1 / -1;
	}

	.ds-entry-meta__fact {
		padding-inline-end: var(--wp--preset--spacing--20);
	}


	.ds-editorial-mast {
		min-height: 24rem;
	}

	.ds-project-content .wp-block-group.has-background,
	.ds-project-content .wp-block-cover,
	.ds-editorial-content blockquote:not(.ds-editorial-quote, .is-style-editorial-quote),
	.ds-article-content blockquote:not(.ds-editorial-quote, .is-style-editorial-quote),
	.is-style-story-paper,
	.is-style-story-mist,
	.is-style-story-teal,
	.is-style-story-indigo {
		padding: var(--wp--preset--spacing--40);
	}

	.ds-single-nav {
		grid-template-columns: minmax(0, 1fr);
	}

	.ds-single-nav .post-navigation-link-next {
		grid-column: auto;
		justify-self: stretch;
	}
}

@media (max-width: 28rem) {
	.ds-project-brief .ds-project-fact {
		grid-column: 1 / -1;
	}

}

/* The mobile WordPress toolbar scrolls away instead of staying fixed. */
@media (max-width: 600px) {
	.wp-site-blocks > .wp-block-template-part:has(> .ds-site-header) { top: 0; }
}

/* Project registers page through the document itself, without a nested scroller
 * or touch interception. A tall card remains a freely scrollable snap area. */
@media (max-width: 48rem) {
	html:has(body.home .ds-home-register, body.post-type-archive-project .ds-archive-register) {
		--ds-register-top: calc(var(--ds-header-height, var(--wp--custom--header--height-mobile)) + var(--wp-admin--admin-bar--height, 0px));
		scroll-padding-block: var(--ds-register-top) 0;
		scroll-snap-type: y mandatory;
	}

	/* Intro and projects share one useful viewport. Min-height lets long copy grow. */
	.home:has(.ds-home-register) .ds-home-hero__inner,
	:is(.home, .post-type-archive-project) :is(.ds-register-card, .ds-archive-entry) {
		min-height: calc(100svh - var(--ds-register-top));
		min-height: calc(100dvh - var(--ds-register-top));
	}

	.home:has(.ds-home-register) .ds-home-hero__inner {
		justify-content: center;
	}

	.home:has(.ds-home-register) .ds-home-hero {
		scroll-snap-stop: always;
	}

	:is(.home, .post-type-archive-project) :is(.ds-register-card, .ds-archive-entry) {
		grid-template-rows: var(--wp--custom--card-media--screen-height-mobile) minmax(min-content, 1fr);
		scroll-snap-align: start;
		scroll-snap-stop: always;
	}

	:is(.home, .post-type-archive-project) :is(.ds-register-card__swatch, .ds-archive-entry__swatch) {
		min-height: 0;
		aspect-ratio: auto;
	}

	.home:has(.ds-home-register) .ds-home-hero__inner,
	:is(.home, .post-type-archive-project) :is(.ds-register-card__body, .ds-archive-entry__body) {
		/* Covers the expanded pill too, including the no-JavaScript state. */
		padding-block-end: calc(var(--wp--custom--navigation--height) * 2 + var(--wp--preset--spacing--40) + env(safe-area-inset-bottom, 0rem));
	}

	/* The snapped surface must not move again when the reveal observer fires.
	 * Work also animates the Query Loop's outer list item on desktop. */
	.has-ds-motion :is(.home, .post-type-archive-project) :is(.ds-register-card, .ds-archive-entry, .ds-archive-register .wp-block-post) {
		opacity: 1;
		transform: none;
		transition: none;
		will-change: auto;
	}

	/* Every intervening section stays reachable, including the complete footer. */
	:is(.home, .post-type-archive-project) :is(.ds-home-hero, .ds-archive-shell > .ds-motion-header, .ds-pagination, .ds-site-footer) {
		scroll-snap-align: start;
	}
}

@media (max-width: 600px) {
	html:has(body.home .ds-home-register, body.post-type-archive-project .ds-archive-register) {
		--ds-register-top: var(--ds-header-height, var(--wp--custom--header--height-mobile));
	}
}

@media (prefers-reduced-motion: reduce) {
	html:has(body.home .ds-home-register, body.post-type-archive-project .ds-archive-register) {
		scroll-snap-type: none;
	}
}
