/**
 * Article catalogue and single article.
 *
 * Measurements ported from design-references/TutorAddons Theme.dc.html lines
 * 559–713. The long-form typography (.ta-prose) is shared with the product page
 * and lives in product.css; blog.css loads alongside it on single articles.
 */

.ta-blog-page {
	background: var(--ta-surface-soft);
}

/* -------------------------------------------------------------------------
 * Category pills
 * ---------------------------------------------------------------------- */

.ta-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 22px;
}

.ta-pill {
	padding: 8px 15px;
	border: 1px solid var(--ta-border);
	border-radius: var(--ta-radius-pill);
	background: var(--ta-surface);
	color: var(--ta-text-muted);
	font-size: 13px;
	font-weight: 600;
}

.ta-pill:hover {
	border-color: var(--ta-brand);
	color: var(--ta-brand);
}

.ta-pill.is-active {
	border-color: var(--ta-brand);
	background: var(--ta-brand);
	color: #fff;
}

/* -------------------------------------------------------------------------
 * Two-column frame
 * ---------------------------------------------------------------------- */

.ta-blog-layout {
	display: grid;
	align-items: start;
	gap: 28px;
	padding-block: 28px 70px;
	grid-template-columns: 1fr 320px;
}

@media (max-width: 980px) {
	.ta-blog-layout {
		grid-template-columns: 1fr;
	}
}

.ta-blog-side {
	position: sticky;
	top: 130px;
	display: grid;
	gap: 16px;
}

@media (max-width: 980px) {
	.ta-blog-side {
		position: static;
	}
}

.ta-side-card {
	padding: 20px;
	border: 1px solid var(--ta-border);
	border-radius: var(--ta-radius-card);
	background: var(--ta-surface);
}

/* -------------------------------------------------------------------------
 * Featured post
 * ---------------------------------------------------------------------- */

.ta-feature {
	display: grid;
	border: 1px solid var(--ta-border);
	border-radius: 16px;
	background: var(--ta-surface);
	overflow: hidden;
	grid-template-columns: 1fr 1fr;
}

@media (max-width: 720px) {
	.ta-feature {
		grid-template-columns: 1fr;
	}
}

.ta-feature__media {
	display: grid;
	min-height: 220px;
	place-items: center;
	background: var(--ta-placeholder);
}

.ta-feature__body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 12px;
	padding: 28px;
}

