/**
 * Trend board (front end). Own scope, no theme dependency, RTL by logical props.
 */
.tdb,
.tdbr {
	--tdb-accent: #2f6fed;
	--tdb-ink: #000000;
	--tdb-body: #000000;
	--tdb-mute: #000000;
	--tdb-faint: #000000;
	--tdb-line: #e6e9ef;
	--tdb-soft: #f7f9fc;
	color: var(--tdb-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
	margin: 8px 0 28px;
}

.tdb__title {
	font-size: clamp(19px, 2.4vw, 27px);
	font-weight: 800;
	letter-spacing: -0.2px;
	margin: 0 0 6px;
}

.tdb__stamp {
	color: var(--tdb-mute);
	font-size: 12.5px;
	margin: 0 0 20px;
}

/* cards layout: the title and stamp span the whole grid */
.tdb--cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
	gap: 16px;
	align-items: start;
}

.tdb--cards > .tdb__title,
.tdb--cards > .tdb__stamp,
.tdb--cards > .tdb__empty,
.tdb--cards > .tdb__nav {
	grid-column: 1 / -1;
}

.tdb__card {
	background: #fff;
	border: 1px solid var(--tdb-line);
	border-radius: 14px;
	padding: 16px;
	display: flex;
	gap: 13px;
}

.tdb--rows > .tdb__card {
	border-inline-start: 3px solid var(--tdb-accent);
	margin-bottom: 12px;
	border-radius: 12px;
}

.tdb__rank {
	flex: 0 0 auto;
	min-width: 38px;
	height: 38px;
	border-radius: 11px;
	background: var(--tdb-soft);
	color: #000;
	font-weight: 800;
	font-size: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.tdb__card--top .tdb__rank {
	background: var(--tdb-accent);
	color: #fff;
	box-shadow: 0 4px 12px rgba(47, 111, 237, .28);
}

.tdb__card--top {
	border-color: #cfdcff;
}

.tdb__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.tdb__body {
	flex: 1 1 auto;
	min-width: 0;
}

.tdb__heading {
	margin: 0 0 7px;
	font-size: 17px;
	line-height: 1.6;
	font-weight: 700;
}

.tdb__heading a {
	color: var(--tdb-ink);
	text-decoration: none;
}

.tdb__heading a:hover,
.tdb__heading a:focus {
	color: var(--tdb-accent);
	text-decoration: underline;
}

.tdb__sum {
	margin: 0 0 11px;
	color: var(--tdb-body);
	font-size: 14px;
	line-height: 1.95;
}

.tdb__sum + .tdb__sum {
	margin-top: -6px;
}

/* the English headline kept under the Persian one as the citation */
.tdb__cite {
	margin: -3px 0 9px;
	color: var(--tdb-faint);
	font-size: 12px;
	line-height: 1.5;
}

.tdb__keys {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin: 10px 0 2px;
}

.tdb__keys span {
	background: var(--tdb-soft);
	border: 1px solid var(--tdb-line);
	color: #000;
	border-radius: 999px;
	font-size: 11.5px;
	line-height: 1.4;
	padding: 2px 8px;
	white-space: nowrap;
}

/* Every story picture is a 80x80 thumbnail, never a banner. It sits at the
   start of the card and the text wraps beside it. */
.tdb__thumb {
	float: right;
	width: 80px;
	margin: 0 0 8px 12px;
}

.tdb__thumb img {
	display: block;
	width: 80px;
	max-width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: 8px;
	background: var(--tdb-soft);
}

.tdb__thumb--ref img {
	width: 80px;
	height: 80px;
}

.tdb__thumb figcaption {
	margin-top: 5px;
	font-size: 11.5px;
	line-height: 1.7;
	color: var(--tdb-faint);
}

.tdb__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 7px 15px;
	font-size: 12.5px;
	color: var(--tdb-mute);
}

.tdb__credit {
	font-size: 11.5px;
	color: var(--tdb-faint);
}

.tdb__cover {
	white-space: nowrap;
	color: var(--tdb-body);
	font-weight: 600;
}

.tdb__age {
	white-space: nowrap;
	color: var(--tdb-faint);
}

.tdb__pub a {
	color: #000;
	font-weight: 700;
	text-decoration: none;
}

.tdb__pub a:hover {
	text-decoration: underline;
}

