:root {
    --fh-primary: var(--global-palette-btn-bg, #f5a524);
    --fh-primary-hover: var(--global-palette-btn-bg-hover, #df9723);
    --fh-bg: var(--global-palette8, #f1f1f1);
    --fh-card-bg: var(--global-palette9, #ffffff);
    --fh-text: var(--global-palette3, #1A202C);
    --fh-text-muted: #64748b;
    --fh-border: #cbd5e1;
    --fh-success: #10b981;
    --fh-error: #ef4444;
    --fh-hero-bg: var(--global-palette8, #F7FAFC);
    --fh-hero-text: var(--global-palette3, #1A202C);
    --fh-tag-bg: var(--global-palette7, #EDF2F7);
    --fh-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(241, 245, 249, 0.8) inset;
    --fh-radius: 12px;
}

.fh-wrap {
    font-family: var(--global-body-font-family, 'AR One Sans', system-ui, -apple-system, sans-serif);
    color: var(--fh-text);
    /*  background-color: var(--fh-bg); */
    min-height: 100vh;
    padding-bottom: 3rem;
    box-sizing: border-box;
}

.fh-wrap * {
    box-sizing: border-box;
}

/* --- NAVIGATION --- */
.fh-nav {
    background-color: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--fh-border);
    position: relative;
    z-index: 10;
    padding: 0.75rem 0;
    border-radius: 12px;
    max-width: 1080px;
    margin: 25px auto 0 auto;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.fh-nav-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fh-nav-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--fh-text);
    text-decoration: none;
    letter-spacing: -0.025em;
}

.fh-nav-links {
    display: flex;
    gap: 1.25rem;
    margin-left: 2rem;
    margin-right: auto;
}

.fh-nav-link {
    color: var(--fh-text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    transition: color 0.2s;
}

.fh-nav-link:hover,
.fh-nav-link.active {
    color: var(--fh-primary);
}

.fh-nav-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.fh-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.35rem;
    color: var(--fh-text);
    line-height: 0;
}

.fh-hamburger svg {
    width: 22px;
    height: 22px;
}

.fh-mobile-drawer {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    background-color: var(--fh-card-bg);
    z-index: 200;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.fh-mobile-drawer.open {
    left: 0;
}

.fh-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 199;
    display: none;
}

.fh-drawer-overlay.open {
    display: block;
}

.fh-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.fh-drawer-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--fh-text-muted);
    padding: 0.25rem;
}

.fh-drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.fh-drawer-nav a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--fh-text);
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    transition: background-color 0.15s;
}

.fh-drawer-nav a:hover {
    background-color: var(--fh-bg);
    color: var(--fh-primary);
}

.fh-drawer-divider {
    height: 1px;
    background-color: var(--fh-border);
    margin: 1rem 0;
}

/* FAB — Floating Action Button */
.fh-fab {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--fh-primary);
    color: #fff;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.fh-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.fh-fab:active {
    transform: scale(0.95);
}

.fh-search-wrap {
    position: relative;
    width: 250px;
}

.fh-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--fh-text-muted);
    display: flex;
    align-items: center;
}

.fh-wrap .fh-search-input {
    width: 100% !important;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem !important;
    border: 1px solid var(--fh-border) !important;
    border-radius: 8px !important;
    background-color: #f1f5f9 !important;
    color: var(--fh-text) !important;
    font-size: 0.9rem !important;
    transition: all 0.2s !important;
}

.fh-wrap .fh-search-input:focus {
    outline: none !important;
    border-color: var(--fh-primary) !important;
    background-color: var(--fh-card-bg) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

.fh-search-results {
    position: absolute;
    top: 105%;
    left: 0;
    right: 0;
    background-color: var(--fh-card-bg);
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    box-shadow: var(--fh-shadow);
    max-height: 250px;
    overflow-y: auto;
    display: none;
    z-index: 100;
}

.fh-search-result-item {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--fh-text);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--fh-border);
    transition: background-color 0.2s;
}

.fh-search-result-item:last-child {
    border-bottom: none;
}

.fh-search-result-item:hover {
    background-color: #f8fafc;
    color: var(--fh-primary);
}

/* --- AVATARS --- */
.fh-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    color: #ffffff;
    user-select: none;
    border: 2px solid var(--fh-card-bg);
}

.fh-avatar--xs {
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
}

.fh-avatar--sm {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
}

.fh-avatar--md {
    width: 44px;
    height: 44px;
    font-size: 1rem;
}

.fh-avatar--lg {
    width: 56px;
    height: 56px;
    font-size: 1.25rem;
}

.fh-avatar--fallback {
    font-weight: 700;
    color: #ffffff;
    user-select: none;
    border: 2px solid var(--fh-card-bg);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* --- HERO --- */
.fh-hero {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--fh-text) !important;
    padding: 3rem 2.5rem;
    border-radius: 12px;
    margin-top: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--fh-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    max-width: 1080px;
    margin-left: auto;
    margin-right: auto;
}

.fh-hero-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
}

.fh-hero-text h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.01em;
    color: var(--fh-text) !important;
    font-family: var(--global-heading-font-family, inherit);
}

.fh-hero-text p {
    font-size: 1.05rem;
    color: var(--fh-text-muted) !important;
    margin: 0 0 0.85rem 0;
    max-width: 600px;
    line-height: 1.5;
    font-family: var(--global-body-font-family, inherit);
}

.fh-hero-stats {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.875rem;
    color: var(--fh-text-muted) !important;
}

