/*
 * FXNook Community
 * =============================================================================
 *
 * One elevation, one radius per role, hierarchy through weight and colour
 * rather than size, and content wider than anything that frames it.
 *
 * Cards are a 1px --fxn-line border on white over a --fxn-surface page. No
 * card shadows anywhere in the feed: --fxn-shadow is reserved for things that
 * genuinely float (menus, toasts). Shadows on every card is the single
 * strongest tell of a generated interface.
 */

/* 0. Reset, just enough ------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; }

body.fxnc {
	margin: 0;
	background: var(--fxn-surface);
	color: var(--fxn-text);
	font: 400 var(--fxnc-text-md)/var(--fxnc-leading) var(--fxn-font);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/*
 * Every element reset below is wrapped in :where(), which contributes ZERO
 * specificity. This is load-bearing, not a style preference.
 *
 * Written the obvious way, `.fxnc button { background: none }` scores (0,1,1)
 * and `.fxnc-btn--primary { background: green }` scores (0,1,0). The reset is
 * more specific than the component, so the reset wins and every <button> on
 * the site renders stripped of its background, border and padding - vote
 * arrows, save, join, composer submit, the lot. Anchors styled as buttons
 * escape it, which is what makes the bug look random rather than total.
 *
 * With :where() the reset scores (0,0,0) and loses to any class rule, which
 * is what a reset is supposed to do. The trade is that it also loses to a
 * theme's bare `button` selector at (0,0,1) - so PageKernel::isolate() drops
 * theme stylesheets on Community routes. The two changes belong together;
 * removing either one brings the problem back.
 */
:where(.fxnc) :where(h1, h2, h3, p, ul, ol) { margin: 0; }
:where(.fxnc) :where(ul, ol) { padding: 0; list-style: none; }
:where(.fxnc) :where(a) { color: inherit; text-decoration: none; }
:where(.fxnc) :where(button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:where(.fxnc) :where(img) { display: block; max-width: 100%; }
:where(.fxnc) :where(svg) { display: inline-block; vertical-align: middle; flex: none; }
:where(.fxnc) :where(input, textarea, select) { font: inherit; color: inherit; }

:where(.fxnc) :focus { outline: none; }
:where(.fxnc) :focus-visible { box-shadow: var(--fxn-focus); border-radius: var(--fxn-radius-sm); }

.fxnc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.fxnc-skip {
	position: absolute; left: var(--fxnc-space-4); top: -100px;
	padding: var(--fxnc-space-2) var(--fxnc-space-4);
	background: var(--fxn-ink); color: var(--fxn-white);
	border-radius: var(--fxn-radius-btn); z-index: 100;
}
.fxnc-skip:focus { top: var(--fxnc-space-4); }

/* 1. Header --------------------------------------------------------------- */

.fxnc-header {
	position: sticky; top: 0; z-index: 50;
	background: var(--fxn-white);
	border-bottom: 1px solid var(--fxn-line);
}

.fxnc-header__inner {
	display: flex; align-items: center; gap: var(--fxnc-space-4);
	height: var(--fxnc-header-height);
	/* Same derivation as .fxnc-page, so the wordmark sits over the left rail
	   and the account menu over the right one. A literal here drifts out of
	   step with the grid the moment a column token changes. */
	max-width: calc(
		var(--fxnc-nav-width) + var(--fxnc-feed-width) + var(--fxnc-sidebar-width)
		+ (4 * var(--fxnc-gutter))
	);
	margin: 0 auto;
	padding: 0 var(--fxnc-gutter);
}

.fxnc-brand { display: flex; align-items: baseline; gap: var(--fxnc-space-2); flex: none; }
.fxnc-brand__mark { font-weight: 700; font-size: var(--fxnc-text-lg); color: var(--fxn-ink); letter-spacing: -.01em; }
.fxnc-brand__mark span { color: var(--fxn-green-deep); }
.fxnc-brand__sub { font-size: var(--fxnc-text-sm); font-weight: 500; color: var(--fxn-muted); }

.fxnc-search {
	flex: 1; display: flex; align-items: center; gap: var(--fxnc-space-2);
	max-width: 520px; margin: 0 auto;
	height: 38px; padding: 0 var(--fxnc-space-3);
	background: var(--fxn-surface); border: 1px solid var(--fxn-line);
	border-radius: var(--fxn-radius-btn); color: var(--fxn-subtle);
	transition: border-color var(--fxnc-fast) var(--fxnc-ease), background var(--fxnc-fast) var(--fxnc-ease);
}
.fxnc-search:focus-within { background: var(--fxn-white); border-color: var(--fxn-green-deep); color: var(--fxn-muted); }
.fxnc-search input { flex: 1; min-width: 0; border: 0; background: none; font-size: var(--fxnc-text-sm); color: var(--fxn-ink); }
.fxnc-search input::placeholder { color: var(--fxn-subtle); }
.fxnc-search input:focus-visible { box-shadow: none; }

.fxnc-header__actions { display: flex; align-items: center; gap: var(--fxnc-space-2); flex: none; }
.fxnc-eco { font-size: var(--fxnc-text-sm); font-weight: 500; color: var(--fxn-muted); padding: 0 var(--fxnc-space-2); }
.fxnc-eco:hover { color: var(--fxn-ink); }

.fxnc-iconbtn {
	position: relative; display: inline-flex; align-items: center; justify-content: center;
	width: 38px; height: 38px; border-radius: var(--fxn-radius-btn); color: var(--fxn-muted);
	transition: background var(--fxnc-fast) var(--fxnc-ease), color var(--fxnc-fast) var(--fxnc-ease);
}
.fxnc-iconbtn:hover { background: var(--fxn-surface-2); color: var(--fxn-ink); }
.fxnc-iconbtn__dot { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--fxn-green); border: 2px solid var(--fxn-white); }

.fxnc-menu { position: relative; }
.fxnc-menu__trigger { display: block; border-radius: 50%; }
.fxnc-menu__panel {
	position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px;
	background: var(--fxn-white); border: 1px solid var(--fxn-line);
	border-radius: var(--fxn-radius); box-shadow: var(--fxn-shadow);
	padding: var(--fxnc-space-2); z-index: 60;
}
.fxnc-menu__who { padding: var(--fxnc-space-2) var(--fxnc-space-3); display: flex; flex-direction: column; }
.fxnc-menu__who strong { color: var(--fxn-ink); font-weight: 600; font-size: var(--fxnc-text-sm); }
.fxnc-menu__who span { color: var(--fxn-subtle); font-size: var(--fxnc-text-xs); }
.fxnc-menu__panel a { display: block; padding: var(--fxnc-space-2) var(--fxnc-space-3); font-size: var(--fxnc-text-sm); border-radius: var(--fxn-radius-sm); color: var(--fxn-text); }
.fxnc-menu__panel a:hover { background: var(--fxn-surface); color: var(--fxn-ink); }
.fxnc-menu__panel hr { border: 0; border-top: 1px solid var(--fxn-line); margin: var(--fxnc-space-2) 0; }

.fxnc-subnav { border-top: 1px solid var(--fxn-line); background: var(--fxn-white); }
.fxnc-subnav__inner {
	display: flex; gap: var(--fxnc-space-1); height: var(--fxnc-subnav-height);
	/* Aligned with .fxnc-page and .fxnc-header__inner - see the note there. */
	max-width: calc(
		var(--fxnc-nav-width) + var(--fxnc-feed-width) + var(--fxnc-sidebar-width)
		+ (4 * var(--fxnc-gutter))
	);
	margin: 0 auto; padding: 0 var(--fxnc-gutter);
	overflow-x: auto; scrollbar-width: none;
}
.fxnc-subnav__inner::-webkit-scrollbar { display: none; }
.fxnc-subnav__inner a {
	display: flex; align-items: center; padding: 0 var(--fxnc-space-3);
	font-size: var(--fxnc-text-sm); font-weight: 500; color: var(--fxn-muted);
	border-bottom: 2px solid transparent; white-space: nowrap; flex: none;
	transition: color var(--fxnc-fast) var(--fxnc-ease);
}
.fxnc-subnav__inner a:hover { color: var(--fxn-ink); }
.fxnc-subnav__inner a[aria-current="page"] { color: var(--fxn-ink); border-bottom-color: var(--fxn-green); }

/* 2. Layout --------------------------------------------------------------- */

.fxnc-page {
	display: grid; gap: var(--fxnc-gutter);
	grid-template-columns: var(--fxnc-nav-width) minmax(0, var(--fxnc-feed-width)) var(--fxnc-sidebar-width);
	justify-content: center;
	/*
	 * 1320 = 240 nav + 680 feed + 300 rail + 2 gutters between + 2 outside.
	 * It is derived from the columns, not chosen. At the old 1280 the sum
	 * overflowed by 36px and minmax(0, 680px) quietly absorbed it, so the
	 * feed was 644px on every screen and never once the width it was
	 * designed at. Change a column token and this number changes with it.
	 */
	max-width: calc(
		var(--fxnc-nav-width) + var(--fxnc-feed-width) + var(--fxnc-sidebar-width)
		+ (4 * var(--fxnc-gutter))
	);
	margin: 0 auto;
	padding: var(--fxnc-gutter);
}

