/**
 * TailPlay — Articles archive, single, homepage teaser cards.
 */

.tp-section-title.tp-display {
	font-family: var(--tp-font-display);
	font-size: var(--tp-text-2xl);
	color: var(--tp-green);
	margin-bottom: var(--tp-space-sm);
}

.tp-articles-teaser__intro {
	margin: 0 0 var(--tp-space-lg);
	color: var(--tp-text-muted);
	max-width: 40em;
}

.tp-articles-teaser__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: var(--tp-space-lg);
}

.tp-article-card {
	background: var(--tp-surface);
	border-radius: var(--tp-radius-lg);
	box-shadow: var(--tp-shadow);
	overflow: hidden;
	transition: box-shadow var(--tp-transition);
}

.tp-article-card:hover {
	box-shadow: var(--tp-shadow-md);
}

.tp-article-card__link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.tp-article-card__image-wrap {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--tp-bg-soft);
}

.tp-article-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tp-article-card__body {
	padding: var(--tp-space-md);
}

.tp-article-card__category {
	font-size: var(--tp-text-xs);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--tp-green);
}

.tp-article-card__title {
	margin: var(--tp-space-xs) 0;
	font-size: var(--tp-text-lg);
}

.tp-article-card__excerpt {
	font-size: var(--tp-text-sm);
	color: var(--tp-text-muted);
	margin: 0 0 var(--tp-space-sm);
}

.tp-article-card__date {
	font-size: var(--tp-text-xs);
	color: var(--tp-text-muted);
}

.tp-articles-teaser__cta {
	margin-top: var(--tp-space-xl);
}

.tp-section--alt {
	background-color: var(--tp-bg-soft);
	padding-top: var(--tp-section-y);
	padding-bottom: var(--tp-section-y);
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	width: 100vw;
	max-width: 100vw;
}

.tp-section--alt > .tp-container {
	padding-top: 0;
	padding-bottom: 0;
}

/* ——— Archive /articles/ ——— */
.tp-articles-archive__hero {
	padding-bottom: var(--tp-space-xl);
}

.tp-articles-archive__title {
	font-size: var(--tp-text-display);
	color: var(--tp-green);
	margin: 0 0 var(--tp-space-sm);
}

.tp-articles-archive__intro {
	margin: 0 auto;
	max-width: 32rem;
	color: var(--tp-text-muted);
	line-height: var(--tp-leading-relaxed);
	font-size: var(--tp-text-lg);
}

.tp-articles-archive__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: var(--tp-space-xl);
	margin-bottom: var(--tp-space-2xl);
}

.tp-article-card--archive .tp-article-card__title {
	font-size: var(--tp-text-xl);
	font-weight: 600;
	color: var(--tp-heading);
}

.tp-articles-archive__empty {
	text-align: center;
	color: var(--tp-text-muted);
	padding: var(--tp-space-4xl) 0;
}

.tp-articles-archive .navigation.pagination,
.tp-articles-archive .nav-links {
	display: flex;
	justify-content: center;
	gap: var(--tp-space-xs);
	margin-bottom: var(--tp-space-3xl);
}

/* ——— Single article ——— */
.tp-article-single__header {
	padding-bottom: var(--tp-space-lg);
}

.tp-article-single__category {
	font-size: var(--tp-text-xs);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--tp-green);
	margin: 0 0 var(--tp-space-sm);
}

.tp-article-single__title {
	font-size: var(--tp-text-display);
	color: var(--tp-green);
	margin: 0 0 var(--tp-space-sm);
	line-height: var(--tp-leading-snug);
}

.tp-article-single__meta {
	margin: 0;
	font-size: var(--tp-text-sm);
	color: var(--tp-text-muted);
}

.tp-article-single__featured-wrap {
	max-width: 52rem;
	margin-bottom: var(--tp-space-2xl);
}

.tp-article-single__featured {
	width: 100%;
	height: auto;
	border-radius: var(--tp-radius-lg);
	display: block;
	box-shadow: var(--tp-shadow-md);
}

