/* ===========================================================================
 * Single Edition Article — section-by-section stylesheet
 * Loaded only on body.is-edition-post via functions.php
 *
 * Sections will be appended below in subsequent passes.
 * ========================================================================= */


/* ---------------------------------------------------------------------------
 * 1. Tokens (shared with the category layout for visual consistency)
 * ------------------------------------------------------------------------- */

body.is-edition-post {
	--ed-teal:      #12aecf;
	--ed-teal-dark: #0d8aaa;
	--ed-ink:       #111111;
	--ed-ink-soft:  #333333;
	--ed-ink-light: #666666;
	--ed-white:     #ffffff;
	--ed-border:    rgba(17, 17, 17, 0.1);
}


/* ---------------------------------------------------------------------------
 * 2. HERO (article image + meta bar)
 * ------------------------------------------------------------------------- */

/* Full-bleed: break out of whatever container SmartMag wraps single posts
   in, so the hero spans edge-to-edge regardless of theme chrome. */
.is-edition-post .article-hero {
	position: relative;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	height: 520px;
	overflow: hidden;
	background: #171c20;
	box-sizing: border-box;
}
.is-edition-post .article-hero img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 30%;
	display: block;
	opacity: 0.85;
}
.is-edition-post .article-hero::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.65) 100%);
	pointer-events: none;
}

.is-edition-post .hero-meta-bar {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 2;
	max-width: 1440px;
	margin: 0 auto;
	padding: 0 2rem 2.5rem;
	box-sizing: border-box;
}
.is-edition-post .article-category-tag {
	display: inline-block;
	background: var(--ed-teal);
	color: var(--ed-white);
	font-family: 'Barlow', sans-serif;
	font-size: 0.6rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	font-weight: 800;
	padding: 5px 14px;
	border-radius: 2px;
	margin-bottom: 1rem;
}
.is-edition-post .article-hero-title {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: clamp(2rem, 4.5vw, 3.6rem);
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.01em;
	color: var(--ed-white);
	line-height: 1.05;
	max-width: 750px;
	margin: 0 0 1rem;
}
.is-edition-post .hero-byline {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	flex-wrap: wrap;
	color: rgba(255, 255, 255, 0.65);
	font-family: 'Barlow', sans-serif;
	font-size: 0.8rem;
}
.is-edition-post .hero-byline-author {
	color: var(--ed-white);
	font-weight: 600;
}
.is-edition-post .hero-byline-sep {
	opacity: 0.4;
}

/* --- Hero responsive ---------------------------------------------------- */

@media (max-width: 1440px) {
	.is-edition-post .article-hero-title {
		max-width: 500px;
	}
}

@media (max-width: 768px) {
	.is-edition-post .article-hero { height: 400px; }
	.is-edition-post .hero-byline { gap: 1rem; }
}


/* ---------------------------------------------------------------------------
 * 3. BREADCRUMB
 * ------------------------------------------------------------------------- */

/* Full-bleed: spans the same width as the hero above it, so the strip
   reads as a single design element. */
.is-edition-post .breadcrumb {
	position: relative;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	background: #f8f8f6;
	border-bottom: 1px solid var(--ed-border);
	padding: 10px 2rem;
	box-sizing: border-box;
}
.is-edition-post .breadcrumb-inner {
	max-width: 1440px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	font-family: 'Barlow', sans-serif;
	font-size: 0.7rem;
	color: var(--ed-ink-light);
}
.is-edition-post .breadcrumb a {
	color: var(--ed-teal);
	text-decoration: none;
}
.is-edition-post .breadcrumb a:hover {
	text-decoration: underline;
}
.is-edition-post .breadcrumb .sep {
	opacity: 0.4;
}


/* ---------------------------------------------------------------------------
 * 4. ARTICLE MAIN CONTENT
 *
 * Section 7 will wrap this in a 3-column grid alongside the sidebars.
 * For now it renders at the natural full width.
 * ------------------------------------------------------------------------- */

.is-edition-post .article-body {
	max-width: 760px;
	margin: 2.5rem auto 4rem;
	padding: 0 2rem;
	min-width: 0;
	box-sizing: border-box;
}

/* --- Share bar ---------------------------------------------------------- */