.fxnc-main { min-width: 0; }
.fxnc-rail { min-width: 0; }
.fxnc-rail--left, .fxnc-rail--right { position: sticky; top: calc(var(--fxnc-header-height) + var(--fxnc-subnav-height) + var(--fxnc-gutter)); align-self: start; }

.fxnc-rail__head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 var(--fxnc-space-3) var(--fxnc-space-2); }
.fxnc-rail__head span { font-size: var(--fxnc-text-xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--fxn-subtle); }
.fxnc-rail__head a { font-size: var(--fxnc-text-xs); color: var(--fxn-green-deep); font-weight: 500; }
.fxnc-rail__empty { padding: 0 var(--fxnc-space-3); font-size: var(--fxnc-text-sm); color: var(--fxn-muted); }
.fxnc-rail__title { font-size: var(--fxnc-text-xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--fxn-subtle); margin-bottom: var(--fxnc-space-3); }
.fxnc-rail__create { display: flex; align-items: center; gap: var(--fxnc-space-2); margin-top: var(--fxnc-space-3); padding: var(--fxnc-space-2) var(--fxnc-space-3); font-size: var(--fxnc-text-sm); font-weight: 500; color: var(--fxn-green-deep); border-radius: var(--fxn-radius-sm); }
.fxnc-rail__create:hover { background: var(--fxn-green-tint); }

.fxnc-clist li a {
	display: flex; align-items: center; gap: var(--fxnc-space-2);
	padding: 7px var(--fxnc-space-3); border-radius: var(--fxn-radius-sm);
	font-size: var(--fxnc-text-sm); font-weight: 500; color: var(--fxn-text);
	transition: background var(--fxnc-fast) var(--fxnc-ease);
}
.fxnc-clist li a:hover { background: var(--fxn-surface-2); color: var(--fxn-ink); }
.fxnc-clist li a[aria-current="page"] { background: var(--fxn-white); color: var(--fxn-ink); border: 1px solid var(--fxn-line); padding: 6px calc(var(--fxnc-space-3) - 1px); }
/*
 * Named, not `li a span`. That selector scored (0,1,3) and swept up every
 * span in the row - including the community icon, whose own `flex: none` at
 * (0,1,0) lost to this `flex: 1`. The 22px icon then stretched across the
 * row as a wide pill. Only the label is meant to flex and ellipse.
 */
.fxnc-clist__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fxnc-clist li a .fxnc-icon { color: var(--fxn-subtle); }

.fxnc-card { background: var(--fxn-white); border: 1px solid var(--fxn-line); border-radius: var(--fxn-radius); }
.fxnc-card--rail { padding: var(--fxnc-space-4); margin-bottom: var(--fxnc-space-4); }

/*
 * Explicit flex and gap. The links and their separator were inline and
 * relied on the newlines between them in the template collapsing to a
 * space - so the spacing was a property of how the PHP happened to be
 * formatted, and vanished the moment anyone reflowed those lines.
 */
.fxnc-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--fxnc-space-2); padding: var(--fxnc-space-2) var(--fxnc-space-3); font-size: var(--fxnc-text-xs); color: var(--fxn-subtle); }
.fxnc-foot p { width: 100%; }
.fxnc-foot a:hover { color: var(--fxn-ink); }
.fxnc-foot p { margin-top: 2px; }

.fxnc-mobilebar { display: none; }

/* 3. Type ----------------------------------------------------------------- */

.fxnc-pagehead { display: flex; align-items: center; justify-content: space-between; gap: var(--fxnc-space-3); margin-bottom: var(--fxnc-space-4); }
.fxnc-pagehead__title { font-size: var(--fxnc-text-xl); font-weight: 600; color: var(--fxn-ink); letter-spacing: -.01em; }

.fxnc-prose { color: var(--fxn-text); font-size: var(--fxnc-text-md); line-height: var(--fxnc-leading); overflow-wrap: anywhere; }
.fxnc-prose p, .fxnc-prose ul, .fxnc-prose ol, .fxnc-prose blockquote, .fxnc-prose pre { margin: 0 0 var(--fxnc-space-3); }
.fxnc-prose > :last-child { margin-bottom: 0; }
.fxnc-prose ul { list-style: disc; padding-left: 1.4em; }
.fxnc-prose ol { list-style: decimal; padding-left: 1.4em; }
.fxnc-prose a { color: var(--fxn-green-deep); text-decoration: underline; text-decoration-color: var(--fxn-green-line); text-underline-offset: 2px; }
.fxnc-prose a:hover { text-decoration-color: currentColor; }
.fxnc-prose code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; background: var(--fxn-surface-2); padding: 1px 5px; border-radius: 4px; }
.fxnc-prose pre { background: var(--fxn-surface); border: 1px solid var(--fxn-line); border-radius: var(--fxn-radius-sm); padding: var(--fxnc-space-3); overflow-x: auto; font-size: var(--fxnc-text-sm); }
.fxnc-prose pre code { background: none; padding: 0; }
.fxnc-prose blockquote { border-left: 3px solid var(--fxn-green-soft); padding-left: var(--fxnc-space-3); color: var(--fxn-muted); }
.fxnc-prose h3, .fxnc-prose h4 { color: var(--fxn-ink); font-weight: 600; margin: var(--fxnc-space-4) 0 var(--fxnc-space-2); }
.fxnc-prose h3 { font-size: var(--fxnc-text-lg); }
.fxnc-prose h4 { font-size: var(--fxnc-text-md); }
.fxnc-prose hr { border: 0; border-top: 1px solid var(--fxn-line); margin: var(--fxnc-space-4) 0; }

.fxnc-dot { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--fxn-subtle); vertical-align: middle; }

/* 4. Buttons -------------------------------------------------------------- */

.fxnc-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	height: 40px; padding: 0 var(--fxnc-space-4);
	font-size: var(--fxnc-text-sm); font-weight: 600; white-space: nowrap;
	border-radius: var(--fxn-radius-btn); border: 1px solid transparent;
	transition: background var(--fxnc-fast) var(--fxnc-ease), border-color var(--fxnc-fast) var(--fxnc-ease), color var(--fxnc-fast) var(--fxnc-ease);
}
.fxnc-btn--sm { height: 34px; padding: 0 var(--fxnc-space-3); }
.fxnc-btn--block { width: 100%; margin-top: var(--fxnc-space-3); }
.fxnc-btn--primary { background: var(--fxn-green); color: var(--fxn-ink); }
.fxnc-btn--primary:hover { background: var(--fxn-green-hover); }
.fxnc-btn--primary:active { background: var(--fxn-green-press); }
.fxnc-btn--secondary { background: var(--fxn-white); color: var(--fxn-ink); border-color: var(--fxn-line-strong); }
.fxnc-btn--secondary:hover { background: var(--fxn-surface); border-color: var(--fxn-ink-2); }
.fxnc-btn--ghost { color: var(--fxn-muted); }
.fxnc-btn--ghost:hover { background: var(--fxn-surface-2); color: var(--fxn-ink); }
.fxnc-btn[disabled], .fxnc-btn[aria-busy="true"] { opacity: .55; pointer-events: none; }

.fxnc-chip {
	display: inline-flex; align-items: center; height: 30px; padding: 0 var(--fxnc-space-3);
	font-size: var(--fxnc-text-sm); font-weight: 500; color: var(--fxn-muted);
	border-radius: 999px; border: 1px solid transparent;
	/*
	 * The filter bar scrolls sideways; it does not wrap. Flex items shrink
	 * by default, so without these "This week" broke onto two lines and the
	 * bar grew to two rows instead of staying one scrollable line.
	 */
	flex: none; white-space: nowrap;
	transition: background var(--fxnc-fast) var(--fxnc-ease), color var(--fxnc-fast) var(--fxnc-ease);
}
.fxnc-chip:hover { background: var(--fxn-surface-2); color: var(--fxn-ink); }
.fxnc-chip[aria-current="page"] { background: var(--fxn-ink); color: var(--fxn-white); }

.fxnc-filterbar { display: flex; gap: var(--fxnc-space-1); margin-bottom: var(--fxnc-space-3); overflow-x: auto; scrollbar-width: none; }
.fxnc-filterbar::-webkit-scrollbar { display: none; }

.fxnc-tag {
	display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px;
	font-size: 11px; font-weight: 600; letter-spacing: .02em;
	color: var(--fxn-muted); background: var(--fxn-surface-2); border-radius: 6px;
}
.fxnc-tag--pin { color: var(--fxn-green-deep); background: var(--fxn-green-tint); }
.fxnc-tag--warn { color: var(--fxn-warn); background: var(--fxn-warn-tint); }