.fh-hero-stat-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.fh-hero-stat-item strong {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--fh-text) !important;
}

.fh-hero-stat-sep {
    color: var(--fh-border);
    font-size: 0.85rem;
}

/* Right panel: stacks stats + new topic button */
.fh-hero-right-panel {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1.25rem;
    flex-shrink: 0;
    min-width: 180px;
}

/* New Topic button in categories hero */
.fh-hero-new-topic-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* --- BUTTONS --- */
.fh-btn-primary {
    background-color: var(--fh-primary);
    color: var(--global-palette-btn, #ffffff) !important;
    border: none;
    padding: 0.65rem 1.25rem;
    font-weight: 500;
    border-radius: var(--global-palette-btn-radius, 4px);
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.fh-btn-primary:hover {
    background-color: var(--fh-primary-hover);
}

.fh-btn-primary:active {
    transform: scale(0.98);
}

.fh-btn-outline {
    background-color: transparent;
    color: var(--fh-text-muted);
    border: 1px solid var(--fh-border);
    padding: 0.5rem 1rem;
    font-weight: 500;
    font-size: 0.85rem;
    border-radius: var(--global-palette-btn-radius, 4px);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    font-family: inherit;
}

.fh-btn-outline:hover {
    color: var(--fh-primary);
    border-color: var(--fh-primary);
    background-color: var(--fh-bg);
}

.fh-btn--full {
    width: 100%;
}

/* --- BODY LAYOUTS --- */
.fh-body {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 240px 1fr 280px;
    gap: 1.25rem;
}

/* --- CARDS & BLOCKS --- */
.fh-card {
    background-color: var(--fh-card-bg);
    border: 1px solid var(--fh-border);
    border-radius: var(--fh-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--fh-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.fh-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

.fh-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 1.25rem 0;
    letter-spacing: -0.01em;
}

.fh-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--fh-border);
    padding-bottom: 1rem;
}

.fh-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

/* --- CATEGORY LIST (INDEX SIDEBAR) --- */
.fh-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fh-category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.fh-category-item:last-child {
    border-bottom: none;
}

.fh-category-link {
    color: var(--fh-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.fh-category-link:hover {
    color: var(--fh-primary);
}

.fh-category-count {
    background-color: #f1f5f9;
    color: var(--fh-text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
}

/* --- COMMUNITY STATS LIST --- */
.fh-stats-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.fh-stats-list li {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.fh-stats-list li span {
    color: var(--fh-text-muted);
}

.fh-stats-list li strong {
    color: var(--fh-text);
}

/* --- DISCUSSION LIST --- */
.fh-topic-card {
    padding: 1.25rem;
    border: 1px solid var(--fh-border);
    border-radius: 10px;
    margin-bottom: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: var(--fh-card-bg);
}

.fh-topic-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.fh-topic-card-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 0.75rem;
}

.fh-tag {
    background-color: var(--fh-tag-bg);
    color: var(--tag-color, var(--fh-primary));
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
}

.fh-topic-meta-top {
    font-size: 0.8rem;
    color: var(--fh-text-muted);
}

.fh-topic-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.fh-topic-title a {
    color: var(--fh-text);
    text-decoration: none;
    transition: color 0.2s;
}

.fh-topic-title a:hover {
    color: var(--fh-primary);
}

.fh-topic-excerpt {
    font-size: 0.925rem;
    color: var(--fh-text-muted);
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.fh-topic-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f8fafc;
    padding-top: 0.75rem;
}

.fh-category-topics-view {
    margin-bottom: 2rem;
}

.fh-topic-footer-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.fh-topic-last-activity {
    font-size: 0.8rem;
    color: var(--fh-text-muted);
}

.fh-topic-avatars {
    display: flex;
    align-items: center;
}

.fh-topic-avatars .fh-avatar {
    margin-left: -6px;
}

.fh-topic-avatars .fh-avatar:first-child {
    margin-left: 0;
}

.fh-views {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.825rem;
    color: var(--fh-text-muted);
}

/* --- SIDEBAR LISTS (RIGHT) --- */
.fh-trending-list,
.fh-members-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.fh-trending-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.25rem;
}

.fh-trending-item a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--fh-text);
    text-decoration: none;
    line-height: 1.4;
    transition: color 0.2s;
}

.fh-trending-item a:hover {
    color: var(--fh-primary);
}

.fh-trending-score {
    font-size: 0.8rem;
    color: var(--fh-success);
    font-weight: 600;
}

.fh-member-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.fh-member-info {
    display: flex;
    flex-direction: column;
}

.fh-member-info strong {
    font-size: 0.9rem;
    font-weight: 600;
}

.fh-member-info span {
    font-size: 0.775rem;
    color: var(--fh-text-muted);
}

/* --- CATEGORIES PAGE --- */
.fh-categories-body {
    max-width: 1080px;
    margin: 0 auto;
    /* padding: 0 1.5rem;*/
}

.fh-categories-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

.fh-categories-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.fh-filter-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.fh-filter-tab {
    background-color: var(--fh-card-bg);
    border: 1px solid var(--fh-border);
    color: var(--fh-text-muted);
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.fh-filter-tab-count {
    opacity: 0.75;
    font-size: 0.825em;
    font-weight: 500;
}

.fh-filter-tab:hover {
    border-color: #cbd5e1;
    color: var(--fh-text);
}

.fh-filter-tab.active {
    background-color: var(--fh-primary);
    border-color: var(--fh-primary);
    color: #ffffff;
}

.fh-categories-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}



.fh-category-card {
    box-sizing: border-box;
    width: 100%;
    background-color: var(--fh-card-bg);
    border: 1px solid var(--fh-border);
    border-radius: var(--fh-radius);
    padding: 1.5rem;
    box-shadow: var(--fh-shadow);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.fh-category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

.fh-category-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.fh-category-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.fh-category-name {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}

.fh-category-name a {
    color: var(--fh-text);
    text-decoration: none;
}

.fh-category-name a:hover {
    color: var(--fh-primary);
}

.fh-category-desc {
    font-size: 0.875rem;
    color: var(--fh-text-muted);
    margin: 0;
    line-height: 1.5;
}

.fh-category-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0 1.25rem 0;
}

.fh-cat-stat {
    font-size: 0.8rem;
    color: var(--fh-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.fh-cat-stat strong {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--fh-text);
}

.fh-cat-stat-sep {
    font-size: 0.8rem;
    color: var(--fh-border);
}

.fh-category-latest {
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    display: block;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    border: 1px solid var(--fh-border);
}

.fh-category-latest:hover {
    background-color: #f1f5f9;
    border-color: #E99D22;
}

.fh-latest-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--fh-text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.fh-latest-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fh-text);
    line-height: 1.4;
    margin-bottom: 0.25rem;
    transition: color 0.2s;
}

