:root {
    --army-green: #4b5320;
    --army-green-dark: #3a4019;
    --army-tan: #c2b280;
    --bg-light: #f5f5f0;
    --text-dark: #2b2b23;
    --nav-icon-color: #cfe0a8;
}

html {
    height: 100%;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.hq-main-content {
    flex: 1 0 auto;
}

.hq-footer {
    flex-shrink: 0;
}

.hq-navbar {
    background-color: var(--army-green);
    border-bottom: 3px solid var(--army-tan);
    /* Deliberately NOT sticky/fixed — scrolls away with the page, unchanged from before. */
}

.hq-navbar-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 15px;
}

.hq-navbar-brand { display: flex; align-items: center; flex-shrink: 0; }
.hq-navbar-logo { height: 34px; width: auto; display: block; }

/* Desktop search — small, green-tinted pill (not the old big white bar) */
.hq-navbar-search-form {
    align-items: center;
    gap: 8px;
    background-color: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 20px;
    padding: 5px 14px;
    flex: 1;
    max-width: 320px;
    margin: 0 auto;
    color: var(--nav-icon-color);
}
.hq-navbar-search-form svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--nav-icon-color); }
.hq-navbar-search {
    background: none;
    border: none;
    color: #fff;
    font-size: 0.85rem;
    flex: 1;
    min-width: 0;
    padding: 0;
}
.hq-navbar-search:focus { outline: none; box-shadow: none; }
.hq-navbar-search::placeholder { color: rgba(255,255,255,0.55); }

.hq-navbar-mobile-search {
    background-color: var(--army-green-dark);
    padding: 8px 0;
}
.hq-navbar-mobile-search form {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 20px;
    padding: 6px 14px;
}
.hq-navbar-mobile-search svg { width: 16px; height: 16px; color: var(--nav-icon-color); flex-shrink: 0; }
.hq-navbar-mobile-search .hq-navbar-search { color: #fff; }

/* Icon buttons — light sage/olive "green variation" tone against the dark
   green bar, brightening on hover/focus for feedback. */

.hq-navbar-icons {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    flex-shrink: 0;
}

.hq-navbar-icon-btn {
    background: none;
    border: none;
    color: var(--nav-icon-color);
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: relative;
    text-decoration: none;
    padding: 0;
}
.hq-navbar-icon-btn:hover { background-color: rgba(255,255,255,0.14); color: #fff; }
.hq-navbar-icon-btn svg { width: 20px; height: 20px; }

.hq-navbar-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: #dc3545;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}

.hq-navbar-avatar-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 4px 4px;
    border-radius: 20px;
    color: #fff;
}
.hq-navbar-avatar-btn:hover { background-color: rgba(255,255,255,0.14); }
.hq-navbar-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.5);
}
.hq-navbar-username { font-size: 0.85rem; font-weight: 600; }

.dropdown-item svg { width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; color: var(--army-green); }

@media (max-width: 767px) {
    .hq-navbar-row { padding: 6px 12px; gap: 8px; }
    .hq-navbar-logo { height: 28px; }
    .hq-navbar-icon-btn, .hq-navbar-avatar-btn { width: 34px; height: 34px; }
    .hq-navbar-username { display: none; }
}

.hq-footer {
    background-color: var(--army-green-dark);
    color: var(--army-tan);
}

