[content][forum-page] {
	max-width: 92rem;
	background: transparent;
	box-shadow: none;
}

[forum-page] [breadcrumb] {
	align-items: center;
	margin-bottom: 1rem;
}

[forum-page] [breadcrumb] a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}

[forum-top] {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.25rem;
}

[forum-top] > :first-child {
	flex: 1 1 22rem;
	min-width: 0;
}

[forum-top] h1 {
	margin: 0 0 .35rem;
	overflow-wrap: break-word;
	word-break: normal;
}

[forum-top] p {
	margin: 0;
	color: var(--text-muted);
}

[forum-actions] {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: .7rem;
	flex: 0 1 auto;
	max-width: 100%;
}

[forum-actions] form {
	margin: 0;
	flex: 1 1 auto;
	min-width: 0;
	max-width: none;
}

[forum-actions] a,
[forum-actions] button {
	white-space: nowrap;
}

@media (max-width: 1100px) {
	[forum-top] > :first-child {
		flex-basis: 100%;
	}

	[forum-actions] {
		width: 100%;
		justify-content: flex-start;
	}
}

[forum-index] {
	display: grid;
	gap: 1.35rem;
}

[forum-category-block] {
	--forum-side-left: minmax(0, 1fr);
	--forum-side-right: minmax(0, 1fr);
	--forum-stat-1: 6.25rem;
	--forum-stat-2: 6.25rem;
	--forum-latest-col: minmax(0, 1fr);
	border: 1px solid var(--border-card);
	border-radius: 10px;
	overflow: hidden;
	background: transparent;
}

[forum-category-heading] {
	display: grid;
	grid-template-columns: var(--forum-side-left) var(--forum-side-right);
	align-items: center;
	gap: 1rem;
	min-height: 4.25rem;
	padding: .95rem 1.1rem;
	background: var(--forum-banner-bg, var(--header-bg));
	color: var(--header-text);
	box-shadow: inset 0 -1px 0 var(--forum-banner-edge, rgba(255, 255, 255, .08));
}

[forum-category-heading] a {
	color: var(--header-text);
}

[forum-category-name] {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .25rem .75rem;
	min-width: 0;
}

[forum-category-heading] h2 {
	min-width: 0;
	max-width: 100%;
	margin: 0;
	overflow-wrap: anywhere;
	font-size: 1.28rem;
	font-weight: 800;
	letter-spacing: -.01em;
}

[forum-category-name] > a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	min-width: 44px;
	min-height: 44px;
	white-space: nowrap;
	font-size: .98rem;
	font-weight: 600;
	opacity: .9;
}

[forum-column-headings] {
	display: grid;
	grid-template-columns: var(--forum-stat-1) var(--forum-stat-2) var(--forum-latest-col);
	gap: .9rem;
	align-items: center;
	font-size: .88rem;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
	opacity: .84;
}

[forum-column-headings] span {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
}

[forum-column-headings] span:last-child {
	justify-content: flex-start;
	text-align: left;
}

[forum-rows] {
	display: grid;
}

[forum-row] {
	display: grid;
	grid-template-columns: var(--forum-side-left) var(--forum-side-right);
	align-items: stretch;
	border-top: 1px solid var(--border-card);
	background: transparent;
}

[forum-row]:first-child {
	border-top: 0;
}

[forum-main] {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
	padding: 1.15rem 1.1rem;
	background: transparent;
	backdrop-filter: none;
}

[forum-title] {
	display: inline-block;
	font-size: 1.05rem;
	font-weight: 700;
}

[forum-description],
[forum-state] {
	margin-top: .25rem;
	font-size: .85rem;
	color: var(--text-muted);
}

[forum-summary] {
	display: grid;
	grid-template-columns: var(--forum-stat-1) var(--forum-stat-2) var(--forum-latest-col);
	gap: .9rem;
	align-items: center;
	min-width: 0;
	padding: .95rem 1.1rem;
	border-left: 1px solid var(--border-card);
	background: var(--forum-side-bg, rgba(255, 255, 255, .08));
}

[forum-stat] {
	display: grid;
	place-items: center;
	align-content: center;
	min-width: 0;
	text-align: center;
}

[forum-stat] strong {
	font-size: 1rem;
}

[forum-stat] small {
	font-size: .75rem;
	color: var(--text-muted);
}

[forum-latest] {
	min-width: 0;
	font-size: .85rem;
}

