/* HNC Forum — consumes the theme's tokens, with fallbacks for other themes. */

/* ---------- headers ---------- */

.hnc-forumhead {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 18px;
	flex-wrap: wrap;
	padding-bottom: 16px;
	margin-bottom: 24px;
	border-bottom: 1.5px solid var(--hnc-ink, #0a0a0a);
}
.hnc-forumhead__title { margin: 0 0 4px; font-size: clamp(26px, 4vw, 38px); }
.hnc-forumhead__lede {
	margin: 0;
	color: var(--hnc-muted, #6b6b6b);
	font-size: 15px;
	max-width: 52ch;
}

.hnc-crumbs {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
	font-size: 13px;
	color: var(--hnc-muted, #6b6b6b);
	margin-bottom: 14px;
}
.hnc-crumbs a { font-weight: 600; }

/* ---------- board list ---------- */

.hnc-boards {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--hnc-line, #e4e4e4);
	border-radius: var(--hnc-radius, 4px);
	overflow: hidden;
	margin-bottom: 42px;
}

.hnc-board {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 90px minmax(0, 190px);
	gap: 18px;
	align-items: center;
	padding: 16px 18px;
	border-bottom: 1px solid var(--hnc-line, #e4e4e4);
}
.hnc-board:last-child { border-bottom: 0; }
.hnc-board:hover { background: var(--hnc-surface, #f4f4f4); }

.hnc-board__title {
	margin: 0 0 3px;
	font-size: 17px;
	text-transform: uppercase;
}
.hnc-board__desc {
	margin: 0;
	font-size: 13.5px;
	color: var(--hnc-muted, #6b6b6b);
	line-height: 1.45;
}

.hnc-board__count,
.hnc-topic__replies {
	text-align: center;
	font-size: 12px;
	color: var(--hnc-muted, #6b6b6b);
	line-height: 1.25;
}
.hnc-board__count strong,
.hnc-topic__replies strong {
	display: block;
	font-size: 18px;
	color: var(--hnc-ink, #0a0a0a);
	font-variant-numeric: tabular-nums;
}
.hnc-board__count span,
.hnc-topic__replies span { text-transform: uppercase; letter-spacing: .05em; font-size: 10.5px; }

.hnc-board__latest {
	font-size: 13px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.hnc-board__latest a {
	font-weight: 700;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.hnc-board__when { color: var(--hnc-muted, #6b6b6b); font-size: 12px; }

/* ---------- topic list ---------- */

.hnc-topics { display: flex; flex-direction: column; }

.hnc-topic {
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr) 74px;
	gap: 14px;
	align-items: center;
	padding: 15px 0;
	border-bottom: 1px solid var(--hnc-line, #e4e4e4);
}

.hnc-topic__votes { display: flex; justify-content: center; }
.hnc-topic__votes .hnc-vote { flex-direction: column; gap: 0; }

.hnc-topic__body { min-width: 0; }

.hnc-topic__title {
	margin: 0 0 4px;
	font-size: 16.5px;
	line-height: 1.3;
	text-transform: none;
	font-family: var(--hnc-body, sans-serif);
	font-weight: 700;
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	align-items: baseline;
}

.hnc-topic__flag {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	padding: 3px 7px;
	border-radius: 999px;
	line-height: 1;
}
.hnc-topic__flag--pin { background: var(--hnc-accent, #ff4500); color: #fff; }
.hnc-topic__flag--lock { background: var(--hnc-surface, #f4f4f4); color: var(--hnc-muted, #6b6b6b); }

.hnc-topic__meta {
	margin: 0;
	font-size: 12.5px;
	color: var(--hnc-muted, #6b6b6b);
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
}
.hnc-topic__board { font-weight: 700; }
.hnc-topic__by a { font-weight: 600; }
.hnc-topic__dot { opacity: .55; }

/* ---------- single topic ---------- */

.hnc-single-topic__title {
	font-size: clamp(24px, 3.6vw, 36px);
	margin-bottom: 20px;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: baseline;
}

.hnc-op {
	display: grid;
	grid-template-columns: 52px minmax(0, 1fr);
	gap: 16px;
	padding-bottom: 22px;
	margin-bottom: 8px;
	border-bottom: 1px solid var(--hnc-line, #e4e4e4);
}
.hnc-op__aside { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hnc-op__avatar { border-radius: 50%; }
.hnc-op__aside .hnc-vote { flex-direction: column; gap: 0; }

.hnc-op__body { min-width: 0; }
.hnc-op__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	font-size: 13px;
	color: var(--hnc-muted, #6b6b6b);
	margin: 0 0 10px;
}
.hnc-op__author { font-weight: 700; color: var(--hnc-ink, #0a0a0a); }
.hnc-op__karma {
	background: var(--hnc-surface, #f4f4f4);
	color: var(--hnc-accent, #ff4500);
	font-weight: 700;
	font-size: 11px;
	padding: 2px 8px;
	border-radius: 999px;
}
.hnc-op__content { font-size: 15.5px; }

.hnc-replies { margin-top: 26px; }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
	.hnc-board {
		grid-template-columns: minmax(0, 1fr) 76px;
		gap: 12px;
	}
	.hnc-board__latest {
		grid-column: 1 / -1;
		border-top: 1px dashed var(--hnc-line, #e4e4e4);
		padding-top: 8px;
	}
}

@media (max-width: 560px) {
	.hnc-forumhead { align-items: stretch; }
	.hnc-forumhead .hnc-btn { width: 100%; }

	.hnc-topic {
		grid-template-columns: 40px minmax(0, 1fr);
		gap: 10px;
	}
	.hnc-topic__replies {
		grid-column: 2;
		text-align: left;
		display: flex;
		gap: 5px;
		align-items: baseline;
	}
	.hnc-topic__replies strong { display: inline; font-size: 13px; }
	.hnc-topic__replies span { font-size: 11px; }

	.hnc-op { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
	.hnc-op__avatar { width: 36px; height: 36px; }
}

@media (hover: none) and (pointer: coarse) {
	.hnc-board__title a,
	.hnc-topic__title a,
	.hnc-board__latest a,
	.hnc-topic__board,
	.hnc-topic__by a,
	.hnc-op__author {
		display: inline-block;
		min-height: 24px;
		padding-block: 4px;
	}
	.hnc-crumbs a { display: inline-block; min-height: 24px; padding-block: 4px; }
}

/* ---------- sort bar (shared look with the reply sorter) ---------- */

.hnc-boardsort { margin: -6px 0 16px; }
.hnc-sortbar {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 12.5px;
	flex-wrap: wrap;
}
.hnc-sortbar__opt {
	padding: 5px 12px;
	border-radius: 999px;
	font-weight: 700;
	color: var(--hnc-muted, #6b6b6b);
	line-height: 1.4;
}
.hnc-sortbar__opt:hover { background: var(--hnc-surface, #f4f4f4); }
.hnc-sortbar__opt.is-active {
	background: var(--hnc-ink, #0a0a0a);
	color: var(--hnc-base, #fff);
}
.hnc-sectionhead .hnc-sortbar { margin-left: auto; }

@media (hover: none) and (pointer: coarse) {
	.hnc-sortbar__opt { min-height: 32px; display: inline-flex; align-items: center; }
}