.tdb__score {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.tdb__score b {
	color: var(--tdb-ink);
	font-weight: 700;
}

.tdb__bar {
	display: inline-block;
	width: 54px;
	height: 5px;
	border-radius: 999px;
	background: var(--tdb-line);
	overflow: hidden;
}

.tdb__bar i {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: var(--tdb-accent);
}

.tdb__rise {
	color: #000;
	background: #eafaef;
	border-radius: 999px;
	padding: 2px 9px;
	font-weight: 600;
}

.tdb__topic {
	color: #000;
	background: #eef3ff;
	border-radius: 999px;
	padding: 2px 9px;
	font-weight: 600;
}

.tdb__outlets {
	margin-top: 12px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: var(--tdb-faint);
}

.tdb__outlets a {
	border: 1px solid var(--tdb-line);
	background: #fbfcfe;
	color: var(--tdb-body);
	border-radius: 999px;
	padding: 3px 10px;
	text-decoration: none;
}

.tdb__outlets a:hover {
	border-color: var(--tdb-accent);
	color: var(--tdb-accent);
}

.tdb__also,
.tdb__note {
	margin: 10px 0 0;
	font-size: 11.5px;
	color: var(--tdb-faint);
}

.tdb__nav {
	margin-top: 22px;
	padding-top: 15px;
	border-top: 1px solid var(--tdb-line);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 7px;
	font-size: 13px;
	color: var(--tdb-mute);
}

.tdb__nav a {
	border: 1px solid var(--tdb-line);
	border-radius: 999px;
	padding: 4px 12px;
	color: var(--tdb-body);
	text-decoration: none;
}

.tdb__nav a:hover {
	border-color: var(--tdb-accent);
	color: var(--tdb-accent);
}

.tdb__empty {
	background: var(--tdb-soft);
	border: 1px dashed var(--tdb-line);
	border-radius: 12px;
	padding: 18px;
	color: var(--tdb-mute);
	font-size: 14px;
	margin: 0;
}

@media (max-width: 600px) {
	.tdb__card,
	.tdb--rows > .tdb__card {
		padding: 14px;
		gap: 10px;
	}

	.tdb__rank {
		min-width: 32px;
		height: 32px;
		font-size: 14px;
	}

	.tdb__heading {
		font-size: 16px;
	}
}

/* ---------------------------- briefs feed (theme) --------------------------- */
.tdbr {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 16px;
	font-family: inherit;
}

.tdbr__item {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 14px;
	border: 1px solid var(--tdb-line);
	border-radius: 14px;
	background: #fff;
}

.tdbr__item--top {
	border-color: color-mix(in srgb, var(--tdb-accent) 35%, var(--tdb-line));
}

.tdbr__rank {
	position: absolute;
	inset-block-start: 10px;
	inset-inline-start: 10px;
	min-width: 26px;
	height: 26px;
	display: grid;
	place-items: center;
	border-radius: 9px;
	background: var(--tdb-soft);
	color: var(--tdb-accent);
	font-weight: 700;
	font-size: 13px;
}

.tdbr__media img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 11px;
	background: var(--tdb-soft);
}

.tdbr__heading {
	margin: 0;
	font-size: 16.5px;
	line-height: 1.7;
	font-weight: 700;
}

.tdbr__heading a {
	color: var(--tdb-ink);
	text-decoration: none;
}

.tdbr__heading a:hover {
	color: var(--tdb-accent);
}

.tdbr__orig {
	margin: -4px 0 0;
	font-size: 12.5px;
	color: var(--tdb-faint);
}

.tdbr__sum {
	margin: 0;
	font-size: 14px;
	line-height: 1.9;
	color: var(--tdb-body);
}

.tdbr__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: auto 0 0;
	font-size: 12.5px;
	color: var(--tdb-mute);
}

.tdbr__pub {
	font-weight: 600;
	color: #000;
}

.tdbr__score,
.tdbr__cover,
.tdbr__age,
.tdbr__topic,
.tdbr__rise {
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--tdb-soft);
}

.tdbr__rise {
	color: #000;
	background: #fffaeb;
}