.fxnc-badge {
	display: inline-flex; align-items: center; gap: 3px; height: 18px; padding: 0 6px;
	font-size: 11px; font-weight: 600; border-radius: 5px; vertical-align: middle;
	color: var(--fxn-green-deep); background: var(--fxn-green-tint);
}
.fxnc-badge--license { color: #2F4A8A; background: #E9EEF9; }
.fxnc-badge--vendor { color: var(--fxn-warn); background: var(--fxn-warn-tint); }
.fxnc-badge--product { margin-top: 4px; }

/* 5. Avatars & icons ------------------------------------------------------ */

.fxnc-avatar { --size: 32px; width: var(--size); height: var(--size); border-radius: 50%; flex: none; object-fit: cover; }
span.fxnc-avatar { display: inline-flex; align-items: center; justify-content: center; font-size: calc(var(--size) * .42); font-weight: 600; }
.fxnc-avatar--a { background: var(--fxnc-tone-a-bg); color: var(--fxnc-tone-a-fg); }
.fxnc-avatar--b { background: var(--fxnc-tone-b-bg); color: var(--fxnc-tone-b-fg); }
.fxnc-avatar--c { background: var(--fxnc-tone-c-bg); color: var(--fxnc-tone-c-fg); }
.fxnc-avatar--d { background: var(--fxnc-tone-d-bg); color: var(--fxnc-tone-d-fg); }
.fxnc-avatar--e { background: var(--fxnc-tone-e-bg); color: var(--fxnc-tone-e-fg); }

.fxnc-cicon { --size: 24px; width: var(--size); height: var(--size); border-radius: 7px; flex: none; object-fit: cover; }
.fxnc-cicon--text { display: inline-flex; align-items: center; justify-content: center; background: var(--fxn-ink); color: var(--fxn-green); font-size: calc(var(--size) * .5); font-weight: 700; }

/* 6. Post card ------------------------------------------------------------ */

.fxnc-feed__list { display: flex; flex-direction: column; gap: var(--fxnc-space-2); }

.fxnc-post {
	display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--fxnc-space-2);
	padding: var(--fxnc-space-3) var(--fxnc-space-4) var(--fxnc-space-3) var(--fxnc-space-2);
	background: var(--fxn-white); border: 1px solid var(--fxn-line); border-radius: var(--fxn-radius);
	transition: border-color var(--fxnc-fast) var(--fxnc-ease);
}
.fxnc-post:hover { border-color: var(--fxn-line-strong); }
.fxnc-post--pinned { border-color: var(--fxn-green-line); background: linear-gradient(to right, var(--fxn-green-tint) 0, var(--fxn-white) 80px); }

.fxnc-post__body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }

.fxnc-post__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: var(--fxnc-text-xs); color: var(--fxn-muted); line-height: 1.4; }
.fxnc-post__community { font-weight: 600; color: var(--fxn-ink); }
.fxnc-post__community:hover { color: var(--fxn-green-deep); }
.fxnc-post__author { font-weight: 500; color: var(--fxn-text); }
.fxnc-post__author:hover { color: var(--fxn-ink); }
.fxnc-post__meta time { color: var(--fxn-subtle); }

.fxnc-post__title { font-size: var(--fxnc-text-lg); font-weight: 600; line-height: var(--fxnc-leading-tight); color: var(--fxn-ink); letter-spacing: -.005em; overflow-wrap: anywhere; }
.fxnc-post__title a:hover { color: var(--fxn-green-deep); }

.fxnc-post__excerpt { font-size: var(--fxnc-text-sm); color: var(--fxn-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fxnc-post__link { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fxnc-text-sm); color: var(--fxn-green-deep); overflow-wrap: anywhere; }
.fxnc-post__link:hover { text-decoration: underline; }
.fxnc-post__link--lg { font-size: var(--fxnc-text-md); margin: var(--fxnc-space-2) 0; }

.fxnc-post__products { display: flex; flex-wrap: wrap; gap: 6px; }
.fxnc-ptag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; font-size: var(--fxnc-text-xs); font-weight: 600; color: var(--fxn-ink); background: var(--fxn-surface); border: 1px solid var(--fxn-line); border-radius: 6px; }
.fxnc-ptag:hover { border-color: var(--fxn-green-deep); color: var(--fxn-green-deep); }

.fxnc-post__actions { display: flex; align-items: center; gap: var(--fxnc-space-1); margin-top: 2px; margin-left: -6px; }
.fxnc-act {
	display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 8px;
	font-size: var(--fxnc-text-xs); font-weight: 600; color: var(--fxn-muted); border-radius: var(--fxn-radius-sm);
	transition: background var(--fxnc-fast) var(--fxnc-ease), color var(--fxnc-fast) var(--fxnc-ease);
}
.fxnc-act:hover { background: var(--fxn-surface-2); color: var(--fxn-ink); }
.fxnc-act--more { color: var(--fxn-green-deep); }

/* Vote control */
.fxnc-vote { display: flex; flex-direction: column; align-items: center; gap: 1px; padding-top: 2px; }
.fxnc-vote--inline { flex-direction: row; gap: 2px; padding: 0; margin-left: -6px; }
.fxnc-vote__btn {
	display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
	color: var(--fxn-subtle); border-radius: var(--fxn-radius-sm);
	transition: background var(--fxnc-fast) var(--fxnc-ease), color var(--fxnc-fast) var(--fxnc-ease), transform var(--fxnc-fast) var(--fxnc-ease);
}
.fxnc-vote__btn:hover { background: var(--fxn-surface-2); color: var(--fxn-ink); }
.fxnc-vote__btn[data-value="1"][aria-pressed="true"] { color: var(--fxnc-upvote); background: var(--fxnc-upvote-bg); }
.fxnc-vote__btn[data-value="-1"][aria-pressed="true"] { color: var(--fxnc-downvote); background: var(--fxnc-downvote-bg); }
.fxnc-vote__btn:active { transform: scale(.92); }
.fxnc-vote__score { font-size: var(--fxnc-text-sm); font-weight: 600; color: var(--fxn-ink); min-width: 24px; text-align: center; font-variant-numeric: tabular-nums; }
.fxnc-vote[data-user-vote="1"] .fxnc-vote__score { color: var(--fxnc-upvote); }
.fxnc-vote[data-user-vote="-1"] .fxnc-vote__score { color: var(--fxnc-downvote); }

.fxnc-loadmore { width: 100%; margin-top: var(--fxnc-space-3); }

/* 7. Single post ---------------------------------------------------------- */

.fxnc-crumbs { display: flex; align-items: center; gap: 6px; font-size: var(--fxnc-text-xs); color: var(--fxn-muted); margin-bottom: var(--fxnc-space-3); }
.fxnc-crumbs a:hover { color: var(--fxn-ink); }
.fxnc-crumbs .fxnc-icon { color: var(--fxn-subtle); }

.fxnc-single { margin-bottom: var(--fxnc-space-4); }
.fxnc-single__inner { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--fxnc-space-3); padding: var(--fxnc-space-4) var(--fxnc-space-5) var(--fxnc-space-4) var(--fxnc-space-3); }
.fxnc-single__body { min-width: 0; display: flex; flex-direction: column; gap: var(--fxnc-space-3); }
.fxnc-single__title { font-size: var(--fxnc-text-xl); font-weight: 600; line-height: var(--fxnc-leading-tight); color: var(--fxn-ink); letter-spacing: -.01em; overflow-wrap: anywhere; }
.fxnc-single__content { margin-top: 2px; }

.fxnc-products { display: flex; flex-direction: column; gap: var(--fxnc-space-2); }
.fxnc-product {
	display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: var(--fxnc-space-3);
	padding: var(--fxnc-space-3); border: 1px solid var(--fxn-line); border-radius: var(--fxn-radius-sm); background: var(--fxn-surface);
	transition: border-color var(--fxnc-fast) var(--fxnc-ease);
}
.fxnc-product:hover { border-color: var(--fxn-green-deep); }
.fxnc-product__thumb { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; background: var(--fxn-surface-2); }
.fxnc-product__body { display: flex; flex-direction: column; min-width: 0; }
.fxnc-product__body strong { color: var(--fxn-ink); font-weight: 600; font-size: var(--fxnc-text-sm); }
.fxnc-product__meta { font-size: var(--fxnc-text-xs); color: var(--fxn-muted); }

/* 8. Comments ------------------------------------------------------------- */

.fxnc-comments { padding: var(--fxnc-space-4) var(--fxnc-space-5); }
.fxnc-comments__locked, .fxnc-comments__login { font-size: var(--fxnc-text-sm); color: var(--fxn-muted); padding: var(--fxnc-space-3); background: var(--fxn-surface); border-radius: var(--fxn-radius-sm); }
.fxnc-comments__login a { color: var(--fxn-green-deep); font-weight: 600; }

.fxnc-cform { display: flex; flex-direction: column; gap: var(--fxnc-space-2); margin-bottom: var(--fxnc-space-4); }
.fxnc-cform textarea {
	width: 100%; min-height: 84px; padding: var(--fxnc-space-3); resize: vertical;
	border: 1px solid var(--fxn-line-strong); border-radius: var(--fxn-radius-sm); background: var(--fxn-white);
	font-size: var(--fxnc-text-sm); line-height: 1.5; color: var(--fxn-ink);
	transition: border-color var(--fxnc-fast) var(--fxnc-ease);
}
.fxnc-cform textarea:focus { border-color: var(--fxn-green-deep); box-shadow: var(--fxn-focus); }
.fxnc-cform__row { display: flex; align-items: center; justify-content: space-between; gap: var(--fxnc-space-3); }
.fxnc-cform__hint { font-size: var(--fxnc-text-xs); color: var(--fxn-subtle); }
.fxnc-cform--reply { margin: var(--fxnc-space-2) 0 var(--fxnc-space-2) calc(var(--depth, 0) * 20px + 20px); }
.fxnc-cform--reply .fxnc-cform__row { justify-content: flex-end; }