.fh-category-latest:hover .fh-latest-title {
    color: var(--fh-primary);
}

.fh-latest-meta {
    font-size: 0.75rem;
    color: var(--fh-text-muted);
}

.fh-category-footer {
    border-top: 1px solid #f1f5f9;
    padding-top: 1rem;
    margin-top: auto;
}

.fh-category-mods {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fh-category-mods .fh-avatar {
    margin-left: -8px;
}

.fh-category-mods .fh-avatar:first-of-type {
    margin-left: 0;
}

.fh-mods-label {
    font-size: 0.775rem;
    color: var(--fh-text-muted);
}

.fh-cta-banner {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--fh-text) !important;
    padding: 3rem 2.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.fh-cta-banner h3 {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.01em;
    color: var(--fh-text) !important;
    font-family: var(--global-heading-font-family, inherit);
}

.fh-cta-banner p {
    font-size: 1.05rem;
    color: var(--fh-text-muted) !important;
    max-width: 600px;
    margin: 0 auto 1.5rem auto;
    line-height: 1.5;
    font-family: var(--global-body-font-family, inherit);
}

/* --- TOPIC PAGE LAYOUT --- */
.fh-topic-wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1.25rem;
}

/* --- TOPIC HERO CARD (breadcrumb + header unified) --- */
.fh-topic-hero {
    background-color: var(--fh-card-bg);
    border: 1px solid var(--fh-border);
    border-radius: var(--fh-radius);
    box-shadow: var(--fh-shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

/* Breadcrumb bar — subtle top strip */
.fh-breadcrumb-bar {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 1.5rem;
    background-color: var(--fh-bg);
    border-bottom: 1px solid var(--fh-border);
    font-size: 0.8rem;
}

.fh-bc-crumb {
    color: var(--fh-text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.fh-bc-crumb:hover {
    color: var(--fh-primary);
}

.fh-bc-sep {
    color: var(--fh-text-muted);
    opacity: 0.4;
    display: flex;
    align-items: center;
}

.fh-bc-current {
    color: var(--fh-text);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

/* Hero body — forum badge, title, meta row */
.fh-topic-hero-body {
    padding: 1.5rem;
}

.fh-topic-forum-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    border: 1px solid transparent;
    margin-bottom: 0.85rem;
    margin-right: 0.5rem;
}

.fh-topic-locked-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    margin-bottom: 0.85rem;
}

.fh-topic-heading {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0 0 1.1rem 0;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: var(--fh-text);
}

/* Author + stats meta row */
.fh-topic-hero-meta {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--fh-border);
    padding-top: 1rem;
}

.fh-topic-hero-author {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    margin-right: auto;
}

.fh-topic-hero-byline {
    font-size: 0.875rem;
    color: var(--fh-text-muted);
}

.fh-topic-hero-byline strong {
    color: var(--fh-text);
    font-weight: 600;
}

.fh-topic-hero-date {
    font-size: 0.775rem;
    color: var(--fh-text-muted);
}

.fh-topic-hero-stats {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.fh-topic-stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--fh-text-muted);
    background-color: var(--fh-bg);
    border: 1px solid var(--fh-border);
    border-radius: 6px;
    padding: 0.3rem 0.65rem;
}



/* --- REPLY / POST CARDS --- */
.fh-reply-card {
    background-color: var(--fh-card-bg);
    border: 1px solid var(--fh-border);
    border-radius: var(--fh-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--fh-shadow);
    display: flex;
    gap: 1.25rem;
}

.fh-reply-author {
    width: 150px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-right: 1px solid #f1f5f9;
    padding-right: 1.5rem;
}

.fh-reply-author-info {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.fh-reply-author-info strong {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--fh-text);
    margin-bottom: 0.25rem;
    word-break: break-all;
}

.fh-role {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    margin-bottom: 0.75rem;
}

.fh-role--admin {
    background-color: #fef2f2;
    color: #dc2626;
}

.fh-role--mod {
    background-color: #fef3c7;
    color: #d97706;
}

.fh-role--premium {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.fh-role--member {
    background-color: #f1f5f9;
    color: var(--fh-text-muted);
}

.fh-reply-author-stats {
    font-size: 0.775rem;
    color: var(--fh-text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
}

.fh-author-edit-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.fh-btn-icon {
    background: none;
    border: 1px solid var(--fh-border);
    border-radius: 6px;
    padding: 0.35rem;
    cursor: pointer;
    color: var(--fh-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    line-height: 0;
}

.fh-btn-icon:hover {
    border-color: var(--fh-primary);
    color: var(--fh-primary);
    background-color: rgba(37, 99, 235, 0.04);
}

.fh-delete-btn.fh-btn-icon:hover {
    border-color: #dc2626;
    color: #dc2626;
    background-color: rgba(220, 38, 38, 0.04);
}

.fh-report-btn.fh-btn-icon {
    margin-top: 0.25rem;
}

.fh-report-btn.fh-btn-icon:hover {
    border-color: #f59e0b;
    color: #f59e0b;
    background-color: rgba(245, 158, 11, 0.04);
}

.fh-report-inline {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 0.5rem;
    background-color: var(--fh-card-bg);
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    padding: 0.75rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 200px;
    white-space: nowrap;
}

.fh-report-inline::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-top-color: var(--fh-card-bg);
}

.fh-report-select {
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--fh-border);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--fh-text);
    background-color: var(--fh-card-bg);
    width: 100%;
}

.fh-report-inline-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.fh-report-done {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--fh-success);
    margin-top: 0.25rem;
}

