/* =============================================================================
   News article (/news/*)
   Two-column layout — sticky sidebar with author/date + related, main content
   on the right. Tokens mirrored from docs.css so the article reads in the same
   visual family without depending on docs.css being loaded.
   ============================================================================= */

.news-article {
	/* Design tokens — mirror docs.css */
	--bg:       #ffffff;
	--surface:  #eef1f7;
	--border:   #e2e2ec;
	--accent:   #426dad;
	--text:     #0f0f1a;
	--muted:    #6b6b8a;

	--font-body: 'Avenir Next', 'Avenir', 'Nunito Sans', sans-serif;
	--font-mono: 'JetBrains Mono', 'Fira Code', monospace;

	--radius-sm: 8px;
	--radius-md: 12px;

	--news-sidebar-width: 280px;
	--news-max-width: 1200px;
	--news-reading-width: 760px;

	font-family: var(--font-body);
	color: var(--text);
	background: var(--bg);
	line-height: 1.55;
}

.news-article *,
.news-article *::before,
.news-article *::after { box-sizing: border-box; }

.news-article__layout {
	display: grid;
	grid-template-columns: var(--news-sidebar-width) 1fr;
	gap: 48px;
	max-width: var(--news-max-width);
	margin: 0 auto;
	padding: 32px 24px 80px;
}

/* ── Sidebar ─────────────────────────────────────────────────────────── */
.news-article__sidebar {
	position: sticky;
	top: 80px;
	align-self: start;
	max-height: calc(100vh - 100px);
	overflow-y: auto;
	padding: 4px 16px 24px 0;
	border-right: 1px solid var(--border);
}

/* Meta block (author / date) */
.news-article__meta {
	margin: 0 0 24px;
	padding: 0;
}

.news-article__meta-item {
	margin: 0 0 12px;
}

.news-article__meta-item:last-child {
	margin-bottom: 0;
}

.news-article__meta-label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: var(--muted);
	margin: 0 0 2px;
}

.news-article__meta-value {
	font-size: 15px;
	color: var(--text);
	margin: 0;
}

/* Post variant — avatar in left column, name/role/date stacked in right. */
.news-article__meta--post {
	display: flex;
	align-items: flex-start;
	gap: 20px;
	margin: 0 0 20px;
}

.news-article__meta--post .news-article__meta-avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	flex: 0 0 48px;
}

.news-article__meta--post .news-article__meta-avatar--initials {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #426dad;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.5px;
	line-height: 1;
	text-transform: uppercase;
	user-select: none;
}

.news-article__meta--post .news-article__meta-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.news-article__author-name {
	font-size: 15px;
	font-weight: 600;
	color: var(--text);
	line-height: 1.2;
}

.news-article__author-role {
	font-size: 13px;
	color: var(--muted);
	line-height: 1.2;
}

.news-article__meta--post .news-article__meta-date {
	font-size: 13px;
	color: var(--muted);
	line-height: 1.2;
	margin-top: 4px;
}

/* Related list */
.news-article__related {
	border-top: 1px solid var(--border);
	padding-top: 20px;
}

.news-article__related-heading {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: var(--muted);
	margin: 0 0 12px;
}

.news-article__related-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.news-article__related-item {
	margin: 0 0 8px;
}

.news-article__related-item:last-child {
	margin-bottom: 0;
}

.news-article__related-link {
	display: block;
	font-size: 14px;
	color: var(--text);
	text-decoration: none;
	line-height: 1.4;
}

.news-article__related-link:hover,
.news-article__related-link:focus-visible {
	color: var(--accent);
	text-decoration: underline;
}

/* ── Main column ─────────────────────────────────────────────────────── */
.news-article__main {
	min-width: 0;
	max-width: var(--news-reading-width);
}

.news-article__back {
	display: inline-block;
	font-size: 14px;
	color: var(--accent);
	text-decoration: none;
	margin-bottom: 16px;
}

.news-article__back:hover,
.news-article__back:focus-visible {
	text-decoration: underline;
}

.news-article__header { margin-bottom: 24px; }

.news-article__title {
	font-size: clamp(32px, 4vw, 44px);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -1px;
	margin: 0 0 12px;
}

.news-article__hero {
	margin: 0 0 32px;
}

.news-article__hero img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--radius-md);
}

.news-article__body {
	font-size: 17px;
	line-height: 1.7;
}

.news-article__body > * {
	margin-top: 0;
	margin-bottom: 1em;
}

.news-article__body h2 {
	font-size: 26px;
	font-weight: 700;
	margin: 1.6em 0 0.6em;
	letter-spacing: -0.3px;
}

.news-article__body h3 {
	font-size: 20px;
	font-weight: 700;
	margin: 1.5em 0 0.5em;
}

.news-article__body a {
	color: var(--accent);
	text-decoration: underline;
}

.news-article__body img {
	max-width: 100%;
	height: auto;
	border-radius: var(--radius-sm);
}

.news-article__body blockquote {
	border-left: 4px solid var(--accent);
	padding: 4px 0 4px 20px;
	margin: 1.4em 0;
	color: var(--muted);
	font-style: italic;
}

.news-article__blocks {
	margin-top: 32px;
}

/* Prev/Next nav */
.news-article__nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid var(--border);
}

.news-article__nav-link {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 16px 20px;
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	color: var(--text);
	text-decoration: none;
	background: var(--bg);
	transition: border-color 0.15s ease, background 0.15s ease;
}

.news-article__nav-link:hover,
.news-article__nav-link:focus-visible {
	border-color: var(--accent);
	background: var(--surface);
	outline: none;
}

.news-article__nav-link--next {
	text-align: right;
}

.news-article__nav-label {
	font-size: 12px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: var(--muted);
	font-weight: 600;
}

.news-article__nav-title {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
}

/* ── Mobile ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
	.news-article__layout {
		grid-template-columns: 1fr;
		gap: 24px;
	}
	.news-article__sidebar {
		position: static;
		max-height: none;
		padding-right: 0;
		border-right: none;
		border-bottom: 1px solid var(--border);
		padding-bottom: 16px;
		margin-bottom: 8px;
	}
	.news-article__nav {
		grid-template-columns: 1fr;
	}
	.news-article__nav-link--next {
		text-align: left;
	}
}