.hq-footer-links { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.hq-footer-links a { color: var(--army-tan); font-size: 0.82rem; text-decoration: none; }
.hq-footer-links a:hover { color: #fff; text-decoration: underline; }

.hq-readonly-banner {
    background-color: #6b1f1f;
    color: #fff;
    text-align: center;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Forum/Category/Subforum/Branch detail page header */
.hq-forum-page-header {
    display: flex;
    align-items: center;
    gap: 18px;
    background-color: #fff;
    border: 1px solid #e4e6da;
    border-left: 5px solid var(--army-green);
    border-radius: 8px;
    padding: 20px 24px;
}
.hq-forum-page-icon {
    font-size: 2.2rem;
    color: var(--army-green);
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-light);
    border-radius: 50%;
}
.hq-forum-page-info { flex: 1; min-width: 0; }
.hq-forum-page-title {
    color: var(--army-green-dark);
    font-weight: 800;
    margin-bottom: 4px;
    font-size: 1.5rem;
}
.hq-forum-page-desc { color: #6b6b5c; margin-bottom: 8px; font-size: 0.9rem; }
.hq-forum-page-stats {
    display: flex;
    gap: 16px;
    align-items: baseline;
    font-size: 0.85rem;
    color: #757575;
}
.hq-forum-page-stats strong { color: var(--army-green-dark); font-size: 1rem; }

@media (max-width: 767px) {
    .hq-forum-page-header { flex-wrap: wrap; padding: 16px; }
    .hq-forum-page-icon { width: 44px; height: 44px; font-size: 1.7rem; }
    .hq-forum-page-title { font-size: 1.2rem; }
}

.btn-primary, .btn-hq {
    background-color: var(--army-green);
    border-color: var(--army-green-dark);
    color: #fff;
}
.btn-primary:hover, .btn-hq:hover {
    background-color: var(--army-green-dark);
    border-color: var(--army-green-dark);
}

.btn-hq-outline {
    background-color: #fff;
    border: 1px solid var(--army-green);
    color: var(--army-green-dark);
}
.btn-hq-outline:hover {
    background-color: var(--army-green);
    color: #fff;
}

.card-forum {
    background-color: #ffffff;
    border-left: 4px solid var(--army-green);
    margin-bottom: 12px;
}

.card-forum:hover {
    box-shadow: 0 2px 8px rgba(75, 83, 32, 0.2);
}

.thread-pinned {
    border-left: 4px solid #b8860b;
}

.badge-rank {
    background-color: var(--army-tan);
    color: var(--army-green-dark);
}

a {
    color: var(--army-green-dark);
}
a:hover {
    color: var(--army-green);
}

.breadcrumb-hq {
    background-color: var(--army-tan);
    padding: 8px 16px;
    border-radius: 4px;
}

.field-status {
    font-size: 0.875rem;
    margin-top: 4px;
}
.field-status.ok { color: #2e7d32; }
.field-status.bad { color: #c62828; }
.field-status.checking { color: #757575; }

/* Profile page */
.profile-username {
    font-weight: 700;
    color: var(--army-green-dark);
    letter-spacing: 0.3px;
}

.profile-flag {
    font-size: 1.1rem;
    vertical-align: middle;
}

.profile-bio {
    background-color: #eef1e4;
    border-left: 4px solid var(--army-green);
    color: var(--army-green-dark);
    padding: 10px 14px;
    margin: 0;
    font-size: 0.9rem;
    font-style: italic;
    border-radius: 0 4px 4px 0;
    text-align: left;
}

.profile-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.profile-stat {
    background-color: #f5f5f0;
    border-radius: 6px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.3;
    flex: 1 1 28%;
    min-width: 70px;
}

.profile-stat-icon {
    font-size: 1.1rem;
}

.profile-stat-btn {
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.profile-stat-btn:hover { background-color: #eef0e6; }

.hq-follow-list {
    max-height: 360px;
    overflow-y: auto;
}
.hq-follow-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--text-dark);
    border-bottom: 1px solid #f0f1e9;
}
.hq-follow-list-item:last-child { border-bottom: none; }
.hq-follow-list-item:hover { background-color: var(--bg-light); }
.hq-follow-list-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--army-tan);
    flex-shrink: 0;
}

.profile-stat strong {
    color: var(--army-green-dark);
    font-size: 1.05rem;
}

.profile-stat span:last-child {
    font-size: 0.75rem;
    color: #757575;
}

.profile-badge {
    background-color: var(--bg-light);
    border: 1px solid var(--army-tan);
    color: var(--text-dark);
    font-weight: 500;
    padding: 6px 10px;
}

/* Thread header */
.hq-thread-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    background-color: #fff;
    border: 1px solid #e4e6da;
    border-left: 4px solid var(--army-green);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.hq-thread-title {
    color: var(--army-green-dark);
    font-weight: 700;
    margin-bottom: 4px;
}
.hq-thread-meta {
    color: #757575;
    font-size: 0.85rem;
    margin-bottom: 0;
}
.hq-thread-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Post card */
.hq-post-card {
    display: grid;
    grid-template-columns: 150px 1fr;
    background-color: #fff;
    border: 1px solid #e4e6da;
    border-radius: 8px;
    /* No overflow:hidden here — it used to clip the share/reaction popups.
       Rounded corners are instead applied directly to the sidebar below. */
    margin-bottom: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.hq-post-sidebar {
    background-color: #f2f4ea;
    border-right: 1px solid #e4e6da;
    border-radius: 8px 0 0 8px;
    padding: 18px 10px;
    text-align: center;
}
.hq-post-main {
    border-radius: 0 8px 8px 0;
}
.hq-post-avatar-wrap {
    position: relative;
    display: inline-block;
}
.hq-avatar-message-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: var(--army-green);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    border: 2px solid #fff;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.hq-avatar-message-badge:hover { background-color: var(--army-green-dark); }
.hq-post-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--army-tan);
}
.hq-post-username {
    display: block;
    margin-top: 8px;
    font-weight: 700;
    color: var(--army-green-dark);
    text-decoration: none;
    font-size: 0.85rem;
    line-height: 1.3;
}
.hq-post-flag { font-size: 0.8rem; }
.hq-post-status-badge {
    display: inline-block;
    margin-top: 5px;
    font-size: 0.62rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
}
.hq-status-civil { background-color: #e4e6da; color: #555; }
.hq-status-serviceman { background-color: var(--army-green); color: #fff; }
.hq-status-veteran { background-color: var(--army-tan); color: #4b3b0a; }
.hq-post-meta-small {
    margin-top: 8px;
    font-size: 0.68rem;
    color: #9a9a8c;
    line-height: 1.5;
}

.hq-post-main { padding: 14px 18px; }
.hq-post-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.hq-post-body { margin: 8px 0 10px; }
.hq-message-link { display: inline-block; margin-bottom: 8px; }
.hq-post-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

/* Reply backlink card (distinct from the quote-card used inside message content) */
.hq-reply-backlink-card {
    display: block;
    background-color: #f5f6ef;
    border-left: 3px solid var(--army-tan);
    border-radius: 0 6px 6px 0;
    padding: 6px 10px;
    margin-bottom: 10px;
    text-decoration: none;
    color: inherit;
}
.hq-reply-backlink-card:hover { background-color: #eef0e6; }
.hq-reply-backlink-label {
    display: block;
    font-size: 0.75rem;
    color: #6b6b5c;
}
.hq-reply-backlink-label strong { color: var(--army-green-dark); }
.hq-reply-backlink-excerpt {
    display: block;
    font-size: 0.82rem;
    color: #4a4a3e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile responsive */
@media (max-width: 576px) {
    .hq-post-card { grid-template-columns: 1fr; }
    .hq-post-sidebar {
        display: flex;
        align-items: center;
        gap: 10px;
        text-align: left;
        border-right: none;
        border-bottom: 1px solid #e4e6da;
        padding: 10px 12px;
    }
    .hq-post-avatar { width: 40px; height: 40px; }
    .hq-post-username { margin-top: 0; }
    .hq-post-meta-small { display: none; }
    .hq-thread-header { flex-direction: column; align-items: stretch; }
    .hq-thread-header-actions { justify-content: flex-start; }
}

/* Jump-to-post highlight flash */
.post-highlight {
    animation: hq-highlight-flash 2.5s ease-out;
}
@keyframes hq-highlight-flash {
    0% { box-shadow: 0 0 0 3px var(--army-tan); background-color: #f5f0dc; }
    100% { box-shadow: none; background-color: transparent; }
}

/* Pagination */
.hq-pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin: 16px 0;
    flex-wrap: wrap;
}
.hq-pagination a, .hq-pagination span {
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid var(--army-tan);
    text-decoration: none;
    font-size: 0.85rem;
}
.hq-pagination a { color: var(--army-green-dark); background-color: #fff; }
.hq-pagination a:hover { background-color: var(--bg-light); }
.hq-pagination .current { background-color: var(--army-green); color: #fff; border-color: var(--army-green); }
.hq-pagination .disabled { color: #bbb; border-color: #eee; }

/* Reaction widget */
.hq-reaction-widget {
    position: relative;
    display: inline-block;
}
.hq-reaction-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #fff;
    border: 1px solid var(--army-tan);
    color: #757575;
    border-radius: 4px;
    padding: 5px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}
.hq-reaction-trigger:hover { background-color: var(--bg-light); }
.hq-reaction-trigger svg { width: 16px; height: 16px; }
.hq-reaction-trigger.active {
    color: var(--army-green-dark);
    border-color: var(--army-green);
    background-color: #eef3e2;
    font-weight: 600;
}

.hq-reaction-popup {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    z-index: 1050;
    display: flex;
    gap: 4px;
    background-color: #fff;
    border: 1px solid var(--army-tan);
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
.hq-reaction-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: none;
    border: none;
    border-radius: 6px;
    padding: 6px 8px;
    cursor: pointer;
    color: #6b7a3a;
    transition: background-color 0.15s, transform 0.1s;
}
.hq-reaction-option:hover {
    background-color: #eef3e2;
    transform: translateY(-2px);
}
.hq-reaction-option.active {
    background-color: var(--army-green);
    color: #fff;
}
.hq-reaction-option svg { width: 20px; height: 20px; }
.hq-reaction-option-count {
    font-size: 0.68rem;
    font-weight: 600;
}

/* Profile feedback / star ratings */
.hq-avg-rating {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--army-green-dark);
}

.hq-star-selector {
    display: flex;
    gap: 4px;
    font-size: 1.7rem;
    line-height: 1;
}
.hq-star {
    cursor: pointer;
    color: #d8d8c8;
    position: relative;
    user-select: none;
}
.hq-star input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.hq-star.selected { color: var(--army-green); }

.hq-star-display {
    color: var(--army-green);
    font-size: 0.95rem;
    letter-spacing: 1px;
}

.hq-my-review-card {
    border-left: 4px solid var(--army-green);
    background-color: #f5f8ec;
}

.hq-honeypot-wrap {
    position: absolute;
    left: -9999px;
    top: -9999px;
    height: 0;
    width: 0;
    overflow: hidden;
}
.hq-honeypot { opacity: 0; }

/* Homepage hero */
.hq-hero {
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    min-height: 280px;
    display: flex;
    align-items: center;
    padding: 40px;
    color: #fff;
    overflow: hidden;
}
.hq-hero-content { max-width: 560px; }
.hq-hero-eyebrow {
    font-size: 0.8rem;
    letter-spacing: 2px;
    font-weight: 600;
    color: var(--army-tan);
    text-transform: uppercase;
}
.hq-hero-title {
    font-size: 2.6rem;
    font-weight: 800;
    margin: 4px 0 12px;
    letter-spacing: 1px;
}
.hq-hero-desc {
    font-size: 0.95rem;
    color: #e4e6da;
    margin-bottom: 20px;
}
.hq-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-hq-outline-light {
    background-color: transparent;
    border: 1px solid rgba(255,255,255,0.6);
    color: #fff;
}
.btn-hq-outline-light:hover { background-color: rgba(255,255,255,0.15); color: #fff; }

.hq-section-header { margin-bottom: 10px; }
.hq-section-header h5 { color: var(--army-green-dark); font-weight: 700; margin: 0; }
.text-hq-green { color: var(--army-green); }

/* Nested board tree (Category > Subforum > Branch) — always fully
   expanded (no collapse), one seamless container, each level visually
   distinguished by a colored left accent bar + background tint + size step
   rather than separate "boxed" cards. */
.hq-board-tree {
    background-color: #fff;
    border: 1px solid #e4e6da;
    border-radius: 8px;
    /* No overflow:hidden here — it clipped the branches dropdown popup.
       Rounded corners are applied to the first/last row instead. */
}
.hq-board-tree > .hq-board-node:first-child > .hq-board-header { border-radius: 8px 8px 0 0; }
.hq-board-tree > .hq-board-node:last-child > .hq-board-header { border-radius: 0 0 8px 8px; }
.hq-board-tree > .hq-board-node:only-child > .hq-board-header { border-radius: 8px; }
.hq-board-node { border-bottom: 1px solid #eef0e6; }
.hq-board-node:last-child { border-bottom: none; }
.hq-board-children .hq-board-node:last-child { border-bottom: 1px solid #eef0e6; }
.hq-board-children { border-top: 1px solid #eef0e6; }

.hq-board-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-left: 4px solid transparent;
}
.hq-board-header:hover { background-color: var(--bg-light); }

/* Level 0 = Category (largest, army-green accent) */
.hq-board-level-0 > .hq-board-header {
    border-left-color: var(--army-green);
    background-color: #fff;
}
.hq-board-level-0 > .hq-board-header .hq-board-name { font-size: 1.02rem; font-weight: 700; }
.hq-board-level-0 > .hq-board-header .hq-board-icon { font-size: 1.3rem; color: var(--army-green); }

/* Level 1 = Subforum (tan accent, light tint, indented) */
.hq-board-level-1 > .hq-board-header {
    border-left-color: var(--army-tan);
    background-color: #fbfbf6;
    padding-left: 40px;
}
.hq-board-level-1 > .hq-board-header .hq-board-name { font-size: 0.92rem; font-weight: 600; }
.hq-board-level-1 > .hq-board-header .hq-board-icon { font-size: 1.1rem; color: #a89660; }

/* Level 2 = Branch (muted accent, more tint, more indented) */
.hq-board-level-2 > .hq-board-header {
    border-left-color: #b9c48a;
    background-color: #f5f6f0;
    padding-left: 64px;
}
.hq-board-level-2 > .hq-board-header .hq-board-name { font-size: 0.85rem; font-weight: 500; }
.hq-board-level-2 > .hq-board-header .hq-board-icon { font-size: 0.95rem; color: #8a976a; }

.hq-board-icon { flex-shrink: 0; width: 22px; text-align: center; }
.hq-board-info { flex: 1; min-width: 0; }
.hq-board-name { color: var(--army-green-dark); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hq-board-name a { color: inherit; text-decoration: none; }
.hq-board-name a:hover { text-decoration: underline; }
.hq-branch-dropdown .btn-link {
    color: #8a976a;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
}
.hq-branch-dropdown .btn-link:hover { color: var(--army-green-dark); }

.hq-bookmark-btn.active {
    color: #fff;
    background-color: var(--army-green);
    border-color: var(--army-green);
}
.hq-bookmark-btn.active:hover { background-color: var(--army-green-dark); }

.hq-notif-list {
    background-color: #fff;
    border: 1px solid #e4e6da;
    border-radius: 8px;
    overflow: hidden;
}
.hq-notif-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #eef0e6;
}
.hq-notif-item:last-child { border-bottom: none; }
.hq-notif-item:hover { background-color: var(--bg-light); }
.hq-notif-item.unread { background-color: #f5f8ec; }
.hq-notif-icon { font-size: 1.3rem; flex-shrink: 0; width: 30px; text-align: center; }
.hq-notif-body { flex: 1; min-width: 0; }
.hq-notif-new-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: var(--army-green);
    flex-shrink: 0;
}
.hq-board-desc {
    font-size: 0.78rem;
    color: #757575;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 380px;
}
.hq-board-stats {
    display: flex;
    gap: 18px;
    text-align: center;
    flex-shrink: 0;
}
.hq-board-stats div { font-size: 0.78rem; color: #757575; }
.hq-board-stats strong { display: block; color: var(--army-green-dark); font-size: 0.95rem; }
.hq-board-latest {
    flex-shrink: 0;
    width: 180px;
    font-size: 0.82rem;
}
.hq-board-latest a { color: var(--army-green-dark); text-decoration: none; }
.hq-board-latest a:hover { text-decoration: underline; }


/* Summary strip below the board tree */
.hq-summary-strip {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    background-color: #fff;
    border: 1px solid #e4e6da;
    border-radius: 8px;
    padding: 14px 10px;
    margin-top: 14px;
    text-align: center;
}
.hq-summary-strip div { padding: 4px 10px; }
.hq-summary-strip strong { display: block; color: var(--army-green-dark); font-size: 1.05rem; }
.hq-summary-strip span { font-size: 0.72rem; color: #9a9a8c; text-transform: uppercase; letter-spacing: 0.5px; }

/* Generic sidebar card */
.hq-card {
    background-color: #fff;
    border: 1px solid #e4e6da;
    border-radius: 8px;
    padding: 14px 16px;
}
.hq-card h6 {
    color: var(--army-green-dark);
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.hq-stat-list { list-style: none; padding: 0; margin: 0; }
.hq-stat-list li {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #f0f1e9;
    font-size: 0.85rem;
}
.hq-stat-list li:last-child { border-bottom: none; }
.hq-stat-list strong { color: var(--army-green-dark); }

.hq-recent-post-item {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid #f0f1e9;
    text-decoration: none;
    color: inherit;
}
.hq-recent-post-item:last-child { border-bottom: none; }
.hq-recent-post-item .fw-bold { color: var(--army-green-dark); font-size: 0.88rem; }

.hq-contributor-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    text-decoration: none;
    color: inherit;
}
.hq-contributor-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--army-tan);
}

.hq-legend-list { list-style: none; padding: 0; margin: 0; font-size: 0.82rem; }
.hq-legend-list li { padding: 4px 0; color: #6b6b5c; }

/* Static content pages (About, Terms, Privacy, FAQ, Guidelines) */
.hq-static-page {
    background-color: #fff;
    border: 1px solid #e4e6da;
    border-radius: 8px;
    padding: 32px;
    max-width: 820px;
    margin: 0 auto;
}
.hq-static-page h1 {
    color: var(--army-green-dark);
    font-weight: 800;
    margin-bottom: 6px;
}
.hq-static-page .hq-static-subtitle {
    color: #9a9a8c;
    font-size: 0.85rem;
    margin-bottom: 24px;
}
.hq-static-page h2 {
    color: var(--army-green-dark);
    font-weight: 700;
    font-size: 1.15rem;
    margin-top: 28px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--army-tan);
}
.hq-static-page p, .hq-static-page li { color: #3a3a30; line-height: 1.7; }
.hq-static-page ul, .hq-static-page ol { padding-left: 22px; }

.hq-faq-item {
    border-bottom: 1px solid #eef0e6;
    padding: 14px 0;
}
.hq-faq-item:last-child { border-bottom: none; }
.hq-faq-question {
    font-weight: 700;
    color: var(--army-green-dark);
    margin-bottom: 6px;
}

@media (max-width: 767px) {
    .hq-static-page { padding: 20px; }
}

@media (max-width: 767px) {
    .hq-hero {
        min-height: 170px;
        padding: 18px;
        border-radius: 8px;
    }
    .hq-hero-title { font-size: 1.6rem; margin: 2px 0 8px; }
    .hq-hero-eyebrow { font-size: 0.68rem; }
    .hq-hero-desc { font-size: 0.82rem; margin-bottom: 14px; }
    .hq-hero-actions { gap: 8px; }
    .hq-hero-actions .btn { font-size: 0.78rem; padding: 6px 12px; }

    .hq-section-header h5 { font-size: 1rem; }

    .hq-board-header {
        flex-wrap: wrap;
        gap: 4px 10px;
        padding: 12px;
    }
    .hq-board-desc { display: none; }
    .hq-board-latest { display: none; }
    .hq-board-stats {
        flex-basis: 100%;
        justify-content: flex-start;
        gap: 16px;
        margin-top: 2px;
    }
    .hq-board-stats div { font-size: 0.72rem; }
    .hq-board-name { font-size: 0.88rem !important; }
    .hq-board-level-1 > .hq-board-header { padding-left: 22px; }
    .hq-board-level-2 > .hq-board-header { padding-left: 36px; }

    .hq-summary-strip { padding: 10px 6px; gap: 2px; }
    .hq-summary-strip div { flex: 1 1 30%; padding: 6px 4px; }
    .hq-summary-strip strong { font-size: 0.92rem; }
    .hq-summary-strip span { font-size: 0.62rem; }

    .hq-card { padding: 12px 14px; }
}

/* Auth pages (login, register, OTP, forgot password) */
.hq-auth-wrap {
    max-width: 440px;
    margin: 20px auto 0;
}
.hq-auth-card {
    background-color: #fff;
    border: 1px solid #e4e6da;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.hq-auth-header {
    background-color: var(--army-green);
    color: #fff;
    padding: 22px 28px 18px;
    text-align: center;
}
.hq-auth-icon {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 6px;
}
.hq-auth-title { font-weight: 800; margin: 0; letter-spacing: 0.3px; }
.hq-auth-subtitle { font-size: 0.8rem; color: #d8dcc4; margin-top: 4px; }
.hq-auth-step {
    display: inline-block;
    background-color: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 12px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 3px 12px;
    margin-bottom: 10px;
}
.hq-auth-body { padding: 26px 28px 28px; }
.hq-auth-body .form-label { font-size: 0.82rem; font-weight: 600; color: var(--army-green-dark); }
.hq-auth-body .form-control, .hq-auth-body .form-select {
    border-color: #dcdfd0;
}
.hq-auth-body .form-control:focus, .hq-auth-body .form-select:focus {
    border-color: var(--army-green);
    box-shadow: 0 0 0 0.2rem rgba(75,83,32,0.15);
}
.hq-auth-footer-link {
    text-align: center;
    margin-top: 16px;
    font-size: 0.85rem;
    color: #6b6b5c;
}
.hq-otp-code-input {
    letter-spacing: 8px;
    font-size: 1.4rem;
    text-align: center;
    font-weight: 700;
}
.hq-otp-countdown {
    text-align: center;
    font-size: 0.85rem;
    color: #6b6b5c;
    margin: 12px 0;
}
.hq-otp-countdown strong { color: var(--army-green-dark); font-variant-numeric: tabular-nums; }

.hq-search-filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    background-color: #fff;
    border: 1px solid #e4e6da;
    border-radius: 8px;
    padding: 12px;
}
.hq-search-filter-bar input[type="search"] { flex: 1; min-width: 200px; }

/* All Users / Members directory */
.hq-member-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: #fff;
    border: 1px solid #e4e6da;
    border-radius: 8px;
    padding: 16px 10px;
    text-decoration: none;
    color: inherit;
    height: 100%;
    transition: box-shadow 0.15s, border-color 0.15s;
}
.hq-member-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.08); border-color: var(--army-tan); }
.hq-member-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--army-tan);
    margin-bottom: 8px;
}
.hq-member-name { font-weight: 700; color: var(--army-green-dark); font-size: 0.9rem; }
.hq-member-status {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.62rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
}
.hq-member-meta { font-size: 0.7rem; color: #9a9a8c; margin-top: 6px; }

