/**
 * Blog archive (.led-blog) + single post (.led-post).
 *
 * Tokens only — Divi ul resets beaten for article content lists.
 */

/* -------------------------------------------------------------------------
   Archive
   ------------------------------------------------------------------------- */

.led-blog__intro {
	clear: both;
	margin-bottom: var(--space-8, 32px);
}

.led-blog__title {
	margin: 0 0 var(--space-4, 16px);
}

.led-blog__welcome {
	max-width: 72ch;
	overflow: hidden; /* contain legacy floats if intro still has builder leftovers */
}

.led-blog__welcome > :first-child {
	margin-top: 0;
}

.led-blog__welcome > :last-child {
	margin-bottom: 0;
}

.led-blog__intro .led-post__author {
	margin-top: 0;
}

.led-blog__grid {
	clear: both;
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-8, 32px);
	min-width: 0;
}

@media (min-width: 768px) {
	.led-blog__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--space-8, 32px) var(--space-6, 24px);
	}
}

@media (min-width: 981px) {
	.led-blog__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* Topic-style card: image + title + author + date (no chrome / excerpt) */
.led-blog-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--space-3, 12px);
	margin: 0;
	min-width: 0;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	overflow: visible;
	cursor: pointer;
}

.led-blog-card__media {
	display: block;
	position: relative;
	overflow: hidden;
	flex: 0 0 auto;
	width: 100%;
	aspect-ratio: 3 / 2;
	margin: 0;
	background: var(--color-neutral-100, #f0f0f0);
	border-radius: 0;
}

.led-blog-card__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center;
	display: block;
}

.led-blog-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-width: 0;
	gap: var(--space-2, 8px);
}

/* 3-line title; full string stays in HTML + title= tooltip */
.led-blog-card .led-blog-card__title {
	margin: 0;
	padding: 0;
	flex: 0 0 auto;
	line-height: var(--line-height-heading, 1.1em);
	max-height: calc(3 * var(--line-height-heading, 1.1em));
	overflow: hidden;
}

.led-blog-card__title a {
	position: relative;
	z-index: 2;
	color: inherit;
	text-decoration: none;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
	line-height: inherit;
}

.led-blog-card__hit {
	position: absolute;
	inset: 0;
	z-index: 1;
}