.is-edition-post .share-bar {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding-bottom: 1.5rem;
	margin-bottom: 2rem;
	border-bottom: 1px solid var(--ed-border);
}
.is-edition-post .share-label {
	font-family: 'Barlow', sans-serif;
	font-size: 0.62rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--ed-ink-light);
	font-weight: 700;
	margin-right: 0.25rem;
}
.is-edition-post .share-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 1px solid var(--ed-border);
	background: var(--ed-white);
	color: var(--ed-ink-light);
	transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
	text-decoration: none;
	cursor: pointer;
	padding: 0;
}
.is-edition-post .share-btn:hover,
.is-edition-post .share-btn:focus-visible {
	background: var(--ed-teal);
	border-color: var(--ed-teal);
	color: var(--ed-white);
}
.is-edition-post .share-btn.is-copied {
	background: var(--ed-teal-dark);
	border-color: var(--ed-teal-dark);
	color: var(--ed-white);
	transform: scale(1.08);
}
.is-edition-post .share-btn svg {
	width: 14px;
	height: 14px;
}

/* --- Article body text -------------------------------------------------- */

/* Auto-lead: the FIRST paragraph inside .article-text becomes the intro.
   :first-of-type ignores wrapper elements (figures, etc.) that might
   precede the prose. */
.is-edition-post .article-text > p:first-of-type {
	font-family: 'Playfair Display', serif;
	font-size: 1.18rem;
	font-style: italic;
	color: var(--ed-ink-soft);
	line-height: 1.75;
	margin-bottom: 2rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid var(--ed-border);
}

/* Body paragraphs */
.is-edition-post .article-text p {
	font-family: 'Barlow', sans-serif;
	font-size: 1rem;
	line-height: 1.85;
	color: var(--ed-ink-soft);
	margin-bottom: 1.4rem;
	font-weight: 400;
}

/* Subheadings inside the article body */
.is-edition-post .article-text h2 {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: 1.5rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--ed-ink);
	margin: 2.5rem 0 1rem;
	padding-top: 0.5rem;
	border-top: 3px solid var(--ed-teal);
}
.is-edition-post .article-text h3 {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: 1.2rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--ed-ink);
	margin: 2rem 0 0.75rem;
}

/* Myth-block (server-rewritten from H4 convention via the_content filter) */
.is-edition-post .article-text .myth-block {
	border-left: 3px solid var(--ed-teal);
	padding: 0.1rem 0 0.1rem 1.25rem;
	margin: 1.8rem 0;
}
.is-edition-post .article-text .myth-block .myth-num {
	font-family: 'Barlow', sans-serif;
	font-size: 0.58rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--ed-teal);
	font-weight: 800;
	margin-bottom: 0.3rem;
	display: block;
}
.is-edition-post .article-text .myth-block .myth-title {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: 1.15rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--ed-ink);
	margin: 0 0 0.6rem;
	line-height: 1.25;
}
.is-edition-post .article-text .myth-block p:last-child {
	margin-bottom: 0;
}

/* H4s that did NOT match the myth convention (no colon) still benefit
   from being readable. The rewrite filter wraps every H4 into a
   .myth-block — those without an eyebrow just show the title. */

/* Plain blockquotes from the editor get the pull-quote treatment */
.is-edition-post .article-text blockquote {
	margin: 2.5rem 0;
	padding: 1.75rem 2rem;
	border-top: 3px solid var(--ed-teal);
	border-bottom: 3px solid var(--ed-teal);
	background: #f8f8f6;
	font-family: 'Playfair Display', serif;
	font-size: 1.3rem;
	font-style: italic;
	color: var(--ed-ink);
	line-height: 1.6;
	text-align: center;
}
.is-edition-post .article-text blockquote p {
	font-family: 'Playfair Display', serif;
	font-size: inherit;
	font-style: inherit;
	color: inherit;
	line-height: inherit;
	margin: 0;
}

/* Inline images in the body should respect the column width */
.is-edition-post .article-text img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 1.5rem auto;
}

/* Lists */
.is-edition-post .article-text ul,
.is-edition-post .article-text ol {
	margin: 0 0 1.4rem 1.5rem;
	padding: 0;
}
.is-edition-post .article-text li {
	font-family: 'Barlow', sans-serif;
	font-size: 1rem;
	line-height: 1.85;
	color: var(--ed-ink-soft);
	margin-bottom: 0.5rem;
}

/* --- Tags --------------------------------------------------------------- */

.is-edition-post .tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 2rem;
}
.is-edition-post .tag {
	padding: 5px 14px;
	background: #f8f8f6;
	border: 1px solid var(--ed-border);
	font-family: 'Barlow', sans-serif;
	font-size: 0.65rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ed-ink-light);
	font-weight: 600;
	border-radius: 2px;
	text-decoration: none;
	transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.is-edition-post .tag:hover {
	background: var(--ed-teal);
	border-color: var(--ed-teal);
	color: var(--ed-white);
}

/* --- Article footer (author block) ------------------------------------- */