[forum-latest] > a {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 600;
}

[forum-latest] > div {
	margin-top: .2rem;
	color: var(--text-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

[forum-row]:hover [forum-main] {
	background: transparent;
}

[forum-row]:hover [forum-title] {
	text-decoration: underline;
}

[forum-row]:hover [forum-summary] {
	background: var(--forum-side-hover-bg, rgba(255, 255, 255, .10));
}

[forum-empty] {
	padding: 1rem;
	margin: 0;
	color: var(--text-muted);
}

[thread-table] {
	border: 1px solid var(--border-card);
	border-radius: 10px;
	overflow: hidden;
	background: transparent;
}

[thread-table-heading] {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: center;
	background: var(--header-bg);
	color: var(--header-text);
	padding: .95rem 1.1rem;
	font-size: .88rem;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
}

[thread-column-name] {
	font-size: 1.05rem;
	letter-spacing: 0;
	text-transform: none;
	font-weight: 700;
}

[thread-column-headings] {
	display: grid;
	grid-template-columns: 7rem minmax(0, 1fr);
	gap: 1rem;
	align-items: center;
}

[thread-column-headings] span:first-child {
	text-align: center;
}

[thread-row] {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: stretch;
	border-top: 1px solid var(--border-card);
	background: transparent;
}

[thread-row]:first-child {
	border-top: 0;
}

[thread-main] {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
	padding: 1.1rem;
	background: transparent;
}

[thread-main] > a svg {
	margin-right: .3rem;
}

[thread-main] > a {
	display: block;
	font-weight: 700;
}

[thread-main] small,
[thread-stats] small,
[thread-last] div {
	color: var(--text-muted);
}

[thread-side] {
	display: grid;
	grid-template-columns: 7rem minmax(0, 1fr);
	gap: 1rem;
	align-items: center;
	min-width: 0;
	padding: 1.1rem;
	border-left: 1px solid var(--border-card);
	background: var(--thread-side-bg, var(--forum-side-bg, rgba(255, 255, 255, .08)));
}

[thread-row]:hover [thread-side] {
	background: var(--thread-side-hover-bg, var(--forum-side-hover-bg, rgba(255, 255, 255, .10)));
}

[thread-stats] {
	display: grid;
	place-items: center;
	align-content: center;
	text-align: center;
}

[thread-stats] strong,
[thread-stats] small {
	display: block;
}

[thread-last] {
	min-width: 0;
	font-size: .85rem;
}

[thread-last] a {
	display: inline;
}


[forum-toolbar] {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: .75rem;
	margin: 1rem 0 .7rem;
}

[forum-toolbar-spacer] {
	flex: 1 1 auto;
}

[thread-page-heading] {
	margin-bottom: 1rem;
}

[thread-page-heading] h1 {
	margin-bottom: .35rem;
}

[thread-page-heading] p {
	margin: 0;
	color: var(--text-muted);
}

[post-list] {
	border: 1px solid var(--border-card);
	border-radius: 7px;
	overflow: hidden;
	background: var(--bg-card);
}

[post-list] [post] {
	padding: 1.2rem 1.3rem;
	border-top: 1px solid var(--border-card);
}

[post-list] [post]:first-child {
	border-top: 0;
}

[reply-box] {
	margin-top: 1.25rem;
	padding: 1rem 1.2rem;
	border: 1px solid var(--border-card);
	border-radius: 7px;
	background: var(--bg-card);
}

@media (max-width: 760px) {
	[content][forum-page] {
		padding: .75rem;
		border: 0;
	}

	[post-list] [post],
	[reply-box] {
		padding: 1rem;
	}

	[post-actions] {
		flex-wrap: wrap;
		gap: .25rem .75rem;
	}

	[post-actions] a,
	[post-actions] button {
		display: inline-flex;
		align-items: center;
		gap: .3rem;
		min-height: 44px;
	}

	[forum-top] {
		display: block;
	}

	[forum-actions] {
		margin-top: .8rem;
		justify-content: stretch;
		flex-wrap: wrap;
		width: 100%;
	}

	[forum-category-heading] {
		grid-template-columns: minmax(0, 1fr);
	}

	[forum-column-headings] {
		display: none;
	}

	[forum-row],
	[thread-row],
	[thread-table-heading] {
		grid-template-columns: 1fr;
		gap: 0;
	}

	[thread-side] {
		grid-template-columns: 5rem minmax(0, 1fr);
		padding: .85rem 1rem 1rem;
		border-left: 0;
		border-top: 1px solid var(--border-card);
	}

	[thread-column-headings] {
		display: none;
	}

	[forum-latest],
	[thread-last],
	[thread-stats] {
		text-align: left;
	}

	[thread-stats] {
		justify-items: start;
	}
}

@media (min-width: 601px) and (max-width: 1080px) {

	[post],
	[reply-box] {
		scroll-margin-top: 9rem;
	}
}

@media (max-width: 600px) {

	[post],
	[reply-box] {
		scroll-margin-top: 1rem;
	}
}

[new-thread-action] {
	min-height: 48px;
	padding: .7rem 1.15rem;
	font-size: 1rem;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}

[forum-settings-action] {
	min-height: 48px;
}

[thread-bottom-action] {
	display: flex;
	justify-content: flex-end;
	margin-top: 1rem;
}

@media (max-width: 700px) {
	[forum-top] {
		display: block;
	}

	[forum-actions] {
		margin-top: 1rem;
	}

	[forum-actions] form {
		max-width: none;
	}

	[new-thread-action],
	[forum-settings-action] {
		width: 100%;
	}

	[thread-bottom-action] {
		display: block;
	}
}

[category-drag-handle],
[forum-drag-handle] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	font-weight: 800;
	line-height: 1;
	user-select: none;
}

[category-drag-handle] {
	font-size: 1.05rem;
	opacity: .72;
}

[forum-drag-handle] {
	align-self: flex-start;
	margin-bottom: .35rem;
	font-size: .95rem;
	opacity: .58;
}

[category-drag-handle]:hover,
[forum-drag-handle]:hover {
	opacity: 1;
}

[forum-title-line] {
	display: flex;
	align-items: center;
	gap: .55rem;
	min-width: 0;
}

[forum-title-line] [forum-title] {
	min-width: 0;
}

[thread-forum] {
	margin: .3rem 0 .15rem;
}

[thread-activity] {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: .6rem;
	margin-top: .5rem;
	font-size: .8rem;
}

[thread-activity] [notification-settings] {
	padding: .25rem;
	margin-left: auto;
}

[unread-count] {
	padding: .15rem .5rem;
	border-radius: 1rem;
	background: var(--button-bg);
	color: var(--button-text);
	font-weight: 700;
}

[forum-main] {
	display: grid;
	grid-template-columns: 2.75rem minmax(0, 1fr);
	align-items: center;
	gap: 1rem;
}

[forum-row-icon] {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--text-link);
}