.led-blog-card:hover .led-blog-card__title a,
.led-blog-card:focus-within .led-blog-card__title a {
	color: var(--color-link, var(--color-secondary, #1c86ff));
}

.led-blog-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	column-gap: 0.35em;
	row-gap: 0;
	width: 100%;
	margin: 0;
	flex: 0 0 auto;
	color: var(--color-text-muted, #565656);
}

.led-blog-card__author {
	position: relative;
	z-index: 2;
	color: inherit;
	font-weight: var(--font-weight-semibold, 600);
	text-decoration: none;
}

.led-blog-card__author:hover,
.led-blog-card__author:focus {
	color: var(--color-link, var(--color-secondary, #1c86ff));
	text-decoration: underline;
}

.led-blog-card__date {
	margin-inline-start: auto;
	text-align: right;
	white-space: nowrap;
}

.led-blog__pagination {
	display: flex;
	justify-content: center;
	margin-top: var(--space-8, 32px);
	padding-bottom: var(--space-6, 24px);
}

.led-blog__pagination .nav-links {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0;
	border: 1px solid var(--color-neutral-300, #bfbfbf);
	border-radius: 8px;
	overflow: hidden;
	background: var(--color-neutral-0, #fff);
}

.led-blog__pagination .page-numbers {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	padding: 10px 14px;
	border-left: 1px solid var(--color-neutral-300, #bfbfbf);
	color: var(--color-text, #000);
	text-decoration: none;
	line-height: 1.2;
}

.led-blog__pagination .page-numbers:first-child {
	border-left: 0;
}

.led-blog__pagination .page-numbers.current {
	background: var(--color-primary-50, #eaf7eb);
	font-weight: var(--font-weight-semibold, 600);
}

.led-blog__empty {
	margin: var(--space-8, 32px) 0;
}

/* -------------------------------------------------------------------------
   Single post — Section Bleed (full viewport + gutters, aside at left)
   ------------------------------------------------------------------------- */

.led-post {
	width: 100%;
	max-width: none;
	margin-inline: 0;
	padding-inline: var(--layout-gutter, 24px);
	box-sizing: border-box;
}

@media (max-width: 767px) {
	.led-post {
		padding-inline: var(--layout-gutter-mobile, 16px);
	}
}

.led-post__layout {
	display: flex;
	flex-direction: column;
	gap: var(--space-6, 24px);
	align-items: stretch;
	width: 100%;
}

.led-post__intro,
.led-post__main {
	min-width: 0;
}

.led-post__aside {
	display: flex;
	flex-direction: column;
	gap: var(--space-3, 12px);
	min-width: 0;
}

@media (min-width: 1280px) {
	/* Aside stays on the left gutter; right edge matches .led-wrap / header. */
	.led-post {
		padding-right: max(
			var(--layout-gutter, 24px),
			calc((100% - var(--layout-max-width, 1368px)) / 2)
		);
	}

	.led-post__layout {
		display: grid;
		grid-template-columns: 26% minmax(0, 1fr);
		grid-template-areas:
			"aside intro"
			"aside main";
		align-items: start;
		column-gap: var(--space-6, 24px);
		row-gap: 0;
	}

	.led-post__intro {
		grid-area: intro;
	}

	.led-post__aside {
		/* Prod `.left-sidebar` ≥1280: 26% / sticky / 95vh. */
		grid-area: aside;
		gap: var(--space-6, 24px);
		width: 100%;
		max-width: none;
		margin-top: 0;
		position: sticky;
		top: 18px;
		height: 95vh;
		overflow-y: auto;
	}

	.led-post__intro,
	.led-post__main {
		width: 100%;
		max-width: none;
	}

	.led-post__main {
		grid-area: main;
	}
}

/* Help / live call ------------------------------------------------------- */

.led-post__help {
	margin: 0;
	padding: var(--space-4, 16px);
	border: 2px dashed var(--color-primary-500, #45b449);
	border-radius: 8px;
	background: var(--color-bg, var(--color-neutral-0, #fff));
	box-sizing: border-box;
}

html body.led-post-page .led-post__help-title {
	margin: 0 0 var(--space-4, 16px);
	color: var(--color-text, #000);
	font-family: var(--font-family-heading);
	font-size: var(--font-size-h2, 20px);
	font-weight: var(--font-weight-heading, 600);
	line-height: var(--line-height-heading, 1.2);
	text-transform: var(--text-transform-heading, uppercase);
}

.led-post__help-text {
	margin: 0 0 var(--space-3, 12px);
	color: var(--color-text, #000);
	font-size: var(--font-size-body, 16px);
	line-height: var(--line-height-body, 1.5em);
}

.led-post__help-btn {
	width: 100%;
	margin: 0 0 var(--space-3, 12px);
	white-space: normal;
}

.led-post__help-btn:last-child {
	margin-bottom: 0;
}

.led-post__live-help {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-5, 20px);
	margin: 0;
	padding: var(--space-4, 16px);
	border: 2px dashed var(--color-neutral-300, #d3d3d3);
	border-radius: 8px;
	background: var(--color-neutral-50, #fbfbfb);
	box-sizing: border-box;
}

.led-post__live-help-copy {
	display: flex;
	flex-direction: column;
	justify-content: center;
	flex: 1 1 auto;
	min-width: 0;
	min-height: 64px;
}

html body.led-post-page .led-post__live-help-title,
html body.led-post-page .led-post__live-help h2 {
	margin: 0 0 var(--space-2, 8px);
	color: var(--color-text);
	font-family: var(--font-family-heading);
	font-size: 20px;
	font-weight: var(--font-weight-semibold, 600);
	line-height: 22px;
	text-transform: uppercase;
}

html body.led-post-page .led-post__live-help-phone {
	display: inline-flex;
	align-items: baseline;
	gap: 0.35em;
	margin-top: var(--space-1, 4px);
	color: var(--color-primary-700, #088c43);
	font-family: var(--font-family-heading, Oswald, sans-serif);
	font-size: 20px;
	font-weight: var(--font-weight-semibold, 600);
	line-height: 22px;
	text-decoration: none;
	text-transform: uppercase;
}

html body.led-post-page .led-post__live-help-label,
html body.led-post-page .led-post__live-help-number {
	color: inherit;
	font: inherit;
	font-weight: inherit;
	text-transform: inherit;
}

.led-post__live-help-number {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.led-post__live-help-icon {
	flex: 0 0 64px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	text-decoration: none;
	transition: opacity 0.3s ease;
}

.led-post__live-help-icon:hover,
.led-post__live-help-icon:focus {
	opacity: 0.8;
}

.led-post__live-help-img {
	display: block;
	width: 64px;
	height: 64px;
}

@media (min-width: 1024px) {
	.led-post__help {
		padding: var(--space-5, 20px);
		border-radius: 16px;
	}

	.led-post__live-help {
		padding: var(--space-6, 24px);
		border-radius: 16px;
	}

	.led-post__help-text {
		margin-bottom: var(--space-6, 24px);
	}
}

/* Header ----------------------------------------------------------------- */

.led-post__header {
	margin-bottom: 0;
}

.led-post__title {
	margin: 0 0 var(--space-5, 22px);
}

.led-post__meta {
	width: fit-content;
	max-width: 100%;
	margin: 0 0 var(--space-6, 24px);
	padding: 0;
	color: var(--color-text, #000);
	font-size: var(--font-size-body, 16px);
	font-weight: var(--font-weight-regular, 400);
	line-height: 1.4em;
}

html body.led-post-page .led-post__meta p {
	margin: 0;
	padding: 0;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
}

.led-post__meta-label,
.led-post__meta-author {
	font-weight: var(--font-weight-bold, 700);
}

.led-post__meta-author {
	color: var(--color-link, var(--color-secondary, #1c86ff));
	text-decoration: none;
}

.led-post__meta-author:hover,
.led-post__meta-author:focus {
	text-decoration: underline;
}

html body.led-post-page .led-post__meta-sep {
	display: block;
	width: 100%;
	height: 0;
	margin: 18px 0 0;
	padding: 0;
	border: 0;
	border-bottom: 1px solid var(--color-neutral-300, #d4d4d4);
}

@media (min-width: 1024px) {
	.led-post__title {
		margin-bottom: var(--space-6, 24px);
	}

	.led-post__meta {
		width: 324px;
	}
}

/* TOC — collapsed when stacked (<1024), always open in the desktop sidebar */

.led-post__toc {
	margin: 0;
	padding: 0;
	background: var(--color-bg, var(--color-neutral-0, #fff));
	border-radius: 8px;
}

html body.led-post-page .led-post__toc-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin: 0;
	padding: 16px 30px 16px 16px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	text-align: left;
	position: relative;
	color: var(--color-text, #000);
	font: inherit;
	line-height: 1.2;
	min-height: 0;
}

html body.led-post-page .led-post__toc-toggle::after {
	content: "";
	position: absolute;
	right: 8px;
	top: 50%;
	width: 8px;
	height: 8px;
	border-top: 2px solid var(--color-text, #000);
	border-right: 2px solid var(--color-text, #000);
	transform: translateY(-50%) rotate(135deg);
	transition: transform 0.3s ease;
}

html body.led-post-page .led-post__toc-toggle.is-open::after,
html body.led-post-page .led-post__toc-toggle[aria-expanded="true"]::after {
	transform: translateY(-50%) rotate(-45deg);
}

.led-post__toc-title {
	display: block;
	margin: 0;
	color: var(--color-text, #000);
	font-family: var(--font-family-heading);
	font-size: 22px;
	font-weight: var(--font-weight-semibold, 600);
	line-height: 1.2;
	text-transform: uppercase;
}

html body.led-post-page .led-post__toc-list {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease;
}

html body.led-post-page .led-post__toc-toggle.is-open + .led-post__toc-list,
html body.led-post-page .led-post__toc-toggle[aria-expanded="true"] + .led-post__toc-list {
	max-height: 2000px;
	padding: 0 16px 16px;
}

@media (min-width: 1024px) {
	.led-post__toc {
		margin: 0;
		padding: var(--space-4, 16px);
	}

	html body.led-post-page .led-post__toc-toggle {
		cursor: default;
		padding: 0 0 var(--space-4, 16px);
		pointer-events: none;
	}

	html body.led-post-page .led-post__toc-toggle::after {
		display: none;
	}

	html body.led-post-page .led-post__toc-list,
	html body.led-post-page .led-post__toc-toggle.is-open + .led-post__toc-list,
	html body.led-post-page .led-post__toc-toggle[aria-expanded="true"] + .led-post__toc-list {
		max-height: none;
		overflow: visible;
		padding: 0;
	}
}

.led-post__toc-item {
	margin: 0;
	font-size: var(--font-size-small, 14px);
	line-height: 1.4;
}

.led-post__toc-link {
	display: block;
	position: relative;
	padding: 12px 0 12px 24px;
	color: var(--color-text-muted, #828487);
	font-weight: var(--font-weight-semibold, 600);
	text-decoration: none;
}

.led-post__toc-link::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	width: 3px;
	height: 100%;
	background: var(--color-neutral-300, #d1d1d1);
	transition: background-color 0.3s ease;
}

.led-post__toc-link:hover,
.led-post__toc-link:focus,
.led-post__toc-link.is-passed {
	color: var(--color-text-muted, #828487);
}

.led-post__toc-link.is-passed::before {
	background: var(--color-neutral-600, #565656);
}

.led-post__toc-link.is-active {
	color: var(--color-text, #000);
	font-weight: var(--font-weight-bold, 700);
}

/* Beat Divi list-style:none inside article body */
html body.led-post-page .led-post__content ul {
	margin: 0 0 1em;
	padding-left: 1.25em;
	list-style: disc;
	list-style-type: disc;
	list-style-position: outside;
}

html body.led-post-page .led-post__content ol {
	margin: 0 0 1em;
	padding-left: 1.25em;
	list-style: decimal;
	list-style-type: decimal;
	list-style-position: outside;
}

html body.led-post-page .led-post__content li {
	display: list-item;
	margin: 0 0 var(--space-2, 8px);
}

html body.led-post-page .led-post__content li:last-child {
	margin-bottom: 0;
}

/* Article tables — do not use classic-page card chrome (overrides.css) */
html body.led-post-page .led-post__content table {
	width: 100%;
	max-width: 100%;
	margin: 0 0 1em;
	border-collapse: collapse;
	border-spacing: 0;
}

html body.led-post-page .led-post__content table td,
html body.led-post-page .led-post__content table th {
	margin: 0;
	padding: 8px 12px;
	border: 1px solid var(--color-border, #d4d4d4);
	border-radius: 0;
	background: transparent;
	color: inherit;
	font-size: inherit;
	line-height: inherit;
}

/* Author ----------------------------------------------------------------- */

.led-post__author {
	display: flex;
	flex-direction: column;
	gap: var(--space-2, 8px);
	margin-top: var(--space-6, 24px);
	padding: var(--space-4, 16px);
	border: 2px dashed var(--color-primary-700, #088c43);
	border-radius: 0;
	background: var(--color-bg, var(--color-neutral-0, #fff));
}

.led-post__author-photo {
	display: block;
	width: 93px;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	align-self: flex-start;
}

.led-post__author-body {
	flex: 1 1 auto;
	min-width: 0;
}

.led-post__author-title {
	margin: 0 0 var(--space-4, 16px);
}

.led-post__author-bio {
	margin: 0;
	max-width: 72ch;
}

.led-post__author-bio > :first-child {
	margin-top: 0;
}

.led-post__author-bio > :last-child {
	margin-bottom: 0;
}

.led-post__author-social {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	margin: var(--space-4, 16px) 0 0;
	padding: 0;
	list-style: none;
}

.led-post__author-social-link {
	display: block;
	width: 24px;
	aspect-ratio: 1 / 1;
	color: var(--color-link, var(--color-secondary, #1c86ff));
	font-size: var(--font-size-small, 15px);
	text-decoration: none;
}

.led-post__author-social-icon {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.led-post__author-social-link:hover,
.led-post__author-social-link:focus {
	opacity: 0.8;
}

@media (min-width: 1024px) {
	.led-post__author {
		flex-direction: row;
		gap: var(--space-5, 20px);
		margin-top: 41px;
		padding: var(--space-5, 20px);
	}

	.led-post__author-photo {
		width: 136px;
	}

	.led-post__author-title {
		margin-bottom: var(--space-3, 12px);
	}

	.led-post__author-social {
		margin-top: var(--space-3, 12px);
	}

	.led-post__author-social-link {
		width: 31px;
	}
}

.led-post__related {
	margin-top: var(--space-10, 40px);
	padding-top: var(--space-8, 32px);
	border-top: 1px solid var(--color-neutral-200, #ddd);
}

.led-post__related-title {
	margin: 0 0 var(--space-6, 24px);
}

/* Related uses .led-blog__grid + .led-blog-card; keep 3-up (only 3 items). */
@media (min-width: 981px) {
	.led-post__related .led-blog__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