.fxnc-thread { display: flex; flex-direction: column; }
.fxnc-thread__empty { font-size: var(--fxnc-text-sm); color: var(--fxn-muted); padding: var(--fxnc-space-4) 0; text-align: center; }

.fxnc-comment {
	position: relative; padding: var(--fxnc-space-3) 0 var(--fxnc-space-2) calc(var(--depth) * 20px);
	border-top: 1px solid var(--fxn-line);
}
.fxnc-comment[data-depth="0"] { padding-left: 0; }
.fxnc-comment:not([data-depth="0"]) { border-top: 0; padding-top: var(--fxnc-space-2); }
.fxnc-comment:not([data-depth="0"])::before {
	content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--depth) * 20px - 11px);
	width: 2px; background: var(--fxnc-thread-line); border-radius: 1px;
}
.fxnc-comment__head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: var(--fxnc-text-xs); color: var(--fxn-muted); margin-bottom: 4px; }
.fxnc-comment__author { font-weight: 600; color: var(--fxn-ink); }
.fxnc-comment__author:hover { color: var(--fxn-green-deep); }
.fxnc-comment__edited { color: var(--fxn-subtle); font-style: italic; }
.fxnc-comment__body { font-size: var(--fxnc-text-sm); padding-left: 30px; }
.fxnc-comment__actions { display: flex; align-items: center; gap: var(--fxnc-space-1); margin-top: 2px; padding-left: 24px; }
.fxnc-comment--gone .fxnc-comment__gone { font-size: var(--fxnc-text-sm); color: var(--fxn-subtle); font-style: italic; }
.fxnc-comment.is-new { animation: fxnc-in var(--fxnc-normal) var(--fxnc-ease); }

@keyframes fxnc-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* 9. Community page ------------------------------------------------------- */

.fxnc-chead { margin-bottom: var(--fxnc-space-3); }
.fxnc-chead__cover { height: 120px; border-radius: var(--fxn-radius); background: var(--fxn-surface-2) center/cover no-repeat; margin-bottom: calc(-1 * var(--fxnc-space-5)); }
.fxnc-chead__row { display: flex; align-items: flex-end; gap: var(--fxnc-space-3); padding: 0 var(--fxnc-space-2); }
.fxnc-chead--cover .fxnc-cicon { border: 3px solid var(--fxn-surface); }
.fxnc-chead__text { padding-bottom: 2px; }
.fxnc-chead__name { font-size: var(--fxnc-text-xl); font-weight: 600; color: var(--fxn-ink); letter-spacing: -.01em; line-height: 1.2; }
.fxnc-chead__slug { font-size: var(--fxnc-text-sm); color: var(--fxn-muted); display: flex; align-items: center; gap: 6px; }

.fxnc-about__head { display: flex; align-items: center; gap: var(--fxnc-space-3); margin-bottom: var(--fxnc-space-3); }
.fxnc-about__name { font-size: var(--fxnc-text-md); font-weight: 600; color: var(--fxn-ink); }
.fxnc-about__stats { display: flex; gap: var(--fxnc-space-3); font-size: var(--fxnc-text-xs); color: var(--fxn-muted); }
.fxnc-about__stats strong { color: var(--fxn-ink); font-weight: 600; }
.fxnc-about__desc { font-size: var(--fxnc-text-sm); margin-bottom: var(--fxnc-space-3); }
.fxnc-about__since { font-size: var(--fxnc-text-xs); color: var(--fxn-subtle); display: flex; align-items: center; gap: 4px; }

.fxnc-rules { counter-reset: rule; display: flex; flex-direction: column; gap: var(--fxnc-space-2); }
.fxnc-rules li { counter-increment: rule; padding-left: 26px; position: relative; font-size: var(--fxnc-text-sm); }
.fxnc-rules li::before { content: counter(rule); position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 5px; background: var(--fxn-surface-2); color: var(--fxn-muted); font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.fxnc-rules strong { color: var(--fxn-ink); font-weight: 600; }
.fxnc-rules p { color: var(--fxn-muted); font-size: var(--fxnc-text-xs); margin-top: 2px; }

.fxnc-mods li { display: flex; align-items: center; gap: var(--fxnc-space-2); font-size: var(--fxnc-text-sm); padding: 4px 0; }
.fxnc-mods a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fxn-ink); font-weight: 500; }

.fxnc-ranklist { display: flex; flex-direction: column; gap: var(--fxnc-space-1); }
.fxnc-ranklist li { display: flex; align-items: center; gap: var(--fxnc-space-2); padding: 5px 0; }
.fxnc-ranklist__n { width: 16px; font-size: var(--fxnc-text-xs); font-weight: 600; color: var(--fxn-subtle); text-align: center; font-variant-numeric: tabular-nums; }
.fxnc-ranklist a { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fxnc-ranklist strong { font-size: var(--fxnc-text-sm); font-weight: 600; color: var(--fxn-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/*
 * Scoped to the link. Unscoped, this also hit .fxnc-ranklist__n and the
 * community icon - both spans - overriding the rank number's size and
 * repainting the icon's letter subtle grey instead of brand green.
 */
.fxnc-ranklist a span { font-size: var(--fxnc-text-xs); color: var(--fxn-subtle); }
.fxnc-ranklist a:hover strong { color: var(--fxn-green-deep); }

/* 10. Directory ----------------------------------------------------------- */

.fxnc-toolbar { display: flex; align-items: center; gap: var(--fxnc-space-3); flex-wrap: wrap; margin-bottom: var(--fxnc-space-4); }
.fxnc-toolbar__search { flex: 1; min-width: 200px; display: flex; align-items: center; gap: var(--fxnc-space-2); height: 38px; padding: 0 var(--fxnc-space-3); background: var(--fxn-white); border: 1px solid var(--fxn-line); border-radius: var(--fxn-radius-btn); color: var(--fxn-subtle); }
.fxnc-toolbar__search:focus-within { border-color: var(--fxn-green-deep); }
.fxnc-toolbar__search input { flex: 1; min-width: 0; border: 0; background: none; font-size: var(--fxnc-text-sm); color: var(--fxn-ink); }
.fxnc-toolbar__search input:focus-visible { box-shadow: none; }
.fxnc-toolbar__sort { display: flex; gap: var(--fxnc-space-1); }

.fxnc-cgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--fxnc-space-3); }
.fxnc-ccard {
	display: flex; gap: var(--fxnc-space-3); padding: var(--fxnc-space-4);
	background: var(--fxn-white); border: 1px solid var(--fxn-line); border-radius: var(--fxn-radius);
	transition: border-color var(--fxnc-fast) var(--fxnc-ease);
}
.fxnc-ccard:hover { border-color: var(--fxn-green-deep); }
.fxnc-ccard__body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.fxnc-ccard__name { font-size: var(--fxnc-text-md); font-weight: 600; color: var(--fxn-ink); display: flex; align-items: center; gap: 4px; }
.fxnc-ccard__desc { font-size: var(--fxnc-text-sm); color: var(--fxn-muted); line-height: 1.45; }
.fxnc-ccard__stats { font-size: var(--fxnc-text-xs); color: var(--fxn-subtle); display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 4px; }

.fxnc-pager { display: flex; justify-content: center; gap: var(--fxnc-space-2); margin-top: var(--fxnc-space-4); }

/* 11. Forms --------------------------------------------------------------- */

.fxnc-composer { padding: var(--fxnc-space-5); display: flex; flex-direction: column; gap: var(--fxnc-space-4); }
.fxnc-field { display: flex; flex-direction: column; gap: 6px; position: relative; }
.fxnc-field--row { flex-direction: row; gap: var(--fxnc-space-3); }
.fxnc-field--row > .fxnc-field { flex: 1; }
.fxnc-field label, .fxnc-field legend { font-size: var(--fxnc-text-sm); font-weight: 600; color: var(--fxn-ink); }
.fxnc-field__opt { font-weight: 400; color: var(--fxn-subtle); }
.fxnc-field__help { font-size: var(--fxnc-text-xs); color: var(--fxn-subtle); }
.fxnc-field__count { position: absolute; right: 10px; top: 32px; font-size: 11px; color: var(--fxn-subtle); pointer-events: none; }
.fxnc-field input[type="text"], .fxnc-field input[type="url"], .fxnc-field input[type="search"], .fxnc-field select, .fxnc-field textarea {
	width: 100%; height: 40px; padding: 0 var(--fxnc-space-3);
	border: 1px solid var(--fxn-line-strong); border-radius: var(--fxn-radius-sm); background: var(--fxn-white);
	font-size: var(--fxnc-text-sm); color: var(--fxn-ink);
	transition: border-color var(--fxnc-fast) var(--fxnc-ease);
}
.fxnc-field textarea { height: auto; padding: var(--fxnc-space-3); line-height: 1.5; resize: vertical; }
.fxnc-field input:focus, .fxnc-field select:focus, .fxnc-field textarea:focus { border-color: var(--fxn-green-deep); box-shadow: var(--fxn-focus); }
.fxnc-field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236B6667' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; }
.fxnc-field fieldset { border: 0; padding: 0; margin: 0; }

.fxnc-radios { display: flex; flex-direction: column; gap: var(--fxnc-space-2); }
.fxnc-radio { display: flex; align-items: flex-start; gap: var(--fxnc-space-3); padding: var(--fxnc-space-3); border: 1px solid var(--fxn-line); border-radius: var(--fxn-radius-sm); cursor: pointer; transition: border-color var(--fxnc-fast) var(--fxnc-ease); }
.fxnc-radio:has(input:checked) { border-color: var(--fxn-green-deep); background: var(--fxn-green-tint); }
.fxnc-radio input { margin: 3px 0 0; accent-color: var(--fxn-green-deep); }
.fxnc-radio span { display: flex; flex-direction: column; }
.fxnc-radio strong { font-size: var(--fxnc-text-sm); font-weight: 600; color: var(--fxn-ink); }
.fxnc-radio small { font-size: var(--fxnc-text-xs); color: var(--fxn-muted); }

.fxnc-rules-editor { display: flex; flex-direction: column; gap: var(--fxnc-space-2); margin-bottom: var(--fxnc-space-2); }
.fxnc-rules-editor__row { display: grid; grid-template-columns: 1fr 2fr; gap: var(--fxnc-space-2); }

.fxnc-picker { position: relative; }
.fxnc-picker__input { display: flex; align-items: center; gap: var(--fxnc-space-2); height: 40px; padding: 0 var(--fxnc-space-3); border: 1px solid var(--fxn-line-strong); border-radius: var(--fxn-radius-sm); background: var(--fxn-white); color: var(--fxn-subtle); }
.fxnc-picker__input:focus-within { border-color: var(--fxn-green-deep); }
.fxnc-picker__input input { flex: 1; min-width: 0; border: 0; background: none; height: 100%; padding: 0; font-size: var(--fxnc-text-sm); color: var(--fxn-ink); }
.fxnc-picker__input input:focus { box-shadow: none; }
.fxnc-picker__results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; background: var(--fxn-white); border: 1px solid var(--fxn-line); border-radius: var(--fxn-radius-sm); box-shadow: var(--fxn-shadow); max-height: 260px; overflow-y: auto; padding: var(--fxnc-space-1); }
.fxnc-picker__results li { display: flex; align-items: center; gap: var(--fxnc-space-2); padding: var(--fxnc-space-2); border-radius: 6px; font-size: var(--fxnc-text-sm); cursor: pointer; }
.fxnc-picker__results li:hover, .fxnc-picker__results li[aria-selected="true"] { background: var(--fxn-surface); }
.fxnc-picker__results img { width: 32px; height: 32px; border-radius: 5px; object-fit: cover; background: var(--fxn-surface-2); }
.fxnc-picker__results strong { color: var(--fxn-ink); font-weight: 600; }
.fxnc-picker__results span { color: var(--fxn-subtle); font-size: var(--fxnc-text-xs); }
.fxnc-picker__chosen { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--fxnc-space-2); }
.fxnc-picker__chosen li { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px 0 10px; font-size: var(--fxnc-text-xs); font-weight: 600; color: var(--fxn-ink); background: var(--fxn-green-tint); border: 1px solid var(--fxn-green-line); border-radius: 6px; }
.fxnc-picker__chosen button { display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; border-radius: 4px; color: var(--fxn-muted); }
.fxnc-picker__chosen button:hover { background: var(--fxn-white); color: var(--fxn-danger); }

