/*
 * SleepBaby.org 2.5.1 — value-first article presentation.
 *
 * This final article layer moves the visual decision point behind the first
 * useful answer, keeps cold traffic routed to the homepage, and provides a
 * compact 2026 editorial surface without altering article copy.
 */

body.sleepbaby-single-post {
	--sb251-ink: #201923;
	--sb251-copy: #3d3540;
	--sb251-muted: #645b68;
	--sb251-paper: #fffdf8;
	--sb251-canvas: #f2eee9;
	--sb251-panel: #f8f3ee;
	--sb251-panel-cool: #f3f1f7;
	--sb251-line: #d8d0d6;
	--sb251-line-strong: #a99ca9;
	--sb251-plum: #432f4b;
	--sb251-plum-dark: #2f2138;
	--sb251-teal: #356c66;
	--sb251-focus: #245f89;
	--sb251-reading: 700px;
	--sb251-sheet: 960px;
	color: var(--sb251-ink);
	background: var(--sb251-canvas);
	font-family: "Times New Roman", Times, serif !important;
}

body.sleepbaby-single-post .site-main {
	overflow-x: clip;
	background:
		linear-gradient(90deg, rgba(88, 65, 91, .025) 1px, transparent 1px) 0 0 / 32px 32px,
		var(--sb251-canvas) !important;
}

body.sleepbaby-single-post .content-shell--article {
	width: min(calc(100% - 32px), var(--sb251-sheet)) !important;
	margin-inline: auto;
	padding: clamp(34px, 5vw, 58px) clamp(28px, 6.5vw, 72px) 0 !important;
	border: 1px solid var(--sb251-line) !important;
	border-block-end: 0 !important;
	border-radius: 18px 18px 0 0 !important;
	background: var(--sb251-paper) !important;
	box-shadow: 0 18px 50px rgba(53, 39, 55, .07) !important;
}

body.sleepbaby-single-post .entry-header {
	width: min(100%, var(--sb251-reading));
	margin: 0 auto clamp(20px, 3vw, 30px) !important;
	padding: 0 !important;
	text-align: left !important;
}

body.sleepbaby-single-post .entry-kicker {
	display: inline-flex;
	min-height: 28px;
	align-items: center;
	margin: 0 0 13px !important;
	padding: 3px 0 4px !important;
	border: 0 !important;
	border-block-end: 2px solid #8a708d !important;
	border-radius: 0 !important;
	color: #514255 !important;
	background: transparent !important;
	font-size: 12.5px !important;
	font-weight: 700;
	letter-spacing: .09em;
	line-height: 1.2;
	text-align: left !important;
	text-transform: uppercase;
}

body.sleepbaby-single-post .entry-title {
	max-width: 18ch !important;
	margin: 0 !important;
	color: #1c171e !important;
	font-family: "Times New Roman", Times, serif !important;
	font-size: clamp(2.55rem, 5.15vw, 4.35rem) !important;
	font-weight: 700 !important;
	font-style: normal !important;
	letter-spacing: -.042em !important;
	line-height: .99 !important;
	text-align: left !important;
	text-wrap: balance;
}

body.sleepbaby-single-post .entry-title--medium {
	max-width: 20ch !important;
	font-size: clamp(2.42rem, 4.8vw, 4rem) !important;
}

body.sleepbaby-single-post .entry-title--long {
	max-width: 24ch !important;
	font-size: clamp(2.2rem, 4.25vw, 3.6rem) !important;
	line-height: 1.02 !important;
}

body.sleepbaby-single-post .entry-meta-row {
	display: flex;
	flex-wrap: wrap;
	gap: 7px 18px;
	align-items: center;
	margin-top: 16px;
	color: var(--sb251-muted);
	font-size: 14.5px;
	line-height: 1.35;
}

body.sleepbaby-single-post .entry-meta,
body.sleepbaby-single-post .entry-reading-time {
	margin: 0 !important;
	color: var(--sb251-muted) !important;
	font-size: inherit !important;
	letter-spacing: .01em !important;
	line-height: inherit !important;
	text-align: left !important;
}

