/* Navigation and structure (1.2.2): topics index, utility-bar Advertise link, menu fit. */

.topics-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--space-6);
	padding: var(--space-7) 0 var(--space-8);
}

.topic-card {
	border: 1px solid var(--line);
	border-top: 3px solid var(--brand);
	background: var(--bg);
	padding: var(--space-5);
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
}

.topic-card__name {
	font-family: var(--font-display);
	font-size: var(--text-3xl);
	font-weight: 600;
	line-height: 1.2;
	margin: 0;
}

.topic-card__name a { color: var(--ink); text-decoration: none; }
.topic-card__name a:hover { color: var(--brand); }

.topic-card__desc {
	font-family: var(--font-body);
	font-size: var(--text-lg);
	line-height: 1.5;
	color: var(--muted);
	margin: 0;
}

.topic-card__count {
	font-family: var(--font-ui);
	font-size: var(--text-sm);
	font-weight: 700;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: var(--brand);
	margin: var(--space-2) 0 0;
}

.topic-card__latest {
	font-family: var(--font-ui);
	font-size: var(--text-md);
	line-height: 1.4;
	margin: auto 0 0;
	padding-top: var(--space-3);
	border-top: 1px solid var(--line);
}

.topic-card__latest span {
	display: block;
	font-size: var(--text-sm);
	color: var(--muted);
	margin-bottom: 2px;
}

.topic-card__latest a { color: var(--ink); text-decoration: none; }
.topic-card__latest a:hover { color: var(--brand); text-decoration: underline; }

@media (max-width: 900px) {
	.topics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
	.topics-grid { grid-template-columns: 1fr; gap: var(--space-4); }
}

/* Ten menu items on desktop: the links share the space left of the logo, spread edge to edge, and never run past the page container. */
@media (min-width: 901px) {
	.section-nav-bar { gap: 20px; }
	.section-nav-inner {
		flex: 1 1 auto;
		min-width: 0;
		justify-content: space-between;
		gap: 12px;
	}
	.section-nav-inner a { white-space: nowrap; }
}
@media (min-width: 901px) and (max-width: 1360px) {
	.section-nav-inner { font-size: var(--text-md); letter-spacing: 0; }
}
@media (min-width: 901px) and (max-width: 1100px) {
	.section-nav-inner { font-size: var(--text-sm); }
	.nav-logo svg, .nav-logo img { height: 52px; }
}

.util-advertise { white-space: nowrap; }