.fxnc-composer__foot { display: flex; align-items: center; justify-content: flex-end; gap: var(--fxnc-space-3); padding-top: var(--fxnc-space-3); border-top: 1px solid var(--fxn-line); }
.fxnc-composer__error { flex: 1; font-size: var(--fxnc-text-sm); color: var(--fxn-danger); }

.fxnc-notice { padding: var(--fxnc-space-3) var(--fxnc-space-4); border-radius: var(--fxn-radius-sm); font-size: var(--fxnc-text-sm); background: var(--fxn-surface); border: 1px solid var(--fxn-line); color: var(--fxn-text); }
.fxnc-notice--warn { background: var(--fxn-warn-tint); border-color: transparent; color: var(--fxn-warn); }

/* 12. Empty & toasts ------------------------------------------------------ */

.fxnc-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--fxnc-space-2); padding: var(--fxnc-space-7) var(--fxnc-space-4); background: var(--fxn-white); border: 1px dashed var(--fxn-line-strong); border-radius: var(--fxn-radius); }
.fxnc-empty--page { border: 0; background: none; padding-top: var(--fxnc-space-7); }
.fxnc-empty__code { font-size: 48px; font-weight: 700; color: var(--fxn-line-strong); line-height: 1; letter-spacing: -.02em; }
.fxnc-empty__title { font-size: var(--fxnc-text-md); font-weight: 600; color: var(--fxn-ink); }
.fxnc-empty__body { font-size: var(--fxnc-text-sm); color: var(--fxn-muted); max-width: 36ch; }
.fxnc-empty .fxnc-btn { margin-top: var(--fxnc-space-2); }

.fxnc-toasts { position: fixed; left: 50%; bottom: var(--fxnc-space-5); transform: translateX(-50%); display: flex; flex-direction: column; gap: var(--fxnc-space-2); z-index: 90; pointer-events: none; }
.fxnc-toast { padding: 10px 16px; background: var(--fxn-ink); color: var(--fxn-white); font-size: var(--fxnc-text-sm); font-weight: 500; border-radius: var(--fxn-radius-btn); box-shadow: var(--fxn-shadow); animation: fxnc-in var(--fxnc-normal) var(--fxnc-ease); }
.fxnc-toast--error { background: var(--fxn-danger); }

/* 13. Responsive ---------------------------------------------------------- */

/*
 * The .98 is not a typo and must not be "tidied" to a round number.
 *
 * A device with a fractional CSS viewport - any dpr of 2 or 2.625 or 3, and
 * Windows at a non-100% display scale - can report a width of 767.5px.
 * document.clientWidth rounds that down to 767, so it looks like a phone,
 * but (max-width: 767px) compares against 767.5 and does not match. The page
 * then renders the tablet layout on a phone: a 300px sidebar eating half the
 * screen and no mobile bar. Measured here at an emulated 767px, dpr 2.
 *
 * Ending the range at .98 closes that dead zone.
 */
@media (max-width: 1023.98px) {
	.fxnc-page { grid-template-columns: minmax(0, 1fr) var(--fxnc-sidebar-width); }
	.fxnc-rail--left { display: none; }
	.fxnc-cgrid { grid-template-columns: 1fr; }
}

@media (max-width: 767.98px) {
	:root { --fxnc-gutter: var(--fxnc-space-4); }

	.fxnc-page { grid-template-columns: minmax(0, 1fr); padding-bottom: calc(var(--fxnc-mobilebar-height) + var(--fxnc-space-4)); }
	.fxnc-rail--right { display: none; }
	.fxnc-search { display: none; }
	.fxnc-eco { display: none; }
	.fxnc-header__actions .fxnc-btn span { display: none; }
	.fxnc-header__actions .fxnc-btn { width: 38px; padding: 0; }

	.fxnc-post { grid-template-columns: 1fr; padding: var(--fxnc-space-3) var(--fxnc-space-4); }
	.fxnc-post .fxnc-vote { flex-direction: row; order: 10; gap: 2px; margin-left: -6px; padding: 0; }
	.fxnc-post__actions { margin-top: 0; }
	.fxnc-post__title { font-size: 17px; }

	.fxnc-single__inner { grid-template-columns: 1fr; padding: var(--fxnc-space-4); }
	.fxnc-single .fxnc-vote { flex-direction: row; order: 10; gap: 2px; margin-left: -6px; }
	.fxnc-comments { padding: var(--fxnc-space-4); }
	.fxnc-comment { padding-left: calc(var(--depth) * 14px); }
	.fxnc-comment:not([data-depth="0"])::before { left: calc(var(--depth) * 14px - 8px); }
	.fxnc-composer { padding: var(--fxnc-space-4); }
	.fxnc-field--row { flex-direction: column; }
	.fxnc-rules-editor__row { grid-template-columns: 1fr; }

	/*
	 * The mobile bar. Five items, 44px targets, and the create button is the
	 * one thing on the page that is green - it is the primary action and it
	 * sits where a thumb rests.
	 */
	.fxnc-mobilebar {
		display: grid; grid-template-columns: repeat(5, 1fr);
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
		height: var(--fxnc-mobilebar-height); padding-bottom: env(safe-area-inset-bottom);
		background: var(--fxn-white); border-top: 1px solid var(--fxn-line);
	}
	.fxnc-mobilebar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10px; font-weight: 600; color: var(--fxn-subtle); min-height: 44px; }
	.fxnc-mobilebar a[aria-current="page"] { color: var(--fxn-ink); }
	.fxnc-mobilebar__create .fxnc-icon { width: 36px; height: 36px; padding: 7px; border-radius: 10px; background: var(--fxn-green); color: var(--fxn-ink); }
	.fxnc-mobilebar__create span { display: none; }

	.fxnc-toasts { bottom: calc(var(--fxnc-mobilebar-height) + var(--fxnc-space-4)); }
}

