/**
 * Blog detail refinements layered over the captured Dermix stylesheet.
 */

.blog-detail-page .page-header {
	background-image: url("../images/performance/page-header-bg-v1.webp");
	background-position: center center;
}

.blog-detail-page .page-header::before {
	background:
		linear-gradient(180deg, rgb(31 31 26 / 82%) 0%, rgb(31 31 26 / 22%) 31%, rgb(31 31 26 / 12%) 55%, rgb(31 31 26 / 58%) 100%),
		linear-gradient(90deg, rgb(31 31 26 / 90%) 0%, rgb(31 31 26 / 72%) 35%, rgb(31 31 26 / 23%) 68%, rgb(31 31 26 / 8%) 100%);
}

.blog-detail-page .page-header--article-image {
	background-color: var(--primary-color);
}

.blog-detail-page .page-header-box h1 {
	max-width: 820px;
	cursor: default;
}

.blog-detail-page .post-single-meta ol {
	gap: 0;
	padding: 0;
	list-style: none;
}

.blog-detail-page .post-single-meta ol li {
	display: inline-flex;
	align-items: center;
}

.blog-detail-page .post-single-meta a {
	color: inherit;
	text-decoration: none;
}

.blog-detail-page .post-single-meta a:hover,
.blog-detail-page .post-single-meta a:focus-visible {
	color: var(--accent-color);
}

.blog-detail-page .post-single-meta a:focus-visible {
	outline: 2px solid currentcolor;
	outline-offset: 4px;
}

.blog-detail-category-links {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0 7px;
	align-items: center;
}

.blog-detail-category-separator {
	opacity: 0.75;
}