.fh-report-btn-wrap {
    position: relative;
}

/* --- WEATHER WIDGET --- */
.fh-weather-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fh-categories-grid .fh-weather-card {
    height: 100%;
}

.fh-weather-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.fh-weather-input {
    flex: 1;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--fh-border);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--fh-text);
    background-color: var(--fh-card-bg);
}

.fh-weather-input:focus {
    outline: none;
    border-color: var(--fh-primary);
}

.fh-weather-current {
    text-align: center;
    padding: 0.75rem 0 0.5rem 0;
}

.fh-weather-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.25rem;
}

.fh-weather-temp {
    font-size: 2rem;
    font-weight: 800;
    color: var(--fh-text);
    line-height: 1;
    margin-bottom: 0.2rem;
}

.fh-weather-desc {
    font-size: 0.85rem;
    color: var(--fh-text-muted);
    margin-bottom: 0.15rem;
}

.fh-weather-location {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fh-text);
    margin-bottom: 0.15rem;
}

.fh-weather-detail {
    font-size: 0.75rem;
    color: var(--fh-text-muted);
}

.fh-weather-sun {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: var(--fh-text-muted);
}

.fh-weather-loading {
    display: block;
    text-align: center;
    padding: 0.5rem 0;
}

/* Compact weather card in sidebar */
.fh-topic-sidebar .fh-weather-card .fh-card-title {
    font-size: 0.95rem;
    margin-bottom: 0.5rem !important;
}

.fh-topic-sidebar .fh-weather-card {
    padding: 1rem;
}

.fh-topic-sidebar .fh-weather-icon {
    font-size: 1.75rem;
}

.fh-topic-sidebar .fh-weather-temp {
    font-size: 1.5rem;
}

.fh-topic-sidebar .fh-weather-current {
    padding: 0.5rem 0 0.25rem 0;
}

.fh-topic-sidebar .fh-weather-desc,
.fh-topic-sidebar .fh-weather-location {
    font-size: 0.78rem;
}

.fh-topic-sidebar .fh-weather-detail {
    font-size: 0.7rem;
}

.fh-topic-sidebar .fh-weather-input {
    font-size: 0.78rem;
    padding: 0.35rem 0.5rem;
}

.fh-reply-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.fh-reply-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: var(--fh-text-muted);
}

.fh-reply-label {
    font-weight: 600;
}

.fh-reply-content {
    font-size: 0.975rem;
    line-height: 1.6;
    color: var(--fh-text);
    flex-grow: 1;
}

.fh-reply-content img {
    max-width: 350px;
    height: auto;
    display: block;
    margin: 1em auto;
    border-radius: 8px;
}

.fh-post-image {
    text-align: center;
}

.fh-reply-content blockquote {
    background-color: #f8fafc;
    border-left: 4px solid var(--fh-primary);
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border-radius: 0 6px 6px 0;
}

.fh-reply-content pre {
    background-color: #0f172a;
    color: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
}

.fh-reply-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: center;
    margin-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
    padding-top: 1rem;
}

.fh-btn-action {
    background-color: #f8fafc;
    border: 1px solid var(--fh-border);
    color: var(--fh-text-muted);
    padding: 0.3rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.fh-btn-action:hover {
    border-color: #cbd5e1;
    color: var(--fh-text);
    background-color: #f1f5f9;
}

.fh-btn-action.fh-liked {
    background-color: #fef2f2;
    border-color: #fca5a5;
    color: #ef4444;
}

/* --- REPLY FORM --- */
.fh-reply-form-wrap {
    background-color: var(--fh-card-bg);
    border: 1px solid var(--fh-border);
    border-radius: var(--fh-radius);
    padding: 1.5rem;
    box-shadow: var(--fh-shadow);
}

.fh-reply-form-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1.25rem 0;
}

.fh-textarea {
    width: 100%;
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: var(--fh-text);
    margin-bottom: 1rem;
    font-family: inherit;
    resize: vertical;
}

