:root {
    --cols: 44px 1fr 80px 80px 260px;
}

.Forum {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px;
}
.ForumTop {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 4px;
}
.Breadcrumb span {
    margin: 0 4px;
    color: var(--muted);
}
.ForumActions {
    display: flex;
    gap: 8px;
}
.ForumSearch {
    padding-block: 6px;
}
.IconBtn {
    display: inline-grid;
    place-items: center;
    font-size: 15px;
    line-height: 1;
}

.Category {
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}
.CategoryHeader {
    display: grid;
    grid-template-columns: var(--cols);
    align-items: center;
    padding: 10px 14px;
    background: linear-gradient(var(--header), var(--panel-alt));
    border-bottom: 2px solid var(--accent);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}
.CategoryHeader::-webkit-details-marker {
    display: none;
}
.CategoryHeader > span:first-child {
    grid-column: 1 / 3;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.CategoryHeader > span:first-child::before {
    content: "\25BE";
    display: inline-block;
    margin-right: 8px;
    transition: transform 0.2s;
}
.Category:not([open]) .CategoryHeader > span:first-child::before {
    transform: rotate(-90deg);
}
.ColLabel {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
    text-align: center;
}
.ColLabel:last-child {
    text-align: left;
}

.ForumRow {
    display: grid;
    grid-template-columns: var(--cols);
    align-items: center;
    padding: 12px 14px;
    background: var(--panel);
    border-top: 1px solid var(--border);
}
.ForumRow:nth-of-type(even) {
    background: var(--panel-alt);
}
.ForumRow:hover {
    background: var(--header);
}
.ForumIcon {
    width: 30px;
    height: 30px;
    background: var(--header);
    border: 1px solid var(--border);
    border-radius: 4px;
}
.ForumIcon.unread {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 50%, transparent);
}
.ForumIcon.HasAvatar {
    overflow: hidden;
    border-radius: 50%;
}
.ForumIcon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ForumName {
    font-size: 15px;
    font-weight: 600;
}
.ForumDesc {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 13px;
}
.Subforums {
    margin-top: 4px;
    font-size: 12px;
}
.Subforums::before {
    content: "Subforums: ";
    color: var(--muted);
}
/* Inline-block keeps the link's hover underline off the comma. */
.Subforums a:not(:last-child)::after {
    content: ",";
    display: inline-block;
    color: var(--muted);
}
.ThreadTag {
    margin-right: 6px;
    padding: 0 6px;
    background: var(--header);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.ForumStat {
    font-weight: 600;
    text-align: center;
}
.LastPost {
    display: flex;
    flex-direction: column;
    min-width: 0;
    color: var(--muted);
    font-size: 13px;
}
.LastPost > a {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Who's Online names are blurred (cosmetic: they're still in the page). */
#online-list .User {
    filter: blur(4px);
    user-select: none;
}
.Totals {
    color: var(--muted);
}
.Stats.slim .StatsBody p {
    margin: 0;
}

.Toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
}
.Toolbar select {
    margin-left: 6px;
    padding: 4px 6px;
}
.Pagination {
    display: flex;
    align-items: center;
    gap: 4px;
}
.Pagination span {
    padding: 3px 9px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 3px;
}
.Pagination .current {
    background: var(--accent);
    border-color: var(--accent);
    color: #1a1a1a;
    font-weight: 600;
}
.SubforumPager {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-top: 1px solid var(--border);
}

.ThreadList .CategoryHeader {
    cursor: default;
}
.ThreadList .CategoryHeader > span:first-child::before {
    content: none;
}
.ThreadList .EmptyState {
    border-top: 1px solid var(--border);
}
.EmptyState p {
    margin: 0 0 14px;
}

@media (max-width: 700px) {
    :root {
        --cols: 36px 1fr;
    }
    .ColLabel,
    .ForumStat,
    .LastPost {
        display: none;
    }
}