[forum-row-icon] svg {
	width: 2rem;
	height: 2rem;
}

[forum-copy] {
	min-width: 0;
}

[forum-main]:has([forum-row-icon]:empty) {
	grid-template-columns: minmax(0, 1fr);
}

[forum-row-icon]:empty {
	display: none;
}

/* A phone shows one continuous entry per Forum, with a quiet latest-topic link. */
@media (max-width: 760px) {
	[forum-row] {
		background: var(--bg-card);
	}

	[forum-main] {
		grid-template-columns: 2rem minmax(0, 1fr);
		align-items: start;
		gap: .75rem;
		padding: 1rem 1rem .4rem;
	}

	[forum-row-icon] svg {
		width: 1.7rem;
		height: 1.7rem;
	}

	[forum-description] {
		line-height: 1.5;
		overflow-wrap: anywhere;
	}

	[forum-description] > :last-child {
		margin-bottom: 0;
	}

	[forum-summary],
	[forum-row]:hover [forum-summary] {
		display: block;
		padding: 0 1rem 1rem 3.75rem;
		border: 0;
		background: transparent;
	}

	[forum-row]:has([forum-row-icon]:empty) [forum-summary] {
		padding-left: 1rem;
	}

	[forum-stat],
	[forum-latest] > div {
		display: none;
	}

	[forum-latest] {
		font-size: .8rem;
		line-height: 1.5;
	}

	[forum-latest] > a {
		white-space: normal;
		overflow-wrap: anywhere;
		font-weight: 400;
	}

	[forum-latest] > a::before {
		content: "Latest: ";
		color: var(--text-muted);
	}
}

[forum-page-title] {
	display: flex;
	align-items: center;
	gap: .6rem;
}

[forum-page-title] > svg {
	width: 1em;
	height: 1em;
	flex-shrink: 0;
	color: var(--text-link);
}