.is-edition-post .article-footer {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--ed-border);
	display: flex;
	align-items: center;
	gap: 1.25rem;
}
.is-edition-post .author-avatar,
.is-edition-post .author-avatar-img {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.is-edition-post .author-avatar {
	background: var(--ed-teal);
	color: var(--ed-white);
	font-family: 'Barlow Condensed', sans-serif;
	font-weight: 800;
	font-size: 1rem;
	letter-spacing: 0.05em;
}
.is-edition-post .author-avatar-img {
	background: var(--ed-teal); /* shows through if avatar transparent */
}
.is-edition-post .author-name {
	font-family: 'Barlow', sans-serif;
	font-weight: 700;
	font-size: 0.9rem;
	color: var(--ed-ink);
	margin: 0 0 0.2rem;
}
.is-edition-post .author-bio {
	font-family: 'Barlow', sans-serif;
	font-size: 0.8rem;
	color: var(--ed-ink-light);
	line-height: 1.55;
	margin: 0;
}


/* ---------------------------------------------------------------------------
 * 5. LEFT SIDEBAR
 *
 * Renders inline below the breadcrumb for now. Section 7 will move it into
 * the 3-column grid alongside the article body and right sidebar.
 * ------------------------------------------------------------------------- */

.is-edition-post .sidebar-left {
	max-width: 280px;
	margin: 2.5rem auto 0;
	padding: 0 2rem;
	box-sizing: border-box;
}

.is-edition-post .sidebar-section-label {
	font-family: 'Barlow', sans-serif;
	font-size: 0.6rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--ed-teal);
	border-bottom: 2px solid var(--ed-teal);
	padding-bottom: 0.6rem;
	margin-bottom: 1rem;
	display: block;
}
.is-edition-post .sidebar-label-spaced {
	margin-top: 1.5rem;
}

/* --- Current Issue card ------------------------------------------------- */

.is-edition-post .current-issue-card {
	margin-bottom: 1.5rem;
}
.is-edition-post .current-issue-cover {
	width: 100%;
	aspect-ratio: 1 / 1.414;
	overflow: hidden;
	border-radius: 3px;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
	margin-bottom: 0.75rem;
	background: #1a2a35;
}
.is-edition-post .current-issue-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.is-edition-post .current-issue-title {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: 0.82rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ed-ink);
	margin: 0 0 0.25rem;
}
.is-edition-post .current-issue-sub {
	font-family: 'Barlow', sans-serif;
	font-size: 0.72rem;
	color: var(--ed-ink-light);
	margin: 0 0 0.75rem;
	line-height: 1.4;
}
.is-edition-post .issue-btn {
	display: block;
	width: 100%;
	padding: 9px 0;
	background: var(--ed-ink);
	color: var(--ed-white);
	font-family: 'Barlow', sans-serif;
	font-size: 0.62rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	border-radius: 2px;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
	border: none;
	cursor: pointer;
	box-sizing: border-box;
}
.is-edition-post .issue-btn:hover {
	background: var(--ed-teal);
	color: var(--ed-white);
}
.is-edition-post .issue-btn.outline {
	background: transparent;
	color: var(--ed-ink);
	border: 1px solid var(--ed-border);
	margin-top: 0.5rem;
}
.is-edition-post .issue-btn.outline:hover {
	background: var(--ed-teal);
	color: var(--ed-white);
	border-color: var(--ed-teal);
}

/* --- Past issues stack -------------------------------------------------- */

.is-edition-post .past-issue-item {
	display: flex;
	gap: 0.75rem;
	align-items: center;
	padding: 0.7rem 0;
	border-bottom: 1px solid var(--ed-border);
	text-decoration: none;
	color: inherit;
	transition: opacity 0.2s;
	cursor: pointer;
}
.is-edition-post .past-issue-item:last-of-type {
	border-bottom: none;
}
.is-edition-post .past-issue-item:hover {
	opacity: 0.65;
	color: inherit;
}
.is-edition-post .past-issue-thumb {
	width: 46px;
	flex-shrink: 0;
	aspect-ratio: 1 / 1.414;
	border-radius: 2px;
	overflow: hidden;
	background: #1a2a35;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.is-edition-post .past-issue-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.is-edition-post .past-issue-info {
	flex: 1;
	min-width: 0;
}
.is-edition-post .past-issue-info-date {
	font-family: 'Barlow', sans-serif;
	font-size: 0.6rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ed-teal);
	font-weight: 700;
	margin: 0 0 0.15rem;
}
.is-edition-post .past-issue-info-title {
	font-family: 'Barlow', sans-serif;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--ed-ink);
	line-height: 1.35;
	margin: 0;
}


/* ---------------------------------------------------------------------------
 * 6. RIGHT SIDEBAR
 * ------------------------------------------------------------------------- */