.fh-textarea:focus {
    outline: none;
    border-color: var(--fh-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* --- WP EDITOR WRAPPER --- */
.fh-editor-wrap {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--fh-border);
}

.fh-editor-wrap .wp-editor-container {
    border: none !important;
}

.fh-editor-wrap .wp-editor-tabs {
    float: right;
    padding: 2px 4px 0;
}

.fh-editor-wrap .mce-toolbar-grp {
    border-bottom: 1px solid var(--fh-border) !important;
    background-color: #f8fafc !important;
}

.fh-editor-wrap .mce-edit-area iframe {
    min-height: 140px !important;
}

.fh-editor-wrap .quicktags-toolbar {
    background-color: #f8fafc !important;
    border-bottom: 1px solid var(--fh-border) !important;
    padding: 4px !important;
}

.fh-editor-wrap textarea.wp-editor-area {
    border: none !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.95rem !important;
    font-family: inherit !important;
    color: var(--fh-text) !important;
    min-height: 140px !important;
}
/* TinyMCE (Visual Side) Toolbar Custom Styling */
.fh-editor-wrap .mce-container,
.fh-editor-wrap .mce-panel,
.fh-editor-wrap .mce-toolbar-grp,
.fh-editor-wrap .mce-top-part,
.fh-editor-wrap .mce-btn-group,
.fh-editor-wrap .mce-flow-layout,
.fh-editor-wrap .mce-flow-layout-item {
    box-sizing: border-box;
    background-color: #ffffff !important;
    background-image: none !important;
    border-color: var(--fh-border) !important;
}

.fh-editor-wrap .mce-btn {
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    transition: all 0.15s ease !important;
}

.fh-editor-wrap .mce-btn button {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    color: #475569 !important;
    box-shadow: none !important;
    padding: 4px 8px !important;
    height: auto !important;
    font-size: 14px !important;
    line-height: normal !important;
    cursor: pointer !important;
}

.fh-editor-wrap .mce-btn:hover button,
.fh-editor-wrap .mce-btn:focus button {
    color: #1e293b !important;
    background: transparent !important;
    background-color: transparent !important;
}

.fh-editor-wrap .mce-btn.mce-active button,
.fh-editor-wrap .mce-btn.mce-active:hover button {
    color: var(--fh-primary) !important;
    background: transparent !important;
    background-color: transparent !important;
}

.fh-editor-wrap .mce-btn:hover,
.fh-editor-wrap .mce-btn:focus {
    background-color: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
}

.fh-editor-wrap .mce-btn.mce-active,
.fh-editor-wrap .mce-btn.mce-active:hover {
    background-color: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
}

.fh-editor-wrap .mce-btn .mce-ico {
    color: #475569 !important;
    font-size: 16px !important;
}

.fh-editor-wrap .mce-btn.mce-active .mce-ico {
    color: var(--fh-primary) !important;
}

.fh-editor-wrap .mce-btn:hover .mce-ico {
    color: #1e293b !important;
}

/* Typography / Format Select Dropdown */
.fh-editor-wrap .mce-btn .mce-txt {
    color: #475569 !important;
    font-weight: 500 !important;
}

.fh-editor-wrap .mce-btn:hover .mce-txt {
    color: #1e293b !important;
}

.fh-editor-wrap .mce-btn .mce-caret {
    border-top-color: #475569 !important;
}

.fh-editor-wrap .mce-btn:hover .mce-caret {
    border-top-color: #1e293b !important;
}

/* Quicktags (Text Side) Toolbar Custom Styling */
.fh-editor-wrap .quicktags-toolbar {
    background-color: #ffffff !important;
    border-bottom: 1px solid var(--fh-border) !important;
    padding: 6px !important;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.fh-editor-wrap .quicktags-toolbar input.button {
    background: #ffffff !important;
    border: 1px solid var(--fh-border) !important;
    color: #475569 !important;
    font-size: 0.8rem !important;
    padding: 4px 8px !important;
    height: auto !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.fh-editor-wrap .quicktags-toolbar input.button:hover {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #1e293b !important;
}

/* WP Switch Editor Tabs Header Area */
.fh-editor-wrap .wp-editor-tools {
    background-color: #ffffff !important;
    border-bottom: 1px solid var(--fh-border) !important;
    padding: 4px 8px 0 8px !important;
}

.fh-editor-wrap .wp-editor-tabs {
    margin: 0 !important;
    padding: 0 !important;
}

.fh-editor-wrap .wp-switch-editor {
    background: transparent !important;
    border: 1px solid transparent !important;
    border-bottom: none !important;
    color: var(--fh-text-muted) !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    padding: 6px 12px !important;
    height: auto !important;
    margin: 0 4px -1px 0 !important;
    border-radius: 4px 4px 0 0 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.fh-editor-wrap .wp-switch-editor.active {
    background-color: #ffffff !important;
    border-color: var(--fh-border) var(--fh-border) transparent !important;
    color: var(--fh-primary) !important;
}

.fh-editor-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

#fh-submit-topic {
    width: 50% !important;
    margin-left: auto;
}

.fh-edit-form {
    margin-bottom: 1rem;
}

.fh-edit-form .fh-editor-wrap {
    margin-bottom: 0.5rem;
}

.fh-edit-msg {
    flex-grow: 1;
}

.fh-upload-btn {
    white-space: nowrap;
    font-size: 0.85rem !important;
    padding: 0.55rem 1rem !important;
    cursor: pointer;
    transition: all 0.2s;
}

.fh-upload-btn:hover {
    border-color: var(--fh-primary) !important;
    color: var(--fh-primary) !important;
    background-color: rgba(37, 99, 235, 0.04) !important;
}

.fh-quote-preview {
    background-color: #f1f5f9;
    border-left: 4px solid var(--fh-text-muted);
    padding: 0.75rem 1rem;
    border-radius: 0 6px 6px 0;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.fh-quote-preview p {
    margin: 0.25rem 0 0 0;
    color: var(--fh-text-muted);
}

.fh-login-prompt,
.fh-locked-notice {
    background-color: #f8fafc;
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    color: var(--fh-text-muted);
}

.fh-login-prompt a {
    color: var(--fh-primary);
    font-weight: 600;
}

/* --- SIDEBAR TOOLS --- */
.fh-thread-tools {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.fh-tool-btn {
    width: 100%;
    background-color: #f8fafc;
    border: 1px solid var(--fh-border);
    color: var(--fh-text);
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.fh-tool-btn:hover {
    border-color: #cbd5e1;
    background-color: #f1f5f9;
}

.fh-tool-btn.fh-active {
    color: var(--fh-primary);
    border-color: var(--fh-primary);
    background-color: rgba(37, 99, 235, 0.02);
}

.fh-related-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.fh-related-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.fh-related-item a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--fh-text);
    text-decoration: none;
    line-height: 1.4;
    transition: color 0.2s;
}

.fh-related-item a:hover {
    color: var(--fh-primary);
}

.fh-related-item span {
    font-size: 0.775rem;
    color: var(--fh-text-muted);
}

.fh-viewing-avatars {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* --- MESSAGES & NOTICES --- */
.fh-msg {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.fh-msg--success {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.fh-msg--error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* --- MODAL --- */
.fh-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.fh-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
}

.fh-modal-box {
    position: relative;
    background-color: var(--fh-card-bg);
    border-radius: var(--fh-radius);
    width: 100%;
    max-width: 550px;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    z-index: 10;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow-y: auto;
}

.fh-modal-box--wide {
    max-width: 720px;
}

.fh-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--fh-border);
}

.fh-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
}

.fh-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--fh-text-muted);
}

.fh-modal-body {
    padding: 1.5rem;
}

.fh-modal-body label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.fh-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.fh-input:focus {
    outline: none;
    border-color: var(--fh-primary);
}

/* --- EMPTY STATES --- */
.fh-empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--fh-text-muted);
}

