/* Mag owns this asset; only single WordPress Posts using Blocksy load it.
 * Match Artist surfaces without targeting breadcrumbs or global chrome. */
.single-post #main > [class*="ct-container"] {
	--theme-container-width: min(1240px, var(--theme-container-width-base));
	--theme-narrow-container-max-width: 1240px;
}

.single-post article.type-post > :is(.ct-featured-image, .hero-section, .entry-content) {
	width: min(1240px, var(--theme-container-width-base, 90vw));
	margin-inline: auto;
}

.single-post article.type-post > .ct-featured-image {
	/* Blocksy adds a separate 50px image gap before the padded title card. */
	padding-bottom: 0;
	margin-block: 0;
	border: 1px solid #d9dee1;
	border-bottom: 0;
	border-radius: 26px 26px 0 0;
	background: var(--theme-palette-color-8, #fff);
	overflow: hidden;
}

.single-post article.type-post > .ct-featured-image .ct-media-container {
	border-radius: inherit;
	height: clamp(150px, 25vw, 270px);
}

.single-post article.type-post > .ct-featured-image img {
	height: 100%;
	object-fit: cover;
}

.single-post article.type-post > .hero-section[data-type="type-1"] {
	margin-block: 0 clamp(1.75rem, 4vw, 3rem);
	padding: 0 2rem .625rem;
	border: 1px solid #d9dee1;
	border-radius: 26px;
	background: var(--theme-palette-color-8, #fff);
}

.single-post article.type-post > .ct-featured-image + .hero-section[data-type="type-1"] {
	border-top: 0;
	border-radius: 0 0 26px 26px;
}

.single-post article.type-post > .hero-section .entry-header {
	text-align: center;
	align-items: center;
}

.single-post article.type-post > .hero-section .page-title {
	/* Account for the Persian font's large visible inset within its line box. */
	margin: -.9em 0 0;
	font-size: clamp(1.6rem, 4vw, 30px);
	line-height: 1.35;
	text-align: center;
}

.single-post article.type-post > .hero-section .page-description {
	display: none;
}

.single-post article.type-post > .hero-section .entry-meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .375rem;
	margin-top: calc(.25rem + 10px);
	font-size: 12px;
	font-weight: 400;
	line-height: 1.5;
}

.single-post article.type-post > .hero-section .entry-meta > li {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .35rem;
	min-height: 28px;
	margin: 0;
	padding: .1875rem .5rem;
	border: 1px solid #e9ebec;
	border-radius: 999px;
	background: #fafbfc;
	color: #727b80;
	font-weight: 400;
}

.single-post article.type-post > .hero-section .entry-meta > li::before,
.single-post article.type-post > .hero-section .entry-meta > li::after {
	display: none;
}

.single-post article.type-post > .hero-section .entry-meta a {
	color: inherit;
	font-weight: inherit;
}

.single-post article.type-post > .hero-section .entry-meta a:hover,
.single-post article.type-post > .hero-section .entry-meta a:focus-visible {
	color: var(--theme-palette-color-1, #ff6310);
}

.single-post article.type-post > .entry-content {
	width: min(1240px, calc(var(--theme-container-edge-spacing, 90vw) - var(--theme-frame-size, 0px) * 2));
	/* Native full-width block math must use the padded card's content box. */
	--theme-container-width-base: 100%;
	--theme-block-width: 100%;
	--theme-block-max-width: 100%;
	--theme-wide-block-max-width: 100%;
	padding: clamp(1rem, 2.8vw, 1.65rem);
	border: 1px solid var(--theme-palette-color-5, #e9ebec);
	border-radius: 26px;
	background: var(--theme-palette-color-8, #fff);
}

.single-post article.type-post > .entry-content > :not(.alignleft):not(.alignright) {
	max-width: 100%;
	margin-inline: auto;
}

@media (max-width: 767px) {
	.single-post article.type-post > .ct-featured-image .ct-media-container {
		height: clamp(138px, 42vw, 190px);
	}
	.single-post article.type-post > .ct-featured-image {
		border-radius: 17px 17px 0 0;
	}
	.single-post article.type-post > .hero-section[data-type="type-1"] {
		padding: 0 1rem .625rem;
		border-radius: 17px;
		margin-bottom: 1.15rem;
	}
	.single-post article.type-post > .ct-featured-image + .hero-section[data-type="type-1"] {
		border-radius: 0 0 17px 17px;
	}
	.single-post article.type-post > .hero-section .entry-meta {
		gap: .42rem;
	}
	.single-post article.type-post > .entry-content {
		border-radius: 17px;
	}
}

/* Article body and navigation share the existing card. RTL puts navigation right. */
.single-post article.type-post > .entry-content {
 /* Override the theme’s article top-padding reset. */
 padding-top: clamp(1.5rem, 2.2vw, 2rem) !important;
 padding-bottom: clamp(1.5rem, 2.2vw, 2rem) !important;
}
.mw-mag-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; direction: rtl; align-items: start; }
.mw-mag-body, .mw-mag-sidebar { min-width: 0; }
.mw-mag-body > :first-child { margin-block-start: 0; }
.single-post .entry-content .mw-mag-body h2 { font-size: 1.35em; }
.single-post .entry-content .mw-mag-body h3 { font-size: 1.2em; }
.single-post .entry-content .mw-mag-body :is(h4,h5,h6) { font-size: 1.08em; }
.single-post .entry-content .mw-mag-body :is(h2,h3,h4,h5,h6) { line-height: 1.8; margin-block: 1.8em .65em; scroll-margin-top: 140px; }
.mw-mag-body :is(img,video,iframe) { max-width: 100%; }
.mw-mag-body { overflow-wrap: anywhere; }
.mw-mag-sidebar { padding: 1rem; border: 1px solid #e9ebec; border-radius: 16px; font-size: .9em; }
.mw-mag-toc summary { cursor: pointer; font-weight: 600; padding-block: .5rem; }
.mw-mag-toc nav { max-height: 45vh; overflow-y: auto; margin-block-start: .75rem; }
.mw-mag-toc ol { margin: 0; padding-inline-start: 1.4em; }
.mw-mag-toc li { margin-block: .5rem; }
.mw-mag-toc-level-3 { margin-inline-start: .6rem; }
.mw-mag-toc-level-4 { margin-inline-start: 1.2rem; }
.mw-mag-toc a { color: inherit; }
.mw-mag-toc a:hover { color: var(--theme-palette-color-1, #ff6310); }
.mw-mag-share { margin-block-start: 1rem; padding-block-start: 1rem; border-top: 1px solid #e9ebec; }
.mw-mag-share p { font-weight: 600; margin-block: 0 .75rem; }
.mw-mag-share-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .35rem; }
.mw-mag-share-links :is(a,button) { display: inline-flex; justify-content: center; align-items: center; padding: .4rem .2rem; min-width: 0; white-space: nowrap; min-height: 40px; border: 1px solid #d9dee1; border-radius: 8px; background: transparent; color: inherit; font: inherit; cursor: pointer; }

@media (min-width: 1000px) {
 .mw-mag-layout { grid-template-columns: minmax(0, 3fr) minmax(0, 7fr); }
 .mw-mag-sidebar { position: sticky; top: 120px; max-height: calc(100dvh - 144px); overflow-y: auto; }
}
@media (min-width: 1000px) {
 /* Native sidebar rules reset aside offsets; keep this article-only inset. */
 .single-post article.type-post .mw-mag-sidebar { top: 120px !important; }
}

/* Balanced card edges and a gently tinted table of contents. */
.mw-mag-body > :last-child,
.mw-mag-body > :last-child > :last-child { margin-block-end: 0 !important; }
.mw-mag-toc { background: #fff7f0; border: 1px solid #f3dfce; border-radius: 10px; padding: .5rem .75rem; }
.mw-mag-toc summary { color: #85421f; }
.mw-mag-toc li::marker { color: #aa572b; }
.mw-mag-toc a { color: #634c40; }
.mw-mag-toc a:is(:hover,:focus-visible) { color: #b6420c; }
.mw-mag-share-links :is(a,button) { transition: background-color .18s ease, border-color .18s ease, color .18s ease; }
.mw-mag-share-links :is(a,button):focus-visible { background: #fff0e4; border-color: #e66b28; color: #873712; outline: 2px solid #e66b28; outline-offset: 2px; }
@media (hover: hover) {
 .mw-mag-share-links :is(a,button):hover { background: #fff0e4; border-color: #e66b28; color: #873712; }
}
.mw-mag-share-links :is(a,button):active,
.mw-mag-share-links .mw-mag-copy.is-copied { background: #ffe0c8; border-color: #d65a1b; color: #78300f; }
@media (prefers-reduced-motion: reduce) {
 .mw-mag-share-links :is(a,button) { transition: none; }
}
/* Consistent image corners across all article bodies. */
.single-post .entry-content .mw-mag-body img { border-radius: 12px !important; }

/* A leading heading must not add section spacing to the card padding. */
.single-post .entry-content .mw-mag-body > :first-child,
.single-post .entry-content .mw-mag-body > div:first-child > :first-child {
 margin-block-start: 0 !important;
}

@media (max-width: 999px) {
 .mw-mag-share-links { gap: .25rem; }
 .mw-mag-share-links :is(a,button) { font-size: clamp(10px, 3vw, 13px); min-height: 40px; padding-inline: 2px; }
}

/* One spacing scale for the title card above and below its contents. */
.single-post article.type-post > .hero-section[data-type="type-1"] {
 padding-block: clamp(20px, 2vw, 28px);
}
.single-post article.type-post > .hero-section .entry-header {
 display: flex; flex-direction: column; gap: 12px;
}
.single-post article.type-post > .hero-section .page-title {
 margin: 0 !important; padding: 0;
}
.single-post article.type-post > .hero-section .entry-meta {
 margin-block: 0 !important;
}

/* Article images and their credits form one connected, responsive card. */
.single-post .mw-mag-body :is(figure:has(> figcaption), .wp-caption) {
 display: flex;
 flex-direction: column;
 width: 100%;
 max-width: 100%;
 margin: 1.5rem 0;
 padding: 0;
 overflow: hidden;
 border: 1px solid #e8dfd7;
 border-radius: 14px;
 background: #fff8f2;
}
.single-post .entry-content .mw-mag-body :is(figure:has(> figcaption), .wp-caption) img {
 display: block;
 width: 100%;
 height: auto;
 margin: 0;
 border-radius: 0 !important;
}
.single-post .mw-mag-body :is(figure:has(> figcaption), .wp-caption) > a {
 display: block;
}
.single-post .mw-mag-body :is(figcaption, .wp-caption-text) {
 margin: 0;
 padding: 12px 16px;
 border-top: 1px solid #e8dfd7;
 background: #fff8f2;
 color: #66564b;
 font-size: 13px;
 line-height: 1.9;
 text-align: right;
 overflow-wrap: anywhere;
}
.single-post .mw-mag-body :is(figcaption, .wp-caption-text) a {
 color: #a5471c;
 text-decoration: underline;
 text-underline-offset: 3px;
}
@media (max-width: 767px) {
 .single-post .mw-mag-body :is(figcaption, .wp-caption-text) { padding: 10px 12px; font-size: 12px; }
}
/* Avoid adding figure spacing to the next section's heading margin. */
.single-post .mw-mag-body :is(figure, .wp-caption):has(+ :is(h2,h3,h4)) {
 margin-block-end: 0;
}
.single-post .entry-content .mw-mag-body :is(figure, .wp-caption) + :is(h2,h3,h4) {
 margin-block-start: 16px;
}

/* Mirror only the native previous/next arrow artwork for RTL articles. */
.rtl.single-post .post-navigation .ct-media-container > svg polygon {
 transform: scaleX(-1);
 transform-box: fill-box;
 transform-origin: center;
}