.tdbr__keys {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.tdbr__keys span {
	padding: 2px 7px;
	border: 1px solid var(--tdb-line);
	border-radius: 7px;
	font-size: 11.5px;
	color: var(--tdb-mute);
}

.tdbr__also {
	margin: 0;
	font-size: 12px;
	color: var(--tdb-faint);
}

/* Reference cards: an outlet we may link to but not republish. The whole
   card is the link, so the reader lands on the original article anywhere
   they click. */
.tdb__card--out {
	position: relative;
	cursor: pointer;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.tdb__card--out:hover,
.tdb__card--out:focus-within {
	border-color: #b9c9f2;
	box-shadow: 0 8px 22px rgba(16, 24, 40, .08);
}

.tdb__card--fa {
	border-inline-start: 3px solid #2f9e44;
}

.tdb__stretch {
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
}

.tdb__card--out .tdb__body a,
.tdb__card--out .tdb__outlets a {
	position: relative;
	z-index: 2;
}

.tdb__lang {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 8px;
	border-radius: 999px;
	background: #eaf7ee;
	color: #000;
	font-size: 11.5px;
	font-weight: 700;
	white-space: nowrap;
}

.tdb__why {
	margin: 10px 0 0;
	font-size: 12px;
	color: var(--tdb-mute);
}

.tdb__langnote {
	margin: 10px 0 0;
	padding: 8px 10px;
	border: 1px dashed #c8d4f0;
	border-radius: 9px;
	background: #f6f8ff;
	font-size: 12.5px;
	line-height: 1.7;
	color: var(--tdb-body);
}

.tdbr__item--out {
	position: relative;
	cursor: pointer;
}

.tdbr__lang {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin: 4px 0 0;
	padding: 2px 8px;
	border-radius: 999px;
	background: #eaf7ee;
	color: #000;
	font-size: 11.5px;
	font-weight: 700;
}

.tdbr__langnote,
.tdbr__note {
	margin: 6px 0 0;
	font-size: 12px;
	line-height: 1.7;
	color: var(--tdb-mute);
}

.tdbr__langnote {
	padding: 7px 9px;
	border: 1px dashed #c8d4f0;
	border-radius: 8px;
	background: #f6f8ff;
}

/* ----------------------------------------------------------
 * Spotlight block: top trending Iran stories (compact cards)
 * ---------------------------------------------------------- */
.tds {
	--tds-bg: #ffffff;
	--tds-line: #e7ebf2;
	--tds-text: #000000;
	--tds-mute: #000000;
	--tds-brand: #4f5bd5;
	--tds-soft: #f6f8fc;
	margin: 24px 0;
	direction: rtl;
}
.tds__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 14px;
}
.tds__title {
	margin: 0;
	font-size: 1.2rem;
	font-weight: 800;
	line-height: 1.4;
	color: var(--tds-text);
}
.tds__badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 10px;
	border-radius: 999px;
	background: #eef1ff;
	color: #000;
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
}
.tds__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}
.tds__card {
	margin: 0;
	min-width: 0;
}
.tds__link {
	display: flex;
	align-items: stretch;
	gap: 12px;
	padding: 12px;
	border: 1px solid var(--tds-line);
	border-radius: 14px;
	background: var(--tds-bg);
	text-decoration: none;
	color: inherit;
	transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
	min-width: 0;
}
.tds__link:hover {
	border-color: #cfd7ff;
	box-shadow: 0 6px 20px rgba(79, 91, 213, .08);
	transform: translateY(-1px);
}
.tds__rank {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	flex: 0 0 28px;
	border-radius: 9px;
	background: var(--tds-soft);
	color: #000;
	font-size: 13px;
	font-weight: 800;
	line-height: 1;
	margin-top: 2px;
}
.tds__thumb {
	width: 80px;
	height: 80px;
	min-width: 80px;
	min-height: 80px;
	max-width: 80px;
	max-height: 80px;
	flex: 0 0 80px;
	border-radius: 12px;
	overflow: hidden;
	background: #eef2f7;
	display: block;
}
.tds__thumb img {
	display: block;
	width: 80px !important;
	height: 80px !important;
	min-width: 80px;
	min-height: 80px;
	max-width: 80px;
	max-height: 80px;
	object-fit: cover;
	object-position: center;
}
.tds__thumb--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #000;
	font-size: 22px;
}
.tds__thumb-icon { line-height: 1; }
.tds__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
	flex: 1 1 auto;
}
.tds__heading {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 0.92rem;
	font-weight: 700;
	line-height: 1.65;
	color: var(--tds-text);
}
.tds__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 10px;
	margin-top: auto;
	font-size: 11px;
	line-height: 1.5;
	color: var(--tds-mute);
}
.tds__meta span { white-space: nowrap; }
.tds__score { color: #000; font-weight: 700; }
.tds__empty {
	margin: 0;
	padding: 18px;
	border: 1px dashed #d7deea;
	border-radius: 14px;
	background: #fbfcfe;
	color: var(--tds-mute);
	font-size: 13px;
}
@media (max-width: 1100px) {
	.tds__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
	.tds__grid { grid-template-columns: 1fr; }
	.tds__head { flex-direction: column; align-items: flex-start; }
	.tds__thumb, .tds__thumb img {
		width: 72px !important; height: 72px !important;
		min-width: 72px; min-height: 72px; max-width: 72px; max-height: 72px;
		flex-basis: 72px;
	}
}

/* ----------------------------------------------------------------------
 * Home topic sections.
 * One story carries the big picture; three compact rows sit beside it with
 * a 20% thumbnail. Every card ends with its own trend details line.
 * ---------------------------------------------------------------------- */
.tdb-board {
	--tdb-board-line: #e6e9ef;
	--tdb-board-surface: #ffffff;
	box-sizing: border-box;
	max-width: 1140px;
	margin: 0 auto;
	padding: clamp(1.6rem, 3vw, 2.4rem) clamp(1rem, 4vw, 1.75rem);
	color: #000;
	font-family: inherit;
}

.tdb-board__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	border-bottom: 1px solid var(--tdb-board-line);
	padding-bottom: .7rem;
	margin-bottom: 1.1rem;
}