.fh-empty-state--page {
    background-color: var(--fh-card-bg);
    border: 1px solid var(--fh-border);
    border-radius: var(--fh-radius);
    margin: 3rem auto;
    max-width: 600px;
}

.fh-empty-state a {
    color: var(--fh-primary);
    font-weight: 600;
}

/* --- RESPONSIVENESS --- */
@media (max-width: 1024px) {
    .fh-body {
        grid-template-columns: 200px 1fr;
    }

    .fh-sidebar--right {
        display: none;
    }
}

@media (max-width: 768px) {
    .fh-body {
        grid-template-columns: 1fr;
    }

    .fh-sidebar--left {
        display: none;
    }

    .fh-nav-links {
        display: none;
    }

    .fh-hamburger {
        display: flex;
    }

    .fh-fab {
        display: flex;
    }

    .fh-search-wrap {
        width: 180px;
    }

    .fh-nav-inner {
        padding: 0 1rem;
    }

    .fh-nav-brand {
        font-size: 1.2rem;
    }

    .fh-hero {
        padding: 2rem 1.25rem;
    }

    .fh-hero-inner {
        flex-direction: column;
        text-align: center;
    }

    .fh-hero-text h1 {
        font-size: 1.6rem;
    }

    .fh-hero-text p {
        font-size: 0.9rem;
    }

    .fh-hero-right-panel {
        min-width: 0;
        width: 100%;
    }

    .fh-hero-stats {
        justify-content: center;
        padding: 0.75rem 1rem;
    }

    .fh-hero-stat strong {
        font-size: 1.1rem;
    }

    .fh-categories-grid {
        grid-template-columns: 1fr;
    }

    .fh-stats-bar {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 1rem;
    }

    .fh-stats-bar-item {
        flex: 1 1 40%;
        min-width: 40%;
    }

    .fh-stats-bar-divider {
        margin: 0 0.5rem;
        height: 2rem;
    }

    .fh-topic-wrap {
        grid-template-columns: 1fr;
    }

    .fh-topic-sidebar {
        display: none;
    }

    .fh-topic-heading {
        font-size: 1.35rem;
    }

    .fh-topic-hero-body {
        padding: 1rem;
    }

    .fh-breadcrumb-bar {
        padding: 0.5rem 1rem;
    }

    .fh-reply-card {
        flex-direction: column;
        gap: 1.25rem;
    }

    .fh-reply-author {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #f1f5f9;
        padding-right: 0;
        padding-bottom: 1rem;
    }

    .fh-reply-actions {
        flex-wrap: wrap;
    }

    .fh-editor-actions {
        flex-wrap: wrap;
    }

    .fh-upload-btn {
        font-size: 0.8rem !important;
        padding: 0.45rem 0.75rem !important;
    }

    .fh-cta-banner {
        padding: 2rem 1.25rem;
    }

    .fh-cta-banner h3 {
        font-size: 1.5rem;
    }

    .fh-modal-box {
        max-width: 95%;
        max-height: 95vh;
    }

    .fh-modal-box--wide {
        max-width: 95%;
    }

    .fh-modal-body {
        padding: 1rem;
    }

    .fh-modal-header {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .fh-nav {
        border-radius: 0;
        padding: 0.5rem 0;
    }

    .fh-nav-inner {
        padding: 0 0.75rem;
        gap: 0.5rem;
    }

    .fh-nav-brand {
        font-size: 1.05rem;
    }

    .fh-nav-right {
        gap: 0.5rem;
    }

    .fh-search-wrap {
        width: 140px;
    }

    .fh-wrap .fh-search-input {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.5rem 0.4rem 1.75rem !important;
    }

    .fh-hero {
        padding: 1.5rem 1rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
        border-radius: 0;
    }

    .fh-hero-text h1 {
        font-size: 1.35rem;
    }

    .fh-hero-text p {
        font-size: 0.85rem;
    }

    .fh-hero-stats {
        gap: 0.75rem;
    }

    .fh-hero-stat strong {
        font-size: 1rem;
    }

    .fh-hero-stat span {
        font-size: 0.7rem;
    }

    .fh-stats-bar-item {
        flex: 1 1 45%;
        min-width: 45%;
    }

    .fh-stats-bar-item strong {
        font-size: 1.2rem;
    }

    .fh-filter-tab {
        font-size: 0.75rem;
        padding: 0.4rem 0.65rem;
    }

    .fh-category-card {
        padding: 1rem;
    }

    .fh-topic-wrap {
        padding: 10px;
    }

    .fh-topic-heading {
        font-size: 1.2rem;
    }

    .fh-topic-hero-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .fh-topic-hero-author {
        margin-right: 0;
    }

    .fh-topic-hero-stats {
        width: 100%;
        justify-content: flex-start;
    }

    .fh-reply-card {
        padding: 1rem;
    }

    .fh-reply-content img {
        max-width: 100%;
    }

    .fh-reply-actions {
        gap: 0.35rem;
    }

    .fh-reply-actions {
        gap: 0.3rem;
    }

    .fh-btn-action {
        font-size: 0.72rem;
        padding: 0.3rem 0.55rem;
    }

    .fh-reply-form-wrap {
        padding: 1rem;
    }

    .fh-editor-wrap .mce-edit-area iframe {
        min-height: 120px !important;
    }

    .fh-editor-wrap textarea.wp-editor-area {
        min-height: 120px !important;
    }

    .fh-modal {
        padding: 0.75rem;
    }

    .fh-modal-box {
        max-width: 100%;
        border-radius: 8px;
    }

    .fh-modal-header h3 {
        font-size: 1rem;
    }

    .fh-cta-banner {
        padding: 1.5rem 1rem;
        border-radius: 8px;
    }

    .fh-cta-banner h3 {
        font-size: 1.25rem;
    }

    .fh-cta-banner p {
        font-size: 0.9rem;
    }

    .fh-btn-primary {
        font-size: 0.85rem;
        padding: 0.55rem 1rem;
    }

    #fh-submit-topic {
        width: 100% !important;
        margin-left: 0 !important;
    }
}

