/* Forum refresh (2026-11-16): hero + stats, category tiles with live
   counts, activity feed, richer thread rows, post numbers.  Built only on the
   site theme variables (--card, --fg, --muted, --border, --accent*) so every
   theme (LCARS, Modern, Calm, Rose garden, MTG ...) keeps its own colours.
   No animation; hover states only change colour/border. */

.fc-hero {
	display: grid; gap: 1rem 1.5rem; align-items: center;
	grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
	padding: 1.1rem 1.25rem; margin: 0 0 1rem;
	border: 1px solid var(--border, #444); border-radius: 0.9rem;
	background:
		linear-gradient(135deg, color-mix(in srgb, var(--accent, #f90) 16%, transparent), transparent 60%),
		var(--card, #1b1b24);
}
.fc-hero h2 { margin: 0 0 0.3rem; font-size: 1.7rem; }
.fc-hero p { margin: 0 0 0.7rem; color: var(--muted, #aaa); }
.fc-hero .forum-search { margin: 0; }
.fc-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.fc-stat {
	display: flex; flex-direction: column; align-items: flex-start; padding: 0.55rem 0.75rem;
	border-radius: 0.6rem; background: color-mix(in srgb, var(--fg, #eee) 6%, transparent);
	border-left: 4px solid var(--accent-2, var(--accent, #f90));
}
.fc-stat:nth-child(2) { border-left-color: var(--accent-3, var(--accent, #f90)); }
.fc-stat:nth-child(3) { border-left-color: var(--accent, #f90); }
.fc-stat:nth-child(4) { border-left-color: var(--accent-4, var(--accent-2, #f90)); }
.fc-stat strong { font-size: 1.35rem; line-height: 1.1; }
.fc-stat span { font-size: 0.82rem; color: var(--muted, #aaa); }

.fc-layout { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem); align-items: start; }
.fc-cats { display: grid; gap: 0.6rem; }
.fc-aside { display: grid; gap: 1rem; position: sticky; top: 1rem; }

a.fc-cat {
	display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.9rem; align-items: center;
	color: inherit; text-decoration: none; margin: 0;
	transition: border-color 150ms ease, background-color 150ms ease;
}
a.fc-cat:hover, a.fc-cat:focus-visible { border-color: var(--accent, #f90); background: color-mix(in srgb, var(--accent, #f90) 7%, var(--card, #1b1b24)); }
a.fc-cat:focus-visible { outline: 2px solid var(--accent, #f90); outline-offset: 2px; }
.fc-fresh { box-shadow: inset 4px 0 0 var(--accent, #f90); }
.fc-cat-icon {
	display: grid; place-items: center; width: 2.8rem; height: 2.8rem; font-size: 1.45rem;
	border-radius: 0.75rem; background: color-mix(in srgb, var(--accent, #f90) 18%, transparent);
}
.fc-cat-icon.big { width: 3.4rem; height: 3.4rem; font-size: 1.8rem; }
.fc-cat-body { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.fc-cat-title { font-weight: 700; font-size: 1.08rem; color: var(--fg, inherit); }
.fc-cat-desc { color: var(--muted, #aaa); font-size: 0.92rem; }
.fc-cat-latest { font-size: 0.85rem; color: var(--muted, #aaa); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-cat-latest em { color: var(--fg, #eee); font-style: normal; }
.fc-cat-count {
	display: grid; grid-template-columns: auto auto; gap: 0 0.35rem; align-items: baseline;
	font-size: 0.82rem; color: var(--muted, #aaa); text-align: right;
}
.fc-cat-count strong { color: var(--fg, #eee); font-size: 1rem; text-align: right; }
.fc-tag, .fc-new, .fc-op, .fc-hot {
	display: inline-block; margin-left: 0.45rem; padding: 0.05rem 0.45rem; border-radius: 999px;
	font-size: 0.72rem; font-weight: 700; vertical-align: middle; letter-spacing: 0.02em;
}
.fc-tag { border: 1px solid var(--border, #555); color: var(--muted, #aaa); font-weight: 600; }
.fc-new { background: var(--accent, #f90); color: var(--bg, #000); }
.fc-hot { background: color-mix(in srgb, var(--accent-2, #f90) 25%, transparent); color: var(--fg, #eee); }
.fc-op { background: color-mix(in srgb, var(--accent-3, #69f) 30%, transparent); color: var(--fg, #eee); }

.fc-side h3 { margin: 0 0 0.6rem; font-size: 1rem; }
.fc-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.65rem; }
.fc-feed li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.55rem; align-items: start; }
.fc-feed li > div > a { font-weight: 600; overflow-wrap: anywhere; }
.fc-feed .post-avatar, .fc-posters .post-avatar { width: 1.9rem; height: 1.9rem; font-size: 0.85rem; }
.fc-posters { display: grid; gap: 0.45rem; }
.fc-poster { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.5rem; align-items: center; }

.fc-crumbs { margin: 0 0 0.4rem; font-size: 0.9rem; color: var(--muted, #aaa); }
.fc-cat-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.9rem; align-items: center; margin-bottom: 0.6rem; }
.fc-cat-head h2 { margin: 0; }
.fc-cat-head p { margin: 0.15rem 0 0; }
.fc-tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.4rem 0 0.8rem; border-bottom: 1px solid var(--border, #444); }
.fc-tab {
	padding: 0.4rem 0.85rem; border-radius: 0.5rem 0.5rem 0 0; text-decoration: none; color: var(--muted, #aaa);
	border: 1px solid transparent; border-bottom: none; margin-bottom: -1px;
}
.fc-tab.on { color: var(--fg, #eee); border-color: var(--border, #444); background: var(--card, #1b1b24); font-weight: 700; }
.fc-tab:hover { color: var(--fg, #eee); }

.fc-thread { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.8rem; align-items: center; }
.fc-thread h3 { margin: 0 0 0.2rem; font-size: 1.05rem; overflow-wrap: anywhere; }
.fc-thread .meta { margin: 0; }
.fc-pinned { border-color: color-mix(in srgb, var(--accent, #f90) 55%, var(--border, #444)); }
.fc-badge { margin-right: 0.3rem; }
.fc-badge + a { margin-right: 0.2rem; }
.fc-replies {
	display: flex; flex-direction: column; align-items: center; min-width: 3.6rem; padding: 0.35rem 0.5rem;
	border-radius: 0.6rem; background: color-mix(in srgb, var(--fg, #eee) 6%, transparent);
}
.fc-replies strong { font-size: 1.15rem; }
.fc-replies span { font-size: 0.72rem; color: var(--muted, #aaa); }
.fc-pager { display: flex; justify-content: space-between; align-items: center; margin: 1rem 0; }
.fc-empty { padding: 1.5rem; text-align: center; }

.fc-jump { text-align: right; margin: 0 0 0.4rem; font-size: 0.9rem; }
.fc-postno { font-size: 0.8rem; color: var(--muted, #aaa); text-decoration: none; margin-right: 0.2rem; font-variant-numeric: tabular-nums; }
.fc-postno:hover { color: var(--accent, #f90); }
/* The post number and the OP mark never shrink; the name and date line
 * takes what is left and wraps (on phones "#1" and "OP" were squeezed into
 * one letter per line). */
.post-head > .fc-postno, .post-head > .fc-op { flex: 0 0 auto; white-space: nowrap; margin-left: 0; }
.post-head > .meta { flex: 1 1 auto; min-width: 0; }

@media (max-width: 860px) {
	.fc-hero, .fc-layout { grid-template-columns: minmax(0, 1fr); }
	.fc-aside { position: static; }
}
@media (max-width: 520px) {
	a.fc-cat, .fc-thread { grid-template-columns: auto minmax(0, 1fr); }
	.fc-cat-count, .fc-replies { grid-column: 2; justify-self: start; display: flex; flex-direction: row; align-items: baseline; gap: 0.3rem; text-align: left; background: none; padding: 0; }
	.fc-cat-head { grid-template-columns: auto minmax(0, 1fr); }
	.fc-new-btn { grid-column: 1 / -1; justify-self: start; }
	.fc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	/* All three sort tabs fit one row on most phones instead of "Most
	 * replies" sitting alone below (the narrowest still wrap, whole words). */
	.fc-tabs { gap: 0.1rem; }
	.fc-tab { padding: 0.4rem 0.5rem; white-space: nowrap; font-size: 0.92rem; }
	/* Bigger targets for the small links in a post's header. */
	.post-head .fc-postno, .post-head .meta a { display: inline-block; padding-block: 0.3rem; }
}

/* Focus moved to a view's heading after navigation (forum.js announceView)
 * needs no ring: the heading is not something to press. */
#app :is(h1, h2, h3)[tabindex="-1"]:focus { outline: none; }

/* New thread: the title box was an unstyled 180px field beside its label. */
.fc-new-thread label { display: block; margin: 0.4rem 0 0.3rem; font-weight: 700; }
.fc-new-thread .fc-title-input {
	display: block; box-sizing: border-box; width: 100%; max-width: 42rem; margin-bottom: 0.7rem;
	padding: 0.5rem 0.6rem; border: 1px solid var(--border, #444); border-radius: 6px;
	background: var(--bg, #111); color: var(--fg, #eee); font: inherit;
}
/* The high-score game picker was a tiny unstyled box beside a big button. */
#app .fc-select {
	min-height: 2.4rem; padding: 0.35rem 0.6rem; border: 1px solid var(--border, #444); border-radius: 6px;
	background: var(--bg, #111); color: var(--fg, #eee); font: inherit; max-width: 100%;
}
