.sd-forumhead__top {
    background: var(--header-background);
    color: var(--header-text-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 1rem;
    min-height: var(--header-item-height);
}

.sd-forumhead__welcome {
    color: var(--header-text-color);
    font-size: .8125em;
}

.sd-forumhead__welcome .sd-forumhead__link-btn {
    color: var(--link-color);
    font-size: inherit;
}

.sd-forumhead__actions {
    margin-left: auto;
    display: flex;
    align-items: center;
}

    .sd-forumhead__actions a:visited {
        color: var(--accent-color-text);
    }

/* New Topic CTA — defaults to the legacy blue button style, but each theme
   can override via per-theme rules to match its own .sd-btn-primary look.
   The shared rule uses the theme's --accent-color / --accent-color-text so
   themes with no explicit override still pick up their palette. */
.sd-forumhead__new-topic {
    background: var(--accent-color);
    box-sizing: border-box;
    color: var(--accent-color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    border: 1px solid var(--accent-color);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 1px 3px rgba(0,0,0,.3);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    height: 36px;
    width: 126px;
    transition: background .15s ease-in-out, box-shadow .15s ease-in-out, transform .1s ease-in-out;
}

    .sd-forumhead__new-topic:hover {
        opacity: .9;
        text-decoration: none;
        box-shadow: inset 0 0 6px rgba(255,255,255,.3);
    }

    .sd-forumhead__new-topic:active {
        transform: translateY(1px);
    }

.sd-forumhead__bottom {
    background: var(--forumhead-background);
    color: var(--forumhead-text-color);
    line-height: 2em;
    display: flex;
    align-items: center;
    padding: 0 38px;
}

.sd-forumhead__links {
    display: flex;
    align-items: center;
    gap: .5em;
    flex-wrap: wrap;
}

    .sd-forumhead__links a {
        color: var(--forumhead-text-color);
        font-size: .8125em;
        text-decoration: none;
        white-space: nowrap;
    }

        .sd-forumhead__links a:hover {
            text-decoration: underline;
            text-decoration-style: dotted;
        }

.sd-forumhead__sep {
    color: var(--forumhead-text-color);
    user-select: none;
}

.sd-forumhead__inline-form {
    display: inline;
    margin: 0;
    padding: 0;
}

.sd-forumhead__link-btn {
    background: none;
    border: none;
    color: var(--forumhead-text-color);
    font-size: .8125em;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    white-space: nowrap;
}

.sd-forumhead__link-btn:hover {
    text-decoration: underline;
    text-decoration-style: dotted;
}

@media(max-width:767px) {
    .sd-forumhead__top {
        padding: 4px .5rem;
    }

    .sd-forumhead__bottom {
        padding: 0 .5rem;
    }

    .sd-forumhead__links a {
        font-size: .75em;
    }

    .sd-forumhead__sep {
        font-size: .75em;
    }

    .sd-forumhead__new-topic {
        padding: 0 10px;
        font-size: .7em;
    }

    .sd-forumhead__link-btn {
        font-size: .75em;
    }
}