/* ─── CATEGORY TOPICS LIST ────────────────────────────────── */
.fh-topics-list-section {
    display: none;
    border-top: 1px solid var(--fh-border);
    margin-top: 1.5rem;
    padding-top: 1.5rem;
}

.fh-category-card.active-filtered .fh-topics-list-section {
    display: block;
}

.fh-topics-list-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--fh-text);
}

.fh-topics-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.fh-topic-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background-color: var(--fh-bg);
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.fh-topic-list-item:hover {
    border-color: #E99D22;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.fh-topic-list-left {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.fh-topic-list-avatar img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.fh-topic-list-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    gap: 0.15rem;
}

.fh-topic-list-title {
    margin: 0 !important;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fh-topic-list-title a {
    color: var(--fh-text);
    text-decoration: none;
    transition: color 0.15s;
}

.fh-topic-list-title a:hover {
    color: var(--fh-primary);
}

.fh-topic-list-meta {
    font-size: 0.78rem;
    color: var(--fh-text-muted);
    font-weight: normal;
}

.fh-topic-list-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    align-self: stretch;
    gap: 0.35rem;
}

.fh-topic-list-stats {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.35rem;
}

.fh-topic-stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background-color: var(--fh-card-bg);
    border: 1px solid var(--fh-border);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--fh-text-muted);
}

.fh-topic-stat-chip svg {
    color: var(--fh-text-muted);
    vertical-align: middle;
}

.fh-topic-list-activity {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.75rem;
    color: var(--fh-text-muted);
}

.fh-topic-activity-time {
    font-weight: 500;
    color: var(--fh-text);
}

.fh-topic-activity-author {
    font-size: 0.7rem;
}

@media (max-width: 640px) {
    .fh-topic-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .fh-topic-list-right {
        width: 100%;
        flex-direction: row-reverse;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid var(--fh-border);
        padding-top: 0.5rem;
        gap: 0.5rem;
    }
    
    .fh-topic-list-activity {
        align-items: flex-end;
    }
}

/* ==========================================
   AUTHENTICATION MODAL OVERLAY (LOGIN / SIGN UP)
   ========================================== */
.fh-auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.fh-auth-modal-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 16px;
    padding: 2.5rem 2rem 2rem 2rem;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15), 0 0 15px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    text-align: center;
    font-family: var(--global-body-font-family, system-ui, -apple-system, sans-serif);
    animation: fhAuthModalFadeIn 0.25s ease-out;
}

