/* Authored editorial headlines; geometry belongs to each composition. */
.entry-title,
.page-title {
	font-family: "Ellery Hanken Grotesk", var(--ellery-font-body);
}

/* Teams has one saved sidebar, presented here only on mobile. */
.ellery-teams-mobile-services { display: none; }

@media (min-width: 48.01rem) {
	.entry-header--mobile-only { display: none; }
}

@media (max-width: 48rem) {
	.page-id-9 .site-frame { overflow: clip; }
	.page-id-9 .site-main { padding-top: var(--ellery-space-5); }
	.page-id-9 .ellery-teams-opening {
		position: relative;
		isolation: isolate;
		margin: 0;
		padding: 0;
		border: 0;
	}
	.page-id-9 .ellery-teams-opening :is(h1, h2) {
		position: relative;
		z-index: 1;
		min-height: 20.5rem;
		margin: 0;
		text-wrap: wrap;
	}
	.page-id-9 .ellery-teams-line { display: block; white-space: nowrap; }
	.page-id-9 .ellery-teams-line:last-child::after { content: "."; }

	.page-id-9 .ellery-teams-opening + .ellery-divider { margin-block: calc(1.75rem * var(--ellery-section-space-scale)) calc(2rem * var(--ellery-section-space-scale)); }
	.page-id-9 .entry-content > p:has(.ellery-content-anchor--body) { display: none; }
	.page-id-9 .ellery-teams-opening .ellery-pull-quote__eyebrow { display: none; }
	.page-id-9 .ellery-teams-opening .ellery-pull-quote__body {
		position: relative;
		max-width: 17rem;
		margin: 0;
		padding-block: var(--ellery-space-1);
		color: var(--ellery-ink);
		font: inherit;
	}
	/* Use the native quote rule, outdented so body text stays on the content edge. */
	.page-id-9 .ellery-teams-opening .ellery-pull-quote__body::before {
		content: "";
		position: absolute;
		inset-block: 0;
		inset-inline-start: -.65rem;
		border-inline-start: 2px solid var(--ellery-accent);
	}
	.page-id-9 .ellery-teams-mobile-services {
		display: block;
		/* The preceding authored spacer and its margin already contribute 44px. */
		margin-block: .555rem calc(3.5rem * var(--ellery-section-space-scale));
		color: var(--ellery-ink);
		font-size: var(--ellery-text-base);
	}
	.page-id-9 .ellery-teams-mobile-services > :is(h3, h4) {
		margin: 0 0 1.1rem;
		text-align: start !important;
	}
	.page-id-9 .ellery-teams-mobile-services > h3 { text-transform: lowercase; }
	.page-id-9 .ellery-teams-mobile-services > h3::first-letter { text-transform: uppercase; }
	.page-id-9 .ellery-teams-mobile-services > h4 {
		color: var(--ellery-ink-soft);
		font: 600 .78rem/1.35 var(--ellery-font-body);
		letter-spacing: .1em;
		text-transform: uppercase;
	}
	.page-id-9 .ellery-teams-mobile-services > p {
		position: relative;
		margin: 0;
		padding: .58rem .35rem .58rem 2.35rem;
		border-bottom: 1px solid var(--ellery-rule);
		line-height: 1.5;
		text-align: start !important;
	}
	.page-id-9 .ellery-teams-mobile-services > p::before {
		content: "∴";
		position: absolute;
		left: .625rem;
		color: var(--ellery-accent);
	}
	.page-id-9 .ellery-teams-mobile-services > h3 + p { border-top: 1px solid var(--ellery-rule); }
	.page-id-9 .ellery-teams-mobile-services > hr {
		display: block;
		height: 0;
		margin: 2.15rem 0 1.45rem;
		border: 0;
		background: none;
	}
	.page-id-9 .ellery-teams-mobile-services > hr::after { content: none; }
	.page-id-9 .ellery-teams-mobile-services > h4 { margin-bottom: .75rem; }
	.page-id-9 .ellery-teams-mobile-services > h4 ~ p {
		display: inline;
		padding: 0;
		border: 0;
		color: var(--ellery-ink-soft);
		font-size: .95rem;
		line-height: 1.75;
	}
	.page-id-9 .ellery-teams-mobile-services > h4 ~ p::before { position: static; content: none; }
	.page-id-9 .ellery-teams-mobile-services > h4 ~ p + p::before { content: " · "; }
	.page-id-9 .ellery-teams-mobile-services > p:has(.ellery-content-anchor),
	.page-id-9 .ellery-teams-mobile-services > p:empty { display: none; }
	@media (max-width: 22rem) {

		.page-id-9 .ellery-teams-opening .ellery-pull-quote__body { max-width: 15.5rem; }
	}
}

