@charset "UTF-8";
/* ============================================================================
   Hub 主题 — fuyehub
   Loads after bootstrap.css and bootstrap-bbs.css, so it wins on order alone.
   !important appears only where Bootstrap 4 itself ships !important (.bg-dark,
   .text-muted and friends); everywhere else specificity does the work.
   ========================================================================= */

/* ---------------------------------------------------------------- tokens -- */
:root {
	--s-canvas:  #F7F8FA;
	--s-raised:  #FFFFFF;
	--s-sunken:  #F0F2F5;
	--s-hover:   #F2F4F7;
	--s-press:   #E9ECF1;

	--b-subtle:  #EDEFF2;
	--b-default: #E2E5EA;
	--b-strong:  #CFD4DB;

	--t-primary:   #16191D;   /* 17.6:1 on raised */
	--t-secondary: #5A6068;   /*  6.4:1 on raised */
	--t-muted:     #6B727B;   /*  4.6:1 on canvas */

	--a-base:     #0B62D6;    /*  5.6:1 on raised, 5.3:1 on canvas */
	--a-hover:    #0951B2;
	--a-soft:     #E8F0FD;
	--a-contrast: #FFFFFF;
	/* Translucent so the focus ring reads on any surface, light or dark. */
	--a-ring:     rgba(11, 98, 214, .30);

	--x-danger:  #B3261E;
	--x-success: #177346;
	--x-warn:    #8A5A00;

	--shadow-1: 0 1px 2px rgba(16, 24, 40, .05);
	--shadow-2: 0 1px 3px rgba(16, 24, 40, .09), 0 4px 12px rgba(16, 24, 40, .05);
	--shadow-3: 0 6px 16px rgba(16, 24, 40, .12), 0 2px 6px rgba(16, 24, 40, .07);

	--r-sm: 6px;
	--r-md: 10px;
	--r-lg: 14px;

	--ease: cubic-bezier(.22, .61, .36, 1);

	--font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
	           "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC",
	           "Noto Sans CJK SC", "WenQuanYi Micro Hei", sans-serif;
	--font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
	             "Liberation Mono", monospace;

	color-scheme: light;
}

:root[data-theme="dark"] {
	--s-canvas:  #0F1215;
	--s-raised:  #171B1F;
	--s-sunken:  #12161A;
	--s-hover:   #1D2228;
	--s-press:   #232930;

	--b-subtle:  #21262B;
	--b-default: #2E343B;
	--b-strong:  #3C444D;

	--t-primary:   #E6E9EC;   /* 14.2:1 on raised */
	--t-secondary: #A0A7B0;   /*  7.1:1 on raised */
	--t-muted:     #8A929C;   /*  5.5:1 on raised */

	--a-base:     #4D9BFF;    /*  6.1:1 on raised */
	--a-hover:    #7AB5FF;
	--a-soft:     #16283F;
	--a-contrast: #08131F;
	--a-ring:     rgba(77, 155, 255, .45);

	--x-danger:  #FF8A7D;
	--x-success: #4ED18A;
	--x-warn:    #E5B65C;

	--shadow-1: 0 1px 2px rgba(0, 0, 0, .40);
	--shadow-2: 0 1px 3px rgba(0, 0, 0, .50), 0 4px 12px rgba(0, 0, 0, .34);
	--shadow-3: 0 6px 16px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .40);

	color-scheme: dark;
}

/* ------------------------------------------------------------------ base -- */
html, table { font-size: 15px; }

html, body {
	font-family: var(--font-ui);
	background: var(--s-canvas);
	color: var(--t-primary);
	-webkit-text-size-adjust: 100%;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	background: var(--s-canvas);
	color: var(--t-primary);
	transition: background-color .24s var(--ease), color .24s var(--ease);
}

a { color: var(--a-base); text-decoration: none; }
a:hover, a:focus { color: var(--a-hover); text-decoration: none; }

hr { border-top-color: var(--b-subtle); }