body.sleepbaby-single-post .entry-reading-time {
	display: inline-flex;
	align-items: center;
}

body.sleepbaby-single-post .entry-reading-time::before {
	width: 4px;
	height: 4px;
	margin-inline-end: 18px;
	border-radius: 50%;
	background: #8d818f;
	content: "";
}

body.sleepbaby-single-post .entry-featured {
	width: min(100%, var(--sb251-reading)) !important;
	margin: 0 auto clamp(24px, 4vw, 34px) !important;
	overflow: hidden;
	border: 1px solid var(--sb251-line) !important;
	border-radius: 12px !important;
	background: #eee9e5 !important;
	box-shadow: 0 12px 28px rgba(45, 33, 49, .08) !important;
}

body.sleepbaby-single-post .entry-featured img {
	display: block;
	width: 100% !important;
	height: auto !important;
	object-fit: cover;
}

body.sleepbaby-single-post .entry-content {
	width: min(100%, var(--sb251-reading)) !important;
	margin-inline: auto;
	padding-block-end: clamp(34px, 5vw, 56px);
	color: var(--sb251-copy) !important;
	font-family: "Times New Roman", Times, serif !important;
	font-size: clamp(18.5px, 1.16vw, 19.5px) !important;
	letter-spacing: 0 !important;
	line-height: 1.64 !important;
	text-align: left;
	text-wrap: pretty;
}

body.sleepbaby-single-post .entry-content :is(h1, h2, h3, h4, p, li, a, summary, figcaption) {
	overflow-wrap: anywhere;
}

body.sleepbaby-single-post .entry-content > :first-child {
	margin-block-start: 0 !important;
}

body.sleepbaby-single-post .entry-content :is(.sb-article-answer-anchor, .sb-article-ending-marker) {
	display: block;
	position: relative;
	width: 1px;
	height: 1px;
	overflow: hidden;
	scroll-margin-top: 96px;
}

body.sleepbaby-single-post .entry-content [data-sb-article-answer="true"] {
	position: relative;
	margin-block: 0 clamp(24px, 4vw, 34px) !important;
	padding: clamp(20px, 3.4vw, 30px) !important;
	overflow: hidden;
	border: 1px solid #d7ccd8 !important;
	border-inline-start: 4px solid #806486 !important;
	border-radius: 12px !important;
	box-shadow: 0 9px 24px rgba(54, 39, 59, .06) !important;
	scroll-margin-top: 96px;
}

body.sleepbaby-single-post .entry-content [data-sb-article-answer="true"]:not([style*="background"]) {
	background:
		radial-gradient(circle at 100% 0, rgba(221, 206, 228, .32), transparent 32%),
		var(--sb251-panel-cool) !important;
}

body.sleepbaby-single-post .entry-content [data-sb-article-answer="true"] > :first-child {
	margin-block-start: 0 !important;
}

body.sleepbaby-single-post .entry-content [data-sb-article-answer="true"] > :last-child {
	margin-block-end: 0 !important;
}

body.sleepbaby-single-post .entry-content [data-sb-article-answer="true"] :is(h2, h3) {
	margin-block-start: 0 !important;
	padding-block-start: 0 !important;
	border-block-start: 0 !important;
}

body.sleepbaby-single-post .entry-content .sb-article-route-bar,
body.sleepbaby-single-post .entry-content .sb-article-route-bar:is(.sb-cro-variant--april *) {
	position: relative !important;
	display: grid !important;
	width: 100% !important;
	grid-template-columns: minmax(0, 1fr) auto !important;
	grid-template-areas: "workshop purchase" "home home" !important;
	gap: 7px 20px !important;
	align-items: center !important;
	margin: clamp(24px, 4vw, 34px) 0 clamp(26px, 4vw, 38px) !important;
	padding: 15px 17px 12px !important;
	border: 1px solid #cfc4d1 !important;
	border-inline-start: 4px solid var(--sb251-teal) !important;
	border-radius: 10px !important;
	background: #fbf8f3 !important;
	box-shadow: 0 7px 18px rgba(53, 39, 55, .055) !important;
}