/* 14. Social (Phase 5) ---------------------------------------------------- */

/* Profile header */
.fxnc-phead { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--fxnc-space-4); align-items: center; padding: var(--fxnc-space-5); margin-bottom: var(--fxnc-space-3); }
.fxnc-phead__name { font-size: var(--fxnc-text-xl); font-weight: 600; color: var(--fxn-ink); letter-spacing: -.01em; line-height: 1.2; display: flex; align-items: center; gap: var(--fxnc-space-2); flex-wrap: wrap; }
.fxnc-phead__handle { font-size: var(--fxnc-text-sm); color: var(--fxn-subtle); }
.fxnc-phead__stats { display: flex; flex-wrap: wrap; gap: var(--fxnc-space-3); margin-top: var(--fxnc-space-2); font-size: var(--fxnc-text-xs); color: var(--fxn-muted); }
.fxnc-phead__stats strong { color: var(--fxn-ink); font-weight: 600; }
.fxnc-phead__actions { display: flex; gap: var(--fxnc-space-2); align-self: start; }

/* Profile comment list */
.fxnc-plist { padding: 0 var(--fxnc-space-4); }
.fxnc-pcomment { padding: var(--fxnc-space-3) 0; border-top: 1px solid var(--fxn-line); }
.fxnc-pcomment:first-child { border-top: 0; }
.fxnc-pcomment__post { font-size: var(--fxnc-text-sm); font-weight: 600; color: var(--fxn-ink); }
.fxnc-pcomment__post:hover { color: var(--fxn-green-deep); }
.fxnc-pcomment__meta { font-size: var(--fxnc-text-xs); color: var(--fxn-subtle); margin: 2px 0 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fxnc-pcomment__meta a { color: var(--fxn-muted); font-weight: 500; }
.fxnc-pcomment__body { font-size: var(--fxnc-text-sm); }

/* Reputation events */
.fxnc-about-tab { padding: var(--fxnc-space-5); }
.fxnc-events { display: flex; flex-direction: column; }
.fxnc-events li { display: flex; align-items: center; gap: var(--fxnc-space-3); padding: 8px 0; border-top: 1px solid var(--fxn-line); font-size: var(--fxnc-text-sm); color: var(--fxn-text); }
.fxnc-events li:first-child { border-top: 0; }
.fxnc-events li time { margin-left: auto; font-size: var(--fxnc-text-xs); color: var(--fxn-subtle); }
.fxnc-events__pts { min-width: 36px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--fxn-green-deep); }
.fxnc-events__pts.is-neg { color: var(--fxnc-downvote); }

/* Notifications */
.fxnc-inbox { padding: var(--fxnc-space-2) var(--fxnc-space-4) var(--fxnc-space-4); }
.fxnc-notif a { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: var(--fxnc-space-3); align-items: start; padding: var(--fxnc-space-3) var(--fxnc-space-2); margin: 0 calc(-1 * var(--fxnc-space-2)); border-top: 1px solid var(--fxn-line); border-radius: var(--fxn-radius-sm); transition: background var(--fxnc-fast) var(--fxnc-ease); }
.fxnc-notif:first-child a { border-top: 0; }
.fxnc-notif a:hover { background: var(--fxn-surface); }
.fxnc-notif.is-unread a { background: var(--fxn-green-tint); }
.fxnc-notif.is-unread a:hover { background: #EAF4D8; }
.fxnc-notif__text { display: flex; flex-direction: column; gap: 2px; font-size: var(--fxnc-text-sm); color: var(--fxn-text); min-width: 0; }
.fxnc-notif__text strong { color: var(--fxn-ink); font-weight: 600; }
.fxnc-notif__title { color: var(--fxn-ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fxnc-notif__excerpt { color: var(--fxn-muted); font-size: var(--fxnc-text-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fxnc-notif__time { font-size: var(--fxnc-text-xs); color: var(--fxn-subtle); white-space: nowrap; padding-top: 2px; }

/* Poll */
.fxnc-poll { margin: var(--fxnc-space-2) 0; padding: var(--fxnc-space-4); border: 1px solid var(--fxn-line); border-radius: var(--fxn-radius-sm); background: var(--fxn-surface); }
.fxnc-poll fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--fxnc-space-2); }
.fxnc-poll__option { display: flex; align-items: center; gap: var(--fxnc-space-3); padding: 10px var(--fxnc-space-3); background: var(--fxn-white); border: 1px solid var(--fxn-line); border-radius: var(--fxn-radius-sm); font-size: var(--fxnc-text-sm); color: var(--fxn-ink); cursor: pointer; transition: border-color var(--fxnc-fast) var(--fxnc-ease); }
.fxnc-poll__option:hover { border-color: var(--fxn-line-strong); }
.fxnc-poll__option:has(input:checked) { border-color: var(--fxn-green-deep); background: var(--fxn-green-tint); }
.fxnc-poll__option input { accent-color: var(--fxn-green-deep); margin: 0; }
.fxnc-poll__results { display: flex; flex-direction: column; gap: var(--fxnc-space-2); }
.fxnc-poll__bar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--fxnc-space-3); padding: 10px var(--fxnc-space-3); background: var(--fxn-white); border: 1px solid var(--fxn-line); border-radius: var(--fxn-radius-sm); font-size: var(--fxnc-text-sm); color: var(--fxn-ink); overflow: hidden; }
.fxnc-poll__fill { position: absolute; inset: 0 auto 0 0; width: var(--pct); background: var(--fxn-surface-2); transition: width var(--fxnc-normal) var(--fxnc-ease); }
.fxnc-poll__bar.is-chosen .fxnc-poll__fill { background: var(--fxn-green-tint); }
.fxnc-poll__bar.is-chosen { border-color: var(--fxn-green-line); }
.fxnc-poll__label, .fxnc-poll__pct { position: relative; }
.fxnc-poll__label { display: flex; align-items: center; gap: 6px; }
.fxnc-poll__label .fxnc-icon { color: var(--fxn-green-deep); }
.fxnc-poll__pct { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--fxn-muted); }
.fxnc-poll__foot { display: flex; align-items: center; justify-content: space-between; margin-top: var(--fxnc-space-3); font-size: var(--fxnc-text-xs); color: var(--fxn-subtle); }
.fxnc-poll__hint { color: var(--fxn-muted); }

/* Save button state */
.fxnc-act[data-save][aria-pressed="true"] { color: var(--fxn-green-deep); }
.fxnc-act[data-save][aria-pressed="true"] .fxnc-icon { fill: currentColor; }

/* Tag pill */
.fxnc-ptag--tag { background: var(--fxn-white); color: var(--fxn-muted); }

/* Settings */
.fxnc-settings__static { font-size: var(--fxnc-text-md); color: var(--fxn-ink); font-weight: 500; }
.fxnc-settings__avatar { display: flex; align-items: center; gap: var(--fxnc-space-3); }

@media (max-width: 767.98px) {
	.fxnc-phead { grid-template-columns: auto minmax(0, 1fr); padding: var(--fxnc-space-4); }
	.fxnc-phead__actions { grid-column: 1 / -1; align-self: auto; }
	.fxnc-notif a { grid-template-columns: 32px minmax(0, 1fr); }
	.fxnc-notif__time { grid-column: 2; padding-top: 0; }
}

/* 15. Marketplace integration (Phase 6) ----------------------------------- */

