/**
 * Bayt blog reading layer.
 *
 * Long-form reading experience for single posts: a single centred measure,
 * larger body type, generous rhythm, quiet chrome. Uses the established Bayt
 * brand language (Bricolage Grotesque display / Plus Jakarta Sans text,
 * ink #0f172a, body #2f313a, accent #9d4300) — no new visual system.
 *
 * Scoped entirely under body.single-post so nothing leaks into archives,
 * landing pages, or Houzez templates. Loaded only on single posts (see
 * bayt_blog_reading_enqueue in functions.php).
 */

/* ---------------------------------------------------------------- column */

/* One centred reading column; the sidebar's recirculation widgets pull a
 * reader out of the article, so single posts drop them entirely. */
body.single-post .blog-wrap .row {
	justify-content: center;
}

body.single-post .blog-wrap [class*="col-lg-4"] {
	display: none;
}

body.single-post .blog-wrap .bt-content-wrap {
	flex: 0 0 auto;
	max-width: 800px;
	width: 100%;
}

body.single-post .blog-wrap {
	padding-bottom: clamp(48px, 8vw, 96px);
}

/* ------------------------------------------------------------ post header */

body.single-post .post-title-wrap h1 {
	color: #0f172a;
	font-family: "Bricolage Grotesque", "Plus Jakarta Sans", system-ui, sans-serif;
	font-size: clamp(1.9rem, 1.35rem + 2.2vw, 2.75rem);
	letter-spacing: -0.02em;
	line-height: 1.12;
	margin: 8px 0 14px;
	text-wrap: balance;
}

body.single-post .post-meta-wrap,
body.single-post .bayt-eeat-byline {
	align-items: center;
	color: #5b5d66;
	display: flex;
	flex-wrap: wrap;
	font-size: 0.9375rem;
	gap: 10px;
	line-height: 1.5;
}

body.single-post .bayt-eeat-byline {
	margin: 0 0 22px;
}

body.single-post .bayt-eeat-byline__avatar {
	border-radius: 50%;
	flex: 0 0 auto;
}

body.single-post .bayt-eeat-byline__text p {
	margin: 0;
}

body.single-post .bayt-eeat-byline__by {
	color: #0f172a;
	font-weight: 600;
}

body.single-post .bayt-eeat-byline__dates {
	color: #5b5d66;
	font-size: 0.875rem;
}

body.single-post .post-thumbnail-wrap {
	margin: 6px 0 30px;
}

body.single-post .post-thumbnail-wrap img {
	border-radius: 14px;
	height: auto;
	width: 100%;
}

/* -------------------------------------------------------------- the prose */

body.single-post .post-content-wrap {
	color: #2f313a;
	font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.1875rem);
	line-height: 1.75;
}

body.single-post .post-content-wrap p {
	margin: 0 0 1.4em;
	max-width: 70ch;
	text-wrap: pretty;
}

body.single-post .post-content-wrap h2,
body.single-post .post-content-wrap h3,
body.single-post .post-content-wrap h4 {
	color: #0f172a;
	font-family: "Bricolage Grotesque", "Plus Jakarta Sans", system-ui, sans-serif;
	line-height: 1.18;
	max-width: 30ch;
	text-wrap: balance;
}

body.single-post .post-content-wrap h2 {
	font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem);
	letter-spacing: -0.015em;
	margin: 2em 0 0.6em;
}

body.single-post .post-content-wrap h3 {
	font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
	margin: 1.7em 0 0.55em;
}

body.single-post .post-content-wrap h4 {
	font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
	margin: 1.5em 0 0.5em;
}

body.single-post .post-content-wrap strong,
body.single-post .post-content-wrap b {
	color: #0f172a;
}

