/* ==========================================================================
   Market news: list (chilli_news.html) + article (single_chilli_news.html)
   Relies on tokens from css/theme.css and layout helpers from forms.css.
   ========================================================================== */

/* ---------- List ---------- */
.news-list { display: grid; gap: 1.2rem; margin: 0; padding: 0; list-style: none; }

.news-card {
	position: relative;
	display: block;
	padding: 1.6rem 1.8rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	background: var(--surface);
	box-shadow: var(--shadow-xs);
	color: inherit;
	transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease, transform var(--duration-fast) ease;
}
.news-card:hover,
.news-card:focus-within { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.news-card:active { transform: scale(0.995); }

.news-card__title {
	display: -webkit-box;
	margin: 0 0 0.6rem;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	font-size: 1.65rem;
	font-weight: var(--font-weight-semibold);
	line-height: 1.4;
	overflow-wrap: anywhere;
}
/* whole card is clickable via the title link */
.news-card__title a { color: var(--text-primary); text-decoration: none; }
.news-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.news-card__title a:focus-visible { outline: none; }
.news-card:focus-within { box-shadow: var(--focus-ring); }

.news-card__excerpt {
	display: -webkit-box;
	margin: 0 0 1rem;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	color: var(--text-secondary);
	font-size: 1.4rem;
	line-height: 1.6;
}

.news-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem 1.2rem;
	margin: 0;
	color: var(--text-muted);
	font-size: 1.25rem;
}
.news-meta i { margin-right: 0.4rem; }

.news-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin-bottom: 1rem;
	padding: 0.2rem 1rem;
	border-radius: var(--radius-pill);
	background: var(--accent-soft);
	color: var(--accent);
	font-size: 1.2rem;
	font-weight: var(--font-weight-semibold);
}

/* newest story: larger, tinted */
.news-card--lead {
	padding: 2rem;
	border-color: transparent;
	background: linear-gradient(180deg, var(--accent-soft), var(--surface) 70%);
	box-shadow: 0 0 0 1px var(--border), var(--shadow-xs);
}
.news-card--lead .news-card__title { font-size: 1.9rem; }
.news-card--lead .news-card__excerpt { -webkit-line-clamp: 3; }

@media (min-width: 768px) {
	.news-list { grid-template-columns: 1fr 1fr; }
	.news-list > li:first-child { grid-column: 1 / -1; }
}

/* ---------- Pagination ---------- */
.news-pager {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 2rem;
}
.news-pager__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	min-height: 44px;
	padding: 0 1.6rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	background: var(--surface);
	color: var(--text-primary);
	font-size: 1.4rem;
	font-weight: var(--font-weight-medium);
}
.news-pager__btn:hover { border-color: var(--border-strong); color: var(--accent); text-decoration: none; }
.news-pager__btn[aria-disabled="true"] { visibility: hidden; }
.news-pager__info { color: var(--text-muted); font-size: 1.3rem; }

/* ---------- Article ---------- */
.article { max-width: 680px; margin: 0 auto; }
.article__back {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	min-height: 40px;
	margin-bottom: 1.2rem;
	color: var(--text-secondary);
	font-size: 1.4rem;
	font-weight: var(--font-weight-medium);
}
.article__back:hover { color: var(--accent); text-decoration: none; }
.article__title {
	margin: 0 0 1.2rem;
	font-size: 2.4rem;
	font-weight: var(--font-weight-bold);
	letter-spacing: -0.02em;
	line-height: 1.3;
	overflow-wrap: anywhere;
}
@media (min-width: 768px) { .article__title { font-size: 3rem; } }

.article__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.2rem 0;
	margin-bottom: 2rem;
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
}
.share-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	min-height: 38px;
	padding: 0 1.4rem;
	border-radius: var(--radius-pill);
	background: #e7f8ee;
	color: #137a3b;
	font-size: 1.35rem;
	font-weight: var(--font-weight-semibold);
}
.share-btn i { font-size: 1.6rem; }
.share-btn:hover { background: #d3f2e0; color: #0f6430; text-decoration: none; }

.article__body {
	color: var(--text-primary);
	font-size: 1.65rem;
	line-height: 1.8;
	overflow-wrap: anywhere;
}
.article__body p { margin: 0 0 1.4em; color: inherit; font-size: inherit; line-height: inherit; }
.article__body h2, .article__body h3, .article__body h4 { margin: 1.6em 0 0.6em; font-weight: var(--font-weight-semibold); line-height: 1.35; }
.article__body ul, .article__body ol { margin: 0 0 1.4em; padding-left: 2.2rem; }
.article__body li { margin-bottom: 0.4em; }
.article__body img { max-width: 100%; height: auto !important; border-radius: var(--radius-md); }
.article__body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 1.4rem; }
.article__body td, .article__body th { padding: 0.6rem 1rem; border: 1px solid var(--border); }
.article__body a { color: var(--accent); text-decoration: underline; }
.article__body blockquote { margin: 0 0 1.4em; padding: 0.4rem 0 0.4rem 1.6rem; border-left: 3px solid var(--accent); color: var(--text-secondary); }

.article__more { margin-top: 3.2rem; padding-top: 2.4rem; border-top: 1px solid var(--border); }
.article__more h2 { margin: 0 0 1.2rem; font-size: 1.8rem; font-weight: var(--font-weight-semibold); }
.article__more .news-list { grid-template-columns: 1fr; }
.article__more .news-list > li:first-child { grid-column: auto; }
