/* Recipe editorial layout — inspired by the Stitch "Chocotorta" screen. */
.rp-recipe-page {
	--rp-paper: #fafaf4;
	--rp-panel: #f3ece1;
	--rp-ink: #1a1c19;
	--rp-muted: #5f665f;
	--rp-accent: #1e3a2b;
	--rp-olive: #c85a32;
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 0 80px;
	background: var(--rp-paper);
	color: var(--rp-ink);
	font-family: "DM Sans", system-ui, sans-serif;
}

.rp-recipe-page .inside-article {
	padding: 0 clamp(16px, 4vw, 40px) 80px;
	background: transparent;
}

.rp-recipe-page a {
	color: var(--rp-accent);
}

.rp-breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin: 28px 0 18px;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .12em;
	line-height: 1.3;
	text-transform: uppercase;
	color: var(--rp-muted);
}

.rp-breadcrumbs a {
	color: var(--rp-muted);
	text-decoration: none;
}

.rp-breadcrumbs a:hover {
	color: var(--rp-accent);
}

.rp-recipe-header {
	margin: 0 0 24px;
}

.rp-recipe-eyebrow {
	margin: 0 0 10px;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--rp-olive);
}

.rp-recipe-title {
	margin: 0;
	font-family: Fraunces, Georgia, serif;
	font-size: clamp(2.6rem, 7vw, 5.4rem);
	font-weight: 500;
	line-height: 1.02;
	letter-spacing: -.035em;
	color: var(--rp-ink);
	text-wrap: balance;
}

.rp-recipe-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	margin-top: 16px;
	font-size: .82rem;
	color: var(--rp-muted);
}

.rp-recipe-meta span:not(:last-child)::after {
	content: "·";
	margin-left: 18px;
	color: var(--rp-olive);
}

.rp-recipe-hero {
	margin: 0 0 24px;
}

.rp-recipe-hero img {
	display: block;
	width: 100%;
	max-height: 620px;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.rp-recipe-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin: 0 0 26px;
	padding: 14px 0;
	border-top: 1px solid rgba(30, 58, 43, .14);
	border-bottom: 1px solid rgba(30, 58, 43, .14);
}

.rp-tool {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 10px 15px;
	border: 1px solid rgba(30, 58, 43, .24);
	background: transparent;
	color: var(--rp-accent);
	font: 600 .8rem/1.2 "DM Sans", system-ui, sans-serif;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.rp-tool:hover,
.rp-tool:focus-visible {
	background: var(--rp-panel);
	color: var(--rp-accent);
	border-color: var(--rp-accent);
}

.rp-tool-primary {
	background: var(--rp-accent);
	border-color: var(--rp-accent);
	color: #fff;
}

.rp-tool-primary:hover,
.rp-tool-primary:focus-visible {
	background: #162d21;
	border-color: #162d21;
	color: #fff;
}

.rp-tool-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
}

.rp-tool[aria-pressed="true"] {
	background: var(--rp-panel);
	border-color: var(--rp-accent);
}

.rp-recipe-content {
	max-width: none;
	font-size: 1.0625rem;
	line-height: 1.7;
	color: var(--rp-ink);
}

.rp-recipe-content > p {
	max-width: 75ch;
}

.rp-recipe-content > p.rp-recipe-intro {
	max-width: 68ch;
	margin-bottom: 28px;
	font-size: 1.2rem;
	line-height: 1.5;
}

.rp-recipe-content h2,
.rp-recipe-content h3,
.rp-related h2,
.rp-reviews h2 {
	font-family: Fraunces, Georgia, serif;
	font-weight: 500;
	letter-spacing: -.025em;
	color: var(--rp-ink);
}

.rp-recipe-content img {
	max-width: 100%;
	height: auto;
}

.rp-recipe-content .wprm-recipe {
	font-family: "DM Sans", system-ui, sans-serif !important;
}

.rp-recipe-content .wprm-recipe h2,
.rp-recipe-content .wprm-recipe h3 {
	font-family: Fraunces, Georgia, serif !important;
}

.rp-recipe-content .wprm-recipe-servings-container {
	display: none !important;
}

/* Avoid reserving a large empty box when AdSense has no fill. */
.rp-recipe-page .rp-ad {
	display: none;
}

.rp-recipe-page .rp-ad:has(ins[data-ad-status="filled"]) {
	display: block;
	margin: 30px 0;
}

/* Move the servings adjuster into the ingredients rail. */
.rp-adjuster-wrap {
	margin: 0 0 18px;
}