.tdb-board__title {
	margin: 0;
	font-size: clamp(1.2rem, 2.4vw, 1.6rem);
	font-weight: 800;
	letter-spacing: -.01em;
	line-height: 1.5;
}

.tdb-board__more {
	margin: 0;
	font-size: .82rem;
}

.tdb-board__more a {
	color: #000;
	text-decoration: none;
	border-bottom: 1px solid rgba(0, 0, 0, .25);
	padding-bottom: 1px;
}

.tdb-board__more a:hover {
	border-bottom-color: #000;
}

.tdb-board__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
	gap: 1rem;
	align-items: start;
}

/* The outlet picture never grows past 80×80: the card is about the story,
 * and the thumbnail is only there to identify it at a glance. */
.tdb-board__lead {
	display: grid;
	grid-template-columns: 80px minmax(0, 1fr);
	gap: .85rem;
	align-items: start;
	background: var(--tdb-board-surface);
	border: 1px solid var(--tdb-board-line);
	border-radius: 16px;
	padding: .75rem;
}

.tdb-board__media {
	display: block;
	width: 80px;
	height: 80px;
	aspect-ratio: 1 / 1;
	border-radius: 10px;
	background: #eef1f6;
	overflow: hidden;
}

.tdb-board__media img {
	display: block;
	width: 80px;
	height: 80px;
	object-fit: cover;
}

.tdb-board__blank {
	display: block;
	width: 80px;
	height: 80px;
	background: linear-gradient(135deg, #eef1f6, #dfe4ec);
}

.tdb-board__lead--text {
	grid-template-columns: minmax(0, 1fr);
}

.tdb-board__body {
	padding: 0;
	min-width: 0;
}

.tdb-board__headline {
	margin: 0 0 .45rem;
	font-size: clamp(1.02rem, 1.8vw, 1.22rem);
	font-weight: 800;
	line-height: 1.7;
}

.tdb-board__headline a,
.tdb-board__minititle a {
	color: #000;
	text-decoration: none;
}

.tdb-board__headline a:hover,
.tdb-board__minititle a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.tdb-board__sum {
	margin: 0 0 .55rem;
	font-size: .88rem;
	line-height: 1.95;
}

.tdb-board__why {
	margin: 0;
	font-size: .74rem;
	line-height: 1.8;
}

.tdb-board__side {
	display: grid;
	gap: .7rem;
}

.tdb-board__mini {
	display: grid;
	grid-template-columns: min(20%, 80px) minmax(0, 1fr);
	gap: .65rem;
	align-items: start;
	background: var(--tdb-board-surface);
	border: 1px solid var(--tdb-board-line);
	border-radius: 14px;
	padding: .6rem;
}

.tdb-board__mini--text {
	grid-template-columns: minmax(0, 1fr);
}

.tdb-board__thumb {
	display: block;
	width: 100%;
	max-width: 80px;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 10px;
	background: #eef1f6;
}

.tdb-board__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tdb-board__minititle {
	margin: 0 0 .3rem;
	font-size: .92rem;
	font-weight: 700;
	line-height: 1.65;
}

@media (max-width: 860px) {
	.tdb-board__grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 520px) {
	.tdb-board__mini {
		grid-template-columns: min(22%, 80px) minmax(0, 1fr);
	}

	.tdb-board__mini--text {
		grid-template-columns: minmax(0, 1fr);
	}
}

.tdb-guides__more {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: .7rem;
	margin-top: 1rem;
}

@media (max-width: 760px) {
	.tdb-guides__more {
		grid-template-columns: 1fr;
	}
}