/* Bootstrap ships these with !important, so matching them takes the same. */
.text-muted { color: var(--t-muted) !important; }
.text-grey  { color: var(--t-muted) !important; }
.bg-light   { background-color: var(--s-sunken) !important; }
.text-dark  { color: var(--t-primary) !important; }

small, .small { font-size: .866rem; }

/* Counts, dates and stats must not shimmy as digits change. */
.thread .small, .post .small, .pagination, .card-site-info,
.badge, .breadcrumb, td, th { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------- browser surfaces ------ */
::selection { background: var(--a-soft); color: var(--t-primary); }
:root[data-theme="dark"] ::selection { background: #23405F; color: #FFFFFF; }

input, textarea { caret-color: var(--a-base); }

* { scrollbar-width: thin; scrollbar-color: var(--b-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
	background: var(--b-strong);
	border-radius: 99px;
	border: 2px solid var(--s-canvas);
}
::-webkit-scrollbar-thumb:hover { background: var(--t-muted); }

:focus-visible {
	outline: 2px solid var(--a-base);
	outline-offset: 2px;
	border-radius: 3px;
}
/* Bootstrap 4 beta's glow is not a focus ring; replace it wholesale. */
.btn:focus, .btn.focus, .form-control:focus, .page-link:focus { box-shadow: none; }
.btn:focus-visible { outline: 2px solid var(--a-base); outline-offset: 2px; }

/* -------------------------------------------------------------- app bar -- */
#header.navbar {
	background: var(--s-raised) !important;
	border-bottom: 1px solid var(--b-default);
	box-shadow: none;
	padding-top: .5rem;
	padding-bottom: .5rem;
	min-height: 56px;
}
#header .navbar-brand { color: var(--t-primary); font-weight: 700; }
#header .navbar-brand img { max-height: 30px; width: auto; }

#header .navbar-nav .nav-link {
	color: var(--t-secondary);
	font-weight: 500;
	padding: .5rem .85rem;
	border-radius: var(--r-sm);
	transition: color .15s var(--ease), background-color .15s var(--ease);
}
#header .navbar-nav .nav-link:hover { color: var(--t-primary); background: var(--s-hover); }
#header .navbar-nav .nav-item.active > .nav-link,
#header .navbar-nav .nav-link.active { color: var(--a-base); background: var(--a-soft); }

#header .navbar-toggler {
	border: 1px solid var(--b-default);
	border-radius: var(--r-sm);
	padding: .4rem .5rem;
	color: var(--t-secondary);
	line-height: 0;
}
#header .navbar-toggler:hover { background: var(--s-hover); }
/* Three even bars from one repeating gradient — no pseudo-element stacking. */
#header .navbar-toggler-icon {
	background-image: none;
	background: linear-gradient(currentColor, currentColor) top    left / 100% 2px no-repeat,
	            linear-gradient(currentColor, currentColor) center left / 100% 2px no-repeat,
	            linear-gradient(currentColor, currentColor) bottom left / 100% 2px no-repeat;
	width: 20px; height: 14px;
	color: var(--t-secondary);
}

/* Secondary forum rail (#nav_pc_2) — was a flat gray slab. */
#nav_pc_2 {
	background: var(--s-raised);
	border-bottom: 1px solid var(--b-default);
}
#nav_pc_2 a { color: var(--t-secondary); }
#nav_pc_2 .active a { color: var(--a-base); font-weight: 600; }

/* ------------------------------------------------------- theme toggle ---- */
.fh-icon-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 38px; height: 38px;
	padding: 0; border: 0; border-radius: var(--r-sm);
	background: transparent;
	color: var(--t-secondary);
	cursor: pointer;
	transition: background-color .15s var(--ease), color .15s var(--ease);
}
.fh-icon-btn:hover { background: var(--s-hover); color: var(--t-primary); }
.fh-icon-btn svg { width: 18px; height: 18px; display: block; }

/* Sits in the navbar container itself, so it survives the collapse below lg. */
#header .fh-theme-toggle { order: 99; margin-left: .25rem; flex: 0 0 auto; }
.fh-icon-btn .fh-sun { display: none; }
:root[data-theme="dark"] .fh-icon-btn .fh-sun  { display: block; }
:root[data-theme="dark"] .fh-icon-btn .fh-moon { display: none; }