@media (max-width: 48rem) {
	html:has(.ellery-editorial-headline, .ellery-mobile-header-art) { overflow-x: clip; }
	body:has(.ellery-editorial-headline, .ellery-mobile-header-art) .site-frame { overflow: clip; }
	/* Reuse the existing header surface/concealment helper for the small intrusion. */
	.ellery-header-layers-ready:has(.ellery-editorial-headline, .ellery-mobile-header-art) .site-frame { isolation: isolate; }
	.ellery-header-layers-ready:has(.ellery-editorial-headline, .ellery-mobile-header-art) .site-frame::before {
		content: "";
		grid-area: 1 / 1;
		position: sticky;
		top: 0;
		z-index: -1;
		pointer-events: none;
		background: var(--ellery-paper);
		border-bottom: 1px solid var(--ellery-rule);
	}
	.ellery-header-layers-ready:has(.ellery-editorial-headline, .ellery-mobile-header-art) .site-header {
		background: transparent;
		border-bottom-color: transparent;
	}
	.ellery-header-layers-ready:has(.ellery-editorial-headline, .ellery-mobile-header-art) .site-header::before {
		content: "";
		position: absolute;
		inset: 0 0 -1px;
		z-index: -1;
		pointer-events: none;
		background: var(--ellery-paper);
		border-bottom: 1px solid var(--ellery-rule);
		opacity: var(--ellery-header-conceal, 0);
	}
	.has-mobile-navigation-open:has(.ellery-editorial-headline, .ellery-mobile-header-art) .site-header::before { opacity: 1; }
	.ellery-header-layers-ready:has(.ellery-editorial-headline, .ellery-mobile-header-art) .ellery-header-banner-underlay {
		display: block;
		grid-area: 1 / 1;
		align-self: start;
		position: sticky;
		top: 0;
		z-index: -1;
		pointer-events: none;
	}
	.ellery-header-layers-ready:has(.ellery-editorial-headline, .ellery-mobile-header-art) .ellery-header-banner-underlay > .page-hero--sticky {
		width: 100%;
		max-width: none;
		margin: 0;
	}
	.ellery-header-layers-ready:has(.ellery-editorial-headline, .ellery-mobile-header-art) .site-header > .page-hero--sticky { opacity: var(--ellery-header-conceal, 0); }
	.has-mobile-navigation-open:has(.ellery-editorial-headline, .ellery-mobile-header-art) .ellery-header-banner-underlay { display: none; }

	/* Only neutral layout wrappers flatten. The H1 remains first in source order. */
	article:has(.ellery-editorial-headline) {
		position: relative;
		display: flex;
		flex-direction: column;
	}
	article:has(.ellery-editorial-headline) > .page-layout,
	article:has(.ellery-editorial-headline) > .page-layout > .entry-content,
	.ellery-editorial-opening,
	.ellery-mealprep__hero:has(.ellery-editorial-headline),
	.ellery-mealprep__hero__copy:has(.ellery-editorial-headline) { display: contents; }

	article:has(.ellery-editorial-headline) .entry-content > *,
	article:has(.ellery-editorial-headline) .ellery-mealprep__lede { order: 2; }
	/* Auto side margins prevent a size-contained CTA from stretching as a flex item. */
	article:has(.ellery-editorial-headline) .entry-content > .ellery-closing-cta { margin-inline: 0; }
	article:has(.ellery-editorial-headline) > .entry-header {
		order: 1;
		position: relative;
		z-index: 2;
		width: var(--editorial-rule-width, 100%);
		margin: 0 0 calc(var(--ellery-space-5) * var(--ellery-section-space-scale));
		padding-bottom: 0;
	}
	article:has(.ellery-editorial-headline) .entry-title {
		margin: 0;
		font-size: .8125rem;
		font-weight: 600;
		line-height: 1.4;
		letter-spacing: .12em;
		text-transform: uppercase;
	}
	article:has(.ellery-editorial-headline) .entry-title::after {
		width: 100%;
		margin-top: .5rem;
		background: var(--ellery-rule);
		opacity: 1;
	}
	article:has(.ellery-editorial-headline) .entry-content > :is(.ellery-editorial-headline, .ellery-editorial-opening) + * { margin-top: 0; }
	/* Flex items do not collapse the existing divider/quote bottom margins. */
	article:has(.ellery-editorial-headline) .entry-content > :is(hr, .ellery-pull-quote) + * { margin-top: 0; }
	article:has(.ellery-editorial-headline) .ellery-editorial-headline {
		order: 0;
		position: relative;
		z-index: 2;
		box-sizing: border-box;
		min-height: var(--editorial-opening-height, 20rem);
		margin: 0;
		padding-top: var(--editorial-heading-top, 0px);
		font-size: clamp(1.7rem, 8vw, 1.95rem);
		font-weight: 500;
		line-height: var(--ellery-leading-tight);
		letter-spacing: -.015em;
		text-wrap: wrap;
	}
	.ellery-editorial-headline > span { display: block; white-space: nowrap; }

	article:has(.ellery-editorial-headline--meal-plans) {
		--editorial-opening-height: 20rem;
		--editorial-rule-width: 69%;
	}
	article:has(.ellery-editorial-headline--meal-plans) .entry-content > h3:has(> .ellery-cta-link) + h3:has(> .ellery-cta-link) {
		margin-block-start: calc(var(--ellery-space-6) * var(--ellery-section-space-scale));
	}
	article:has(.ellery-editorial-headline--classes) {
		--editorial-heading-top: 2.5rem;
		--editorial-opening-height: 18.25rem;
	}
	article:has(.ellery-editorial-headline--meal-prep) {
		--editorial-heading-top: 7rem;
		--editorial-opening-height: 21rem;
	}
	article:has(.ellery-editorial-headline--meal-prep) .ellery-mealprep__lede {
		margin: 0;
		padding-bottom: var(--ellery-space-5);
		border-bottom: 1px solid var(--ellery-rule);
	}
	article:has(.ellery-editorial-headline--pop-ups) {
		--editorial-opening-height: 20.5rem;
	}

	article:has(.ellery-editorial-headline--holiday-dinners) {
		--editorial-heading-top: 5.25rem;
		--editorial-opening-height: 18.5rem;
		--editorial-rule-width: 92%;
	}
	article:has(.ellery-editorial-headline--our-approach) {
		--editorial-heading-top: 7.5rem;
		--editorial-opening-height: 21.5rem;
	}

	article:has(.ellery-editorial-headline--our-approach) .entry-content > .ellery-aside-cta:first-child {
		order: -1;
		margin: 0;
	}
	article:has(.ellery-editorial-headline--our-approach) .ellery-aside-cta:first-child h3 { max-width: 8em; }
	article:has(.ellery-editorial-headline--our-approach) .ellery-aside-cta__body { position: relative; z-index: 2; }
	article:has(.ellery-editorial-headline--our-approach) .ellery-editorial-headline {
		z-index: auto;
		overflow: visible;
	}

	.ellery-editorial-headline--our-approach > span { position: relative; z-index: 2; }
	article:has(.ellery-editorial-headline--our-approach) .entry-content > :is(.ellery-spacer, .ellery-kicker) { display: none; }
	article:has(.ellery-editorial-headline--our-approach) .entry-content > .ellery-pull-quote--headline {
		margin-block: calc(var(--ellery-space-6) * var(--ellery-section-space-scale));
	}
	article:has(.ellery-editorial-headline--our-approach) .entry-content > .ellery-closing-cta {
		margin-block-start: calc(6rem * var(--ellery-section-space-scale));
	}
	article:has(.ellery-editorial-headline--our-approach) .entry-title { display: flex; flex-direction: column; }
	article:has(.ellery-editorial-headline--our-approach) .entry-title::after { order: -1; margin: 0 0 .5rem; }
	@media (max-width: 22rem) {

		article:has(.ellery-editorial-headline--meal-plans) .entry-content > h3 + h3 > .ellery-cta-link { --ellery-cta-link-arrow-extension: 2rem; }
	}
	/* These are the two authored biography section headings (H2 on production). */
	.page-id-568 .entry-content > :is(h2, h3) {
		margin-block-start: calc(2 * var(--ellery-space-5) * var(--ellery-section-space-scale));
	}
	@media (min-width: 42.01rem) {
		.page-id-568 .entry-content > :is(h2, h3) { margin-block-start: calc(2 * var(--ellery-space-6) * var(--ellery-section-space-scale)); }
	}
}