@keyframes fhAuthModalFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.fh-auth-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
    transition: color 0.15s ease;
}

.fh-auth-modal-close:hover {
    color: #1e293b;
}

.fh-auth-modal-brand {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 1.75rem 0;
    letter-spacing: -0.02em;
}

/* Segmented Pill Tabs */
.fh-auth-tabs {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    gap: 4px;
}

.fh-auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.65rem 1rem;
    font-size: 0.925rem;
    font-weight: 600;
    color: #64748b;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fh-auth-tab:hover {
    color: #334155;
}

.fh-auth-tab.active {
    background: #ffffff;
    color: #2563eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Alert box */
.fh-auth-alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    text-align: left;
}
.fh-auth-alert.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}
.fh-auth-alert.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

/* Input Fields */
.fh-auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.fh-auth-field {
    width: 100%;
}

.fh-auth-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.85rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #1e293b;
    background: #ffffff;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fh-auth-input::placeholder {
    color: #94a3b8;
}

.fh-auth-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Main Action Button */
.fh-auth-submit-btn {
    width: 100%;
    padding: 0.85rem 1rem;
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    margin-top: 0.25rem;
}

.fh-auth-submit-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

/* Footer text */
.fh-auth-footer-text {
    font-size: 0.8rem;
    color: #64748b;
    margin: 1.25rem 0 0 0;
    line-height: 1.4;
}

/* ==========================================
   USER MENU BUBBLE POPPER (HEADER DROPDOWN)
   ========================================== */
.fh-user-menu-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.fh-user-menu-trigger {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    border-radius: 50%;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fh-user-menu-trigger:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.fh-user-menu-bubble {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 210px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    z-index: 99999;
    animation: fhBubblePop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.fh-user-menu-bubble::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 14px;
    width: 10px;
    height: 10px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    border-left: 1px solid #e2e8f0;
    transform: rotate(45deg);
}

@keyframes fhBubblePop {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.fh-user-menu-header {
    padding: 0.25rem 1rem 0.5rem 1rem;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.fh-user-menu-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
}

.fh-user-menu-email {
    font-size: 0.75rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fh-user-menu-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 0.4rem 0;
}

.fh-user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.fh-user-menu-item:hover {
    background: #fef2f2;
    color: #dc2626;
}

.fh-user-menu-item svg {
    color: inherit;
}

/* ==========================================
   MEMBERS DIRECTORY GRID & CARDS
   ========================================== */
.fh-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.fh-member-card {
    background: var(--fh-card-bg, #ffffff);
    border: 1px solid var(--fh-border, #e2e8f0);
    border-radius: var(--fh-radius, 12px);
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.fh-member-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.08);
    border-color: var(--fh-primary, #2563eb);
}

.fh-member-avatar-wrap {
    margin-bottom: 0.75rem;
}

.fh-member-avatar-wrap img,
.fh-member-avatar-wrap .fh-avatar {
    width: 64px !important;
    height: 64px !important;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.fh-member-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--fh-text, #0f172a);
    margin: 0 0 0.15rem 0;
    line-height: 1.3;
}

.fh-member-username {
    font-size: 0.8rem;
    color: var(--fh-text-muted, #64748b);
    margin-bottom: 0.6rem;
}

.fh-member-role-row {
    margin-bottom: 0.6rem;
}

.fh-role-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 20px;
}

.fh-role-admin {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.fh-role-mod {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.fh-role-member {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.fh-member-meta {
    font-size: 0.75rem;
    color: var(--fh-text-muted, #94a3b8);
    margin-bottom: 1rem;
}

.fh-member-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
    padding: 0.65rem 0;
    border-top: 1px dashed var(--fh-border, #e2e8f0);
    border-bottom: 1px dashed var(--fh-border, #e2e8f0);
    margin-bottom: 1rem;
}

.fh-member-stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fh-member-stat-val {
    font-size: 1rem;
    font-weight: 700;
    color: var(--fh-text, #0f172a);
    line-height: 1.2;
}

.fh-member-stat-lbl {
    font-size: 0.7rem;
    color: var(--fh-text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.fh-member-profile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fh-text, #334155);
    background: #f8fafc;
    border: 1px solid var(--fh-border, #e2e8f0);
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.fh-member-profile-btn:hover {
    background: var(--fh-primary, #2563eb);
    color: #ffffff !important;
    border-color: var(--fh-primary, #2563eb);
}

/* AUTHOR & MEMBER CROSS-LINKING STYLES */
.fh-author-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}
.fh-author-link:hover {
    color: var(--fh-primary, #2563eb);
    text-decoration: underline;
}

.fh-author-avatar-link {
    display: inline-flex;
    text-decoration: none;
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.fh-author-avatar-link:hover {
    transform: scale(1.06);
    opacity: 0.9;
}

.fh-stat-link {
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
}
.fh-stat-link:hover {
    background: #f1f5f9;
    border-color: var(--fh-primary, #2563eb);
}

/* ── LOCK / UNLOCK BUTTON ────────────────────────────────────── */
.fh-lock-btn {
    color: var(--fh-text-muted);
    transition: color 0.2s ease, background 0.2s ease;
}
.fh-lock-btn:hover {
    color: #d97706; /* amber-600 */
    background: #fffbeb;
}
.fh-lock-btn.fh-locked {
    color: #dc2626; /* red-600 — locked state */
}
.fh-lock-btn.fh-locked:hover {
    color: #16a34a; /* green-600 — hover = unlock intent */
    background: #f0fdf4;
}