.ta-feature__flag {
	color: var(--ta-pink);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.ta-feature__title {
	font-size: clamp(21px, 2.2vw, 28px);
	font-weight: 700;
	line-height: 1.28;
}

.ta-feature__title a:hover {
	color: var(--ta-brand);
}

.ta-feature__excerpt {
	color: var(--ta-text-muted);
	font-size: 14.5px;
	line-height: 1.7;
}

.ta-feature__meta {
	color: var(--ta-text-meta);
	font-size: 12.5px;
}

/* -------------------------------------------------------------------------
 * Post grid
 * ---------------------------------------------------------------------- */

.ta-grid--posts {
	margin-top: 20px;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.ta-grid--flush {
	margin-top: 0;
}

.ta-grid--related {
	margin-top: 18px;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 16px;
}

.ta-post-card__excerpt {
	margin-top: 8px;
	color: var(--ta-text-muted);
	font-size: 13px;
	line-height: 1.6;
}

.ta-post-card__body {
	display: grid;
	gap: 8px;
}

.ta-post-card__body > * {
	margin: 0;
}

/* -------------------------------------------------------------------------
 * Sidebar: popular posts
 * ---------------------------------------------------------------------- */

.ta-side-posts {
	display: grid;
	gap: 14px;
	margin-top: 14px;
}

.ta-side-post {
	display: flex;
	gap: 12px;
	text-align: left;
}

.ta-side-post__thumb {
	display: grid;
	width: 52px;
	height: 52px;
	flex: none;
	place-items: center;
	border-radius: 9px;
	background: var(--ta-placeholder);
	overflow: hidden;
}

.ta-side-post__title {
	display: block;
	color: var(--ta-text);
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.4;
}

.ta-side-post:hover .ta-side-post__title {
	color: var(--ta-brand);
}

.ta-side-post__date {
	display: block;
	margin-top: 4px;
	color: var(--ta-text-meta);
	font-size: 11.5px;
}

.ta-blog-side .ta-side-promo {
	border-radius: var(--ta-radius-card);
	padding: 22px;
}

.ta-blog-side .ta-side-promo__title {
	font-size: 17px;
	line-height: 1.35;
}

.ta-blog-side .ta-side-promo__body {
	margin-top: 9px;
	font-size: 13px;
	line-height: 1.65;
}

/* -------------------------------------------------------------------------
 * Single article
 * ---------------------------------------------------------------------- */

.ta-article__head {
	padding-block: 40px 24px;
}

.ta-article__title {
	max-width: 800px;
	margin-top: 14px;
	font-size: clamp(28px, 3.8vw, 46px);
	font-weight: 700;
	line-height: 1.15;
}

.ta-article__byline {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 20px;
	color: var(--ta-text-muted);
	font-size: 13.5px;
}

.ta-article__avatar {
	width: 34px;
	height: 34px;
	border-radius: 50%;
}

.ta-article__byline strong {
	color: var(--ta-text);
}

.ta-article .ta-blog-layout {
	padding-top: 0;
	gap: 34px;
}

.ta-article__cover {
	display: grid;
	aspect-ratio: 16/8;
	place-items: center;
	border: 1px solid var(--ta-border);
	border-radius: 16px;
	background: var(--ta-placeholder);
	overflow: hidden;
}

.ta-article__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ta-article__content {
	margin-top: 28px;
	font-size: 16px;
	line-height: 1.85;
}

/* The opening paragraph reads as a lede. */
.ta-article__content > p:first-child {
	color: var(--ta-text-secondary);
	font-size: 17.5px;
	font-weight: 500;
	line-height: 1.75;
}

.ta-article__content h2 {
	margin-top: 36px;
	font-size: 26px;
	font-weight: 600;
	scroll-margin-top: 110px;
}

.ta-article__content table {
	border: 1px solid var(--ta-border);
	border-radius: 12px;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
}

.ta-article__content thead {
	background: var(--ta-surface-soft);
}

.ta-article__content blockquote {
	padding: 18px 22px;
	border-radius: 0 12px 12px 0;
	background: var(--ta-surface-soft);
	font-size: 16px;
	line-height: 1.75;
}

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

.ta-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 34px;
}

.ta-tag {
	padding: 6px 12px;
	border-radius: 7px;
	background: var(--ta-surface-softer);
	color: var(--ta-text-muted);
	font-size: 12.5px;
}

.ta-tag:hover {
	color: var(--ta-brand);
}

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

.ta-authorbox {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 18px;
	margin-top: 32px;
	padding: 24px;
	border: 1px solid var(--ta-border);
	border-radius: 16px;
	background: var(--ta-surface);
}

.ta-authorbox__avatar {
	width: 60px;
	height: 60px;
	flex: none;
	border-radius: 50%;
}

.ta-authorbox__name {
	font-size: 17px;
	font-weight: 600;
}

.ta-authorbox__bio {
	flex: 1 1 220px;
	margin-top: 7px;
	color: var(--ta-text-muted);
	font-size: 13.5px;
	line-height: 1.65;
}

.ta-article__related-title {
	margin-top: 44px;
	font-size: 23px;
	font-weight: 600;
}

/* -- Table of contents --------------------------------------------------- */

.ta-toc__list {
	display: grid;
	gap: 10px;
	margin: 14px 0 0;
	padding: 0;
	list-style: none;
	counter-reset: ta-toc;
}

.ta-toc__link {
	display: block;
	padding-left: 12px;
	border-left: 2px solid var(--ta-border);
	color: var(--ta-text-muted);
	font-size: 13.5px;
	line-height: 1.5;
}

.ta-toc__link:hover,
.ta-toc__link.is-active {
	border-left-color: var(--ta-brand);
	color: var(--ta-brand);
	font-weight: 600;
}