/* Product discussion header */
.fxnc-prodhead { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--fxnc-space-4); padding: var(--fxnc-space-5); margin-bottom: var(--fxnc-space-3); }
.fxnc-prodhead__thumb { width: 96px; height: 96px; border-radius: var(--fxn-radius-sm); object-fit: cover; background: var(--fxn-surface-2); }
.fxnc-prodhead__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fxnc-prodhead__kicker { font-size: var(--fxnc-text-xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--fxn-subtle); }
.fxnc-prodhead__name { font-size: var(--fxnc-text-xl); font-weight: 600; color: var(--fxn-ink); letter-spacing: -.01em; line-height: 1.2; }
.fxnc-prodhead__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: var(--fxnc-text-xs); color: var(--fxn-muted); }
.fxnc-prodhead__reviews { display: flex; align-items: center; gap: 6px; font-size: var(--fxnc-text-sm); color: var(--fxn-muted); }
.fxnc-prodhead__reviews strong { color: var(--fxn-ink); }
.fxnc-prodhead__perf { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.fxnc-prodhead__actions { display: flex; gap: var(--fxnc-space-2); margin-top: var(--fxnc-space-2); }

/* Star rating: one element, the fill width is the rating */
.fxnc-stars { --rating: 0; position: relative; display: inline-block; width: 70px; height: 14px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M7 1l1.8 3.7 4.1.6-3 2.9.7 4.1L7 10.4l-3.6 1.9.7-4.1-3-2.9 4.1-.6z' fill='%23E7E5E2'/%3E%3C/svg%3E") repeat-x; background-size: 14px 14px; flex: none; }
.fxnc-stars::before { content: ""; position: absolute; inset: 0; width: calc(var(--rating) / 5 * 100%); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M7 1l1.8 3.7 4.1.6-3 2.9.7 4.1L7 10.4l-3.6 1.9.7-4.1-3-2.9 4.1-.6z' fill='%23F5B301'/%3E%3C/svg%3E") repeat-x; background-size: 14px 14px; }

/* Performance metrics */
.fxnc-metrics { padding: var(--fxnc-space-4) var(--fxnc-space-5); margin-bottom: var(--fxnc-space-3); }
.fxnc-metrics__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: var(--fxnc-space-3); margin: 0 0 var(--fxnc-space-3); }
.fxnc-metrics__grid dt { font-size: var(--fxnc-text-xs); color: var(--fxn-subtle); }
.fxnc-metrics__grid dd { margin: 2px 0 0; font-size: var(--fxnc-text-lg); font-weight: 600; color: var(--fxn-ink); font-variant-numeric: tabular-nums; }

/* Author's product-specific badge, under the post title */
.fxnc-author-badge { display: flex; align-items: center; flex-wrap: wrap; gap: var(--fxnc-space-2); font-size: var(--fxnc-text-sm); color: var(--fxn-muted); }

/* User-reported performance notice */
.fxnc-perf-notice strong { display: block; margin-bottom: 2px; }

/* Product card extras */
.fxnc-product__reviews { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: var(--fxnc-text-xs); color: var(--fxn-muted); }
.fxnc-product__discuss { display: inline-flex; align-items: center; gap: 6px; margin: -4px 0 var(--fxnc-space-2); font-size: var(--fxnc-text-xs); font-weight: 600; color: var(--fxn-green-deep); }
.fxnc-product__discuss:hover { text-decoration: underline; }

@media (max-width: 767.98px) {
	.fxnc-prodhead { grid-template-columns: 64px minmax(0, 1fr); padding: var(--fxnc-space-4); }
	.fxnc-prodhead__thumb { width: 64px; height: 64px; }
}

/* 16. Moderation (Phase 7) ------------------------------------------------ */

.fxnc-btn--danger { background: var(--fxn-danger); color: var(--fxn-white); }
.fxnc-btn--danger:hover { background: #9A1E14; }
.fxnc-act--danger { color: var(--fxn-danger); }
.fxnc-act--danger:hover { background: var(--fxn-danger-tint); color: var(--fxn-danger); }
.fxnc-act--quiet { color: var(--fxn-subtle); margin-left: auto; }
.fxnc-chip__count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--fxn-green); color: var(--fxn-ink); font-size: 11px; font-weight: 700; }
.fxnc-chip[aria-current="page"] .fxnc-chip__count { background: var(--fxn-white); }

.fxnc-dialog { border: 0; padding: 0; border-radius: var(--fxn-radius); background: var(--fxn-white); box-shadow: var(--fxn-shadow); width: min(440px, calc(100vw - 32px)); color: var(--fxn-text); }
.fxnc-dialog::backdrop { background: rgba(35, 31, 32, .45); }
.fxnc-dialog__form { display: flex; flex-direction: column; gap: var(--fxnc-space-3); padding: var(--fxnc-space-5); }
.fxnc-dialog__title { font-size: var(--fxnc-text-lg); font-weight: 600; color: var(--fxn-ink); }
.fxnc-dialog__lead { font-size: var(--fxnc-text-sm); color: var(--fxn-muted); }
.fxnc-dialog__reasons { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.fxnc-radio--compact { padding: 8px 10px; gap: 8px; }
.fxnc-radio--compact span { font-size: var(--fxnc-text-sm); color: var(--fxn-ink); }
.fxnc-dialog textarea { width: 100%; padding: var(--fxnc-space-3); border: 1px solid var(--fxn-line-strong); border-radius: var(--fxn-radius-sm); font-size: var(--fxnc-text-sm); resize: vertical; }
.fxnc-dialog__foot { display: flex; justify-content: flex-end; gap: var(--fxnc-space-2); }

.fxnc-modbar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--fxnc-space-2); margin-top: var(--fxnc-space-3); padding: var(--fxnc-space-3); background: var(--fxn-surface); border: 1px dashed var(--fxn-line-strong); border-radius: var(--fxn-radius-sm); }
.fxnc-modbar__label { font-size: var(--fxnc-text-xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--fxn-subtle); margin-right: var(--fxnc-space-2); }

.fxnc-modq { display: flex; flex-direction: column; gap: var(--fxnc-space-2); }
.fxnc-modq__item { padding: var(--fxnc-space-4); background: var(--fxn-white); border: 1px solid var(--fxn-line); border-radius: var(--fxn-radius); display: flex; flex-direction: column; gap: var(--fxnc-space-3); }
.fxnc-modq__item.is-priority { border-left: 3px solid var(--fxn-warn); }
.fxnc-modq__head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: var(--fxnc-text-xs); color: var(--fxn-subtle); }
.fxnc-modq__preview { font-size: var(--fxnc-text-sm); color: var(--fxn-text); }
.fxnc-modq__preview strong { color: var(--fxn-ink); }
.fxnc-modq__preview p { margin-top: 4px; color: var(--fxn-muted); }
.fxnc-modq__actions { display: flex; flex-wrap: wrap; gap: var(--fxnc-space-2); }
.fxnc-modq__member { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto auto; gap: var(--fxnc-space-3); align-items: center; padding: var(--fxnc-space-3) 0; border-top: 1px solid var(--fxn-line); font-size: var(--fxnc-text-sm); }
.fxnc-modq__member:first-child { border-top: 0; }
.fxnc-modq__member strong { color: var(--fxn-ink); }
.fxnc-modq__member span { color: var(--fxn-subtle); font-size: var(--fxnc-text-xs); }
.fxnc-modq__when { font-size: var(--fxnc-text-xs); color: var(--fxn-subtle); white-space: nowrap; }
.fxnc-modlog { display: flex; align-items: center; flex-wrap: wrap; gap: var(--fxnc-space-2); padding: 10px 0; border-top: 1px solid var(--fxn-line); font-size: var(--fxnc-text-sm); }
.fxnc-modlog:first-child { border-top: 0; }
.fxnc-modlog__by { color: var(--fxn-muted); }
.fxnc-modlog__reason { flex-basis: 100%; font-size: var(--fxnc-text-xs); color: var(--fxn-subtle); padding-left: 2px; }
.fxnc-modlog time { margin-left: auto; font-size: var(--fxnc-text-xs); color: var(--fxn-subtle); }

/* 17. Promotions (Phase 8) ------------------------------------------------ */

.fxnc-promo { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--fxnc-space-3); align-items: center; padding: var(--fxnc-space-4); background: var(--fxn-white); border: 1px solid var(--fxn-line); border-radius: var(--fxn-radius); margin-bottom: var(--fxnc-space-3); }
.fxnc-promo--card { grid-template-columns: 1fr; }
.fxnc-promo--image { grid-template-columns: 96px minmax(0, 1fr) auto; }
.fxnc-promo__img { width: 96px; height: 72px; object-fit: cover; border-radius: var(--fxn-radius-sm); background: var(--fxn-surface-2); }
.fxnc-promo--card .fxnc-promo__img { width: 100%; height: 140px; }
.fxnc-promo__label { position: absolute; top: 10px; right: 12px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fxnc-sponsored); }
.fxnc-promo__body { min-width: 0; display: flex; flex-direction: column; gap: 4px; padding-right: 80px; }
.fxnc-promo--card .fxnc-promo__body { padding-right: 0; padding-top: 4px; }
.fxnc-promo__title { font-size: var(--fxnc-text-md); font-weight: 600; color: var(--fxn-ink); }
.fxnc-promo__desc { font-size: var(--fxnc-text-sm); color: var(--fxn-muted); }
.fxnc-promo__cta { white-space: nowrap; }

/* 18. Search ----------------------------------------------------------- */

.fxnc-srchead { margin-bottom: var(--fxnc-space-3); }
.fxnc-srchead__q { font-size: var(--fxnc-text-sm); color: var(--fxn-muted); }
.fxnc-srchead__q strong { color: var(--fxn-ink); }
.fxnc-results { display: flex; flex-direction: column; gap: var(--fxnc-space-2); }
.fxnc-result { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--fxnc-space-3); align-items: center; padding: var(--fxnc-space-3) var(--fxnc-space-4); background: var(--fxn-white); border: 1px solid var(--fxn-line); border-radius: var(--fxn-radius); }
.fxnc-result:hover { border-color: var(--fxn-green-deep); }
.fxnc-result strong { color: var(--fxn-ink); font-weight: 600; font-size: var(--fxnc-text-sm); }
.fxnc-result span { font-size: var(--fxnc-text-xs); color: var(--fxn-subtle); }