.tp-article-single__content.tp-prose {
	max-width: 40rem;
	margin: 0 auto;
	font-size: var(--tp-text-base);
	line-height: var(--tp-leading-relaxed);
	color: var(--tp-text);
}

.tp-article-single__content.tp-prose > *:first-child {
	margin-top: 0;
}

.tp-article-single__content.tp-prose h2,
.tp-article-single__content.tp-prose h3 {
	font-family: var(--tp-font-heading);
	color: var(--tp-green);
	margin-top: var(--tp-space-xl);
}

.tp-article-single__footer {
	padding-top: var(--tp-space-2xl);
	padding-bottom: var(--tp-space-3xl);
}

/* Full-width bar so the back action reads as a clear section end */
.tp-article-single__footer-bar {
	margin-top: var(--tp-space-xl);
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	width: 100vw;
	max-width: 100vw;
	padding: var(--tp-space-xl) var(--tp-space-md);
	background: linear-gradient(180deg, var(--tp-bg-soft) 0%, rgba(245, 243, 240, 0.65) 100%);
	border-top: 1px solid var(--tp-border);
	box-sizing: border-box;
	display: flex;
	justify-content: center;
	align-items: center;
}

.tp-article-single__back {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--tp-space-sm);
	min-height: 3.25rem;
	padding: var(--tp-space-md) var(--tp-space-2xl);
	font-size: var(--tp-text-base);
	font-weight: 600;
	letter-spacing: 0.02em;
	border-radius: var(--tp-radius-lg);
	box-shadow: var(--tp-shadow);
	transition: box-shadow var(--tp-transition), transform 0.15s ease, background-color var(--tp-transition);
}

.tp-article-single__back:hover {
	transform: translateY(-1px);
	box-shadow: var(--tp-shadow-md);
}

.tp-article-single__back:active {
	transform: translateY(0);
}

.tp-article-single__back-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	opacity: 0.95;
}

.tp-article-single__back-label {
	line-height: 1.2;
}

/* Primary green CTA (overrides secondary; scoped to article footer) */
body.tp-theme a.tp-article-single__back,
body.tp-theme a.tp-article-single__back:hover {
	color: var(--tp-cta-text);
	background-color: var(--tp-cta-bg);
}

body.tp-theme a.tp-article-single__back:hover {
	filter: brightness(1.05);
}

@media (max-width: 480px) {
	.tp-article-single__back {
		width: 100%;
		max-width: 22rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tp-article-single__back:hover,
	.tp-article-sources__card:hover {
		transform: none;
	}
}

/* FAQ reuses .tp-pdp-faq* from woocommerce.css when WooCommerce is active; extra spacing only. */
.tp-article-faq {
	margin-top: var(--tp-space-3xl);
	padding-top: var(--tp-space-2xl);
	border-top: 1px solid var(--tp-border);
}

/* Fallback if WooCommerce styles are not loaded: accordion still works */
.single-tailplay_article .tp-article-faq .tp-pdp-faq__item {
	border: 1px solid var(--tp-border);
	border-radius: var(--tp-radius);
	margin-bottom: var(--tp-space-sm);
	background: var(--tp-surface);
}

.single-tailplay_article .tp-article-faq .tp-pdp-faq__q {
	font-weight: 600;
	cursor: pointer;
	list-style: none;
	padding: var(--tp-space-md) var(--tp-space-lg);
}

.single-tailplay_article .tp-article-faq .tp-pdp-faq__q::-webkit-details-marker {
	display: none;
}

.single-tailplay_article .tp-article-faq .tp-pdp-faq__q::after {
	content: "+";
	float: right;
	color: var(--tp-green);
}

.single-tailplay_article .tp-article-faq .tp-pdp-faq__item[open] .tp-pdp-faq__q::after {
	content: "−";
}

.single-tailplay_article .tp-article-faq .tp-pdp-faq__a {
	padding: 0 var(--tp-space-lg) var(--tp-space-md);
	line-height: var(--tp-leading-relaxed);
}

.single-tailplay_article .tp-article-faq .tp-pdp-faq__list {
	max-width: 36em;
	margin: 0 auto;
}

.single-tailplay_article .tp-article-faq .tp-pdp-faq__title {
	text-align: center;
}

/* Sources — card grid, references panel */
.tp-article-sources {
	margin-top: 0;
	padding-top: var(--tp-space-3xl);
	padding-bottom: var(--tp-space-3xl);
}

.tp-article-sources__container {
	max-width: 48rem;
}

.tp-article-sources__header {
	text-align: center;
	margin-bottom: var(--tp-space-2xl);
}

.tp-article-sources__title {
	font-size: clamp(1.5rem, 4vw, var(--tp-text-2xl));
	color: var(--tp-green);
	margin: 0 0 var(--tp-space-sm);
	line-height: var(--tp-leading-snug);
	letter-spacing: -0.02em;
}

.tp-article-sources__intro {
	margin: 0 auto;
	max-width: 28rem;
	font-size: var(--tp-text-sm);
	color: var(--tp-text-muted);
	line-height: var(--tp-leading-relaxed);
}

.tp-article-sources__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--tp-space-md);
}

