/* Shared geometry is present on first paint, including the readable static layout. */
.eiqm-prototype.revision .prototype-content > .process-chapters[data-moment="pinned-chapters"],
.is-style-eiqm-pinned-chapters {
	height: auto;
	min-height: 100svh;
}

.eiqm-prototype.revision .prototype-content > .process-chapters[data-moment="pinned-chapters"] > .mo-pc__grid,
:is([data-moment="pinned-chapters"], .is-style-eiqm-pinned-chapters) > .mo-pc__grid {
	display: grid;
	align-content: start;
	align-items: center;
	gap: var(--s-7, 2rem);
	height: auto;
}

:is([data-moment="pinned-chapters"], .is-style-eiqm-pinned-chapters) :is(.mo-pc__text, .mo-pc__steps, .mo-pc__step) {
	display: grid;
	align-content: start;
	gap: var(--s-5, 1.25rem);
}

:is([data-moment="pinned-chapters"], .is-style-eiqm-pinned-chapters) .mo-pc__step {
	gap: var(--s-2, .5rem);
	border-inline-start: 2px solid var(--line, #d9dfe2);
	padding-inline-start: var(--s-5, 1.25rem);
}

:is([data-moment="pinned-chapters"], .is-style-eiqm-pinned-chapters) .mo-pc__step h3 {
	font-family: var(--font-text, var(--eiqm-body));
	font-size: var(--t-lead, 1.375rem);
	font-weight: 500;
	line-height: 1.3;
}

:is([data-moment="pinned-chapters"], .is-style-eiqm-pinned-chapters) .mo-pc__step p {
	max-width: 46ch;
}

:is([data-moment="pinned-chapters"], .is-style-eiqm-pinned-chapters) .mo-pc__visual {
	margin: var(--s-4, 1rem) 0 0;
	border-radius: var(--r-md, .75rem);
	overflow: hidden;
}

:is([data-moment="pinned-chapters"], .is-style-eiqm-pinned-chapters) .mo-pc__visual img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

:is([data-moment="pinned-chapters"], .is-style-eiqm-pinned-chapters) .mo-pc__visuals:empty {
	display: none;
}

@media (max-width: 639px) {
	.eiqm-prototype.revision .prototype-content > .process-chapters[data-moment="pinned-chapters"] {
		padding-block: var(--s-7, 2rem);
	}

	:is([data-moment="pinned-chapters"], .is-style-eiqm-pinned-chapters) .mo-pc__visual img {
		aspect-ratio: 16 / 9;
		max-height: 26svh;
	}
}

@media (min-width: 640px) {
	:is([data-moment="pinned-chapters"], .is-style-eiqm-pinned-chapters):not(.eiqm-motion-chapters-active) .mo-pc__step {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: var(--gutter, 2rem);
		align-items: center;
		border-inline-start: 0;
		border-top: 1px solid var(--line, #d9dfe2);
		padding: var(--s-6, 1.5rem) 0 0;
	}

	:is([data-moment="pinned-chapters"], .is-style-eiqm-pinned-chapters):not(.eiqm-motion-chapters-active) .mo-pc__step .mo-pc__visual {
		grid-column: 2;
		grid-row: 1 / span 2;
		margin: 0;
	}

	:is([data-moment="pinned-chapters"], .is-style-eiqm-pinned-chapters):not(.eiqm-motion-chapters-active) .mo-pc__visual img {
		max-height: 30svh;
	}
}

@media screen and (min-width: 1024px) and (min-height: 640px) and (scripting: enabled) and (prefers-reduced-motion: no-preference) {
	.eiqm-prototype.revision .prototype-content > .process-chapters[data-moment="pinned-chapters"],
	.is-style-eiqm-pinned-chapters {
		min-height: 200svh;
	}
}

@media screen and (min-width: 1024px) and (min-height: 640px) and (prefers-reduced-motion: no-preference) {
	.eiqm-prototype.revision .prototype-content > .process-chapters[data-moment="pinned-chapters"].eiqm-motion-chapters-active,
	.is-style-eiqm-pinned-chapters.eiqm-motion-chapters-active {
		min-height: 200svh;
		padding-block: 0;
	}

	.eiqm-prototype.revision .prototype-content > .process-chapters[data-moment="pinned-chapters"].eiqm-motion-chapters-active > .mo-pc__grid,
	.eiqm-motion-chapters-active > .mo-pc__grid {
		display: grid;
		position: sticky;
		top: 0;
		height: 100svh;
		padding-block-start: var(--nav, 72px);
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: var(--gutter, 2rem);
		align-items: start;
		align-content: center;
		overflow: clip;
	}

	.eiqm-motion-chapters-active .mo-pc__step {
		transition: border-color 300ms ease;
	}

	.eiqm-motion-chapters-active .mo-pc__step h3 {
		color: var(--muted, var(--eiqm-muted));
		transition: color 300ms ease;
	}

	.eiqm-motion-chapters-active .mo-pc__step p {
		display: grid;
		grid-template-rows: 0fr;
		opacity: 0;
		transition: grid-template-rows 420ms cubic-bezier(.2, .7, .2, 1), opacity 300ms ease;
	}

	.eiqm-motion-chapters-active .mo-pc__p-in {
		min-height: 0;
		overflow: hidden;
	}

	.eiqm-motion-chapters-active .mo-pc__step.is-current {
		border-inline-start-color: var(--accent, var(--eiqm-accent));
	}

	.eiqm-motion-chapters-active .mo-pc__step.is-current h3 {
		color: var(--ink, var(--eiqm-ink));
	}

	.eiqm-motion-chapters-active .mo-pc__step.is-current p {
		grid-template-rows: 1fr;
		opacity: 1;
	}

	.eiqm-motion-chapters-active .mo-pc__visuals {
		position: relative;
		width: 100%;
		aspect-ratio: 4 / 3;
		max-height: calc(100svh - 128px);
		overflow: hidden;
		padding: 0;
		border-radius: var(--r-lg, var(--eiqm-radius));
	}

	.eiqm-motion-chapters-active .mo-pc__visual {
		position: absolute;
		inset: 0;
		margin: 0;
		opacity: 0;
		transform: scale(1.03);
		transition: opacity 480ms ease, transform 850ms cubic-bezier(.16, 1, .3, 1);
	}

	.eiqm-motion-chapters-active .mo-pc__visual img {
		height: 100%;
		aspect-ratio: auto;
	}

	.eiqm-motion-chapters-active .mo-pc__visual.is-current {
		opacity: 1;
		transform: none;
		z-index: 1;
	}

	.eiqm-motion-chapters-active .mo-pc__visual.is-previous {
		transform: none;
	}
}