body.sleepbaby-single-post .entry-content .sb-article-route-bar::after {
	display: none !important;
}

body.sleepbaby-single-post .sb-article-route-bar__workshop {
	grid-area: workshop;
	display: flex;
	min-width: 0;
	min-height: 44px !important;
	align-items: center;
	color: #332838 !important;
	font-size: clamp(18px, 2vw, 21px) !important;
	font-weight: 700 !important;
	line-height: 1.15 !important;
}

body.sleepbaby-single-post .sb-article-route-bar__purchase,
body.sleepbaby-single-post .sb-article-route-bar__purchase:visited {
	grid-area: purchase;
	display: inline-flex;
	min-width: 176px;
	min-height: 48px !important;
	align-items: center;
	justify-content: center;
	padding: 10px 18px !important;
	border: 1px solid #2d2035 !important;
	border-radius: 7px !important;
	color: #fffdf8 !important;
	-webkit-text-fill-color: #fffdf8 !important;
	background: var(--sb251-plum) !important;
	box-shadow: 0 5px 12px rgba(47, 33, 56, .15) !important;
	font-weight: 700;
	line-height: 1.15;
	text-align: center;
	text-decoration: none !important;
}

body.sleepbaby-single-post .sb-article-route-bar__purchase:hover {
	border-color: #214c47 !important;
	background: #2f625c !important;
	transform: translateY(-1px);
}

body.sleepbaby-single-post .sb-article-route-bar__home {
	grid-area: home;
	display: inline-flex;
	min-width: 44px;
	min-height: 44px !important;
	align-items: center;
	justify-self: start;
	padding: 5px 0 2px !important;
	color: #514956 !important;
	font-size: 15.5px !important;
	line-height: 1.3 !important;
	text-decoration: underline !important;
	text-decoration-thickness: 1px !important;
	text-underline-offset: 4px;
}

body.sleepbaby-single-post .sb-article-continuation-anchor {
	display: block;
	position: relative;
	width: 1px;
	height: 1px;
	scroll-margin-top: 96px;
}

/* Keep two deliberate article asks: the post-answer route and one deeper
 * contextual bridge. Early JS-injected asks remain in the DOM for reversible
 * attribution but are not visually exposed. */
body.sleepbaby-single-post .entry-content :is(
	.sb-cro-inline--article_first_answer,
	.sb-cro-inline--article_content_28,
	.sb-cro-inline--article_after_intro
) {
	display: none !important;
}

body.sleepbaby-single-post .entry-content p {
	margin-block: 0 1.02em !important;
}

body.sleepbaby-single-post .entry-content :is(h2, h3, h4) {
	font-family: "Times New Roman", Times, serif !important;
	font-style: normal !important;
	text-wrap: balance;
	scroll-margin-top: 92px;
}

body.sleepbaby-single-post .entry-content h2 {
	max-width: 23ch;
	margin-block: 1.72em .52em !important;
	padding-block-start: .58em !important;
	border-block-start: 1px solid var(--sb251-line) !important;
	color: #251d28 !important;
	background: transparent !important;
	font-size: clamp(1.85rem, 3vw, 2.42rem) !important;
	letter-spacing: -.024em !important;
	line-height: 1.08 !important;
}

body.sleepbaby-single-post .entry-content h3 {
	max-width: 29ch;
	margin-block: 1.48em .44em !important;
	color: #302536 !important;
	font-size: clamp(1.42rem, 2.2vw, 1.8rem) !important;
	letter-spacing: -.016em !important;
	line-height: 1.14 !important;
}

body.sleepbaby-single-post .entry-content h4 {
	color: #382c3d !important;
	font-size: 1.18em !important;
	line-height: 1.2 !important;
}

