/* TDN Title Pages: virtual /title/{tag-slug}/ pages.
   Scoped to .tdntp-wrap with explicit light/dark values so the virtual
   template (rendered outside any component wrapper) follows the theme's
   data-theme toggle. */

.tdntp-wrap {
	max-width: 1100px;
	margin: 0 auto;
	padding: 40px 20px 64px;
}

.tdntp-kicker {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #e51a3e;
}

.tdntp-title {
	margin: 0;
	font-size: clamp(28px, 4vw, 44px);
	line-height: 1.15;
	color: #1a1a1a;
}

.tdntp-count {
	margin: 10px 0 0;
	font-size: 14px;
	color: #6b6b6b;
}

.tdntp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 24px;
	margin-top: 32px;
}

.tdntp-card {
	display: block;
	text-decoration: none;
	color: inherit;
	border: 1px solid #e2e2e6;
	border-radius: 8px;
	overflow: hidden;
	background: #ffffff;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.tdntp-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.tdntp-thumb {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #f0f0f2;
}

.tdntp-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tdntp-card-title {
	display: block;
	padding: 14px 16px 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
	color: #1a1a1a;
}

.tdntp-card-date {
	display: block;
	padding: 6px 16px 0;
	font-size: 12px;
	color: #6b6b6b;
}

.tdntp-card-excerpt {
	display: block;
	padding: 8px 16px 16px;
	font-size: 13px;
	line-height: 1.5;
	color: #4a4a4a;
}

.tdntp-empty {
	margin-top: 32px;
	font-size: 15px;
	color: #6b6b6b;
}

.tdntp-all {
	margin-top: 36px;
}

.tdntp-all a {
	color: #e51a3e;
	font-weight: 600;
	text-decoration: none;
}

.tdntp-all a:hover {
	text-decoration: underline;
}

/* Dark mode follows the theme's data-theme toggle only. */
html[data-theme="dark"] .tdntp-title {
	color: #ffffff;
}

html[data-theme="dark"] .tdntp-count,
html[data-theme="dark"] .tdntp-card-date {
	color: #a8a8ad;
}

html[data-theme="dark"] .tdntp-card {
	background: #16161c;
	border-color: #2a2a32;
}

html[data-theme="dark"] .tdntp-card-title {
	color: #ffffff;
}

html[data-theme="dark"] .tdntp-card-excerpt {
	color: #c9c9cf;
}

html[data-theme="dark"] .tdntp-thumb {
	background: #202028;
}

@media (max-width: 640px) {
	.tdntp-wrap {
		padding: 28px 16px 48px;
	}

	.tdntp-grid {
		grid-template-columns: 1fr 1fr;
		gap: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tdntp-card {
		transition: none;
	}

	.tdntp-card:hover {
		transform: none;
	}
}