.rp-adjuster-label {
	display: block;
	margin: 0 0 6px;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--rp-muted);
}

.rp-adjuster-wrap .rp-adjuster {
	margin: 0;
}

.rp-recipe-tags {
	margin: 34px 0 0;
	font-size: .8rem;
	color: var(--rp-muted);
}

.rp-recipe-tags a {
	display: inline-block;
	margin: 3px 6px 3px 0;
	padding: 4px 9px;
	background: var(--rp-panel);
	color: var(--rp-ink);
	text-decoration: none;
}

.rp-tag-label {
	font-weight: 700;
	color: var(--rp-muted);
}

.rp-related {
	margin-top: 72px;
	padding-top: 32px;
	border-top: 1px solid rgba(30, 58, 43, .16);
}

.rp-related-head {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 24px;
}

.rp-related-head h2 {
	margin: 0;
	font-size: clamp(1.9rem, 4vw, 3rem);
	line-height: 1.05;
}

.rp-related-more {
	font-size: .82rem;
	font-weight: 700;
	text-decoration: none;
}

.rp-related-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.rp-related-card {
	display: block;
	color: var(--rp-ink);
	text-decoration: none;
}

.rp-related-card img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	background: var(--rp-panel);
}

.rp-related-card h3 {
	margin: 12px 0 6px;
	font-size: 1.35rem;
	line-height: 1.15;
}

.rp-related-card span {
	font-size: .76rem;
	color: var(--rp-muted);
}

.rp-related-card:hover h3 {
	color: var(--rp-accent);
}

.rp-reviews {
	margin-top: 64px;
	padding-top: 32px;
	border-top: 1px solid rgba(30, 58, 43, .16);
}

.rp-reviews h2 {
	margin: 0 0 18px;
	font-size: clamp(1.9rem, 4vw, 3rem);
	line-height: 1.05;
}

.rp-cook-exit {
	display: none;
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 9999;
	padding: 14px 18px;
	border: 0;
	background: var(--rp-accent);
	color: #fff;
	font: 700 .85rem/1.2 "DM Sans", system-ui, sans-serif;
	cursor: pointer;
	box-shadow: 0 8px 30px rgba(30, 58, 43, .22);
}

body.rp-cooking-mode {
	background: var(--rp-paper);
}

body.rp-cooking-mode .site-header,
body.rp-cooking-mode .site-footer,
body.rp-cooking-mode .rp-breadcrumbs,
body.rp-cooking-mode .rp-recipe-hero,
body.rp-cooking-mode .rp-recipe-toolbar,
body.rp-cooking-mode .rp-recipe-tags,
body.rp-cooking-mode .rp-related,
body.rp-cooking-mode .rp-reviews,
body.rp-cooking-mode .rp-ad,
body.rp-cooking-mode .rp-recipe-meta,
body.rp-cooking-mode .rp-recipe-eyebrow {
	display: none !important;
}

body.rp-cooking-mode .rp-recipe-page {
	max-width: 900px;
	padding-bottom: 80px;
}

body.rp-cooking-mode .rp-recipe-title {
	font-size: clamp(2rem, 5vw, 3rem);
}

body.rp-cooking-mode .rp-cook-exit {
	display: inline-flex;
}

@media (max-width: 900px) {
	.rp-recipe-title {
		font-size: clamp(2.4rem, 10vw, 4rem);
	}

	.rp-recipe-hero img {
		aspect-ratio: 4 / 3;
	}

	.rp-related-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.rp-recipe-page {
		padding-bottom: 48px;
	}

	.rp-recipe-page .inside-article {
		padding: 0 16px 48px;
	}

	.rp-breadcrumbs {
		margin-top: 18px;
	}

	.rp-recipe-toolbar {
		gap: 8px;
	}

	.rp-tool {
		flex: 1 1 44%;
		justify-content: center;
		font-size: .74rem;
	}

	.rp-tool-primary {
		flex-basis: 100%;
	}

	.rp-related-grid {
		grid-template-columns: 1fr;
	}
}

@media print {
	.rp-recipe-toolbar,
	.rp-related,
	.rp-reviews,
	.rp-recipe-tags,
	.rp-breadcrumbs,
	.rp-recipe-hero,
	.rp-cook-exit,
	.rp-ad {
		display: none !important;
	}

	.rp-recipe-page {
		max-width: none;
		padding: 0;
	}

	.rp-recipe-page .inside-article {
		padding: 0;
	}
}
