/* Recipe-only visual adjustments. The lexicon keeps its own release cadence. */
.recipe-page {
	padding-top: clamp(0.5rem, 1.5vw, 1.25rem);
}

.recipe-page .recipe-hero {
	position: relative;
}

.recipe-page .recipe-hero h1 {
	font-size: clamp(1.85rem, 2.55vw, 2.2rem);
	line-height: 1.09;
}

.recipe-page .recipe-hero__copy {
	justify-content: flex-start;
	padding-left: clamp(1.875rem, 2.2vw, 2rem);
	padding-right: clamp(1.75rem, 2.5vw, 2.5rem);
}

.recipe-context-block {
	position: relative;
	margin-bottom: 0.6rem;
}

.recipe-context-block .recipe-context {
	margin: 0;
}

.recipe-context-block.has-more .recipe-context--primary,
.recipe-context-more .recipe-context {
	padding-left: 1.55rem;
}

.recipe-context a {
	padding: 0.32rem 0.65rem;
	border: 1px solid rgba(127, 29, 29, 0.23);
	border-radius: 999px;
	color: var(--thh-red);
	font-size: 0.7rem;
	font-weight: 900;
	letter-spacing: 0.1em;
	text-decoration: none;
	text-transform: uppercase;
}

.recipe-context a:hover {
	border-color: var(--thh-red);
	background: rgba(127, 29, 29, 0.07);
}

.recipe-context a:focus-visible,
.recipe-context-more summary:focus-visible {
	outline: 2px solid var(--thh-red);
	outline-offset: 2px;
}

.recipe-context-more summary {
	position: absolute;
	top: 0;
	left: 0;
	display: grid;
	width: 1.35rem;
	height: 1.9rem;
	place-items: center;
	color: var(--thh-ink-soft);
	cursor: pointer;
	list-style: none;
}

.recipe-context-more summary::-webkit-details-marker {
	display: none;
}

.recipe-context-more summary::after {
	content: "⌄";
	font-size: 1.1rem;
}

.recipe-context-more[open] summary::after {
	transform: rotate(180deg);
}

.recipe-context-more .recipe-context {
	margin-top: 0.55rem;
}

.recipe-page .recipe-section > h2,
.recipe-page .recipe-section > div > h2,
.recipe-page .recipe-instructions > h2,
.recipe-page .recipe-card-panel > h2 {
	font-size: clamp(1.48rem, 2vw, 2rem);
}

.recipe-detail-section .recipe-simple-list,
.recipe-nutrition {
	padding: var(--thh-recipe-card-padding);
	border: 1px solid var(--thh-line);
	border-radius: var(--thh-radius);
	background: var(--thh-paper);
}

.recipe-detail-section .recipe-simple-list {
	gap: 1rem;
}

.recipe-neighbors {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.recipe-neighbor {
	position: absolute;
	top: 0;
	bottom: 0;
	display: flex;
	width: 3.25rem;
	align-items: center;
	justify-content: center;
	color: #4e4d4a;
	opacity: 0;
	text-decoration: none;
	transition: opacity 160ms ease;
}

.recipe-neighbor--newer {
	left: 0;
}

.recipe-neighbor--older {
	right: 0;
}

.recipe-neighbor > span {
	display: grid;
	width: 2.35rem;
	height: 2.35rem;
	place-items: center;
	border: 1px solid rgba(90, 89, 85, 0.35);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.85);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	font: 2rem/1 var(--thh-sans);
}

.recipe-neighbor {
	pointer-events: auto;
}

.recipe-neighbor:hover,
.recipe-neighbor:focus-visible {
	opacity: 1;
}

.recipe-neighbor:focus-visible > span {
	outline: 2px solid var(--thh-red);
	outline-offset: 2px;
}

.recipe-neighbor.is-disabled > span {
	opacity: 0.4;
}

@media (min-width: 901px) {
	.recipe-page .recipe-hero__copy {
		padding-top: 1rem;
	}

	.recipe-neighbor {
		top: 50%;
		bottom: auto;
		width: 1.625rem;
		height: min(82%, 28rem);
		transform: translateY(-50%);
		transition-duration: 75ms;
	}

	.recipe-page .recipe-hero.is-near-newer .recipe-neighbor--newer,
	.recipe-page .recipe-hero.is-near-older .recipe-neighbor--older {
		opacity: 1;
		transition-duration: 0ms;
	}

	.recipe-neighbor > span {
		width: 100%;
		height: 100%;
		border: 0;
		border-radius: 0;
		background: rgba(137, 137, 135, 0.82);
		box-shadow: none;
		clip-path: polygon(100% 0, 100% 100%, 0 50%);
		font-size: 0;
	}

	.recipe-neighbor--older > span {
		transform: scaleX(-1);
	}
}

.recipe-swipe-boundary:not([hidden]) {
	position: absolute;
	bottom: 1rem;
	left: 50%;
	z-index: 2;
	width: max-content;
	max-width: calc(100% - 2rem);
	margin: 0;
	padding: 0.45rem 0.8rem;
	border-radius: 999px;
	background: rgba(30, 29, 27, 0.86);
	color: #fff;
	font-size: 0.8rem;
	text-align: center;
	transform: translateX(-50%);
}

@media (max-width: 900px) {
	.recipe-page .recipe-hero__copy {
		padding-inline: clamp(1.75rem, 4vw, 2.5rem);
	}

	.recipe-page .recipe-hero__media {
		grid-row: 1;
	}

	.recipe-neighbors {
		top: 0;
		bottom: auto;
		height: 28rem;
	}

	.recipe-neighbor {
		opacity: 0.85;
	}
}

@media (max-width: 600px) {
	.recipe-page {
		--thh-recipe-panel-padding: 1.5rem 0.75rem;
		--thh-recipe-card-padding: 1.25rem 0.625rem;
		padding-top: 0.25rem;
	}

	.recipe-breadcrumbs {
		margin-bottom: 0.4rem;
	}

	.recipe-breadcrumbs li[aria-current="page"] {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.recipe-breadcrumbs li:nth-last-child(2)::after {
		content: none;
	}

	.recipe-page .recipe-hero__copy {
		padding: 1.35rem 0.75rem 1.5rem;
	}

	.recipe-page .recipe-fact {
		padding-inline: 0.575rem;
	}

	.recipe-page .recipe-success,
	.recipe-page .recipe-card-panel,
	.recipe-page .recipe-story {
		padding-inline: 0.75rem;
	}

	.recipe-page .recipe-nutrition dl > div,
	.recipe-page .recipe-cue,
	.recipe-page .recipe-safety,
	.recipe-page .recipe-tips {
		padding-inline: 0.5rem;
	}

	.recipe-page .recipe-faq summary,
	.recipe-page .recipe-faq details p {
		padding-left: 0.6rem;
	}

	.recipe-page .recipe-faq summary {
		padding-right: 2.6rem;
	}

	.recipe-page .recipe-faq summary::after {
		right: 0.6rem;
	}

	.recipe-page .recipe-hero h1 {
		font-size: clamp(1.5rem, 5.8vw, 1.75rem);
	}

	.recipe-neighbors {
		height: 20rem;
	}

	.recipe-neighbor {
		top: auto;
		bottom: 0.1875rem;
		width: 2.75rem;
		height: 2.75rem;
	}

	.recipe-neighbor--newer {
		left: 0.1875rem;
	}

	.recipe-neighbor--older {
		right: 0.1875rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.recipe-neighbor {
		transition: none;
	}
}

@media print {
	.recipe-neighbors,
	.recipe-swipe-boundary,
	.recipe-context-more {
		display: none !important;
	}
}