/* -------------------------------------------------------------- layout -- */
#body { background: var(--s-canvas); }
#body > .container { padding-top: .25rem; }

/* --------------------------------------------------------------- cards -- */
.card {
	background: var(--s-raised);
	border: 1px solid var(--b-default);
	border-radius: var(--r-md);
	box-shadow: var(--shadow-1);
	margin-bottom: 1rem;
	transition: background-color .24s var(--ease), border-color .24s var(--ease);
}
.card > .card-header {
	background: transparent;
	background-image: none;
	border-bottom: 1px solid var(--b-subtle);
	color: var(--t-primary);
	font-size: .933rem;
	font-weight: 600;
	padding: .5rem .875rem 0;
}
.card > .card-header:first-child { border-radius: var(--r-md) var(--r-md) 0 0; }
.card-body { padding: .25rem .875rem; }
.card-footer { background: transparent; border-top: 1px solid var(--b-subtle); }

/* Tabs inside a card header */
.card-header-tabs { margin: 0; border-bottom: 0; }
.card-header-tabs > .nav-item > .nav-link {
	border: 0;
	border-bottom: 2px solid transparent;
	border-radius: 0;
	color: var(--t-secondary);
	font-weight: 500;
	padding: .5rem .25rem;
	margin-right: 1.25rem;
	background: transparent;
	transition: color .15s var(--ease), border-color .15s var(--ease);
}
.card-header-tabs > .nav-item > .nav-link:hover:not(.active) {
	border: 0; border-bottom: 2px solid var(--b-strong);
	color: var(--t-primary); background: transparent;
}
.card-header-tabs > .nav-item > .nav-link.active {
	color: var(--a-base);
	background: transparent;
	background-image: none;
	border: 0;
	border-bottom: 2px solid var(--a-base);
	font-weight: 600;
}

/* --------------------------------------------------------- thread list -- */
.threadlist { margin: 0; }

.thread {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: .875rem 0;
	margin: 0;
	min-height: 64px;
	transition: background-color .12s var(--ease);
}
.thread:hover { background: var(--s-hover); }
.thread:active { background: var(--s-press); }
/* Keyboard scanners get the same affordance as the mouse. */
.thread:focus-within { background: var(--s-hover); }

/* The hairline starts after the avatar, flush with the text column — the clause
   that makes this list recognizable with the content removed. 36 + 16 = 52px. */
.thread::after {
	content: "";
	position: absolute;
	left: 52px; right: 0; bottom: 0;
	border-bottom: 1px solid var(--b-subtle);
}
.threadlist > .thread:last-child::after { border-bottom: 0; }

.thread > a:first-child { margin: 0 !important; flex: 0 0 auto; }
.thread .avatar-3, .post .avatar-3 {
	width: 36px; height: 36px;
	border-radius: 50%;
	object-fit: cover;
	background: var(--s-sunken);
}

.thread .media-body { min-width: 0; }

/* Integer px, not fractional rem: Han strokes render unevenly on half pixels.
   No negative tracking either — tightening is a Latin habit that closes
   already-tight Han counters. */