body.single-post .post-content-wrap a {
	color: #0f172a;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

body.single-post .post-content-wrap a:hover {
	color: #9d4300;
}

body.single-post .post-content-wrap a:focus-visible {
	border-radius: 4px;
	outline: 3px solid #9d4300;
	outline-offset: 2px;
}

body.single-post .post-content-wrap ul,
body.single-post .post-content-wrap ol {
	margin: 0 0 1.4em;
	max-width: 68ch;
	padding-left: 1.35em;
}

body.single-post .post-content-wrap li {
	margin: 0 0 0.55em;
	text-wrap: pretty;
}

body.single-post .post-content-wrap li > ul,
body.single-post .post-content-wrap li > ol {
	margin: 0.55em 0 0;
}

body.single-post .post-content-wrap li p {
	margin: 0 0 0.4em;
}

body.single-post .post-content-wrap blockquote {
	color: #0f172a;
	font-size: 1.08em;
	line-height: 1.6;
	margin: 2em 0;
	max-width: 62ch;
	padding: 0.2em 1.5em;
}

body.single-post .post-content-wrap hr {
	background: #e2dde1;
	border: 0;
	height: 1px;
	margin: 2.6em 0;
}

/* Article imagery gets the full column; text keeps the 70ch measure. */
body.single-post .post-content-wrap img:not(.emoji) {
	border-radius: 12px;
	display: block;
	height: auto;
	margin: 2em 0;
	max-width: 100%;
}

/* WP core emoji styles are stripped on posts for performance, so inline
 * emoji <img> tags (which carry huge width/height attributes) must be
 * pinned to text size here or they render enormous. */
body.single-post .post-content-wrap img.emoji {
	border-radius: 0;
	display: inline-block;
	height: 1em;
	margin: 0 0.07em;
	vertical-align: -0.1em;
	width: 1em;
}

body.single-post .post-content-wrap table {
	border-collapse: collapse;
	color: #45464d;
	display: block;
	font-size: 0.9em;
	line-height: 1.55;
	margin: 0 0 1.6em;
	max-width: 100%;
	overflow-x: auto;
}

body.single-post .post-content-wrap th,
body.single-post .post-content-wrap td {
	border-bottom: 1px solid #e2dde1;
	padding: 12px 14px;
	text-align: left;
	vertical-align: top;
}

body.single-post .post-content-wrap th {
	background: #f6f3f5;
	color: #0f172a;
	font-weight: 700;
}

/* ------------------------------------------------------- author box, tags */

body.single-post .bayt-eeat-author {
	background: #f6f3f5;
	border-radius: 14px;
	display: flex;
	gap: 18px;
	margin: 40px 0 0;
	padding: 22px 24px;
}

body.single-post .bayt-eeat-author__avatar {
	border-radius: 50%;
	flex: 0 0 auto;
}

body.single-post .bayt-eeat-author__body p {
	margin: 0 0 6px;
}

body.single-post .bayt-eeat-author__kicker {
	color: #5b5d66;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

body.single-post .bayt-eeat-author__name {
	color: #0f172a;
	font-weight: 700;
}

body.single-post .bayt-eeat-author__bio {
	color: #45464d;
	font-size: 0.9375rem;
	line-height: 1.6;
}

body.single-post .bayt-eeat-author__credentials {
	color: #45464d;
	font-size: 0.875rem;
	line-height: 1.5;
	margin: 8px 0 0;
	padding-left: 1.2em;
}

@media (max-width: 560px) {
	body.single-post .bayt-eeat-author {
		flex-direction: column;
		gap: 12px;
	}
}

/* --------------------------------------------------------- related posts */

/* Houzez's related-card excerpt can dump an entire article of plain text
 * into the card (houzez_clean_excerpt misfires on some posts). Clamp the
 * card body so related posts stay a quiet three-line teaser. */
body.single-post .related-posts-wrap .blog-post-body {
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	display: -webkit-box;
	overflow: hidden;
}

body.single-post .related-posts-wrap h2 {
	color: #0f172a;
	font-family: "Bricolage Grotesque", "Plus Jakarta Sans", system-ui, sans-serif;
	font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.7rem);
	margin: 40px 0 18px;
}

body.single-post .related-posts-wrap .blog-post-title h3 {
	font-size: 1.05rem;
	line-height: 1.35;
	text-wrap: balance;
}