.blog-detail-meta-icon {
	width: 19px;
	height: 19px;
	margin-right: 6px;
	fill: none;
	stroke: currentcolor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.blog-detail-page .post-image figure {
	margin: 0;
}

.blog-detail-page {
	display: flex;
	flex-direction: column;
}

.blog-detail-page .blog-detail-stack {
	display: flex;
	flex-direction: column;
}

.blog-detail-page .post-entry blockquote {
	position: relative;
	background-image: none;
}

.blog-detail-page .post-entry blockquote::before {
	position: absolute;
	top: 24px;
	left: 31px;
	font-family: Georgia, serif;
	font-size: 70px;
	font-weight: 700;
	line-height: 1;
	color: var(--accent-color);
	content: "“";
}

.blog-detail-page .post-entry h2 {
	max-width: 980px;
	margin-top: 1.2em;
	margin-bottom: 0.48em;
	font-size: clamp(31px, calc(3vw - 7px), 35px);
	line-height: 1.15;
	text-wrap: balance;
}

.blog-detail-page .post-entry h3 {
	max-width: 920px;
	margin-top: 0.95em;
	margin-bottom: 0.44em;
	font-size: clamp(23px, calc(2.2vw - 5px), 26px);
	line-height: 1.18;
	text-wrap: balance;
}

.blog-detail-page .post-entry li::marker {
	color: var(--accent-color);
}

.blog-detail-page .post-entry strong {
	color: var(--primary-color);
}

.blog-detail-page .skin-test-shell {
	margin: clamp(38px, 6vw, 74px) 0;
	padding: clamp(22px, 4vw, 48px);
	border: 1px solid rgb(27 46 63 / 13%);
	border-radius: 18px;
	background: linear-gradient(145deg, #f9f6f0, #f0ece4);
}

.blog-detail-page .skin-test-card {
	max-width: 760px;
	margin: 0 auto;
	padding: clamp(24px, 4vw, 48px);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 18px 44px rgb(28 33 34 / 8%);
}

.blog-detail-page .skin-test-card:focus { outline: 3px solid var(--accent-color); outline-offset: 5px; }
.blog-detail-page .skin-test-eyebrow { margin: 0 0 10px; color: var(--accent-color); font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.blog-detail-page .skin-test-card h2 { margin-top: 0; }
.blog-detail-page .skin-test-note { color: #52616b; font-size: .98rem; }
.blog-detail-page .skin-test-progress { display: grid; gap: 8px; margin-bottom: 28px; color: #52616b; font-weight: 700; }
.blog-detail-page .skin-test-progress > div { height: 7px; overflow: hidden; border-radius: 99px; background: #e6e8e5; }
.blog-detail-page .skin-test-progress i { display: block; height: 100%; border-radius: inherit; background: var(--accent-color); transition: width .2s ease; }
.blog-detail-page .skin-test-question fieldset { display: grid; gap: 12px; margin: 28px 0 12px; padding: 0; border: 0; }
.blog-detail-page .skin-test-option { display: flex; gap: 12px; align-items: flex-start; padding: 15px 16px; border: 1px solid #d9ddd9; border-radius: 10px; cursor: pointer; color: #263e52; font-weight: 600; }
.blog-detail-page .skin-test-option:has(input:checked) { border-color: var(--accent-color); background: #fff8ee; }
.blog-detail-page .skin-test-option input { width: 1.15rem; height: 1.15rem; margin-top: .15rem; accent-color: var(--accent-color); }
.blog-detail-page .skin-test-option:focus-within, .blog-detail-page .skin-test-primary:focus-visible, .blog-detail-page .skin-test-secondary:focus-visible { outline: 3px solid #1d668d; outline-offset: 3px; }
.blog-detail-page .skin-test-actions { display: flex; justify-content: space-between; gap: 16px; margin-top: 26px; }
.blog-detail-page .skin-test-primary, .blog-detail-page .skin-test-secondary { min-height: 48px; padding: 11px 22px; border: 0; border-radius: 8px; font: inherit; font-weight: 700; cursor: pointer; }
.blog-detail-page .skin-test-primary { color: #fff; background: var(--accent-color); }
.blog-detail-page .skin-test-secondary { color: var(--primary-color); background: #edf0ee; }
.blog-detail-page .skin-test-secondary:disabled { opacity: .55; cursor: not-allowed; }
.blog-detail-page .skin-test-error { min-height: 1.5em; margin: 0; color: #a42319; font-weight: 700; }
.blog-detail-page .skin-test-findings, .blog-detail-page .skin-test-guidance { margin-top: 28px; padding-top: 24px; border-top: 1px solid #e5e7e4; }
.blog-detail-page .skin-test-result-summary { font-size: 1.16rem; }
.blog-detail-page .skin-test-result li { margin-bottom: 10px; }

@media (prefers-reduced-motion: reduce) { .blog-detail-page .skin-test-progress i { transition: none; } }
@media (max-width: 575px) { .blog-detail-page .skin-test-shell { margin-inline: -4px; padding: 15px; } .blog-detail-page .skin-test-card { padding: 23px 19px; } .blog-detail-page .skin-test-actions { flex-direction: column-reverse; } .blog-detail-page .skin-test-actions button, .blog-detail-page .skin-test-start button { width: 100%; } }

.blog-detail-page .post-tags .tag-links {
	display: flex;
	gap: 12px;
	align-items: center;
	width: 100%;
	font-weight: 700;
	text-transform: none;
}

.blog-detail-page .post-tags .tag-links a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 13px 22px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.15;
	text-align: center;
	text-transform: none;
	box-shadow: 0 8px 20px rgb(206 155 88 / 10%);
}

.blog-detail-page .post-social-sharing a,
.blog-detail-page .post-social-sharing button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	color: var(--white-color);
	cursor: pointer;
	background: var(--accent-color);
	border: 0;
	border-radius: 100px;
	transition: all 0.4s ease-in-out;
}

.blog-detail-page .post-social-sharing button:hover,
.blog-detail-page .post-social-sharing button:focus,
.blog-detail-page .post-social-sharing a:hover,
.blog-detail-page .post-social-sharing a:focus {
	color: var(--white-color);
	background: var(--primary-color);
}

.blog-detail-page .post-entry a:focus-visible,
.blog-detail-page .post-tags a:focus-visible,
.blog-detail-page .post-social-sharing a:focus-visible,
.blog-detail-page .post-social-sharing button:focus-visible {
	outline: 3px solid var(--accent-color);
	outline-offset: 4px;
}

.related-posts {
	padding: 42px;
	margin-top: 56px;
	background: #f6eee4;
	border: 1px solid rgb(198 148 89 / 14%);
	border-radius: 28px;
	overflow: hidden;
}

.related-posts-header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 28px;
}

.related-posts-header h2 {
	margin: 0;
	font-size: clamp(30px, 3vw, 40px);
	font-weight: 600;
	line-height: 1.1;
	color: var(--primary-color);
	text-wrap: balance;
}

.related-posts-nav {
	display: flex;
	flex: 0 0 auto;
	gap: 10px;
}

.related-posts-nav[hidden] {
	display: none;
}

.related-posts-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0;
	color: var(--white-color);
	cursor: pointer;
	background: var(--accent-color);
	border: 0;
	border-radius: 50%;
	transition: color 180ms ease, background-color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.related-posts-arrow svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentcolor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.related-posts-arrow:hover:not(:disabled),
.related-posts-arrow:focus-visible {
	background: var(--primary-color);
	transform: translateY(-2px);
}

.related-posts-arrow:focus-visible,
.related-post-card:focus-visible {
	outline: 3px solid var(--accent-color);
	outline-offset: 4px;
}

.related-posts-arrow:disabled {
	opacity: 0.38;
	cursor: not-allowed;
	transform: none;
}

.related-posts-track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - 40px) / 3);
	gap: 20px;
	padding: 2px 2px 12px;
	margin: -2px -2px -12px;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
	scroll-padding-inline: 2px;
	scroll-snap-type: inline mandatory;
	scrollbar-width: none;
	overscroll-behavior-inline: contain;
}

.related-posts-track::-webkit-scrollbar {
	display: none;
}

.related-posts-track:focus-visible {
	outline: 3px solid rgb(198 148 89 / 65%);
	outline-offset: 4px;
	border-radius: 18px;
}

.related-post-card {
	min-width: 0;
	height: 100%;
	color: inherit;
	text-decoration: none;
	background: var(--white-color);
	border: 1px solid rgb(198 148 89 / 16%);
	border-radius: 20px;
	overflow: hidden;
	scroll-snap-align: start;
	transition: transform 220ms ease;
}

.related-post-card:hover {
	color: inherit;
	transform: translateY(-4px);
}

.related-post-card article {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.related-post-card-media {
	position: relative;
	flex: 0 0 auto;
	width: 100%;
	margin: 0;
	aspect-ratio: 16 / 10;
	overflow: hidden;
}

.related-post-card-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 420ms ease;
}

.related-post-card:hover .related-post-card-media img {
	transform: scale(1.035);
}

.related-post-card-category {
	position: absolute;
	bottom: 14px;
	left: 14px;
	max-width: calc(100% - 28px);
	padding: 8px 13px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.15;
	color: var(--white-color);
	text-overflow: ellipsis;
	white-space: nowrap;
	background: var(--accent-color);
	border-radius: 999px;
	overflow: hidden;
}

.related-post-card-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 22px;
}

.related-post-card-body h3 {
	display: -webkit-box;
	margin: 0 0 22px;
	font-size: clamp(19px, 1.7vw, 23px);
	font-weight: 600;
	line-height: 1.25;
	color: var(--primary-color);
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

.related-post-card-cta {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 8px;
	margin-top: auto;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--accent-color);
}

.related-post-card-cta span {
	font-size: 18px;
	line-height: 1;
	transition: transform 180ms ease;
}

.related-post-card:hover .related-post-card-cta span {
	transform: translateX(3px);
}

.blog-detail-page section,
.blog-detail-page article {
	scroll-margin-top: 90px;
}

.blog-detail-reveal-ready .blog-detail-page [data-reveal],
.blog-detail-reveal-ready .blog-detail-page [data-post-entry] > * {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 650ms ease var(--reveal-delay, 0s), transform 650ms ease var(--reveal-delay, 0s);
}

.blog-detail-reveal-ready .blog-detail-page [data-reveal].is-visible,
.blog-detail-reveal-ready .blog-detail-page [data-post-entry] > *.is-visible {
	opacity: 1;
	transform: translateY(0);
}

@media (max-width: 991px) {
	.blog-detail-page .post-social-sharing {
		text-align: left;
	}
}

@media (max-width: 1199px) {
	.related-posts {
		padding: 34px 30px;
	}

	.related-posts-track {
		grid-auto-columns: calc((100% - 18px) / 2);
		gap: 18px;
	}

	.blog-detail-page .post-entry h2 {
		font-size: clamp(23px, calc(3.4vw - 7px), 29px);
	}

	.blog-detail-page .post-entry h3 {
		font-size: clamp(19px, calc(2.7vw - 5px), 23px);
	}
}

@media (max-width: 767px) {
	.blog-detail-page .page-header::before {
		background:
			linear-gradient(180deg, rgb(31 31 26 / 86%) 0%, rgb(31 31 26 / 28%) 34%, rgb(31 31 26 / 32%) 58%, rgb(31 31 26 / 76%) 100%),
			linear-gradient(90deg, rgb(31 31 26 / 76%) 0%, rgb(31 31 26 / 35%) 100%);
	}

	.blog-detail-page .post-entry blockquote::before {
		top: 14px;
		left: 21px;
		font-size: 54px;
	}

	.blog-detail-page .post-entry h2 {
		margin-top: 1.12em;
		margin-bottom: 0.5em;
		font-size: clamp(20px, calc(7.6vw - 7px), 24px);
		line-height: 1.16;
	}

	.blog-detail-page .post-entry h3 {
		margin-top: 0.9em;
		margin-bottom: 0.46em;
		font-size: clamp(17px, calc(6vw - 5px), 20px);
		line-height: 1.18;
	}

	.blog-detail-page .post-tag-links .row {
		row-gap: 4px;
	}

	.blog-detail-page .post-tags .tag-links {
		gap: 10px;
		align-items: flex-start;
	}

	.blog-detail-page .post-tags .tag-links a {
		min-height: 42px;
		padding: 11px 16px;
		font-size: 15px;
	}

	.related-posts {
		padding: 26px 18px;
		margin-top: 42px;
		border-radius: 22px;
	}

	.related-posts-header {
		gap: 16px;
		margin-bottom: 22px;
	}

	.related-posts-header h2 {
		font-size: clamp(27px, 8vw, 31px);
	}

	.related-posts-arrow {
		width: 42px;
		height: 42px;
	}

	.related-posts-track {
		grid-auto-columns: 100%;
		gap: 14px;
	}

	.related-post-card-body {
		padding: 20px;
	}

	.related-post-card-body h3 {
		font-size: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.blog-detail-reveal-ready .blog-detail-page [data-reveal],
	.blog-detail-reveal-ready .blog-detail-page [data-post-entry] > * {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.related-posts-track {
		scroll-behavior: auto;
	}

	.related-posts-arrow,
	.related-post-card,
	.related-post-card-media img,
	.related-post-card-cta span {
		transition: none;
	}
}

/* Route-scoped hair-loss observation test. */
.blog-detail-page .hair-test-shell { margin: clamp(38px, 6vw, 74px) 0; padding: clamp(22px, 4vw, 48px); border: 1px solid rgb(27 46 63 / 13%); border-radius: 18px; background: linear-gradient(145deg, #f9f6f0, #f0ece4); }
.blog-detail-page .hair-test-card { max-width: 760px; margin: 0 auto; padding: clamp(24px, 4vw, 48px); border-radius: 14px; background: #fff; box-shadow: 0 18px 44px rgb(28 33 34 / 8%); }
.blog-detail-page .hair-test-card:focus { outline: 3px solid var(--accent-color); outline-offset: 5px; }
.blog-detail-page .hair-test-eyebrow { margin: 0 0 10px; color: var(--accent-color); font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.blog-detail-page .hair-test-card h2 { margin-top: 0; }
.blog-detail-page .hair-test-note, .blog-detail-page .hair-test-disclaimer { color: #52616b; font-size: .98rem; }
.blog-detail-page .hair-test-progress { display: grid; gap: 8px; margin-bottom: 28px; color: #52616b; font-weight: 700; }
.blog-detail-page .hair-test-progress > div { height: 7px; overflow: hidden; border-radius: 99px; background: #e6e8e5; }
.blog-detail-page .hair-test-progress i { display: block; height: 100%; border-radius: inherit; background: var(--accent-color); transition: width .2s ease; }
.blog-detail-page .hair-test-question fieldset { display: grid; gap: 12px; margin: 28px 0 12px; padding: 0; border: 0; }
.blog-detail-page .hair-test-option { display: flex; gap: 12px; align-items: flex-start; min-height: 48px; padding: 15px 16px; border: 1px solid #d9ddd9; border-radius: 10px; cursor: pointer; color: #263e52; font-weight: 600; }
.blog-detail-page .hair-test-option:has(input:checked) { border-color: var(--accent-color); background: #fff8ee; }
.blog-detail-page .hair-test-option:hover { border-color: rgb(206 155 88 / 72%); background: #fffaf3; }
.blog-detail-page .hair-test-option input { width: 1.15rem; height: 1.15rem; margin-top: .15rem; accent-color: var(--accent-color); }
.blog-detail-page .hair-test-option:focus-within, .blog-detail-page .hair-test-primary:focus-visible, .blog-detail-page .hair-test-secondary:focus-visible { outline: 3px solid #1d668d; outline-offset: 3px; }
.blog-detail-page .hair-test-actions { display: flex; justify-content: space-between; gap: 16px; margin-top: 26px; }
.blog-detail-page .hair-test-primary, .blog-detail-page .hair-test-secondary { min-height: 48px; padding: 11px 22px; border: 0; border-radius: 8px; font: inherit; font-weight: 700; cursor: pointer; }
.blog-detail-page .hair-test-primary { color: #fff; background: var(--accent-color); }
.blog-detail-page .hair-test-secondary { color: var(--primary-color); background: #edf0ee; }
.blog-detail-page .hair-test-primary:hover { background: var(--primary-color); }
.blog-detail-page .hair-test-secondary:hover { background: #dde4e1; }
.blog-detail-page .hair-test-secondary:disabled { opacity: .55; cursor: not-allowed; }
.blog-detail-page .hair-test-error { min-height: 1.5em; margin: 0; color: #a42319; font-weight: 700; }
.blog-detail-page .hair-test-findings, .blog-detail-page .hair-test-context, .blog-detail-page .hair-test-guidance { margin-top: 28px; padding-top: 24px; border-top: 1px solid #e5e7e4; }
.blog-detail-page .hair-test-result-summary { font-size: 1.16rem; }
.blog-detail-page .hair-test-result li { margin-bottom: 10px; }
.blog-detail-page .hair-test-result-actions { margin-top: 48px; }
@media (prefers-reduced-motion: reduce) { .blog-detail-page .hair-test-progress i { transition: none; } }
@media (max-width: 575px) { .blog-detail-page .hair-test-shell { margin-inline: -4px; padding: 15px; } .blog-detail-page .hair-test-card { padding: 23px 19px; } .blog-detail-page .hair-test-actions { flex-direction: column-reverse; } .blog-detail-page .hair-test-actions button, .blog-detail-page .hair-test-start button { width: 100%; } .blog-detail-page .hair-test-result-actions { margin-top: 32px; } }