.tp-article-sources__card {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: var(--tp-space-sm);
	margin: 0;
	padding: var(--tp-space-md) var(--tp-space-lg);
	background: var(--tp-surface);
	border: 1px solid var(--tp-border);
	border-radius: var(--tp-radius-lg);
	box-shadow: var(--tp-shadow);
	overflow: hidden;
	transition: box-shadow var(--tp-transition), border-color var(--tp-transition), transform 0.2s ease;
}

.tp-article-sources__card:hover {
	box-shadow: var(--tp-shadow-md);
	border-color: rgba(45, 90, 61, 0.22);
}

/* Compact index so the title/link reads in one flow with the number */
.tp-article-sources__index {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 1.75rem;
	height: 1.75rem;
	padding: 0 0.4rem;
	margin-top: 0.2em;
	font-family: var(--tp-font-heading);
	font-size: var(--tp-text-sm);
	font-weight: 700;
	color: var(--tp-cta-text);
	background: linear-gradient(160deg, var(--tp-green) 0%, #243d2e 100%);
	line-height: 1;
	border-radius: var(--tp-radius);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.tp-article-sources__body {
	flex: 1;
	min-width: 0;
	padding: 0;
	display: flex;
	align-items: stretch;
}

@media (max-width: 480px) {
	.tp-article-sources__card {
		padding: var(--tp-space-md);
		gap: var(--tp-space-xs);
	}
}

.tp-article-sources__card-link {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--tp-space-2xs);
	width: 100%;
	text-decoration: none;
	color: inherit;
	text-align: left;
}

.tp-article-sources__card-title {
	font-size: var(--tp-text-base);
	font-weight: 600;
	color: var(--tp-heading);
	line-height: var(--tp-leading-snug);
	transition: color var(--tp-transition);
}

.tp-article-sources__card-link:hover .tp-article-sources__card-title {
	color: var(--tp-green);
}

.tp-article-sources__card-link:focus-visible {
	outline: 2px solid var(--tp-green);
	outline-offset: 3px;
	border-radius: var(--tp-radius);
}

.tp-article-sources__card-host {
	font-size: var(--tp-text-xs);
	color: var(--tp-text-muted);
	font-weight: 500;
	letter-spacing: 0.02em;
}

.tp-article-sources__card-action {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	margin-top: var(--tp-space-xs);
	font-size: var(--tp-text-xs);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--tp-green);
}

.tp-article-sources__external-icon {
	flex-shrink: 0;
	opacity: 0.85;
}

.tp-article-sources__card-link:hover .tp-article-sources__card-action {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.tp-article-sources__card-static {
	padding-top: 0.125rem;
}

.tp-article-sources__card-static .tp-article-sources__card-title {
	color: var(--tp-text);
	font-weight: 500;
}