/* 19. Community settings & media ------------------------------------------ */

.fxnc-upload { display: flex; align-items: center; gap: var(--fxnc-space-3); }
.fxnc-upload__preview { width: 64px; height: 64px; border-radius: var(--fxn-radius-sm); object-fit: cover; background: var(--fxn-surface-2); border: 1px solid var(--fxn-line); }
.fxnc-upload__preview--wide { width: 160px; height: 64px; }
.fxnc-upload input[type="file"] { font-size: var(--fxnc-text-sm); }
.fxnc-post__image { margin: var(--fxnc-space-2) 0; border-radius: var(--fxn-radius-sm); overflow: hidden; border: 1px solid var(--fxn-line); background: var(--fxn-surface); }
.fxnc-post__image img { width: 100%; max-height: 520px; object-fit: contain; }
.fxnc-post__thumb { width: 100%; max-height: 260px; object-fit: cover; border-radius: var(--fxn-radius-sm); margin-top: 2px; }

@media (max-width: 767.98px) {
	.fxnc-dialog__reasons { grid-template-columns: 1fr; }
	.fxnc-promo { grid-template-columns: 1fr; }
	.fxnc-promo--image { grid-template-columns: 1fr; }
	.fxnc-promo__img { width: 100%; height: 120px; }
	.fxnc-promo__body { padding-right: 0; padding-top: var(--fxnc-space-3); }
	.fxnc-modq__member { grid-template-columns: 32px minmax(0, 1fr); }
	.fxnc-modq__member .fxnc-modq__actions { grid-column: 1 / -1; }
}

/* 20. Welcome & checkbox --------------------------------------------------- */

.fxnc-welcome { max-width: 520px; margin: var(--fxnc-space-6) auto 0; align-items: center; text-align: center; }
.fxnc-welcome form { width: 100%; text-align: left; }
.fxnc-welcome__lead { font-size: var(--fxnc-text-md); color: var(--fxn-muted); max-width: 40ch; }
.fxnc-welcome__input { display: flex; align-items: center; height: 44px; border: 1px solid var(--fxn-line-strong); border-radius: var(--fxn-radius-sm); background: var(--fxn-white); overflow: hidden; }
.fxnc-welcome__input:focus-within { border-color: var(--fxn-green-deep); box-shadow: var(--fxn-focus); }
.fxnc-welcome__input span { padding: 0 0 0 var(--fxnc-space-3); color: var(--fxn-subtle); font-weight: 600; }
.fxnc-welcome__input input { flex: 1; height: 100%; border: 0; padding: 0 var(--fxnc-space-3) 0 4px; font-size: var(--fxnc-text-md); font-weight: 600; color: var(--fxn-ink); background: none; }
.fxnc-welcome__input input:focus { box-shadow: none; }
.fxnc-check { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fxnc-text-sm); color: var(--fxn-text); margin-top: 6px; cursor: pointer; }
.fxnc-check input { accent-color: var(--fxn-green-deep); margin: 0; }

/* 21. Gaps found in the UI audit ------------------------------------------- */

/*
 * badge() emits --purchase, --license and --vendor from the verification
 * level. Only the last two had rules, so "Verified Purchase" - the trust
 * signal the whole marketplace integration exists to show - was riding on
 * the base .fxnc-badge green by coincidence. Stated explicitly so a later
 * edit to the base cannot silently restyle it.
 */
.fxnc-badge--purchase { color: var(--fxn-green-deep); background: var(--fxn-green-tint); }

/*
 * .fxnc-phead is a grid whose middle column is minmax(0, 1fr). Without
 * min-width: 0 here the grid item takes its content's intrinsic width, so a
 * long display name pushes the follow button off the card instead of
 * ellipsing. Same reason the feed card's text column carries it.
 */
.fxnc-phead__text { min-width: 0; }

/* A count or qualifier sitting inside a link that is already coloured. */
.fxnc-subtle { color: var(--fxn-subtle); font-weight: 400; }

/*
 * The product thumbnail placeholder is a <span>, not an <img>, so it shows
 * the shared grey fill with nothing in it. The inset line reads as "no
 * image" rather than "image still loading".
 */
.fxnc-product__thumb--empty { box-shadow: inset 0 0 0 1px var(--fxn-line); }

/*
 * Pages that push nothing into the right rail drop the column entirely
 * rather than leave it holding only the footer. The feed keeps its width so
 * the content does not jump between a page with a rail and one without.
 */
.fxnc-page--norail { grid-template-columns: var(--fxnc-nav-width) minmax(0, var(--fxnc-feed-width)); }
.fxnc-main > .fxnc-foot { margin-top: var(--fxnc-space-6); padding-left: 0; text-align: center; }

/* 22. Touch targets -------------------------------------------------------- */

/*
 * Keyed on pointer: coarse, not on width. A tablet in landscape is 1024px
 * wide and still operated with a thumb, while a 400px-wide desktop window is
 * still a mouse. Width tells you about layout; it tells you nothing about
 * what is doing the pointing.
 *
 * A feed is a dense surface and these controls are deliberately small on a
 * mouse. On a finger they were 28px - the vote arrow, the single most-used
 * control on the site, was half the 44px minimum. These sizes apply only
 * where a finger is actually in use, so desktop density is unaffected.
 */
@media (pointer: coarse) {
	.fxnc-vote__btn { width: 40px; height: 40px; }
	.fxnc-vote { gap: 2px; }

	.fxnc-act { height: 40px; padding: 0 var(--fxnc-space-3); gap: 6px; }
	.fxnc-post__actions { gap: 2px; }

	.fxnc-iconbtn { width: 44px; height: 44px; }
	.fxnc-iconbtn__dot { top: 11px; right: 11px; }

	/* The trigger grows; the avatar inside it does not. */
	.fxnc-menu__trigger { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; }

	.fxnc-chip { height: 38px; padding: 0 var(--fxnc-space-4); }
	.fxnc-ptag { height: 34px; padding: 0 var(--fxnc-space-3); }
	.fxnc-btn--sm { height: 40px; }

	/* A 13px radio is not a target. The label around it carries the tap, but
	   the control itself should still be reachable directly. */
	.fxnc-poll__option input,
	.fxnc-check input { width: 20px; height: 20px; }
	.fxnc-poll__option { padding: var(--fxnc-space-3); }

	/*
	 * The author and community links sit in a dense meta row where the text
	 * is 17px tall. They cannot grow without shoving the title down, so the
	 * hit area grows instead: the ::after stretches vertically only, leaving
	 * layout untouched and never widening into the link beside it.
	 */
	.fxnc-post__meta a,
	.fxnc-comment__head a { position: relative; }
	.fxnc-post__meta a::after,
	.fxnc-comment__head a::after {
		content: ""; position: absolute;
		top: -8px; bottom: -8px; left: 0; right: 0;
	}
}

/*
 * A page with no right rail keeps its own column count at every breakpoint.
 * Without this the 1023px rule below would hand it an empty 300px column and
 * squeeze the content for nothing.
 */
@media (max-width: 1023.98px) {
	.fxnc-page--norail { grid-template-columns: minmax(0, 1fr); }
}

/* 23. Very narrow phones --------------------------------------------------- */

/*
 * 320px is a real width - an iPhone SE, and any phone at the largest system
 * text size. At that width the wordmark, the "Community" sub-label and three
 * account controls added up to 324px and pushed the page into a horizontal
 * scroll, which on a feed is the worst possible defect: every swipe fights
 * the layout.
 *
 * The sub-label is the thing to drop. The wordmark still says FXNOOK, the
 * page still says what it is, and the controls all keep their touch targets.
 */
@media (max-width: 359.98px) {
	.fxnc-header__inner { gap: var(--fxnc-space-2); padding: 0 var(--fxnc-space-3); }
	.fxnc-brand__sub { display: none; }
	.fxnc-header__actions { gap: 2px; }
	.fxnc-post, .fxnc-single__inner, .fxnc-comments, .fxnc-composer { padding-left: var(--fxnc-space-3); padding-right: var(--fxnc-space-3); }
}

/* 24. Long-word safety net ------------------------------------------------- */

/*
 * Everything below renders text a person typed: usernames, community names,
 * display names, poll options, promotion copy. Titles and post bodies already
 * wrap anywhere; these did not, so a single unbroken 40-character string -
 * a username with no spaces, a pasted URL in a poll option - pushed its
 * container past the viewport and put a horizontal scroll on the whole page.
 *
 * `anywhere` rather than `break-word`: break-word does not shrink the
 * element's intrinsic min-content width, so inside a grid or flex track it
 * still forces the overflow it was meant to prevent.
 */
.fxnc-post__excerpt,
.fxnc-post__meta,
.fxnc-comment__head,
.fxnc-phead__name,
.fxnc-chead__name,
.fxnc-about__name,
.fxnc-about__desc,
.fxnc-ccard__name,
.fxnc-poll__label,
.fxnc-notif__text,
.fxnc-promo__title,
.fxnc-promo__desc {
	overflow-wrap: anywhere;
	min-width: 0;
}