.is-edition-post .sidebar-right {
	position: sticky;
	top: 88px;
	align-self: start;
}

.is-edition-post .related-card {
	display: block;
	padding: 0.9rem 0;
	border-bottom: 1px solid var(--ed-border);
	text-decoration: none;
	color: inherit;
	transition: opacity 0.2s;
}
.is-edition-post .related-card:hover {
	opacity: 0.65;
	color: inherit;
}
.is-edition-post .related-card:last-of-type {
	border-bottom: none;
	margin-bottom: 0;
}
.is-edition-post .related-tag {
	font-family: 'Barlow', sans-serif;
	font-size: 0.58rem;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--ed-teal);
	font-weight: 700;
	margin-bottom: 0.3rem;
	display: block;
}
.is-edition-post .related-title {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: 1rem;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--ed-ink);
	line-height: 1.3;
	margin: 0 0 0.3rem;
	letter-spacing: 0.02em;
}
.is-edition-post .related-time {
	font-family: 'Barlow', sans-serif;
	font-size: 0.68rem;
	color: var(--ed-ink-light);
}

/* --- Mini newsletter block in the right sidebar ----------------------- */

.is-edition-post .nl-mini {
	margin-top: 1.5rem;
	padding: 1.25rem;
	background: linear-gradient(135deg, #1a1a1a 0%, #0a2a35 100%);
	border-radius: 4px;
	box-sizing: border-box;
}
.is-edition-post .nl-mini-title {
	font-family: 'Playfair Display', serif;
	font-size: 1rem;
	font-weight: 700;
	color: var(--ed-white);
	line-height: 1.25;
	margin: 0 0 0.4rem;
}
.is-edition-post .nl-mini-title em {
	color: var(--ed-teal);
	font-style: italic;
}
.is-edition-post .nl-mini-sub {
	font-family: 'Barlow', sans-serif;
	font-size: 0.75rem;
	color: rgba(255, 255, 255, 0.5);
	margin: 0 0 1rem;
	line-height: 1.55;
}
.is-edition-post .nl-mini input {
	width: 100%;
	padding: 9px 11px;
	background: rgba(255, 255, 255, 0.07);
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: var(--ed-white);
	font-family: 'Barlow', sans-serif;
	font-size: 0.78rem;
	outline: none;
	border-radius: 2px;
	box-sizing: border-box;
	margin-bottom: 0.4rem;
}
.is-edition-post .nl-mini input::placeholder {
	color: rgba(255, 255, 255, 0.3);
}
.is-edition-post .nl-mini input:focus {
	border-color: var(--ed-teal);
	background: rgba(255, 255, 255, 0.12);
}
.is-edition-post .nl-mini button {
	width: 100%;
	padding: 9px 0;
	background: var(--ed-teal);
	color: var(--ed-white);
	border: none;
	font-family: 'Barlow', sans-serif;
	font-size: 0.62rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	font-weight: 700;
	cursor: pointer;
	border-radius: 2px;
	transition: background 0.2s;
}
.is-edition-post .nl-mini button:hover {
	background: var(--ed-teal-dark);
}


/* ---------------------------------------------------------------------------
 * 7. PAGE-BODY GRID (stitches sidebars + article into 3 columns)
 * ------------------------------------------------------------------------- */

.is-edition-post .page-body {
	max-width: 1440px;
	margin: 0 auto;
	padding: 2.5rem 2rem 4rem;
	display: grid;
	grid-template-columns: 280px 1fr 280px;
	gap: 2.5rem;
	align-items: start;
	box-sizing: border-box;
}

/* Left sidebar — strip the Section 5 width/centering, since the grid
   column now controls width. Make it sticky like the right sidebar. */
.is-edition-post .page-body .sidebar-left {
	max-width: none;
	margin: 0;
	padding: 0;
	position: sticky;
	top: 88px;
	align-self: start;
}

/* Article — strip the Section 4 width/centering for the same reason. */
.is-edition-post .page-body .article-body {
	max-width: none;
	margin: 0;
	padding: 0;
	min-width: 0; /* allows the article column to shrink when needed */
}

/* --- Page-body responsive --------------------------------------------- */

@media (max-width: 1100px) {
	.is-edition-post .page-body {
		grid-template-columns: 280px 1fr;
	}
	.is-edition-post .sidebar-right {
		display: none;
	}
}
@media (max-width: 780px) {
	.is-edition-post .page-body {
		grid-template-columns: 1fr;
		padding: 1.5rem 1rem 3rem;
		gap: 1.5rem;
	}
	.is-edition-post .page-body .sidebar-left {
		position: static;
		max-width: 100%;
	}
}