.thread .subject {
	font-size: 15px;
	line-height: 1.5;
	font-weight: 600;
	/* Two lines maximum, so one long title cannot destroy the row rhythm. */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.thread .subject a { color: var(--t-primary); }
.thread:hover .subject a { color: var(--a-base); }

.thread .small { color: var(--t-muted); font-size: 13px; }
.thread .username { color: var(--t-secondary); font-weight: 500; }

/* The bare "←" reads as decoration and leaves "admin 1小时前" looking like the
   author when it is the last replier. theme.js replaces it with a real,
   language-aware text node — generating the label from content: would be
   untranslatable and invisible to selection and screen readers. */
.thread .fh-lastreply { color: var(--t-muted); margin-right: .35rem; }
/* The view count ships in the markup but core hides it; scanning is the job. */
.thread .text-muted.small > span.d-none { display: inline !important; }

.thread .badge {
	font-weight: 500;
	border-radius: 4px;
	padding: .18em .5em;
	font-size: .78em;
	vertical-align: .1em;
}
.badge-primary { background: var(--a-base); color: var(--a-contrast); }
.badge-secondary { background: var(--s-sunken); color: var(--t-secondary); }
.badge-danger  { background: var(--x-danger);  color: #FFF; }
.badge-success { background: var(--x-success); color: #FFF; }
:root[data-theme="dark"] .badge-danger,
:root[data-theme="dark"] .badge-success { color: #0F1215; }

/* Read memory — the signature interaction, three states from one stored number.
   The dot gutter is reserved on EVERY row so the marker never shifts a subject
   sideways relative to its neighbours. */
/* Parked in the gutter between avatar and text, not in the text flow: an inline
   marker pushed every subject 17px right of its own meta line. */
.thread .media-body { position: relative; }
.thread .fh-dot {
	position: absolute;
	left: -13px; top: 8px;
	width: 7px; height: 7px;
	border-radius: 50%;
	background: transparent;
	margin: 0;
}
/* state 2 — opened, nothing new since */
.thread.fh-read .subject a { color: var(--t-secondary); font-weight: 500; }
/* state 3 — opened, gained replies since: still read, but marked */
.thread.fh-new .fh-dot { background: var(--a-base); }

/* Empty state — the forum has one thread today and must still look built. */
.fh-empty {
	padding: 3rem 1rem;
	text-align: center;
	color: var(--t-muted);
}
.fh-empty svg { width: 40px; height: 40px; margin-bottom: .75rem; opacity: .5; }
.fh-empty p { margin: 0 0 .25rem; font-size: 1rem; color: var(--t-secondary); font-weight: 500; }
.fh-empty span { font-size: .9rem; }

/* --------------------------------------------------- thread / post view -- */
.card-thread .card-body { padding: 1.125rem .875rem; }
/* No negative tracking: this heading is Han text, and tightening closes
   already-tight counters. Same rule as the list subject. */
.card-thread h4 {
	font-size: 21px;
	line-height: 1.45;
	font-weight: 700;
	color: var(--t-primary);
	margin-bottom: .625rem;
}

.message {
	font-size: 1.02rem;
	line-height: 1.78;
	color: var(--t-primary);
	word-break: break-word;
}
.message p { margin: 0 0 .9em; line-height: 1.78; }
.message p:last-child { margin-bottom: 0; }
.message a { text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }
.message img { border: 1px solid var(--b-default); border-radius: var(--r-sm); }
.message code {
	font-family: var(--font-mono);
	font-size: .88em;
	background: var(--s-sunken);
	border: 1px solid var(--b-subtle);
	border-radius: 4px;
	padding: .12em .38em;
	color: var(--t-primary);
}
.message pre {
	font-family: var(--font-mono);
	background: var(--s-sunken);
	border: 1px solid var(--b-subtle);
	border-radius: var(--r-sm);
	padding: .875rem 1rem;
	overflow-x: auto;
	font-size: .88em;
	line-height: 1.6;
}
.message h1, .message h2, .message h3, .message h4 {
	margin: 1.6em 0 .6em; font-weight: 700; line-height: 1.4;
}

.post {
	padding: 1rem 0;
	border-bottom: 1px solid var(--b-subtle);
}
.postlist > .post:last-child { border-bottom: 0; }
.post .username a { color: var(--t-primary); font-weight: 600; }

.blockquote, li.quote {
	background: var(--s-sunken);
	border: 1px solid var(--b-subtle);
	border-radius: var(--r-sm);
	background-image: none;
	font-size: .92rem;
	color: var(--t-secondary);
	padding: .625rem .875rem !important;
}
li.quote { animation: none; }
@keyframes quote_animation { from { background-color: var(--a-soft); } to { background-color: var(--s-sunken); } }
li.quote { animation: quote_animation .9s var(--ease); }

/* -------------------------------------------------------- breadcrumb ----- */
.breadcrumb {
	background-color: transparent !important;
	border: 0;
	box-shadow: none;
	padding: .625rem 0;
	margin-bottom: .5rem;
	font-size: .9rem;
}
.breadcrumb:hover { background-color: transparent !important; }
.breadcrumb .breadcrumb-item a { color: var(--t-muted); }
.breadcrumb .breadcrumb-item a:hover { color: var(--a-base); }
.breadcrumb .breadcrumb-item.active a { color: var(--t-secondary); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--b-strong); }

/* ------------------------------------------------------------- buttons -- */
.btn {
	border-radius: var(--r-sm);
	font-weight: 500;
	padding: .44rem .95rem;
	transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.btn-primary {
	background: var(--a-base);
	border-color: var(--a-base);
	color: var(--a-contrast);
}
.btn-primary:hover, .btn-primary:focus {
	background: var(--a-hover);
	border-color: var(--a-hover);
	color: var(--a-contrast);
}
.btn-primary:disabled, .btn-primary.disabled { background: var(--a-base); border-color: var(--a-base); opacity: .45; }
.btn-secondary, .btn-default {
	background: var(--s-raised);
	border-color: var(--b-default);
	color: var(--t-primary);
}
.btn-secondary:hover { background: var(--s-hover); border-color: var(--b-strong); color: var(--t-primary); }
.btn-link { color: var(--a-base); }
.btn-sm { padding: .28rem .6rem; font-size: .87rem; }

/* --------------------------------------------------------------- forms -- */
.form-control {
	background: var(--s-raised);
	border: 1px solid var(--b-default);
	border-radius: var(--r-sm);
	color: var(--t-primary);
	font-size: 1rem;
	padding: .5rem .7rem;
	transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.form-control::placeholder { color: var(--t-muted); opacity: 1; }
.form-control:focus {
	background: var(--s-raised);
	border-color: var(--a-base);
	box-shadow: 0 0 0 3px var(--a-ring);
	color: var(--t-primary);
	position: relative; z-index: 2;
}
.form-control:disabled, .form-control[readonly] { background: var(--s-sunken); color: var(--t-muted); }
.is-invalid, .form-control.is-invalid { border-color: var(--x-danger); }
.is-invalid:focus, .form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(179, 38, 30, .28); }
label { color: var(--t-secondary); font-weight: 500; font-size: .92rem; }

/* Bootstrap 4 renders .input-group-prepend > .input-group-text; the Bootstrap 3
   name (.input-group-addon) never matches, which shipped two stock near-white
   slabs onto the dark login form. */
.input-group-text {
	background: var(--s-sunken);
	border-color: var(--b-default);
	color: var(--t-muted);
}
.input-group > .input-group-prepend > .input-group-text {
	border-radius: var(--r-sm) 0 0 var(--r-sm);
}
.input-group > .input-group-append > .input-group-text {
	border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.input-group > .form-control:not(:first-child) { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.input-group > .form-control:not(:last-child)  { border-radius: var(--r-sm) 0 0 var(--r-sm); }

/* The error lives inside .input-group, so as a flex sibling it lands beside the
   field. Force it onto its own row underneath, where an error belongs. */
.invalid-feedback, .text-danger { color: var(--x-danger) !important; }
.input-group > .invalid-feedback { flex: 0 0 100%; order: 99; margin-top: .35rem; }

/* Busy state for Xiuno's data-loading-text buttons. */
@keyframes fh-spin { to { transform: rotate(360deg); } }
.btn.fh-busy { pointer-events: none; opacity: .75; }
.btn.fh-busy::before {
	content: "";
	display: inline-block;
	width: 13px; height: 13px;
	margin-right: .45rem;
	vertical-align: -1px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: fh-spin .6s linear infinite;
}

/* Quick-reply box */
/* Grows on focus, but the growth is not tweened: animating height reflows the
   document, and the theme crossfade is this build's one authored motion. */
#message {
	height: 2.6rem;
	min-height: 2.6rem;
	transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
#message:focus { height: 7rem; }

/* ---------------------------------------------------------- pagination -- */
.pagination { flex-wrap: wrap; gap: 4px; }
.page-link {
	border: 1px solid var(--b-default);
	background: var(--s-raised);
	color: var(--t-secondary);
	border-radius: var(--r-sm);
	margin: 0;
	min-width: 38px;
	height: 38px;
	display: inline-flex; align-items: center; justify-content: center;
	font-size: .9rem;
	transition: background-color .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.page-link:hover { background: var(--s-hover); color: var(--t-primary); border-color: var(--b-strong); }
.page-item.active .page-link {
	background: var(--a-base);
	border-color: var(--a-base);
	color: var(--a-contrast);
	font-weight: 600;
}
.page-item.disabled .page-link { background: var(--s-sunken); color: var(--t-muted); border-color: var(--b-subtle); }

/* -------------------------------------------------------------- aside --- */
.card-site-info .card-footer table td { color: var(--t-secondary); padding: .2rem 0; }
.card-site-info .card-footer table td:last-child { color: var(--t-primary); font-weight: 600; text-align: right; }

/* ------------------------------------------------------------- footer --- */
/* Canvas, not raised: the footer is the least important band on the page and
   must never be the brightest large region on a short one. */
#footer {
	background: var(--s-canvas) !important;
	border-top: 1px solid var(--b-subtle);
	color: var(--t-muted) !important;
	padding: 1.5rem 0 !important;
	margin-top: 2rem !important;
}
#footer a { color: var(--t-secondary); }
#footer a:hover { color: var(--a-base); }

/* ------------------------------------------------------------ dropdown -- */
.dropdown-menu {
	background: var(--s-raised);
	border: 1px solid var(--b-default);
	border-radius: var(--r-md);
	box-shadow: var(--shadow-3);
	padding: .3rem;
}
.dropdown-item { color: var(--t-primary); border-radius: var(--r-sm); padding: .42rem .6rem; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--s-hover); color: var(--t-primary); }
.dropdown-divider { border-top-color: var(--b-subtle); }

/* --------------------------------------------------------------- modal -- */
.modal-content {
	background: var(--s-raised);
	border: 1px solid var(--b-default);
	border-radius: var(--r-lg);
	box-shadow: var(--shadow-3);
}
.modal-header, .modal-footer { border-color: var(--b-subtle); }
.close { color: var(--t-muted); text-shadow: none; opacity: 1; }
.close:hover { color: var(--t-primary); }

/* --------------------------------------------------------------- alert -- */
.alert { border-radius: var(--r-sm); border: 1px solid var(--b-default); background: var(--s-sunken); color: var(--t-primary); }
.alert-danger  { border-color: var(--x-danger);  background: var(--s-sunken); color: var(--x-danger); }
.alert-success { border-color: var(--x-success); background: var(--s-sunken); color: var(--x-success); }

/* ------------------------------------------------- mobile forum strip ---- */
/* The FIRST VIEWPORT commits to a scrollable forum strip. Below lg the core
   template buries forum navigation inside the hamburger, so the strip is
   rebuilt additively from those same links. */
.fh-forum-strip { display: none; }

@media (max-width: 991.98px) {
	.fh-forum-strip {
		display: flex;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		background: var(--s-raised);
		border-bottom: 1px solid var(--b-default);
		padding: 0 6px;
	}
	.fh-forum-strip::-webkit-scrollbar { display: none; }
	.fh-forum-strip a {
		flex: 0 0 auto;
		display: flex; align-items: center;
		min-height: 44px;
		padding: 0 12px;
		font-size: 14px;
		font-weight: 500;
		white-space: nowrap;
		color: var(--t-secondary);
		border-bottom: 2px solid transparent;
	}
	.fh-forum-strip a:hover { color: var(--t-primary); }
	.fh-forum-strip a.fh-active {
		color: var(--a-base);
		border-bottom-color: var(--a-base);
		font-weight: 600;
	}
}

/* ----------------------------------------------------------- mobile FAB - */
.fh-fab {
	position: fixed;
	right: 16px;
	bottom: calc(20px + env(safe-area-inset-bottom, 0px));
	z-index: 1030;
	width: 52px; height: 52px;
	border: 0; border-radius: 50%;
	background: var(--a-base);
	color: var(--a-contrast);
	box-shadow: var(--shadow-3);
	display: none;
	align-items: center; justify-content: center;
	transition: transform .18s var(--ease), background-color .15s var(--ease);
}
.fh-fab:hover, .fh-fab:focus { color: var(--a-contrast); background: var(--a-hover); }
.fh-fab:active { transform: scale(.94); }
.fh-fab svg { width: 22px; height: 22px; }

/* -------------------------------------------------------- breakpoints --- */
@media (max-width: 991.98px) {
	.fh-fab { display: flex; }

	/* Thumb targets. STORY promises a 44px tap; below lg every control meets it. */
	.fh-icon-btn { width: 44px; height: 44px; }
	#header .navbar-toggler { min-width: 44px; min-height: 44px; }
	.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
	.btn-sm { min-height: 36px; }
	.page-link { min-width: 44px; height: 44px; }
	.thread .subject a, .postlist .post a { padding-block: 2px; }
	/* Bare text links that act as primary navigation on the auth pages. */
	.card-body a.small, .card-body .small a { display: inline-block; padding: .5rem 0; }
	.post .d-flex a { padding: .35rem; margin: -.35rem; }

	/* Collapsed nav becomes a real sheet, not a dark strip. */
	#header .navbar-collapse {
		background: var(--s-raised);
		margin: .5rem -15px -0.5rem;
		padding: .5rem 15px .75rem;
		border-top: 1px solid var(--b-subtle);
	}
	#nav { padding-top: .25rem; padding-left: 0; }
	#nav > ul:first-child > li:not(:first-child) { padding-left: 0; }
	#nav > ul > li > a.nav-link { border-bottom: 1px solid var(--b-subtle); border-radius: 0; }
	#nav > ul > li:last-child > a.nav-link { border-bottom: 0; }
}

@media (max-width: 767.98px) {
	/* Edge-to-edge list: cards lose their gutter and become full-bleed sheets. */
	#body > .container { padding-left: 0; padding-right: 0; }
	#body > .container > .row { margin-left: 0; margin-right: 0; }
	#body > .container > .row > div { padding: 0; }

	.card {
		border-radius: 0;
		border-left: 0; border-right: 0;
		margin-bottom: .5rem;
		box-shadow: none;
	}
	.card > .card-header:first-child { border-radius: 0; }
	.card-body { padding-left: 14px; padding-right: 14px; }
	.card > .card-header { padding-left: 14px; padding-right: 14px; }

	.thread { padding: .8rem 0; min-height: 60px; }
	.thread .subject { font-size: .98rem; }
	.card-thread h4 { font-size: 19px; }
	.breadcrumb { padding-left: 14px; padding-right: 14px; }

	/* Anchor the wordmark beside the hamburger instead of letting space-between
	   float it to ~35% of the width. */
	#header > .container { justify-content: flex-start; }
	#header .navbar-brand:first-of-type { margin-left: .5rem; margin-right: auto; }

	/* Two floated columns become one stacked block; the perf readout is
	   diagnostics, not content, so it goes quiet rather than fighting for room. */
	#footer .row { flex-direction: column; gap: .35rem; }
	#footer .row > .col, #footer .row > .col-auto { max-width: 100%; flex: 0 0 auto; }
	#footer .text-right { text-align: left !important; opacity: .7; font-size: .82rem; }

	/* Keep the last rows clear of the FAB. */
	#footer { padding-bottom: 5.5rem !important; }
}

/* --------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
	}
}

/* Suppress the toggle's own transition during the theme swap so the
   orchestrated color crossfade reads as one movement. */
:root.fh-switching * {
	transition: background-color .24s var(--ease),
	            border-color .24s var(--ease),
	            color .24s var(--ease) !important;
}