body.sleepbaby-single-post .entry-content a:not(.sb-cro-cta):not(.wp-block-button__link):not(.wp-element-button) {
	color: #3e4f78;
	font-weight: 700;
	text-decoration-thickness: 1.5px;
	text-underline-offset: 3px;
}

body.sleepbaby-single-post .entry-content a:not(.sb-cro-cta):not(.wp-block-button__link):visited {
	color: #66466d;
}

body.sleepbaby-single-post .entry-content :is(img, video, iframe, embed, object, table) {
	max-width: 100%;
}

body.sleepbaby-single-post .entry-content :is(figure, picture) img {
	display: block;
	height: auto;
}

body.sleepbaby-single-post .entry-content :is(summary, button, [role="button"], input, select, textarea) {
	min-height: 44px;
}

body.sleepbaby-single-post .entry-content summary {
	display: flex;
	align-items: center;
	cursor: pointer;
}

body.sleepbaby-single-post .entry-content :is(.wp-block-table, table) {
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

body.sleepbaby-single-post .entry-content :is(.sb-cro-inline--article_content_55, .sb-cro-inline--article_mid_content) {
	margin-block: 1.55em 1.65em !important;
	padding: 18px 0 18px 18px !important;
	border: 0 !important;
	border-block: 1px solid var(--sb251-line) !important;
	border-inline-start: 3px solid var(--sb251-teal) !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

/* Deterministic safety for authored inline dark panels. This exact signature
 * covers the four-stop evening handoff and equivalent article components. */
body.sleepbaby-single-post .entry-content :is(
	[style*="background:linear-gradient"][style*="color:#fff"],
	[style*="background: linear-gradient"][style*="color: #fff"],
	[style*="background:linear-gradient"][style*="color: #fff"],
	[style*="background: linear-gradient"][style*="color:#fff"]
) {
	color: #fffaf1 !important;
	-webkit-text-fill-color: #fffaf1 !important;
	background-color: #2f2340 !important;
}

body.sleepbaby-single-post .entry-content :is(
	[style*="background:linear-gradient"][style*="color:#fff"],
	[style*="background: linear-gradient"][style*="color: #fff"],
	[style*="background:linear-gradient"][style*="color: #fff"],
	[style*="background: linear-gradient"][style*="color:#fff"]
) :is(h1, h2, h3, h4, h5, h6, p, li, span, small, strong, b, em) {
	color: #fffaf1 !important;
	-webkit-text-fill-color: #fffaf1 !important;
	opacity: 1 !important;
}

body.sleepbaby-single-post .entry-content :is(
	[style*="background:linear-gradient"][style*="color:#fff"],
	[style*="background: linear-gradient"][style*="color: #fff"],
	[style*="background:linear-gradient"][style*="color: #fff"],
	[style*="background: linear-gradient"][style*="color:#fff"]
) :is(a, a:visited) {
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
	text-decoration-color: #fff !important;
}

body.sleepbaby-single-post .site-footer :is(p, a, span, strong, em, small, li) {
	color: #f8f5f0 !important;
	-webkit-text-fill-color: #f8f5f0 !important;
	opacity: 1 !important;
}

body.sleepbaby-single-post :is(
	a,
	button,
	input,
	select,
	textarea,
	summary,
	[role="button"]
):focus-visible {
	outline: 3px solid var(--sb251-focus) !important;
	outline-offset: 3px !important;
	box-shadow: none !important;
}

@media (max-width: 767px) {
	body.sleepbaby-single-post .content-shell--article {
		width: 100% !important;
		padding: 24px 18px 0 !important;
		border-inline: 0 !important;
		border-radius: 0 !important;
		box-shadow: none !important;
	}

	body.sleepbaby-single-post .entry-header {
		margin-bottom: 18px !important;
	}

	body.sleepbaby-single-post .entry-title,
	body.sleepbaby-single-post .entry-title--medium,
	body.sleepbaby-single-post .entry-title--long {
		max-width: 100% !important;
		font-size: clamp(2.08rem, 10vw, 3rem) !important;
		line-height: 1.01 !important;
	}

	body.sleepbaby-single-post .entry-title--long {
		font-size: clamp(1.94rem, 9.1vw, 2.7rem) !important;
	}

	body.sleepbaby-single-post .entry-meta-row {
		margin-top: 13px;
	}

	body.sleepbaby-single-post .entry-featured {
		margin-bottom: 22px !important;
		border-radius: 9px !important;
	}

	body.sleepbaby-single-post .entry-content {
		font-size: 18.25px !important;
		line-height: 1.62 !important;
	}

	body.sleepbaby-single-post .entry-content [data-sb-article-answer="true"] {
		padding: 19px 17px !important;
		border-inline-start-width: 3px !important;
		border-radius: 9px !important;
	}

	body.sleepbaby-single-post .entry-content .sb-article-route-bar,
	body.sleepbaby-single-post .entry-content .sb-article-route-bar:is(.sb-cro-variant--april *) {
		grid-template-columns: minmax(0, 1fr) !important;
		grid-template-areas: "workshop" "purchase" "home" !important;
		gap: 5px !important;
		padding: 13px 14px 10px !important;
	}

	body.sleepbaby-single-post .sb-article-route-bar__purchase,
	body.sleepbaby-single-post .sb-article-route-bar__home {
		width: 100%;
		justify-content: center;
		justify-self: stretch;
	}

	body.sleepbaby-single-post .sb-article-route-bar__purchase {
		min-width: 0;
		min-height: 50px !important;
	}

	body.sleepbaby-single-post .entry-content h2 {
		font-size: clamp(1.72rem, 8vw, 2.18rem) !important;
	}
}

@media (max-width: 390px) {
	body.sleepbaby-single-post .entry-meta-row {
		gap: 4px 12px;
	}

	body.sleepbaby-single-post .entry-reading-time::before {
		margin-inline-end: 12px;
	}

	body.sleepbaby-single-post .entry-content [data-sb-article-answer="true"] {
		margin-inline: -2px !important;
	}
}

@media (max-width: 300px) {
	body.sleepbaby-single-post .content-shell--article {
		padding-inline: 12px !important;
	}

	body.sleepbaby-single-post .entry-title,
	body.sleepbaby-single-post .entry-title--medium,
	body.sleepbaby-single-post .entry-title--long {
		font-size: 1.92rem !important;
		letter-spacing: -.032em !important;
	}

	body.sleepbaby-single-post .entry-content {
		font-size: 17px !important;
	}

	body.sleepbaby-single-post .entry-content [data-sb-article-answer="true"],
	body.sleepbaby-single-post .entry-content .sb-article-route-bar {
		padding-inline: 12px !important;
	}
}

@media (hover: hover) and (pointer: fine) {
	body.sleepbaby-single-post .entry-featured img {
		transition: transform 240ms ease;
	}

	body.sleepbaby-single-post .entry-featured:hover img {
		transform: scale(1.006);
	}
}

@media (prefers-reduced-motion: reduce) {
	body.sleepbaby-single-post *,
	body.sleepbaby-single-post *::before,
	body.sleepbaby-single-post *::after {
		scroll-behavior: auto !important;
		animation: none !important;
		transition: none !important;
	}
}

@media (forced-colors: active) {
	body.sleepbaby-single-post :is(
		.content-shell--article,
		.entry-content [data-sb-article-answer="true"],
		.entry-content .sb-article-route-bar,
		.entry-content .sb-cro-inline
	) {
		border: 2px solid CanvasText !important;
		box-shadow: none !important;
	}

	body.sleepbaby-single-post .entry-content :is(
		.sb-cro-inline--article_first_answer,
		.sb-cro-inline--article_content_28,
		.sb-cro-inline--article_after_intro
	) {
		display: none !important;
	}
}

@supports not (overflow: clip) {
	body.sleepbaby-single-post .site-main {
		overflow-x: hidden;
	}
}
